idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
943,229 | public void publish() throws Exception {<NEW_LINE>final String wikiUri = getWikiUri();<NEW_LINE>final File directory = new File(getProject().getBuildDir(), "tmp/tutorialPublish");<NEW_LINE>// Use Personal Access Token or GITHUB_TOKEN for workflows<NEW_LINE>final CredentialsProvider credentialsProvider = new UsernamePas... | collect(joining(", "))); |
1,463,367 | public void enterSs_virtual_server(A10Parser.Ss_virtual_serverContext ctx) {<NEW_LINE>Optional<String> maybeName = toString(ctx, ctx.virtual_server_name());<NEW_LINE>if (!maybeName.isPresent()) {<NEW_LINE>_currentVirtualServer = new // dummy<NEW_LINE>VirtualServer(// dummy<NEW_LINE>ctx.virtual_server_name().getText(), ... | toVirtualServerTarget(ctx.virtual_server_target()); |
486,634 | public Node parse(ParserMode mode, int optimizeLevel, ParserErrorCallback errors, Source source, Frame currentFrame, String[] argumentNames) {<NEW_LINE>if (logFiles) {<NEW_LINE>if (source.getPath() == null) {<NEW_LINE>System.out.println("Parsing source without path " + source.getCharacters().length());<NEW_LINE>CharSeq... | = timeInParser + (end - start); |
1,390,053 | static void validatePartialUpsertStrategies(TableConfig tableConfig, Schema schema) {<NEW_LINE>if (tableConfig.getUpsertMode() != UpsertConfig.Mode.PARTIAL) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Preconditions.checkState(tableConfig.getIndexingConfig().isNullHandlingEnabled(), "Null handling must be enabled for partial... | String column = entry.getKey(); |
508,542 | public boolean enterForNode(ForNode forNode) {<NEW_LINE>// within parens spaces<NEW_LINE>markSpacesWithinParentheses(forNode, getStart(forNode), getStart(forNode.getBody()), FormatToken.Kind.AFTER_FOR_PARENTHESIS, FormatToken.Kind.BEFORE_FOR_PARENTHESIS);<NEW_LINE>// mark space before left brace<NEW_LINE>markSpacesBefo... | markEndCurlyBrace(forNode.getBody()); |
1,212,913 | public JComponent build() {<NEW_LINE>ProjectStructureSettingsUtil util = (ProjectStructureSettingsUtil) ShowSettingsUtil.getInstance();<NEW_LINE>final SdkModel projectSdksModel = util.getSdksModel();<NEW_LINE>final SdkComboBox comboBox = new SdkComboBox(projectSdksModel, mySdkFilter, null, myNullItemName, myNullItemIco... | String sdkInheritModuleName = inheritableSdk.getModuleName(); |
745,464 | private IMethodDetails resolveTypeVars(IMethodDetails mthDetails, Map<ArgType, ArgType> typeVarsMapping) {<NEW_LINE>List<ArgType<MASK><NEW_LINE>int argsCount = argTypes.size();<NEW_LINE>boolean fixed = false;<NEW_LINE>List<ArgType> fixedArgTypes = new ArrayList<>(argsCount);<NEW_LINE>for (int argNum = 0; argNum < argsC... | > argTypes = mthDetails.getArgTypes(); |
38,044 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));<NEW_LINE>Spell spell = game.getStack().getSpell(source.getSourceId());<NEW_LINE>if (controller != null &... | ) + "?", game, source); |
31,446 | public DBRecord translateRecord(DBRecord oldRec) {<NEW_LINE>if (oldRec == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DBRecord rec = TypedefDBAdapter.SCHEMA.<MASK><NEW_LINE>rec.setLongValue(TYPEDEF_DT_ID_COL, oldRec.getLongValue(V1_TYPEDEF_DT_ID_COL));<NEW_LINE>// default TYPEDEF_FLAGS_COL to 0<NEW_LINE>rec.setSt... | createRecord(oldRec.getKey()); |
318,509 | public static RunInfo instantiateFromSkylark(SkylarkDict<String, String> env, Object args) throws EvalException {<NEW_LINE>Map<String, String> validatedEnv = env.getContents(String.class, String.class, "environment");<NEW_LINE>CommandLineArgs commandLineArgs;<NEW_LINE>if (args instanceof CommandLineArgsBuilder) {<NEW_L... | args, Object.class, "getting args"); |
399,473 | public static PageCursorFactory mapIntoPageCursorFactory(SortOrder sortOrder, ZonedDateTime transitSearchTimeZero, SearchParams searchParams, Duration searchWindowNextSearch, Itinerary firstRemovedItinerary, @Nullable PageType currentPageType) {<NEW_LINE>var factory = new PageCursorFactory(sortOrder, searchWindowNextSe... | currentPageType, edt, lat, searchWindow); |
1,348,155 | private JSFunctionData createSourceInstantiationImpl(JSContext context) {<NEW_LINE>CallTarget callTarget = new JavaScriptRootNode(context.getLanguage(), null, null) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object execute(VirtualFrame frame) {<NEW_LINE>InstantiatedSourceInfo info = (InstantiatedSourceInfo) JSArgum... | ), info.getImportObject()); |
1,631,162 | private ClassTree insertSecurityFetaureField(WorkingCopy workingCopy, TreeMaker make, ClassTree javaClass, TypeElement classElement) {<NEW_LINE>for (VariableElement var : ElementFilter.fieldsIn(classElement.getEnclosedElements())) {<NEW_LINE>TypeMirror varType = var.asType();<NEW_LINE>if (!varType.getKind().equals(Type... | PolicyManager.SECURITY_FEATURE, typeTree, initializer); |
596,754 | private void loadTemplatePressed() {<NEW_LINE>JFileChooser chooser = FileChooserFactory.getCetFileChooser();<NEW_LINE>chooser.setCurrentDirectory(CurrentDirectory.get());<NEW_LINE>chooser.setDialogTitle(res.getString("DAddExtensions.LoadCet.Title"));<NEW_LINE>chooser.setMultiSelectionEnabled(false);<NEW_LINE>chooser.se... | File loadFile = chooser.getSelectedFile(); |
225,262 | private void fetchExecutionResult(@NotNull DBCSession session, @NotNull DBDDataReceiver dataReceiver, @NotNull SQLQuery query) throws DBCException {<NEW_LINE>// Fetch fake result set<NEW_LINE>StatResultSet fakeResultSet = new StatResultSet(session, curStatement);<NEW_LINE>SQLQueryResult resultInfo = new SQLQueryResult(... | addColumn("Finish time", DBPDataKind.DATETIME); |
1,447,043 | public void bind(@NonNull DcMsg messageResult, @NonNull GlideRequests glideRequests, @NonNull Locale locale, @Nullable String highlightSubstring) {<NEW_LINE>DcContext dcContext = DcHelper.getContext(getContext());<NEW_LINE>DcContact sender = dcContext.getContact(messageResult.getFromId());<NEW_LINE>this.selectedThreads... | fromView.setText(recipient, true); |
1,597,233 | private void transformClassDef(Dex in, ClassDef classDef, IndexMap indexMap, List<DexSectionItem<ClassDef>> dupClassDefs) {<NEW_LINE>idsDefsOut.assertFourByteAligned();<NEW_LINE>idsDefsOut.writeInt(classDef.getTypeIndex());<NEW_LINE>idsDefsOut.writeInt(classDef.getAccessFlags());<NEW_LINE>idsDefsOut.writeInt(classDef.g... | adjustString(classDef.getSourceFileIndex()); |
1,613,643 | private void onSolution(Solver solver, XCSPParser parser) {<NEW_LINE>output.setLength(0);<NEW_LINE>output.append(parser.printSolution(!flatten));<NEW_LINE>if (solver.getObjectiveManager().isOptimization()) {<NEW_LINE>if (level.isLoggable(Level.COMPET) || level.is(Level.RESANA)) {<NEW_LINE>solver.log().printf(java.util.... | println(output.toString()); |
735,092 | final UpdateVoiceConnectorResult executeUpdateVoiceConnector(UpdateVoiceConnectorRequest updateVoiceConnectorRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateVoiceConnectorRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | (super.beforeMarshalling(updateVoiceConnectorRequest)); |
837,562 | public static void main(String[] args) {<NEW_LINE>SwingUtilities.invokeLater(() -> {<NEW_LINE>FlatLightLaf.setup();<NEW_LINE>JFrame frame = new JFrame("FlatScreenshotsBackground");<NEW_LINE>frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<NEW_LINE>// register ESC key to close frame<NEW_LINE>((JComponent) frame.get... | frame.setExtendedState(JFrame.MAXIMIZED_BOTH); |
1,407,064 | public void configure(ConfigurableProvider provider) {<NEW_LINE>provider.addAlgorithm("AlgorithmParameters.CAMELLIA", PREFIX + "$AlgParams");<NEW_LINE>provider.addAlgorithm("Alg.Alias.AlgorithmParameters", NTTObjectIdentifiers.id_camellia128_cbc, "CAMELLIA");<NEW_LINE>provider.addAlgorithm("Alg.Alias.AlgorithmParameter... | "Alg.Alias.SecretKeyFactory", NTTObjectIdentifiers.id_camellia128_cbc, "CAMELLIA"); |
287,579 | public void fromStream() {<NEW_LINE>subclasses = null;<NEW_LINE>superClasses.clear();<NEW_LINE>name = document.field("name");<NEW_LINE>if (document.containsField("shortName"))<NEW_LINE>shortName = document.field("shortName");<NEW_LINE>else<NEW_LINE>shortName = null;<NEW_LINE>if (document.containsField("description"))<N... | prop.getName(), prop); |
1,248,450 | public Object read(HashMap<String, Object> event) throws Exception {<NEW_LINE>List<S3EventNotificationRecord> s3records = new ArrayList<S3EventNotificationRecord>();<NEW_LINE>ArrayList<HashMap<String, ?>> records = ArrayList.class.cast(event.get("Records"));<NEW_LINE>records.forEach(r -> {<NEW_LINE>HashMapWrapper recor... | eventSource = record.getAsString("eventSource"); |
608,786 | public static void vertical(Kernel1D_S32 kernel, GrayS16 input, GrayI16 output) {<NEW_LINE>final short[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int[] dataKer = kernel.data;<NEW_LINE>final <MASK><NEW_LINE>final int offsetL = kernel.getOffset();<NEW_LINE>final int offsetR = ker... | int kernelWidth = kernel.getWidth(); |
416,139 | public PresignedUrlDownloadResult download(PresignedUrlDownloadRequest presignedUrlDownloadRequest) throws SdkClientException {<NEW_LINE>assertNotNull(presignedUrlDownloadRequest.getPresignedUrl(), "Presigned URL");<NEW_LINE>final ProgressListener listener = presignedUrlDownloadRequest.getGeneralProgressListener();<NEW... | PresignedUrlDownloadResult().withS3Object(s3Object); |
401,164 | Counter addCounter(final int typeId, final DirectBuffer keyBuffer, final int keyOffset, final int keyLength, final DirectBuffer labelBuffer, final int labelOffset, final int labelLength) {<NEW_LINE>clientLock.lock();<NEW_LINE>try {<NEW_LINE>ensureActive();<NEW_LINE>ensureNotReentrant();<NEW_LINE>if (keyLength < 0 || ke... | throw new IllegalArgumentException("key length out of bounds: " + keyLength); |
685,087 | public RegistryCenterClient connectByNamespace(String namespace) {<NEW_LINE>RegistryCenterConfiguration registryCenterConfiguration = findConfigByNamespace(namespace);<NEW_LINE>if (registryCenterConfiguration == null) {<NEW_LINE>return new RegistryCenterClient();<NEW_LINE>}<NEW_LINE>String nns = registryCenterConfigura... | getZookeeperClient().isConnected()); |
741,971 | private void createSchedule(Properties context, String transactionName) {<NEW_LINE>// Delete before apply<NEW_LINE>new Query(context, I_AD_Scheduler.Table_Name, I_AD_Scheduler.COLUMNNAME_AD_Process_ID + " = ?", transactionName).setParameters(FlushSystemQueue.getProcessId()).setClient_ID().list().forEach(scheduler -> sc... | (Env.getAD_User_ID(context)); |
721,634 | public int writePageHeaderAndDataIntoBuff(PublicBAOS pageBuffer, boolean first) throws IOException {<NEW_LINE>if (statistics.getCount() == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>ByteBuffer pageData = getUncompressedBytes();<NEW_LINE>int uncompressedSize = pageData.remaining();<NEW_LINE>int compressedSize;<NEW_LINE... | ReadWriteForEncodingUtils.writeUnsignedVarInt(uncompressedSize, pageBuffer); |
1,724,826 | public final EvalAndExpressionContext evalAndExpression() throws RecognitionException {<NEW_LINE>EvalAndExpressionContext _localctx = new EvalAndExpressionContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 308, RULE_evalAndExpression);<NEW_LINE>try {<NEW_LINE>int _alt;<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LI... | adaptivePredict(_input, 269, _ctx); |
1,499,371 | public void transferByteRangeTo(Output output, boolean utf8String, int fieldNumber, boolean repeated) throws IOException {<NEW_LINE>final int length = readRawVarInt32();<NEW_LINE>if (length < 0) {<NEW_LINE>throw ProtocolException.negativeSize();<NEW_LINE>}<NEW_LINE>if (utf8String) {<NEW_LINE>// if it is a UTF string, w... | nioBuffer.position(position + length); |
1,486,186 | public void acceptSearchMatch(SearchMatch match) throws CoreException {<NEW_LINE>if (match.getAccuracy() == SearchMatch.A_INACCURATE) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object o = match.getElement();<NEW_LINE>if (o instanceof IJavaElement) {<NEW_LINE>IJavaElement element = (IJavaElement) o;<NEW_LINE>ICompilationUni... | ), match.getLength()); |
633,159 | public static void fmlInit() {<NEW_LINE>CustomRotationHelper.INSTANCE.registerHandlerForAll(BlockButton.class, VanillaRotationHandlers::rotateButton);<NEW_LINE>CustomRotationHelper.INSTANCE.registerHandlerForAll(BlockTripWireHook.class, VanillaRotationHandlers::rotateTripWireHook);<NEW_LINE>CustomRotationHelper.INSTANC... | BlockWallSign.class, VanillaRotationHandlers::rotateWallSign); |
983,907 | public void instanceCodegen(CodegenInstanceAux instance, CodegenClassScope classScope, CodegenCtor factoryCtor, List<CodegenTypedParam> factoryMembers) {<NEW_LINE>instance.getMethods().addMethod(SelectExprProcessor.EPTYPE, "getSelectExprProcessor", Collections.emptyList(), this.getClass(), classScope, methodNode -> met... | ResultSetProcessorAggregateGroupedImpl.removedAggregationGroupKeyCodegen(classScope, instance); |
1,705,752 | public void concat(final Path dst, final Path[] srcs) throws IOException {<NEW_LINE>statistics.incrementWriteOps(1);<NEW_LINE>if (getFileStatus(dst).getLen() == 0) {<NEW_LINE>throw new IOException(dst + "is empty");<NEW_LINE>}<NEW_LINE>Path dp = dst.getParent();<NEW_LINE>for (Path src : srcs) {<NEW_LINE>if (!src.getPar... | .length, (byte) 0); |
1,139,199 | public void subscribe(CoreSubscriber<? super ClientResponse> subscriber) {<NEW_LINE>Context context = subscriber.currentContext();<NEW_LINE>if (log.isTraceEnabled()) {<NEW_LINE>log.trace("Got the following context [" + context + "]");<NEW_LINE>}<NEW_LINE>ClientRequestWrapper wrapper = new ClientRequestWrapper(this.requ... | get(TraceContext.class) : null; |
446,441 | public Response variables(SQL sql, SecurityContext securityContext) {<NEW_LINE>try {<NEW_LINE>RequestValidationHandler.validateSQL(sql);<NEW_LINE>PhysicalPlan physicalPlan = serviceProvider.getPlanner().parseSQLToPhysicalPlan(sql.getSql());<NEW_LINE>if (!(physicalPlan instanceof ShowPlan) && !(physicalPlan instanceof Q... | ServiceProvider.SESSION_MANAGER.releaseQueryResourceNoExceptions(queryId); |
829,912 | public static Context prepareParentContext() {<NEW_LINE>Context context = new Context();<NEW_LINE>for (int c = 0; c < GV.dsModel.size(); c++) {<NEW_LINE>DataSource ds = (DataSource) GV.dsModel.getElementAt(c);<NEW_LINE>if (ds == null || ds.isClosed()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>context.setD... | = GV.dsModelRemote.keySet(); |
1,371,596 | public void removeInvolvedUser(String taskId, ObjectNode requestNode) {<NEW_LINE>Task task = taskService.createTaskQuery().taskId(taskId).singleResult();<NEW_LINE>if (task == null) {<NEW_LINE>throw new NotFoundException("Task with id: " + taskId + " does not exist");<NEW_LINE>}<NEW_LINE>permissionService.validateReadPe... | ), task.getId()); |
223,060 | public static void convolve3(Kernel2D_S32 kernel, GrayS16 src, GrayI16 dest, int divisor, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>workspaces = BoofMiscOps.checkDeclare(workspaces, DogArray_I32::new);<NEW_LINE>// CONCURRENT_REMOVE_LINE<NEW_LINE>final DogArray_I32 work = workspaces.grow();<NEW_LINE>final... | short[] dataDst = dest.data; |
1,575,716 | private List<QueryTrace> queryTracesFromRetries(final List<RetryException> retryExceptions, final List<Long> backoffTimings) {<NEW_LINE>final List<QueryTrace> traces = new ArrayList<>();<NEW_LINE>long lastTS = 0;<NEW_LINE>final Iterator<Long> backoffIterator = backoffTimings.iterator();<NEW_LINE>for (final RetryExcepti... | getOffsetMillis(), TimeUnit.MILLISECONDS); |
547,146 | private void cellPaintName(TableCell cell, GC gc, Rectangle cellBounds, int textX, int originalBoundxsX) {<NEW_LINE>String name = null;<NEW_LINE>Object ds = cell.getDataSource();<NEW_LINE>if (ds instanceof DiskManagerFileInfo) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DownloadManager dm = (DownloadManager) ds;<NEW_LINE>if... | TableColumn tableColumn = cell.getTableColumn(); |
381,576 | final DescribeAccountSettingsResult executeDescribeAccountSettings(DescribeAccountSettingsRequest describeAccountSettingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAccountSettingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | false), new DescribeAccountSettingsResultJsonUnmarshaller()); |
665,099 | public Object execute(final Map<Object, Object> iArgs) {<NEW_LINE>if (clusterName == null)<NEW_LINE>throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");<NEW_LINE>final ODatabaseDocumentInternal database = getDatabase();<NEW_LINE>final int clusterId = database.getCluster... | ODatabaseException("Cluster with name " + clusterName + " does not exist"); |
1,279,047 | final GetAssistantResult executeGetAssistant(GetAssistantRequest getAssistantRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getAssistantRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,665,377 | public TransitGatewayMulticastDeregisteredGroupSources unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>TransitGatewayMulticastDeregisteredGroupSources transitGatewayMulticastDeregisteredGroupSources = new TransitGatewayMulticastDeregisteredGroupSources();<NEW_LINE>int originalDepth = context.get... | ().unmarshall(context)); |
1,028,204 | void createToolWindowContent(ToolWindow toolWindow) {<NEW_LINE>// Create runner UI layout<NEW_LINE>RunnerLayoutUi.Factory factory = RunnerLayoutUi.Factory.getInstance(project);<NEW_LINE>RunnerLayoutUi layoutUi = factory.create("", "", "session", project);<NEW_LINE>layoutUi.getOptions().setMoveToGridActionEnabled<MASK><... | (false).setMinimizeActionEnabled(false); |
1,225,634 | public double rayCast(Ray2D ray) {<NEW_LINE>final double divisor = ray.getDirection().getX() * ray.getDirection().getX() + ray.getDirection().getY() * ray<MASK><NEW_LINE>if (Util.compareDoubles(divisor, 0.0d))<NEW_LINE>return Double.POSITIVE_INFINITY;<NEW_LINE>final double squareRoot = Math.sqrt(ray.getDirection().getY... | .getDirection().getY(); |
1,118,654 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>View v = inflater.inflate(R.layout.fragment_albums, container, false);<NEW_LINE>ButterKnife.bind(this, v);<NEW_LINE>int spanCount = columnsCount();<NEW_LINE>spacingDecoration = new G... | refresh.setOnRefreshListener(this::displayAlbums); |
1,192,302 | public void onPlayerMove(final PlayerMoveEvent event) {<NEW_LINE>if (event.getFrom().getBlockX() == event.getTo().getBlockX() && event.getFrom().getBlockZ() == event.getTo().getBlockZ() && event.getFrom().getBlockY() == event.getTo().getBlockY()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!ess.getSettings().cancelAfkOn... | getUser(event.getPlayer()); |
1,344,948 | /*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.grpc.service.ScheduleManagementGrpc.ScheduleManagementImplBase#<NEW_LINE>* createScheduledJob(com.sitewhere.grpc.service.GCreateScheduledJobRequest,<NEW_LINE>* io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void createScheduledJob(GCreateScheduled... | getCreateScheduledJobMethod(), e, responseObserver); |
648 | public void subscriptionCreated(SubscriptionEvent evt) {<NEW_LINE>if (logger.isTraceEnabled())<NEW_LINE>logger.trace("Subscription created: " + evt);<NEW_LINE>// ignore the event if the source contact is in the ignore list<NEW_LINE>if (isContactInEventIgnoreList(evt.getSourceContact(), evt.getSourceProvider())) {<NEW_L... | logger.error("Received a subscription for a group that we " + "hadn't seen before! "); |
1,649,616 | public Request<DescribeVpcClassicLinkDnsSupportRequest> marshall(DescribeVpcClassicLinkDnsSupportRequest describeVpcClassicLinkDnsSupportRequest) {<NEW_LINE>if (describeVpcClassicLinkDnsSupportRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Re... | <DescribeVpcClassicLinkDnsSupportRequest>(describeVpcClassicLinkDnsSupportRequest, "AmazonEC2"); |
870,475 | public static void updateComponentTokenCounts(final List<Token> tokens) {<NEW_LINE>final Map<String, Deque<Integer>> map = new HashMap<>();<NEW_LINE>for (int i = 0, size = tokens.size(); i < size; i++) {<NEW_LINE>final Token token = tokens.get(i);<NEW_LINE>final Signal signal = token.signal();<NEW_LINE>if (signal.name(... | (beginIndex).componentTokenCount(componentTokenCount); |
153,855 | public void writeObject(Object o) {<NEW_LINE>if (o == null) {<NEW_LINE>writeTag(o);<NEW_LINE>} else if (o.getClass().isPrimitive() && o.getClass() != float.class && o.getClass() != double.class) {<NEW_LINE>writeIntPacked(((Number) o).longValue());<NEW_LINE>} else if (o.getClass().isArray() && o.getClass().getComponentT... | ) o).charValue()); |
248,660 | public boolean processCommandLineArgs(String[] cliArgs) {<NEW_LINE>constructCommandLineOptions();<NEW_LINE>CommandLineParser cliParser = new GnuParser();<NEW_LINE>_cmd = null;<NEW_LINE>try {<NEW_LINE>_cmd = cliParser.parse(_cliOptions, cliArgs);<NEW_LINE>} catch (ParseException pe) {<NEW_LINE>printError("failed to pars... | _log.debug("Using custom logging settings from file " + log4jPropFile); |
1,177,846 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (type_ != name.abuchen.portfolio.model.proto.v1.PTransactionUnit.Type.GROSS_VALUE.getNumber()) {<NEW_LINE>output.writeEnum(1, type_);<NEW_LINE>}<NEW_LINE>if (amount_ != 0L) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if... | output.writeInt64(2, amount_); |
87,426 | public static DescribeWarningMachinesResponse unmarshall(DescribeWarningMachinesResponse describeWarningMachinesResponse, UnmarshallerContext context) {<NEW_LINE>describeWarningMachinesResponse.setRequestId(context.stringValue("DescribeWarningMachinesResponse.RequestId"));<NEW_LINE>describeWarningMachinesResponse.setCo... | (context.integerValue("DescribeWarningMachinesResponse.TotalCount")); |
389,258 | /* Build call for throttlingPoliciesSubscriptionPolicyIdDelete */<NEW_LINE>private com.squareup.okhttp.Call throttlingPoliciesSubscriptionPolicyIdDeleteCall(String policyId, String ifMatch, String ifUnmodifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestL... | localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
1,345,626 | final GetPlayerConnectionStatusResult executeGetPlayerConnectionStatus(GetPlayerConnectionStatusRequest getPlayerConnectionStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPlayerConnectionStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.SERVICE_ID, "GameSparks"); |
1,061,628 | public static void main(String[] args) {<NEW_LINE>LOG.info("Starting external worker service");<NEW_LINE>final String optionsEnv = checkArgumentNotNull(System.getenv(PIPELINE_OPTIONS_ENV_VAR), "No pipeline options provided in environment variables " + PIPELINE_OPTIONS_ENV_VAR);<NEW_LINE>LOG.info("Pipeline options {}", ... | LOG.error("Error running worker service", e); |
917,119 | private void receiveTransportAccept(JinglePacket packet) {<NEW_LINE>if (responding()) {<NEW_LINE>Log.d(Config.LOGTAG, id.account.getJid(<MASK><NEW_LINE>respondToIqWithOutOfOrder(packet);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final boolean validState = mJingleStatus == JINGLE_STATUS_ACCEPTED || (proxyActivationFailed && ... | ).asBareJid() + ": received out of order transport-accept (we were responding)"); |
1,515,032 | final DeleteBotAliasResult executeDeleteBotAlias(DeleteBotAliasRequest deleteBotAliasRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteBotAliasRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
176,153 | public void marshall(ReactiveOrganizationInsightSummary reactiveOrganizationInsightSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (reactiveOrganizationInsightSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMa... | e.getMessage(), e); |
343,154 | public void addEntry(String entry) {<NEW_LINE>String[] tokens = Iterables.toArray(ENTRY_SPLITTER.split(entry), String.class);<NEW_LINE>if (tokens.length < 2) {<NEW_LINE>badEntry(entry);<NEW_LINE>}<NEW_LINE>String entryType = tokens[0].toLowerCase();<NEW_LINE>if (entryType.equals("field")) {<NEW_LINE>if (tokens.length =... | .add(tokens[1]); |
1,232,626 | private void execute(Task task) throws Exception {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>WorkLog workLog = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>workLog = emc.firstEqualAndEqual(WorkLog.class, WorkLog.job_FIELDNAME, task.getJob(), WorkLog.fromAc... | String series = StringTools.uniqueToken(); |
858,168 | public static void rotate(List<?> lst, int dist) {<NEW_LINE>checkNotNull(lst);<NEW_LINE><MASK><NEW_LINE>// Rotating an empty collection results in the same empty collection<NEW_LINE>if (size == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Normalize the distance<NEW_LINE>int normdist = dist % size;<NEW_LINE>if (normdist... | int size = lst.size(); |
1,524,937 | public void createPartControl(Composite parent) {<NEW_LINE>viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);<NEW_LINE>viewer.setContentProvider(new WorkspaceContentProvider());<NEW_LINE>viewer.setLabelProvider(new WorkspaceLabelProvider());<NEW_LINE>viewer.addDoubleClickListener(new IDoubleClick... | (new ContentFilter()))); |
1,051,301 | public ManagedScalingPolicy unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ManagedScalingPolicy managedScalingPolicy = new ManagedScalingPolicy();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | JsonToken token = context.getCurrentToken(); |
1,511,705 | static Options createRuntimeOptions(Context context, ClassFinder classFinder, ClassLoader classLoader) {<NEW_LINE>for (final Class<?> clazz : classFinder.getDescendants(Object.class, GluePath.parse(context.getPackageName()))) {<NEW_LINE>if (clazz.isAnnotationPresent(CucumberOptions.class)) {<NEW_LINE>Log.d(TAG, <MASK><... | "Found CucumberOptions in class " + clazz.getName()); |
758,636 | public void run(RegressionEnvironment env) {<NEW_LINE>// test map containing first-level property that is an array of primitive or Class<NEW_LINE>env.compileDeploy("@name('s0') select p0[0] as a, p0[1] as b, p1[0].intPrimitive as c, p1[1] as d, p0 as e from MyArrayOA");<NEW_LINE>env.addListener("s0");<NEW_LINE>int[] p0... | ] { 1, 2, 3 }; |
378,040 | protected void doStart() throws Exception {<NEW_LINE>if (!client.isStarted()) {<NEW_LINE>HttpClient httpClient = getHttpClient();<NEW_LINE>ClientConnector clientConnector = this.client.getClientConnector();<NEW_LINE>clientConnector.setExecutor(httpClient.getExecutor());<NEW_LINE>clientConnector.setScheduler(httpClient.... | (httpClient.getIdleTimeout())); |
1,126,515 | public int executeUpdate(String sql) throws SQLException {<NEW_LINE>// logger.debug("Entered");<NEW_LINE>checkClosed();<NEW_LINE>try {<NEW_LINE>// remove " characters if it is a CREATE statement<NEW_LINE>if (sql.trim().substring(0, 6).compareToIgnoreCase("CREATE") == 0) {<NEW_LINE>sql = <MASK><NEW_LINE>}<NEW_LINE>sqlRe... | sql.replace('"', ' '); |
340,901 | public static ListFunctionsResponse unmarshall(ListFunctionsResponse listFunctionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFunctionsResponse.setRequestId(_ctx.stringValue("ListFunctionsResponse.RequestId"));<NEW_LINE>listFunctionsResponse.setHttpStatusCode<MASK><NEW_LINE>listFunctionsResponse.setSuccess(_ctx.... | (_ctx.stringValue("ListFunctionsResponse.HttpStatusCode")); |
1,162,090 | public void resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings) {<NEW_LINE>MockMethodInterceptor mockMethodInterceptor = new MockMethodInterceptor(newHandler, settings);<NEW_LINE>if (mock instanceof Class<?>) {<NEW_LINE>Map<Class<?>, MockMethodInterceptor> interceptors = mockedStatics.get();<N... | mocks.put(mock, mockMethodInterceptor); |
844,741 | private void moveToCenter() {<NEW_LINE>int transferInCount = 0;<NEW_LINE>int spaceAvailable = getCapacity() - sections[6].amount;<NEW_LINE>for (EnumFacing dir : directions) {<NEW_LINE>inputPerTick[dir.ordinal()] = 0;<NEW_LINE>if (transferState[dir.ordinal()] != TransferState.Output) {<NEW_LINE>inputPerTick[dir.ordinal(... | .ordinal()] = -1; |
762,870 | public void loadPropertiesFromDisk() {<NEW_LINE>synchronized (mLock) {<NEW_LINE>// Get properties from mPropertiesFile<NEW_LINE>Properties properties = getProperties(false);<NEW_LINE>// We still need to load default values into mMap, so we assume no properties defined if<NEW_LINE>// reading from mPropertiesFile failed<... | putToProperties(newProperties, key, value); |
1,622,656 | public void process(Matcher matcher) {<NEW_LINE>RuleStats ruleStats = (RuleStats) matcher.getTag();<NEW_LINE>int rematches = 0, remismatches = 0;<NEW_LINE>for (Integer i : ruleStats.positionMatches.values()) {<NEW_LINE>if (i > 0) {<NEW_LINE>rematches += i - 1;<NEW_LINE>} else if (i < 0) {<NEW_LINE><MASK><NEW_LINE>}<NEW... | remismatches += -(i + 1); |
1,623,123 | public static void main(String[] args) throws Exception {<NEW_LINE>String example_value_to_inject = "THE NEW CONTENT";<NEW_LINE>// Convenient to read from .xml file,<NEW_LINE>// so it is easy to manually edit it (ie without having to unzip etc etc)<NEW_LINE>String inputfilepath = System.getProperty("user.dir") + "/samp... | applyBindings(wordMLPackage.getMainDocumentPart()); |
1,188,722 | public List<Interval> computeTombstoneIntervals() throws IOException {<NEW_LINE>List<Interval> <MASK><NEW_LINE>GranularitySpec granularitySpec = dataSchema.getGranularitySpec();<NEW_LINE>List<Interval> pushedSegmentsIntervals = getCondensedPushedSegmentsIntervals();<NEW_LINE>List<Interval> intervalsForUsedSegments = ge... | retVal = new ArrayList<>(); |
1,759,590 | public static Set<String> tryParseMariaDb2xConnectionUri(String connectionUri) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException, InstantiationException {<NEW_LINE>// these are a bit more complicated<NEW_LINE>Class<?> urlParserClass = Class.for... | options = getOptions.invoke(urlParser); |
1,679,341 | public Object visit(Object context, PropertyGet propertyGet, boolean strict) {<NEW_LINE>// IN obj<NEW_LINE>dup();<NEW_LINE>// obj obj<NEW_LINE>aload(Arities.EXECUTION_CONTEXT);<NEW_LINE>// obj obj context<NEW_LINE>ldc(propertyGet.getName());<NEW_LINE>// obj obj context name<NEW_LINE>invokeinterface(p(JSObject.class), "... | propertyGet.getBlock(), false); |
1,011,094 | // submit the map/reduce job.<NEW_LINE>public int run(final String[] args) throws Exception {<NEW_LINE>if (args.length != 1) {<NEW_LINE>return printUsage();<NEW_LINE>}<NEW_LINE>Path in_path = new Path(args[0]);<NEW_LINE>System.out.println("\n-----===[PEGASUS: A Peta-Scale Graph Mining System]===-----\n");<NEW_LINE>Syst... | FileSystem.get(getConf()); |
1,169,711 | Object initNoArgs(PBaseException self, Object[] args, @Cached CastToJavaStringNode toJavaStringNode, @Cached CastToJavaIntExactNode toJavaIntExactNode, @Cached BaseExceptionBuiltins.BaseExceptionInitNode baseInitNode) {<NEW_LINE><MASK><NEW_LINE>// PyArg_ParseTuple(args, "UnnU"), TODO: add proper error messages<NEW_LINE... | baseInitNode.execute(self, args); |
1,187,374 | public Description matchMethod(MethodTree tree, VisitorState state) {<NEW_LINE>if (!tree.getName().contentEquals("main")) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>MethodSymbol sym = getSymbol(tree);<NEW_LINE>if (sym.getParameters().size() != 1) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>Type type = getOnlyE... | getParameters()).asType(); |
1,729,645 | public static IntTimestampGetter newInstance(@Nonnull TimestampGetter delegateGetter, int blockSize) {<NEW_LINE>if (delegateGetter.size() < 0)<NEW_LINE>throw new NegativeArraySizeException("delegateGetter.size() < 0: " + delegateGetter.size());<NEW_LINE>if (delegateGetter.size() == 0)<NEW_LINE>throw new IllegalArgument... | - 1) / blockSize + 1]; |
1,265,322 | public void marshall(NetworkConnectionAction networkConnectionAction, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (networkConnectionAction == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(networkConnecti... | networkConnectionAction.getProtocol(), PROTOCOL_BINDING); |
793,949 | protected void clear() throws BackgroundException {<NEW_LINE>try {<NEW_LINE>// Cancel all active jobs to remove references to cached objects<NEW_LINE>final Ds3Client ds3Client = new SpectraClientBuilder().wrap(session.getClient(), session.getHost());<NEW_LINE>ds3Client.cancelAllActiveJobsSpectraS3(new CancelAllActiveJo... | S3ExceptionMappingService().map(e); |
1,042,120 | public String buildReport(ModelRequest request, ModelPeriod period, String domain, ApiPayload payload) throws Exception {<NEW_LINE>List<TopReport> reports = super.getReport(period, domain);<NEW_LINE>TopReport report = null;<NEW_LINE>if (reports != null) {<NEW_LINE>report = new TopReport(domain);<NEW_LINE>TopReportMerge... | report = getReportFromLocalDisk(startTime, domain); |
16,718 | private static void convertAndAdd(Map<String, Object> config, CheckpointManagerConfigKey key, Object value) {<NEW_LINE>if (key != null) {<NEW_LINE>switch(key.getType()) {<NEW_LINE>case BYTE_AMOUNT:<NEW_LINE>config.put(key.value(), TypeUtils.getByteAmount(value));<NEW_LINE>break;<NEW_LINE>case DURATION:<NEW_LINE>config.... | , TypeUtils.getLong(value)); |
904,174 | protected final <Z> Z createProxy(final Decorated<Z> decorated, Class<Z> clazz) {<NEW_LINE>Set<Class<?>> decoratedInterfaces = extractInterfaces(decorated);<NEW_LINE>Set<Class<?>> originalInterfaces = extractInterfaces(decorated.getOriginal());<NEW_LINE>Map<Class<?>, InvocationHandler> derivedInterfaces = deriveAdditio... | getLoaded().asSubclass(clazz); |
230,523 | public static GetProjectInfoResponse unmarshall(GetProjectInfoResponse getProjectInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>getProjectInfoResponse.setRequestId(_ctx.stringValue("GetProjectInfoResponse.RequestId"));<NEW_LINE>getProjectInfoResponse.setCode(_ctx.integerValue("GetProjectInfoResponse.Code"));<NEW_LI... | (_ctx.booleanValue("GetProjectInfoResponse.Success")); |
1,034,878 | private void distributeLineSamples(double lat, double lng) {<NEW_LINE>double latdiff = lat - start.lat;<NEW_LINE>double lngdiff = lng - start.lng;<NEW_LINE>LogRecordMap end = mSamples.get(mSamples.size() - 1).get(0);<NEW_LINE>// Get timestamp of the last walking sample<NEW_LINE>// Invalid Location record<NEW_LINE>for (... | (i).get(0); |
466,292 | void executeScript(String script, String action, boolean download_trigger) {<NEW_LINE>String script_type = "";<NEW_LINE>if (script.length() >= 10 && script.substring(0, 10).toLowerCase(Locale.US).startsWith("javascript")) {<NEW_LINE>int p1 = script.indexOf('(');<NEW_LINE>int p2 = script.lastIndexOf(')');<NEW_LINE>if (p... | script.length() - 1); |
913,104 | public void computeEnabled() {<NEW_LINE>boolean viewing = minimizedExpr.isFocusOwner() || karnaughMap.isFocusOwner();<NEW_LINE>setEnabled(LogisimMenuBar.CUT, false);<NEW_LINE>setEnabled(LogisimMenuBar.COPY, viewing);<NEW_LINE>setEnabled(LogisimMenuBar.PASTE, false);<NEW_LINE>setEnabled(LogisimMenuBar.DELETE, false);<NE... | setEnabled(LogisimMenuBar.DUPLICATE, false); |
1,641,463 | private void loadNode151() {<NEW_LINE>ServerCapabilitiesTypeNode node = new ServerCapabilitiesTypeNode(this.context, Identifiers.ServerType_ServerCapabilities, new QualifiedName(0, "ServerCapabilities"), new LocalizedText("en", "ServerCapabilities"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), U... | this.nodeManager.addNode(node); |
503,257 | public void initialise() throws Exception {<NEW_LINE>setLayout(new BorderLayout());<NEW_LINE>ExplanationPreferencesPanelPluginLoader loader = new ExplanationPreferencesPanelPluginLoader(getEditorKit());<NEW_LINE>Set<PreferencesPanelPlugin> plugins = new TreeSet<>((o1, o2) -> {<NEW_LINE>String s1 = o1.getLabel();<NEW_LI... | , 0, 0, 0)); |
589,304 | protected EmbeddedChannel newContentDecoder(String contentEncoding) throws Exception {<NEW_LINE>if (GZIP.contentEqualsIgnoreCase(contentEncoding) || X_GZIP.contentEqualsIgnoreCase(contentEncoding)) {<NEW_LINE>return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(), ctx.channel().config()... | ? ZlibWrapper.ZLIB : ZlibWrapper.ZLIB_OR_NONE; |
1,691,805 | public static <T extends SequenceElement> void writeSequenceVectors(@NonNull SequenceVectors<T> vectors, @NonNull OutputStream stream) throws IOException {<NEW_LINE>InMemoryLookupTable<VocabWord> lookupTable = (InMemoryLookupTable<VocabWord>) vectors.getLookupTable();<NEW_LINE>AbstractCache<T> vocabCache = (AbstractCac... | INDArray syn1NegData = lookupTable.getSyn1Neg(); |
1,517,133 | public void saveGraph() {<NEW_LINE>dustSensorActivity.csvLogger.prepareLogFile();<NEW_LINE>dustSensorActivity.csvLogger.writeMetaData(getResources().getString(R.string.gas_sensor));<NEW_LINE>dustSensorActivity.csvLogger.writeCSVFile(CSV_HEADER);<NEW_LINE>for (DustSensorData dustSensorData : dustSensorActivity.recordedD... | findViewById(R.id.gas_sensor_linearlayout); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.