idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
796,121
private // F011127 start<NEW_LINE>void processConsumerSetChangeCallback(CommsByteBuffer buffer, Conversation conversation) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "processConsumerSetChangeCallback", new Object[] { buffer, conversation });<NEW_LINE>final ClientConversationState convState = (ClientConversationState) conversation.getAttachment();<NEW_LINE>// final SICoreConnection connection = convState.getSICoreConnection();<NEW_LINE>final short connectionObjectId = buffer.getShort();<NEW_LINE>final short consumerMonitorListenerid = buffer.getShort();<NEW_LINE>final boolean isEmpty = buffer.getBoolean();<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "connectionObjectId=" + connectionObjectId);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "consumerMonitorListenerid=" + consumerMonitorListenerid);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "isEmpty=" + isEmpty);<NEW_LINE>// Look up the real ConsumerSetChangeCallback in the local ConsumerMonitorListenerCache<NEW_LINE>final <MASK><NEW_LINE>final ConsumerSetChangeCallback consumerSetChangeCallback = consumerMonitorListenerCache.get(consumerMonitorListenerid);<NEW_LINE>if (consumerSetChangeCallback != null) {<NEW_LINE>// Call the listener on a seperate thread.<NEW_LINE>ClientAsynchEventThreadPool.getInstance().dispatchConsumerSetChangeCallbackEvent(consumerSetChangeCallback, isEmpty);<NEW_LINE>} else {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "consumerMonitorListenerid=" + consumerMonitorListenerid + " not found in consumerMonitorListenerCache");<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, consumerMonitorListenerCache.toString());<NEW_LINE>SIErrorException e = new SIErrorException(nls.getFormattedMessage("UNABLE_TO_FIND_CONSUMER_MONITOR_LISTENER_SICO8024", new Object[] { consumerMonitorListenerid }, null));<NEW_LINE>FFDCFilter.processException(e, CLASS_NAME + ".processConsumerSetChangeCallback", CommsConstants.PROXYRECEIVELISTENER_CONSUMERMON_CALLBACK_01, this);<NEW_LINE>SibTr.error(tc, "An internal error occurred. The consumerMonitorListenerid " + consumerMonitorListenerid + " received by the client can not be located.");<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(this, tc, "processConsumerSetChangeCallback");<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(this, tc, "processConsumerSetChangeCallback");<NEW_LINE>}
ConsumerMonitorListenerCache consumerMonitorListenerCache = convState.getConsumerMonitorListenerCache();
951,769
public void onAuthentication(Authentication authentication, HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>boolean hadSessionAlready = <MASK><NEW_LINE>if (!hadSessionAlready && !this.alwaysCreateSession) {<NEW_LINE>// Session fixation isn't a problem if there's no session<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Create new session if necessary<NEW_LINE>HttpSession session = request.getSession();<NEW_LINE>if (hadSessionAlready && request.isRequestedSessionIdValid()) {<NEW_LINE>String originalSessionId;<NEW_LINE>String newSessionId;<NEW_LINE>Object mutex = WebUtils.getSessionMutex(session);<NEW_LINE>synchronized (mutex) {<NEW_LINE>// We need to migrate to a new session<NEW_LINE>originalSessionId = session.getId();<NEW_LINE>session = applySessionFixation(request);<NEW_LINE>newSessionId = session.getId();<NEW_LINE>}<NEW_LINE>if (originalSessionId.equals(newSessionId)) {<NEW_LINE>this.logger.warn("Your servlet container did not change the session ID when a new session " + "was created. You will not be adequately protected against session-fixation attacks");<NEW_LINE>} else {<NEW_LINE>if (this.logger.isDebugEnabled()) {<NEW_LINE>this.logger.debug(LogMessage.format("Changed session id from %s", originalSessionId));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>onSessionChange(originalSessionId, session, authentication);<NEW_LINE>}<NEW_LINE>}
request.getSession(false) != null;
757,041
public int call(CXCursor cursor, CXCursor parent, CXClientData client_data) {<NEW_LINE>CXSourceLocation location = clang.clang_getCursorLocation(cursor);<NEW_LINE>if (clang.clang_Location_isFromMainFile(location) == 0)<NEW_LINE>return clang.CXChildVisit_Continue;<NEW_LINE>int level = client_data<MASK><NEW_LINE>System.out.printf(" Level: %d\n", level);<NEW_LINE>show_spell(cursor);<NEW_LINE>show_linkage(cursor);<NEW_LINE>show_cursor_kind(cursor);<NEW_LINE>show_type(cursor);<NEW_LINE>show_parent(cursor, parent);<NEW_LINE>show_location(cursor);<NEW_LINE>show_usr(cursor);<NEW_LINE>show_included_file(cursor);<NEW_LINE>System.out.println();<NEW_LINE>CXClientData nextLevel = new CXClientData(new IntPointer(new int[] { level + 1 }));<NEW_LINE>clang.clang_visitChildren(cursor, this, nextLevel);<NEW_LINE>return clang.CXChildVisit_Continue;<NEW_LINE>}
.asByteBuffer().getInt();
464,408
public int compareTo(getHistoricalStats_args 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(isSetTinfo(), other.isSetTinfo());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetTinfo()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetCredentials()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
this.tinfo, other.tinfo);
711,680
List<PaddingVector> createClassicModifiedPadding(CipherSuite suite, ProtocolVersion version) {<NEW_LINE>int macSize = AlgorithmResolver.getMacAlgorithm(<MASK><NEW_LINE>int paddingValue = DEFAULT_CIPHERTEXT_LENGTH - macSize - 1;<NEW_LINE>int applicationLength = 0;<NEW_LINE>List<PaddingVector> vectorList = createClassicModifiedPaddingWithValidMAC(applicationLength, paddingValue, "0");<NEW_LINE>vectorList.addAll(createClassicModifiedPaddingWithInvalidMAC(applicationLength, paddingValue, "0"));<NEW_LINE>paddingValue = 6;<NEW_LINE>applicationLength = DEFAULT_CIPHERTEXT_LENGTH - macSize - 7;<NEW_LINE>vectorList.addAll(createClassicModifiedPaddingWithValidMAC(applicationLength, paddingValue, ""));<NEW_LINE>vectorList.addAll(createClassicModifiedPaddingWithInvalidMAC(applicationLength, paddingValue, ""));<NEW_LINE>return vectorList;<NEW_LINE>}
version, suite).getSize();
523,695
private double[] calculateProjectionOnRoutePoint(RoutingHelper helper, RotatedTileBox box) {<NEW_LINE>double[] projectionXY = null;<NEW_LINE><MASK><NEW_LINE>RouteCalculationResult route = helper.getRoute();<NEW_LINE>List<Location> locs = route.getImmutableAllLocations();<NEW_LINE>int cr = route.getCurrentRoute();<NEW_LINE>int locIndex = locs.size() - 1;<NEW_LINE>if (route.getIntermediatePointsToPass() > 0) {<NEW_LINE>locIndex = route.getIndexOfIntermediate(route.getIntermediatePointsToPass() - 1);<NEW_LINE>}<NEW_LINE>if (ll != null && cr > 0 && cr < locs.size() && locIndex >= 0 && locIndex < locs.size()) {<NEW_LINE>Location loc1 = locs.get(cr - 1);<NEW_LINE>Location loc2 = locs.get(cr);<NEW_LINE>double distLeft = route.getDistanceFromPoint(cr) - route.getDistanceFromPoint(locIndex);<NEW_LINE>double baDist = route.getDistanceFromPoint(cr - 1) - route.getDistanceFromPoint(cr);<NEW_LINE>Location target = locs.get(locIndex);<NEW_LINE>double dTarget = ll.distanceTo(target);<NEW_LINE>final int aX = box.getPixXFromLonNoRot(loc1.getLongitude());<NEW_LINE>final int aY = box.getPixYFromLatNoRot(loc1.getLatitude());<NEW_LINE>final int bX = box.getPixXFromLonNoRot(loc2.getLongitude());<NEW_LINE>final int bY = box.getPixYFromLatNoRot(loc2.getLatitude());<NEW_LINE>if (baDist != 0) {<NEW_LINE>double CF = (dTarget - distLeft) / baDist;<NEW_LINE>double rX = bX - CF * (bX - aX);<NEW_LINE>double rY = bY - CF * (bY - aY);<NEW_LINE>projectionXY = new double[] { rX, rY };<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (projectionXY != null) {<NEW_LINE>double distanceLoc2Proj = MapUtils.getSqrtDistance((int) projectionXY[0], (int) projectionXY[1], box.getPixXFromLonNoRot(ll.getLongitude()), box.getPixYFromLatNoRot(ll.getLatitude()));<NEW_LINE>boolean visible = box.containsPoint((float) projectionXY[0], (float) projectionXY[1], 20.0f) && distanceLoc2Proj > AndroidUtils.dpToPx(view.getContext(), 52) / 2.0;<NEW_LINE>if (visible) {<NEW_LINE>return projectionXY;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
Location ll = helper.getLastFixedLocation();
1,314,296
public void write(org.apache.thrift.protocol.TProtocol prot, add_trigger_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetMid()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (struct.isSetTriggerId()) {<NEW_LINE>optionals.set(1);<NEW_LINE>}<NEW_LINE>if (struct.isSetTriggerExpr()) {<NEW_LINE>optionals.set(2);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (struct.isSetMid()) {<NEW_LINE>oprot.writeI64(struct.mid);<NEW_LINE>}<NEW_LINE>if (struct.isSetTriggerId()) {<NEW_LINE>oprot.writeString(struct.trigger_id);<NEW_LINE>}<NEW_LINE>if (struct.isSetTriggerExpr()) {<NEW_LINE>oprot.writeString(struct.trigger_expr);<NEW_LINE>}<NEW_LINE>}
oprot.writeBitSet(optionals, 3);
823,054
public <E extends MemberElement> BeanElementBuilder produceBeans(ElementQuery<E> methodsOrFields, Consumer<BeanElementBuilder> childBeanBuilder) {<NEW_LINE>methodsOrFields = methodsOrFields.onlyConcrete().onlyInstance().modifiers((modifiers) -> modifiers.contains(ElementModifier.PUBLIC));<NEW_LINE>final List<E> enclosedElements = <MASK><NEW_LINE>for (E enclosedElement : enclosedElements) {<NEW_LINE>if (enclosedElement instanceof FieldElement) {<NEW_LINE>FieldElement fe = (FieldElement) enclosedElement;<NEW_LINE>final ClassElement type = fe.getGenericField().getType();<NEW_LINE>if (type.isPublic() && !type.isPrimitive()) {<NEW_LINE>return addChildBean(fe, childBeanBuilder);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (enclosedElement instanceof MethodElement && !(enclosedElement instanceof ConstructorElement)) {<NEW_LINE>MethodElement me = (MethodElement) enclosedElement;<NEW_LINE>final ClassElement type = me.getGenericReturnType().getType();<NEW_LINE>if (type.isPublic() && !type.isPrimitive()) {<NEW_LINE>return addChildBean(me, childBeanBuilder);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
this.beanType.getEnclosedElements(methodsOrFields);
1,746,192
private void drawTwoFingersDistance(Canvas canvas, RotatedTileBox tb, LatLon firstTouch, LatLon secondTouch, boolean nightMode) {<NEW_LINE>float x1 = tb.getPixXFromLatLon(firstTouch.getLatitude(), firstTouch.getLongitude());<NEW_LINE>float y1 = tb.getPixYFromLatLon(firstTouch.getLatitude(), firstTouch.getLongitude());<NEW_LINE>float x2 = tb.getPixXFromLatLon(secondTouch.getLatitude(<MASK><NEW_LINE>float y2 = tb.getPixYFromLatLon(secondTouch.getLatitude(), secondTouch.getLongitude());<NEW_LINE>Path path = new Path();<NEW_LINE>path.moveTo(x1, y1);<NEW_LINE>path.lineTo(x2, y2);<NEW_LINE>String text = OsmAndFormatter.getFormattedDistance((float) MapUtils.getDistance(firstTouch, secondTouch), app);<NEW_LINE>canvas.rotate(-tb.getRotate(), tb.getCenterPixelX(), tb.getCenterPixelY());<NEW_LINE>canvas.drawPath(path, lineAttrs.paint);<NEW_LINE>drawFingerTouchIcon(canvas, x1, y1, nightMode);<NEW_LINE>drawFingerTouchIcon(canvas, x2, y2, nightMode);<NEW_LINE>drawTextOnCenterOfPath(canvas, x1, x2, path, text);<NEW_LINE>canvas.rotate(tb.getRotate(), tb.getCenterPixelX(), tb.getCenterPixelY());<NEW_LINE>}
), secondTouch.getLongitude());
1,195,537
private void superPostConstruct(InvocationContext inv) {<NEW_LINE>try {<NEW_LINE>Object results = getResultsObject(inv);<NEW_LINE>addPostConstruct(results, CLASS_NAME, "superPostConstruct");<NEW_LINE>// Validate and update context data.<NEW_LINE>Map<String, Object<MASK><NEW_LINE>String data;<NEW_LINE>if (map.containsKey("PostConstruct")) {<NEW_LINE>data = (String) map.get("PostConstruct");<NEW_LINE>data = data + ":" + CLASS_NAME;<NEW_LINE>} else {<NEW_LINE>data = CLASS_NAME;<NEW_LINE>}<NEW_LINE>map.put("PostConstruct", data);<NEW_LINE>setPostContructContextData(results, data);<NEW_LINE>// Verify around invoke does not see any context data from lifecycle<NEW_LINE>// callback events.<NEW_LINE>if (map.containsKey("PostActivate")) {<NEW_LINE>throw new IllegalStateException("PostActivate context data shared with PostConstruct interceptor");<NEW_LINE>} else if (map.containsKey("AroundInvoke")) {<NEW_LINE>throw new IllegalStateException("AroundInvoke context data shared with PostConstruct interceptor");<NEW_LINE>} else if (map.containsKey("PrePassivate")) {<NEW_LINE>throw new IllegalStateException("PrePassivate context data shared with PostConstruct interceptor");<NEW_LINE>} else if (map.containsKey("PreDestroy")) {<NEW_LINE>throw new IllegalStateException("PreDestroy context data shared with PostConstruct interceptor");<NEW_LINE>}<NEW_LINE>// Verify same InvocationContext passed to each PostConstruct<NEW_LINE>// interceptor method.<NEW_LINE>InvocationContext ctxData;<NEW_LINE>if (map.containsKey("InvocationContext")) {<NEW_LINE>ctxData = (InvocationContext) map.get("InvocationContext");<NEW_LINE>if (inv != ctxData) {<NEW_LINE>throw new IllegalStateException("Same InvocationContext not passed to each PostConstruct interceptor");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>map.put("InvocationContext", inv);<NEW_LINE>}<NEW_LINE>inv.proceed();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new EJBException("unexpected Throwable", e);<NEW_LINE>}<NEW_LINE>}
> map = inv.getContextData();
12,789
boolean waitEvent(long timeout) {<NEW_LINE>// Transform a interrupt signal in an errno EINTR<NEW_LINE>if (Thread.interrupted()) {<NEW_LINE>errno.set(ZError.EINTR);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int rc;<NEW_LINE>boolean brc = (rcursor < wcursor.get());<NEW_LINE>if (brc) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (timeout == 0) {<NEW_LINE>// waitEvent(0) is called every read/send of SocketBase<NEW_LINE>// instant readiness is not strictly required<NEW_LINE>// On the other hand, we can save lots of system call and increase performance<NEW_LINE>errno.set(ZError.EAGAIN);<NEW_LINE>return false;<NEW_LINE>} else if (timeout < 0) {<NEW_LINE>rc = selector.select(0);<NEW_LINE>} else {<NEW_LINE>rc = selector.select(timeout);<NEW_LINE>}<NEW_LINE>} catch (ClosedSelectorException e) {<NEW_LINE><MASK><NEW_LINE>return false;<NEW_LINE>} catch (IOException e) {<NEW_LINE>errno.set(ZError.exccode(e));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (Thread.interrupted() || (rc == 0 && timeout <= 0 && !selector.keys().isEmpty())) {<NEW_LINE>errno.set(ZError.EINTR);<NEW_LINE>return false;<NEW_LINE>} else if (rc == 0) {<NEW_LINE>errno.set(ZError.EAGAIN);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>selector.selectedKeys().clear();<NEW_LINE>return true;<NEW_LINE>}
errno.set(ZError.EINTR);
1,578,435
public void _Animation_3() {<NEW_LINE>Animation a;<NEW_LINE>a = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);<NEW_LINE>a.setDuration(200);<NEW_LINE>main_box_1.startAnimation(a);<NEW_LINE>a = null;<NEW_LINE>Animation b;<NEW_LINE>b = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);<NEW_LINE>b.setDuration(300);<NEW_LINE>main_box_2.startAnimation(b);<NEW_LINE>b = null;<NEW_LINE>Animation c;<NEW_LINE>c = AnimationUtils.loadAnimation(getApplicationContext(), <MASK><NEW_LINE>c.setDuration(400);<NEW_LINE>main_box_6.startAnimation(c);<NEW_LINE>c = null;<NEW_LINE>Animation d;<NEW_LINE>d = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);<NEW_LINE>d.setDuration(500);<NEW_LINE>box_sub_header.startAnimation(d);<NEW_LINE>d = null;<NEW_LINE>Animation e;<NEW_LINE>e = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);<NEW_LINE>e.setDuration(600);<NEW_LINE>main_box_4.startAnimation(e);<NEW_LINE>e = null;<NEW_LINE>Animation f;<NEW_LINE>f = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);<NEW_LINE>f.setDuration(700);<NEW_LINE>main_box_15.startAnimation(f);<NEW_LINE>f = null;<NEW_LINE>}
android.R.anim.slide_in_left);
1,200,201
public void printResponseParts(Object response, String theMethod, String msg) throws Exception {<NEW_LINE>System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Start Response Content @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");<NEW_LINE>if (response == null) {<NEW_LINE>Log.info(thisClass, theMethod, "The response is null - nothing to print");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Log.info(thisClass, "getResponseStatusCode", response.getClass().getSimpleName());<NEW_LINE>try {<NEW_LINE>Log.info(thisClass, theMethod, msg);<NEW_LINE>Log.info(thisClass, theMethod, "Response (StatusCode): " + AutomationTools.getResponseStatusCode(response));<NEW_LINE>if (AutomationTools.getResponseIsHtml(response)) {<NEW_LINE>Log.info(thisClass, theMethod, "Response (Title): " + AutomationTools.getResponseTitle(response));<NEW_LINE>}<NEW_LINE>Log.info(thisClass, theMethod, "Response (Url): " + AutomationTools.getResponseUrl(response));<NEW_LINE>Map<String, String[]> headers = AutomationTools.getResponseHeaders(response);<NEW_LINE>if (headers != null) {<NEW_LINE>for (Entry<String, String[]> header : headers.entrySet()) {<NEW_LINE>for (String value : header.getValue()) {<NEW_LINE>Log.info(thisClass, theMethod, "Response (Header): Name: " + header.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Log.info(thisClass, theMethod, "Response (Message): " + AutomationTools.getResponseMessage(response));<NEW_LINE>Log.info(thisClass, theMethod, "Response (Full): " + stripBlankLines(AutomationTools.getResponseText(response)));<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>Log.error(thisClass, theMethod, e, "Error printing response (log error and go on)");<NEW_LINE>}<NEW_LINE>System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ End Response Content @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");<NEW_LINE>}
getKey() + " Value: " + value);
1,440,874
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater,<NEW_LINE>* android.view.ViewGroup, android.os.Bundle)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View resultView = inflater.inflate(getLayoutResourceId(), null);<NEW_LINE>mEditText = (EditClearText) resultView.findViewById(R.id.statusEditText);<NEW_LINE>mEditText.addTextChangedListener(mTextChangedListener);<NEW_LINE>mEditText.setOnFocusChangeListener(mOnFocusChangeListener);<NEW_LINE>mEditText.setEditClearTextListener(mEditClearTextListener);<NEW_LINE>mSendButton = (ImageButton) resultView.findViewById(R.id.sendTweetButton);<NEW_LINE>mSendButton.setOnClickListener(mOnSendTweetClickListener);<NEW_LINE>mCharacterCountTextView = (TextView) resultView.findViewById(R.id.characterCount);<NEW_LINE><MASK><NEW_LINE>mAutocompleteListView = (ListView) resultView.findViewById(R.id.autocompleteListView);<NEW_LINE>updateStatusHint();<NEW_LINE>return resultView;<NEW_LINE>}
mCharacterCountTextView.setVisibility(View.VISIBLE);
1,079,941
private Collection<VirtualFile> computeRoots() {<NEW_LINE>final Collection<VirtualFile> result = new LinkedHashSet<>();<NEW_LINE>myOrderEnumerator.forEach(orderEntry -> {<NEW_LINE>OrderRootType type = getRootType(orderEntry);<NEW_LINE>if (orderEntry instanceof ModuleSourceOrderEntry) {<NEW_LINE>collectRoots(type, ((ModuleSourceOrderEntry) orderEntry).getRootModel(), result, true, !myOrderEnumerator.<MASK><NEW_LINE>} else if (orderEntry instanceof ModuleOrderEntry) {<NEW_LINE>ModuleOrderEntry moduleOrderEntry = (ModuleOrderEntry) orderEntry;<NEW_LINE>final Module module = moduleOrderEntry.getModule();<NEW_LINE>if (module != null) {<NEW_LINE>ModuleRootModel rootModel = myOrderEnumerator.getRootModel(module);<NEW_LINE>boolean productionOnTests = orderEntry instanceof ModuleOrderEntryImpl && ((ModuleOrderEntryImpl) orderEntry).isProductionOnTestDependency();<NEW_LINE>boolean includeTests = !myOrderEnumerator.isProductionOnly() && myOrderEnumerator.shouldIncludeTestsFromDependentModulesToTestClasspath() || productionOnTests;<NEW_LINE>collectRoots(type, rootModel, result, !productionOnTests, includeTests, ourSourcesToFileFunc, ourRuntimeToFileFunc);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (myCustomRootProvider != null) {<NEW_LINE>Collections.addAll(result, myCustomRootProvider.fun(orderEntry));<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (myOrderEnumerator.addCustomRootsForLibrary(orderEntry, type, result)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Collections.addAll(result, orderEntry.getFiles(type));<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>return result;<NEW_LINE>}
isProductionOnly(), ourSourcesToFileFunc, ourRuntimeToFileFunc);
1,342,333
public static InterleavedU8 yuvToInterleavedRgbU8(ByteBuffer bufferY, ByteBuffer bufferU, ByteBuffer bufferV, int width, int height, int strideY, int strideUV, int stridePixelUV, @Nullable InterleavedU8 output, @Nullable GrowArray<DogArray_I8> workArrays) {<NEW_LINE>output = InputSanityCheck.declareOrReshape(output, width, height, 3, InterleavedU8.class);<NEW_LINE>workArrays = BoofMiscOps.checkDeclare(workArrays, DogArray_I8::new);<NEW_LINE>InterleavedU8 _output = output;<NEW_LINE>ProcessorYuv processor = new ProcessorYuvRgb() {<NEW_LINE><NEW_LINE>int indexOut = 0;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void processRGB(final int r, final int g, final int b) {<NEW_LINE>_output.data[indexOut++] = (byte) r;<NEW_LINE>_output.data[<MASK><NEW_LINE>_output.data[indexOut++] = (byte) b;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>ImplConvertYuv420_888.processYuv(bufferY, bufferU, bufferV, width, height, strideY, strideUV, stridePixelUV, workArrays, processor);<NEW_LINE>return output;<NEW_LINE>}
indexOut++] = (byte) g;
1,511,897
private void initInterfaceIncomingFilterLines() {<NEW_LINE>_interfaceIncomingFilterLines = new HashMap<>();<NEW_LINE>_virtualAddressRejectIcmpHeaders.forEach((virtualAddressName, matchedHeaders) -> {<NEW_LINE>ExprAclLine line = ExprAclLine.rejecting().setMatchCondition(new MatchHeaderSpace(matchedHeaders)).setName(String.format("virtual-address %s { icmp-echo disabled }", virtualAddressName)).build();<NEW_LINE>_vlans.keySet().stream().forEach(vlanName -> _interfaceIncomingFilterLines.computeIfAbsent(vlanName, n -> ImmutableList.builder()).add(line));<NEW_LINE>});<NEW_LINE>_virtualMatchedHeaders.forEach((virtualName, matchedHeaders) -> {<NEW_LINE>Virtual <MASK><NEW_LINE>ExprAclLine line = toIpAccessListLine(virtualName, matchedHeaders, virtual.getReject());<NEW_LINE>_vlans.keySet().stream().filter(vlanName -> appliesToVlan(virtual, vlanName)).forEach(vlanName -> _interfaceIncomingFilterLines.computeIfAbsent(vlanName, n -> ImmutableList.builder()).add(line));<NEW_LINE>});<NEW_LINE>}
virtual = _enabledVirtuals.get(virtualName);
642,397
public void validateCustomerVisibleNaming(IntermediateModel trimmedModel) {<NEW_LINE>Metadata metadata = trimmedModel.getMetadata();<NEW_LINE>validateCustomerVisibleName(metadata.getSyncInterface(), "metadata-derived interface name");<NEW_LINE>validateCustomerVisibleName(metadata.getSyncBuilderInterface(), "metadata-derived builder interface name");<NEW_LINE>validateCustomerVisibleName(metadata.getAsyncInterface(), "metadata-derived async interface name");<NEW_LINE>validateCustomerVisibleName(metadata.getAsyncBuilderInterface(), "metadata-derived async builder interface name");<NEW_LINE>validateCustomerVisibleName(metadata.getBaseBuilderInterface(), "metadata-derived builder interface name");<NEW_LINE>validateCustomerVisibleName(metadata.getBaseExceptionName(), "metadata-derived exception name");<NEW_LINE>validateCustomerVisibleName(metadata.getBaseRequestName(), "metadata-derived request name");<NEW_LINE>validateCustomerVisibleName(metadata.getBaseResponseName(), "metadata-derived response name");<NEW_LINE>trimmedModel.getOperations().values().forEach(operation -> {<NEW_LINE>validateCustomerVisibleName(operation.getOperationName(), "operations");<NEW_LINE>});<NEW_LINE>trimmedModel.getWaiters().forEach((name, waiter) -> {<NEW_LINE>validateCustomerVisibleName(name, "waiters");<NEW_LINE>});<NEW_LINE>trimmedModel.getShapes().values().forEach(shape -> {<NEW_LINE>String shapeName = shape.getShapeName();<NEW_LINE>validateCustomerVisibleName(shapeName, "shapes");<NEW_LINE>shape.getMembers().forEach(member -> {<NEW_LINE>validateCustomerVisibleName(member.getFluentGetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getFluentSetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getFluentEnumGetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.<MASK><NEW_LINE>validateCustomerVisibleName(member.getExistenceCheckMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getBeanStyleGetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getBeanStyleSetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getEnumType(), shapeName + " shape");<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
getFluentEnumSetterMethodName(), shapeName + " shape");
1,704,905
final ListEventDataStoresResult executeListEventDataStores(ListEventDataStoresRequest listEventDataStoresRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEventDataStoresRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListEventDataStoresRequest> request = null;<NEW_LINE>Response<ListEventDataStoresResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListEventDataStoresRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "CloudTrail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEventDataStores");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListEventDataStoresResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEventDataStoresResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(listEventDataStoresRequest));
112,296
final DeleteAuthenticationProfileResult executeDeleteAuthenticationProfile(DeleteAuthenticationProfileRequest deleteAuthenticationProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAuthenticationProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteAuthenticationProfileRequest> request = null;<NEW_LINE>Response<DeleteAuthenticationProfileResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteAuthenticationProfileRequestMarshaller().marshall(super.beforeMarshalling(deleteAuthenticationProfileRequest));<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, "Redshift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAuthenticationProfile");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DeleteAuthenticationProfileResult> responseHandler = new StaxResponseHandler<DeleteAuthenticationProfileResult>(new DeleteAuthenticationProfileResultStaxUnmarshaller());<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,630,544
protected Attributes adjust(Attributes match) throws DicomServiceException {<NEW_LINE>Attributes adjust = super.adjust(match);<NEW_LINE><MASK><NEW_LINE>if (keys.contains(Tag.SOPClassUID))<NEW_LINE>adjust.setString(Tag.SOPClassUID, VR.UI, match.getString(Tag.ReferencedSOPClassUIDInFile));<NEW_LINE>if (keys.contains(Tag.SOPInstanceUID))<NEW_LINE>adjust.setString(Tag.SOPInstanceUID, VR.UI, match.getString(Tag.ReferencedSOPInstanceUIDInFile));<NEW_LINE>adjust.setString(Tag.QueryRetrieveLevel, VR.CS, keys.getString(Tag.QueryRetrieveLevel));<NEW_LINE>adjust.setString(Tag.RetrieveAETitle, VR.AE, as.getCalledAET());<NEW_LINE>if (availability != null)<NEW_LINE>adjust.setString(Tag.InstanceAvailability, VR.CS, availability);<NEW_LINE>adjust.setString(Tag.StorageMediaFileSetID, VR.SH, ddr.getFileSetID());<NEW_LINE>adjust.setString(Tag.StorageMediaFileSetUID, VR.UI, ddr.getFileSetUID());<NEW_LINE>match.setString(Tag.SOPClassUID, VR.UI, match.getString(Tag.ReferencedSOPClassUIDInFile));<NEW_LINE>match.setString(Tag.SOPInstanceUID, VR.UI, match.getString(Tag.ReferencedSOPInstanceUIDInFile));<NEW_LINE>if (delayCFind > 0)<NEW_LINE>try {<NEW_LINE>Thread.sleep(delayCFind);<NEW_LINE>} catch (InterruptedException ignore) {<NEW_LINE>}<NEW_LINE>return adjust;<NEW_LINE>}
adjust.remove(Tag.DirectoryRecordType);
1,197,252
private boolean moveUser(UserVO user, long newAccountId) {<NEW_LINE>if (newAccountId == user.getAccountId()) {<NEW_LINE>// could do a not silent fail but the objective of the user is reached<NEW_LINE>// no need to create a new user object for this user<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return Transaction.execute(new TransactionCallback<Boolean>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Boolean doInTransaction(TransactionStatus status) {<NEW_LINE>UserVO newUser = new UserVO(user);<NEW_LINE>user.setExternalEntity(user.getUuid());<NEW_LINE>user.setUuid(UUID.<MASK><NEW_LINE>user.setApiKey(null);<NEW_LINE>user.setSecretKey(null);<NEW_LINE>_userDao.update(user.getId(), user);<NEW_LINE>newUser.setAccountId(newAccountId);<NEW_LINE>boolean success = _userDao.remove(user.getId());<NEW_LINE>UserVO persisted = _userDao.persist(newUser);<NEW_LINE>return success && persisted.getUuid().equals(user.getExternalEntity());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
randomUUID().toString());
1,607,687
public boolean load() {<NEW_LINE>// clean up data if needed.<NEW_LINE>if (null != heightData) {<NEW_LINE>unloadHeightMap();<NEW_LINE>}<NEW_LINE>heightData = new float[size * size];<NEW_LINE>float[][] tempBuffer = new float[size][size];<NEW_LINE>Random random = new Random(seed);<NEW_LINE>tempBuffer[0][<MASK><NEW_LINE>tempBuffer[0][size - 1] = random.nextFloat();<NEW_LINE>tempBuffer[size - 1][0] = random.nextFloat();<NEW_LINE>tempBuffer[size - 1][size - 1] = random.nextFloat();<NEW_LINE>float offsetRange = range;<NEW_LINE>int stepSize = size - 1;<NEW_LINE>while (stepSize > 1) {<NEW_LINE>int[] nextCoords = { 0, 0 };<NEW_LINE>while (nextCoords != null) {<NEW_LINE>nextCoords = doSquareStep(tempBuffer, nextCoords, stepSize, offsetRange, random);<NEW_LINE>}<NEW_LINE>nextCoords = new int[] { 0, 0 };<NEW_LINE>while (nextCoords != null) {<NEW_LINE>nextCoords = doDiamondStep(tempBuffer, nextCoords, stepSize, offsetRange, random);<NEW_LINE>}<NEW_LINE>stepSize /= 2;<NEW_LINE>offsetRange *= persistence;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>for (int j = 0; j < size; j++) {<NEW_LINE>setHeightAtPoint(tempBuffer[i][j], j, i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>normalizeTerrain(NORMALIZE_RANGE);<NEW_LINE>logger.log(Level.FINE, "Midpoint displacement heightmap generated");<NEW_LINE>return true;<NEW_LINE>}
0] = random.nextFloat();
811,461
private void remove() {<NEW_LINE>synchronized (lock) {<NEW_LINE>if (TenantGlobals.isDataIsolationEnabled() && TenantContainer.current() != null) {<NEW_LINE>TenantData td = TenantContainer.current().getTenantData();<NEW_LINE>if (td.getFieldValue(Finalizer.class, ID_UNFINALIZED) == this) {<NEW_LINE>if (this.next != null) {<NEW_LINE>td.setFieldValue(Finalizer.class, ID_UNFINALIZED, this.next);<NEW_LINE>} else {<NEW_LINE>td.setFieldValue(Finalizer.class, ID_UNFINALIZED, this.prev);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (unfinalized == this) {<NEW_LINE>if (this.next != null) {<NEW_LINE>unfinalized = this.next;<NEW_LINE>} else {<NEW_LINE>unfinalized = this.prev;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (this.next != null) {<NEW_LINE>this<MASK><NEW_LINE>}<NEW_LINE>if (this.prev != null) {<NEW_LINE>this.prev.next = this.next;<NEW_LINE>}<NEW_LINE>this.next = this;
.next.prev = this.prev;
1,385,779
public static JFileChooser promptToOpenFile(Component parentComponent, String[] exts, String existingFileName, boolean onlyDirectories) {<NEW_LINE>if (onlyDirectories) {<NEW_LINE>jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>setCurrentDirOnJFC(existingFileName, lastJFCDirectory, System.getProperty("user.dir"));<NEW_LINE>clearFileFilters();<NEW_LINE>if (exts != null && exts.length > 0) {<NEW_LINE>JMeterFileFilter currentFilter = new JMeterFileFilter(exts);<NEW_LINE>jfc.addChoosableFileFilter(currentFilter);<NEW_LINE>jfc.setAcceptAllFileFilterUsed(true);<NEW_LINE>jfc.setFileFilter(currentFilter);<NEW_LINE>}<NEW_LINE>int retVal = jfc.showOpenDialog(parentComponent);<NEW_LINE>lastJFCDirectory = jfc.getCurrentDirectory().getAbsolutePath();<NEW_LINE>if (retVal == JFileChooser.APPROVE_OPTION) {<NEW_LINE>return jfc;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
88,969
public static TokenSequence<JavadocTokenId> findJavadocTokenSequence(CompilationInfo javac, Tree tree, Element e) {<NEW_LINE>if (e == null || javac.getElementUtilities().isSynthetic(e))<NEW_LINE>return null;<NEW_LINE>if (tree == null)<NEW_LINE>tree = javac.getTrees().getTree(e);<NEW_LINE>if (tree == null)<NEW_LINE>return null;<NEW_LINE>int elementStartOffset = (int) javac.getTrees().getSourcePositions().getStartPosition(javac.getCompilationUnit(), tree);<NEW_LINE>TokenSequence<JavaTokenId> s = SourceUtils.getJavaTokenSequence(<MASK><NEW_LINE>if (s == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>s.move(elementStartOffset);<NEW_LINE>Token<JavaTokenId> token = null;<NEW_LINE>while (s.movePrevious()) {<NEW_LINE>token = s.token();<NEW_LINE>switch(token.id()) {<NEW_LINE>case BLOCK_COMMENT:<NEW_LINE>// see #147533<NEW_LINE>if (!"/**/".contentEquals(token.text())) {<NEW_LINE>// NOI18N<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case JAVADOC_COMMENT:<NEW_LINE>if (token.partType() == PartType.COMPLETE) {<NEW_LINE>return javac.getElements().getDocComment(e) == null ? null : s.embedded(JavadocTokenId.language());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case WHITESPACE:<NEW_LINE>case LINE_COMMENT:<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
javac.getTokenHierarchy(), elementStartOffset);
585,923
public Void visitReturn(ReturnTree node, List<ErrorDescription> errors) {<NEW_LINE>boolean oldInheritDoc = foundInheritDoc;<NEW_LINE>DocTreePath currentDocPath = getCurrentPath();<NEW_LINE>DocTreePathHandle dtph = DocTreePathHandle.create(currentDocPath, javac);<NEW_LINE>if (dtph == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DocSourcePositions sp = (DocSourcePositions) javac.getTrees().getSourcePositions();<NEW_LINE>int start = (int) sp.getStartPosition(javac.getCompilationUnit(), currentDocPath.getDocComment(), node);<NEW_LINE>int end = (int) sp.getEndPosition(javac.getCompilationUnit(), currentDocPath.getDocComment(), node);<NEW_LINE>if (returnType == null) {<NEW_LINE>errors.add(ErrorDescriptionFactory.forSpan(ctx, start, end, WRONG_CONSTRUCTOR_RETURN_DESC(), new RemoveTagFix(dtph, <MASK><NEW_LINE>} else if (returnType.getKind() == TypeKind.VOID) {<NEW_LINE>errors.add(ErrorDescriptionFactory.forSpan(ctx, start, end, WRONG_RETURN_DESC(), new RemoveTagFix(dtph, "@return").toEditorFix()));<NEW_LINE>} else if (returnTypeFound) {<NEW_LINE>errors.add(ErrorDescriptionFactory.forSpan(ctx, start, end, DUPLICATE_RETURN_DESC(), new RemoveTagFix(dtph, "@return").toEditorFix()));<NEW_LINE>} else {<NEW_LINE>returnTypeFound = true;<NEW_LINE>}<NEW_LINE>super.visitReturn(node, errors);<NEW_LINE>foundInheritDoc = oldInheritDoc;<NEW_LINE>return null;<NEW_LINE>}
"@return").toEditorFix()));
1,196,561
private DefinitionProtos.Definition.FunctionData writeFunctionDefinition(ExpressionSerialization defSerializer, FunctionDefinition definition) {<NEW_LINE>DefinitionProtos.Definition.FunctionData.Builder builder = DefinitionProtos.Definition.FunctionData.newBuilder();<NEW_LINE>builder.setIsStdLevels(definition.getLevelParameters() == null);<NEW_LINE>if (definition.getLevelParameters() != null) {<NEW_LINE>builder.addAllLevelParam(writeLevelParameters(definition.getLevelParameters()));<NEW_LINE>}<NEW_LINE>builder.addAllOmegaParameter(definition.getOmegaParameters());<NEW_LINE>builder.<MASK><NEW_LINE>builder.setHasEnclosingClass(definition.getEnclosingClass() != null);<NEW_LINE>builder.addAllParam(defSerializer.writeParameters(definition.getParameters()));<NEW_LINE>if (definition.getParametersTypecheckingOrder() != null) {<NEW_LINE>builder.addAllParametersTypecheckingOrder(definition.getParametersTypecheckingOrder());<NEW_LINE>}<NEW_LINE>builder.addAllGoodThisParameters(definition.getGoodThisParameters());<NEW_LINE>for (Definition.TypeClassParameterKind kind : definition.getTypeClassParameters()) {<NEW_LINE>builder.addTypeClassParameters(writeTypeClassParameterKind(kind));<NEW_LINE>}<NEW_LINE>builder.addAllParametersLevels(writeParametersLevels(defSerializer, definition.getParametersLevels()));<NEW_LINE>for (Definition recursiveDefinition : definition.getRecursiveDefinitions()) {<NEW_LINE>builder.addRecursiveDefinition(myCallTargetIndexProvider.getDefIndex(recursiveDefinition));<NEW_LINE>}<NEW_LINE>if (definition.getResultType() != null) {<NEW_LINE>builder.setType(defSerializer.writeExpr(definition.getResultType()));<NEW_LINE>}<NEW_LINE>if (definition.getResultTypeLevel() != null) {<NEW_LINE>builder.setTypeLevel(defSerializer.writeExpr(definition.getResultTypeLevel()));<NEW_LINE>}<NEW_LINE>switch(definition.getBodyHiddenStatus()) {<NEW_LINE>case NOT_HIDDEN:<NEW_LINE>builder.setBodyHiddenStatus(DefinitionProtos.Definition.FunctionData.HiddenStatus.NOT_HIDDEN);<NEW_LINE>break;<NEW_LINE>case HIDDEN:<NEW_LINE>builder.setBodyHiddenStatus(DefinitionProtos.Definition.FunctionData.HiddenStatus.HIDDEN);<NEW_LINE>break;<NEW_LINE>case REALLY_HIDDEN:<NEW_LINE>builder.setBodyHiddenStatus(DefinitionProtos.Definition.FunctionData.HiddenStatus.REALLY_HIDDEN);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>DefinitionProtos.Definition.FunctionKind kind;<NEW_LINE>switch(definition.getKind()) {<NEW_LINE>case LEMMA:<NEW_LINE>kind = definition.getReferable().getKind() == GlobalReferable.Kind.COCLAUSE_FUNCTION ? DefinitionProtos.Definition.FunctionKind.COCLAUSE_LEMMA : DefinitionProtos.Definition.FunctionKind.LEMMA;<NEW_LINE>break;<NEW_LINE>case SFUNC:<NEW_LINE>kind = DefinitionProtos.Definition.FunctionKind.SFUNC;<NEW_LINE>break;<NEW_LINE>case TYPE:<NEW_LINE>kind = DefinitionProtos.Definition.FunctionKind.TYPE;<NEW_LINE>break;<NEW_LINE>case INSTANCE:<NEW_LINE>kind = DefinitionProtos.Definition.FunctionKind.INSTANCE;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>kind = definition.getReferable().getKind() == GlobalReferable.Kind.COCLAUSE_FUNCTION ? DefinitionProtos.Definition.FunctionKind.COCLAUSE : DefinitionProtos.Definition.FunctionKind.FUNC;<NEW_LINE>}<NEW_LINE>builder.setKind(kind);<NEW_LINE>builder.setVisibleParameter(definition.getVisibleParameter());<NEW_LINE>if (definition.getReallyActualBody() != null) {<NEW_LINE>builder.setBody(writeBody(defSerializer, definition.getReallyActualBody()));<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
addAllStrictParameters(definition.getStrictParameters());
1,808,173
public static NetworkStatus fromGrid(IGrid grid) {<NEW_LINE>IEnergyService eg = grid.getEnergyService();<NEW_LINE>NetworkStatus status = new NetworkStatus();<NEW_LINE>status.averagePowerInjection = eg.getAvgPowerInjection();<NEW_LINE>status.averagePowerUsage = eg.getAvgPowerUsage();<NEW_LINE>status.storedPower = eg.getStoredPower();<NEW_LINE>status.maxStoredPower = eg.getMaxStoredPower();<NEW_LINE>status.channelPower = eg.getChannelPowerUsage();<NEW_LINE>status.channelsUsed = grid.getPathingService().getUsedChannels();<NEW_LINE>// This is essentially a groupBy machineRepresentation + count, sum(idlePowerUsage)<NEW_LINE>Map<AEItemKey, MachineGroup> groupedMachines = new HashMap<>();<NEW_LINE>for (var machineClass : grid.getMachineClasses()) {<NEW_LINE>for (IGridNode machine : grid.getMachineNodes(machineClass)) {<NEW_LINE>var ais = machine.getVisualRepresentation();<NEW_LINE>if (ais != null) {<NEW_LINE>MachineGroup group = groupedMachines.get(ais);<NEW_LINE>if (group == null) {<NEW_LINE>groupedMachines.put(ais, <MASK><NEW_LINE>}<NEW_LINE>group.setCount(group.getCount() + 1);<NEW_LINE>group.setIdlePowerUsage(group.getIdlePowerUsage() + machine.getIdlePowerUsage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>status.groupedMachines = ImmutableList.copyOf(groupedMachines.values());<NEW_LINE>return status;<NEW_LINE>}
group = new MachineGroup(ais));
555,264
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Device Farm");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");
701,792
final UpdateConfigResult executeUpdateConfig(UpdateConfigRequest updateConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateConfigRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateConfigRequest> request = null;<NEW_LINE>Response<UpdateConfigResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateConfigRequest));<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, "GroundStation");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateConfigResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateConfigResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
322,976
public static ServerStats parseBytes(byte[] serialized) throws ServerStatsDeserializationException {<NEW_LINE>final ByteBuffer bb = ByteBuffer.wrap(serialized);<NEW_LINE>bb.order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>long serviceLatencyNs = 0L;<NEW_LINE>long lbLatencyNs = 0L;<NEW_LINE>byte traceOption = (byte) 0;<NEW_LINE>// Check the version first.<NEW_LINE>if (!bb.hasRemaining()) {<NEW_LINE>throw new ServerStatsDeserializationException("Serialized ServerStats buffer is empty");<NEW_LINE>}<NEW_LINE>byte version = bb.get();<NEW_LINE>if (version > CURRENT_VERSION || version < 0) {<NEW_LINE>throw new ServerStatsDeserializationException("Invalid ServerStats version: " + version);<NEW_LINE>}<NEW_LINE>while (bb.hasRemaining()) {<NEW_LINE>ServerStatsFieldEnums.Id id = ServerStatsFieldEnums.Id.valueOf((int) bb.get() & 0xFF);<NEW_LINE>if (id == null) {<NEW_LINE>// Skip remaining;<NEW_LINE>bb.<MASK><NEW_LINE>} else {<NEW_LINE>switch(id) {<NEW_LINE>case SERVER_STATS_LB_LATENCY_ID:<NEW_LINE>lbLatencyNs = bb.getLong();<NEW_LINE>break;<NEW_LINE>case SERVER_STATS_SERVICE_LATENCY_ID:<NEW_LINE>serviceLatencyNs = bb.getLong();<NEW_LINE>break;<NEW_LINE>case SERVER_STATS_TRACE_OPTION_ID:<NEW_LINE>traceOption = bb.get();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return ServerStats.create(lbLatencyNs, serviceLatencyNs, traceOption);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new ServerStatsDeserializationException("Serialized ServiceStats contains invalid values: " + e.getMessage());<NEW_LINE>}<NEW_LINE>}
position(bb.limit());
1,103,083
public boolean exceedsLimit(TaskModel task) {<NEW_LINE>Optional<TaskDef> taskDefinition = task.getTaskDefinition();<NEW_LINE>if (taskDefinition.isEmpty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int limit = taskDefinition.get().concurrencyLimit();<NEW_LINE>if (limit <= 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Monitors.recordDaoRequests(CLASS_NAME, "exceedsLimit", task.getTaskType(<MASK><NEW_LINE>String taskId = task.getTaskId();<NEW_LINE>String taskDefName = task.getTaskDefName();<NEW_LINE>String keyName = createKeyName(taskDefName);<NEW_LINE>boolean isMember = ObjectUtils.defaultIfNull(stringRedisTemplate.opsForSet().isMember(keyName, taskId), false);<NEW_LINE>long size = ObjectUtils.defaultIfNull(stringRedisTemplate.opsForSet().size(keyName), -1L);<NEW_LINE>LOGGER.debug("Task: {} is {} of {}, size: {} and limit: {}", taskId, isMember ? "a member" : "not a member", keyName, size, limit);<NEW_LINE>return !isMember && size >= limit;<NEW_LINE>} catch (Exception e) {<NEW_LINE>Monitors.error(CLASS_NAME, "exceedsLimit");<NEW_LINE>String errorMsg = String.format("Failed to get in progress limit - %s:%s in workflow :%s", task.getTaskDefName(), task.getTaskId(), task.getWorkflowInstanceId());<NEW_LINE>LOGGER.error(errorMsg, e);<NEW_LINE>throw new ApplicationException(ApplicationException.Code.BACKEND_ERROR, errorMsg);<NEW_LINE>}<NEW_LINE>}
), task.getWorkflowType());
879,862
public static FindOrderableListResponse unmarshall(FindOrderableListResponse findOrderableListResponse, UnmarshallerContext _ctx) {<NEW_LINE>findOrderableListResponse.setRequestId(_ctx.stringValue("FindOrderableListResponse.RequestId"));<NEW_LINE>findOrderableListResponse.setCode(_ctx.integerValue("FindOrderableListResponse.Code"));<NEW_LINE>findOrderableListResponse.setMessage(_ctx.stringValue("FindOrderableListResponse.Message"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setCurrentPage(_ctx.integerValue("FindOrderableListResponse.Data.CurrentPage"));<NEW_LINE>data.setPageNumber(_ctx.integerValue("FindOrderableListResponse.Data.PageNumber"));<NEW_LINE>List<Service> serviceList = new ArrayList<Service>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("FindOrderableListResponse.Data.ServiceList.Length"); i++) {<NEW_LINE>Service service = new Service();<NEW_LINE>service.setAlias(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].Alias"));<NEW_LINE>service.setAllVisiable(_ctx.booleanValue("FindOrderableListResponse.Data.ServiceList[" + i + "].AllVisiable"));<NEW_LINE>service.setApproveUserId(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].ApproveUserId"));<NEW_LINE>service.setCasTargets(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].CasTargets"));<NEW_LINE>service.setCreateTime(_ctx.longValue("FindOrderableListResponse.Data.ServiceList[" + i + "].CreateTime"));<NEW_LINE>service.setCsbId(_ctx.longValue("FindOrderableListResponse.Data.ServiceList[" + i + "].CsbId"));<NEW_LINE>service.setId(_ctx.longValue("FindOrderableListResponse.Data.ServiceList[" + i + "].Id"));<NEW_LINE>service.setInterfaceName(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].InterfaceName"));<NEW_LINE>service.setModifiedTime(_ctx.longValue("FindOrderableListResponse.Data.ServiceList[" + i + "].ModifiedTime"));<NEW_LINE>service.setOwnerId(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].OwnerId"));<NEW_LINE>service.setPrincipalName(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].PrincipalName"));<NEW_LINE>service.setProjectId(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].ProjectId"));<NEW_LINE>service.setProjectName(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].ProjectName"));<NEW_LINE>service.setScope(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].Scope"));<NEW_LINE>service.setServiceName(_ctx.stringValue<MASK><NEW_LINE>service.setServiceVersion(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].ServiceVersion"));<NEW_LINE>service.setSkipAuth(_ctx.booleanValue("FindOrderableListResponse.Data.ServiceList[" + i + "].SkipAuth"));<NEW_LINE>service.setStatisticName(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].StatisticName"));<NEW_LINE>service.setStatus(_ctx.integerValue("FindOrderableListResponse.Data.ServiceList[" + i + "].Status"));<NEW_LINE>service.setUserId(_ctx.stringValue("FindOrderableListResponse.Data.ServiceList[" + i + "].UserId"));<NEW_LINE>serviceList.add(service);<NEW_LINE>}<NEW_LINE>data.setServiceList(serviceList);<NEW_LINE>findOrderableListResponse.setData(data);<NEW_LINE>return findOrderableListResponse;<NEW_LINE>}
("FindOrderableListResponse.Data.ServiceList[" + i + "].ServiceName"));
1,732,954
public RuleResult execute(Map<String, String> ruleParam, Map<String, String> resourceAttributes) {<NEW_LINE>logger.debug("========CheckAWSConfigEnabled started=========");<NEW_LINE>Map<String, Object> map = null;<NEW_LINE>AmazonConfigClient awsConfigClient = null;<NEW_LINE>String roleIdentifyingString = ruleParam.get(PacmanSdkConstants.Role_IDENTIFYING_STRING);<NEW_LINE>String severity = ruleParam.get(PacmanRuleConstants.SEVERITY);<NEW_LINE>String category = ruleParam.get(PacmanRuleConstants.CATEGORY);<NEW_LINE>// this is the logback Mapped Diagnostic Contex<NEW_LINE>MDC.put("executionId", ruleParam.get("executionId"));<NEW_LINE>// this is the logback Mapped Diagnostic Contex<NEW_LINE>MDC.put("ruleId", ruleParam.get(PacmanSdkConstants.RULE_ID));<NEW_LINE>List<LinkedHashMap<String, Object>> <MASK><NEW_LINE>LinkedHashMap<String, Object> issue = new LinkedHashMap<>();<NEW_LINE>if (!PacmanUtils.doesAllHaveValue(severity, category, roleIdentifyingString)) {<NEW_LINE>logger.info(PacmanRuleConstants.MISSING_CONFIGURATION);<NEW_LINE>throw new InvalidInputException(PacmanRuleConstants.MISSING_CONFIGURATION);<NEW_LINE>}<NEW_LINE>Annotation annotation = null;<NEW_LINE>try {<NEW_LINE>map = getClientFor(AWSService.CONFIG, roleIdentifyingString, ruleParam);<NEW_LINE>awsConfigClient = (AmazonConfigClient) map.get(PacmanSdkConstants.CLIENT);<NEW_LINE>// Check AWS Config Enabled<NEW_LINE>DescribeConfigurationRecordersResult describeConfigurationRecordersResult = awsConfigClient.describeConfigurationRecorders();<NEW_LINE>List<ConfigurationRecorder> configurationRecorders = describeConfigurationRecordersResult.getConfigurationRecorders();<NEW_LINE>if (CollectionUtils.isNullOrEmpty(configurationRecorders)) {<NEW_LINE>// Create an annotation if config is not enabled<NEW_LINE>annotation = Annotation.buildAnnotation(ruleParam, Annotation.Type.ISSUE);<NEW_LINE>annotation.put(PacmanSdkConstants.DESCRIPTION, "AWS Config not enabled");<NEW_LINE>annotation.put(PacmanRuleConstants.SEVERITY, severity);<NEW_LINE>annotation.put(PacmanRuleConstants.CATEGORY, category);<NEW_LINE>issue.put(PacmanRuleConstants.VIOLATION_REASON, "AWS Config not enabled");<NEW_LINE>issueList.add(issue);<NEW_LINE>annotation.put("issueDetails", issueList.toString());<NEW_LINE>logger.debug("========CheckAWSConfigEnabled ended with annotation {} :=========", annotation);<NEW_LINE>return new RuleResult(PacmanSdkConstants.STATUS_FAILURE, PacmanRuleConstants.FAILURE_MESSAGE, annotation);<NEW_LINE>} else {<NEW_LINE>logger.info("AWS Config enabled");<NEW_LINE>}<NEW_LINE>} catch (UnableToCreateClientException e) {<NEW_LINE>logger.error("unable to get client for following input", e);<NEW_LINE>throw new InvalidInputException(e.getMessage());<NEW_LINE>}<NEW_LINE>logger.debug("========CheckAWSConfigEnabled ended=========");<NEW_LINE>return new RuleResult(PacmanSdkConstants.STATUS_SUCCESS, PacmanRuleConstants.SUCCESS_MESSAGE);<NEW_LINE>}
issueList = new ArrayList<>();
853,320
private static void eulerToQuat(Tuple3d euler, Quat4d quat) {<NEW_LINE>// Implementation based on:<NEW_LINE>// http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770024290.pdf<NEW_LINE>// Rotation sequence: 231 (YZX)<NEW_LINE>double t1 = euler.y * Math.PI / 180;<NEW_LINE>double t2 = euler.z * Math.PI / 180;<NEW_LINE>double t3 = euler<MASK><NEW_LINE>double c1 = Math.cos(t1 / 2);<NEW_LINE>double s1 = Math.sin(t1 / 2);<NEW_LINE>double c2 = Math.cos(t2 / 2);<NEW_LINE>double s2 = Math.sin(t2 / 2);<NEW_LINE>double c3 = Math.cos(t3 / 2);<NEW_LINE>double s3 = Math.sin(t3 / 2);<NEW_LINE>double c1_c2 = c1 * c2;<NEW_LINE>double s2_s3 = s2 * s3;<NEW_LINE>quat.w = -s1 * s2_s3 + c1_c2 * c3;<NEW_LINE>quat.x = s1 * s2 * c3 + s3 * c1_c2;<NEW_LINE>quat.y = s1 * c2 * c3 + s2_s3 * c1;<NEW_LINE>quat.z = -s1 * s3 * c2 + s2 * c1 * c3;<NEW_LINE>quat.normalize();<NEW_LINE>}
.x * Math.PI / 180;
801,916
public void onLongPress(MotionEvent event) {<NEW_LINE>if (channel != null && channel.getType() != null && Channel.GroupType.GROUPOFTWO.getValue().equals(channel.getType())) {<NEW_LINE>String userId = ChannelService.getInstance(getActivity()).<MASK><NEW_LINE>if (!TextUtils.isEmpty(userId)) {<NEW_LINE>Contact newContact = appContactService.getContactById(userId);<NEW_LINE>if (newContact.isBlocked()) {<NEW_LINE>userBlockDialog(false, newContact, true);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (contact != null && contact.isBlocked()) {<NEW_LINE>userBlockDialog(false, contact, false);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (getActivity() instanceof ALStoragePermissionListener) {<NEW_LINE>if (((ALStoragePermissionListener) getActivity()).isPermissionGranted()) {<NEW_LINE>startRecording();<NEW_LINE>} else {<NEW_LINE>((ALStoragePermissionListener) getActivity()).checkPermission(new ALStoragePermission() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAction(boolean didGrant) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getGroupOfTwoReceiverUserId(channel.getKey());
1,721,235
@OutputTimeUnit(TimeUnit.MICROSECONDS)<NEW_LINE>public void concurrentIndexedTable() throws InterruptedException {<NEW_LINE>int numSegments = 10;<NEW_LINE>// make 1 concurrent table<NEW_LINE>IndexedTable concurrentIndexedTable = new ConcurrentIndexedTable(_dataSchema, _queryContext, TRIM_SIZE, TRIM_SIZE, TRIM_THRESHOLD);<NEW_LINE>// 10 parallel threads putting 10k records into the table<NEW_LINE><MASK><NEW_LINE>Future[] futures = new Future[numSegments];<NEW_LINE>for (int i = 0; i < numSegments; i++) {<NEW_LINE>futures[i] = _executorService.submit(new TraceRunnable() {<NEW_LINE><NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>@Override<NEW_LINE>public void runJob() {<NEW_LINE>for (int r = 0; r < NUM_RECORDS; r++) {<NEW_LINE>concurrentIndexedTable.upsert(getNewRecord());<NEW_LINE>}<NEW_LINE>operatorLatch.countDown();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>boolean opCompleted = operatorLatch.await(30, TimeUnit.SECONDS);<NEW_LINE>if (!opCompleted) {<NEW_LINE>System.out.println("Timed out............");<NEW_LINE>}<NEW_LINE>concurrentIndexedTable.finish(false);<NEW_LINE>} finally {<NEW_LINE>// Cancel all ongoing jobs<NEW_LINE>for (Future future : futures) {<NEW_LINE>if (!future.isDone()) {<NEW_LINE>future.cancel(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
CountDownLatch operatorLatch = new CountDownLatch(numSegments);
719,310
public Map<String, FilterExpression> parseTypedExpression(String path, MultivaluedMap<String, String> filterParams, String apiVersion) throws ParseException {<NEW_LINE>Map<String, FilterExpression> expressionByType = new HashMap<>();<NEW_LINE>for (MultivaluedMap.Entry<String, List<String>> entry : filterParams.entrySet()) {<NEW_LINE>String paramName = entry.getKey();<NEW_LINE>List<String> paramValues = entry.getValue();<NEW_LINE>Matcher matcher = TYPED_FILTER_PATTERN.matcher(paramName);<NEW_LINE>if (matcher.find()) {<NEW_LINE>String typeName = matcher.group(1);<NEW_LINE>if (paramValues.size() != 1) {<NEW_LINE>throw new ParseException("Exactly one RSQL expression must be defined for type : " + typeName);<NEW_LINE>}<NEW_LINE>Type entityType = dictionary.getEntityClass(typeName, apiVersion);<NEW_LINE>if (entityType == null) {<NEW_LINE>throw new ParseException(INVALID_QUERY_PARAMETER + paramName);<NEW_LINE>}<NEW_LINE>String <MASK><NEW_LINE>FilterExpression filterExpression = parseFilterExpression(expressionText, entityType, true);<NEW_LINE>expressionByType.put(typeName, filterExpression);<NEW_LINE>} else {<NEW_LINE>throw new ParseException(INVALID_QUERY_PARAMETER + paramName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return expressionByType;<NEW_LINE>}
expressionText = paramValues.get(0);
924,243
public void onStyleLoaded(@NonNull Style style) {<NEW_LINE>List<Feature> markerCoordinates = new ArrayList<>();<NEW_LINE>markerCoordinates.add(// Boston Common Park<NEW_LINE>Feature.// Boston Common Park<NEW_LINE>fromGeometry(Point.fromLngLat(-71.065634, 42.354950)));<NEW_LINE>markerCoordinates.add(// Fenway Park<NEW_LINE>Feature.// Fenway Park<NEW_LINE>fromGeometry(Point.fromLngLat(-71.097293, 42.346645)));<NEW_LINE>markerCoordinates.add(// The Paul Revere House<NEW_LINE>Feature.// The Paul Revere House<NEW_LINE>fromGeometry(Point.fromLngLat(-71.053694, 42.363725)));<NEW_LINE>style.addSource(new GeoJsonSource("marker-source", FeatureCollection.fromFeatures(markerCoordinates)));<NEW_LINE>// Add the marker image to map<NEW_LINE>style.addImage("my-marker-image", BitmapFactory.decodeResource(IconSizeChangeOnClickActivity.this.getResources()<MASK><NEW_LINE>// Adding an offset so that the bottom of the blue icon gets fixed to the coordinate, rather than the<NEW_LINE>// middle of the icon being fixed to the coordinate point.<NEW_LINE>style.addLayer(new SymbolLayer("marker-layer", "marker-source").withProperties(PropertyFactory.iconImage("my-marker-image"), iconAllowOverlap(true), iconOffset(new Float[] { 0f, -9f })));<NEW_LINE>// Add the selected marker source and layer<NEW_LINE>style.addSource(new GeoJsonSource("selected-marker"));<NEW_LINE>// Adding an offset so that the bottom of the blue icon gets fixed to the coordinate, rather than the<NEW_LINE>// middle of the icon being fixed to the coordinate point.<NEW_LINE>style.addLayer(new SymbolLayer("selected-marker-layer", "selected-marker").withProperties(PropertyFactory.iconImage("my-marker-image"), iconAllowOverlap(true), iconOffset(new Float[] { 0f, -9f })));<NEW_LINE>mapboxMap.addOnMapClickListener(IconSizeChangeOnClickActivity.this);<NEW_LINE>}
, R.drawable.blue_marker_view));
1,817,135
protected void loadFromXml(EwsXmlReader reader) throws Exception {<NEW_LINE>do {<NEW_LINE>reader.read();<NEW_LINE>if (reader.getNodeType().getNodeType() == XmlNodeType.START_ELEMENT) {<NEW_LINE>if (reader.getLocalName().equals(XmlElementNames.AccountType)) {<NEW_LINE>this.setAccountType(reader.readElementValue());<NEW_LINE>} else if (reader.getLocalName().equals(XmlElementNames.Action)) {<NEW_LINE><MASK><NEW_LINE>if (xmlResponseType.equals(OutlookAccount.Settings)) {<NEW_LINE>this.setResponseType(AutodiscoverResponseType.Success);<NEW_LINE>} else if (xmlResponseType.equals(OutlookAccount.RedirectUrl)) {<NEW_LINE>this.setResponseType(AutodiscoverResponseType.RedirectUrl);<NEW_LINE>} else if (xmlResponseType.equals(OutlookAccount.RedirectAddr)) {<NEW_LINE>this.setResponseType(AutodiscoverResponseType.RedirectAddress);<NEW_LINE>} else {<NEW_LINE>this.setResponseType(AutodiscoverResponseType.Error);<NEW_LINE>}<NEW_LINE>} else if (reader.getLocalName().equals(XmlElementNames.Protocol)) {<NEW_LINE>OutlookProtocol protocol = new OutlookProtocol();<NEW_LINE>protocol.loadFromXml(reader);<NEW_LINE>this.protocols.put(protocol.getProtocolType(), protocol);<NEW_LINE>} else if (reader.getLocalName().equals(XmlElementNames.RedirectAddr)) {<NEW_LINE>this.setRedirectTarget(reader.readElementValue());<NEW_LINE>} else if (reader.getLocalName().equals(XmlElementNames.RedirectUrl)) {<NEW_LINE>this.setRedirectTarget(reader.readElementValue());<NEW_LINE>} else if (reader.getLocalName().equals(XmlElementNames.AlternateMailboxes)) {<NEW_LINE>AlternateMailbox alternateMailbox = AlternateMailbox.loadFromXml(reader);<NEW_LINE>this.alternateMailboxes.getEntries().add(alternateMailbox);<NEW_LINE>} else {<NEW_LINE>reader.skipCurrentElement();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} while (!reader.isEndElement(XmlNamespace.NotSpecified, XmlElementNames.Account));<NEW_LINE>}
String xmlResponseType = reader.readElementValue();
930,395
protected List<Person> doInBackground(Account... accounts) {<NEW_LINE>if (mActivityRef.get() == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Context context = mActivityRef.get().getApplicationContext();<NEW_LINE>try {<NEW_LINE>GoogleAccountCredential credential = GoogleAccountCredential.usingOAuth2(context, Collections.singleton(CONTACTS_SCOPE));<NEW_LINE>credential.setSelectedAccount(accounts[0]);<NEW_LINE>PeopleService service = new PeopleService.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName("Google Sign In Quickstart").build();<NEW_LINE>ListConnectionsResponse connectionsResponse = service.people().connections().list("people/me").<MASK><NEW_LINE>return connectionsResponse.getConnections();<NEW_LINE>} catch (UserRecoverableAuthIOException recoverableException) {<NEW_LINE>if (mActivityRef.get() != null) {<NEW_LINE>mActivityRef.get().onRecoverableAuthException(recoverableException);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>Log.w(TAG, "getContacts:exception", e);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
setFields("names,emailAddresses").execute();
223,447
private String parseNumber(String info) {<NEW_LINE>boolean hasPoint = info.indexOf('.') != -1;<NEW_LINE>boolean hasComma = info.indexOf(',') != -1;<NEW_LINE>// delete thousands<NEW_LINE>if (hasComma && m_decimalPoint.equals("."))<NEW_LINE>info = info.replace(',', ' ');<NEW_LINE>if (hasPoint && m_decimalPoint.equals(","))<NEW_LINE>info = info.replace('.', ' ');<NEW_LINE>hasComma = info.indexOf(',') != -1;<NEW_LINE>// replace decimal<NEW_LINE>if (hasComma && m_decimalPoint.equals(","))<NEW_LINE>info = info.replace(',', '.');<NEW_LINE>// remove everything but digits & '.' & '-'<NEW_LINE>char[] charArray = info.toCharArray();<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>for (int i = 0; i < charArray.length; i++) if (Character.isDigit(charArray[i]) || charArray[i] == '.' || charArray[i] == '-')<NEW_LINE>sb.append(charArray[i]);<NEW_LINE>if (sb.length() == 0)<NEW_LINE>return "0";<NEW_LINE>BigDecimal bd = new BigDecimal(sb.toString());<NEW_LINE>if (// assumed two decimal scale<NEW_LINE>m_divideBy100)<NEW_LINE>bd = bd.divide(new BigDecimal(100.0<MASK><NEW_LINE>return bd.toString();<NEW_LINE>}
), 2, BigDecimal.ROUND_HALF_UP);
1,833,572
public Request<ListQueuesRequest> marshall(ListQueuesRequest listQueuesRequest) {<NEW_LINE>if (listQueuesRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<ListQueuesRequest> request = new DefaultRequest<ListQueuesRequest>(listQueuesRequest, "AmazonSQS");<NEW_LINE>request.addParameter("Action", "ListQueues");<NEW_LINE>request.addParameter("Version", "2012-11-05");<NEW_LINE><MASK><NEW_LINE>if (listQueuesRequest.getQueueNamePrefix() != null) {<NEW_LINE>request.addParameter("QueueNamePrefix", StringUtils.fromString(listQueuesRequest.getQueueNamePrefix()));<NEW_LINE>}<NEW_LINE>if (listQueuesRequest.getNextToken() != null) {<NEW_LINE>request.addParameter("NextToken", StringUtils.fromString(listQueuesRequest.getNextToken()));<NEW_LINE>}<NEW_LINE>if (listQueuesRequest.getMaxResults() != null) {<NEW_LINE>request.addParameter("MaxResults", StringUtils.fromInteger(listQueuesRequest.getMaxResults()));<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.setHttpMethod(HttpMethodName.POST);
577,300
public static void doRename(final PsiElement element, String newName, UsageInfo[] usages, final Project project, @Nullable final RefactoringElementListener listener) throws IncorrectOperationException {<NEW_LINE>final RenamePsiElementProcessor processor = RenamePsiElementProcessor.forElement(element);<NEW_LINE>final String fqn = element instanceof PsiFile ? ((PsiFile) element).getVirtualFile().getPath() : CopyReferenceAction.elementToFqn(element);<NEW_LINE>if (fqn != null) {<NEW_LINE>UndoableAction action = new BasicUndoableAction() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void undo() throws UnexpectedUndoException {<NEW_LINE>if (listener instanceof UndoRefactoringElementListener) {<NEW_LINE>((UndoRefactoringElementListener) listener<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void redo() throws UnexpectedUndoException {<NEW_LINE>}<NEW_LINE>};<NEW_LINE>UndoManager.getInstance(project).undoableActionPerformed(action);<NEW_LINE>}<NEW_LINE>processor.renameElement(element, newName, usages, listener);<NEW_LINE>}
).undoElementMovedOrRenamed(element, fqn);
1,492,745
public final DeclareHandlerContext declareHandler() throws RecognitionException {<NEW_LINE>DeclareHandlerContext _localctx = new DeclareHandlerContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 372, RULE_declareHandler);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(4298);<NEW_LINE>match(DECLARE);<NEW_LINE>setState(4299);<NEW_LINE>((DeclareHandlerContext) _localctx).handlerAction = _input.LT(1);<NEW_LINE><MASK><NEW_LINE>if (!(_la == CONTINUE || _la == EXIT || _la == UNDO)) {<NEW_LINE>((DeclareHandlerContext) _localctx).handlerAction = (Token) _errHandler.recoverInline(this);<NEW_LINE>} else {<NEW_LINE>if (_input.LA(1) == Token.EOF)<NEW_LINE>matchedEOF = true;<NEW_LINE>_errHandler.reportMatch(this);<NEW_LINE>consume();<NEW_LINE>}<NEW_LINE>setState(4300);<NEW_LINE>match(HANDLER);<NEW_LINE>setState(4301);<NEW_LINE>match(FOR);<NEW_LINE>setState(4302);<NEW_LINE>handlerConditionValue();<NEW_LINE>setState(4307);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>while (_la == COMMA) {<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(4303);<NEW_LINE>match(COMMA);<NEW_LINE>setState(4304);<NEW_LINE>handlerConditionValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(4309);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>setState(4310);<NEW_LINE>routineBody();<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
_la = _input.LA(1);
1,687,440
public boolean showDialog() {<NEW_LINE>final JButton okButton = new JButton();<NEW_LINE>// NOI18N<NEW_LINE>Mnemonics.setLocalizedText(okButton, NbBundle.getMessage(FinishPatch.class, "CTL_FinishPatch.ok.text"));<NEW_LINE>DialogDescriptor dd = new // NOI18N<NEW_LINE>// NOI18N<NEW_LINE>DialogDescriptor(// NOI18N<NEW_LINE>panel, NbBundle.getMessage(FinishPatch.class, "LBL_FinishPatchPanel.title", repository.getName()), true, new Object[] { okButton, DialogDescriptor.CANCEL_OPTION }, okButton, DialogDescriptor.DEFAULT_ALIGN, new HelpCtx<MASK><NEW_LINE>Dialog dialog = DialogDisplayer.getDefault().createDialog(dd);<NEW_LINE>okButton.setEnabled(false);<NEW_LINE>setInfo(null);<NEW_LINE>panel.lstPatches.addListSelectionListener(new ListSelectionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void valueChanged(ListSelectionEvent e) {<NEW_LINE>if (!e.getValueIsAdjusting()) {<NEW_LINE>Object selectedPatch = panel.lstPatches.getSelectedValue();<NEW_LINE>okButton.setEnabled(selectedPatch instanceof QPatch);<NEW_LINE>if (onTopPatch == null) {<NEW_LINE>// NOI18N<NEW_LINE>setInfo(NbBundle.getMessage(FinishPatch.class, "PatchSeriesPanel.lblInfo.noAppliedPatches"));<NEW_LINE>} else if (selectedPatch instanceof QPatch) {<NEW_LINE>// NOI18N<NEW_LINE>setInfo(NbBundle.getMessage(FinishPatch.class, "FinishPatchPanel.lblInfo.toFinishPatches", ((QPatch) selectedPatch).getId()));<NEW_LINE>} else {<NEW_LINE>setInfo(null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>panel.lstPatches.addMouseListener(new MouseAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseClicked(MouseEvent e) {<NEW_LINE>if (MouseUtils.isDoubleClick(e) && okButton.isEnabled()) {<NEW_LINE>okButton.doClick();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>loadPatches();<NEW_LINE>dialog.setVisible(true);<NEW_LINE>HgProgressSupport supp = this.support;<NEW_LINE>if (supp != null) {<NEW_LINE>supp.cancel();<NEW_LINE>}<NEW_LINE>return dd.getValue() == okButton;<NEW_LINE>}
(FinishPatch.class), null);
1,751,340
private static ksql.KsqlGrammarParser.StatementsContext parseStatements(final String sql) {<NEW_LINE>var lexer = new KsqlGrammarLexer(CaseInsensitiveStream.from(<MASK><NEW_LINE>var tokenStream = new CommonTokenStream(lexer);<NEW_LINE>var grammarParser = new ksql.KsqlGrammarParser(tokenStream);<NEW_LINE>lexer.addErrorListener(new BaseErrorListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {<NEW_LINE>throw new ValidationException("Invalid syntax: " + msg);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>grammarParser.getInterpreter().setPredictionMode(PredictionMode.LL);<NEW_LINE>try {<NEW_LINE>return grammarParser.statements();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ValidationException("Error parsing ksql query: " + e.getMessage());<NEW_LINE>}<NEW_LINE>}
CharStreams.fromString(sql)));
502,143
public Object clone() {<NEW_LINE>Object o = null;<NEW_LINE>try {<NEW_LINE>o = super.clone();<NEW_LINE>} catch (Exception e) {<NEW_LINE>com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.cache.CacheConfig", "314");<NEW_LINE>}<NEW_LINE>// --------------------------------------------------------------------<NEW_LINE>// Since the DistributedObjectCacheFactory is cloning baseBase config,<NEW_LINE>// we have to reset a few config items to prevent problems creating<NEW_LINE>// the new cache. The clone will contain everthing else from the<NEW_LINE>// donor.<NEW_LINE>// --------------------------------------------------------------------<NEW_LINE>((CacheConfig) o).cacheName = null;<NEW_LINE>((<MASK><NEW_LINE>((CacheConfig) o).cache = null;<NEW_LINE>((CacheConfig) o).distributedObjectCache = null;<NEW_LINE>((CacheConfig) o).enableServletSupport = false;<NEW_LINE>((CacheConfig) o).enableDiskOffload = false;<NEW_LINE>((CacheConfig) o).flushToDiskOnStop = false;<NEW_LINE>((CacheConfig) o).disableDependencyId = false;<NEW_LINE>((CacheConfig) o).disableTemplatesSupport = false;<NEW_LINE>return o;<NEW_LINE>}
CacheConfig) o).jndiName = null;
1,630,802
private void addOLCand0(@NonNull final OLCand candidate) {<NEW_LINE>if (currentOrderLine == null) {<NEW_LINE>currentOrderLine = newOrderLine(candidate);<NEW_LINE>}<NEW_LINE>currentOrderLine.setM_Warehouse_ID(WarehouseId.toRepoId(candidate.getWarehouseId()));<NEW_LINE>currentOrderLine.setM_Warehouse_Dest_ID(WarehouseId.toRepoId(candidate.getWarehouseDestId()));<NEW_LINE>// 08626: Propagate ProductDescription to C_OrderLine<NEW_LINE>currentOrderLine.setProductDescription(candidate.getProductDescription());<NEW_LINE>currentOrderLine.setLine(candidate.getLine());<NEW_LINE>currentOrderLine.setExternalId(candidate.getExternalLineId());<NEW_LINE>//<NEW_LINE>// Quantity<NEW_LINE>{<NEW_LINE>final Quantity currentQty = Quantitys.create(currentOrderLine.getQtyEntered(), UomId.ofRepoId(currentOrderLine.getC_UOM_ID()));<NEW_LINE>final Quantity newQtyEntered = Quantitys.add(UOMConversionContext.of(candidate.getM_Product_ID()), currentQty, candidate.getQty());<NEW_LINE>currentOrderLine.setQtyEntered(newQtyEntered.toBigDecimal());<NEW_LINE>currentOrderLine.setQtyItemCapacity(Quantitys.toBigDecimalOrNull(candidate.getQtyItemCapacityEff()));<NEW_LINE>final BigDecimal qtyOrdered = orderLineBL.convertQtyEnteredToStockUOM(currentOrderLine).toBigDecimal();<NEW_LINE>currentOrderLine.setQtyOrdered(qtyOrdered);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Prices<NEW_LINE>{<NEW_LINE>currentOrderLine.setInvoicableQtyBasedOn(candidate.getInvoicableQtyBasedOn().getRecordString());<NEW_LINE>currentOrderLine.setIsManualPrice(candidate.isManualPrice());<NEW_LINE>if (candidate.isManualPrice()) {<NEW_LINE>currentOrderLine.setPriceEntered(candidate.getPriceActual());<NEW_LINE>} else {<NEW_LINE>// leave it to the pricing engine<NEW_LINE>}<NEW_LINE>currentOrderLine.setIsManualDiscount(candidate.isManualDiscount());<NEW_LINE>if (candidate.isManualDiscount()) {<NEW_LINE>currentOrderLine.setDiscount(candidate.getDiscount());<NEW_LINE>}<NEW_LINE>if (candidate.isManualPrice() || candidate.isManualDiscount()) {<NEW_LINE>// FIXME: use price list's precision<NEW_LINE>final CurrencyId currencyId = CurrencyId.ofRepoIdOrNull(candidate.getC_Currency_ID());<NEW_LINE>final CurrencyPrecision stdPrecision = currencyId != null ? currencyDAO.getStdPrecision(currencyId) : ICurrencyDAO.DEFAULT_PRECISION;<NEW_LINE>orderLineBL.updatePriceActual(currentOrderLine, stdPrecision);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Attach the olCand's IProductPriceAttributeAware to the new order line, so that the rest of the system can know if it is supposed to guess an ASI and PIIP or not (task 08839)<NEW_LINE>{<NEW_LINE>final IAttributeSetInstanceAware orderLineASIAware = attributeSetInstanceAwareFactoryService.createOrNull(currentOrderLine);<NEW_LINE>Check.assumeNotNull(orderLineASIAware, "We can allways obtain a not-null ASI aware for C_OrderLine {} ", currentOrderLine);<NEW_LINE>attributePricingBL.setDynAttrProductPriceAttributeAware(orderLineASIAware, candidate);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Fire listeners<NEW_LINE>olCandListeners.onOrderLineCreated(candidate, currentOrderLine);<NEW_LINE>//<NEW_LINE>// Save the current order line<NEW_LINE>InterfaceWrapperHelper.save(currentOrderLine);<NEW_LINE>// Establishing a "real" link with FK-constraints between order candidate and order line (03472)<NEW_LINE>createOla(candidate, currentOrderLine);<NEW_LINE>final OrderLineGroup orderLineGroup = candidate.getOrderLineGroup();<NEW_LINE>if (orderLineGroup != null && !Check.isBlank(orderLineGroup.getGroupKey())) {<NEW_LINE>final OrderLineId orderLineId = OrderLineId.ofRepoId(currentOrderLine.getC_OrderLine_ID());<NEW_LINE>if (currentOrderLine.isGroupCompensationLine() || orderLineGroup.isGroupMainItem()) {<NEW_LINE>primaryOrderLineToGroup.put(orderLineId, orderLineGroup);<NEW_LINE>}<NEW_LINE>groupsToOrderLines.put(<MASK><NEW_LINE>}<NEW_LINE>//<NEW_LINE>orderLines.put(currentOrderLine.getC_OrderLine_ID(), currentOrderLine);<NEW_LINE>candidates.add(candidate);<NEW_LINE>}
orderLineGroup.getGroupKey(), orderLineId);
913,355
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.ibm.ws.sib.processor.impl.interfaces.DownstreamControl#sendFlushedMessage(com.ibm.ws.sib.utils.SIBUuid12)<NEW_LINE>*<NEW_LINE>* This is only called from attemptFlush() as flushQuery's are processed<NEW_LINE>* by the PubSubOuputHandler<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void sendFlushedMessage(SIBUuid8 ignore, SIBUuid12 streamID) throws SIResourceException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "sendFlushedMessage", <MASK><NEW_LINE>// This flush should be broadcast to all downstream neighbors<NEW_LINE>// for this cell as it is the result of a startFlush()<NEW_LINE>// This is a bit of a kludge since we may be sending flushes to cells<NEW_LINE>// which have no information about a stream.<NEW_LINE>HashMap allPubSubOutputHandlers = _destination.getAllPubSubOutputHandlers();<NEW_LINE>try {<NEW_LINE>Iterator itr = allPubSubOutputHandlers.values().iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>// Get the appropriate target cellule and forward the message<NEW_LINE>PubSubOutputHandler handler = (PubSubOutputHandler) itr.next();<NEW_LINE>// Note that the null Cellule we pass in here is ignored<NEW_LINE>// as each OutputHandler knows its targetCellule<NEW_LINE>handler.sendFlushedMessage(null, streamID);<NEW_LINE>// Also, tell the handler to remove any information for this<NEW_LINE>// stream since it's just been flushed.<NEW_LINE>handler.removeStream(streamID);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>// By calling the getAllPubSubOutputHandlers it will lock the<NEW_LINE>// handlers<NEW_LINE>_destination.unlockPubsubOutputHandlers();<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "sendFlushedMessage");<NEW_LINE>}
new Object[] { streamID });
1,273,969
private TemporaryJobBuilder job(final Job.Builder jobBuilder) {<NEW_LINE>final TemporaryJobBuilder builder = new TemporaryJobBuilder(deployer, jobPrefixFile.prefix(), prober, env, reportWriter.get(), jobBuilder);<NEW_LINE>if (config.hasPath("env")) {<NEW_LINE>final Config <MASK><NEW_LINE>for (final Entry<String, ConfigValue> entry : env.entrySet()) {<NEW_LINE>builder.env(entry.getKey(), entry.getValue().unwrapped());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (config.hasPath("version")) {<NEW_LINE>builder.version(config.getString("version"));<NEW_LINE>}<NEW_LINE>if (config.hasPath("image")) {<NEW_LINE>builder.image(config.getString("image"));<NEW_LINE>}<NEW_LINE>if (config.hasPath("command")) {<NEW_LINE>builder.command(getListByKey("command", config));<NEW_LINE>}<NEW_LINE>if (config.hasPath("host")) {<NEW_LINE>builder.host(config.getString("host"));<NEW_LINE>}<NEW_LINE>if (config.hasPath("deploy")) {<NEW_LINE>builder.deploy(getListByKey("deploy", config));<NEW_LINE>}<NEW_LINE>if (config.hasPath("imageInfoFile")) {<NEW_LINE>builder.imageFromInfoFile(config.getString("imageInfoFile"));<NEW_LINE>}<NEW_LINE>if (config.hasPath("registrationDomain")) {<NEW_LINE>builder.registrationDomain(config.getString("registrationDomain"));<NEW_LINE>}<NEW_LINE>// port and expires intentionally left out -- since expires is a specific point in time, I<NEW_LINE>// cannot imagine a config-file use for it, additionally for ports, I'm thinking that port<NEW_LINE>// allocations are not likely to be common -- but PR's welcome if I'm wrong. - drewc@spotify.com<NEW_LINE>builder.hostFilter(defaultHostFilter);<NEW_LINE>return builder;<NEW_LINE>}
env = config.getConfig("env");
1,103,738
public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE>if (evt != null && !evt.getPropertyName().equals(InstanceDataObject.PROP_COOKIE))<NEW_LINE>return;<NEW_LINE>if (contextL != null && bean != null) {<NEW_LINE>((BeanContext) bean).removeBeanContextMembershipListener(contextL);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>InstanceCookie ic = dobj.getCookie(InstanceCookie.class);<NEW_LINE>if (ic == null) {<NEW_LINE>bean = null;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Class<?> clazz = ic.instanceClass();<NEW_LINE>if (BeanContext.class.isAssignableFrom(clazz)) {<NEW_LINE>bean = ic.instanceCreate();<NEW_LINE>} else if (BeanContextProxy.class.isAssignableFrom(clazz)) {<NEW_LINE>bean = ((BeanContextProxy) dobj.<MASK><NEW_LINE>} else {<NEW_LINE>bean = null;<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>bean = null;<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>if (bean != null) {<NEW_LINE>// attaches a listener to the bean<NEW_LINE>((BeanContext) bean).addBeanContextMembershipListener(contextL);<NEW_LINE>}<NEW_LINE>updateKeys();<NEW_LINE>}
instanceCreate()).getBeanContextProxy();
976,982
static Map<String, UserAgentParser> createUserAgentParsers(Path userAgentConfigDirectory, UserAgentCache cache) throws IOException {<NEW_LINE>Map<String, UserAgentParser> <MASK><NEW_LINE>UserAgentParser defaultParser = new UserAgentParser(DEFAULT_PARSER_NAME, IngestUserAgentPlugin.class.getResourceAsStream("/regexes.yml"), cache);<NEW_LINE>userAgentParsers.put(DEFAULT_PARSER_NAME, defaultParser);<NEW_LINE>if (Files.exists(userAgentConfigDirectory) && Files.isDirectory(userAgentConfigDirectory)) {<NEW_LINE>PathMatcher pathMatcher = userAgentConfigDirectory.getFileSystem().getPathMatcher("glob:**.yml");<NEW_LINE>try (Stream<Path> regexFiles = Files.find(userAgentConfigDirectory, 1, (path, attr) -> attr.isRegularFile() && pathMatcher.matches(path))) {<NEW_LINE>Iterable<Path> iterable = regexFiles::iterator;<NEW_LINE>for (Path path : iterable) {<NEW_LINE>String parserName = path.getFileName().toString();<NEW_LINE>try (InputStream regexStream = Files.newInputStream(path, StandardOpenOption.READ)) {<NEW_LINE>userAgentParsers.put(parserName, new UserAgentParser(parserName, regexStream, cache));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Collections.unmodifiableMap(userAgentParsers);<NEW_LINE>}
userAgentParsers = new HashMap<>();
944,490
public static void startService(Context context, String referrer) {<NEW_LINE>if (context == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {<NEW_LINE>Intent intent = new Intent(context, InstallationReferrerService.class);<NEW_LINE>if (referrer != null) {<NEW_LINE>intent.putExtra(ARG_REFERRER, referrer);<NEW_LINE>}<NEW_LINE>context.startService(intent);<NEW_LINE>} else {<NEW_LINE>// schedule the JobService here for API >= 26. The JobScheduler is available since API 21, but<NEW_LINE>// since we are only using it elsewhere on API >= 26 to not break old behavior for pre-existing services,<NEW_LINE>// let's stick to that version as well here.<NEW_LINE>ComponentName componentName = new ComponentName(context, InstallationReferrerJobService.class);<NEW_LINE>PersistableBundle extras = new PersistableBundle();<NEW_LINE>if (referrer != null) {<NEW_LINE>extras.putString(ARG_REFERRER, referrer);<NEW_LINE>}<NEW_LINE>JobInfo jobInfo = // if possible, try to run right away<NEW_LINE>new JobInfo.Builder(JOB_INSTALL_REFERRER_SERVICE_ID, componentName).setRequiresCharging(false).setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY).// if possible, try to run right away<NEW_LINE>setOverrideDeadline(0).setExtras(extras).build();<NEW_LINE>JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);<NEW_LINE>int resultCode = jobScheduler.schedule(jobInfo);<NEW_LINE>if (resultCode == JobScheduler.RESULT_SUCCESS) {<NEW_LINE>AppLog.i(<MASK><NEW_LINE>} else {<NEW_LINE>AppLog.e(AppLog.T.UTILS, "installation referrer job service > job could not be scheduled");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
AppLog.T.UTILS, "installation referrer job service > job scheduled");
532,244
private IfcModel realCheckout(Project project, Revision revision, DatabaseSession databaseSession, User user) throws BimserverLockConflictException, BimserverDatabaseException, UserException {<NEW_LINE>PluginConfiguration serializerPluginConfiguration = getDatabaseSession().get(StorePackage.eINSTANCE.getPluginConfiguration(), serializerOid, OldQuery.getDefault());<NEW_LINE>final long totalSize = revision.getSize();<NEW_LINE>final AtomicLong total = new AtomicLong();<NEW_LINE>IfcModelSet ifcModelSet = new IfcModelSet();<NEW_LINE>PackageMetaData lastPackageMetaData = null;<NEW_LINE>for (ConcreteRevision subRevision : revision.getConcreteRevisions()) {<NEW_LINE>PackageMetaData packageMetaData = getBimServer().getMetaDataManager().getPackageMetaData(subRevision.getProject().getSchema());<NEW_LINE>lastPackageMetaData = packageMetaData;<NEW_LINE>IfcModel subModel = new BasicIfcModel(packageMetaData, null);<NEW_LINE>int highestStopId = findHighestStopRid(project, subRevision);<NEW_LINE>OldQuery query = new OldQuery(packageMetaData, subRevision.getProject().getId(), subRevision.getId(), revision.getOid(), Deep.YES, highestStopId);<NEW_LINE>subModel.addChangeListener(new IfcModelChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void objectAdded(IdEObject idEObject) {<NEW_LINE>total.incrementAndGet();<NEW_LINE>if (totalSize == 0) {<NEW_LINE>setProgress("Preparing checkout...", 0);<NEW_LINE>} else {<NEW_LINE>setProgress("Preparing checkout...", (int) Math.round(100.0 * total.get() / totalSize));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>getDatabaseSession().getMap(subModel, query);<NEW_LINE>try {<NEW_LINE>checkGeometry(serializerPluginConfiguration, getBimServer().getPluginManager(), subModel, project, subRevision, revision);<NEW_LINE>} catch (GeometryGeneratingException e) {<NEW_LINE>throw new UserException(e);<NEW_LINE>}<NEW_LINE>subModel.getModelMetaData().<MASK><NEW_LINE>ifcModelSet.add(subModel);<NEW_LINE>}<NEW_LINE>IfcModelInterface ifcModel = new BasicIfcModel(lastPackageMetaData, null);<NEW_LINE>if (ifcModelSet.size() > 1) {<NEW_LINE>try {<NEW_LINE>ifcModel = getBimServer().getMergerFactory().createMerger(getDatabaseSession(), getAuthorization().getUoid()).merge(revision.getProject(), ifcModelSet, new ModelHelper(getBimServer().getMetaDataManager(), ifcModel));<NEW_LINE>} catch (MergeException e) {<NEW_LINE>throw new UserException(e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>ifcModel = ifcModelSet.iterator().next();<NEW_LINE>}<NEW_LINE>ifcModel.getModelMetaData().setName(project.getName() + "." + revision.getId());<NEW_LINE>ifcModel.getModelMetaData().setRevisionId(project.getRevisions().indexOf(revision) + 1);<NEW_LINE>ifcModel.getModelMetaData().setAuthorizedUser(user.getName());<NEW_LINE>ifcModel.getModelMetaData().setDate(new Date());<NEW_LINE>return (IfcModel) ifcModel;<NEW_LINE>}
setDate(subRevision.getDate());
964,514
public static Bitmap thumbnail(Document mDocument, int size, int page) {<NEW_LINE>int mWidthTwip = (int) mDocument.getDocumentWidth();<NEW_LINE>int mHeightTwip = (int) (mDocument.getDocumentHeight() / mDocument.getParts());<NEW_LINE>if (mDocument.getDocumentType() == Document.DOCTYPE_PRESENTATION) {<NEW_LINE>mDocument.setPart(page - 1);<NEW_LINE>mHeightTwip = (int<MASK><NEW_LINE>page = 1;<NEW_LINE>}<NEW_LINE>int widthPixel = mWidthTwip;<NEW_LINE>int heightPixel = mHeightTwip;<NEW_LINE>if (widthPixel > heightPixel) {<NEW_LINE>double ratio = heightPixel / (double) widthPixel;<NEW_LINE>widthPixel = size;<NEW_LINE>heightPixel = (int) (widthPixel * ratio);<NEW_LINE>} else {<NEW_LINE>double ratio = widthPixel / (double) heightPixel;<NEW_LINE>heightPixel = size;<NEW_LINE>widthPixel = (int) (heightPixel * ratio);<NEW_LINE>}<NEW_LINE>ByteBuffer buffer = ByteBuffer.allocateDirect(widthPixel * heightPixel * 4);<NEW_LINE>if (mDocument != null)<NEW_LINE>mDocument.paintTile(buffer, widthPixel, heightPixel, 0, (page - 1) * mHeightTwip, mWidthTwip, mHeightTwip);<NEW_LINE>Bitmap bitmap = Bitmap.createBitmap(widthPixel, heightPixel, Bitmap.Config.ARGB_8888);<NEW_LINE>bitmap.copyPixelsFromBuffer(buffer);<NEW_LINE>return bitmap;<NEW_LINE>}
) (mDocument.getDocumentHeight());
1,088,011
public void updatePopup() {<NEW_LINE>int modelSize = rModel.getSize();<NEW_LINE>// plug this popup into layered pane if needed<NEW_LINE>JLayeredPane <MASK><NEW_LINE>// lPane can be null when the corresponding dialog is closed already<NEW_LINE>// for example, when the user didn't want to wait until the search finishes<NEW_LINE>if (!isDisplayable() && (lPane != null)) {<NEW_LINE>lPane.add(this, Integer.valueOf(JLayeredPane.POPUP_LAYER + 1));<NEW_LINE>}<NEW_LINE>boolean statusVisible = updateStatusPanel();<NEW_LINE>if (lPane != null) {<NEW_LINE>computePopupBounds(popupBounds, lPane, modelSize);<NEW_LINE>setBounds(popupBounds);<NEW_LINE>}<NEW_LINE>// popup visibility constraints<NEW_LINE>if ((modelSize > 0 || statusVisible) && comboBar.isTextFieldFocusOwner()) {<NEW_LINE>if (jList1.getSelectedIndex() >= modelSize) {<NEW_LINE>jList1.setSelectedIndex(modelSize - 1);<NEW_LINE>}<NEW_LINE>setVisible(true);<NEW_LINE>} else {<NEW_LINE>setVisible(false);<NEW_LINE>}<NEW_LINE>// needed on JDK 1.5.x to repaint correctly<NEW_LINE>revalidate();<NEW_LINE>}
lPane = JLayeredPane.getLayeredPaneAbove(comboBar);
528,481
public static String format(final String message, final boolean supportsColors) {<NEW_LINE>return (String) OVariableParser.resolveVariables(message, "$ANSI{", "}", new OVariableParserListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object resolve(final String iVariable) {<NEW_LINE>final int pos = iVariable.indexOf(' ');<NEW_LINE>final String text = pos > -1 ? iVariable.substring(pos + 1) : "";<NEW_LINE>if (supportsColors) {<NEW_LINE>final String code = pos > -1 ? iVariable.substring(0, pos) : iVariable;<NEW_LINE>final StringBuilder buffer = new StringBuilder();<NEW_LINE>final String[] codes = code.split(":");<NEW_LINE>for (int i = 0; i < codes.length; ++i) buffer.append(OAnsiCode.valueOf(codes[i].<MASK><NEW_LINE>if (pos > -1) {<NEW_LINE>buffer.append(text);<NEW_LINE>buffer.append(OAnsiCode.RESET);<NEW_LINE>}<NEW_LINE>return buffer.toString();<NEW_LINE>}<NEW_LINE>return text;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
toUpperCase(Locale.ENGLISH)));
130,369
private Object jpql(Business business, Statement statement, Runtime runtime) throws Exception {<NEW_LINE>Object data = null;<NEW_LINE>Class<? extends JpaObject> cls = this.clazz(business, statement);<NEW_LINE>EntityManager em;<NEW_LINE>if (StringUtils.equalsIgnoreCase(statement.getEntityCategory(), Statement.ENTITYCATEGORY_DYNAMIC) && StringUtils.equalsIgnoreCase(statement.getType(), Statement.TYPE_SELECT)) {<NEW_LINE>em = business.entityManagerContainer().get(DynamicBaseEntity.class);<NEW_LINE>} else {<NEW_LINE>em = business.entityManagerContainer().get(cls);<NEW_LINE>}<NEW_LINE>Query query = em.createQuery(statement.getData());<NEW_LINE>for (Parameter<?> p : query.getParameters()) {<NEW_LINE>if (runtime.hasParameter(p.getName())) {<NEW_LINE>query.setParameter(p.getName(), runtime.getParameter(p.getName()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (StringUtils.equalsIgnoreCase(statement.getType(), Statement.TYPE_SELECT)) {<NEW_LINE>if (isPageSql(statement.getData())) {<NEW_LINE>query.setFirstResult((runtime.page - 1) * runtime.size);<NEW_LINE>query.setMaxResults(runtime.size);<NEW_LINE>}<NEW_LINE>data = query.getResultList();<NEW_LINE>} else {<NEW_LINE>business.entityManagerContainer().beginTransaction(cls);<NEW_LINE>data = Integer.valueOf(query.executeUpdate());<NEW_LINE>business<MASK><NEW_LINE>}<NEW_LINE>return data;<NEW_LINE>}
.entityManagerContainer().commit();
1,641,576
public boolean verifyContact(DHTTransportContact c, boolean direct) {<NEW_LINE>boolean ok;<NEW_LINE>if (c.getRandomIDType() == DHTTransportContact.RANDOM_ID_TYPE1) {<NEW_LINE>ok = c.getRandomID() == generateSpoofID(c);<NEW_LINE>} else {<NEW_LINE>byte[] r1 = c.getRandomID2();<NEW_LINE>byte<MASK><NEW_LINE>if (r1 == null && r2 == null) {<NEW_LINE>ok = true;<NEW_LINE>} else if (r1 == null || r2 == null) {<NEW_LINE>ok = false;<NEW_LINE>} else {<NEW_LINE>ok = Arrays.equals(r1, r2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (DHTLog.CONTACT_VERIFY_TRACE) {<NEW_LINE>System.out.println(" net " + transport.getNetwork() + "," + (direct ? "direct" : "indirect") + " verify for " + c.getName() + " -> " + ok + ", version = " + c.getProtocolVersion());<NEW_LINE>}<NEW_LINE>return (ok);<NEW_LINE>}
[] r2 = generateSpoofID2(c);
380,113
public String doRegisterURI(final String selectorName, final List<URIRegisterDTO> uriList) {<NEW_LINE>if (CollectionUtils.isEmpty(uriList)) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>SelectorDO selectorDO = selectorService.findByNameAndPluginName(selectorName, PluginNameAdapter.rpcTypeAdapter(rpcType()));<NEW_LINE>if (Objects.isNull(selectorDO)) {<NEW_LINE>throw new ShenyuException("doRegister Failed to execute,wait to retry.");<NEW_LINE>}<NEW_LINE>// fetch UPSTREAM_MAP data from db<NEW_LINE>// upstreamCheckService.fetchUpstreamData();<NEW_LINE>// update upstream<NEW_LINE>List<URIRegisterDTO> validUriList = uriList.stream().filter(dto -> Objects.nonNull(dto.getPort()) && StringUtils.isNotBlank(dto.getHost())).collect(Collectors.toList());<NEW_LINE>String <MASK><NEW_LINE>if (handler != null) {<NEW_LINE>selectorDO.setHandle(handler);<NEW_LINE>SelectorData selectorData = selectorService.buildByName(selectorName, PluginNameAdapter.rpcTypeAdapter(rpcType()));<NEW_LINE>selectorData.setHandle(handler);<NEW_LINE>// update db<NEW_LINE>selectorService.updateSelective(selectorDO);<NEW_LINE>// publish change event.<NEW_LINE>eventPublisher.publishEvent(new DataChangedEvent(ConfigGroupEnum.SELECTOR, DataEventTypeEnum.UPDATE, Collections.singletonList(selectorData)));<NEW_LINE>}<NEW_LINE>return ShenyuResultMessage.SUCCESS;<NEW_LINE>}
handler = buildHandle(validUriList, selectorDO);
1,423,092
private <T> void consumeTagValue(TagValue tagValue, StateTag<Long> stateTag) {<NEW_LINE>CoderAndFuture<T> coderAndFuture = getWaiting(stateTag, false);<NEW_LINE>SettableFuture<T> future = coderAndFuture.getNonDoneFuture(stateTag);<NEW_LINE>Coder<T> coder = coderAndFuture.getAndClearCoder();<NEW_LINE>if (tagValue.hasValue() && tagValue.getValue().hasData() && !tagValue.getValue().getData().isEmpty()) {<NEW_LINE>InputStream inputStream = tagValue.getValue()<MASK><NEW_LINE>try {<NEW_LINE>T value = coder.decode(inputStream, Coder.Context.OUTER);<NEW_LINE>future.set(value);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new IllegalStateException("Unable to decode value using " + coder, e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>future.set(null);<NEW_LINE>}<NEW_LINE>}
.getData().newInput();
222,805
public BranchRegisterRequestProto convert2Proto(BranchRegisterRequest branchRegisterRequest) {<NEW_LINE>final short typeCode = branchRegisterRequest.getTypeCode();<NEW_LINE>final AbstractMessageProto abstractMessage = AbstractMessageProto.newBuilder().setMessageType(MessageTypeProto.forNumber(typeCode)).build();<NEW_LINE>final AbstractTransactionRequestProto abstractTransactionRequestProto = AbstractTransactionRequestProto.newBuilder().setAbstractMessage(abstractMessage).build();<NEW_LINE>final String applicationData = branchRegisterRequest.getApplicationData();<NEW_LINE>final String resourceId = branchRegisterRequest.getResourceId();<NEW_LINE>final <MASK><NEW_LINE>BranchRegisterRequestProto result = BranchRegisterRequestProto.newBuilder().setAbstractTransactionRequest(abstractTransactionRequestProto).setApplicationData(applicationData == null ? "" : applicationData).setBranchType(BranchTypeProto.valueOf(branchRegisterRequest.getBranchType().name())).setLockKey(lockKey == null ? "" : lockKey).setResourceId(resourceId == null ? "" : resourceId).setXid(branchRegisterRequest.getXid()).build();<NEW_LINE>return result;<NEW_LINE>}
String lockKey = branchRegisterRequest.getLockKey();
614,867
static boolean validateAndRenameFileOnce(final AbstractFile thisFile, final SecurityContext securityContext, final ErrorBuffer errorBuffer) throws FrameworkException {<NEW_LINE>final PropertyKey<String> pathKey = StructrApp.key(AbstractFile.class, "path");<NEW_LINE>boolean valid = AbstractFile.validatePath(thisFile, securityContext, null);<NEW_LINE>if (!valid) {<NEW_LINE>final Logger logger = LoggerFactory.getLogger(AbstractFile.class);<NEW_LINE>final String originalPath = thisFile.getProperty(pathKey);<NEW_LINE>final String newName = getRenamedFilename(thisFile.getProperty(AbstractFile.name));<NEW_LINE>thisFile.<MASK><NEW_LINE>valid = AbstractFile.validatePath(thisFile, securityContext, errorBuffer);<NEW_LINE>if (valid) {<NEW_LINE>logger.warn("File {} already exists, renaming to {}", new Object[] { originalPath, newName });<NEW_LINE>} else {<NEW_LINE>logger.warn("File {} already existed. Tried renaming to {} and failed. Aborting.", new Object[] { originalPath, newName });<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return valid;<NEW_LINE>}
setProperty(AbstractNode.name, newName);
1,005,730
protected void construct() {<NEW_LINE>sa = new int[N];<NEW_LINE>sa2 = new int[N];<NEW_LINE>rank = new int[N];<NEW_LINE>c = new int[Math.max(alphabetSize, N)];<NEW_LINE>int i, p, r;<NEW_LINE>for (i = 0; i < N; ++i) c[rank[i] = T[i]]++;<NEW_LINE>for (i = 1; i < alphabetSize; ++i) c[i] += c[i - 1];<NEW_LINE>for (i = N - 1; i >= 0; --i) sa[--c[T[i]]] = i;<NEW_LINE>for (p = 1; p < N; p <<= 1) {<NEW_LINE>for (r = 0, i = N - p; i < N; ++i) sa2[r++] = i;<NEW_LINE>for (i = 0; i < N; ++i) if (sa[i] >= p)<NEW_LINE>sa2[r++] = sa[i] - p;<NEW_LINE>java.util.Arrays.fill(c, 0, alphabetSize, 0);<NEW_LINE>for (i = 0; i < N; ++i) c[rank[i]]++;<NEW_LINE>for (i = 1; i < alphabetSize; ++i) c[i] += c[i - 1];<NEW_LINE>for (i = N - 1; i >= 0; --i) sa[--c[rank[sa2[i]<MASK><NEW_LINE>for (sa2[sa[0]] = r = 0, i = 1; i < N; ++i) {<NEW_LINE>if (!(rank[sa[i - 1]] == rank[sa[i]] && sa[i - 1] + p < N && sa[i] + p < N && rank[sa[i - 1] + p] == rank[sa[i] + p]))<NEW_LINE>r++;<NEW_LINE>sa2[sa[i]] = r;<NEW_LINE>}<NEW_LINE>tmp = rank;<NEW_LINE>rank = sa2;<NEW_LINE>sa2 = tmp;<NEW_LINE>if (r == N - 1)<NEW_LINE>break;<NEW_LINE>alphabetSize = r + 1;<NEW_LINE>}<NEW_LINE>}
]]] = sa2[i];
534,580
public void handle(JsonNode packet) {<NEW_LINE>long channelId = packet.<MASK><NEW_LINE>long messageId = packet.get("message_id").asLong();<NEW_LINE>long userId = packet.get("user_id").asLong();<NEW_LINE>String serverId = packet.hasNonNull("guild_id") ? packet.get("guild_id").asText() : null;<NEW_LINE>TextChannel channel;<NEW_LINE>if (serverId == null) {<NEW_LINE>// if private channel:<NEW_LINE>channel = PrivateChannelImpl.getOrCreatePrivateChannel(api, channelId, userId, null);<NEW_LINE>} else {<NEW_LINE>channel = api.getTextChannelById(channelId).orElse(null);<NEW_LINE>}<NEW_LINE>if (channel == null) {<NEW_LINE>LoggerUtil.logMissingChannel(logger, channelId);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Optional<Server> server = api.getServerById(serverId);<NEW_LINE>Member member = null;<NEW_LINE>if (packet.hasNonNull("member") && server.isPresent()) {<NEW_LINE>member = new MemberImpl(api, (ServerImpl) server.get(), packet.get("member"), null);<NEW_LINE>}<NEW_LINE>Optional<Message> message = api.getCachedMessageById(messageId);<NEW_LINE>Emoji emoji;<NEW_LINE>JsonNode emojiJson = packet.get("emoji");<NEW_LINE>if (!emojiJson.has("id") || emojiJson.get("id").isNull()) {<NEW_LINE>emoji = UnicodeEmojiImpl.fromString(emojiJson.get("name").asText());<NEW_LINE>} else {<NEW_LINE>emoji = api.getKnownCustomEmojiOrCreateCustomEmoji(emojiJson);<NEW_LINE>}<NEW_LINE>message.ifPresent(msg -> ((MessageImpl) msg).addReaction(emoji, userId == api.getYourself().getId()));<NEW_LINE>ReactionAddEvent event = new ReactionAddEventImpl(api, messageId, channel, emoji, userId, member);<NEW_LINE>api.getEventDispatcher().dispatchReactionAddEvent(server.map(DispatchQueueSelector.class::cast).orElse(api), messageId, server.orElse(null), channel, userId, event);<NEW_LINE>}
get("channel_id").asLong();
894,139
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String path0, String path1) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>String executorSeed = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Work work = emc.fetch(id, Work.class, ListTools.toList(Work.job_FIELDNAME));<NEW_LINE>if (null == work) {<NEW_LINE>throw new ExceptionEntityNotExist(id, Work.class);<NEW_LINE>}<NEW_LINE>executorSeed = work.getJob();<NEW_LINE>}<NEW_LINE>Callable<String> callable = new Callable<String>() {<NEW_LINE><NEW_LINE>public String call() throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Work work = emc.find(id, Work.class);<NEW_LINE>if (null == work) {<NEW_LINE>throw new ExceptionEntityNotExist(id, Work.class);<NEW_LINE>}<NEW_LINE>wo.setId(work.getId());<NEW_LINE>deleteData(<MASK><NEW_LINE>}<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>};<NEW_LINE>ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}
business, work, path0, path1);
73,687
public static DescribeWebLockBindListResponse unmarshall(DescribeWebLockBindListResponse describeWebLockBindListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeWebLockBindListResponse.setRequestId(_ctx.stringValue("DescribeWebLockBindListResponse.RequestId"));<NEW_LINE>describeWebLockBindListResponse.setPageSize(_ctx.integerValue("DescribeWebLockBindListResponse.PageSize"));<NEW_LINE>describeWebLockBindListResponse.setCurrentPage(_ctx.integerValue("DescribeWebLockBindListResponse.CurrentPage"));<NEW_LINE>describeWebLockBindListResponse.setTotalCount(_ctx.integerValue("DescribeWebLockBindListResponse.TotalCount"));<NEW_LINE>List<Bind> bindList = new ArrayList<Bind>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeWebLockBindListResponse.BindList.Length"); i++) {<NEW_LINE>Bind bind = new Bind();<NEW_LINE>bind.setUuid(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].Uuid"));<NEW_LINE>bind.setInstanceName(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].InstanceName"));<NEW_LINE>bind.setInternetIp(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].InternetIp"));<NEW_LINE>bind.setIntranetIp(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].IntranetIp"));<NEW_LINE>bind.setOs(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].Os"));<NEW_LINE>bind.setDirCount(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].DirCount"));<NEW_LINE>bind.setServiceStatus(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].ServiceStatus"));<NEW_LINE>bind.setServiceCode(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].ServiceCode"));<NEW_LINE>bind.setServiceDetail(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].ServiceDetail"));<NEW_LINE>bind.setStatus(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].Status"));<NEW_LINE>bind.setPercent(_ctx.integerValue("DescribeWebLockBindListResponse.BindList[" + i + "].Percent"));<NEW_LINE>bind.setAuditCount(_ctx.stringValue("DescribeWebLockBindListResponse.BindList[" + i + "].AuditCount"));<NEW_LINE>bind.setBlockCount(_ctx.stringValue<MASK><NEW_LINE>bindList.add(bind);<NEW_LINE>}<NEW_LINE>describeWebLockBindListResponse.setBindList(bindList);<NEW_LINE>return describeWebLockBindListResponse;<NEW_LINE>}
("DescribeWebLockBindListResponse.BindList[" + i + "].BlockCount"));
326,576
public Optional<String> parsePackage(Path androidManifestPath) {<NEW_LINE>Optional<Document> manifestDocument = readAndroidManifestDocument(projectFilesystem.getPathForRelativePath(androidManifestPath));<NEW_LINE>if (!manifestDocument.isPresent()) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>String packageName = null;<NEW_LINE>try {<NEW_LINE>XPath xPath = XPathFactory<MASK><NEW_LINE>NodeList manifestNodes = (NodeList) xPath.evaluate("/manifest", manifestDocument.get(), XPathConstants.NODESET);<NEW_LINE>if (manifestNodes.getLength() > 0) {<NEW_LINE>Node manifestNode = manifestNodes.item(0);<NEW_LINE>NamedNodeMap attrs = manifestNode.getAttributes();<NEW_LINE>if (attrs.getLength() > 0) {<NEW_LINE>Node packageAttribute = manifestNode.getAttributes().getNamedItem("package");<NEW_LINE>if (packageAttribute != null) {<NEW_LINE>packageName = packageAttribute.getNodeValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (XPathExpressionException e) {<NEW_LINE>LOG.debug(e, "Cannot find package attribute in the manifest %s", androidManifestPath);<NEW_LINE>}<NEW_LINE>return Optional.ofNullable(packageName);<NEW_LINE>}
.newInstance().newXPath();
1,663,979
public void accept(ReconcileProblem problem) {<NEW_LINE>try {<NEW_LINE>DiagnosticSeverity severity = getDiagnosticSeverity(problem);<NEW_LINE>if (severity != null) {<NEW_LINE>Diagnostic d = new Diagnostic();<NEW_LINE>d.setCode(problem.getCode());<NEW_LINE>d.setMessage(problem.getMessage());<NEW_LINE>Range rng = doc.toRange(problem.getOffset(), problem.getLength());<NEW_LINE>d.setRange(rng);<NEW_LINE>d.setSeverity(severity);<NEW_LINE>d.<MASK><NEW_LINE>List<QuickfixData<?>> fixes = problem.getQuickfixes();<NEW_LINE>if (CollectionUtil.hasElements(fixes)) {<NEW_LINE>for (QuickfixData<?> fix : fixes) {<NEW_LINE>quickfixes.add(new Quickfix<>(CODE_ACTION_COMMAND_ID, d, fix));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>diagnostics.add(d);<NEW_LINE>}<NEW_LINE>} catch (BadLocationException e) {<NEW_LINE>log.warn("Invalid reconcile problem ignored", e);<NEW_LINE>}<NEW_LINE>}
setSource(getServer().EXTENSION_ID);
1,354,187
public Map<TopicPartition, Long> read() throws IOException {<NEW_LINE>synchronized (lock) {<NEW_LINE>try (final BufferedReader reader = Files.newBufferedReader(file.toPath())) {<NEW_LINE>final int oldVersion = readInt(reader);<NEW_LINE>if (oldVersion == version) {<NEW_LINE>final int expectedSize = readInt(reader);<NEW_LINE>final Map<TopicPartition, Long> offsets = new HashMap<>();<NEW_LINE>String line = reader.readLine();<NEW_LINE>while (line != null) {<NEW_LINE>final String[] pieces = WHITESPACE_MINIMUM_ONCE.split(line);<NEW_LINE>if (pieces.length != 3) {<NEW_LINE>throw new IOException(String.format("Malformed line in offset checkpoint file: '%s'.", line));<NEW_LINE>}<NEW_LINE>final String topic = pieces[0];<NEW_LINE>final int partition = Integer.parseInt(pieces[1]);<NEW_LINE>final TopicPartition tp = new TopicPartition(topic, partition);<NEW_LINE>final long offset = Long.parseLong(pieces[2]);<NEW_LINE>if (offset >= 0L) {<NEW_LINE>offsets.put(tp, offset);<NEW_LINE>} else {<NEW_LINE>LOG.warn("Read offset={} from checkpoint file for {}", offset, tp);<NEW_LINE>}<NEW_LINE>line = reader.readLine();<NEW_LINE>}<NEW_LINE>if (offsets.size() != expectedSize) {<NEW_LINE>throw new IOException(String.format("Expected %d entries but found only %d", expectedSize, offsets.size()));<NEW_LINE>}<NEW_LINE>return offsets;<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} catch (final NoSuchFileException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>return Collections.emptyMap();<NEW_LINE>}<NEW_LINE>}
LOG.warn("Old offset checkpoint version: " + oldVersion);
1,679,781
protected Connections initialValue() {<NEW_LINE>try {<NEW_LINE>// Obtain thread affinity<NEW_LINE>BitSet affinity = Affinity.getAffinity();<NEW_LINE>System.out.println(Thread.currentThread().<MASK><NEW_LINE>// Setup Vertx for connection<NEW_LINE>VertxOptions options = new VertxOptions().setPreferNativeTransport(true).setEventLoopPoolSize(1).setWorkerPoolSize(1).setInternalBlockingPoolSize(1);<NEW_LINE>VertxBuilder builder = new VertxBuilder(options).threadFactory(new VertxThreadFactory() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public VertxThread newVertxThread(Runnable target, String name, boolean worker, long maxExecTime, TimeUnit maxExecTimeUnit) {<NEW_LINE>return VertxThreadFactory.INSTANCE.newVertxThread(() -> {<NEW_LINE>Affinity.setAffinity(affinity);<NEW_LINE>target.run();<NEW_LINE>}, name, worker, maxExecTime, maxExecTimeUnit);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Vertx vertx = builder.init().vertx();<NEW_LINE>// Obtain the connection<NEW_LINE>PgConnection[] connections = new PgConnection[Math.max(Math.max(Math.max(DB_COUNT, QUERIES_COUNT), FORTUNES_COUNT), UPDATE_COUNT)];<NEW_LINE>for (int i = 0; i < connections.length; i++) {<NEW_LINE>connections[i] = OfficeFloorVertx.block(PgConnection.connect(vertx, connectOptions));<NEW_LINE>}<NEW_LINE>return new Connections(connections);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new IllegalStateException("Failed to setup connection", ex);<NEW_LINE>}<NEW_LINE>}
getName() + " has affinity " + affinity);
853,443
public InputDoc nextDoc() {<NEW_LINE>Annotation annotation = getNextDocument();<NEW_LINE>if (annotation == null)<NEW_LINE>return null;<NEW_LINE>Set<Triple<Integer, Integer, Integer>> filterMentionSpans = null;<NEW_LINE>if (filterCorefMentions != null) {<NEW_LINE>// filterMentionSpans = CorefUtils.getMatchingMentionsSpans(<NEW_LINE>// annotation, annotation.get(CorefCoreAnnotations.CorefChainAnnotation.class).values(), filterCorefMentions, true);<NEW_LINE>filterMentionSpans = CorefUtils.getMatchingSpans(annotation);<NEW_LINE>final Set<Triple<Integer, Integer, Integer>> f = filterMentionSpans;<NEW_LINE>Map<Integer, CorefChain> filtered = annotation.get(CorefCoreAnnotations.CorefChainAnnotation.class).values().stream().filter(x -> CorefUtils.filterCorefChainWithMentionSpans(x, f)).collect(Collectors.toMap(x -> x.getChainID(), x -> x));<NEW_LINE>annotation.set(CorefCoreAnnotations.CorefChainAnnotation.class, filtered);<NEW_LINE>}<NEW_LINE>// store some useful information in docInfo for later<NEW_LINE>Map<String, String> docInfo = makeDocInfo(annotation);<NEW_LINE>List<List<Mention>> allGoldMentions = extractGoldMentions(annotation);<NEW_LINE>InputDoc doc = new InputDoc(<MASK><NEW_LINE>doc.filterMentionSet = filterMentionSpans;<NEW_LINE>return doc;<NEW_LINE>}
annotation, docInfo, allGoldMentions, null);
877,687
public GatewayFilter apply(RequestHeaderSizeGatewayFilterFactory.Config config) {<NEW_LINE>String errorHeaderName = config.getErrorHeaderName() != null ? config.getErrorHeaderName() : "errorMessage";<NEW_LINE>return new GatewayFilter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {<NEW_LINE>ServerHttpRequest request = exchange.getRequest();<NEW_LINE>HttpHeaders headers = request.getHeaders();<NEW_LINE>HashMap<String, Long> <MASK><NEW_LINE>for (Map.Entry<String, List<String>> headerEntry : headers.entrySet()) {<NEW_LINE>long headerSizeInBytes = 0L;<NEW_LINE>headerSizeInBytes += headerEntry.getKey().getBytes().length;<NEW_LINE>List<String> values = headerEntry.getValue();<NEW_LINE>for (String value : values) {<NEW_LINE>headerSizeInBytes += value.getBytes().length;<NEW_LINE>}<NEW_LINE>if (headerSizeInBytes > config.getMaxSize().toBytes()) {<NEW_LINE>longHeaders.put(headerEntry.getKey(), headerSizeInBytes);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!longHeaders.isEmpty()) {<NEW_LINE>exchange.getResponse().setStatusCode(HttpStatus.REQUEST_HEADER_FIELDS_TOO_LARGE);<NEW_LINE>exchange.getResponse().getHeaders().add(errorHeaderName, getErrorMessage(longHeaders, config.getMaxSize()));<NEW_LINE>return exchange.getResponse().setComplete();<NEW_LINE>}<NEW_LINE>return chain.filter(exchange);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String toString() {<NEW_LINE>return filterToStringCreator(RequestHeaderSizeGatewayFilterFactory.this).append("maxSize", config.getMaxSize()).toString();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
longHeaders = new HashMap<>();
520,656
protected void dbSchemaUpgradeUntil6120(final String component, final int currentDatabaseVersionsIndex) {<NEW_LINE>FlowableVersion version = FlowableVersions.FLOWABLE_VERSIONS.get(currentDatabaseVersionsIndex);<NEW_LINE>String dbVersion = version.getMainVersion();<NEW_LINE>logger.info("upgrading flowable {} schema from {} to {}", component, dbVersion, FlowableVersions.LAST_V6_VERSION_BEFORE_SERVICES);<NEW_LINE>// Actual execution of schema DDL SQL<NEW_LINE>for (int i = currentDatabaseVersionsIndex + 1; i < FlowableVersions.getFlowableVersionIndexForDbVersion(FlowableVersions.LAST_V6_VERSION_BEFORE_SERVICES); i++) {<NEW_LINE>String nextVersion = FlowableVersions.FLOWABLE_VERSIONS.get(i).getMainVersion();<NEW_LINE>// Taking care of -SNAPSHOT version in development<NEW_LINE>if (nextVersion.endsWith("-SNAPSHOT")) {<NEW_LINE>nextVersion = nextVersion.substring(0, nextVersion.length() - "-SNAPSHOT".length());<NEW_LINE>}<NEW_LINE>dbVersion = dbVersion.replace(".", "");<NEW_LINE>nextVersion = nextVersion.replace(".", "");<NEW_LINE>logger.info("Upgrade needed: {} -> {}. Looking for schema update resource for component '{}'", dbVersion, nextVersion, component);<NEW_LINE>String databaseType = getDbSqlSession().getDbSqlSessionFactory().getDatabaseType();<NEW_LINE>executeSchemaResource("upgrade", component, getResourceForDbOperation("upgrade", "upgradestep." + dbVersion + ".to." + nextVersion, component, databaseType), true);<NEW_LINE>// To avoid having too much similar scripts, for upgrades the 'all' database is supported and executed for every database type<NEW_LINE>executeSchemaResource("upgrade", component, getResourceForDbOperation("upgrade", "upgradestep." + dbVersion + ".to." + nextVersion<MASK><NEW_LINE>dbVersion = nextVersion;<NEW_LINE>}<NEW_LINE>}
, component, "all"), true);
303,814
private void readHeader() throws IOException {<NEW_LINE>assertInput();<NEW_LINE>if (header == null) {<NEW_LINE>header = PSDHeader.read(imageInput);<NEW_LINE>if (!header.hasValidDimensions()) {<NEW_LINE>processWarningOccurred(String.format("Dimensions exceed maximum allowed for %s: %dx%d (max %dx%d)", header.largeFormat ? "PSB" : "PSD", header.width, header.height, header.getMaxSize(), header.getMaxSize()));<NEW_LINE>}<NEW_LINE>metadata = new PSDMetadata();<NEW_LINE>metadata.header = header;<NEW_LINE>// Contains the required data to define the color mode.<NEW_LINE>//<NEW_LINE>// For indexed color images, the count will be equal to 768, and the mode data<NEW_LINE>// will contain the color table for the image, in non-interleaved order.<NEW_LINE>//<NEW_LINE>// For duotone images, the mode data will contain the duotone specification,<NEW_LINE>// the format of which is not documented. Non-Photoshop readers can treat<NEW_LINE>// the duotone image as a grayscale image, and keep the duotone specification<NEW_LINE>// around as a black box for use when saving the file.<NEW_LINE>if (header.mode == PSD.COLOR_MODE_INDEXED) {<NEW_LINE>metadata.colorData = new PSDColorData(imageInput);<NEW_LINE>} else {<NEW_LINE>// TODO: We need to store the duotone spec if we decide to create a writer...<NEW_LINE>// Skip color mode data for other modes<NEW_LINE>long length = imageInput.readUnsignedInt();<NEW_LINE>imageInput.skipBytes(length);<NEW_LINE>}<NEW_LINE>metadata.imageResourcesStart = imageInput.getStreamPosition();<NEW_LINE>// Don't need the header again<NEW_LINE>imageInput.<MASK><NEW_LINE>if (DEBUG) {<NEW_LINE>System.out.println("header: " + header);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
flushBefore(imageInput.getStreamPosition());
969,782
public String createNewPolicyForResourceSet(@PathVariable(value = "rsid") Long rsid, @RequestBody String jsonString, Model m, Authentication auth) {<NEW_LINE>ResourceSet rs = resourceSetService.getById(rsid);<NEW_LINE>if (rs == null) {<NEW_LINE>m.addAttribute(<MASK><NEW_LINE>return HttpCodeView.VIEWNAME;<NEW_LINE>}<NEW_LINE>if (!rs.getOwner().equals(auth.getName())) {<NEW_LINE>logger.warn("Unauthorized resource set request from bad user; expected " + rs.getOwner() + " got " + auth.getName());<NEW_LINE>// authenticated user didn't match the owner of the resource set<NEW_LINE>m.addAttribute(HttpCodeView.CODE, HttpStatus.FORBIDDEN);<NEW_LINE>return HttpCodeView.VIEWNAME;<NEW_LINE>}<NEW_LINE>Policy p = gson.fromJson(jsonString, Policy.class);<NEW_LINE>if (p.getId() != null) {<NEW_LINE>logger.warn("Tried to add a policy with a non-null ID: " + p.getId());<NEW_LINE>m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);<NEW_LINE>return HttpCodeView.VIEWNAME;<NEW_LINE>}<NEW_LINE>for (Claim claim : p.getClaimsRequired()) {<NEW_LINE>if (claim.getId() != null) {<NEW_LINE>logger.warn("Tried to add a policy with a non-null claim ID: " + claim.getId());<NEW_LINE>m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);<NEW_LINE>return HttpCodeView.VIEWNAME;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>rs.getPolicies().add(p);<NEW_LINE>ResourceSet saved = resourceSetService.update(rs, rs);<NEW_LINE>// find the new policy object<NEW_LINE>Collection<Policy> newPolicies = Sets.difference(new HashSet<>(saved.getPolicies()), new HashSet<>(rs.getPolicies()));<NEW_LINE>if (newPolicies.size() == 1) {<NEW_LINE>Policy newPolicy = newPolicies.iterator().next();<NEW_LINE>m.addAttribute(JsonEntityView.ENTITY, newPolicy);<NEW_LINE>return JsonEntityView.VIEWNAME;<NEW_LINE>} else {<NEW_LINE>logger.warn("Unexpected result trying to add a new policy object: " + newPolicies);<NEW_LINE>m.addAttribute(HttpCodeView.CODE, HttpStatus.INTERNAL_SERVER_ERROR);<NEW_LINE>return HttpCodeView.VIEWNAME;<NEW_LINE>}<NEW_LINE>}
HttpCodeView.CODE, HttpStatus.NOT_FOUND);
1,840,867
private ApplicationMap createMap(FilteredMapServiceOption option, FilteredMap filteredMap) {<NEW_LINE>final ApplicationMapBuilder applicationMapBuilder = applicationMapBuilderFactory.createApplicationMapBuilder(option.getOriginalRange());<NEW_LINE>applicationMapBuilder.linkType(LinkType.DETAILED);<NEW_LINE>final WasNodeHistogramDataSource wasNodeHistogramDataSource = new <MASK><NEW_LINE>applicationMapBuilder.includeNodeHistogram(new DefaultNodeHistogramFactory(wasNodeHistogramDataSource));<NEW_LINE>ServerInstanceListDataSource serverInstanceListDataSource = new AgentInfoServerInstanceListDataSource(agentInfoService);<NEW_LINE>if (option.isUseStatisticsAgentState()) {<NEW_LINE>applicationMapBuilder.includeServerInfo(new StatisticsServerInstanceListFactory(serverInstanceListDataSource));<NEW_LINE>} else {<NEW_LINE>applicationMapBuilder.includeServerInfo(new DefaultServerInstanceListFactory(serverInstanceListDataSource));<NEW_LINE>}<NEW_LINE>ApplicationMap map = applicationMapBuilder.build(filteredMap.getLinkDataDuplexMap(), buildTimeoutMillis);<NEW_LINE>if (serverMapDataFilter != null) {<NEW_LINE>map = serverMapDataFilter.dataFiltering(map);<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
ResponseHistogramsNodeHistogramDataSource(filteredMap.getResponseHistograms());
632,848
public void onError(Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TBase msg;<NEW_LINE>getBlobReplication_result result = new getBlobReplication_result();<NEW_LINE>if (e instanceof KeyNotFoundException) {<NEW_LINE>result.knf = (KeyNotFoundException) e;<NEW_LINE>result.set_knf_isSet(true);<NEW_LINE>msg = result;<NEW_LINE>} else {<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = (org.apache.thrift.TBase) new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.<MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>fcall.sendResponse(fb, msg, msgType, seqid);<NEW_LINE>return;<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOGGER.error("Exception writing to internal frame buffer", ex);<NEW_LINE>}<NEW_LINE>fb.close();<NEW_LINE>}
INTERNAL_ERROR, e.getMessage());
1,273,749
public static Object invokeMethod(final Object target, final String methodName, final Class<?>[] parameterTypes, final Object[] args) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException {<NEW_LINE>if (parameterTypes.length != args.length) {<NEW_LINE>throw new IllegalArgumentException("Parameters types " + java.util.Arrays.toString(parameterTypes) + " do not match arguments " + java.util.Arrays.toString(args));<NEW_LINE>}<NEW_LINE>Method method = lookupMethod(target.getClass(), methodName, parameterTypes);<NEW_LINE>// convert args to founded method param's types<NEW_LINE>Object[] coercedArgs = new Object[args.length];<NEW_LINE>Class<?>[<MASK><NEW_LINE>for (int i = 0; i < args.length; i++) {<NEW_LINE>coercedArgs[i] = convertArgumentToType(args[i], methodParameterTypes[i]);<NEW_LINE>}<NEW_LINE>return method.invoke(target, coercedArgs);<NEW_LINE>}
] methodParameterTypes = method.getParameterTypes();
1,559,600
final StartFHIRExportJobResult executeStartFHIRExportJob(StartFHIRExportJobRequest startFHIRExportJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startFHIRExportJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartFHIRExportJobRequest> request = null;<NEW_LINE>Response<StartFHIRExportJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartFHIRExportJobRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "HealthLake");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartFHIRExportJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartFHIRExportJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartFHIRExportJobResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(startFHIRExportJobRequest));
1,262,914
private View createButtonWithDesc(int iconId, @NonNull String title, @NonNull String desc, boolean enabled, OnClickListener listener) {<NEW_LINE>int activeColor = selectedAppMode.getProfileColor(nightMode);<NEW_LINE>int defColor = ColorUtilities.getDefaultIconColor(app, nightMode);<NEW_LINE>int iconColor = enabled ? activeColor : defColor;<NEW_LINE>View view = themedInflater.inflate(R.layout.configure_screen_list_item, null);<NEW_LINE>Drawable <MASK><NEW_LINE>ImageView ivIcon = view.findViewById(R.id.icon);<NEW_LINE>ivIcon.setImageDrawable(icon);<NEW_LINE>TextView tvTitle = view.findViewById(R.id.title);<NEW_LINE>tvTitle.setText(title);<NEW_LINE>TextView tvDesc = view.findViewById(R.id.description);<NEW_LINE>tvDesc.setVisibility(View.VISIBLE);<NEW_LINE>tvDesc.setText(desc);<NEW_LINE>setupClickListener(view, listener);<NEW_LINE>setupListItemBackground(view);<NEW_LINE>return view;<NEW_LINE>}
icon = getPaintedContentIcon(iconId, iconColor);
407,245
public static String usage() {<NEW_LINE>StringWriter sb = new StringWriter();<NEW_LINE>PrintWriter out = new PrintWriter(sb);<NEW_LINE>out.println("Usage: " + CMD + " config initial-token --server SERVER --realm REALM [--delete | TOKEN] [ARGUMENTS]");<NEW_LINE>out.println();<NEW_LINE>out.<MASK><NEW_LINE>out.println("authenticated session exists as a result of '" + CMD + " config credentials' its access token will not");<NEW_LINE>out.println("be used - initial access token will be used instead. By default, current server, and realm will");<NEW_LINE>out.println("be set to the new values thus subsequent commands will use these values as default.");<NEW_LINE>out.println();<NEW_LINE>out.println("Arguments:");<NEW_LINE>out.println();<NEW_LINE>out.println(" Global options:");<NEW_LINE>out.println(" -x Print full stack trace when exiting with error");<NEW_LINE>out.println(" --config Path to the config file (" + DEFAULT_CONFIG_FILE_STRING + " by default)");<NEW_LINE>out.println();<NEW_LINE>out.println(" Command specific options:");<NEW_LINE>out.println(" --server SERVER Server endpoint url (e.g. 'http://localhost:8080/auth')");<NEW_LINE>out.println(" --realm REALM Realm name to use");<NEW_LINE>out.println(" -k, --keep-domain Don't overwrite default server and realm");<NEW_LINE>out.println(" -d, --delete Indicates that initial access token should be removed");<NEW_LINE>out.println(" TOKEN Initial access token (prompted for if not specified, unless -d is used)");<NEW_LINE>out.println();<NEW_LINE>out.println();<NEW_LINE>out.println("Examples:");<NEW_LINE>out.println();<NEW_LINE>out.println("Specify initial access token for server, and realm. Token is passed via env variable:");<NEW_LINE>out.println(" " + PROMPT + " " + CMD + " config initial-token --server http://localhost:9080/auth --realm master " + OS_ARCH.envVar("TOKEN"));<NEW_LINE>out.println();<NEW_LINE>out.println("Remove initial access token:");<NEW_LINE>out.println(" " + PROMPT + " " + CMD + " config initial-token --server http://localhost:9080/auth --realm master --delete");<NEW_LINE>out.println();<NEW_LINE>out.println();<NEW_LINE>out.println("Use '" + CMD + " help' for general information and a list of commands");<NEW_LINE>return sb.toString();<NEW_LINE>}
println("Command to configure an initial access token to be used with '" + CMD + " create' command. Even if an ");
447,380
public static Options parse(@NonNull Context context, TypefaceLoader typefaceManager, JSONObject json) {<NEW_LINE>Options result = new Options();<NEW_LINE>if (json == null)<NEW_LINE>return result;<NEW_LINE>result.topBar = TopBarOptions.parse(context, typefaceManager, json.optJSONObject("topBar"));<NEW_LINE>result.topTabs = TopTabsOptions.parse(context, json.optJSONObject("topTabs"));<NEW_LINE>result.topTabOptions = TopTabOptions.parse(typefaceManager, json.optJSONObject("topTab"));<NEW_LINE>result.bottomTabOptions = BottomTabOptions.parse(context, typefaceManager, json.optJSONObject("bottomTab"));<NEW_LINE>result.bottomTabsOptions = BottomTabsOptions.parse(context, json.optJSONObject("bottomTabs"));<NEW_LINE>result.overlayOptions = OverlayOptions.parse(json.optJSONObject("overlay"));<NEW_LINE>result.fabOptions = FabOptions.parse(context, json.optJSONObject("fab"));<NEW_LINE>result.sideMenuRootOptions = SideMenuRootOptions.parse(json.optJSONObject("sideMenu"));<NEW_LINE>result.animations = AnimationsOptions.parse(json.optJSONObject("animations"));<NEW_LINE>result.modal = ModalOptions.parse(json);<NEW_LINE>result.navigationBar = NavigationBarOptions.parse(context, json.optJSONObject("navigationBar"));<NEW_LINE>result.statusBar = StatusBarOptions.parse(context<MASK><NEW_LINE>result.layout = LayoutOptions.parse(context, json.optJSONObject("layout"));<NEW_LINE>result.hardwareBack = new HardwareBackButtonOptions(json.optJSONObject("hardwareBackButton"));<NEW_LINE>return result;<NEW_LINE>}
, json.optJSONObject("statusBar"));
1,229,009
public ExportAssetToSignedUrlRequestDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ExportAssetToSignedUrlRequestDetails exportAssetToSignedUrlRequestDetails = new ExportAssetToSignedUrlRequestDetails();<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("AssetId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>exportAssetToSignedUrlRequestDetails.setAssetId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("DataSetId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>exportAssetToSignedUrlRequestDetails.setDataSetId(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("RevisionId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>exportAssetToSignedUrlRequestDetails.setRevisionId(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 exportAssetToSignedUrlRequestDetails;<NEW_LINE>}
class).unmarshall(context));
1,558,504
public Builder mergeFrom(com.didiglobal.booster.aapt2.Resources.Type other) {<NEW_LINE>if (other == com.didiglobal.booster.aapt2.Resources.Type.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasTypeId()) {<NEW_LINE>mergeTypeId(other.getTypeId());<NEW_LINE>}<NEW_LINE>if (!other.getName().isEmpty()) {<NEW_LINE>name_ = other.name_;<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>if (entryBuilder_ == null) {<NEW_LINE>if (!other.entry_.isEmpty()) {<NEW_LINE>if (entry_.isEmpty()) {<NEW_LINE>entry_ = other.entry_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>} else {<NEW_LINE>ensureEntryIsMutable();<NEW_LINE>entry_.addAll(other.entry_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.entry_.isEmpty()) {<NEW_LINE>if (entryBuilder_.isEmpty()) {<NEW_LINE>entryBuilder_.dispose();<NEW_LINE>entryBuilder_ = null;<NEW_LINE>entry_ = other.entry_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>entryBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntryFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>entryBuilder_.addAllMessages(other.entry_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
this.mergeUnknownFields(other.unknownFields);
1,442,525
protected void createSymbolicLink(PathFragment linkPath, PathFragment targetFragment) throws IOException {<NEW_LINE>PathFragment targetPath = targetFragment.isAbsolute() ? targetFragment : linkPath.<MASK><NEW_LINE>try {<NEW_LINE>java.nio.file.Path link = getIoFile(linkPath).toPath();<NEW_LINE>java.nio.file.Path target = getIoFile(targetPath).toPath();<NEW_LINE>// Still Create a dangling junction if the target doesn't exist.<NEW_LINE>if (!target.toFile().exists() || target.toFile().isDirectory()) {<NEW_LINE>WindowsFileOperations.createJunction(link.toString(), target.toString());<NEW_LINE>} else {<NEW_LINE>if (createSymbolicLinks) {<NEW_LINE>WindowsFileOperations.createSymlink(link.toString(), target.toString());<NEW_LINE>} else {<NEW_LINE>Files.copy(target, link);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (java.nio.file.FileAlreadyExistsException e) {<NEW_LINE>throw new IOException(linkPath + ERR_FILE_EXISTS, e);<NEW_LINE>} catch (java.nio.file.AccessDeniedException e) {<NEW_LINE>throw new IOException(linkPath + ERR_PERMISSION_DENIED, e);<NEW_LINE>} catch (java.nio.file.NoSuchFileException e) {<NEW_LINE>throw new FileNotFoundException(linkPath + ERR_NO_SUCH_FILE_OR_DIR);<NEW_LINE>}<NEW_LINE>}
getParentDirectory().getRelative(targetFragment);
423,184
private synchronized V _put(K key, V value, MODE m) {<NEW_LINE>LinkedEntry<K, V>[] tab = table;<NEW_LINE>int index = hash(key) % tab.length;<NEW_LINE>for (LinkedEntry<K, V> e = tab[index]; e != null; e = e.next) {<NEW_LINE>if (CompareUtil.equals(e.key, key)) {<NEW_LINE>V old = e.value;<NEW_LINE>e.value = value;<NEW_LINE>switch(m) {<NEW_LINE>case FORCE_FIRST:<NEW_LINE>if (header.link_next != e) {<NEW_LINE>unchain(e);<NEW_LINE>chain(header, header.link_next, e);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case FORCE_LAST:<NEW_LINE>if (header.link_prev != e) {<NEW_LINE>unchain(e);<NEW_LINE>chain(header.link_prev, header, e);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>return old;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (max > 0) {<NEW_LINE>switch(m) {<NEW_LINE>case FORCE_FIRST:<NEW_LINE>case FIRST:<NEW_LINE>while (count >= max) {<NEW_LINE>K k = header.link_prev.key;<NEW_LINE>V v = remove(k);<NEW_LINE>overflowed(k, v);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case FORCE_LAST:<NEW_LINE>case LAST:<NEW_LINE>while (count >= max) {<NEW_LINE><MASK><NEW_LINE>V v = remove(k);<NEW_LINE>overflowed(k, v);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (count >= threshold) {<NEW_LINE>rehash();<NEW_LINE>tab = table;<NEW_LINE>index = hash(key) % tab.length;<NEW_LINE>}<NEW_LINE>LinkedEntry<K, V> e = new LinkedEntry(key, value, tab[index]);<NEW_LINE>tab[index] = e;<NEW_LINE>switch(m) {<NEW_LINE>case FORCE_FIRST:<NEW_LINE>case FIRST:<NEW_LINE>chain(header, header.link_next, e);<NEW_LINE>break;<NEW_LINE>case FORCE_LAST:<NEW_LINE>case LAST:<NEW_LINE>chain(header.link_prev, header, e);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>count++;<NEW_LINE>return null;<NEW_LINE>}
K k = header.link_next.key;
1,367,413
private void alertCpu(float nextCpu) {<NEW_LINE>Configure conf = Configure.getInstance();<NEW_LINE>if (conf.cpu_alert_enabled == false)<NEW_LINE>return;<NEW_LINE>if (nextCpu < conf.cpu_warning_pct)<NEW_LINE>return;<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>int w = 0, f = 0;<NEW_LINE>long stime = System.currentTimeMillis() - conf.cpu_check_period_ms;<NEW_LINE><MASK><NEW_LINE>while (en.hasMoreElements()) {<NEW_LINE>long tm = en.nextLong();<NEW_LINE>if (tm < stime)<NEW_LINE>continue;<NEW_LINE>int cpu = oldCpu.get(tm);<NEW_LINE>if (cpu >= conf.cpu_fatal_pct) {<NEW_LINE>f++;<NEW_LINE>} else if (cpu >= conf.cpu_warning_pct) {<NEW_LINE>w++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>oldCpu.put(System.currentTimeMillis(), new Integer((int) nextCpu));<NEW_LINE>if (nextCpu >= conf.cpu_fatal_pct) {<NEW_LINE>if (f >= conf.cpu_fatal_history) {<NEW_LINE>if (now >= cpu_last_fatal + conf.cpu_alert_interval_ms) {<NEW_LINE>HostAgentDataProxy.sendAlert(AlertLevel.FATAL, "FATAL_CPU_HIGH", "cpu high " + nextCpu + "%", null);<NEW_LINE>cpu_last_fatal = now;<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (nextCpu >= conf.cpu_warning_pct) {<NEW_LINE>if (f + w >= conf.cpu_warning_history) {<NEW_LINE>if (now >= cpu_last_warning + conf.cpu_alert_interval_ms) {<NEW_LINE>HostAgentDataProxy.sendAlert(AlertLevel.WARN, "WARNING_CPU_HIGH", "cpu high " + nextCpu + "%", null);<NEW_LINE>cpu_last_warning = now;<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
LongEnumer en = oldCpu.keys();
1,493,683
public boolean checkAtInjectValidator() {<NEW_LINE>Set<ConstraintViolation<AValidationXMLTestBean1>> cvSet = injectedValidator.validate(this);<NEW_LINE>if (cvSet != null && !cvSet.isEmpty()) {<NEW_LINE>svLogger.log(Level.INFO, CLASS_NAME, "found " + cvSet.size() + " contstraints " + "when there shouldn't have been any: " + formatConstraintViolations(cvSet));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>setValidationToFail();<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>if (cvSet != null && cvSet.size() != 2) {<NEW_LINE>svLogger.log(Level.INFO, CLASS_NAME, "found " + cvSet.size() + " contstraints " + "when there should have been 2: " + formatConstraintViolations(cvSet));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>resetValidation();<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
cvSet = injectedValidator.validate(this);
491,974
private Component createKeepAlivePanel() {<NEW_LINE>JPanel emptyLabelPanel = new TransparentPanel();<NEW_LINE>emptyLabelPanel.setMaximumSize(new Dimension(40, 35));<NEW_LINE>JPanel keepAlivePanel = new TransparentPanel(new BorderLayout(10, 10));<NEW_LINE>JPanel keepAliveLabels = new TransparentPanel(new GridLayout(0, 1, 5, 5));<NEW_LINE>JPanel keepAliveValues = new TransparentPanel(new GridLayout(0, 1, 5, 5));<NEW_LINE>JLabel keepAliveMethodLabel = new JLabel(Resources.getString("plugin.sipaccregwizz.KEEP_ALIVE_METHOD"));<NEW_LINE>JLabel keepAliveIntervalLabel = new JLabel(Resources.getString("plugin.sipaccregwizz.KEEP_ALIVE_INTERVAL"));<NEW_LINE>JLabel keepAliveIntervalExampleLabel = new JLabel(Resources.getString("plugin.sipaccregwizz.KEEP_ALIVE_INTERVAL_INFO"));<NEW_LINE>keepAliveLabels.add(keepAliveMethodLabel);<NEW_LINE>keepAliveLabels.add(keepAliveIntervalLabel);<NEW_LINE>keepAliveLabels.add(emptyLabelPanel);<NEW_LINE>keepAliveIntervalExampleLabel.setForeground(Color.GRAY);<NEW_LINE>keepAliveIntervalExampleLabel.setFont(keepAliveIntervalExampleLabel.getFont<MASK><NEW_LINE>keepAliveIntervalExampleLabel.setMaximumSize(new Dimension(40, 35));<NEW_LINE>keepAliveIntervalExampleLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 8, 0));<NEW_LINE>keepAliveMethodBox.setSelectedItem(SipAccountID.getDefaultStr(ProtocolProviderFactory.KEEP_ALIVE_METHOD));<NEW_LINE>keepAliveValues.add(keepAliveMethodBox);<NEW_LINE>keepAliveValues.add(keepAliveIntervalValue);<NEW_LINE>keepAliveValues.add(keepAliveIntervalExampleLabel);<NEW_LINE>keepAlivePanel.add(keepAliveLabels, BorderLayout.WEST);<NEW_LINE>keepAlivePanel.add(keepAliveValues, BorderLayout.CENTER);<NEW_LINE>keepAlivePanel.setBorder(BorderFactory.createTitledBorder(Resources.getString("plugin.sipaccregwizz.KEEP_ALIVE")));<NEW_LINE>return keepAlivePanel;<NEW_LINE>}
().deriveFont(8));
1,766,607
public static QueryAlertListResponse unmarshall(QueryAlertListResponse queryAlertListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryAlertListResponse.setRequestId(_ctx.stringValue("QueryAlertListResponse.RequestId"));<NEW_LINE>queryAlertListResponse.setCode(_ctx.stringValue("QueryAlertListResponse.Code"));<NEW_LINE>queryAlertListResponse.setSuccess(_ctx.booleanValue("QueryAlertListResponse.Success"));<NEW_LINE>queryAlertListResponse.setPageSize(_ctx.integerValue("QueryAlertListResponse.PageSize"));<NEW_LINE>queryAlertListResponse.setOtsMarker(_ctx.stringValue("QueryAlertListResponse.OtsMarker"));<NEW_LINE>queryAlertListResponse.setTotalCount(_ctx.longValue("QueryAlertListResponse.TotalCount"));<NEW_LINE>queryAlertListResponse.setCurrentPage(_ctx.integerValue("QueryAlertListResponse.CurrentPage"));<NEW_LINE>queryAlertListResponse.setMessage<MASK><NEW_LINE>List<Map<Object, Object>> data = _ctx.listMapValue("QueryAlertListResponse.Data");<NEW_LINE>queryAlertListResponse.setData(data);<NEW_LINE>return queryAlertListResponse;<NEW_LINE>}
(_ctx.stringValue("QueryAlertListResponse.Message"));
355,754
final ListNamedQueriesResult executeListNamedQueries(ListNamedQueriesRequest listNamedQueriesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listNamedQueriesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListNamedQueriesRequest> request = null;<NEW_LINE>Response<ListNamedQueriesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListNamedQueriesRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Athena");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListNamedQueries");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListNamedQueriesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListNamedQueriesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(listNamedQueriesRequest));
6,608
private RRset signRRset(final RRset rrSet, final List<DnsSecKeyPair> kskPairs, final List<DnsSecKeyPair> zskPairs, final Date inception, final Date expiration, final ConcurrentMap<RRSIGCacheKey, ConcurrentMap<RRsetKey, RRSIGRecord>> RRSIGCache) {<NEW_LINE>final List<RRSIGRecord> signatures = new ArrayList<>();<NEW_LINE>final List<DnsSecKeyPair> pairs = rrSet.getType() == Type.DNSKEY ? kskPairs : zskPairs;<NEW_LINE>final Date now = new Date();<NEW_LINE>pairs.forEach(pair -> {<NEW_LINE>final DNSKEYRecord dnskeyRecord = pair.getDNSKEYRecord();<NEW_LINE>final PrivateKey privateKey = pair.getPrivate();<NEW_LINE>RRSIGRecord signature = null;<NEW_LINE>try {<NEW_LINE>if (RRSIGCache == null) {<NEW_LINE>signature = sign(rrSet, dnskeyRecord, privateKey, inception, expiration);<NEW_LINE>} else {<NEW_LINE>final ConcurrentMap<RRsetKey, RRSIGRecord> sigMap = RRSIGCache.computeIfAbsent(new RRSIGCacheKey(privateKey.getEncoded(), dnskeyRecord.getAlgorithm()), rrsigCacheKey -> new ConcurrentHashMap<>());<NEW_LINE>signature = sigMap.computeIfAbsent(new RRsetKey(rrSet), k -> sign(rrSet, dnskeyRecord<MASK><NEW_LINE>if (signature != null && isSignatureAlmostExpired(signature.getTimeSigned(), signature.getExpire(), now)) {<NEW_LINE>signature = sigMap.compute(new RRsetKey(rrSet), (k, v) -> sign(rrSet, dnskeyRecord, privateKey, inception, expiration));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>final String message = String.format("Failed to sign Resource Record Set for %s %d %d %d : %s", dnskeyRecord.getName(), dnskeyRecord.getDClass(), dnskeyRecord.getType(), dnskeyRecord.getTTL(), e.getMessage());<NEW_LINE>LOGGER.error(message, e);<NEW_LINE>}<NEW_LINE>if (signature != null) {<NEW_LINE>signatures.add(signature);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>final RRset signedRRset = new RRset();<NEW_LINE>toRRStream(rrSet).forEach(signedRRset::addRR);<NEW_LINE>signatures.forEach(signedRRset::addRR);<NEW_LINE>return signedRRset;<NEW_LINE>}
, privateKey, inception, expiration));
1,252,123
/* Sample generated code:<NEW_LINE>*<NEW_LINE>* @com.ibm.j9ddr.GeneratedFieldAccessor(offsetFieldName="_permOffset_", declaredType="J9Permission")<NEW_LINE>* public J9PermissionPointer perm() throws CorruptDataException {<NEW_LINE>* return J9PermissionPointer.cast(nonNullFieldEA(J9FileStat._permOffset_));<NEW_LINE>* }<NEW_LINE>*/<NEW_LINE>private void doStructureMethod(FieldDescriptor field) {<NEW_LINE>String fieldType = removeTypeTags(field.getType());<NEW_LINE>String returnType = "void".<MASK><NEW_LINE>String qualifiedReturnType = qualifyPointerType(returnType);<NEW_LINE>Type objectType = Type.getObjectType(qualifiedReturnType);<NEW_LINE>String returnDesc = Type.getMethodDescriptor(objectType);<NEW_LINE>String castDesc = Type.getMethodDescriptor(objectType, Type.LONG_TYPE);<NEW_LINE>MethodVisitor method = beginAnnotatedMethod(field, field.getName(), returnDesc);<NEW_LINE>method.visitCode();<NEW_LINE>if (checkPresent(field, method)) {<NEW_LINE>method.visitVarInsn(ALOAD, 0);<NEW_LINE>loadLong(method, field.getOffset());<NEW_LINE>method.visitMethodInsn(INVOKEVIRTUAL, className, "nonNullFieldEA", longFromLong, false);<NEW_LINE>method.visitMethodInsn(INVOKESTATIC, qualifiedReturnType, "cast", castDesc, false);<NEW_LINE>method.visitInsn(ARETURN);<NEW_LINE>}<NEW_LINE>method.visitMaxs(3, 1);<NEW_LINE>method.visitEnd();<NEW_LINE>doEAMethod("Pointer", field);<NEW_LINE>}
equals(fieldType) ? "Void" : fieldType;
608,850
public Optional<TypeSymbol> transform(QualifiedNameReferenceNode node) {<NEW_LINE>// Only handles the Type Definitions.<NEW_LINE>Predicate<Symbol> predicate = symbol -> symbol.getName().isPresent() && (symbol.kind() == SymbolKind.TYPE_DEFINITION || symbol.kind() == SymbolKind.CLASS) && symbol.getName().get().equals(node.<MASK><NEW_LINE>List<Symbol> moduleContent = QNameReferenceUtil.getModuleContent(context, node, predicate);<NEW_LINE>if (moduleContent.size() != 1) {<NEW_LINE>// At the moment we do not handle the ambiguity. Hence, consider only single item<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>Symbol symbol = moduleContent.get(0);<NEW_LINE>if (symbol.kind() == SymbolKind.CLASS) {<NEW_LINE>ClassSymbol classSymbol = (ClassSymbol) symbol;<NEW_LINE>return Optional.of(classSymbol);<NEW_LINE>}<NEW_LINE>TypeSymbol typeDescriptor = ((TypeDefinitionSymbol) symbol).typeDescriptor();<NEW_LINE>return Optional.of(typeDescriptor);<NEW_LINE>}
identifier().text());
1,131,289
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>if (!hasValidCSRFToken(request)) {<NEW_LINE>respondCSRFError(response);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Project project = getProject(request);<NEW_LINE>String jsonString = request.getParameter("schema");<NEW_LINE>if (jsonString == null) {<NEW_LINE>respondError(response, "No Wikibase schema provided.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>WikibaseSchema schema = ParsingUtilities.mapper.<MASK><NEW_LINE>AbstractOperation op = new SaveWikibaseSchemaOperation(schema);<NEW_LINE>Process process = op.createProcess(project, new Properties());<NEW_LINE>performProcessAndRespond(request, response, project, process);<NEW_LINE>} catch (IOException e) {<NEW_LINE>// We do not use respondException here because this is an expected<NEW_LINE>// exception which happens every time a user tries to save an incomplete<NEW_LINE>// schema - the exception should not be logged.<NEW_LINE>respondError(response, String.format("Wikibase schema could not be parsed: ", e.getMessage()));<NEW_LINE>} catch (Exception e) {<NEW_LINE>// This is an unexpected exception, so we log it.<NEW_LINE>respondException(response, e);<NEW_LINE>}<NEW_LINE>}
readValue(jsonString, WikibaseSchema.class);
816,154
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = View.inflate(getContext(), R.layout.fragment_custom, null);<NEW_LINE>agVideo = view.findViewById(R.id.agvideo);<NEW_LINE>jzNoTitle = view.findViewById(R.id.jz_notitle);<NEW_LINE>lockScreen = view.findViewById(R.id.lock_screen);<NEW_LINE>jzvdStdRound = view.findViewById(R.id.jz_round);<NEW_LINE>jzvdStdWithShareButton = view.findViewById(R.id.custom_videoplayer_standard_with_share_button);<NEW_LINE>jzvdStdShowTitleAfterFullscreen = view.findViewById(R.id.custom_videoplayer_standard_show_title_after_fullscreen);<NEW_LINE>jzvdStdShowTextureViewAfterAutoComplete = view.<MASK><NEW_LINE>jzvdStdAutoCompleteAfterFullscreen = view.findViewById(R.id.custom_videoplayer_standard_aoto_complete);<NEW_LINE>jzvdStd_1_1 = view.findViewById(R.id.jz_videoplayer_1_1);<NEW_LINE>jzvdStd_16_9 = view.findViewById(R.id.jz_videoplayer_16_9);<NEW_LINE>jzvdStdVolumeAfterFullscreen = view.findViewById(R.id.jz_videoplayer_volume);<NEW_LINE>jzvdStdMp3 = view.findViewById(R.id.jz_videoplayer_mp3);<NEW_LINE>jzvdStdSpeed = view.findViewById(R.id.jz_videoplayer_speed);<NEW_LINE>jzvdStdVolume = view.findViewById(R.id.custom_videoplayer_standard_with_volume_button);<NEW_LINE>jzvdStdAutoOrizental = view.findViewById(R.id.jz_auto_oriental);<NEW_LINE>agVideo.setOnClickListener(this);<NEW_LINE>return view;<NEW_LINE>}
findViewById(R.id.custom_videoplayer_standard_show_textureview_aoto_complete);
1,406,877
public PointList fetchWayGeometry(FetchMode mode) {<NEW_LINE>if (pointList.size() == 0)<NEW_LINE>return PointList.EMPTY;<NEW_LINE>// due to API we need to create a new instance per call!<NEW_LINE>if (mode == FetchMode.TOWER_ONLY) {<NEW_LINE>if (pointList.size() < 3)<NEW_LINE>return pointList.clone(false);<NEW_LINE>PointList towerNodes = new PointList(2, pointList.is3D());<NEW_LINE>towerNodes.add(pointList, 0);<NEW_LINE>towerNodes.add(pointList, pointList.size() - 1);<NEW_LINE>return towerNodes;<NEW_LINE>} else if (mode == FetchMode.ALL)<NEW_LINE>return pointList.clone(false);<NEW_LINE>else if (mode == FetchMode.BASE_AND_PILLAR)<NEW_LINE>return pointList.copy(0, <MASK><NEW_LINE>else if (mode == FetchMode.PILLAR_AND_ADJ)<NEW_LINE>return pointList.copy(1, pointList.size());<NEW_LINE>else if (mode == FetchMode.PILLAR_ONLY) {<NEW_LINE>if (pointList.size() == 1)<NEW_LINE>return PointList.EMPTY;<NEW_LINE>return pointList.copy(1, pointList.size() - 1);<NEW_LINE>}<NEW_LINE>throw new UnsupportedOperationException("Illegal mode:" + mode);<NEW_LINE>}
pointList.size() - 1);