idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
38,782
public void init() {<NEW_LINE>if (initialized.compareAndSet(false, true)) {<NEW_LINE>if (StringUtils.isBlank(dbType)) {<NEW_LINE>throw new IllegalArgumentException("dbType must not be null or empty");<NEW_LINE>}<NEW_LINE>String upperDbType = dbType.toUpperCase();<NEW_LINE>if (!DBType.supportedDbTypes.containsKey(upperDbType)) {<NEW_LINE>throw new IllegalArgumentException("dbType: " + upperDbType + "not in support list: " + DBType.supportedDbTypes);<NEW_LINE>}<NEW_LINE>traceAnnotations.add(new KeyValueAnnotation(DataSourceTracerKeys.DATABASE_TYPE, dbType));<NEW_LINE>if (StringUtils.isBlank(database)) {<NEW_LINE>throw new IllegalArgumentException("database must not be null or empty");<NEW_LINE>}<NEW_LINE>traceAnnotations.add(new KeyValueAnnotation(DataSourceTracerKeys.DATABASE_NAME, database));<NEW_LINE>if (StringUtils.isBlank(appName)) {<NEW_LINE>throw new IllegalArgumentException("appName must not be null or empty");<NEW_LINE>}<NEW_LINE>traceAnnotations.add(new KeyValueAnnotation(DataSourceTracerKeys.LOCAL_APP, appName));<NEW_LINE>DataSource dataSource = getDelegate();<NEW_LINE>String <MASK><NEW_LINE>// tns or others<NEW_LINE>traceAnnotations.add(new KeyValueAnnotation(DataSourceTracerKeys.DATABASE_ENDPOINT, getEndpointsStr(DataSourceUtils.getEndpointsFromConnectionURL(jdbcUrl))));<NEW_LINE>Prop prop = getProp();<NEW_LINE>List<Interceptor> interceptors = getInterceptors();<NEW_LINE>if (interceptors != null && !interceptors.isEmpty()) {<NEW_LINE>prop.addAll(interceptors);<NEW_LINE>}<NEW_LINE>if (isEnableTrace && clientTracer != null) {<NEW_LINE>setupStatementTracerInterceptor();<NEW_LINE>setupConnectionTracerInterceptor();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
jdbcUrl = DataSourceUtils.getJdbcUrl(dataSource);
1,450,434
public static ByteBuffer toStream(final WriteableWALRecord walRecord) {<NEW_LINE>final int contentSize = walRecord.serializedSize() + METADATA_SIZE;<NEW_LINE>final ByteBuffer content = ByteBuffer.allocate(contentSize).order(ByteOrder.nativeOrder());<NEW_LINE>final int recordId = walRecord.getId();<NEW_LINE>content.putShort(RECORD_ID_OFFSET, (short) recordId);<NEW_LINE>content.position(METADATA_SIZE);<NEW_LINE>walRecord.toStream(content);<NEW_LINE>if (MIN_COMPRESSED_RECORD_SIZE <= 0 || contentSize < MIN_COMPRESSED_RECORD_SIZE) {<NEW_LINE>return content;<NEW_LINE>}<NEW_LINE>final LZ4Compressor compressor = factory.fastCompressor();<NEW_LINE>final int maxCompressedLength = compressor.maxCompressedLength(contentSize - 1);<NEW_LINE>final ByteBuffer compressedContent = ByteBuffer.allocate(maxCompressedLength + COMPRESSED_METADATA_SIZE).order(ByteOrder.nativeOrder());<NEW_LINE>content.position(OPERATION_ID_OFFSET + OPERATION_ID_SIZE);<NEW_LINE>compressedContent.position(COMPRESSED_METADATA_SIZE);<NEW_LINE>final int compressedLength = compressor.compress(content, METADATA_SIZE, contentSize - METADATA_SIZE, compressedContent, COMPRESSED_METADATA_SIZE, maxCompressedLength);<NEW_LINE>if (compressedLength + COMPRESSED_METADATA_SIZE < contentSize) {<NEW_LINE>compressedContent.limit(compressedLength + COMPRESSED_METADATA_SIZE);<NEW_LINE>compressedContent.putShort(RECORD_ID_OFFSET, (short) (-(recordId + 1)));<NEW_LINE><MASK><NEW_LINE>return compressedContent;<NEW_LINE>} else {<NEW_LINE>return content;<NEW_LINE>}<NEW_LINE>}
compressedContent.putInt(ORIGINAL_CONTENT_SIZE_OFFSET, contentSize);
1,455,683
public Object visit(Object context, IfStatement statement, boolean strict) {<NEW_LINE>LabelNode elseBranch = new LabelNode();<NEW_LINE>LabelNode noElseBranch = new LabelNode();<NEW_LINE>LabelNode end = new LabelNode();<NEW_LINE>statement.getTest().accept(context, this, strict);<NEW_LINE>// value<NEW_LINE>append(jsGetValue());<NEW_LINE>// value<NEW_LINE>append(jsToBoolean());<NEW_LINE>// Boolean<NEW_LINE>invokevirtual(p(Boolean.class), "booleanValue"<MASK><NEW_LINE>// bool<NEW_LINE>if (statement.getElseBlock() == null) {<NEW_LINE>// completion bool<NEW_LINE>iffalse(noElseBranch);<NEW_LINE>} else {<NEW_LINE>iffalse(elseBranch);<NEW_LINE>}<NEW_LINE>// <empty><NEW_LINE>// ----------------------------------------<NEW_LINE>// THEN<NEW_LINE>if (statement.getThenBlock() != null) {<NEW_LINE>invokeCompiledStatementBlock("Then", statement.getThenBlock(), strict);<NEW_LINE>} else {<NEW_LINE>normalCompletion();<NEW_LINE>}<NEW_LINE>// completion<NEW_LINE>go_to(end);<NEW_LINE>// ----------------------------------------<NEW_LINE>// ELSE<NEW_LINE>if (statement.getElseBlock() == null) {<NEW_LINE>label(noElseBranch);<NEW_LINE>normalCompletion();<NEW_LINE>} else {<NEW_LINE>label(elseBranch);<NEW_LINE>// <empty><NEW_LINE>invokeCompiledStatementBlock("Else", statement.getElseBlock(), strict);<NEW_LINE>// completion<NEW_LINE>}<NEW_LINE>label(end);<NEW_LINE>// completion<NEW_LINE>nop();<NEW_LINE>return null;<NEW_LINE>}
, sig(boolean.class));
1,398,672
final BatchEnableStandardsResult executeBatchEnableStandards(BatchEnableStandardsRequest batchEnableStandardsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchEnableStandardsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchEnableStandardsRequest> request = null;<NEW_LINE>Response<BatchEnableStandardsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchEnableStandardsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchEnableStandardsRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SecurityHub");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchEnableStandards");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchEnableStandardsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchEnableStandardsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
455,547
public static void main(String[] args) throws Exception {<NEW_LINE>try (ZContext ctx = new ZContext()) {<NEW_LINE>Socket worker = ctx.createSocket(SocketType.REQ);<NEW_LINE>// Set random identity to make tracing easier<NEW_LINE>Random rand = new Random(System.nanoTime());<NEW_LINE>String identity = String.format("%04X-%04X", rand.nextInt(0x10000), rand.nextInt(0x10000));<NEW_LINE>worker.setIdentity(identity.getBytes(ZMQ.CHARSET));<NEW_LINE>worker.connect("tcp://localhost:5556");<NEW_LINE>// Tell broker we're ready for work<NEW_LINE>System.out.printf("I: (%s) worker ready\n", identity);<NEW_LINE>ZFrame frame = new ZFrame(WORKER_READY);<NEW_LINE><MASK><NEW_LINE>int cycles = 0;<NEW_LINE>while (true) {<NEW_LINE>ZMsg msg = ZMsg.recvMsg(worker);<NEW_LINE>if (msg == null)<NEW_LINE>// Interrupted<NEW_LINE>break;<NEW_LINE>// Simulate various problems, after a few cycles<NEW_LINE>cycles++;<NEW_LINE>if (cycles > 3 && rand.nextInt(5) == 0) {<NEW_LINE>System.out.printf("I: (%s) simulating a crash\n", identity);<NEW_LINE>msg.destroy();<NEW_LINE>break;<NEW_LINE>} else if (cycles > 3 && rand.nextInt(5) == 0) {<NEW_LINE>System.out.printf("I: (%s) simulating CPU overload\n", identity);<NEW_LINE>Thread.sleep(3000);<NEW_LINE>}<NEW_LINE>System.out.printf("I: (%s) normal reply\n", identity);<NEW_LINE>// Do some heavy work<NEW_LINE>Thread.sleep(1000);<NEW_LINE>msg.send(worker);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
frame.send(worker, 0);
795,795
static boolean update(boolean addAllAvailable, Set<String> initialVehicleIds, VehicleFleetManager fleetManager, JobInsertionCostsCalculator insertionCostsCalculator, TreeSet<VersionedInsertionData> insertionDataSet, int updateRound, Job unassignedJob, Collection<VehicleRoute> routes) {<NEW_LINE>for (VehicleRoute route : routes) {<NEW_LINE>Collection<Vehicle> relevantVehicles = new ArrayList<>();<NEW_LINE>if (!(route.getVehicle() instanceof VehicleImpl.NoVehicle)) {<NEW_LINE>relevantVehicles.add(route.getVehicle());<NEW_LINE>if (addAllAvailable && !initialVehicleIds.contains(route.getVehicle().getId())) {<NEW_LINE>relevantVehicles.addAll(fleetManager.getAvailableVehicles(route.getVehicle()));<NEW_LINE>}<NEW_LINE>} else<NEW_LINE>relevantVehicles.addAll(fleetManager.getAvailableVehicles());<NEW_LINE>for (Vehicle v : relevantVehicles) {<NEW_LINE><MASK><NEW_LINE>InsertionData iData = insertionCostsCalculator.getInsertionData(route, unassignedJob, v, depTime, route.getDriver(), Double.MAX_VALUE);<NEW_LINE>if (iData instanceof InsertionData.NoInsertionFound) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>insertionDataSet.add(new VersionedInsertionData(iData, updateRound, route));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
double depTime = v.getEarliestDeparture();
1,801,227
public WebIntentBuilder build() {<NEW_LINE>if (webpage == null) {<NEW_LINE>throw new RuntimeException("URL cannot be null.");<NEW_LINE>}<NEW_LINE>if (forceExternal || shouldAlwaysForceExternal(webpage) || settings.browserSelection.equals("external")) {<NEW_LINE>// request the external browser<NEW_LINE>intent = new Intent(Intent.ACTION_VIEW, Uri.parse(webpage));<NEW_LINE>intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);<NEW_LINE>} else if (settings.browserSelection.equals("article")) {<NEW_LINE>articleIntent = new ArticleIntent.Builder(context, APIKeys.ARTICLE_API_KEY).build();<NEW_LINE>} else if (settings.browserSelection.equals("custom_tab")) {<NEW_LINE>// add the share action<NEW_LINE>Intent shareIntent = new Intent(Intent.ACTION_SEND);<NEW_LINE>String extraText = webpage;<NEW_LINE>shareIntent.putExtra(Intent.EXTRA_TEXT, extraText);<NEW_LINE>shareIntent.setType("text/plain");<NEW_LINE>Random random = new Random();<NEW_LINE>PendingIntent pendingIntent = PendingIntent.getActivity(context, random.nextInt(Integer<MASK><NEW_LINE>customTab = new CustomTabsIntent.Builder(null).setShowTitle(true).setActionButton(((BitmapDrawable) context.getResources().getDrawable(R.drawable.ic_action_share_light)).getBitmap(), "Share", pendingIntent).build();<NEW_LINE>} else {<NEW_LINE>// fallback to in app browser<NEW_LINE>intent = new Intent(context, BrowserActivity.class);<NEW_LINE>intent.putExtra("url", webpage);<NEW_LINE>intent.setFlags(0);<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
.MAX_VALUE), shareIntent, 0);
1,413,200
private static MessageValues extractHeaders(byte[] payload, boolean copyRequestHeaders, MessageHeaders requestHeaders) throws Exception {<NEW_LINE>ByteBuffer <MASK><NEW_LINE>int headerCount = byteBuffer.get() & 0xff;<NEW_LINE>if (headerCount == 0xff) {<NEW_LINE>headerCount = byteBuffer.get() & 0xff;<NEW_LINE>Map<String, Object> headers = new HashMap<String, Object>();<NEW_LINE>for (int i = 0; i < headerCount; i++) {<NEW_LINE>int len = byteBuffer.get() & 0xff;<NEW_LINE>String headerName = new String(payload, byteBuffer.position(), len, "UTF-8");<NEW_LINE>byteBuffer.position(byteBuffer.position() + len);<NEW_LINE>len = byteBuffer.getInt();<NEW_LINE>String headerValue = new String(payload, byteBuffer.position(), len, "UTF-8");<NEW_LINE>Object headerContent = objectMapper.fromJson(headerValue, Object.class);<NEW_LINE>headers.put(headerName, headerContent);<NEW_LINE>byteBuffer.position(byteBuffer.position() + len);<NEW_LINE>}<NEW_LINE>byte[] newPayload = new byte[byteBuffer.remaining()];<NEW_LINE>byteBuffer.get(newPayload);<NEW_LINE>return buildMessageValues(newPayload, headers, copyRequestHeaders, requestHeaders);<NEW_LINE>} else {<NEW_LINE>return buildMessageValues(payload, new HashMap<>(), copyRequestHeaders, requestHeaders);<NEW_LINE>}<NEW_LINE>}
byteBuffer = ByteBuffer.wrap(payload);
1,034,316
private void copy(VMInfo vm) {<NEW_LINE>List<JavaResource> libs = new ArrayList<>();<NEW_LINE>String path = vm.getProperties().get("java.class.path");<NEW_LINE>String javaHome = vm.getProperties().get("java.home");<NEW_LINE>String localDir = vm.getProperties().get("user.dir");<NEW_LINE>String separator = vm.getProperties().get("path.separator");<NEW_LINE>if (path != null && !path.isEmpty()) {<NEW_LINE>String[] items = path.split(separator);<NEW_LINE>for (String item : items) {<NEW_LINE>Path <MASK><NEW_LINE>boolean isAbsolute = filePath.isAbsolute();<NEW_LINE>Path file;<NEW_LINE>if (isAbsolute)<NEW_LINE>file = Paths.get(item);<NEW_LINE>else<NEW_LINE>file = Paths.get(localDir, item);<NEW_LINE>if (!Files.exists(file) || file.toAbsolutePath().startsWith(javaHome))<NEW_LINE>continue;<NEW_LINE>try {<NEW_LINE>libs.add(FileSystemResource.of(file));<NEW_LINE>} catch (Exception ex) {<NEW_LINE>Log.warn("Could not load classpath item '{}'", item);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>promptPrimary(libs);<NEW_LINE>}
filePath = Paths.get(item);
214,175
private void exportToC(GTree gTree, DataTypeManager programDataTypeMgr) {<NEW_LINE>List<Class<? extends AnnotationHandler>> classes = ClassSearcher.getClasses(AnnotationHandler.class);<NEW_LINE>List<AnnotationHandler> list = new ArrayList<>();<NEW_LINE>Class<?>[] constructorArgumentTypes = {};<NEW_LINE>for (Class<? extends AnnotationHandler> clazz : classes) {<NEW_LINE>if (clazz == DefaultAnnotationHandler.class) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Constructor<?> constructor = clazz.getConstructor(constructorArgumentTypes);<NEW_LINE>Object obj = constructor.newInstance();<NEW_LINE>list.add(AnnotationHandler.class.cast(obj));<NEW_LINE>} catch (Exception e) {<NEW_LINE>Msg.showError(this, plugin.getTool().getToolFrame(), "Export Data Types", "Error creating " + clazz.getName() + "\n" + e.toString(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>AnnotationHandler handler = null;<NEW_LINE>if (!list.isEmpty()) {<NEW_LINE>list.add(0, new DefaultAnnotationHandler());<NEW_LINE>AnnotationHandlerDialog dlg = new AnnotationHandlerDialog(list);<NEW_LINE>plugin.getTool().showDialog(dlg);<NEW_LINE>if (!dlg.wasSuccessful()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>handler = dlg.getHandler();<NEW_LINE>} else {<NEW_LINE>handler = new DefaultAnnotationHandler();<NEW_LINE>}<NEW_LINE>TreePath[] paths = gTree.getSelectionPaths();<NEW_LINE>Map<DataTypeManager, List<DataType>> managersToDataTypesMap = new HashMap<>();<NEW_LINE>for (TreePath path : paths) {<NEW_LINE>addToManager(path, managersToDataTypesMap);<NEW_LINE>}<NEW_LINE>GhidraFileChooser fileChooser = new GhidraFileChooser(gTree);<NEW_LINE>// filter the files if we can<NEW_LINE>String[] fileExtensions = handler.getFileExtensions();<NEW_LINE>if (fileExtensions.length > 0) {<NEW_LINE>fileChooser.setFileFilter(new ExtensionFileFilter(fileExtensions, handler.getLanguageName() + " Files"));<NEW_LINE>}<NEW_LINE>Set<Entry<DataTypeManager, List<DataType>><MASK><NEW_LINE>for (Entry<DataTypeManager, List<DataType>> entry : entrySet) {<NEW_LINE>DataTypeManager dataTypeManager = entry.getKey();<NEW_LINE>File file = getFile(gTree, fileChooser, dataTypeManager, handler);<NEW_LINE>if (file == null) {<NEW_LINE>// user cancelled<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<DataType> dataTypeList = entry.getValue();<NEW_LINE>new TaskLauncher(new DataTypeWriterTask(gTree, programDataTypeMgr, dataTypeList, handler, file), gTree);<NEW_LINE>}<NEW_LINE>}
> entrySet = managersToDataTypesMap.entrySet();
1,637,778
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>int width = 0;<NEW_LINE>int height = 0;<NEW_LINE>int widthMode = MeasureSpec.getMode(widthMeasureSpec);<NEW_LINE>int <MASK><NEW_LINE>int widthAllowed = MeasureSpec.getSize(widthMeasureSpec);<NEW_LINE>int heightAllowed = MeasureSpec.getSize(heightMeasureSpec);<NEW_LINE>widthAllowed = chooseWidth(widthMode, widthAllowed);<NEW_LINE>heightAllowed = chooseHeight(heightMode, heightAllowed);<NEW_LINE>if (!mShowAlphaPanel) {<NEW_LINE>height = (int) (widthAllowed - PANEL_SPACING - HUE_PANEL_WIDTH);<NEW_LINE>// If calculated height (based on the width) is more than the allowed height.<NEW_LINE>if (height > heightAllowed || getTag().equals("landscape")) {<NEW_LINE>height = heightAllowed;<NEW_LINE>width = (int) (height + PANEL_SPACING + HUE_PANEL_WIDTH);<NEW_LINE>} else {<NEW_LINE>width = widthAllowed;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>width = (int) (heightAllowed - ALPHA_PANEL_HEIGHT + HUE_PANEL_WIDTH);<NEW_LINE>if (width > widthAllowed) {<NEW_LINE>width = widthAllowed;<NEW_LINE>height = (int) (widthAllowed - HUE_PANEL_WIDTH + ALPHA_PANEL_HEIGHT);<NEW_LINE>} else {<NEW_LINE>height = heightAllowed;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setMeasuredDimension(width, height);<NEW_LINE>}
heightMode = MeasureSpec.getMode(heightMeasureSpec);
859,986
private static long parsePositiveLongAscii(final CharSequence cs, final int index, final int length, final int startIndex, final int end) {<NEW_LINE>int i = startIndex;<NEW_LINE>long tally = 0, octet;<NEW_LINE>while ((end - i) >= 8 && isEightDigitAsciiEncodedNumber(octet = readEightBytesLittleEndian(cs, i))) {<NEW_LINE>tally = (tally * 100_000_000L) + parseEightDigitsLittleEndian(octet);<NEW_LINE>i += 8;<NEW_LINE>}<NEW_LINE>int quartet;<NEW_LINE>while ((end - i) >= 4 && isFourDigitsAsciiEncodedNumber(quartet = readFourBytesLittleEndian(cs, i))) {<NEW_LINE>tally = (tally * 10_000L) + parseFourDigitsLittleEndian(quartet);<NEW_LINE>i += 4;<NEW_LINE>}<NEW_LINE>byte digit;<NEW_LINE>while (i < end && isDigit(digit = (byte) cs.charAt(i))) {<NEW_LINE>tally = (tally * <MASK><NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>if (i != end) {<NEW_LINE>throwParseLongError(cs, index, length);<NEW_LINE>}<NEW_LINE>return tally;<NEW_LINE>}
10) + (digit - 0x30);
424,696
private void defaultHandlers() {<NEW_LINE>handlerMap.put(FridaInterruptEvent.class, this::processInterrupt);<NEW_LINE>handlerMap.put(FridaThreadCreatedEvent.class, this::processThreadCreated);<NEW_LINE>handlerMap.put(FridaThreadReplacedEvent.class, this::processThreadReplaced);<NEW_LINE>handlerMap.put(FridaThreadExitedEvent.class, this::processThreadExited);<NEW_LINE>handlerMap.put(FridaThreadSelectedEvent.class, this::processThreadSelected);<NEW_LINE>handlerMap.put(FridaProcessCreatedEvent.class, this::processProcessCreated);<NEW_LINE>handlerMap.put(FridaProcessReplacedEvent.class, this::processProcessReplaced);<NEW_LINE>handlerMap.put(FridaProcessExitedEvent.class, this::processProcessExited);<NEW_LINE>handlerMap.put(FridaSessionCreatedEvent.class, this::processSessionCreated);<NEW_LINE>handlerMap.put(FridaSessionReplacedEvent.class, this::processSessionReplaced);<NEW_LINE>handlerMap.put(FridaSessionExitedEvent.class, this::processSessionExited);<NEW_LINE>handlerMap.put(FridaProcessSelectedEvent.class, this::processProcessSelected);<NEW_LINE>handlerMap.put(FridaSelectedFrameChangedEvent.class, this::processFrameSelected);<NEW_LINE>handlerMap.put(FridaModuleLoadedEvent.class, this::processModuleLoaded);<NEW_LINE>handlerMap.put(FridaModuleReplacedEvent.class, this::processModuleReplaced);<NEW_LINE>handlerMap.put(FridaModuleUnloadedEvent.class, this::processModuleUnloaded);<NEW_LINE>handlerMap.put(FridaMemoryRegionAddedEvent.class, this::processMemoryRegionAdded);<NEW_LINE>handlerMap.put(FridaMemoryRegionReplacedEvent.class, this::processMemoryRegionReplaced);<NEW_LINE>handlerMap.put(FridaModuleUnloadedEvent.class, this::processModuleUnloaded);<NEW_LINE>handlerMap.put(FridaStateChangedEvent.class, this::processStateChanged);<NEW_LINE>handlerMap.putVoid(FridaCommandDoneEvent.class, this::processDefault);<NEW_LINE>handlerMap.putVoid(FridaStoppedEvent.class, this::processDefault);<NEW_LINE>handlerMap.putVoid(<MASK><NEW_LINE>handlerMap.putVoid(FridaConsoleOutputEvent.class, this::processConsoleOutput);<NEW_LINE>statusMap.put(FridaProcessCreatedEvent.class, DebugStatus.BREAK);<NEW_LINE>statusMap.put(FridaProcessExitedEvent.class, DebugStatus.NO_DEBUGGEE);<NEW_LINE>statusMap.put(FridaStateChangedEvent.class, DebugStatus.NO_CHANGE);<NEW_LINE>statusMap.put(FridaStoppedEvent.class, DebugStatus.BREAK);<NEW_LINE>statusMap.put(FridaInterruptEvent.class, DebugStatus.BREAK);<NEW_LINE>}
FridaRunningEvent.class, this::processDefault);
929,090
public static Geometry gridPoints(Geometry g, int nCells) {<NEW_LINE>Envelope env = FunctionsUtil.getEnvelopeOrDefault(g);<NEW_LINE>GeometryFactory geomFact = FunctionsUtil.getFactoryOrDefault(g);<NEW_LINE>int nCellsOnSideY = (int) Math.sqrt(nCells);<NEW_LINE>int nCellsOnSideX = nCells / nCellsOnSideY;<NEW_LINE>double cellSizeX = env.getWidth() / (nCellsOnSideX - 1);<NEW_LINE>double cellSizeY = env.getHeight<MASK><NEW_LINE>CoordinateList pts = new CoordinateList();<NEW_LINE>for (int i = 0; i < nCellsOnSideX; i++) {<NEW_LINE>for (int j = 0; j < nCellsOnSideY; j++) {<NEW_LINE>double x = env.getMinX() + i * cellSizeX;<NEW_LINE>double y = env.getMinY() + j * cellSizeY;<NEW_LINE>pts.add(new Coordinate(x, y));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return geomFact.createMultiPointFromCoords(pts.toCoordinateArray());<NEW_LINE>}
() / (nCellsOnSideY - 1);
166,132
public void marshall(EventIntegrationAssociation eventIntegrationAssociation, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (eventIntegrationAssociation == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(eventIntegrationAssociation.getEventIntegrationAssociationArn(), EVENTINTEGRATIONASSOCIATIONARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(eventIntegrationAssociation.getEventIntegrationAssociationId(), EVENTINTEGRATIONASSOCIATIONID_BINDING);<NEW_LINE>protocolMarshaller.marshall(eventIntegrationAssociation.getEventIntegrationName(), EVENTINTEGRATIONNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(eventIntegrationAssociation.getEventBridgeRuleName(), EVENTBRIDGERULENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(eventIntegrationAssociation.getClientAssociationMetadata(), CLIENTASSOCIATIONMETADATA_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
eventIntegrationAssociation.getClientId(), CLIENTID_BINDING);
1,062,334
public static String parseIpAddress(GeneralName generalName) {<NEW_LINE>byte[] ipAddressBytes = ((ASN1OctetString) generalName.<MASK><NEW_LINE>String ipAddressString = "";<NEW_LINE>if (ipAddressBytes.length == 4 || ipAddressBytes.length == 16) {<NEW_LINE>try {<NEW_LINE>ipAddressString = InetAddress.getByAddress(ipAddressBytes).getHostAddress();<NEW_LINE>} catch (UnknownHostException e) {<NEW_LINE>// length of IP address has been checked before<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (ipAddressBytes.length == 8 || ipAddressBytes.length == 32) {<NEW_LINE>final int newSize = ipAddressBytes.length / 2;<NEW_LINE>byte[] ipAddress = new byte[newSize];<NEW_LINE>System.arraycopy(ipAddressBytes, 0, ipAddress, 0, newSize);<NEW_LINE>try {<NEW_LINE>ipAddressString = InetAddress.getByAddress(ipAddress).getHostAddress();<NEW_LINE>} catch (UnknownHostException e) {<NEW_LINE>// length of IP address has been checked before<NEW_LINE>}<NEW_LINE>byte[] netMask = new byte[newSize];<NEW_LINE>System.arraycopy(ipAddressBytes, newSize, netMask, 0, newSize);<NEW_LINE>try {<NEW_LINE>String netmaskString = InetAddress.getByAddress(netMask).getHostAddress();<NEW_LINE>ipAddressString = ipAddressString + "/" + netmaskString;<NEW_LINE>} catch (UnknownHostException e) {<NEW_LINE>// length of IP address has been checked before<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ipAddressString;<NEW_LINE>}
getName()).getOctets();
468,595
public static ListAuthenticationLogsResponse unmarshall(ListAuthenticationLogsResponse listAuthenticationLogsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAuthenticationLogsResponse.setRequestId(_ctx.stringValue("ListAuthenticationLogsResponse.RequestId"));<NEW_LINE>listAuthenticationLogsResponse.setTotalCount(_ctx.longValue("ListAuthenticationLogsResponse.TotalCount"));<NEW_LINE>listAuthenticationLogsResponse.setPageNumber(_ctx.longValue("ListAuthenticationLogsResponse.PageNumber"));<NEW_LINE>listAuthenticationLogsResponse.setPageSize(_ctx.longValue("ListAuthenticationLogsResponse.PageSize"));<NEW_LINE>List<AuthenticationLogContentItem> authenticationLogContent = new ArrayList<AuthenticationLogContentItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListAuthenticationLogsResponse.AuthenticationLogContent.Length"); i++) {<NEW_LINE>AuthenticationLogContentItem authenticationLogContentItem = new AuthenticationLogContentItem();<NEW_LINE>authenticationLogContentItem.setTenantId(_ctx.stringValue<MASK><NEW_LINE>authenticationLogContentItem.setAliUid(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].AliUid"));<NEW_LINE>authenticationLogContentItem.setApplicationUuid(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].ApplicationUuid"));<NEW_LINE>authenticationLogContentItem.setApplicationExternalId(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].ApplicationExternalId"));<NEW_LINE>authenticationLogContentItem.setUserId(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].UserId"));<NEW_LINE>authenticationLogContentItem.setAuthenticatorUuid(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].AuthenticatorUuid"));<NEW_LINE>authenticationLogContentItem.setAuthenticatorName(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].AuthenticatorName"));<NEW_LINE>authenticationLogContentItem.setCredentialId(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].CredentialId"));<NEW_LINE>authenticationLogContentItem.setAuthenticatorType(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].AuthenticatorType"));<NEW_LINE>authenticationLogContentItem.setAuthenticationAction(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].AuthenticationAction"));<NEW_LINE>authenticationLogContentItem.setChallengeBase64(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].ChallengeBase64"));<NEW_LINE>authenticationLogContentItem.setAuthenticationTime(_ctx.longValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].AuthenticationTime"));<NEW_LINE>authenticationLogContentItem.setUserAgent(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].UserAgent"));<NEW_LINE>authenticationLogContentItem.setUserSourceIp(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].UserSourceIp"));<NEW_LINE>authenticationLogContentItem.setRawAuthenticationContext(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].RawAuthenticationContext"));<NEW_LINE>authenticationLogContentItem.setVerifyResult(_ctx.booleanValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].VerifyResult"));<NEW_LINE>authenticationLogContentItem.setErrorCode(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].ErrorCode"));<NEW_LINE>authenticationLogContentItem.setErrorMessage(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].ErrorMessage"));<NEW_LINE>authenticationLogContentItem.setLogTag(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].LogTag"));<NEW_LINE>authenticationLogContentItem.setLogParams(_ctx.stringValue("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].LogParams"));<NEW_LINE>authenticationLogContent.add(authenticationLogContentItem);<NEW_LINE>}<NEW_LINE>listAuthenticationLogsResponse.setAuthenticationLogContent(authenticationLogContent);<NEW_LINE>return listAuthenticationLogsResponse;<NEW_LINE>}
("ListAuthenticationLogsResponse.AuthenticationLogContent[" + i + "].TenantId"));
25,930
public TriggerConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TriggerConfig triggerConfig = new TriggerConfig();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("TriggerType", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>triggerConfig.setTriggerType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("TriggerProperties", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>triggerConfig.setTriggerProperties(TriggerPropertiesJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return triggerConfig;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,606,859
public void onClose(CachedOutputStream cos) {<NEW_LINE>LoggingMessage buffer = setupBuffer(message);<NEW_LINE>String ct = (String) message.get(Message.CONTENT_TYPE);<NEW_LINE>if (!isShowBinaryContent() && isBinaryContent(ct)) {<NEW_LINE>buffer.getMessage().append<MASK><NEW_LINE>log(logger, formatLoggingMessage(buffer));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (cos.getTempFile() == null) {<NEW_LINE>// buffer.append("Outbound Message:\n");<NEW_LINE>if (cos.size() > limit) {<NEW_LINE>buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>buffer.getMessage().append("Outbound Message (saved to tmp file):\n");<NEW_LINE>buffer.getMessage().append("Filename: " + cos.getTempFile().getAbsolutePath() + "\n");<NEW_LINE>if (cos.size() > limit) {<NEW_LINE>buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>String encoding = (String) message.get(Message.ENCODING);<NEW_LINE>writePayload(buffer.getPayload(), cos, encoding, ct, prettyLogging);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>log(logger, formatLoggingMessage(buffer));<NEW_LINE>try {<NEW_LINE>// empty out the cache<NEW_LINE>cos.lockOutputStream();<NEW_LINE>cos.resetOut(null, false);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>message.setContent(OutputStream.class, origStream);<NEW_LINE>}
(BINARY_CONTENT_MESSAGE).append('\n');
406,100
private Map<String, Object> convertProperties(String type, Map<String, Object> properties, String keyPrefix) {<NEW_LINE>return properties.entrySet().stream().flatMap(e -> {<NEW_LINE>if (e.getValue() instanceof Map) {<NEW_LINE>Map<String, Object> map = (Map<String, Object>) e.getValue();<NEW_LINE>String classType = getClassType(type, e.getKey());<NEW_LINE>if (classType != null && "POINT".equals(classType.toUpperCase())) {<NEW_LINE>return Stream.of(e);<NEW_LINE>}<NEW_LINE>return flatMap(map, e.getKey());<NEW_LINE>} else {<NEW_LINE>return Stream.of(e);<NEW_LINE>}<NEW_LINE>}).map(e -> {<NEW_LINE>String key = e.getKey();<NEW_LINE>final String classType = getClassType(type, key);<NEW_LINE>if (e.getValue() instanceof Collection) {<NEW_LINE>final List<Object> coll = convertList((Collection<Object>) e.getValue(), classType);<NEW_LINE>return new AbstractMap.SimpleEntry<>(<MASK><NEW_LINE>} else {<NEW_LINE>return new AbstractMap.SimpleEntry<>(e.getKey(), convertMappedValue(e.getValue(), classType));<NEW_LINE>}<NEW_LINE>}).filter(e -> e.getValue() != null).collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));<NEW_LINE>}
e.getKey(), coll);
1,385,309
public void doubleClick(DoubleClickEvent event) {<NEW_LINE>StructuredSelection sel = <MASK><NEW_LINE>Object o = sel.getFirstElement();<NEW_LINE>if (o instanceof DependencyElement) {<NEW_LINE>DependencyElement de = (DependencyElement) o;<NEW_LINE>switch(de.type) {<NEW_LINE>case SERVICE:<NEW_LINE>new OpenXLogProfileJob(XLogFlowView.this.getViewSite().getShell().getDisplay(), date, de.id, de.tags.getInt("serverId")).schedule();<NEW_LINE>break;<NEW_LINE>case SQL:<NEW_LINE>List<StyleRange> srList = new ArrayList<StyleRange>();<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>String sql = de.tags.getText("sql");<NEW_LINE>sb.append(sql);<NEW_LINE>String error = null;<NEW_LINE>if (de.error != 0) {<NEW_LINE>error = TextProxy.error.getLoadText(date, de.error, de.tags.getInt("serverId"));<NEW_LINE>}<NEW_LINE>new SQLFormatDialog().show(sb.toString(), error);<NEW_LINE>break;<NEW_LINE>case API_CALL:<NEW_LINE>srList = new ArrayList<StyleRange>();<NEW_LINE>sb = new StringBuffer();<NEW_LINE>String apicall = de.name;<NEW_LINE>sb.append(apicall);<NEW_LINE>if (de.error != 0) {<NEW_LINE>error = TextProxy.error.getLoadText(date, de.error, de.tags.getInt("serverId"));<NEW_LINE>if (StringUtil.isNotEmpty(error)) {<NEW_LINE>sb.append("\n");<NEW_LINE>srList.add(new StyleRange(sb.length(), error.length(), ColorUtil.getInstance().getColor("red"), null, SWT.BOLD));<NEW_LINE>sb.append(error);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>new EditableMessageDialog().show("API Call", sb.toString(), srList);<NEW_LINE>break;<NEW_LINE>case DISPATCH:<NEW_LINE>case THREAD:<NEW_LINE>new OpenXLogProfileJob(XLogFlowView.this.getViewSite().getShell().getDisplay(), date, de.id, de.tags.getInt("serverId")).schedule();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(StructuredSelection) event.getSelection();
921,622
protected List<String> scripts() {<NEW_LINE>List<String> bsUuids = CollectionUtils.transformToList(template.getBackupStorageRefs(), new Function<String, ImageBackupStorageRefVO>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String call(ImageBackupStorageRefVO arg) {<NEW_LINE>return ImageStatus.Deleted.equals(arg.getStatus()) ? null : arg.getBackupStorageUuid();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (bsUuids.isEmpty()) {<NEW_LINE>throw new OperationFailureException(operr("the image[uuid:%s, name:%s] has been deleted on all backup storage", template.getUuid()<MASK><NEW_LINE>}<NEW_LINE>String sql = "select bs.uuid from BackupStorageVO bs, BackupStorageZoneRefVO zref, PrimaryStorageVO ps where zref.zoneUuid = ps.zoneUuid and bs.status = :bsStatus and bs.state = :bsState and ps.uuid = :psUuid and zref.backupStorageUuid = bs.uuid and bs.uuid in (:bsUuids)";<NEW_LINE>TypedQuery<String> q = dbf.getEntityManager().createQuery(sql, String.class);<NEW_LINE>q.setParameter("psUuid", msg.getPrimaryStorageUuid());<NEW_LINE>q.setParameter("bsStatus", BackupStorageStatus.Connected);<NEW_LINE>q.setParameter("bsState", BackupStorageState.Enabled);<NEW_LINE>q.setParameter("bsUuids", bsUuids);<NEW_LINE>bsUuids = q.getResultList();<NEW_LINE>return bsUuids;<NEW_LINE>}
, template.getName()));
41,581
private String buildCommand() throws Exception {<NEW_LINE>// generate scripts<NEW_LINE>String fileName = String.format("%s/%s_node.%s", taskExecutionContext.getExecutePath(), taskExecutionContext.getTaskAppId(), OSUtils.isWindows() ? "bat" : "sh");<NEW_LINE>File file = new File(fileName);<NEW_LINE>Path path = file.toPath();<NEW_LINE>if (Files.exists(path)) {<NEW_LINE>return fileName;<NEW_LINE>}<NEW_LINE>String script = shellParameters.getRawScript().replaceAll("\\r\\n", "\n");<NEW_LINE>script = parseScript(script);<NEW_LINE>shellParameters.setRawScript(script);<NEW_LINE>logger.info("raw script : {}", shellParameters.getRawScript());<NEW_LINE>logger.info("task execute path : {}", taskExecutionContext.getExecutePath());<NEW_LINE>Set<PosixFilePermission> perms = PosixFilePermissions.fromString(RWXR_XR_X);<NEW_LINE>FileAttribute<Set<PosixFilePermission>> attr = PosixFilePermissions.asFileAttribute(perms);<NEW_LINE>if (OSUtils.isWindows()) {<NEW_LINE>Files.createFile(path);<NEW_LINE>} else {<NEW_LINE>if (!file.getParentFile().exists()) {<NEW_LINE>file.getParentFile().mkdirs();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Files.write(path, shellParameters.getRawScript().getBytes(), StandardOpenOption.APPEND);<NEW_LINE>return fileName;<NEW_LINE>}
Files.createFile(path, attr);
962,211
final UpdateApplicationResult executeUpdateApplication(UpdateApplicationRequest updateApplicationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateApplicationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateApplicationRequest> request = null;<NEW_LINE>Response<UpdateApplicationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateApplicationRequest));<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, "AppStream");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateApplication");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateApplicationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateApplicationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,448,337
// entry of processing swap table<NEW_LINE>private void processSwap(Database db, OlapTable origTable, List<AlterClause> alterClauses) throws UserException {<NEW_LINE>if (!(alterClauses.get(0) instanceof SwapTableClause)) {<NEW_LINE>throw new DdlException("swap operation only support table");<NEW_LINE>}<NEW_LINE>// must hold db write lock<NEW_LINE>Preconditions.<MASK><NEW_LINE>SwapTableClause clause = (SwapTableClause) alterClauses.get(0);<NEW_LINE>String origTblName = origTable.getName();<NEW_LINE>String newTblName = clause.getTblName();<NEW_LINE>Table newTbl = db.getTable(newTblName);<NEW_LINE>if (newTbl == null || newTbl.getType() != TableType.OLAP) {<NEW_LINE>throw new DdlException("Table " + newTblName + " does not exist or is not OLAP table");<NEW_LINE>}<NEW_LINE>OlapTable olapNewTbl = (OlapTable) newTbl;<NEW_LINE>// First, we need to check whether the table to be operated on can be renamed<NEW_LINE>olapNewTbl.checkAndSetName(origTblName, true);<NEW_LINE>origTable.checkAndSetName(newTblName, true);<NEW_LINE>swapTableInternal(db, origTable, olapNewTbl);<NEW_LINE>// write edit log<NEW_LINE>SwapTableOperationLog log = new SwapTableOperationLog(db.getId(), origTable.getId(), olapNewTbl.getId());<NEW_LINE>Catalog.getCurrentCatalog().getEditLog().logSwapTable(log);<NEW_LINE>LOG.info("finish swap table {}-{} with table {}-{}", origTable.getId(), origTblName, newTbl.getId(), newTblName);<NEW_LINE>}
checkState(db.isWriteLockHeldByCurrentThread());
619,582
protected ShardStats shardOperation(IndicesStatsRequest request, ShardRouting shardRouting) {<NEW_LINE>IndexService indexService = indicesService.indexServiceSafe(shardRouting.shardId().getIndex());<NEW_LINE>IndexShard indexShard = indexService.getShard(shardRouting.shardId().id());<NEW_LINE>// if we don't have the routing entry yet, we need it stats wise, we treat it as if the shard is not ready yet<NEW_LINE>if (indexShard.routingEntry() == null) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>CommonStats commonStats = new CommonStats(indicesService.getIndicesQueryCache(), indexShard, request.flags());<NEW_LINE>CommitStats commitStats;<NEW_LINE>SeqNoStats seqNoStats;<NEW_LINE>RetentionLeaseStats retentionLeaseStats;<NEW_LINE>try {<NEW_LINE>commitStats = indexShard.commitStats();<NEW_LINE>seqNoStats = indexShard.seqNoStats();<NEW_LINE>retentionLeaseStats = indexShard.getRetentionLeaseStats();<NEW_LINE>} catch (final AlreadyClosedException e) {<NEW_LINE>// shard is closed - no stats is fine<NEW_LINE>commitStats = null;<NEW_LINE>seqNoStats = null;<NEW_LINE>retentionLeaseStats = null;<NEW_LINE>}<NEW_LINE>return new ShardStats(indexShard.routingEntry(), indexShard.shardPath(), commonStats, commitStats, seqNoStats, retentionLeaseStats);<NEW_LINE>}
ShardNotFoundException(indexShard.shardId());
1,073,248
final UpdateInferenceSchedulerResult executeUpdateInferenceScheduler(UpdateInferenceSchedulerRequest updateInferenceSchedulerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateInferenceSchedulerRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateInferenceSchedulerRequest> request = null;<NEW_LINE>Response<UpdateInferenceSchedulerResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateInferenceSchedulerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateInferenceSchedulerRequest));<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, "LookoutEquipment");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateInferenceScheduler");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateInferenceSchedulerResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateInferenceSchedulerResultJsonUnmarshaller());<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();
476,094
private void processAlertRecord(Record record, Connection connection, DTLSContext epochContext) {<NEW_LINE>AlertMessage alert = <MASK><NEW_LINE>Handshaker handshaker = connection.getOngoingHandshake();<NEW_LINE>HandshakeException error = null;<NEW_LINE>LOGGER.trace("Processing {} ALERT from [{}]: {}", alert.getLevel(), StringUtil.toLog(connection.getPeerAddress()), alert.getDescription());<NEW_LINE>if (AlertDescription.CLOSE_NOTIFY.equals(alert.getDescription())) {<NEW_LINE>// according to section 7.2.1 of the TLS 1.2 spec<NEW_LINE>// (http://tools.ietf.org/html/rfc5246#section-7.2.1)<NEW_LINE>// we need to respond with a CLOSE_NOTIFY alert and<NEW_LINE>// then close and remove the connection immediately<NEW_LINE>if (connection.hasEstablishedDtlsContext()) {<NEW_LINE>updateConnectionAddress(record, connection);<NEW_LINE>} else {<NEW_LINE>error = new HandshakeException("Received 'close notify'", alert);<NEW_LINE>if (handshaker != null) {<NEW_LINE>handshaker.setFailureCause(error);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!connection.isResumptionRequired()) {<NEW_LINE>if (connection.getPeerAddress() != null) {<NEW_LINE>sendAlert(connection, epochContext, new AlertMessage(AlertLevel.WARNING, AlertDescription.CLOSE_NOTIFY));<NEW_LINE>}<NEW_LINE>if (connection.hasEstablishedDtlsContext()) {<NEW_LINE>connection.close(record);<NEW_LINE>} else {<NEW_LINE>connectionStore.remove(connection, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (AlertLevel.FATAL.equals(alert.getLevel())) {<NEW_LINE>// according to section 7.2 of the TLS 1.2 spec<NEW_LINE>// (http://tools.ietf.org/html/rfc5246#section-7.2)<NEW_LINE>// the connection needs to be terminated immediately<NEW_LINE>error = new HandshakeException("Received 'fatal alert/" + alert.getDescription() + "'", alert);<NEW_LINE>if (handshaker != null) {<NEW_LINE>handshaker.setFailureCause(error);<NEW_LINE>}<NEW_LINE>connectionStore.remove(connection, true);<NEW_LINE>} else {<NEW_LINE>// non-fatal alerts do not require any special handling<NEW_LINE>}<NEW_LINE>reportAlertInternal(connection, alert);<NEW_LINE>if (null != error && null != handshaker) {<NEW_LINE>handshaker.handshakeFailed(error);<NEW_LINE>}<NEW_LINE>}
(AlertMessage) record.getFragment();
1,107,813
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("mae" + mm.getMessage("function.missingParam"));<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("mae" + mm.getMessage("function.invalidParam"));<NEW_LINE>} else {<NEW_LINE>if (param.getSubSize() != 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("mae" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>IParam sub1 = param.getSub(0);<NEW_LINE>IParam sub2 = param.getSub(1);<NEW_LINE>if (sub1 == null || sub2 == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("mae" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>Object o1 = sub1.getLeafExpression().calculate(ctx);<NEW_LINE>Object o2 = sub2.getLeafExpression().calculate(ctx);<NEW_LINE>if (o1 instanceof Sequence && o2 instanceof Sequence) {<NEW_LINE>Matrix A = new Matrix((Sequence) o1);<NEW_LINE>Matrix B = new Matrix((Sequence) o2);<NEW_LINE>if (A.getCols() == 0 || A.getRows() == 0) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("mae" + mm.getMessage("function.paramTypeError"));<NEW_LINE>} else if (B.getCols() == 0 || B.getRows() == 0) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("mae" <MASK><NEW_LINE>}<NEW_LINE>return A.mae(B);<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("mae" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
+ mm.getMessage("function.paramTypeError"));
1,235,249
private String issueReceipt() {<NEW_LINE>MInOut inOut = new MInOut(getCtx(), m_M_InOut_ID, null);<NEW_LINE>if (inOut.isSOTrx() || !inOut.isProcessed() || !(MInOut.DOCSTATUS_Completed.equals(inOut.getDocStatus()) || MInOut.DOCSTATUS_Closed.equals(inOut.getDocStatus())))<NEW_LINE>throw new IllegalArgumentException("Receipt not valid - " + inOut);<NEW_LINE>log.info(inOut.toString());<NEW_LINE>// Set Project of Receipt<NEW_LINE>if (inOut.getC_Project_ID() == 0) {<NEW_LINE>inOut.setC_Project_ID(m_project.getC_Project_ID());<NEW_LINE>inOut.save();<NEW_LINE>} else if (inOut.getC_Project_ID() != m_project.getC_Project_ID())<NEW_LINE>throw new IllegalArgumentException("Receipt for other Project (" + inOut.getC_Project_ID() + ")");<NEW_LINE>int counter = 0;<NEW_LINE>for (final MInOutLine inOutLine : inOut.getLines()) {<NEW_LINE>// Need to have a Product<NEW_LINE>if (inOutLine.getM_Product_ID() <= 0)<NEW_LINE>continue;<NEW_LINE>// Need to have Quantity<NEW_LINE>if (inOutLine.getMovementQty() == null || inOutLine.getMovementQty().signum() == 0)<NEW_LINE>continue;<NEW_LINE>// not issued yet<NEW_LINE>if (projectIssueHasReceipt(inOutLine.getM_InOutLine_ID()))<NEW_LINE>continue;<NEW_LINE>// Create Issue<NEW_LINE>MProjectIssue pi = new MProjectIssue(m_project);<NEW_LINE>pi.setMandatory(inOutLine.getM_Locator_ID(), inOutLine.getM_Product_ID(), inOutLine.getMovementQty());<NEW_LINE>if (// default today<NEW_LINE>m_MovementDate != null)<NEW_LINE>pi.setMovementDate(m_MovementDate);<NEW_LINE>if (m_Description != null && m_Description.length() > 0)<NEW_LINE>pi.setDescription(m_Description);<NEW_LINE>else if (inOutLine.getDescription() != null)<NEW_LINE>pi.<MASK><NEW_LINE>else if (inOut.getDescription() != null)<NEW_LINE>pi.setDescription(inOut.getDescription());<NEW_LINE>pi.setM_InOutLine_ID(inOutLine.getM_InOutLine_ID());<NEW_LINE>pi.process();<NEW_LINE>// Find/Create Project Line<NEW_LINE>MProjectLine pl = null;<NEW_LINE>for (MProjectLine line : m_project.getLines()) {<NEW_LINE>// The Order we generated is the same as the Order of the receipt<NEW_LINE>if (// not issued<NEW_LINE>line.getC_OrderPO_ID() == inOut.getC_Order_ID() && line.getM_Product_ID() == inOutLine.getM_Product_ID() && line.getC_ProjectIssue_ID() == 0) {<NEW_LINE>pl = line;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (pl == null)<NEW_LINE>pl = new MProjectLine(m_project);<NEW_LINE>// setIssue<NEW_LINE>pl.setMProjectIssue(pi);<NEW_LINE>pl.save();<NEW_LINE>addLog(pi.getLine(), pi.getMovementDate(), pi.getMovementQty(), null);<NEW_LINE>counter++;<NEW_LINE>}<NEW_LINE>// all InOutLines<NEW_LINE>return "@Created@ " + counter;<NEW_LINE>}
setDescription(inOutLine.getDescription());
1,345,897
private boolean handleJid(Invite invite) {<NEW_LINE>List<Contact> contacts = xmppConnectionService.findContacts(invite.getJid(), invite.account);<NEW_LINE>if (invite.isAction(XmppUri.ACTION_JOIN)) {<NEW_LINE>Conversation muc = xmppConnectionService.findFirstMuc(invite.getJid());<NEW_LINE>if (muc != null && !invite.forceDialog) {<NEW_LINE>switchToConversationDoNotAppend(muc, invite.getBody());<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>showJoinConferenceDialog(invite.getJid().<MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else if (contacts.size() == 0) {<NEW_LINE>showCreateContactDialog(invite.getJid().toEscapedString(), invite);<NEW_LINE>return false;<NEW_LINE>} else if (contacts.size() == 1) {<NEW_LINE>Contact contact = contacts.get(0);<NEW_LINE>if (!invite.isSafeSource() && invite.hasFingerprints()) {<NEW_LINE>displayVerificationWarningDialog(contact, invite);<NEW_LINE>} else {<NEW_LINE>if (invite.hasFingerprints()) {<NEW_LINE>if (xmppConnectionService.verifyFingerprints(contact, invite.getFingerprints())) {<NEW_LINE>Toast.makeText(this, R.string.verified_fingerprints, Toast.LENGTH_SHORT).show();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (invite.account != null) {<NEW_LINE>xmppConnectionService.getShortcutService().report(contact);<NEW_LINE>}<NEW_LINE>switchToConversationDoNotAppend(contact, invite.getBody());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>if (mMenuSearchView != null) {<NEW_LINE>mMenuSearchView.expandActionView();<NEW_LINE>mSearchEditText.setText("");<NEW_LINE>mSearchEditText.append(invite.getJid().toEscapedString());<NEW_LINE>filter(invite.getJid().toEscapedString());<NEW_LINE>} else {<NEW_LINE>mInitialSearchValue.push(invite.getJid().toEscapedString());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}
asBareJid().toEscapedString());
565,671
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("to" <MASK><NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>Object o = param.getLeafExpression().calculate(ctx);<NEW_LINE>if (o instanceof Number) {<NEW_LINE>int end = ((Number) o).intValue();<NEW_LINE>return end > 0 ? new Sequence(1, end) : new Sequence(0);<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("to" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (param.getSubSize() != 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("to" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>IParam sub1 = param.getSub(0);<NEW_LINE>IParam sub2 = param.getSub(1);<NEW_LINE>if (sub1 == null || sub2 == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("to" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>Object o1 = sub1.getLeafExpression().calculate(ctx);<NEW_LINE>Object o2 = sub2.getLeafExpression().calculate(ctx);<NEW_LINE>if (o1 instanceof Long && o2 instanceof Long) {<NEW_LINE>long begin = ((Number) o1).longValue();<NEW_LINE>long end = ((Number) o2).longValue();<NEW_LINE>if (option != null && option.indexOf('s') != -1) {<NEW_LINE>if (end >= 0) {<NEW_LINE>end += begin - 1;<NEW_LINE>} else {<NEW_LINE>end += begin + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new Sequence(begin, end);<NEW_LINE>} else if (o1 instanceof Number && o2 instanceof Number) {<NEW_LINE>int begin = ((Number) o1).intValue();<NEW_LINE>int end = ((Number) o2).intValue();<NEW_LINE>if (option != null && option.indexOf('s') != -1) {<NEW_LINE>if (end >= 0) {<NEW_LINE>end += begin - 1;<NEW_LINE>} else {<NEW_LINE>end += begin + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new Sequence(begin, end);<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("to" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
+ mm.getMessage("function.missingParam"));
314,364
public boolean deployCertificate(final Host host, final Certificate certificate, final Boolean reconnect, final Map<String, String> sshAccessDetails) throws AgentUnavailableException, OperationTimedoutException {<NEW_LINE>final SetupCertificateCommand cmd = new SetupCertificateCommand(certificate);<NEW_LINE>if (sshAccessDetails != null && !sshAccessDetails.isEmpty()) {<NEW_LINE>cmd.setAccessDetail(sshAccessDetails);<NEW_LINE>}<NEW_LINE>CallContext.current().setEventDetails("deploying certificate for host id: " + host.getId());<NEW_LINE>final SetupCertificateAnswer answer = (SetupCertificateAnswer) agentManager.send(host.getId(), cmd);<NEW_LINE>if (answer.getResult()) {<NEW_LINE>CallContext.current().setEventDetails("successfully deployed certificate for host id: " + host.getId());<NEW_LINE>} else {<NEW_LINE>CallContext.current().setEventDetails("failed to deploy certificate for host id: " + host.getId());<NEW_LINE>}<NEW_LINE>if (answer.getResult()) {<NEW_LINE>getActiveCertificatesMap().put(host.getPrivateIpAddress(), certificate.getClientCertificate());<NEW_LINE>if (sshAccessDetails == null && reconnect != null && reconnect) {<NEW_LINE>LOG.info(String.format("Successfully setup certificate on host, reconnecting with agent with id=%d, name=%s, address=%s", host.getId(), host.getName()<MASK><NEW_LINE>try {<NEW_LINE>agentManager.reconnect(host.getId());<NEW_LINE>} catch (AgentUnavailableException | CloudRuntimeException e) {<NEW_LINE>LOG.debug("Error when reconnecting to host: " + host.getUuid(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
, host.getPublicIpAddress()));
738,938
public AmazonServiceException handle(HttpResponse errorResponse) throws IOException {<NEW_LINE>final InputStream is = errorResponse.getContent();<NEW_LINE>if (is == null) {<NEW_LINE>return newAmazonS3Exception(errorResponse.getStatusText(), errorResponse);<NEW_LINE>}<NEW_LINE>// Try to read the error response<NEW_LINE>String content = "";<NEW_LINE>try {<NEW_LINE>content = IOUtils.toString(is);<NEW_LINE>} catch (final IOException ex) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Failed in reading the error response", ex);<NEW_LINE>}<NEW_LINE>return newAmazonS3Exception(errorResponse.getStatusText(), errorResponse);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// try to parse the error response as XML<NEW_LINE>final Document document = XpathUtils.documentFrom(content);<NEW_LINE>final String message = XpathUtils.asString("Error/Message", document);<NEW_LINE>final String errorCode = XpathUtils.asString("Error/Code", document);<NEW_LINE>final String requestId = XpathUtils.asString("Error/RequestId", document);<NEW_LINE>final String extendedRequestId = XpathUtils.asString("Error/HostId", document);<NEW_LINE>final AmazonS3Exception ase = new AmazonS3Exception(message);<NEW_LINE>final int statusCode = errorResponse.getStatusCode();<NEW_LINE>ase.setStatusCode(statusCode);<NEW_LINE>ase<MASK><NEW_LINE>ase.setErrorCode(errorCode);<NEW_LINE>ase.setRequestId(requestId);<NEW_LINE>ase.setExtendedRequestId(extendedRequestId);<NEW_LINE>ase.setCloudFrontId(errorResponse.getHeaders().get(Headers.CLOUD_FRONT_ID));<NEW_LINE>return ase;<NEW_LINE>} catch (final Exception ex) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Failed in parsing the response as XML: " + content, ex);<NEW_LINE>}<NEW_LINE>return newAmazonS3Exception(content, errorResponse);<NEW_LINE>}<NEW_LINE>}
.setErrorType(errorTypeOf(statusCode));
117,360
public void testSupplyAsyncWithPreContextualizedAction() throws Exception {<NEW_LINE>ManagedExecutor executor = ManagedExecutor.builder().propagated(TestContextTypes.CITY, TestContextTypes.STATE).build();<NEW_LINE>CurrentLocation.setLocation("Lake City", "Minnesota");<NEW_LINE>try {<NEW_LINE>Supplier<String> action = stateContextPropagator.contextualSupplier(() -> {<NEW_LINE>// not propagated<NEW_LINE>assertEquals("", CurrentLocation.getCity());<NEW_LINE>return CurrentLocation.getState();<NEW_LINE>});<NEW_LINE>CurrentLocation.setLocation("Pepin", "Wisconsin");<NEW_LINE>CompletableFuture<Void> cf = executor.supplyAsync(action).thenAcceptAsync(s -> {<NEW_LINE>// result of prior stage reflects previously captured context<NEW_LINE>assertEquals("Minnesota", s);<NEW_LINE>assertEquals("Pepin", CurrentLocation.getCity());<NEW_LINE>assertEquals(<MASK><NEW_LINE>});<NEW_LINE>// force assertion error to be raised, if any<NEW_LINE>cf.get(TIMEOUT_NS, TimeUnit.NANOSECONDS);<NEW_LINE>} finally {<NEW_LINE>CurrentLocation.clear();<NEW_LINE>executor.shutdownNow();<NEW_LINE>}<NEW_LINE>}
"Wisconsin", CurrentLocation.getState());
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(<MASK><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().setDate(subRevision.getDate());<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>}
), Deep.YES, highestStopId);
1,441,020
public ReadableEntityList<ReadableTaxRate> taxRates(MerchantStore store, Language language) {<NEW_LINE>Validate.notNull(store, "MerchantStore cannot be null");<NEW_LINE>Validate.notNull(store.getCode(), "MerchantStore code cannot be null");<NEW_LINE>try {<NEW_LINE>List<TaxRate> rates = taxRateService.listByStore(store, language);<NEW_LINE>List<ReadableTaxRate> readableRates = rates.stream().map(r -> readableTaxRateMapper.convert(r, store, language)).collect(Collectors.toList());<NEW_LINE>ReadableEntityList<ReadableTaxRate> returnRates <MASK><NEW_LINE>returnRates.setItems(readableRates);<NEW_LINE>returnRates.setTotalPages(1);<NEW_LINE>returnRates.setNumber(readableRates.size());<NEW_LINE>returnRates.setRecordsTotal(readableRates.size());<NEW_LINE>return returnRates;<NEW_LINE>} catch (ServiceException e) {<NEW_LINE>LOGGER.error("Error while getting taxRates for store [" + store.getCode() + "]", e);<NEW_LINE>throw new ServiceRuntimeException("Error while getting taxRates for store [" + store.getCode() + "]", e);<NEW_LINE>}<NEW_LINE>}
= new ReadableEntityList<ReadableTaxRate>();
735,896
public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {<NEW_LINE>final ImmutableMap.Builder<String, ImmutableMap<String, String>> servicesMapBuilder = ImmutableMap.builder();<NEW_LINE>if (jsonRpcConfiguration.isEnabled()) {<NEW_LINE>servicesMapBuilder.put("jsonrpc", createServiceDetailsMap(jsonRpcConfiguration.getHost(), jsonRpcConfiguration.getPort()));<NEW_LINE>}<NEW_LINE>if (webSocketConfiguration.isEnabled()) {<NEW_LINE>servicesMapBuilder.put("ws", createServiceDetailsMap(webSocketConfiguration.getHost(), webSocketConfiguration.getPort()));<NEW_LINE>}<NEW_LINE>if (p2pNetwork.isP2pEnabled()) {<NEW_LINE>p2pNetwork.getLocalEnode().filter(EnodeURL::isListening).ifPresent(enode -> servicesMapBuilder.put("p2p", createServiceDetailsMap(enode.getIpAsString(), enode.getListeningPort(<MASK><NEW_LINE>}<NEW_LINE>if (metricsConfiguration.isEnabled()) {<NEW_LINE>servicesMapBuilder.put("metrics", createServiceDetailsMap(metricsConfiguration.getHost(), metricsConfiguration.getActualPort()));<NEW_LINE>}<NEW_LINE>return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), servicesMapBuilder.build());<NEW_LINE>}
).get())));
1,732,011
public boolean unblock() {<NEW_LINE>final AtomicBuffer buffer = this.buffer;<NEW_LINE>final long headPosition = buffer.getLongVolatile(headPositionIndex);<NEW_LINE>final long tailPosition = buffer.getLongVolatile(tailPositionIndex);<NEW_LINE>if (headPosition == tailPosition) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final int mask = capacity - 1;<NEW_LINE>final int consumerIndex = <MASK><NEW_LINE>final int producerIndex = (int) (tailPosition & mask);<NEW_LINE>boolean unblocked = false;<NEW_LINE>int length = buffer.getIntVolatile(consumerIndex);<NEW_LINE>if (length < 0) {<NEW_LINE>buffer.putInt(typeOffset(consumerIndex), PADDING_MSG_TYPE_ID);<NEW_LINE>buffer.putIntOrdered(lengthOffset(consumerIndex), -length);<NEW_LINE>unblocked = true;<NEW_LINE>} else if (0 == length) {<NEW_LINE>// go from (consumerIndex to producerIndex) or (consumerIndex to capacity)<NEW_LINE>final int limit = producerIndex > consumerIndex ? producerIndex : capacity;<NEW_LINE>int i = consumerIndex + ALIGNMENT;<NEW_LINE>do {<NEW_LINE>// read the top int of every long (looking for length aligned to 8=ALIGNMENT)<NEW_LINE>length = buffer.getIntVolatile(i);<NEW_LINE>if (0 != length) {<NEW_LINE>if (scanBackToConfirmStillZeroed(buffer, i, consumerIndex)) {<NEW_LINE>buffer.putInt(typeOffset(consumerIndex), PADDING_MSG_TYPE_ID);<NEW_LINE>buffer.putIntOrdered(lengthOffset(consumerIndex), i - consumerIndex);<NEW_LINE>unblocked = true;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>i += ALIGNMENT;<NEW_LINE>} while (i < limit);<NEW_LINE>}<NEW_LINE>return unblocked;<NEW_LINE>}
(int) (headPosition & mask);
132,914
protected void doExecute(ExecutionContext context) {<NEW_LINE>CommandConsole console = context.getCommandConsole();<NEW_LINE>boolean toSet = context.optionExists(INSTALL_LOCATION_TO_COMPARE_TO_OPTION);<NEW_LINE>boolean aparSet = context.optionExists(APAR_TO_COMPARE_OPTION);<NEW_LINE>if (!toSet && !aparSet) {<NEW_LINE>console.printlnErrorMessage(getMessage("compare.no.option.set"));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Both commands need the iFix information for the current install so grab it now so it's only loaded once<NEW_LINE>File wlpInstallationDirectory = context.getAttribute(CommandConstants.WLP_INSTALLATION_LOCATION, File.class);<NEW_LINE>InstalledIFixInformation installedIFixes = findInstalledIFixes(wlpInstallationDirectory, console, context.optionExists(VERBOSE_OPTION));<NEW_LINE>if (toSet) {<NEW_LINE>compareToInstallLocation(context, console, installedIFixes.validIFixes, wlpInstallationDirectory);<NEW_LINE>}<NEW_LINE>if (aparSet) {<NEW_LINE>compareToAparList(context, console, installedIFixes.validIFixes, wlpInstallationDirectory);<NEW_LINE>}<NEW_LINE>// Finally list all of the iFixes that were not applicable<NEW_LINE>if (!installedIFixes.iFixesWithMissingFiles.isEmpty()) {<NEW_LINE>console.printlnInfoMessage("");<NEW_LINE>console.printlnInfoMessage(getMessage("compare.invalid.ifixes.missing", installedIFixes.iFixesWithMissingFiles));<NEW_LINE>}<NEW_LINE>if (!installedIFixes.inapplicableIFixes.isEmpty()) {<NEW_LINE>console.printlnInfoMessage("");<NEW_LINE>console.printlnInfoMessage(getMessage<MASK><NEW_LINE>}<NEW_LINE>if (!installedIFixes.iFixesWithInvalidXml.isEmpty()) {<NEW_LINE>console.printlnInfoMessage("");<NEW_LINE>console.printlnErrorMessage(getMessage("compare.invalid.ifixes.bad.xml", installedIFixes.iFixesWithInvalidXml));<NEW_LINE>}<NEW_LINE>}
("compare.invalid.ifixes.badversion", installedIFixes.inapplicableIFixes));
496,468
public static boolean fiscalCodeMatchesWithName(String firstName, String lastName, String fiscalCode) {<NEW_LINE>if (validateFiscalCode(fiscalCode)) {<NEW_LINE>if (length(fiscalCode) == COMPANY_TAX_ID_LENGTH) {<NEW_LINE>// if the fiscal code belongs to a company then there's no point in checking the name in it<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>var code = new StringBuilder();<NEW_LINE>var lastNameParts = parseFiscalCodePart(lastName.trim());<NEW_LINE>appendLastNameCode(code, lastNameParts);<NEW_LINE>var firstNameParts = parseFiscalCodePart(firstName.trim());<NEW_LINE>int numConsonants = firstNameParts.consonants.size();<NEW_LINE>if (numConsonants < 4) {<NEW_LINE>// if the first name contains less than 4 consonants,<NEW_LINE>// we can apply the same algorithm of the last name<NEW_LINE>appendLastNameCode(code, firstNameParts);<NEW_LINE>} else {<NEW_LINE>// otherwise we remove the second consonant<NEW_LINE>var consonantsList = new ArrayList<Character>();<NEW_LINE>consonantsList.add(firstNameParts.consonants.get(0));<NEW_LINE>consonantsList.addAll(firstNameParts.consonants.subList(2, firstNameParts<MASK><NEW_LINE>appendLastNameCode(code, new FiscalCodeParts(consonantsList, firstNameParts.vowels));<NEW_LINE>}<NEW_LINE>return fiscalCode.toUpperCase(Locale.ITALIAN).startsWith(code.toString());<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.consonants.size()));
287,305
private TreeNode createTraversingTree(String issuer) {<NEW_LINE>Node node = nodes.get(issuer);<NEW_LINE>List<List<Node>> paths = new ArrayList<>();<NEW_LINE>if (node.getEdges().isEmpty()) {<NEW_LINE>List<Node> resolved = new ArrayList<>();<NEW_LINE>resolved.add(node);<NEW_LINE>traverse(node, resolved, paths);<NEW_LINE>} else {<NEW_LINE>for (Node n : node.getEdges()) {<NEW_LINE>List<Node> resolved = new ArrayList<>();<NEW_LINE>resolved.add(node);<NEW_LINE>traverse(n, resolved, paths);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<List<String>> ret = new ArrayList<>();<NEW_LINE>for (List<Node> path : paths) {<NEW_LINE>List<String> <MASK><NEW_LINE>for (Node n : path) {<NEW_LINE>spath.add(n.getName());<NEW_LINE>}<NEW_LINE>ret.add(spath);<NEW_LINE>}<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace(String.format("Cascade operation[%s]'s traversing branches (branches will be merged as a tree to reduce duplicate paths):", issuer));<NEW_LINE>for (List<String> lst : ret) {<NEW_LINE>logger.trace(lst.toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return makeTree(paths);<NEW_LINE>}
spath = new ArrayList<>();
637,197
final DeleteSqlInjectionMatchSetResult executeDeleteSqlInjectionMatchSet(DeleteSqlInjectionMatchSetRequest deleteSqlInjectionMatchSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteSqlInjectionMatchSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteSqlInjectionMatchSetRequest> request = null;<NEW_LINE>Response<DeleteSqlInjectionMatchSetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteSqlInjectionMatchSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteSqlInjectionMatchSetRequest));<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, "WAF Regional");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSqlInjectionMatchSet");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteSqlInjectionMatchSetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteSqlInjectionMatchSetResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
352,313
private FileInfo concreteFileInfo(String person, Document document, StorageMapping storage, String name, String site) throws Exception {<NEW_LINE>String fileName = UUID.randomUUID().toString();<NEW_LINE>String extension = FilenameUtils.getExtension(name);<NEW_LINE>FileInfo attachment = new FileInfo();<NEW_LINE>if (StringUtils.isEmpty(extension)) {<NEW_LINE>throw new Exception("file extension is empty.");<NEW_LINE>} else {<NEW_LINE>fileName = fileName + "." + extension;<NEW_LINE>}<NEW_LINE>if (name.indexOf("\\") > 0) {<NEW_LINE>name = StringUtils.substringAfterLast(name, "\\");<NEW_LINE>}<NEW_LINE>if (name.indexOf("/") > 0) {<NEW_LINE>name = StringUtils.substringAfterLast(name, "/");<NEW_LINE>}<NEW_LINE>attachment<MASK><NEW_LINE>attachment.setLastUpdateTime(new Date());<NEW_LINE>attachment.setExtension(extension);<NEW_LINE>attachment.setName(name);<NEW_LINE>attachment.setFileName(fileName);<NEW_LINE>attachment.setStorage(storage.getName());<NEW_LINE>attachment.setAppId(document.getAppId());<NEW_LINE>attachment.setCategoryId(document.getCategoryId());<NEW_LINE>attachment.setDocumentId(document.getId());<NEW_LINE>attachment.setCreatorUid(person);<NEW_LINE>attachment.setSite(site);<NEW_LINE>attachment.setFileHost("");<NEW_LINE>attachment.setFilePath("");<NEW_LINE>attachment.setFileType("ATTACHMENT");<NEW_LINE>return attachment;<NEW_LINE>}
.setCreateTime(new Date());
1,781,166
public synchronized EntityConfigSaveResult writeEntityWithLock(EntityConfigUpdateCommand updatingCommand, GoConfigHolder configHolder, Username currentUser) {<NEW_LINE>CruiseConfig modifiedConfig = cloner.deepClone(configHolder.configForEdit);<NEW_LINE>try {<NEW_LINE>updatingCommand.update(modifiedConfig);<NEW_LINE>} catch (Exception e) {<NEW_LINE>bomb(e);<NEW_LINE>}<NEW_LINE>List<PartialConfig<MASK><NEW_LINE>List<PartialConfig> lastKnownPartials = cachedGoPartials.lastKnownPartials();<NEW_LINE>if (lastKnownPartials.isEmpty() || areKnownPartialsSameAsValidPartials(lastKnownPartials, lastValidPartials)) {<NEW_LINE>return trySavingEntity(updatingCommand, currentUser, modifiedConfig, lastValidPartials);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return trySavingEntity(updatingCommand, currentUser, modifiedConfig, lastValidPartials);<NEW_LINE>} catch (GoConfigInvalidException e) {<NEW_LINE>StringBuilder errorMessageBuilder = new StringBuilder();<NEW_LINE>try {<NEW_LINE>String message = String.format("Merged update operation failed on VALID %s partials. Falling back to using LAST KNOWN %s partials. Exception message was: [%s %s]", lastValidPartials.size(), lastKnownPartials.size(), e.getMessage(), e.getAllErrorMessages());<NEW_LINE>errorMessageBuilder.append(message);<NEW_LINE>LOGGER.warn(message, e);<NEW_LINE>updatingCommand.clearErrors();<NEW_LINE>modifiedConfig.setPartials(lastKnownPartials);<NEW_LINE>String configAsXml = configAsXml(modifiedConfig, false);<NEW_LINE>GoConfigHolder holder = internalLoad(configAsXml, new ConfigModifyingUser(currentUser.getUsername().toString()), lastKnownPartials);<NEW_LINE>LOGGER.info("Update operation on merged configuration succeeded with {} KNOWN partials. Now there are {} LAST KNOWN partials", lastKnownPartials.size(), cachedGoPartials.lastKnownPartials().size());<NEW_LINE>return new EntityConfigSaveResult(holder.config, holder);<NEW_LINE>} catch (Exception exceptionDuringFallbackValidation) {<NEW_LINE>String message = String.format("Merged config update operation failed using fallback LAST KNOWN %s partials. Exception message was: %s", lastKnownPartials.size(), exceptionDuringFallbackValidation.getMessage());<NEW_LINE>LOGGER.warn(message, exceptionDuringFallbackValidation);<NEW_LINE>errorMessageBuilder.append(System.lineSeparator());<NEW_LINE>errorMessageBuilder.append(message);<NEW_LINE>throw new GoConfigInvalidException(e.getCruiseConfig(), errorMessageBuilder.toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> lastValidPartials = cachedGoPartials.lastValidPartials();
372,678
private static ST_boxf makeregularend_w_(final ST_boxf b, int side, double y) {<NEW_LINE>ENTERING("3wwhczhpkcnflwr1l9wcga7tq", "makeregularend");<NEW_LINE>try {<NEW_LINE>final ST_boxf newb = new ST_boxf();<NEW_LINE>switch(side) {<NEW_LINE>case (1 << 0):<NEW_LINE>newb.___(boxfof(b.LL.x, y, b.UR.x<MASK><NEW_LINE>break;<NEW_LINE>case (1 << 2):<NEW_LINE>newb.___(boxfof(b.LL.x, b.UR.y, b.UR.x, y));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>return newb;<NEW_LINE>} finally {<NEW_LINE>LEAVING("3wwhczhpkcnflwr1l9wcga7tq", "makeregularend");<NEW_LINE>}<NEW_LINE>}
, b.LL.y));
101,233
private void writeRow(Writer out, String type, String link, JCLStatus status, String name, Integer percent, Integer partialPercent) throws IOException {<NEW_LINE>out.write("<tr class=\"");<NEW_LINE>switch(status) {<NEW_LINE>case FOUND:<NEW_LINE>out.write("full");<NEW_LINE>break;<NEW_LINE>case MISSING:<NEW_LINE>out.write("missing");<NEW_LINE>break;<NEW_LINE>case PARTIAL:<NEW_LINE>out.write("partial");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>out.write("\">\n");<NEW_LINE>out.write("<td><div class=\"");<NEW_LINE>out.write(type);<NEW_LINE>out.write("\">");<NEW_LINE>if (link != null) {<NEW_LINE>out.<MASK><NEW_LINE>}<NEW_LINE>out.write(name);<NEW_LINE>if (link != null) {<NEW_LINE>out.write("</a>");<NEW_LINE>}<NEW_LINE>out.write("</div></td>\n");<NEW_LINE>out.write("<td class=\"percent\">" + (partialPercent != null ? partialPercent.toString() : "") + "</td>");<NEW_LINE>out.write("<td class=\"percent\">" + (percent != null ? percent.toString() : "") + "</td>");<NEW_LINE>out.write("</tr>\n");<NEW_LINE>}
write("<a href=\"" + link + "\">");
1,238,203
private int calcPopupHeight(List l) {<NEW_LINE>int y = getAbsoluteY();<NEW_LINE>int topMargin;<NEW_LINE>int popupHeight;<NEW_LINE>int items = l.getModel().getSize();<NEW_LINE>final Form f = getComponentForm();<NEW_LINE>if (f == null) {<NEW_LINE>// for some reason this happens in the GUI builder<NEW_LINE>return 10;<NEW_LINE>}<NEW_LINE>if (l.getModel() instanceof FilterProxyListModel) {<NEW_LINE>items = ((FilterProxyListModel) l.getModel()).getUnderlying().getSize();<NEW_LINE>}<NEW_LINE>int listHeight = items * l.getElementSize(false, true).getHeight();<NEW_LINE>if (popupPosition == POPUP_POSITION_UNDER || popupPosition == POPUP_POSITION_AUTO && y < f.getContentPane().getHeight() / 2) {<NEW_LINE>topMargin = y - f.getTitleArea().getHeight() + getHeight();<NEW_LINE>popupHeight = Math.min(listHeight, f.getContentPane().getHeight() / 2);<NEW_LINE>} else {<NEW_LINE>popupHeight = Math.min(listHeight, f.getContentPane().getHeight() / 2);<NEW_LINE>popupHeight = Math.min(popupHeight, y - f.getTitleArea().getHeight());<NEW_LINE>topMargin = y - f.getTitleArea().getHeight() - popupHeight;<NEW_LINE>}<NEW_LINE>popup.getAllStyles().setMargin(TOP, Math<MASK><NEW_LINE>popup.setPreferredH(popupHeight);<NEW_LINE>return popupHeight;<NEW_LINE>}
.max(0, topMargin));
893,494
public ExecuteBatchResult prepareAndExecuteBatch(final StatementHandle h, List<String> sqlCommands) throws NoSuchStatementException {<NEW_LINE>final CalciteConnectionImpl calciteConnection = getConnection();<NEW_LINE>final CalciteServerStatement statement = calciteConnection.server.getStatement(h);<NEW_LINE>final List<Long> updateCounts = new ArrayList<>();<NEW_LINE>final Meta.PrepareCallback callback = new Meta.PrepareCallback() {<NEW_LINE><NEW_LINE>long updateCount;<NEW_LINE><NEW_LINE>Signature signature;<NEW_LINE><NEW_LINE>public Object getMonitor() {<NEW_LINE>return statement;<NEW_LINE>}<NEW_LINE><NEW_LINE>public void clear() throws SQLException {<NEW_LINE>}<NEW_LINE><NEW_LINE>public void assign(Meta.Signature signature, Meta.Frame firstFrame, long updateCount) throws SQLException {<NEW_LINE>this.signature = signature;<NEW_LINE>this.updateCount = updateCount;<NEW_LINE>}<NEW_LINE><NEW_LINE>public void execute() throws SQLException {<NEW_LINE>if (signature.statementType.canUpdate()) {<NEW_LINE>final Iterable<Object> iterable = _createIterable(h, signature, ImmutableList.<TypedValue>of(), null);<NEW_LINE>final Iterator<Object> iterator = iterable.iterator();<NEW_LINE>updateCount = ((Number) iterator.next()).longValue();<NEW_LINE>}<NEW_LINE>updateCounts.add(updateCount);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>for (String sqlCommand : sqlCommands) {<NEW_LINE>Util.discard(prepareAndExecute(h, sqlCommand, -<MASK><NEW_LINE>}<NEW_LINE>return new ExecuteBatchResult(Longs.toArray(updateCounts));<NEW_LINE>}
1L, -1, callback));
852,974
private static void buildResourceGraph(Project project, Message node, ResourceNode parentNode, Collection<String> visitedNodes) throws CompileExceptionError {<NEW_LINE>List<FieldDescriptor> fields = node.getDescriptorForType().getFields();<NEW_LINE>for (FieldDescriptor fieldDescriptor : fields) {<NEW_LINE>FieldOptions options = fieldDescriptor.getOptions();<NEW_LINE>FieldDescriptor resourceDesc <MASK><NEW_LINE>boolean isResource = (Boolean) options.getField(resourceDesc);<NEW_LINE>Object value = node.getField(fieldDescriptor);<NEW_LINE>if (value instanceof Message) {<NEW_LINE>buildResourceGraph(project, (Message) value, parentNode, visitedNodes);<NEW_LINE>} else if (value instanceof List) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<Object> list = (List<Object>) value;<NEW_LINE>for (Object v : list) {<NEW_LINE>if (v instanceof Message) {<NEW_LINE>buildResourceGraph(project, (Message) v, parentNode, visitedNodes);<NEW_LINE>} else if (isResource && v instanceof String) {<NEW_LINE>buildResourceGraph(project, project.getResource((String) v), parentNode, visitedNodes);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (isResource && value instanceof String) {<NEW_LINE>buildResourceGraph(project, project.getResource((String) value), parentNode, visitedNodes);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= DdfExtensions.resource.getDescriptor();
342,375
public final void insertRangeAtAsync(int position, List<RenderInfo> renderInfos) {<NEW_LINE>assertSingleThreadForChangeSet();<NEW_LINE>assertNoInsertOperationIfCircular();<NEW_LINE>if (SectionsDebug.ENABLED) {<NEW_LINE>final String[] names = new String[renderInfos.size()];<NEW_LINE>for (int i = 0; i < renderInfos.size(); i++) {<NEW_LINE>names[i] = renderInfos.get(i).getName();<NEW_LINE>}<NEW_LINE>Log.d(SectionsDebug.TAG, "(" + hashCode() + ") insertRangeAtAsync " + position + ", size: " + renderInfos.size() + ", names: " + Arrays.toString(names));<NEW_LINE>}<NEW_LINE>synchronized (this) {<NEW_LINE>mHasAsyncOperations = true;<NEW_LINE>for (int i = 0, size = renderInfos.size(); i < size; i++) {<NEW_LINE>final RenderInfo renderInfo = renderInfos.get(i);<NEW_LINE>assertNotNullRenderInfo(renderInfo);<NEW_LINE>final AsyncInsertOperation operation = createAsyncInsertOperation(position + i, renderInfo);<NEW_LINE>mAsyncComponentTreeHolders.add(<MASK><NEW_LINE>registerAsyncInsert(operation);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
position + i, operation.mHolder);
1,790,222
public void perform(UTTimerEvent event) {<NEW_LINE>if (suspended) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long now = SystemTime.getMonotonousTime();<NEW_LINE>try {<NEW_LINE>server_mon.enter();<NEW_LINE>Iterator<BindingData> it = rendezvous_bindings.values().iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>BindingData entry = it.next();<NEW_LINE>long time = entry.getBindTime();<NEW_LINE>boolean removed = false;<NEW_LINE>if (now - time > RENDEZVOUS_SERVER_TIMEOUT) {<NEW_LINE>// timeout<NEW_LINE>it.remove();<NEW_LINE>removed = true;<NEW_LINE>}<NEW_LINE>if (removed) {<NEW_LINE>log("Rendezvous " + entry.getContact().getString() + " removed due to inactivity");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>server_mon.exit();<NEW_LINE>}<NEW_LINE>Set<InetAddress> rends = new HashSet<>();<NEW_LINE><MASK><NEW_LINE>if (ct != null) {<NEW_LINE>rends.add(ct.getExternalAddress().getAddress());<NEW_LINE>}<NEW_LINE>for (DHTNATPuncherImpl x : secondaries) {<NEW_LINE>ct = x.current_target;<NEW_LINE>if (ct != null) {<NEW_LINE>InetAddress ia = ct.getExternalAddress().getAddress();<NEW_LINE>if (rends.contains(ia)) {<NEW_LINE>log("Duplicate secondary rendezvous: " + ct.getString() + ", re-binding");<NEW_LINE>x.rendezvousFailed(ct, true);<NEW_LINE>} else {<NEW_LINE>rends.add(ia);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
DHTTransportContact ct = DHTNATPuncherImpl.this.current_target;
1,012,877
public void mergeDocument(final long scopeKey, final long processDefinitionKey, final long processInstanceKey, final DirectBuffer bpmnProcessId, final DirectBuffer document) {<NEW_LINE>indexedDocument.index(document);<NEW_LINE>if (indexedDocument.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long currentScope = scopeKey;<NEW_LINE>long parentScope;<NEW_LINE>variableRecord.setProcessDefinitionKey(processDefinitionKey).setProcessInstanceKey(processInstanceKey).setBpmnProcessId(bpmnProcessId);<NEW_LINE>while ((parentScope = variableState.getParentScopeKey(currentScope)) > 0) {<NEW_LINE>final Iterator<DocumentEntry> entryIterator = indexedDocument.iterator();<NEW_LINE>variableRecord.setScopeKey(currentScope);<NEW_LINE>while (entryIterator.hasNext()) {<NEW_LINE>final DocumentEntry entry = entryIterator.next();<NEW_LINE>final VariableInstance variableInstance = variableState.getVariableInstanceLocal(<MASK><NEW_LINE>if (variableInstance != null && !variableInstance.getValue().equals(entry.getValue())) {<NEW_LINE>applyEntryToRecord(entry);<NEW_LINE>stateWriter.appendFollowUpEvent(variableInstance.getKey(), VariableIntent.UPDATED, variableRecord);<NEW_LINE>entryIterator.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>currentScope = parentScope;<NEW_LINE>}<NEW_LINE>variableRecord.setScopeKey(currentScope);<NEW_LINE>for (final DocumentEntry entry : indexedDocument) {<NEW_LINE>applyEntryToRecord(entry);<NEW_LINE>setLocalVariable(variableRecord);<NEW_LINE>}<NEW_LINE>}
currentScope, entry.getName());
1,199,796
final void cmdRemoveExpiring(final long lockId, final PersistentTransaction transaction) throws ProtocolException, TransactionException, SevereMessageStoreException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "cmdRemoveExpiring", new Object[] { "Item Link: " + this, "Stream Link: " + _owningStreamLink, formatLockId(<MASK><NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "expiring item " + _tuple.getUniqueId());<NEW_LINE>synchronized (this) {<NEW_LINE>if (ItemLinkState.STATE_LOCKED_FOR_EXPIRY == _itemLinkState) {<NEW_LINE>if (_lockID != lockId) {<NEW_LINE>throw new LockIdMismatch(_lockID, lockId);<NEW_LINE>}<NEW_LINE>ListStatistics stats = getParentStatistics();<NEW_LINE>synchronized (stats) {<NEW_LINE>stats.decrementExpiring();<NEW_LINE>stats.incrementRemoving();<NEW_LINE>}<NEW_LINE>_transactionId = transaction.getPersistentTranId();<NEW_LINE>_itemLinkState = ItemLinkState.STATE_REMOVING_EXPIRING;<NEW_LINE>} else {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())<NEW_LINE>SibTr.event(this, tc, "Invalid Item state: " + _itemLinkState);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(this, tc, "cmdRemoveExpiring");<NEW_LINE>throw new StateException(_itemLinkState.toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Task task = new RemoveLockedTask(this);<NEW_LINE>transaction.addWork(task);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(this, tc, "cmdRemoveExpiring");<NEW_LINE>}
lockId), "Transaction: " + transaction });
859,111
public boolean addCassandraHost(CassandraHost cassandraHost) {<NEW_LINE>Properties props = KunderaMetadataManager.getPersistenceUnitMetadata(kunderaMetadata, <MASK><NEW_LINE>String keyspace = null;<NEW_LINE>if (externalProperties != null) {<NEW_LINE>keyspace = (String) externalProperties.get(PersistenceProperties.KUNDERA_KEYSPACE);<NEW_LINE>}<NEW_LINE>if (keyspace == null) {<NEW_LINE>keyspace = (String) props.get(PersistenceProperties.KUNDERA_KEYSPACE);<NEW_LINE>}<NEW_LINE>String poolName = PelopsUtils.generatePoolName(cassandraHost.getHost(), cassandraHost.getPort(), keyspace);<NEW_LINE>Cluster cluster = new Cluster(cassandraHost.getHost(), new IConnection.Config(cassandraHost.getPort(), true, -1, PelopsUtils.getAuthenticationRequest(cassandraHost.getUser(), cassandraHost.getPassword())), false);<NEW_LINE>Policy policy = PelopsUtils.getPoolConfigPolicy(cassandraHost);<NEW_LINE>try {<NEW_LINE>Pelops.addPool(poolName, cluster, keyspace, policy, null);<NEW_LINE>hostPools.put(cassandraHost, Pelops.getDbConnPool(poolName));<NEW_LINE>return true;<NEW_LINE>} catch (TransportException e) {<NEW_LINE>logger.warn("Node {} are still down ", cassandraHost.getHost());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
getPersistenceUnit()).getProperties();
56,748
public Content update(@NonNull final Content content, @Nonnull String url, boolean updateImages) {<NEW_LINE>content.setSite(TSUMINO);<NEW_LINE>String theUrl = galleryUrl.isEmpty() ? url : galleryUrl;<NEW_LINE>if (theUrl.isEmpty())<NEW_LINE>return new Content().setStatus(StatusContent.IGNORED);<NEW_LINE>content.setUrl(theUrl.replace("/Read/Index", ""));<NEW_LINE>String coverUrl = (cover != null) ? ParseHelper.getImgSrc(cover) : "";<NEW_LINE>if (!coverUrl.startsWith("http"))<NEW_LINE>coverUrl = TSUMINO.getUrl() + coverUrl;<NEW_LINE>content.setCoverImageUrl(coverUrl);<NEW_LINE>content.setTitle(StringHelper.removeNonPrintableChars(title));<NEW_LINE>// e.g. 2021 December 13<NEW_LINE>content.setUploadDate(Helper.parseDateToEpoch(uploadDate, "yyyy MMMM dd"));<NEW_LINE>AttributeMap attributes = new AttributeMap();<NEW_LINE>ParseHelper.parseAttributes(attributes, AttributeType.ARTIST, artists, false, TSUMINO);<NEW_LINE>ParseHelper.parseAttributes(attributes, AttributeType.CIRCLE, circles, false, TSUMINO);<NEW_LINE>ParseHelper.parseAttributes(attributes, AttributeType.TAG, tags, false, TSUMINO);<NEW_LINE>ParseHelper.parseAttributes(attributes, AttributeType.<MASK><NEW_LINE>ParseHelper.parseAttributes(attributes, AttributeType.CHARACTER, characters, false, TSUMINO);<NEW_LINE>ParseHelper.parseAttributes(attributes, AttributeType.CATEGORY, categories, false, TSUMINO);<NEW_LINE>content.putAttributes(attributes);<NEW_LINE>if (updateImages) {<NEW_LINE>content.setImageFiles(Collections.emptyList());<NEW_LINE>content.setQtyPages((pages.length() > 0) ? Integer.parseInt(pages) : 0);<NEW_LINE>}<NEW_LINE>return content;<NEW_LINE>}
SERIE, series, false, TSUMINO);
500,484
public List<Long> doInTransaction(final TransactionStatus status) {<NEW_LINE>if (s_logger.isDebugEnabled()) {<NEW_LINE>s_logger.debug("Update db status for job-" + jobId);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>job.setStatus(jobStatus);<NEW_LINE>job.setResultCode(resultCode);<NEW_LINE>if (resultObject != null) {<NEW_LINE>job.setResult(resultObject);<NEW_LINE>} else {<NEW_LINE>job.setResult(null);<NEW_LINE>}<NEW_LINE>final Date currentGMTTime = DateUtil.currentGMTTime();<NEW_LINE>job.setLastUpdated(currentGMTTime);<NEW_LINE>job.setRemoved(currentGMTTime);<NEW_LINE>job.setExecutingMsid(null);<NEW_LINE>_jobDao.update(jobId, job);<NEW_LINE>if (s_logger.isDebugEnabled()) {<NEW_LINE>s_logger.debug("Wake up jobs joined with job-" + jobId + " and disjoin all subjobs created from job- " + jobId);<NEW_LINE>}<NEW_LINE>final List<Long> wakeupList = wakeupByJoinedJobCompletion(jobId);<NEW_LINE>_joinMapDao.disjoinAllJobs(jobId);<NEW_LINE>// purge the job sync item from queue<NEW_LINE>_queueMgr.purgeAsyncJobQueueItemId(jobId);<NEW_LINE>return wakeupList;<NEW_LINE>}
job.setCompleteMsid(getMsid());
783,010
public static ListSSLCertResponse unmarshall(ListSSLCertResponse listSSLCertResponse, UnmarshallerContext _ctx) {<NEW_LINE>listSSLCertResponse.setRequestId(_ctx.stringValue("ListSSLCertResponse.RequestId"));<NEW_LINE>listSSLCertResponse.setHttpStatusCode(_ctx.integerValue("ListSSLCertResponse.HttpStatusCode"));<NEW_LINE>listSSLCertResponse.setMessage(_ctx.stringValue("ListSSLCertResponse.Message"));<NEW_LINE>listSSLCertResponse.setCode(_ctx.integerValue("ListSSLCertResponse.Code"));<NEW_LINE>listSSLCertResponse.setSuccess(_ctx.booleanValue("ListSSLCertResponse.Success"));<NEW_LINE>List<Domains> data = new ArrayList<Domains>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListSSLCertResponse.Data.Length"); i++) {<NEW_LINE>Domains domains = new Domains();<NEW_LINE>domains.setCertIdentifier(_ctx.stringValue("ListSSLCertResponse.Data[" + i + "].CertIdentifier"));<NEW_LINE>domains.setCertName(_ctx.stringValue("ListSSLCertResponse.Data[" + i + "].CertName"));<NEW_LINE>domains.setCommonName(_ctx.stringValue("ListSSLCertResponse.Data[" + i + "].CommonName"));<NEW_LINE>domains.setSans(_ctx.stringValue("ListSSLCertResponse.Data[" + i + "].Sans"));<NEW_LINE>domains.setBeforeDate(_ctx.stringValue("ListSSLCertResponse.Data[" + i + "].BeforeDate"));<NEW_LINE>domains.setAfterDate(_ctx.stringValue("ListSSLCertResponse.Data[" + i + "].AfterDate"));<NEW_LINE>domains.setAlgorithm(_ctx.stringValue<MASK><NEW_LINE>domains.setIssuer(_ctx.stringValue("ListSSLCertResponse.Data[" + i + "].Issuer"));<NEW_LINE>domains.setGmtBefore(_ctx.stringValue("ListSSLCertResponse.Data[" + i + "].GmtBefore"));<NEW_LINE>domains.setGmtAfter(_ctx.stringValue("ListSSLCertResponse.Data[" + i + "].GmtAfter"));<NEW_LINE>data.add(domains);<NEW_LINE>}<NEW_LINE>listSSLCertResponse.setData(data);<NEW_LINE>return listSSLCertResponse;<NEW_LINE>}
("ListSSLCertResponse.Data[" + i + "].Algorithm"));
1,402,328
static final // In C: again-two-registers.c hhb_get_composite_estimate L1489<NEW_LINE>double hllCompositeEstimate(final AbstractHllArray absHllArr) {<NEW_LINE>final int lgConfigK = absHllArr.getLgConfigK();<NEW_LINE>final double rawEst = getHllRawEstimate(lgConfigK, absHllArr.getKxQ0() + absHllArr.getKxQ1());<NEW_LINE>final double[] xArr = CompositeInterpolationXTable.xArrs[lgConfigK - MIN_LOG_K];<NEW_LINE>final double yStride = <MASK><NEW_LINE>final int xArrLen = xArr.length;<NEW_LINE>if (rawEst < xArr[0]) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>final int xArrLenM1 = xArrLen - 1;<NEW_LINE>if (rawEst > xArr[xArrLenM1]) {<NEW_LINE>final double finalY = yStride * (xArrLenM1);<NEW_LINE>final double factor = finalY / xArr[xArrLenM1];<NEW_LINE>return rawEst * factor;<NEW_LINE>}<NEW_LINE>final double adjEst = CubicInterpolation.usingXArrAndYStride(xArr, yStride, rawEst);<NEW_LINE>// We need to completely avoid the linear_counting estimator if it might have a crazy value.<NEW_LINE>// Empirical evidence suggests that the threshold 3*k will keep us safe if 2^4 <= k <= 2^21.<NEW_LINE>if (adjEst > (3 << lgConfigK)) {<NEW_LINE>return adjEst;<NEW_LINE>}<NEW_LINE>// Alternate call<NEW_LINE>// if ((adjEst > (3 << lgConfigK)) || ((curMin != 0) || (numAtCurMin == 0)) ) { return adjEst; }<NEW_LINE>final double linEst = getHllBitMapEstimate(lgConfigK, absHllArr.getCurMin(), absHllArr.getNumAtCurMin());<NEW_LINE>// Bias is created when the value of an estimator is compared with a threshold to decide whether<NEW_LINE>// to use that estimator or a different one.<NEW_LINE>// We conjecture that less bias is created when the average of the two estimators<NEW_LINE>// is compared with the threshold. Empirical measurements support this conjecture.<NEW_LINE>final double avgEst = (adjEst + linEst) / 2.0;<NEW_LINE>// The following constants comes from empirical measurements of the crossover point<NEW_LINE>// between the average error of the linear estimator and the adjusted hll estimator<NEW_LINE>double crossOver = 0.64;<NEW_LINE>if (lgConfigK == 4) {<NEW_LINE>crossOver = 0.718;<NEW_LINE>} else if (lgConfigK == 5) {<NEW_LINE>crossOver = 0.672;<NEW_LINE>}<NEW_LINE>return (avgEst > (crossOver * (1 << lgConfigK))) ? adjEst : linEst;<NEW_LINE>}
CompositeInterpolationXTable.yStrides[lgConfigK - MIN_LOG_K];
751,485
public ConfigApplicationContainer load(ConfigContainer container, DeploymentContext deploymentContext) {<NEW_LINE>// Perform annotation scanning to see if CDI extension is required here<NEW_LINE>// This is performed here so that the ApplicationContainer executes regardless of CDI extension state<NEW_LINE>final Types types = deploymentContext.getTransientAppMetaData(Types.class.getName(), Types.class);<NEW_LINE>if (types != null) {<NEW_LINE>// The annotations that denote a Config API enabled application<NEW_LINE>final Type annotationType = types.getBy(ConfigProperty.class.getName());<NEW_LINE>final Type annotation2Type = types.getBy(ConfigProperties.class.getName());<NEW_LINE>final Type classType = types.getBy(Config.class.getName());<NEW_LINE>final boolean annotationFound = annotationType != null;<NEW_LINE>final boolean annotation2Found = annotation2Type != null;<NEW_LINE>final boolean classFound = classType != null;<NEW_LINE>if (annotationFound || annotation2Found || classFound) {<NEW_LINE>// Register the CDI extension<NEW_LINE>final Collection<Supplier<Extension>> snifferExtensions = deploymentContext.getTransientAppMetaData(<MASK><NEW_LINE>if (snifferExtensions != null) {<NEW_LINE>snifferExtensions.add(ConfigCdiExtension::new);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new ConfigApplicationContainer(deploymentContext);<NEW_LINE>}
WeldDeployer.SNIFFER_EXTENSIONS, Collection.class);
114,229
final DescribeLoadBalancerAttributesResult executeDescribeLoadBalancerAttributes(DescribeLoadBalancerAttributesRequest describeLoadBalancerAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeLoadBalancerAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeLoadBalancerAttributesRequest> request = null;<NEW_LINE>Response<DescribeLoadBalancerAttributesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeLoadBalancerAttributesRequestMarshaller().marshall(super.beforeMarshalling(describeLoadBalancerAttributesRequest));<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, "Elastic Load Balancing v2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLoadBalancerAttributes");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeLoadBalancerAttributesResult> responseHandler = new StaxResponseHandler<DescribeLoadBalancerAttributesResult>(new DescribeLoadBalancerAttributesResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
465,769
public CreateMapResult createMap(CreateMapRequest createMapRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createMapRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateMapRequest> request = null;<NEW_LINE>Response<CreateMapResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateMapRequestMarshaller().marshall(createMapRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<CreateMapResult, JsonUnmarshallerContext> unmarshaller = new CreateMapResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<CreateMapResult> responseHandler = new JsonResponseHandler<CreateMapResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(<MASK><NEW_LINE>}<NEW_LINE>}
awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
1,334,117
private void processCodeItem(DexHeader header, ClassDefItem item, EncodedMethod method, MethodIDItem methodID) throws DuplicateNameException, IOException, Exception {<NEW_LINE>if (method.getCodeOffset() > 0) {<NEW_LINE>Address codeAddress = baseAddress.add(DexUtil.adjustOffset(method.getCodeOffset(), header));<NEW_LINE>CodeItem codeItem = method.getCodeItem();<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append(DexUtil.convertTypeIndexToString(header, item.getClassIndex()) + " " + DexUtil.convertToString(header, methodID.getNameIndex()) + "\n");<NEW_LINE>if (codeItem != null) {<NEW_LINE>builder.append("\n");<NEW_LINE>builder.append("Instruction Bytes: 0x" + Integer.toHexString(codeItem.getInstructionBytes().length) + "\n");<NEW_LINE>builder.append("Registers Size: 0x" + Integer.toHexString(codeItem.getRegistersSize()) + "\n");<NEW_LINE>builder.append("Incoming Size: 0x" + Integer.toHexString(codeItem.getIncomingSize()) + "\n");<NEW_LINE>builder.append("Outgoing Size: 0x" + Integer.toHexString(codeItem<MASK><NEW_LINE>builder.append("Tries Size: 0x" + Integer.toHexString(codeItem.getTriesSize()) + "\n");<NEW_LINE>}<NEW_LINE>if (codeItem instanceof CDexCodeItem) {<NEW_LINE>CDexCodeItem cdexCodeItem = (CDexCodeItem) codeItem;<NEW_LINE>builder.append("\n" + (cdexCodeItem.hasPreHeader() ? "PREHEADER" : ""));<NEW_LINE>}<NEW_LINE>api.setPlateComment(codeAddress, builder.toString());<NEW_LINE>if (codeItem != null) {<NEW_LINE>// external<NEW_LINE>DataType codeItemDataType = codeItem.toDataType();<NEW_LINE>try {<NEW_LINE>api.createData(codeAddress, codeItemDataType);<NEW_LINE>int codeItemDataTypeLength = codeItemDataType.getLength();<NEW_LINE>fragmentManager.codeItemAddressSet.add(codeAddress, codeAddress.add(codeItemDataTypeLength - 1));<NEW_LINE>Address tempAddress = codeAddress.add(codeItemDataTypeLength);<NEW_LINE>tempAddress = processCodeItemTrys(tempAddress, codeItem);<NEW_LINE>processCodeItemHandlers(codeItem, tempAddress);<NEW_LINE>} catch (Exception e) {<NEW_LINE>// happens when "padding" member has been removed, so struct won't fit<NEW_LINE>// just ignore it<NEW_LINE>}<NEW_LINE>if (codeItem.getDebugInfoOffset() > 0) {<NEW_LINE>Address debugAddress = baseAddress.add(codeItem.getDebugInfoOffset());<NEW_LINE>DebugInfoItem debug = codeItem.getDebugInfo();<NEW_LINE>DataType debugDataType = debug.toDataType();<NEW_LINE>api.createData(debugAddress, debugDataType);<NEW_LINE>fragmentManager.debugInfoAddressSet.add(debugAddress, debugAddress.add(debugDataType.getLength() - 1));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getOutgoingSize()) + "\n");
1,408,388
public static DescribeUserInfoInChannelResponse unmarshall(DescribeUserInfoInChannelResponse describeUserInfoInChannelResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeUserInfoInChannelResponse.setRequestId(_ctx.stringValue("DescribeUserInfoInChannelResponse.RequestId"));<NEW_LINE>describeUserInfoInChannelResponse.setTimestamp(_ctx.integerValue("DescribeUserInfoInChannelResponse.Timestamp"));<NEW_LINE>describeUserInfoInChannelResponse.setIsInChannel(_ctx.booleanValue("DescribeUserInfoInChannelResponse.IsInChannel"));<NEW_LINE>describeUserInfoInChannelResponse.setIsChannelExist(_ctx.booleanValue("DescribeUserInfoInChannelResponse.IsChannelExist"));<NEW_LINE>List<PropertyItem> property = new ArrayList<PropertyItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeUserInfoInChannelResponse.Property.Length"); i++) {<NEW_LINE>PropertyItem propertyItem = new PropertyItem();<NEW_LINE>propertyItem.setSession(_ctx.stringValue("DescribeUserInfoInChannelResponse.Property[" + i + "].Session"));<NEW_LINE>propertyItem.setRole(_ctx.integerValue<MASK><NEW_LINE>propertyItem.setJoin(_ctx.integerValue("DescribeUserInfoInChannelResponse.Property[" + i + "].Join"));<NEW_LINE>property.add(propertyItem);<NEW_LINE>}<NEW_LINE>describeUserInfoInChannelResponse.setProperty(property);<NEW_LINE>return describeUserInfoInChannelResponse;<NEW_LINE>}
("DescribeUserInfoInChannelResponse.Property[" + i + "].Role"));
136,656
public Object interpret(ExecutionContext context, boolean debug) {<NEW_LINE>Object r = getRootExpr().interpret(context, debug);<NEW_LINE>Object lref = getRootExpr().getLhs().interpret(context, debug);<NEW_LINE>if (lref instanceof Reference) {<NEW_LINE>if (((Reference) lref).isStrictReference()) {<NEW_LINE>if (((Reference) lref).getBase() instanceof EnvironmentRecord) {<NEW_LINE>if (((Reference) lref).getReferencedName().equals("arguments") || ((Reference) lref).getReferencedName().equals("eval")) {<NEW_LINE>throw new ThrowException(context, context.createSyntaxError("invalid assignment: " + ((Reference) lref).getReferencedName()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>((Reference) lref<MASK><NEW_LINE>return (r);<NEW_LINE>}<NEW_LINE>throw new ThrowException(context, context.createReferenceError("cannot assign to non-reference"));<NEW_LINE>}
).putValue(context, r);
706,653
public static BigDecimal convert(int C_UOM_From_ID, int C_UOM_To_ID, BigDecimal qty, boolean StdPrecision) {<NEW_LINE>// Nothing to do<NEW_LINE>if (qty == null || qty.compareTo(Env.ZERO) == 0 || C_UOM_From_ID == C_UOM_To_ID)<NEW_LINE>return qty;<NEW_LINE>//<NEW_LINE>BigDecimal retValue = null;<NEW_LINE>int precision = 2;<NEW_LINE>String sql = // #1/2<NEW_LINE>"SELECT c.MultiplyRate, uomTo.StdPrecision, uomTo.CostingPrecision " + "FROM C_UOM_Conversion c" <MASK><NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sql, null);<NEW_LINE>pstmt.setInt(1, C_UOM_From_ID);<NEW_LINE>pstmt.setInt(2, C_UOM_To_ID);<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>if (rs.next()) {<NEW_LINE>retValue = rs.getBigDecimal(1);<NEW_LINE>precision = rs.getInt(StdPrecision ? 2 : 3);<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>throw new DBException(e, sql);<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>rs = null;<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>if (retValue == null) {<NEW_LINE>s_log.info("NOT found - FromUOM=" + C_UOM_From_ID + ", ToUOM=" + C_UOM_To_ID);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Just get Rate<NEW_LINE>if (GETRATE.equals(qty))<NEW_LINE>return retValue;<NEW_LINE>// Calculate & Scale<NEW_LINE>retValue = retValue.multiply(qty);<NEW_LINE>if (retValue.scale() > precision)<NEW_LINE>retValue = retValue.setScale(precision, BigDecimal.ROUND_HALF_UP);<NEW_LINE>return retValue;<NEW_LINE>}
+ " INNER JOIN C_UOM uomTo ON (c.C_UOM_TO_ID=uomTo.C_UOM_ID) " + "WHERE c.IsActive='Y' AND c.C_UOM_ID=? AND c.C_UOM_TO_ID=? " + " AND c.M_Product_ID IS NULL" + " ORDER BY c.AD_Client_ID DESC, c.AD_Org_ID DESC";
788,964
static ImmutableSortedMap<String, SourcePath> convertToFlatCxxHeaders(BuildTarget buildTarget, Path headerPathPrefix, Function<SourcePath, Path> sourcePathResolver, Set<SourcePath> headerPaths) {<NEW_LINE>Set<String> includeToFile = new HashSet<String>(headerPaths.size());<NEW_LINE>ImmutableSortedMap.Builder<String, SourcePath> builder = ImmutableSortedMap.naturalOrder();<NEW_LINE>for (SourcePath headerPath : headerPaths) {<NEW_LINE>Path fileName = sourcePathResolver.<MASK><NEW_LINE>String key = headerPathPrefix.resolve(fileName).toString();<NEW_LINE>if (includeToFile.contains(key)) {<NEW_LINE>ImmutableSortedMap<String, SourcePath> result = builder.build();<NEW_LINE>throw new HumanReadableException("In target '%s', '%s' maps to the following header files:\n" + "- %s\n" + "- %s\n\n" + "Please rename one of them or export one of them to a different path.", buildTarget, key, headerPath, result.get(key));<NEW_LINE>}<NEW_LINE>includeToFile.add(key);<NEW_LINE>builder.put(key, headerPath);<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
apply(headerPath).getFileName();
116,818
public V put(K key, V value) {<NEW_LINE>checkState(!closed, destroyedMessage);<NEW_LINE>checkNotNull(key, ERROR_NULL_KEY);<NEW_LINE>checkNotNull(value, ERROR_NULL_VALUE);<NEW_LINE>String encodedKey = encodeKey(key);<NEW_LINE>byte[] encodedValue = encodeValue(value);<NEW_LINE>MapValue newValue = new MapValue(encodedValue, timestampProvider.get(Maps.immutableEntry(key, value)));<NEW_LINE>counter.incrementCount();<NEW_LINE>AtomicReference<byte[]> <MASK><NEW_LINE>AtomicBoolean updated = new AtomicBoolean(false);<NEW_LINE>items.compute(encodedKey, (k, existing) -> {<NEW_LINE>if (existing == null || newValue.isNewerThan(existing)) {<NEW_LINE>updated.set(true);<NEW_LINE>oldValue.set(existing != null ? existing.get() : null);<NEW_LINE>return newValue;<NEW_LINE>}<NEW_LINE>return existing;<NEW_LINE>});<NEW_LINE>if (updated.get()) {<NEW_LINE>notifyPeers(new UpdateEntry(encodedKey, newValue), peerUpdateFunction.select(Maps.immutableEntry(key, value), membershipService));<NEW_LINE>if (oldValue.get() == null) {<NEW_LINE>notifyListeners(new MapDelegateEvent<>(INSERT, key, value));<NEW_LINE>} else {<NEW_LINE>notifyListeners(new MapDelegateEvent<>(UPDATE, key, value));<NEW_LINE>}<NEW_LINE>return decodeValue(oldValue.get());<NEW_LINE>}<NEW_LINE>return value;<NEW_LINE>}
oldValue = new AtomicReference<>();
1,820,808
private static Map<String, Type> collectTypeVariableLookup(Type type) {<NEW_LINE>HashMap<String, Type> vars = new HashMap<String, Type>();<NEW_LINE>if (null == type) {<NEW_LINE>return vars;<NEW_LINE>}<NEW_LINE>if (type instanceof ParameterizedType) {<NEW_LINE>ParameterizedType pType = (ParameterizedType) type;<NEW_LINE>Type[] actualTypeArguments = pType.getActualTypeArguments();<NEW_LINE>Class clazz = (Class) pType.getRawType();<NEW_LINE>for (int i = 0; i < clazz.getTypeParameters().length; i++) {<NEW_LINE>TypeVariable variable = clazz.getTypeParameters()[i];<NEW_LINE>vars.put(variable.getName() + "@" + clazz.getCanonicalName(), actualTypeArguments[i]);<NEW_LINE>}<NEW_LINE>vars.putAll(collectTypeVariableLookup<MASK><NEW_LINE>return vars;<NEW_LINE>}<NEW_LINE>if (type instanceof Class) {<NEW_LINE>Class clazz = (Class) type;<NEW_LINE>vars.putAll(collectTypeVariableLookup(clazz.getGenericSuperclass()));<NEW_LINE>return vars;<NEW_LINE>}<NEW_LINE>if (type instanceof WildcardType) {<NEW_LINE>return vars;<NEW_LINE>}<NEW_LINE>throw new JsonException("unexpected type: " + type);<NEW_LINE>}
(clazz.getGenericSuperclass()));
1,084,234
public boolean isValid() {<NEW_LINE>switch(htmlTag) {<NEW_LINE>case A:<NEW_LINE>return (hasAttr(HtmlAttr.NAME) || (hasAttr(HtmlAttr.HREF) && hasContent()));<NEW_LINE>case BR:<NEW_LINE>return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR)));<NEW_LINE>case FRAME:<NEW_LINE>return (hasAttr(HtmlAttr.SRC) && !hasContent());<NEW_LINE>case HR:<NEW_LINE>return (!hasContent());<NEW_LINE>case IMG:<NEW_LINE>return (hasAttr(HtmlAttr.SRC) && hasAttr(HtmlAttr.ALT) && !hasContent());<NEW_LINE>case LINK:<NEW_LINE>return (hasAttr(HtmlAttr.HREF) && !hasContent());<NEW_LINE>case META:<NEW_LINE>return (hasAttr(HtmlAttr.CONTENT) && !hasContent());<NEW_LINE>case SCRIPT:<NEW_LINE>return ((hasAttr(HtmlAttr.TYPE) && hasAttr(HtmlAttr.SRC) && !hasContent()) || (hasAttr(HtmlAttr.<MASK><NEW_LINE>default:<NEW_LINE>return hasContent();<NEW_LINE>}<NEW_LINE>}
TYPE) && hasContent()));
1,477,208
public static ListVehicleDetailsResponse unmarshall(ListVehicleDetailsResponse listVehicleDetailsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVehicleDetailsResponse.setRequestId(_ctx.stringValue("ListVehicleDetailsResponse.RequestId"));<NEW_LINE>listVehicleDetailsResponse.setCode(_ctx.stringValue("ListVehicleDetailsResponse.Code"));<NEW_LINE>listVehicleDetailsResponse.setMessage(_ctx.stringValue("ListVehicleDetailsResponse.Message"));<NEW_LINE>listVehicleDetailsResponse.setPageNumber(_ctx.longValue("ListVehicleDetailsResponse.PageNumber"));<NEW_LINE>listVehicleDetailsResponse.setPageSize(_ctx.longValue("ListVehicleDetailsResponse.PageSize"));<NEW_LINE>listVehicleDetailsResponse.setTotalCount(_ctx.longValue("ListVehicleDetailsResponse.TotalCount"));<NEW_LINE>List<Datas> data = new ArrayList<Datas>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListVehicleDetailsResponse.Data.Length"); i++) {<NEW_LINE>Datas datas = new Datas();<NEW_LINE>datas.setVehicleId(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].VehicleId"));<NEW_LINE>datas.setVehicleColor(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].VehicleColor"));<NEW_LINE>datas.setTargetImageStoragePath(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].TargetImageStoragePath"));<NEW_LINE>datas.setGender(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].Gender"));<NEW_LINE>datas.setPersonType(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].PersonType"));<NEW_LINE>datas.setPrefOutTime(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].PrefOutTime"));<NEW_LINE>datas.setPopularPoi(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].PopularPoi"));<NEW_LINE>datas.setPopularAddress(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].PopularAddress"));<NEW_LINE>datas.setSourceImageStoragePath(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].SourceImageStoragePath"));<NEW_LINE>datas.setVehicleClass(_ctx.stringValue<MASK><NEW_LINE>datas.setVehicleApplication(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].VehicleApplication"));<NEW_LINE>datas.setPersonId(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].PersonId"));<NEW_LINE>datas.setPlateId(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].PlateId"));<NEW_LINE>datas.setSourceUrl(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].SourceUrl"));<NEW_LINE>datas.setTargetUrl(_ctx.stringValue("ListVehicleDetailsResponse.Data[" + i + "].TargetUrl"));<NEW_LINE>data.add(datas);<NEW_LINE>}<NEW_LINE>listVehicleDetailsResponse.setData(data);<NEW_LINE>return listVehicleDetailsResponse;<NEW_LINE>}
("ListVehicleDetailsResponse.Data[" + i + "].VehicleClass"));
400,978
public void propagate(InstanceState state) {<NEW_LINE>final var bits = state.getAttributeValue(ATTR_WIDTH);<NEW_LINE>int dx;<NEW_LINE>int dy;<NEW_LINE>State s = (State) state.getData();<NEW_LINE>if (s == null) {<NEW_LINE>dx = 0;<NEW_LINE>dy = 0;<NEW_LINE>} else {<NEW_LINE>dx = s.xPos;<NEW_LINE>dy = s.yPos;<NEW_LINE>}<NEW_LINE>int steps = (1 << bits.getWidth()) - 1;<NEW_LINE>dx = (dx + 14) * steps / 29 + 1;<NEW_LINE>dy = (dy + <MASK><NEW_LINE>if (bits.getWidth() > 4) {<NEW_LINE>if (dx >= steps / 2)<NEW_LINE>dx++;<NEW_LINE>if (dy >= steps / 2)<NEW_LINE>dy++;<NEW_LINE>}<NEW_LINE>state.setPort(0, Value.createKnown(bits, dx), 1);<NEW_LINE>state.setPort(1, Value.createKnown(bits, dy), 1);<NEW_LINE>}
14) * steps / 29 + 1;
1,623,325
public static String convertConsumerToUrl(ConsumerConfig consumerConfig) {<NEW_LINE>StringBuilder sb = new StringBuilder(200);<NEW_LINE><MASK><NEW_LINE>// noinspection unchecked<NEW_LINE>sb.append(consumerConfig.getProtocol()).append("://").append(host).append("?version=1.0").append(getKeyPairs(RpcConstants.CONFIG_KEY_UNIQUEID, consumerConfig.getUniqueId())).append(getKeyPairs(RpcConstants.CONFIG_KEY_PID, RpcRuntimeContext.PID)).append(getKeyPairs(RpcConstants.CONFIG_KEY_TIMEOUT, consumerConfig.getTimeout())).append(getKeyPairs(RpcConstants.CONFIG_KEY_ID, consumerConfig.getId())).append(getKeyPairs(RpcConstants.CONFIG_KEY_GENERIC, consumerConfig.isGeneric())).append(getKeyPairs(RpcConstants.CONFIG_KEY_INTERFACE, consumerConfig.getInterfaceId())).append(getKeyPairs(RpcConstants.CONFIG_KEY_APP_NAME, consumerConfig.getAppName())).append(getKeyPairs(RpcConstants.CONFIG_KEY_SERIALIZATION, consumerConfig.getSerialization())).append(getKeyPairs(ProviderInfoAttrs.ATTR_START_TIME, RpcRuntimeContext.now())).append(convertMap2Pair(consumerConfig.getParameters()));<NEW_LINE>addCommonAttrs(sb);<NEW_LINE>return sb.toString();<NEW_LINE>}
String host = SystemInfo.getLocalHost();
267,945
public MappeableContainer or(MappeableRunContainer x) {<NEW_LINE>if (isFull() || x.isFull()) {<NEW_LINE>// cheap case that can save a lot of computation<NEW_LINE>return full();<NEW_LINE>}<NEW_LINE>// we really ought to optimize the rest of the code for the frequent case where there is a<NEW_LINE>// single run<NEW_LINE>MappeableRunContainer answer = new MappeableRunContainer(CharBuffer.allocate(2 * (this.nbrruns + x.nbrruns)), 0);<NEW_LINE>char[] vl = answer.valueslength.array();<NEW_LINE>int rlepos = 0;<NEW_LINE>int xrlepos = 0;<NEW_LINE>while ((rlepos < this.nbrruns) && (xrlepos < x.nbrruns)) {<NEW_LINE>if ((getValue(rlepos)) - (x.getValue(xrlepos)) <= 0) {<NEW_LINE>answer.smartAppend(vl, getValue(<MASK><NEW_LINE>rlepos++;<NEW_LINE>} else {<NEW_LINE>answer.smartAppend(vl, x.getValue(xrlepos), x.getLength(xrlepos));<NEW_LINE>xrlepos++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>while (xrlepos < x.nbrruns) {<NEW_LINE>answer.smartAppend(vl, x.getValue(xrlepos), x.getLength(xrlepos));<NEW_LINE>xrlepos++;<NEW_LINE>}<NEW_LINE>while (rlepos < this.nbrruns) {<NEW_LINE>answer.smartAppend(vl, getValue(rlepos), getLength(rlepos));<NEW_LINE>rlepos++;<NEW_LINE>}<NEW_LINE>if (answer.isFull()) {<NEW_LINE>return full();<NEW_LINE>}<NEW_LINE>return answer.toBitmapIfNeeded();<NEW_LINE>}
rlepos), getLength(rlepos));
1,183,751
public JPanel buildOverviewPanel(WsdlProject project) {<NEW_LINE>JPropertiesTable<WsdlProject> table = new JPropertiesTable<WsdlProject>("Project Properties", project);<NEW_LINE>if (project.isOpen()) {<NEW_LINE>table.addProperty("Name", "name", true);<NEW_LINE>table.addProperty("Description", "description", true);<NEW_LINE>table.addProperty("File", "path");<NEW_LINE>if (!project.isDisabled()) {<NEW_LINE>table.addProperty("Resource Root", "resourceRoot", new String[] { null, "${projectDir}", "${workspaceDir}" });<NEW_LINE>table.addProperty("Cache Definitions", "cacheDefinitions", JPropertiesTable.BOOLEAN_OPTIONS);<NEW_LINE>table.addPropertyShadow("Project Password", "shadowPassword", true);<NEW_LINE>table.addProperty("Script Language", <MASK><NEW_LINE>table.addProperty("Hermes Config", "hermesConfig", true);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>table.addProperty("File", "path");<NEW_LINE>}<NEW_LINE>return table;<NEW_LINE>}
"defaultScriptLanguage", SoapUIScriptEngineRegistry.getAvailableEngineIds());
401,471
public static String formatDate8(long millis, TimeZone timeZone) {<NEW_LINE>Calendar cale = timeZone == null ? Calendar.getInstance() : Calendar.getInstance(timeZone);<NEW_LINE>cale.setTimeInMillis(millis);<NEW_LINE>int year = cale.get(Calendar.YEAR);<NEW_LINE>int month = cale.get(Calendar.MONTH) + 1;<NEW_LINE>int dayOfMonth = cale.get(Calendar.DAY_OF_MONTH);<NEW_LINE>char[] chars = new char[14];<NEW_LINE>chars[0] = (char) (year / 1000 + '0');<NEW_LINE>chars[1] = (char) ((year / 100) % 10 + '0');<NEW_LINE>chars[2] = (char) ((year / 10) % 10 + '0');<NEW_LINE>chars[3] = (char) (year % 10 + '0');<NEW_LINE>chars[4] = (char) (month / 10 + '0');<NEW_LINE>chars[5] = (char) (month % 10 + '0');<NEW_LINE>chars[6] = (char<MASK><NEW_LINE>chars[7] = (char) (dayOfMonth % 10 + '0');<NEW_LINE>return new String(chars);<NEW_LINE>}
) (dayOfMonth / 10 + '0');
538,559
byte[] toBytes() {<NEW_LINE>// create a byte array to hold the headerVersion + userMetadataVersion + userMetadataSize + blobRecordVersion +<NEW_LINE>// blobType + blobRecordSize + storeKey.<NEW_LINE>byte[] bytes = new byte[Version_Field_Size_In_Bytes + Version_Field_Size_In_Bytes + Integer.SIZE / 8 + Version_Field_Size_In_Bytes + (blobRecordVersion == Blob_Version_V2 ? (Short.SIZE / 8) : 0) + Long.SIZE / <MASK><NEW_LINE>ByteBuffer bufWrap = ByteBuffer.wrap(bytes);<NEW_LINE>bufWrap.putShort(headerVersion);<NEW_LINE>bufWrap.putShort(userMetadataVersion);<NEW_LINE>bufWrap.putInt(userMetadataSize);<NEW_LINE>bufWrap.putShort(blobRecordVersion);<NEW_LINE>if (blobRecordVersion == Blob_Version_V2) {<NEW_LINE>bufWrap.putShort((short) blobType.ordinal());<NEW_LINE>}<NEW_LINE>bufWrap.putLong(blobStreamSize);<NEW_LINE>bufWrap.put(storeKey.toBytes());<NEW_LINE>return bytes;<NEW_LINE>}
8 + storeKey.sizeInBytes()];
1,752,205
public // implement RelOptRule<NEW_LINE>void onMatch(RelOptRuleCall call) {<NEW_LINE>Project origProj;<NEW_LINE>Filter filter;<NEW_LINE>if (call.rels.length >= 2) {<NEW_LINE>origProj = call.rel(0);<NEW_LINE>filter = call.rel(1);<NEW_LINE>} else {<NEW_LINE>origProj = null;<NEW_LINE>filter = call.rel(0);<NEW_LINE>}<NEW_LINE>RelNode rel = filter.getInput();<NEW_LINE>RexNode origFilter = filter.getCondition();<NEW_LINE>if ((origProj != null) && RexOver.containsOver(origProj.getProjects(), null)) {<NEW_LINE>// Cannot push project through filter if project contains a windowed<NEW_LINE>// aggregate -- it will affect row counts. Abort this rule<NEW_LINE>// invocation; pushdown will be considered after the windowed<NEW_LINE>// aggregate has been implemented. It's OK if the filter contains a<NEW_LINE>// windowed aggregate.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (filter != null && filter.getCondition() != null) {<NEW_LINE>RexUtil.DynamicDeepFinder dynamicDeepFinder = new RexUtil.DynamicDeepFinder(Lists.newLinkedList());<NEW_LINE>filter.getCondition().accept(dynamicDeepFinder);<NEW_LINE>if (dynamicDeepFinder.getScalar().size() > 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>PushProjector pushProjector = new PushProjector(origProj, origFilter, rel, preserveExprCondition, call.builder());<NEW_LINE>RelNode <MASK><NEW_LINE>if (topProject != null) {<NEW_LINE>call.transformTo(topProject);<NEW_LINE>}<NEW_LINE>}
topProject = pushProjector.convertProject(null);
1,794,175
protected PreparedStatement prepareStatement(String sql, Object[] params) throws SQLException {<NEW_LINE>PreparedStatement statement = connection.prepareStatement(sql);<NEW_LINE>// Spanner requires specific types for NULL according to the column.<NEW_LINE>// This is unlike other databases which have a single "null type".<NEW_LINE>for (int i = 0; i < params.length; i++) {<NEW_LINE>if (params[i] == null) {<NEW_LINE>statement.setNull(i + 1, nullType);<NEW_LINE>} else if (params[i] instanceof Integer) {<NEW_LINE>statement.setInt(i + 1, (Integer) params[i]);<NEW_LINE>} else if (params[i] instanceof Boolean) {<NEW_LINE>statement.setBoolean(i + 1, (Boolean) params[i]);<NEW_LINE>} else if (params[i] instanceof String) {<NEW_LINE>statement.setString(i + 1, params<MASK><NEW_LINE>} else if (params[i] == JdbcNullTypes.StringNull) {<NEW_LINE>// This is the only difference from Spanner - NVARCHAR fails for BigQuery.<NEW_LINE>statement.setNull(i + 1, Types.VARCHAR);<NEW_LINE>} else if (params[i] == JdbcNullTypes.IntegerNull) {<NEW_LINE>statement.setNull(i + 1, Types.INTEGER);<NEW_LINE>} else if (params[i] == JdbcNullTypes.BooleanNull) {<NEW_LINE>statement.setNull(i + 1, Types.BOOLEAN);<NEW_LINE>} else {<NEW_LINE>throw new FlywayException("Unhandled object of type '" + params[i].getClass().getName() + "'. ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return statement;<NEW_LINE>}
[i].toString());
1,509,877
public PCollection<KV<K, V>> expand(PBegin input) {<NEW_LINE>validateTransform();<NEW_LINE>// Get the key and value coders based on the key and value classes.<NEW_LINE>CoderRegistry coderRegistry = input.getPipeline().getCoderRegistry();<NEW_LINE>Coder<K> keyCoder = getKeyCoder();<NEW_LINE>if (keyCoder == null) {<NEW_LINE>keyCoder = <MASK><NEW_LINE>}<NEW_LINE>Coder<V> valueCoder = getValueCoder();<NEW_LINE>if (valueCoder == null) {<NEW_LINE>valueCoder = getDefaultCoder(getValueTypeDescriptor(), coderRegistry);<NEW_LINE>}<NEW_LINE>HadoopInputFormatBoundedSource<K, V> source = new HadoopInputFormatBoundedSource<>(getConfiguration(), keyCoder, valueCoder, getKeyTranslationFunction(), getValueTranslationFunction(), getSkipKeyClone(), getSkipValueClone());<NEW_LINE>return input.getPipeline().apply(org.apache.beam.sdk.io.Read.from(source));<NEW_LINE>}
getDefaultCoder(getKeyTypeDescriptor(), coderRegistry);
525,813
private HeadInter selectBestHead(SlurInter slur, AbstractChordInter chord, Point2D end, Point2D target, Point2D bisUnit, Area area) {<NEW_LINE>final boolean horizontal = isHorizontal(slur);<NEW_LINE>final boolean above = slur.isAbove();<NEW_LINE>double bestDist = Double.MAX_VALUE;<NEW_LINE>HeadInter bestHead = null;<NEW_LINE>for (Inter head : chord.getNotes()) {<NEW_LINE>Point center = head.getCenter();<NEW_LINE>if (!horizontal) {<NEW_LINE>// We require head center to be contained by lookup area<NEW_LINE>if (!area.contains(center)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Check head reference point WRT slur concavity<NEW_LINE>Rectangle bounds = head.getBounds();<NEW_LINE>Point refPt = new Point(center.x, bounds.y + (above ? (bounds.height - 1) : 0));<NEW_LINE>if (dotProduct(subtraction(refPt, end), bisUnit) <= 0) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Keep the closest head<NEW_LINE>final double <MASK><NEW_LINE>if (dist < bestDist) {<NEW_LINE>bestDist = dist;<NEW_LINE>bestHead = (HeadInter) head;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return bestHead;<NEW_LINE>}
dist = center.distanceSq(target);
642,694
public static GetOutbounNumListResponse unmarshall(GetOutbounNumListResponse getOutbounNumListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getOutbounNumListResponse.setRequestId(_ctx.stringValue("GetOutbounNumListResponse.RequestId"));<NEW_LINE>getOutbounNumListResponse.setMessage(_ctx.stringValue("GetOutbounNumListResponse.Message"));<NEW_LINE>getOutbounNumListResponse.setCode(_ctx.stringValue("GetOutbounNumListResponse.Code"));<NEW_LINE>getOutbounNumListResponse.setSuccess(_ctx.booleanValue("GetOutbounNumListResponse.Success"));<NEW_LINE>getOutbounNumListResponse.setHttpStatusCode(_ctx.longValue("GetOutbounNumListResponse.HttpStatusCode"));<NEW_LINE>Data data = new Data();<NEW_LINE>List<NumGroupItem> numGroup = new ArrayList<NumGroupItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetOutbounNumListResponse.Data.NumGroup.Length"); i++) {<NEW_LINE>NumGroupItem numGroupItem = new NumGroupItem();<NEW_LINE>numGroupItem.setType(_ctx.integerValue("GetOutbounNumListResponse.Data.NumGroup[" + i + "].Type"));<NEW_LINE>numGroupItem.setValue(_ctx.stringValue("GetOutbounNumListResponse.Data.NumGroup[" + i + "].Value"));<NEW_LINE>numGroupItem.setDescription(_ctx.stringValue("GetOutbounNumListResponse.Data.NumGroup[" + i + "].Description"));<NEW_LINE>numGroup.add(numGroupItem);<NEW_LINE>}<NEW_LINE>data.setNumGroup(numGroup);<NEW_LINE>List<NumItem> num = new ArrayList<NumItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetOutbounNumListResponse.Data.Num.Length"); i++) {<NEW_LINE>NumItem numItem = new NumItem();<NEW_LINE>numItem.setType(_ctx.integerValue("GetOutbounNumListResponse.Data.Num[" + i + "].Type"));<NEW_LINE>numItem.setValue(_ctx.stringValue("GetOutbounNumListResponse.Data.Num[" + i + "].Value"));<NEW_LINE>numItem.setDescription(_ctx.stringValue<MASK><NEW_LINE>num.add(numItem);<NEW_LINE>}<NEW_LINE>data.setNum(num);<NEW_LINE>getOutbounNumListResponse.setData(data);<NEW_LINE>return getOutbounNumListResponse;<NEW_LINE>}
("GetOutbounNumListResponse.Data.Num[" + i + "].Description"));
158,324
public int removeDataSourceMetadataOlderThan(long timestamp, @NotNull Set<String> excludeDatasources) {<NEW_LINE>DateTime dateTime = DateTimes.utc(timestamp);<NEW_LINE>List<String> datasourcesToDelete = connector.getDBI().withHandle(handle -> handle.createQuery(StringUtils.format("SELECT dataSource FROM %1$s WHERE created_date < '%2$s'", dbTables.getDataSourceTable(), dateTime.toString())).mapTo(String.class).list());<NEW_LINE>datasourcesToDelete.removeAll(excludeDatasources);<NEW_LINE>return connector.getDBI().withHandle(handle -> {<NEW_LINE>final PreparedBatch batch = handle.prepareBatch(StringUtils.format("DELETE FROM %1$s WHERE dataSource = :dataSource AND created_date < '%2$s'", dbTables.getDataSourceTable(), dateTime.toString()));<NEW_LINE>for (String datasource : datasourcesToDelete) {<NEW_LINE>batch.bind("dataSource", datasource).add();<NEW_LINE>}<NEW_LINE>int[] result = batch.execute();<NEW_LINE>return IntStream.<MASK><NEW_LINE>});<NEW_LINE>}
of(result).sum();
75,482
public ThreadLevelInfo display(ProblemReport report) {<NEW_LINE>Machine machine = report.getMachines().<MASK><NEW_LINE>if (machine == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Collection<Entity> entities = machine.getEntities().values();<NEW_LINE>for (Entity temp : entities) {<NEW_LINE>Map<String, JavaThread> threads = temp.getThreads();<NEW_LINE>for (java.util.Map.Entry<String, JavaThread> entry : threads.entrySet()) {<NEW_LINE>JavaThread thread = entry.getValue();<NEW_LINE>String groupName = thread.getGroupName();<NEW_LINE>String threadId = thread.getId();<NEW_LINE>GroupStatistics statistics = findOrCreatGroupStatistics(groupName, m_minutes);<NEW_LINE>if (groupName.equals(m_groupName)) {<NEW_LINE>statistics.add(threadId, thread.getSegments(), m_minutes, temp.getType());<NEW_LINE>findOrCreatThreadInfo(groupName, threadId);<NEW_LINE>} else {<NEW_LINE>statistics.add(groupName, thread.getSegments(), m_minutes, temp.getType());<NEW_LINE>findOrCreatThreadInfo(groupName, groupName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>long currentTimeMillis = System.currentTimeMillis();<NEW_LINE>long currentHours = currentTimeMillis - currentTimeMillis % (60 * 60 * 1000);<NEW_LINE>if (currentHours == m_model.getLongDate()) {<NEW_LINE>for (int i = m_minutes; i >= 0; i--) {<NEW_LINE>m_datas.add(getShowDetailByMinte(i));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i <= m_minutes; i++) {<NEW_LINE>m_datas.add(getShowDetailByMinte(i));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
get(m_model.getIpAddress());
910,231
public static void resolve(ICompilationUnit[] compilationUnits, String[] bindingKeys, ASTRequestor requestor, int apiLevel, Map options, IJavaProject javaProject, WorkingCopyOwner owner, int flags, IProgressMonitor monitor) {<NEW_LINE>CancelableNameEnvironment environment = null;<NEW_LINE>CancelableProblemFactory problemFactory = null;<NEW_LINE>try {<NEW_LINE>// 1 for beginToCompile, 1 for resolve<NEW_LINE>int amountOfWork = (compilationUnits.length + bindingKeys.length) * 2;<NEW_LINE>SubMonitor subMonitor = SubMonitor.convert(monitor, amountOfWork);<NEW_LINE>environment = new CancelableNameEnvironment((JavaProject) javaProject, owner, subMonitor);<NEW_LINE>problemFactory = new CancelableProblemFactory(subMonitor);<NEW_LINE>CompilerOptions compilerOptions = getCompilerOptions(options, (flags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);<NEW_LINE>compilerOptions.ignoreMethodBodies = (<MASK><NEW_LINE>CompilationUnitResolver resolver = new CompilationUnitResolver(environment, getHandlingPolicy(), compilerOptions, getRequestor(), problemFactory, subMonitor, javaProject != null);<NEW_LINE>resolver.resolve(compilationUnits, bindingKeys, requestor, apiLevel, options, owner, flags);<NEW_LINE>if (NameLookup.VERBOSE) {<NEW_LINE>environment.printTimeSpent();<NEW_LINE>}<NEW_LINE>} catch (JavaModelException e) {<NEW_LINE>// project doesn't exist -> simple parse without resolving<NEW_LINE>parse(compilationUnits, requestor, apiLevel, options, flags, monitor);<NEW_LINE>} finally {<NEW_LINE>if (environment != null) {<NEW_LINE>// don't hold a reference to this external object<NEW_LINE>environment.setMonitor(null);<NEW_LINE>}<NEW_LINE>if (problemFactory != null) {<NEW_LINE>// don't hold a reference to this external object<NEW_LINE>problemFactory.monitor = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
flags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0;
1,794,859
private void markSessionConnected(Channel activeChannel) {<NEW_LINE>VolatileFields newCache = new VolatileFields();<NEW_LINE>newCache.state = ConnState.CONNECTED;<NEW_LINE>newCache.nettyChannel = activeChannel;<NEW_LINE>interceptorManager.onConnected(this);<NEW_LINE>synchronized (pendingSend) {<NEW_LINE>if (fields.state != ConnState.CONNECTING) {<NEW_LINE>// this session may have been closed or connected already<NEW_LINE>logger.info("{}: session is {}, skip to mark it connected", name(), fields.state);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>while (!pendingSend.isEmpty()) {<NEW_LINE><MASK><NEW_LINE>if (pendingResponse.get(e.sequenceId) != null) {<NEW_LINE>write(e, newCache);<NEW_LINE>} else {<NEW_LINE>logger.info("{}: {} is removed from pending, perhaps timeout", name(), e.sequenceId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>fields = newCache;<NEW_LINE>}<NEW_LINE>}
RequestEntry e = pendingSend.poll();
1,795,620
public void sendNotificationMsgToEdgeService(TenantId tenantId, EdgeId edgeId, EntityId entityId, String body, EdgeEventType type, EdgeEventActionType action) {<NEW_LINE>if (!edgesEnabled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (type == null) {<NEW_LINE>if (entityId != null) {<NEW_LINE>type = EdgeUtils.getEdgeEventTypeByEntityType(entityId.getEntityType());<NEW_LINE>} else {<NEW_LINE>log.trace("[{}] entity id and type are null. Ignoring this notification", tenantId);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (type == null) {<NEW_LINE>log.trace("[{}] edge event type is null. Ignoring this notification [{}]", tenantId, entityId);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>TransportProtos.EdgeNotificationMsgProto.Builder builder = TransportProtos.EdgeNotificationMsgProto.newBuilder();<NEW_LINE>builder.setTenantIdMSB(tenantId.getId().getMostSignificantBits());<NEW_LINE>builder.setTenantIdLSB(tenantId.getId().getLeastSignificantBits());<NEW_LINE>builder.setType(type.name());<NEW_LINE>builder.setAction(action.name());<NEW_LINE>if (entityId != null) {<NEW_LINE>builder.setEntityIdMSB(entityId.getId().getMostSignificantBits());<NEW_LINE>builder.setEntityIdLSB(entityId.getId().getLeastSignificantBits());<NEW_LINE>builder.setEntityType(entityId.getEntityType().name());<NEW_LINE>}<NEW_LINE>if (edgeId != null) {<NEW_LINE>builder.setEdgeIdMSB(edgeId.<MASK><NEW_LINE>builder.setEdgeIdLSB(edgeId.getId().getLeastSignificantBits());<NEW_LINE>}<NEW_LINE>if (body != null) {<NEW_LINE>builder.setBody(body);<NEW_LINE>}<NEW_LINE>TransportProtos.EdgeNotificationMsgProto msg = builder.build();<NEW_LINE>log.trace("[{}] sending notification to edge service {}", tenantId.getId(), msg);<NEW_LINE>pushMsgToCore(tenantId, entityId != null ? entityId : tenantId, TransportProtos.ToCoreMsg.newBuilder().setEdgeNotificationMsg(msg).build(), null);<NEW_LINE>if (entityId != null && EntityType.DEVICE.equals(entityId.getEntityType())) {<NEW_LINE>pushDeviceUpdateMessage(tenantId, edgeId, entityId, action);<NEW_LINE>}<NEW_LINE>}
getId().getMostSignificantBits());
1,552,350
public Status check() {<NEW_LINE>List<ProtocolServer> servers = DubboProtocol.getDubboProtocol().getServers();<NEW_LINE>if (servers == null || servers.isEmpty()) {<NEW_LINE>return new Status(Status.Level.UNKNOWN);<NEW_LINE>}<NEW_LINE>Status.Level level = Status.Level.OK;<NEW_LINE>StringBuilder buf = new StringBuilder();<NEW_LINE>for (ProtocolServer protocolServer : servers) {<NEW_LINE><MASK><NEW_LINE>if (!server.isBound()) {<NEW_LINE>level = Status.Level.ERROR;<NEW_LINE>buf.setLength(0);<NEW_LINE>buf.append(server.getLocalAddress());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (buf.length() > 0) {<NEW_LINE>buf.append(',');<NEW_LINE>}<NEW_LINE>buf.append(server.getLocalAddress());<NEW_LINE>buf.append("(clients:");<NEW_LINE>buf.append(server.getChannels().size());<NEW_LINE>buf.append(')');<NEW_LINE>}<NEW_LINE>return new Status(level, buf.toString());<NEW_LINE>}
RemotingServer server = protocolServer.getRemotingServer();
1,660,795
protected IResource[] collectResourcesOfInterest(IPackageFragment source) throws CoreException {<NEW_LINE>IJavaElement[] children = source.getChildren();<NEW_LINE>int childOfInterest = IJavaElement.COMPILATION_UNIT;<NEW_LINE>if (source.getKind() == IPackageFragmentRoot.K_BINARY) {<NEW_LINE>childOfInterest = IJavaElement.CLASS_FILE;<NEW_LINE>}<NEW_LINE>ArrayList<IResource> result = new ArrayList<>(children.length);<NEW_LINE>for (int i = 0; i < children.length; i++) {<NEW_LINE>IJavaElement child = children[i];<NEW_LINE>if (child.getElementType() == childOfInterest && child.getResource() != null) {<NEW_LINE>result.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Gather non-java resources<NEW_LINE>Object[] nonJavaResources = source.getNonJavaResources();<NEW_LINE>for (int i = 0; i < nonJavaResources.length; i++) {<NEW_LINE>Object element = nonJavaResources[i];<NEW_LINE>if (element instanceof IResource) {<NEW_LINE>result.add((IResource) element);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result.toArray(new IResource[result.size()]);<NEW_LINE>}
add(child.getResource());
825,749
/* Checks to make sure that the domain is running, currently used during<NEW_LINE>* cluster creation as create-cluster requires the domain to be up.<NEW_LINE>* @param domainName, name of the domain to check.<NEW_LINE>* @return true if the domain is running, false if the domain is not running<NEW_LINE>* or there are other errors running asadmin list-domains command.<NEW_LINE>*/<NEW_LINE>public boolean isDomainRunning(String domainName) {<NEW_LINE>boolean retStatus = false;<NEW_LINE>String expectedOutput = Msg.get("DOMAIN_RUNNING_OUTPUT", new String[] { domainName });<NEW_LINE>if (outputFromRecentRun.indexOf(expectedOutput) != -1) {<NEW_LINE>retStatus = true;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.log(Level.<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>outputFromRecentRun = Msg.get("INVALID_LIST_DOMAIN_COMMAND_LINE");<NEW_LINE>retStatus = false;<NEW_LINE>}<NEW_LINE>LOGGER.log(Level.INFO, outputFromRecentRun);<NEW_LINE>return retStatus;<NEW_LINE>}
FINEST, e.getMessage());
1,109,624
public void checkScopeExists(ScopeInfo request, StreamObserver<Controller.ExistsResponse> responseObserver) {<NEW_LINE>RequestTag requestTag = requestTracker.initializeAndTrackRequestTag(controllerService.nextRequestId(), CHECK_SCOPE_EXISTS, request.getScope());<NEW_LINE><MASK><NEW_LINE>log.info(requestTag.getRequestId(), "checkScopeExists called for scope {}.", request);<NEW_LINE>final AuthContext ctx;<NEW_LINE>if (this.grpcAuthHelper.isAuthEnabled()) {<NEW_LINE>ctx = AuthContext.current();<NEW_LINE>} else {<NEW_LINE>ctx = null;<NEW_LINE>}<NEW_LINE>Supplier<String> stringSupplier = () -> {<NEW_LINE>String result = this.grpcAuthHelper.checkAuthorization(authorizationResource.ofScope(scope), AuthHandler.Permissions.READ, ctx);<NEW_LINE>log.debug("Result of authorization for [{}] and READ permission is: [{}]", authorizationResource.ofScopes(), result);<NEW_LINE>return result;<NEW_LINE>};<NEW_LINE>Function<String, CompletableFuture<Controller.ExistsResponse>> scopeFn = delegationToken -> controllerService.getScope(scope, requestTag.getRequestId()).handle((response, e) -> {<NEW_LINE>boolean exists;<NEW_LINE>if (e != null) {<NEW_LINE>if (Exceptions.unwrap(e) instanceof StoreException.DataNotFoundException) {<NEW_LINE>exists = false;<NEW_LINE>} else {<NEW_LINE>throw new CompletionException(e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>exists = true;<NEW_LINE>}<NEW_LINE>return Controller.ExistsResponse.newBuilder().setExists(exists).build();<NEW_LINE>});<NEW_LINE>authenticateExecuteAndProcessResults(stringSupplier, scopeFn, responseObserver, requestTag);<NEW_LINE>}
String scope = request.getScope();
1,057,354
private MiniMRPProduct addProductToProcess(MReplenish replenish, Map<Integer, MiniMRPProduct> miniMrpProducts, Set<Integer> productIds) {<NEW_LINE>MProduct product = MProduct.get(getCtx(), replenish.getM_Product_ID());<NEW_LINE>// Get current vendor<NEW_LINE>MProductPO[] productPO = MProductPO.getOfProduct(getCtx(), product.getM_Product_ID(), get_TrxName());<NEW_LINE>int bPartnerId = 0;<NEW_LINE>// Get Business Partner<NEW_LINE>if (productPO.length > 0) {<NEW_LINE>bPartnerId = productPO[0].getC_BPartner_ID();<NEW_LINE>}<NEW_LINE>BigDecimal levelMin = replenish.getLevel_Min();<NEW_LINE>BigDecimal availableInventory = MStorage.getQtyAvailable(getWarehouseId(), 0, product.getM_Product_ID(), 0, get_TrxName());<NEW_LINE>if (availableInventory == null) {<NEW_LINE>availableInventory = Env.ZERO;<NEW_LINE>}<NEW_LINE>// Phantom<NEW_LINE>if (product.isPhantom()) {<NEW_LINE>levelMin = Env.ZERO;<NEW_LINE>availableInventory = Env.ZERO;<NEW_LINE>}<NEW_LINE>// Get Product Price<NEW_LINE>MProductPricing price = new MProductPricing(product.getM_Product_ID(), bPartnerId, levelMin, false, get_TrxName());<NEW_LINE>price.setM_PriceList_ID(priceListId);<NEW_LINE>price.calculatePrice();<NEW_LINE>//<NEW_LINE>MiniMRPProduct miniMrpProduct = new MiniMRPProduct(product.getM_Product_ID());<NEW_LINE>miniMrpProduct.setAvailableQty(availableInventory);<NEW_LINE>miniMrpProduct.setName(product.getName());<NEW_LINE>miniMrpProduct.setM_Product_Category_ID(product.getM_Product_Category_ID());<NEW_LINE>miniMrpProduct.setProjectedLeadTime(0);<NEW_LINE>miniMrpProduct.setBOM(product.isBOM());<NEW_LINE>miniMrpProduct.setVerified(product.isVerified());<NEW_LINE>miniMrpProduct.setPurchased(product.isPurchased());<NEW_LINE>miniMrpProduct.setPhantom(product.isPhantom());<NEW_LINE>miniMrpProduct.setC_BPartner_ID(bPartnerId);<NEW_LINE>miniMrpProduct.setPriceActual(price.getPriceList());<NEW_LINE>miniMrpProduct.setQtyBatchSize(replenish.getQtyBatchSize());<NEW_LINE>miniMrpProduct.setLevel_Min(levelMin);<NEW_LINE>miniMrpProduct.setReplenishTypeMRPCalculated(replenish.getReplenishType().equals(X_M_Replenish.REPLENISHTYPE_ReplenishPlanCalculated));<NEW_LINE>if (miniMrpProduct.isReplenishTypeMRPCalculated())<NEW_LINE>miniMrpProduct.setQtyOnHand(availableInventory.subtract(levelMin));<NEW_LINE>else<NEW_LINE>miniMrpProduct.setQtyOnHand(availableInventory);<NEW_LINE>// Check product QTY is negative then create demand.<NEW_LINE>if (miniMrpProduct.getQtyOnHand().compareTo(Env.ZERO) < 0 && !product.isPhantom()) {<NEW_LINE>setQtyAsDemand(product.getM_Product_ID(), miniMrpProduct.getQtyOnHand().negate(), getDateStart());<NEW_LINE>miniMrpProduct.setQtyOnHand(Env.ZERO);<NEW_LINE>}<NEW_LINE>// Manage Inventory & ProductId blueprint here.<NEW_LINE>productIds.add(product.getM_Product_ID());<NEW_LINE>miniMrpProducts.put(product.getM_Product_ID(), miniMrpProduct);<NEW_LINE>addAvailableInventory(<MASK><NEW_LINE>// Retrieve Confirmed Product QTY. If non BOM product then retrieve all<NEW_LINE>// requisition data for docType is 'MRP Requisition'.<NEW_LINE>setConfirmProductQty(miniMrpProduct);<NEW_LINE>return miniMrpProduct;<NEW_LINE>}
product.getM_Product_ID(), availableInventory);
1,041,429
private static void tryAssertionTimeWinUnique(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "theString" };<NEW_LINE>env.advanceTime(1000);<NEW_LINE>sendEvent(env, "E1", 1);<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, toArr("E1"));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "E1" });<NEW_LINE>env.milestone(1);<NEW_LINE>env.advanceTime(2000);<NEW_LINE>sendEvent(env, "E2", 2);<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, toArr("E1", "E2"));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "E2" });<NEW_LINE>env.milestone(2);<NEW_LINE>env.advanceTime(3000);<NEW_LINE>sendEvent(env, "E3", 1);<NEW_LINE>env.assertPropsIRPair("s0", fields, new Object[] { "E3" }, new Object[] { "E1" });<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, toArr("E2", "E3"));<NEW_LINE>env.milestone(3);<NEW_LINE>env.advanceTime(4000);<NEW_LINE>sendEvent(env, "E4", 3);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "E4" });<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, toArr("E2", "E3", "E4"));<NEW_LINE>sendEvent(env, "E5", 3);<NEW_LINE>env.assertPropsIRPair("s0", fields, new Object[] { "E5" }, new Object[] { "E4" });<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, toArr("E2", "E3", "E5"));<NEW_LINE>env.milestone(4);<NEW_LINE>env.advanceTime(11999);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.advanceTime(12000);<NEW_LINE>env.assertPropsOld("s0", fields, new Object[] { "E2" });<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, toArr("E3", "E5"));<NEW_LINE>env.milestone(5);<NEW_LINE>env.advanceTime(12999);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.advanceTime(13000);<NEW_LINE>env.assertPropsOld("s0", fields, new Object[] { "E3" });<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0"<MASK><NEW_LINE>env.milestone(6);<NEW_LINE>env.advanceTime(13999);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.advanceTime(14000);<NEW_LINE>env.assertPropsOld("s0", fields, new Object[] { "E5" });<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, toArr());<NEW_LINE>}
, fields, toArr("E5"));
1,724,160
protected void initChannel(SocketChannel ch) throws Exception {<NEW_LINE><MASK><NEW_LINE>pipeline.addLast("decoder", new NettyDecoder(codec, NettyClient.this, maxContentLength));<NEW_LINE>pipeline.addLast("encoder", new NettyEncoder());<NEW_LINE>pipeline.addLast("handler", new NettyChannelHandler(NettyClient.this, new MessageHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object handle(Channel channel, Object message) {<NEW_LINE>Response response = (Response) message;<NEW_LINE>ResponseFuture responseFuture = NettyClient.this.removeCallback(response.getRequestId());<NEW_LINE>if (responseFuture == null) {<NEW_LINE>LoggerUtil.warn("NettyClient has response from server, but responseFuture not exist, requestId={}", response.getRequestId());<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (response.getException() != null) {<NEW_LINE>responseFuture.onFailure(response);<NEW_LINE>} else {<NEW_LINE>responseFuture.onSuccess(response);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}));<NEW_LINE>}
ChannelPipeline pipeline = ch.pipeline();
457,359
public void visit(NodeTraversal t, Node n, Node parent) {<NEW_LINE>if (n.isStringLit() && !parent.isRegExp()) {<NEW_LINE>String str = n.getString();<NEW_LINE>// "undefined" is special-cased, since it needs to be used when JS code<NEW_LINE>// is unloading and therefore variable references aren't available.<NEW_LINE>// This is because of a bug in Firefox.<NEW_LINE>if ("undefined".equals(str)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (aliasStringsMode == AliasStringsMode.LARGE && str.length() <= ALIAS_LARGE_STRINGS_LENGTH) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Node occurrence = n;<NEW_LINE>StringInfo info = getOrCreateStringInfo(str);<NEW_LINE>info.occurrences.add(occurrence);<NEW_LINE>// The current module.<NEW_LINE>JSChunk module = t.getChunk();<NEW_LINE>if (info.occurrences.size() != 1) {<NEW_LINE>// Check whether the current module depends on the module containing<NEW_LINE>// the declaration.<NEW_LINE>if (module != null && info.moduleToContainDecl != null && module != info.moduleToContainDecl) {<NEW_LINE>// We need to declare this string in the deepest module in the<NEW_LINE>// module dependency graph that both of these modules depend on.<NEW_LINE>module = moduleGraph.getDeepestCommonDependencyInclusive(module, info.moduleToContainDecl);<NEW_LINE>} else {<NEW_LINE>// use the previously saved insertion location.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Node varParent = moduleVarParentMap.computeIfAbsent(module, compiler::getNodeForCodeInsertion);<NEW_LINE>info.moduleToContainDecl = module;<NEW_LINE>info.parentForNewVarDecl = varParent;<NEW_LINE>info<MASK><NEW_LINE>}<NEW_LINE>}
.siblingToInsertVarDeclBefore = varParent.getFirstChild();
869,116
// @formatter:on<NEW_LINE>public static JwtDecoder jwtDecoder(JWKSource<SecurityContext> jwkSource) {<NEW_LINE>Set<JWSAlgorithm> jwsAlgs = new HashSet<>();<NEW_LINE>jwsAlgs.addAll(JWSAlgorithm.Family.RSA);<NEW_LINE>jwsAlgs.<MASK><NEW_LINE>jwsAlgs.addAll(JWSAlgorithm.Family.HMAC_SHA);<NEW_LINE>ConfigurableJWTProcessor<SecurityContext> jwtProcessor = new DefaultJWTProcessor<>();<NEW_LINE>JWSKeySelector<SecurityContext> jwsKeySelector = new JWSVerificationKeySelector<>(jwsAlgs, jwkSource);<NEW_LINE>jwtProcessor.setJWSKeySelector(jwsKeySelector);<NEW_LINE>// Override the default Nimbus claims set verifier as NimbusJwtDecoder handles it instead<NEW_LINE>jwtProcessor.setJWTClaimsSetVerifier((claims, context) -> {<NEW_LINE>});<NEW_LINE>return new NimbusJwtDecoder(jwtProcessor);<NEW_LINE>}
addAll(JWSAlgorithm.Family.EC);
1,186,701
public static void actionZoom(Lookup lookup, Object value) {<NEW_LINE>if (lookup == null)<NEW_LINE>return;<NEW_LINE>//<NEW_LINE>MQuery zoomQuery = lookup.getZoomQuery();<NEW_LINE>// If not already exist or exact value<NEW_LINE>if (zoomQuery == null || value != null) {<NEW_LINE>// ColumnName might be changed in MTab.validateQuery<NEW_LINE>zoomQuery = new MQuery();<NEW_LINE>String column = lookup.getColumnName();<NEW_LINE>// Check if it is a Table Reference<NEW_LINE>if (lookup instanceof MLookup && DisplayType.List == lookup.getDisplayType()) {<NEW_LINE>int AD_Reference_ID = ((MLookup) lookup).getAD_Reference_Value_ID();<NEW_LINE>column = "AD_Ref_List_ID";<NEW_LINE>value = DB.getSQLValue(null, "SELECT AD_Ref_List_ID FROM AD_Ref_List WHERE AD_Reference_ID=? AND Value=?", AD_Reference_ID, value);<NEW_LINE>}<NEW_LINE>// strip off table name, fully qualify name doesn't work when zoom into detail tab<NEW_LINE>if (column.indexOf(".") > 0) {<NEW_LINE>int <MASK><NEW_LINE>String tableName = column.substring(0, p);<NEW_LINE>column = column.substring(column.indexOf(".") + 1);<NEW_LINE>zoomQuery.setZoomTableName(tableName);<NEW_LINE>zoomQuery.setZoomColumnName(column);<NEW_LINE>} else {<NEW_LINE>zoomQuery.setZoomColumnName(column);<NEW_LINE>// remove _ID to get table name<NEW_LINE>zoomQuery.setZoomTableName(column.substring(0, column.length() - 3));<NEW_LINE>}<NEW_LINE>zoomQuery.setZoomValue(value);<NEW_LINE>zoomQuery.addRestriction(column, MQuery.EQUAL, value);<NEW_LINE>// guess<NEW_LINE>zoomQuery.setRecordCount(1);<NEW_LINE>}<NEW_LINE>int windowId = lookup.getZoom(zoomQuery);<NEW_LINE>zoom(windowId, zoomQuery);<NEW_LINE>}
p = column.indexOf(".");
831,628
public CompositeModelProperty unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CompositeModelProperty compositeModelProperty = new CompositeModelProperty();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>compositeModelProperty.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("type", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>compositeModelProperty.setType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("assetProperty", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>compositeModelProperty.setAssetProperty(PropertyJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return compositeModelProperty;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
790,175
private void init() {<NEW_LINE>inflate(getContext(), R.layout.contact_friend_profile_layout, this);<NEW_LINE>mHeadImageView = findViewById(R.id.friend_icon);<NEW_LINE>mNickNameView = findViewById(R.id.friend_nick_name);<NEW_LINE>mIDView = findViewById(R.id.friend_account);<NEW_LINE>mRemarkView = findViewById(R.id.remark);<NEW_LINE>mRemarkView.setOnClickListener(this);<NEW_LINE>mSignatureTagView = findViewById(R.id.friend_signature_tag);<NEW_LINE>mSignatureView = findViewById(R.id.friend_signature);<NEW_LINE>mMessageOptionView = findViewById(R.id.msg_rev_opt);<NEW_LINE>mMessageOptionView.setOnClickListener(this);<NEW_LINE>mChatTopView = findViewById(R.id.chat_to_top);<NEW_LINE>mAddBlackView = findViewById(R.id.blackList);<NEW_LINE>deleteFriendBtn = findViewById(R.id.btn_delete);<NEW_LINE>deleteFriendBtn.setOnClickListener(this);<NEW_LINE>chatBtn = findViewById(R.id.btn_chat);<NEW_LINE>chatBtn.setOnClickListener(this);<NEW_LINE>audioCallBtn = findViewById(R.id.btn_voice);<NEW_LINE>audioCallBtn.setOnClickListener(this);<NEW_LINE>videoCallBtn = findViewById(R.id.btn_video);<NEW_LINE>videoCallBtn.setOnClickListener(this);<NEW_LINE>addFriendSendBtn = findViewById(R.id.add_friend_send_btn);<NEW_LINE>addFriendSendBtn.setOnClickListener(this);<NEW_LINE>acceptFriendBtn = findViewById(R.id.accept_friend_send_btn);<NEW_LINE>refuseFriendBtn = findViewById(R.id.refuse_friend_send_btn);<NEW_LINE>addFriendArea = findViewById(R.id.add_friend_verify_area);<NEW_LINE>addWordingEditText = findViewById(R.id.add_wording_edit);<NEW_LINE>friendApplicationVerifyArea = <MASK><NEW_LINE>friendApplicationAddWording = findViewById(R.id.friend_application_add_wording);<NEW_LINE>addFriendRemarkLv = findViewById(R.id.friend_remark_lv);<NEW_LINE>addFriendRemarkLv.setOnClickListener(this);<NEW_LINE>addFriendGroupLv = findViewById(R.id.friend_group_lv);<NEW_LINE>addFriendGroupLv.setContent(getContext().getString(R.string.contact_my_friend));<NEW_LINE>remarkAndGroupTip = findViewById(R.id.remark_and_group_tip);<NEW_LINE>mTitleBar = findViewById(R.id.friend_titlebar);<NEW_LINE>mTitleBar.setTitle(getResources().getString(R.string.profile_detail), ITitleBarLayout.Position.MIDDLE);<NEW_LINE>mTitleBar.getRightGroup().setVisibility(View.GONE);<NEW_LINE>mTitleBar.setOnLeftClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View view) {<NEW_LINE>((Activity) getContext()).finish();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
findViewById(R.id.friend_application_verify_area);
773,376
protected void init(Context context, AttributeSet attributeSet) {<NEW_LINE>mColorNormal = getColor(android.R.color.holo_blue_dark);<NEW_LINE>mColorPressed = getColor(<MASK><NEW_LINE>mIcon = 0;<NEW_LINE>mSize = SIZE_NORMAL;<NEW_LINE>if (attributeSet != null) {<NEW_LINE>initAttributes(context, attributeSet);<NEW_LINE>}<NEW_LINE>mCircleSize = getCircleSize(mSize);<NEW_LINE>mShadowRadius = getDimension(R.dimen.fab_shadow_radius);<NEW_LINE>mShadowOffset = getDimension(R.dimen.fab_shadow_offset);<NEW_LINE>mDrawableSize = (int) (mCircleSize + 2 * mShadowRadius);<NEW_LINE>// point size overhead<NEW_LINE>WindowManager mWindowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);<NEW_LINE>Display display = mWindowManager.getDefaultDisplay();<NEW_LINE>Point size = new Point();<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {<NEW_LINE>display.getSize(size);<NEW_LINE>mYHidden = size.y;<NEW_LINE>} else<NEW_LINE>mYHidden = display.getHeight();<NEW_LINE>updateBackground();<NEW_LINE>}
android.R.color.holo_blue_light);