idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,660,471 | static Object toJsonValue(final Object cqlValue) {<NEW_LINE>if (// Large numbers can cause JSON interoperability issues, for example Javascript only handles<NEW_LINE>cqlValue instanceof UUID || cqlValue instanceof CqlDuration || // integers in the range [-(2**53)+1, (2**53)-1].<NEW_LINE>cqlValue instanceof Long || cqlV... | UserDefinedType udtType = udtValue.getType(); |
766,693 | // List cannot contain duplicated byPropertyName()<NEW_LINE>private List<springfox.documentation.schema.ModelProperty> propertiesFor(ResolvedType type, ModelContext givenContext, String namePrefix) {<NEW_LINE>Set<springfox.documentation.schema.ModelProperty> properties = new TreeSet<>(byPropertyName());<NEW_LINE>BeanDe... | beanDescription = beanDescription(type, givenContext); |
178,112 | public static List<com.appsmith.external.constants.DataType> extractExplicitCasting(String query) {<NEW_LINE>Matcher matcher = questionWithCastPattern.matcher(query);<NEW_LINE>List<com.appsmith.external.constants.DataType> <MASK><NEW_LINE>while (matcher.find()) {<NEW_LINE>String prospectiveDataType = matcher.group(1);<... | inputDataTypes = new ArrayList<>(); |
1,754,155 | private void validateTupleValue(TomlNode value, String variableName, TupleType tupleType) {<NEW_LINE>value = getValueFromKeyValueNode(value);<NEW_LINE>if (!checkEffectiveTomlType(value.kind(), tupleType, variableName)) {<NEW_LINE>throwTypeIncompatibleError(value, variableName, tupleType);<NEW_LINE>}<NEW_LINE>visitedNod... | location().lineRange()); |
491,636 | public StockMove createStockMove(Address fromAddress, Address toAddress, Company company, Partner clientPartner, StockLocation fromStockLocation, StockLocation toStockLocation, LocalDate realDate, LocalDate estimatedDate, String note, ShipmentMode shipmentMode, FreightCarrierMode freightCarrierMode, Partner carrierPart... | .getDefaultISPM(clientPartner, toAddress)); |
1,655,366 | public Request<RevokeClientVpnIngressRequest> marshall(RevokeClientVpnIngressRequest revokeClientVpnIngressRequest) {<NEW_LINE>if (revokeClientVpnIngressRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<RevokeClientVpnIngressRequest> reques... | (revokeClientVpnIngressRequest.getTargetNetworkCidr())); |
427,628 | protected void updateTitle() {<NEW_LINE>// different naming for global and local sheets<NEW_LINE>Mode ourMode = WindowManager.<MASK><NEW_LINE>String nodeTitle = null;<NEW_LINE>// Fix a bug #12890, copy the nodes to prevent race condition.<NEW_LINE>List<Node> copyNodes = new ArrayList<Node>(Arrays.asList(nodes));<NEW_LI... | getDefault().findMode(this); |
397,809 | public Size apply(MethodVisitor methodVisitor, Context implementationContext, MethodDescription instrumentedMethod) {<NEW_LINE>TypeDescription instrumentedType = instrumentedMethod.getDeclaringType().asErasure();<NEW_LINE>MethodDescription enumConstructor = instrumentedType.getDeclaredMethods().filter(isConstructor().a... | StackManipulation stackManipulation = StackManipulation.Trivial.INSTANCE; |
1,341,535 | protected void compute() {<NEW_LINE>if (endPos <= startPos) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (endPos - startPos <= maxPartsInSingleFile) {<NEW_LINE>try {<NEW_LINE>process(matrix, matrixPath, fs, action, partIds, context, startPos, endPos, dataFilesMeta);<NEW_LINE>} catch (Throwable x) {<NEW_LINE>LOG.error(acti... | errorMsgs, startPos, middle, maxPartsInSingleFile); |
1,487,120 | public void deleteAsync(DataStore dataStore, DataObject dataObject, AsyncCompletionCallback<CommandResult> callback) {<NEW_LINE>String errMsg = null;<NEW_LINE>StoragePoolVO storagePool = _storagePoolDao.findById(dataStore.getId());<NEW_LINE>// if the primary storage is not managed(thick provisioned) then no need<NEW_LI... | _storagePoolDao.update(storagePoolId, storagePool); |
1,586,092 | public void populateItem(final Item<RepositoryUrl> repoLinkItem) {<NEW_LINE>RepositoryUrl repoUrl = repoLinkItem.getModelObject();<NEW_LINE>Fragment fragment = new Fragment("actionItem", "actionFragment", this);<NEW_LINE>fragment.add<MASK><NEW_LINE>if (!StringUtils.isEmpty(clientApp.cloneUrl)) {<NEW_LINE>// custom regi... | (createPermissionBadge("permission", repoUrl)); |
865,171 | public static void main(final String[] args, final Configuration configuration) throws Exception {<NEW_LINE>HeroicLogging.configure();<NEW_LINE>Thread.setDefaultUncaughtExceptionHandler((t, e) -> {<NEW_LINE>try {<NEW_LINE>log.error("Uncaught exception in thread {}, exiting...", t, e);<NEW_LINE>} finally {<NEW_LINE>Syst... | .join().get(); |
1,315,505 | public SSTNode registerGlobal(String[] names, int startOffset, int endOffset) {<NEW_LINE>ScopeInfo scopeInfo = scopeEnvironment.getCurrentScope();<NEW_LINE><MASK><NEW_LINE>for (String name : names) {<NEW_LINE>if (scopeInfo.isExplicitNonlocalVariable(name)) {<NEW_LINE>throw errors.raiseInvalidSyntax(source, createSource... | ScopeInfo globalScope = scopeEnvironment.getGlobalScope(); |
1,769,952 | private NotificationDto migrateAlarmCallback(Document alarmCallback) {<NEW_LINE>final String title = alarmCallback.getString("title");<NEW_LINE>final String type = alarmCallback.getString("type");<NEW_LINE>final Document configDoc = (Document) alarmCallback.get("configuration");<NEW_LINE>final Map<String, Object> confi... | dto, userService.getRootUser()); |
244,844 | public void initVariableTypes() {<NEW_LINE>if (variableTypes == null) {<NEW_LINE>variableTypes = new DefaultVariableTypes();<NEW_LINE>if (customPreVariableTypes != null) {<NEW_LINE>for (VariableType customVariableType : customPreVariableTypes) {<NEW_LINE>variableTypes.addType(customVariableType);<NEW_LINE>}<NEW_LINE>}<... | addType(new SerializableType(serializableVariableTypeTrackDeserializedObjects)); |
998,806 | void analyze(Locals locals) {<NEW_LINE>if (block == null) {<NEW_LINE>throw createError(new IllegalArgumentException("Extraneous try statement."));<NEW_LINE>}<NEW_LINE>block.lastSource = lastSource;<NEW_LINE>block.inLoop = inLoop;<NEW_LINE>block.lastLoop = lastLoop;<NEW_LINE>block.analyze<MASK><NEW_LINE>methodEscape = b... | (Locals.newLocalScope(locals)); |
1,141,905 | protected void update() {<NEW_LINE>Widget container = chatboxPanelManager.getContainerWidget();<NEW_LINE>container.deleteAllChildren();<NEW_LINE>Widget promptWidget = container.createChild(-1, WidgetType.TEXT);<NEW_LINE><MASK><NEW_LINE>promptWidget.setTextColor(0x800000);<NEW_LINE>promptWidget.setFontId(fontID);<NEW_LI... | promptWidget.setText(this.prompt); |
1,512,796 | private void initMap(Map<String, Map<String, Long>> mapWithValue, Map<QuotaResource, Long> mapToInit) {<NEW_LINE>for (Map.Entry<String, Map<String, Long>> mapEntry : mapWithValue.entrySet()) {<NEW_LINE>Account account = accountService.getAccountById(Short.valueOf(mapEntry.getKey()));<NEW_LINE>if (account != null) {<NEW... | ), innerMapEntry.getValue()); |
1,127,969 | final GetStreamingDistributionResult executeGetStreamingDistribution(GetStreamingDistributionRequest getStreamingDistributionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getStreamingDistributionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | GetStreamingDistributionResult>(new GetStreamingDistributionResultStaxUnmarshaller()); |
238,503 | public void apply(RuleContext ctx) {<NEW_LINE>double deviation;<NEW_LINE>double minimum = 0.0;<NEW_LINE>if (rule.getProperty(SIGMA_DESCRIPTOR) != null) {<NEW_LINE>// TODO - need to come<NEW_LINE>// up with a good<NEW_LINE>// default value<NEW_LINE>deviation = getStdDev();<NEW_LINE>double sigma = rule.getProperty(SIGMA_... | mMin = rule.getProperty(MINIMUM_DESCRIPTOR); |
1,632,209 | public void copyInterval(TerminalRow line, int sourceX1, int sourceX2, int destinationX) {<NEW_LINE>mHasNonOneWidthOrSurrogateChars |= line.mHasNonOneWidthOrSurrogateChars;<NEW_LINE>final int x1 = line.findStartOfColumn(sourceX1);<NEW_LINE>final int x2 = line.findStartOfColumn(sourceX2);<NEW_LINE>boolean startingFromSe... | mText.length) : line.mText; |
1,769,238 | public void unparse(SqlWriter writer, int leftPrec, int rightPrec) {<NEW_LINE>switch(typeName) {<NEW_LINE>case BOOLEAN:<NEW_LINE>if (writer.getDialect().getDatabaseProduct() == SqlDialect.DatabaseProduct.ORACLE) {<NEW_LINE>writer.keyword(value == null ? "UNKNOWN" : (Boolean) value ? "1" : "0");<NEW_LINE>} else {<NEW_LI... | (String.valueOf(value)); |
512,496 | private void exportIndexDefinitions() throws IOException {<NEW_LINE>listener.onMessage("\nExporting index info...");<NEW_LINE>writer.<MASK><NEW_LINE>final OIndexManagerAbstract indexManager = database.getMetadata().getIndexManagerInternal();<NEW_LINE>indexManager.reload();<NEW_LINE>final Collection<? extends OIndex> in... | beginCollection(1, true, "indexes"); |
88,127 | protected void processAttributeGroup(String parentElement, SchemaRep.AttributeGroup attrGroup) throws Schema2BeansException {<NEW_LINE>SchemaRep.AttributeGroup schemaTypeDef = (SchemaRep.AttributeGroup) schema.getSchemaTypeDef(attrGroup.getRef());<NEW_LINE>if (debug)<NEW_LINE>config.messageOut.println("processAttribute... | , (SchemaRep.Attribute) childee); |
614,005 | public static <T> Collection<T> union(Collection<? extends T> collection1, Collection<? extends T> collection2) {<NEW_LINE>if (isEmpty(collection1)) {<NEW_LINE>if (isEmpty(collection2)) {<NEW_LINE>// if both are empty, return empty list<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>// if just 1 is empty,... | new ArrayList<T>(collection1); |
1,717,895 | private void mergeLookArounds(ASTTransitionCanonicalizer canonicalizer, CompilationBuffer compilationBuffer) {<NEW_LINE>assert mergedStates.isEmpty();<NEW_LINE>canonicalizer.addArgument(initialTransition, getInitialTransitionCharSet(compilationBuffer));<NEW_LINE>for (ASTStep lookBehind : lookBehinds) {<NEW_LINE>ASTSucc... | mergedLookBehinds = canonicalizer.run(compilationBuffer); |
1,489,657 | private String generateJMXConfig() {<NEW_LINE>List<JmxTransQueries> queries = jmxTransQueries();<NEW_LINE>List<JmxTransServer> servers = new ArrayList<>(numberOfBrokers);<NEW_LINE>String headlessService = KafkaResources.brokersServiceName(cluster);<NEW_LINE>for (int brokerNumber = 0; brokerNumber < numberOfBrokers; bro... | cluster, brokerNumber) + "." + headlessService; |
1,720,880 | public void run(RegressionEnvironment env) {<NEW_LINE>SupportBeanCombinedProps combined = SupportBeanCombinedProps.makeDefaultBean();<NEW_LINE>SupportBeanComplexProps complex = SupportBeanComplexProps.makeDefaultBean();<NEW_LINE>assertEquals("0ma0", combined.getIndexed(0).getMapped("0ma").getValue());<NEW_LINE>String e... | (epl).addListener("s0"); |
529,232 | // addElasticReadyOnlyMonitor.<NEW_LINE>private static void addDeleteOldESIndicesJob(final Scheduler scheduler) {<NEW_LINE>try {<NEW_LINE>final String jobName = "DeleteOldESIndicesJob";<NEW_LINE>final String triggerName = "trigger30";<NEW_LINE>final String triggerGroup = "group30";<NEW_LINE>if (Config.getBooleanPropert... | scheduler.deleteJob(jobName, DOTCMS_JOB_GROUP_NAME); |
359,243 | protected <F extends Comparable> Predicate createPredicate(FilterMeta filter, Field filterField, Root<T> root, CriteriaBuilder cb, Expression fieldExpression, F filterValue) {<NEW_LINE>Lazy<Expression<String>> fieldExpressionAsString = new Lazy(() -> fieldExpression.as(String.class));<NEW_LINE>switch(filter.getMatchMod... | ), "%" + filterValue + "%"); |
671,806 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player opponent = game.getPlayer(targetPointer.getFirst(game, source));<NEW_LINE>MageObject sourceObject = game.getObject(source);<NEW_LINE>String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY);<NE... | getName(), revealed, game); |
1,716,607 | public synchronized long addBalance(byte[] address, long value) {<NEW_LINE>AccountCapsule accountCapsule = getAccount(address);<NEW_LINE>if (accountCapsule == null) {<NEW_LINE>accountCapsule = createAccount(<MASK><NEW_LINE>}<NEW_LINE>long balance = accountCapsule.getBalance();<NEW_LINE>if (value == 0) {<NEW_LINE>return... | address, Protocol.AccountType.Normal); |
437,296 | public AutoCloseable process(Class<?> context, Object testInstance) {<NEW_LINE>Field[] fields = context.getDeclaredFields();<NEW_LINE>MemberAccessor accessor = Plugins.getMemberAccessor();<NEW_LINE>for (Field field : fields) {<NEW_LINE>if (field.isAnnotationPresent(Spy.class) && !field.isAnnotationPresent(InjectMocks.c... | e.getMessage(), e); |
1,779,830 | public PlanWithProperties visitLimit(LimitNode node, StreamPreferredProperties parentPreferences) {<NEW_LINE>if (node.isWithTies()) {<NEW_LINE>throw new IllegalStateException("Unexpected node: LimitNode with ties");<NEW_LINE>}<NEW_LINE>if (node.isPartial()) {<NEW_LINE>StreamPreferredProperties requiredProperties = pare... | preferredProperties = parentPreferences.withDefaultParallelism(session); |
200,269 | private void handleString() {<NEW_LINE>final StringBuilder str = new StringBuilder();<NEW_LINE>char ch;<NEW_LINE>if (this.parser.peek() == '\"') {<NEW_LINE>this.parser.advance();<NEW_LINE>}<NEW_LINE>do {<NEW_LINE>ch = this.parser.readChar();<NEW_LINE>if (ch == 34) {<NEW_LINE>// handle double quote<NEW_LINE>if (this.par... | ) && (ch > 0)); |
1,744,979 | public final void pieceDoneChanged(DiskManagerPiece dmPiece) {<NEW_LINE>final int pieceNumber = dmPiece.getPieceNumber();<NEW_LINE>if (dmPiece.isDone()) {<NEW_LINE>addHavePiece(null, pieceNumber);<NEW_LINE>nbPiecesDone++;<NEW_LINE>if (nbPiecesDone >= nbPieces)<NEW_LINE>checkDownloadablePiece();<NEW_LINE>} else {<NEW_LI... | []) availability.clone(); |
1,516,480 | protected void startAndCompleteReportingInstances(ProcessEngine engine, BpmnModelInstance model, Date currentTime, int offset) {<NEW_LINE>Calendar calendar = Calendar.getInstance();<NEW_LINE>int currentMonth = calendar.get(Calendar.MONTH);<NEW_LINE>int currentYear = calendar.get(Calendar.YEAR);<NEW_LINE>calendar.add(Ca... | min = getRandomBetween(1, 10); |
1,641,721 | public CompletableFuture<Void> removeLedgerMetadata(long ledgerId, Version version) {<NEW_LINE>Optional<Long> existingVersion = Optional.empty();<NEW_LINE>if (Version.NEW == version) {<NEW_LINE>log.error("Request to delete ledger {} metadata with version set to the initial one", ledgerId);<NEW_LINE>return FutureUtil.fa... | log.info("Not an instance of ZKVersion: {}", ledgerId); |
1,515,161 | private static List<VertexData> processTriangles(Mesh mesh, int[] index, Vector3f[] v, Vector2f[] t, boolean splitMirrored) {<NEW_LINE>IndexBuffer indexBuffer = mesh.getIndexBuffer();<NEW_LINE>FloatBuffer vertexBuffer = (FloatBuffer) mesh.getBuffer(Type.Position).getData();<NEW_LINE>if (mesh.getBuffer(Type.TexCoord) ==... | processTriangle(index, v, t); |
403,025 | public void onDataSetChanged() {<NEW_LINE>dbNotes.clear();<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>Log.v(TAG, "--- data - " + data);<NEW_LINE>switch(data.getMode()) {<NEW_LINE>case MODE_DISPLAY_ALL:<NEW_LINE>dbNotes.addAll(repo.searchRecentByModified(data.getAccountId(), "%"));<NEW_LINE>break;<NEW_LINE>case MODE_DISPLA... | data = repo.getNoteListWidgetData(appWidgetId); |
1,070,179 | private void doSetText(@Nonnull CharSequence text, @Nullable String debugInfo) {<NEW_LINE>if (Comparing.equal(myText, text))<NEW_LINE>return;<NEW_LINE>text = ImmutableCharSequence.asImmutable(text);<NEW_LINE>SegmentArrayWithData tempSegments = createSegments();<NEW_LINE>TokenProcessor processor = createTokenProcessor(0... | int state = lexerWrapper.getState(); |
1,018,165 | final DeleteDomainConfigurationResult executeDeleteDomainConfiguration(DeleteDomainConfigurationRequest deleteDomainConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDomainConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
374,223 | public void customize(MutableProjectDescription description) {<NEW_LINE>if (!StringUtils.hasText(description.getApplicationName())) {<NEW_LINE>description.setApplicationName(this.metadata.getConfiguration().generateApplicationName(description.getName()));<NEW_LINE>}<NEW_LINE>String targetArtifactId = determineValue(des... | getGroupId().getContent()); |
150,137 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.aptana.index.core.MetadataLoader#writeIndex(com.aptana.index.core.MetadataReader)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>protected void writeIndex(CSSMetadataReader reader) {<NEW_LINE>// remove old index<NEW_LINE>getIndexManager().resetIndex(URI.create(ICSSIndexConstants... | CSSCorePlugin.getDefault(), e); |
678,527 | private void annotateEntries(String prefix, PrintWriter printTo, AnnotatedOutput annotateTo) {<NEW_LINE>finishProcessingIfNecessary();<NEW_LINE>boolean consume = (annotateTo != null);<NEW_LINE><MASK><NEW_LINE>int amt2 = consume ? 2 : 0;<NEW_LINE>int size = table.size();<NEW_LINE>String subPrefix = prefix + " ";<NEW_LI... | int amt1 = consume ? 6 : 0; |
398,460 | public void fireIfOnlySentryParts() {<NEW_LINE>// the following steps are a workaround, because setVariable()<NEW_LINE>// does not check nor fire a sentry!!!<NEW_LINE>Set<String> affectedSentries = new HashSet<String>();<NEW_LINE>List<CmmnSentryPart> sentryParts = collectSentryParts(getSentries());<NEW_LINE>for (CmmnSe... | ArrayList<String>(affectedSentries)); |
329,720 | private void loadNode980() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.SessionDiagnosticsObjectType_SessionDiagnostics_DeleteNodesCount, new QualifiedName(0, "DeleteNodesCount"), new LocalizedText("en", "DeleteNodesCount"), LocalizedText.NULL_VALUE, UInteger.valueOf... | .expanded(), true)); |
139,163 | void init(String text) {<NEW_LINE>setBackground(Color.yellow);<NEW_LINE>setForeground(Color.black);<NEW_LINE>JPanel content = new JPanel();<NEW_LINE>content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));<NEW_LINE>add(content);<NEW_LINE>textPane = new TextPane();<NEW_LINE>textPane.setText(text);<NEW_LINE>textPane.... | buttons.setAlignmentX(Component.LEFT_ALIGNMENT); |
313,439 | public static Query<Integer> averageNewPlayerCount(long after, long before, long timeZoneOffset, ServerUUID serverUUID) {<NEW_LINE>return database -> {<NEW_LINE><MASK><NEW_LINE>String selectNewPlayersQuery = SELECT + sql.dateToEpochSecond(sql.dateToDayStamp(sql.epochSecondToDate('(' + UserInfoTable.REGISTERED + "+?)/10... | Sql sql = database.getSql(); |
627,853 | public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {<NEW_LINE>final boolean denyAll;<NEW_LINE>if (args.length > 0) {<NEW_LINE>denyAll = args[0].equals("*") || args[0].equalsIgnoreCase("all");<NEW_LINE>} else {<NEW_LINE>denyAll = false;<NEW_LINE>}<NEW_L... | new Exception(tl("noPendingRequest")); |
1,631,012 | final UpdateUserProfileResult executeUpdateUserProfile(UpdateUserProfileRequest updateUserProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateUserProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | invoke(request, responseHandler, executionContext); |
1,543,176 | void decode(Decoder decoder, Instruction instruction) {<NEW_LINE>if ((((decoder.state_zs_flags & (StateFlags.Z | StateFlags.B)) | decoder.state_vvvv_invalidCheck | decoder.state_aaa) & decoder.invalidCheckMask) != 0)<NEW_LINE>decoder.setInvalidInstruction();<NEW_LINE>instruction.setCode(code);<NEW_LINE>instruction.setO... | state_rm + decoder.state_extraBaseRegisterBaseEVEX + baseReg2); |
351,646 | final DeleteDeploymentResult executeDeleteDeployment(DeleteDeploymentRequest deleteDeploymentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDeploymentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | false), new DeleteDeploymentResultJsonUnmarshaller()); |
1,327,778 | protected void recalc() {<NEW_LINE>if (dirty) {<NEW_LINE>minimum = null;<NEW_LINE>maximum = null;<NEW_LINE>for (Entry<Double, Double> entry : data.entrySet()) {<NEW_LINE>double x = entry.getKey();<NEW_LINE>double y = data.get(x);<NEW_LINE>if (minimum == null) {<NEW_LINE>minimum = new Point2D.Double(x, y);<NEW_LINE>} el... | max(x, maximum.x); |
297,803 | public PartitionByDefinition copy() {<NEW_LINE>PartitionByDefinition newPartDef = new PartitionByDefinition();<NEW_LINE>newPartDef.setStrategy(this.strategy);<NEW_LINE>List<PartitionSpec> newPartitions = new ArrayList<>();<NEW_LINE>for (int i = 0; i < this.getPartitions().size(); i++) {<NEW_LINE>newPartitions.add(this.... | setBoundSpaceComparator(this.getBoundSpaceComparator()); |
848,310 | public void load(ByteProvider provider, LoadSpec loadSpec, List<Option> options, Program prog, TaskMonitor monitor, MessageLog log) throws IOException {<NEW_LINE>if (!prog.getExecutableFormat().equals(PeLoader.PE_NAME)) {<NEW_LINE>throw new IOException("Program must be a " + PeLoader.PE_NAME);<NEW_LINE>}<NEW_LINE>Symbo... | appendMsg(e.getMessage()); |
1,481,679 | final ListStudioSessionMappingsResult executeListStudioSessionMappings(ListStudioSessionMappingsRequest listStudioSessionMappingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listStudioSessionMappingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,580,316 | public int readInt32() throws IOException {<NEW_LINE>// See implementation notes for readInt64<NEW_LINE>fastpath: {<NEW_LINE>int tempOffset = _currentArrayOffset;<NEW_LINE>if (getCurrentRemaining() == 0) {<NEW_LINE>break fastpath;<NEW_LINE>}<NEW_LINE>final byte[] buffer = _currentSegment.getArray();<NEW_LINE>int x;<NEW... | ) ^ (~0 << 21); |
1,817,504 | public void deleteApiKeysId(Integer 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 deleteApiKeysId");<NEW_LINE>}<NEW_LINE>// create ... | localVarAccept, localVarContentType, localVarAuthNames, null); |
661,462 | public boolean restartProcess(String groupId, String streamId, String operator, boolean sync) {<NEW_LINE>log.info("begin to restart stream process for groupId={} streamId={}", groupId, streamId);<NEW_LINE>InlongGroupInfo groupInfo = groupService.get(groupId);<NEW_LINE>if (groupInfo == null) {<NEW_LINE>throw new Busines... | forCode(streamInfo.getStatus()); |
1,551,713 | private void sendCandidatesWithConfiguredIp(String senderPublicId, IceCandidate candidate) {<NEW_LINE>try {<NEW_LINE>// Get media node private IP<NEW_LINE>String kurentoPrivateIp = this.owner.getSession().getKms().getIp();<NEW_LINE>// Get Ip to be replaced<NEW_LINE>String ipToReplace = this.openviduConfig.<MASK><NEW_LI... | getMediaNodesPublicIpsMap().get(kurentoPrivateIp); |
393,711 | private void loadContent() {<NEW_LINE>ViewUtils.setGone(loadingBar, false);<NEW_LINE>ViewUtils.setGone(codeView, true);<NEW_LINE>new RefreshBlobTask(repo, sha, this) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void onSuccess(Blob blob) throws Exception {<NEW_LINE>super.onSuccess(blob);<NEW_LINE>BranchFileViewActi... | ViewUtils.setGone(codeView, false); |
1,831,671 | public void saveMacroButtonProperty(MacroButtonProperties properties, boolean gmPanel) {<NEW_LINE>List<MacroButtonProperties> macroButtonList = gmPanel ? gmMacroButtonProperties : macroButtonProperties;<NEW_LINE>AbstractMacroPanel macroPanel = gmPanel ? MapTool.getFrame().getGmPanel() : MapTool.getFrame().getCampaignPa... | setHotKey(properties.getHotKey()); |
1,483,322 | public final DotOperatorContext dotOperator() throws RecognitionException {<NEW_LINE>DotOperatorContext _localctx = new DotOperatorContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 4, RULE_dotOperator);<NEW_LINE>try {<NEW_LINE>setState(51);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>switch(_input.LA(1)) {<NEW_LIN... | _errHandler.reportError(this, re); |
39,260 | public Destination unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Destination destination = new Destination();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | ().unmarshall(context)); |
1,193,321 | protected void startMasters() throws IOException {<NEW_LINE>ServerConfiguration.set(PropertyKey.ZOOKEEPER_ENABLED, true);<NEW_LINE>ServerConfiguration.set(PropertyKey.ZOOKEEPER_ADDRESS, mCuratorServer.getConnectString());<NEW_LINE>ServerConfiguration.set(PropertyKey.ZOOKEEPER_ELECTION_PATH, "/alluxio/election");<NEW_LI... | LOG.info("all {} masters started.", mNumOfMasters); |
1,735,661 | private void bindValidityStatus(boolean isValid) {<NEW_LINE>if (!isValid) {<NEW_LINE>int key_flag_gray = itemView.getResources().getColor(R.color.key_flag_gray);<NEW_LINE>vCertifyIcon.setColorFilter(<MASK><NEW_LINE>vSignIcon.setColorFilter(key_flag_gray, PorterDuff.Mode.SRC_IN);<NEW_LINE>vEncryptIcon.setColorFilter(key... | key_flag_gray, PorterDuff.Mode.SRC_IN); |
1,622,019 | private void daemonStopped(String details) {<NEW_LINE>if (project.isDisposed())<NEW_LINE>return;<NEW_LINE>final <MASK><NEW_LINE>if (current == null || current.isRunning()) {<NEW_LINE>// The active daemon didn't die, so it must be some older process. Just log it.<NEW_LINE>LOG.info("A Flutter device daemon stopped.\n" + ... | DeviceDaemon current = deviceDaemon.getNow(); |
1,300,196 | private static void createLibrary(Workspace workspace, String container, List<String> importProblems) throws IOException {<NEW_LINE>// create eclipse user libraries in NetBeans:<NEW_LINE>assert container.startsWith(USER_LIBRARY_CONTAINER) || container.startsWith(JSF_CONTAINER) || container.startsWith(MYECLIPSE_CONTAINE... | content.put("src", urls); |
1,298,845 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NE... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
799,513 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see org.apache.jmeter.report.csv.processor.impl.AbstractGraphConsumer#<NEW_LINE>* createGroupInfos()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>protected Map<String, GroupInfo> createGroupInfos() {<NEW_LINE>AbstractSeriesSelector seriesSelector = new AbstractSeriesSelecto... | .getName() + "-" + success; |
1,248,841 | public static PrivateKey convertStringToPrivateKey(String strKey) throws Exception {<NEW_LINE>java.security.Security.addProvider(new BouncyCastleProvider());<NEW_LINE>strKey = strKey.replace(System.lineSeparator(), "");<NEW_LINE>strKey = <MASK><NEW_LINE>strKey = strKey.replace("-----BEGIN PRIVATE KEY-----", "");<NEW_LI... | strKey.replaceAll("^\"+|\"+$", ""); |
1,238,701 | public static void log(String str) {<NEW_LINE>// get the adapter values.<NEW_LINE>SpeedManagerAlgorithmProviderAdapter adpter = SMInstance.getInstance().getAdapter();<NEW_LINE>int adptCurrUpLimit = adpter.getCurrentUploadLimit();<NEW_LINE>int adptCurrDownLimit = adpter.getCurrentDownloadLimit();<NEW_LINE>// get the COC... | .getInstance().getConfigManager(); |
1,347,351 | public void serializeNativeObject(OCompositeKey compositeKey, byte[] stream, int startPosition, Object... hints) {<NEW_LINE>final OType[] types = getKeyTypes(hints);<NEW_LINE>final List<Object> keys = compositeKey.getKeys();<NEW_LINE>final int keysSize = keys.size();<NEW_LINE>final int oldStartPosition = startPosition;... | key = keys.get(i); |
1,751,389 | private void addToChain(InterceptorChain chain, Message m) {<NEW_LINE>Collection<InterceptorProvider> providers = CastUtils.cast((Collection<?>) m<MASK><NEW_LINE>if (providers != null) {<NEW_LINE>for (InterceptorProvider p : providers) {<NEW_LINE>chain.add(p.getInInterceptors());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collecti... | .get(Message.INTERCEPTOR_PROVIDERS)); |
779,067 | public void extractKeyParts(final CacheKeyBuilder keyBuilder, final Object targetObject, final Object[] params) {<NEW_LINE>final Object modelObj = params[parameterIndex];<NEW_LINE>int id = -1;<NEW_LINE>Exception errorException = null;<NEW_LINE>if (modelObj != null) {<NEW_LINE>try {<NEW_LINE>id = InterfaceWrapperHelper.... | ).setAnnotation(CacheTrx.class); |
1,548,617 | final GetServiceQuotaResult executeGetServiceQuota(GetServiceQuotaRequest getServiceQuotaRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getServiceQuotaRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,550,281 | public boolean masterClear(ModuleInfo moduleInfo) {<NEW_LINE>if (moduleInfo.hasFlag(ModuleInfo.FLAGS_MODULE_ACTIVE))<NEW_LINE>return false;<NEW_LINE>String escapedId = moduleInfo.id.replace("\\", "\\\\").replace("\"", "\\\"").replace(" ", "\\ ");<NEW_LINE>try {<NEW_LINE>// Check for module that declare having file outs... | escapedId + "/").exec(); |
1,363,943 | public Map workers(@PathVariable String clusterName, @PathVariable String host, @RequestParam(value = "window", required = false) String window) {<NEW_LINE>Map<String, Object> ret = new HashMap<>();<NEW_LINE>int <MASK><NEW_LINE>NimbusClient client = null;<NEW_LINE>try {<NEW_LINE>client = NimbusClientManager.getNimbusCl... | win = UIUtils.parseWindow(window); |
1,415,313 | public static DescribeNodeDevicesInfoResponse unmarshall(DescribeNodeDevicesInfoResponse describeNodeDevicesInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeNodeDevicesInfoResponse.setRequestId(_ctx.stringValue("DescribeNodeDevicesInfoResponse.RequestId"));<NEW_LINE>List<NodeDevice> nodeDevices = new ArrayLis... | + "].DeviceInfos[" + j + "].InstanceId")); |
235,623 | public HttpResponse testBodyWithQueryParamsForHttpResponse(String query, User body) throws IOException {<NEW_LINE>// verify the required parameter 'query' is set<NEW_LINE>if (query == null) {<NEW_LINE>throw new IllegalArgumentException("Missing the required parameter 'query' when calling testBodyWithQueryParams");<NEW_... | , (Object[]) value); |
559,444 | public void onBindViewHolder(ViewHolder holder, Feed feed) {<NEW_LINE>String title = feed.getTitle();<NEW_LINE>holder.tvTitle.setText(title);<NEW_LINE>holder.tvTitle.setVisibility(title != null ? View.VISIBLE : View.GONE);<NEW_LINE>holder.tvDesc.setText(feed.getPreview());<NEW_LINE>holder.tvDesc.setGravity(mShowExtra ?... | holder.ivGravatar.setTag(feed); |
1,426,658 | Change doPerformReorg(IProgressMonitor pm) throws CoreException, OperationCanceledException {<NEW_LINE>String name;<NEW_LINE>String newName = getNewName();<NEW_LINE>if (newName == null) {<NEW_LINE>name <MASK><NEW_LINE>} else {<NEW_LINE>name = newName;<NEW_LINE>}<NEW_LINE>// get current modification stamp<NEW_LINE>long ... | = getCu().getElementName(); |
724,244 | public Function newInstance(int position, ObjList<Function> args, IntList argPositions, CairoConfiguration configuration, SqlExecutionContext sqlExecutionContext) {<NEW_LINE>final Function perionFunction = args.getQuick(0);<NEW_LINE>if (perionFunction.isConstant()) {<NEW_LINE>final Function start = args.getQuick(1);<NE... | .getLong(null), func); |
464,754 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache<MASK><NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>getDiskUsage_result result = new getDiskUsage_result();<NEW_LINE>if (e instanceof ThriftSecurityException) {<NEW_LINE>result.sec = (ThriftSecurityException) e;<NEW_LINE>result.set... | .thrift.protocol.TMessageType.REPLY; |
864,935 | private static void registerMBean(final Class<?> interfaceClass, final IMBeanAwareService service) {<NEW_LINE>Check.errorIf(service instanceof IMultitonService && !(service instanceof ISingletonService), "IMBeanAwareService=" + service + " cannot implement IMultitonService");<NEW_LINE>final Object mbean = service.getMB... | warn("No MBean found for " + service + ". Skip registering MBean."); |
905,908 | public Page<ElasticTaskInstance> list(String taskIdListString, String statusListString, Integer page, Integer pageSize) {<NEW_LINE>List<String> statusList;<NEW_LINE>if (StringUtil.isEmpty(statusListString)) {<NEW_LINE>statusList = Arrays.stream(TaskInstanceStatus.values()).map(Enum::name).collect(Collectors.toList());<... | pageable = pageable(page, pageSize); |
693,240 | public void finalizeEStep(double weight, double prior) {<NEW_LINE>final int dim = covariance.length;<NEW_LINE>this.weight = weight;<NEW_LINE>double f = wsum > Double.MIN_NORMAL && wsum < Double.POSITIVE_INFINITY ? 1. / wsum : 1.;<NEW_LINE>if (prior > 0 && priormatrix != null) {<NEW_LINE>// MAP<NEW_LINE>// Popular defau... | ] = row_i[j] *= f; |
1,698,123 | public static Map<String, String> parseProperties(String query) {<NEW_LINE>if (!query.startsWith("[") || !query.endsWith("]"))<NEW_LINE>return Map.of();<NEW_LINE>if (query.length() == 2)<NEW_LINE>return Map.of();<NEW_LINE>final int entries = StringUtils.countMatches(query, ',') + 1;<NEW_LINE>assert entries > 0;<NEW_LIN... | ] keys = new String[entries]; |
951,006 | public Object instanceCreate() throws java.io.IOException, ClassNotFoundException {<NEW_LINE>synchronized (this) {<NEW_LINE>Object o = refConnection.get();<NEW_LINE>if (o != null) {<NEW_LINE>return o;<NEW_LINE>}<NEW_LINE>XMLDataObject obj = getHolder();<NEW_LINE>if (obj == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_L... | IOException(ex.getMessage()); |
1,436,232 | // Suppress unclosed resource warning<NEW_LINE>@SuppressWarnings("squid:S2095")<NEW_LINE>@Override<NEW_LINE>public SyncStatus initSyncData(String fileInfo) {<NEW_LINE>File file;<NEW_LINE>String filePath = fileInfo;<NEW_LINE>try {<NEW_LINE>if (fileInfo.equals(MetadataConstant.METADATA_LOG)) {<NEW_LINE>// schema mlog.txt... | File(getSyncDataPath(), filePath); |
669,793 | // BUGFIX: (TS) A data min card restriction is top-equiv iff the<NEW_LINE>// cardinality is 0.<NEW_LINE>// BUGFIX: (TS, 2) Added the cases where the filler is top-equiv<NEW_LINE>// BUGFIX: (TS, 2) Left out redundant check cardinality > 0 in TOP_TOP<NEW_LINE>// case<NEW_LINE>// BUGFIX: (TS, 3) Extended the cases where t... | isTopOrBuiltInInfiniteDatatype(ce.getFiller()); |
1,685,708 | public void kill(boolean awaitCompletion) throws IOException {<NEW_LINE>LOGGER.debug("[{}] Killing {} process", jobId, getName());<NEW_LINE>processKilled = true;<NEW_LINE>try {<NEW_LINE>// The PID comes via the processes log stream. We do wait here to give the process the time to start up and report its PID.<NEW_LINE>/... | .getTimeout()), awaitCompletion); |
595,472 | private void paintBase(InstancePainter painter) {<NEW_LINE>final var g = painter.getGraphics();<NEW_LINE>final var facing = <MASK><NEW_LINE>final var loc = painter.getLocation();<NEW_LINE>final var x = loc.getX();<NEW_LINE>final var y = loc.getY();<NEW_LINE>g.translate(x, y);<NEW_LINE>var rotate = 0.0;<NEW_LINE>if (fac... | painter.getAttributeValue(StdAttr.FACING); |
266,259 | /* Sample generated code:<NEW_LINE>*<NEW_LINE>* @com.ibm.j9ddr.GeneratedFieldAccessor(offsetFieldName="_isDirOffset_", declaredType="uint32_t:1")<NEW_LINE>* public UDATA isDir() throws CorruptDataException {<NEW_LINE>* return getU32Bitfield(J9FileStat._isDir_s_, J9FileStat._isDir_b_);<NEW_LINE>* }<NEW_LINE>*/<NEW_L... | .getObjectType(qualifyType(baseType)); |
665,527 | private Properties defaultProperties() {<NEW_LINE>Properties felixProps = new Properties();<NEW_LINE>final String felixDirectory = getFelixBaseDirFromConfig();<NEW_LINE>Logger.info(this, () -> "Felix base dir: " + felixDirectory);<NEW_LINE>final String felixAutoDeployDirectory = Config.getStringProperty(AUTO_DEPLOY_DIR... | felixProps.put(AUTO_DEPLOY_DIR_PROPERTY, felixAutoDeployDirectory); |
479,312 | private void doAutoEmbedMemoryStrategy() {<NEW_LINE>if (!STRATEGY_NONE.equals(this.strategy)) {<NEW_LINE>if (!mIsVisible && mNestedInstance != null) {<NEW_LINE>if (PRIORITY_LOW.equals(this.priority)) {<NEW_LINE>destoryNestInstance();<NEW_LINE>} else {<NEW_LINE>if (getInstance().hiddenEmbeds == null) {<NEW_LINE>// low i... | ).hiddenEmbeds.add(this); |
1,202,781 | public void printStat(Collection<ClassloadersSummaryNode> stats, PrintStream out, boolean printSegments) throws CorruptDataException {<NEW_LINE>int longestName = 0;<NEW_LINE>int numClassloaders = 0;<NEW_LINE>long numROMSegment = 0;<NEW_LINE>long numRAMSegment = 0;<NEW_LINE>long totalROMSegmentAllocatedSize = 0;<NEW_LIN... | countmap.get(csc.numLoadedClasses); |
1,497,092 | private static URI goUp(URI u) {<NEW_LINE>assert u.isAbsolute() : u;<NEW_LINE>assert u.getFragment() == null : u;<NEW_LINE>assert u.getQuery() == null : u;<NEW_LINE>// XXX isn't there any easier way to do this?<NEW_LINE>// Using getPath in the new path does not work; nbfs: URLs break. (#39613)<NEW_LINE>// On the other ... | String pth = nue.getPath(); |
1,739,093 | public void draw(Canvas canvas) {<NEW_LINE>mLeftPauseBar.rewind();<NEW_LINE>mRightPauseBar.rewind();<NEW_LINE>// The current distance between the two pause bars.<NEW_LINE>final float barDist = lerp(mPauseBarDistance, 0, mProgress) - 1;<NEW_LINE>// The current width of each pause bar.<NEW_LINE>final float barWidth = ler... | canvas.drawPath(mRightPauseBar, mPaint); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.