idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
317,476
public static void requestFileDataResponse(byte[] data, MySQLResponseService service) {<NEW_LINE>byte packId = data[3];<NEW_LINE>RouteResultsetNode rrn = (RouteResultsetNode) service.getAttachment();<NEW_LINE>LoadData loadData = rrn.getLoadData();<NEW_LINE>List<String> loadDataData = loadData.getData();<NEW_LINE>service.setExecuting(false);<NEW_LINE>BufferedInputStream in = null;<NEW_LINE>try {<NEW_LINE>if (loadDataData != null && loadDataData.size() > 0) {<NEW_LINE>ByteArrayOutputStream bos = new ByteArrayOutputStream();<NEW_LINE>for (String loadDataDataLine : loadDataData) {<NEW_LINE>String s = loadDataDataLine + loadData.getLineTerminatedBy();<NEW_LINE>byte[] bytes = s.getBytes(CharsetUtil.getJavaCharset(loadData.getCharset()));<NEW_LINE>bos.write(bytes);<NEW_LINE>}<NEW_LINE>packId = writeToBackConnection(packId, new ByteArrayInputStream(bos<MASK><NEW_LINE>} else {<NEW_LINE>in = new BufferedInputStream(new FileInputStream(loadData.getFileName()));<NEW_LINE>packId = writeToBackConnection(packId, in, service);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>if (in != null) {<NEW_LINE>in.close();<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>// ignore error<NEW_LINE>}<NEW_LINE>// send empty packet<NEW_LINE>byte[] empty = new byte[] { 0, 0, 0, 3 };<NEW_LINE>empty[3] = ++packId;<NEW_LINE>service.write(empty, WriteFlags.QUERY_END);<NEW_LINE>}<NEW_LINE>}
.toByteArray()), service);
521,574
private List<ConsumerRecord<byte[], byte[]>> retrieveActionReportMessages() {<NEW_LINE>DoctorKConfig doctorKConfig = DoctorKMain.doctorK.getDoctorKConfig();<NEW_LINE>String zkUrl = doctorKConfig.getBrokerstatsZkurl();<NEW_LINE>String actionReportTopic = doctorKConfig.getActionReportTopic();<NEW_LINE>Properties properties = OperatorUtil.createKafkaConsumerProperties(zkUrl, OPERATOR_ACTIONS_CONSUMER_GROUP, doctorKConfig.getActionReportProducerSecurityProtocol(), doctorKConfig.getActionReportProducerSslConfigs());<NEW_LINE>KafkaConsumer<byte[], byte[]> consumer = new KafkaConsumer<>(properties);<NEW_LINE>TopicPartition operatorReportTopicPartition = new TopicPartition(actionReportTopic, 0);<NEW_LINE>List<TopicPartition> tps = new ArrayList<>();<NEW_LINE>tps.add(operatorReportTopicPartition);<NEW_LINE>consumer.assign(tps);<NEW_LINE>Map<TopicPartition, Long> beginOffsets = consumer.beginningOffsets(tps);<NEW_LINE>Map<TopicPartition, Long> endOffsets = consumer.endOffsets(tps);<NEW_LINE>for (TopicPartition tp : endOffsets.keySet()) {<NEW_LINE>long numMessages = endOffsets.get(tp) - beginOffsets.get(tp);<NEW_LINE>LOG.info("{} : offsets [{}, {}], num messages : {}", tp, beginOffsets.get(tp), endOffsets.get(tp), numMessages);<NEW_LINE>consumer.seek(tp, Math.max(beginOffsets.get(tp), endOffsets.get(tp) - NUM_MESSAGES));<NEW_LINE>}<NEW_LINE>ConsumerRecords<byte[], byte[]> records = consumer.poll(CONSUMER_POLL_TIMEOUT_MS);<NEW_LINE>List<ConsumerRecord<byte[], byte[]>> recordList = new ArrayList<>();<NEW_LINE>while (!records.isEmpty()) {<NEW_LINE>for (ConsumerRecord<byte[], byte[]> record : records) {<NEW_LINE>recordList.add(record);<NEW_LINE>}<NEW_LINE>records = consumer.poll(CONSUMER_POLL_TIMEOUT_MS);<NEW_LINE>}<NEW_LINE>LOG.info(<MASK><NEW_LINE>return recordList;<NEW_LINE>}
"Read {} messages", recordList.size());
1,138,268
private void scavengeCache() {<NEW_LINE>ArrayList<Socket> sockets2Close <MASK><NEW_LINE>synchronized (_this) {<NEW_LINE>for (int i = 0; i < socketList.size(); i++) {<NEW_LINE>KeepAliveInfo info = socketList.get(i);<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>if (now - info.getLastUsed() >= MAX_KEEP_ALIVE_INT) {<NEW_LINE>socketList.remove(i);<NEW_LINE>sockets2Close.add(info.getSocket());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < socketList.size(); i++) {<NEW_LINE>KeepAliveInfo info = socketList.get(i);<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>if (now - info.getLastUsed() >= MAX_KEEP_ALIVE_INT) {<NEW_LINE>socketList.remove(i);<NEW_LINE>try {<NEW_LINE>info.getSocket().close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= new ArrayList<Socket>();
135,429
private static Function<ConfiguredAirbyteStream, WriteConfig> toWriteConfig(final BlobStorageOperations storageOperations, final NamingConventionTransformer namingResolver, final JsonNode config) {<NEW_LINE>return stream -> {<NEW_LINE>Preconditions.checkNotNull(stream.getDestinationSyncMode(), "Undefined destination sync mode");<NEW_LINE>final AirbyteStream abStream = stream.getStream();<NEW_LINE>final String namespace = abStream.getNamespace();<NEW_LINE>final String streamName = abStream.getName();<NEW_LINE>final String bucketPath = config.get(BUCKET_PATH_FIELD).asText();<NEW_LINE>final String customOutputFormat = String.join("/", bucketPath, config.has(PATH_FORMAT_FIELD) && !config.get(PATH_FORMAT_FIELD).asText().isBlank() ? config.get(PATH_FORMAT_FIELD).<MASK><NEW_LINE>final String outputBucketPath = storageOperations.getBucketObjectPath(namespace, streamName, SYNC_DATETIME, customOutputFormat);<NEW_LINE>final DestinationSyncMode syncMode = stream.getDestinationSyncMode();<NEW_LINE>final WriteConfig writeConfig = new WriteConfig(namespace, streamName, outputBucketPath, syncMode);<NEW_LINE>LOGGER.info("Write config: {}", writeConfig);<NEW_LINE>return writeConfig;<NEW_LINE>};<NEW_LINE>}
asText() : S3DestinationConstants.DEFAULT_PATH_FORMAT);
997,683
public void init(ClassProperties properties) {<NEW_LINE>String <MASK><NEW_LINE>List<String> preloads = properties.get("platform.preload");<NEW_LINE>List<String> resources = properties.get("platform.preloadresource");<NEW_LINE>// Only apply this at load time since we don't want to copy the CUDA libraries here<NEW_LINE>if (!Loader.isLoadLibraries()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int i = 0;<NEW_LINE>if (platform.startsWith("windows")) {<NEW_LINE>preloads.add(i++, "zlibwapi");<NEW_LINE>}<NEW_LINE>String[] libs = { "cudart", "cublasLt", "cublas", "cudnn", "nvrtc", "cudnn_ops_infer", "cudnn_ops_train", "cudnn_adv_infer", "cudnn_adv_train", "cudnn_cnn_infer", "cudnn_cnn_train" };<NEW_LINE>for (String lib : libs) {<NEW_LINE>if (platform.startsWith("linux")) {<NEW_LINE>lib += lib.startsWith("cudnn") ? "@.8" : lib.equals("cudart") ? "@.11.0" : lib.equals("nvrtc") ? "@.11.2" : "@.11";<NEW_LINE>} else if (platform.startsWith("windows")) {<NEW_LINE>lib += lib.startsWith("cudnn") ? "64_8" : lib.equals("cudart") ? "64_110" : lib.equals("nvrtc") ? "64_112_0" : "64_11";<NEW_LINE>} else {<NEW_LINE>// no CUDA<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (!preloads.contains(lib)) {<NEW_LINE>preloads.add(i++, lib);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (i > 0) {<NEW_LINE>resources.add("/org/bytedeco/cuda/");<NEW_LINE>}<NEW_LINE>}
platform = properties.getProperty("platform");
1,156,390
private SingularField compareSingularPrimitive(@Nullable Object actual, @Nullable Object expected, @Nullable Object defaultValue, FieldDescriptor fieldDescriptor, String fieldName, FluentEqualityConfig config) {<NEW_LINE>Result.Builder result = Result.builder();<NEW_LINE>// Use the default if it's set and we're ignoring field absence, or if it's a Proto3 primitive<NEW_LINE>// for which default is indistinguishable from unset.<NEW_LINE>SubScopeId subScopeId = SubScopeId.of(fieldDescriptor);<NEW_LINE>boolean isNonRepeatedProto3 = !fieldDescriptor.isRepeated() && fieldDescriptor.getContainingOneof() == null && fieldDescriptor.getFile().getSyntax() == Syntax.PROTO3;<NEW_LINE>boolean ignoreFieldAbsence = isNonRepeatedProto3 || config.ignoreFieldAbsenceScope(<MASK><NEW_LINE>actual = orIfIgnoringFieldAbsence(actual, defaultValue, ignoreFieldAbsence);<NEW_LINE>expected = orIfIgnoringFieldAbsence(expected, defaultValue, ignoreFieldAbsence);<NEW_LINE>// If actual or expected is missing here, we know our result.<NEW_LINE>result.markRemovedIf(actual == null);<NEW_LINE>result.markAddedIf(expected == null);<NEW_LINE>if (actual != null && expected != null) {<NEW_LINE>if (actual instanceof Double) {<NEW_LINE>result.markModifiedIf(!doublesEqual((double) actual, (double) expected, config.doubleCorrespondenceMap().get(rootDescriptor, subScopeId)));<NEW_LINE>} else if (actual instanceof Float) {<NEW_LINE>result.markModifiedIf(!floatsEqual((float) actual, (float) expected, config.floatCorrespondenceMap().get(rootDescriptor, subScopeId)));<NEW_LINE>} else {<NEW_LINE>result.markModifiedIf(!Objects.equal(actual, expected));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>SingularField.Builder singularFieldBuilder = SingularField.newBuilder().setSubScopeId(SubScopeId.of(fieldDescriptor)).setFieldName(fieldName).setResult(result.build());<NEW_LINE>if (actual != null) {<NEW_LINE>singularFieldBuilder.setActual(actual);<NEW_LINE>}<NEW_LINE>if (expected != null) {<NEW_LINE>singularFieldBuilder.setExpected(expected);<NEW_LINE>}<NEW_LINE>return singularFieldBuilder.build();<NEW_LINE>}
).contains(rootDescriptor, subScopeId);
708,271
protected static void propagatePreviousLubs(final TargetConstraints targetRecord, Lubs solution, final Map<AnnotatedTypeMirror, AnnotationMirrorSet> subtypesOfTarget) {<NEW_LINE>for (final Map.Entry<TypeVariable, AnnotationMirrorSet> supertypeTarget : targetRecord.supertypes.targets.entrySet()) {<NEW_LINE>final AnnotatedTypeMirror supertargetLub = solution.<MASK><NEW_LINE>if (supertargetLub != null) {<NEW_LINE>AnnotationMirrorSet supertargetTypeAnnos = subtypesOfTarget.get(supertargetLub);<NEW_LINE>if (supertargetTypeAnnos != null) {<NEW_LINE>// there is already an equivalent type in the list of subtypes, just add<NEW_LINE>// any hierarchies that are not in its list but are in the supertarget's list<NEW_LINE>supertargetTypeAnnos.addAll(supertypeTarget.getValue());<NEW_LINE>} else {<NEW_LINE>subtypesOfTarget.put(supertargetLub, supertypeTarget.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getType(supertypeTarget.getKey());
1,080,972
private List<PromptErrorLog> listPromptErrorLog(EntityManagerContainer emc) throws Exception {<NEW_LINE>EntityManager em = emc.get(PromptErrorLog.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<PromptErrorLog> cq = cb.createQuery(PromptErrorLog.class);<NEW_LINE>Root<PromptErrorLog> root = cq.from(PromptErrorLog.class);<NEW_LINE>Calendar cal = Calendar.getInstance();<NEW_LINE>cal.add(Calendar.DAY_OF_MONTH, -1);<NEW_LINE>Predicate p = cb.greaterThan(root.get(JpaObject_.createTime), cal.getTime());<NEW_LINE>p = cb.and(p, cb.or(cb.notEqual(root.get(PromptErrorLog_.collected), true), cb.isNull(root.get(PromptErrorLog_.collected))));<NEW_LINE>cq.select(root).where(p).orderBy(cb.desc(root.get(JpaObject_.createTime)));<NEW_LINE>List<PromptErrorLog> list = em.createQuery(cq).setMaxResults(20).getResultList();<NEW_LINE>if (!list.isEmpty()) {<NEW_LINE><MASK><NEW_LINE>for (PromptErrorLog o : list) {<NEW_LINE>o.setCollected(true);<NEW_LINE>}<NEW_LINE>emc.commit();<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>}
emc.beginTransaction(PromptErrorLog.class);
607,320
public void reload() {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>File currentProjectPluginsDir;<NEW_LINE>File currentGlobalPluginsDir;<NEW_LINE>List<GrailsPlugin> currentLocalPlugins;<NEW_LINE>synchronized (this) {<NEW_LINE>File newProjectRoot = FileUtil.toFile(project.getProjectDirectory());<NEW_LINE>assert newProjectRoot != null;<NEW_LINE>if (!newProjectRoot.equals(projectRoot)) {<NEW_LINE>projectRoot = newProjectRoot;<NEW_LINE>}<NEW_LINE>buildSettingsInstance = loadBuildSettings();<NEW_LINE>LOGGER.log(Level.FINE, "Took {0} ms to load BuildSettings for {1}", new Object[] { (System.currentTimeMillis() - start), project.getProjectDirectory().getNameExt() });<NEW_LINE>currentLocalPlugins = loadLocalPlugins();<NEW_LINE>currentProjectPluginsDir = loadProjectPluginsDir();<NEW_LINE>currentGlobalPluginsDir = loadGlobalPluginsDir();<NEW_LINE>}<NEW_LINE>if (GrailsPlatform.Version.VERSION_1_1.compareTo(GrailsProjectConfig.forProject(project).getGrailsPlatform().getVersion()) <= 0) {<NEW_LINE>GrailsProjectConfig config = project.getLookup().lookup(GrailsProjectConfig.class);<NEW_LINE>if (config != null) {<NEW_LINE>ProjectConfigListener listener = new ProjectConfigListener();<NEW_LINE>config.addPropertyChangeListener(listener);<NEW_LINE>try {<NEW_LINE>config.setProjectPluginsDir<MASK><NEW_LINE>config.setGlobalPluginsDir(FileUtil.normalizeFile(currentGlobalPluginsDir));<NEW_LINE>Map<String, File> prepared = new HashMap<>();<NEW_LINE>for (GrailsPlugin plugin : currentLocalPlugins) {<NEW_LINE>prepared.put(plugin.getName(), plugin.getPath());<NEW_LINE>}<NEW_LINE>config.setLocalPlugins(prepared);<NEW_LINE>} finally {<NEW_LINE>config.removePropertyChangeListener(listener);<NEW_LINE>}<NEW_LINE>if (listener.isChanged()) {<NEW_LINE>propertySupport.firePropertyChange(BUILD_CONFIG_PLUGINS, null, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(FileUtil.normalizeFile(currentProjectPluginsDir));
434,349
protected void addCovariantMethods(ClassNode classNode) {<NEW_LINE>Map methodsToAdd = new HashMap();<NEW_LINE>Map genericsSpec = new HashMap();<NEW_LINE>// unimplemented abstract methods from interfaces<NEW_LINE>Map<String, MethodNode> abstractMethods = ClassNodeUtils.getDeclaredMethodsFromInterfaces(classNode);<NEW_LINE>Map<String, MethodNode> allInterfaceMethods = new HashMap<String, MethodNode>(abstractMethods);<NEW_LINE>ClassNodeUtils.addDeclaredMethodsFromAllInterfaces(classNode, allInterfaceMethods);<NEW_LINE>List<MethodNode> declaredMethods = new ArrayList<MethodNode>(classNode.getMethods());<NEW_LINE>// remove all static, private and package private methods<NEW_LINE>for (Iterator methodsIterator = declaredMethods.iterator(); methodsIterator.hasNext(); ) {<NEW_LINE>MethodNode m = (MethodNode) methodsIterator.next();<NEW_LINE>abstractMethods.remove(m.getTypeDescriptor());<NEW_LINE>if (m.isStatic() || !(m.isPublic() || m.isProtected())) {<NEW_LINE>methodsIterator.remove();<NEW_LINE>}<NEW_LINE>MethodNode intfMethod = allInterfaceMethods.get(m.getTypeDescriptor());<NEW_LINE>if (intfMethod != null && ((m.getModifiers() & ACC_SYNTHETIC) == 0) && !m.isPublic() && !m.isStaticConstructor()) {<NEW_LINE>throw new RuntimeParserException("The method " + m.getName() + " should be public as it implements the corresponding method from interface " + intfMethod.getDeclaringClass(), sourceOf(m));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>addCovariantMethods(classNode, declaredMethods, abstractMethods, methodsToAdd, genericsSpec);<NEW_LINE>Map<String, MethodNode> declaredMethodsMap = new HashMap<String, MethodNode>();<NEW_LINE>if (!methodsToAdd.isEmpty()) {<NEW_LINE>for (MethodNode mn : declaredMethods) {<NEW_LINE>declaredMethodsMap.put(mn.getTypeDescriptor(), mn);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Object o : methodsToAdd.entrySet()) {<NEW_LINE>Map.Entry entry = (Map.Entry) o;<NEW_LINE>MethodNode method = <MASK><NEW_LINE>// we skip bridge methods implemented in current class already<NEW_LINE>MethodNode mn = declaredMethodsMap.get(entry.getKey());<NEW_LINE>if (mn != null && mn.getDeclaringClass().equals(classNode))<NEW_LINE>continue;<NEW_LINE>addPropertyMethod(method);<NEW_LINE>}<NEW_LINE>}
(MethodNode) entry.getValue();
1,589,401
private void prepareThenExecuteTransactionWriteOperations(RequestDetails theRequestDetails, String theActionName, TransactionDetails theTransactionDetails, StopWatch theTransactionStopWatch, IBaseBundle theResponse, IdentityHashMap<IBase, Integer> theOriginalRequestOrder, List<IBase> theEntries) {<NEW_LINE>TransactionWriteOperationsDetails writeOperationsDetails = null;<NEW_LINE>if (haveWriteOperationsHooks(theRequestDetails)) {<NEW_LINE>writeOperationsDetails = buildWriteOperationsDetails(theEntries);<NEW_LINE>callWriteOperationsHook(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_PRE, theRequestDetails, theTransactionDetails, writeOperationsDetails);<NEW_LINE>}<NEW_LINE>TransactionCallback<EntriesToProcessMap> txCallback = status -> {<NEW_LINE>final Set<IIdType> allIds = new LinkedHashSet<>();<NEW_LINE>final IdSubstitutionMap idSubstitutions = new IdSubstitutionMap();<NEW_LINE>final Map<IIdType, DaoMethodOutcome> idToPersistedOutcome = new HashMap<>();<NEW_LINE>EntriesToProcessMap retVal = doTransactionWriteOperations(theRequestDetails, theActionName, theTransactionDetails, allIds, idSubstitutions, idToPersistedOutcome, theResponse, theOriginalRequestOrder, theEntries, theTransactionStopWatch);<NEW_LINE>theTransactionStopWatch.startTask("Commit writes to database");<NEW_LINE>return retVal;<NEW_LINE>};<NEW_LINE>EntriesToProcessMap entriesToProcess;<NEW_LINE>try {<NEW_LINE>entriesToProcess = myHapiTransactionService.execute(theRequestDetails, theTransactionDetails, txCallback);<NEW_LINE>} finally {<NEW_LINE>if (haveWriteOperationsHooks(theRequestDetails)) {<NEW_LINE>callWriteOperationsHook(Pointcut.STORAGE_TRANSACTION_WRITE_OPERATIONS_POST, theRequestDetails, theTransactionDetails, writeOperationsDetails);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>theTransactionStopWatch.endCurrentTask();<NEW_LINE>for (Map.Entry<IBase, IIdType> nextEntry : entriesToProcess.entrySet()) {<NEW_LINE>String responseLocation = nextEntry.getValue().toUnqualified().getValue();<NEW_LINE>String responseEtag = nextEntry.getValue().getVersionIdPart();<NEW_LINE>myVersionAdapter.setResponseLocation(nextEntry.getKey(), responseLocation);<NEW_LINE>myVersionAdapter.setResponseETag(<MASK><NEW_LINE>}<NEW_LINE>}
nextEntry.getKey(), responseEtag);
1,850,960
protected void addGuiElements() {<NEW_LINE>super.addGuiElements();<NEW_LINE>addRenderableWidget(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75)).warning(WarningType.NOT_ENOUGH_ENERGY, tile.getWarningCheck(RecipeError.NOT_ENOUGH_ENERGY)).warning(WarningType.NOT_ENOUGH_ENERGY_REDUCED_RATE, tile.getWarningCheck(RecipeError.NOT_ENOUGH_ENERGY_REDUCED_RATE));<NEW_LINE>addRenderableWidget(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));<NEW_LINE>addRenderableWidget(new GuiGasGauge(() -> tile.injectTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 7, 4)).warning(WarningType.NO_MATCHING_RECIPE, tile.getWarningCheck(RecipeError.NOT_ENOUGH_SECONDARY_INPUT));<NEW_LINE>addRenderableWidget(new GuiMergedChemicalTankGauge<>(() -> tile.outputTank, () -> tile, GaugeType.STANDARD, this, 131, 13)).warning(WarningType.NO_SPACE_IN_OUTPUT, tile<MASK><NEW_LINE>addRenderableWidget(new GuiProgress(tile::getScaledProgress, ProgressType.LARGE_RIGHT, this, 64, 40).jeiCategory(tile)).warning(WarningType.INPUT_DOESNT_PRODUCE_OUTPUT, tile.getWarningCheck(RecipeError.INPUT_DOESNT_PRODUCE_OUTPUT));<NEW_LINE>}
.getWarningCheck(RecipeError.NOT_ENOUGH_OUTPUT_SPACE));
1,535,644
public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE>String projectName = project.getProjectDirectory().getNameExt();<NEW_LINE>if (!preferences.isEnabled()) {<NEW_LINE>LOGGER.log(Level.FINE, "Property change event in package.json ignored, node.js not enabled in project {0}", projectName);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!preferences.isSyncEnabled()) {<NEW_LINE>LOGGER.log(Level.FINE, "Property change event in package.json ignored, node.js sync not enabled in project {0}", projectName);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>LOGGER.log(Level.FINE, "Processing property change event {0} in package.json in project {1}", new Object[] { propertyName, projectName });<NEW_LINE>if (PackageJson.PROP_NAME.equals(propertyName)) {<NEW_LINE>projectNameChanged(evt.getOldValue(), evt.getNewValue());<NEW_LINE>} else if (PackageJson.PROP_SCRIPTS_START.equals(propertyName)) {<NEW_LINE>startScriptChanged((String) evt.getNewValue());<NEW_LINE>}<NEW_LINE>}
String propertyName = evt.getPropertyName();
31,385
public final ServiceBodyContext serviceBody() throws RecognitionException {<NEW_LINE>ServiceBodyContext _localctx = new ServiceBodyContext(_ctx, getState());<NEW_LINE><MASK><NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(216);<NEW_LINE>match(LBRACE);<NEW_LINE>setState(222);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << SEMI) | (1L << OPTION) | (1L << RPC))) != 0)) {<NEW_LINE>{<NEW_LINE>setState(220);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>switch(_input.LA(1)) {<NEW_LINE>case OPTION:<NEW_LINE>{<NEW_LINE>setState(217);<NEW_LINE>optionDef();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case RPC:<NEW_LINE>{<NEW_LINE>setState(218);<NEW_LINE>rpc();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case SEMI:<NEW_LINE>{<NEW_LINE>setState(219);<NEW_LINE>emptyStatement();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new NoViableAltException(this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(224);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>setState(225);<NEW_LINE>match(RBRACE);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
enterRule(_localctx, 40, RULE_serviceBody);
554,797
public RefundInvoiceCandidate createOrDeleteAdditionalAssignments(@NonNull final RefundInvoiceCandidate refundInvoiceCandidate, @NonNull final RefundConfig oldRefundConfig, @NonNull final RefundConfig newRefundConfig) {<NEW_LINE>if (oldRefundConfig.equals(newRefundConfig)) {<NEW_LINE>return refundInvoiceCandidate;<NEW_LINE>}<NEW_LINE>final RefundContract refundContract = refundInvoiceCandidate.getRefundContract();<NEW_LINE>final List<RefundConfig> refundConfigs = refundContract.getRefundConfigs();<NEW_LINE>Check.errorUnless(RefundMode.APPLY_TO_ALL_QTIES.equals(newRefundConfig.getRefundMode()), "Parameter 'newRefundConfig' needs to have refundMode={}", RefundMode.APPLY_TO_ALL_QTIES);<NEW_LINE>Check.errorUnless(refundConfigs.contains(newRefundConfig), "Parameter 'newRefundConfig' needs to be one of the given refundInvoiceCandidate's contract's configs; newRefundConfig={}; refundInvoiceCandidate={}", newRefundConfig, refundInvoiceCandidate);<NEW_LINE>// add new AssignmentToRefundCandidates, or remove existing ones<NEW_LINE>// which reference newRefundConfig and track the additional money that comes with the new refund config.<NEW_LINE>final boolean isHigherRefund = newRefundConfig.getMinQty().compareTo(oldRefundConfig.getMinQty()) > 0;<NEW_LINE>final List<RefundConfig> refundConfigRange = getRefundConfigRange(refundContract, oldRefundConfig, newRefundConfig);<NEW_LINE>Check.assumeNotEmpty(refundConfigRange, "There needs to be at least one refundConfig in the range defined by oldRefundConfig={} and newRefundConfig={}; refundInvoiceCandidate={}", oldRefundConfig, newRefundConfig, refundInvoiceCandidate);<NEW_LINE>final RefundConfigChangeHandler handler = createForConfig(oldRefundConfig);<NEW_LINE>if (isHigherRefund) {<NEW_LINE>for (final RefundConfig currentRangeConfig : refundConfigRange) {<NEW_LINE>handler.changeCurrentRefundConfig(currentRangeConfig);<NEW_LINE>final RefundConfig formerRefundConfig = handler.getFormerRefundConfig();<NEW_LINE>final Stream<AssignmentToRefundCandidate> assignmentsToExtend = streamAssignmentsToExtend(refundInvoiceCandidate, formerRefundConfig, currentRangeConfig);<NEW_LINE>// note: the nice thing here is that we don't need to alter the existing candidate in any way!<NEW_LINE>// the new assignment only assigns *additional* stuff<NEW_LINE>assignmentsToExtend.// the new assignment only assigns *additional* stuff<NEW_LINE>map(handler::createNewAssignment<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>final DeleteAssignmentsRequestBuilder builder = DeleteAssignmentsRequest.builder().removeForRefundCandidateId(refundInvoiceCandidate.getId());<NEW_LINE>for (final RefundConfig currentRangeConfig : refundConfigRange) {<NEW_LINE>builder.refundConfigId(currentRangeConfig.getId());<NEW_LINE>}<NEW_LINE>assignmentToRefundCandidateRepository.deleteAssignments(builder.build());<NEW_LINE>}<NEW_LINE>final RefundInvoiceCandidate endResult = refundInvoiceCandidateService.updateMoneyFromAssignments(refundInvoiceCandidate);<NEW_LINE>return endResult;<NEW_LINE>}
).forEach(assignmentToRefundCandidateRepository::save);
54,392
protected String buildSolrFacetQuery(String fieldName, SearchFacetRange range, Boolean addExParam, String param) {<NEW_LINE>Assert.notNull(fieldName, "FieldName cannot be null");<NEW_LINE>Assert.notNull(range, "Range cannot be null");<NEW_LINE>if (StringUtils.isBlank(param)) {<NEW_LINE>param = "key";<NEW_LINE>}<NEW_LINE>String rangeStart = range<MASK><NEW_LINE>String rangeEnd = range.getMaxValue() != null ? range.getMaxValue().toPlainString() : "*";<NEW_LINE>String functions = getSolrRangeFunctionString(range.getMinValue(), range.getMaxValue());<NEW_LINE>if (BooleanUtils.isNotFalse(addExParam)) {<NEW_LINE>return String.format("{!ex=%s %s=%s[%s:%s] %s}", fieldName, param, fieldName, rangeStart, rangeEnd, functions);<NEW_LINE>}<NEW_LINE>return String.format("{%s=%s[%s:%s] %s}", param, fieldName, rangeStart, rangeEnd, functions);<NEW_LINE>}
.getMinValue().toPlainString();
325,970
protected Problem checkParameters(CompilationController javac) throws IOException {<NEW_LINE>Problem problem = null;<NEW_LINE>javac.toPhase(JavaSource.Phase.RESOLVED);<NEW_LINE>TreePath <MASK><NEW_LINE>if (constrPath == null || constrPath.getLeaf().getKind() != Tree.Kind.METHOD) {<NEW_LINE>return new Problem(true, ERR_ReplaceWrongType());<NEW_LINE>}<NEW_LINE>TypeElement type = (TypeElement) javac.getTrees().getElement(constrPath.getParentPath());<NEW_LINE>for (Setter setter : refactoring.getSetters()) {<NEW_LINE>if (setter.isOptional()) {<NEW_LINE>TypeMirror parsed = javac.getTreeUtilities().parseType(setter.getType(), type);<NEW_LINE>if (parsed != null && parsed.getKind() == TypeKind.TYPEVAR) {<NEW_LINE>problem = JavaPluginUtils.chainProblems(problem, new Problem(true, NbBundle.getMessage(ReplaceConstructorWithBuilderPlugin.class, "ERR_GenericOptional", setter.getVarName())));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return problem;<NEW_LINE>}
constrPath = treePathHandle.resolve(javac);
309,501
public AuthFlowConfiguration generateConfiguration(String callbackBaseUrl, String id) {<NEW_LINE>String callback = (Strings.isNullOrEmpty(callbackBaseUrl)) ? OUT_OF_BOUNDS_CALLBACK : callbackBaseUrl;<NEW_LINE>OAuthGetTemporaryToken tempTokenRequest = new OAuthGetTemporaryToken(config.getRequestTokenUrl());<NEW_LINE>tempTokenRequest.callback = callback;<NEW_LINE>tempTokenRequest.transport = httpTransport;<NEW_LINE>tempTokenRequest.consumerKey = clientId;<NEW_LINE>tempTokenRequest.signer = config.getRequestTokenSigner(clientSecret);<NEW_LINE>config.getAdditionalUrlParameters(dataType, mode, OAuth1Step.REQUEST_TOKEN).forEach(tempTokenRequest::set);<NEW_LINE>TokenSecretAuthData authData;<NEW_LINE>try {<NEW_LINE>// get request token<NEW_LINE>OAuthCredentialsResponse tempTokenResponse = tempTokenRequest.execute();<NEW_LINE>authData = new TokenSecretAuthData(tempTokenResponse.token, tempTokenResponse.tokenSecret);<NEW_LINE>} catch (IOException e) {<NEW_LINE>monitor.severe(() -> "Error retrieving request token", e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>OAuthAuthorizeTemporaryTokenUrl authorizeUrl = new OAuthAuthorizeTemporaryTokenUrl(config.getAuthorizationUrl());<NEW_LINE>authorizeUrl<MASK><NEW_LINE>config.getAdditionalUrlParameters(dataType, mode, OAuth1Step.AUTHORIZATION).forEach(authorizeUrl::set);<NEW_LINE>String url = authorizeUrl.build();<NEW_LINE>return new AuthFlowConfiguration(url, getTokenUrl(), AuthProtocol.OAUTH_1, authData);<NEW_LINE>}
.temporaryToken = authData.getToken();
497,049
private void serveSwaggerUiHtml(ServletRequestDetails theRequestDetails, HttpServletResponse theResponse) throws IOException {<NEW_LINE>CapabilityStatement cs = getCapabilityStatement(theRequestDetails);<NEW_LINE>String baseUrl = removeTrailingSlash(cs.getImplementation().getUrl());<NEW_LINE>theResponse.setStatus(200);<NEW_LINE>theResponse.setContentType(Constants.CT_HTML);<NEW_LINE>HttpServletRequest servletRequest = theRequestDetails.getServletRequest();<NEW_LINE>ServletContext servletContext = servletRequest.getServletContext();<NEW_LINE>WebContext context = new WebContext(servletRequest, theResponse, servletContext);<NEW_LINE>context.setVariable(REQUEST_DETAILS, theRequestDetails);<NEW_LINE>context.setVariable("DESCRIPTION", cs.getImplementation().getDescription());<NEW_LINE>context.setVariable("SERVER_NAME", cs.getSoftware().getName());<NEW_LINE>context.setVariable("SERVER_VERSION", cs.getSoftware().getVersion());<NEW_LINE>context.setVariable("BASE_URL", cs.getImplementation().getUrl());<NEW_LINE>context.setVariable("BANNER_IMAGE_URL", getBannerImage());<NEW_LINE>context.setVariable("OPENAPI_DOCS", baseUrl + "/api-docs");<NEW_LINE>context.setVariable("FHIR_VERSION", cs.getFhirVersion().toCode());<NEW_LINE>context.setVariable("FHIR_VERSION_CODENAME", FhirVersionEnum.forVersionString(cs.getFhirVersion().toCode()).name());<NEW_LINE>String copyright = cs.getCopyright();<NEW_LINE>if (isNotBlank(copyright)) {<NEW_LINE>copyright = myFlexmarkRenderer.render(myFlexmarkParser.parse(copyright));<NEW_LINE>context.setVariable("COPYRIGHT_HTML", copyright);<NEW_LINE>}<NEW_LINE>List<String> pageNames = new ArrayList<>();<NEW_LINE>Map<String, Integer> resourceToCount = new HashMap<>();<NEW_LINE>cs.getRestFirstRep().getResource().stream().forEach(t -> {<NEW_LINE><MASK><NEW_LINE>pageNames.add(type);<NEW_LINE>Extension countExtension = t.getExtensionByUrl(ExtensionConstants.CONF_RESOURCE_COUNT);<NEW_LINE>if (countExtension != null) {<NEW_LINE>IPrimitiveType<? extends Number> countExtensionValue = (IPrimitiveType<? extends Number>) countExtension.getValueAsPrimitive();<NEW_LINE>if (countExtensionValue != null && countExtensionValue.hasValue()) {<NEW_LINE>resourceToCount.put(type, countExtensionValue.getValue().intValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>pageNames.sort((o1, o2) -> {<NEW_LINE>Integer count1 = resourceToCount.get(o1);<NEW_LINE>Integer count2 = resourceToCount.get(o2);<NEW_LINE>if (count1 != null && count2 != null) {<NEW_LINE>return count2 - count1;<NEW_LINE>}<NEW_LINE>if (count1 != null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>if (count2 != null) {<NEW_LINE>return 1;<NEW_LINE>}<NEW_LINE>return o1.compareTo(o2);<NEW_LINE>});<NEW_LINE>pageNames.add(0, PAGE_ALL);<NEW_LINE>pageNames.add(1, PAGE_SYSTEM);<NEW_LINE>context.setVariable("PAGE_NAMES", pageNames);<NEW_LINE>context.setVariable("PAGE_NAME_TO_COUNT", resourceToCount);<NEW_LINE>String page = extractPageName(theRequestDetails, PAGE_SYSTEM);<NEW_LINE>context.setVariable("PAGE", page);<NEW_LINE>populateOIDCVariables(theRequestDetails, context);<NEW_LINE>String outcome = myTemplateEngine.process("index.html", context);<NEW_LINE>theResponse.getWriter().write(outcome);<NEW_LINE>theResponse.getWriter().close();<NEW_LINE>}
String type = t.getType();
1,692,933
public boolean render(@Nonnull ItemStack stack, int xPosition, int yPosition, int barOffset, boolean alwaysShow) {<NEW_LINE>IFluidHandler <MASK><NEW_LINE>if (cap == null || cap.getTankProperties() == null || cap.getTankProperties().length <= 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>IFluidTankProperties tank = cap.getTankProperties()[0];<NEW_LINE>if (tank == null || tank.getCapacity() <= 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int maxFluid = tank.getCapacity();<NEW_LINE>FluidStack fluidStack = tank.getContents();<NEW_LINE>int fluidAmount = fluidStack == null ? 0 : fluidStack.amount;<NEW_LINE>if (alwaysShow || shouldShowBar(maxFluid, fluidAmount)) {<NEW_LINE>double level = (double) fluidAmount / (double) maxFluid;<NEW_LINE>boolean up = stack.getItem().showDurabilityBar(stack);<NEW_LINE>boolean top = stack.getCount() != 1;<NEW_LINE>render(level, xPosition, yPosition, top ? 12 - barOffset : up ? 2 + barOffset : barOffset, (barOffset & 1) == 0);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
cap = FluidUtil.getFluidHandlerCapability(stack);
838,359
public Single<String> lookupUrl(String url) {<NEW_LINE>Pattern pattern = Pattern.compile(PATTERN_BY_ID);<NEW_LINE>Matcher matcher = pattern.matcher(url);<NEW_LINE>final String lookupUrl = matcher.find() ? ("https://itunes.apple.com/lookup?id=" + matcher.group(1)) : url;<NEW_LINE>return Single.create(emitter -> {<NEW_LINE>OkHttpClient client = AntennapodHttpClient.getHttpClient();<NEW_LINE>Request.Builder httpReq = new Request.Builder().url(lookupUrl);<NEW_LINE>try {<NEW_LINE>Response response = client.newCall(httpReq.build()).execute();<NEW_LINE>if (response.isSuccessful()) {<NEW_LINE>String resultString = response.body().string();<NEW_LINE><MASK><NEW_LINE>JSONObject results = result.getJSONArray("results").getJSONObject(0);<NEW_LINE>String feedUrlName = "feedUrl";<NEW_LINE>if (!results.has(feedUrlName)) {<NEW_LINE>String artistName = results.getString("artistName");<NEW_LINE>String trackName = results.getString("trackName");<NEW_LINE>emitter.onError(new FeedUrlNotFoundException(artistName, trackName));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String feedUrl = results.getString(feedUrlName);<NEW_LINE>emitter.onSuccess(feedUrl);<NEW_LINE>} else {<NEW_LINE>emitter.onError(new IOException(response.toString()));<NEW_LINE>}<NEW_LINE>} catch (IOException | JSONException e) {<NEW_LINE>emitter.onError(e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
JSONObject result = new JSONObject(resultString);
277,597
protected PropertySectionTextControl createDocumentationControl(Composite parent, String hint) {<NEW_LINE>// Label<NEW_LINE>Label label = createLabel(parent, Messages.AbstractECorePropertySection_2, ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.NONE);<NEW_LINE>// CSS<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>label.setData("org.eclipse.e4.ui.css.CssClassName", "PropertiesDocumentationLabel");<NEW_LINE>// Text<NEW_LINE>StyledTextControl styledTextControl = createStyledTextControl(parent, SWT.NONE);<NEW_LINE>styledTextControl.setMessage(hint);<NEW_LINE>// CSS<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>styledTextControl.getControl().setData("org.eclipse.e4.ui.css.CssClassName", "PropertiesDocumentationText");<NEW_LINE>PropertySectionTextControl textDoc = new PropertySectionTextControl(styledTextControl.getControl(), IArchimatePackage.Literals.DOCUMENTABLE__DOCUMENTATION) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void textChanged(String oldText, String newText) {<NEW_LINE>if (fObjects != null) {<NEW_LINE>CompoundCommand result <MASK><NEW_LINE>for (EObject eObject : fObjects) {<NEW_LINE>if (isAlive(eObject)) {<NEW_LINE>Command cmd = new EObjectFeatureCommand(Messages.AbstractECorePropertySection_3, eObject, IArchimatePackage.Literals.DOCUMENTABLE__DOCUMENTATION, newText);<NEW_LINE>if (cmd.canExecute()) {<NEW_LINE>result.add(cmd);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>executeCommand(result.unwrap());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>return textDoc;<NEW_LINE>}
= new CompoundCommand(Messages.AbstractECorePropertySection_3);
917,831
private // ------------------//<NEW_LINE>List<HeadInter> aggregateMatches(List<HeadInter> heads) {<NEW_LINE>// Sort by decreasing grade<NEW_LINE>Collections.<MASK><NEW_LINE>// Gather matches per close locations<NEW_LINE>// Avoid duplicate locations<NEW_LINE>final List<Aggregate> aggregates = new ArrayList<>();<NEW_LINE>for (HeadInter head : heads) {<NEW_LINE>final Point2D loc = head.getCenter2D();<NEW_LINE>// Check among already filtered locations for similar location<NEW_LINE>Aggregate aggregate = null;<NEW_LINE>for (Aggregate ag : aggregates) {<NEW_LINE>double dx = loc.getX() - ag.point.getX();<NEW_LINE>if (Math.abs(dx) <= params.maxTemplateDx) {<NEW_LINE>aggregate = ag;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (aggregate == null) {<NEW_LINE>aggregate = new Aggregate();<NEW_LINE>aggregates.add(aggregate);<NEW_LINE>}<NEW_LINE>aggregate.add(head);<NEW_LINE>}<NEW_LINE>List<HeadInter> filtered = new ArrayList<>();<NEW_LINE>for (Aggregate ag : aggregates) {<NEW_LINE>filtered.add(ag.getMainInter());<NEW_LINE>}<NEW_LINE>return filtered;<NEW_LINE>}
sort(heads, Inters.byReverseGrade);
556,921
private void createInvoiceFacts(final Fact fact, final DocLine_Allocation line, final AmountSourceAndAcct invoiceTotalAllocatedAmtSourceAndAcct) {<NEW_LINE>final BigDecimal allocationSource = invoiceTotalAllocatedAmtSourceAndAcct.getAmtSource();<NEW_LINE>if (allocationSource.signum() == 0) {<NEW_LINE>// nothing to book<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final AcctSchema as = fact.getAcctSchema();<NEW_LINE>if (!as.isAccrual()) {<NEW_LINE>throw newPostingException().setDetailMessage("Cash based accounting is not supported").appendParametersToMessage().setParameter("fact", fact).setParameter("line", line).setParameter("allocationSource", allocationSource);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Determine which currency conversion we shall use<NEW_LINE>final CurrencyConversionContext invoiceCurrencyConversionCtx;<NEW_LINE>if (line.getInvoiceC_Currency_ID() == as.getCurrencyId().getRepoId()) {<NEW_LINE>// use default context because the invoice is in accounting currency, so we shall have no currency gain/loss<NEW_LINE>invoiceCurrencyConversionCtx = null;<NEW_LINE>} else {<NEW_LINE>invoiceCurrencyConversionCtx = line.getInvoiceCurrencyConversionCtx();<NEW_LINE>}<NEW_LINE>final FactLineBuilder factLineBuilder = fact.createLine().setDocLine(line).setCurrencyId(getCurrencyId()).setCurrencyConversionCtx(invoiceCurrencyConversionCtx).orgId(line.getInvoiceOrgId()).bpartnerId(line.getInvoiceBPartnerId()).alsoAddZeroLine();<NEW_LINE>if (line.isSOTrxInvoice()) {<NEW_LINE>factLineBuilder.setAccount(getAccount(AccountType.C_Receivable, as));<NEW_LINE>// ARC<NEW_LINE>if (line.isCreditMemoInvoice()) {<NEW_LINE>factLineBuilder.setAmtSource(allocationSource, null);<NEW_LINE>} else // ARI<NEW_LINE>{<NEW_LINE>factLineBuilder.setAmtSource(null, allocationSource);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>factLineBuilder.setAccount(getAccount<MASK><NEW_LINE>// APC<NEW_LINE>if (line.isCreditMemoInvoice()) {<NEW_LINE>factLineBuilder.setAmtSource(null, allocationSource);<NEW_LINE>} else // API<NEW_LINE>{<NEW_LINE>factLineBuilder.setAmtSource(allocationSource, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final FactLine factLine = factLineBuilder.buildAndAdd();<NEW_LINE>final Money allocationSourceOnPaymentDate = Money.of(invoiceTotalAllocatedAmtSourceAndAcct.getAmtSource(), line.getCurrencyId());<NEW_LINE>createRealizedGainLossFactLine(line, fact, factLine, allocationSourceOnPaymentDate);<NEW_LINE>}
(AccountType.V_Liability, as));
739,382
protected void onNewIntent(Intent intent) {<NEW_LINE>super.onNewIntent(intent);<NEW_LINE>Log.d("PIA", "New intent called: " + intent.toString());<NEW_LINE>// Check for action first<NEW_LINE>if (ACTION_PACKAGE_INSTALLED.equals(intent.getAction())) {<NEW_LINE>sessionId = intent.getIntExtra(PackageInstaller.EXTRA_SESSION_ID, -1);<NEW_LINE>packageName = intent.getStringExtra(PackageInstaller.EXTRA_PACKAGE_NAME);<NEW_LINE>Intent confirmIntent = <MASK><NEW_LINE>try {<NEW_LINE>if (packageName == null || confirmIntent == null)<NEW_LINE>throw new Exception("Empty confirmation intent.");<NEW_LINE>Log.d("PIA", "Requesting user confirmation for package " + packageName);<NEW_LINE>confirmIntentLauncher.launch(confirmIntent);<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>PackageInstallerCompat.sendCompletedBroadcast(packageName, PackageInstallerCompat.STATUS_FAILURE_INCOMPATIBLE_ROM, sessionId);<NEW_LINE>if (!hasNext() && !isDealingWithApk) {<NEW_LINE>// No APKs left, this maybe a solo call<NEW_LINE>finish();<NEW_LINE>}<NEW_LINE>// else let the original activity decide what to do<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
intent.getParcelableExtra(Intent.EXTRA_INTENT);
846,950
public static List<FieldAssertionMatcher> strictComparePayload(String expectedResult, String actualResult) {<NEW_LINE>List<FieldAssertionMatcher> matchers = new ArrayList<>();<NEW_LINE>String actualResultJson = readPayload(actualResult);<NEW_LINE>String expectedResultJson = readPayload(expectedResult);<NEW_LINE>try {<NEW_LINE>assertEquals(expectedResultJson, actualResultJson, STRICT);<NEW_LINE>} catch (AssertionError scream) {<NEW_LINE><MASK><NEW_LINE>List<String> messageList = Arrays.asList(rawMsg.split(";"));<NEW_LINE>matchers = messageList.stream().map(msg -> {<NEW_LINE>List<String> strings = Arrays.asList(msg.trim().split("\n"));<NEW_LINE>String fieldJsonPath = "";<NEW_LINE>if (strings != null && strings.size() > 0) {<NEW_LINE>fieldJsonPath = strings.get(0).substring(strings.get(0).indexOf(": ") + 1).trim();<NEW_LINE>}<NEW_LINE>if (strings.size() == 1) {<NEW_LINE>return aNotMatchingMessage(fieldJsonPath, "", strings.get(0).trim());<NEW_LINE>} else if (strings.size() == 2) {<NEW_LINE>return aNotMatchingMessage(fieldJsonPath, "", strings.get(1).trim());<NEW_LINE>} else if (strings.size() > 2) {<NEW_LINE>return aNotMatchingMessage(fieldJsonPath, strings.get(1).trim(), strings.get(2).trim());<NEW_LINE>} else {<NEW_LINE>return aMatchingMessage();<NEW_LINE>}<NEW_LINE>}).collect(Collectors.toList());<NEW_LINE>}<NEW_LINE>return matchers;<NEW_LINE>}
String rawMsg = scream.getMessage();
99,345
public void postProcessTestInstance(Object testInstance, ExtensionContext context) throws Exception {<NEW_LINE>List<Method> init = new ArrayList<>();<NEW_LINE>List<Method> start = new ArrayList<>();<NEW_LINE>List<Method> stop = new ArrayList<>();<NEW_LINE>Class<?> testClass = testInstance.getClass();<NEW_LINE>Method[] methods = testClass.getDeclaredMethods();<NEW_LINE>for (Method method : methods) {<NEW_LINE>method.setAccessible(true);<NEW_LINE>if (method.isAnnotationPresent(Init.class)) {<NEW_LINE>init.add(validateInitMethod(method));<NEW_LINE>}<NEW_LINE>if (method.isAnnotationPresent(Start.class)) {<NEW_LINE>start.add(validateStartMethod(method));<NEW_LINE>}<NEW_LINE>if (method.isAnnotationPresent(Stop.class)) {<NEW_LINE>stop.add(validateStopMethod(method));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Field[<MASK><NEW_LINE>for (Field field : fields) {<NEW_LINE>if (field.getType().isAssignableFrom(FxRobot.class)) {<NEW_LINE>setField(testInstance, field, this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>applicationFixture = new AnnotationBasedApplicationFixture(testInstance, init, start, stop);<NEW_LINE>}
] fields = testClass.getDeclaredFields();
1,348,885
private I_PP_Cost_Collector createCollector(@NonNull final CostCollectorCreateRequest request) {<NEW_LINE>trxManager.assertThreadInheritedTrxExists();<NEW_LINE>final I_PP_Order ppOrder = request.getOrder();<NEW_LINE>final DocTypeId docTypeId = docTypeDAO.getDocTypeId(DocTypeQuery.builder().docBaseType(X_C_DocType.DOCBASETYPE_ManufacturingCostCollector).adClientId(ppOrder.getAD_Client_ID()).adOrgId(ppOrder.getAD_Org_ID()).build());<NEW_LINE>final I_PP_Cost_Collector cc = InterfaceWrapperHelper.newInstance(I_PP_Cost_Collector.class);<NEW_LINE>cc.setDocAction(X_PP_Cost_Collector.DOCACTION_Complete);<NEW_LINE>cc.setDocStatus(X_PP_Cost_Collector.DOCSTATUS_Drafted);<NEW_LINE>cc.setPosted(false);<NEW_LINE>cc.setProcessed(false);<NEW_LINE>cc.setProcessing(false);<NEW_LINE>cc.setIsActive(true);<NEW_LINE>updateCostCollectorFromOrder(cc, ppOrder);<NEW_LINE>cc.setC_DocType_ID(docTypeId.getRepoId());<NEW_LINE>cc.setC_DocTypeTarget_ID(docTypeId.getRepoId());<NEW_LINE>cc.setCostCollectorType(request.getCostCollectorType().getCode());<NEW_LINE>cc.setM_Locator_ID(LocatorId.toRepoId(request.getLocatorId()));<NEW_LINE>cc.setM_AttributeSetInstance_ID(request.<MASK><NEW_LINE>cc.setS_Resource_ID(ResourceId.toRepoId(request.getResourceId()));<NEW_LINE>cc.setMovementDate(TimeUtil.asTimestamp(request.getMovementDate()));<NEW_LINE>cc.setDateAcct(TimeUtil.asTimestamp(request.getMovementDate()));<NEW_LINE>cc.setM_Product_ID(ProductId.toRepoId(request.getProductId()));<NEW_LINE>setQuantities(cc, PPCostCollectorQuantities.builder().movementQty(request.getQty()).scrappedQty(request.getQtyScrap()).rejectedQty(request.getQtyReject()).build());<NEW_LINE>final PPOrderRoutingActivity orderActivity = request.getOrderActivity();<NEW_LINE>if (orderActivity != null) {<NEW_LINE>cc.setPP_Order_Node_ID(orderActivity.getId().getRepoId());<NEW_LINE>cc.setIsSubcontracting(orderActivity.isSubcontracting());<NEW_LINE>final WFDurationUnit durationUnit = orderActivity.getDurationUnit();<NEW_LINE>cc.setDurationUnit(durationUnit.getCode());<NEW_LINE>cc.setSetupTimeReal(durationUnit.toBigDecimal(request.getDurationSetup()));<NEW_LINE>cc.setDurationReal(durationUnit.toBigDecimal(request.getDuration()));<NEW_LINE>}<NEW_LINE>// If this is an material issue, we should use BOM Line's UOM<NEW_LINE>if (request.getPpOrderBOMLineId() != null) {<NEW_LINE>cc.setPP_Order_BOMLine_ID(request.getPpOrderBOMLineId().getRepoId());<NEW_LINE>}<NEW_LINE>if (request.getPickingCandidateId() > 0) {<NEW_LINE>cc.setM_Picking_Candidate_ID(request.getPickingCandidateId());<NEW_LINE>}<NEW_LINE>costCollectorDAO.save(cc);<NEW_LINE>//<NEW_LINE>// Process the Cost Collector<NEW_LINE>// expectedDocStatus<NEW_LINE>documentBL.// expectedDocStatus<NEW_LINE>processEx(// expectedDocStatus<NEW_LINE>cc, // expectedDocStatus<NEW_LINE>X_PP_Cost_Collector.DOCACTION_Complete, null);<NEW_LINE>return cc;<NEW_LINE>}
getAttributeSetInstanceId().getRepoId());
935,551
private // view's center and scale according to the cropping rectangle.<NEW_LINE>void centerBasedOnHighlightView(HighlightView hv) {<NEW_LINE>Rect drawRect = hv.drawRect;<NEW_LINE>float width = drawRect.width();<NEW_LINE>float height = drawRect.height();<NEW_LINE>float thisWidth = getWidth();<NEW_LINE>float thisHeight = getHeight();<NEW_LINE>float z1 = thisWidth / width * .6F;<NEW_LINE>float z2 = thisHeight / height * .6F;<NEW_LINE>float zoom = Math.min(z1, z2);<NEW_LINE>zoom = zoom * this.getScale();<NEW_LINE>zoom = Math.max(1F, zoom);<NEW_LINE>if ((Math.abs(zoom - getScale()) / zoom) > .1) {<NEW_LINE>float[] coordinates = new float[] { hv.cropRect.centerX(), hv.cropRect.centerY() };<NEW_LINE>getUnrotatedMatrix().mapPoints(coordinates);<NEW_LINE>zoomTo(zoom, coordinates[0]<MASK><NEW_LINE>}<NEW_LINE>ensureVisible(hv);<NEW_LINE>}
, coordinates[1], 300F);
1,300,000
private JPanel buildInfoPanel(PatternEvaluationStats stats) {<NEW_LINE>JPanel evalPanel = new JPanel(new GridLayout(2, 8));<NEW_LINE>evalPanel.add(new GLabel("Match Type"));<NEW_LINE>evalPanel.add(new GLabel(PatternMatchType.TRUE_POSITIVE.name()));<NEW_LINE>evalPanel.add(new GLabel(PatternMatchType.FP_WRONG_FLOW.name()));<NEW_LINE>evalPanel.add(new GLabel(PatternMatchType.FP_MISALIGNED.name()));<NEW_LINE>evalPanel.add(new GLabel(PatternMatchType.FP_DATA.name()));<NEW_LINE>evalPanel.add(new GLabel(PatternMatchType.POSSIBLE_START_CODE.name()));<NEW_LINE>evalPanel.add(new GLabel(PatternMatchType.POSSIBLE_START_UNDEFINED.name()));<NEW_LINE>evalPanel.add(new GLabel(PatternMatchType.CONTEXT_CONFLICT.name()));<NEW_LINE>evalPanel.add(new GLabel(PatternMatchType.PRE_PATTERN_HIT.name()));<NEW_LINE>evalPanel.add(new GLabel("Number"));<NEW_LINE>JTextField truePositivesField = new JTextField(8);<NEW_LINE>truePositivesField.setEditable(false);<NEW_LINE>truePositivesField.setText(Integer.toString(stats.getNumTruePositives()));<NEW_LINE>evalPanel.add(truePositivesField);<NEW_LINE>JTextField wrongFlowField = new JTextField(8);<NEW_LINE>wrongFlowField.setEditable(false);<NEW_LINE>wrongFlowField.setText(Integer.toString(stats.getNumWrongFlow()));<NEW_LINE>evalPanel.add(wrongFlowField);<NEW_LINE>JTextField misalignedField = new JTextField(8);<NEW_LINE>misalignedField.setEditable(false);<NEW_LINE>misalignedField.setText(Integer.toString<MASK><NEW_LINE>evalPanel.add(misalignedField);<NEW_LINE>JTextField dataField = new JTextField(8);<NEW_LINE>dataField.setEditable(false);<NEW_LINE>dataField.setText(Integer.toString(stats.getNumFPData()));<NEW_LINE>evalPanel.add(dataField);<NEW_LINE>JTextField blockStartField = new JTextField(8);<NEW_LINE>blockStartField.setEditable(false);<NEW_LINE>blockStartField.setText(Integer.toString(stats.getNumPossibleStartCode()));<NEW_LINE>evalPanel.add(blockStartField);<NEW_LINE>JTextField undefinedField = new JTextField(8);<NEW_LINE>undefinedField.setEditable(false);<NEW_LINE>undefinedField.setText(Integer.toString(stats.getNumUndefined()));<NEW_LINE>evalPanel.add(undefinedField);<NEW_LINE>JTextField regConflictField = new JTextField(8);<NEW_LINE>regConflictField.setEditable(false);<NEW_LINE>regConflictField.setText(Integer.toString(stats.getNumContextConflicts()));<NEW_LINE>evalPanel.add(regConflictField);<NEW_LINE>JTextField prePatternFPField = new JTextField(8);<NEW_LINE>prePatternFPField.setEditable(false);<NEW_LINE>prePatternFPField.setText(Integer.toString(stats.getNumPrePatternHit()));<NEW_LINE>evalPanel.add(prePatternFPField);<NEW_LINE>return evalPanel;<NEW_LINE>}
(stats.getNumFPMisaligned()));
1,368,088
public DescribeScriptResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeScriptResult describeScriptResult = new DescribeScriptResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return describeScriptResult;<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("Script", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeScriptResult.setScript(ScriptJsonUnmarshaller.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 describeScriptResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,293,330
public void subscribe(final FlowableEmitter<RealmResults<E>> emitter) {<NEW_LINE>// If the Realm has been closed, just create an empty Observable because we assume it is going to be disposed shortly.<NEW_LINE>if (!results.isValid())<NEW_LINE>return;<NEW_LINE>// Gets instance to make sure that the Realm is open for as long as the<NEW_LINE>// Observable is subscribed to it.<NEW_LINE>final Realm observableRealm = Realm.getInstance(realmConfig);<NEW_LINE>resultsRefs.<MASK><NEW_LINE>final RealmChangeListener<RealmResults<E>> listener = new RealmChangeListener<RealmResults<E>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onChange(RealmResults<E> results) {<NEW_LINE>if (!emitter.isCancelled()) {<NEW_LINE>emitter.onNext(returnFrozenObjects ? results.freeze() : results);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>results.addChangeListener(listener);<NEW_LINE>// Cleanup when stream is disposed<NEW_LINE>emitter.setDisposable(Disposables.fromRunnable(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>if (!observableRealm.isClosed()) {<NEW_LINE>results.removeChangeListener(listener);<NEW_LINE>observableRealm.close();<NEW_LINE>}<NEW_LINE>resultsRefs.get().releaseReference(results);<NEW_LINE>}<NEW_LINE>}));<NEW_LINE>// Emit current value immediately<NEW_LINE>emitter.onNext(returnFrozenObjects ? results.freeze() : results);<NEW_LINE>}
get().acquireReference(results);
1,771,650
public Map<String, String> tableOptions() {<NEW_LINE>Map<String, String> map = super.tableOptions();<NEW_LINE><MASK><NEW_LINE>map.put("default-database", database);<NEW_LINE>if (null != hiveVersion) {<NEW_LINE>map.put("hive-version", hiveVersion);<NEW_LINE>}<NEW_LINE>if (null != hadoopConfDir) {<NEW_LINE>map.put("hadoop-conf-dir", hadoopConfDir);<NEW_LINE>}<NEW_LINE>if (null != hiveConfDir) {<NEW_LINE>map.put("hive-conf-dir", hiveConfDir);<NEW_LINE>}<NEW_LINE>if (null != partitionFields) {<NEW_LINE>Map<String, String> properties = super.getProperties();<NEW_LINE>if (null == properties || !properties.containsKey(trigger)) {<NEW_LINE>map.put(trigger, "process-time");<NEW_LINE>}<NEW_LINE>if (null == properties || !properties.containsKey(timestampPattern)) {<NEW_LINE>map.put(timestampPattern, "yyyy-MM-dd");<NEW_LINE>}<NEW_LINE>if (null == properties || !properties.containsKey(delay)) {<NEW_LINE>map.put(delay, "10s");<NEW_LINE>}<NEW_LINE>if (null == properties || !properties.containsKey(policyKind)) {<NEW_LINE>map.put(policyKind, "metastore,success-file");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
map.put("connector", "hive");
53,418
private List<Object> createInsightDependencyChildren(RenderableDependency dependency, final Set<Object> visited, final Configuration configuration) {<NEW_LINE>Iterable<? extends RenderableDependency<MASK><NEW_LINE>return CollectionUtils.collect(children, (Transformer<Object, RenderableDependency>) childDependency -> {<NEW_LINE>boolean alreadyVisited = !visited.add(childDependency.getId());<NEW_LINE>boolean leaf = childDependency.getChildren().isEmpty();<NEW_LINE>boolean alreadyRendered = alreadyVisited && !leaf;<NEW_LINE>String childName = replaceArrow(childDependency.getName());<NEW_LINE>boolean hasConflict = !childName.equals(childDependency.getName());<NEW_LINE>String name = leaf ? configuration.getName() : childName;<NEW_LINE>LinkedHashMap<String, Object> map = new LinkedHashMap<>(6);<NEW_LINE>map.put("name", name);<NEW_LINE>map.put("resolvable", childDependency.getResolutionState());<NEW_LINE>map.put("hasConflict", hasConflict);<NEW_LINE>map.put("alreadyRendered", alreadyRendered);<NEW_LINE>map.put("isLeaf", leaf);<NEW_LINE>map.put("children", Collections.emptyList());<NEW_LINE>if (!alreadyRendered) {<NEW_LINE>map.put("children", createInsightDependencyChildren(childDependency, visited, configuration));<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>});<NEW_LINE>}
> children = dependency.getChildren();
1,374,519
protected DB2PlanConfig runTask() {<NEW_LINE>// No valid explain tables found, propose to create them in current authId<NEW_LINE>String msg = String.format(DB2Messages.dialog_explain_ask_to_create, object.getSessionUserSchema());<NEW_LINE>if (!UIUtils.confirmAction(DB2Messages.dialog_explain_no_tables, msg)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Ask the user in what tablespace to create the Explain tables and build a dialog with the list of usable tablespaces for the user to choose<NEW_LINE>DB2TablespaceChooser tsChooserDialog = null;<NEW_LINE>try {<NEW_LINE>final List<String> listTablespaces = DB2Utils.getListOfUsableTsForExplain(monitor, session);<NEW_LINE>// NO Usable Tablespace found: End of the game..<NEW_LINE>if (listTablespaces.isEmpty()) {<NEW_LINE>DBWorkbench.getPlatformUI().showError(DB2Messages.dialog_explain_no_tablespace_found_title, DB2Messages.dialog_explain_no_tablespace_found);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>tsChooserDialog = new DB2TablespaceChooser(UIUtils.getActiveWorkbenchShell(), listTablespaces);<NEW_LINE>} catch (SQLException e) {<NEW_LINE>log.error(e);<NEW_LINE>}<NEW_LINE>if (tsChooserDialog != null && tsChooserDialog.open() == IDialogConstants.OK_ID) {<NEW_LINE>object.<MASK><NEW_LINE>return object;<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
setTablespace(tsChooserDialog.getSelectedTablespace());
725,269
public GroupFilter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GroupFilter groupFilter = new GroupFilter();<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 null;<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("Name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>groupFilter.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Values", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>groupFilter.setValues(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).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 groupFilter;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,530,569
protected void doRefresh(LookupCachePurge cachePurge) throws Exception {<NEW_LINE>if (!pathChecker.fileIsInAllowedPath(Paths.get(config.path()))) {<NEW_LINE>LOG.error(ALLOWED_PATH_ERROR);<NEW_LINE>setError(new IllegalStateException(ALLOWED_PATH_ERROR));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final FileInfo.Change fileChanged = fileInfo.checkForChange();<NEW_LINE>if (!fileChanged.isChanged() && !getError().isPresent()) {<NEW_LINE>// Nothing to do, file did not change<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LOG.debug("CSV file {} has changed, updating data", config.path());<NEW_LINE><MASK><NEW_LINE>cachePurge.purgeAll();<NEW_LINE>fileInfo = fileChanged.fileInfo();<NEW_LINE>clearError();<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.error("Couldn't check data adapter <{}> CSV file {} for updates: {} {}", name(), config.path(), e.getClass().getCanonicalName(), e.getMessage());<NEW_LINE>setError(e);<NEW_LINE>}<NEW_LINE>}
lookupRef.set(parseCSVFile());
1,378,548
public CPointer<bAction> serialize(Serializer serializer) throws IOException {<NEW_LINE>return serializer.maybeMajor(this, id, bAction.class, () -> {<NEW_LINE>return bAction -> {<NEW_LINE>serializer.writeDataList(FCurve.class, bAction.getCurves(), curves.size(), (i, fCurve) -> {<NEW_LINE>DFCurve dfCurve = curves.get(i);<NEW_LINE>fCurve.setRna_path(serializer.writeString0(dfCurve.rnaPath));<NEW_LINE>fCurve.setArray_index(dfCurve.rnaArrayIndex);<NEW_LINE>fCurve.setTotvert(dfCurve.keyframes.size());<NEW_LINE>fCurve.setBezt(serializer.writeData(BezTriple.class, dfCurve.keyframes.size(), (j, fBezTriple) -> {<NEW_LINE>DKeyframe dKeyframe = dfCurve.keyframes.get(j);<NEW_LINE>fBezTriple.setIpo((byte) dKeyframe.interpolationType.ordinal());<NEW_LINE>CArrayFacade<Float> vec = fBezTriple.getVec().get(1);<NEW_LINE>vec.set(0, (float) dKeyframe.frame);<NEW_LINE>vec.<MASK><NEW_LINE>}));<NEW_LINE>});<NEW_LINE>};<NEW_LINE>});<NEW_LINE>}
set(1, dKeyframe.value);
975,163
public void refresh(final ShardingSphereMetaData schemaMetaData, final FederationDatabaseMetaData database, final Map<String, OptimizerPlannerContext> optimizerPlanners, final Collection<String> logicDataSourceNames, final AlterIndexStatement sqlStatement, final ConfigurationProperties props) throws SQLException {<NEW_LINE>Optional<IndexSegment> renameIndex = AlterIndexStatementHandler.getRenameIndexSegment(sqlStatement);<NEW_LINE>if (!sqlStatement.getIndex().isPresent() || !renameIndex.isPresent()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String indexName = sqlStatement.getIndex().get().getIdentifier().getValue();<NEW_LINE>Optional<String> logicTableName = findLogicTableName(schemaMetaData.getDefaultSchema(), indexName);<NEW_LINE>if (logicTableName.isPresent()) {<NEW_LINE>TableMetaData tableMetaData = schemaMetaData.getDefaultSchema().get(logicTableName.get());<NEW_LINE>Preconditions.checkNotNull(tableMetaData, "Can not get the table '%s' metadata!", logicTableName.get());<NEW_LINE>tableMetaData.<MASK><NEW_LINE>String renameIndexName = renameIndex.get().getIdentifier().getValue();<NEW_LINE>tableMetaData.getIndexes().put(renameIndexName, new IndexMetaData(renameIndexName));<NEW_LINE>SchemaAlteredEvent event = new SchemaAlteredEvent(schemaMetaData.getName());<NEW_LINE>event.getAlteredTables().add(tableMetaData);<NEW_LINE>ShardingSphereEventBus.getInstance().post(event);<NEW_LINE>}<NEW_LINE>}
getIndexes().remove(indexName);
1,008,548
final ListIdentityPoolUsageResult executeListIdentityPoolUsage(ListIdentityPoolUsageRequest listIdentityPoolUsageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listIdentityPoolUsageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListIdentityPoolUsageRequest> request = null;<NEW_LINE>Response<ListIdentityPoolUsageResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListIdentityPoolUsageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listIdentityPoolUsageRequest));<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 Sync");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIdentityPoolUsage");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListIdentityPoolUsageResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><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>}
false), new ListIdentityPoolUsageResultJsonUnmarshaller());
1,648,747
public synchronized boolean changeNodePriority(int streamID, int newPriority) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "changeNodePriority entry: streamID to change: " + streamID + " new Priority: " + newPriority);<NEW_LINE>}<NEW_LINE>Node <MASK><NEW_LINE>Node parentNode = nodeToChange.getParent();<NEW_LINE>if ((nodeToChange == null) || (parentNode == null)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "node to change: " + nodeToChange + " has parent node of: " + parentNode);<NEW_LINE>}<NEW_LINE>// change the priority, clear the write counts and sort the nodes at that level in the tree<NEW_LINE>nodeToChange.setPriority(newPriority);<NEW_LINE>parentNode.clearDependentsWriteCount();<NEW_LINE>parentNode.sortDependents();<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "changeNodePriority exit: node changed: " + nodeToChange.toStringDetails());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
nodeToChange = root.findNode(streamID);
159,272
public Ddl scan() {<NEW_LINE>Ddl.Builder builder = Ddl.builder();<NEW_LINE>listDatabaseOptions(builder);<NEW_LINE>listTables(builder);<NEW_LINE>listViews(builder);<NEW_LINE>listColumns(builder);<NEW_LINE>listColumnOptions(builder);<NEW_LINE>Map<String, NavigableMap<String, Index.Builder>> indexes = Maps.newHashMap();<NEW_LINE>listIndexes(indexes);<NEW_LINE>listIndexColumns(builder, indexes);<NEW_LINE>for (Map.Entry<String, NavigableMap<String, Index.Builder>> tableEntry : indexes.entrySet()) {<NEW_LINE>String tableName = tableEntry.getKey();<NEW_LINE>ImmutableList.Builder<String> tableIndexes = ImmutableList.builder();<NEW_LINE>for (Map.Entry<String, Index.Builder> entry : tableEntry.getValue().entrySet()) {<NEW_LINE>Index.Builder indexBuilder = entry.getValue();<NEW_LINE>tableIndexes.add(indexBuilder.build().prettyPrint());<NEW_LINE>}<NEW_LINE>builder.createTable(tableName).indexes(tableIndexes.build()).endTable();<NEW_LINE>}<NEW_LINE>Map<String, NavigableMap<String, ForeignKey.Builder>> foreignKeys = Maps.newHashMap();<NEW_LINE>listForeignKeys(foreignKeys);<NEW_LINE>for (Map.Entry<String, NavigableMap<String, ForeignKey.Builder>> tableEntry : foreignKeys.entrySet()) {<NEW_LINE>String tableName = tableEntry.getKey();<NEW_LINE>ImmutableList.Builder<String> tableForeignKeys = ImmutableList.builder();<NEW_LINE>for (Map.Entry<String, ForeignKey.Builder> entry : tableEntry.getValue().entrySet()) {<NEW_LINE>ForeignKey.Builder foreignKeyBuilder = entry.getValue();<NEW_LINE><MASK><NEW_LINE>// Add the table and referenced table to the referencedTables TreeMultiMap of the ddl<NEW_LINE>builder.addReferencedTable(fkBuilder.table(), fkBuilder.referencedTable());<NEW_LINE>tableForeignKeys.add(fkBuilder.prettyPrint());<NEW_LINE>}<NEW_LINE>builder.createTable(tableName).foreignKeys(tableForeignKeys.build()).endTable();<NEW_LINE>}<NEW_LINE>Map<String, NavigableMap<String, CheckConstraint>> checkConstraints = listCheckConstraints();<NEW_LINE>for (Map.Entry<String, NavigableMap<String, CheckConstraint>> tableEntry : checkConstraints.entrySet()) {<NEW_LINE>String tableName = tableEntry.getKey();<NEW_LINE>ImmutableList.Builder<String> constraints = ImmutableList.builder();<NEW_LINE>for (Map.Entry<String, CheckConstraint> entry : tableEntry.getValue().entrySet()) {<NEW_LINE>constraints.add(entry.getValue().prettyPrint());<NEW_LINE>}<NEW_LINE>builder.createTable(tableName).checkConstraints(constraints.build()).endTable();<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
ForeignKey fkBuilder = foreignKeyBuilder.build();
1,265,647
public static Object[] readJoinCostWeightsStream(InputStream weightStream) throws IOException, FileNotFoundException {<NEW_LINE>Vector<Float> v = new Vector<Float>(16, 16);<NEW_LINE>Vector<String> vf = new Vector<String>(16, 16);<NEW_LINE>String line = null;<NEW_LINE>String[] fields = null;<NEW_LINE>float sumOfWeights = 0;<NEW_LINE>while ((line = in.readLine()) != null) {<NEW_LINE>// System.out.println( line );<NEW_LINE>// Remove possible trailing comments<NEW_LINE>line = line.split("#", 2)[0];<NEW_LINE>// Remove leading and trailing blanks<NEW_LINE>line = line.trim();<NEW_LINE>if (line.equals(""))<NEW_LINE>// Empty line: don't parse<NEW_LINE>continue;<NEW_LINE>// Remove the line number and :<NEW_LINE>line = line.split(":", 2)[1].trim();<NEW_LINE>// System.out.print( "CLEANED: [" + line + "]" );<NEW_LINE>// Separate the weight value from the function name<NEW_LINE>fields = line.split("\\s", 2);<NEW_LINE>float aWeight = Float<MASK><NEW_LINE>sumOfWeights += aWeight;<NEW_LINE>// Push the weight<NEW_LINE>v.add(Float.valueOf(aWeight));<NEW_LINE>// Push the function<NEW_LINE>vf.add(fields[1]);<NEW_LINE>// System.out.println( "NBFEA=" + numberOfFeatures );<NEW_LINE>}<NEW_LINE>in.close();<NEW_LINE>// System.out.flush();<NEW_LINE>float[] fw = new float[v.size()];<NEW_LINE>for (int i = 0; i < fw.length; i++) {<NEW_LINE>Float aWeight = (Float) v.get(i);<NEW_LINE>fw[i] = aWeight.floatValue() / sumOfWeights;<NEW_LINE>}
.parseFloat(fields[0]);
270,505
public static void main1(String[] args) throws IOException {<NEW_LINE>Cmd cmd = MainUtils.parseArguments(args, ALL_FLAGS);<NEW_LINE>if (cmd.args.length < 3) {<NEW_LINE>System.out.println("A utility to tweak MPEG TS timestamps.");<NEW_LINE>MainUtils.printHelp(ALL_FLAGS, Arrays.asList("command", "arg", "in name", "?out file"));<NEW_LINE>System.out.println("Where command is:\n" + "\t" + COMMAND_SHIFT + "\tShift timestamps of selected stream by arg." + "\n" + "\t" + COMMAND_SCALE + "\tScale timestams of selected stream by arg [num:den]." + "\n" + "\t" + COMMAND_ROUND + "\tRound timestamps of selected stream to multiples of arg.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>File src = new File(cmd.getArg(2));<NEW_LINE>if (cmd.argsLength() > 3) {<NEW_LINE>File dst = new File(cmd.getArg(3));<NEW_LINE><MASK><NEW_LINE>src = dst;<NEW_LINE>}<NEW_LINE>String command = cmd.getArg(0);<NEW_LINE>String stream = cmd.getStringFlagD(FLAG_STREAM, STREAM_ALL);<NEW_LINE>if (COMMAND_SHIFT.equalsIgnoreCase(command)) {<NEW_LINE>final long shift = Long.parseLong(cmd.getArg(1));<NEW_LINE>new BaseCommand(stream) {<NEW_LINE><NEW_LINE>protected long withTimestamp(long pts, boolean isPts) {<NEW_LINE>return Math.max(pts + shift, 0);<NEW_LINE>}<NEW_LINE>}.fix(src);<NEW_LINE>} else if (COMMAND_SCALE.equalsIgnoreCase(command)) {<NEW_LINE>final RationalLarge scale = RationalLarge.parse(cmd.getArg(1));<NEW_LINE>new BaseCommand(stream) {<NEW_LINE><NEW_LINE>protected long withTimestamp(long pts, boolean isPts) {<NEW_LINE>return scale.multiplyS(pts);<NEW_LINE>}<NEW_LINE>}.fix(src);<NEW_LINE>} else if (COMMAND_ROUND.equalsIgnoreCase(command)) {<NEW_LINE>final int precision = Integer.parseInt(cmd.getArg(1));<NEW_LINE>new BaseCommand(stream) {<NEW_LINE><NEW_LINE>protected long withTimestamp(long pts, boolean isPts) {<NEW_LINE>return Math.round((double) pts / precision) * precision;<NEW_LINE>}<NEW_LINE>}.fix(src);<NEW_LINE>}<NEW_LINE>}
IOUtils.copyFile(src, dst);
1,246,287
public javax.xml.transform.Source resolve(String publicId, String systemId) throws javax.xml.transform.TransformerException {<NEW_LINE>// throws SAXException, IOException {<NEW_LINE>javax.xml.transform.Source result = null;<NEW_LINE>// try to use full featured entiry resolvers<NEW_LINE>CatalogSettings mounted = CatalogSettings.getDefault();<NEW_LINE>if (publicId != null) {<NEW_LINE>Iterator it = mounted.getCatalogs(new Class[] { CatalogReader.class });<NEW_LINE>while (it.hasNext()) {<NEW_LINE>CatalogReader next = (CatalogReader) it.next();<NEW_LINE>try {<NEW_LINE>String sid = null;<NEW_LINE>if (publicId.startsWith("urn:publicid:")) {<NEW_LINE>// NOI18N<NEW_LINE>// resolving publicId from catalog<NEW_LINE>String urn = publicId.substring(13);<NEW_LINE>sid = next.resolvePublic(URNtoPublic(urn));<NEW_LINE>} else<NEW_LINE><MASK><NEW_LINE>if (sid != null) {<NEW_LINE>javax.xml.transform.Source source = new javax.xml.transform.sax.SAXSource();<NEW_LINE>source.setSystemId(sid);<NEW_LINE>result = source;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>} catch (java.lang.Error error) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// return result (null is allowed)<NEW_LINE>// if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("CatalogEntityResolver:PublicID: " + publicId + ", " + systemId + " => " + (result == null ? "null" : result.getSystemId())); // NOI18N<NEW_LINE>return result;<NEW_LINE>}
sid = next.resolveURI(publicId);
387,606
public void complete(SipURILookup request, boolean isOnCurrentThread) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, "complete", "Success response received.");<NEW_LINE>}<NEW_LINE>if (_stackListener != null) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, "complete", "Dispatching stack success response");<NEW_LINE>}<NEW_LINE>// clone the response so we can remove elements from it without<NEW_LINE>// affecting the instance that is cached in the library<NEW_LINE>List<SIPUri> response = (List) request.getAnswer().clone();<NEW_LINE>if (_fixTransports) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, "complete", "fixing result set transport");<NEW_LINE>}<NEW_LINE>for (SIPUri sipUri : response) {<NEW_LINE>// correct results<NEW_LINE>sipUri.setScheme(SipUtil.SIP_SCHEME);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>_stackListener.handleResolve(response);<NEW_LINE>} else {<NEW_LINE>// stack listener doesn't need to convert result, no need to go through<NEW_LINE>// the whole cycle like in Sync/ASync scenario<NEW_LINE>_results = convertResults(request.getAnswer());<NEW_LINE>notifyWaitingThreads();<NEW_LINE>if (_listener != null) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, "complete", "Dispatching success response");<NEW_LINE>}<NEW_LINE>EventsDispatcher.uriLookupComplete(_listener, _sipSession, _sipUri, _results, isOnCurrentThread);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
sipUri.setTransport(SipUtil.TLS_TRANSPORT);
161,930
public void processIntegerTypeProperty(CodegenModel model, CodegenProperty property, String description, KtormSchema ktormSchema) {<NEW_LINE>Map<String, Object> columnDefinition = new HashMap<String, Object>();<NEW_LINE>String baseName = property.getBaseName();<NEW_LINE>String colName = toColumnName(baseName);<NEW_LINE>String dataType = property.getDataType();<NEW_LINE>String dataFormat = property.getDataFormat();<NEW_LINE>String actualType = toColumnType(dataType, dataFormat);<NEW_LINE>String minimum = property.getMinimum();<NEW_LINE>String maximum = property.getMaximum();<NEW_LINE><MASK><NEW_LINE>boolean exclusiveMaximum = property.getIExclusiveMaximum();<NEW_LINE>boolean unsigned = false;<NEW_LINE>Boolean isUuid = property.isUuid;<NEW_LINE>Long cmin = (minimum != null) ? Long.parseLong(minimum) : null;<NEW_LINE>Long cmax = (maximum != null) ? Long.parseLong(maximum) : null;<NEW_LINE>if (exclusiveMinimum && cmin != null)<NEW_LINE>cmin += 1;<NEW_LINE>if (exclusiveMaximum && cmax != null)<NEW_LINE>cmax -= 1;<NEW_LINE>if (cmin != null && cmin >= 0) {<NEW_LINE>unsigned = true;<NEW_LINE>}<NEW_LINE>long min = (cmin != null) ? cmin : Long.MIN_VALUE;<NEW_LINE>long max = (cmax != null) ? cmax : Long.MAX_VALUE;<NEW_LINE>// sometimes min and max values can be mixed up<NEW_LINE>long actualMin = Math.min(min, max);<NEW_LINE>// sometimes only minimum specified and it can be pretty high<NEW_LINE>long actualMax = Math.max(min, max);<NEW_LINE>ktormSchema.put("columnDefinition", columnDefinition);<NEW_LINE>columnDefinition.put("colName", colName);<NEW_LINE>columnDefinition.put("colType", actualType);<NEW_LINE>columnDefinition.put("colKotlinType", dataType);<NEW_LINE>columnDefinition.put("colUnsigned", unsigned);<NEW_LINE>columnDefinition.put("colMinimum", actualMin);<NEW_LINE>columnDefinition.put("colMaximum", actualMax);<NEW_LINE>columnDefinition.put("colIsUuid", isUuid);<NEW_LINE>processTypeArgs(dataType, dataFormat, actualMin, actualMax, columnDefinition);<NEW_LINE>processNullAndDefault(model, property, description, columnDefinition);<NEW_LINE>}
boolean exclusiveMinimum = property.getExclusiveMinimum();
1,599,502
public static DescribeDnsProductInstanceResponse unmarshall(DescribeDnsProductInstanceResponse describeDnsProductInstanceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDnsProductInstanceResponse.setRequestId(_ctx.stringValue("DescribeDnsProductInstanceResponse.RequestId"));<NEW_LINE>describeDnsProductInstanceResponse.setInstanceId(_ctx.stringValue("DescribeDnsProductInstanceResponse.InstanceId"));<NEW_LINE>describeDnsProductInstanceResponse.setVersionCode(_ctx.stringValue("DescribeDnsProductInstanceResponse.VersionCode"));<NEW_LINE>describeDnsProductInstanceResponse.setVersionName(_ctx.stringValue("DescribeDnsProductInstanceResponse.VersionName"));<NEW_LINE>describeDnsProductInstanceResponse.setStartTime(_ctx.stringValue("DescribeDnsProductInstanceResponse.StartTime"));<NEW_LINE>describeDnsProductInstanceResponse.setStartTimestamp(_ctx.longValue("DescribeDnsProductInstanceResponse.StartTimestamp"));<NEW_LINE>describeDnsProductInstanceResponse.setEndTime(_ctx.stringValue("DescribeDnsProductInstanceResponse.EndTime"));<NEW_LINE>describeDnsProductInstanceResponse.setEndTimestamp(_ctx.longValue("DescribeDnsProductInstanceResponse.EndTimestamp"));<NEW_LINE>describeDnsProductInstanceResponse.setDomain(_ctx.stringValue("DescribeDnsProductInstanceResponse.Domain"));<NEW_LINE>describeDnsProductInstanceResponse.setBindCount(_ctx.longValue("DescribeDnsProductInstanceResponse.BindCount"));<NEW_LINE>describeDnsProductInstanceResponse.setBindUsedCount(_ctx.longValue("DescribeDnsProductInstanceResponse.BindUsedCount"));<NEW_LINE>describeDnsProductInstanceResponse.setTTLMinValue(_ctx.longValue("DescribeDnsProductInstanceResponse.TTLMinValue"));<NEW_LINE>describeDnsProductInstanceResponse.setSubDomainLevel(_ctx.longValue("DescribeDnsProductInstanceResponse.SubDomainLevel"));<NEW_LINE>describeDnsProductInstanceResponse.setDnsSLBCount(_ctx.longValue("DescribeDnsProductInstanceResponse.DnsSLBCount"));<NEW_LINE>describeDnsProductInstanceResponse.setURLForwardCount(_ctx.longValue("DescribeDnsProductInstanceResponse.URLForwardCount"));<NEW_LINE>describeDnsProductInstanceResponse.setDDosDefendFlow(_ctx.longValue("DescribeDnsProductInstanceResponse.DDosDefendFlow"));<NEW_LINE>describeDnsProductInstanceResponse.setDDosDefendQuery<MASK><NEW_LINE>describeDnsProductInstanceResponse.setOverseaDDosDefendFlow(_ctx.longValue("DescribeDnsProductInstanceResponse.OverseaDDosDefendFlow"));<NEW_LINE>describeDnsProductInstanceResponse.setSearchEngineLines(_ctx.stringValue("DescribeDnsProductInstanceResponse.SearchEngineLines"));<NEW_LINE>describeDnsProductInstanceResponse.setISPLines(_ctx.stringValue("DescribeDnsProductInstanceResponse.ISPLines"));<NEW_LINE>describeDnsProductInstanceResponse.setISPRegionLines(_ctx.stringValue("DescribeDnsProductInstanceResponse.ISPRegionLines"));<NEW_LINE>describeDnsProductInstanceResponse.setOverseaLine(_ctx.stringValue("DescribeDnsProductInstanceResponse.OverseaLine"));<NEW_LINE>describeDnsProductInstanceResponse.setMonitorNodeCount(_ctx.longValue("DescribeDnsProductInstanceResponse.MonitorNodeCount"));<NEW_LINE>describeDnsProductInstanceResponse.setMonitorFrequency(_ctx.longValue("DescribeDnsProductInstanceResponse.MonitorFrequency"));<NEW_LINE>describeDnsProductInstanceResponse.setMonitorTaskCount(_ctx.longValue("DescribeDnsProductInstanceResponse.MonitorTaskCount"));<NEW_LINE>describeDnsProductInstanceResponse.setRegionLines(_ctx.booleanValue("DescribeDnsProductInstanceResponse.RegionLines"));<NEW_LINE>describeDnsProductInstanceResponse.setGslb(_ctx.booleanValue("DescribeDnsProductInstanceResponse.Gslb"));<NEW_LINE>describeDnsProductInstanceResponse.setInClean(_ctx.booleanValue("DescribeDnsProductInstanceResponse.InClean"));<NEW_LINE>describeDnsProductInstanceResponse.setInBlackHole(_ctx.booleanValue("DescribeDnsProductInstanceResponse.InBlackHole"));<NEW_LINE>describeDnsProductInstanceResponse.setBindDomainCount(_ctx.longValue("DescribeDnsProductInstanceResponse.BindDomainCount"));<NEW_LINE>describeDnsProductInstanceResponse.setBindDomainUsedCount(_ctx.longValue("DescribeDnsProductInstanceResponse.BindDomainUsedCount"));<NEW_LINE>describeDnsProductInstanceResponse.setDnsSecurity(_ctx.stringValue("DescribeDnsProductInstanceResponse.DnsSecurity"));<NEW_LINE>describeDnsProductInstanceResponse.setPaymentType(_ctx.stringValue("DescribeDnsProductInstanceResponse.PaymentType"));<NEW_LINE>describeDnsProductInstanceResponse.setDomainType(_ctx.stringValue("DescribeDnsProductInstanceResponse.DomainType"));<NEW_LINE>List<String> dnsServers = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDnsProductInstanceResponse.DnsServers.Length"); i++) {<NEW_LINE>dnsServers.add(_ctx.stringValue("DescribeDnsProductInstanceResponse.DnsServers[" + i + "]"));<NEW_LINE>}<NEW_LINE>describeDnsProductInstanceResponse.setDnsServers(dnsServers);<NEW_LINE>return describeDnsProductInstanceResponse;<NEW_LINE>}
(_ctx.longValue("DescribeDnsProductInstanceResponse.DDosDefendQuery"));
1,838,372
public void createFile(AutoTypeImage imageType, int minContinuous) throws FileNotFoundException {<NEW_LINE>className = "ImplFastCorner" + minContinuous + "_" + imageType.getAbbreviatedType();<NEW_LINE>this.imageType = imageType;<NEW_LINE>this.sumType = imageType.getSumType();<NEW_LINE>this.bitwise = imageType.getBitWise();<NEW_LINE>this.dataType = imageType.getDataType();<NEW_LINE>this.minContinuous = minContinuous;<NEW_LINE>initFile();<NEW_LINE>printPreamble();<NEW_LINE>for (int i = 0; i < samples.length; i++) {<NEW_LINE>samples[i].clear();<NEW_LINE>}<NEW_LINE>List<String> codes = new ArrayList<>();<NEW_LINE>List<String> names = new ArrayList<>();<NEW_LINE>// Need to split the code into smaller function to help the JVM optimize the code<NEW_LINE>codes.add(generateSamples());<NEW_LINE>names.add("DUMMY");<NEW_LINE>splitIntoFunctions(codes, names, 0, 0);<NEW_LINE>out.print("\t/**\n" + "\t * @return 1 = positive corner, 0 = no corner, -1 = negative corner\n" + "\t */\n" + "\t@Override public final int checkPixel( int index ) {\n" + "\t\tsetThreshold(index);\n" + "\n");<NEW_LINE>out.println(codes.get(0));<NEW_LINE>out.println("\t}\n");<NEW_LINE>out.println("\t@Override public FastCornerInterface<" + imageType.getSingleBandName() + "> newInstance() {\n" + "\t\treturn new " + className + "(tol);\n" + "\t}\n");<NEW_LINE>for (int i = 1; i < codes.size(); i++) {<NEW_LINE>String <MASK><NEW_LINE>inside = "\tpublic final int " + names.get(i) + "( int index ) {\n" + inside + "\n\t}\n";<NEW_LINE>out.println(inside);<NEW_LINE>}<NEW_LINE>out.println("}");<NEW_LINE>System.out.println("Done");<NEW_LINE>}
inside = codes.get(i);
1,173,167
final DescribeFleetInstancesResult executeDescribeFleetInstances(DescribeFleetInstancesRequest describeFleetInstancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeFleetInstancesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeFleetInstancesRequest> request = null;<NEW_LINE>Response<DescribeFleetInstancesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeFleetInstancesRequestMarshaller().marshall<MASK><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, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeFleetInstances");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeFleetInstancesResult> responseHandler = new StaxResponseHandler<DescribeFleetInstancesResult>(new DescribeFleetInstancesResultStaxUnmarshaller());<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>}
(super.beforeMarshalling(describeFleetInstancesRequest));
1,013,190
protected void addCommonTaskFields(TaskEntity task, ObjectNode data) {<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_ID, task.getId());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_REVISION, task.getRevision());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_NAME, task.getName());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_PARENT_TASK_ID, task.getParentTaskId());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_DESCRIPTION, task.getDescription());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_OWNER, task.getOwner());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_ASSIGNEE, task.getAssignee());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_CREATE_TIME, task.getCreateTime());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_TASK_DEFINITION_KEY, task.getTaskDefinitionKey());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_TASK_DEFINITION_ID, task.getTaskDefinitionId());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_PRIORITY, task.getPriority());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.<MASK><NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_CATEGORY, task.getCategory());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_FORM_KEY, task.getFormKey());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_TENANT_ID, task.getTenantId());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_CLAIM_TIME, task.getClaimTime());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_CASE_INSTANCE_ID, task.getScopeId());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_SCOPE_ID, task.getScopeId());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_CASE_INSTANCE_ID, task.getScopeId());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_SUB_SCOPE_ID, task.getSubScopeId());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_PLAN_ITEM_INSTANCE_ID, task.getSubScopeId());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_SCOPE_TYPE, task.getScopeType());<NEW_LINE>putIfNotNull(data, CmmnAsyncHistoryConstants.FIELD_SCOPE_DEFINITION_ID, task.getScopeDefinitionId());<NEW_LINE>if (task.getScopeDefinitionId() != null) {<NEW_LINE>addCaseDefinitionFields(data, CaseDefinitionUtil.getCaseDefinition(task.getScopeDefinitionId()));<NEW_LINE>}<NEW_LINE>}
FIELD_DUE_DATE, task.getDueDate());
248,337
private boolean hasTrailComment(DetailAST ast) {<NEW_LINE>int lineNo = ast.getLineNo();<NEW_LINE>// Since the trailing comment in the case of text blocks must follow the """ delimiter,<NEW_LINE>// we need to look for it after TEXT_BLOCK_LITERAL_END.<NEW_LINE>if (ast.getType() == TokenTypes.TEXT_BLOCK_CONTENT) {<NEW_LINE>lineNo = ast.getNextSibling().getLineNo();<NEW_LINE>}<NEW_LINE>boolean result = false;<NEW_LINE>if (singlelineComments.containsKey(lineNo)) {<NEW_LINE>result = true;<NEW_LINE>} else {<NEW_LINE>final List<TextBlock> <MASK><NEW_LINE>if (commentList != null) {<NEW_LINE>final TextBlock comment = commentList.get(commentList.size() - 1);<NEW_LINE>final int[] codePoints = getLineCodePoints(lineNo - 1);<NEW_LINE>result = isTrailingBlockComment(comment, codePoints);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
commentList = blockComments.get(lineNo);
1,670,613
protected void onActivityResult(int requestCode, int resultCode, Intent data) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, data);<NEW_LINE>if (requestCode == 940 && adapter != null && adapter.getCurrentFragment() != null) {<NEW_LINE>if (resultCode == RESULT_OK) {<NEW_LINE>LogUtil.v("Doing hide posts");<NEW_LINE>ArrayList<Integer> posts = data.getIntegerArrayListExtra("seen");<NEW_LINE>((MultiredditView) adapter.getCurrentFragment()).adapter.refreshView(posts);<NEW_LINE>if (data.hasExtra("lastPage") && data.getIntExtra("lastPage", 0) != 0 && ((MultiredditView) adapter.getCurrentFragment()).rv.getLayoutManager() instanceof LinearLayoutManager) {<NEW_LINE>((LinearLayoutManager) ((MultiredditView) adapter.getCurrentFragment()).rv.getLayoutManager()).scrollToPositionWithOffset(data.getIntExtra("lastPage", 0) + 1, mToolbar.getHeight());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>((MultiredditView) adapter.getCurrentFragment(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
)).adapter.refreshView();
203,354
public void run() {<NEW_LINE>if (outputFused) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Iterator<T> iterator = this.iterator;<NEW_LINE>Observer<? <MASK><NEW_LINE>for (; ; ) {<NEW_LINE>if (disposed) {<NEW_LINE>clear();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>T next;<NEW_LINE>try {<NEW_LINE>next = Objects.requireNonNull(iterator.next(), "The Stream's Iterator.next returned a null value");<NEW_LINE>} catch (Throwable ex) {<NEW_LINE>Exceptions.throwIfFatal(ex);<NEW_LINE>downstream.onError(ex);<NEW_LINE>disposed = true;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (disposed) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>downstream.onNext(next);<NEW_LINE>if (disposed) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (iterator.hasNext()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} catch (Throwable ex) {<NEW_LINE>Exceptions.throwIfFatal(ex);<NEW_LINE>downstream.onError(ex);<NEW_LINE>disposed = true;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>downstream.onComplete();<NEW_LINE>disposed = true;<NEW_LINE>}<NEW_LINE>}
super T> downstream = this.downstream;
1,013,475
public void onCreate(Bundle icicle) {<NEW_LINE>super.onCreate(icicle);<NEW_LINE>setContentView(R.layout.main_choose_file_or_directory);<NEW_LINE>pwd = (TextView) findViewById(R.id.pwd);<NEW_LINE>button_select = (Button) findViewById(R.id.select_file_folder);<NEW_LINE>button_select.setOnClickListener(this);<NEW_LINE>Bundle extras = getIntent().getExtras();<NEW_LINE>if (extras != null) {<NEW_LINE>selectFolder = extras.getBoolean("selectFolder");<NEW_LINE>}<NEW_LINE>if (selectFolder)<NEW_LINE>button_select.setText("Save in this folder");<NEW_LINE>else {<NEW_LINE>button_select.setText("Select Upload File");<NEW_LINE>}<NEW_LINE>String <MASK><NEW_LINE>File defaultFile = new File(checkPath(defaultPath));<NEW_LINE>if (defaultFile.isDirectory())<NEW_LINE>currentDirectory = defaultFile;<NEW_LINE>else {<NEW_LINE>pwd.setText(defaultFile.getAbsolutePath());<NEW_LINE>currentDirectory = defaultFile.getParentFile();<NEW_LINE>}<NEW_LINE>browseTo(currentDirectory);<NEW_LINE>}
defaultPath = extras.getString("defaultPath");
185,029
private static void run(int numGates, Scanner scan, Random random) {<NEW_LINE>int rating = readSkierRating(scan);<NEW_LINE>boolean gameInProgress = true;<NEW_LINE>var medals = new <MASK><NEW_LINE>while (gameInProgress) {<NEW_LINE>System.out.println("THE STARTER COUNTS DOWN...5...4...3...2...1...GO!");<NEW_LINE>System.out.println("YOU'RE OFF!");<NEW_LINE>int speed = random.nextInt(18 - 9) + 9;<NEW_LINE>float totalTimeTaken = 0;<NEW_LINE>try {<NEW_LINE>totalTimeTaken = runThroughGates(numGates, scan, random, speed);<NEW_LINE>System.out.printf("%nYOU TOOK %.2f SECONDS.%n", totalTimeTaken + random.nextFloat());<NEW_LINE>medals = evaluateAndUpdateMedals(totalTimeTaken, numGates, rating, medals);<NEW_LINE>} catch (WipedOutOrSnaggedAFlag | DisqualifiedException e) {<NEW_LINE>// end of this race! Print time taken and stop<NEW_LINE>System.out.printf("%nYOU TOOK %.2f SECONDS.%n", totalTimeTaken + random.nextFloat());<NEW_LINE>}<NEW_LINE>gameInProgress = readRaceAgainChoice(scan);<NEW_LINE>}<NEW_LINE>System.out.println("THANKS FOR THE RACE");<NEW_LINE>if (medals.getGold() >= 1)<NEW_LINE>System.out.printf("GOLD MEDALS: %d%n", medals.getGold());<NEW_LINE>if (medals.getSilver() >= 1)<NEW_LINE>System.out.printf("SILVER MEDALS: %d%n", medals.getSilver());<NEW_LINE>if (medals.getBronze() >= 1)<NEW_LINE>System.out.printf("BRONZE MEDALS: %d%n", medals.getBronze());<NEW_LINE>}
Medals(0, 0, 0);
1,364,421
private void applyChange(Diff.Change change, SearchEverywhereContributor<?> contributor, List<SearchEverywhereFoundElementInfo> newItems) {<NEW_LINE>int firstItemIndex = <MASK><NEW_LINE>if (firstItemIndex < 0) {<NEW_LINE>firstItemIndex = getInsertionPoint(contributor);<NEW_LINE>}<NEW_LINE>for (Diff.Change ch : toRevertedList(change)) {<NEW_LINE>if (ch.deleted > 0) {<NEW_LINE>for (int i = ch.deleted - 1; i >= 0; i--) {<NEW_LINE>int index = firstItemIndex + ch.line0 + i;<NEW_LINE>listElements.remove(index);<NEW_LINE>}<NEW_LINE>fireIntervalRemoved(this, firstItemIndex + ch.line0, firstItemIndex + ch.line0 + ch.deleted - 1);<NEW_LINE>}<NEW_LINE>if (ch.inserted > 0) {<NEW_LINE>List<SearchEverywhereFoundElementInfo> addedItems = newItems.subList(ch.line1, ch.line1 + ch.inserted);<NEW_LINE>listElements.addAll(firstItemIndex + ch.line0, addedItems);<NEW_LINE>fireIntervalAdded(this, firstItemIndex + ch.line0, firstItemIndex + ch.line0 + ch.inserted - 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
contributors().indexOf(contributor);
640,818
public void sync(int fps) {<NEW_LINE>if (fps <= 0)<NEW_LINE>return;<NEW_LINE>if (!initialised)<NEW_LINE>initialise();<NEW_LINE>try {<NEW_LINE>// sleep until the average sleep time is greater than the time remaining till nextFrame<NEW_LINE>for (long t0 = getTime(), t1; (nextFrame - t0) > sleepDurations.avg(); t0 = t1) {<NEW_LINE>Thread.sleep(1);<NEW_LINE>// update average sleep time<NEW_LINE>sleepDurations.add((t1 = getTime()) - t0);<NEW_LINE>}<NEW_LINE>// slowly dampen sleep average if too high to avoid yielding too much<NEW_LINE>sleepDurations.dampenForLowResTicker();<NEW_LINE>// yield until the average yield time is greater than the time remaining till nextFrame<NEW_LINE>for (long t0 = getTime(), t1; (nextFrame - t0) > yieldDurations.avg(); t0 = t1) {<NEW_LINE>Thread.yield();<NEW_LINE>// update average yield time<NEW_LINE>yieldDurations.add((t1 = getTime()) - t0);<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>}<NEW_LINE>// schedule next frame, drop frame(s) if already too late for next frame<NEW_LINE>nextFrame = Math.max(nextFrame + <MASK><NEW_LINE>}
NANOS_IN_SECOND / fps, getTime());
338,609
private static Bytes computeDefault(final Bytes input) {<NEW_LINE>final BigInteger x1 = extractParameter(input, 0, 32);<NEW_LINE>final BigInteger y1 = extractParameter(input, 32, 32);<NEW_LINE>final BigInteger x2 = extractParameter(input, 64, 32);<NEW_LINE>final BigInteger y2 = <MASK><NEW_LINE>final AltBn128Point p1 = new AltBn128Point(Fq.create(x1), Fq.create(y1));<NEW_LINE>final AltBn128Point p2 = new AltBn128Point(Fq.create(x2), Fq.create(y2));<NEW_LINE>if (!p1.isOnCurve() || !p2.isOnCurve()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final AltBn128Point sum = p1.add(p2);<NEW_LINE>final Bytes x = sum.getX().toBytes();<NEW_LINE>final Bytes y = sum.getY().toBytes();<NEW_LINE>final MutableBytes result = MutableBytes.create(64);<NEW_LINE>x.copyTo(result, 32 - x.size());<NEW_LINE>y.copyTo(result, 64 - y.size());<NEW_LINE>return result.copy();<NEW_LINE>}
extractParameter(input, 96, 32);
305,946
final CreateWorldExportJobResult executeCreateWorldExportJob(CreateWorldExportJobRequest createWorldExportJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createWorldExportJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateWorldExportJobRequest> request = null;<NEW_LINE>Response<CreateWorldExportJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateWorldExportJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createWorldExportJobRequest));<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, "RoboMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateWorldExportJob");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateWorldExportJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateWorldExportJobResultJsonUnmarshaller());<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.ADVANCED_CONFIG, advancedConfig);
113,872
public void doApplyInformationToEditor() {<NEW_LINE>final Long <MASK><NEW_LINE>if (stamp != null && stamp.longValue() == nowStamp())<NEW_LINE>return;<NEW_LINE>List<RangeHighlighter> oldHighlighters = myEditor.getUserData(INDENT_HIGHLIGHTERS_IN_EDITOR_KEY);<NEW_LINE>final List<RangeHighlighter> newHighlighters = new ArrayList<>();<NEW_LINE>final MarkupModel mm = myEditor.getMarkupModel();<NEW_LINE>int curRange = 0;<NEW_LINE>if (oldHighlighters != null) {<NEW_LINE>// after document change some range highlighters could have become invalid, or the order could have been broken<NEW_LINE>oldHighlighters.sort(Comparator.comparing((RangeHighlighter h) -> !h.isValid()).thenComparing(Segment.BY_START_OFFSET_THEN_END_OFFSET));<NEW_LINE>int curHighlight = 0;<NEW_LINE>while (curRange < myRanges.size() && curHighlight < oldHighlighters.size()) {<NEW_LINE>TextRange range = myRanges.get(curRange);<NEW_LINE>RangeHighlighter highlighter = oldHighlighters.get(curHighlight);<NEW_LINE>if (!highlighter.isValid())<NEW_LINE>break;<NEW_LINE>int cmp = compare(range, highlighter);<NEW_LINE>if (cmp < 0) {<NEW_LINE>newHighlighters.add(createHighlighter(mm, range));<NEW_LINE>curRange++;<NEW_LINE>} else if (cmp > 0) {<NEW_LINE>highlighter.dispose();<NEW_LINE>curHighlight++;<NEW_LINE>} else {<NEW_LINE>newHighlighters.add(highlighter);<NEW_LINE>curHighlight++;<NEW_LINE>curRange++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (; curHighlight < oldHighlighters.size(); curHighlight++) {<NEW_LINE>RangeHighlighter highlighter = oldHighlighters.get(curHighlight);<NEW_LINE>if (!highlighter.isValid())<NEW_LINE>break;<NEW_LINE>highlighter.dispose();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final int startRangeIndex = curRange;<NEW_LINE>assert myDocument != null;<NEW_LINE>DocumentUtil.executeInBulk(myDocument, myRanges.size() > 10000, () -> {<NEW_LINE>for (int i = startRangeIndex; i < myRanges.size(); i++) {<NEW_LINE>newHighlighters.add(createHighlighter(mm, myRanges.get(i)));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>myEditor.putUserData(INDENT_HIGHLIGHTERS_IN_EDITOR_KEY, newHighlighters);<NEW_LINE>myEditor.putUserData(LAST_TIME_INDENTS_BUILT, nowStamp());<NEW_LINE>myEditor.getIndentsModel().assumeIndents(myDescriptors);<NEW_LINE>}
stamp = myEditor.getUserData(LAST_TIME_INDENTS_BUILT);
1,083,661
private static boolean isBroadcast(List<TargetDB> targetDBs, String schemaName, ExecutionContext executionContext) {<NEW_LINE>if (targetDBs.size() != 1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TargetDB <MASK><NEW_LINE>if (db.getTableNames().size() != 1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String tableName = db.getTableNames().iterator().next();<NEW_LINE>TddlRuleManager or;<NEW_LINE>if (executionContext != null) {<NEW_LINE>or = executionContext.getSchemaManager(schemaName).getTddlRuleManager();<NEW_LINE>} else {<NEW_LINE>or = OptimizerContext.getContext(schemaName).getRuleManager();<NEW_LINE>}<NEW_LINE>// use the physical name to get the tableRule, then use tableRule to see whether it's a broadcast table<NEW_LINE>try {<NEW_LINE>String logicalTableName = null;<NEW_LINE>if (!DbInfoManager.getInstance().isNewPartitionDb(schemaName)) {<NEW_LINE>String fullyQualifiedPhysicalTableName = (db.getDbIndex() + "." + tableName).toLowerCase();<NEW_LINE>Set<String> logicalNameSet = or.getLogicalTableNames(fullyQualifiedPhysicalTableName, schemaName);<NEW_LINE>if (CollectionUtils.isEmpty(logicalNameSet)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>logicalTableName = logicalNameSet.iterator().next();<NEW_LINE>} else {<NEW_LINE>logicalTableName = db.getLogTblName();<NEW_LINE>}<NEW_LINE>return or.isBroadCast(logicalTableName);<NEW_LINE>} catch (Exception e) {<NEW_LINE>return or.isBroadCast(tableName);<NEW_LINE>}<NEW_LINE>}
db = targetDBs.get(0);
1,380,304
final UnsubscribeFromDatasetResult executeUnsubscribeFromDataset(UnsubscribeFromDatasetRequest unsubscribeFromDatasetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(unsubscribeFromDatasetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UnsubscribeFromDatasetRequest> request = null;<NEW_LINE>Response<UnsubscribeFromDatasetResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new UnsubscribeFromDatasetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(unsubscribeFromDatasetRequest));<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 Sync");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UnsubscribeFromDataset");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UnsubscribeFromDatasetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UnsubscribeFromDatasetResultJsonUnmarshaller());<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);
1,795,803
final GetUploadResult executeGetUpload(GetUploadRequest getUploadRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getUploadRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetUploadRequest> request = null;<NEW_LINE>Response<GetUploadResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetUploadRequestProtocolMarshaller(protocolFactory).marshall<MASK><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, "Device Farm");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetUpload");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetUploadResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetUploadResultJsonUnmarshaller());<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>}
(super.beforeMarshalling(getUploadRequest));
1,474,569
private void updateViewsByModification(int modOffset, int modLength, DocumentEvent evt) {<NEW_LINE>// Update views by modification. For faster operation ignore stale creation<NEW_LINE>// and check it afterwards and possibly invalidate the created views (by ViewBuilder).<NEW_LINE>ViewBuilder viewBuilder = startBuildViews();<NEW_LINE>boolean success = false;<NEW_LINE>try {<NEW_LINE>OffsetRegion cRegion = fetchCharRebuildRegion();<NEW_LINE>if (viewBuilder.initModUpdate(modOffset, modLength, cRegion)) {<NEW_LINE>boolean replaced = viewBuilder.createReplaceRepaintViews(true);<NEW_LINE>// NOI18N<NEW_LINE>assert (replaced) : "Views replace failed";<NEW_LINE>docView.validChange().documentEvent = evt;<NEW_LINE>int startCreationOffset = viewBuilder.getStartCreationOffset();<NEW_LINE>int matchOffset = viewBuilder.getMatchOffset();<NEW_LINE>Document doc = docView.getDocument();<NEW_LINE>if (cRegion != null) {<NEW_LINE>BlockCompare bc = BlockCompare.get(cRegion.startOffset(), cRegion.endOffset(), startCreationOffset, matchOffset);<NEW_LINE>if (bc.inside()) {<NEW_LINE>// Created area fully contains cRegion<NEW_LINE>cRegion = null;<NEW_LINE>} else if (bc.overlapStart()) {<NEW_LINE>cRegion = OffsetRegion.create(cRegion.startPosition(), ViewUtils<MASK><NEW_LINE>} else if (bc.overlapEnd()) {<NEW_LINE>cRegion = OffsetRegion.create(ViewUtils.createPosition(doc, matchOffset), cRegion.endPosition());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (cRegion != null) {<NEW_LINE>// cRegion area that remains "dirty"<NEW_LINE>extendCharRebuildRegion(cRegion);<NEW_LINE>}<NEW_LINE>success = true;<NEW_LINE>} finally {<NEW_LINE>finishBuildViews(viewBuilder, success);<NEW_LINE>}<NEW_LINE>}
.createPosition(doc, startCreationOffset));
1,237,735
public CompletableFuture<TermIndex> installSnapshotFromLeader() {<NEW_LINE>if (mJournalSystem.isLeader()) {<NEW_LINE>return RaftJournalUtils.completeExceptionally(new IllegalStateException("Abort snapshot installation after becoming a leader"));<NEW_LINE>}<NEW_LINE>if (!transitionState(DownloadState.IDLE, DownloadState.STREAM_DATA)) {<NEW_LINE>return RaftJournalUtils.completeExceptionally(new IllegalStateException("State is not IDLE when starting a snapshot installation"));<NEW_LINE>}<NEW_LINE>try (RaftJournalServiceClient client = getJournalServiceClient()) {<NEW_LINE>String address = String.valueOf(client.getAddress());<NEW_LINE>SnapshotDownloader<DownloadSnapshotPRequest, DownloadSnapshotPResponse> observer = SnapshotDownloader.forFollower(mStorage, address);<NEW_LINE>Timer.Context ctx = MetricsSystem.timer(MetricKey.MASTER_EMBEDDED_JOURNAL_SNAPSHOT_DOWNLOAD_TIMER.getName()).time();<NEW_LINE>client.downloadSnapshot(observer);<NEW_LINE>return observer.getFuture().thenApplyAsync((termIndex) -> {<NEW_LINE>ctx.close();<NEW_LINE>mDownloadedSnapshot = observer.getSnapshotToInstall();<NEW_LINE>transitionState(DownloadState.STREAM_DATA, DownloadState.DOWNLOADED);<NEW_LINE>long index = installDownloadedSnapshot();<NEW_LINE>if (index == RaftLog.INVALID_LOG_INDEX) {<NEW_LINE>throw new CompletionException(new RuntimeException(String.format("Failed to install the downloaded snapshot %s", termIndex)));<NEW_LINE>}<NEW_LINE>if (index != termIndex.getIndex()) {<NEW_LINE>throw new CompletionException(new IllegalStateException(String.format("Mismatched snapshot installed - downloaded %d, installed %d", termIndex.getIndex(), index)));<NEW_LINE>}<NEW_LINE>return termIndex;<NEW_LINE>}).whenComplete((termIndex, throwable) -> {<NEW_LINE>if (throwable != null) {<NEW_LINE>LOG.error("Unexpected exception downloading snapshot from leader {}.", address, throwable);<NEW_LINE>transitionState(DownloadState.STREAM_DATA, DownloadState.IDLE);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>transitionState(<MASK><NEW_LINE>return RaftJournalUtils.completeExceptionally(e);<NEW_LINE>}<NEW_LINE>}
DownloadState.STREAM_DATA, DownloadState.IDLE);
732,570
public ListScheduledQueriesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListScheduledQueriesResult listScheduledQueriesResult = new ListScheduledQueriesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<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 listScheduledQueriesResult;<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("ScheduledQueries", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listScheduledQueriesResult.setScheduledQueries(new ListUnmarshaller<ScheduledQuery>(ScheduledQueryJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listScheduledQueriesResult.setNextToken(context.getUnmarshaller(String.<MASK><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 listScheduledQueriesResult;<NEW_LINE>}
class).unmarshall(context));
552,187
public static final /* Signature generation primitive, calculates (x-h)s mod q<NEW_LINE>* v [out] signature value<NEW_LINE>* h [in] signature hash (of message, signature pub key, and context data)<NEW_LINE>* x [in] signature private key<NEW_LINE>* s [in] private key for signing<NEW_LINE>* returns true on success, false on failure (use different x or h)<NEW_LINE>*/<NEW_LINE>boolean sign(byte[] v, byte[] h, byte[] x, byte[] s) {<NEW_LINE>// v = (x - h) s mod q<NEW_LINE>int w, i;<NEW_LINE>byte[] h1 = new byte[32], x1 = new byte[32];<NEW_LINE>byte[] tmp1 = new byte[64];<NEW_LINE>byte[] tmp2 = new byte[64];<NEW_LINE>// Don't clobber the arguments, be nice!<NEW_LINE>cpy32(h1, h);<NEW_LINE>cpy32(x1, x);<NEW_LINE>// Reduce modulo group order<NEW_LINE>byte[] tmp3 = new byte[32];<NEW_LINE>divmod(tmp3, h1, 32, ORDER, 32);<NEW_LINE>divmod(tmp3, x1, 32, ORDER, 32);<NEW_LINE>// v = x1 - h1<NEW_LINE>// If v is negative, add the group order to it to become positive.<NEW_LINE>// If v was already positive we don't have to worry about overflow<NEW_LINE>// when adding the order because v < ORDER and 2*ORDER < 2^256<NEW_LINE>mula_small(v, x1, 0<MASK><NEW_LINE>mula_small(v, v, 0, ORDER, 32, 1);<NEW_LINE>// tmp1 = (x-h)*s mod q<NEW_LINE>mula32(tmp1, v, s, 32, 1);<NEW_LINE>divmod(tmp2, tmp1, 64, ORDER, 32);<NEW_LINE>for (w = 0, i = 0; i < 32; i++) w |= v[i] = tmp1[i];<NEW_LINE>return w != 0;<NEW_LINE>}
, h1, 32, -1);
1,178,689
public UpdateSiteResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateSiteResult updateSiteResult = new UpdateSiteResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<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 updateSiteResult;<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("Site", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateSiteResult.setSite(SiteJsonUnmarshaller.getInstance<MASK><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 updateSiteResult;<NEW_LINE>}
().unmarshall(context));
1,173,882
public void testJEEMetadataContextExecSvc1() throws Exception {<NEW_LINE>final BlockingQueue<Object> results = new LinkedBlockingQueue<Object>();<NEW_LINE>final Runnable javaCompLookup = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>System.out.println("running task");<NEW_LINE>try {<NEW_LINE>results.add(new InitialContext().lookup("java:comp/env/entry1"));<NEW_LINE>} catch (Throwable x) {<NEW_LINE>results.add(x);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>// Lookup from current thread should work<NEW_LINE>javaCompLookup.run();<NEW_LINE>Object result = results.poll();<NEW_LINE>if (result instanceof Throwable)<NEW_LINE>throw new ExecutionException((Throwable) result);<NEW_LINE>if (!"value1".equals(result))<NEW_LINE>throw new Exception("Unexpected value for java:comp/env/entry1 from current thread: " + result);<NEW_LINE>// Lookup from managed executor service thread (with jeeMetadataContext) should work<NEW_LINE>Future<BlockingQueue<Object>> future = execSvc1.submit(javaCompLookup, results);<NEW_LINE>try {<NEW_LINE>result = future.get(TIMEOUT, TimeUnit.MILLISECONDS).remove();<NEW_LINE>} finally {<NEW_LINE>future.cancel(true);<NEW_LINE>}<NEW_LINE>if (result instanceof Exception)<NEW_LINE>throw (Exception) result;<NEW_LINE>else if (result instanceof Throwable)<NEW_LINE>throw new ExecutionException((Throwable) result);<NEW_LINE>if (!"value1".equals(result))<NEW_LINE><MASK><NEW_LINE>}
throw new Exception("Unexpected value for java:comp/env/entry1 from new thread: " + result);
1,203,371
final CreatePolicyVersionResult executeCreatePolicyVersion(CreatePolicyVersionRequest createPolicyVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPolicyVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreatePolicyVersionRequest> request = null;<NEW_LINE>Response<CreatePolicyVersionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreatePolicyVersionRequestMarshaller().marshall(super.beforeMarshalling(createPolicyVersionRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePolicyVersion");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<CreatePolicyVersionResult> responseHandler = new StaxResponseHandler<CreatePolicyVersionResult>(new CreatePolicyVersionResultStaxUnmarshaller());<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>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,649,412
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {<NEW_LINE>if (viewType == MenuItem.TYPE_DEFAULT) {<NEW_LINE>HamburgerMenuItemBinding binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.hamburger_menu_item, parent, false);<NEW_LINE>return new HamburgerMenuItemHolder(binding);<NEW_LINE>} else if (viewType == MenuItem.TYPE_ADDON) {<NEW_LINE>HamburgerMenuAddonItemBinding binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.hamburger_menu_addon_item, parent, false);<NEW_LINE>return new HamburgerMenuItemAddonHolder(binding);<NEW_LINE>} else if (viewType == MenuItem.TYPE_ADDONS_SETTINGS) {<NEW_LINE>HamburgerMenuAddonsSettingsItemBinding binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.hamburger_menu_addons_settings_item, parent, false);<NEW_LINE>return new HamburgerMenuItemAddonsSettingsHolder(binding);<NEW_LINE>}<NEW_LINE>throw new <MASK><NEW_LINE>}
RuntimeException("there is no type that matches the type " + viewType + " + make sure your using types correctly");
1,018,572
protected void layoutChildren(final double x, final double y, final double w, final double h) {<NEW_LINE>final ProgressIndicator control = getSkinnable();<NEW_LINE>boolean isIndeterminate = control.isIndeterminate();<NEW_LINE>// resize clip<NEW_LINE>clipRegion.resizeRelocate(0, 0, w, h);<NEW_LINE>track.resizeRelocate(x, y, w, h);<NEW_LINE>bar.resizeRelocate(x, y, isIndeterminate ? <MASK><NEW_LINE>// things should be invisible only when well below minimum length<NEW_LINE>track.setVisible(true);<NEW_LINE>// width might have changed so recreate our animation if needed<NEW_LINE>if (isIndeterminate) {<NEW_LINE>createIndeterminateTimeline();<NEW_LINE>if (NodeHelper.isTreeShowing(getSkinnable())) {<NEW_LINE>indeterminateTransition.play();<NEW_LINE>}<NEW_LINE>// apply clip<NEW_LINE>bar.setClip(clipRegion);<NEW_LINE>} else if (indeterminateTransition != null) {<NEW_LINE>indeterminateTransition.stop();<NEW_LINE>indeterminateTransition = null;<NEW_LINE>// remove clip<NEW_LINE>bar.setClip(null);<NEW_LINE>bar.setScaleX(1);<NEW_LINE>bar.setTranslateX(0);<NEW_LINE>clipRegion.translateXProperty().unbind();<NEW_LINE>}<NEW_LINE>}
getIndeterminateBarLength() : barWidth, h);
954,946
final UpdateRealtimeLogConfigResult executeUpdateRealtimeLogConfig(UpdateRealtimeLogConfigRequest updateRealtimeLogConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateRealtimeLogConfigRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateRealtimeLogConfigRequest> request = null;<NEW_LINE>Response<UpdateRealtimeLogConfigResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateRealtimeLogConfigRequestMarshaller().marshall(super.beforeMarshalling(updateRealtimeLogConfigRequest));<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, "CloudFront");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateRealtimeLogConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<UpdateRealtimeLogConfigResult> responseHandler = new StaxResponseHandler<UpdateRealtimeLogConfigResult>(new UpdateRealtimeLogConfigResultStaxUnmarshaller());<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();
1,388,944
public void killAllLoadsOf(@CheckForNull ValueNumber v) {<NEW_LINE>if (!REDUNDANT_LOAD_ELIMINATION) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FieldSummary fieldSummary = AnalysisContext.currentAnalysisContext().getFieldSummary();<NEW_LINE>HashSet<AvailableLoad> killMe = new HashSet<AvailableLoad>();<NEW_LINE>for (AvailableLoad availableLoad : getAvailableLoadMap().keySet()) {<NEW_LINE>if (availableLoad.getReference() != v) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>XField field = availableLoad.getField();<NEW_LINE>if (!field.isFinal() && (!USE_WRITTEN_OUTSIDE_OF_CONSTRUCTOR || fieldSummary.isWrittenOutsideOfConstructor(field))) {<NEW_LINE>if (RLE_DEBUG) {<NEW_LINE>System.out.println(<MASK><NEW_LINE>}<NEW_LINE>killMe.add(availableLoad);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>killAvailableLoads(killMe);<NEW_LINE>}
"Killing load of " + availableLoad + " in " + this);
616,675
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@Name('s0') select sum(value) as thesum from SupportThreeArrayEvent group by grouping sets((intArray), (longArray), (doubleArray))";<NEW_LINE>env.compileDeploy<MASK><NEW_LINE>sendAssert(env, "E1", 1, new int[] { 1, 2 }, new long[] { 10, 20 }, new double[] { 300, 400 }, 1, 1, 1);<NEW_LINE>env.milestone(0);<NEW_LINE>sendAssert(env, "E2", 2, new int[] { 1, 2 }, new long[] { 10, 20 }, new double[] { 300, 400 }, 3, 3, 3);<NEW_LINE>sendAssert(env, "E3", 3, new int[] { 1, 2 }, new long[] { 11, 21 }, new double[] { 300, 400 }, 6, 3, 6);<NEW_LINE>sendAssert(env, "E4", 4, new int[] { 1, 3 }, new long[] { 10 }, new double[] { 300, 400 }, 4, 4, 10);<NEW_LINE>sendAssert(env, "E5", 5, new int[] { 1, 2 }, new long[] { 10, 21 }, new double[] { 301, 400 }, 11, 5, 5);<NEW_LINE>env.milestone(1);<NEW_LINE>sendAssert(env, "E6", 6, new int[] { 1, 2 }, new long[] { 10, 20 }, new double[] { 300, 400 }, 17, 9, 16);<NEW_LINE>sendAssert(env, "E7", 7, new int[] { 1, 3 }, new long[] { 11, 21 }, new double[] { 300, 400 }, 11, 10, 23);<NEW_LINE>env.undeployAll();<NEW_LINE>}
(epl).addListener("s0");
1,250,233
// Configure pass1<NEW_LINE>protected JobConf configPass1() throws Exception {<NEW_LINE>final JobConf conf = new JobConf(getConf(), JoinTablePegasus.class);<NEW_LINE>conf.set("number_tables", "" + number_tables);<NEW_LINE>conf.set("join_type", "" + join_type);<NEW_LINE>conf.setJobName("JoinTablePegasus");<NEW_LINE>conf.setMapperClass(MapPass1.class);<NEW_LINE>conf.setReducerClass(RedPass1.class);<NEW_LINE>int i = 1;<NEW_LINE>Iterator<Path> iter = input_paths.iterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Path cur_path = iter.next();<NEW_LINE>FileInputFormat.addInputPath(conf, cur_path);<NEW_LINE>conf.set("path" + i, cur_path.toString());<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>final FileSystem fs = FileSystem.get(conf);<NEW_LINE>fs.delete(output_path);<NEW_LINE>conf.setNumReduceTasks(nreducer);<NEW_LINE>conf.setMapOutputKeyClass(IntWritable.class);<NEW_LINE>conf.setOutputKeyClass(Text.class);<NEW_LINE>conf.setOutputValueClass(Text.class);<NEW_LINE>return conf;<NEW_LINE>}
FileOutputFormat.setOutputPath(conf, output_path);
1,362,827
private static void appendLong12(CharSink sink, long i) {<NEW_LINE>long c;<NEW_LINE>sink.put((char) ('0' + i / 100000000000L));<NEW_LINE>sink.put((char) ('0' + (c = i % 100000000000L) / 10000000000L));<NEW_LINE>sink.put((char) ('0' + (c %= 10000000000L) / 1000000000));<NEW_LINE>sink.put((char) ('0' + (c %= 1000000000) / 100000000));<NEW_LINE>sink.put((char) ('0' + (c %= 100000000) / 10000000));<NEW_LINE>sink.put((char) ('0' + (c %= 10000000) / 1000000));<NEW_LINE>sink.put((char) ('0' + (c %= 1000000) / 100000));<NEW_LINE>sink.put((char) ('0' + (c %= 100000) / 10000));<NEW_LINE>sink.put((char) ('0' + (<MASK><NEW_LINE>sink.put((char) ('0' + (c %= 1000) / 100));<NEW_LINE>sink.put((char) ('0' + (c %= 100) / 10));<NEW_LINE>sink.put((char) ('0' + (c % 10)));<NEW_LINE>}
c %= 10000) / 1000));
1,628,537
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {<NEW_LINE>if (docList.size() > 0) {<NEW_LINE>FileDoc docItem = docList.get(position);<NEW_LINE>try {<NEW_LINE>Typeface typeface;<NEW_LINE>if (docItem.isContentScheme()) {<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {<NEW_LINE>FileDescriptor fd = context.getContentResolver().openFileDescriptor(docItem.getUri(<MASK><NEW_LINE>typeface = new Typeface.Builder(fd).build();<NEW_LINE>} else {<NEW_LINE>typeface = Typeface.createFromFile(RealPathUtil.getPath(context, docItem.getUri()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>typeface = Typeface.createFromFile(docItem.getUri().toString());<NEW_LINE>}<NEW_LINE>holder.tvFont.setTypeface(typeface);<NEW_LINE>} catch (Exception ignored) {<NEW_LINE>}<NEW_LINE>holder.tvFont.setText(docItem.getName());<NEW_LINE>if (docItem.getName().equals(selectName)) {<NEW_LINE>holder.ivChecked.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>holder.ivChecked.setVisibility(View.INVISIBLE);<NEW_LINE>}<NEW_LINE>holder.tvFont.setOnClickListener(view -> {<NEW_LINE>if (thisListener != null) {<NEW_LINE>thisListener.setFontPath(docItem);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>holder.tvFont.setText(R.string.fonts_folder);<NEW_LINE>}<NEW_LINE>}
), "r").getFileDescriptor();
1,344,453
protected void updatePlayer(final Server server, final CommandSource sender, final User target, final String[] args) throws NotEnoughArgumentsException {<NEW_LINE>final String nick = args[0];<NEW_LINE>if ("off".equalsIgnoreCase(nick)) {<NEW_LINE>setNickname(server, sender, target, null);<NEW_LINE>target.sendMessage(tl("nickNoMore"));<NEW_LINE>} else if (target.getName().equalsIgnoreCase(nick)) {<NEW_LINE>setNickname(<MASK><NEW_LINE>if (!target.getDisplayName().equalsIgnoreCase(target.getDisplayName())) {<NEW_LINE>target.sendMessage(tl("nickNoMore"));<NEW_LINE>}<NEW_LINE>target.sendMessage(tl("nickSet", target.getDisplayName()));<NEW_LINE>} else if (nickInUse(target, nick)) {<NEW_LINE>throw new NotEnoughArgumentsException(tl("nickInUse"));<NEW_LINE>} else {<NEW_LINE>setNickname(server, sender, target, nick);<NEW_LINE>target.sendMessage(tl("nickSet", target.getDisplayName()));<NEW_LINE>}<NEW_LINE>}
server, sender, target, nick);
1,060,796
private TimerTask scheduleTimer(float period) {<NEW_LINE>TimerTask task = new TimerTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>for (Entry<String, Cache<Id, Object>> entry : caches().entrySet()) {<NEW_LINE>this.tick(entry.getKey(<MASK><NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOG.warn("An exception occurred when running tick", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>private void tick(String name, Cache<Id, Object> cache) {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>long items = cache.tick();<NEW_LINE>long cost = System.currentTimeMillis() - start;<NEW_LINE>if (cost > LOG_TICK_COST_TIME) {<NEW_LINE>LOG.info("Cache '{}' expired {} items cost {}ms > {}ms " + "(size {}, expire {}ms)", name, items, cost, LOG_TICK_COST_TIME, cache.size(), cache.expire());<NEW_LINE>}<NEW_LINE>LOG.debug("Cache '{}' expiration tick cost {}ms", name, cost);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>// Schedule task with the period in seconds<NEW_LINE>this.timer.schedule(task, 0, (long) (period * 1000.0));<NEW_LINE>return task;<NEW_LINE>}
), entry.getValue());
1,338,273
protected boolean addNamedQueriesToPersistenceUnits(boolean weaverRegistered) throws Exception {<NEW_LINE>// Do this last in case any of the query config classes happens to cause an entity class to be loaded - they will<NEW_LINE>// still be transformed by the previous registered transformers<NEW_LINE>for (PersistenceUnitInfo pui : mergedPus.values()) {<NEW_LINE>// Add annotated named query support from QueryConfiguration beans<NEW_LINE>List<NamedQuery> namedQueries = new ArrayList<>();<NEW_LINE>List<NamedNativeQuery> nativeQueries = new ArrayList<>();<NEW_LINE>for (QueryConfiguration config : queryConfigurations) {<NEW_LINE>if (pui.getPersistenceUnitName().equals(config.getPersistenceUnit())) {<NEW_LINE>NamedQueries annotation = config.getClass().getAnnotation(NamedQueries.class);<NEW_LINE>if (annotation != null) {<NEW_LINE>namedQueries.addAll(Arrays.asList(annotation.value()));<NEW_LINE>}<NEW_LINE>NamedNativeQueries annotation2 = config.getClass().getAnnotation(NamedNativeQueries.class);<NEW_LINE>if (annotation2 != null) {<NEW_LINE>nativeQueries.addAll(Arrays.asList(annotation2.value()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!namedQueries.isEmpty() || !nativeQueries.isEmpty()) {<NEW_LINE>QueryConfigurationClassTransformer transformer = new QueryConfigurationClassTransformer(namedQueries, nativeQueries, pui.getManagedClassNames());<NEW_LINE>try {<NEW_LINE>pui.addTransformer(transformer);<NEW_LINE>} catch (Exception e) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return weaverRegistered;<NEW_LINE>}
weaverRegistered = handleClassTransformerRegistrationProblem(transformer, e);
1,528,590
public void performPluginValidationsFor(final PackageDefinition packageDefinition) {<NEW_LINE>String pluginId = packageDefinition.getRepository().getPluginConfiguration().getId();<NEW_LINE>ValidationResult validationResult = packageRepositoryExtension.isPackageConfigurationValid(pluginId, buildPackageConfigurations(packageDefinition), buildRepositoryConfigurations(packageDefinition.getRepository()));<NEW_LINE>for (ValidationError error : validationResult.getErrors()) {<NEW_LINE>packageDefinition.addConfigurationErrorFor(error.getKey(), error.getMessage());<NEW_LINE>}<NEW_LINE>for (ConfigurationProperty configurationProperty : packageDefinition.getConfiguration()) {<NEW_LINE>String key = configurationProperty<MASK><NEW_LINE>if (PackageMetadataStore.getInstance().hasOption(packageDefinition.getRepository().getPluginConfiguration().getId(), key, PackageConfiguration.REQUIRED)) {<NEW_LINE>if (configurationProperty.getValue().isEmpty() && configurationProperty.doesNotHaveErrorsAgainstConfigurationValue()) {<NEW_LINE>configurationProperty.addErrorAgainstConfigurationValue("Field: '" + configurationProperty.getConfigurationKey().getName() + "' is required");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getConfigurationKey().getName();
344,229
public static DescribeRuleListResponse unmarshall(DescribeRuleListResponse describeRuleListResponse, UnmarshallerContext context) {<NEW_LINE>describeRuleListResponse.setRequestId(context.stringValue("DescribeRuleListResponse.RequestId"));<NEW_LINE>describeRuleListResponse.setSuccess(context.booleanValue("DescribeRuleListResponse.Success"));<NEW_LINE>PageInfo pageInfo = new PageInfo();<NEW_LINE>pageInfo.setPageSize(context.integerValue("DescribeRuleListResponse.PageInfo.PageSize"));<NEW_LINE>pageInfo.setCurrentPage(context.integerValue("DescribeRuleListResponse.PageInfo.CurrentPage"));<NEW_LINE>pageInfo.setTotalCount(context.integerValue("DescribeRuleListResponse.PageInfo.TotalCount"));<NEW_LINE>describeRuleListResponse.setPageInfo(pageInfo);<NEW_LINE>List<RulesItem> rules = new ArrayList<RulesItem>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeRuleListResponse.Rules.Length"); i++) {<NEW_LINE>RulesItem rulesItem = new RulesItem();<NEW_LINE>rulesItem.setWarnLevel(context.stringValue("DescribeRuleListResponse.Rules[" + i + "].WarnLevel"));<NEW_LINE>rulesItem.setModified(context.longValue<MASK><NEW_LINE>rulesItem.setCreate(context.longValue("DescribeRuleListResponse.Rules[" + i + "].Create"));<NEW_LINE>rulesItem.setRuleName(context.stringValue("DescribeRuleListResponse.Rules[" + i + "].RuleName"));<NEW_LINE>rulesItem.setDescription(context.stringValue("DescribeRuleListResponse.Rules[" + i + "].Description"));<NEW_LINE>rulesItem.setId(context.integerValue("DescribeRuleListResponse.Rules[" + i + "].Id"));<NEW_LINE>rulesItem.setDataSourceId(context.integerValue("DescribeRuleListResponse.Rules[" + i + "].DataSourceId"));<NEW_LINE>rulesItem.setExpressions(context.stringValue("DescribeRuleListResponse.Rules[" + i + "].Expressions"));<NEW_LINE>rulesItem.setActions(context.stringValue("DescribeRuleListResponse.Rules[" + i + "].Actions"));<NEW_LINE>rulesItem.setStatisticsRules(context.stringValue("DescribeRuleListResponse.Rules[" + i + "].StatisticsRules"));<NEW_LINE>rulesItem.setNeedGroup(context.booleanValue("DescribeRuleListResponse.Rules[" + i + "].NeedGroup"));<NEW_LINE>rulesItem.setStatusCode(context.stringValue("DescribeRuleListResponse.Rules[" + i + "].StatusCode"));<NEW_LINE>List<RuleGroup> ruleGroups = new ArrayList<RuleGroup>();<NEW_LINE>for (int j = 0; j < context.lengthValue("DescribeRuleListResponse.Rules[" + i + "].RuleGroups.Length"); j++) {<NEW_LINE>RuleGroup ruleGroup = new RuleGroup();<NEW_LINE>ruleGroup.setGroupName(context.stringValue("DescribeRuleListResponse.Rules[" + i + "].RuleGroups[" + j + "].GroupName"));<NEW_LINE>ruleGroup.setRuleNum(context.integerValue("DescribeRuleListResponse.Rules[" + i + "].RuleGroups[" + j + "].RuleNum"));<NEW_LINE>ruleGroup.setModified(context.longValue("DescribeRuleListResponse.Rules[" + i + "].RuleGroups[" + j + "].Modified"));<NEW_LINE>ruleGroup.setCreate(context.longValue("DescribeRuleListResponse.Rules[" + i + "].RuleGroups[" + j + "].Create"));<NEW_LINE>ruleGroup.setDescription(context.stringValue("DescribeRuleListResponse.Rules[" + i + "].RuleGroups[" + j + "].Description"));<NEW_LINE>ruleGroup.setId(context.integerValue("DescribeRuleListResponse.Rules[" + i + "].RuleGroups[" + j + "].Id"));<NEW_LINE>ruleGroup.setAliUid(context.integerValue("DescribeRuleListResponse.Rules[" + i + "].RuleGroups[" + j + "].AliUid"));<NEW_LINE>ruleGroups.add(ruleGroup);<NEW_LINE>}<NEW_LINE>rulesItem.setRuleGroups(ruleGroups);<NEW_LINE>rules.add(rulesItem);<NEW_LINE>}<NEW_LINE>describeRuleListResponse.setRules(rules);<NEW_LINE>return describeRuleListResponse;<NEW_LINE>}
("DescribeRuleListResponse.Rules[" + i + "].Modified"));
679,740
IQueryBuilder<I_MD_Candidate_ATP_QueryResult> createDBQueryForStockQueryBuilder(@NonNull final AvailableToPromiseQuery query) {<NEW_LINE>final IQueryBL queryBL = Services.get(IQueryBL.class);<NEW_LINE>final IQueryBuilder<I_MD_Candidate_ATP_QueryResult> //<NEW_LINE>//<NEW_LINE>queryBuilder = queryBL.createQueryBuilder(I_MD_Candidate_ATP_QueryResult.class);<NEW_LINE>if (!isRealSqlQuery()) {<NEW_LINE>// Date; this only makes sense in unit test's there the I_MD_Candidate_ATP_QueryResult records to return were hand-crafted for the respective test<NEW_LINE>queryBuilder.addCompareFilter(I_MD_Candidate_ATP_QueryResult.COLUMN_DateProjected, Operator.LESS_OR_EQUAL, TimeUtil.asTimestamp(query.getDate()));<NEW_LINE>}<NEW_LINE>// Warehouse<NEW_LINE>final Set<WarehouseId> warehouseIds = query.getWarehouseIds();<NEW_LINE>if (!warehouseIds.isEmpty()) {<NEW_LINE>queryBuilder.addInArrayFilter(I_MD_Candidate_ATP_QueryResult.COLUMN_M_Warehouse_ID, warehouseIds);<NEW_LINE>}<NEW_LINE>// Product<NEW_LINE>final List<Integer> productIds = query.getProductIds();<NEW_LINE>if (!productIds.isEmpty()) {<NEW_LINE>queryBuilder.addInArrayFilter(I_MD_Candidate_ATP_QueryResult.COLUMN_M_Product_ID, productIds);<NEW_LINE>}<NEW_LINE>// BPartner<NEW_LINE>final <MASK><NEW_LINE>if (bpartner.isAny()) {<NEW_LINE>// nothing to filter<NEW_LINE>} else if (bpartner.isNone()) {<NEW_LINE>queryBuilder.addEqualsFilter(I_MD_Candidate_ATP_QueryResult.COLUMNNAME_C_BPartner_Customer_ID, null);<NEW_LINE>} else // specific<NEW_LINE>{<NEW_LINE>queryBuilder.addInArrayFilter(I_MD_Candidate_ATP_QueryResult.COLUMNNAME_C_BPartner_Customer_ID, bpartner.getBpartnerId(), null);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Storage Attributes Key<NEW_LINE>final ImmutableList<AttributesKeyPattern> storageAttributesKeyPatterns = query.getStorageAttributesKeyPatterns();<NEW_LINE>if (!storageAttributesKeyPatterns.isEmpty()) {<NEW_LINE>final AttributesKeyQueryHelper<I_MD_Candidate_ATP_QueryResult> helper = AttributesKeyQueryHelper.createFor(I_MD_Candidate_ATP_QueryResult.COLUMN_StorageAttributesKey);<NEW_LINE>final IQueryFilter<I_MD_Candidate_ATP_QueryResult> attributesFilter = helper.createFilter(storageAttributesKeyPatterns);<NEW_LINE>queryBuilder.filter(attributesFilter);<NEW_LINE>}<NEW_LINE>return queryBuilder;<NEW_LINE>}
BPartnerClassifier bpartner = query.getBpartner();
496,926
protected void iterate() throws LibrecException {<NEW_LINE>for (MatrixEntry matrixEntry : trainMatrix) {<NEW_LINE>// user userIdx<NEW_LINE>int userId = matrixEntry.row();<NEW_LINE>// item itemIdx<NEW_LINE>int itemId = matrixEntry.column();<NEW_LINE>// real rating on item itemIdx rated by user userIdx<NEW_LINE>double realRating = matrixEntry.get();<NEW_LINE>double prediction = predict(userId, itemId, false);<NEW_LINE>double err = realRating - prediction;<NEW_LINE>for (int f = 0; f < this.numFactors; f++) {<NEW_LINE>double userFactorValue = userFactors.get(userId, f);<NEW_LINE>double itemFactorValue = itemFactors.get(itemId, f);<NEW_LINE>if (updateUsers) {<NEW_LINE>double deltaU = err * itemFactorValue - regularization * userFactorValue;<NEW_LINE>userFactors.add(userId, f, currentLearnrate * deltaU);<NEW_LINE>}<NEW_LINE>if (updateItems) {<NEW_LINE>double deltaI <MASK><NEW_LINE>itemFactors.add(userId, f, currentLearnrate * deltaI);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= err * userFactorValue - regularization * itemFactorValue;
470,316
public ListSetsResult retrieveSets(int offset, int length) {<NEW_LINE>logger.fine("calling retrieveSets()");<NEW_LINE>List<OAISet> dataverseOAISets = setService.findAllNamedSets();<NEW_LINE>List<Set> XOAISets = new ArrayList<Set>();<NEW_LINE>if (dataverseOAISets != null) {<NEW_LINE>for (int i = 0; i < dataverseOAISets.size(); i++) {<NEW_LINE>OAISet dataverseSet = dataverseOAISets.get(i);<NEW_LINE>Set xoaiSet = new Set(dataverseSet.getSpec());<NEW_LINE>xoaiSet.withName(dataverseSet.getName());<NEW_LINE>XOAIMetadata xMetadata = new XOAIMetadata();<NEW_LINE>Element element = new Element("description");<NEW_LINE>element.withField("description", dataverseSet.getDescription());<NEW_LINE>xMetadata.<MASK><NEW_LINE>xoaiSet.withDescription(xMetadata);<NEW_LINE>XOAISets.add(xoaiSet);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new ListSetsResult(offset + length < XOAISets.size(), XOAISets.subList(offset, Math.min(offset + length, XOAISets.size())));<NEW_LINE>}
getElements().add(element);
510,881
public <ImageT> Digraph<ImageT> createImageUnderMapping(Map<T, ImageT> map) {<NEW_LINE>Digraph<ImageT> imageGraph = new Digraph<>();<NEW_LINE>for (Node<T> fromNode : nodes.values()) {<NEW_LINE>T fromLabel = fromNode.getLabel();<NEW_LINE>ImageT fromImage = map.get(fromLabel);<NEW_LINE>if (fromImage == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>imageGraph.createNode(fromImage);<NEW_LINE>for (Node<T> toNode : fromNode.getSuccessors()) {<NEW_LINE>T toLabel = toNode.getLabel();<NEW_LINE>ImageT toImage = map.get(toLabel);<NEW_LINE>if (toImage == null) {<NEW_LINE>throw new IllegalArgumentException("Incomplete function: undefined for " + toLabel);<NEW_LINE>}<NEW_LINE>imageGraph.addEdge(fromImage, toImage);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return imageGraph;<NEW_LINE>}
throw new IllegalArgumentException("Incomplete function: undefined for " + fromLabel);
18,239
private Object readResponse(TProtocol in) throws Exception {<NEW_LINE>TProtocolReader reader = new TProtocolReader(in);<NEW_LINE>reader.readStructBegin();<NEW_LINE>Object results = null;<NEW_LINE>Exception exception = null;<NEW_LINE>while (reader.nextField()) {<NEW_LINE>if (reader.getFieldId() == 0) {<NEW_LINE>results = reader.readField(successCodec);<NEW_LINE>} else {<NEW_LINE>ThriftCodec<Object> exceptionCodec = exceptionCodecs.get(reader.getFieldId());<NEW_LINE>if (exceptionCodec != null) {<NEW_LINE>exception = (<MASK><NEW_LINE>} else {<NEW_LINE>reader.skipFieldData();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.readStructEnd();<NEW_LINE>in.readMessageEnd();<NEW_LINE>if (exception != null) {<NEW_LINE>throw exception;<NEW_LINE>}<NEW_LINE>if (successCodec.getType() == ThriftType.VOID) {<NEW_LINE>// TODO: check for non-null return from a void function?<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (results == null) {<NEW_LINE>throw new TApplicationException(TApplicationException.MISSING_RESULT, name + " failed: unknown result");<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
Exception) reader.readField(exceptionCodec);
888,443
public static void response(PreparedStatement pStmt, ShardingService service) {<NEW_LINE>byte packetId = 0;<NEW_LINE>// writeDirectly preparedOk packet<NEW_LINE>PreparedOkPacket preparedOk = new PreparedOkPacket();<NEW_LINE>preparedOk.setPacketId(++packetId);<NEW_LINE>preparedOk.setStatementId(pStmt.getId());<NEW_LINE>preparedOk.setColumnsNumber(pStmt.getColumnsNumber());<NEW_LINE>preparedOk.setParametersNumber(pStmt.getParametersNumber());<NEW_LINE>ByteBuffer buffer = preparedOk.write(service.allocate(), service, true);<NEW_LINE>// writeDirectly parameter field packet<NEW_LINE>int parametersNumber = preparedOk.getParametersNumber();<NEW_LINE>if (parametersNumber > 0) {<NEW_LINE>for (int i = 0; i < parametersNumber; i++) {<NEW_LINE>FieldPacket field = new FieldPacket();<NEW_LINE>field.setPacketId(++packetId);<NEW_LINE>buffer = field.write(buffer, service, true);<NEW_LINE>}<NEW_LINE>EOFPacket eof = new EOFPacket();<NEW_LINE>eof.setPacketId(++packetId);<NEW_LINE>buffer = eof.<MASK><NEW_LINE>}<NEW_LINE>// writeDirectly column field packet<NEW_LINE>int columnsNumber = preparedOk.getColumnsNumber();<NEW_LINE>if (columnsNumber > 0) {<NEW_LINE>for (int i = 0; i < columnsNumber; i++) {<NEW_LINE>FieldPacket field = new FieldPacket();<NEW_LINE>field.setPacketId(++packetId);<NEW_LINE>buffer = field.write(buffer, service, true);<NEW_LINE>}<NEW_LINE>EOFPacket eof = new EOFPacket();<NEW_LINE>eof.setPacketId(++packetId);<NEW_LINE>buffer = eof.write(buffer, service, true);<NEW_LINE>}<NEW_LINE>// send buffer<NEW_LINE>service.writeDirectly(buffer, WriteFlags.QUERY_END);<NEW_LINE>}
write(buffer, service, true);
618,370
private void mapReferences(@NonNull final EDICctopInvoicVType invoice, @NonNull final HEADERXrech headerXrech, @NonNull final String dateFormat, @NonNull final InvoicSettings settings) {<NEW_LINE>final HREFE1 buyerOrderRef = INVOIC_objectFactory.createHREFE1();<NEW_LINE>buyerOrderRef.<MASK><NEW_LINE>buyerOrderRef.setREFERENCEQUAL(ReferenceQual.ORBU.name());<NEW_LINE>final String poReference = validateString(invoice.getPOReference(), "@FillMandatory@ @POReference@");<NEW_LINE>buyerOrderRef.setREFERENCE(poReference);<NEW_LINE>buyerOrderRef.setREFERENCEDATE1(toFormattedStringDate(toDate(invoice.getDateOrdered()), dateFormat));<NEW_LINE>headerXrech.getHREFE1().add(buyerOrderRef);<NEW_LINE>if (settings.isInvoicORSE()) {<NEW_LINE>final HREFE1 sellerOrderRef = INVOIC_objectFactory.createHREFE1();<NEW_LINE>sellerOrderRef.setDOCUMENTID(headerXrech.getDOCUMENTID());<NEW_LINE>sellerOrderRef.setREFERENCEQUAL(ReferenceQual.ORSE.name());<NEW_LINE>sellerOrderRef.setREFERENCE(invoice.getEDICctop111V().getCOrderID().toString());<NEW_LINE>sellerOrderRef.setREFERENCEDATE1(toFormattedStringDate(toDate(invoice.getDateOrdered()), dateFormat));<NEW_LINE>headerXrech.getHREFE1().add(sellerOrderRef);<NEW_LINE>}<NEW_LINE>if (!isEmpty(invoice.getShipmentDocumentno())) {<NEW_LINE>final HREFE1 despatchAdvRef = INVOIC_objectFactory.createHREFE1();<NEW_LINE>despatchAdvRef.setDOCUMENTID(headerXrech.getDOCUMENTID());<NEW_LINE>despatchAdvRef.setREFERENCEQUAL(ReferenceQual.DADV.name());<NEW_LINE>despatchAdvRef.setREFERENCE(invoice.getShipmentDocumentno());<NEW_LINE>despatchAdvRef.setREFERENCEDATE1(toFormattedStringDate(toDate(invoice.getMovementDate()), dateFormat));<NEW_LINE>headerXrech.getHREFE1().add(despatchAdvRef);<NEW_LINE>}<NEW_LINE>}
setDOCUMENTID(headerXrech.getDOCUMENTID());
1,267,970
public static void main(String[] args) {<NEW_LINE>File file = new File(args[0]);<NEW_LINE>try {<NEW_LINE>JarFile jar = new JarFile(file);<NEW_LINE>URLClassLoader loader = new URLClassLoader(new URL[] { file.toURI().toURL() });<NEW_LINE>Enumeration<JarEntry<MASK><NEW_LINE>while (entries.hasMoreElements()) {<NEW_LINE>JarEntry entry = entries.nextElement();<NEW_LINE>if (getClassName(entry) != null) {<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>System.out.// NOI18N<NEW_LINE>println("loading class " + getClassName(entry));<NEW_LINE>loader.loadClass(getClassName(entry));<NEW_LINE>} catch (NoClassDefFoundError e) {<NEW_LINE>// do nothing; this is OK - classpath issues<NEW_LINE>} catch (IllegalAccessError e) {<NEW_LINE>// do nothing; this is also somewhat OK, since we do not<NEW_LINE>// define any security policies<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>jar.close();<NEW_LINE>System.exit(0);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>// we need to catch everything here in order to not<NEW_LINE>// allow unexpected exceptions to pass through<NEW_LINE>e.printStackTrace();<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>}
> entries = jar.entries();
932,160
public void addRecipe(String recipePath, String blueprintCategory, IIngredientWithAmount[] inputs, IItemStack output) {<NEW_LINE>final ResourceLocation resourceLocation = new ResourceLocation("crafttweaker", recipePath);<NEW_LINE>final IngredientWithSize[] ingredients = CrTIngredientUtil.getIngredientsWithSize(inputs);<NEW_LINE>final ItemStack results = output.getInternal();<NEW_LINE>final BlueprintCraftingRecipe recipe = new BlueprintCraftingRecipe(resourceLocation, blueprintCategory, results, ingredients);<NEW_LINE>CraftTweakerAPI.apply(new ActionAddRecipe(this, recipe, null) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean validate(ILogger logger) {<NEW_LINE>if (!BlueprintCraftingRecipe.recipeCategories.contains(blueprintCategory)) {<NEW_LINE>final String format = "Blueprint Category '%s' does not exist!";<NEW_LINE>logger.error(String<MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.format(format, blueprintCategory));
940,430
public String minWindow(String s, String t) {<NEW_LINE>int m = s.length(), n = t.length();<NEW_LINE>if (n > m) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>Map<Character, Integer> need = new HashMap<>();<NEW_LINE>Map<Character, Integer> window = new HashMap<>();<NEW_LINE>int needCount = 0, windowCount = 0;<NEW_LINE>for (char ch : t.toCharArray()) {<NEW_LINE>if (!need.containsKey(ch)) {<NEW_LINE>needCount++;<NEW_LINE>}<NEW_LINE>need.merge(ch, 1, Integer::sum);<NEW_LINE>}<NEW_LINE>int start = 0, minLen = Integer.MAX_VALUE;<NEW_LINE>int left = 0, right = 0;<NEW_LINE>while (right < m) {<NEW_LINE>char ch = s.charAt(right++);<NEW_LINE>if (need.containsKey(ch)) {<NEW_LINE>int val = window.getOrDefault(ch, 0) + 1;<NEW_LINE>if (val == need.get(ch)) {<NEW_LINE>windowCount++;<NEW_LINE>}<NEW_LINE>window.put(ch, val);<NEW_LINE>}<NEW_LINE>while (windowCount == needCount) {<NEW_LINE>if (right - left < minLen) {<NEW_LINE>minLen = right - left;<NEW_LINE>start = left;<NEW_LINE>}<NEW_LINE>ch = s.charAt(left++);<NEW_LINE>if (need.containsKey(ch)) {<NEW_LINE>int val = window.get(ch);<NEW_LINE>if (val == need.get(ch)) {<NEW_LINE>windowCount--;<NEW_LINE>}<NEW_LINE>window.put(ch, val - 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return minLen == Integer.MAX_VALUE ? "" : s.<MASK><NEW_LINE>}
substring(start, start + minLen);
1,310,108
protected FileChunk nextChunkRequest(StoreFileMetadata md) throws IOException {<NEW_LINE>assert Transports.assertNotTransportThread("read file chunk");<NEW_LINE>cancellableThreads.checkForCancel();<NEW_LINE>if (currentInput == null) {<NEW_LINE>// no input => reading directly from the metadata<NEW_LINE>assert md.hashEqualsContents();<NEW_LINE>return new FileChunk(md, new BytesArray(md.hash()), 0, true, () -> {<NEW_LINE>});<NEW_LINE>}<NEW_LINE>final byte[] buffer = Objects.requireNonNullElseGet(buffers.pollFirst(), () -> new byte[bufferSize]);<NEW_LINE>assert liveBufferCount.incrementAndGet() > 0;<NEW_LINE>final int toRead = Math.toIntExact(Math.min(md.length() - offset, buffer.length));<NEW_LINE>currentInput.readBytes(buffer, 0, toRead, false);<NEW_LINE>final boolean lastChunk = offset + toRead == md.length();<NEW_LINE>final FileChunk chunk = new FileChunk(md, new BytesArray(buffer, 0, toRead), offset, lastChunk, () -> {<NEW_LINE><MASK><NEW_LINE>buffers.addFirst(buffer);<NEW_LINE>});<NEW_LINE>offset += toRead;<NEW_LINE>return chunk;<NEW_LINE>}
assert liveBufferCount.decrementAndGet() >= 0;
937,347
ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String modelFlag, String workId) throws Exception {<NEW_LINE>logger.debug(effectivePerson, "modelFlag:{}, workId:{}.", modelFlag, workId);<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>Model model = emc.flag(modelFlag, Model.class);<NEW_LINE>if (null == model) {<NEW_LINE>throw new ExceptionEntityNotExist(modelFlag, Model.class);<NEW_LINE>}<NEW_LINE>Work work = emc.flag(workId, Work.class);<NEW_LINE>if (null == work) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>List<Wo> wos = ThisApplication.context().applications().getQuery(x_query_service_processing.class, Applications.joinQueryUri("neural", "list", "calculate", "model", model.getId(), "work", work.getId())).getDataAsList(Wo.class);<NEW_LINE>result.setData(wos);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
ExceptionEntityNotExist(workId, Work.class);
1,628,626
public Response handle(CustomMessage message, DrillBuf dBody) throws RpcException {<NEW_LINE>final ParsingHandler<?, ?> handler;<NEW_LINE>try (@SuppressWarnings("unused") Closeable lock = read.open()) {<NEW_LINE>handler = handlers.get(message.getType());<NEW_LINE>}<NEW_LINE>if (handler == null) {<NEW_LINE>throw new UserRpcException(endpoint, "Unable to handle message.", new IllegalStateException(String.format("Unable to handle message. The message type provided [%d] did not have a registered handler.", message.getType())));<NEW_LINE>}<NEW_LINE>final CustomResponse<?> customResponse = handler.onMessage(message.getMessage(), dBody);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final CustomMessage responseMessage = CustomMessage.newBuilder().setMessage(ByteString.copyFrom(((Controller.CustomSerDe<Object>) handler.getResponseSerDe()).serializeToSend(customResponse.getMessage()))).setType(message.<MASK><NEW_LINE>// make sure we don't pass in a null array.<NEW_LINE>final ByteBuf[] dBodies = customResponse.getBodies() == null ? new DrillBuf[0] : customResponse.getBodies();<NEW_LINE>return new Response(RpcType.RESP_CUSTOM, responseMessage, dBodies);<NEW_LINE>}
getType()).build();
618,190
public void testSetDisableMessageID_TCP_SecOff(HttpServletRequest request, HttpServletResponse response) throws Throwable {<NEW_LINE>JMSContext jmsContextQCFTCP = qcfTCP.createContext();<NEW_LINE>emptyQueue(qcfTCP, queue1);<NEW_LINE>JMSConsumer <MASK><NEW_LINE>JMSProducer jmsProducer = jmsContextQCFTCP.createProducer();<NEW_LINE>boolean testFailed = false;<NEW_LINE>boolean defaultSetMessageID = jmsProducer.getDisableMessageID();<NEW_LINE>if (defaultSetMessageID) {<NEW_LINE>testFailed = true;<NEW_LINE>}<NEW_LINE>jmsProducer.setDisableMessageID(true);<NEW_LINE>TextMessage tmsg = jmsContextQCFTCP.createTextMessage();<NEW_LINE>jmsProducer.send(queue1, tmsg);<NEW_LINE>String msgID = jmsConsumer.receive(30000).getJMSMessageID();<NEW_LINE>if (msgID != null) {<NEW_LINE>testFailed = true;<NEW_LINE>}<NEW_LINE>jmsConsumer.close();<NEW_LINE>jmsContextQCFTCP.close();<NEW_LINE>if (testFailed) {<NEW_LINE>throw new Exception("testSetDisableMessageID_TCP_SecOff failed");<NEW_LINE>}<NEW_LINE>}
jmsConsumer = jmsContextQCFTCP.createConsumer(queue1);
1,380,383
public static void processParent(Class claz, Set configProperties) {<NEW_LINE>if (claz == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// process the methods<NEW_LINE>Method[<MASK><NEW_LINE>for (Method m : methods) {<NEW_LINE>ConfigProperty property = m.getAnnotation(ConfigProperty.class);<NEW_LINE>if (property != null) {<NEW_LINE>String result = validateMethod(m, property);<NEW_LINE>if (!result.equals(SUCCESS)) {<NEW_LINE>throw new IllegalStateException(result);<NEW_LINE>}<NEW_LINE>String defaultValue = property.defaultValue();<NEW_LINE>Class type = getType(property, m.getParameterTypes()[0]);<NEW_LINE>processConfigProperty(configProperties, m.getName().substring(3), property, defaultValue, type);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// process the fields<NEW_LINE>Field[] fields = claz.getDeclaredFields();<NEW_LINE>for (Field f : fields) {<NEW_LINE>ConfigProperty property = f.getAnnotation(ConfigProperty.class);<NEW_LINE>if (property != null) {<NEW_LINE>String status = validateField(f, property);<NEW_LINE>if (!status.equals(SUCCESS)) {<NEW_LINE>throw new IllegalStateException(status);<NEW_LINE>}<NEW_LINE>String defaultValue = property.defaultValue();<NEW_LINE>if (defaultValue == null || defaultValue.equals("")) {<NEW_LINE>defaultValue = deriveDefaultValueOfField(f);<NEW_LINE>}<NEW_LINE>processConfigProperty(configProperties, f.getName(), property, defaultValue, f.getType());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// process its super-class<NEW_LINE>if (claz.getSuperclass() != null) {<NEW_LINE>processParent(claz.getSuperclass(), configProperties);<NEW_LINE>}<NEW_LINE>}
] methods = claz.getDeclaredMethods();
1,584,664
public Ic3Data.Application buildPartial() {<NEW_LINE>Ic3Data.Application result = new Ic3Data.Application(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>result.name_ = name_;<NEW_LINE>if (((from_bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>to_bitField0_ |= 0x00000002;<NEW_LINE>}<NEW_LINE>result.version_ = version_;<NEW_LINE>if (permissionsBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000004) == 0x00000004)) {<NEW_LINE>permissions_ = java.util.Collections.unmodifiableList(permissions_);<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000004);<NEW_LINE>}<NEW_LINE>result.permissions_ = permissions_;<NEW_LINE>} else {<NEW_LINE>result.permissions_ = permissionsBuilder_.build();<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000008) == 0x00000008)) {<NEW_LINE>usedPermissions_ = new com.google.protobuf.UnmodifiableLazyStringList(usedPermissions_);<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000008);<NEW_LINE>}<NEW_LINE>result.usedPermissions_ = usedPermissions_;<NEW_LINE>if (componentsBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000010) == 0x00000010)) {<NEW_LINE>components_ = java.util.Collections.unmodifiableList(components_);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>result.components_ = components_;<NEW_LINE>} else {<NEW_LINE>result.components_ = componentsBuilder_.build();<NEW_LINE>}<NEW_LINE>if (((from_bitField0_ & 0x00000020) == 0x00000020)) {<NEW_LINE>to_bitField0_ |= 0x00000004;<NEW_LINE>}<NEW_LINE>result.analysisStart_ = analysisStart_;<NEW_LINE>if (((from_bitField0_ & 0x00000040) == 0x00000040)) {<NEW_LINE>to_bitField0_ |= 0x00000008;<NEW_LINE>}<NEW_LINE>result.analysisEnd_ = analysisEnd_;<NEW_LINE>if (((from_bitField0_ & 0x00000080) == 0x00000080)) {<NEW_LINE>to_bitField0_ |= 0x00000010;<NEW_LINE>}<NEW_LINE>result.sample_ = sample_;<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000010);