idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,116,857
public Future<DataEmitter> load(final Ion ion, final AsyncHttpRequest request, final FutureCallback<LoaderEmitter> callback) {<NEW_LINE>if (request.getUri().getScheme() == null || !request.getUri().toString().startsWith("file:///android_asset/"))<NEW_LINE>return null;<NEW_LINE>final InputStreamDataEmitterFuture ret = new InputStreamDataEmitterFuture();<NEW_LINE>ion.getHttpClient().getServer().post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>InputStream stream = getInputStream(ion.getContext(), request.getUri().toString());<NEW_LINE>if (stream == null)<NEW_LINE>throw new Exception("Unable to load content stream");<NEW_LINE>int available = stream.available();<NEW_LINE>InputStreamDataEmitter emitter = new InputStreamDataEmitter(ion.getHttpClient().getServer(), stream);<NEW_LINE>ret.setComplete(emitter);<NEW_LINE>callback.onCompleted(null, new LoaderEmitter(emitter, available, ResponseServedFrom.LOADED_FROM_CACHE, null, null));<NEW_LINE>} catch (Exception e) {<NEW_LINE>ret.setComplete(e);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return ret;<NEW_LINE>}
callback.onCompleted(e, null);
1,004,271
private void visitFieldAccess(ExpressionTree tree, AnnotatedTypeMirror type) {<NEW_LINE>if (!TreeUtils.isFieldAccess(tree) || !handledByValueChecker(type)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>VariableElement fieldElement = (VariableElement) TreeUtils.elementFromTree(tree);<NEW_LINE><MASK><NEW_LINE>if (value != null) {<NEW_LINE>// The field is a compile-time constant.<NEW_LINE>type.replaceAnnotation(atypeFactory.createResultingAnnotation(type.getUnderlyingType(), value));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (ElementUtils.isStatic(fieldElement) && ElementUtils.isFinal(fieldElement)) {<NEW_LINE>// The field is static and final, but its declaration does not initialize it to a<NEW_LINE>// compile-time constant. Obtain its value reflectively.<NEW_LINE>Element classElement = fieldElement.getEnclosingElement();<NEW_LINE>if (classElement != null) {<NEW_LINE>@// TODO: bug in ValueAnnotatedTypeFactory.<NEW_LINE>// TODO: bug in ValueAnnotatedTypeFactory.<NEW_LINE>SuppressWarnings("signature")<NEW_LINE>@BinaryName<NEW_LINE>String classname = ElementUtils.getQualifiedClassName(classElement).toString();<NEW_LINE>// https://tinyurl.com/cfissue/658 for Name.toString()<NEW_LINE>@SuppressWarnings("signature")<NEW_LINE>@Identifier<NEW_LINE>String fieldName = fieldElement.getSimpleName().toString();<NEW_LINE>value = atypeFactory.evaluator.evaluateStaticFieldAccess(classname, fieldName, tree);<NEW_LINE>if (value != null) {<NEW_LINE>type.replaceAnnotation(atypeFactory.createResultingAnnotation(type.getUnderlyingType(), value));<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}
Object value = fieldElement.getConstantValue();
1,658,972
public PsiMethod createBuildMethod(@NotNull PsiAnnotation psiAnnotation, @NotNull PsiClass parentClass, @Nullable PsiMethod psiMethod, @NotNull PsiClass builderClass, @NotNull String buildMethodName, List<BuilderInfo> builderInfos) {<NEW_LINE>final PsiType <MASK><NEW_LINE>final PsiSubstitutor builderSubstitutor = getBuilderSubstitutor(parentClass, builderClass);<NEW_LINE>final PsiType returnType = builderSubstitutor.substitute(builderType);<NEW_LINE>final String buildMethodPrepare = builderInfos.stream().map(BuilderInfo::renderBuildPrepare).collect(Collectors.joining());<NEW_LINE>final String buildMethodParameters = builderInfos.stream().map(BuilderInfo::renderBuildCall).collect(Collectors.joining(","));<NEW_LINE>final LombokLightMethodBuilder methodBuilder = new LombokLightMethodBuilder(parentClass.getManager(), buildMethodName).withMethodReturnType(returnType).withContainingClass(builderClass).withNavigationElement(parentClass).withModifier(getBuilderInnerAccessVisibility(psiAnnotation));<NEW_LINE>final String codeBlockText = createBuildMethodCodeBlockText(psiMethod, builderClass, returnType, buildMethodPrepare, buildMethodParameters);<NEW_LINE>methodBuilder.withBody(PsiMethodUtil.createCodeBlockFromText(codeBlockText, methodBuilder));<NEW_LINE>Optional<PsiMethod> definedConstructor = Optional.ofNullable(psiMethod);<NEW_LINE>if (definedConstructor.isEmpty()) {<NEW_LINE>final Collection<PsiMethod> classConstructors = PsiClassUtil.collectClassConstructorIntern(parentClass);<NEW_LINE>definedConstructor = classConstructors.stream().filter(m -> sameParameters(m.getParameterList().getParameters(), builderInfos)).findFirst();<NEW_LINE>}<NEW_LINE>definedConstructor.map(PsiMethod::getThrowsList).map(PsiReferenceList::getReferencedTypes).map(Arrays::stream).ifPresent(stream -> stream.forEach(methodBuilder::withException));<NEW_LINE>return methodBuilder;<NEW_LINE>}
builderType = getReturnTypeOfBuildMethod(parentClass, psiMethod);
786,637
public static void registerType(ModelBuilder modelBuilder) {<NEW_LINE>ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaExecutionListener.class, CAMUNDA_ELEMENT_EXECUTION_LISTENER).namespaceUri(CAMUNDA_NS).instanceProvider(new ModelTypeInstanceProvider<CamundaExecutionListener>() {<NEW_LINE><NEW_LINE>public CamundaExecutionListener newInstance(ModelTypeInstanceContext instanceContext) {<NEW_LINE>return new CamundaExecutionListenerImpl(instanceContext);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>camundaEventAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EVENT).namespace(CAMUNDA_NS).build();<NEW_LINE>camundaClassAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_CLASS).<MASK><NEW_LINE>camundaExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EXPRESSION).namespace(CAMUNDA_NS).build();<NEW_LINE>camundaDelegateExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DELEGATE_EXPRESSION).namespace(CAMUNDA_NS).build();<NEW_LINE>SequenceBuilder sequenceBuilder = typeBuilder.sequence();<NEW_LINE>camundaFieldCollection = sequenceBuilder.elementCollection(CamundaField.class).build();<NEW_LINE>camundaScriptChild = sequenceBuilder.element(CamundaScript.class).build();<NEW_LINE>typeBuilder.build();<NEW_LINE>}
namespace(CAMUNDA_NS).build();
1,307,041
public static void encode(ClientMessage clientMessage, com.hazelcast.client.impl.protocol.codec.holder.CacheConfigHolder cacheConfigHolder) {<NEW_LINE>clientMessage.add(BEGIN_FRAME.copy());<NEW_LINE>ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[INITIAL_FRAME_SIZE]);<NEW_LINE>encodeInt(initialFrame.content, BACKUP_COUNT_FIELD_OFFSET, cacheConfigHolder.getBackupCount());<NEW_LINE>encodeInt(initialFrame.content, ASYNC_BACKUP_COUNT_FIELD_OFFSET, cacheConfigHolder.getAsyncBackupCount());<NEW_LINE>encodeBoolean(initialFrame.content, READ_THROUGH_FIELD_OFFSET, cacheConfigHolder.isReadThrough());<NEW_LINE>encodeBoolean(initialFrame.content, WRITE_THROUGH_FIELD_OFFSET, cacheConfigHolder.isWriteThrough());<NEW_LINE>encodeBoolean(initialFrame.content, STORE_BY_VALUE_FIELD_OFFSET, cacheConfigHolder.isStoreByValue());<NEW_LINE>encodeBoolean(initialFrame.content, MANAGEMENT_ENABLED_FIELD_OFFSET, cacheConfigHolder.isManagementEnabled());<NEW_LINE>encodeBoolean(initialFrame.content, STATISTICS_ENABLED_FIELD_OFFSET, cacheConfigHolder.isStatisticsEnabled());<NEW_LINE>encodeBoolean(initialFrame.content, DISABLE_PER_ENTRY_INVALIDATION_EVENTS_FIELD_OFFSET, cacheConfigHolder.isDisablePerEntryInvalidationEvents());<NEW_LINE>clientMessage.add(initialFrame);<NEW_LINE>StringCodec.encode(clientMessage, cacheConfigHolder.getName());<NEW_LINE>CodecUtil.encodeNullable(clientMessage, cacheConfigHolder.getManagerPrefix(), StringCodec::encode);<NEW_LINE>CodecUtil.encodeNullable(clientMessage, cacheConfigHolder.getUriString(), StringCodec::encode);<NEW_LINE>StringCodec.encode(clientMessage, cacheConfigHolder.getInMemoryFormat());<NEW_LINE>EvictionConfigHolderCodec.encode(clientMessage, cacheConfigHolder.getEvictionConfigHolder());<NEW_LINE>CodecUtil.encodeNullable(clientMessage, cacheConfigHolder.getWanReplicationRef(), WanReplicationRefCodec::encode);<NEW_LINE>StringCodec.encode(clientMessage, cacheConfigHolder.getKeyClassName());<NEW_LINE>StringCodec.encode(clientMessage, cacheConfigHolder.getValueClassName());<NEW_LINE>CodecUtil.encodeNullable(clientMessage, cacheConfigHolder.getCacheLoaderFactory(), DataCodec::encode);<NEW_LINE>CodecUtil.encodeNullable(clientMessage, cacheConfigHolder.getCacheWriterFactory(), DataCodec::encode);<NEW_LINE>DataCodec.encode(<MASK><NEW_LINE>CodecUtil.encodeNullable(clientMessage, cacheConfigHolder.getHotRestartConfig(), HotRestartConfigCodec::encode);<NEW_LINE>CodecUtil.encodeNullable(clientMessage, cacheConfigHolder.getEventJournalConfig(), EventJournalConfigCodec::encode);<NEW_LINE>CodecUtil.encodeNullable(clientMessage, cacheConfigHolder.getSplitBrainProtectionName(), StringCodec::encode);<NEW_LINE>ListMultiFrameCodec.encodeNullable(clientMessage, cacheConfigHolder.getListenerConfigurations(), DataCodec::encode);<NEW_LINE>MergePolicyConfigCodec.encode(clientMessage, cacheConfigHolder.getMergePolicyConfig());<NEW_LINE>ListMultiFrameCodec.encodeNullable(clientMessage, cacheConfigHolder.getCachePartitionLostListenerConfigs(), ListenerConfigHolderCodec::encode);<NEW_LINE>CodecUtil.encodeNullable(clientMessage, cacheConfigHolder.getMerkleTreeConfig(), MerkleTreeConfigCodec::encode);<NEW_LINE>clientMessage.add(END_FRAME.copy());<NEW_LINE>}
clientMessage, cacheConfigHolder.getExpiryPolicyFactory());
1,369,847
public static ErrorDescription run(HintContext ctx) {<NEW_LINE>TreePath p = ctx.getPath();<NEW_LINE>// NOI18N<NEW_LINE>TypeMirror paramType = ctx.getInfo().getTrees().getTypeMirror(ctx.getVariables().get("$x"));<NEW_LINE>if (paramType.getKind() != TypeKind.CHAR) {<NEW_LINE>if (paramType.getKind() != TypeKind.DECLARED) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Element el = ((DeclaredType) paramType).asElement();<NEW_LINE>if (el == null || el.getKind() != ElementKind.CLASS) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!((TypeElement) el).getQualifiedName().contentEquals("java.lang.Character")) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>TypeMirror tm = ctx.getInfo().<MASK><NEW_LINE>CharSequence tname = ctx.getInfo().getTypeUtilities().getTypeName(tm);<NEW_LINE>return ErrorDescriptionFactory.forTree(ctx, p, Bundle.TEXT_StringBufferCharConstructor(tname), new NewAndAppendFix(TreePathHandle.create(p, ctx.getInfo()), tname.toString()).toEditorFix());<NEW_LINE>}
getTrees().getTypeMirror(p);
179,609
protected Class generate(ClassLoaderData data) {<NEW_LINE>Class gen;<NEW_LINE>Object save = CURRENT.get();<NEW_LINE>CURRENT.set(this);<NEW_LINE>try {<NEW_LINE>ClassLoader classLoader = data.getClassLoader();<NEW_LINE>if (classLoader == null) {<NEW_LINE>throw new IllegalStateException("ClassLoader is null while trying to define class " + getClassName() + ". It seems that the loader has been expired from a weak reference somehow. " + "Please file an issue at cglib's issue tracker.");<NEW_LINE>}<NEW_LINE>synchronized (classLoader) {<NEW_LINE>String name = generateClassName(data.getUniqueNamePredicate());<NEW_LINE>data.reserveName(name);<NEW_LINE>this.setClassName(name);<NEW_LINE>}<NEW_LINE>if (attemptLoad) {<NEW_LINE>try {<NEW_LINE>gen = classLoader.loadClass(getClassName());<NEW_LINE>return gen;<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>}<NEW_LINE>byte[] b = strategy.generate(this);<NEW_LINE>String className = ClassNameReader.getClassName(new ClassReader(b));<NEW_LINE>ProtectionDomain protectionDomain = getProtectionDomain();<NEW_LINE>synchronized (classLoader) {<NEW_LINE>// just in case<NEW_LINE>if (protectionDomain == null) {<NEW_LINE>gen = ReflectUtils.defineClass(className, b, classLoader);<NEW_LINE>} else {<NEW_LINE>gen = ReflectUtils.defineClass(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return gen;<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Error e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new CodeGenerationException(e);<NEW_LINE>} finally {<NEW_LINE>CURRENT.set(save);<NEW_LINE>}<NEW_LINE>}
className, b, classLoader, protectionDomain);
834,496
private void removeValuesContainer() {<NEW_LINE>if (valueContainerAlgorithm.equals(ODefaultIndexFactory.SBTREE_BONSAI_VALUE_CONTAINER)) {<NEW_LINE>final OAtomicOperation atomicOperation = atomicOperationsManager.getCurrentOperation();<NEW_LINE>final OReadCache readCache = storage.getReadCache();<NEW_LINE>final OWriteCache writeCache = storage.getWriteCache();<NEW_LINE>if (atomicOperation == null) {<NEW_LINE>try {<NEW_LINE>final String fileName = name + OIndexRIDContainer.INDEX_FILE_EXTENSION;<NEW_LINE>if (writeCache.exists(fileName)) {<NEW_LINE>final long fileId = writeCache.loadFile(fileName);<NEW_LINE>readCache.deleteFile(fileId, writeCache);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>OLogManager.instance().error(this, "Cannot delete file for value containers", e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>final String fileName = name + OIndexRIDContainer.INDEX_FILE_EXTENSION;<NEW_LINE>if (atomicOperation.isFileExists(fileName)) {<NEW_LINE>final long fileId = atomicOperation.loadFile(fileName);<NEW_LINE>atomicOperation.deleteFile(fileId);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>OLogManager.instance().<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
error(this, "Cannot delete file for value containers", e);
206,132
private Mono<PagedResponse<AvailabilitySetInner>> listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context).map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue()<MASK><NEW_LINE>}
.nextLink(), null));
123,460
public void train(RegressionDataSet dataSet, boolean parallel) {<NEW_LINE>final int models = baseRegressors.size();<NEW_LINE>weightsPerModel = 1;<NEW_LINE>RegressionDataSet metaSet = new RegressionDataSet(models, new CategoricalData[0]);<NEW_LINE>List<RegressionDataSet> dataFolds = dataSet.cvSet(folds);<NEW_LINE>// iterate in the order of the folds so we get the right dataum weights<NEW_LINE>for (RegressionDataSet rds : dataFolds) for (int i = 0; i < rds.size(); i++) {<NEW_LINE>metaSet.addDataPoint(new DataPoint(new DenseVector(weightsPerModel * models))<MASK><NEW_LINE>metaSet.setWeight(i, rds.getWeight(i));<NEW_LINE>}<NEW_LINE>// create the meta training set<NEW_LINE>for (int c = 0; c < baseRegressors.size(); c++) {<NEW_LINE>Regressor reg = baseRegressors.get(c);<NEW_LINE>int pos = 0;<NEW_LINE>for (int f = 0; f < dataFolds.size(); f++) {<NEW_LINE>RegressionDataSet train = RegressionDataSet.comineAllBut(dataFolds, f);<NEW_LINE>RegressionDataSet test = dataFolds.get(f);<NEW_LINE>reg.train(train, parallel);<NEW_LINE>for (// evaluate and mark each point in the held out fold.<NEW_LINE>// evaluate and mark each point in the held out fold.<NEW_LINE>int i = 0; // evaluate and mark each point in the held out fold.<NEW_LINE>i < test.size(); i++) {<NEW_LINE>double pred = reg.regress(test.getDataPoint(i));<NEW_LINE>metaSet.getDataPoint(pos++).getNumericalValues().set(c, pred);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// train the meta model<NEW_LINE>aggregatingRegressor.train(metaSet, parallel);<NEW_LINE>// train the final classifiers, unless folds=1. In that case they are already trained<NEW_LINE>if (folds != 1) {<NEW_LINE>for (Regressor reg : baseRegressors) reg.train(dataSet, parallel);<NEW_LINE>}<NEW_LINE>}
, rds.getTargetValue(i));
1,186,252
boolean match(char patternTypeSuffix, char[] patternPkg, int matchRulePkg, char[] patternTypeName, int matchRuleType, int typeKind, char[] pkg, char[] typeName) {<NEW_LINE>switch(patternTypeSuffix) {<NEW_LINE>case IIndexConstants.CLASS_SUFFIX:<NEW_LINE>if (typeKind != TypeDeclaration.CLASS_DECL)<NEW_LINE>return false;<NEW_LINE>break;<NEW_LINE>case IIndexConstants.CLASS_AND_INTERFACE_SUFFIX:<NEW_LINE>if (typeKind != TypeDeclaration.CLASS_DECL && typeKind != TypeDeclaration.INTERFACE_DECL)<NEW_LINE>return false;<NEW_LINE>break;<NEW_LINE>case IIndexConstants.CLASS_AND_ENUM_SUFFIX:<NEW_LINE>if (typeKind != TypeDeclaration.CLASS_DECL && typeKind != TypeDeclaration.ENUM_DECL)<NEW_LINE>return false;<NEW_LINE>break;<NEW_LINE>case IIndexConstants.INTERFACE_SUFFIX:<NEW_LINE>if (typeKind != TypeDeclaration.INTERFACE_DECL)<NEW_LINE>return false;<NEW_LINE>break;<NEW_LINE>case IIndexConstants.INTERFACE_AND_ANNOTATION_SUFFIX:<NEW_LINE>if (typeKind != TypeDeclaration.INTERFACE_DECL && typeKind != TypeDeclaration.ANNOTATION_TYPE_DECL)<NEW_LINE>return false;<NEW_LINE>break;<NEW_LINE>case IIndexConstants.ENUM_SUFFIX:<NEW_LINE>if (typeKind != TypeDeclaration.ENUM_DECL)<NEW_LINE>return false;<NEW_LINE>break;<NEW_LINE>case IIndexConstants.ANNOTATION_TYPE_SUFFIX:<NEW_LINE>if (typeKind != TypeDeclaration.ANNOTATION_TYPE_DECL)<NEW_LINE>return false;<NEW_LINE>break;<NEW_LINE>// nothing<NEW_LINE>case IIndexConstants.TYPE_SUFFIX:<NEW_LINE>}<NEW_LINE>boolean isPkgCaseSensitive = (matchRulePkg & SearchPattern.R_CASE_SENSITIVE) != 0;<NEW_LINE>if (patternPkg != null && !CharOperation.equals(patternPkg, pkg, isPkgCaseSensitive))<NEW_LINE>return false;<NEW_LINE>boolean isCaseSensitive = (<MASK><NEW_LINE>if (patternTypeName != null) {<NEW_LINE>boolean isCamelCase = (matchRuleType & (SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH)) != 0;<NEW_LINE>int matchMode = matchRuleType & JavaSearchPattern.MATCH_MODE_MASK;<NEW_LINE>if (!isCaseSensitive && !isCamelCase) {<NEW_LINE>patternTypeName = CharOperation.toLowerCase(patternTypeName);<NEW_LINE>}<NEW_LINE>boolean matchFirstChar = !isCaseSensitive || patternTypeName[0] == typeName[0];<NEW_LINE>switch(matchMode) {<NEW_LINE>case SearchPattern.R_EXACT_MATCH:<NEW_LINE>return matchFirstChar && CharOperation.equals(patternTypeName, typeName, isCaseSensitive);<NEW_LINE>case SearchPattern.R_PREFIX_MATCH:<NEW_LINE>return matchFirstChar && CharOperation.prefixEquals(patternTypeName, typeName, isCaseSensitive);<NEW_LINE>case SearchPattern.R_PATTERN_MATCH:<NEW_LINE>return CharOperation.match(patternTypeName, typeName, isCaseSensitive);<NEW_LINE>case SearchPattern.R_REGEXP_MATCH:<NEW_LINE>return Pattern.matches(new String(patternTypeName), new String(typeName));<NEW_LINE>case SearchPattern.R_CAMELCASE_MATCH:<NEW_LINE>if (matchFirstChar && CharOperation.camelCaseMatch(patternTypeName, typeName, false)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return !isCaseSensitive && matchFirstChar && CharOperation.prefixEquals(patternTypeName, typeName, false);<NEW_LINE>case SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH:<NEW_LINE>return matchFirstChar && CharOperation.camelCaseMatch(patternTypeName, typeName, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
matchRuleType & SearchPattern.R_CASE_SENSITIVE) != 0;
1,804,771
public static void toRSS(String hostUrl, String feedLink, String title, String description, List<FeedEntryModel> entryModels, OutputStream os) throws IOException, FeedException {<NEW_LINE>SyndFeed feed = new SyndFeedImpl();<NEW_LINE>feed.setFeedType("rss_2.0");<NEW_LINE>feed.setEncoding("UTF-8");<NEW_LINE>feed.setTitle(title);<NEW_LINE>feed.setLink(feedLink);<NEW_LINE>if (StringUtils.isEmpty(description)) {<NEW_LINE>feed.setDescription(title);<NEW_LINE>} else {<NEW_LINE>feed.setDescription(description);<NEW_LINE>}<NEW_LINE>SyndImageImpl image = new SyndImageImpl();<NEW_LINE><MASK><NEW_LINE>image.setUrl(hostUrl + "/gitblt_25.png");<NEW_LINE>image.setLink(hostUrl);<NEW_LINE>feed.setImage(image);<NEW_LINE>List<SyndEntry> entries = new ArrayList<SyndEntry>();<NEW_LINE>for (FeedEntryModel entryModel : entryModels) {<NEW_LINE>SyndEntry entry = new SyndEntryImpl();<NEW_LINE>entry.setTitle(entryModel.title);<NEW_LINE>entry.setAuthor(entryModel.author);<NEW_LINE>entry.setLink(entryModel.link);<NEW_LINE>entry.setPublishedDate(entryModel.published);<NEW_LINE>if (entryModel.tags != null && entryModel.tags.size() > 0) {<NEW_LINE>List<SyndCategory> tags = new ArrayList<SyndCategory>();<NEW_LINE>for (String tag : entryModel.tags) {<NEW_LINE>SyndCategoryImpl cat = new SyndCategoryImpl();<NEW_LINE>cat.setName(tag);<NEW_LINE>tags.add(cat);<NEW_LINE>}<NEW_LINE>entry.setCategories(tags);<NEW_LINE>}<NEW_LINE>SyndContent content = new SyndContentImpl();<NEW_LINE>if (StringUtils.isEmpty(entryModel.contentType) || entryModel.contentType.equalsIgnoreCase("text/plain")) {<NEW_LINE>content.setType("text/html");<NEW_LINE>content.setValue(StringUtils.breakLinesForHtml(entryModel.content));<NEW_LINE>} else {<NEW_LINE>content.setType(entryModel.contentType);<NEW_LINE>content.setValue(entryModel.content);<NEW_LINE>}<NEW_LINE>entry.setDescription(content);<NEW_LINE>entries.add(entry);<NEW_LINE>}<NEW_LINE>feed.setEntries(entries);<NEW_LINE>OutputStreamWriter writer = new OutputStreamWriter(os, "UTF-8");<NEW_LINE>SyndFeedOutput output = new SyndFeedOutput();<NEW_LINE>output.output(feed, writer);<NEW_LINE>writer.close();<NEW_LINE>}
image.setTitle(Constants.NAME);
548,405
private static void addClassProxyEqualsMethod(ClassWriter cw, String implClassName) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, INDENT + "adding method : equals (Ljava/lang/Object;)Z");<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// public boolean equals(Object other)<NEW_LINE>// {<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>final String desc = "(Ljava/lang/Object;)Z";<NEW_LINE>MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "equals", desc, null, null);<NEW_LINE>mv.visitCode();<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// if (other instanceof type)<NEW_LINE>// {<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>mv.visitVarInsn(ALOAD, 0);<NEW_LINE>mv.visitTypeInsn(INSTANCEOF, implClassName);<NEW_LINE>Label if_instanceofType_End = new Label();<NEW_LINE>mv.visitJumpInsn(IFEQ, if_instanceofType_End);<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// return this.ivProxy.equals(((type)other).ivProxy)<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE><MASK><NEW_LINE>mv.visitFieldInsn(GETFIELD, implClassName, LOCAL_BEAN_PROXY_FIELD, LOCAL_BEAN_PROXY_FIELD_TYPE_NAME);<NEW_LINE>mv.visitVarInsn(ALOAD, 1);<NEW_LINE>mv.visitTypeInsn(CHECKCAST, implClassName);<NEW_LINE>mv.visitFieldInsn(GETFIELD, implClassName, LOCAL_BEAN_PROXY_FIELD, LOCAL_BEAN_PROXY_FIELD_TYPE_NAME);<NEW_LINE>mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "equals", desc);<NEW_LINE>mv.visitInsn(IRETURN);<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// }<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>mv.visitLabel(if_instanceofType_End);<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// return false;<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>mv.visitInsn(ICONST_0);<NEW_LINE>mv.visitInsn(IRETURN);<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// }<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>mv.visitMaxs(2, 2);<NEW_LINE>mv.visitEnd();<NEW_LINE>}
mv.visitVarInsn(ALOAD, 0);
809,715
public DatabaseInfo executeQuery(DatabaseConfiguration dbConfig, String query) throws DatabaseServiceException {<NEW_LINE>try {<NEW_LINE>Connection connection = SQLiteConnectionManager.getInstance().getConnection(dbConfig);<NEW_LINE>Statement statement = connection.createStatement();<NEW_LINE>ResultSet queryResult = statement.executeQuery(query);<NEW_LINE>ResultSetMetaData metadata = queryResult.getMetaData();<NEW_LINE>int columnCount = metadata.getColumnCount();<NEW_LINE>ArrayList<DatabaseColumn> columns = new ArrayList<>(columnCount);<NEW_LINE>for (int i = 1; i <= columnCount; i++) {<NEW_LINE>DatabaseColumn dc = new DatabaseColumn(metadata.getColumnName(i), metadata.getColumnLabel(i), DatabaseUtils.getDbColumnType(metadata.getColumnType(i))<MASK><NEW_LINE>columns.add(dc);<NEW_LINE>}<NEW_LINE>int index = 0;<NEW_LINE>List<DatabaseRow> rows = new ArrayList<>();<NEW_LINE>while (queryResult.next()) {<NEW_LINE>DatabaseRow row = new DatabaseRow();<NEW_LINE>row.setIndex(index);<NEW_LINE>List<String> values = new ArrayList<>(columnCount);<NEW_LINE>for (int i = 1; i <= columnCount; i++) {<NEW_LINE>values.add(queryResult.getString(i));<NEW_LINE>}<NEW_LINE>row.setValues(values);<NEW_LINE>rows.add(row);<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>DatabaseInfo dbInfo = new DatabaseInfo();<NEW_LINE>dbInfo.setColumns(columns);<NEW_LINE>dbInfo.setRows(rows);<NEW_LINE>return dbInfo;<NEW_LINE>} catch (SQLException e) {<NEW_LINE>logger.error("SQLException::", e);<NEW_LINE>throw new DatabaseServiceException(true, e.getSQLState(), e.getErrorCode(), e.getMessage());<NEW_LINE>} finally {<NEW_LINE>SQLiteConnectionManager.getInstance().shutdown();<NEW_LINE>}<NEW_LINE>}
, metadata.getColumnDisplaySize(i));
978,497
private void writeDecompilationSummary(StringEscapeUtils.Builder builder) {<NEW_LINE>builder.append("<h2>Decompilation</h2>");<NEW_LINE>JadxDecompiler jadx = mainWindow.getWrapper().getDecompiler();<NEW_LINE>List<ClassNode> classes = jadx.getRoot().getClasses(false);<NEW_LINE>int classesCount = classes.size();<NEW_LINE>long processedClasses = classes.stream().filter(c -> c.getState() == ProcessState.PROCESS_COMPLETE).count();<NEW_LINE>long generatedClasses = classes.stream().filter(c -> c.getState() == ProcessState.GENERATED_AND_UNLOADED).count();<NEW_LINE>builder.append("<ul>");<NEW_LINE>builder.append("<li>Top level classes: " + classesCount + "</li>");<NEW_LINE>builder.append("<li>At process stage: " + valueAndPercent(processedClasses, classesCount) + "</li>");<NEW_LINE>builder.append("<li>Code generated: " + valueAndPercent(generatedClasses, classesCount) + "</li>");<NEW_LINE>builder.append("</ul>");<NEW_LINE>ErrorsCounter counter = jadx.getRoot().getErrorsCounter();<NEW_LINE>Set<IAttributeNode> problemNodes = new HashSet<>();<NEW_LINE>problemNodes.<MASK><NEW_LINE>problemNodes.addAll(counter.getWarnNodes());<NEW_LINE>long problemMethods = problemNodes.stream().filter(MethodNode.class::isInstance).count();<NEW_LINE>int methodsCount = classes.stream().mapToInt(cls -> cls.getMethods().size()).sum();<NEW_LINE>double methodSuccessRate = (methodsCount - problemMethods) * 100.0 / (double) methodsCount;<NEW_LINE>builder.append("<h3>Issues</h3>");<NEW_LINE>builder.append("<ul>");<NEW_LINE>builder.append("<li>Errors: " + counter.getErrorCount() + "</li>");<NEW_LINE>builder.append("<li>Warnings: " + counter.getWarnsCount() + "</li>");<NEW_LINE>builder.append("<li>Nodes with errors: " + counter.getErrorNodes().size() + "</li>");<NEW_LINE>builder.append("<li>Nodes with warnings: " + counter.getWarnNodes().size() + "</li>");<NEW_LINE>builder.append("<li>Total nodes with issues: " + problemNodes.size() + "</li>");<NEW_LINE>builder.append("<li>Methods with issues: " + problemMethods + "</li>");<NEW_LINE>builder.append("<li>Methods success rate: " + String.format("%.2f", methodSuccessRate) + "%</li>");<NEW_LINE>builder.append("</ul>");<NEW_LINE>}
addAll(counter.getErrorNodes());
688,566
private void prepareIncrement(PDDocument doc) {<NEW_LINE>try {<NEW_LINE>if (doc != null) {<NEW_LINE>COSDocument cosDoc = doc.getDocument();<NEW_LINE>Map<COSObjectKey, Long> xrefTable = cosDoc.getXrefTable();<NEW_LINE>Set<COSObjectKey> keySet = xrefTable.keySet();<NEW_LINE>long highestNumber = doc.getDocument().getHighestXRefObjectNumber();<NEW_LINE>for (COSObjectKey cosObjectKey : keySet) {<NEW_LINE>COSBase object = cosDoc.<MASK><NEW_LINE>if (object != null && cosObjectKey != null && !(object instanceof COSNumber)) {<NEW_LINE>objectKeys.put(object, cosObjectKey);<NEW_LINE>keyObject.put(cosObjectKey, object);<NEW_LINE>}<NEW_LINE>if (cosObjectKey != null) {<NEW_LINE>long num = cosObjectKey.getNumber();<NEW_LINE>if (num > highestNumber) {<NEW_LINE>highestNumber = num;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setNumber(highestNumber);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>Log.e("PdfBox-Android", e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
getObjectFromPool(cosObjectKey).getObject();
1,176,721
public static long extractSInt64(byte[] bytes, int index) {<NEW_LINE>assertIndexAndType(bytes, index, ValueType.INT64);<NEW_LINE>byte hi1 = (byte) (bytes[index + 0] & 0xff);<NEW_LINE>byte lo1 = (byte) (bytes[index + 1] & 0xff);<NEW_LINE>byte hi2 = (byte) (bytes[index + 2] & 0xff);<NEW_LINE>byte lo2 = (byte) (bytes[index + 3] & 0xff);<NEW_LINE>byte hi3 = (byte) (bytes<MASK><NEW_LINE>byte lo3 = (byte) (bytes[index + 5] & 0xff);<NEW_LINE>byte hi4 = (byte) (bytes[index + 6] & 0xff);<NEW_LINE>byte lo4 = (byte) (bytes[index + 7] & 0xff);<NEW_LINE>return new BigInteger(new byte[] { hi1, lo1, hi2, lo2, hi3, lo3, hi4, lo4 }).longValue();<NEW_LINE>}
[index + 4] & 0xff);
801,661
public static void init() {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(Blocks.GLASS, ColorHelper.STAINED_GLASS_MAP);<NEW_LINE>for (DyeColor color : DyeColor.values()) {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(ColorHelper.STAINED_GLASS_MAP.apply(color), ColorHelper.STAINED_GLASS_MAP);<NEW_LINE>}<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(Blocks.GLASS_PANE, ColorHelper.STAINED_GLASS_PANE_MAP);<NEW_LINE>for (DyeColor color : DyeColor.values()) {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(ColorHelper.STAINED_GLASS_PANE_MAP.apply<MASK><NEW_LINE>}<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(Blocks.TERRACOTTA, ColorHelper.TERRACOTTA_MAP);<NEW_LINE>for (DyeColor color : DyeColor.values()) {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(ColorHelper.TERRACOTTA_MAP.apply(color), ColorHelper.TERRACOTTA_MAP);<NEW_LINE>}<NEW_LINE>for (DyeColor color : DyeColor.values()) {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(ColorHelper.GLAZED_TERRACOTTA_MAP.apply(color), ColorHelper.GLAZED_TERRACOTTA_MAP);<NEW_LINE>}<NEW_LINE>for (DyeColor color : DyeColor.values()) {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(ColorHelper.WOOL_MAP.apply(color), ColorHelper.WOOL_MAP);<NEW_LINE>}<NEW_LINE>for (DyeColor color : DyeColor.values()) {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(ColorHelper.CARPET_MAP.apply(color), ColorHelper.CARPET_MAP);<NEW_LINE>}<NEW_LINE>for (DyeColor color : DyeColor.values()) {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(ColorHelper.CONCRETE_MAP.apply(color), ColorHelper.CONCRETE_MAP);<NEW_LINE>}<NEW_LINE>for (DyeColor color : DyeColor.values()) {<NEW_LINE>BotaniaAPI.instance().registerPaintableBlock(ColorHelper.CONCRETE_POWDER_MAP.apply(color), ColorHelper.CONCRETE_POWDER_MAP);<NEW_LINE>}<NEW_LINE>}
(color), ColorHelper.STAINED_GLASS_PANE_MAP);
684,910
protected void updateOffset() {<NEW_LINE>logger.debug("OffsetMonitor updates offset with leaders=" + partitionLeader);<NEW_LINE>offsetMonitorFailureCount.set(0);<NEW_LINE>for (Map.Entry<TopicAndPartition, BrokerEndPoint> entry : partitionLeader.entrySet()) {<NEW_LINE>String leaderBroker = getHostPort(entry.getValue());<NEW_LINE>TopicAndPartition tp = entry.getKey();<NEW_LINE>if (StringUtils.isEmpty(leaderBroker)) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>cronExecutor.submit(updateOffsetTask(leaderBroker, tp));<NEW_LINE>} catch (RejectedExecutionException re) {<NEW_LINE>offsetMonitorFailureCount.getAndAdd(1);<NEW_LINE>logger.warn(String.format("cronExecutor is full! Drop task for topic: %s, partition: %d", tp.topic(), tp.partition()), re);<NEW_LINE>throw re;<NEW_LINE>} catch (Throwable t) {<NEW_LINE>offsetMonitorFailureCount.getAndAdd(1);<NEW_LINE>logger.error(String.format("cronExecutor got throwable! Drop task for topic: %s, partition: %d", tp.topic(), tp.partition()), t);<NEW_LINE>throw t;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
logger.warn("{} does not have leader partition", tp);
1,619,497
public static String shortenText(String text, int width) {<NEW_LINE>GC gc = new GC(UIUtils.getDisplay());<NEW_LINE>// chop string in half and drop a few characters<NEW_LINE>int middle = text.length() / 2;<NEW_LINE>String beginning = text.substring(0, middle - 1);<NEW_LINE>String end = text.substring(middle + 2, text.length());<NEW_LINE>// Now repeatedly chop off one char from each end until we fit<NEW_LINE>// TODO Chop each side separately? it'd take more loops, but text would fit tighter when uneven<NEW_LINE>// lengths work better..<NEW_LINE>while (// $NON-NLS-1$<NEW_LINE>gc.stringExtent(beginning + "..." + end).x > width) {<NEW_LINE>if (beginning.length() > 0) {<NEW_LINE>beginning = beginning.substring(0, beginning.length() - 1);<NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (end.length() > 0) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>text = beginning + "..." + end;<NEW_LINE>return text;<NEW_LINE>}
end = end.substring(1);
453,525
final CreateAutoMLJobResult executeCreateAutoMLJob(CreateAutoMLJobRequest createAutoMLJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAutoMLJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateAutoMLJobRequest> request = null;<NEW_LINE>Response<CreateAutoMLJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateAutoMLJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAutoMLJobRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAutoMLJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateAutoMLJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAutoMLJobResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
595,880
public WritableRaster filter(final Raster src, WritableRaster dest) {<NEW_LINE>Validate.notNull(src, "src may not be null");<NEW_LINE>Validate.isTrue(src != dest, "src and dest raster may not be same");<NEW_LINE>Validate.isTrue(src.getNumDataElements() >= 3, src.getNumDataElements(), "luminance raster must have at least 3 data elements: %s");<NEW_LINE>if (dest == null) {<NEW_LINE>dest = createCompatibleDestRaster(src);<NEW_LINE>}<NEW_LINE>// If src and dest have alpha component, keep it, otherwise extract luminance only<NEW_LINE>int[] bandList = src.getNumBands() > 3 && dest.getNumBands() > 1 ? new int[] { 0, 3 } <MASK><NEW_LINE>dest.setRect(0, 0, src.createChild(0, 0, src.getWidth(), src.getHeight(), 0, 0, bandList));<NEW_LINE>return dest;<NEW_LINE>}
: new int[] { 0 };
267,720
public static ListAppVersionsResponse unmarshall(ListAppVersionsResponse listAppVersionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAppVersionsResponse.setRequestId(_ctx.stringValue("ListAppVersionsResponse.RequestId"));<NEW_LINE>listAppVersionsResponse.setCode(_ctx.stringValue("ListAppVersionsResponse.Code"));<NEW_LINE>listAppVersionsResponse.setMessage(_ctx.stringValue("ListAppVersionsResponse.Message"));<NEW_LINE>listAppVersionsResponse.setSuccess<MASK><NEW_LINE>listAppVersionsResponse.setErrorCode(_ctx.stringValue("ListAppVersionsResponse.ErrorCode"));<NEW_LINE>List<PackageVersionEntity> data = new ArrayList<PackageVersionEntity>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListAppVersionsResponse.Data.Length"); i++) {<NEW_LINE>PackageVersionEntity packageVersionEntity = new PackageVersionEntity();<NEW_LINE>packageVersionEntity.setId(_ctx.stringValue("ListAppVersionsResponse.Data[" + i + "].Id"));<NEW_LINE>packageVersionEntity.setCreateTime(_ctx.stringValue("ListAppVersionsResponse.Data[" + i + "].CreateTime"));<NEW_LINE>packageVersionEntity.setWarUrl(_ctx.stringValue("ListAppVersionsResponse.Data[" + i + "].WarUrl"));<NEW_LINE>packageVersionEntity.setType(_ctx.stringValue("ListAppVersionsResponse.Data[" + i + "].Type"));<NEW_LINE>packageVersionEntity.setBuildPackageUrl(_ctx.stringValue("ListAppVersionsResponse.Data[" + i + "].BuildPackageUrl"));<NEW_LINE>data.add(packageVersionEntity);<NEW_LINE>}<NEW_LINE>listAppVersionsResponse.setData(data);<NEW_LINE>return listAppVersionsResponse;<NEW_LINE>}
(_ctx.booleanValue("ListAppVersionsResponse.Success"));
1,069,693
private static int asmVersion() {<NEW_LINE>// Find the highest available ASM version on the runtime/classpath, because<NEW_LINE>// if we run with a lower than available ASM version, against a class with<NEW_LINE>// new language features we'll get an UnsupportedOperationException, even if<NEW_LINE>// the ASM version supports the new language features.<NEW_LINE>// Also, if we run with a higher than available ASM version, we'll get<NEW_LINE>// an IllegalArgumentException from org.objectweb.asm.ClassVisitor.<NEW_LINE>// So must find exactly the maximum ASM api version available.<NEW_LINE>Optional<Integer> asmVersion = Arrays.stream(Opcodes.class.getFields()).sequential().filter((f) -> f.getName().matches("ASM[0-9]+")).map((f) -> f.getName().substring(3)).map(Integer::parseInt).max(Integer::compareTo);<NEW_LINE>if (!asmVersion.isPresent())<NEW_LINE>throw new IllegalStateException("Invalid " + Opcodes.class.getName());<NEW_LINE>int asmFieldId = asmVersion.get();<NEW_LINE>try {<NEW_LINE>String fieldName = "ASM" + asmFieldId;<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("Using ASM API from {}.{}", Opcodes.<MASK><NEW_LINE>return (int) Opcodes.class.getField(fieldName).get(null);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>throw new IllegalStateException(e);<NEW_LINE>}<NEW_LINE>}
class.getName(), fieldName);
1,720,422
public void marshall(ListObjectParentsRequest listObjectParentsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listObjectParentsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listObjectParentsRequest.getDirectoryArn(), DIRECTORYARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(listObjectParentsRequest.getObjectReference(), OBJECTREFERENCE_BINDING);<NEW_LINE>protocolMarshaller.marshall(listObjectParentsRequest.getNextToken(), NEXTTOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(listObjectParentsRequest.getConsistencyLevel(), CONSISTENCYLEVEL_BINDING);<NEW_LINE>protocolMarshaller.marshall(listObjectParentsRequest.getIncludeAllLinksToEachParent(), INCLUDEALLLINKSTOEACHPARENT_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
listObjectParentsRequest.getMaxResults(), MAXRESULTS_BINDING);
1,397,217
public void onOpen(final jakarta.websocket.Session session, EndpointConfig config) {<NEW_LINE>this.wsSession.initializeNativeSession(session);<NEW_LINE>// The following inner classes need to remain since lambdas would not retain their<NEW_LINE>// declared generic types (which need to be seen by the underlying WebSocket engine)<NEW_LINE>if (this.handler.supportsPartialMessages()) {<NEW_LINE>session.addMessageHandler(new MessageHandler.Partial<String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onMessage(String message, boolean isLast) {<NEW_LINE>handleTextMessage(session, message, isLast);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>session.addMessageHandler(new MessageHandler.Partial<ByteBuffer>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onMessage(ByteBuffer message, boolean isLast) {<NEW_LINE>handleBinaryMessage(session, message, isLast);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>session.addMessageHandler(new MessageHandler.Whole<String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onMessage(String message) {<NEW_LINE>handleTextMessage(session, message, true);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>session.addMessageHandler(new MessageHandler.Whole<ByteBuffer>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onMessage(ByteBuffer message) {<NEW_LINE>handleBinaryMessage(session, message, true);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>session.addMessageHandler(new MessageHandler.Whole<jakarta.websocket.PongMessage>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onMessage(jakarta.websocket.PongMessage message) {<NEW_LINE>handlePongMessage(session, message.getApplicationData());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>try {<NEW_LINE>this.handler.afterConnectionEstablished(this.wsSession);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>ExceptionWebSocketHandlerDecorator.tryCloseWithError(<MASK><NEW_LINE>}<NEW_LINE>}
this.wsSession, ex, logger);
590,216
private void populateType(TypeNode node, String className, int arrayDimens) {<NEW_LINE>String qualifiedName = className;<NEW_LINE>Class<?> myType = PRIMITIVE_TYPES.get(className);<NEW_LINE>if (myType == null && importedClasses != null) {<NEW_LINE>if (importedClasses.containsKey(className)) {<NEW_LINE>qualifiedName = importedClasses.get(className);<NEW_LINE>} else if (importedClasses.containsValue(className)) {<NEW_LINE>qualifiedName = className;<NEW_LINE>}<NEW_LINE>if (qualifiedName != null) {<NEW_LINE>myType = pmdClassLoader.loadClassOrNull(qualifiedName);<NEW_LINE>if (myType == null) {<NEW_LINE>myType = processOnDemand(qualifiedName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (myType == null && qualifiedName != null && qualifiedName.contains(".")) {<NEW_LINE>// try if the last part defines a inner class<NEW_LINE>String qualifiedNameInner = qualifiedName.substring(0, qualifiedName.lastIndexOf('.')) + "$" + qualifiedName.substring(qualifiedName.lastIndexOf('.') + 1);<NEW_LINE>myType = pmdClassLoader.loadClassOrNull(qualifiedNameInner);<NEW_LINE>}<NEW_LINE>if (myType == null && qualifiedName != null && !qualifiedName.contains(".")) {<NEW_LINE>// try again with java.lang....<NEW_LINE>myType = pmdClassLoader.loadClassOrNull("java.lang." + qualifiedName);<NEW_LINE>}<NEW_LINE>// try generics<NEW_LINE>// TODO: generic declarations can shadow type declarations ... :(<NEW_LINE>if (myType == null) {<NEW_LINE>ASTTypeParameter parameter = getTypeParameterDeclaration(node, className);<NEW_LINE>if (parameter != null) {<NEW_LINE>node.setTypeDefinition(parameter.getTypeDefinition());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>JavaTypeDefinition <MASK><NEW_LINE>if (def != null) {<NEW_LINE>node.setTypeDefinition(def.withDimensions(arrayDimens));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
def = JavaTypeDefinition.forClass(myType);
631,183
public void deserialize(ByteBuf buf) {<NEW_LINE>super.deserialize(buf);<NEW_LINE>int elemNum = buf.readInt();<NEW_LINE>if (rowType == RowType.T_FLOAT_DENSE_COMPONENT) {<NEW_LINE>float[] values = new float[elemNum];<NEW_LINE>for (int i = 0; i < elemNum; i++) {<NEW_LINE>values[i] = buf.readFloat();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>} else if (rowType == RowType.T_FLOAT_SPARSE_COMPONENT) {<NEW_LINE>vector = VFactory.sparseFloatVector((int) (splitContext.getPartKey().getEndCol() - splitContext.getPartKey().getStartCol()), elemNum);<NEW_LINE>for (int i = 0; i < elemNum; i++) {<NEW_LINE>((IntFloatVector) vector).set(buf.readInt(), buf.readFloat());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new UnsupportedOperationException("Unsupport rowtype " + rowType);<NEW_LINE>}<NEW_LINE>}
vector = VFactory.denseFloatVector(values);
710,896
final DeleteTableResult executeDeleteTable(DeleteTableRequest deleteTableRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTableRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteTableRequest> request = null;<NEW_LINE>Response<DeleteTableResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteTableRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteTableRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DynamoDB");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTable");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI cachedEndpoint = null;<NEW_LINE>if (endpointDiscoveryEnabled) {<NEW_LINE>cachedEndpoint = cache.get(awsCredentialsProvider.getCredentials().getAWSAccessKeyId(), false, endpoint);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteTableResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteTableResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext, cachedEndpoint, null);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,248,107
// ===================================================================================<NEW_LINE>// Basic Override<NEW_LINE>// ==============<NEW_LINE>@Override<NEW_LINE>protected String doBuildColumnString(String dm) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(dm).append(available);<NEW_LINE>sb.append(dm).append(boost);<NEW_LINE>sb.append(dm).append(createdBy);<NEW_LINE>sb.append(dm).append(createdTime);<NEW_LINE>sb.append<MASK><NEW_LINE>sb.append(dm).append(handlerName);<NEW_LINE>sb.append(dm).append(handlerParameter);<NEW_LINE>sb.append(dm).append(handlerScript);<NEW_LINE>sb.append(dm).append(name);<NEW_LINE>sb.append(dm).append(permissions);<NEW_LINE>sb.append(dm).append(sortOrder);<NEW_LINE>sb.append(dm).append(updatedBy);<NEW_LINE>sb.append(dm).append(updatedTime);<NEW_LINE>sb.append(dm).append(virtualHosts);<NEW_LINE>if (sb.length() > dm.length()) {<NEW_LINE>sb.delete(0, dm.length());<NEW_LINE>}<NEW_LINE>sb.insert(0, "{").append("}");<NEW_LINE>return sb.toString();<NEW_LINE>}
(dm).append(description);
143,762
private void switchView(final String name) {<NEW_LINE>if (this.currentView != null && this.currentView.getCaptionName().equals(name)) {<NEW_LINE>currentView.setSelected(true);<NEW_LINE>if (owner != null) {<NEW_LINE>owner.fireMessageViewChangedEvent(currentView, currentView);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>HttpPanelView view = views.get(name);<NEW_LINE>if (view == null) {<NEW_LINE>logger.info("No view found with name: " + name);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>HttpPanelView previousView = currentView;<NEW_LINE>if (this.currentView != null) {<NEW_LINE>this.currentView.setSelected(false);<NEW_LINE>this.currentView.getModel().clear();<NEW_LINE>}<NEW_LINE>this.currentView = view;<NEW_LINE>comboBoxModel.setSelectedItem(viewItems.get(name));<NEW_LINE>this.currentView.getModel().setMessage(message);<NEW_LINE>((CardLayout) panelViews.getLayout()).show(panelViews, name);<NEW_LINE>this.currentView.setSelected(true);<NEW_LINE>if (owner != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
owner.fireMessageViewChangedEvent(previousView, currentView);
1,050,175
public void onResponse(ProbeConnectionResult connectResult) {<NEW_LINE>assert holdsLock() == false : "PeerFinder mutex is held in error";<NEW_LINE>final DiscoveryNode remoteNode = connectResult.getDiscoveryNode();<NEW_LINE>assert remoteNode.isMasterNode() : remoteNode + " is not master-eligible";<NEW_LINE>assert remoteNode.equals(getLocalNode()) == false : remoteNode + " is the local node";<NEW_LINE>boolean retainConnection = false;<NEW_LINE>try {<NEW_LINE>synchronized (mutex) {<NEW_LINE>if (isActive() == false) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>assert probeConnectionResult.get() == null <MASK><NEW_LINE>probeConnectionResult.set(connectResult);<NEW_LINE>requestPeers();<NEW_LINE>}<NEW_LINE>onFoundPeersUpdated();<NEW_LINE>retainConnection = true;<NEW_LINE>} finally {<NEW_LINE>if (retainConnection == false) {<NEW_LINE>Releasables.close(connectResult);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
: "connection result unexpectedly already set to " + probeConnectionResult.get();
1,851,836
public void LAPACK_zggsvp3(String arg0, String arg1, String arg2, IntPointer arg3, IntPointer arg4, IntPointer arg5, DoublePointer arg6, IntPointer arg7, DoublePointer arg8, IntPointer arg9, DoublePointer arg10, DoublePointer arg11, IntPointer arg12, IntPointer arg13, DoublePointer arg14, IntPointer arg15, DoublePointer arg16, IntPointer arg17, DoublePointer arg18, IntPointer arg19, IntPointer arg20, DoublePointer arg21, DoublePointer arg22, DoublePointer arg23, IntPointer arg24, IntPointer arg25) {<NEW_LINE>LAPACK_zggsvp3(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, <MASK><NEW_LINE>}
arg22, arg23, arg24, arg25);
129,311
public static void main(final String[] args) {<NEW_LINE>final Array<Integer> a = array(97, 44, 67, 3, 22, 90, 1, 77, 98, 1078, 6, 64, 6, 79, 42);<NEW_LINE>final int b = a.foldLeft(add, 0);<NEW_LINE>// WARNING: In JDK 8, update 20 and 25 (current version) the following code triggers an internal JDK compiler error, likely due to https://bugs.openjdk.java.net/browse/JDK-8062253. The code below is a workaround for this compiler bug.<NEW_LINE>// final int c = a.foldLeft(i -> (j -> i + j), 0);<NEW_LINE>F<Integer, F<Integer, Integer>> add2 <MASK><NEW_LINE>final int c = a.foldLeft(add2, 0);<NEW_LINE>// 1774<NEW_LINE>System.out.println(b);<NEW_LINE>}
= i -> j -> i + j;
1,078,133
public static void print(NetworkSecurityGroup resource) {<NEW_LINE>StringBuilder info = new StringBuilder();<NEW_LINE>info.append("NSG: ").append(resource.id()).append("Name: ").append(resource.name()).append("\n\tResource group: ").append(resource.resourceGroupName()).append("\n\tRegion: ").append(resource.region()).append("\n\tTags: ").append(resource.tags());<NEW_LINE>// Output security rules<NEW_LINE>for (NetworkSecurityRule rule : resource.securityRules().values()) {<NEW_LINE>info.append("\n\tRule: ").append(rule.name()).append("\n\t\tAccess: ").append(rule.access()).append("\n\t\tDirection: ").append(rule.direction()).append("\n\t\tFrom address: ").append(rule.sourceAddressPrefix()).append("\n\t\tFrom port range: ").append(rule.sourcePortRange()).append("\n\t\tTo address: ").append(rule.destinationAddressPrefix()).append("\n\t\tTo port: ").append(rule.destinationPortRange()).append("\n\t\tProtocol: ").append(rule.protocol()).append("\n\t\tPriority: ").<MASK><NEW_LINE>}<NEW_LINE>System.out.println(info.toString());<NEW_LINE>}
append(rule.priority());
1,488,485
public int compareValues(List<T> o1, List<T> o2) {<NEW_LINE>int length1 = o1 == null ? 0 : o1.size();<NEW_LINE>int length2 = o2 == null <MASK><NEW_LINE>// An empty list is before any filled list.<NEW_LINE>if (length1 == 0 && length2 == 0)<NEW_LINE>return 0;<NEW_LINE>if (length1 == 0)<NEW_LINE>return -1;<NEW_LINE>if (length2 == 0)<NEW_LINE>return 1;<NEW_LINE>// Lexicographic ordering: the first different element determines the order.<NEW_LINE>// If one list is a prefix of the other, the prefix sorts earlier.<NEW_LINE>int minLength = Math.min(length1, length2);<NEW_LINE>for (int i = 0; i < minLength; i++) {<NEW_LINE>int res = compareElements(o1.get(i), o2.get(i));<NEW_LINE>if (res != 0)<NEW_LINE>return res;<NEW_LINE>}<NEW_LINE>// Prefix or identical: compare lengths.<NEW_LINE>return length1 - length2;<NEW_LINE>}
? 0 : o2.size();
1,091,241
public static DescribeSynchronizationObjectModifyStatusResponse unmarshall(DescribeSynchronizationObjectModifyStatusResponse describeSynchronizationObjectModifyStatusResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setRequestId(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.RequestId"));<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setStatus(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.Status"));<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setErrorMessage(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.ErrorMessage"));<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setErrCode(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.ErrCode"));<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setSuccess(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.Success"));<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setErrMessage(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.ErrMessage"));<NEW_LINE>DataInitializationStatus dataInitializationStatus = new DataInitializationStatus();<NEW_LINE>dataInitializationStatus.setStatus(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.DataInitializationStatus.Status"));<NEW_LINE>dataInitializationStatus.setPercent(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.DataInitializationStatus.Percent"));<NEW_LINE>dataInitializationStatus.setErrorMessage(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.DataInitializationStatus.ErrorMessage"));<NEW_LINE>dataInitializationStatus.setProgress(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.DataInitializationStatus.Progress"));<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setDataInitializationStatus(dataInitializationStatus);<NEW_LINE>DataSynchronizationStatus dataSynchronizationStatus = new DataSynchronizationStatus();<NEW_LINE>dataSynchronizationStatus.setStatus(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.DataSynchronizationStatus.Status"));<NEW_LINE>dataSynchronizationStatus.setDelay<MASK><NEW_LINE>dataSynchronizationStatus.setPercent(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.DataSynchronizationStatus.Percent"));<NEW_LINE>dataSynchronizationStatus.setErrorMessage(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.DataSynchronizationStatus.ErrorMessage"));<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setDataSynchronizationStatus(dataSynchronizationStatus);<NEW_LINE>PrecheckStatus precheckStatus = new PrecheckStatus();<NEW_LINE>precheckStatus.setStatus(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.PrecheckStatus.Status"));<NEW_LINE>precheckStatus.setPercent(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.PrecheckStatus.Percent"));<NEW_LINE>List<CheckItem> detail = new ArrayList<CheckItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSynchronizationObjectModifyStatusResponse.PrecheckStatus.Detail.Length"); i++) {<NEW_LINE>CheckItem checkItem = new CheckItem();<NEW_LINE>checkItem.setCheckStatus(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.PrecheckStatus.Detail[" + i + "].CheckStatus"));<NEW_LINE>checkItem.setErrorMessage(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.PrecheckStatus.Detail[" + i + "].ErrorMessage"));<NEW_LINE>checkItem.setItemName(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.PrecheckStatus.Detail[" + i + "].ItemName"));<NEW_LINE>checkItem.setRepairMethod(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.PrecheckStatus.Detail[" + i + "].RepairMethod"));<NEW_LINE>detail.add(checkItem);<NEW_LINE>}<NEW_LINE>precheckStatus.setDetail(detail);<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setPrecheckStatus(precheckStatus);<NEW_LINE>StructureInitializationStatus structureInitializationStatus = new StructureInitializationStatus();<NEW_LINE>structureInitializationStatus.setStatus(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.StructureInitializationStatus.Status"));<NEW_LINE>structureInitializationStatus.setPercent(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.StructureInitializationStatus.Percent"));<NEW_LINE>structureInitializationStatus.setErrorMessage(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.StructureInitializationStatus.ErrorMessage"));<NEW_LINE>structureInitializationStatus.setProgress(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.StructureInitializationStatus.Progress"));<NEW_LINE>describeSynchronizationObjectModifyStatusResponse.setStructureInitializationStatus(structureInitializationStatus);<NEW_LINE>return describeSynchronizationObjectModifyStatusResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeSynchronizationObjectModifyStatusResponse.DataSynchronizationStatus.Delay"));
1,162,625
public List<Writable> transformRawStringsToInputList(List<String> values) {<NEW_LINE>List<Writable> ret = new ArrayList<>();<NEW_LINE>if (values.size() != initialSchema.numColumns())<NEW_LINE>throw new IllegalArgumentException(String.format("Number of values %d does not match the number of input columns %d for schema", values.size(), initialSchema.numColumns()));<NEW_LINE>for (int i = 0; i < values.size(); i++) {<NEW_LINE>switch(initialSchema.getType(i)) {<NEW_LINE>case String:<NEW_LINE>ret.add(new Text(values.get(i)));<NEW_LINE>break;<NEW_LINE>case Integer:<NEW_LINE>ret.add(new IntWritable(Integer.parseInt(values<MASK><NEW_LINE>break;<NEW_LINE>case Double:<NEW_LINE>ret.add(new DoubleWritable(Double.parseDouble(values.get(i))));<NEW_LINE>break;<NEW_LINE>case Float:<NEW_LINE>ret.add(new FloatWritable(Float.parseFloat(values.get(i))));<NEW_LINE>break;<NEW_LINE>case Categorical:<NEW_LINE>ret.add(new Text(values.get(i)));<NEW_LINE>break;<NEW_LINE>case Boolean:<NEW_LINE>ret.add(new BooleanWritable(Boolean.parseBoolean(values.get(i))));<NEW_LINE>break;<NEW_LINE>case Time:<NEW_LINE>break;<NEW_LINE>case Long:<NEW_LINE>ret.add(new LongWritable(Long.parseLong(values.get(i))));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
.get(i))));
438,806
public void deleteEntry(final int index, final long hashCode, final byte[] key, final byte[] value) {<NEW_LINE>final int size = size();<NEW_LINE>if (index < 0 || index >= size) {<NEW_LINE>throw new IllegalStateException("Can not delete entry outside of border of the bucket");<NEW_LINE>}<NEW_LINE>final int freePointer = getIntValue(FREE_POINTER_OFFSET);<NEW_LINE>final int positionOffset = POSITIONS_ARRAY_OFFSET + index * OIntegerSerializer.INT_SIZE;<NEW_LINE>final int entryPosition = getIntValue(positionOffset);<NEW_LINE>final int entrySize = key.length + value.length + OLongSerializer.LONG_SIZE;<NEW_LINE>moveData(positionOffset + OIntegerSerializer.INT_SIZE, positionOffset, size() * OIntegerSerializer.INT_SIZE - (index + 1) * OIntegerSerializer.INT_SIZE);<NEW_LINE>if (entryPosition > freePointer) {<NEW_LINE>moveData(freePointer, freePointer + entrySize, entryPosition - freePointer);<NEW_LINE>}<NEW_LINE>int currentPositionOffset = POSITIONS_ARRAY_OFFSET;<NEW_LINE>for (int i = 0; i < size - 1; i++) {<NEW_LINE>int currentEntryPosition = getIntValue(currentPositionOffset);<NEW_LINE>if (currentEntryPosition < entryPosition)<NEW_LINE><MASK><NEW_LINE>currentPositionOffset += OIntegerSerializer.INT_SIZE;<NEW_LINE>}<NEW_LINE>setIntValue(FREE_POINTER_OFFSET, freePointer + entrySize);<NEW_LINE>setIntValue(SIZE_OFFSET, size - 1);<NEW_LINE>addPageOperation(new LocalHashTableV2BucketDeleteEntryPO(index, hashCode, key, value));<NEW_LINE>}
setIntValue(currentPositionOffset, currentEntryPosition + entrySize);
938,104
protected List<Element> expandTimeHM(Document doc, String s) {<NEW_LINE>ArrayList<Element> exp = new ArrayList<Element>();<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>Matcher reMatcher = reHourMinute.matcher(s);<NEW_LINE>reMatcher.find();<NEW_LINE>String hour = reMatcher.group(1);<NEW_LINE>if (hour.equals("1") || hour.equals("01")) {<NEW_LINE>sb.append("ein");<NEW_LINE>} else {<NEW_LINE>sb.append<MASK><NEW_LINE>}<NEW_LINE>String minute = reMatcher.group(2);<NEW_LINE>sb.append(" Uhr");<NEW_LINE>if (!minute.equals("00")) {<NEW_LINE>sb.append(" ");<NEW_LINE>sb.append(number.expandInteger(minute));<NEW_LINE>}<NEW_LINE>// Create one mtu from hour and minute:<NEW_LINE>exp.addAll(makeNewTokens(doc, sb.toString(), true, s));<NEW_LINE>return exp;<NEW_LINE>}
(number.expandInteger(hour));
660,781
public static QuerySmsTemplateListResponse unmarshall(QuerySmsTemplateListResponse querySmsTemplateListResponse, UnmarshallerContext _ctx) {<NEW_LINE>querySmsTemplateListResponse.setRequestId(_ctx.stringValue("QuerySmsTemplateListResponse.RequestId"));<NEW_LINE>querySmsTemplateListResponse.setCode(_ctx.stringValue("QuerySmsTemplateListResponse.Code"));<NEW_LINE>querySmsTemplateListResponse.setMessage(_ctx.stringValue("QuerySmsTemplateListResponse.Message"));<NEW_LINE>List<SmsStatsResultDTO> smsTemplateList = new ArrayList<SmsStatsResultDTO>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QuerySmsTemplateListResponse.SmsTemplateList.Length"); i++) {<NEW_LINE>SmsStatsResultDTO smsStatsResultDTO = new SmsStatsResultDTO();<NEW_LINE>smsStatsResultDTO.setTemplateCode(_ctx.stringValue("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].TemplateCode"));<NEW_LINE>smsStatsResultDTO.setTemplateName(_ctx.stringValue("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].TemplateName"));<NEW_LINE>smsStatsResultDTO.setTemplateType(_ctx.integerValue("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].TemplateType"));<NEW_LINE>smsStatsResultDTO.setAuditStatus(_ctx.stringValue("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].AuditStatus"));<NEW_LINE>smsStatsResultDTO.setTemplateContent(_ctx.stringValue<MASK><NEW_LINE>smsStatsResultDTO.setCreateDate(_ctx.stringValue("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].CreateDate"));<NEW_LINE>smsStatsResultDTO.setOrderId(_ctx.stringValue("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].OrderId"));<NEW_LINE>Reason reason = new Reason();<NEW_LINE>reason.setRejectDate(_ctx.stringValue("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].Reason.RejectDate"));<NEW_LINE>reason.setRejectInfo(_ctx.stringValue("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].Reason.RejectInfo"));<NEW_LINE>reason.setRejectSubInfo(_ctx.stringValue("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].Reason.RejectSubInfo"));<NEW_LINE>smsStatsResultDTO.setReason(reason);<NEW_LINE>smsTemplateList.add(smsStatsResultDTO);<NEW_LINE>}<NEW_LINE>querySmsTemplateListResponse.setSmsTemplateList(smsTemplateList);<NEW_LINE>return querySmsTemplateListResponse;<NEW_LINE>}
("QuerySmsTemplateListResponse.SmsTemplateList[" + i + "].TemplateContent"));
1,219,372
public void encode(Buffer valueBuffer) {<NEW_LINE>StrategyAnalyzer<Long> collectIntervalStrategyAnalyzer = collectIntervalAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> sampledNewCountStrategyAnalyzer = sampledNewCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> sampledContinuationCountStrategyAnalyzer = sampledContinuationCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> unsampledNewCountStrategyAnalyzer = unsampledNewCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> unsampledContinuationCountStrategyAnalyzer = unsampledContinuationCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> skippedNewCountStrategyAnalyzer = skippedNewCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> skippedContinuationCountStrategyAnalyzer = skippedContinuationCountAnalyzerBuilder.build();<NEW_LINE>// encode header<NEW_LINE>AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();<NEW_LINE>headerEncoder.addCode(collectIntervalStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(sampledNewCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(sampledContinuationCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(unsampledNewCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(unsampledContinuationCountStrategyAnalyzer.<MASK><NEW_LINE>headerEncoder.addCode(skippedNewCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(skippedContinuationCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>final byte[] header = headerEncoder.getHeader();<NEW_LINE>valueBuffer.putPrefixedBytes(header);<NEW_LINE>// encode values<NEW_LINE>this.codec.encodeValues(valueBuffer, collectIntervalStrategyAnalyzer.getBestStrategy(), collectIntervalStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, sampledNewCountStrategyAnalyzer.getBestStrategy(), sampledNewCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, sampledContinuationCountStrategyAnalyzer.getBestStrategy(), sampledContinuationCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, unsampledNewCountStrategyAnalyzer.getBestStrategy(), unsampledNewCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, unsampledContinuationCountStrategyAnalyzer.getBestStrategy(), unsampledContinuationCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, skippedNewCountStrategyAnalyzer.getBestStrategy(), skippedNewCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, skippedContinuationCountStrategyAnalyzer.getBestStrategy(), skippedContinuationCountStrategyAnalyzer.getValues());<NEW_LINE>}
getBestStrategy().getCode());
1,718,427
public double compare(String s1, String s2) {<NEW_LINE>int len = Math.min(s1.length(), s2.length());<NEW_LINE>// we know that if the outcome here is 0.5 or lower, then the<NEW_LINE>// property will return the lower probability. so the moment we<NEW_LINE>// learn that probability is 0.5 or lower we can return 0.0 and<NEW_LINE>// stop. this optimization makes a perceptible improvement in<NEW_LINE>// overall performance.<NEW_LINE>int maxlen = Math.max(s1.length(<MASK><NEW_LINE>if ((double) len / (double) maxlen <= 0.5)<NEW_LINE>return 0.0;<NEW_LINE>// if the strings are equal we can stop right here.<NEW_LINE>if (len == maxlen && s1.equals(s2))<NEW_LINE>return 1.0;<NEW_LINE>// we couldn't shortcut, so now we go ahead and compute the full<NEW_LINE>// metric<NEW_LINE>int dist = Math.min(compactDistance(s1, s2), len);<NEW_LINE>return 1.0 - (((double) dist) / ((double) len));<NEW_LINE>}
), s2.length());
74,868
public void refresh(final ShardingSphereMetaData schemaMetaData, final FederationDatabaseMetaData database, final Map<String, OptimizerPlannerContext> optimizerPlanners, final Collection<String> logicDataSourceNames, final CreateIndexStatement sqlStatement, final ConfigurationProperties props) throws SQLException {<NEW_LINE>String indexName = null != sqlStatement.getIndex() ? sqlStatement.getIndex().getIdentifier().getValue() : IndexMetaDataUtil.getGeneratedLogicIndexName(sqlStatement.getColumns());<NEW_LINE>if (Strings.isNullOrEmpty(indexName)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String tableName = sqlStatement.getTable().getTableName().getIdentifier().getValue();<NEW_LINE>schemaMetaData.getDefaultSchema().get(tableName).getIndexes().put(<MASK><NEW_LINE>SchemaAlteredEvent event = new SchemaAlteredEvent(schemaMetaData.getName());<NEW_LINE>event.getAlteredTables().add(schemaMetaData.getDefaultSchema().get(tableName));<NEW_LINE>ShardingSphereEventBus.getInstance().post(event);<NEW_LINE>}
indexName, new IndexMetaData(indexName));
1,770,297
private ObjectNode mergeObjectNodes(ObjectNode targetNode, ObjectNode updateNode) {<NEW_LINE>Iterator<String<MASK><NEW_LINE>while (fieldNames.hasNext()) {<NEW_LINE>String fieldName = fieldNames.next();<NEW_LINE>JsonNode targetValue = targetNode.get(fieldName);<NEW_LINE>JsonNode updateValue = updateNode.get(fieldName);<NEW_LINE>if (targetValue == null) {<NEW_LINE>// Target node doesn't have this field from update node: just add it<NEW_LINE>targetNode.set(fieldName, updateValue);<NEW_LINE>} else {<NEW_LINE>// Both nodes have the same field: merge the values<NEW_LINE>if (targetValue.isObject() && updateValue.isObject()) {<NEW_LINE>// Both values are objects: recurse<NEW_LINE>targetNode.set(fieldName, mergeObjectNodes((ObjectNode) targetValue, (ObjectNode) updateValue));<NEW_LINE>} else if (targetValue.isArray() && updateValue.isArray()) {<NEW_LINE>// Both values are arrays: concatenate them to be merged later<NEW_LINE>((ArrayNode) targetValue).addAll((ArrayNode) updateValue);<NEW_LINE>} else {<NEW_LINE>// Values have different types: use the one from the update node<NEW_LINE>targetNode.set(fieldName, updateValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return targetNode;<NEW_LINE>}
> fieldNames = updateNode.fieldNames();
446,453
public void visitInsn(final int opcode) {<NEW_LINE>// adds the instruction to the bytecode of the method<NEW_LINE><MASK><NEW_LINE>// update currentBlock<NEW_LINE>// Label currentBlock = this.currentBlock;<NEW_LINE>if (this.currentBlock != null) {<NEW_LINE>if (this.compute == FRAMES) {<NEW_LINE>this.currentBlock.frame.execute(opcode, 0, null, null);<NEW_LINE>} else {<NEW_LINE>// updates current and max stack sizes<NEW_LINE>int size = this.stackSize + Frame.SIZE[opcode];<NEW_LINE>if (size > this.maxStackSize) {<NEW_LINE>this.maxStackSize = size;<NEW_LINE>}<NEW_LINE>this.stackSize = size;<NEW_LINE>}<NEW_LINE>// if opcode == ATHROW or xRETURN, ends current block (no successor)<NEW_LINE>if ((opcode >= Opcodes.IRETURN && opcode <= Opcodes.RETURN) || opcode == Opcodes.ATHROW) {<NEW_LINE>noSuccessor();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
this.code.putByte(opcode);
1,031,771
private static void mainGenerate(String[] args) throws Exception {<NEW_LINE>ShellParams shellParams = new ShellParams(boolKeys, keys, args);<NEW_LINE>String javaFile = shellParams.getValue(IN_PATH);<NEW_LINE>String outPath = shellParams.getValue(OUT_PATH);<NEW_LINE>String fileName = shellParams.getValue(OUT_NAME);<NEW_LINE>if (fileName == null) {<NEW_LINE>fileName = "temp.c";<NEW_LINE>}<NEW_LINE>if (javaFile == null) {<NEW_LINE>try {<NEW_LINE>javaFile = FileFinder.findByModuleClass(shellParams.getValue(MODULE)<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>System.out.println(echoUsage());<NEW_LINE>throw new Exception(e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (outPath == null) {<NEW_LINE>try {<NEW_LINE>outPath = FileFinder.findByModuleJni(shellParams.getValue(MODULE), shellParams.getValue(JNI_NAME));<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.out.println(echoUsage());<NEW_LINE>throw new Exception(e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (shellParams.containKey(CALLBACK)) {<NEW_LINE>autoGenerateCallback(javaFile, outPath, fileName);<NEW_LINE>} else {<NEW_LINE>autoGenerate(javaFile, outPath, fileName);<NEW_LINE>}<NEW_LINE>File f = new File(outPath, fileName);<NEW_LINE>System.out.println("generate success! " + f);<NEW_LINE>}
, shellParams.getValue(CLASS_NAME));
1,380,022
public UploadChangesResponse uploadSubscriptionChanges(List<String> added, List<String> removed) throws GpodnetServiceException {<NEW_LINE>requireLoggedIn();<NEW_LINE>try {<NEW_LINE>URL url = new URI(baseScheme, null, baseHost, basePort, String.format("/api/2/subscriptions/%s/%s.json", username, deviceId), null, null).toURL();<NEW_LINE><MASK><NEW_LINE>requestObject.put("add", new JSONArray(added));<NEW_LINE>requestObject.put("remove", new JSONArray(removed));<NEW_LINE>RequestBody body = RequestBody.create(JSON, requestObject.toString());<NEW_LINE>Request.Builder request = new Request.Builder().post(body).url(url);<NEW_LINE>final String response = executeRequest(request);<NEW_LINE>return GpodnetUploadChangesResponse.fromJSONObject(response);<NEW_LINE>} catch (JSONException | MalformedURLException | URISyntaxException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>throw new GpodnetServiceException(e);<NEW_LINE>}<NEW_LINE>}
final JSONObject requestObject = new JSONObject();
784,914
void sealAndInitialize(FhirContext theContext, Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {<NEW_LINE>Map<String, BaseRuntimeElementDefinition<?>> <MASK><NEW_LINE>myDatatypeToAttributeName = new HashMap<>();<NEW_LINE>myDatatypeToDefinition = new HashMap<>();<NEW_LINE>for (BaseRuntimeElementDefinition<?> next : theClassToElementDefinitions.values()) {<NEW_LINE>if (next instanceof IRuntimeDatatypeDefinition) {<NEW_LINE>myDatatypeToDefinition.put(next.getImplementingClass(), next);<NEW_LINE>boolean isSpecialization = ((IRuntimeDatatypeDefinition) next).isSpecialization();<NEW_LINE>if (isSpecialization) {<NEW_LINE>ourLog.trace("Not adding specialization: {}", next.getImplementingClass());<NEW_LINE>}<NEW_LINE>if (!next.isStandardType()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String qualifiedName = next.getImplementingClass().getName();<NEW_LINE>if (!qualifiedName.startsWith("ca.uhn.fhir.model")) {<NEW_LINE>if (!qualifiedName.startsWith("org.hl7.fhir")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String attrName = createExtensionChildName(next);<NEW_LINE>if (isSpecialization && datatypeAttributeNameToDefinition.containsKey(attrName)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (datatypeAttributeNameToDefinition.containsKey(attrName)) {<NEW_LINE>BaseRuntimeElementDefinition<?> existing = datatypeAttributeNameToDefinition.get(attrName);<NEW_LINE>// We do allow built-in standard types to override extension types with the same element name,<NEW_LINE>// e.g. how EnumerationType extends CodeType but both serialize to "code". In this case,<NEW_LINE>// CodeType should win. If we aren't in a situation like that, there is a problem with the<NEW_LINE>// model so we should bail.<NEW_LINE>if (!existing.isStandardType()) {<NEW_LINE>throw new ConfigurationException(Msg.code(1734) + "More than one child of " + getElementName() + " matches attribute name " + attrName + ". Found [" + existing.getImplementingClass().getName() + "] and [" + next.getImplementingClass().getName() + "]");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>datatypeAttributeNameToDefinition.put(attrName, next);<NEW_LINE>datatypeAttributeNameToDefinition.put(attrName.toLowerCase(), next);<NEW_LINE>myDatatypeToAttributeName.put(next.getImplementingClass(), attrName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>myAttributeNameToDefinition = datatypeAttributeNameToDefinition;<NEW_LINE>addReferenceBinding(theContext, theClassToElementDefinitions, VALUE_RESOURCE);<NEW_LINE>addReferenceBinding(theContext, theClassToElementDefinitions, VALUE_REFERENCE);<NEW_LINE>}
datatypeAttributeNameToDefinition = new HashMap<>();
1,515,448
void updateFont() {<NEW_LINE>int fontSize = ((Integer) fontSizeSpinner.getValue()).intValue();<NEW_LINE>File file = null;<NEW_LINE>if (fontFileRadio.isSelected()) {<NEW_LINE>file = new File(fontFileText.getText());<NEW_LINE>if (!file.exists() || !file.isFile())<NEW_LINE>file = null;<NEW_LINE>}<NEW_LINE>boolean isFreeType = freeTypeRadio.isSelected();<NEW_LINE>boolean isNative = nativeRadio.isSelected();<NEW_LINE>boolean isJava = javaRadio.isSelected();<NEW_LINE>addEffectButton.setVisible(isJava);<NEW_LINE>effectsScroll.setVisible(isJava);<NEW_LINE>appliedEffectsScroll.setVisible(isJava);<NEW_LINE>boldCheckBox.setEnabled(!isFreeType);<NEW_LINE>italicCheckBox.setEnabled(!isFreeType);<NEW_LINE>bitmapPanel.setVisible(isFreeType);<NEW_LINE>unicodePanel.setVisible(!isFreeType);<NEW_LINE>updateFontSelector();<NEW_LINE>UnicodeFont unicodeFont = null;<NEW_LINE>if (file != null) {<NEW_LINE>// Load from file.<NEW_LINE>try {<NEW_LINE>unicodeFont = new UnicodeFont(fontFileText.getText(), fontSize, boldCheckBox.isSelected(), italicCheckBox.isSelected());<NEW_LINE>} catch (Throwable ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>fontFileRadio.setSelected(false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (unicodeFont == null) {<NEW_LINE>// Load from java.awt.Font (kerning not available!).<NEW_LINE>unicodeFont = new UnicodeFont(Font.decode((String) fontList.getSelectedValue()), fontSize, boldCheckBox.isSelected(), italicCheckBox.isSelected());<NEW_LINE>}<NEW_LINE>unicodeFont.setMono(monoCheckBox.isSelected());<NEW_LINE>unicodeFont.setGamma(((Number) gammaSpinner.getValue()).floatValue());<NEW_LINE>unicodeFont.setPaddingTop(((Number) padTopSpinner.getValue()).intValue());<NEW_LINE>unicodeFont.setPaddingRight(((Number) padRightSpinner.getValue()).intValue());<NEW_LINE>unicodeFont.setPaddingBottom(((Number) padBottomSpinner.getValue()).intValue());<NEW_LINE>unicodeFont.setPaddingLeft(((Number) padLeftSpinner.getValue()).intValue());<NEW_LINE>unicodeFont.setPaddingAdvanceX(((Number) padAdvanceXSpinner.getValue<MASK><NEW_LINE>unicodeFont.setPaddingAdvanceY(((Number) padAdvanceYSpinner.getValue()).intValue());<NEW_LINE>unicodeFont.setGlyphPageWidth(((Number) glyphPageWidthCombo.getSelectedItem()).intValue());<NEW_LINE>unicodeFont.setGlyphPageHeight(((Number) glyphPageHeightCombo.getSelectedItem()).intValue());<NEW_LINE>if (nativeRadio.isSelected())<NEW_LINE>unicodeFont.setRenderType(RenderType.Native);<NEW_LINE>else if (freeTypeRadio.isSelected()) {<NEW_LINE>try {<NEW_LINE>unicodeFont.setRenderType(RenderType.FreeType);<NEW_LINE>} catch (GdxRuntimeException ex) {<NEW_LINE>unicodeFont.setRenderType(RenderType.Java);<NEW_LINE>javaRadio.doClick();<NEW_LINE>}<NEW_LINE>} else<NEW_LINE>unicodeFont.setRenderType(RenderType.Java);<NEW_LINE>for (Iterator iter = effectPanels.iterator(); iter.hasNext(); ) {<NEW_LINE>EffectPanel panel = (EffectPanel) iter.next();<NEW_LINE>unicodeFont.getEffects().add(panel.getEffect());<NEW_LINE>}<NEW_LINE>int size = sampleTextPane.getFont().getSize();<NEW_LINE>if (size < 14)<NEW_LINE>size = 14;<NEW_LINE>sampleTextPane.setFont(unicodeFont.getFont().deriveFont((float) size));<NEW_LINE>if (this.unicodeFont != null)<NEW_LINE>this.unicodeFont.dispose();<NEW_LINE>this.unicodeFont = unicodeFont;<NEW_LINE>updateFontSelector();<NEW_LINE>}
()).intValue());
1,295,355
public DescribeChannelResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeChannelResult describeChannelResult = new DescribeChannelResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return describeChannelResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("channel", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeChannelResult.setChannel(ChannelJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("statistics", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeChannelResult.setStatistics(ChannelStatisticsJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return describeChannelResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
876,165
public UpdateByQueryRequest updateByQueryRequest(UpdateQuery query, IndexCoordinates index) {<NEW_LINE>String indexName = index.getIndexName();<NEW_LINE>final UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(indexName);<NEW_LINE>updateByQueryRequest<MASK><NEW_LINE>if (query.getAbortOnVersionConflict() != null) {<NEW_LINE>updateByQueryRequest.setAbortOnVersionConflict(query.getAbortOnVersionConflict());<NEW_LINE>}<NEW_LINE>if (query.getBatchSize() != null) {<NEW_LINE>updateByQueryRequest.setBatchSize(query.getBatchSize());<NEW_LINE>}<NEW_LINE>if (query.getQuery() != null) {<NEW_LINE>final Query queryQuery = query.getQuery();<NEW_LINE>updateByQueryRequest.setQuery(getQuery(queryQuery));<NEW_LINE>if (queryQuery.getIndicesOptions() != null) {<NEW_LINE>updateByQueryRequest.setIndicesOptions(toElasticsearchIndicesOptions(queryQuery.getIndicesOptions()));<NEW_LINE>}<NEW_LINE>if (queryQuery.getScrollTime() != null) {<NEW_LINE>updateByQueryRequest.setScroll(TimeValue.timeValueMillis(queryQuery.getScrollTime().toMillis()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (query.getMaxDocs() != null) {<NEW_LINE>updateByQueryRequest.setMaxDocs(query.getMaxDocs());<NEW_LINE>}<NEW_LINE>if (query.getMaxRetries() != null) {<NEW_LINE>updateByQueryRequest.setMaxRetries(query.getMaxRetries());<NEW_LINE>}<NEW_LINE>if (query.getPipeline() != null) {<NEW_LINE>updateByQueryRequest.setPipeline(query.getPipeline());<NEW_LINE>}<NEW_LINE>if (query.getRefreshPolicy() != null) {<NEW_LINE>updateByQueryRequest.setRefresh(query.getRefreshPolicy() == RefreshPolicy.IMMEDIATE);<NEW_LINE>}<NEW_LINE>if (query.getRequestsPerSecond() != null) {<NEW_LINE>updateByQueryRequest.setRequestsPerSecond(query.getRequestsPerSecond());<NEW_LINE>}<NEW_LINE>if (query.getRouting() != null) {<NEW_LINE>updateByQueryRequest.setRouting(query.getRouting());<NEW_LINE>}<NEW_LINE>if (query.getShouldStoreResult() != null) {<NEW_LINE>updateByQueryRequest.setShouldStoreResult(query.getShouldStoreResult());<NEW_LINE>}<NEW_LINE>if (query.getSlices() != null) {<NEW_LINE>updateByQueryRequest.setSlices(query.getSlices());<NEW_LINE>}<NEW_LINE>if (query.getTimeout() != null) {<NEW_LINE>updateByQueryRequest.setTimeout(query.getTimeout());<NEW_LINE>}<NEW_LINE>if (query.getWaitForActiveShards() != null) {<NEW_LINE>updateByQueryRequest.setWaitForActiveShards(ActiveShardCount.parseString(query.getWaitForActiveShards()));<NEW_LINE>}<NEW_LINE>return updateByQueryRequest;<NEW_LINE>}
.setScript(getScript(query));
1,670,996
public Map tasks(@PathVariable String clusterName, @PathVariable String topology, @PathVariable Integer taskId, @RequestParam(value = "window", required = false) String window) {<NEW_LINE>Map<String, Object> ret = new HashMap<>();<NEW_LINE>int win = UIUtils.parseWindow(window);<NEW_LINE>NimbusClient client = null;<NEW_LINE>try {<NEW_LINE>client = NimbusClientManager.getNimbusClient(clusterName);<NEW_LINE>TopologyInfo topologyInfo = client.getClient().getTopologyInfo(topology);<NEW_LINE>String component = null;<NEW_LINE>String type = null;<NEW_LINE>for (ComponentSummary summary : topologyInfo.get_components()) {<NEW_LINE>if (summary.get_taskIds().contains(taskId)) {<NEW_LINE>component = summary.get_name();<NEW_LINE>type = summary.get_type();<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>ret.put("topologyName", topologyInfo.get_topology().get_name());<NEW_LINE>ret.put("component", component);<NEW_LINE>TaskEntity task = UIUtils.getTaskEntity(topologyInfo.get_tasks(), taskId);<NEW_LINE>task.setComponent(component);<NEW_LINE>task.setType(type);<NEW_LINE>ret.put("task", task);<NEW_LINE>List<MetricInfo> taskStreamMetrics = client.getClient().getTaskAndStreamMetrics(topology, taskId);<NEW_LINE>UITaskMetric taskMetric = UIMetricUtils.getTaskMetric(taskStreamMetrics, component, taskId, win);<NEW_LINE>ret.put("taskMetric", taskMetric);<NEW_LINE>List<UIStreamMetric> streamMetrics = UIMetricUtils.getStreamMetrics(taskStreamMetrics, component, taskId, win);<NEW_LINE>ret.put("streamMetrics", streamMetrics);<NEW_LINE>} catch (Exception e) {<NEW_LINE>NimbusClientManager.removeClient(clusterName);<NEW_LINE>ret = UIUtils.exceptionJson(e);<NEW_LINE>LOG.error(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
ret.put("topologyId", topology);
1,197,713
public static void fill(Pointer to, UnsignedWord size, byte value) {<NEW_LINE>long v = value & 0xffL;<NEW_LINE>v = (v << 8) | v;<NEW_LINE>v = (v << 16) | v;<NEW_LINE>v = (v << 32) | v;<NEW_LINE>UnsignedWord alignMask = WordFactory.unsigned(0x7);<NEW_LINE>UnsignedWord lowerSize = WordFactory.unsigned(0x8).subtract(to).and(alignMask);<NEW_LINE>if (lowerSize.aboveThan(0)) {<NEW_LINE>if (size.belowThan(lowerSize)) {<NEW_LINE>lowerSize = size.and(lowerSize);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>UnsignedWord offset = lowerSize;<NEW_LINE>UnsignedWord alignedSize = size.subtract(offset).and(alignMask.not());<NEW_LINE>UnmanagedMemoryUtil.fillLongs(to.add(offset), alignedSize, v);<NEW_LINE>offset = offset.add(alignedSize);<NEW_LINE>UnsignedWord upperSize = size.subtract(offset);<NEW_LINE>if (upperSize.aboveThan(0)) {<NEW_LINE>fillUnalignedUpper(to.add(offset), v, upperSize);<NEW_LINE>}<NEW_LINE>}
fillUnalignedLower(to, v, lowerSize);
1,394,281
public LogicalInsert visit(LogicalInsert logicalInsert) {<NEW_LINE>RelNode input = logicalInsert.getInput();<NEW_LINE>// Batch insert won't include RexCalls, so skip it.<NEW_LINE>if (input != null && logicalInsert.getBatchSize() == 0) {<NEW_LINE>// VALUES clause<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>List<RexNode> duplicateKeyUpdateList = logicalInsert.getDuplicateKeyUpdateList();<NEW_LINE>if (duplicateKeyUpdateList != null && !duplicateKeyUpdateList.isEmpty()) {<NEW_LINE>duplicateKeyUpdateList = visitDuplicateKeyUpdateList(duplicateKeyUpdateList);<NEW_LINE>}<NEW_LINE>// Always create a new one, because PhyTableInsertSharder is a member<NEW_LINE>// and can't be shared between two threads.<NEW_LINE>LogicalInsert newInsert = new LogicalInsert(logicalInsert.getCluster(), logicalInsert.getTraitSet(), logicalInsert.getTable(), logicalInsert.getCatalogReader(), input, logicalInsert.getOperation(), logicalInsert.isFlattened(), logicalInsert.getInsertRowType(), logicalInsert.getKeywords(), duplicateKeyUpdateList, logicalInsert.getBatchSize(), logicalInsert.getAppendedColumnIndex(), logicalInsert.getHints(), logicalInsert.getTableInfo(), logicalInsert.getPrimaryInsertWriter(), logicalInsert.getGsiInsertWriters(), logicalInsert.getAutoIncParamIndex(), logicalInsert.getUnOptimizedLogicalDynamicValues(), logicalInsert.getUnOptimizedDuplicateKeyUpdateList());<NEW_LINE>return newInsert;<NEW_LINE>}
input = input.accept(this);
756,794
private static PsiElement findTargetElementImpl(@Nonnull Editor editor, @Nonnull Set<String> flags, int offset) {<NEW_LINE><MASK><NEW_LINE>if (project == null)<NEW_LINE>return null;<NEW_LINE>if (flags.contains(TargetElementUtilEx.LOOKUP_ITEM_ACCEPTED)) {<NEW_LINE>PsiElement element = getTargetElementFromLookup(project);<NEW_LINE>if (element != null) {<NEW_LINE>return element;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Document document = editor.getDocument();<NEW_LINE>PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(document);<NEW_LINE>if (file == null)<NEW_LINE>return null;<NEW_LINE>offset = adjustOffset(file, document, offset);<NEW_LINE>if (file instanceof PsiCompiledFile) {<NEW_LINE>file = ((PsiCompiledFile) file).getDecompiledPsiFile();<NEW_LINE>}<NEW_LINE>PsiElement element = file.findElementAt(offset);<NEW_LINE>if (flags.contains(TargetElementUtilEx.REFERENCED_ELEMENT_ACCEPTED)) {<NEW_LINE>final PsiElement referenceOrReferencedElement = getReferenceOrReferencedElement(file, editor, flags, offset);<NEW_LINE>// if (referenceOrReferencedElement == null) {<NEW_LINE>// return getReferenceOrReferencedElement(file, editor, flags, offset);<NEW_LINE>// }<NEW_LINE>if (isAcceptableReferencedElement(element, referenceOrReferencedElement)) {<NEW_LINE>return referenceOrReferencedElement;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (element == null)<NEW_LINE>return null;<NEW_LINE>if (flags.contains(TargetElementUtilEx.ELEMENT_NAME_ACCEPTED)) {<NEW_LINE>if (element instanceof PsiNamedElement)<NEW_LINE>return element;<NEW_LINE>return getNamedElement(element, offset - element.getTextRange().getStartOffset());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
Project project = editor.getProject();
513,850
final ListEventActionsResult executeListEventActions(ListEventActionsRequest listEventActionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEventActionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListEventActionsRequest> request = null;<NEW_LINE>Response<ListEventActionsResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new ListEventActionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listEventActionsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DataExchange");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEventActions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListEventActionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEventActionsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
236,974
protected List findByUserId(String userId) throws SystemException {<NEW_LINE>Session session = null;<NEW_LINE>try {<NEW_LINE>session = openSession();<NEW_LINE>StringBuffer query = new StringBuffer();<NEW_LINE>query.append("FROM UserTracker IN CLASS com.liferay.portal.ejb.UserTrackerHBM WHERE ");<NEW_LINE>query.append("userId = ?");<NEW_LINE>query.append(" ");<NEW_LINE>Query q = session.createQuery(query.toString());<NEW_LINE>int queryPos = 0;<NEW_LINE>q.setString(queryPos++, userId);<NEW_LINE>Iterator itr = q.list().iterator();<NEW_LINE>List list = new ArrayList();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>UserTrackerHBM userTrackerHBM = (UserTrackerHBM) itr.next();<NEW_LINE>list.add<MASK><NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>} catch (HibernateException he) {<NEW_LINE>throw new SystemException(he);<NEW_LINE>} finally {<NEW_LINE>HibernateUtil.closeSession(session);<NEW_LINE>}<NEW_LINE>}
(UserTrackerHBMUtil.model(userTrackerHBM));
844,728
@ResponseBody<NEW_LINE>@ApiImplicitParams({ @ApiImplicitParam(name = "store", dataType = "String", defaultValue = "DEFAULT"), @ApiImplicitParam(name = "lang", dataType = "String", defaultValue = "en") })<NEW_LINE>public PersistableProductReview update(@PathVariable final Long id, @PathVariable final Long reviewId, @Valid @RequestBody PersistableProductReview review, @ApiIgnore MerchantStore merchantStore, @ApiIgnore Language language, HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>try {<NEW_LINE>ProductReview prodReview = productReviewService.getById(reviewId);<NEW_LINE>if (prodReview == null) {<NEW_LINE>response.sendError(404, "Product review with id " + reviewId + " does not exist");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (prodReview.getCustomer().getId().longValue() != review.getCustomerId().longValue()) {<NEW_LINE>response.sendError(404, "Product review with id " + reviewId + " does not exist");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// rating maximum 5<NEW_LINE>if (review.getRating() > Constants.MAX_REVIEW_RATING_SCORE) {<NEW_LINE>response.sendError(503, "Maximum rating score is " + Constants.MAX_REVIEW_RATING_SCORE);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>review.setProductId(id);<NEW_LINE>productFacade.saveOrUpdateReview(review, merchantStore, language);<NEW_LINE>return review;<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.error("Error while saving product review", e);<NEW_LINE>try {<NEW_LINE>response.sendError(503, <MASK><NEW_LINE>} catch (Exception ignore) {<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
"Error while saving product review" + e.getMessage());
405,249
public static String humanDuration(final Duration dur) {<NEW_LINE>final Period p = dur<MASK><NEW_LINE>if (dur.getStandardSeconds() == 0) {<NEW_LINE>return "0 seconds";<NEW_LINE>} else if (dur.getStandardSeconds() < 60) {<NEW_LINE>return format("%d second%s", p.getSeconds(), p.getSeconds() > 1 ? "s" : "");<NEW_LINE>} else if (dur.getStandardMinutes() < 60) {<NEW_LINE>return format("%d minute%s", p.getMinutes(), p.getMinutes() > 1 ? "s" : "");<NEW_LINE>} else if (dur.getStandardHours() < 24) {<NEW_LINE>return format("%d hour%s", p.getHours(), p.getHours() > 1 ? "s" : "");<NEW_LINE>} else {<NEW_LINE>return format("%d day%s", dur.getStandardDays(), dur.getStandardDays() > 1 ? "s" : "");<NEW_LINE>}<NEW_LINE>}
.toPeriod().normalizedStandard();
1,715,352
public void visit(BIRBasicBlock birBasicBlock) {<NEW_LINE>// Name of the basic block<NEW_LINE>addCpAndWriteString(birBasicBlock.id.value);<NEW_LINE>// Number of instructions<NEW_LINE>// Adding the terminator instruction as well.<NEW_LINE>buf.writeInt(birBasicBlock.instructions.size() + 1);<NEW_LINE>birBasicBlock.instructions.forEach(instruction -> {<NEW_LINE>// write pos and kind<NEW_LINE>writePosition(instruction.pos);<NEW_LINE>writeScopes(instruction);<NEW_LINE>buf.writeByte(instruction.kind.getValue());<NEW_LINE>// write instruction<NEW_LINE>instruction.accept(this);<NEW_LINE>});<NEW_LINE>BIRTerminator terminator = birBasicBlock.terminator;<NEW_LINE>if (terminator == null) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>// write pos and kind<NEW_LINE>writePosition(terminator.pos);<NEW_LINE>writeScope(terminator);<NEW_LINE>buf.writeByte(terminator.kind.getValue());<NEW_LINE>// write instruction<NEW_LINE>terminator.accept(this);<NEW_LINE>}
BLangCompilerException("Basic block without a terminator : " + birBasicBlock.id);
1,646,778
final UpdatePatchBaselineResult executeUpdatePatchBaseline(UpdatePatchBaselineRequest updatePatchBaselineRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updatePatchBaselineRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdatePatchBaselineRequest> request = null;<NEW_LINE>Response<UpdatePatchBaselineResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdatePatchBaselineRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updatePatchBaselineRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SSM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdatePatchBaseline");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdatePatchBaselineResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdatePatchBaselineResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
884,197
public static void patchBundledServerXml(File serverXml) {<NEW_LINE>try {<NEW_LINE>Server server = Server.createGraph(serverXml);<NEW_LINE>setServerAttributeValue(server, ATTR_PORT, String.valueOf(TomcatProperties.DEF_VALUE_BUNDLED_SHUTDOWN_PORT));<NEW_LINE>setHttpConnectorAttributeValue(server, ATTR_PORT, String<MASK><NEW_LINE>setHttpConnectorAttributeValue(server, ATTR_URI_ENCODING, BUNDLED_DEFAULT_URI_ENCODING);<NEW_LINE>setHostAttributeValue(server, ATTR_AUTO_DEPLOY, BUNDLED_DEFAULT_AUTO_DEPLOY.toString());<NEW_LINE>server.write(serverXml);<NEW_LINE>} catch (IOException e) {<NEW_LINE>Logger.getLogger(TomcatInstallUtil.class.getName()).log(Level.INFO, null, e);<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>Logger.getLogger(TomcatInstallUtil.class.getName()).log(Level.INFO, null, e);<NEW_LINE>}<NEW_LINE>}
.valueOf(TomcatProperties.DEF_VALUE_BUNDLED_SERVER_PORT));
491,722
private void applyWithConfig(String[] row, int line, List<FileField> fileFieldList, List<Integer> ignoreFields, FileTab fileTab, Boolean isTabConfig, int tabConfigRowCount) throws AxelorException, ClassNotFoundException {<NEW_LINE>Mapper mapper = getMapper(fileTab.getMetaModel().getFullName());<NEW_LINE>FileField fileField = null;<NEW_LINE>int index = 0;<NEW_LINE>for (int i = 0; i < row.length; i++) {<NEW_LINE>if (Strings.isNullOrEmpty(row[i])) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>index = line;<NEW_LINE>String value = row[i].trim();<NEW_LINE>if (line == 1) {<NEW_LINE>this.readFields(value, i, fileFieldList, ignoreFields, mapper, fileTab);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (ignoreFields.contains(i)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (fileFieldList.size() < i) {<NEW_LINE>break;<NEW_LINE>} else if (!isTabConfig && fileFieldList.size() <= i) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (row[0] == null) {<NEW_LINE>fileField = fileFieldList.get(i - 1);<NEW_LINE>} else if (!isTabConfig && row[0] != null) {<NEW_LINE>fileField = fileFieldList.get(i);<NEW_LINE>}<NEW_LINE>if (isTabWithoutConfig) {<NEW_LINE>fileField = fileFieldList.get(i);<NEW_LINE>}<NEW_LINE>if (line == 2) {<NEW_LINE>fileField.setColumnTitle(value);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (isTabConfig && i > 0 && row[0] != null && line >= 3 && line <= 11) {<NEW_LINE>fileField = fileFieldList.get(i - 1);<NEW_LINE>this.setFileFieldConfig(row, i, fileField);<NEW_LINE>}<NEW_LINE>if (isTabConfig && i > 0 && row[0] == null) {<NEW_LINE>line += -(tabConfigRowCount + 2);<NEW_LINE>this.<MASK><NEW_LINE>line = index;<NEW_LINE>} else if (!isTabConfig) {<NEW_LINE>line += -2;<NEW_LINE>this.setSampleLines(line, value, fileField);<NEW_LINE>line = index;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setSampleLines(line, value, fileField);
963,432
static TBigInteger multiplyPAP(TBigInteger a, TBigInteger b) {<NEW_LINE>// PRE: a >= b<NEW_LINE>int aLen = a.numberLength;<NEW_LINE>int bLen = b.numberLength;<NEW_LINE>int resLength = aLen + bLen;<NEW_LINE>int resSign = (a.sign != b.sign) ? -1 : 1;<NEW_LINE>// A special case when both numbers don't exceed int<NEW_LINE>if (resLength == 2) {<NEW_LINE>long val = unsignedMultAddAdd(a.digits[0], b.digits[0], 0, 0);<NEW_LINE>int valueLo = (int) val;<NEW_LINE>int valueHi = (int) (val >>> 32);<NEW_LINE>return ((valueHi == 0) ? new TBigInteger(resSign, valueLo) : new TBigInteger(resSign, 2, new int[] { valueLo, valueHi }));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>int[] bDigits = b.digits;<NEW_LINE>int[] resDigits = new int[resLength];<NEW_LINE>// Common case<NEW_LINE>multArraysPAP(aDigits, aLen, bDigits, bLen, resDigits);<NEW_LINE>TBigInteger result = new TBigInteger(resSign, resLength, resDigits);<NEW_LINE>result.cutOffLeadingZeroes();<NEW_LINE>return result;<NEW_LINE>}
int[] aDigits = a.digits;
1,131,818
@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@Consumes(MediaType.MULTIPART_FORM_DATA)<NEW_LINE>@Path("/segments")<NEW_LINE>@Authenticate(AccessType.CREATE)<NEW_LINE>@ApiOperation(value = "Upload a segment", notes = "Upload a segment as binary")<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 200, message = "Successfully uploaded segment"), @ApiResponse(code = 410, message = "Segment to refresh is deleted"), @ApiResponse(code = 500, message = "Internal error") })<NEW_LINE>public // For the multipart endpoint, we will always move segment to final location regardless of the segment endpoint.<NEW_LINE>void uploadSegmentAsMultiPart(FormDataMultiPart multiPart, @ApiParam(value = "Name of the table") @QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME) String tableName, @ApiParam(value = "Type of the table") @QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_TYPE) @DefaultValue("OFFLINE") String tableType, @ApiParam(value = "Whether to enable parallel push protection") @DefaultValue("false") @QueryParam(FileUploadDownloadClient.QueryParameters.ENABLE_PARALLEL_PUSH_PROTECTION) boolean enableParallelPushProtection, @ApiParam(value = "Whether to refresh if the segment already exists") @DefaultValue("true") @QueryParam(FileUploadDownloadClient.QueryParameters.ALLOW_REFRESH) boolean allowRefresh, @Context HttpHeaders headers, @Context Request request, @Suspended final AsyncResponse asyncResponse) {<NEW_LINE>try {<NEW_LINE>asyncResponse.resume(uploadSegment(tableName, TableType.valueOf(tableType.toUpperCase()), multiPart, enableParallelPushProtection, headers<MASK><NEW_LINE>} catch (Throwable t) {<NEW_LINE>asyncResponse.resume(t);<NEW_LINE>}<NEW_LINE>}
, request, true, allowRefresh));
210,945
private synchronized void deleteComment(final CommentingStrategy strategy, final IComment comment) throws CouldntDeleteException {<NEW_LINE>Preconditions.checkNotNull(comment, "IE02541: comment argument can not be null");<NEW_LINE>Preconditions.checkArgument(CUserManager.get(provider).isOwner(comment), "Error: a comment can be deleted only by its owner.");<NEW_LINE>final List<IComment> currentComments = strategy.getComments();<NEW_LINE>if (!currentComments.remove(comment)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>strategy.deleteComment(comment.getId(), comment.<MASK><NEW_LINE>strategy.saveComments(currentComments);<NEW_LINE>commentIdToComment.remove(comment.getId());<NEW_LINE>for (final CommentListener listener : listeners) {<NEW_LINE>try {<NEW_LINE>strategy.sendDeletedCommentNotification(listener, comment);<NEW_LINE>} catch (final Exception exception) {<NEW_LINE>CUtilityFunctions.logException(exception);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getUser().getUserId());
1,123,034
public StateId createStateId(String name) {<NEW_LINE>if (createdStateIds.containsKey(name))<NEW_LINE>return createdStateIds.get(name);<NEW_LINE>if (stateIndexCounter >= activityStates[0].length) {<NEW_LINE>activityStates = new Object[nuActivities][stateIndexCounter + 1];<NEW_LINE>vehicleDependentActivityStates = new Object[nuActivities]<MASK><NEW_LINE>routeStatesArr = new Object[vrp.getVehicles().size() + 2][stateIndexCounter + 1];<NEW_LINE>vehicleDependentRouteStatesArr = new Object[vrp.getVehicles().size() + 2][nuVehicleTypeKeys][stateIndexCounter + 1];<NEW_LINE>problemStates = new Object[stateIndexCounter + 1];<NEW_LINE>}<NEW_LINE>StateId id = StateFactory.createId(name, stateIndexCounter);<NEW_LINE>incStateIndexCounter();<NEW_LINE>createdStateIds.put(name, id);<NEW_LINE>return id;<NEW_LINE>}
[nuVehicleTypeKeys][stateIndexCounter + 1];
310,444
public static DynamicConfigAddQueueConfigCodec.RequestParameters decodeRequest(ClientMessage clientMessage) {<NEW_LINE>ClientMessage.ForwardFrameIterator iterator = clientMessage.frameIterator();<NEW_LINE>RequestParameters request = new RequestParameters();<NEW_LINE>ClientMessage.Frame initialFrame = iterator.next();<NEW_LINE>request.backupCount = decodeInt(initialFrame.content, REQUEST_BACKUP_COUNT_FIELD_OFFSET);<NEW_LINE>request.asyncBackupCount = decodeInt(initialFrame.content, REQUEST_ASYNC_BACKUP_COUNT_FIELD_OFFSET);<NEW_LINE>request.maxSize = decodeInt(initialFrame.content, REQUEST_MAX_SIZE_FIELD_OFFSET);<NEW_LINE>request.emptyQueueTtl = decodeInt(initialFrame.content, REQUEST_EMPTY_QUEUE_TTL_FIELD_OFFSET);<NEW_LINE>request.statisticsEnabled = decodeBoolean(initialFrame.content, REQUEST_STATISTICS_ENABLED_FIELD_OFFSET);<NEW_LINE>request.mergeBatchSize = decodeInt(initialFrame.content, REQUEST_MERGE_BATCH_SIZE_FIELD_OFFSET);<NEW_LINE>request.<MASK><NEW_LINE>request.listenerConfigs = ListMultiFrameCodec.decodeNullable(iterator, ListenerConfigHolderCodec::decode);<NEW_LINE>request.splitBrainProtectionName = CodecUtil.decodeNullable(iterator, StringCodec::decode);<NEW_LINE>request.queueStoreConfig = CodecUtil.decodeNullable(iterator, QueueStoreConfigHolderCodec::decode);<NEW_LINE>request.mergePolicy = StringCodec.decode(iterator);<NEW_LINE>if (iterator.hasNext()) {<NEW_LINE>request.priorityComparatorClassName = CodecUtil.decodeNullable(iterator, StringCodec::decode);<NEW_LINE>request.isPriorityComparatorClassNameExists = true;<NEW_LINE>} else {<NEW_LINE>request.isPriorityComparatorClassNameExists = false;<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
name = StringCodec.decode(iterator);
1,060,483
public static ArrowRecordBatch deserializeRecordBatch(RecordBatch recordBatchFB, ArrowBuf body) throws IOException {<NEW_LINE>// Now read the body<NEW_LINE>int nodesLength = recordBatchFB.nodesLength();<NEW_LINE>List<ArrowFieldNode> nodes = new ArrayList<>();<NEW_LINE>for (int i = 0; i < nodesLength; ++i) {<NEW_LINE>FieldNode node = recordBatchFB.nodes(i);<NEW_LINE>if ((int) node.length() != node.length() || (int) node.nullCount() != node.nullCount()) {<NEW_LINE>throw new IOException("Cannot currently deserialize record batches with " + "node length larger than INT_MAX records.");<NEW_LINE>}<NEW_LINE>nodes.add(new ArrowFieldNode(node.length(), node.nullCount()));<NEW_LINE>}<NEW_LINE>List<ArrowBuf> buffers = new ArrayList<>();<NEW_LINE>for (int i = 0; i < recordBatchFB.buffersLength(); ++i) {<NEW_LINE>Buffer bufferFB = recordBatchFB.buffers(i);<NEW_LINE>ArrowBuf vectorBuffer = body.slice(bufferFB.offset(), bufferFB.length());<NEW_LINE>buffers.add(vectorBuffer);<NEW_LINE>}<NEW_LINE>ArrowBodyCompression bodyCompression = recordBatchFB.compression() == null ? NoCompressionCodec.DEFAULT_BODY_COMPRESSION : new ArrowBodyCompression(recordBatchFB.compression().codec(), recordBatchFB.<MASK><NEW_LINE>if ((int) recordBatchFB.length() != recordBatchFB.length()) {<NEW_LINE>throw new IOException("Cannot currently deserialize record batches with more than INT_MAX records.");<NEW_LINE>}<NEW_LINE>ArrowRecordBatch arrowRecordBatch = new ArrowRecordBatch(checkedCastToInt(recordBatchFB.length()), nodes, buffers, bodyCompression);<NEW_LINE>body.getReferenceManager().release();<NEW_LINE>return arrowRecordBatch;<NEW_LINE>}
compression().method());
1,397,708
private long[] _decode(String hash, String alphabet) {<NEW_LINE>final ArrayList<Long> ret = new ArrayList<>();<NEW_LINE>String shuffle = alphabet;<NEW_LINE>int i = 0;<NEW_LINE>final String regexp = "[" + this.guards + "]";<NEW_LINE>String hashBreakdown = hash.replaceAll(regexp, " ");<NEW_LINE>String[] <MASK><NEW_LINE>if (hashArray.length == 3 || hashArray.length == 2) {<NEW_LINE>i = 1;<NEW_LINE>}<NEW_LINE>if (hashArray.length > 0) {<NEW_LINE>hashBreakdown = hashArray[i];<NEW_LINE>if (!hashBreakdown.isEmpty()) {<NEW_LINE>final char lottery = hashBreakdown.charAt(0);<NEW_LINE>hashBreakdown = hashBreakdown.substring(1);<NEW_LINE>hashBreakdown = hashBreakdown.replaceAll("[" + this.seps + "]", " ");<NEW_LINE>hashArray = hashBreakdown.split(" ");<NEW_LINE>String subHash, buffer;<NEW_LINE>for (final String aHashArray : hashArray) {<NEW_LINE>subHash = aHashArray;<NEW_LINE>buffer = lottery + this.salt + shuffle;<NEW_LINE>shuffle = Hashids.consistentShuffle(shuffle, buffer.substring(0, shuffle.length()));<NEW_LINE>ret.add(Hashids.unhash(subHash, shuffle));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// transform from List<Long> to long[]<NEW_LINE>long[] arr = new long[ret.size()];<NEW_LINE>for (int k = 0; k < arr.length; k++) {<NEW_LINE>arr[k] = ret.get(k);<NEW_LINE>}<NEW_LINE>if (!this.encode(arr).equals(hash)) {<NEW_LINE>arr = new long[0];<NEW_LINE>}<NEW_LINE>return arr;<NEW_LINE>}
hashArray = hashBreakdown.split(" ");
192,293
public void dragGestureRecognized(final DragGestureEvent e) {<NEW_LINE>final MainView mainView = <MASK><NEW_LINE>final NodeView nodeView = mainView.getNodeView();<NEW_LINE>final MapView mapView = nodeView.getMap();<NEW_LINE>mapView.select();<NEW_LINE>if (!nodeView.isSelected()) {<NEW_LINE>nodeView.getMap().getModeController().getController().getSelection().selectAsTheOnlyOneSelected(nodeView.getModel());<NEW_LINE>}<NEW_LINE>Rectangle bounds = new Rectangle(0, 0, mainView.getWidth(), mainView.getHeight());<NEW_LINE>if (!bounds.contains(e.getDragOrigin()))<NEW_LINE>return;<NEW_LINE>final int dragActionType = e.getDragAction();<NEW_LINE>if (dragActionType == DnDConstants.ACTION_MOVE) {<NEW_LINE>final NodeModel node = nodeView.getModel();<NEW_LINE>if (node.isRoot()) {<NEW_LINE>if (!isLinkDragEvent(e))<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final String dragActionName;<NEW_LINE>Cursor cursor = getCursorByAction(dragActionType);<NEW_LINE>if (isLinkDragEvent(e)) {<NEW_LINE>cursor = DragSource.DefaultLinkDrop;<NEW_LINE>dragActionName = "LINK";<NEW_LINE>} else if ((e.getTriggerEvent().getModifiersEx() & InputEvent.BUTTON2_DOWN_MASK) != 0) {<NEW_LINE>cursor = DragSource.DefaultCopyDrop;<NEW_LINE>dragActionName = "COPY";<NEW_LINE>} else {<NEW_LINE>dragActionName = "MOVE";<NEW_LINE>}<NEW_LINE>final Transferable t = MapClipboardController.getController().copy(Controller.getCurrentController().getSelection());<NEW_LINE>((MindMapNodesSelection) t).setDropAction(dragActionName);<NEW_LINE>try {<NEW_LINE>e.startDrag(cursor, t, new DragSourceListener() {<NEW_LINE><NEW_LINE>public void dragDropEnd(final DragSourceDropEvent dsde) {<NEW_LINE>}<NEW_LINE><NEW_LINE>public void dragEnter(final DragSourceDragEvent e) {<NEW_LINE>}<NEW_LINE><NEW_LINE>public void dragExit(final DragSourceEvent dse) {<NEW_LINE>}<NEW_LINE><NEW_LINE>public void dragOver(final DragSourceDragEvent dsde) {<NEW_LINE>}<NEW_LINE><NEW_LINE>public void dropActionChanged(final DragSourceDragEvent dsde) {<NEW_LINE>dsde.getDragSourceContext().setCursor(getCursorByAction(dsde.getUserAction()));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (final InvalidDnDOperationException ex) {<NEW_LINE>}<NEW_LINE>}
(MainView) e.getComponent();
566,977
public static <EdgeType extends ZyGraphEdge<?, ?, ?>> void handleEdgeClicks(final AbstractZyGraph<?, ?> graph, final EdgeType edge, final MouseEvent event) {<NEW_LINE>Preconditions.checkNotNull(graph, "Error: Graph argument can not be null");<NEW_LINE><MASK><NEW_LINE>Preconditions.checkNotNull(event, "Error: Event argument can not be null");<NEW_LINE>if ((event.getButton() == MouseEvent.BUTTON1) && event.isShiftDown()) {<NEW_LINE>// Shift-Click => Select edge<NEW_LINE>graph.getGraph().setSelected(edge.getEdge(), !edge.isSelected());<NEW_LINE>} else if ((event.getButton() == MouseEvent.BUTTON1) && !event.isShiftDown()) {<NEW_LINE>if (edge.getSource() != edge.getTarget()) {<NEW_LINE>// When the user clicks on an edge, the graph scrolls to either<NEW_LINE>// the source node or the target node of the edge, depending on<NEW_LINE>// their distance from the visible part of the graph.<NEW_LINE>final double x = graph.getView().toWorldCoordX(event.getX());<NEW_LINE>final double y = graph.getView().toWorldCoordY(event.getY());<NEW_LINE>zoomEdgeNode(graph, edge.getEdge(), x, y);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Preconditions.checkNotNull(edge, "Error: Edge argument can not be null");
899,732
public static void addCounter(HashTree tree, List<ScenarioVariable> variables, boolean isInternal) {<NEW_LINE>if (CollectionUtils.isNotEmpty(variables)) {<NEW_LINE>List<ScenarioVariable> list = variables.stream().filter(ScenarioVariable::isCounterValid).collect(Collectors.toList());<NEW_LINE>if (CollectionUtils.isNotEmpty(list)) {<NEW_LINE>list.forEach(item -> {<NEW_LINE>CounterConfig counterConfig = new CounterConfig();<NEW_LINE>counterConfig.setEnabled(true);<NEW_LINE>counterConfig.setProperty(TestElement.TEST_CLASS, CounterConfig.class.getName());<NEW_LINE>counterConfig.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("CounterConfigGui"));<NEW_LINE>counterConfig.setName(item.getName());<NEW_LINE>if (isInternal) {<NEW_LINE>counterConfig.setStart((item.getStartNumber() + 1));<NEW_LINE>} else {<NEW_LINE>counterConfig.setStart(item.getStartNumber());<NEW_LINE>}<NEW_LINE>counterConfig.setEnd(item.getEndNumber());<NEW_LINE>counterConfig.setVarName(item.getName());<NEW_LINE>counterConfig.setIncrement(item.getIncrement());<NEW_LINE>counterConfig.setFormat(item.getValue());<NEW_LINE>counterConfig.setComment(StringUtils.isEmpty(item.getDescription()) ? <MASK><NEW_LINE>tree.add(counterConfig);<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"" : item.getDescription());
1,290,960
public void actionPerformed(ActionEvent evt) {<NEW_LINE>if (evt.getSource() instanceof JButton) {<NEW_LINE>if (evt.getActionCommand() == ADD) {<NEW_LINE>FilterMappingData fmd = new FilterMappingData(deployData.getName());<NEW_LINE>MappingEditor editor = new MappingEditor(fmd, deployData.getServletNames());<NEW_LINE>editor.showEditor();<NEW_LINE>if (editor.isOK()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else if (evt.getActionCommand() == EDIT) {<NEW_LINE>int index = table.getSelectedRow();<NEW_LINE>FilterMappingData fmd, fmd2;<NEW_LINE>fmd = table.getRow(index);<NEW_LINE>fmd2 = (FilterMappingData) (fmd.clone());<NEW_LINE>MappingEditor editor = new MappingEditor(fmd2, deployData.getServletNames());<NEW_LINE>editor.showEditor();<NEW_LINE>if (editor.isOK()) {<NEW_LINE>table.setRow(index, fmd2);<NEW_LINE>}<NEW_LINE>} else if (evt.getActionCommand() == REMOVE) {<NEW_LINE>int index = table.getSelectedRow();<NEW_LINE>table.removeRow(index);<NEW_LINE>table.clearSelection();<NEW_LINE>} else if (evt.getActionCommand() == UP) {<NEW_LINE>int index = table.getSelectedRow();<NEW_LINE>table.moveRowUp(index);<NEW_LINE>table.setRowSelectionInterval(index - 1, index - 1);<NEW_LINE>} else if (evt.getActionCommand() == DOWN) {<NEW_LINE>int index = table.getSelectedRow();<NEW_LINE>table.moveRowDown(index);<NEW_LINE>table.setRowSelectionInterval(index + 1, index + 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>edited = true;<NEW_LINE>deployData.setFilterMappings(table.getFilterMappings());<NEW_LINE>scrollP.revalidate();<NEW_LINE>parent.fireChangeEvent();<NEW_LINE>}
table.addRow(0, fmd);
1,201,102
final GetEC2RecommendationProjectedMetricsResult executeGetEC2RecommendationProjectedMetrics(GetEC2RecommendationProjectedMetricsRequest getEC2RecommendationProjectedMetricsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getEC2RecommendationProjectedMetricsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetEC2RecommendationProjectedMetricsRequest> request = null;<NEW_LINE>Response<GetEC2RecommendationProjectedMetricsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetEC2RecommendationProjectedMetricsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getEC2RecommendationProjectedMetricsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Compute Optimizer");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetEC2RecommendationProjectedMetrics");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetEC2RecommendationProjectedMetricsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetEC2RecommendationProjectedMetricsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
778,748
public Xml preVisit(Xml tree, P p) {<NEW_LINE>Xml x = super.preVisit(tree, p);<NEW_LINE>if (x != null) {<NEW_LINE>String prefix = x.getPrefix();<NEW_LINE>if (prefix.contains("\n")) {<NEW_LINE>int indentMultiple = (int) getCursor().getPathAsStream().filter(Xml.Tag.class::<MASK><NEW_LINE>if (getCursor().getValue() instanceof Xml.Attribute || getCursor().getValue() instanceof Xml.CharData || getCursor().getValue() instanceof Xml.Comment || getCursor().getValue() instanceof Xml.ProcessingInstruction) {<NEW_LINE>indentMultiple++;<NEW_LINE>}<NEW_LINE>StringBuilder shiftedPrefixBuilder = new StringBuilder(prefix.substring(0, prefix.lastIndexOf('\n') + 1));<NEW_LINE>for (int i = 0; i < indentMultiple; i++) {<NEW_LINE>if (style.getUseTabCharacter()) {<NEW_LINE>shiftedPrefixBuilder.append("\t");<NEW_LINE>} else {<NEW_LINE>for (int j = 0; j < (x instanceof Xml.Attribute ? style.getContinuationIndentSize() : style.getIndentSize()); j++) {<NEW_LINE>shiftedPrefixBuilder.append(" ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String shiftedPrefix = shiftedPrefixBuilder.toString();<NEW_LINE>if (!shiftedPrefix.equals(prefix)) {<NEW_LINE>return x.withPrefix(shiftedPrefix);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return x;<NEW_LINE>}
isInstance).count() - 1;
1,508,548
protected void extractRow() throws Exception {<NEW_LINE>Resource _graph = null;<NEW_LINE>Resource _subject = subject;<NEW_LINE>URI _predicate = predicate;<NEW_LINE>Value _object = object;<NEW_LINE>Object val = null;<NEW_LINE>try {<NEW_LINE>if (col_g != -1) {<NEW_LINE>val = v_rs.getObject(col_g);<NEW_LINE>_graph = (Resource) castValue(val);<NEW_LINE>}<NEW_LINE>} catch (ClassCastException ccex) {<NEW_LINE>throw new RepositoryException("Unexpected resource type encountered. Was expecting Resource: " + val, ccex);<NEW_LINE>}<NEW_LINE>if (_subject == null && col_s != -1)<NEW_LINE>try {<NEW_LINE>val = v_rs.getObject(col_s);<NEW_LINE>_subject = (Resource) castValue(val);<NEW_LINE>} catch (ClassCastException ccex) {<NEW_LINE>throw new RepositoryException("Unexpected resource type encountered. Was expecting Resource: " + val, ccex);<NEW_LINE>}<NEW_LINE>if (_predicate == null && col_p != -1)<NEW_LINE>try {<NEW_LINE>val = v_rs.getObject(col_p);<NEW_LINE>_predicate = (URI) castValue(val);<NEW_LINE>} catch (ClassCastException ccex) {<NEW_LINE>throw new RepositoryException("Unexpected resource type encountered. Was expecting URI: " + val, ccex);<NEW_LINE>}<NEW_LINE>if (_object == null && col_o != -1)<NEW_LINE>_object = castValue(v_rs.getObject(col_o));<NEW_LINE>v_row = new ContextStatementImpl(<MASK><NEW_LINE>}
_subject, _predicate, _object, _graph);
1,205,233
private void defineOriginalSymbol(BLangExpression lhsExpr, BVarSymbol varSymbol, SymbolEnv env, AnalyzerData data) {<NEW_LINE>BSymbol foundSym = symResolver.lookupSymbolInMainSpace(env, varSymbol.name);<NEW_LINE>// Terminate if we reach the env where the original symbol is available.<NEW_LINE>if (foundSym == varSymbol) {<NEW_LINE>data.prevEnvs.push(env);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Traverse back to all the fall-back-environments, and update the env with the new symbol.<NEW_LINE>// Here the existing fall-back env will be replaced by a new env.<NEW_LINE>// i.e: [new fall-back env] = [snapshot of old fall-back env] + [new symbol]<NEW_LINE>env = <MASK><NEW_LINE>symbolEnter.defineTypeNarrowedSymbol(lhsExpr.pos, env, varSymbol, varSymbol.type, varSymbol.origin == VIRTUAL);<NEW_LINE>SymbolEnv prevEnv = data.prevEnvs.pop();<NEW_LINE>defineOriginalSymbol(lhsExpr, varSymbol, prevEnv, data);<NEW_LINE>data.prevEnvs.push(env);<NEW_LINE>}
SymbolEnv.createTypeNarrowedEnv(lhsExpr, env);
1,813,322
public static void main(String[] args) throws Exception {<NEW_LINE>if (Kilim.trampoline(false, args))<NEW_LINE>return;<NEW_LINE>Demo demo = new Demo();<NEW_LINE>cycle(demo);<NEW_LINE>cycle((Fork) demo.body2);<NEW_LINE>Fork fork = demo.body3;<NEW_LINE>Field[] fields = fork.getClass().getDeclaredFields();<NEW_LINE>Object[] vals = new Object[fields.length];<NEW_LINE>for (int ii = 0; ii < fields.length; ii++) {<NEW_LINE>Field field = fields[ii];<NEW_LINE>field.setAccessible(true);<NEW_LINE>vals[ii] = field.get(fork);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>cycle(fork);<NEW_LINE>for (int ii = 0; ii < fields.length; ii++) {<NEW_LINE>Field field = fields[ii];<NEW_LINE>field.setAccessible(true);<NEW_LINE>field.set(fork, vals[ii]);<NEW_LINE>}<NEW_LINE>Task.fork(fork).joinb();<NEW_LINE>// openjdk can't handle typed object graphs during deserialization<NEW_LINE>System.out.println("\n\nthis instance fails due to an openjdk limitation (bug ?)");<NEW_LINE>cycle(demo.body3);<NEW_LINE>}
field.set(fork, null);
1,323,192
public void multiply(Vec b, double z, Vec c) {<NEW_LINE>if (this.cols() != b.length())<NEW_LINE>throw new ArithmeticException("Matrix dimensions do not agree, [" + rows() + "," + cols() + "] x [" + b.length() + ",1]");<NEW_LINE>if (this.rows() != c.length())<NEW_LINE>throw new ArithmeticException("Target vector dimension does not agree with matrix dimensions. Matrix has " + rows() + " rows but tagert has " + c.length());<NEW_LINE>if (b.isSparse()) {<NEW_LINE>for (int i = 0; i < rows(); i++) {<NEW_LINE>double dot = 0;<NEW_LINE>for (IndexValue iv : b) dot += this.get(i, iv.getIndex()) * iv.getValue();<NEW_LINE>c.<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i < rows(); i++) {<NEW_LINE>double dot = 0;<NEW_LINE>for (int j = 0; j < cols(); j++) dot += this.get(i, j) * b.get(j);<NEW_LINE>c.increment(i, dot * z);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
increment(i, dot * z);
1,043,969
private Trace populateTraceId(scala.Option context) {<NEW_LINE>scala.collection.Map traceContextMap = (scala.collection.Map) context.get();<NEW_LINE>Map map = JavaConversions.mapAsJavaMap(traceContextMap);<NEW_LINE>String transactionId = (<MASK><NEW_LINE>String spanId = (String) map.get("spanId");<NEW_LINE>String parentSpanId = (String) map.get("parentSpanId");<NEW_LINE>String flag = (String) map.get("flag");<NEW_LINE>String applicationName = (String) map.get("applicationName");<NEW_LINE>String serverTypeCode = (String) map.get("serverTypeCode");<NEW_LINE>String entityPath = (String) map.get("entityPath");<NEW_LINE>String endPoint = (String) map.get("endPoint");<NEW_LINE>TraceId traceId = traceContext.createTraceId(transactionId, NumberUtils.parseLong(parentSpanId, SpanId.NULL), NumberUtils.parseLong(spanId, SpanId.NULL), NumberUtils.parseShort(flag, (short) 0));<NEW_LINE>if (traceId != null) {<NEW_LINE>Trace trace = traceContext.continueAsyncTraceObject(traceId);<NEW_LINE>final SpanRecorder recorder = trace.getSpanRecorder();<NEW_LINE>recorder.recordServiceType(OpenwhiskConstants.OPENWHISK_INVOKER);<NEW_LINE>recorder.recordApi(descriptor);<NEW_LINE>recorder.recordAcceptorHost(endPoint);<NEW_LINE>recorder.recordRpcName(entityPath);<NEW_LINE>// Record parent application<NEW_LINE>recorder.recordParentApplication(applicationName, Short.valueOf(serverTypeCode));<NEW_LINE>return trace;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
String) map.get("transactionId");
1,034,891
public void onSkuDetailsResponse(BillingResult billingResult, List<SkuDetails> skuDetailsList) {<NEW_LINE>try {<NEW_LINE>int responseCode = billingResult.getResponseCode();<NEW_LINE>if (responseCode == BillingResponseCode.OK) {<NEW_LINE>JSONArray products = new JSONArray();<NEW_LINE>Log.d("IAP", "Got " + skuDetailsList.size() + " products");<NEW_LINE>for (SkuDetails skuDetails : skuDetailsList) {<NEW_LINE>JSONObject product = new JSONObject();<NEW_LINE>product.put("json", skuDetails.getOriginalJson());<NEW_LINE>product.put("productId", skuDetails.getSku());<NEW_LINE>product.put(<MASK><NEW_LINE>product.put("description", skuDetails.getDescription());<NEW_LINE>product.put("price", skuDetails.getPrice());<NEW_LINE>product.put("priceAmountMicros", skuDetails.getPriceAmountMicros());<NEW_LINE>product.put("priceCurrencyCode", skuDetails.getPriceCurrencyCode());<NEW_LINE>product.put("type", skuDetails.getType());<NEW_LINE>products.put(product);<NEW_LINE>}<NEW_LINE>callbackContext.success(products);<NEW_LINE>} else {<NEW_LINE>callbackContext.error(responseCode);<NEW_LINE>}<NEW_LINE>} catch (JSONException e) {<NEW_LINE>callbackContext.error(e.getMessage());<NEW_LINE>}<NEW_LINE>}
"title", skuDetails.getTitle());
1,810,621
public void createVirtualMachine(VMInstanceVO dbVm, StringBuffer syncLogMesg) throws IOException {<NEW_LINE>syncLogMesg.append("VM# DB: " + dbVm.getInstanceName() + "/" + <MASK><NEW_LINE>VirtualMachineModel vmModel = new VirtualMachineModel(dbVm, dbVm.getUuid());<NEW_LINE>vmModel.build(_manager.getModelController(), dbVm);<NEW_LINE>buildNicResources(vmModel, dbVm, syncLogMesg);<NEW_LINE>if (_rwMode) {<NEW_LINE>try {<NEW_LINE>vmModel.update(_manager.getModelController());<NEW_LINE>} catch (InternalErrorException ex) {<NEW_LINE>s_logger.warn("create virtual-machine", ex);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>_manager.getDatabase().getVirtualMachines().add(vmModel);<NEW_LINE>syncLogMesg.append("VM# VNC: " + dbVm.getUuid() + " created\n");<NEW_LINE>}<NEW_LINE>}
dbVm.getUuid() + "; VNC: none; action: create\n");
1,669,196
private void compareField(IBaseParameters theDiff, EncodeContextPath theSourceEncodePath, String theSourcePath, String theTargetPath, IBase theOldField, IBase theNewField, BaseRuntimeChildDefinition theChildDef) {<NEW_LINE>String elementName = theChildDef.getElementName();<NEW_LINE>boolean repeatable = theChildDef.getMax() != 1;<NEW_LINE>theSourceEncodePath.pushPath(elementName, false);<NEW_LINE>if (pathIsIgnored(theSourceEncodePath)) {<NEW_LINE>theSourceEncodePath.popPath();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<? extends IBase> sourceValues = theChildDef.getAccessor().getValues(theOldField);<NEW_LINE>List<? extends IBase> targetValues = theChildDef.getAccessor().getValues(theNewField);<NEW_LINE>int sourceIndex = 0;<NEW_LINE>int targetIndex = 0;<NEW_LINE>while (sourceIndex < sourceValues.size() && targetIndex < targetValues.size()) {<NEW_LINE>IBase sourceChildField = sourceValues.get(sourceIndex);<NEW_LINE>// not expected to happen, but just in case<NEW_LINE>Validate.notNull(sourceChildField);<NEW_LINE>BaseRuntimeElementDefinition<?> def = myContext.<MASK><NEW_LINE>IBase targetChildField = targetValues.get(targetIndex);<NEW_LINE>// not expected to happen, but just in case<NEW_LINE>Validate.notNull(targetChildField);<NEW_LINE>String sourcePath = theSourcePath + "." + elementName + (repeatable ? "[" + sourceIndex + "]" : "");<NEW_LINE>String targetPath = theSourcePath + "." + elementName + (repeatable ? "[" + targetIndex + "]" : "");<NEW_LINE>compare(theDiff, theSourceEncodePath, def, sourcePath, targetPath, sourceChildField, targetChildField);<NEW_LINE>sourceIndex++;<NEW_LINE>targetIndex++;<NEW_LINE>}<NEW_LINE>// Find newly inserted items<NEW_LINE>while (targetIndex < targetValues.size()) {<NEW_LINE>String path = theTargetPath + "." + elementName;<NEW_LINE>addInsertItems(theDiff, targetValues, targetIndex, path, theChildDef);<NEW_LINE>targetIndex++;<NEW_LINE>}<NEW_LINE>// Find deleted items<NEW_LINE>while (sourceIndex < sourceValues.size()) {<NEW_LINE>IBase operation = ParametersUtil.addParameterToParameters(myContext, theDiff, "operation");<NEW_LINE>ParametersUtil.addPartCode(myContext, operation, "type", "delete");<NEW_LINE>ParametersUtil.addPartString(myContext, operation, "path", theTargetPath + "." + elementName + (repeatable ? "[" + targetIndex + "]" : ""));<NEW_LINE>sourceIndex++;<NEW_LINE>targetIndex++;<NEW_LINE>}<NEW_LINE>theSourceEncodePath.popPath();<NEW_LINE>}
getElementDefinition(sourceChildField.getClass());
343,495
private Index createIndex(Table t, IndexColumn[] cols, boolean unique) {<NEW_LINE>int indexId = session.getDatabase().allocateObjectId();<NEW_LINE>IndexType indexType;<NEW_LINE>if (unique) {<NEW_LINE>// for unique constraints<NEW_LINE>indexType = IndexType.createUnique(t.isPersistIndexes(), false);<NEW_LINE>} else {<NEW_LINE>// constraints<NEW_LINE>indexType = IndexType.createNonUnique(t.isPersistIndexes());<NEW_LINE>}<NEW_LINE>indexType.setBelongsToConstraint(true);<NEW_LINE>String prefix = constraintName == null ? "CONSTRAINT" : constraintName;<NEW_LINE>String indexName = t.getSchema().getUniqueIndexName(session, t, prefix + "_INDEX_");<NEW_LINE>try {<NEW_LINE>Index index = t.addIndex(session, indexName, indexId, cols, unique ? cols.length : 0, indexType, true, null);<NEW_LINE>createdIndexes.add(index);<NEW_LINE>return index;<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
getSchema().freeUniqueName(indexName);
1,157,856
public boolean onKeyDown(int keyCode, KeyEvent event) {<NEW_LINE>switch(event.getKeyCode()) {<NEW_LINE>case KeyEvent.KEYCODE_VOLUME_DOWN:<NEW_LINE>case KeyEvent.KEYCODE_VOLUME_UP:<NEW_LINE>case KeyEvent.KEYCODE_VOLUME_MUTE:<NEW_LINE>if (JoH.quietratelimit("button-press", 5)) {<NEW_LINE>if (Pref.getBooleanDefaultFalse("buttons_silence_alert")) {<NEW_LINE>final ActiveBgAlert activeBgAlert = ActiveBgAlert.getOnly();<NEW_LINE>if (activeBgAlert != null) {<NEW_LINE>AlertPlayer.getPlayer().Snooze(xdrip.getAppContext(), -1);<NEW_LINE>JoH.static_toast_long(getString(R.string.snoozing_due_button_press));<NEW_LINE>UserError.Log.ueh(TAG, "Snoozing alert due to volume button press");<NEW_LINE>} else {<NEW_LINE>if (d)<NEW_LINE>UserError.<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (d)<NEW_LINE>UserError.Log.d(TAG, "No action as preference is disabled");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (d)<NEW_LINE>Log.d(TAG, "Keydown event: " + keyCode + " event: " + event.toString());<NEW_LINE>return super.onKeyDown(keyCode, event);<NEW_LINE>}
Log.d(TAG, "no active alert to snooze");
398,281
public static ExpandableComposite createExpandibleComposite(Composite parent, String label, int nColumns, boolean expanded) {<NEW_LINE>ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);<NEW_LINE>excomposite.setText(label);<NEW_LINE>excomposite.setExpanded(expanded);<NEW_LINE>excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));<NEW_LINE>excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));<NEW_LINE>excomposite.addExpansionListener(new IExpansionListener() {<NEW_LINE><NEW_LINE>public void expansionStateChanging(ExpansionEvent e) {<NEW_LINE>}<NEW_LINE><NEW_LINE>public void expansionStateChanged(ExpansionEvent e) {<NEW_LINE>ScrolledPageContent scrolledComposite = getParentScrolledComposite((<MASK><NEW_LINE>if (scrolledComposite != null) {<NEW_LINE>scrolledComposite.reflow(true);<NEW_LINE>scrolledComposite.layout(true, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>makeScrollableCompositeAware(excomposite);<NEW_LINE>return excomposite;<NEW_LINE>}
Control) e.getSource());
185,594
boolean visit(JsonCustomSchema schema) {<NEW_LINE>Map<String, Map<String, String>> tableNames = new HashMap<>();<NEW_LINE>List<JsonTable> tables = schema.tables;<NEW_LINE>for (JsonTable table : tables) {<NEW_LINE>Map<String, Object> map = ((JsonCustomTable) table).operand;<NEW_LINE>Map<String, String> operand = map.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().toString()));<NEW_LINE>tableNames.put(((JsonCustomTable) table).name, operand);<NEW_LINE>tableNames.put(schema.name + "." + ((JsonCustomTable) table).name, operand);<NEW_LINE>}<NEW_LINE>List<Map<String, String>> jdbcProps = new ArrayList<>();<NEW_LINE>this.metaType = MetadataMapping.matchFactoryClass(schema.factory);<NEW_LINE>if (metaType == MetadataMapping.JDBC) {<NEW_LINE>for (String part : names) {<NEW_LINE>if (!tableNames.containsKey(part)) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>jdbcProps.add(tableNames.get(part));<NEW_LINE>}<NEW_LINE>visit(jdbcProps);<NEW_LINE>}<NEW_LINE>return jdbcProps.size<MASK><NEW_LINE>}
() == names.size();
1,027,957
public void parse(String mappingStr) {<NEW_LINE>StringTokenizer tokenizer <MASK><NEW_LINE>while (tokenizer.hasMoreElements()) {<NEW_LINE>String mapping = tokenizer.nextToken();<NEW_LINE>String[] mappingGroups = mapping.split(",");<NEW_LINE>String mappedGroup = null;<NEW_LINE>int indexOfArrow = mapping.indexOf("->");<NEW_LINE>if (indexOfArrow > 0 && mappingGroups != null && (mappingGroups.length > 0)) {<NEW_LINE>String tmpGroup = mapping.substring(indexOfArrow + 2);<NEW_LINE>mappedGroup = tmpGroup.trim();<NEW_LINE>}<NEW_LINE>validate(mappedGroup, mappingGroups);<NEW_LINE>for (String grp : mappingGroups) {<NEW_LINE>int aIndex = grp.indexOf("->");<NEW_LINE>String theGroup = (aIndex > 0) ? grp.substring(0, aIndex).trim() : grp.trim();<NEW_LINE>List<String> mappedGroupList = groupMappingTable.get(theGroup);<NEW_LINE>if (mappedGroupList == null) {<NEW_LINE>mappedGroupList = new ArrayList<>();<NEW_LINE>}<NEW_LINE>mappedGroupList.add(mappedGroup);<NEW_LINE>groupMappingTable.put(theGroup, mappedGroupList);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= new StringTokenizer(mappingStr, ";");
1,398,861
private void loadWordList(final DefaultListModel data) {<NEW_LINE>try {<NEW_LINE>final <MASK><NEW_LINE>if (provider != null) {<NEW_LINE>final String userWords = provider.getUserWords(SpellChecker.getCurrentLocale());<NEW_LINE>if (userWords != null) {<NEW_LINE>final BufferedReader input = new BufferedReader(new StringReader(userWords));<NEW_LINE>final ArrayList<String> wordList = new ArrayList<String>();<NEW_LINE>String word = input.readLine();<NEW_LINE>while (word != null) {<NEW_LINE>if (word.length() > 1) {<NEW_LINE>wordList.add(word);<NEW_LINE>}<NEW_LINE>word = input.readLine();<NEW_LINE>}<NEW_LINE>// Liste alphabetical sorting with the user language<NEW_LINE>Collections.sort(wordList, Collator.getInstance());<NEW_LINE>for (final String str : wordList) {<NEW_LINE>data.addElement(str);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (final IOException ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>}
UserDictionaryProvider provider = SpellChecker.getUserDictionaryProvider();
1,304,528
protected void moveAbsoluteImmediate(Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) {<NEW_LINE>boundingBox.setMiddleX(position.getX());<NEW_LINE>boundingBox.setMiddleY(position.getY() + boundingBox.getSizeY() / 2);<NEW_LINE>boundingBox.setMiddleZ(position.getZ());<NEW_LINE>boolean touchingWater = false;<NEW_LINE>boolean collided = false;<NEW_LINE>for (BlockPositionIterator iter = session.getCollisionManager().collidableBlocksIterator(boundingBox); iter.hasNext(); iter.next()) {<NEW_LINE>int blockID = session.getGeyser().getWorldManager().getBlockAt(session, iter.getX(), iter.getY(), iter.getZ());<NEW_LINE>BlockCollision blockCollision = BlockUtils.getCollision(blockID);<NEW_LINE>if (blockCollision != null) {<NEW_LINE>if (blockCollision.checkIntersection(iter.getX(), iter.getY(), iter.getZ(), boundingBox)) {<NEW_LINE>// TODO Push bounding box out of collision to improve movement<NEW_LINE>collided = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int waterLevel = BlockStateValues.getWaterLevel(blockID);<NEW_LINE>if (BlockRegistries.WATERLOGGED.get().contains(blockID)) {<NEW_LINE>waterLevel = 0;<NEW_LINE>}<NEW_LINE>if (waterLevel >= 0) {<NEW_LINE>double waterMaxY = iter.getY() + 1 - (waterLevel + 1) / 9.0;<NEW_LINE>// Falling water is a full block<NEW_LINE>if (waterLevel >= 8) {<NEW_LINE>waterMaxY <MASK><NEW_LINE>}<NEW_LINE>if (position.getY() <= waterMaxY) {<NEW_LINE>touchingWater = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!inWater && touchingWater) {<NEW_LINE>sendSplashSound(session);<NEW_LINE>}<NEW_LINE>inWater = touchingWater;<NEW_LINE>if (!collided) {<NEW_LINE>super.moveAbsoluteImmediate(position, yaw, pitch, headYaw, isOnGround, teleported);<NEW_LINE>} else {<NEW_LINE>super.moveAbsoluteImmediate(this.position, yaw, pitch, headYaw, true, true);<NEW_LINE>}<NEW_LINE>}
= iter.getY() + 1;
1,511,891
private static TableMetadata commit(TableOperations ops, UpdateTableRequest request) {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>Tasks.foreach(ops).retry(COMMIT_NUM_RETRIES_DEFAULT).exponentialBackoff(COMMIT_MIN_RETRY_WAIT_MS_DEFAULT, COMMIT_MAX_RETRY_WAIT_MS_DEFAULT, COMMIT_TOTAL_RETRY_TIME_MS_DEFAULT, 2.0).onlyRetryOn(CommitFailedException.class).run(taskOps -> {<NEW_LINE>TableMetadata base = isRetry.get() ? taskOps.refresh() : taskOps.current();<NEW_LINE>isRetry.set(true);<NEW_LINE>// validate requirements<NEW_LINE>try {<NEW_LINE>request.requirements().forEach(requirement -> requirement.validate(base));<NEW_LINE>} catch (CommitFailedException e) {<NEW_LINE>// wrap and rethrow outside of tasks to avoid unnecessary retry<NEW_LINE>throw new ValidationFailureException(e);<NEW_LINE>}<NEW_LINE>// apply changes<NEW_LINE>TableMetadata.Builder metadataBuilder = TableMetadata.buildFrom(base);<NEW_LINE>request.updates().forEach(update -> update.applyTo(metadataBuilder));<NEW_LINE>TableMetadata updated = metadataBuilder.build();<NEW_LINE>if (updated.changes().isEmpty()) {<NEW_LINE>// do not commit if the metadata has not changed<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// commit<NEW_LINE>taskOps.commit(base, updated);<NEW_LINE>});<NEW_LINE>} catch (ValidationFailureException e) {<NEW_LINE>throw e.wrapped();<NEW_LINE>}<NEW_LINE>return ops.current();<NEW_LINE>}
AtomicBoolean isRetry = new AtomicBoolean(false);
1,595,915
protected BarChart<String, Number> createChart() {<NEW_LINE>final String[] years = { "2007", "2008", "2009" };<NEW_LINE>final CategoryAxis xAxis = new CategoryAxis();<NEW_LINE>final NumberAxis yAxis = new NumberAxis();<NEW_LINE>yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis, "$", null));<NEW_LINE>final BarChart<String, Number> bc = new BarChart<String, Number>(xAxis, yAxis);<NEW_LINE>// setup chart<NEW_LINE>bc.setTitle("Advanced Bar Chart");<NEW_LINE>xAxis.setLabel("Year");<NEW_LINE>xAxis.setCategories(FXCollections.<String>observableArrayList(Arrays.asList(years)));<NEW_LINE>yAxis.setLabel("Price");<NEW_LINE>// add starting data<NEW_LINE>XYChart.Series<String, Number> series1 = new XYChart.<MASK><NEW_LINE>series1.setName("Data Series 1");<NEW_LINE>XYChart.Series<String, Number> series2 = new XYChart.Series<String, Number>();<NEW_LINE>series2.setName("Data Series 2");<NEW_LINE>XYChart.Series<String, Number> series3 = new XYChart.Series<String, Number>();<NEW_LINE>series3.setName("Data Series 3");<NEW_LINE>// create sample data<NEW_LINE>series1.getData().add(new XYChart.Data<String, Number>(years[0], 567));<NEW_LINE>series1.getData().add(new XYChart.Data<String, Number>(years[1], 1292));<NEW_LINE>series1.getData().add(new XYChart.Data<String, Number>(years[2], 2180));<NEW_LINE>series2.getData().add(new XYChart.Data<String, Number>(years[0], 956));<NEW_LINE>series2.getData().add(new XYChart.Data<String, Number>(years[1], 1665));<NEW_LINE>series2.getData().add(new XYChart.Data<String, Number>(years[2], 2450));<NEW_LINE>series3.getData().add(new XYChart.Data<String, Number>(years[0], 800));<NEW_LINE>series3.getData().add(new XYChart.Data<String, Number>(years[1], 1000));<NEW_LINE>series3.getData().add(new XYChart.Data<String, Number>(years[2], 2800));<NEW_LINE>bc.getData().add(series1);<NEW_LINE>bc.getData().add(series2);<NEW_LINE>bc.getData().add(series3);<NEW_LINE>return bc;<NEW_LINE>}
Series<String, Number>();
470,392
public static <A, B> ImmutableList<B> transform(Collection<A> items, int maxThreadCount, final Function<A, B> funk) {<NEW_LINE>checkNotNull(funk);<NEW_LINE>checkNotNull(items);<NEW_LINE>int threadCount = max(1, min(items<MASK><NEW_LINE>ThreadFactory threadFactory = threadCount > 1 ? currentRequestThreadFactory() : null;<NEW_LINE>if (threadFactory == null) {<NEW_LINE>// Fall back to non-concurrent transform if we only want 1 thread, or if we can't get an App<NEW_LINE>// Engine thread factory (most likely caused by hitting this code from a command-line tool).<NEW_LINE>// Default Java system threads are not compatible with code that needs to interact with App<NEW_LINE>// Engine (such as Objectify), which we often have in funk when calling<NEW_LINE>// Concurrent.transform(). For more info see: http://stackoverflow.com/questions/15976406<NEW_LINE>return items.stream().map(funk).collect(toImmutableList());<NEW_LINE>}<NEW_LINE>ExecutorService executor = newFixedThreadPool(threadCount, threadFactory);<NEW_LINE>try {<NEW_LINE>List<Future<B>> futures = new ArrayList<>();<NEW_LINE>for (final A item : items) {<NEW_LINE>futures.add(executor.submit(() -> funk.apply(item)));<NEW_LINE>}<NEW_LINE>ImmutableList.Builder<B> results = new ImmutableList.Builder<>();<NEW_LINE>for (Future<B> future : futures) {<NEW_LINE>try {<NEW_LINE>results.add(Uninterruptibles.getUninterruptibly(future));<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>throw new UncheckedExecutionException(e.getCause());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return results.build();<NEW_LINE>} finally {<NEW_LINE>executor.shutdownNow();<NEW_LINE>}<NEW_LINE>}
.size(), maxThreadCount));
841,672
protected void publish(String topic, Object mqttMessage, Message<?> message) {<NEW_LINE>Assert.isInstanceOf(MqttMessage.class, mqttMessage, "The 'mqttMessage' must be an instance of 'MqttMessage'");<NEW_LINE>try {<NEW_LINE>IMqttDeliveryToken token = checkConnection().publish<MASK><NEW_LINE>ApplicationEventPublisher applicationEventPublisher = getApplicationEventPublisher();<NEW_LINE>if (!this.async) {<NEW_LINE>// NOSONAR (sync)<NEW_LINE>token.waitForCompletion(getCompletionTimeout());<NEW_LINE>} else if (this.asyncEvents && applicationEventPublisher != null) {<NEW_LINE>applicationEventPublisher.publishEvent(new MqttMessageSentEvent(this, message, topic, token.getMessageId(), getClientId(), getClientInstance()));<NEW_LINE>}<NEW_LINE>} catch (MqttException e) {<NEW_LINE>throw new MessageHandlingException(message, "Failed to publish to MQTT in the [" + this + ']', e);<NEW_LINE>}<NEW_LINE>}
(topic, (MqttMessage) mqttMessage);
1,716,796
private void produceInTrx() {<NEW_LINE>final Properties ctx = Env.getCtx();<NEW_LINE>final I_C_Order order = ordersRepo.getById(orderId);<NEW_LINE>final ImmutableMap<OrderLineId, I_C_OrderLine> existingOrderLines = Maps.uniqueIndex(ordersRepo.retrieveOrderLines(orderId, I_C_OrderLine.class), orderLineRecord -> OrderLineId.ofRepoId(orderLineRecord.getC_OrderLine_ID()));<NEW_LINE>for (final ProductsProposalRow row : rows) {<NEW_LINE>final I_C_OrderLine existingOrderLine = row.getExistingOrderLineId() != null ? existingOrderLines.get(row.getExistingOrderLineId()) : null;<NEW_LINE>if (existingOrderLine == null) {<NEW_LINE>if (row.isQtySet()) {<NEW_LINE>OrderFastInput.addOrderLine(ctx, order, orderLine -> updateOrderLine(order, orderLine, row));<NEW_LINE>} else {<NEW_LINE>// if qty is not set, don't create the row<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (row.isQtySet()) {<NEW_LINE><MASK><NEW_LINE>ordersRepo.save(existingOrderLine);<NEW_LINE>} else {<NEW_LINE>ordersRepo.delete(existingOrderLine);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
updateOrderLine(order, existingOrderLine, row);
23,704
private void updateState(List components) {<NEW_LINE>if ((components == null) || (components.size() < 1)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FormModel formModel = ((RADComponent) components.get(0)).getFormModel();<NEW_LINE>LayoutModel layoutModel = formModel.getLayoutModel();<NEW_LINE>FormDesigner formDesigner = FormEditor.getFormDesigner(formModel);<NEW_LINE>LayoutDesigner layoutDesigner = formDesigner.getLayoutDesigner();<NEW_LINE>Iterator iter = components.iterator();<NEW_LINE>boolean[] matchAlignment = new boolean[4];<NEW_LINE>boolean[] cannotChangeTo = new boolean[4];<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>RADComponent radC = (RADComponent) iter.next();<NEW_LINE><MASK><NEW_LINE>LayoutComponent comp = layoutModel.getLayoutComponent(id);<NEW_LINE>int[][] alignment = new int[][] { layoutDesigner.getAdjustableComponentAlignment(comp, LayoutConstants.HORIZONTAL), layoutDesigner.getAdjustableComponentAlignment(comp, LayoutConstants.VERTICAL) };<NEW_LINE>for (int i = 0; i < 4; i++) {<NEW_LINE>if ((alignment[i / 2][1] & (1 << i % 2)) == 0) {<NEW_LINE>// the alignment cannot be changed<NEW_LINE>cannotChangeTo[i] = true;<NEW_LINE>}<NEW_LINE>if (alignment[i / 2][0] != -1) {<NEW_LINE>matchAlignment[i] = matchAlignment[i] || (alignment[i / 2][0] == i % 2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < 4; i++) {<NEW_LINE>boolean match;<NEW_LINE>boolean miss;<NEW_LINE>match = matchAlignment[i];<NEW_LINE>miss = matchAlignment[2 * (i / 2) + 1 - i % 2];<NEW_LINE>items[i].setEnabled((match || miss) && (!cannotChangeTo[i]));<NEW_LINE>items[i].setSelected(!miss && match);<NEW_LINE>}<NEW_LINE>}
String id = radC.getId();
594,374
SelectedConfig select(InetSocketAddress localAddr, InetSocketAddress remoteAddr) {<NEW_LINE>Collection<FilterChain> filterChains = routingConfigs.keySet();<NEW_LINE>filterChains = filterOnDestinationPort(filterChains);<NEW_LINE>filterChains = filterOnIpAddress(filterChains, localAddr.getAddress(), true);<NEW_LINE>filterChains = filterOnServerNames(filterChains);<NEW_LINE>filterChains = filterOnTransportProtocol(filterChains);<NEW_LINE>filterChains = filterOnApplicationProtocols(filterChains);<NEW_LINE>filterChains = filterOnSourceType(filterChains, remoteAddr.getAddress(<MASK><NEW_LINE>filterChains = filterOnIpAddress(filterChains, remoteAddr.getAddress(), false);<NEW_LINE>filterChains = filterOnSourcePort(filterChains, remoteAddr.getPort());<NEW_LINE>if (filterChains.size() > 1) {<NEW_LINE>throw new IllegalStateException("Found more than one matching filter chains. This should " + "not be possible as ClientXdsClient validated the chains for uniqueness.");<NEW_LINE>}<NEW_LINE>if (filterChains.size() == 1) {<NEW_LINE>FilterChain selected = Iterables.getOnlyElement(filterChains);<NEW_LINE>return new SelectedConfig(routingConfigs.get(selected), selected.sslContextProviderSupplier());<NEW_LINE>}<NEW_LINE>if (defaultRoutingConfig.get() != null) {<NEW_LINE>return new SelectedConfig(defaultRoutingConfig, defaultSslContextProviderSupplier);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
), localAddr.getAddress());
1,778,421
final DescribeUserPoolResult executeDescribeUserPool(DescribeUserPoolRequest describeUserPoolRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeUserPoolRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeUserPoolRequest> request = null;<NEW_LINE>Response<DescribeUserPoolResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeUserPoolRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeUserPoolRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Cognito Identity Provider");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeUserPoolResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeUserPoolResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeUserPool");