idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,394,825
private void validateChildReferenceTargetTypes(IBase theElement, String thePath) {<NEW_LINE>if (theElement == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>BaseRuntimeElementDefinition<?> def = myContext.getElementDefinition(theElement.getClass());<NEW_LINE>if (!(def instanceof BaseRuntimeElementCompositeDefinition)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>BaseRuntimeElementCompositeDefinition<?> cdef = (BaseRuntimeElementCompositeDefinition<?>) def;<NEW_LINE>for (BaseRuntimeChildDefinition nextChildDef : cdef.getChildren()) {<NEW_LINE>List<IBase> values = nextChildDef.getAccessor().getValues(theElement);<NEW_LINE>if (values == null || values.isEmpty()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String newPath = thePath + "." + nextChildDef.getElementName();<NEW_LINE>for (IBase nextChild : values) {<NEW_LINE>validateChildReferenceTargetTypes(nextChild, newPath);<NEW_LINE>}<NEW_LINE>if (nextChildDef instanceof RuntimeChildResourceDefinition) {<NEW_LINE>RuntimeChildResourceDefinition nextChildDefRes = (RuntimeChildResourceDefinition) nextChildDef;<NEW_LINE>Set<String> <MASK><NEW_LINE>boolean allowAny = false;<NEW_LINE>for (Class<? extends IBaseResource> nextValidType : nextChildDefRes.getResourceTypes()) {<NEW_LINE>if (nextValidType.isInterface()) {<NEW_LINE>allowAny = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>validTypes.add(getContext().getResourceType(nextValidType));<NEW_LINE>}<NEW_LINE>if (allowAny) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (getConfig().isEnforceReferenceTargetTypes()) {<NEW_LINE>for (IBase nextChild : values) {<NEW_LINE>IBaseReference nextRef = (IBaseReference) nextChild;<NEW_LINE>IIdType referencedId = nextRef.getReferenceElement();<NEW_LINE>if (!isBlank(referencedId.getResourceType())) {<NEW_LINE>if (!isLogicalReference(referencedId)) {<NEW_LINE>if (!referencedId.getValue().contains("?")) {<NEW_LINE>if (!validTypes.contains(referencedId.getResourceType())) {<NEW_LINE>throw new UnprocessableEntityException(Msg.code(931) + "Invalid reference found at path '" + newPath + "'. Resource type '" + referencedId.getResourceType() + "' is not valid for this path");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
validTypes = new HashSet<>();
1,624,831
private EhcachePersistentConcurrentOffHeapClockCache<K, OffHeapValueHolder<V>> createBackingMap(long size, Serializer<K> keySerializer, Serializer<V> valueSerializer, SwitchableEvictionAdvisor<K, OffHeapValueHolder<V>> evictionAdvisor) throws IOException {<NEW_LINE>File metadataFile = getMetadataFile();<NEW_LINE>try (FileOutputStream fos = new FileOutputStream(metadataFile)) {<NEW_LINE>Properties properties = new Properties();<NEW_LINE>properties.put(KEY_TYPE_PROPERTY_NAME, keyType.getName());<NEW_LINE>properties.put(VALUE_TYPE_PROPERTY_NAME, valueType.getName());<NEW_LINE>properties.store(fos, "Key and value types");<NEW_LINE>}<NEW_LINE>MappedPageSource source = new <MASK><NEW_LINE>PersistentPortability<K> keyPortability = persistent(new SerializerPortability<>(keySerializer));<NEW_LINE>PersistentPortability<OffHeapValueHolder<V>> valuePortability = persistent(createValuePortability(valueSerializer));<NEW_LINE>DiskWriteThreadPool writeWorkers = new DiskWriteThreadPool(executionService, threadPoolAlias, writerConcurrency);<NEW_LINE>Factory<FileBackedStorageEngine<K, OffHeapValueHolder<V>>> storageEngineFactory = FileBackedStorageEngine.createFactory(source, max((size / diskSegments) / 10, 1024), BYTES, keyPortability, valuePortability, writeWorkers, true);<NEW_LINE>EhcachePersistentSegmentFactory<K, OffHeapValueHolder<V>> factory = new EhcachePersistentSegmentFactory<>(source, storageEngineFactory, 64, evictionAdvisor, mapEvictionListener, true);<NEW_LINE>return new EhcachePersistentConcurrentOffHeapClockCache<>(evictionAdvisor, factory, diskSegments);<NEW_LINE>}
MappedPageSource(getDataFile(), size);
1,553,070
private void generateArrayInit(final EncogProgramNode node) {<NEW_LINE>final StringBuilder line = new StringBuilder();<NEW_LINE>line.append("public static readonly double[] ");<NEW_LINE>line.append(node.getName());<NEW_LINE>line.append(" = {");<NEW_LINE>indentLine(line.toString());<NEW_LINE>final double[] a = (double[]) node.getArgs().<MASK><NEW_LINE>line.setLength(0);<NEW_LINE>int lineCount = 0;<NEW_LINE>for (int i = 0; i < a.length; i++) {<NEW_LINE>line.append(CSVFormat.EG_FORMAT.format(a[i], Encog.DEFAULT_PRECISION));<NEW_LINE>if (i < (a.length - 1)) {<NEW_LINE>line.append(",");<NEW_LINE>}<NEW_LINE>lineCount++;<NEW_LINE>if (lineCount >= 10) {<NEW_LINE>addLine(line.toString());<NEW_LINE>line.setLength(0);<NEW_LINE>lineCount = 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (line.length() > 0) {<NEW_LINE>addLine(line.toString());<NEW_LINE>line.setLength(0);<NEW_LINE>}<NEW_LINE>unIndentLine("};");<NEW_LINE>}
get(0).getValue();
119,586
private void j9threadCommand(String[] args, PrintStream out) throws DDRInteractiveCommandException {<NEW_LINE>if (args.length < 2) {<NEW_LINE>out.println("This command takes one address argument: \"!monitors j9thread <address>\"");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>long address = CommandUtils.parsePointer(args[1], J9BuildFlags.env_data64);<NEW_LINE>VoidPointer <MASK><NEW_LINE>J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());<NEW_LINE>J9VMThreadPointer mainThread = vm.mainThread();<NEW_LINE>if (mainThread.isNull() || mainThread.osThread().isNull() || mainThread.osThread().library().isNull()) {<NEW_LINE>throw new CorruptDataException("Cannot locate thread library");<NEW_LINE>}<NEW_LINE>J9ThreadLibraryPointer lib = mainThread.osThread().library();<NEW_LINE>J9PoolPointer pool = lib.thread_pool();<NEW_LINE>Pool<J9ThreadPointer> threadPool = Pool.fromJ9Pool(pool, J9ThreadPointer.class);<NEW_LINE>SlotIterator<J9ThreadPointer> poolIterator = threadPool.iterator();<NEW_LINE>J9ThreadPointer osThreadPtr = null;<NEW_LINE>while (poolIterator.hasNext()) {<NEW_LINE>if (ptr.equals(poolIterator.next())) {<NEW_LINE>osThreadPtr = J9ThreadPointer.cast(ptr);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (null == osThreadPtr) {<NEW_LINE>throw new DDRInteractiveCommandException(String.format("Could not find any j9thread at address %s\n", ptr.getHexAddress()));<NEW_LINE>}<NEW_LINE>// Is there an associated J9VMThread?<NEW_LINE>J9VMThreadPointer vmThread = J9ThreadHelper.getVMThread(osThreadPtr);<NEW_LINE>// Step 1: Print the general info for the VM and native threads:<NEW_LINE>out.println(String.format("%s\t%s\t// %s", osThreadPtr.formatShortInteractive(), vmThread.notNull() ? vmThread.formatShortInteractive() : "<none>", vmThread.notNull() ? J9VMThreadHelper.getName(vmThread) : "[osthread]"));<NEW_LINE>printMonitorsForJ9Thread(out, vm, osThreadPtr);<NEW_LINE>} catch (CorruptDataException e) {<NEW_LINE>throw new DDRInteractiveCommandException(e);<NEW_LINE>}<NEW_LINE>}
ptr = VoidPointer.cast(address);
457,109
public static Object invoke(Object target, Class<?> clazz, String methodName, Class<?>[] parameterTypes, Object... args) {<NEW_LINE>try {<NEW_LINE>Method method = null;<NEW_LINE>try {<NEW_LINE>method = clazz.getMethod(methodName, parameterTypes);<NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>method = clazz.getDeclaredMethod(methodName, parameterTypes);<NEW_LINE>}<NEW_LINE>method.setAccessible(true);<NEW_LINE>return <MASK><NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new IllegalArgumentException(String.format("Illegal arguments method %s.%s(%s) on %s, params %s", clazz.getName(), methodName, Arrays.toString(parameterTypes), target, Arrays.toString(args)), e);<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>throw new IllegalStateException(String.format("Error invoking method %s.%s(%s) on %s, params %s", clazz.getName(), methodName, Arrays.toString(parameterTypes), target, Arrays.toString(args)), e);<NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>throw new IllegalArgumentException(String.format("No such method %s.%s(%s) on %s, params %s", clazz.getName(), methodName, Arrays.toString(parameterTypes), target, Arrays.toString(args)), e);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>throw new IllegalArgumentException(String.format("No such method %s.%s(%s) on %s, params %s", clazz.getName(), methodName, Arrays.toString(parameterTypes), target, Arrays.toString(args)), e);<NEW_LINE>}<NEW_LINE>}
method.invoke(target, args);
312,874
public Packet nextFrame() {<NEW_LINE><MASK><NEW_LINE>NALUnit prevNu = null;<NEW_LINE>SliceHeader prevSh = null;<NEW_LINE>while (true) {<NEW_LINE>bb.mark();<NEW_LINE>ByteBuffer buf = H264Utils.nextNALUnit(bb);<NEW_LINE>if (buf == null)<NEW_LINE>break;<NEW_LINE>// NIOUtils.skip(buf, 4);<NEW_LINE>NALUnit nu = NALUnit.read(buf);<NEW_LINE>if (nu.type == NALUnitType.IDR_SLICE || nu.type == NALUnitType.NON_IDR_SLICE) {<NEW_LINE>SliceHeader sh = readSliceHeader(buf, nu);<NEW_LINE>if (prevNu != null && prevSh != null && !sameFrame(prevNu, nu, prevSh, sh)) {<NEW_LINE>bb.reset();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>prevSh = sh;<NEW_LINE>prevNu = nu;<NEW_LINE>} else if (nu.type == NALUnitType.PPS) {<NEW_LINE>PictureParameterSet read = PictureParameterSet.read(buf);<NEW_LINE>pps.put(read.picParameterSetId, read);<NEW_LINE>} else if (nu.type == NALUnitType.SPS) {<NEW_LINE>SeqParameterSet read = SeqParameterSet.read(buf);<NEW_LINE>sps.put(read.seqParameterSetId, read);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.limit(bb.position());<NEW_LINE>return prevSh == null ? null : detectPoc(result, prevNu, prevSh);<NEW_LINE>}
ByteBuffer result = bb.duplicate();
708,029
private Response samlErrorMessage(AuthenticationSessionModel authSession, SamlClient samlClient, boolean isPostBinding, String destination, JBossSAMLURIConstants statusDetail, String relayState) {<NEW_LINE>JaxrsSAML2BindingBuilder binding = new JaxrsSAML2BindingBuilder(session).relayState(relayState);<NEW_LINE>SAML2ErrorResponseBuilder builder = new SAML2ErrorResponseBuilder().destination(destination).issuer(getResponseIssuer(realm)).status(statusDetail.get());<NEW_LINE>KeyManager keyManager = session.keys();<NEW_LINE>if (samlClient.requiresRealmSignature()) {<NEW_LINE>KeyManager.ActiveRsaKey keys = keyManager.getActiveRsaKey(realm);<NEW_LINE>String keyName = samlClient.getXmlSigKeyInfoKeyNameTransformer().getKeyName(keys.getKid(), keys.getCertificate());<NEW_LINE><MASK><NEW_LINE>if (canonicalization != null) {<NEW_LINE>binding.canonicalizationMethod(canonicalization);<NEW_LINE>}<NEW_LINE>binding.signatureAlgorithm(samlClient.getSignatureAlgorithm()).signWith(keyName, keys.getPrivateKey(), keys.getPublicKey(), keys.getCertificate()).signDocument();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// There is no support for encrypting status messages in SAML.<NEW_LINE>// Only assertions, attributes, base ID and name ID can be encrypted<NEW_LINE>// See Chapter 6 of saml-core-2.0-os.pdf<NEW_LINE>Document document = builder.buildDocument();<NEW_LINE>return buildErrorResponse(isPostBinding, destination, binding, document);<NEW_LINE>} catch (Exception e) {<NEW_LINE>return ErrorPage.error(session, authSession, Response.Status.BAD_REQUEST, Messages.FAILED_TO_PROCESS_RESPONSE);<NEW_LINE>}<NEW_LINE>}
String canonicalization = samlClient.getCanonicalizationMethod();
47,672
private void createExitStateForNewSegmentEarlyExit(StructuredGraph graph, LoopExitNode exit, LoopExitNode lex, EconomicMap<Node, Node> new2OldPhis) {<NEW_LINE>assert exit.stateAfter() != null;<NEW_LINE>FrameState exitState = exit.stateAfter();<NEW_LINE>FrameState duplicate = exitState.duplicateWithVirtualState();<NEW_LINE>graph.getDebug().dump(DebugContext.VERY_DETAILED_LEVEL, graph, "After duplicating state %s for new exit %s", exitState, lex);<NEW_LINE>duplicate.applyToNonVirtual(new NodePositionClosure<>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void apply(Node from, Position p) {<NEW_LINE>ValueNode to = (<MASK><NEW_LINE>// all inputs that are proxied need replacing the other ones are implicitly not<NEW_LINE>// produced inside this loop<NEW_LINE>if (to instanceof ProxyNode) {<NEW_LINE>ProxyNode originalProxy = (ProxyNode) to;<NEW_LINE>if (originalProxy.proxyPoint() == exit) {<NEW_LINE>// create a new proxy for this value<NEW_LINE>ValueNode replacement = getNodeInExitPathFromUnrolledSegment(originalProxy, new2OldPhis);<NEW_LINE>assert replacement != null : originalProxy;<NEW_LINE>p.set(from, originalProxy.duplicateOn(lex, replacement));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (original().contains(to)) {<NEW_LINE>ValueNode replacement = getDuplicatedNode(to);<NEW_LINE>assert replacement != null;<NEW_LINE>p.set(from, replacement);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>graph.getDebug().dump(DebugContext.VERY_DETAILED_LEVEL, graph, "After duplicating state replacing values with inputs proxied %s", duplicate);<NEW_LINE>lex.setStateAfter(duplicate);<NEW_LINE>}
ValueNode) p.get(from);
1,571,392
private void heightChangeUpdate(int endIndex, double endYR, double deltaY) {<NEW_LINE>if (gapStorage != null) {<NEW_LINE>gapStorage.visualGapStart = endYR;<NEW_LINE>gapStorage.visualGapLength -= deltaY;<NEW_LINE>gapStorage.visualGapIndex = endIndex;<NEW_LINE>} else {<NEW_LINE>// No gapStorage<NEW_LINE>if (deltaY != 0d) {<NEW_LINE>int pCount = size();<NEW_LINE>if (pCount > ViewGapStorage.GAP_STORAGE_THRESHOLD) {<NEW_LINE>// Only for visual gap<NEW_LINE>gapStorage = new ViewGapStorage();<NEW_LINE>gapStorage.initVisualGap(endIndex, endYR);<NEW_LINE>// To shift above visual gap<NEW_LINE>deltaY += gapStorage.visualGapLength;<NEW_LINE>}<NEW_LINE>for (; endIndex < pCount; endIndex++) {<NEW_LINE>EditorView view = get(endIndex);<NEW_LINE>view.setRawEndVisualOffset(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
view.getRawEndVisualOffset() + deltaY);
1,253,398
public static void kustoScriptsCreateOrUpdate(com.azure.resourcemanager.kusto.KustoManager manager) {<NEW_LINE>manager.scripts().define("kustoScript").withExistingDatabase("kustorptest", "kustoCluster", "KustoDatabase8").withScriptUrl("https://mysa.blob.core.windows.net/container/script.txt").withScriptUrlSasToken("?sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=********************************").withForceUpdateTag("2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe").<MASK><NEW_LINE>}
withContinueOnErrors(true).create();
1,787,947
private SelectIntoOperator parseAndConstructSelectIntoOperator(IoTDBSqlParser.SelectStatementContext ctx) {<NEW_LINE>if (queryOp.getFromComponent().getPrefixPaths().size() != 1) {<NEW_LINE>throw new SQLParserException("select into: the number of prefix paths in the from clause should be 1.");<NEW_LINE>}<NEW_LINE>int sourcePathsCount = queryOp.getSelectComponent().getResultColumns().size();<NEW_LINE>if (sourcePathsCount != ctx.intoClause().intoPath().size()) {<NEW_LINE>throw new SQLParserException("select into: the number of source paths and the number of target paths should be the same.");<NEW_LINE>}<NEW_LINE>SelectIntoOperator selectIntoOperator = new SelectIntoOperator();<NEW_LINE>selectIntoOperator.setQueryOperator(queryOp);<NEW_LINE>List<PartialPath> <MASK><NEW_LINE>for (int i = 0; i < sourcePathsCount; ++i) {<NEW_LINE>intoPaths.add(parseIntoPath(ctx.intoClause().intoPath(i)));<NEW_LINE>}<NEW_LINE>selectIntoOperator.setIntoPaths(intoPaths);<NEW_LINE>selectIntoOperator.setIntoPathsAligned(ctx.intoClause().ALIGNED() != null);<NEW_LINE>return selectIntoOperator;<NEW_LINE>}
intoPaths = new ArrayList<>();
288,471
protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {<NEW_LINE>UserTask userTask = (UserTask) element;<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_ASSIGNEE, userTask.getAssignee(), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_OWNER, userTask.getOwner(), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_CANDIDATEUSERS, convertToDelimitedString(userTask.getCandidateUsers()), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_CANDIDATEGROUPS, convertToDelimitedString(userTask.getCandidateGroups()), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_DUEDATE, userTask.getDueDate(), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_BUSINESS_CALENDAR_NAME, userTask.getBusinessCalendarName(), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_CATEGORY, userTask.getCategory(), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_FORM_FORMKEY, userTask.getFormKey(), xtw);<NEW_LINE>if (userTask.getPriority() != null) {<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_PRIORITY, userTask.getPriority().toString(), xtw);<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(userTask.getExtensionId())) {<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_SERVICE_EXTENSIONID, <MASK><NEW_LINE>}<NEW_LINE>if (userTask.getSkipExpression() != null) {<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_SKIP_EXPRESSION, userTask.getSkipExpression(), xtw);<NEW_LINE>}<NEW_LINE>// write custom attributes<NEW_LINE>BpmnXMLUtil.writeCustomAttributes(userTask.getAttributes().values(), xtw, defaultElementAttributes, defaultActivityAttributes, defaultUserTaskAttributes);<NEW_LINE>}
userTask.getExtensionId(), xtw);
1,693,133
public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] bytes) throws IllegalClassFormatException {<NEW_LINE>try {<NEW_LINE>if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {<NEW_LINE>log.info("> (loader=" + loader + " className=" + className + ", classBeingRedefined=" + classBeingRedefined + ", protectedDomain=" + (protectionDomain != null) + ", bytes= " + (bytes == null ? "null" : bytes.length));<NEW_LINE>}<NEW_LINE>// TODO determine if this is the right behaviour for hot code replace:<NEW_LINE>// Handling class redefinition (hot code replace) - what to do depends on whether the type is a reloadable type or not<NEW_LINE>// If reloadable - return the class as originally defined, and treat this new input data as the new version to make live<NEW_LINE>// If not-reloadable - rewrite the call sites and attempt hot code replace<NEW_LINE>if (classBeingRedefined != null) {<NEW_LINE>// pretend no-one attempted the reload by returning original bytes. The 'watcher' for the class<NEW_LINE>// should see the changes and pick them up. Should we force it here?<NEW_LINE>TypeRegistry typeRegistry = TypeRegistry.getTypeRegistryFor(loader);<NEW_LINE>if (typeRegistry == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>boolean isRTN = typeRegistry.isReloadableTypeName(className);<NEW_LINE>if (isRTN) {<NEW_LINE>ReloadableType rtype = <MASK><NEW_LINE>// CurrentLiveVersion clv = rtype.getLiveVersion();<NEW_LINE>// String suffix = "0";<NEW_LINE>// if (clv != null) {<NEW_LINE>// suffix = clv.getVersionStamp() + "H";<NEW_LINE>// }<NEW_LINE>// rtype.loadNewVersion(suffix, bytes);<NEW_LINE>if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {<NEW_LINE>log.info("Tricking HCR for " + className);<NEW_LINE>}<NEW_LINE>// returning original bytes<NEW_LINE>return rtype.bytesLoaded;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// System.err.println("transform(" + loader.getClass().getName() + ",classname=" + className +<NEW_LINE>// ",classBeingRedefined=" + classBeingRedefined + ",protectionDomain=" + protectionDomain + ")");<NEW_LINE>return preProcessor.preProcess(loader, className, protectionDomain, bytes);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>new RuntimeException("Reloading agent exited via exception, please raise a jira", t).printStackTrace();<NEW_LINE>return bytes;<NEW_LINE>}<NEW_LINE>}
typeRegistry.getReloadableType(className, false);
164,460
protected void addY(int yOffset) {<NEW_LINE>if (yOffset == 0f)<NEW_LINE>return;<NEW_LINE>if (isYspaceFor(yOffset)) {<NEW_LINE>m_position[m_area].y += yOffset;<NEW_LINE>if (log.isLoggable(Level.FINEST))<NEW_LINE>log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y);<NEW_LINE>} else if (m_area == AREA_CONTENT) {<NEW_LINE>if (log.isLoggable(Level.FINEST))<NEW_LINE>log.finest("Not enough Y space " + m_lastHeight[m_area] + " - remaining " + getYspace() + " - Area=" + m_area);<NEW_LINE>newPage(true, true);<NEW_LINE>if (log.isLoggable(Level.FINEST))<NEW_LINE>log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" <MASK><NEW_LINE>} else {<NEW_LINE>m_position[m_area].y += yOffset;<NEW_LINE>log.log(Level.SEVERE, "Outside of Area: " + m_position);<NEW_LINE>}<NEW_LINE>}
+ m_position[m_area].y);
978,004
private void remoteCodeFirstPojo_testMap(CodeFirstPojoIntf codeFirst) {<NEW_LINE>Map<String, String> userMap = new HashMap<>();<NEW_LINE>userMap.put("u1", "u1");<NEW_LINE>userMap.put("u2", null);<NEW_LINE>Map<String, String> <MASK><NEW_LINE>TestMgr.check(result.get("u1"), "u1");<NEW_LINE>TestMgr.check(result.get("u2"), null);<NEW_LINE>userMap = new HashMap<>();<NEW_LINE>userMap.put("u1", "u1");<NEW_LINE>userMap.put("u2", "u2");<NEW_LINE>result = codeFirst.testMap(userMap);<NEW_LINE>TestMgr.check(result.get("u1"), "u1");<NEW_LINE>TestMgr.check(result.get("u2"), "u2");<NEW_LINE>// test large data more than 20M<NEW_LINE>// can not run the test case in CI , because will cause heap size limit<NEW_LINE>// char[] data = new char[30 * 1024 * 1024];<NEW_LINE>// Arrays.fill(data, 'h');<NEW_LINE>// userMap = new HashMap<>();<NEW_LINE>// userMap.put("u1", "u1");<NEW_LINE>// userMap.put("u2", "u2");<NEW_LINE>// userMap.put("u3", new String(data));<NEW_LINE>// result = codeFirst.testMap(userMap);<NEW_LINE>//<NEW_LINE>// TestMgr.check(result.get("u1"), "u1");<NEW_LINE>// TestMgr.check(result.get("u2"), "u2");<NEW_LINE>// TestMgr.check(result.get("u3"), new String(data));<NEW_LINE>}
result = codeFirst.testMap(userMap);
1,209,408
public void splitBefore(Staff pivotStaff, Part partBelow) {<NEW_LINE>final Measure measureBelow = new Measure(partBelow);<NEW_LINE>final List<Staff> stavesBelow = partBelow.getStaves();<NEW_LINE>// Barlines<NEW_LINE>if (leftBarline != null) {<NEW_LINE>measureBelow.leftBarline = leftBarline.splitBefore(pivotStaff);<NEW_LINE>}<NEW_LINE>if (midBarline != null) {<NEW_LINE>measureBelow.midBarline = midBarline.splitBefore(pivotStaff);<NEW_LINE>}<NEW_LINE>if (rightBarline != null) {<NEW_LINE>measureBelow.rightBarline = rightBarline.splitBefore(pivotStaff);<NEW_LINE>}<NEW_LINE>splitCollectionBefore(stavesBelow, measureBelow, keys);<NEW_LINE>splitCollectionBefore(stavesBelow, measureBelow, clefs);<NEW_LINE>// Useful???<NEW_LINE>Collections.sort(measureBelow.clefs, Inters.byFullCenterAbscissa);<NEW_LINE>splitCollectionBefore(stavesBelow, measureBelow, timeSigs);<NEW_LINE>splitCollectionBefore(stavesBelow, measureBelow, headChords);<NEW_LINE><MASK><NEW_LINE>splitCollectionBefore(stavesBelow, measureBelow, flags);<NEW_LINE>splitCollectionBefore(stavesBelow, measureBelow, tuplets);<NEW_LINE>splitCollectionBefore(stavesBelow, measureBelow, augDots);<NEW_LINE>// Voices: rhythm is reprocessed when part is vertically split (brace removal)<NEW_LINE>//<NEW_LINE>measureBelow.switchItemsPart(partBelow);<NEW_LINE>partBelow.addMeasure(measureBelow);<NEW_LINE>measureBelow.setStack(stack);<NEW_LINE>}
splitCollectionBefore(stavesBelow, measureBelow, restChords);
940,678
public Status addLearners(final String groupId, final Configuration conf, final List<PeerId> learners) {<NEW_LINE>checkLearnersOpParams(groupId, conf, learners);<NEW_LINE><MASK><NEW_LINE>final Status st = getLeader(groupId, conf, leaderId);<NEW_LINE>if (!st.isOk()) {<NEW_LINE>return st;<NEW_LINE>}<NEW_LINE>if (!this.cliClientService.connect(leaderId.getEndpoint())) {<NEW_LINE>return new Status(-1, "Fail to init channel to leader %s", leaderId);<NEW_LINE>}<NEW_LINE>final //<NEW_LINE>AddLearnersRequest.Builder //<NEW_LINE>rb = //<NEW_LINE>AddLearnersRequest.newBuilder().//<NEW_LINE>setGroupId(groupId).setLeaderId(leaderId.toString());<NEW_LINE>for (final PeerId peer : learners) {<NEW_LINE>rb.addLearners(peer.toString());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final Message result = this.cliClientService.addLearners(leaderId.getEndpoint(), rb.build(), null).get();<NEW_LINE>return processLearnersOpResponse(groupId, result, "adding learners: %s", learners);<NEW_LINE>} catch (final Exception e) {<NEW_LINE>return new Status(-1, e.getMessage());<NEW_LINE>}<NEW_LINE>}
final PeerId leaderId = new PeerId();
608,771
protected boolean doGeneric(JSDynamicObject proxy, Object receiver, Object value, Object key, @Cached("createBinaryProfile()") ConditionProfile hasTrap, @Cached JSClassProfile targetClassProfile) {<NEW_LINE>assert JSProxy.isJSProxy(proxy);<NEW_LINE>assert !(key instanceof HiddenKey);<NEW_LINE>Object propertyKey = toPropertyKey(key);<NEW_LINE>JSDynamicObject handler = JSProxy.getHandlerChecked(proxy, errorBranch);<NEW_LINE>Object target = JSProxy.getTarget(proxy);<NEW_LINE>Object trapFun = trapGet.executeWithTarget(handler);<NEW_LINE>if (hasTrap.profile(trapFun == Undefined.instance)) {<NEW_LINE>if (JSDynamicObject.isJSDynamicObject(target)) {<NEW_LINE>return JSObject.setWithReceiver((JSDynamicObject) target, propertyKey, value, receiver, isStrict, targetClassProfile, this);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Object trapResult = call.executeCall(JSArguments.create(handler, trapFun, target, propertyKey, value, receiver));<NEW_LINE>boolean booleanTrapResult = toBoolean.executeBoolean(trapResult);<NEW_LINE>if (!booleanTrapResult) {<NEW_LINE>errorBranch.enter();<NEW_LINE>if (isStrict) {<NEW_LINE>throw Errors.createTypeErrorTrapReturnedFalsish(JSProxy.SET, propertyKey);<NEW_LINE>} else {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (handler instanceof JSUncheckedProxyHandlerObject) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return JSProxy.checkProxySetTrapInvariants(proxy, propertyKey, value);<NEW_LINE>}
truffleWrite(target, propertyKey, value);
756,523
final ListOpenIDConnectProvidersResult executeListOpenIDConnectProviders(ListOpenIDConnectProvidersRequest listOpenIDConnectProvidersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listOpenIDConnectProvidersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListOpenIDConnectProvidersRequest> request = null;<NEW_LINE>Response<ListOpenIDConnectProvidersResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListOpenIDConnectProvidersRequestMarshaller().marshall(super.beforeMarshalling(listOpenIDConnectProvidersRequest));<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, "IAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListOpenIDConnectProviders");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ListOpenIDConnectProvidersResult> responseHandler = new StaxResponseHandler<<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>}
ListOpenIDConnectProvidersResult>(new ListOpenIDConnectProvidersResultStaxUnmarshaller());
1,832,597
public void marshall(CreateRecommenderConfiguration createRecommenderConfiguration, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createRecommenderConfiguration == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createRecommenderConfiguration.getAttributes(), ATTRIBUTES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRecommenderConfiguration.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createRecommenderConfiguration.getRecommendationProviderIdType(), RECOMMENDATIONPROVIDERIDTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRecommenderConfiguration.getRecommendationProviderRoleArn(), RECOMMENDATIONPROVIDERROLEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRecommenderConfiguration.getRecommendationProviderUri(), RECOMMENDATIONPROVIDERURI_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRecommenderConfiguration.getRecommendationTransformerUri(), RECOMMENDATIONTRANSFORMERURI_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRecommenderConfiguration.getRecommendationsDisplayName(), RECOMMENDATIONSDISPLAYNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createRecommenderConfiguration.getRecommendationsPerMessage(), RECOMMENDATIONSPERMESSAGE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createRecommenderConfiguration.getName(), NAME_BINDING);
679,247
public boolean verifyPassword(KeyPair keyPair, X509Certificate x509) throws GeneralSecurityException {<NEW_LINE>AgileEncryptionVerifier ver = <MASK><NEW_LINE>AgileEncryptionHeader header = (AgileEncryptionHeader) builder.getHeader();<NEW_LINE>HashAlgorithm hashAlgo = header.getHashAlgorithmEx();<NEW_LINE>CipherAlgorithm cipherAlgo = header.getCipherAlgorithm();<NEW_LINE>int blockSize = header.getBlockSize();<NEW_LINE>AgileCertificateEntry ace = null;<NEW_LINE>for (AgileCertificateEntry aceEntry : ver.getCertificates()) {<NEW_LINE>if (x509.equals(aceEntry.x509)) {<NEW_LINE>ace = aceEntry;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (ace == null)<NEW_LINE>return false;<NEW_LINE>Cipher cipher = Cipher.getInstance("RSA");<NEW_LINE>cipher.init(Cipher.DECRYPT_MODE, keyPair.getPrivate());<NEW_LINE>byte[] keyspec = cipher.doFinal(ace.encryptedKey);<NEW_LINE>SecretKeySpec secretKey = new SecretKeySpec(keyspec, ver.getCipherAlgorithm().jceId);<NEW_LINE>Mac x509Hmac = CryptoFunctions.getMac(hashAlgo);<NEW_LINE>x509Hmac.init(secretKey);<NEW_LINE>byte[] certVerifier = x509Hmac.doFinal(ace.x509.getEncoded());<NEW_LINE>byte[] vec = CryptoFunctions.generateIv(hashAlgo, header.getKeySalt(), kIntegrityKeyBlock, blockSize);<NEW_LINE>cipher = getCipher(secretKey, cipherAlgo, ver.getChainingMode(), vec, Cipher.DECRYPT_MODE);<NEW_LINE>byte[] hmacKey = cipher.doFinal(header.getEncryptedHmacKey());<NEW_LINE>hmacKey = getBlock0(hmacKey, hashAlgo.hashSize);<NEW_LINE>vec = CryptoFunctions.generateIv(hashAlgo, header.getKeySalt(), kIntegrityValueBlock, blockSize);<NEW_LINE>cipher = getCipher(secretKey, cipherAlgo, ver.getChainingMode(), vec, Cipher.DECRYPT_MODE);<NEW_LINE>byte[] hmacValue = cipher.doFinal(header.getEncryptedHmacValue());<NEW_LINE>hmacValue = getBlock0(hmacValue, hashAlgo.hashSize);<NEW_LINE>if (Arrays.equals(ace.certVerifier, certVerifier)) {<NEW_LINE>setSecretKey(secretKey);<NEW_LINE>setIntegrityHmacKey(hmacKey);<NEW_LINE>setIntegrityHmacValue(hmacValue);<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
(AgileEncryptionVerifier) builder.getVerifier();
1,542,696
final BatchDetectSentimentResult executeBatchDetectSentiment(BatchDetectSentimentRequest batchDetectSentimentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDetectSentimentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchDetectSentimentRequest> request = null;<NEW_LINE>Response<BatchDetectSentimentResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchDetectSentimentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchDetectSentimentRequest));<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, "Comprehend");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchDetectSentimentResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchDetectSentimentResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDetectSentiment");
1,086,378
private void fillTopRepos(Collection<Repository> topRepos) {<NEW_LINE>View progress = mContentView.findViewById(R.id.pb_top_repos);<NEW_LINE>LinearLayout ll = mContentView.findViewById(R.id.ll_top_repos);<NEW_LINE>ll.removeAllViews();<NEW_LINE>LayoutInflater inflater = getLayoutInflater();<NEW_LINE>if (topRepos != null) {<NEW_LINE>for (Repository repo : topRepos) {<NEW_LINE>View rowView = inflater.inflate(R.layout.top_repo, null);<NEW_LINE>rowView.setOnClickListener(this);<NEW_LINE>rowView.setTag(repo);<NEW_LINE>TextView tvTitle = rowView.findViewById(R.id.tv_title);<NEW_LINE>tvTitle.setText(ApiHelpers.formatRepoName(getActivity(), repo));<NEW_LINE>TextView tvDesc = rowView.findViewById(R.id.tv_desc);<NEW_LINE>if (!StringUtils.isBlank(repo.description())) {<NEW_LINE>tvDesc.setVisibility(View.VISIBLE);<NEW_LINE>tvDesc.setText(repo.description());<NEW_LINE>} else {<NEW_LINE>tvDesc.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>TextView tvForks = rowView.findViewById(R.id.tv_forks);<NEW_LINE>tvForks.setText(String.valueOf(repo.forksCount()));<NEW_LINE>TextView tvStars = rowView.findViewById(R.id.tv_stars);<NEW_LINE>tvStars.setText(String.valueOf(repo.stargazersCount()));<NEW_LINE>ll.addView(rowView);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>View btnMore = getView().<MASK><NEW_LINE>if (topRepos != null && !topRepos.isEmpty()) {<NEW_LINE>btnMore.setOnClickListener(this);<NEW_LINE>btnMore.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>TextView hintView = (TextView) inflater.inflate(R.layout.hint_view, ll, false);<NEW_LINE>hintView.setText(R.string.user_no_repos);<NEW_LINE>ll.addView(hintView);<NEW_LINE>}<NEW_LINE>ll.setVisibility(View.VISIBLE);<NEW_LINE>progress.setVisibility(View.GONE);<NEW_LINE>}
findViewById(R.id.btn_repos);
190,302
public boolean execute(CommandSender sender, String label, String[] args, CommandMessages messages) {<NEW_LINE>if (!testPermission(sender, messages.getPermissionMessage())) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (args.length != 1) {<NEW_LINE>sendUsageMessage(sender, messages);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String name = args[0];<NEW_LINE>GlowServer server = (GlowServer) ServerProvider.getServer();<NEW_LINE>// asynchronously lookup player<NEW_LINE>server.getOfflinePlayerAsync(name).whenCompleteAsync((player, ex) -> {<NEW_LINE>if (ex != null) {<NEW_LINE>new LocalizedStringImpl("deop.failed", messages.getResourceBundle()).sendInColor(ChatColor.RED, sender, name, ex.getMessage());<NEW_LINE>ConsoleMessages.Error.Command.DEOP_FAILED.log(ex, name);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (player.isOp()) {<NEW_LINE>player.setOp(false);<NEW_LINE>new LocalizedStringImpl("deop.done", messages.getResourceBundle()).send(sender, name);<NEW_LINE>} else {<NEW_LINE>new LocalizedStringImpl("deop.not-op", messages.getResourceBundle()).sendInColor(<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>// todo: asynchronous command callbacks?<NEW_LINE>return true;<NEW_LINE>}
ChatColor.RED, sender, name);
288,104
private List<String> fetchPluginsFromUrl(final String url) {<NEW_LINE>final List<String> <MASK><NEW_LINE>try {<NEW_LINE>final URL esUrl = new URL(url + "/_cat/plugins?format=json&local=true");<NEW_LINE>final HttpURLConnection conn = (HttpURLConnection) esUrl.openConnection();<NEW_LINE>conn.setRequestMethod("GET");<NEW_LINE>conn.setConnectTimeout(1000);<NEW_LINE>conn.connect();<NEW_LINE>if (conn.getResponseCode() == 200) {<NEW_LINE>final StringBuilder json = new StringBuilder();<NEW_LINE>final Scanner scanner = new Scanner(esUrl.openStream());<NEW_LINE>while (scanner.hasNext()) {<NEW_LINE>json.append(scanner.nextLine());<NEW_LINE>}<NEW_LINE>scanner.close();<NEW_LINE>final ObjectMapper mapper = new ObjectMapper();<NEW_LINE>final Map<String, String>[] response = mapper.readValue(json.toString(), Map[].class);<NEW_LINE>for (Map<String, String> plugin : response) {<NEW_LINE>plugins.add(plugin.get("component"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return plugins;<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException("Error retrieving elasticsearch plugin details, " + e);<NEW_LINE>}<NEW_LINE>}
plugins = new ArrayList<>();
854,884
public QueryExecutionContext unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>QueryExecutionContext queryExecutionContext = new QueryExecutionContext();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><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("Database", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>queryExecutionContext.setDatabase(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Catalog", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>queryExecutionContext.setCatalog(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 queryExecutionContext;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,633,129
public String quotedContent(String boldOpenTag, String boldCloseTag, String separatorTag, boolean inAttribute) {<NEW_LINE>StringBuilder xml = new StringBuilder();<NEW_LINE>Iterator<FieldPart> iter <MASK><NEW_LINE>while (iter.hasNext()) {<NEW_LINE>FieldPart f = iter.next();<NEW_LINE>if (f instanceof BoldOpenFieldPart && boldOpenTag != null && boldOpenTag.length() > 0)<NEW_LINE>xml.append(boldOpenTag);<NEW_LINE>else if (f instanceof BoldCloseFieldPart && boldCloseTag != null && boldCloseTag.length() > 0)<NEW_LINE>xml.append(boldCloseTag);<NEW_LINE>else if (f instanceof SeparatorFieldPart && separatorTag != null && separatorTag.length() > 0)<NEW_LINE>xml.append(separatorTag);<NEW_LINE>else if (f.isFinal())<NEW_LINE>xml.append(f.getContent());<NEW_LINE>else<NEW_LINE>xml.append(XML.xmlEscape(f.getContent(), inAttribute));<NEW_LINE>}<NEW_LINE>return xml.toString();<NEW_LINE>}
= ensureTokenized().iterator();
1,210,783
private boolean waitForCondition(Condition condition, final long timeoutMs) {<NEW_LINE>Exception finalException = null;<NEW_LINE><MASK><NEW_LINE>int numErrors = 0;<NEW_LINE>int numIters = 0;<NEW_LINE>String errorMessage = null;<NEW_LINE>do {<NEW_LINE>try {<NEW_LINE>if (injectWaitError) {<NEW_LINE>Thread.sleep(AsyncYBClient.SLEEP_TIME);<NEW_LINE>injectWaitError = false;<NEW_LINE>String msg = "Simulated expection due to injected error.";<NEW_LINE>LOG.info(msg);<NEW_LINE>throw new RuntimeException(msg);<NEW_LINE>}<NEW_LINE>if (condition.get()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>// We will get exceptions if we cannot connect to the other end. Catch them and save for<NEW_LINE>// final debug if we never succeed.<NEW_LINE>finalException = e;<NEW_LINE>numErrors++;<NEW_LINE>if (numErrors % LOG_ERRORS_EVERY_NUM_ITERS == 0) {<NEW_LINE>LOG.warn("Hit {} errors so far. Latest is : {}.", numErrors, finalException.toString());<NEW_LINE>}<NEW_LINE>if (numErrors >= MAX_ERRORS_TO_IGNORE) {<NEW_LINE>errorMessage = "Hit too many errors, final exception is " + finalException.toString();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>numIters++;<NEW_LINE>if (numIters % LOG_EVERY_NUM_ITERS == 0) {<NEW_LINE>LOG.info("Tried operation {} times so far.", numIters);<NEW_LINE>}<NEW_LINE>// Need to wait even when ping has an exception, so the sleep is outside the above try block.<NEW_LINE>try {<NEW_LINE>Thread.sleep(AsyncYBClient.SLEEP_TIME);<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>} while (System.currentTimeMillis() - start < timeoutMs);<NEW_LINE>if (errorMessage == null) {<NEW_LINE>LOG.error("Timed out waiting for operation. Final exception was {}.", finalException != null ? finalException.toString() : "none");<NEW_LINE>} else {<NEW_LINE>LOG.error(errorMessage);<NEW_LINE>}<NEW_LINE>LOG.error("Returning failure after {} iterations, num errors = {}.", numIters, numErrors);<NEW_LINE>return false;<NEW_LINE>}
long start = System.currentTimeMillis();
1,114,004
public AwsRdsDbClusterAssociatedRole unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsRdsDbClusterAssociatedRole awsRdsDbClusterAssociatedRole = new AwsRdsDbClusterAssociatedRole();<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 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("RoleArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>awsRdsDbClusterAssociatedRole.setRoleArn(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Status", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>awsRdsDbClusterAssociatedRole.setStatus(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 awsRdsDbClusterAssociatedRole;<NEW_LINE>}
class).unmarshall(context));
794,741
public QuerySchemaVersionMetadataResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>QuerySchemaVersionMetadataResult querySchemaVersionMetadataResult = new QuerySchemaVersionMetadataResult();<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 querySchemaVersionMetadataResult;<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("MetadataInfoMap", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>querySchemaVersionMetadataResult.setMetadataInfoMap(new MapUnmarshaller<String, MetadataInfo>(context.getUnmarshaller(String.class), MetadataInfoJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("SchemaVersionId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>querySchemaVersionMetadataResult.setSchemaVersionId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>querySchemaVersionMetadataResult.setNextToken(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 querySchemaVersionMetadataResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
787,774
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {<NEW_LINE>super.configure(name, params);<NEW_LINE>_capacityPerSSVM = NumbersUtil.parseInt(_configDao.getValue(Config.SecStorageSessionMax.key()), DEFAULT_SS_VM_CAPACITY);<NEW_LINE>_standbyCapacity = NumbersUtil.parseInt(_configDao.getValue(Config.SecStorageCapacityStandby.key()), DEFAULT_STANDBY_CAPACITY);<NEW_LINE>int nMaxExecutionMinutes = NumbersUtil.parseInt(_configDao.getValue(Config.SecStorageCmdExecutionTimeMax.key()), 30);<NEW_LINE>_maxExecutionTimeMs = nMaxExecutionMinutes * 60 * 1000;<NEW_LINE>migrateCapPerSSVM = StorageManager.SecStorageMaxMigrateSessions.value();<NEW_LINE>int nMaxDataMigrationWaitTime <MASK><NEW_LINE>maxDataMigrationWaitTime = nMaxDataMigrationWaitTime * 60 * 1000;<NEW_LINE>nextSpawnTime = currentTime + maxDataMigrationWaitTime;<NEW_LINE>hostSearch = _hostDao.createSearchBuilder();<NEW_LINE>hostSearch.and("dc", hostSearch.entity().getDataCenterId(), Op.EQ);<NEW_LINE>hostSearch.and("status", hostSearch.entity().getStatus(), Op.EQ);<NEW_LINE>activeCommandSearch = _cmdExecLogDao.createSearchBuilder();<NEW_LINE>activeCommandSearch.and("created", activeCommandSearch.entity().getCreated(), Op.GTEQ);<NEW_LINE>activeCommandSearch.join("hostSearch", hostSearch, activeCommandSearch.entity().getHostId(), hostSearch.entity().getId(), JoinType.INNER);<NEW_LINE>activeCopyCommandSearch = _cmdExecLogDao.createSearchBuilder();<NEW_LINE>activeCopyCommandSearch.and("created", activeCopyCommandSearch.entity().getCreated(), Op.GTEQ);<NEW_LINE>activeCopyCommandSearch.and("command_name", activeCopyCommandSearch.entity().getCommandName(), Op.EQ);<NEW_LINE>activeCopyCommandSearch.join("hostSearch", hostSearch, activeCopyCommandSearch.entity().getHostId(), hostSearch.entity().getId(), JoinType.INNER);<NEW_LINE>hostSearch.done();<NEW_LINE>activeCommandSearch.done();<NEW_LINE>activeCopyCommandSearch.done();<NEW_LINE>return true;<NEW_LINE>}
= StorageManager.MaxDataMigrationWaitTime.value();
616,186
private SqlDynamicParam visitAllDynamicParam(SqlDynamicParam dynamicParam) {<NEW_LINE>if (autoIncrementColumn != curFieldIndex) {<NEW_LINE>return SqlNode.clone(dynamicParam);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>List<Map<Integer, ParameterContext>> batchParameters = parameterSettings.getBatchParameters();<NEW_LINE>for (int rowIndex = 0; rowIndex < batchSize; rowIndex++) {<NEW_LINE>Map<Integer, ParameterContext> curParams = batchParameters.get(rowIndex);<NEW_LINE>ParameterContext oldPc = curParams.get(dynamicParamIndex + 1);<NEW_LINE>Object autoIncValue = oldPc.getValue();<NEW_LINE>final Long newValue = RexUtils.valueOfObject1(autoIncValue);<NEW_LINE>// if NO_AUTO_VALUE_ON_ZERO is set, last_insert_id and returned_last_insert_id won't change.<NEW_LINE>boolean explicitLastInsertId = (null != newValue) && (0L != newValue);<NEW_LINE>boolean assignSequence = (null == newValue) || (0L == newValue && autoValueOnZero);<NEW_LINE>if (explicitLastInsertId) {<NEW_LINE>returnedLastInsertId = newValue;<NEW_LINE>SequenceManagerProxy.getInstance().updateValue(schemaName, seqName, newValue);<NEW_LINE>} else if (assignSequence) {<NEW_LINE>curRowIndex = rowIndex;<NEW_LINE>Long nextVal = assignImplicitValue(true);<NEW_LINE>// use setObject1 instead of oldPc.getParameterMethod,<NEW_LINE>// because the method is 'setString' when users inserts '0'.<NEW_LINE>ParameterContext newPc = new ParameterContext(ParameterMethod.setObject1, new Object[] { dynamicParamIndex + 1, nextVal });<NEW_LINE>curParams.put(dynamicParamIndex + 1, newPc);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return SqlNode.clone(dynamicParam);<NEW_LINE>}
int dynamicParamIndex = dynamicParam.getIndex();
1,580,859
final GetPipelineDefinitionResult executeGetPipelineDefinition(GetPipelineDefinitionRequest getPipelineDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPipelineDefinitionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetPipelineDefinitionRequest> request = null;<NEW_LINE>Response<GetPipelineDefinitionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetPipelineDefinitionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getPipelineDefinitionRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetPipelineDefinition");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetPipelineDefinitionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetPipelineDefinitionResultJsonUnmarshaller());<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.SERVICE_ID, "Data Pipeline");
582,075
private static boolean registerServerInstanceFO(FileObject serverInstanceDir, String url, String displayName, File glassfishRoot, File java7orLaterExecutable) {<NEW_LINE>String name = FileUtil.findFreeFileName(serverInstanceDir, GlassfishInstanceProvider.GLASSFISH_AUTOREGISTERED_INSTANCE, null);<NEW_LINE>FileObject instanceFO;<NEW_LINE>try {<NEW_LINE>instanceFO = serverInstanceDir.createData(name);<NEW_LINE>instanceFO.setAttribute(GlassfishModule.URL_ATTR, url);<NEW_LINE>// NOI18N<NEW_LINE>instanceFO.setAttribute(GlassfishModule.USERNAME_ATTR, "admin");<NEW_LINE>// String password = Utils.generatePassword(8);<NEW_LINE>instanceFO.setAttribute(GlassfishModule.PASSWORD_ATTR, "");<NEW_LINE>instanceFO.setAttribute(GlassfishModule.DISPLAY_NAME_ATTR, displayName);<NEW_LINE>// NOI18N<NEW_LINE>instanceFO.setAttribute(GlassfishModule.ADMINPORT_ATTR, "4848");<NEW_LINE>instanceFO.setAttribute(GlassfishModule.INSTALL_FOLDER_ATTR, glassfishRoot.getParent());<NEW_LINE>// NOI18N<NEW_LINE>instanceFO.setAttribute(GlassfishModule.DEBUG_PORT, "");<NEW_LINE>// NOI18N<NEW_LINE>instanceFO.setAttribute(GlassfishModule.DOMAIN_NAME_ATTR, "domain1");<NEW_LINE>instanceFO.setAttribute(GlassfishModule.DOMAINS_FOLDER_ATTR, (new File(glassfishRoot, <MASK><NEW_LINE>instanceFO.setAttribute(GlassfishModule.DRIVER_DEPLOY_FLAG, "true");<NEW_LINE>instanceFO.setAttribute(GlassfishModule.INSTALL_FOLDER_ATTR, glassfishRoot.getParent());<NEW_LINE>// NOI18N<NEW_LINE>instanceFO.setAttribute(GlassfishModule.HOSTNAME_ATTR, "localhost");<NEW_LINE>instanceFO.setAttribute(GlassfishModule.GLASSFISH_FOLDER_ATTR, glassfishRoot.getAbsolutePath());<NEW_LINE>// NOI18N<NEW_LINE>instanceFO.setAttribute(GlassfishModule.JAVA_PLATFORM_ATTR, java7orLaterExecutable == null ? "" : java7orLaterExecutable.getAbsolutePath());<NEW_LINE>// NOI18N<NEW_LINE>instanceFO.setAttribute(GlassfishModule.HTTPPORT_ATTR, "8080");<NEW_LINE>// NOI18N<NEW_LINE>instanceFO.setAttribute(GlassfishModule.HTTPHOST_ATTR, "localhost");<NEW_LINE>instanceFO.setAttribute(GlassfishModule.JVM_MODE, GlassfishModule.NORMAL_MODE);<NEW_LINE>instanceFO.setAttribute(GlassfishModule.SESSION_PRESERVATION_FLAG, true);<NEW_LINE>instanceFO.setAttribute(GlassfishModule.START_DERBY_FLAG, true);<NEW_LINE>instanceFO.setAttribute(GlassfishModule.USE_IDE_PROXY_FLAG, true);<NEW_LINE>instanceFO.setAttribute(GlassfishModule.USE_SHARED_MEM_ATTR, false);<NEW_LINE>return true;<NEW_LINE>} catch (IOException e) {<NEW_LINE>// NOI18N<NEW_LINE>LOGGER.log(Level.INFO, "Cannot register the default GlassFish server.");<NEW_LINE>LOGGER.log(Level.INFO, null, e);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
"domains")).getAbsolutePath());
1,806,783
private static Throwable toException(ExecutionFailureInfo executionFailureInfo) {<NEW_LINE>if (executionFailureInfo == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Throwable failure;<NEW_LINE>if (executionFailureInfo.getErrorCode() == null) {<NEW_LINE>failure = new TddlNestableRuntimeException(executionFailureInfo.getMessage(), toException(executionFailureInfo.getCause()));<NEW_LINE>} else {<NEW_LINE>failure = new TddlRuntimeException(executionFailureInfo.getErrorCode(), executionFailureInfo.getMessage(), toException(executionFailureInfo.getCause()));<NEW_LINE>}<NEW_LINE>for (ExecutionFailureInfo suppressed : executionFailureInfo.getSuppressed()) {<NEW_LINE>failure<MASK><NEW_LINE>}<NEW_LINE>ImmutableList.Builder<StackTraceElement> stackTraceBuilder = ImmutableList.builder();<NEW_LINE>for (String stack : executionFailureInfo.getStack()) {<NEW_LINE>stackTraceBuilder.add(toStackTraceElement(stack));<NEW_LINE>}<NEW_LINE>ImmutableList<StackTraceElement> stackTrace = stackTraceBuilder.build();<NEW_LINE>failure.setStackTrace(stackTrace.toArray(new StackTraceElement[stackTrace.size()]));<NEW_LINE>return failure;<NEW_LINE>}
.addSuppressed(toException(suppressed));
263,517
public EntityPersonaConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EntityPersonaConfiguration entityPersonaConfiguration = new EntityPersonaConfiguration();<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 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("EntityId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>entityPersonaConfiguration.setEntityId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Persona", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>entityPersonaConfiguration.setPersona(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 entityPersonaConfiguration;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
562,031
private boolean visit(FunctionCall call) {<NEW_LINE>if (!(call.getTarget() instanceof PropertyGet)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>PropertyGet propertyGet = (PropertyGet) call.getTarget();<NEW_LINE>MethodReference methodRef = getJavaMethodSelector(propertyGet.getTarget());<NEW_LINE>if (methodRef == null || !propertyGet.getProperty().getIdentifier().equals("invoke")) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>for (AstNode arg : call.getArguments()) {<NEW_LINE>arg.visit(this);<NEW_LINE>}<NEW_LINE>MethodReader method = classSource.resolve(methodRef);<NEW_LINE>if (method == null) {<NEW_LINE>diagnostics.error(location, "Java method not found: {{m0}}", methodRef);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int requiredParams = methodRef.parameterCount();<NEW_LINE>if (!method.hasModifier(ElementModifier.STATIC)) {<NEW_LINE>++requiredParams;<NEW_LINE>}<NEW_LINE>if (call.getArguments().size() != requiredParams) {<NEW_LINE>diagnostics.error(location, "Invalid number of arguments for method {{m0}}. Expected: " + requiredParams + ", encountered: " + call.getArguments().size(), methodRef);<NEW_LINE>}<NEW_LINE>MethodReference caller = createCallbackMethod(method);<NEW_LINE>MethodReference delegate = repository.methodMap.<MASK><NEW_LINE>repository.callbackCallees.put(caller, methodRef);<NEW_LINE>repository.callbackMethods.computeIfAbsent(delegate, key -> new HashSet<>()).add(caller);<NEW_LINE>validateSignature(method);<NEW_LINE>StringLiteral newTarget = new StringLiteral();<NEW_LINE>newTarget.setValue("$$JSO$$_" + caller);<NEW_LINE>propertyGet.setTarget(newTarget);<NEW_LINE>return false;<NEW_LINE>}
get(location.getMethod());
1,328,137
public void execute() throws UserException {<NEW_LINE>// 0. empty set<NEW_LINE>// A where clause with a constant equal to false will not execute the update directly<NEW_LINE>// Example: update xxx set v1=0 where 1=2<NEW_LINE>if (analyzer.hasEmptyResultSet()) {<NEW_LINE>QeProcessorImpl.INSTANCE.unregisterQuery(queryId);<NEW_LINE>analyzer.getContext()<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// 1. begin txn<NEW_LINE>beginTxn();<NEW_LINE>// 2. plan<NEW_LINE>targetTable.readLock();<NEW_LINE>try {<NEW_LINE>updatePlanner.plan(txnId);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOG.warn("failed to plan update stmt, query id:{}", DebugUtil.printId(queryId), e);<NEW_LINE>Catalog.getCurrentGlobalTransactionMgr().abortTransaction(dbId, txnId, e.getMessage());<NEW_LINE>QeProcessorImpl.INSTANCE.unregisterQuery(queryId);<NEW_LINE>throw new DdlException("failed to plan update stmt, query id: " + DebugUtil.printId(queryId) + ", err: " + e.getMessage());<NEW_LINE>} finally {<NEW_LINE>targetTable.readUnlock();<NEW_LINE>}<NEW_LINE>// 3. execute plan<NEW_LINE>try {<NEW_LINE>executePlan();<NEW_LINE>} catch (DdlException e) {<NEW_LINE>LOG.warn("failed to execute update stmt, query id:{}", DebugUtil.printId(queryId), e);<NEW_LINE>Catalog.getCurrentGlobalTransactionMgr().abortTransaction(dbId, txnId, e.getMessage());<NEW_LINE>throw e;<NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOG.warn("failed to execute update stmt, query id:{}", DebugUtil.printId(queryId), e);<NEW_LINE>Catalog.getCurrentGlobalTransactionMgr().abortTransaction(dbId, txnId, e.getMessage());<NEW_LINE>throw new DdlException("failed to execute update stmt, query id: " + DebugUtil.printId(queryId) + ", err: " + e.getMessage());<NEW_LINE>} finally {<NEW_LINE>QeProcessorImpl.INSTANCE.unregisterQuery(queryId);<NEW_LINE>}<NEW_LINE>// 4. commit and publish<NEW_LINE>commitAndPublishTxn();<NEW_LINE>}
.getState().setOk();
741,604
protected void layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected) {<NEW_LINE>textRect.x = textRect.y = iconRect<MASK><NEW_LINE>javax.swing.text.View v = getTextViewForTab(tabIndex);<NEW_LINE>if (v != null) {<NEW_LINE>tabPane.putClientProperty("html", v);<NEW_LINE>}<NEW_LINE>SwingUtilities.layoutCompoundLabel(tabPane, metrics, title, icon, SwingUtilities.CENTER, SwingUtilities.CENTER, SwingUtilities.CENTER, horizontalTextPosition, tabRect, iconRect, textRect, textIconGap + 2);<NEW_LINE>tabPane.putClientProperty("html", null);<NEW_LINE>int xNudge = getTabLabelShiftX(tabPlacement, tabIndex, isSelected);<NEW_LINE>int yNudge = getTabLabelShiftY(tabPlacement, tabIndex, isSelected);<NEW_LINE>iconRect.x += xNudge;<NEW_LINE>iconRect.y += yNudge;<NEW_LINE>textRect.x += xNudge;<NEW_LINE>textRect.y += yNudge;<NEW_LINE>}
.x = iconRect.y = 0;
1,077,717
public void marshall(CreateStudioRequest createStudioRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createStudioRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getAuthMode(), AUTHMODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getVpcId(), VPCID_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getServiceRole(), SERVICEROLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getUserRole(), USERROLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getWorkspaceSecurityGroupId(), WORKSPACESECURITYGROUPID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getEngineSecurityGroupId(), ENGINESECURITYGROUPID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getDefaultS3Location(), DEFAULTS3LOCATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getIdpAuthUrl(), IDPAUTHURL_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getIdpRelayStateParameterName(), IDPRELAYSTATEPARAMETERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createStudioRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createStudioRequest.getSubnetIds(), SUBNETIDS_BINDING);
1,565,588
public static int count(String self, String sub, int start, int end) {<NEW_LINE>if (self.isEmpty()) {<NEW_LINE>return (sub.length() == 0 && start <= 0) ? 1 : 0;<NEW_LINE>} else if (sub.isEmpty()) {<NEW_LINE>return (start <= self.length()) ? (<MASK><NEW_LINE>} else {<NEW_LINE>char needle = sub.charAt(0);<NEW_LINE>int cnt = 0;<NEW_LINE>if (sub.length() == 1) {<NEW_LINE>for (int pos = start; pos < end; pos++) {<NEW_LINE>if (self.charAt(pos) == needle) {<NEW_LINE>cnt++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int lastPos = end - sub.length();<NEW_LINE>int idx = start;<NEW_LINE>while (idx <= lastPos) {<NEW_LINE>while (idx < lastPos && self.charAt(idx) != needle) {<NEW_LINE>idx++;<NEW_LINE>}<NEW_LINE>if ((idx = StringNodes.findFirstIndexOf(self, sub, idx, end)) < 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>cnt++;<NEW_LINE>idx += sub.length();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return cnt;<NEW_LINE>}<NEW_LINE>}
end - start) + 1 : 0;
770,918
protected void run(Map tokens, Object data) {<NEW_LINE>GarbageCollectorVO vo = dbf.findByUuid(uuid, GarbageCollectorVO.class);<NEW_LINE>if (vo == null) {<NEW_LINE>logger.warn(String.format("[GC] cannot find a job[name:%s, id:%s], assume it's deleted", NAME, uuid));<NEW_LINE>cancel();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!c.trigger(tokens, data)) {<NEW_LINE>// don't trigger it<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!lock()) {<NEW_LINE>logger.debug(String.format("[GC] the job[name:%s, id:%s] is being executed by another trigger," + "skip this event[%s]", NAME, uuid, path));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>logger.debug(String.format("[GC] the job[name:%s, id:%s] is triggered by an event[%s]"<MASK><NEW_LINE>vo.setStatus(GCStatus.Processing);<NEW_LINE>dbf.update(vo);<NEW_LINE>runTrigger();<NEW_LINE>}
, NAME, uuid, path));
911,808
private void updateContents(@Nonnull java.util.List<StatusItem> status) {<NEW_LINE>removeAll();<NEW_LINE>setEnabled(!status.isEmpty());<NEW_LINE>setVisible(!status.isEmpty());<NEW_LINE>GridBag gc = new GridBag().nextLine();<NEW_LINE>if (status.size() == 1 && StringUtil.isEmpty(status.get(0).getText())) {<NEW_LINE>add(createStyledLabel(null, status.get(0).getIcon(), SwingConstants.CENTER), gc.next().weightx(1).fillCellHorizontally());<NEW_LINE>} else if (status.size() > 0) {<NEW_LINE>int leftRightOffset = JBUIScale.scale(LEFT_RIGHT_INDENT);<NEW_LINE>add(Box.createHorizontalStrut(leftRightOffset), gc.next());<NEW_LINE>int counter = 0;<NEW_LINE>for (StatusItem item : status) {<NEW_LINE>add(createStyledLabel(item.getText(), item.getIcon(), SwingConstants.LEFT), gc.next().insetLeft(counter++ > 0 ? INTER_GROUP_OFFSET : 0));<NEW_LINE>}<NEW_LINE>add(Box.createHorizontalStrut(leftRightOffset<MASK><NEW_LINE>}<NEW_LINE>}
), gc.next());
1,648,047
public double evaluate(JavaSparkContext sparkContext, PMML model, Path modelParentPath, JavaRDD<String> testData, JavaRDD<String> trainData) {<NEW_LINE>KMeansPMMLUtils.validatePMMLVsSchema(model, inputSchema);<NEW_LINE>JavaRDD<Vector> evalData = parsedToVectorRDD(trainData.union(testData)<MASK><NEW_LINE>List<ClusterInfo> clusterInfoList = KMeansPMMLUtils.read(model);<NEW_LINE>log.info("Evaluation Strategy is {}", evaluationStrategy);<NEW_LINE>double eval;<NEW_LINE>switch(evaluationStrategy) {<NEW_LINE>case DAVIES_BOULDIN:<NEW_LINE>double dbIndex = new DaviesBouldinIndex(clusterInfoList).evaluate(evalData);<NEW_LINE>log.info("Davies-Bouldin index: {}", dbIndex);<NEW_LINE>eval = -dbIndex;<NEW_LINE>break;<NEW_LINE>case DUNN:<NEW_LINE>double dunnIndex = new DunnIndex(clusterInfoList).evaluate(evalData);<NEW_LINE>log.info("Dunn index: {}", dunnIndex);<NEW_LINE>eval = dunnIndex;<NEW_LINE>break;<NEW_LINE>case SILHOUETTE:<NEW_LINE>double silhouette = new SilhouetteCoefficient(clusterInfoList).evaluate(evalData);<NEW_LINE>log.info("Silhouette Coefficient: {}", silhouette);<NEW_LINE>eval = silhouette;<NEW_LINE>break;<NEW_LINE>case SSE:<NEW_LINE>double sse = new SumSquaredError(clusterInfoList).evaluate(evalData);<NEW_LINE>log.info("Sum squared error: {}", sse);<NEW_LINE>eval = -sse;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException("Unknown evaluation strategy " + evaluationStrategy);<NEW_LINE>}<NEW_LINE>return eval;<NEW_LINE>}
.map(MLFunctions.PARSE_FN));
1,242,725
public synchronized QueryStatement init() throws UserException {<NEW_LINE>Preconditions.checkNotNull(inlineViewDef);<NEW_LINE>// Parse the expanded view definition SQL-string into a QueryStmt and<NEW_LINE>// populate a view definition.<NEW_LINE>ParseNode node;<NEW_LINE>try {<NEW_LINE>node = com.starrocks.sql.parser.SqlParser.parse(inlineViewDef, sqlMode).get(0);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.info("stmt is {}", inlineViewDef);<NEW_LINE>LOG.info("exception because: ", e);<NEW_LINE>LOG.info("msg is {}", inlineViewDef);<NEW_LINE>// Do not pass e as the exception cause because it might reveal the existence<NEW_LINE>// of tables that the user triggering this load may not have privileges on.<NEW_LINE>throw new UserException(String.format("Failed to parse view-definition statement of view: %s", name), e);<NEW_LINE>}<NEW_LINE>// Make sure the view definition parses to a query statement.<NEW_LINE>if (!(node instanceof QueryStatement)) {<NEW_LINE>throw new UserException(String.format("View definition of %s " + "is not a query statement", name));<NEW_LINE>}<NEW_LINE>queryStmtRef = new SoftReference<MASK><NEW_LINE>return (QueryStatement) node;<NEW_LINE>}
<>((QueryStatement) node);
576,355
public Iterator<String> call(Integer partitionIdx, Iterator<MultiDataSet> iterator) throws Exception {<NEW_LINE>List<String> outputPaths = new ArrayList<>();<NEW_LINE>LinkedList<MultiDataSet> <MASK><NEW_LINE>int count = 0;<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>MultiDataSet next = iterator.next();<NEW_LINE>if (next.getFeatures(0).size(0) == minibatchSize) {<NEW_LINE>outputPaths.add(export(next, partitionIdx, count++));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// DataSet must be either smaller or larger than minibatch size...<NEW_LINE>tempList.add(next);<NEW_LINE>Pair<Integer, List<String>> countAndPaths = processList(tempList, partitionIdx, count, false);<NEW_LINE>if (countAndPaths.getSecond() != null && !countAndPaths.getSecond().isEmpty()) {<NEW_LINE>outputPaths.addAll(countAndPaths.getSecond());<NEW_LINE>}<NEW_LINE>count = countAndPaths.getFirst();<NEW_LINE>}<NEW_LINE>// We might have some left-over examples...<NEW_LINE>Pair<Integer, List<String>> countAndPaths = processList(tempList, partitionIdx, count, true);<NEW_LINE>if (countAndPaths.getSecond() != null && !countAndPaths.getSecond().isEmpty()) {<NEW_LINE>outputPaths.addAll(countAndPaths.getSecond());<NEW_LINE>}<NEW_LINE>return outputPaths.iterator();<NEW_LINE>}
tempList = new LinkedList<>();
71,884
public static void fillRectangle(InterleavedS64 image, long value, int x0, int y0, int width, int height) {<NEW_LINE>int x1 = x0 + width;<NEW_LINE>int y1 = y0 + height;<NEW_LINE>if (x0 < 0)<NEW_LINE>x0 = 0;<NEW_LINE>if (x1 > image.width)<NEW_LINE>x1 = image.width;<NEW_LINE>if (y0 < 0)<NEW_LINE>y0 = 0;<NEW_LINE>if (y1 > image.height)<NEW_LINE>y1 = image.height;<NEW_LINE>final int _x0 = x0;<NEW_LINE>int length = (x1 - x0) * image.numBands;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(y0, y1, y->{<NEW_LINE>for (int y = y0; y < y1; y++) {<NEW_LINE>int index = image.startIndex + y * image<MASK><NEW_LINE>Arrays.fill(image.data, index, index + length, value);<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
.stride + _x0 * image.numBands;
473,019
private boolean checkStaticOuterField(final PropertyExpression pexp, final String propertyName) {<NEW_LINE>for (final ClassNode outer : controller.getClassNode().getOuterClasses()) {<NEW_LINE>FieldNode field = outer.getDeclaredField(propertyName);<NEW_LINE>if (field != null) {<NEW_LINE>if (!field.isStatic())<NEW_LINE>break;<NEW_LINE>Expression outerClass = classX(outer);<NEW_LINE>outerClass.setNodeMetaData(PROPERTY_OWNER, outer);<NEW_LINE>outerClass.setSourcePosition(pexp.getObjectExpression());<NEW_LINE>Expression outerField = attrX(<MASK><NEW_LINE>outerField.setSourcePosition(pexp);<NEW_LINE>outerField.visit(this);<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>// checks supers<NEW_LINE>field = outer.getField(propertyName);<NEW_LINE>if (field != null && !field.isPrivate() && (field.isPublic() || field.isProtected() || Objects.equals(field.getDeclaringClass().getPackageName(), outer.getPackageName()))) {<NEW_LINE>if (!field.isStatic())<NEW_LINE>break;<NEW_LINE>Expression upperClass = classX(field.getDeclaringClass());<NEW_LINE>upperClass.setNodeMetaData(PROPERTY_OWNER, field.getDeclaringClass());<NEW_LINE>upperClass.setSourcePosition(pexp.getObjectExpression());<NEW_LINE>Expression upperField = propX(upperClass, pexp.getProperty());<NEW_LINE>upperField.setSourcePosition(pexp);<NEW_LINE>upperField.visit(this);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
outerClass, pexp.getProperty());
1,816,439
public Object invokeStaticMethod(Object object, String methodName, Object[] arguments) {<NEW_LINE>if (methodName.equals("grab") && arguments.length > 1 && (arguments[0] instanceof Map)) {<NEW_LINE>return AccessController.doPrivileged(new PrivilegedAction<Object>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object run() {<NEW_LINE>final Map map = (Map) arguments[0];<NEW_LINE>if (map.get("refObject") == null && map.get("classLoader") == null) {<NEW_LINE>final Class callingClass = ReflectionUtils.getCallingClass(0, EXTRA_IGNORED_PACKAGES);<NEW_LINE>final ClassLoader classLoader = callingClass.getClassLoader();<NEW_LINE>if (!(classLoader instanceof GroovyClassLoader))<NEW_LINE>return null;<NEW_LINE>map.put("classLoader", classLoader);<NEW_LINE>}<NEW_LINE>return GrapeMetaClass.super.<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else<NEW_LINE>return GrapeMetaClass.super.invokeStaticMethod(object, methodName, arguments);<NEW_LINE>}
invokeStaticMethod(object, methodName, arguments);
1,456,897
private boolean isInMinimalDeviceMode() {<NEW_LINE>if (!FeatureFlags.ENABLE_MINIMAL_DEVICE.get()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (DEBUG || mIsInTest) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Preconditions.assertNonUiThread();<NEW_LINE>final Uri contentUri = apiBuilder().build();<NEW_LINE>try (ContentProviderClient client = mContext.getContentResolver().acquireUnstableContentProviderClient(contentUri)) {<NEW_LINE>final Bundle remoteBundle = client == null ? null : client.call(METHOD_GET_MINIMAL_DEVICE_CONFIG, null, /* args */<NEW_LINE>null);<NEW_LINE>return remoteBundle != null && remoteBundle.getInt(EXTRA_MINIMAL_DEVICE_STATE, UNKNOWN_MINIMAL_DEVICE_STATE) == IN_MINIMAL_DEVICE;<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.e(TAG, "Failed to retrieve data from " + contentUri + ": " + e);<NEW_LINE>if (mIsInTest)<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>if (DEBUG || mIsInTest)<NEW_LINE>Log.i(TAG, "isInMinimalDeviceMode(): finished");<NEW_LINE>return false;<NEW_LINE>}
Log.d(TAG, "isInMinimalDeviceMode() called");
1,274,280
public boolean checkTrigger(GameEvent event, Game game) {<NEW_LINE>if (!event.getTargetId().equals(getSourceId())) {<NEW_LINE>MageObject sourceObj = this.getSourceObject(game);<NEW_LINE>if (sourceObj != null) {<NEW_LINE>if (sourceObj instanceof Card && ((Card) sourceObj).isFaceDown(game)) {<NEW_LINE>// if face down and it's not itself that is turned face up, it does not trigger<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Permanent is and was not on the battlefield<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Permanent permanent = game.getPermanent(event.getTargetId());<NEW_LINE>if (filter.match(permanent, getControllerId(), this, game)) {<NEW_LINE>if (setTargetPointer) {<NEW_LINE>for (Effect effect : getEffects()) {<NEW_LINE>effect.setTargetPointer(new FixedTarget(event<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.getTargetId(), game));
1,629,070
final StartExpenseAnalysisResult executeStartExpenseAnalysis(StartExpenseAnalysisRequest startExpenseAnalysisRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startExpenseAnalysisRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartExpenseAnalysisRequest> request = null;<NEW_LINE>Response<StartExpenseAnalysisResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new StartExpenseAnalysisRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startExpenseAnalysisRequest));<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, "Textract");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartExpenseAnalysis");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartExpenseAnalysisResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartExpenseAnalysisResultJsonUnmarshaller());<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);
827,915
public Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException {<NEW_LINE>Entity entity = persistencePackage.getEntity();<NEW_LINE>try {<NEW_LINE>List<Property> productOptionProperties = getProductOptionProperties(entity);<NEW_LINE>// Verify that none of the selected options is null<NEW_LINE>Entity errorEntity = validateNotNullProductOptions(productOptionProperties);<NEW_LINE>if (errorEntity != null) {<NEW_LINE>entity.setPropertyValidationErrors(errorEntity.getPropertyValidationErrors());<NEW_LINE>return entity;<NEW_LINE>}<NEW_LINE>// Fill out the Sku instance from the form<NEW_LINE>PersistencePerspective persistencePerspective = persistencePackage.getPersistencePerspective();<NEW_LINE>Sku adminInstance = (Sku) Class.forName(entity.getType()[0]).newInstance();<NEW_LINE>Map<String, FieldMetadata> adminProperties = helper.getSimpleMergedProperties(Sku.class.getName(), persistencePerspective);<NEW_LINE>filterOutProductMetadata(adminProperties);<NEW_LINE>adminInstance = (Sku) helper.createPopulatedInstance(adminInstance, entity, adminProperties, false);<NEW_LINE>// Verify that there isn't already a Sku for this particular product option value combo<NEW_LINE>errorEntity = validateUniqueProductOptionValueCombination(adminInstance.getProduct(), productOptionProperties, null);<NEW_LINE>if (errorEntity != null) {<NEW_LINE>entity.setPropertyValidationErrors(errorEntity.getPropertyValidationErrors());<NEW_LINE>return entity;<NEW_LINE>}<NEW_LINE>// persist the newly-created Sku<NEW_LINE><MASK><NEW_LINE>// associate the product option values<NEW_LINE>associateProductOptionValuesToSku(entity, adminInstance, dynamicEntityDao);<NEW_LINE>// After associating the product option values, save off the Sku<NEW_LINE>adminInstance = dynamicEntityDao.merge(adminInstance);<NEW_LINE>// Fill out the DTO and add in the product option value properties to it<NEW_LINE>Entity result = helper.getRecord(adminProperties, adminInstance, null, null);<NEW_LINE>for (Property property : productOptionProperties) {<NEW_LINE>result.addProperty(property);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ServiceException("Unable to perform fetch for entity: " + Sku.class.getName(), e);<NEW_LINE>}<NEW_LINE>}
adminInstance = dynamicEntityDao.persist(adminInstance);
858,581
void renderPointerLayer(final Surface aSurface, final long aNativeCallback) {<NEW_LINE>runOnUiThread(() -> {<NEW_LINE>try {<NEW_LINE>Canvas canvas = aSurface.lockHardwareCanvas();<NEW_LINE>canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);<NEW_LINE>Paint paint = new Paint();<NEW_LINE>paint.setAntiAlias(true);<NEW_LINE>paint.setDither(true);<NEW_LINE>paint.setColor(Color.WHITE);<NEW_LINE>paint.setStyle(Paint.Style.FILL);<NEW_LINE>final float x = canvas.getWidth() * 0.5f;<NEW_LINE>final float y = canvas.getHeight() * 0.5f;<NEW_LINE>final float radius <MASK><NEW_LINE>canvas.drawCircle(x, y, radius, paint);<NEW_LINE>paint.setColor(Color.BLACK);<NEW_LINE>paint.setStrokeWidth(4);<NEW_LINE>paint.setStyle(Paint.Style.STROKE);<NEW_LINE>canvas.drawCircle(x, y, radius, paint);<NEW_LINE>aSurface.unlockCanvasAndPost(canvas);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>if (aNativeCallback != 0) {<NEW_LINE>queueRunnable(() -> runCallbackNative(aNativeCallback));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
= canvas.getWidth() * 0.4f;
1,208,470
public void encode(MutableDirectBuffer buffer) {<NEW_LINE>MessageHeaderEncoder enc = new MessageHeaderEncoder();<NEW_LINE>StorageMetaDataEncoder smde = new StorageMetaDataEncoder();<NEW_LINE>enc.wrap(buffer, 0).blockLength(smde.sbeBlockLength()).templateId(smde.sbeTemplateId()).schemaId(smde.sbeSchemaId()).version(smde.sbeSchemaVersion());<NEW_LINE>// Expect 8 bytes<NEW_LINE>int offset = enc.encodedLength();<NEW_LINE>byte[] bSessionID = SbeUtil.toBytes(true, sessionID);<NEW_LINE>byte[] bTypeID = <MASK><NEW_LINE>byte[] bWorkerID = SbeUtil.toBytes(true, workerID);<NEW_LINE>byte[] bInitTypeClass = SbeUtil.toBytes(true, initTypeClass);<NEW_LINE>byte[] bUpdateTypeClass = SbeUtil.toBytes(true, updateTypeClass);<NEW_LINE>smde.wrap(buffer, offset).timeStamp(timeStamp);<NEW_LINE>StorageMetaDataEncoder.ExtraMetaDataBytesEncoder ext = smde.extraMetaDataBytesCount(extraMeta == null ? 0 : extraMeta.length);<NEW_LINE>if (extraMeta != null) {<NEW_LINE>for (byte b : extraMeta) {<NEW_LINE>ext.next().bytes(b);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>smde.putSessionID(bSessionID, 0, bSessionID.length).putTypeID(bTypeID, 0, bTypeID.length).putWorkerID(bWorkerID, 0, bWorkerID.length).putInitTypeClass(bInitTypeClass, 0, bInitTypeClass.length).putUpdateTypeClass(bUpdateTypeClass, 0, bUpdateTypeClass.length);<NEW_LINE>}
SbeUtil.toBytes(true, typeID);
1,027,186
public void onClick(View v) {<NEW_LINE>Activity activity = getActivity();<NEW_LINE>if (activity != null) {<NEW_LINE>final ListPopupWindow popup = new <MASK><NEW_LINE>popup.setAnchorView(v);<NEW_LINE>popup.setContentWidth(AndroidUtils.dpToPx(app, 200f));<NEW_LINE>popup.setModal(true);<NEW_LINE>popup.setDropDownGravity(Gravity.END | Gravity.TOP);<NEW_LINE>if (AndroidUiHelper.isOrientationPortrait(activity)) {<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {<NEW_LINE>popup.setVerticalOffset(AndroidUtils.dpToPx(app, 48f));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>popup.setVerticalOffset(AndroidUtils.dpToPx(app, -48f));<NEW_LINE>}<NEW_LINE>popup.setHorizontalOffset(AndroidUtils.dpToPx(app, -6f));<NEW_LINE>final FavoriteColorAdapter colorAdapter = new FavoriteColorAdapter(activity);<NEW_LINE>popup.setAdapter(colorAdapter);<NEW_LINE>popup.setOnItemClickListener(new AdapterView.OnItemClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onItemClick(AdapterView<?> parent, View view, int position, long id) {<NEW_LINE>Integer color = colorAdapter.getItem(position);<NEW_LINE>if (color != null) {<NEW_LINE>if (color != group.getColor()) {<NEW_LINE>app.getFavoritesHelper().editFavouriteGroup(group, group.getName(), color, group.isVisible());<NEW_LINE>updateParentFragment();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>popup.dismiss();<NEW_LINE>dismiss();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>popup.show();<NEW_LINE>}<NEW_LINE>}
ListPopupWindow(v.getContext());
769,930
private void processApplicationReferences(EARApplicationInfo appInfo, Application app) throws StateChangeException {<NEW_LINE>Map<JNDIEnvironmentRefType, List<? extends JNDIEnvironmentRef>> allRefs = new EnumMap<JNDIEnvironmentRefType, List<? extends JNDIEnvironmentRef>>(JNDIEnvironmentRefType.class);<NEW_LINE>boolean anyRefs = false;<NEW_LINE>for (JNDIEnvironmentRefType refType : JNDIEnvironmentRefType.VALUES) {<NEW_LINE>List<? extends JNDIEnvironmentRef> refs = refType.getRefs(app);<NEW_LINE>allRefs.put(refType, refs);<NEW_LINE>anyRefs |= !refs.isEmpty();<NEW_LINE>}<NEW_LINE>if (anyRefs) {<NEW_LINE>ApplicationBnd appBnd;<NEW_LINE>try {<NEW_LINE>appBnd = appInfo.getContainer().adapt(ApplicationBnd.class);<NEW_LINE>} catch (UnableToAdaptException e) {<NEW_LINE>throw new StateChangeException(e);<NEW_LINE>}<NEW_LINE>String compNSConfigName <MASK><NEW_LINE>ComponentNameSpaceConfiguration compNSConfig = new ComponentNameSpaceConfiguration(compNSConfigName, ((ExtendedApplicationInfo) appInfo).getMetaData().getJ2EEName());<NEW_LINE>compNSConfig.setClassLoader(appInfo.getApplicationClassLoader());<NEW_LINE>compNSConfig.setApplicationMetaData(((ExtendedApplicationInfo) appInfo).getMetaData());<NEW_LINE>JNDIEnvironmentRefType.setAllRefs(compNSConfig, allRefs);<NEW_LINE>if (appBnd != null) {<NEW_LINE>Map<JNDIEnvironmentRefType, Map<String, String>> allBindings = JNDIEnvironmentRefBindingHelper.createAllBindingsMap();<NEW_LINE>Map<String, String> envEntryValues = new HashMap<String, String>();<NEW_LINE>ResourceRefConfigList resourceRefConfigList = resourceRefConfigFactory.createResourceRefConfigList();<NEW_LINE>OSGiJNDIEnvironmentRefBindingHelper.processBndAndExt(allBindings, envEntryValues, resourceRefConfigList, appBnd, null);<NEW_LINE>JNDIEnvironmentRefBindingHelper.setAllBndAndExt(compNSConfig, allBindings, envEntryValues, resourceRefConfigList);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>processInjectionMetaData(null, compNSConfig);<NEW_LINE>} catch (InjectionException e) {<NEW_LINE>throw new StateChangeException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= appInfo.getName() + " META-INF/application.xml";
509,912
public void render(EffectContainer e) {<NEW_LINE>if (tex == null)<NEW_LINE>tex = Core.atlas.find(region);<NEW_LINE>float realRotation = (useRotation ? e.rotation : baseRotation);<NEW_LINE>float rawfin = e.fin();<NEW_LINE>float fin = e.fin(interp);<NEW_LINE>float rad = sizeInterp.apply(sizeFrom, sizeTo, rawfin) * 2;<NEW_LINE>float ox = e.x + Angles.trnsx(realRotation, offsetX, offsetY), oy = e.y + Angles.trnsy(realRotation, offsetX, offsetY);<NEW_LINE>Draw.color(colorFrom, colorTo, fin);<NEW_LINE>Color lightColor = this.lightColor == null ? Draw.getColor() : this.lightColor;<NEW_LINE>if (line) {<NEW_LINE>Lines.stroke(sizeInterp.apply(strokeFrom, strokeTo, rawfin));<NEW_LINE>float len = sizeInterp.apply(lenFrom, lenTo, rawfin);<NEW_LINE>rand.setSeed(e.id);<NEW_LINE>for (int i = 0; i < particles; i++) {<NEW_LINE>float l = length * fin + baseLength;<NEW_LINE>rv.trns(realRotation + rand.range(cone), !randLength ? l : rand.random(l));<NEW_LINE>float x = rv.x, y = rv.y;<NEW_LINE>Lines.lineAngle(ox + x, oy + y, Mathf.angle(x, y), len);<NEW_LINE>Drawf.light(ox + x, oy + y, len * lightScl, lightColor, lightOpacity * <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>rand.setSeed(e.id);<NEW_LINE>for (int i = 0; i < particles; i++) {<NEW_LINE>float l = length * fin + baseLength;<NEW_LINE>rv.trns(realRotation + rand.range(cone), !randLength ? l : rand.random(l));<NEW_LINE>float x = rv.x, y = rv.y;<NEW_LINE>Draw.rect(tex, ox + x, oy + y, rad, rad, realRotation + offset + e.time * spin);<NEW_LINE>Drawf.light(ox + x, oy + y, rad * lightScl, lightColor, lightOpacity * Draw.getColor().a);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Draw.getColor().a);
1,069,721
public static void main(String[] args) {<NEW_LINE>// START SNIPPET: loadAll<NEW_LINE>// Create a context and a client<NEW_LINE>FhirContext ctx = FhirContext.forR4();<NEW_LINE>String serverBase = "http://hapi.fhr.org/baseR4";<NEW_LINE>IGenericClient client = ctx.newRestfulGenericClient(serverBase);<NEW_LINE>// We'll populate this list<NEW_LINE>List<IBaseResource> <MASK><NEW_LINE>// We'll do a search for all Patients and extract the first page<NEW_LINE>Bundle bundle = client.search().forResource(Patient.class).where(Patient.NAME.matches().value("smith")).returnBundle(Bundle.class).execute();<NEW_LINE>patients.addAll(BundleUtil.toListOfResources(ctx, bundle));<NEW_LINE>// Load the subsequent pages<NEW_LINE>while (bundle.getLink(IBaseBundle.LINK_NEXT) != null) {<NEW_LINE>bundle = client.loadPage().next(bundle).execute();<NEW_LINE>patients.addAll(BundleUtil.toListOfResources(ctx, bundle));<NEW_LINE>}<NEW_LINE>System.out.println("Loaded " + patients.size() + " patients!");<NEW_LINE>// END SNIPPET: loadAll<NEW_LINE>}
patients = new ArrayList<>();
332,338
private void backup(String toolName, ToolIntegratedStatus toStatus, String buildId, Collection<CheckerSetEntity> toCheckerSetList) {<NEW_LINE>List<CheckerSetHisEntity> hisCheckerSetEntities = checkerSetHisRepository.findByToolNameInAndVersion(toolName, toStatus.value());<NEW_LINE>if (CollectionUtils.isNotEmpty(hisCheckerSetEntities)) {<NEW_LINE>if (hisCheckerSetEntities.get(0).getBuildId().equals(buildId)) {<NEW_LINE>log.info("is the same back up build id, do nothing: {}", toolName);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>log.info("back up checker set: {}, {}, {}, {}", toolName, toStatus, buildId, toCheckerSetList);<NEW_LINE>List<CheckerSetHisEntity> bakCheckerSetList = toCheckerSetList.stream().map(it -> {<NEW_LINE>CheckerSetHisEntity checkerSetHisEntity = new CheckerSetHisEntity();<NEW_LINE>BeanUtils.copyProperties(it, checkerSetHisEntity);<NEW_LINE>checkerSetHisEntity.setToolName(toolName);<NEW_LINE>checkerSetHisEntity.setBuildId(buildId);<NEW_LINE>return checkerSetHisEntity;<NEW_LINE>}).collect(Collectors.toList());<NEW_LINE>if (toStatus == ToolIntegratedStatus.G) {<NEW_LINE>checkerSetHisRepository.deleteByToolNameAndVersion(toolName, toStatus.value());<NEW_LINE>} else {<NEW_LINE>checkerSetHisRepository.deleteByToolNameAndVersionNot(toolName, <MASK><NEW_LINE>}<NEW_LINE>checkerSetHisRepository.save(bakCheckerSetList);<NEW_LINE>}
ToolIntegratedStatus.G.value());
1,263,313
public String readIdByDn(String dn) {<NEW_LINE>// TODO: this might not be necessary if the LDAP server would support an extended OID<NEW_LINE>// https://ldapwiki.com/wiki/LDAP_SERVER_EXTENDED_DN_OID<NEW_LINE>String id = dns.get(dn);<NEW_LINE>if (id == null) {<NEW_LINE>for (Map.Entry<String, LdapMapRoleEntityFieldDelegate> entry : entities.entrySet()) {<NEW_LINE>LdapMapObject ldap = entry.getValue().getLdapMapObject();<NEW_LINE>if (ldap.getDn().toString().equals(dn)) {<NEW_LINE>id = ldap.getId();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (id != null) {<NEW_LINE>return id;<NEW_LINE>}<NEW_LINE>LdapMapQuery ldapQuery = new LdapMapQuery();<NEW_LINE>// For now, use same search scope, which is configured "globally" and used for user's search.<NEW_LINE>ldapQuery.setSearchScope(ldapMapConfig.getSearchScope());<NEW_LINE>ldapQuery.setSearchDn(roleMapperConfig.getCommonRolesDn());<NEW_LINE>// TODO: read them properly to be able to store them in the transaction so they are cached?!<NEW_LINE>Collection<String> roleObjectClasses = ldapMapConfig.getRoleObjectClasses();<NEW_LINE>ldapQuery.addObjectClasses(roleObjectClasses);<NEW_LINE>String rolesRdnAttr = roleMapperConfig.getRoleNameLdapAttribute();<NEW_LINE>ldapQuery.addReturningLdapAttribute(rolesRdnAttr);<NEW_LINE>LdapMapDn.RDN rdn = LdapMapDn.fromString(dn).getFirstRdn();<NEW_LINE>String key = rdn.<MASK><NEW_LINE>String value = rdn.getAttrValue(key);<NEW_LINE>LdapRoleModelCriteriaBuilder mcb = new LdapRoleModelCriteriaBuilder(roleMapperConfig).compare(RoleModel.SearchableFields.NAME, ModelCriteriaBuilder.Operator.EQ, value);<NEW_LINE>mcb = mcb.withCustomFilter(roleMapperConfig.getCustomLdapFilter());<NEW_LINE>ldapQuery.setModelCriteriaBuilder(mcb);<NEW_LINE>List<LdapMapObject> ldapObjects = identityStore.fetchQueryResults(ldapQuery);<NEW_LINE>if (ldapObjects.size() == 1) {<NEW_LINE>dns.put(dn, ldapObjects.get(0).getId());<NEW_LINE>return ldapObjects.get(0).getId();<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
getAllKeys().get(0);
1,417,256
public static Yield parse(List<Object> wmsg) {<NEW_LINE>MessageUtil.validateMessage(wmsg, <MASK><NEW_LINE>Map<String, Object> options = (Map<String, Object>) wmsg.get(2);<NEW_LINE>List<Object> args = null;<NEW_LINE>if (wmsg.size() > 3) {<NEW_LINE>if (wmsg.get(3) instanceof byte[]) {<NEW_LINE>throw new ProtocolError("Binary payload not supported");<NEW_LINE>}<NEW_LINE>args = (List<Object>) wmsg.get(4);<NEW_LINE>}<NEW_LINE>Map<String, Object> kwargs = null;<NEW_LINE>if (wmsg.size() > 4) {<NEW_LINE>kwargs = (Map<String, Object>) wmsg.get(4);<NEW_LINE>}<NEW_LINE>return new Yield(MessageUtil.parseLong(wmsg.get(1)), args, kwargs);<NEW_LINE>}
MESSAGE_TYPE, "YIELD", 3, 6);
369,245
public Builder mergeFrom(io.kubernetes.client.proto.V1beta1Extensions.DaemonSetList other) {<NEW_LINE>if (other == io.kubernetes.client.proto.V1beta1Extensions.DaemonSetList.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasMetadata()) {<NEW_LINE>mergeMetadata(other.getMetadata());<NEW_LINE>}<NEW_LINE>if (itemsBuilder_ == null) {<NEW_LINE>if (!other.items_.isEmpty()) {<NEW_LINE>if (items_.isEmpty()) {<NEW_LINE>items_ = other.items_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>} else {<NEW_LINE>ensureItemsIsMutable();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.items_.isEmpty()) {<NEW_LINE>if (itemsBuilder_.isEmpty()) {<NEW_LINE>itemsBuilder_.dispose();<NEW_LINE>itemsBuilder_ = null;<NEW_LINE>items_ = other.items_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>itemsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getItemsFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>itemsBuilder_.addAllMessages(other.items_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
items_.addAll(other.items_);
1,754,948
public boolean hitEntity(@Nonnull ItemStack stack, @Nonnull EntityLivingBase entity, @Nonnull EntityLivingBase playerEntity) {<NEW_LINE>if (playerEntity instanceof EntityPlayer) {<NEW_LINE>EntityPlayer player = (EntityPlayer) playerEntity;<NEW_LINE>// Durability damage<NEW_LINE>EnergyUpgradeHolder eu = EnergyUpgradeManager.loadFromItem(stack);<NEW_LINE>if (eu != null && eu.isAbsorbDamageWithPower() && eu.getEnergy() > 0) {<NEW_LINE>eu.extractEnergy(getPowerPerDamagePoint(stack), false);<NEW_LINE>} else {<NEW_LINE>super.hitEntity(stack, entity, playerEntity);<NEW_LINE>}<NEW_LINE>// sword hit<NEW_LINE>if (eu != null) {<NEW_LINE>eu.writeToItem();<NEW_LINE>if (eu.getEnergy() >= DarkSteelConfig.darkSteelSwordPowerUsePerHit.get()) {<NEW_LINE>extractInternal(player.getHeldItemMainhand(), DarkSteelConfig.darkSteelSwordPowerUsePerHit);<NEW_LINE>entity.getEntityData().<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
setBoolean(SwordHandler.HIT_BY_DARK_STEEL_SWORD, true);
1,821,126
public static DescribeDBClusterNetInfoResponse unmarshall(DescribeDBClusterNetInfoResponse describeDBClusterNetInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDBClusterNetInfoResponse.setRequestId(_ctx.stringValue("DescribeDBClusterNetInfoResponse.RequestId"));<NEW_LINE>describeDBClusterNetInfoResponse.setClusterNetworkType(_ctx.stringValue("DescribeDBClusterNetInfoResponse.ClusterNetworkType"));<NEW_LINE>List<Address> items <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDBClusterNetInfoResponse.Items.Length"); i++) {<NEW_LINE>Address address = new Address();<NEW_LINE>address.setVPCId(_ctx.stringValue("DescribeDBClusterNetInfoResponse.Items[" + i + "].VPCId"));<NEW_LINE>address.setPort(_ctx.stringValue("DescribeDBClusterNetInfoResponse.Items[" + i + "].Port"));<NEW_LINE>address.setVSwitchId(_ctx.stringValue("DescribeDBClusterNetInfoResponse.Items[" + i + "].VSwitchId"));<NEW_LINE>address.setIPAddress(_ctx.stringValue("DescribeDBClusterNetInfoResponse.Items[" + i + "].IPAddress"));<NEW_LINE>address.setConnectionString(_ctx.stringValue("DescribeDBClusterNetInfoResponse.Items[" + i + "].ConnectionString"));<NEW_LINE>address.setConnectionStringPrefix(_ctx.stringValue("DescribeDBClusterNetInfoResponse.Items[" + i + "].ConnectionStringPrefix"));<NEW_LINE>address.setNetType(_ctx.stringValue("DescribeDBClusterNetInfoResponse.Items[" + i + "].NetType"));<NEW_LINE>items.add(address);<NEW_LINE>}<NEW_LINE>describeDBClusterNetInfoResponse.setItems(items);<NEW_LINE>return describeDBClusterNetInfoResponse;<NEW_LINE>}
= new ArrayList<Address>();
1,355,303
private void removeMapping(@Nonnull Object element, DefaultMutableTreeNode node, @Nullable Object elementToPutNodeActionsFor) {<NEW_LINE>element = TreeAnchorizer.<MASK><NEW_LINE>warnMap("myElementToNodeMap: removeMapping: ", myElementToNodeMap);<NEW_LINE>final Object value = myElementToNodeMap.get(element);<NEW_LINE>if (value != null) {<NEW_LINE>if (value instanceof DefaultMutableTreeNode) {<NEW_LINE>if (value.equals(node)) {<NEW_LINE>myElementToNodeMap.remove(element);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>List<DefaultMutableTreeNode> nodes = (List<DefaultMutableTreeNode>) value;<NEW_LINE>final boolean reallyRemoved = nodes.remove(node);<NEW_LINE>if (reallyRemoved) {<NEW_LINE>if (nodes.isEmpty()) {<NEW_LINE>myElementToNodeMap.remove(element);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>remapNodeActions(element, elementToPutNodeActionsFor);<NEW_LINE>TreeAnchorizer.getService().freeAnchor(element);<NEW_LINE>}
getService().createAnchor(element);
1,374,435
final GetGroupResult executeGetGroup(GetGroupRequest getGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetGroupRequest> request = null;<NEW_LINE>Response<GetGroupResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new GetGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getGroupRequest));<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, "XRay");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetGroup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetGroupResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetGroupResultJsonUnmarshaller());<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,839,204
public void processCarbonsMessage(AccountJid account, final Message message, CarbonExtension.Direction direction) {<NEW_LINE>if (direction == CarbonExtension.Direction.sent) {<NEW_LINE>ChatMarkersElements.DisplayedExtension extension = ChatMarkersElements.DisplayedExtension.from(message);<NEW_LINE>if (extension != null) {<NEW_LINE>UserJid companion;<NEW_LINE>try {<NEW_LINE>companion = UserJid.from(message.getTo()).getBareUserJid();<NEW_LINE>} catch (UserJid.UserJidCreateException e) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AbstractChat chat = MessageManager.getInstance().getOrCreateChat(account, companion);<NEW_LINE>if (chat != null) {<NEW_LINE>chat.markAsRead(extension.getId(), false);<NEW_LINE>MessageNotificationManager.getInstance().removeChatWithTimer(account, companion);<NEW_LINE>// start grace period<NEW_LINE>AccountManager.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getInstance().startGracePeriod(account);
1,682,679
public static void main(String[] args) throws IOException, InvalidFormatException {<NEW_LINE>try (final Workbook workbook = new XSSFWorkbook();<NEW_LINE>FileOutputStream saveExcel = new FileOutputStream("target/baeldung-apachepoi.xlsx")) {<NEW_LINE>Sheet sheet = workbook.createSheet("Avengers");<NEW_LINE>XSSFDrawing drawing = (XSSFDrawing) sheet.createDrawingPatriarch();<NEW_LINE>XSSFClientAnchor ironManAnchor = new XSSFClientAnchor();<NEW_LINE>XSSFClientAnchor spiderManAnchor = new XSSFClientAnchor();<NEW_LINE>// Fill row1 data<NEW_LINE>Row <MASK><NEW_LINE>row1.setHeight((short) 1000);<NEW_LINE>row1.createCell(0).setCellValue("IRON-MAN");<NEW_LINE>updateCellWithImage(workbook, 1, drawing, ironManAnchor, "ironman.png");<NEW_LINE>// Fill row2 data<NEW_LINE>Row row2 = sheet.createRow(1);<NEW_LINE>row2.setHeight((short) 1000);<NEW_LINE>row2.createCell(0).setCellValue("SPIDER-MAN");<NEW_LINE>updateCellWithImage(workbook, 2, drawing, spiderManAnchor, "spiderman.png");<NEW_LINE>// Resize all columns to fit the content size<NEW_LINE>for (int i = 0; i < 2; i++) {<NEW_LINE>sheet.autoSizeColumn(i);<NEW_LINE>}<NEW_LINE>workbook.write(saveExcel);<NEW_LINE>}<NEW_LINE>}
row1 = sheet.createRow(0);
762,830
protected String extractTokenFromResponse(String response, String tokenName) {<NEW_LINE>if (response == null)<NEW_LINE>return null;<NEW_LINE>if (response.startsWith("{")) {<NEW_LINE>try {<NEW_LINE>JsonNode node = mapper.readTree(response);<NEW_LINE>if (node.has(tokenName)) {<NEW_LINE>String s = node.get(tokenName).textValue();<NEW_LINE>if (s == null || s.trim().isEmpty())<NEW_LINE>return null;<NEW_LINE>return s;<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new IdentityBrokerException("Could not extract token [" + tokenName + "] from response [" + response + "] due: " + <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Matcher matcher = Pattern.compile(tokenName + "=([^&]+)").matcher(response);<NEW_LINE>if (matcher.find()) {<NEW_LINE>return matcher.group(1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
e.getMessage(), e);
1,545,305
public void saveOverride(DynamicConfigDTO override) {<NEW_LINE>String id = ConvertUtil.getIdFromDTO(override);<NEW_LINE>String path = getPath(id);<NEW_LINE>String exitConfig = dynamicConfiguration.getConfig(path);<NEW_LINE>List<OverrideConfig> configs = new ArrayList<>();<NEW_LINE><MASK><NEW_LINE>if (exitConfig != null) {<NEW_LINE>existOverride = YamlParser.loadObject(exitConfig, OverrideDTO.class);<NEW_LINE>if (existOverride.getConfigs() != null) {<NEW_LINE>for (OverrideConfig overrideConfig : existOverride.getConfigs()) {<NEW_LINE>if (Constants.CONFIGS.contains(overrideConfig.getType())) {<NEW_LINE>configs.add(overrideConfig);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>configs.addAll(override.getConfigs());<NEW_LINE>existOverride.setEnabled(override.isEnabled());<NEW_LINE>existOverride.setConfigs(configs);<NEW_LINE>dynamicConfiguration.setConfig(path, YamlParser.dumpObject(existOverride));<NEW_LINE>// for2.6<NEW_LINE>if (StringUtils.isNotEmpty(override.getService())) {<NEW_LINE>List<Override> result = convertDTOtoOldOverride(override);<NEW_LINE>for (Override o : result) {<NEW_LINE>registry.register(o.toUrl().addParameter(Constants.COMPATIBLE_CONFIG, true));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
OverrideDTO existOverride = new DynamicConfigDTO2OverrideDTOAdapter(override);
969,079
public void initialize() {<NEW_LINE>if (this.release == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.release = getReleaseOptionFromCompliance(this.release);<NEW_LINE>this.releaseInHex = Integer.toHexString(Integer.parseInt(this.release)).toUpperCase();<NEW_LINE>Path lib = Paths.get(this.zipFilename).getParent();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Path filePath = Paths.get(lib.toString(), "ct.sym");<NEW_LINE>URI t = filePath.toUri();<NEW_LINE>if (!Files.exists(filePath)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>URI uri = URI.create("jar:file:" + t.getRawPath());<NEW_LINE>try {<NEW_LINE>this.fs = FileSystems.getFileSystem(uri);<NEW_LINE>} catch (FileSystemNotFoundException fne) {<NEW_LINE>// Ignore and move on<NEW_LINE>}<NEW_LINE>if (this.fs == null) {<NEW_LINE>HashMap<String, ?> env = new HashMap<>();<NEW_LINE>try {<NEW_LINE>this.fs = FileSystems.newFileSystem(uri, env);<NEW_LINE>} catch (IOException e) {<NEW_LINE>this.release = null;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>this.releasePath = this.fs.getPath("/");<NEW_LINE>if (!Files.exists(this.fs.getPath(this.releaseInHex)) || Files.exists(this.fs.getPath(this.releaseInHex, "system-modules"))) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>this.release = null;<NEW_LINE>}<NEW_LINE>if (this.release != null) {<NEW_LINE>List<String> sub = new ArrayList<>();<NEW_LINE>try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(this.releasePath)) {<NEW_LINE>for (final java.nio.file.Path subdir : stream) {<NEW_LINE>String rel = subdir<MASK><NEW_LINE>if (rel.contains(this.releaseInHex)) {<NEW_LINE>sub.add(rel);<NEW_LINE>} else {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>// Rethrow<NEW_LINE>}<NEW_LINE>this.subReleases = sub.toArray(new String[sub.size()]);<NEW_LINE>}<NEW_LINE>}
.getFileName().toString();
1,398,370
public DescribeObservationResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeObservationResult describeObservationResult = new DescribeObservationResult();<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 describeObservationResult;<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("Observation", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeObservationResult.setObservation(ObservationJsonUnmarshaller.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 describeObservationResult;<NEW_LINE>}
().unmarshall(context));
436,238
final GetFieldLevelEncryptionResult executeGetFieldLevelEncryption(GetFieldLevelEncryptionRequest getFieldLevelEncryptionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFieldLevelEncryptionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetFieldLevelEncryptionRequest> request = null;<NEW_LINE>Response<GetFieldLevelEncryptionResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new GetFieldLevelEncryptionRequestMarshaller().marshall(super.beforeMarshalling(getFieldLevelEncryptionRequest));<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, "GetFieldLevelEncryption");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<GetFieldLevelEncryptionResult> responseHandler = new StaxResponseHandler<GetFieldLevelEncryptionResult>(new GetFieldLevelEncryptionResultStaxUnmarshaller());<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,246,014
public static boolean areOppositeBranches(int opcode1, int opcode2) {<NEW_LINE>if (!isBranch(opcode1)) {<NEW_LINE>throw new IllegalArgumentException<MASK><NEW_LINE>}<NEW_LINE>if (!isBranch(opcode2)) {<NEW_LINE>throw new IllegalArgumentException(OPCODE_NAMES[opcode2] + " isn't a branch");<NEW_LINE>}<NEW_LINE>switch(opcode1) {<NEW_LINE>case IF_ACMPEQ:<NEW_LINE>case IF_ACMPNE:<NEW_LINE>case IF_ICMPEQ:<NEW_LINE>case IF_ICMPNE:<NEW_LINE>case IF_ICMPLT:<NEW_LINE>case IF_ICMPLE:<NEW_LINE>case IF_ICMPGT:<NEW_LINE>case IF_ICMPGE:<NEW_LINE>case IFNE:<NEW_LINE>case IFEQ:<NEW_LINE>case IFLT:<NEW_LINE>case IFLE:<NEW_LINE>case IFGT:<NEW_LINE>case IFGE:<NEW_LINE>return ((opcode1 + 1) ^ 1) == opcode2 + 1;<NEW_LINE>case IFNONNULL:<NEW_LINE>return opcode2 == IFNULL;<NEW_LINE>case IFNULL:<NEW_LINE>return opcode2 == IFNONNULL;<NEW_LINE>default:<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
(OPCODE_NAMES[opcode1] + " isn't a branch");
1,219,372
public void encode(Buffer valueBuffer) {<NEW_LINE>StrategyAnalyzer<Long> collectIntervalStrategyAnalyzer = collectIntervalAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> sampledNewCountStrategyAnalyzer = sampledNewCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> sampledContinuationCountStrategyAnalyzer = sampledContinuationCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> unsampledNewCountStrategyAnalyzer = unsampledNewCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> unsampledContinuationCountStrategyAnalyzer = unsampledContinuationCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long> skippedNewCountStrategyAnalyzer = skippedNewCountAnalyzerBuilder.build();<NEW_LINE>StrategyAnalyzer<Long<MASK><NEW_LINE>// encode header<NEW_LINE>AgentStatHeaderEncoder headerEncoder = new BitCountingHeaderEncoder();<NEW_LINE>headerEncoder.addCode(collectIntervalStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(sampledNewCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(sampledContinuationCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(unsampledNewCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(unsampledContinuationCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(skippedNewCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>headerEncoder.addCode(skippedContinuationCountStrategyAnalyzer.getBestStrategy().getCode());<NEW_LINE>final byte[] header = headerEncoder.getHeader();<NEW_LINE>valueBuffer.putPrefixedBytes(header);<NEW_LINE>// encode values<NEW_LINE>this.codec.encodeValues(valueBuffer, collectIntervalStrategyAnalyzer.getBestStrategy(), collectIntervalStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, sampledNewCountStrategyAnalyzer.getBestStrategy(), sampledNewCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, sampledContinuationCountStrategyAnalyzer.getBestStrategy(), sampledContinuationCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, unsampledNewCountStrategyAnalyzer.getBestStrategy(), unsampledNewCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, unsampledContinuationCountStrategyAnalyzer.getBestStrategy(), unsampledContinuationCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, skippedNewCountStrategyAnalyzer.getBestStrategy(), skippedNewCountStrategyAnalyzer.getValues());<NEW_LINE>this.codec.encodeValues(valueBuffer, skippedContinuationCountStrategyAnalyzer.getBestStrategy(), skippedContinuationCountStrategyAnalyzer.getValues());<NEW_LINE>}
> skippedContinuationCountStrategyAnalyzer = skippedContinuationCountAnalyzerBuilder.build();
1,505,977
public boolean canDecodeInput(File file) throws IOException {<NEW_LINE>if (file == null) {<NEW_LINE>throw new IllegalArgumentException("file == null!");<NEW_LINE>}<NEW_LINE>if (!file.canRead()) {<NEW_LINE>throw new IIOException("cannot read the input file");<NEW_LINE>}<NEW_LINE>byte[<MASK><NEW_LINE>// set-up a FileChannel instance for a given file object<NEW_LINE>try (FileChannel srcChannel = new FileInputStream(file).getChannel()) {<NEW_LINE>// create a read-only MappedByteBuffer<NEW_LINE>MappedByteBuffer buff = srcChannel.map(FileChannel.MapMode.READ_ONLY, 0, DTA_HEADER_SIZE);<NEW_LINE>// printHexDump(buff, "hex dump of the byte-buffer");<NEW_LINE>buff.rewind();<NEW_LINE>dbgLog.fine("applying the dta test\n");<NEW_LINE>buff.get(hdr4, 0, 4);<NEW_LINE>}<NEW_LINE>dbgLog.fine("hex dump: 1st 4bytes =>" + new String(Hex.encodeHex(hdr4)) + "<-");<NEW_LINE>if (hdr4[2] != 1) {<NEW_LINE>dbgLog.fine("3rd byte is not 1: given file is not stata-dta type");<NEW_LINE>return false;<NEW_LINE>} else if ((hdr4[1] != 1) && (hdr4[1] != 2)) {<NEW_LINE>dbgLog.fine("2nd byte is neither 0 nor 1: this file is not stata-dta type");<NEW_LINE>return false;<NEW_LINE>} else if (!stataReleaseNumber.containsKey(hdr4[0])) {<NEW_LINE>dbgLog.fine("1st byte (" + hdr4[0] + ") is not within the ingestable range [rel. 3-10]: this file is NOT stata-dta type");<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>dbgLog.fine("this file is stata-dta type: " + stataReleaseNumber.get(hdr4[0]) + "(No in HEX=" + hdr4[0] + ")");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}
] hdr4 = new byte[4];
232,432
private void createSegment(File dataFile, int sequenceId) throws IOException {<NEW_LINE>LOGGER.info("Creating segment from data file: {} of sequence id: {}", dataFile, sequenceId);<NEW_LINE>_segmentGeneratorConfig.setInputFilePath(dataFile.getPath());<NEW_LINE>_segmentGeneratorConfig.setSequenceId(sequenceId);<NEW_LINE>SegmentIndexCreationDriver driver = new SegmentIndexCreationDriverImpl();<NEW_LINE>try {<NEW_LINE>driver.init(_segmentGeneratorConfig);<NEW_LINE>driver.build();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IllegalStateException("Caught exception while creating segment from data file: " + dataFile);<NEW_LINE>}<NEW_LINE>String segmentName = driver.getSegmentName();<NEW_LINE>File indexDir = driver.getOutputDirectory();<NEW_LINE>LOGGER.info("Created segment: {} from data file: {} into directory: {}", segmentName, dataFile, indexDir);<NEW_LINE>File segmentTarFile = new File(<MASK><NEW_LINE>LOGGER.info("Tarring segment: {} from directory: {} to: {}", segmentName, indexDir, segmentTarFile);<NEW_LINE>TarGzCompressionUtils.createTarGzFile(indexDir, segmentTarFile);<NEW_LINE>Path hdfsSegmentTarPath = new Path(_outputDir, segmentTarFile.getName());<NEW_LINE>LOGGER.info("Copying segment tar file from local: {} to HDFS: {}", segmentTarFile, hdfsSegmentTarPath);<NEW_LINE>_fileSystem.copyFromLocalFile(true, new Path(segmentTarFile.getPath()), hdfsSegmentTarPath);<NEW_LINE>LOGGER.info("Finish creating segment: {} from data file: {} of sequence id: {} into HDFS: {}", segmentName, dataFile, sequenceId, hdfsSegmentTarPath);<NEW_LINE>}
_segmentTarDir, segmentName + TarGzCompressionUtils.TAR_GZ_FILE_EXTENSION);
1,711,491
private void processClassReferences(ObjectiveC2_State state) throws Exception {<NEW_LINE>state.monitor.setMessage("Objective-C 2.0 Class References...");<NEW_LINE>MemoryBlock block = state.program.getMemory().getBlock(ObjectiveC2_Constants.OBJC2_CLASS_REFS);<NEW_LINE>if (block == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ObjectiveC1_Utilities.clear(state, block);<NEW_LINE>long count = block.getSize() / state.pointerSize;<NEW_LINE>state.monitor.initialize((int) count);<NEW_LINE>Address address = block.getStart();<NEW_LINE>for (int i = 0; i < count; ++i) {<NEW_LINE>if (state.monitor.isCancelled()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>state.monitor.setProgress(i);<NEW_LINE>ObjectiveC1_Utilities.createPointerAndReturnAddressBeingReferenced(state.program, address);<NEW_LINE>address = <MASK><NEW_LINE>}<NEW_LINE>}
address.add(state.pointerSize);
345,522
public void marshall(InstanceStorageConfig instanceStorageConfig, AwsJsonWriter jsonWriter) throws Exception {<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (instanceStorageConfig.getAssociationId() != null) {<NEW_LINE><MASK><NEW_LINE>jsonWriter.name("AssociationId");<NEW_LINE>jsonWriter.value(associationId);<NEW_LINE>}<NEW_LINE>if (instanceStorageConfig.getStorageType() != null) {<NEW_LINE>String storageType = instanceStorageConfig.getStorageType();<NEW_LINE>jsonWriter.name("StorageType");<NEW_LINE>jsonWriter.value(storageType);<NEW_LINE>}<NEW_LINE>if (instanceStorageConfig.getS3Config() != null) {<NEW_LINE>S3Config s3Config = instanceStorageConfig.getS3Config();<NEW_LINE>jsonWriter.name("S3Config");<NEW_LINE>S3ConfigJsonMarshaller.getInstance().marshall(s3Config, jsonWriter);<NEW_LINE>}<NEW_LINE>if (instanceStorageConfig.getKinesisVideoStreamConfig() != null) {<NEW_LINE>KinesisVideoStreamConfig kinesisVideoStreamConfig = instanceStorageConfig.getKinesisVideoStreamConfig();<NEW_LINE>jsonWriter.name("KinesisVideoStreamConfig");<NEW_LINE>KinesisVideoStreamConfigJsonMarshaller.getInstance().marshall(kinesisVideoStreamConfig, jsonWriter);<NEW_LINE>}<NEW_LINE>if (instanceStorageConfig.getKinesisStreamConfig() != null) {<NEW_LINE>KinesisStreamConfig kinesisStreamConfig = instanceStorageConfig.getKinesisStreamConfig();<NEW_LINE>jsonWriter.name("KinesisStreamConfig");<NEW_LINE>KinesisStreamConfigJsonMarshaller.getInstance().marshall(kinesisStreamConfig, jsonWriter);<NEW_LINE>}<NEW_LINE>if (instanceStorageConfig.getKinesisFirehoseConfig() != null) {<NEW_LINE>KinesisFirehoseConfig kinesisFirehoseConfig = instanceStorageConfig.getKinesisFirehoseConfig();<NEW_LINE>jsonWriter.name("KinesisFirehoseConfig");<NEW_LINE>KinesisFirehoseConfigJsonMarshaller.getInstance().marshall(kinesisFirehoseConfig, jsonWriter);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>}
String associationId = instanceStorageConfig.getAssociationId();
1,506,810
public void marshall(FirewallRule firewallRule, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (firewallRule == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(firewallRule.getFirewallDomainListId(), FIREWALLDOMAINLISTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getPriority(), PRIORITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getAction(), ACTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getBlockResponse(), BLOCKRESPONSE_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getBlockOverrideDomain(), BLOCKOVERRIDEDOMAIN_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getBlockOverrideDnsType(), BLOCKOVERRIDEDNSTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getBlockOverrideTtl(), BLOCKOVERRIDETTL_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getCreatorRequestId(), CREATORREQUESTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getCreationTime(), CREATIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(firewallRule.getModificationTime(), MODIFICATIONTIME_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
firewallRule.getFirewallRuleGroupId(), FIREWALLRULEGROUPID_BINDING);
942,417
int commit(long upToTransactionId) {<NEW_LINE>long traceId = LoggerHelpers.traceEnterWithContext(log, this.traceObjectId, "commit", upToTransactionId);<NEW_LINE>// Commit every UpdateTransaction, in order, until we reach our transaction id.<NEW_LINE>List<Long> commits = new ArrayList<>();<NEW_LINE>while (!this.transactions.isEmpty() && this.transactions.peekFirst().getTransactionId() <= upToTransactionId) {<NEW_LINE>ContainerMetadataUpdateTransaction txn <MASK><NEW_LINE>txn.seal();<NEW_LINE>txn.commit(this.metadata);<NEW_LINE>commits.add(txn.getTransactionId());<NEW_LINE>}<NEW_LINE>// Rebase the first remaining UpdateTransaction over to the current metadata (it was previously pointing to the<NEW_LINE>// last committed UpdateTransaction).<NEW_LINE>if (commits.size() > 0 && !this.transactions.isEmpty()) {<NEW_LINE>this.transactions.peekFirst().rebase(this.metadata);<NEW_LINE>}<NEW_LINE>LoggerHelpers.traceLeave(log, this.traceObjectId, "commit", traceId, commits);<NEW_LINE>return commits.size();<NEW_LINE>}
= this.transactions.removeFirst();
914,478
private boolean updateCalculatedGoals() {<NEW_LINE>if (!MEASURETYPE_Calculated.equals(getMeasureType()))<NEW_LINE>return false;<NEW_LINE>MGoal[] goals = MGoal.getMeasureGoals(<MASK><NEW_LINE>for (int i = 0; i < goals.length; i++) {<NEW_LINE>MGoal goal = goals[i];<NEW_LINE>// Find Role<NEW_LINE>MRole role = null;<NEW_LINE>if (goal.getAD_Role_ID() != 0)<NEW_LINE>role = MRole.get(getCtx(), goal.getAD_Role_ID());<NEW_LINE>else if (goal.getAD_User_ID() != 0) {<NEW_LINE>MUser user = MUser.get(getCtx(), goal.getAD_User_ID());<NEW_LINE>MRole[] roles = user.getRoles(goal.getAD_Org_ID());<NEW_LINE>if (roles.length > 0)<NEW_LINE>role = roles[0];<NEW_LINE>}<NEW_LINE>if (role == null)<NEW_LINE>// could result in wrong data<NEW_LINE>role = MRole.getDefault(getCtx(), false);<NEW_LINE>//<NEW_LINE>MMeasureCalc mc = MMeasureCalc.get(getCtx(), getPA_MeasureCalc_ID());<NEW_LINE>if (mc == null || mc.get_ID() == 0 || mc.get_ID() != getPA_MeasureCalc_ID()) {<NEW_LINE>log.log(Level.SEVERE, "Not found PA_MeasureCalc_ID=" + getPA_MeasureCalc_ID());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String sql = mc.getSqlPI(goal.getRestrictions(false), goal.getMeasureScope(), getMeasureDataType(), null, role);<NEW_LINE>BigDecimal ManualActual = DB.getSQLValueBD(null, sql, new Object[] {});<NEW_LINE>// SQL may return no rows or null<NEW_LINE>if (ManualActual == null) {<NEW_LINE>ManualActual = Env.ZERO;<NEW_LINE>log.fine("No Value = " + sql);<NEW_LINE>}<NEW_LINE>goal.setMeasureActual(ManualActual);<NEW_LINE>goal.save(get_TrxName());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getCtx(), getPA_Measure_ID());
1,418,929
public synchronized String execute(final String aCommand, final String... params) throws IOException, InterruptedException {<NEW_LINE>// build command array<NEW_LINE>String[] arrayCommand = new String[params.length + 1];<NEW_LINE>arrayCommand[0] = aCommand;<NEW_LINE>StringBuilder arrayCommandToLog = new StringBuilder();<NEW_LINE>arrayCommandToLog.append(aCommand).append(" ");<NEW_LINE>for (int i = 1; i < arrayCommand.length; i++) {<NEW_LINE>arrayCommand[i<MASK><NEW_LINE>arrayCommandToLog.append(arrayCommand[i]).append(" ");<NEW_LINE>}<NEW_LINE>final Runtime rt = Runtime.getRuntime();<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.INFO, "Executing {0}", arrayCommandToLog.toString());<NEW_LINE>proc = rt.exec(arrayCommand);<NEW_LINE>// stderr redirect<NEW_LINE>// NON-NLS<NEW_LINE>errorStringRedirect = new ExecUtil.StreamToStringRedirect(proc.getErrorStream(), "ERROR");<NEW_LINE>errorStringRedirect.start();<NEW_LINE>// stdout redirect<NEW_LINE>// NON-NLS<NEW_LINE>outputStringRedirect = new ExecUtil.StreamToStringRedirect(proc.getInputStream(), "OUTPUT");<NEW_LINE>outputStringRedirect.start();<NEW_LINE>// wait for process to complete and capture error core<NEW_LINE>this.exitValue = proc.waitFor();<NEW_LINE>// wait for output redirectors to finish writing / reading<NEW_LINE>outputStringRedirect.join();<NEW_LINE>errorStringRedirect.join();<NEW_LINE>return outputStringRedirect.getOutput();<NEW_LINE>}
] = params[i - 1];
200,614
public Request<DeleteTableRequest> marshall(DeleteTableRequest deleteTableRequest) {<NEW_LINE>if (deleteTableRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DeleteTableRequest)");<NEW_LINE>}<NEW_LINE>Request<DeleteTableRequest> request = new DefaultRequest<DeleteTableRequest>(deleteTableRequest, "AmazonDynamoDB");<NEW_LINE>String target = "DynamoDB_20120810.DeleteTable";<NEW_LINE>request.addHeader("X-Amz-Target", target);<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (deleteTableRequest.getTableName() != null) {<NEW_LINE>String tableName = deleteTableRequest.getTableName();<NEW_LINE>jsonWriter.name("TableName");<NEW_LINE>jsonWriter.value(tableName);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.0");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
t.getMessage(), t);
839,830
public static SearchMetaTablesResponse unmarshall(SearchMetaTablesResponse searchMetaTablesResponse, UnmarshallerContext _ctx) {<NEW_LINE>searchMetaTablesResponse.setRequestId(_ctx.stringValue("SearchMetaTablesResponse.RequestId"));<NEW_LINE>searchMetaTablesResponse.setHttpStatusCode(_ctx.integerValue("SearchMetaTablesResponse.HttpStatusCode"));<NEW_LINE>searchMetaTablesResponse.setErrorMessage(_ctx.stringValue("SearchMetaTablesResponse.ErrorMessage"));<NEW_LINE>searchMetaTablesResponse.setSuccess(_ctx.booleanValue("SearchMetaTablesResponse.Success"));<NEW_LINE>searchMetaTablesResponse.setErrorCode<MASK><NEW_LINE>Data data = new Data();<NEW_LINE>data.setPageNumber(_ctx.integerValue("SearchMetaTablesResponse.Data.PageNumber"));<NEW_LINE>data.setPageSize(_ctx.integerValue("SearchMetaTablesResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.longValue("SearchMetaTablesResponse.Data.TotalCount"));<NEW_LINE>List<DataEntityListItem> dataEntityList = new ArrayList<DataEntityListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("SearchMetaTablesResponse.Data.DataEntityList.Length"); i++) {<NEW_LINE>DataEntityListItem dataEntityListItem = new DataEntityListItem();<NEW_LINE>dataEntityListItem.setTableName(_ctx.stringValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].TableName"));<NEW_LINE>dataEntityListItem.setDatabaseName(_ctx.stringValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].DatabaseName"));<NEW_LINE>dataEntityListItem.setEntityType(_ctx.integerValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].EntityType"));<NEW_LINE>dataEntityListItem.setProjectName(_ctx.stringValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].ProjectName"));<NEW_LINE>dataEntityListItem.setProjectId(_ctx.longValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].ProjectId"));<NEW_LINE>dataEntityListItem.setTableGuid(_ctx.stringValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].TableGuid"));<NEW_LINE>dataEntityListItem.setOwnerId(_ctx.stringValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].OwnerId"));<NEW_LINE>dataEntityListItem.setClusterId(_ctx.stringValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].ClusterId"));<NEW_LINE>dataEntityListItem.setEnvType(_ctx.integerValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].EnvType"));<NEW_LINE>dataEntityListItem.setTenantId(_ctx.longValue("SearchMetaTablesResponse.Data.DataEntityList[" + i + "].TenantId"));<NEW_LINE>dataEntityList.add(dataEntityListItem);<NEW_LINE>}<NEW_LINE>data.setDataEntityList(dataEntityList);<NEW_LINE>searchMetaTablesResponse.setData(data);<NEW_LINE>return searchMetaTablesResponse;<NEW_LINE>}
(_ctx.stringValue("SearchMetaTablesResponse.ErrorCode"));
1,253,846
private WriterCacheEntry makeCacheEntry(String eventTypeName) {<NEW_LINE>EventType eventType = runtime.getServicesContext().getEventTypeRepositoryBus().getNameToTypeMap().get(eventTypeName);<NEW_LINE>if (eventType == null) {<NEW_LINE>log.<MASK><NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!(eventType instanceof EventTypeSPI)) {<NEW_LINE>log.info("Event type by name '" + eventTypeName + "' is not writable.");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>EventTypeSPI eventTypeSPI = (EventTypeSPI) eventType;<NEW_LINE>Set<WriteablePropertyDescriptor> writablesSet = EventTypeUtility.getWriteableProperties(eventTypeSPI, false, false);<NEW_LINE>List<WriteablePropertyDescriptor> writablePropertiesList = new ArrayList<WriteablePropertyDescriptor>();<NEW_LINE>List<SimpleTypeParser> parserList = new ArrayList<SimpleTypeParser>();<NEW_LINE>for (WriteablePropertyDescriptor writableDesc : writablesSet) {<NEW_LINE>if (writableDesc.getType() == EPTypeNull.INSTANCE) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>EPTypeClass typeClass = (EPTypeClass) writableDesc.getType();<NEW_LINE>SimpleTypeParser parser = SimpleTypeParserFactory.getParser(typeClass.getType());<NEW_LINE>if (parser == null) {<NEW_LINE>log.debug("No parser found for type '" + writableDesc.getType() + "'");<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>writablePropertiesList.add(writableDesc);<NEW_LINE>parserList.add(parser);<NEW_LINE>}<NEW_LINE>WriteablePropertyDescriptor[] writableProperties = writablePropertiesList.toArray(new WriteablePropertyDescriptor[writablePropertiesList.size()]);<NEW_LINE>SimpleTypeParser[] parsers = parserList.toArray(new SimpleTypeParser[parserList.size()]);<NEW_LINE>EventBeanManufacturer eventBeanManufacturer;<NEW_LINE>try {<NEW_LINE>eventBeanManufacturer = EventTypeUtility.getManufacturer(eventType, writableProperties, runtime.getServicesContext().getClasspathImportServiceRuntime(), false, runtime.getServicesContext().getEventTypeAvroHandler()).getManufacturer(runtime.getServicesContext().getEventBeanTypedEventFactory());<NEW_LINE>} catch (EventBeanManufactureException e) {<NEW_LINE>log.info("Unable to create manufacturer for event type: " + e.getMessage(), e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return new WriterCacheEntry(eventBeanManufacturer, writableProperties, parsers);<NEW_LINE>}
info("Event type by name '" + eventTypeName + "' not found.");
1,567,444
private void assembleShare(Share share, Business business, Wi wi, EffectivePerson effectivePerson) throws Exception {<NEW_LINE>Attachment2 attachment = business.entityManagerContainer().find(wi.getFileId(), Attachment2.class);<NEW_LINE>if (attachment == null) {<NEW_LINE>Folder2 folder = business.entityManagerContainer().find(wi.getFileId(), Folder2.class);<NEW_LINE>if (folder == null) {<NEW_LINE>throw new ExceptionShareNotExist(wi.getFileId());<NEW_LINE>} else {<NEW_LINE>if (!business.controlAble(effectivePerson) && !StringUtils.equals(folder.getPerson(), effectivePerson.getDistinguishedName())) {<NEW_LINE>throw new ExceptionAccessDenied(effectivePerson, folder);<NEW_LINE>}<NEW_LINE>share.setFileType(Share.FILE_TYPE_FOLDER);<NEW_LINE>share.setName(folder.getName());<NEW_LINE>share.setPerson(folder.getPerson());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!business.controlAble(effectivePerson) && !StringUtils.equals(attachment.getPerson(), effectivePerson.getDistinguishedName())) {<NEW_LINE>throw new ExceptionAccessDenied(effectivePerson, attachment);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>share.setName(attachment.getName());<NEW_LINE>share.setLength(attachment.getLength());<NEW_LINE>share.setExtension(attachment.getExtension());<NEW_LINE>share.setPerson(attachment.getPerson());<NEW_LINE>}<NEW_LINE>share.setLastUpdateTime(new Date());<NEW_LINE>if (share.getValidTime() == null) {<NEW_LINE>share.setValidTime(DateTools.getDateAfterYearAdjust(new Date(), 100, null, null));<NEW_LINE>}<NEW_LINE>}
share.setFileType(Share.FILE_TYPE_ATTACHMENT);
201,031
public static void vertical7(Kernel1D_F64 kernel, GrayF64 src, GrayF64 dst) {<NEW_LINE>final double[] dataSrc = src.data;<NEW_LINE>final double[] dataDst = dst.data;<NEW_LINE>final double k1 = kernel.data[0];<NEW_LINE>final double k2 = kernel.data[1];<NEW_LINE>final double k3 = kernel.data[2];<NEW_LINE>final double k4 = kernel.data[3];<NEW_LINE>final double k5 = kernel.data[4];<NEW_LINE>final double k6 = kernel.data[5];<NEW_LINE>final double k7 = kernel.data[6];<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int imgWidth = dst.getWidth();<NEW_LINE>final int imgHeight = dst.getHeight();<NEW_LINE>final int yEnd = imgHeight - radius;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(radius, yEnd, y -> {<NEW_LINE>for (int y = radius; y < yEnd; y++) {<NEW_LINE>int indexDst = dst.startIndex + y * dst.stride;<NEW_LINE>int i = src.startIndex + (y - radius) * src.stride;<NEW_LINE>final int iEnd = i + imgWidth;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>double total = (dataSrc[indexSrc]) * k1;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += <MASK><NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k3;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k4;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k5;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k6;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k7;<NEW_LINE>dataDst[indexDst++] = total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
(dataSrc[indexSrc]) * k2;
947,954
public Expression visitGstringPath(final GstringPathContext ctx) {<NEW_LINE>VariableExpression variableExpression = new VariableExpression(this.visitIdentifier(ctx.identifier()));<NEW_LINE>if (asBoolean(ctx.GStringPathPart())) {<NEW_LINE>Expression propertyExpression = // GRECLIPSE add<NEW_LINE>ctx.GStringPathPart().stream().map(e -> configureAST((Expression) new ConstantExpression(e.getText().substring(1)), e)).peek(expression -> {<NEW_LINE>expression.setStart(expression.getStart() + 1);<NEW_LINE>int[] row_col = locationSupport.getRowCol(expression.getStart());<NEW_LINE>expression.setLineNumber(row_col[0]);<NEW_LINE>expression.setColumnNumber(row_col[1]);<NEW_LINE>}).// GRECLIPSE end<NEW_LINE>reduce(configureAST(variableExpression, ctx.identifier()), (r, e) -> {<NEW_LINE>PropertyExpression pe = configureAST(new PropertyExpression(r, e), e);<NEW_LINE>pe.setStart(pe.getObjectExpression().getStart());<NEW_LINE>pe.setLineNumber(pe.<MASK><NEW_LINE>pe.setColumnNumber(pe.getObjectExpression().getColumnNumber());<NEW_LINE>return pe;<NEW_LINE>});<NEW_LINE>// GRECLIPSE end<NEW_LINE>return propertyExpression;<NEW_LINE>// GRECLIPSE end<NEW_LINE>}<NEW_LINE>return variableExpression;<NEW_LINE>// GRECLIPSE end<NEW_LINE>}
getObjectExpression().getLineNumber());
432,916
private void buildUI() {<NEW_LINE>BorderLayout borderLayout = new BorderLayout();<NEW_LINE>setLayout(borderLayout);<NEW_LINE>ringChartPanel = new RingChartPanel(this);<NEW_LINE>toolbar = new Toolbar(this);<NEW_LINE>add(toolbar, BorderLayout.NORTH);<NEW_LINE>toolbar.addKeyListenerToTypingArea(this);<NEW_LINE>displayArea = new DisplayArea(this);<NEW_LINE>final JScrollPane rightScrollPane = new JScrollPane(displayArea.onAddComponentToPane());<NEW_LINE>theme.applyTo(rightScrollPane);<NEW_LINE>filesTree = new FilesTree(this);<NEW_LINE>JTabbedPane jTabbedPane = new JTabbedPane();<NEW_LINE>JScrollPane leftScrollPane = new <MASK><NEW_LINE>theme.applyTo(leftScrollPane);<NEW_LINE>jTabbedPane.addTab("Classes", leftScrollPane);<NEW_LINE>methodsCountPanel = new MethodsCountPanel(this);<NEW_LINE>jTabbedPane.addTab("Methods count", methodsCountPanel);<NEW_LINE>theme.applyTo(jTabbedPane);<NEW_LINE>jTabbedPane.addChangeListener(new ChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void stateChanged(ChangeEvent e) {<NEW_LINE>int dividerLocation1 = jSplitPane.getDividerLocation();<NEW_LINE>JTabbedPane jTabbedPane1 = (JTabbedPane) e.getSource();<NEW_LINE>if (jTabbedPane1.getSelectedIndex() == 0) {<NEW_LINE>jSplitPane.setRightComponent(rightScrollPane);<NEW_LINE>} else {<NEW_LINE>jSplitPane.setRightComponent(ringChartPanel);<NEW_LINE>}<NEW_LINE>jSplitPane.setDividerLocation(dividerLocation1);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>jSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);<NEW_LINE>jSplitPane.setDividerSize(3);<NEW_LINE>jSplitPane.setPreferredSize(new Dimension(1000, 700));<NEW_LINE>jSplitPane.add(jTabbedPane, JSplitPane.LEFT);<NEW_LINE>jSplitPane.add(rightScrollPane, JSplitPane.RIGHT);<NEW_LINE>jSplitPane.getLeftComponent().setVisible(true);<NEW_LINE>jSplitPane.setDividerLocation(300);<NEW_LINE>theme.applyTo(jSplitPane);<NEW_LINE>add(jSplitPane, BorderLayout.CENTER);<NEW_LINE>}
JScrollPane(filesTree.getJTree());
1,193,048
public void processConfigEntryProperties() {<NEW_LINE>super.processConfigEntryProperties();<NEW_LINE>if (configEntry.processorData[SLOT_EDGEABLE] != null) {<NEW_LINE>edgeable = ((Boolean) configEntry.processorData[SLOT_EDGEABLE]).booleanValue();<NEW_LINE>}<NEW_LINE>if (configEntry.processorData[SLOT_CONSUME_SUBFRAGMENTS] != null) {<NEW_LINE>consumeSubfragments = ((Boolean) configEntry.processorData[SLOT_CONSUME_SUBFRAGMENTS]).booleanValue();<NEW_LINE>}<NEW_LINE>if (configEntry.processorData[SLOT_EXTERNALCACHE] != null) {<NEW_LINE>externalCacheGroupId = (String) configEntry.processorData[SLOT_EXTERNALCACHE];<NEW_LINE>}<NEW_LINE>if (configEntry.processorData[SLOT_ALTERNATE_URL] != null) {<NEW_LINE>// NK2 begin<NEW_LINE>altUrl = (String) configEntry.processorData[SLOT_ALTERNATE_URL];<NEW_LINE>}<NEW_LINE>// NK2 end<NEW_LINE>if (configEntry.processorData[SLOT_DO_NOT_CONSUME] != null) {<NEW_LINE>doNotConsume = ((Boolean) configEntry.processorData[SLOT_DO_NOT_CONSUME]).booleanValue();<NEW_LINE>}<NEW_LINE>if (configEntry.processorData[SLOT_IGNORE_GET_POST] != null) {<NEW_LINE>ignoreGetPost = ((Boolean) configEntry.processorData[SLOT_IGNORE_GET_POST]).booleanValue();<NEW_LINE>}<NEW_LINE>if (configEntry.processorData[SLOT_IGNORE_CHAR_ENCODING] != null) {<NEW_LINE>ignoreCharEnc = ((Boolean) configEntry.processorData[SLOT_IGNORE_CHAR_ENCODING]).booleanValue();<NEW_LINE>}<NEW_LINE>if (configEntry.processorData[SLOT_CONSUME_EXCLUDE_LIST] != null) {<NEW_LINE>consumeExcludeList = (String[<MASK><NEW_LINE>}<NEW_LINE>}
]) configEntry.processorData[SLOT_CONSUME_EXCLUDE_LIST];
119,591
public void runTool(String... args) throws SQLException {<NEW_LINE>String dir = ".";<NEW_LINE>String cipher = null;<NEW_LINE>char[] decryptPassword = null;<NEW_LINE>char[] encryptPassword = null;<NEW_LINE>String db = null;<NEW_LINE>boolean quiet = false;<NEW_LINE>for (int i = 0; args != null && i < args.length; i++) {<NEW_LINE>String arg = args[i];<NEW_LINE>if (arg.equals("-dir")) {<NEW_LINE>dir = args[++i];<NEW_LINE>} else if (arg.equals("-cipher")) {<NEW_LINE>cipher = args[++i];<NEW_LINE>} else if (arg.equals("-db")) {<NEW_LINE>db = args[++i];<NEW_LINE>} else if (arg.equals("-decrypt")) {<NEW_LINE>decryptPassword = args<MASK><NEW_LINE>} else if (arg.equals("-encrypt")) {<NEW_LINE>encryptPassword = args[++i].toCharArray();<NEW_LINE>} else if (arg.equals("-quiet")) {<NEW_LINE>quiet = true;<NEW_LINE>} else if (arg.equals("-help") || arg.equals("-?")) {<NEW_LINE>showUsage();<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>showUsageAndThrowUnsupportedOption(arg);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if ((encryptPassword == null && decryptPassword == null) || cipher == null) {<NEW_LINE>showUsage();<NEW_LINE>throw new SQLException("Encryption or decryption password not set, or cipher not set");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>process(dir, db, cipher, decryptPassword, encryptPassword, quiet);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw DbException.toSQLException(e);<NEW_LINE>}<NEW_LINE>}
[++i].toCharArray();
1,031,928
private void processProperties() {<NEW_LINE>if (_cmd.hasOption(PROPS_FILE_OPT_CHAR)) {<NEW_LINE>for (String propFile : _cmd.getOptionValues(PROPS_FILE_OPT_CHAR)) {<NEW_LINE>_log.info("Loading container config from properties file " + propFile);<NEW_LINE>FileInputStream fis = null;<NEW_LINE>try {<NEW_LINE>fis = new FileInputStream(propFile);<NEW_LINE>_configProps.load(fis);<NEW_LINE>} catch (Exception e) {<NEW_LINE>_log.error(<MASK><NEW_LINE>} finally {<NEW_LINE>if (fis != null) {<NEW_LINE>try {<NEW_LINE>fis.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// not much to do -- ignore<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>_log.info("Using system properties for container config");<NEW_LINE>}<NEW_LINE>if (_cmd.hasOption(CMD_LINE_PROPS_OPT_CHAR)) {<NEW_LINE>String cmdLinePropString = _cmd.getOptionValue(CMD_LINE_PROPS_OPT_CHAR);<NEW_LINE>updatePropsFromCmdLine(cmdLinePropString);<NEW_LINE>}<NEW_LINE>}
"error processing properties; ignoring:" + e.getMessage());
1,780,281
public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listStreamsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListStreamsRequest> request = null;<NEW_LINE>Response<ListStreamsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListStreamsRequestMarshaller().marshall(listStreamsRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<ListStreamsResult, JsonUnmarshallerContext> unmarshaller = new ListStreamsResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<ListStreamsResult> responseHandler = new JsonResponseHandler<ListStreamsResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
106,818
protected MapTileRequestState nextTile() {<NEW_LINE>synchronized (mapTileModuleProviderBase.mQueueLockObject) {<NEW_LINE>MapTile result = null;<NEW_LINE>// get the most recently accessed tile<NEW_LINE>// - the last item in the iterator that's not already being<NEW_LINE>// processed<NEW_LINE>Iterator<MapTile> iterator = mapTileModuleProviderBase.mPending.keySet().iterator();<NEW_LINE>// TODO this iterates the whole list, make this faster...<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>final MapTile tile = iterator.next();<NEW_LINE>if (!mapTileModuleProviderBase.mWorking.containsKey(tile)) {<NEW_LINE>if (OSMConstants.DEBUG_TILE_PROVIDERS) {<NEW_LINE>ClientLog.d(LOG_TAG, "TileLoader.nextTile() on provider: " + mapTileModuleProviderBase.getName() + " found tile in working queue: " + tile);<NEW_LINE>}<NEW_LINE>result = tile;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (result != null) {<NEW_LINE>if (OSMConstants.DEBUG_TILE_PROVIDERS) {<NEW_LINE>ClientLog.d(LOG_TAG, "TileLoader.nextTile() on provider: " + mapTileModuleProviderBase.getName() + " adding tile to working queue: " + result);<NEW_LINE>}<NEW_LINE>mapTileModuleProviderBase.mWorking.put(result, mapTileModuleProviderBase.mPending.get(result));<NEW_LINE>}<NEW_LINE>return (result != null ? mapTileModuleProviderBase.mPending<MASK><NEW_LINE>}<NEW_LINE>}
.get(result) : null);
937,951
private // region Parameters<NEW_LINE>void applyAllParameters(@NonNull CaptureRequest.Builder builder, @Nullable CaptureRequest.Builder oldBuilder) {<NEW_LINE>LOG.i("applyAllParameters:", "called for tag", builder.build().getTag());<NEW_LINE>builder.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_AUTO);<NEW_LINE>applyDefaultFocus(builder);<NEW_LINE>applyFlash(builder, Flash.OFF);<NEW_LINE>applyLocation(builder, null);<NEW_LINE><MASK><NEW_LINE>applyHdr(builder, Hdr.OFF);<NEW_LINE>applyZoom(builder, 0F);<NEW_LINE>applyExposureCorrection(builder, 0F);<NEW_LINE>applyPreviewFrameRate(builder, 0F);<NEW_LINE>if (oldBuilder != null) {<NEW_LINE>// We might be in a metering operation, or the old builder might have some special<NEW_LINE>// metering parameters. Copy these special keys over to the new builder.<NEW_LINE>// These are the keys changed by metering.Parameters, or by us in applyFocusForMetering.<NEW_LINE>builder.set(CaptureRequest.CONTROL_AF_REGIONS, oldBuilder.get(CaptureRequest.CONTROL_AF_REGIONS));<NEW_LINE>builder.set(CaptureRequest.CONTROL_AE_REGIONS, oldBuilder.get(CaptureRequest.CONTROL_AE_REGIONS));<NEW_LINE>builder.set(CaptureRequest.CONTROL_AWB_REGIONS, oldBuilder.get(CaptureRequest.CONTROL_AWB_REGIONS));<NEW_LINE>builder.set(CaptureRequest.CONTROL_AF_MODE, oldBuilder.get(CaptureRequest.CONTROL_AF_MODE));<NEW_LINE>// Do NOT copy exposure or focus triggers!<NEW_LINE>}<NEW_LINE>}
applyWhiteBalance(builder, WhiteBalance.AUTO);
1,253,783
// -------//<NEW_LINE>// visit //<NEW_LINE>// -------//<NEW_LINE>@Override<NEW_LINE>public void visit(KeyAlterInter inter) {<NEW_LINE>final MusicFont font = getMusicFont(inter.getStaff());<NEW_LINE>setColor(inter);<NEW_LINE>final Point2D center = GeoUtil.center2D(inter.getBounds());<NEW_LINE>Staff staff = inter.getStaff();<NEW_LINE>if (staff == null) {<NEW_LINE>SystemInfo system = inter.getSig().getSystem();<NEW_LINE>staff = system.getClosestStaff(center);<NEW_LINE>}<NEW_LINE>center.setLocation(center.getX(), staff.pitchToOrdinate(center.getX(), inter.getPitch()));<NEW_LINE>final Shape shape = inter.getShape();<NEW_LINE>final ShapeSymbol symbol = Symbols.getSymbol(shape);<NEW_LINE>if (shape == Shape.SHARP) {<NEW_LINE>symbol.paintSymbol(g, font, center, Alignment.AREA_CENTER);<NEW_LINE>} else {<NEW_LINE>Dimension <MASK><NEW_LINE>// Roughly...<NEW_LINE>center.setLocation(center.getX(), center.getY() + dim.width);<NEW_LINE>symbol.paintSymbol(g, font, center, Alignment.BOTTOM_CENTER);<NEW_LINE>}<NEW_LINE>}
dim = symbol.getDimension(font);
1,109,104
private void replaceBookmarkContents(List<Object> paragraphs, Map<DataFieldName, String> data) throws Exception {<NEW_LINE>RangeFinder rt = new RangeFinder("CTBookmark", "CTMarkupRange");<NEW_LINE>new TraversalUtil(paragraphs, rt);<NEW_LINE>for (CTBookmark bm : rt.getStarts()) {<NEW_LINE>// do we have data for this one?<NEW_LINE>if (bm.getName() == null)<NEW_LINE>continue;<NEW_LINE>String value = data.get(new DataFieldName(bm.getName()));<NEW_LINE>if (value == null)<NEW_LINE>continue;<NEW_LINE>System.out.println(bm.getName() + ", " + value);<NEW_LINE>try {<NEW_LINE>// Can't just remove the object from the parent,<NEW_LINE>// since in the parent, it may be wrapped in a JAXBElement<NEW_LINE>List<Object> theList = null;<NEW_LINE>if (bm.getParent() instanceof P) {<NEW_LINE>theList = ((ContentAccessor) (bm.getParent())).getContent();<NEW_LINE>} else {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int rangeStart = -1;<NEW_LINE>int rangeEnd = -1;<NEW_LINE>int i = 0;<NEW_LINE>for (Object ox : theList) {<NEW_LINE>Object listEntry = XmlUtils.unwrap(ox);<NEW_LINE>if (listEntry.equals(bm)) {<NEW_LINE>if (DELETE_BOOKMARK) {<NEW_LINE>rangeStart = i;<NEW_LINE>} else {<NEW_LINE>rangeStart = i + 1;<NEW_LINE>}<NEW_LINE>} else if (listEntry instanceof CTMarkupRange) {<NEW_LINE>if (((CTMarkupRange) listEntry).getId().equals(bm.getId())) {<NEW_LINE>if (DELETE_BOOKMARK) {<NEW_LINE>rangeEnd = i;<NEW_LINE>} else {<NEW_LINE>// handle empty bookmark case<NEW_LINE>rangeEnd = i > rangeStart ? i - 1 : i;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>System.out.println(rangeStart + ", " + rangeEnd);<NEW_LINE>if (rangeStart > 0 && rangeEnd >= rangeStart) {<NEW_LINE>// Delete the bookmark range<NEW_LINE>if (rangeEnd > rangeStart) {<NEW_LINE>for (int j = rangeEnd; j >= rangeStart; j--) {<NEW_LINE>theList.remove(j);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// now add a run<NEW_LINE>org.docx4j.wml.R run = factory.createR();<NEW_LINE>org.docx4j.wml.Text t = factory.createText();<NEW_LINE>run.getContent().add(t);<NEW_LINE>t.setValue(value);<NEW_LINE>theList.add(rangeStart, run);<NEW_LINE>}<NEW_LINE>} catch (ClassCastException cce) {<NEW_LINE>log.error(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
cce.getMessage(), cce);
1,282,290
public void unbindChannel(ChannelBinding channel) {<NEW_LINE>checkArgument(checkNotNull(channel, "channel") instanceof SpongeModChannelBinding, "Custom channel implementation not supported");<NEW_LINE>SpongeModChannelBinding boundChannel = this.channelMap.remove(channel.getName());<NEW_LINE>checkState(boundChannel != null, "Channel is already unbound");<NEW_LINE>boundChannel.invalidate();<NEW_LINE>// Remove channel from forge's registry<NEW_LINE>NetworkRegistry.INSTANCE.channelNamesFor(Side.SERVER).remove(channel.getName());<NEW_LINE>NetworkRegistry.INSTANCE.channelNamesFor(Side.CLIENT).<MASK><NEW_LINE>if (SpongeImpl.getGame().isServerAvailable()) {<NEW_LINE>final PlayerList playerList = SpongeImpl.getServer().getPlayerList();<NEW_LINE>if (playerList != null) {<NEW_LINE>// Server side<NEW_LINE>playerList.sendPacketToAllPlayers(getUnregPacket(channel.getName()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (SpongeImpl.getGame().getPlatform().getExecutionType().isClient()) {<NEW_LINE>EntityPlayerSP clientPlayer = Minecraft.getMinecraft().player;<NEW_LINE>if (clientPlayer != null) {<NEW_LINE>// Client side<NEW_LINE>clientPlayer.connection.sendPacket(getUnregPacketClient(channel.getName()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
remove(channel.getName());