idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
583,635
public int compareTo(getManagerStats_result other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetSuccess()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetSec()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, other.sec);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTnase(<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetTnase()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tnase, other.tnase);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
), other.isSetTnase());
264,184
public boolean eIsSet(int featureID) {<NEW_LINE>switch(featureID) {<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__LOGGER:<NEW_LINE>return LOGGER_EDEFAULT == null ? logger != null : !LOGGER_EDEFAULT.equals(logger);<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__UID:<NEW_LINE>return UID_EDEFAULT == null ? uid != null : !UID_EDEFAULT.equals(uid);<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__POLL:<NEW_LINE>return poll != POLL_EDEFAULT;<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__ENABLED_A:<NEW_LINE>return ENABLED_A_EDEFAULT == null ? enabledA != null <MASK><NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__TINKERFORGE_DEVICE:<NEW_LINE>return tinkerforgeDevice != null;<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__IP_CONNECTION:<NEW_LINE>return IP_CONNECTION_EDEFAULT == null ? ipConnection != null : !IP_CONNECTION_EDEFAULT.equals(ipConnection);<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__CONNECTED_UID:<NEW_LINE>return CONNECTED_UID_EDEFAULT == null ? connectedUid != null : !CONNECTED_UID_EDEFAULT.equals(connectedUid);<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__POSITION:<NEW_LINE>return position != POSITION_EDEFAULT;<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__DEVICE_IDENTIFIER:<NEW_LINE>return deviceIdentifier != DEVICE_IDENTIFIER_EDEFAULT;<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__NAME:<NEW_LINE>return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__BRICKD:<NEW_LINE>return basicGetBrickd() != null;<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__MSUBDEVICES:<NEW_LINE>return msubdevices != null && !msubdevices.isEmpty();<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__TF_CONFIG:<NEW_LINE>return tfConfig != null;<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__DEVICE_TYPE:<NEW_LINE>return DEVICE_TYPE_EDEFAULT == null ? deviceType != null : !DEVICE_TYPE_EDEFAULT.equals(deviceType);<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__RECALIBRATE:<NEW_LINE>return RECALIBRATE_EDEFAULT == null ? recalibrate != null : !RECALIBRATE_EDEFAULT.equals(recalibrate);<NEW_LINE>case ModelPackage.MBRICKLET_MULTI_TOUCH__SENSITIVITY:<NEW_LINE>return SENSITIVITY_EDEFAULT == null ? sensitivity != null : !SENSITIVITY_EDEFAULT.equals(sensitivity);<NEW_LINE>}<NEW_LINE>return super.eIsSet(featureID);<NEW_LINE>}
: !ENABLED_A_EDEFAULT.equals(enabledA);
1,377,775
public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException {<NEW_LINE>if (facesContext == null) {<NEW_LINE>throw new NullPointerException("context");<NEW_LINE>}<NEW_LINE>if (component == null) {<NEW_LINE>throw new NullPointerException("component");<NEW_LINE>}<NEW_LINE>Map<String, Object> componentAttributesMap = component.getAttributes();<NEW_LINE>String resourceName = (String) componentAttributesMap.get(JSFAttr.NAME_ATTR);<NEW_LINE>boolean hasChildren = component.getChildCount() > 0;<NEW_LINE>if (resourceName != null && (!"".equals(resourceName))) {<NEW_LINE>if (hasChildren) {<NEW_LINE>log.info("Component with resourceName " + resourceName + " and child components found. Child components will be ignored.");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (hasChildren) {<NEW_LINE>// Children are encoded as usual. Usually the layout is<NEW_LINE>// <script type="text/javascript"><NEW_LINE>// ...... some javascript .......<NEW_LINE>// </script><NEW_LINE>ResponseWriter writer = facesContext.getResponseWriter();<NEW_LINE>writer.startElement(HTML.SCRIPT_ELEM, component);<NEW_LINE>writer.writeAttribute(HTML.SCRIPT_TYPE_ATTR, HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);<NEW_LINE>RendererUtils.renderChildren(facesContext, component);<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>if (!facesContext.getApplication().getProjectStage().equals(ProjectStage.Production)) {<NEW_LINE>facesContext.addMessage(component.getClientId(facesContext), new FacesMessage("Component with no name and no body content, so nothing rendered."));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
writer.endElement(HTML.SCRIPT_ELEM);
1,523,864
public void write(CompoundTag compound, boolean clientPacket) {<NEW_LINE>if (!clientPacket) {<NEW_LINE>compound.put("Inventory", inventory.serializeNBT());<NEW_LINE>if (state == State.RUNNING) {<NEW_LINE>compound.putBoolean("Running", true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Gui information<NEW_LINE>compound.putFloat("Progress", schematicProgress);<NEW_LINE>compound.putFloat("PaperProgress", bookPrintingProgress);<NEW_LINE>compound.putFloat("Fuel", fuelLevel);<NEW_LINE>compound.putString("Status", statusMsg);<NEW_LINE>compound.putString(<MASK><NEW_LINE>compound.putInt("AmountPlaced", blocksPlaced);<NEW_LINE>compound.putInt("AmountToPlace", blocksToPlace);<NEW_LINE>if (missingItem != null)<NEW_LINE>compound.put("MissingItem", missingItem.serializeNBT());<NEW_LINE>// Settings<NEW_LINE>CompoundTag options = new CompoundTag();<NEW_LINE>options.putInt("ReplaceMode", replaceMode);<NEW_LINE>options.putBoolean("SkipMissing", skipMissing);<NEW_LINE>options.putBoolean("ReplaceTileEntities", replaceTileEntities);<NEW_LINE>compound.put("Options", options);<NEW_LINE>// Printer & Flying Blocks<NEW_LINE>CompoundTag printerData = new CompoundTag();<NEW_LINE>printer.write(printerData);<NEW_LINE>compound.put("Printer", printerData);<NEW_LINE>ListTag tagFlyingBlocks = new ListTag();<NEW_LINE>for (LaunchedItem b : flyingBlocks) tagFlyingBlocks.add(b.serializeNBT());<NEW_LINE>compound.put("FlyingBlocks", tagFlyingBlocks);<NEW_LINE>compound.putFloat("DefaultYaw", defaultYaw);<NEW_LINE>super.write(compound, clientPacket);<NEW_LINE>}
"State", state.name());
1,594,880
private static void parseAnnotation(AnnotationModelHelper helper, AnnotationMirror annotationMirror, List<EjbRef> resultEjbRefs, List<EjbLocalRef> resultEjbLocalRefs) {<NEW_LINE>String name;<NEW_LINE>String beanInterface;<NEW_LINE>String beanName;<NEW_LINE>String mappedName;<NEW_LINE>String description;<NEW_LINE>TypeElement interfaceTypeElement;<NEW_LINE>AnnotationParser parser = AnnotationParser.create(helper);<NEW_LINE>// NOI18N<NEW_LINE>parser.expectString("name", null);<NEW_LINE>// NOI18N<NEW_LINE>parser.expectClass("beanInterface", null);<NEW_LINE>// NOI18N<NEW_LINE>parser.expectString("beanName", null);<NEW_LINE>// NOI18N<NEW_LINE>parser.expectString("mappedName", null);<NEW_LINE>// NOI18N<NEW_LINE>parser.expectString("description", null);<NEW_LINE>ParseResult parseResult = parser.parse(annotationMirror);<NEW_LINE>// NOI18N<NEW_LINE>name = parseResult.get("name", String.class);<NEW_LINE>// NOI18N<NEW_LINE>beanInterface = parseResult.get("beanInterface", String.class);<NEW_LINE>// NOI18N<NEW_LINE>beanName = parseResult.<MASK><NEW_LINE>// NOI18N<NEW_LINE>mappedName = parseResult.get("mappedName", String.class);<NEW_LINE>// NOI18N<NEW_LINE>description = parseResult.get("description", String.class);<NEW_LINE>interfaceTypeElement = helper.getCompilationController().getElements().getTypeElement(beanInterface);<NEW_LINE>createReference(helper, interfaceTypeElement, resultEjbRefs, resultEjbLocalRefs, name, beanInterface, beanName, mappedName, description);<NEW_LINE>}
get("beanName", String.class);
1,060,044
int dbgGetMethodsForName(PrintStream out, String pattern) throws CorruptDataException {<NEW_LINE>int dot = pattern.indexOf('.');<NEW_LINE>String classStart = (dot == -1) ? "*" : pattern.substring(0, dot);<NEW_LINE>int paren = pattern.indexOf('(', dot + 1);<NEW_LINE>String nameStart = (paren == -1) ? pattern.substring(dot + 1) : pattern.substring(dot + 1, paren);<NEW_LINE>String sigStart = (paren == -1) ? "*" : pattern.substring(paren);<NEW_LINE>StringBuffer needleBuffer;<NEW_LINE>needleBuffer = new StringBuffer();<NEW_LINE>int classMatchFlags = WildCard.parseWildcard(classStart, needleBuffer);<NEW_LINE>String classNeedle = needleBuffer.toString();<NEW_LINE>if (classMatchFlags == -1) {<NEW_LINE>CommandUtils.dbgError(out, "Invalid wildcards in class name\n");<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>needleBuffer = new StringBuffer();<NEW_LINE>int methodMatchFlags = WildCard.parseWildcard(nameStart, needleBuffer);<NEW_LINE>String methodNeedle = needleBuffer.toString();<NEW_LINE>if (methodMatchFlags == -1) {<NEW_LINE>CommandUtils.dbgError(out, "Invalid wildcards in method name\n");<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>needleBuffer = new StringBuffer();<NEW_LINE>int sigMatchFlags = WildCard.parseWildcard(sigStart, needleBuffer);<NEW_LINE>String sigNeedle = needleBuffer.toString();<NEW_LINE>if (methodMatchFlags == -1) {<NEW_LINE>CommandUtils.dbgError(out, "Invalid wildcards in method name\n");<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int matchCount = 0;<NEW_LINE>Map<String, J9ClassPointer> loadedClasses = new HashMap<>();<NEW_LINE>GCClassLoaderIterator classLoaderIterator = GCClassLoaderIterator.from();<NEW_LINE>while (classLoaderIterator.hasNext()) {<NEW_LINE>J9ClassLoaderPointer loader = classLoaderIterator.next();<NEW_LINE>Iterator<J9ClassPointer> classIterator = ClassIterator.fromJ9Classloader(loader);<NEW_LINE>while (classIterator.hasNext()) {<NEW_LINE><MASK><NEW_LINE>J9ROMClassPointer romClazz = clazz.romClass();<NEW_LINE>String className = J9UTF8Helper.stringValue(romClazz.className());<NEW_LINE>if (loadedClasses.containsValue(clazz)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>loadedClasses.put(clazz.toString(), clazz);<NEW_LINE>if (WildCard.wildcardMatch(classMatchFlags, classNeedle, className)) {<NEW_LINE>J9MethodPointer methodCursor = clazz.ramMethods();<NEW_LINE>for (long count = romClazz.romMethodCount().longValue(); count > 0; count -= 1, methodCursor = methodCursor.add(1)) {<NEW_LINE>J9ROMMethodPointer romMethod = J9MethodHelper.romMethod(methodCursor);<NEW_LINE>J9ROMNameAndSignaturePointer nameAndSignature = romMethod.nameAndSignature();<NEW_LINE>String nameUTF = J9UTF8Helper.stringValue(nameAndSignature.name());<NEW_LINE>if (WildCard.wildcardMatch(methodMatchFlags, methodNeedle, nameUTF)) {<NEW_LINE>String sigUTF = J9UTF8Helper.stringValue(nameAndSignature.signature());<NEW_LINE>if (WildCard.wildcardMatch(sigMatchFlags, sigNeedle, sigUTF)) {<NEW_LINE>matchCount += 1;<NEW_LINE>CommandUtils.dbgPrint(out, String.format("!j9method %s --> %s.%s%s\n", methodCursor.getHexAddress(), className, nameUTF, sigUTF));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return matchCount;<NEW_LINE>}
J9ClassPointer clazz = classIterator.next();
392,449
private TreeNode<K, V> deleteNode(TreeNode<K, V> root, Object key) {<NEW_LINE>if (root == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>int cmp = comparator.compare((K) key, root.getKey());<NEW_LINE>if (cmp < 0) {<NEW_LINE>root.left = deleteNode(root.left, key);<NEW_LINE>} else if (cmp > 0) {<NEW_LINE>root.right = <MASK><NEW_LINE>} else if (root.right == null) {<NEW_LINE>return root.left;<NEW_LINE>} else {<NEW_LINE>TreeNode<K, V> left = root.left;<NEW_LINE>TreeNode<K, V> right = root.right;<NEW_LINE>TreeNode<K, V> min = right;<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>TreeNode<K, V>[] pathToMin = (TreeNode<K, V>[]) new TreeNode<?, ?>[right.height];<NEW_LINE>int minDepth = 0;<NEW_LINE>while (min.left != null) {<NEW_LINE>pathToMin[minDepth++] = min;<NEW_LINE>min = min.left;<NEW_LINE>}<NEW_LINE>right = min.right;<NEW_LINE>while (minDepth > 0) {<NEW_LINE>TreeNode<K, V> node = pathToMin[--minDepth];<NEW_LINE>node.left = right;<NEW_LINE>node.fix();<NEW_LINE>node = node.balance();<NEW_LINE>right = node;<NEW_LINE>}<NEW_LINE>min.right = right;<NEW_LINE>min.left = left;<NEW_LINE>root = min;<NEW_LINE>root.fix();<NEW_LINE>}<NEW_LINE>root.fix();<NEW_LINE>return root.balance();<NEW_LINE>}
deleteNode(root.right, key);
1,696,912
public TraceContent unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TraceContent traceContent = new TraceContent();<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("WirelessDeviceFrameInfo", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>traceContent.setWirelessDeviceFrameInfo(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("LogLevel", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>traceContent.setLogLevel(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 traceContent;<NEW_LINE>}
class).unmarshall(context));
1,274,634
public static byte[] privKeyTweakMul(byte[] privkey, byte[] tweak) throws AssertFailException {<NEW_LINE>Preconditions.checkArgument(privkey.length == 32);<NEW_LINE>ByteBuffer byteBuff = nativeECDSABuffer.get();<NEW_LINE>if (byteBuff == null || byteBuff.capacity() < privkey.length + tweak.length) {<NEW_LINE>byteBuff = ByteBuffer.allocateDirect(privkey.length + tweak.length);<NEW_LINE>byteBuff.order(ByteOrder.nativeOrder());<NEW_LINE>nativeECDSABuffer.set(byteBuff);<NEW_LINE>}<NEW_LINE>((Buffer) byteBuff).rewind();<NEW_LINE>byteBuff.put(privkey);<NEW_LINE>byteBuff.put(tweak);<NEW_LINE>byte[][] retByteArray;<NEW_LINE>r.lock();<NEW_LINE>try {<NEW_LINE>retByteArray = secp256k1_privkey_tweak_mul(byteBuff, Secp256k1Context.getContext());<NEW_LINE>} finally {<NEW_LINE>r.unlock();<NEW_LINE>}<NEW_LINE>byte[] privArr = retByteArray[0];<NEW_LINE>int privLen = (byte) new BigInteger(new byte[] { retByteArray[1][0] <MASK><NEW_LINE>int retVal = new BigInteger(new byte[] { retByteArray[1][1] }).intValue();<NEW_LINE>assertEquals(privArr.length, privLen, "Got bad pubkey length.");<NEW_LINE>assertEquals(retVal, 1, "Failed return value check.");<NEW_LINE>return privArr;<NEW_LINE>}
}).intValue() & 0xFF;
67,354
public void deleteProcessInstance(String processInstanceId, String deleteReason, boolean cascade, boolean directDeleteInDatabase) {<NEW_LINE>ExecutionEntity processInstanceExecution = findById(processInstanceId);<NEW_LINE>if (processInstanceExecution == null) {<NEW_LINE>throw new FlowableObjectNotFoundException("No process instance found for id '" + processInstanceId + "'", ProcessInstance.class);<NEW_LINE>}<NEW_LINE>deleteProcessInstanceCascade(processInstanceExecution, deleteReason, cascade, directDeleteInDatabase);<NEW_LINE>// Special care needed for a process instance of a call activity: the parent process instance needs to be triggered for completion<NEW_LINE>// This can't be added to the deleteProcessInstanceCascade method, as this will also trigger all child and/or multi-instance<NEW_LINE>// process instances for child call activities, which shouldn't happen.<NEW_LINE>if (processInstanceExecution.getSuperExecutionId() != null) {<NEW_LINE>ExecutionEntity superExecution = processInstanceExecution.getSuperExecution();<NEW_LINE>if (superExecution != null && superExecution.getCurrentFlowElement() instanceof FlowNode && ((FlowNode) superExecution.getCurrentFlowElement()).getBehavior() instanceof SubProcessActivityBehavior) {<NEW_LINE>SubProcessActivityBehavior subProcessActivityBehavior = (SubProcessActivityBehavior) ((FlowNode) superExecution.<MASK><NEW_LINE>try {<NEW_LINE>subProcessActivityBehavior.completing(superExecution, processInstanceExecution);<NEW_LINE>superExecution.setSubProcessInstance(null);<NEW_LINE>subProcessActivityBehavior.completed(superExecution);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new FlowableException("Could not complete parent process instance for call activity with process instance execution " + processInstanceExecution.getId(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getCurrentFlowElement()).getBehavior();
1,361,704
public void handleExpansion(long[] ces, int start, int length) {<NEW_LINE>if (length <= 1) {<NEW_LINE>// We do not need to add single CEs into the map.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// number of CE "halves"<NEW_LINE>int count = 0;<NEW_LINE>for (int i = 0; i < length; ++i) {<NEW_LINE>count += ceNeedsTwoParts(ces[start + i]) ? 2 : 1;<NEW_LINE>}<NEW_LINE>// last "half" of the last CE<NEW_LINE>long ce = ces[start + length - 1];<NEW_LINE>long p = ce >>> 32;<NEW_LINE>int lower32 = (int) ce;<NEW_LINE>int lastHalf = getSecondHalf(p, lower32);<NEW_LINE>if (lastHalf == 0) {<NEW_LINE>lastHalf = getFirstHalf(p, lower32);<NEW_LINE>assert (lastHalf != 0);<NEW_LINE>} else {<NEW_LINE>// old-style continuation CE<NEW_LINE>lastHalf |= 0xc0;<NEW_LINE>}<NEW_LINE>Integer <MASK><NEW_LINE>if (oldCount == null || count > oldCount) {<NEW_LINE>maxExpansions.put(lastHalf, count);<NEW_LINE>}<NEW_LINE>}
oldCount = maxExpansions.get(lastHalf);
1,566,935
public <T extends AstNode> ApexNode<T> build(T astNode) {<NEW_LINE>// Create a Node<NEW_LINE>AbstractApexNode<<MASK><NEW_LINE>node.handleSourceCode(sourceCode);<NEW_LINE>// Append to parent<NEW_LINE>Node parent = nodes.isEmpty() ? null : nodes.peek();<NEW_LINE>if (parent != null) {<NEW_LINE>parent.jjtAddChild(node, parent.getNumChildren());<NEW_LINE>node.jjtSetParent(parent);<NEW_LINE>}<NEW_LINE>// Build the children...<NEW_LINE>nodes.push(node);<NEW_LINE>parents.push(astNode);<NEW_LINE>astNode.traverse(this, scope);<NEW_LINE>nodes.pop();<NEW_LINE>parents.pop();<NEW_LINE>if (nodes.isEmpty()) {<NEW_LINE>// add the comments only at the end of the processing as the last step<NEW_LINE>addFormalComments();<NEW_LINE>}<NEW_LINE>// calculate line numbers after the tree is built<NEW_LINE>// so that we can look at parent/children to figure<NEW_LINE>// out the positions if necessary.<NEW_LINE>node.calculateLineNumbers(sourceCodePositioner);<NEW_LINE>// If appropriate, determine whether this node contains comments or not<NEW_LINE>if (node instanceof AbstractApexCommentContainerNode) {<NEW_LINE>AbstractApexCommentContainerNode<?> commentContainer = (AbstractApexCommentContainerNode<?>) node;<NEW_LINE>if (containsComments(commentContainer)) {<NEW_LINE>commentContainer.setContainsComment(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return node;<NEW_LINE>}
T> node = createNodeAdapter(astNode);
5,487
public void execute(EditorAdaptor editorAdaptor, int count) throws CommandExecutionException {<NEW_LINE>editorAdaptor.getHistory().beginCompoundChange();<NEW_LINE>TextContent modelContent = editorAdaptor.getModelContent();<NEW_LINE>String editorNewline = editorAdaptor.getConfiguration().getNewLine();<NEW_LINE>String text = editorAdaptor.getRegisterManager().getLastEditRegister().getContent().getText();<NEW_LINE>int pos = editorAdaptor.getPosition().getModelOffset();<NEW_LINE>if (count == NO_COUNT_GIVEN) {<NEW_LINE>count = 1;<NEW_LINE>}<NEW_LINE>for (int j = 0; j < count; j++) {<NEW_LINE>int start = 0;<NEW_LINE>for (int i = 0; i < text.length(); i++) {<NEW_LINE>char c = text.charAt(i);<NEW_LINE>if (VimUtils.isNewLine(String.valueOf(c))) {<NEW_LINE>String replace = <MASK><NEW_LINE>String nl = text.substring(i);<NEW_LINE>NewLine newline = NewLine.parse(nl);<NEW_LINE>replace(modelContent, pos, replace);<NEW_LINE>modelContent.replace(pos + replace.length(), 0, editorNewline);<NEW_LINE>i += newline.nl.length() - 1;<NEW_LINE>pos += replace.length() + editorNewline.length();<NEW_LINE>start += replace.length() + newline.nl.length();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String replace = text.substring(start);<NEW_LINE>replace(modelContent, pos, replace);<NEW_LINE>// prepare for next iteration if count defined<NEW_LINE>pos += text.length();<NEW_LINE>}<NEW_LINE>editorAdaptor.getHistory().endCompoundChange();<NEW_LINE>}
text.substring(start, i);
862,866
// ========================================<NEW_LINE>// MouseListener methods<NEW_LINE>// ========================================<NEW_LINE>@Override<NEW_LINE>public void mouseClicked(MouseEvent e) {<NEW_LINE>if (UIUtils.isRightMouseClick(e)) {<NEW_LINE>TreePath rightClickedPath = varTree.getClosestPathForLocation(e.getX(), e.getY());<NEW_LINE>SieTemplate rightClickedNode = null;<NEW_LINE>if (rightClickedPath.getLastPathComponent() instanceof SieTemplate) {<NEW_LINE>rightClickedNode = (SieTemplate) rightClickedPath.getLastPathComponent();<NEW_LINE>}<NEW_LINE>if (rightClickedNode != null && rightClickedNode.isTrickManaged()) {<NEW_LINE>if (treePopup.getComponentCount() > 0) {<NEW_LINE>treePopup.removeAll();<NEW_LINE>}<NEW_LINE>updateTreePopupContents(rightClickedPath);<NEW_LINE>if (!treePopup.isVisible()) {<NEW_LINE>treePopup.show(e.getComponent(), e.getX(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (treePopup.isVisible()) {<NEW_LINE>treePopup.setVisible(false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
), e.getY());
1,085,557
public ArrowTipView show(String text, int gravity, int arrowMarginStart, int top) {<NEW_LINE>((TextView) findViewById(R.id.text)).setText(text);<NEW_LINE>ViewGroup parent = mActivity.getDragLayer();<NEW_LINE>parent.addView(this);<NEW_LINE>DragLayer.LayoutParams params = (DragLayer.LayoutParams) getLayoutParams();<NEW_LINE>params.gravity = gravity;<NEW_LINE>LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mArrowView.getLayoutParams();<NEW_LINE>lp.gravity = gravity;<NEW_LINE>if (parent.getLayoutDirection() == LAYOUT_DIRECTION_RTL) {<NEW_LINE>arrowMarginStart = parent.getMeasuredWidth() - arrowMarginStart;<NEW_LINE>}<NEW_LINE>if (gravity == Gravity.END) {<NEW_LINE>lp.setMarginEnd(parent.getMeasuredWidth() - arrowMarginStart - mArrowWidth);<NEW_LINE>} else if (gravity == Gravity.START) {<NEW_LINE>lp.setMarginStart(arrowMarginStart - mArrowWidth / 2);<NEW_LINE>}<NEW_LINE>requestLayout();<NEW_LINE>params.leftMargin = mActivity<MASK><NEW_LINE>params.rightMargin = mActivity.getDeviceProfile().workspacePadding.right;<NEW_LINE>post(() -> setY(top - (mIsPointingUp ? 0 : getHeight())));<NEW_LINE>mIsOpen = true;<NEW_LINE>mHandler.postDelayed(() -> handleClose(true), AUTO_CLOSE_TIMEOUT_MILLIS);<NEW_LINE>setAlpha(0);<NEW_LINE>animate().alpha(1f).withLayer().setStartDelay(SHOW_DELAY_MS).setDuration(SHOW_DURATION_MS).setInterpolator(Interpolators.DEACCEL).start();<NEW_LINE>return this;<NEW_LINE>}
.getDeviceProfile().workspacePadding.left;
973,948
public boolean closeOthers(boolean force) {<NEW_LINE>IWorkbenchPage page = editor.getSite().getPage();<NEW_LINE>if (page.getEditorReferences().length < 2) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>boolean success = (force || page.getDirtyEditors().length == 0);<NEW_LINE>// Vim behavior is to close all clean editors, yet keep the dirty ones if force is false.<NEW_LINE><MASK><NEW_LINE>IEditorReference[] references = page.getEditorReferences();<NEW_LINE>List<IEditorReference> toClose = new ArrayList<IEditorReference>();<NEW_LINE>for (IEditorReference reference : references) {<NEW_LINE>IEditorPart editor = reference.getEditor(false);<NEW_LINE>// If editor == null, then it was never restored in this session and cannot be dirty.<NEW_LINE>if (editor == null || (!editor.equals(current) && (force || !editor.isDirty()))) {<NEW_LINE>toClose.add(reference);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>page.closeEditors(toClose.toArray(new IEditorReference[toClose.size()]), false);<NEW_LINE>return success;<NEW_LINE>}
IEditorPart current = page.getActiveEditor();
379,249
private void createConstantDeclaration() throws CoreException {<NEW_LINE>Type type = getConstantType();<NEW_LINE>IExpressionFragment fragment = getSelectedExpression();<NEW_LINE>Expression initializer = getSelectedExpression().createCopyTarget(fCuRewrite.getASTRewrite(), true);<NEW_LINE>AST ast = fCuRewrite.getAST();<NEW_LINE>VariableDeclarationFragment variableDeclarationFragment = ast.newVariableDeclarationFragment();<NEW_LINE>variableDeclarationFragment.setName(ast.newSimpleName(fConstantName));<NEW_LINE>variableDeclarationFragment.setInitializer(initializer);<NEW_LINE>FieldDeclaration fieldDeclaration = ast.newFieldDeclaration(variableDeclarationFragment);<NEW_LINE>fieldDeclaration.setType(type);<NEW_LINE>Modifier.ModifierKeyword accessModifier = Modifier.ModifierKeyword.toKeyword(fVisibility);<NEW_LINE>if (accessModifier != null) {<NEW_LINE>fieldDeclaration.modifiers().add(ast.newModifier(accessModifier));<NEW_LINE>}<NEW_LINE>fieldDeclaration.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));<NEW_LINE>fieldDeclaration.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));<NEW_LINE>// boolean createComments = JavaPreferencesSettings.getCodeGenerationSettings(fCu.getJavaProject()).createComments;<NEW_LINE>// if (createComments) {<NEW_LINE>String comment = CodeGeneration.getFieldComment(fCu, getConstantTypeName(), fConstantName, StubUtility.getLineDelimiterUsed(fCu));<NEW_LINE>if (comment != null && comment.length() > 0 && !"/**\n *\n */".equals(comment)) {<NEW_LINE>Javadoc doc = (Javadoc) fCuRewrite.getASTRewrite().createStringPlaceholder(comment, ASTNode.JAVADOC);<NEW_LINE>fieldDeclaration.setJavadoc(doc);<NEW_LINE>}<NEW_LINE>// }<NEW_LINE>AbstractTypeDeclaration parent = getContainingTypeDeclarationNode();<NEW_LINE>ListRewrite listRewrite = fCuRewrite.getASTRewrite().getListRewrite(parent, parent.getBodyDeclarationsProperty());<NEW_LINE>TextEditGroup msg = fCuRewrite.createGroupDescription(RefactoringCoreMessages.ExtractConstantRefactoring_declare_constant);<NEW_LINE>if (insertFirst()) {<NEW_LINE>listRewrite.insertFirst(fieldDeclaration, msg);<NEW_LINE>} else {<NEW_LINE>listRewrite.insertAfter(fieldDeclaration, getNodeToInsertConstantDeclarationAfter(), msg);<NEW_LINE>}<NEW_LINE>if (fLinkedProposalModel != null) {<NEW_LINE>ASTRewrite rewrite = fCuRewrite.getASTRewrite();<NEW_LINE>LinkedProposalPositionGroupCore nameGroup = fLinkedProposalModel.getPositionGroup(KEY_NAME, true);<NEW_LINE>nameGroup.addPosition(rewrite.track(variableDeclarationFragment.getName()), true);<NEW_LINE>String[] nameSuggestions = guessConstantNames();<NEW_LINE>if (nameSuggestions.length > 0 && !nameSuggestions[0].equals(fConstantName)) {<NEW_LINE>nameGroup.addProposal(fConstantName, nameSuggestions.length + 1);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < nameSuggestions.length; i++) {<NEW_LINE>nameGroup.addProposal(nameSuggestions[i], nameSuggestions.length - i);<NEW_LINE>}<NEW_LINE>LinkedProposalPositionGroupCore typeGroup = fLinkedProposalModel.getPositionGroup(KEY_TYPE, true);<NEW_LINE>typeGroup.addPosition(rewrite.track(type), true);<NEW_LINE>ITypeBinding typeBinding = guessBindingForReference(fragment.getAssociatedExpression());<NEW_LINE>if (typeBinding != null) {<NEW_LINE>ITypeBinding[] relaxingTypes = <MASK><NEW_LINE>for (int i = 0; i < relaxingTypes.length; i++) {<NEW_LINE>typeGroup.addProposal(relaxingTypes[i], fCuRewrite.getCu(), relaxingTypes.length - i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean isInterface = parent.resolveBinding() != null && parent.resolveBinding().isInterface();<NEW_LINE>ModifierCorrectionSubProcessor.installLinkedVisibilityProposals(fLinkedProposalModel, rewrite, fieldDeclaration.modifiers(), isInterface);<NEW_LINE>}<NEW_LINE>}
ASTResolving.getNarrowingTypes(ast, typeBinding);
1,484,987
public CreateSecurityProfileResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateSecurityProfileResult createSecurityProfileResult = new CreateSecurityProfileResult();<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 createSecurityProfileResult;<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("SecurityProfileId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createSecurityProfileResult.setSecurityProfileId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("SecurityProfileArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createSecurityProfileResult.setSecurityProfileArn(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 createSecurityProfileResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,832,612
public void slotsChanged(Container inventory) {<NEW_LINE>final NullMenu cn = new NullMenu();<NEW_LINE>final CraftingContainer ic = new CraftingContainer(cn, 3, 3);<NEW_LINE>for (int x = 0; x < 9; x++) {<NEW_LINE>ic.setItem(x, this.craftingSlots[x].getItem());<NEW_LINE>}<NEW_LINE>Level level = this.getPlayerInventory().player.level;<NEW_LINE>if (this.currentRecipe == null || !this.currentRecipe.matches(ic, level)) {<NEW_LINE>this.currentRecipe = level.getRecipeManager().getRecipeFor(RecipeType.CRAFTING, ic, level).orElse(null);<NEW_LINE>}<NEW_LINE>if (this.currentRecipe == null) {<NEW_LINE>this.outputSlot.set(ItemStack.EMPTY);<NEW_LINE>} else {<NEW_LINE>this.outputSlot.set(this<MASK><NEW_LINE>}<NEW_LINE>}
.currentRecipe.assemble(ic));
1,380,584
public boolean onPreferenceChange(Preference preference, Object newValue) {<NEW_LINE>if (MyDebug.LOG)<NEW_LINE>Log.d(TAG, "clicked raw: " + newValue);<NEW_LINE>if (newValue.equals("preference_raw_yes")) {<NEW_LINE>// we check done_raw_info every time, so that this works if the user selects RAW<NEW_LINE>// again without leaving and returning to Settings<NEW_LINE>boolean done_raw_info = sharedPreferences.contains(PreferenceKeys.getRawInfoPreferenceKey());<NEW_LINE>if (!done_raw_info) {<NEW_LINE>AlertDialog.Builder alertDialog = new AlertDialog.Builder(MyPreferenceFragment.this.getActivity());<NEW_LINE>alertDialog.<MASK><NEW_LINE>alertDialog.setMessage(R.string.raw_info);<NEW_LINE>alertDialog.setPositiveButton(android.R.string.ok, null);<NEW_LINE>alertDialog.setNegativeButton(R.string.dont_show_again, new OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>if (MyDebug.LOG)<NEW_LINE>Log.d(TAG, "user clicked dont_show_again for raw info dialog");<NEW_LINE>SharedPreferences.Editor editor = sharedPreferences.edit();<NEW_LINE>editor.putBoolean(PreferenceKeys.getRawInfoPreferenceKey(), true);<NEW_LINE>editor.apply();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>alertDialog.show();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
setTitle(R.string.preference_raw);
1,623,823
public String longestPalindrome(String s) {<NEW_LINE><MASK><NEW_LINE>if (strLength < 2) {<NEW_LINE>return s;<NEW_LINE>}<NEW_LINE>int resultLength = 0;<NEW_LINE>String result = "";<NEW_LINE>for (int i = 0; i < s.length(); i++) {<NEW_LINE>// Odd length<NEW_LINE>int left = i, right = i;<NEW_LINE>while (left >= 0 && right < s.length() && s.charAt(left) == s.charAt(right)) {<NEW_LINE>if ((right - left + 1) > resultLength) {<NEW_LINE>result = s.substring(left, right + 1);<NEW_LINE>resultLength = right - left + 1;<NEW_LINE>}<NEW_LINE>left -= 1;<NEW_LINE>right += 1;<NEW_LINE>}<NEW_LINE>// even length<NEW_LINE>left = i;<NEW_LINE>right = i + 1;<NEW_LINE>while (left >= 0 && right < s.length() && s.charAt(left) == s.charAt(right)) {<NEW_LINE>if ((right - left + 1) > resultLength) {<NEW_LINE>result = s.substring(left, right + 1);<NEW_LINE>resultLength = right - left + 1;<NEW_LINE>}<NEW_LINE>left -= 1;<NEW_LINE>right += 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
int strLength = s.length();
807,774
public void initialise() throws FileNotFoundException {<NEW_LINE>bSilent = false;<NEW_LINE>// double [] tmpx = input.getAllData();<NEW_LINE>// double [] x = new double[origLen+pm.totalZerosToPadd];<NEW_LINE>// Arrays.fill(x, 0.0);<NEW_LINE>// System.arraycopy(tmpx, 0, x, 0, origLen);<NEW_LINE>psFrm = new PsolaFrameProvider(input, pm, modParams.fs, modParams.numPeriods);<NEW_LINE>tempOutBinaryFile = outputFile + ".bin";<NEW_LINE>dout = new LEDataOutputStream(tempOutBinaryFile);<NEW_LINE>windowIn = new DynamicWindow(Window.HANNING);<NEW_LINE>windowOut = new DynamicWindow(Window.HANNING);<NEW_LINE>frmSize = 0;<NEW_LINE>newFrmSize = 0;<NEW_LINE>newPeriod = 0;<NEW_LINE>synthFrmInd = 0;<NEW_LINE>localDurDiff = 0.0;<NEW_LINE>// -1:skip frame, 0:no repetition (use synthesized frame as it is), >0: number of repetitions for<NEW_LINE>repeatSkipCount = 0;<NEW_LINE>// synthesized frame<NEW_LINE>localDurDiffSaved = 0.0;<NEW_LINE>sumLocalDurDiffs = 0.0;<NEW_LINE>nextAdd = 0.0;<NEW_LINE>synthSt = pm.pitchMarks[0];<NEW_LINE>synthTotal = 0;<NEW_LINE>maxFrmSize = (int) (modParams.numPeriods * modParams.fs / 40.0);<NEW_LINE>if ((maxFrmSize % 2) != 0)<NEW_LINE>maxFrmSize++;<NEW_LINE>maxNewFrmSize = (int) (Math.floor(maxFrmSize / MathUtils.min(modParams.pscalesVar) + 0.5));<NEW_LINE>if ((maxNewFrmSize % 2) != 0)<NEW_LINE>maxNewFrmSize++;<NEW_LINE>synthFrameInd = 0;<NEW_LINE>bLastFrame = false;<NEW_LINE>bBroke = false;<NEW_LINE>fftSize = (int) Math.pow(2, (Math.ceil(Math.log((double) maxFrmSize) / Math<MASK><NEW_LINE>maxFreq = fftSize / 2 + 1;<NEW_LINE>outBuffLen = 100;<NEW_LINE>outBuff = MathUtils.zeros(outBuffLen);<NEW_LINE>outBuffStart = 1;<NEW_LINE>totalWrittenToFile = 0;<NEW_LINE>ySynthBuff = MathUtils.zeros(maxNewFrmSize);<NEW_LINE>wSynthBuff = MathUtils.zeros(maxNewFrmSize);<NEW_LINE>ySynthInd = 1;<NEW_LINE>}
.log(2.0))));
1,096,359
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException, IOException, ServletException {<NEW_LINE>String username = StringUtils.trimToNull(request.getParameter("u"));<NEW_LINE>String password = decrypt(StringUtils.trimToNull(request.getParameter("p")));<NEW_LINE>String salt = StringUtils.trimToNull(request.getParameter("s"));<NEW_LINE>String token = StringUtils.trimToNull(request.getParameter("t"));<NEW_LINE>String version = StringUtils.trimToNull(request.getParameter("v"));<NEW_LINE>String client = StringUtils.trimToNull(request.getParameter("c"));<NEW_LINE>// The username and credentials parameters are not required if the user<NEW_LINE>// was previously authenticated, for example using Basic Auth.<NEW_LINE>Authentication previousAuth = SecurityContextHolder<MASK><NEW_LINE>if (previousAuth != null && previousAuth.isAuthenticated()) {<NEW_LINE>return previousAuth;<NEW_LINE>}<NEW_LINE>boolean passwordOrTokenPresent = password != null || (salt != null && token != null);<NEW_LINE>boolean missingCredentials = (username == null || !passwordOrTokenPresent);<NEW_LINE>if (missingCredentials || version == null || client == null) {<NEW_LINE>throw new AuthenticationServiceException("", new APIException(ErrorCode.MISSING_PARAMETER));<NEW_LINE>}<NEW_LINE>checkAPIVersion(version);<NEW_LINE>UsernamePasswordAuthenticationToken authRequest = null;<NEW_LINE>if (salt != null && token != null) {<NEW_LINE>authRequest = new UsernameSaltedTokenAuthenticationToken(username, salt, token);<NEW_LINE>} else if (password != null) {<NEW_LINE>authRequest = new UsernamePasswordAuthenticationToken(username, password);<NEW_LINE>}<NEW_LINE>authRequest.setDetails(authenticationDetailsSource.buildDetails(request));<NEW_LINE>return this.getAuthenticationManager().authenticate(authRequest);<NEW_LINE>}
.getContext().getAuthentication();
1,443,024
private void prepareNamedGroup(EncryptedServerNameIndicationExtensionMessage msg) {<NEW_LINE>List<NamedGroup> implementedNamedGroups = KeyShareCalculator.getImplemented();<NEW_LINE>List<NamedGroup> clientSupportedNamedGroups = chooser.getConfig().getClientSupportedEsniNamedGroups();<NEW_LINE>List<NamedGroup> serverSupportedNamedGroups = new LinkedList();<NEW_LINE>for (KeyShareStoreEntry entry : chooser.getEsniServerKeyShareEntries()) {<NEW_LINE>serverSupportedNamedGroups.add(entry.getGroup());<NEW_LINE>}<NEW_LINE>NamedGroup selectedNamedGroup;<NEW_LINE>selectedNamedGroup = implementedNamedGroups.get(0);<NEW_LINE>boolean isFoundSharedNamedGroup = false;<NEW_LINE>for (NamedGroup g : clientSupportedNamedGroups) {<NEW_LINE>if (implementedNamedGroups.contains(g)) {<NEW_LINE>selectedNamedGroup = g;<NEW_LINE>if (serverSupportedNamedGroups.contains(g)) {<NEW_LINE>isFoundSharedNamedGroup = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!isFoundSharedNamedGroup) {<NEW_LINE>LOGGER.warn("Found no shared named group. Using " + selectedNamedGroup);<NEW_LINE>}<NEW_LINE>msg.<MASK><NEW_LINE>LOGGER.debug("NamedGroup: " + ArrayConverter.bytesToHexString(msg.getKeyShareEntry().getGroupConfig().getValue()));<NEW_LINE>}
getKeyShareEntry().setGroupConfig(selectedNamedGroup);
1,754,230
// POST /api/admin/dict/mapping/upload/{dictId}<NEW_LINE>@Execute<NEW_LINE>public JsonResponse<ApiResult> post$upload(final String dictId, final UploadForm form) {<NEW_LINE>form.dictId = dictId;<NEW_LINE>validateApi(form, messages -> {<NEW_LINE>});<NEW_LINE>final CharMappingFile file = charMappingService.getCharMappingFile(form.dictId).orElseGet(() -> {<NEW_LINE>throwValidationErrorApi(messages -> messages.addErrorsFailedToUploadProtwordsFile(GLOBAL));<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>try (InputStream inputStream = form.charMappingFile.getInputStream()) {<NEW_LINE>file.update(inputStream);<NEW_LINE>} catch (final IOException e) {<NEW_LINE>throwValidationErrorApi(messages -> messages.addErrorsFailedToUploadProtwordsFile(GLOBAL));<NEW_LINE>}<NEW_LINE>return asJson(new ApiResult.ApiResponse().status(ApiResult.Status<MASK><NEW_LINE>}
.OK).result());
886,725
private void syntaxError(int id, int startPosition, int endPosition, int currentKind, char[] currentTokenSource, String errorTokenName, String expectedToken) {<NEW_LINE>if (currentKind == TerminalTokens.TokenNameAT && expectedToken != null && expectedToken.equals("@")) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>// In the diagnose parser case, we don't have the wherewithal to discriminate when we should hand out @308 vs @. So we always answer @.<NEW_LINE>// We should silently recover so swallow the message.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String eTokenName;<NEW_LINE>if (isKeyword(currentKind) || isLiteral(currentKind) || isIdentifier(currentKind)) {<NEW_LINE>eTokenName = new String(currentTokenSource);<NEW_LINE>} else {<NEW_LINE>eTokenName = errorTokenName;<NEW_LINE>}<NEW_LINE>String[] arguments;<NEW_LINE>if (expectedToken != null) {<NEW_LINE>expectedToken = replaceIfSynthetic(expectedToken);<NEW_LINE>arguments = new String[] { eTokenName, expectedToken };<NEW_LINE>} else {<NEW_LINE>arguments <MASK><NEW_LINE>}<NEW_LINE>this.handle(id, arguments, arguments, startPosition, endPosition);<NEW_LINE>}
= new String[] { eTokenName };
1,093,569
public final static int copyDir(File originalDir, File copyDir, FileFilter filter, TaskMonitor monitor) throws IOException, CancelledException {<NEW_LINE>if (monitor == null) {<NEW_LINE>monitor = TaskMonitor.DUMMY;<NEW_LINE>}<NEW_LINE>if (!originalDir.exists()) {<NEW_LINE>// nothing to do<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>File[] originalDirFiles = originalDir.listFiles(filter);<NEW_LINE>if (originalDirFiles == null || originalDirFiles.length == 0) {<NEW_LINE>// nothing to do<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int copiedFilesCount = 0;<NEW_LINE>monitor.initialize(originalDirFiles.length);<NEW_LINE>for (File file : originalDirFiles) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>monitor.setMessage("Copying " + file.getAbsolutePath());<NEW_LINE>File destinationFile = new File(copyDir, file.getName());<NEW_LINE>if (file.isDirectory()) {<NEW_LINE>copiedFilesCount += doCopyDir(file, destinationFile, filter, monitor);<NEW_LINE>} else {<NEW_LINE>destinationFile.getParentFile().mkdirs();<NEW_LINE>// use a dummy monitor as not to ruin the progress<NEW_LINE>copyFile(file, <MASK><NEW_LINE>copiedFilesCount++;<NEW_LINE>}<NEW_LINE>monitor.incrementProgress(1);<NEW_LINE>}<NEW_LINE>return copiedFilesCount;<NEW_LINE>}
destinationFile, false, TaskMonitor.DUMMY);
858,337
public boolean loadMetaInfo() throws DbusEventBufferMetaInfo.DbusEventBufferMetaInfoException {<NEW_LINE>//<NEW_LINE>BufferedReader br = null;<NEW_LINE>_valid = false;<NEW_LINE>boolean debugEnabled = DbusEventBuffer.LOG.isDebugEnabled();<NEW_LINE>try {<NEW_LINE>InputStreamReader isr = new InputStreamReader(new FileInputStream(_file), "UTF-8");<NEW_LINE>br = new BufferedReader(isr);<NEW_LINE>DbusEventBuffer.LOG.info("loading metaInfoFile " + _file);<NEW_LINE>_info.clear();<NEW_LINE>String line = br.readLine();<NEW_LINE>while (line != null) {<NEW_LINE>if (line.isEmpty() || line.charAt(0) == '#')<NEW_LINE>continue;<NEW_LINE>// format is key' 'val<NEW_LINE>int <MASK><NEW_LINE>if (idx < 0) {<NEW_LINE>DbusEventBuffer.LOG.warn("illegal line in metaInfoFile. line=" + line);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String key = line.substring(0, idx);<NEW_LINE>String val = line.substring(idx + 1);<NEW_LINE>_info.put(key, val);<NEW_LINE>if (debugEnabled)<NEW_LINE>DbusEventBuffer.LOG.debug("\tkey=" + key + "; val=" + val);<NEW_LINE>line = br.readLine();<NEW_LINE>_valid = true;<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new DbusEventBufferMetaInfo.DbusEventBufferMetaInfoException(this, "cannot read metaInfoFile: " + e.getLocalizedMessage());<NEW_LINE>} finally {<NEW_LINE>if (br != null)<NEW_LINE>try {<NEW_LINE>br.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>DbusEventBuffer.LOG.warn("faild to close " + _file);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int version = getInt("version");<NEW_LINE>if (version != META_INFO_VERSION)<NEW_LINE>throw new DbusEventBufferMetaInfo.DbusEventBufferMetaInfoException(this, "metaInfoFile version doesn't match. Please remove the metafile and restart");<NEW_LINE>if (isMetaFileOlderThenMMappedFiles(getSessionId())) {<NEW_LINE>// we do not act on this, but keep it as a warning in the logs<NEW_LINE>// _valid = false; //not valid file - don't use<NEW_LINE>}<NEW_LINE>return _valid;<NEW_LINE>}
idx = line.indexOf(KEY_VALUE_SEP);
951,895
public void deleteLocksPath(String path, String token) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'path' is set<NEW_LINE>if (path == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'path' when calling deleteLocksPath");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'token' is set<NEW_LINE>if (token == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'token' when calling deleteLocksPath");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/locks/{path}".replaceAll("\\{" + "path" + "\\}", apiClient.escapeString<MASK><NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "token", token));<NEW_LINE>final String[] localVarAccepts = {};<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);<NEW_LINE>}
(path.toString()));
391,815
private void showStatsToUser() {<NEW_LINE>BoofSwingUtil.checkGuiThread();<NEW_LINE>algorithms.lock();<NEW_LINE>results.lock();<NEW_LINE>try {<NEW_LINE>double averageError = 0.0;<NEW_LINE>double maxError = 0.0;<NEW_LINE>List<ImageResults> errors <MASK><NEW_LINE>if (errors.isEmpty())<NEW_LINE>return;<NEW_LINE>for (int i = 0; i < errors.size(); i++) {<NEW_LINE>ImageResults r = errors.get(i);<NEW_LINE>averageError += r.meanError;<NEW_LINE>maxError = Math.max(maxError, r.maxError);<NEW_LINE>}<NEW_LINE>averageError /= errors.size();<NEW_LINE>String text = String.format("Reprojection Errors (px):\n\nmean=%.3f max=%.3f\n\n", averageError, maxError);<NEW_LINE>text += String.format("%-10s | %8s\n", "image", "max (px)");<NEW_LINE>for (int imageIdx = 0, i = 0; imageIdx < results.names.size(); imageIdx++) {<NEW_LINE>if (!results.used.get(imageIdx))<NEW_LINE>continue;<NEW_LINE>String imageName = results.names.get(imageIdx);<NEW_LINE>ImageResults r = errors.get(i);<NEW_LINE>text += String.format("%-12s %8.3f\n", imageName, r.maxError);<NEW_LINE>// print right image now<NEW_LINE>r = errors.get(i + 1);<NEW_LINE>text += String.format("%-12s %8.3f\n", "", r.maxError);<NEW_LINE>i += 2;<NEW_LINE>}<NEW_LINE>String _text = text;<NEW_LINE>SwingUtilities.invokeLater(() -> {<NEW_LINE>configurePanel.textAreaStats.setText(_text);<NEW_LINE>// show the top where summary stats are<NEW_LINE>configurePanel.textAreaStats.setCaretPosition(0);<NEW_LINE>});<NEW_LINE>} finally {<NEW_LINE>algorithms.unlock();<NEW_LINE>results.unlock();<NEW_LINE>}<NEW_LINE>}
= algorithms.calibrator.computeErrors();
1,136,530
private boolean initAttributes() {<NEW_LINE>if (m_M_Product_ID == 0)<NEW_LINE>return false;<NEW_LINE>MAttributeSet as = null;<NEW_LINE>if (m_M_Product_ID != 0) {<NEW_LINE>// Get Model<NEW_LINE>m_masi = MAttributeSetInstance.get(Env.<MASK><NEW_LINE>if (m_masi == null) {<NEW_LINE>log.error("No Model for M_AttributeSetInstance_ID=" + m_M_AttributeSetInstance_ID + ", M_Product_ID=" + m_M_Product_ID);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Env.setContext(Env.getCtx(), m_WindowNo, "M_AttributeSet_ID", m_masi.getM_AttributeSet_ID());<NEW_LINE>// Get Attribute Set<NEW_LINE>as = m_masi.getMAttributeSet();<NEW_LINE>} else {<NEW_LINE>int M_AttributeSet_ID = Env.getContextAsInt(Env.getCtx(), m_WindowNoParent, "M_AttributeSet_ID");<NEW_LINE>m_masi = new MAttributeSetInstance(Env.getCtx(), 0, M_AttributeSet_ID, null);<NEW_LINE>as = m_masi.getMAttributeSet();<NEW_LINE>}<NEW_LINE>// Product has no Attribute Set<NEW_LINE>if (as == null) {<NEW_LINE>ADialog.error(m_WindowNo, this, "PAttributeNoAttributeSet");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Product has no Instance Attributes<NEW_LINE>if (!as.isInstanceAttribute()) {<NEW_LINE>ADialog.error(m_WindowNo, this, "PAttributeNoInstanceAttribute");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!as.isSerNo()) {<NEW_LINE>// TODO<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>}<NEW_LINE>final String movementType = Env.getContext(Env.getCtx(), m_WindowNoParent, I_M_InOut.COLUMNNAME_MovementType);<NEW_LINE>final boolean enterNewSerialNo = movementType.endsWith("+");<NEW_LINE>if (!enterNewSerialNo) {<NEW_LINE>// we set up this dialog to allow only the<NEW_LINE>// selection of a given serial number<NEW_LINE>bSelect.setText(Msg.translate(Env.getCtx(), "SerNo"));<NEW_LINE>bSelect.addActionListener(this);<NEW_LINE>centerPanel.add(bSelect, null);<NEW_LINE>} else {<NEW_LINE>CLabel label = new CLabel(Msg.translate(Env.getCtx(), "SerNo"));<NEW_LINE>label.setLabelFor(fieldSerNo);<NEW_LINE>centerPanel.add(label, new ALayoutConstraint(m_row++, 0));<NEW_LINE>}<NEW_LINE>fieldSerNo.setText(m_masi.getSerNo());<NEW_LINE>fieldSerNo.setEditable(enterNewSerialNo);<NEW_LINE>centerPanel.add(fieldSerNo, null);<NEW_LINE>// Window usually to wide (??)<NEW_LINE>Dimension dd = centerPanel.getPreferredSize();<NEW_LINE>dd.width = Math.min(500, dd.width);<NEW_LINE>centerPanel.setPreferredSize(dd);<NEW_LINE>return true;<NEW_LINE>}
getCtx(), m_M_AttributeSetInstance_ID, m_M_Product_ID);
124,068
private static void createReceiver(UdpMulticastConnector.Builder builder, UDPConnector connector) {<NEW_LINE>UdpMulticastConnector multicastConnector = builder.setMulticastReceiver(true).build();<NEW_LINE>multicastConnector.setLoopbackMode(LOOPBACK);<NEW_LINE>try {<NEW_LINE>multicastConnector.start();<NEW_LINE>} catch (BindException ex) {<NEW_LINE>// binding to multicast seems to fail on windows<NEW_LINE>if (builder.getLocalAddress().getAddress().isMulticastAddress()) {<NEW_LINE>int port = builder<MASK><NEW_LINE>builder.setLocalPort(port);<NEW_LINE>multicastConnector = builder.build();<NEW_LINE>multicastConnector.setLoopbackMode(LOOPBACK);<NEW_LINE>try {<NEW_LINE>multicastConnector.start();<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>multicastConnector = null;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>ex.printStackTrace();<NEW_LINE>multicastConnector = null;<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>multicastConnector = null;<NEW_LINE>}<NEW_LINE>if (multicastConnector != null && connector != null) {<NEW_LINE>connector.addMulticastReceiver(multicastConnector);<NEW_LINE>}<NEW_LINE>}
.getLocalAddress().getPort();
571,985
public String confirmAndCreateAccount() {<NEW_LINE>ShibAuthenticationProvider shibAuthProvider = new ShibAuthenticationProvider();<NEW_LINE>String lookupStringPerAuthProvider = userPersistentId;<NEW_LINE>AuthenticatedUser au = null;<NEW_LINE>try {<NEW_LINE>au = authSvc.createAuthenticatedUser(new UserRecordIdentifier(shibAuthProvider.getId(), lookupStringPerAuthProvider<MASK><NEW_LINE>} catch (EJBException ex) {<NEW_LINE>logger.info("Couldn't create user " + userPersistentId + " due to exception: " + ex.getCause());<NEW_LINE>}<NEW_LINE>if (au != null) {<NEW_LINE>logger.fine("created user " + au.getIdentifier());<NEW_LINE>logInUserAndSetShibAttributes(au);<NEW_LINE>userNotificationService.sendNotification(au, new Timestamp(new Date().getTime()), UserNotification.Type.CREATEACC, null);<NEW_LINE>return "/dataverseuser.xhtml?selectTab=accountInfo&faces-redirect=true";<NEW_LINE>} else {<NEW_LINE>JsfHelper.addErrorMessage(BundleUtil.getStringFromBundle("shib.createUser.fail"));<NEW_LINE>}<NEW_LINE>return getPrettyFacesHomePageString(true);<NEW_LINE>}
), internalUserIdentifer, displayInfo, true);
1,248,278
/* (non-Javadoc)<NEW_LINE>* @see org.spongepowered.asm.mixin.transformer.MixinApplicator<NEW_LINE>* #prepareInjections(<NEW_LINE>* org.spongepowered.asm.mixin.transformer.MixinTargetContext)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>protected void prepareInjections(MixinTargetContext mixin) {<NEW_LINE>// disabled for interface mixins<NEW_LINE>for (MethodNode method : this.targetClass.methods) {<NEW_LINE>try {<NEW_LINE>InjectionInfo injectInfo = <MASK><NEW_LINE>if (injectInfo != null) {<NEW_LINE>throw new InvalidInterfaceMixinException(mixin, injectInfo + " is not supported on interface mixin method " + method.name);<NEW_LINE>}<NEW_LINE>} catch (InvalidInjectionException ex) {<NEW_LINE>String description = ex.getContext() != null ? ex.getContext().toString() : "Injection";<NEW_LINE>throw new InvalidInterfaceMixinException(mixin, description + " is not supported in interface mixin");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
InjectionInfo.parse(mixin, method);
718,614
public static ByteString synthesizeText(String text) throws Exception {<NEW_LINE>// Instantiates a client<NEW_LINE>try (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) {<NEW_LINE>// Set the text input to be synthesized<NEW_LINE>SynthesisInput input = SynthesisInput.newBuilder().setText(text).build();<NEW_LINE>// Build the voice request<NEW_LINE>VoiceSelectionParams voice = // languageCode = "en_us"<NEW_LINE>VoiceSelectionParams.newBuilder().// languageCode = "en_us"<NEW_LINE>setLanguageCode(// ssmlVoiceGender = SsmlVoiceGender.FEMALE<NEW_LINE>"en-US").// ssmlVoiceGender = SsmlVoiceGender.FEMALE<NEW_LINE>setSsmlGender(SsmlVoiceGender.FEMALE).build();<NEW_LINE>// Select the type of audio file you want returned<NEW_LINE>AudioConfig audioConfig = // MP3 audio.<NEW_LINE>AudioConfig.newBuilder().// MP3 audio.<NEW_LINE>setAudioEncoding(AudioEncoding.MP3).build();<NEW_LINE>// Perform the text-to-speech request<NEW_LINE>SynthesizeSpeechResponse response = textToSpeechClient.synthesizeSpeech(input, voice, audioConfig);<NEW_LINE>// Get the audio contents from the response<NEW_LINE><MASK><NEW_LINE>// Write the response to the output file.<NEW_LINE>try (OutputStream out = new FileOutputStream("output.mp3")) {<NEW_LINE>out.write(audioContents.toByteArray());<NEW_LINE>System.out.println("Audio content written to file \"output.mp3\"");<NEW_LINE>return audioContents;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ByteString audioContents = response.getAudioContent();
1,348,822
private void addUserVMCmdlineArgs(Long vmId, VirtualMachineProfile profile, DeployDestination dest, StringBuilder buf) {<NEW_LINE>UserVmVO k8sVM = _vmDao.findById(vmId);<NEW_LINE>buf.append(" template=domP");<NEW_LINE>buf.append(" name=").append(profile.getHostName());<NEW_LINE>buf.append(" type=").append(k8sVM.getUserVmType());<NEW_LINE>for (NicProfile nic : profile.getNics()) {<NEW_LINE>int deviceId = nic.getDeviceId();<NEW_LINE>if (nic.getIPv4Address() == null) {<NEW_LINE>buf.append(" eth").append(deviceId).append("ip=").append("0.0.0.0");<NEW_LINE>buf.append(" eth").append(deviceId).append<MASK><NEW_LINE>} else {<NEW_LINE>buf.append(" eth").append(deviceId).append("ip=").append(nic.getIPv4Address());<NEW_LINE>buf.append(" eth").append(deviceId).append("mask=").append(nic.getIPv4Netmask());<NEW_LINE>}<NEW_LINE>if (nic.isDefaultNic()) {<NEW_LINE>buf.append(" gateway=").append(nic.getIPv4Gateway());<NEW_LINE>}<NEW_LINE>if (nic.getTrafficType() == TrafficType.Management) {<NEW_LINE>String mgmt_cidr = _configDao.getValue(Config.ManagementNetwork.key());<NEW_LINE>if (NetUtils.isValidIp4Cidr(mgmt_cidr)) {<NEW_LINE>buf.append(" mgmtcidr=").append(mgmt_cidr);<NEW_LINE>}<NEW_LINE>buf.append(" localgw=").append(dest.getPod().getGateway());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>DataCenterVO dc = _dcDao.findById(profile.getVirtualMachine().getDataCenterId());<NEW_LINE>buf.append(" internaldns1=").append(dc.getInternalDns1());<NEW_LINE>if (dc.getInternalDns2() != null) {<NEW_LINE>buf.append(" internaldns2=").append(dc.getInternalDns2());<NEW_LINE>}<NEW_LINE>buf.append(" dns1=").append(dc.getDns1());<NEW_LINE>if (dc.getDns2() != null) {<NEW_LINE>buf.append(" dns2=").append(dc.getDns2());<NEW_LINE>}<NEW_LINE>s_logger.info("cmdline details: " + buf.toString());<NEW_LINE>}
("mask=").append("0.0.0.0");
78,732
public void init(int maxCapacity, Properties props) throws Exception {<NEW_LINE><MASK><NEW_LINE>segmentSize = DEFAULT_HASHTABLE_SEGMENT_SIZE;<NEW_LINE>if (props != null) {<NEW_LINE>String prop = props.getProperty("MultiLRUSegmentSize");<NEW_LINE>if (prop != null) {<NEW_LINE>try {<NEW_LINE>segmentSize = Integer.parseInt(prop);<NEW_LINE>} catch (NumberFormatException nfe) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// create the array of LRU lists<NEW_LINE>int segments = ((maxBuckets / segmentSize) + (((maxBuckets % segmentSize) != 0) ? 1 : 0));<NEW_LINE>lists = new LruCacheItem[segments][2];<NEW_LINE>listsLength = new int[lists.length];<NEW_LINE>for (int i = 0; i < lists.length; i++) {<NEW_LINE>lists[i][LRU_HEAD] = null;<NEW_LINE>lists[i][LRU_TAIL] = null;<NEW_LINE>listsLength[i] = 0;<NEW_LINE>}<NEW_LINE>}
super.init(maxCapacity, props);
1,660,022
boolean ensureAvailableSpaceUsed(boolean useCached) {<NEW_LINE>if (mdl.size() == 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean result = false;<NEW_LINE>if (changed && !useCached) {<NEW_LINE>result = true;<NEW_LINE>change();<NEW_LINE>}<NEW_LINE>int last <MASK><NEW_LINE>int lastTab = useCached ? getCachedLastVisibleTab() : getLastVisibleTab(width);<NEW_LINE>if (lastTab == last || lastTab == mdl.size() && last > -1) {<NEW_LINE>// one has been removed<NEW_LINE>int off = offset;<NEW_LINE>int availableWidth = width - (getX(last) + getW(last));<NEW_LINE>while (availableWidth > 0 && off > -1) {<NEW_LINE>availableWidth -= getWrapped().getW(off);<NEW_LINE>if (availableWidth > 0) {<NEW_LINE>off--;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setOffset(off);<NEW_LINE>if (changed) {<NEW_LINE>result = true;<NEW_LINE>change();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
= mdl.size() - 1;
1,813,800
protected String mountUri(URI uri, String nfsVersion) throws UnknownHostException {<NEW_LINE>String uriHostIp = getUriHostIp(uri);<NEW_LINE>String nfsPath = uriHostIp <MASK><NEW_LINE>// Single means of calculating mount directory regardless of scheme<NEW_LINE>String dir = UUID.nameUUIDFromBytes(nfsPath.getBytes(com.cloud.utils.StringUtils.getPreferredCharset())).toString();<NEW_LINE>String localRootPath = _parent + "/" + dir;<NEW_LINE>// remote device syntax varies by scheme.<NEW_LINE>String remoteDevice;<NEW_LINE>if (uri.getScheme().equals("cifs")) {<NEW_LINE>remoteDevice = "//" + uriHostIp + uri.getPath();<NEW_LINE>s_logger.debug("Mounting device with cifs-style path of " + remoteDevice);<NEW_LINE>} else {<NEW_LINE>remoteDevice = nfsPath;<NEW_LINE>s_logger.debug("Mounting device with nfs-style path of " + remoteDevice);<NEW_LINE>}<NEW_LINE>mount(localRootPath, remoteDevice, uri, nfsVersion);<NEW_LINE>return dir;<NEW_LINE>}
+ ":" + uri.getPath();
380,587
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>theme = getSharedPreferences(MainFragment.THEME_PREFERENCES, MODE_PRIVATE).getString(MainFragment.THEME_SAVED, MainFragment.LIGHTTHEME);<NEW_LINE>if (theme.equals(MainFragment.DARKTHEME)) {<NEW_LINE>Log.d("OskarSchindler", "One");<NEW_LINE>setTheme(R.style.CustomStyle_DarkTheme);<NEW_LINE>} else {<NEW_LINE>Log.d("OskarSchindler", "One");<NEW_LINE>setTheme(R.style.CustomStyle_LightTheme);<NEW_LINE>}<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// mId = (UUID)i.getSerializableExtra(TodoNotificationService.TODOUUID);<NEW_LINE>final Drawable backArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha);<NEW_LINE>if (backArrow != null) {<NEW_LINE>backArrow.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), 0);<NEW_LINE>appVersion = info.versionName;<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>toolbar = (Toolbar) findViewById(R.id.toolbar);<NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>if (getSupportActionBar() != null) {<NEW_LINE><MASK><NEW_LINE>getSupportActionBar().setHomeAsUpIndicator(backArrow);<NEW_LINE>}<NEW_LINE>}
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
168,195
static // The permutation preserves the key/value association but not the order of keys.<NEW_LINE>void permute(Object[] named) {<NEW_LINE>// number of K/V pairs<NEW_LINE>int n = named.length >> 1;<NEW_LINE>// Thanks to Murali Ganapathy for the algorithm.<NEW_LINE>// See https://play.golang.org/p/QOKnrj_bIwk.<NEW_LINE>//<NEW_LINE>// i and j are the indices bracketing successive pairs of cells,<NEW_LINE>// working from the outside to the middle.<NEW_LINE>//<NEW_LINE>// i j<NEW_LINE>// [KV]KVKVKVKVKVKV[KV]<NEW_LINE>// i j<NEW_LINE>// KK[KV]KVKVKVKV[KV]VV<NEW_LINE>// i j<NEW_LINE>// KKKK[KV]KVKV[KV]VVVV<NEW_LINE>// etc...<NEW_LINE>for (int i = 0; i < n - 1; i += 2) {<NEW_LINE><MASK><NEW_LINE>// rotate two pairs [KV]...[kv] -> [Kk]...[vV]<NEW_LINE>Object tmp = named[i + 1];<NEW_LINE>named[i + 1] = named[j - 2];<NEW_LINE>named[j - 2] = named[j - 1];<NEW_LINE>named[j - 1] = tmp;<NEW_LINE>}<NEW_LINE>// reverse lower half containing keys: [KkvV] -> [kKvV]<NEW_LINE>for (int i = 0; i < n >> 1; i++) {<NEW_LINE>Object tmp = named[n - 1 - i];<NEW_LINE>named[n - 1 - i] = named[i];<NEW_LINE>named[i] = tmp;<NEW_LINE>}<NEW_LINE>}
int j = named.length - i;
649,846
private void initOptions() {<NEW_LINE>ToolOptions opt = tool.getOptions(ToolConstants.TOOL_OPTIONS);<NEW_LINE>opt.registerOption(GhidraOptions.OPTION_NUMERIC_FORMATTING, DEFAULT_C_STYLE, null, "Interpret value entered in the Go To dialog as either hex, " + "octal, or binary number.");<NEW_LINE>opt.registerOption(GhidraOptions.OPTION_MAX_GO_TO_ENTRIES, DEFAULT_MAX_GOTO_ENTRIES, null, "Max number of entries remembered in the go to list.");<NEW_LINE>opt.registerOption(GO_TO_MEMORY, DEFAULT_MEMORY, null, "Remember the last successful go to input in the " + "Go To dialog. If this option is enabled, then the " + <MASK><NEW_LINE>maximumGotoEntries = opt.getInt(GhidraOptions.OPTION_MAX_GO_TO_ENTRIES, DEFAULT_MAX_GOTO_ENTRIES);<NEW_LINE>cStyleInput = opt.getBoolean(GhidraOptions.OPTION_NUMERIC_FORMATTING, DEFAULT_C_STYLE);<NEW_LINE>goToDialog.setCStyleInput(cStyleInput);<NEW_LINE>goToMemory = opt.getBoolean(GO_TO_MEMORY, DEFAULT_MEMORY);<NEW_LINE>goToDialog.setMemory(goToMemory);<NEW_LINE>opt.addOptionsChangeListener(this);<NEW_LINE>}
"Go To dialog will leave the last " + "successful go to input in the combo box of the Go " + "To dialog and will select the " + "value for easy paste replacement.");
427,367
final DeleteVoiceConnectorTerminationCredentialsResult executeDeleteVoiceConnectorTerminationCredentials(DeleteVoiceConnectorTerminationCredentialsRequest deleteVoiceConnectorTerminationCredentialsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVoiceConnectorTerminationCredentialsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DeleteVoiceConnectorTerminationCredentialsRequest> request = null;<NEW_LINE>Response<DeleteVoiceConnectorTerminationCredentialsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteVoiceConnectorTerminationCredentialsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteVoiceConnectorTerminationCredentialsRequest));<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, "Chime");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteVoiceConnectorTerminationCredentials");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteVoiceConnectorTerminationCredentialsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteVoiceConnectorTerminationCredentialsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,063,447
protected void encodeUnnamed(DataSchema schema) throws IOException {<NEW_LINE>DataSchema.<MASK><NEW_LINE>switch(type) {<NEW_LINE>case ARRAY:<NEW_LINE>_builder.writeStartObject();<NEW_LINE>_builder.writeStringField(TYPE_KEY, ARRAY_TYPE, true);<NEW_LINE>_builder.writeFieldName(ITEMS_KEY);<NEW_LINE>ArrayDataSchema arrayDataSchema = (ArrayDataSchema) schema;<NEW_LINE>encode(arrayDataSchema.getItems(), arrayDataSchema.isItemsDeclaredInline());<NEW_LINE>encodeProperties(schema);<NEW_LINE>_builder.writeEndObject();<NEW_LINE>break;<NEW_LINE>case MAP:<NEW_LINE>_builder.writeStartObject();<NEW_LINE>_builder.writeStringField(TYPE_KEY, MAP_TYPE, true);<NEW_LINE>_builder.writeFieldName(VALUES_KEY);<NEW_LINE>MapDataSchema mapDataSchema = (MapDataSchema) schema;<NEW_LINE>encode(mapDataSchema.getValues(), mapDataSchema.isValuesDeclaredInline());<NEW_LINE>encodeProperties(schema);<NEW_LINE>_builder.writeEndObject();<NEW_LINE>break;<NEW_LINE>case UNION:<NEW_LINE>encodeUnion((UnionDataSchema) schema);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalStateException("schema type " + schema.getType() + " is not a known unnamed DataSchema type");<NEW_LINE>}<NEW_LINE>}
Type type = schema.getType();
139,592
private void updateRequestBuilder(WebClientRequestBuilder requestBuilder, ApiRequest<?> request, String requestId) {<NEW_LINE>requestBuilder.headers().add("opc-request-id", requestId);<NEW_LINE>if (request instanceof OciRequestBase) {<NEW_LINE>OciRequestBase<?> ociRequest = (OciRequestBase<?>) request;<NEW_LINE>ociRequest.retryToken().ifPresent(it -> requestBuilder.headers().add("opc-retry-token", it));<NEW_LINE>Optional<String> maybeAddress = ociRequest.endpoint();<NEW_LINE>URI ociUri;<NEW_LINE>if (maybeAddress.isPresent()) {<NEW_LINE><MASK><NEW_LINE>requestBuilder.uri(address);<NEW_LINE>ociUri = URI.create(address);<NEW_LINE>} else {<NEW_LINE>String prefix = ociRequest.hostPrefix();<NEW_LINE>String address = formatFunction.apply(ociRequest.hostFormat(), prefix);<NEW_LINE>requestBuilder.uri(address);<NEW_LINE>ociUri = URI.create(address);<NEW_LINE>}<NEW_LINE>// this is a required change - Host was failing with secret bundles, host works<NEW_LINE>requestBuilder.headers().add("host", ociUri.getHost());<NEW_LINE>} else {<NEW_LINE>throw new OciApiException("Cannot handle non-OCI requests. Request: " + request.getClass().getName());<NEW_LINE>}<NEW_LINE>}
String address = maybeAddress.get();
250,991
// [START SDF_UserInitiatedCheckpoint]<NEW_LINE>@ProcessElement<NEW_LINE>public ProcessContinuation processElement(RestrictionTracker<OffsetRange, Long> tracker, OutputReceiver<Record> outputReceiver) {<NEW_LINE>long currentPosition = tracker.currentRestriction().getFrom();<NEW_LINE>Service service = initializeService();<NEW_LINE>try {<NEW_LINE>while (true) {<NEW_LINE>List<Record> records = service.readNextRecords(currentPosition);<NEW_LINE>if (records.isEmpty()) {<NEW_LINE>// Return a short delay if there is no data to process at the moment.<NEW_LINE>return ProcessContinuation.resume().withResumeDelay<MASK><NEW_LINE>}<NEW_LINE>for (Record record : records) {<NEW_LINE>if (!tracker.tryClaim(record.getPosition())) {<NEW_LINE>return ProcessContinuation.stop();<NEW_LINE>}<NEW_LINE>currentPosition = record.getPosition() + 1;<NEW_LINE>outputReceiver.output(record);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (ThrottlingException exception) {<NEW_LINE>// Return a longer delay in case we are being throttled.<NEW_LINE>return ProcessContinuation.resume().withResumeDelay(Duration.standardSeconds(60));<NEW_LINE>}<NEW_LINE>}
(Duration.standardSeconds(10));
1,327,767
private void expand() {<NEW_LINE>Iterable<Relationship> expand = expander.expand(this, BranchState.NO_STATE);<NEW_LINE>for (Relationship rel : expand) {<NEW_LINE>lastMetadata.rels++;<NEW_LINE>Node node = rel.getOtherNode(lastNode);<NEW_LINE>Visit visit = visitData.get(node.getId());<NEW_LINE>if (visit != null && visit.visited) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Visit lastVisit = visitData.get(lastNode.getId());<NEW_LINE>double tentativeGScore = lastVisit.wayLength + lengthEvaluator.getCost(rel, Direction.OUTGOING);<NEW_LINE>double estimate = <MASK><NEW_LINE>if (visit == null || !visit.next || tentativeGScore < visit.wayLength) {<NEW_LINE>if (visit == null) {<NEW_LINE>visit = new Visit(rel.getId(), tentativeGScore, estimate);<NEW_LINE>visitData.put(node.getId(), visit);<NEW_LINE>} else {<NEW_LINE>visit.update(rel.getId(), tentativeGScore, estimate);<NEW_LINE>}<NEW_LINE>addNext(node, estimate + tentativeGScore, visit);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
estimateEvaluator.getCost(node, end);
767,463
public static void main(String[] args) throws Exception {<NEW_LINE>// Create default client<NEW_LINE>AmazonWorkDocs workDocs = AmazonWorkDocsClientBuilder.defaultClient();<NEW_LINE>// Set to the OrganizationId of your WorkDocs site.<NEW_LINE>String orgId = "d-123456789c";<NEW_LINE>// Set to the email address of a real user<NEW_LINE>String userEmail = "nobody@amazon.com";<NEW_LINE>// Set to the name of the doc<NEW_LINE>String workdocsName = "test.txt";<NEW_LINE>// Set to the full path to the doc<NEW_LINE>String saveDocFullName;<NEW_LINE>if (System.getProperty("os.name").contains("win")) {<NEW_LINE>saveDocFullName = "C:\\test.txt";<NEW_LINE>} else {<NEW_LINE>saveDocFullName = "/tmp/test.txt";<NEW_LINE>}<NEW_LINE>Map<String, String> map = getDocInfo(workDocs, orgId, userEmail, workdocsName);<NEW_LINE>if (map.isEmpty()) {<NEW_LINE>System.out.println("Could not get info about workdoc " + workdocsName);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String doc_id = map.get("doc_id");<NEW_LINE>String version_id = map.get("version_id");<NEW_LINE>if ("".equals(doc_id) || "".equals(version_id)) {<NEW_LINE>System.out.println("Could not get info about workdoc " + workdocsName);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String downloadUrl = getDownloadDocUrl(workDocs, doc_id, version_id, workdocsName);<NEW_LINE>GetDocumentVersionRequest request = new GetDocumentVersionRequest();<NEW_LINE>request.setDocumentId(doc_id);<NEW_LINE>request.setVersionId(version_id);<NEW_LINE>request.setFields("SOURCE");<NEW_LINE>// Get doc from provided URL<NEW_LINE><MASK><NEW_LINE>URLConnection url_conn = doc_url.openConnection();<NEW_LINE>final Path destination = Paths.get(saveDocFullName);<NEW_LINE>try (final InputStream in = url_conn.getInputStream()) {<NEW_LINE>Files.copy(in, destination);<NEW_LINE>System.out.println("Downloaded " + workdocsName + " to: " + saveDocFullName);<NEW_LINE>}<NEW_LINE>}
URL doc_url = new URL(downloadUrl);
802,229
public void highlightSelectedItem() {<NEW_LINE>int p = getItems().size();<NEW_LINE>// first check if there is a key match to handle items with<NEW_LINE>// identical captions<NEW_LINE>String currentKey = currentSuggestion != null ? currentSuggestion.getOptionKey() : "";<NEW_LINE>for (int i = 0; i < p; i++) {<NEW_LINE>final MenuItem potentialExactMatch = <MASK><NEW_LINE>if (currentKey.equals(getSuggestionKey(potentialExactMatch)) && tb.getText().equals(potentialExactMatch.getText())) {<NEW_LINE>selectItem(potentialExactMatch);<NEW_LINE>tb.setSelectionRange(tb.getText().length(), 0);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// then check for exact string match in menu<NEW_LINE>String text = tb.getText();<NEW_LINE>for (int i = 0; i < p; i++) {<NEW_LINE>final MenuItem potentialExactMatch = getItems().get(i);<NEW_LINE>if (potentialExactMatch.getText().equals(text)) {<NEW_LINE>selectItem(potentialExactMatch);<NEW_LINE>tb.setSelectionRange(tb.getText().length(), 0);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getItems().get(i);
679,363
public void start(BundleContext context) throws Exception {<NEW_LINE>final Hashtable<String, Object> handlerProps = new Hashtable<String, Object>();<NEW_LINE>handlerProps.put(HandlerConstants.ENGINE_TYPE, HandlerConstants.ENGINE_TYPE_JAXRS);<NEW_LINE>handlerProps.put(HandlerConstants.IS_SERVER_SIDE, true);<NEW_LINE>handlerProps.put(HandlerConstants.IS_CLIENT_SIDE, false);<NEW_LINE>handlerProps.put(HandlerConstants.FLOW_TYPE, HandlerConstants.FLOW_TYPE_IN);<NEW_LINE>handlerProps.put(org.osgi.framework.Constants.SERVICE_RANKING, 1);<NEW_LINE>InHandlerRS inHandlerRS = new InHandlerRS();<NEW_LINE>serviceRegistration = context.registerService(Handler.class, inHandlerRS, handlerProps);<NEW_LINE>handlerProps.put(HandlerConstants.ENGINE_TYPE, HandlerConstants.ENGINE_TYPE_ALL);<NEW_LINE>handlerProps.put(HandlerConstants.FLOW_TYPE, HandlerConstants.FLOW_TYPE_INOUT);<NEW_LINE>handlerProps.put(org.osgi.framework.Constants.SERVICE_RANKING, 2);<NEW_LINE>InOutHandlerBoth inOutHandlerBoth = new InOutHandlerBoth();<NEW_LINE>serviceRegistration = context.registerService(<MASK><NEW_LINE>handlerProps.put(HandlerConstants.ENGINE_TYPE, HandlerConstants.ENGINE_TYPE_JAXWS);<NEW_LINE>handlerProps.put(HandlerConstants.FLOW_TYPE, HandlerConstants.FLOW_TYPE_OUT);<NEW_LINE>handlerProps.put(org.osgi.framework.Constants.SERVICE_RANKING, 3);<NEW_LINE>OutHandlerWS outHandlerWS = new OutHandlerWS();<NEW_LINE>serviceRegistration = context.registerService(Handler.class, outHandlerWS, handlerProps);<NEW_LINE>System.out.println("in start method in bundle activator");<NEW_LINE>}
Handler.class, inOutHandlerBoth, handlerProps);
1,313,285
private IDecompiler initDecompiler(MixinEnvironment env, File outputPath) {<NEW_LINE>if (!env.getOption(Option.DEBUG_EXPORT_DECOMPILE)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>boolean as = env.getOption(Option.DEBUG_EXPORT_DECOMPILE_THREADED);<NEW_LINE>ExtensionClassExporter.logger.info("Attempting to load Fernflower decompiler{}", as ? " (Threaded mode)" : "");<NEW_LINE>String className = ExtensionClassExporter.DECOMPILER_CLASS + (as ? "Async" : "");<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Class<? extends IDecompiler> clazz = (Class<? extends IDecompiler>) Class.forName(className);<NEW_LINE>Constructor<? extends IDecompiler> ctor = <MASK><NEW_LINE>IDecompiler decompiler = ctor.newInstance(outputPath);<NEW_LINE>ExtensionClassExporter.logger.info("Fernflower decompiler was successfully initialised from {}, exported classes will be decompiled{}", decompiler, as ? " in a separate thread" : "");<NEW_LINE>return decompiler;<NEW_LINE>} catch (Throwable th) {<NEW_LINE>ExtensionClassExporter.logger.info("Fernflower could not be loaded, exported classes will not be decompiled. {}: {}", th.getClass().getSimpleName(), th.getMessage());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
clazz.getDeclaredConstructor(File.class);
563,442
public emu.grasscutter.net.proto.CoopChapterOuterClass.CoopChapter buildPartial() {<NEW_LINE>emu.grasscutter.net.proto.CoopChapterOuterClass.CoopChapter result = new emu.grasscutter.net.proto.CoopChapterOuterClass.CoopChapter(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>result.id_ = id_;<NEW_LINE>result.state_ = state_;<NEW_LINE>if (((bitField0_ & 0x00000001) != 0)) {<NEW_LINE>lockReasonList_.makeImmutable();<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>}<NEW_LINE>result.lockReasonList_ = lockReasonList_;<NEW_LINE>if (coopPointListBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000002) != 0)) {<NEW_LINE>coopPointList_ = java.util.Collections.unmodifiableList(coopPointList_);<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>}<NEW_LINE>result.coopPointList_ = coopPointList_;<NEW_LINE>} else {<NEW_LINE>result.coopPointList_ = coopPointListBuilder_.build();<NEW_LINE>}<NEW_LINE>if (coopRewardListBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000004) != 0)) {<NEW_LINE>coopRewardList_ = java.util.Collections.unmodifiableList(coopRewardList_);<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000004);<NEW_LINE>}<NEW_LINE>result.coopRewardList_ = coopRewardList_;<NEW_LINE>} else {<NEW_LINE>result.coopRewardList_ = coopRewardListBuilder_.build();<NEW_LINE>}<NEW_LINE>if (coopCgListBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000008) != 0)) {<NEW_LINE>coopCgList_ = java.util.Collections.unmodifiableList(coopCgList_);<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000008);<NEW_LINE>}<NEW_LINE>result.coopCgList_ = coopCgList_;<NEW_LINE>} else {<NEW_LINE>result.coopCgList_ = coopCgListBuilder_.build();<NEW_LINE>}<NEW_LINE>result.totalEndCount_ = totalEndCount_;<NEW_LINE>result.finishedEndCount_ = finishedEndCount_;<NEW_LINE>result.seenEndingMap_ = internalGetSeenEndingMap();<NEW_LINE>result.seenEndingMap_.makeImmutable();<NEW_LINE>if (((bitField0_ & 0x00000020) != 0)) {<NEW_LINE>finishDialogList_.makeImmutable();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>result.finishDialogList_ = finishDialogList_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000020);
1,776,049
final DisassociateSigninDelegateGroupsFromAccountResult executeDisassociateSigninDelegateGroupsFromAccount(DisassociateSigninDelegateGroupsFromAccountRequest disassociateSigninDelegateGroupsFromAccountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateSigninDelegateGroupsFromAccountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DisassociateSigninDelegateGroupsFromAccountRequest> request = null;<NEW_LINE>Response<DisassociateSigninDelegateGroupsFromAccountResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DisassociateSigninDelegateGroupsFromAccountRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disassociateSigninDelegateGroupsFromAccountRequest));<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, "Chime");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateSigninDelegateGroupsFromAccount");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DisassociateSigninDelegateGroupsFromAccountResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DisassociateSigninDelegateGroupsFromAccountResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
1,794,117
public void multiRemove(final ReadableArray keys, final Callback callback) {<NEW_LINE>if (keys.size() == 0) {<NEW_LINE>callback.invoke();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>new GuardedAsyncTask<Void, Void>(getReactApplicationContext()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void doInBackgroundGuarded(Void... params) {<NEW_LINE>if (!ensureDatabase()) {<NEW_LINE>callback.invoke(AsyncStorageErrorUtil.getDBError(null));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>WritableMap error = null;<NEW_LINE>try {<NEW_LINE>mReactDatabaseSupplier.get().beginTransaction();<NEW_LINE>for (int keyStart = 0; keyStart < keys.size(); keyStart += MAX_SQL_KEYS) {<NEW_LINE>int keyCount = Math.min(keys.<MASK><NEW_LINE>mReactDatabaseSupplier.get().delete(ReactDatabaseSupplier.TABLE_CATALYST, AsyncLocalStorageUtil.buildKeySelection(keyCount), AsyncLocalStorageUtil.buildKeySelectionArgs(keys, keyStart, keyCount));<NEW_LINE>}<NEW_LINE>mReactDatabaseSupplier.get().setTransactionSuccessful();<NEW_LINE>} catch (Exception e) {<NEW_LINE>FLog.w(ReactConstants.TAG, e.getMessage(), e);<NEW_LINE>error = AsyncStorageErrorUtil.getError(null, e.getMessage());<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>mReactDatabaseSupplier.get().endTransaction();<NEW_LINE>} catch (Exception e) {<NEW_LINE>FLog.w(ReactConstants.TAG, e.getMessage(), e);<NEW_LINE>if (error == null) {<NEW_LINE>error = AsyncStorageErrorUtil.getError(null, e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (error != null) {<NEW_LINE>callback.invoke(error);<NEW_LINE>} else {<NEW_LINE>callback.invoke();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}.executeOnExecutor(executor);<NEW_LINE>}
size() - keyStart, MAX_SQL_KEYS);
215,388
private void addPolygon(Polygon p) {<NEW_LINE>double offsetDistance = distance;<NEW_LINE>int offsetSide = Position.LEFT;<NEW_LINE>if (distance < 0.0) {<NEW_LINE>offsetDistance = -distance;<NEW_LINE>offsetSide = Position.RIGHT;<NEW_LINE>}<NEW_LINE>LinearRing shell = p.getExteriorRing();<NEW_LINE>Coordinate[] shellCoord = clean(shell.getCoordinates());<NEW_LINE>// optimization - don't bother computing buffer<NEW_LINE>// if the polygon would be completely eroded<NEW_LINE>if (distance < 0.0 && isErodedCompletely(shell, distance))<NEW_LINE>return;<NEW_LINE>// don't attempt to buffer a polygon with too few distinct vertices<NEW_LINE>if (distance <= 0.0 && shellCoord.length < 3)<NEW_LINE>return;<NEW_LINE>addRingSide(shellCoord, offsetDistance, offsetSide, Location.EXTERIOR, Location.INTERIOR);<NEW_LINE>for (int i = 0; i < p.getNumInteriorRing(); i++) {<NEW_LINE>LinearRing hole = p.getInteriorRingN(i);<NEW_LINE>Coordinate[] holeCoord = clean(hole.getCoordinates());<NEW_LINE>// optimization - don't bother computing buffer for this hole<NEW_LINE>// if the hole would be completely covered<NEW_LINE>if (distance > 0.0 && isErodedCompletely(hole, -distance))<NEW_LINE>continue;<NEW_LINE>// Holes are topologically labelled opposite to the shell, since<NEW_LINE>// the interior of the polygon lies on their opposite side<NEW_LINE>// (on the left, if the hole is oriented CCW)<NEW_LINE>addRingSide(holeCoord, offsetDistance, Position.opposite(offsetSide), <MASK><NEW_LINE>}<NEW_LINE>}
Location.INTERIOR, Location.EXTERIOR);
1,283,082
public DataRepositoryTaskFilter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DataRepositoryTaskFilter dataRepositoryTaskFilter = new DataRepositoryTaskFilter();<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("Name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dataRepositoryTaskFilter.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Values", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dataRepositoryTaskFilter.setValues(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return dataRepositoryTaskFilter;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,697,135
private void printClientSideDetectedIssues(Set<ComponentConnector> zeroSized) {<NEW_LINE>// keep track of already highlighted parents<NEW_LINE>HashSet<String> parents = new HashSet<>();<NEW_LINE>for (final ComponentConnector connector : zeroSized) {<NEW_LINE>final ServerConnector parent = connector.getParent();<NEW_LINE>final String parentId = parent.getConnectorId();<NEW_LINE>final Label errorDetails = new Label(connector.getClass().getSimpleName() + "[" + connector.getConnectorId() + "]" + " inside " + parent.getClass().getSimpleName());<NEW_LINE>if (parent instanceof ComponentConnector) {<NEW_LINE>final ComponentConnector parentConnector = (ComponentConnector) parent;<NEW_LINE>if (!parents.contains(parentId)) {<NEW_LINE>parents.add(parentId);<NEW_LINE>Highlight.show(parentConnector, "yellow");<NEW_LINE>}<NEW_LINE>errorDetails.addMouseOverHandler(event -> {<NEW_LINE>Highlight.hideAll();<NEW_LINE>Highlight.show(parentConnector, "yellow");<NEW_LINE>Highlight.show(connector);<NEW_LINE>errorDetails.getElement().getStyle().setTextDecoration(TextDecoration.UNDERLINE);<NEW_LINE>});<NEW_LINE>errorDetails.addMouseOutHandler(event -> {<NEW_LINE>Highlight.hideAll();<NEW_LINE>errorDetails.getElement().getStyle(<MASK><NEW_LINE>});<NEW_LINE>errorDetails.addClickHandler(event -> fireSelectEvent(connector));<NEW_LINE>}<NEW_LINE>Highlight.show(connector);<NEW_LINE>add(errorDetails);<NEW_LINE>}<NEW_LINE>}
).setTextDecoration(TextDecoration.NONE);
1,455,690
public Optional<CostDetailCreateResult> createOrUpdateCost(final CostDetailCreateRequest request) {<NEW_LINE>final PPCostCollectorId costCollectorId = request.getDocumentRef().getCostCollectorId(PPCostCollectorId::ofRepoId);<NEW_LINE>final I_PP_Cost_Collector cc = costCollectorsService.getById(costCollectorId);<NEW_LINE>final CostCollectorType costCollectorType = CostCollectorType.ofCode(cc.getCostCollectorType());<NEW_LINE>final PPOrderBOMLineId orderBOMLineId = PPOrderBOMLineId.ofRepoIdOrNull(cc.getPP_Order_BOMLine_ID());<NEW_LINE>if (costCollectorType.isMaterial(orderBOMLineId)) {<NEW_LINE>return Optional.of(createIssueOrReceipt(request));<NEW_LINE>} else if (costCollectorType.isActivityControl()) {<NEW_LINE>final ResourceId actualResourceId = ResourceId.ofRepoId(cc.getS_Resource_ID());<NEW_LINE>final ProductId actualResourceProductId = resourceProductService.getProductIdByResourceId(actualResourceId);<NEW_LINE>final Duration <MASK><NEW_LINE>return Optional.ofNullable(createActivityControl(request.withProductId(actualResourceProductId), totalDuration));<NEW_LINE>} else if (costCollectorType.isUsageVariance()) {<NEW_LINE>if (cc.getPP_Order_BOMLine_ID() > 0) {<NEW_LINE>return Optional.of(createUsageVariance(request));<NEW_LINE>} else {<NEW_LINE>final ResourceId actualResourceId = ResourceId.ofRepoId(cc.getS_Resource_ID());<NEW_LINE>final ProductId actualResourceProductId = resourceProductService.getProductIdByResourceId(actualResourceId);<NEW_LINE>final Duration totalDurationReported = costCollectorsService.getTotalDurationReported(cc);<NEW_LINE>final Quantity qty = convertDurationToQuantity(totalDurationReported, actualResourceProductId);<NEW_LINE>return Optional.of(createUsageVariance(request.withProductIdAndQty(actualResourceProductId, qty)));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new AdempiereException("Unknown cost collector type: " + costCollectorType);<NEW_LINE>}<NEW_LINE>}
totalDuration = costCollectorsService.getTotalDurationReported(cc);
1,634,637
public void addMessage(final Message message) {<NEW_LINE>if (this.getActivity() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (message.isIgnoreMessageAdding(getActivity()) || !TextUtils.isEmpty(searchString)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Context context = getActivity();<NEW_LINE>this.getActivity().runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>message.processContactIds(context);<NEW_LINE>Message recentMessage;<NEW_LINE>if (message.getGroupId() != null) {<NEW_LINE>recentMessage = latestMessageForEachContact.get(ConversationUIService.GROUP + message.getGroupId());<NEW_LINE>} else {<NEW_LINE>recentMessage = latestMessageForEachContact.get(message.getContactIds());<NEW_LINE>}<NEW_LINE>if (recentMessage != null && message.getCreatedAtTime() >= recentMessage.getCreatedAtTime()) {<NEW_LINE>messageList.remove(recentMessage);<NEW_LINE>} else if (recentMessage != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (message.getGroupId() != null) {<NEW_LINE>latestMessageForEachContact.put(ConversationUIService.GROUP + message.getGroupId(), message);<NEW_LINE>} else {<NEW_LINE>latestMessageForEachContact.put(message.getContactIds(), message);<NEW_LINE>}<NEW_LINE>messageList.add(0, message);<NEW_LINE>recyclerAdapter.notifyDataSetChanged();<NEW_LINE>emptyTextView.setVisibility(View.GONE);<NEW_LINE>emptyTextView.setText(!TextUtils.isEmpty(alCustomizationSettings.getNoConversationLabel()) ? alCustomizationSettings.getNoConversationLabel() : getResources().getString<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(R.string.no_conversation));
196,834
public static String safeToString(GeneralName generalName, boolean addLinkForURI) {<NEW_LINE>if (generalName == null) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>switch(generalName.getTagNo()) {<NEW_LINE>case GeneralName.directoryName:<NEW_LINE>X500Name directoryName = (X500Name) generalName.getName();<NEW_LINE>return MessageFormat.format(res.getString("GeneralNameUtil.DirectoryGeneralName"), directoryName.toString());<NEW_LINE>case GeneralName.dNSName:<NEW_LINE>DERIA5String dnsName = (DERIA5String) generalName.getName();<NEW_LINE>return MessageFormat.format(res.getString("GeneralNameUtil.DnsGeneralName"), dnsName.getString());<NEW_LINE>case GeneralName.iPAddress:<NEW_LINE>String ipAddressString = parseIpAddress(generalName);<NEW_LINE>return MessageFormat.format(res.getString("GeneralNameUtil.IpAddressGeneralName"), ipAddressString);<NEW_LINE>case GeneralName.registeredID:<NEW_LINE>ASN1ObjectIdentifier registeredId = <MASK><NEW_LINE>return MessageFormat.format(res.getString("GeneralNameUtil.RegisteredIdGeneralName"), ObjectIdUtil.toString(registeredId));<NEW_LINE>case GeneralName.rfc822Name:<NEW_LINE>DERIA5String rfc822Name = (DERIA5String) generalName.getName();<NEW_LINE>return MessageFormat.format(res.getString("GeneralNameUtil.Rfc822GeneralName"), rfc822Name.getString());<NEW_LINE>case GeneralName.uniformResourceIdentifier:<NEW_LINE>DERIA5String uri = (DERIA5String) generalName.getName();<NEW_LINE>String link = addLinkForURI ? "<a href=\"" + uri.getString() + "\">" + uri.getString() + "</a>" : uri.getString();<NEW_LINE>return MessageFormat.format(res.getString("GeneralNameUtil.UriGeneralName"), link);<NEW_LINE>case GeneralName.otherName:<NEW_LINE>// we currently only support UPN in otherName<NEW_LINE>return parseUPN(generalName);<NEW_LINE>default:<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>}
(ASN1ObjectIdentifier) generalName.getName();
940,278
void maybeStartNodejs() throws Exception {<NEW_LINE>if (this.nodejsModule != null) {<NEW_LINE>try {<NEW_LINE>this.nodejsModule.startNodeProject("loader.js", Arguments.createMap());<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.e("NODEJS-RN", "startNodeProject failed to run loader.js");<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ReactNativeHost host = MainApplication.instance.getReactNativeHost();<NEW_LINE>if (host == null) {<NEW_LINE>throw new Exception("maybeStartNodejs() failed because of no ReactNativeHost");<NEW_LINE>}<NEW_LINE>ReactInstanceManager manager = host.getReactInstanceManager();<NEW_LINE>if (manager == null) {<NEW_LINE>throw new Exception("maybeStartNodejs() failed because of no ReactInstanceManager");<NEW_LINE>}<NEW_LINE>manager.addReactInstanceEventListener(new ReactInstanceManager.ReactInstanceEventListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onReactContextInitialized(ReactContext context) {<NEW_LINE>nodejsModule = context.getNativeModule(RNNodeJsMobileModule.class);<NEW_LINE>nodejsModule.setJsExceptionInvokable(new RNNodeJsMobileModule.Invokable<String>() {<NEW_LINE><NEW_LINE>public void invoke(String ex) {<NEW_LINE>ACRA.getErrorReporter().<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>try {<NEW_LINE>nodejsModule.startNodeProject("loader.js", Arguments.createMap());<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.e("NODEJS-RN", "startNodeProject failed to run loader.js");<NEW_LINE>}<NEW_LINE>manager.removeReactInstanceEventListener(this);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
handleException(new Exception(ex));
35,792
public static UpdateAppModelResponse unmarshall(UpdateAppModelResponse updateAppModelResponse, UnmarshallerContext _ctx) {<NEW_LINE>updateAppModelResponse.setRequestId(_ctx.stringValue("UpdateAppModelResponse.RequestId"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setAppId(_ctx.stringValue("UpdateAppModelResponse.Data.AppId"));<NEW_LINE>data.setContent(_ctx.mapValue("UpdateAppModelResponse.Data.Content"));<NEW_LINE>data.setCreateTime(_ctx.stringValue("UpdateAppModelResponse.Data.CreateTime"));<NEW_LINE>data.setDescription(_ctx.stringValue("UpdateAppModelResponse.Data.Description"));<NEW_LINE>data.setId(_ctx.stringValue("UpdateAppModelResponse.Data.Id"));<NEW_LINE>data.setLinkModelId(_ctx.stringValue("UpdateAppModelResponse.Data.LinkModelId"));<NEW_LINE>data.setLinkModuleId(_ctx.stringValue("UpdateAppModelResponse.Data.LinkModuleId"));<NEW_LINE>data.setLinked(_ctx.booleanValue("UpdateAppModelResponse.Data.Linked"));<NEW_LINE>data.setModelId(_ctx.stringValue("UpdateAppModelResponse.Data.ModelId"));<NEW_LINE>data.setModifiedTime(_ctx.stringValue("UpdateAppModelResponse.Data.ModifiedTime"));<NEW_LINE>data.setModuleId(_ctx.stringValue("UpdateAppModelResponse.Data.ModuleId"));<NEW_LINE>data.setModelName(_ctx.stringValue("UpdateAppModelResponse.Data.ModelName"));<NEW_LINE>data.setProps(_ctx.mapValue("UpdateAppModelResponse.Data.Props"));<NEW_LINE>data.setRevision(_ctx.integerValue("UpdateAppModelResponse.Data.Revision"));<NEW_LINE>data.setSchemaVersion(_ctx.stringValue("UpdateAppModelResponse.Data.SchemaVersion"));<NEW_LINE>data.setModelStatus<MASK><NEW_LINE>data.setSubType(_ctx.stringValue("UpdateAppModelResponse.Data.SubType"));<NEW_LINE>data.setModelType(_ctx.stringValue("UpdateAppModelResponse.Data.ModelType"));<NEW_LINE>data.setVisibility(_ctx.stringValue("UpdateAppModelResponse.Data.Visibility"));<NEW_LINE>List<Map<Object, Object>> attributes = _ctx.listMapValue("UpdateAppModelResponse.Data.Attributes");<NEW_LINE>data.setAttributes(attributes);<NEW_LINE>updateAppModelResponse.setData(data);<NEW_LINE>return updateAppModelResponse;<NEW_LINE>}
(_ctx.stringValue("UpdateAppModelResponse.Data.ModelStatus"));
186,403
public void visit(SubscriptExpr expr) {<NEW_LINE>WasmExpression ptr = getArrayElementPointer(expr);<NEW_LINE>switch(expr.getType()) {<NEW_LINE>case BYTE:<NEW_LINE>result = new WasmLoadInt32(1, ptr, WasmInt32Subtype.INT8);<NEW_LINE>break;<NEW_LINE>case SHORT:<NEW_LINE>result = new WasmLoadInt32(2, ptr, WasmInt32Subtype.INT16);<NEW_LINE>break;<NEW_LINE>case CHAR:<NEW_LINE>result = new WasmLoadInt32(2, ptr, WasmInt32Subtype.UINT16);<NEW_LINE>break;<NEW_LINE>case INT:<NEW_LINE>case OBJECT:<NEW_LINE>result = new WasmLoadInt32(4, ptr, WasmInt32Subtype.INT32);<NEW_LINE>break;<NEW_LINE>case LONG:<NEW_LINE>result = new WasmLoadInt64(<MASK><NEW_LINE>break;<NEW_LINE>case FLOAT:<NEW_LINE>result = new WasmLoadFloat32(4, ptr);<NEW_LINE>break;<NEW_LINE>case DOUBLE:<NEW_LINE>result = new WasmLoadFloat64(8, ptr);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
8, ptr, WasmInt64Subtype.INT64);
1,306,141
/* Build call for apisApiIdThumbnailGet */<NEW_LINE>private com.squareup.okhttp.Call apisApiIdThumbnailGetCall(String apiId, String accept, String ifNoneMatch, String ifModifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/{apiId}/thumbnail".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "apiId" + "\\}", apiClient.escapeString(apiId.toString()));<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>if (accept != null)<NEW_LINE>localVarHeaderParams.put("Accept", apiClient.parameterToString(accept));<NEW_LINE>if (ifNoneMatch != null)<NEW_LINE>localVarHeaderParams.put("If-None-Match"<MASK><NEW_LINE>if (ifModifiedSince != null)<NEW_LINE>localVarHeaderParams.put("If-Modified-Since", apiClient.parameterToString(ifModifiedSince));<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null)<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>if (progressListener != null) {<NEW_LINE>apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {<NEW_LINE>com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());<NEW_LINE>return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);<NEW_LINE>}
, apiClient.parameterToString(ifNoneMatch));
691,374
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>final LinearLayout parent = new LinearLayout(this);<NEW_LINE>final ComponentContext componentContext = new ComponentContext(this);<NEW_LINE>mLithoView = LithoView.create(componentContext, Column.create(componentContext).child(LifecycleDelegateComponent.create(componentContext).id(String.valueOf(mId.getAndIncrement())).consoleDelegateListener(mConsoleDelegateListener).build()).build(), mLithoLifecycleProviderDelegate);<NEW_LINE>final LinearLayout.LayoutParams params1 = new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT);<NEW_LINE>params1.weight = 1;<NEW_LINE>mLithoView.setLayoutParams(params1);<NEW_LINE>parent.addView(mLithoView);<NEW_LINE>setContentView(parent);<NEW_LINE>FrameLayout frame = new FrameLayout(this);<NEW_LINE>frame.<MASK><NEW_LINE>setContentView(frame, new FrameLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));<NEW_LINE>Fragment lifecycleFragment = new LifecycleFragment();<NEW_LINE>FragmentTransaction ft = getSupportFragmentManager().beginTransaction();<NEW_LINE>ft.add(R.id.fragment_view, lifecycleFragment).commit();<NEW_LINE>}
setId(R.id.fragment_view);
841,203
public void createMetricFeedbackWithResponse() {<NEW_LINE>// BEGIN: com.azure.ai.metricsadvisor.MetricsAdvisorClient.addFeedbackWithResponse#String-MetricFeedback-Context<NEW_LINE>final String metricId = "d3gh4i4-b804-4ab9-a70f-0da0c89cft3l";<NEW_LINE>final OffsetDateTime startTime = OffsetDateTime.parse("2020-01-01T00:00:00Z");<NEW_LINE>final OffsetDateTime endTime = OffsetDateTime.parse("2020-09-09T00:00:00Z");<NEW_LINE>final MetricChangePointFeedback metricChangePointFeedback = new MetricChangePointFeedback(startTime, endTime, ChangePointValue.AUTO_DETECT);<NEW_LINE>final Response<MetricFeedback> metricFeedbackResponse = metricsAdvisorClient.addFeedbackWithResponse(metricId, metricChangePointFeedback, Context.NONE);<NEW_LINE>System.out.printf("Data Feed Metric feedback creation operation status %s%n", metricFeedbackResponse.getStatusCode());<NEW_LINE>MetricChangePointFeedback createdMetricChangePointFeedback = (MetricChangePointFeedback) metricFeedbackResponse.getValue();<NEW_LINE>System.out.printf("Data Feed Metric feedback Id: %s%n", createdMetricChangePointFeedback.getId());<NEW_LINE>System.out.printf("Data Feed Metric feedback change point value: %s%n", createdMetricChangePointFeedback.getChangePointValue().toString());<NEW_LINE>System.out.printf("Data Feed Metric feedback start time: %s%n", createdMetricChangePointFeedback.getStartTime());<NEW_LINE>System.out.printf("Data Feed Metric feedback end time: %s%n", createdMetricChangePointFeedback.getEndTime());<NEW_LINE>System.out.printf("Data Feed Metric feedback associated dimension filter: %s%n", createdMetricChangePointFeedback.<MASK><NEW_LINE>// END: com.azure.ai.metricsadvisor.MetricsAdvisorClient.addFeedbackWithResponse#String-MetricFeedback-Context<NEW_LINE>}
getDimensionFilter().asMap());
327,782
protected InputStream inputStream(String name) throws java.io.FileNotFoundException {<NEW_LINE>InputStream is = null;<NEW_LINE>try {<NEW_LINE>synchronized (closeSync) {<NEW_LINE>JarFile j = reOpenJarFile();<NEW_LINE>if (j != null) {<NEW_LINE>JarEntry je = j.getJarEntry(name);<NEW_LINE>if (je != null) {<NEW_LINE>if (je.getSize() < MEM_STREAM_SIZE) {<NEW_LINE>is = getMemInputStream(j, je);<NEW_LINE>} else {<NEW_LINE>is = getTemporaryInputStream(j, je, (strongCache != null));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (java.io.FileNotFoundException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (IOException e) {<NEW_LINE>FileNotFoundException fnfe = new <MASK><NEW_LINE>fnfe.initCause(e);<NEW_LINE>throw fnfe;<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>FileNotFoundException fnfe = new FileNotFoundException(root.getAbsolutePath());<NEW_LINE>fnfe.initCause(e);<NEW_LINE>throw fnfe;<NEW_LINE>} finally {<NEW_LINE>closeCurrentRoot(false);<NEW_LINE>}<NEW_LINE>if (is == null) {<NEW_LINE>throw new java.io.FileNotFoundException(name);<NEW_LINE>}<NEW_LINE>return is;<NEW_LINE>}
FileNotFoundException(root.getAbsolutePath());
818,482
public static CreateKeywordResponse unmarshall(CreateKeywordResponse createKeywordResponse, UnmarshallerContext _ctx) {<NEW_LINE>createKeywordResponse.setRequestId(_ctx.stringValue("CreateKeywordResponse.RequestId"));<NEW_LINE>createKeywordResponse.setSuccessCount(_ctx.integerValue("CreateKeywordResponse.SuccessCount"));<NEW_LINE>List<String> invalidKeywordList = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("CreateKeywordResponse.InvalidKeywordList.Length"); i++) {<NEW_LINE>invalidKeywordList.add(_ctx.stringValue<MASK><NEW_LINE>}<NEW_LINE>createKeywordResponse.setInvalidKeywordList(invalidKeywordList);<NEW_LINE>List<ValidKeyword> validKeywordList = new ArrayList<ValidKeyword>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("CreateKeywordResponse.validKeywordList.Length"); i++) {<NEW_LINE>ValidKeyword validKeyword = new ValidKeyword();<NEW_LINE>validKeyword.setId(_ctx.integerValue("CreateKeywordResponse.validKeywordList[" + i + "].id"));<NEW_LINE>validKeyword.setKeyword(_ctx.stringValue("CreateKeywordResponse.validKeywordList[" + i + "].keyword"));<NEW_LINE>validKeywordList.add(validKeyword);<NEW_LINE>}<NEW_LINE>createKeywordResponse.setValidKeywordList(validKeywordList);<NEW_LINE>return createKeywordResponse;<NEW_LINE>}
("CreateKeywordResponse.InvalidKeywordList[" + i + "]"));
125,723
public void onActivityResult(int requestCode, int resultCode, Intent data) {<NEW_LINE>if (requestCode == SELECT_PROFILE_BG) {<NEW_LINE>if (resultCode == RESULT_OK) {<NEW_LINE>if (data != null && data.getData() != null) {<NEW_LINE>// Compute the bg size<NEW_LINE>int bgWidth = ScreenHelper.getScreenWidth(this);<NEW_LINE>int bgHeight = getResources().getDimensionPixelOffset(R.dimen.top_bar_height);<NEW_LINE>UCrop.Options options = new UCrop.Options();<NEW_LINE>options.setToolbarColor(ThemeManager.getInstance().getThemeMainColor(this));<NEW_LINE>options.setStatusBarColor(ThemeManager.getInstance().getThemeDarkColor(this));<NEW_LINE>UCrop.of(data.getData(), Uri.fromFile(new File(tempFileManager.getDir() + "/" + FileManager.createRandomFileName()))).withMaxResultSize(bgWidth, bgHeight).withOptions(options).withAspectRatio(bgWidth, bgHeight).start(this);<NEW_LINE>} else {<NEW_LINE>Toast.makeText(this, getString(R.string.toast_photo_intent_error), Toast.LENGTH_LONG).show();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (requestCode == UCrop.REQUEST_CROP) {<NEW_LINE>if (resultCode == RESULT_OK) {<NEW_LINE>if (data != null) {<NEW_LINE>final Uri <MASK><NEW_LINE>IV_setting_profile_bg.setImageBitmap(BitmapFactory.decodeFile(resultUri.getPath()));<NEW_LINE>profileBgFileName = FileManager.getFileNameByUri(this, resultUri);<NEW_LINE>isAddNewProfileBg = true;<NEW_LINE>} else {<NEW_LINE>Toast.makeText(this, getString(R.string.toast_crop_profile_banner_fail), Toast.LENGTH_LONG).show();<NEW_LINE>// sample error<NEW_LINE>// final Throwable cropError = UCrop.getError(data);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
resultUri = UCrop.getOutput(data);
1,720,619
private void initCurrent() {<NEW_LINE>currentPlugins = new HashSet<CordovaPlugin>();<NEW_LINE>log(getCordovaCommand() + " plugins ");<NEW_LINE>ExecTask exec = (ExecTask) getProject().createTask("exec");<NEW_LINE>final Environment.Variable variable = new Environment.Variable();<NEW_LINE>final String key = getProject().getProperty("cordova.path.key");<NEW_LINE>variable.setKey(key);<NEW_LINE>final String val = getProject().getProperty("cordova.path.value");<NEW_LINE>variable.setValue(val);<NEW_LINE>exec.addEnv(variable);<NEW_LINE>exec.setResolveExecutable(true);<NEW_LINE>exec.setSearchPath(true);<NEW_LINE>exec.setExecutable(getCordovaCommand());<NEW_LINE>exec.createArg().setValue("plugins");<NEW_LINE>exec.setOutputproperty("cordova.current.plugins");<NEW_LINE>exec.execute();<NEW_LINE>String plugins = getProject().getProperty("cordova.current.plugins");<NEW_LINE>if (compareCordovaVersion("3.5.0") >= 0) {<NEW_LINE>try {<NEW_LINE>BufferedReader r = new <MASK><NEW_LINE>String line;<NEW_LINE>while ((line = r.readLine()) != null) {<NEW_LINE>if (line.startsWith("No plugins added")) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>currentPlugins.add(new CordovaPlugin(line.substring(0, line.indexOf(" ")), ""));<NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>log(ex, Project.MSG_ERR);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>final int startPar = plugins.indexOf("[");<NEW_LINE>if (startPar < 0) {<NEW_LINE>// empty<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>plugins = plugins.substring(startPar + 1, plugins.lastIndexOf("]")).trim();<NEW_LINE>StringTokenizer tokenizer = new StringTokenizer(plugins, ",");<NEW_LINE>while (tokenizer.hasMoreTokens()) {<NEW_LINE>String name = tokenizer.nextToken().trim();<NEW_LINE>currentPlugins.add(new CordovaPlugin(name.substring(name.indexOf("'") + 1, name.lastIndexOf("'")), ""));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
BufferedReader(new StringReader(plugins));
1,318,797
public static InstanceList convert(Instance inst, Noop alphabetsPipe) {<NEW_LINE>InstanceList ret = new InstanceList(alphabetsPipe);<NEW_LINE>Object obj = inst.getData();<NEW_LINE>assert (obj instanceof FeatureVectorSequence);<NEW_LINE>FeatureVectorSequence fvs = (FeatureVectorSequence) obj;<NEW_LINE>LabelSequence ls = (LabelSequence) inst.getTarget();<NEW_LINE>assert (fvs.size() == ls.size());<NEW_LINE>Object instName = (inst.getName() == null ? "NONAME" : inst.getName());<NEW_LINE>for (int j = 0; j < fvs.size(); j++) {<NEW_LINE>FeatureVector fv = fvs.getFeatureVector(j);<NEW_LINE>int[] indices = fv.getIndices();<NEW_LINE>FeatureVector data = new AugmentableFeatureVector(alphabetsPipe.getDataAlphabet(), indices, fv.<MASK><NEW_LINE>Labeling target = ls.getLabelAtPosition(j);<NEW_LINE>String name = instName.toString() + "_@_POS_" + (j + 1);<NEW_LINE>Object source = inst.getSource();<NEW_LINE>Instance toAdd = alphabetsPipe.pipe(new Instance(data, target, name, source));<NEW_LINE>ret.add(toAdd);<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
getValues(), indices.length);
1,269,451
public List<Object> $basicList(String selector, Field field) throws Exception {<NEW_LINE>List<Object> list = new ArrayList<Object>();<NEW_LINE>Elements els = $(selector);<NEW_LINE>for (Element el : els) {<NEW_LINE>if (field.isAnnotationPresent(Text.class)) {<NEW_LINE>// @Text<NEW_LINE>Text text = field.getAnnotation(Text.class);<NEW_LINE>list.add(Conversion.getValue(field.getType(), $text(el, text.own())));<NEW_LINE>} else if (field.isAnnotationPresent(Image.class)) {<NEW_LINE>// @Image<NEW_LINE>Image image = field.getAnnotation(Image.class);<NEW_LINE>String imageSrc = $image(el, image.value());<NEW_LINE>list.add(imageSrc);<NEW_LINE>} else if (field.isAnnotationPresent(Href.class)) {<NEW_LINE>// @Href<NEW_LINE>Href href = field.getAnnotation(Href.class);<NEW_LINE>String url = $href(el, href.value());<NEW_LINE>list.add(url);<NEW_LINE>} else if (field.isAnnotationPresent(Attr.class)) {<NEW_LINE>// @Attr<NEW_LINE>Attr attr = field.getAnnotation(Attr.class);<NEW_LINE>String name = attr.value();<NEW_LINE>list.add(Conversion.getValue(field.getType(), $attr(el, name)));<NEW_LINE>} else if (field.isAnnotationPresent(Html.class)) {<NEW_LINE>// @Html<NEW_LINE>Html html = field.getAnnotation(Html.class);<NEW_LINE>list.add(html.outer() ? el.outerHtml() : el.html());<NEW_LINE>} else {<NEW_LINE>// Other<NEW_LINE>list.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>}
add(el.html());
143,782
private void dealRecord(CSVRecord record, int rowIndex) {<NEW_LINE>Map<Integer, Cell> cellMap = new LinkedHashMap<>();<NEW_LINE>Iterator<String> cellIterator = record.iterator();<NEW_LINE>int columnIndex = 0;<NEW_LINE>while (cellIterator.hasNext()) {<NEW_LINE>String cellString = cellIterator.next();<NEW_LINE>ReadCellData<String> readCellData = new ReadCellData<>();<NEW_LINE>readCellData.setRowIndex(rowIndex);<NEW_LINE>readCellData.setColumnIndex(columnIndex);<NEW_LINE>// csv is an empty string of whether <code>,,</code> is read or <code>,"",</code><NEW_LINE>if (StringUtils.isNotBlank(cellString)) {<NEW_LINE>readCellData.setType(CellDataTypeEnum.STRING);<NEW_LINE>readCellData.setStringValue(cellString);<NEW_LINE>} else {<NEW_LINE>readCellData.setType(CellDataTypeEnum.EMPTY);<NEW_LINE>}<NEW_LINE>cellMap.put(columnIndex++, readCellData);<NEW_LINE>}<NEW_LINE>RowTypeEnum rowType = MapUtils.isEmpty(cellMap) <MASK><NEW_LINE>ReadRowHolder readRowHolder = new ReadRowHolder(rowIndex, rowType, csvReadContext.readWorkbookHolder().getGlobalConfiguration(), cellMap);<NEW_LINE>csvReadContext.readRowHolder(readRowHolder);<NEW_LINE>csvReadContext.csvReadSheetHolder().setCellMap(cellMap);<NEW_LINE>csvReadContext.csvReadSheetHolder().setRowIndex(rowIndex);<NEW_LINE>csvReadContext.analysisEventProcessor().endRow(csvReadContext);<NEW_LINE>}
? RowTypeEnum.EMPTY : RowTypeEnum.DATA;
838,630
static double powerSeries(double a, double b, double x) throws ArithmeticException {<NEW_LINE>double s, t, u, v, n, t1, z, ai;<NEW_LINE>ai = 1.0 / a;<NEW_LINE>u = (1.0 - b) * x;<NEW_LINE>v = u / (a + 1.0);<NEW_LINE>t1 = v;<NEW_LINE>t = u;<NEW_LINE>n = 2.0;<NEW_LINE>s = 0.0;<NEW_LINE>z = MACHEP * ai;<NEW_LINE>while (Math.abs(v) > z) {<NEW_LINE>u = (<MASK><NEW_LINE>t *= u;<NEW_LINE>v = t / (a + n);<NEW_LINE>s += v;<NEW_LINE>n += 1.0;<NEW_LINE>}<NEW_LINE>s += t1;<NEW_LINE>s += ai;<NEW_LINE>u = a * Math.log(x);<NEW_LINE>if ((a + b) < MAXGAM && Math.abs(u) < MAXLOG) {<NEW_LINE>t = GammaFunctions.gamma(a + b) / (GammaFunctions.gamma(a) * GammaFunctions.gamma(b));<NEW_LINE>s = s * t * Math.pow(x, a);<NEW_LINE>} else {<NEW_LINE>t = GammaFunctions.logGamma(a + b) - GammaFunctions.logGamma(a) - GammaFunctions.logGamma(b) + u + Math.log(s);<NEW_LINE>if (t < MINLOG)<NEW_LINE>s = 0.0;<NEW_LINE>else<NEW_LINE>s = Math.exp(t);<NEW_LINE>}<NEW_LINE>return s;<NEW_LINE>}
n - b) * x / n;
501,388
public byte[] encrypt(byte[] key, byte[] data) {<NEW_LINE>if (key == null) {<NEW_LINE>LOGGER.severe(Common.addTag("Key is null"));<NEW_LINE>return new byte[0];<NEW_LINE>}<NEW_LINE>if (data == null) {<NEW_LINE>LOGGER.severe(Common.addTag("data is null"));<NEW_LINE>return new byte[0];<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>byte[] iVec = new byte[I_VEC_LEN];<NEW_LINE>SecureRandom secureRandom = Common.getSecureRandom();<NEW_LINE>secureRandom.nextBytes(iVec);<NEW_LINE>SecretKeySpec skeySpec = new SecretKeySpec(key, ALGORITHM);<NEW_LINE>Cipher cipher = Cipher.getInstance(cipherMod);<NEW_LINE>IvParameterSpec iv = new IvParameterSpec(iVec);<NEW_LINE>cipher.init(<MASK><NEW_LINE>byte[] encrypted = cipher.doFinal(data);<NEW_LINE>byte[] encryptedAddIv = new byte[encrypted.length + iVec.length];<NEW_LINE>System.arraycopy(iVec, 0, encryptedAddIv, 0, iVec.length);<NEW_LINE>System.arraycopy(encrypted, 0, encryptedAddIv, iVec.length, encrypted.length);<NEW_LINE>return encryptedAddIv;<NEW_LINE>} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException ex) {<NEW_LINE>LOGGER.severe(Common.addTag("catch NoSuchAlgorithmException or " + "NoSuchPaddingException or InvalidKeyException or InvalidAlgorithmParameterException or " + "IllegalBlockSizeException or BadPaddingException: " + ex.getMessage()));<NEW_LINE>return new byte[0];<NEW_LINE>}<NEW_LINE>}
Cipher.ENCRYPT_MODE, skeySpec, iv);
1,223,417
public void fileChanged(FileEvent ev) {<NEW_LINE>if (isOurs(ev)) {<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>LOG.fine("ModuleList: got expected modification " + ev);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FileObject fo = ev.getFile();<NEW_LINE>String name = fo.getName();<NEW_LINE><MASK><NEW_LINE>if ("xml".equals(ext)) {<NEW_LINE>// NOI18N<NEW_LINE>// Changed module.<NEW_LINE>String codenamebase = name.replace('-', '.');<NEW_LINE>DiskStatus status = statuses.get(codenamebase);<NEW_LINE>LOG.fine("ModuleList: outside file modification event for " + codenamebase + ": " + ev);<NEW_LINE>if (status != null) {<NEW_LINE>status.dirty = true;<NEW_LINE>} else {<NEW_LINE>// XXX should this ever happen?<NEW_LINE>}<NEW_LINE>runme();<NEW_LINE>} else if ("ser".equals(ext)) {<NEW_LINE>// NOI18N<NEW_LINE>// XXX handle changes of installers?? or not<NEW_LINE>}<NEW_LINE>// else ignore<NEW_LINE>}
String ext = fo.getExt();
48,127
public void init(Map<String, Object> params) {<NEW_LINE>tasksTable.addAction<MASK><NEW_LINE>tasksTable.addAction(EditAction.create(tasksTable));<NEW_LINE>tasksTable.addAction(RemoveAction.create(tasksTable));<NEW_LINE>Action editAction = tasksTable.getActionNN(EditAction.ACTION_ID);<NEW_LINE>editAction.setEnabled(false);<NEW_LINE>Action removeAction = tasksTable.getActionNN(RemoveAction.ACTION_ID);<NEW_LINE>removeAction.setEnabled(false);<NEW_LINE>activateBtn.setAction(new BaseAction("activate").withCaption(getMessage("activate")).withHandler(e -> {<NEW_LINE>Set<ScheduledTask> tasks = tasksTable.getSelected();<NEW_LINE>service.setActive(tasks, !BooleanUtils.isTrue(tasks.iterator().next().getActive()));<NEW_LINE>tasksDs.refresh();<NEW_LINE>}));<NEW_LINE>activateBtn.setEnabled(false);<NEW_LINE>ShowExecutionsAction showExecutionsAction = new ShowExecutionsAction();<NEW_LINE>tasksTable.addAction(showExecutionsAction);<NEW_LINE>ExecuteOnceAction executeOnceAction = new ExecuteOnceAction();<NEW_LINE>tasksTable.addAction(executeOnceAction);<NEW_LINE>tasksDs.addItemChangeListener(e -> {<NEW_LINE>ScheduledTask singleSelected = tasksTable.getSingleSelected();<NEW_LINE>Set<ScheduledTask> selected = tasksTable.getSelected().stream().filter(Objects::nonNull).collect(Collectors.toSet());<NEW_LINE>boolean isSingleSelected = selected.size() == 1;<NEW_LINE>boolean enableEdit = singleSelected != null && !BooleanUtils.isTrue(singleSelected.getActive());<NEW_LINE>editAction.setEnabled(enableEdit);<NEW_LINE>removeAction.setEnabled(checkAllTasksAreNotActive(selected));<NEW_LINE>activateBtn.setEnabled(checkAllTasksHaveSameStatus(selected));<NEW_LINE>if (singleSelected == null) {<NEW_LINE>activateBtn.setCaption(getMessage("activate"));<NEW_LINE>} else {<NEW_LINE>activateBtn.setCaption(BooleanUtils.isTrue(singleSelected.getActive()) ? getMessage("deactivate") : getMessage("activate"));<NEW_LINE>}<NEW_LINE>showExecutionsAction.setEnabled(isSingleSelected);<NEW_LINE>executeOnceAction.setEnabled(isSingleSelected && enableEdit);<NEW_LINE>});<NEW_LINE>}
(CreateAction.create(tasksTable));
164,181
public void calculateLight() {<NEW_LINE>if (!world.isRemote) {<NEW_LINE>boolean isPowered = false;<NEW_LINE>for (NNIterator<BlockPos> iterator = parents.iterator(); !isPowered && iterator.hasNext(); ) {<NEW_LINE>BlockPos parent = iterator.next();<NEW_LINE>TileElectricLight light = BlockEnder.getAnyTileEntitySafe(world, parent, TileElectricLight.class);<NEW_LINE>if (light != null) {<NEW_LINE>isPowered = light.providesPoweredLight();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>IBlockState lnbs = world.getBlockState(pos);<NEW_LINE>if (lnbs.getBlock() != block_light_node.getBlockNN()) {<NEW_LINE>if (lnbs.getBlock() == Blocks.AIR) {<NEW_LINE>lnbs = block_light_node.getBlockNN().getDefaultState();<NEW_LINE>} else {<NEW_LINE>if (world.getTileEntity(pos) == this) {<NEW_LINE>world.removeTileEntity(pos);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>IBlockState lnbsnew = lnbs.withProperty(BlockLightNode.ACTIVE, isPowered);<NEW_LINE>world.setBlockState(pos, lnbsnew, Constants.BlockFlags.SEND_TO_CLIENTS);<NEW_LINE>world.notifyBlockUpdate(pos, lnbs, <MASK><NEW_LINE>world.checkLightFor(EnumSkyBlock.BLOCK, pos);<NEW_LINE>}<NEW_LINE>}
lnbsnew, Constants.BlockFlags.DEFAULT);
519,961
public ListThingGroupsResult listThingGroups(ListThingGroupsRequest listThingGroupsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listThingGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListThingGroupsRequest> request = null;<NEW_LINE>Response<ListThingGroupsResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new ListThingGroupsRequestMarshaller().marshall(listThingGroupsRequest);<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<ListThingGroupsResult, JsonUnmarshallerContext> unmarshaller = new ListThingGroupsResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<ListThingGroupsResult> responseHandler = new JsonResponseHandler<ListThingGroupsResult>(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.RequestMarshallTime);
113,525
private void addAllEntriesForKeyInSegment(List<IndexEntry> entries, IndexSegment indexSegment, IndexEntry entry) throws StoreException {<NEW_LINE>logger.trace("Fetching related entries of a blob with entry {} in index segment with start offset {} in {} " + "because they need to be retained", entry, indexSegment.getStartOffset(), storeId);<NEW_LINE>NavigableSet<IndexValue> values = indexSegment.<MASK><NEW_LINE>if (values.size() > 1) {<NEW_LINE>// we are using a multivalued index segment. Any related values will be in this set<NEW_LINE>values.forEach(valueFromSeg -> entries.add(new IndexEntry(entry.getKey(), valueFromSeg)));<NEW_LINE>} else {<NEW_LINE>// in a non multi valued segment, there can only be PUTs and DELETEs in the same segment<NEW_LINE>entries.add(entry);<NEW_LINE>if (entry.getValue().isFlagSet(IndexValue.Flags.Delete_Index)) {<NEW_LINE>IndexValue putValue = getPutValueFromDeleteEntry(entry.getKey(), entry.getValue(), indexSegment);<NEW_LINE>if (putValue != null) {<NEW_LINE>entries.add(new IndexEntry(entry.getKey(), putValue));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
find(entry.getKey());
479,114
public boolean visit(EnumDeclaration node) {<NEW_LINE>handleBracedCode(node, node.getName(), this.options.<MASK><NEW_LINE>handleBodyDeclarations(node.bodyDeclarations());<NEW_LINE>List<EnumConstantDeclaration> enumConstants = node.enumConstants();<NEW_LINE>for (int i = 0; i < enumConstants.size(); i++) {<NEW_LINE>EnumConstantDeclaration declaration = enumConstants.get(i);<NEW_LINE>if (declaration.getJavadoc() != null)<NEW_LINE>this.tm.firstTokenIn(declaration, TokenNameCOMMENT_JAVADOC).breakBefore();<NEW_LINE>if (declaration.getAnonymousClassDeclaration() != null && i < enumConstants.size() - 1)<NEW_LINE>this.tm.firstTokenAfter(declaration, TokenNameCOMMA).breakAfter();<NEW_LINE>}<NEW_LINE>// put breaks after semicolons<NEW_LINE>int index = enumConstants.isEmpty() ? this.tm.firstIndexAfter(node.getName(), TokenNameLBRACE) + 1 : this.tm.firstIndexAfter(enumConstants.get(enumConstants.size() - 1), -1);<NEW_LINE>for (; ; index++) {<NEW_LINE>Token token = this.tm.get(index);<NEW_LINE>if (token.isComment())<NEW_LINE>continue;<NEW_LINE>if (token.tokenType == TokenNameSEMICOLON)<NEW_LINE>token.breakAfter();<NEW_LINE>else<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>this.declarationModifierVisited = false;<NEW_LINE>return true;<NEW_LINE>}
brace_position_for_enum_declaration, this.options.indent_body_declarations_compare_to_enum_declaration_header);
1,216,735
private void fillCacheFromInvalidatedRows(Range maxCacheRange) {<NEW_LINE>if (invalidatedRows == null || invalidatedRows.isEmpty()) {<NEW_LINE>// No old invalid cache available<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Range potentialCache = maxCacheRange.partitionWith(cached)[2];<NEW_LINE>int start = potentialCache.getStart();<NEW_LINE>int last = start;<NEW_LINE>try {<NEW_LINE>if (potentialCache.isEmpty() || invalidatedRows.containsKey(start - 1)) {<NEW_LINE>// Cache is already full or invalidated rows contains unexpected<NEW_LINE>// indices.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (int i = start; i < potentialCache.getEnd(); ++i) {<NEW_LINE>if (!invalidatedRows.containsKey(i)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>T row = invalidatedRows.get(i);<NEW_LINE>indexToRowMap.put(i, row);<NEW_LINE>keyToIndexMap.put(getRowKey(row), i);<NEW_LINE>last = i;<NEW_LINE>}<NEW_LINE>// Cache filled from invalidated rows. Can continue as if it was<NEW_LINE>// never invalidated.<NEW_LINE>invalidatedRows = null;<NEW_LINE>} finally {<NEW_LINE>// Update cache range and clean up<NEW_LINE>if (invalidatedRows != null) {<NEW_LINE>invalidatedRows.clear();<NEW_LINE>}<NEW_LINE>Range updated = Range.<MASK><NEW_LINE>cached = cached.combineWith(updated);<NEW_LINE>dataChangeHandlers.forEach(dch -> dch.dataUpdated(updated.getStart(), updated.length()));<NEW_LINE>}<NEW_LINE>}
between(start, last + 1);
644,533
public CameraUniversalOmni createCameraModel() {<NEW_LINE>var model = new CameraUniversalOmni(4);<NEW_LINE>model.width = selectWidth.vint();<NEW_LINE>model.height = selectHeight.vint();<NEW_LINE>model.fx = model.width * selectFY.vdouble() / 100.0;<NEW_LINE>model.fy = model.width * selectFY.vdouble() / 100.0;<NEW_LINE>model.cx = model.width <MASK><NEW_LINE>model.cy = model.height * selectFY.vdouble() / 100.0;<NEW_LINE>model.skew = selectSkew.vdouble();<NEW_LINE>model.t1 = selectT1.vdouble();<NEW_LINE>model.t2 = selectT2.vdouble();<NEW_LINE>model.radial[0] = selectR1.vdouble();<NEW_LINE>model.radial[1] = selectR2.vdouble();<NEW_LINE>model.radial[2] = selectR3.vdouble();<NEW_LINE>model.radial[3] = selectR4.vdouble();<NEW_LINE>model.mirrorOffset = selectMirror.vdouble();<NEW_LINE>return model;<NEW_LINE>}
* selectFY.vdouble() / 100.0;
267,414
private static void populateStandardProperties(DbInfo.Builder builder, Map<?, ?> props) {<NEW_LINE>if (props != null && !props.isEmpty()) {<NEW_LINE>if (props.containsKey("user")) {<NEW_LINE>builder.user((String<MASK><NEW_LINE>}<NEW_LINE>if (props.containsKey("databasename")) {<NEW_LINE>builder.db((String) props.get("databasename"));<NEW_LINE>}<NEW_LINE>if (props.containsKey("databaseName")) {<NEW_LINE>builder.db((String) props.get("databaseName"));<NEW_LINE>}<NEW_LINE>if (props.containsKey("servername")) {<NEW_LINE>builder.host((String) props.get("servername"));<NEW_LINE>}<NEW_LINE>if (props.containsKey("serverName")) {<NEW_LINE>builder.host((String) props.get("serverName"));<NEW_LINE>}<NEW_LINE>if (props.containsKey("portnumber")) {<NEW_LINE>String portNumber = (String) props.get("portnumber");<NEW_LINE>try {<NEW_LINE>builder.port(Integer.parseInt(portNumber));<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>if (logger.isLoggable(FINE)) {<NEW_LINE>logger.log(FINE, "Error parsing portnumber property: " + portNumber, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (props.containsKey("portNumber")) {<NEW_LINE>String portNumber = (String) props.get("portNumber");<NEW_LINE>try {<NEW_LINE>builder.port(Integer.parseInt(portNumber));<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>if (logger.isLoggable(FINE)) {<NEW_LINE>logger.log(FINE, "Error parsing portNumber property: " + portNumber, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
) props.get("user"));
1,535,947
public static Drawable createImageDrawable(@Nullable Drawable original, @NonNull ImageView.ScaleType scaleType, @Nullable float[] borderRadius, int vWidth, int vHeight, boolean gif) {<NEW_LINE>Bitmap bm;<NEW_LINE>if (!gif && vWidth > 0 && vHeight > 0) {<NEW_LINE>if (original instanceof BitmapDrawable && (bm = ((BitmapDrawable) original).getBitmap()) != null) {<NEW_LINE>ImageDrawable imageDrawable;<NEW_LINE>imageDrawable = new ImageDrawable();<NEW_LINE>// fix android 9 image antialiasing<NEW_LINE>imageDrawable.getPaint().setFilterBitmap(true);<NEW_LINE>imageDrawable.bitmapWidth = bm.getWidth();<NEW_LINE>imageDrawable<MASK><NEW_LINE>BitmapShader bitmapShader = new BitmapShader(bm, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);<NEW_LINE>updateShaderAndSize(scaleType, vWidth, vHeight, imageDrawable, bitmapShader);<NEW_LINE>imageDrawable.getPaint().setShader(bitmapShader);<NEW_LINE>return imageDrawable;<NEW_LINE>} else if (original instanceof ImageDrawable) {<NEW_LINE>ImageDrawable imageDrawable = (ImageDrawable) original;<NEW_LINE>if (imageDrawable.getPaint() != null && imageDrawable.getPaint().getShader() instanceof BitmapShader) {<NEW_LINE>BitmapShader bitmapShader = (BitmapShader) imageDrawable.getPaint().getShader();<NEW_LINE>updateShaderAndSize(scaleType, vWidth, vHeight, imageDrawable, bitmapShader);<NEW_LINE>return imageDrawable;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return original;<NEW_LINE>}
.bitmapHeight = bm.getHeight();
1,378,769
private void visit(FieldNode value) {<NEW_LINE>// Visit definition<NEW_LINE>FieldDefinitionAST def = new FieldDefinitionAST(0, 0, new NameAST(0, 0, value.name), new DescAST(0<MASK><NEW_LINE>for (AccessFlag flag : AccessFlag.values()) if (flag.getTypes().contains(AccessFlag.Type.FIELD) && (value.access & flag.getMask()) == flag.getMask())<NEW_LINE>def.getModifiers().add(new DefinitionModifierAST(0, 0, flag.getName().toUpperCase()));<NEW_LINE>out.add(def.print());<NEW_LINE>// Visit signature<NEW_LINE>if (value.signature != null)<NEW_LINE>out.add("SIGNATURE " + value.signature);<NEW_LINE>// Visit default-value<NEW_LINE>if (value.value != null) {<NEW_LINE>StringBuilder line = new StringBuilder("VALUE ");<NEW_LINE>Object o = value.value;<NEW_LINE>if (o instanceof String) {<NEW_LINE>String str = o.toString();<NEW_LINE>str = str.replace("\n", "\\n").replace("\r", "\\r").replace("\t", "\\t");<NEW_LINE>line.append('"').append(str).append('"');<NEW_LINE>} else if (o instanceof Long)<NEW_LINE>line.append(o).append('L');<NEW_LINE>else if (o instanceof Double) {<NEW_LINE>line.append(o);<NEW_LINE>if (!(o.equals(Double.POSITIVE_INFINITY) || o.equals(Double.NEGATIVE_INFINITY) || o.equals(Double.NaN)))<NEW_LINE>line.append('D');<NEW_LINE>} else if (o instanceof Float) {<NEW_LINE>// Float has the same edge case items as double, but we want to denote them with<NEW_LINE>// "F" suffix.<NEW_LINE>line.append(o).append('F');<NEW_LINE>} else<NEW_LINE>line.append(o);<NEW_LINE>out.add(line.toString());<NEW_LINE>}<NEW_LINE>}
, 0, value.desc));
1,367,185
public String charge(final ICalloutField calloutField) {<NEW_LINE>final de.metas.adempiere.model.I_C_InvoiceLine invoiceLine = calloutField.getModel(de.metas.adempiere.model.I_C_InvoiceLine.class);<NEW_LINE>final int chargeID = invoiceLine.getC_Charge_ID();<NEW_LINE>if (chargeID <= 0) {<NEW_LINE>return NO_ERROR;<NEW_LINE>}<NEW_LINE>// No Product defined<NEW_LINE>if (invoiceLine.getM_Product_ID() > 0) {<NEW_LINE>invoiceLine.setC_Charge_ID(-1);<NEW_LINE>return "ChargeExclusively";<NEW_LINE>}<NEW_LINE>invoiceLine.setM_AttributeSetInstance(null);<NEW_LINE>invoiceLine.setS_ResourceAssignment_ID(-1);<NEW_LINE>// EA<NEW_LINE>invoiceLine.setC_UOM_ID(UomId.EACH.getRepoId());<NEW_LINE>// 07216: Make sure price UOM is also filled.<NEW_LINE>invoiceLine.setPrice_UOM_ID(UomId.EACH.getRepoId());<NEW_LINE>calloutField.putContext(CTX_DiscountSchema, false);<NEW_LINE>final String sql = "SELECT ChargeAmt FROM C_Charge WHERE C_Charge_ID=?";<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.<MASK><NEW_LINE>pstmt.setInt(1, chargeID);<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>if (rs.next()) {<NEW_LINE>invoiceLine.setPriceEntered(rs.getBigDecimal(1));<NEW_LINE>invoiceLine.setPriceActual(rs.getBigDecimal(1));<NEW_LINE>invoiceLine.setPriceLimit(BigDecimal.ZERO);<NEW_LINE>invoiceLine.setPriceList(BigDecimal.ZERO);<NEW_LINE>invoiceLine.setDiscount(BigDecimal.ZERO);<NEW_LINE>}<NEW_LINE>} catch (final SQLException e) {<NEW_LINE>log.error(sql + e);<NEW_LINE>return e.getLocalizedMessage();<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>rs = null;<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>return tax(calloutField);<NEW_LINE>}
prepareStatement(sql, ITrx.TRXNAME_None);
1,654,832
private RevolutPaymentExport toRevolutExportRequest(@NonNull final I_C_PaySelectionLine line) {<NEW_LINE>final RevolutPaymentExport.RevolutPaymentExportBuilder revolutPaymentExportBuilder = RevolutPaymentExport.builder();<NEW_LINE>final I_C_Invoice invoice = invoiceDAO.getByIdInTrx(InvoiceId.ofRepoId(line.getC_Invoice_ID()));<NEW_LINE>final BPartnerId bPartnerId = BPartnerId.ofRepoId(invoice.getC_BPartner_ID());<NEW_LINE>final I_C_BPartner bPartner = bpartnerBL.getById(bPartnerId);<NEW_LINE>revolutPaymentExportBuilder.name(bPartner.getName());<NEW_LINE>revolutPaymentExportBuilder.recipientType(bPartner.isCompany() ? RecipientType.COMPANY : RecipientType.INDIVIDUAL);<NEW_LINE>final BPartnerLocationId bPartnerLocationId = BPartnerLocationId.ofRepoId(bPartnerId, invoice.getC_BPartner_Location_ID());<NEW_LINE>final I_C_BPartner_Location bPartnerLocation = Optional.ofNullable(bpartnerDAO.getBPartnerLocationByIdInTrx(bPartnerLocationId)).orElseThrow(() -> new AdempiereException("No bPartnerLocation found for bPartnerLocationId").appendParametersToMessage().setParameter("bPartnerLocationId", bPartnerLocationId));<NEW_LINE>final I_C_Location location = locationDAO.getById(LocationId.ofRepoId(bPartnerLocation.getC_Location_ID()));<NEW_LINE>attachLocation(revolutPaymentExportBuilder, location);<NEW_LINE>final BankAccountId bankAccountId = BankAccountId.ofRepoIdOrNull((line.getC_BP_BankAccount_ID()));<NEW_LINE>if (bankAccountId == null) {<NEW_LINE>throw new AdempiereException("Bank account missing from paySelectionLine").appendParametersToMessage().setParameter("paySelectionLineId", line.getC_PaySelectionLine_ID());<NEW_LINE>}<NEW_LINE>final BankAccount bpBankAccount = Optional.ofNullable(bpBankAccountDAO.getById(bankAccountId)).orElseThrow(() -> new AdempiereException("No bankAccount found for id").appendParametersToMessage().setParameter("bankAccountId", bankAccountId));<NEW_LINE>if (bpBankAccount.getBankId() != null) {<NEW_LINE>final Bank bank = bankRepository.getById(bpBankAccount.getBankId());<NEW_LINE>if (bank.getLocationId() != null) {<NEW_LINE>final CountryId countryId = locationDAO.getCountryIdByLocationId(bank.getLocationId());<NEW_LINE>revolutPaymentExportBuilder.recipientBankCountryId(countryId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final CurrencyCode currencyCode = currencyDAO.getCurrencyCodeById(bpBankAccount.getCurrencyId());<NEW_LINE>final Amount amount = Amount.of(line.getPayAmt(), currencyCode);<NEW_LINE>final TableRecordReference recordRef = TableRecordReference.of(I_C_PaySelectionLine.<MASK><NEW_LINE>return revolutPaymentExportBuilder.recordReference(recordRef).orgId(OrgId.ofRepoId(line.getAD_Org_ID())).amount(amount).paymentReference(line.getReference()).accountNo(bpBankAccount.getAccountNo()).routingNo(bpBankAccount.getRoutingNo()).IBAN(bpBankAccount.getIBAN()).BIC(bpBankAccount.getRoutingNo()).build();<NEW_LINE>}
Table_Name, line.getC_PaySelection_ID());
1,348,643
private List<Future> schedule(Settings settings) {<NEW_LINE>List<Future> futures = new LinkedList<>();<NEW_LINE>if (threadPoolExecutor != null) {<NEW_LINE>logger.info("already scheduled");<NEW_LINE>return futures;<NEW_LINE>}<NEW_LINE>String[] schedule = settings.getAsArray("schedule");<NEW_LINE>Long seconds = settings.getAsTime("interval", TimeValue.timeValueSeconds(0)).seconds();<NEW_LINE>if (schedule != null && schedule.length > 0) {<NEW_LINE><MASK><NEW_LINE>CronThreadPoolExecutor cronThreadPoolExecutor = new CronThreadPoolExecutor(settings.getAsInt("threadpoolsize", 1));<NEW_LINE>for (String cron : schedule) {<NEW_LINE>futures.add(cronThreadPoolExecutor.schedule(thread, new CronExpression(cron)));<NEW_LINE>}<NEW_LINE>this.threadPoolExecutor = cronThreadPoolExecutor;<NEW_LINE>logger.info("scheduled with cron expressions {}", Arrays.asList(schedule));<NEW_LINE>} else if (seconds > 0L) {<NEW_LINE>Thread thread = new Thread(this);<NEW_LINE>ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(settings.getAsInt("threadpoolsize", 1));<NEW_LINE>futures.add(scheduledThreadPoolExecutor.scheduleAtFixedRate(thread, 0L, seconds, TimeUnit.SECONDS));<NEW_LINE>this.threadPoolExecutor = scheduledThreadPoolExecutor;<NEW_LINE>logger.info("scheduled at fixed rate of {} seconds", seconds);<NEW_LINE>}<NEW_LINE>return futures;<NEW_LINE>}
Thread thread = new Thread(this);
471,035
public static GetResourceConfigurationTimelineResponse unmarshall(GetResourceConfigurationTimelineResponse getResourceConfigurationTimelineResponse, UnmarshallerContext _ctx) {<NEW_LINE>getResourceConfigurationTimelineResponse.setRequestId(_ctx.stringValue("GetResourceConfigurationTimelineResponse.RequestId"));<NEW_LINE>ResourceConfigurationTimeline resourceConfigurationTimeline = new ResourceConfigurationTimeline();<NEW_LINE>resourceConfigurationTimeline.setNextToken(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.NextToken"));<NEW_LINE>resourceConfigurationTimeline.setMaxResults(_ctx.integerValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.MaxResults"));<NEW_LINE>List<ConfigurationListItem> configurationList = new ArrayList<ConfigurationListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList.Length"); i++) {<NEW_LINE>ConfigurationListItem configurationListItem = new ConfigurationListItem();<NEW_LINE>configurationListItem.setTags(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].Tags"));<NEW_LINE>configurationListItem.setAccountId(_ctx.longValue<MASK><NEW_LINE>configurationListItem.setResourceEventType(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].ResourceEventType"));<NEW_LINE>configurationListItem.setAvailabilityZone(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].AvailabilityZone"));<NEW_LINE>configurationListItem.setResourceType(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].ResourceType"));<NEW_LINE>configurationListItem.setResourceCreateTime(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].ResourceCreateTime"));<NEW_LINE>configurationListItem.setRegion(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].Region"));<NEW_LINE>configurationListItem.setCaptureTime(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].CaptureTime"));<NEW_LINE>configurationListItem.setConfigurationDiff(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].ConfigurationDiff"));<NEW_LINE>configurationListItem.setResourceId(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].ResourceId"));<NEW_LINE>configurationListItem.setResourceName(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].ResourceName"));<NEW_LINE>configurationListItem.setRelationship(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].Relationship"));<NEW_LINE>configurationListItem.setRelationshipDiff(_ctx.stringValue("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].RelationshipDiff"));<NEW_LINE>configurationList.add(configurationListItem);<NEW_LINE>}<NEW_LINE>resourceConfigurationTimeline.setConfigurationList(configurationList);<NEW_LINE>getResourceConfigurationTimelineResponse.setResourceConfigurationTimeline(resourceConfigurationTimeline);<NEW_LINE>return getResourceConfigurationTimelineResponse;<NEW_LINE>}
("GetResourceConfigurationTimelineResponse.ResourceConfigurationTimeline.ConfigurationList[" + i + "].AccountId"));
712,065
public void selectPackagePrefixByProject() {<NEW_LINE>TreeSet<String> projects = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);<NEW_LINE>Multiset<String> count = new Multiset<>();<NEW_LINE>int total = 0;<NEW_LINE>for (BugInstance b : getBugCollection().getCollection()) {<NEW_LINE>if (shouldDisplayIssueIgnoringPackagePrefixes(b)) {<NEW_LINE>TreeSet<String> projectsForThisBug = projectPackagePrefixes.getProjects(b.getPrimaryClass().getClassName());<NEW_LINE>projects.addAll(projectsForThisBug);<NEW_LINE>count.addAll(projectsForThisBug);<NEW_LINE>total++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (projects.size() == 0) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ArrayList<ProjectSelector> selectors = new ArrayList<>(projects.size() + 1);<NEW_LINE>ProjectSelector everything = new ProjectSelector("all projects", "", total);<NEW_LINE>selectors.add(everything);<NEW_LINE>for (String projectName : projects) {<NEW_LINE>ProjectPackagePrefixes.PrefixFilter filter = projectPackagePrefixes.getFilter(projectName);<NEW_LINE>selectors.add(new ProjectSelector(projectName, filter.toString(), count.getCount(projectName)));<NEW_LINE>}<NEW_LINE>ProjectSelector choice = (ProjectSelector) JOptionPane.showInputDialog(null, "Choose a project to set appropriate package prefix(es)", "Select package prefixes by package", JOptionPane.QUESTION_MESSAGE, null, selectors.toArray(), everything);<NEW_LINE>if (choice == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mainFrameTree.setFieldForPackagesToDisplayText(choice.filter);<NEW_LINE>viewFilter.setPackagesToDisplay(choice.filter);<NEW_LINE>resetViewCache();<NEW_LINE>}
JOptionPane.showMessageDialog(this, "No issues in current view");
1,739,352
private static void sendEventTwo(RegressionEnvironment env, EventRepresentationChoice eventRepresentationEnum, String id, int val) {<NEW_LINE>if (eventRepresentationEnum.isObjectArrayEvent()) {<NEW_LINE>env.sendEventObjectArray(new Object[] { id, val }, "EventTwo");<NEW_LINE>} else if (eventRepresentationEnum.isMapEvent()) {<NEW_LINE>Map<String, Object> theEvent = new LinkedHashMap<String, Object>();<NEW_LINE>theEvent.put("id", id);<NEW_LINE>theEvent.put("val", val);<NEW_LINE>env.sendEventMap(theEvent, "EventTwo");<NEW_LINE>} else if (eventRepresentationEnum.isAvroEvent()) {<NEW_LINE>Schema schema = record("name").fields().requiredString("id").requiredInt("val").endRecord();<NEW_LINE>GenericData.Record record = new GenericData.Record(schema);<NEW_LINE><MASK><NEW_LINE>record.put("val", val);<NEW_LINE>env.sendEventAvro(record, "EventTwo");<NEW_LINE>} else if (eventRepresentationEnum.isJsonEvent() || eventRepresentationEnum.isJsonProvidedClassEvent()) {<NEW_LINE>JsonObject object = new JsonObject();<NEW_LINE>object.add("id", id);<NEW_LINE>object.add("val", val);<NEW_LINE>env.sendEventJson(object.toString(), "EventTwo");<NEW_LINE>} else {<NEW_LINE>fail();<NEW_LINE>}<NEW_LINE>}
record.put("id", id);
908,909
public void process(String workID, byte[] data) {<NEW_LINE>ReplicationTarget target = DistributedWorkQueueWorkAssignerHelper.fromQueueKey(workID).getValue();<NEW_LINE>String file = new String(data, UTF_8);<NEW_LINE>log.debug("Received replication work for {} to {}", file, target);<NEW_LINE>ReplicaSystem replica;<NEW_LINE>try {<NEW_LINE>replica = getReplicaSystem(target);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Could not instantiate ReplicaSystem for {}, waiting before returning the work", target, e);<NEW_LINE>try {<NEW_LINE>// TODO configurable<NEW_LINE>Thread.sleep(5000);<NEW_LINE>} catch (InterruptedException ie) {<NEW_LINE>Thread<MASK><NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Status status;<NEW_LINE>try {<NEW_LINE>status = getStatus(file, target);<NEW_LINE>} catch (ReplicationTableOfflineException e) {<NEW_LINE>log.error("Could not look for replication record", e);<NEW_LINE>throw new IllegalStateException("Could not look for replication record", e);<NEW_LINE>} catch (InvalidProtocolBufferException e) {<NEW_LINE>log.error("Could not deserialize Status from Work section for {} and {}", file, target);<NEW_LINE>throw new RuntimeException("Could not parse Status for work record", e);<NEW_LINE>} catch (NoSuchElementException e) {<NEW_LINE>log.error("Assigned work for {} to {} but could not find work record", file, target);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>log.debug("Current status for {} replicating to {}: {}", file, target, ProtobufUtil.toString(status));<NEW_LINE>// We don't need to do anything (shouldn't have gotten this work record in the first place)<NEW_LINE>if (!StatusUtil.isWorkRequired(status)) {<NEW_LINE>log.info("Received work request for {} and {}, but it does not need replication. Ignoring...", file, target);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Sanity check that nothing bad happened and our replication source still exists<NEW_LINE>Path filePath = new Path(file);<NEW_LINE>try {<NEW_LINE>if (!doesFileExist(filePath, target)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.error("Could not determine if file exists {}", filePath, e);<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>log.debug("Replicating {} to {} using {}", filePath, target, replica.getClass().getName());<NEW_LINE>Status newStatus = replica.replicate(filePath, status, target, getHelper());<NEW_LINE>log.debug("Finished replicating {}. Original status: {}, New status: {}", filePath, status, newStatus);<NEW_LINE>}
.currentThread().interrupt();
294,861
public float evaluateMask(int tl_x, int tl_y) {<NEW_LINE>Objects.requireNonNull(o.mask);<NEW_LINE>float imageSumSq = 0;<NEW_LINE>for (int y = 0; y < o.template.height; y++) {<NEW_LINE>int imageIndex = o.image.startIndex + (tl_y + y) * o.image.stride + tl_x;<NEW_LINE>int maskIndex = o.mask.startIndex + y * o.mask.stride;<NEW_LINE>for (int x = 0; x < o.template.width; x++) {<NEW_LINE>float v = o.image.data[imageIndex++] * o.mask.data[maskIndex++];<NEW_LINE>imageSumSq += v * v;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>imageSumSq /= area;<NEW_LINE>float errorSumSq = 0.0f;<NEW_LINE>for (int y = 0; y < o.template.height; y++) {<NEW_LINE>int imageIndex = o.image.startIndex + (tl_y + y) * o.image.stride + tl_x;<NEW_LINE>int templateIndex = o.template.startIndex + y * o.template.stride;<NEW_LINE>int maskIndex = o.mask.startIndex + y * o.mask.stride;<NEW_LINE>for (int x = 0; x < o.template.width; x++) {<NEW_LINE>float mask = o.mask.data[maskIndex++];<NEW_LINE>float error = (o.image.data[imageIndex++] - o.template.<MASK><NEW_LINE>errorSumSq += error * error;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>errorSumSq /= area;<NEW_LINE>return (float) (-errorSumSq / Math.sqrt(EPS + templateSumSq * imageSumSq));<NEW_LINE>}
data[templateIndex++]) * mask;
188,223
public List<LoadBalancerBackend> listAssociatedLoadBalancerBackends() {<NEW_LINE>final List<BackendAddressPoolInner> backendRefs = this.innerModel().loadBalancerBackendAddressPools();<NEW_LINE>if (backendRefs == null) {<NEW_LINE>return Collections.unmodifiableList(new ArrayList<LoadBalancerBackend>());<NEW_LINE>}<NEW_LINE>final Map<String, LoadBalancer> loadBalancers = new HashMap<>();<NEW_LINE>final List<LoadBalancerBackend> backends = new ArrayList<>();<NEW_LINE>for (BackendAddressPoolInner backendRef : backendRefs) {<NEW_LINE>String loadBalancerId = ResourceUtils.<MASK><NEW_LINE>LoadBalancer loadBalancer = loadBalancers.get(loadBalancerId.toLowerCase(Locale.ROOT));<NEW_LINE>if (loadBalancer == null) {<NEW_LINE>loadBalancer = this.networkManager.loadBalancers().getById(loadBalancerId);<NEW_LINE>loadBalancers.put(loadBalancerId.toLowerCase(Locale.ROOT), loadBalancer);<NEW_LINE>}<NEW_LINE>String backendName = ResourceUtils.nameFromResourceId(backendRef.id());<NEW_LINE>backends.add(loadBalancer.backends().get(backendName));<NEW_LINE>}<NEW_LINE>return Collections.unmodifiableList(backends);<NEW_LINE>}
parentResourceIdFromResourceId(backendRef.id());
1,479,900
private static RemoteScreenshot[] takeCurrent(JPDADebugger debugger, DebuggerEngine engine) throws RetrievalException {<NEW_LINE>List<JPDAThread> allThreads = debugger.getThreadsCollector().getAllThreads();<NEW_LINE>if (logger.isLoggable(Level.FINE)) {<NEW_LINE>logger.log(Level.FINE, "Threads = {0}", allThreads);<NEW_LINE>}<NEW_LINE>RemoteScreenshot[] rs = NO_SCREENSHOTS;<NEW_LINE>for (JPDAThread t : allThreads) {<NEW_LINE>if (t.getName().startsWith(AWTThreadName)) {<NEW_LINE>long t1 = System.nanoTime();<NEW_LINE>try {<NEW_LINE>RemoteScreenshot[] <MASK><NEW_LINE>if (rst.length > 0) {<NEW_LINE>if (rs.length > 0) {<NEW_LINE>RemoteScreenshot[] nrs = new RemoteScreenshot[rs.length + rst.length];<NEW_LINE>System.arraycopy(rs, 0, nrs, 0, rs.length);<NEW_LINE>System.arraycopy(rst, 0, nrs, rs.length, rst.length);<NEW_LINE>rs = nrs;<NEW_LINE>} else {<NEW_LINE>rs = rst;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// break;<NEW_LINE>} finally {<NEW_LINE>long t2 = System.nanoTime();<NEW_LINE>long ns = t2 - t1;<NEW_LINE>long ms = ns / 1000000;<NEW_LINE>logger.info("GUI Snaphot taken in " + ((ms > 0) ? (ms + " ms " + (ns - ms * 1000000) + " ns.") : (ns + " ns.")));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return rs;<NEW_LINE>}
rst = take(t, engine);
678,356
public UpdateTrustResult updateTrustDb(List<Long> signerMasterKeyIds, Progressable progress) {<NEW_LINE>OperationLog log = new OperationLog();<NEW_LINE>log.add(LogType.MSG_TRUST, 0);<NEW_LINE>Preferences preferences = Preferences.getPreferences(context);<NEW_LINE>boolean isTrustDbInitialized = preferences.isKeySignaturesTableInitialized();<NEW_LINE>List<Long> masterKeyIds;<NEW_LINE>if (!isTrustDbInitialized) {<NEW_LINE>log.add(LogType.MSG_TRUST_INITIALIZE, 1);<NEW_LINE>masterKeyIds = getAllMasterKeyIds();<NEW_LINE>} else {<NEW_LINE>masterKeyIds = getMasterKeyIdsBySigner(signerMasterKeyIds);<NEW_LINE>}<NEW_LINE>int totalKeys = masterKeyIds.size();<NEW_LINE>int processedKeys = 0;<NEW_LINE>if (totalKeys == 0) {<NEW_LINE>log.add(LogType.MSG_TRUST_COUNT_NONE, 1);<NEW_LINE>} else {<NEW_LINE>progress.setProgress(R.string.progress_update_trust, 0, totalKeys);<NEW_LINE>log.add(LogType.MSG_TRUST_COUNT, 1, totalKeys);<NEW_LINE>}<NEW_LINE>for (long masterKeyId : masterKeyIds) {<NEW_LINE>try {<NEW_LINE>log.add(LogType.MSG_TRUST_KEY, 1, KeyFormattingUtils.beautifyKeyId(masterKeyId));<NEW_LINE>byte[] pubKeyData = loadPublicKeyRingData(masterKeyId);<NEW_LINE>UncachedKeyRing uncachedKeyRing = UncachedKeyRing.decodeFromData(pubKeyData);<NEW_LINE>clearLog();<NEW_LINE>SaveKeyringResult result = savePublicKeyRing(uncachedKeyRing, true);<NEW_LINE>log.add(result, 1);<NEW_LINE>progress.setProgress(processedKeys++, totalKeys);<NEW_LINE>} catch (NotFoundException | PgpGeneralException | IOException e) {<NEW_LINE>Timber.e(e, "Error updating trust database");<NEW_LINE>return new UpdateTrustResult(UpdateTrustResult.RESULT_ERROR, log);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>preferences.setKeySignaturesTableInitialized();<NEW_LINE>log.add(LogType.MSG_TRUST_OK, 1);<NEW_LINE>return new <MASK><NEW_LINE>}
UpdateTrustResult(UpdateTrustResult.RESULT_OK, log);
965,975
public TSStatus insertStringRecords(TSInsertStringRecordsReq req) {<NEW_LINE>if (!serviceProvider.checkLogin(req.getSessionId())) {<NEW_LINE>return getNotLoggedInStatus();<NEW_LINE>}<NEW_LINE>if (AUDIT_LOGGER.isDebugEnabled()) {<NEW_LINE>AUDIT_LOGGER.debug("Session {} insertRecords, first device {}, first time {}", SESSION_MANAGER.getCurrSessionId(), req.prefixPaths.get(0), req.getTimestamps<MASK><NEW_LINE>}<NEW_LINE>boolean allCheckSuccess = true;<NEW_LINE>InsertRowsPlan insertRowsPlan = new InsertRowsPlan();<NEW_LINE>for (int i = 0; i < req.prefixPaths.size(); i++) {<NEW_LINE>InsertRowPlan plan = new InsertRowPlan();<NEW_LINE>try {<NEW_LINE>plan.setDevicePath(new PartialPath(req.getPrefixPaths().get(i)));<NEW_LINE>plan.setTime(req.getTimestamps().get(i));<NEW_LINE>addMeasurementAndValue(plan, req.getMeasurementsList().get(i), req.getValuesList().get(i));<NEW_LINE>plan.setDataTypes(new TSDataType[plan.getMeasurements().length]);<NEW_LINE>plan.setNeedInferType(true);<NEW_LINE>plan.setAligned(req.isAligned);<NEW_LINE>TSStatus status = serviceProvider.checkAuthority(plan, req.getSessionId());<NEW_LINE>if (status != null) {<NEW_LINE>insertRowsPlan.getResults().put(i, status);<NEW_LINE>allCheckSuccess = false;<NEW_LINE>}<NEW_LINE>insertRowsPlan.addOneInsertRowPlan(plan, i);<NEW_LINE>} catch (IoTDBException e) {<NEW_LINE>insertRowsPlan.getResults().put(i, onIoTDBException(e, OperationType.INSERT_STRING_RECORDS, e.getErrorCode()));<NEW_LINE>allCheckSuccess = false;<NEW_LINE>} catch (Exception e) {<NEW_LINE>insertRowsPlan.getResults().put(i, onNPEOrUnexpectedException(e, OperationType.INSERT_STRING_RECORDS, TSStatusCode.INTERNAL_SERVER_ERROR));<NEW_LINE>allCheckSuccess = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>TSStatus tsStatus = executeNonQueryPlan(insertRowsPlan);<NEW_LINE>return judgeFinalTsStatus(allCheckSuccess, tsStatus, insertRowsPlan.getResults(), req.prefixPaths.size());<NEW_LINE>}
().get(0));
1,225,890
private Button buildCommandLinkButton(ButtonType commandLink) {<NEW_LINE>// put the content inside a button<NEW_LINE>final Button button = new Button();<NEW_LINE>button.getStyleClass().addAll("command-link-button");<NEW_LINE>button.setMaxHeight(Double.MAX_VALUE);<NEW_LINE>button.setMaxWidth(Double.MAX_VALUE);<NEW_LINE>button.setAlignment(Pos.CENTER_LEFT);<NEW_LINE>final Label titleLabel = new Label(commandLink.getText());<NEW_LINE>titleLabel.minWidthProperty().bind(new DoubleBinding() {<NEW_LINE><NEW_LINE>{<NEW_LINE>bind(titleLabel.prefWidthProperty());<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected double computeValue() {<NEW_LINE>return titleLabel.getPrefWidth() + 400;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>titleLabel.getStyleClass().addAll("line-1");<NEW_LINE>titleLabel.setWrapText(true);<NEW_LINE>titleLabel.setAlignment(Pos.TOP_LEFT);<NEW_LINE>GridPane.setVgrow(titleLabel, Priority.NEVER);<NEW_LINE>// TODO no support in DialogButton for long text or graphic<NEW_LINE>// Label messageLabel = new Label(commandLink.getLongText() );<NEW_LINE>// messageLabel.getStyleClass().addAll("line-2");<NEW_LINE>// messageLabel.setWrapText(true);<NEW_LINE>// messageLabel.setAlignment(Pos.TOP_LEFT);<NEW_LINE>// messageLabel.setMaxHeight(Double.MAX_VALUE);<NEW_LINE>// GridPane.setVgrow(messageLabel, Priority.SOMETIMES);<NEW_LINE>//<NEW_LINE>// Image commandLinkImage = commandLink.getGraphic();<NEW_LINE>// Node view = commandLinkImage == null ?<NEW_LINE>// new ImageView(getClass().getResource("arrow-green-right.png").toExternalForm()) :<NEW_LINE>// new ImageView(commandLinkImage);<NEW_LINE>// Pane graphicContainer = new Pane(view);<NEW_LINE>// graphicContainer.getStyleClass().add("graphic-container");<NEW_LINE>ImageView arrow = new ImageView(getClass().getResource<MASK><NEW_LINE>GridPane.setValignment(arrow, VPos.TOP);<NEW_LINE>GridPane.setMargin(arrow, new Insets(0, 10, 0, 0));<NEW_LINE>GridPane grid = new GridPane();<NEW_LINE>grid.minWidthProperty().bind(titleLabel.prefWidthProperty());<NEW_LINE>grid.setMaxHeight(Double.MAX_VALUE);<NEW_LINE>grid.setMaxWidth(Double.MAX_VALUE);<NEW_LINE>grid.getStyleClass().add("container");<NEW_LINE>grid.add(arrow, 0, 0, 1, 2);<NEW_LINE>grid.add(titleLabel, 1, 0);<NEW_LINE>// grid.add(messageLabel, 1, 1);<NEW_LINE>button.setGraphic(grid);<NEW_LINE>button.minWidthProperty().bind(titleLabel.prefWidthProperty());<NEW_LINE>return button;<NEW_LINE>}
("/hello/about_16.png").toExternalForm());
1,733,180
public static void determinant(GrayF32 featureIntensity, GrayS16 hessianXX, GrayS16 hessianYY, GrayS16 hessianXY) {<NEW_LINE>final int width = hessianXX.width;<NEW_LINE>final int height = hessianXX.height;<NEW_LINE>if (featureIntensity == null) {<NEW_LINE>featureIntensity = new GrayF32(width, height);<NEW_LINE>}<NEW_LINE>for (int y = 0; y < height; y++) {<NEW_LINE>int indexXX = hessianXX.startIndex + y * hessianXX.stride;<NEW_LINE>int indexYY = hessianYY.startIndex + y * hessianYY.stride;<NEW_LINE>int indexXY = hessianXY.startIndex + y * hessianXY.stride;<NEW_LINE>int indexInten = featureIntensity.startIndex + y * featureIntensity.stride;<NEW_LINE>for (int x = 0; x < width; x++) {<NEW_LINE>int dxx = hessianXX.data[indexXX++];<NEW_LINE>int dyy <MASK><NEW_LINE>int dxy = hessianXY.data[indexXY++];<NEW_LINE>featureIntensity.data[indexInten++] = dxx * dyy - dxy * dxy;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= hessianYY.data[indexYY++];