idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,271,218
public static void main(String[] args) {<NEW_LINE>No Arvore = new No(45);<NEW_LINE>insereArvore(Arvore, 56);<NEW_LINE>insereArvore(Arvore, 67);<NEW_LINE>insereArvore(Arvore, 24);<NEW_LINE>insereArvore(Arvore, 61);<NEW_LINE>insereArvore(Arvore, 52);<NEW_LINE>System.out.print("Pre : ");<NEW_LINE>preOrdem(Arvore);<NEW_LINE>System.out.print("\nEm : ");<NEW_LINE>emOrdem(Arvore);<NEW_LINE>System.out.print("\nPos : ");<NEW_LINE>posOrdem(Arvore);<NEW_LINE>excluiArvore(Arvore, 45);<NEW_LINE>excluiArvore(Arvore, 24);<NEW_LINE>excluiArvore(Arvore, 56);<NEW_LINE>System.out.println("\n");<NEW_LINE>System.out.print("Pre : ");<NEW_LINE>preOrdem(Arvore);<NEW_LINE><MASK><NEW_LINE>emOrdem(Arvore);<NEW_LINE>System.out.print("\nPos : ");<NEW_LINE>posOrdem(Arvore);<NEW_LINE>System.out.println("\n");<NEW_LINE>int chave = 56;<NEW_LINE>if (buscaBinaria(Arvore, chave) != null)<NEW_LINE>System.out.println("\nEncontrou a chave " + chave);<NEW_LINE>else<NEW_LINE>System.out.println("\nNao encontrou a chave " + chave);<NEW_LINE>System.out.println("Altura da arvore : " + alturaArvore(Arvore));<NEW_LINE>}
System.out.print("\nEm : ");
81,816
private void updateBackgroundInsets() {<NEW_LINE>float top = 0, right = 0, bottom = 0, left = 0;<NEW_LINE>final List<BackgroundFill> fills = background.getFills();<NEW_LINE>for (int i = 0, max = fills.size(); i < max; i++) {<NEW_LINE>// We need to now inspect the paint to determine whether we can use a cache for this background.<NEW_LINE>// If a shape is being used, we don't care about gradients (we cache 'em both), but for a rectangle<NEW_LINE>// fill we omit these (so we can do 3-patch scaling). An ImagePattern is deadly to either<NEW_LINE>// (well, only deadly to a shape if it turns out to be a writable image).<NEW_LINE>final BackgroundFill fill = fills.get(i);<NEW_LINE>final Insets insets = fill.getInsets();<NEW_LINE>final CornerRadii radii = getNormalizedFillRadii(i);<NEW_LINE>top = (float) Math.max(top, insets.getTop() + Math.max(radii.getTopLeftVerticalRadius(), radii.getTopRightVerticalRadius()));<NEW_LINE>right = (float) Math.max(right, insets.getRight() + Math.max(radii.getTopRightHorizontalRadius()<MASK><NEW_LINE>bottom = (float) Math.max(bottom, insets.getBottom() + Math.max(radii.getBottomRightVerticalRadius(), radii.getBottomLeftVerticalRadius()));<NEW_LINE>left = (float) Math.max(left, insets.getLeft() + Math.max(radii.getTopLeftHorizontalRadius(), radii.getBottomLeftHorizontalRadius()));<NEW_LINE>}<NEW_LINE>backgroundInsets = new Insets(roundUp(top), roundUp(right), roundUp(bottom), roundUp(left));<NEW_LINE>}
, radii.getBottomRightHorizontalRadius()));
605,331
public static void main(String[] args) {<NEW_LINE>try {<NEW_LINE>CommandLine cl = parseComandLine(args);<NEW_LINE>Pdf2Dcm pdf2Dcm = new Pdf2Dcm();<NEW_LINE>final List<String> argList = cl.getArgList();<NEW_LINE>int argc = argList.size();<NEW_LINE>if (argc < 2)<NEW_LINE>throw new ParseException(rb.getString("missing"));<NEW_LINE>File dest = new File(argList.get(argc - 1));<NEW_LINE>if ((argc > 2 || new File(argList.get(0)).isDirectory()) && !dest.isDirectory())<NEW_LINE>throw new ParseException(MessageFormat.format(rb.getString("nodestdir"), dest));<NEW_LINE>initialize(cl);<NEW_LINE>pdf2Dcm.convert(cl.getArgList());<NEW_LINE>} catch (ParseException e) {<NEW_LINE>System.err.println(<MASK><NEW_LINE>System.err.println(rb.getString("try"));<NEW_LINE>System.exit(2);<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.err.println("pdf2dcm: " + e.getMessage());<NEW_LINE>e.printStackTrace();<NEW_LINE>System.exit(2);<NEW_LINE>}<NEW_LINE>}
"pdf2dcm: " + e.getMessage());
1,128,578
public static VmwareContext create(String vCenterAddress, String vCenterUserName, String vCenterPassword) throws Exception {<NEW_LINE>assert (vCenterAddress != null);<NEW_LINE>assert (vCenterUserName != null);<NEW_LINE>assert (vCenterPassword != null);<NEW_LINE>String serviceUrl = "https://" + vCenterAddress + "/sdk/vimService";<NEW_LINE>if (s_logger.isDebugEnabled())<NEW_LINE>s_logger.debug("initialize VmwareContext. url: " + serviceUrl + ", username: " + vCenterUserName + ", password: " + StringUtils.getMaskedPasswordForDisplay(vCenterPassword));<NEW_LINE>VmwareClient vimClient = new VmwareClient(vCenterAddress + "-" + s_seq++);<NEW_LINE>vimClient.<MASK><NEW_LINE>vimClient.connect(serviceUrl, vCenterUserName, vCenterPassword);<NEW_LINE>VmwareContext context = new VmwareContext(vimClient, vCenterAddress);<NEW_LINE>context.registerStockObject(VmwareManager.CONTEXT_STOCK_NAME, s_vmwareMgr);<NEW_LINE>context.registerStockObject("serviceconsole", s_vmwareMgr.getServiceConsolePortGroupName());<NEW_LINE>context.registerStockObject("manageportgroup", s_vmwareMgr.getManagementPortGroupName());<NEW_LINE>context.registerStockObject("noderuninfo", String.format("%d-%d", s_clusterMgr.getManagementNodeId(), s_clusterMgr.getCurrentRunId()));<NEW_LINE>context.setPoolInfo(s_pool, VmwareContextPool.composePoolKey(vCenterAddress, vCenterUserName));<NEW_LINE>return context;<NEW_LINE>}
setVcenterSessionTimeout(s_vmwareMgr.getVcenterSessionTimeout());
1,141,568
private void deleteUnusedCertificates() {<NEW_LINE>var oneMonthAgo = clock.instant().minus(30, ChronoUnit.DAYS);<NEW_LINE>curator.readAllEndpointCertificateMetadata().forEach((applicationId, storedMetaData) -> {<NEW_LINE>var lastRequested = Instant.<MASK><NEW_LINE>if (lastRequested.isBefore(oneMonthAgo) && hasNoDeployments(applicationId)) {<NEW_LINE>try (Lock lock = lock(applicationId)) {<NEW_LINE>if (Optional.of(storedMetaData).equals(curator.readEndpointCertificateMetadata(applicationId))) {<NEW_LINE>log.log(Level.INFO, "Cert for app " + applicationId.serializedForm() + " has not been requested in a month and app has no deployments, deleting from provider and ZK");<NEW_LINE>endpointCertificateProvider.deleteCertificate(applicationId, storedMetaData.rootRequestId());<NEW_LINE>curator.deleteEndpointCertificateMetadata(applicationId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
ofEpochSecond(storedMetaData.lastRequested());
607,506
public GetAutoSnapshotsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetAutoSnapshotsResult getAutoSnapshotsResult = new GetAutoSnapshotsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return getAutoSnapshotsResult;<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("resourceName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getAutoSnapshotsResult.setResourceName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("resourceType", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getAutoSnapshotsResult.setResourceType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("autoSnapshots", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getAutoSnapshotsResult.setAutoSnapshots(new ListUnmarshaller<AutoSnapshotDetails>(AutoSnapshotDetailsJsonUnmarshaller.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 getAutoSnapshotsResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
768,874
final DescribeVpcEndpointServiceConfigurationsResult executeDescribeVpcEndpointServiceConfigurations(DescribeVpcEndpointServiceConfigurationsRequest describeVpcEndpointServiceConfigurationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeVpcEndpointServiceConfigurationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DescribeVpcEndpointServiceConfigurationsRequest> request = null;<NEW_LINE>Response<DescribeVpcEndpointServiceConfigurationsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeVpcEndpointServiceConfigurationsRequestMarshaller().marshall(super.beforeMarshalling(describeVpcEndpointServiceConfigurationsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeVpcEndpointServiceConfigurations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeVpcEndpointServiceConfigurationsResult> responseHandler = new StaxResponseHandler<DescribeVpcEndpointServiceConfigurationsResult>(new DescribeVpcEndpointServiceConfigurationsResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,400,597
public static void main(String[] args) {<NEW_LINE>LL list = new LL();<NEW_LINE>list.insertFirst(3);<NEW_LINE>list.insertFirst(2);<NEW_LINE>list.insertFirst(8);<NEW_LINE>list.insertFirst(17);<NEW_LINE>list.insertLast(99);<NEW_LINE>list.insert(100, 3);<NEW_LINE>list.display();<NEW_LINE>System.out.println(list.deleteFirst());<NEW_LINE>list.display();<NEW_LINE>System.out.println(list.deleteLast());<NEW_LINE>list.display();<NEW_LINE>System.out.println<MASK><NEW_LINE>list.display();<NEW_LINE>list.insertRec(88, 2);<NEW_LINE>list.display();<NEW_LINE>// DLL list = new DLL();<NEW_LINE>// list.insertFirst(3);<NEW_LINE>// list.insertFirst(2);<NEW_LINE>// list.insertFirst(8);<NEW_LINE>// list.insertFirst(17);<NEW_LINE>// list.insertLast(99);<NEW_LINE>// list.insert(8, 65);<NEW_LINE>//<NEW_LINE>// list.display();<NEW_LINE>// CLL list = new CLL();<NEW_LINE>// list.insert(23);<NEW_LINE>// list.insert(3);<NEW_LINE>// list.insert(19);<NEW_LINE>// list.insert(75);<NEW_LINE>// list.display();<NEW_LINE>// list.delete(19);<NEW_LINE>// list.display();<NEW_LINE>}
(list.delete(2));
1,387,584
public static void inverseN(WaveletDescription<WlCoef_I32> desc, GrayS32 input, GrayS32 output, GrayS32 storage, int numLevels, int minValue, int maxValue) {<NEW_LINE>if (numLevels == 1) {<NEW_LINE>inverse1(desc, input, output, storage, minValue, maxValue);<NEW_LINE>PixelMath.boundImage(output, minValue, maxValue);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>UtilWavelet.checkShape(desc.getForward(), output, input, numLevels);<NEW_LINE>storage = InputSanityCheck.declareOrReshape(input, storage);<NEW_LINE>// modify the shape of a temporary image not the original<NEW_LINE>storage = storage.subimage(0, 0, input.width, input.height, null);<NEW_LINE>storage.subImage = false;<NEW_LINE>int width, height;<NEW_LINE>int scale = UtilWavelet.computeScale(numLevels);<NEW_LINE>width = input.width / scale;<NEW_LINE>height = input.height / scale;<NEW_LINE>width += width % 2;<NEW_LINE>height += height % 2;<NEW_LINE>GrayS32 levelIn = input.subimage(0, 0, width, height, null);<NEW_LINE>GrayS32 levelOut = output.subimage(0, 0, width, height, null);<NEW_LINE>storage.reshape(width, height);<NEW_LINE>inverse1(desc, levelIn, levelOut, storage, Integer.MIN_VALUE, Integer.MAX_VALUE);<NEW_LINE>for (int i = numLevels - 1; i >= 1; i--) {<NEW_LINE>// copy the decoded segment into the input<NEW_LINE>levelIn.setTo(levelOut);<NEW_LINE>if (i > 1) {<NEW_LINE>scale /= 2;<NEW_LINE>width = input.width / scale;<NEW_LINE>height = input.height / scale;<NEW_LINE>width += width % 2;<NEW_LINE>height += height % 2;<NEW_LINE>storage.reshape(width, height);<NEW_LINE>levelIn = input.subimage(0, <MASK><NEW_LINE>levelOut = output.subimage(0, 0, width, height, null);<NEW_LINE>} else {<NEW_LINE>levelIn = input;<NEW_LINE>levelOut = output;<NEW_LINE>}<NEW_LINE>storage.reshape(levelIn.width, levelIn.height);<NEW_LINE>inverse1(desc, levelIn, levelOut, storage, Integer.MIN_VALUE, Integer.MAX_VALUE);<NEW_LINE>}<NEW_LINE>if (minValue != Integer.MIN_VALUE && maxValue != Integer.MAX_VALUE)<NEW_LINE>PixelMath.boundImage(output, minValue, maxValue);<NEW_LINE>}
0, width, height, null);
1,074,909
private static GnssStatus createFrom(List<GnssSatelliteInfo> satelliteInfos) {<NEW_LINE>int svCount = satelliteInfos.size();<NEW_LINE>int[] svidWithFlags = new int[svCount];<NEW_LINE>float[] cn0DbHz = new float[svCount];<NEW_LINE>float[] elevations = new float[svCount];<NEW_LINE>float[] azimuths = new float[svCount];<NEW_LINE>float[] carrierFrequencies = new float[svCount];<NEW_LINE>for (int i = 0; i < svCount; i++) {<NEW_LINE>GnssSatelliteInfo info = satelliteInfos.get(i);<NEW_LINE>int packedSvid = (info.getSvid() << SVID_SHIFT_WIDTH) | (info.getConstellation() & CONSTELLATION_TYPE_MASK) << CONSTELLATION_TYPE_SHIFT_WIDTH;<NEW_LINE>if (info.getHasEphemeris()) {<NEW_LINE>packedSvid |= GNSS_SV_FLAGS_HAS_EPHEMERIS_DATA;<NEW_LINE>}<NEW_LINE>if (info.getHasAlmanac()) {<NEW_LINE>packedSvid |= GNSS_SV_FLAGS_HAS_ALMANAC_DATA;<NEW_LINE>}<NEW_LINE>if (info.isUsedInFix()) {<NEW_LINE>packedSvid |= GNSS_SV_FLAGS_USED_IN_FIX;<NEW_LINE>}<NEW_LINE>if (SUPPORTS_CARRIER_FREQUENCY && info.getCarrierFrequencyHz() != null) {<NEW_LINE>packedSvid |= GNSS_SV_FLAGS_HAS_CARRIER_FREQUENCY;<NEW_LINE>carrierFrequencies[i] = info.getCarrierFrequencyHz();<NEW_LINE>}<NEW_LINE>svidWithFlags[i] = packedSvid;<NEW_LINE>cn0DbHz[i] = info.getCn0DbHz();<NEW_LINE>elevations[i] = info.getElevation();<NEW_LINE>azimuths[i] = info.getAzimuth();<NEW_LINE>}<NEW_LINE>List<ClassParameter<?>> classParameters = new ArrayList<>();<NEW_LINE>classParameters.add(ClassParameter.from(int.class, svCount));<NEW_LINE>classParameters.add(ClassParameter.from(int[].class, svidWithFlags));<NEW_LINE>classParameters.add(ClassParameter.from(float[].class, cn0DbHz));<NEW_LINE>classParameters.add(ClassParameter.from(float[].class, elevations));<NEW_LINE>classParameters.add(ClassParameter.from(float[].class, azimuths));<NEW_LINE>if (SUPPORTS_CARRIER_FREQUENCY) {<NEW_LINE>classParameters.add(ClassParameter.from(float[].class, carrierFrequencies));<NEW_LINE>}<NEW_LINE>return ReflectionHelpers.callConstructor(GnssStatus.class, classParameters.toArray(new ClassParameter<MASK><NEW_LINE>}
<?>[0]));
866,366
public static <T1 extends Throwable, T2 extends Throwable> T1 assertThrows(Class<T1> expectedClass, @Nullable Class<T2> optionalWrapperClass, Executable executable) {<NEW_LINE>if (optionalWrapperClass == null) {<NEW_LINE>return Assertions.assertThrows(expectedClass, executable);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>executable.execute();<NEW_LINE>} catch (Throwable cause) {<NEW_LINE>if (expectedClass.isInstance(cause)) {<NEW_LINE>return (T1) cause;<NEW_LINE>} else if (optionalWrapperClass.isInstance(cause) && expectedClass.isInstance(cause.getCause())) {<NEW_LINE>return (T1) cause.getCause();<NEW_LINE>} else {<NEW_LINE>throw new AssertionError("expected " + className(expectedClass) + " optionally wrapped by " + className(optionalWrapperClass) + " but got " + className(cause) + " caused by " + classNameNullable<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new AssertionError("expected " + className(expectedClass) + " optionally wrapped by " + className(optionalWrapperClass) + " but nothing was thrown");<NEW_LINE>}
(cause.getCause()));
240,921
private void preprocessAssertNoSubstitutedShapeReferenceInOperation(Operation operation) {<NEW_LINE>// Check input<NEW_LINE>if (operation.getInput() != null && operation.getInput().getShape() != null) {<NEW_LINE>String inputShape = operation<MASK><NEW_LINE>if (shapeSubstitutions.containsKey(inputShape)) {<NEW_LINE>throw new IllegalStateException("shapeSubstitution customization found for shape " + inputShape + ", but this shape is referenced as the input for operation " + operation.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Check output<NEW_LINE>if (operation.getOutput() != null && operation.getOutput().getShape() != null) {<NEW_LINE>String outputShape = operation.getOutput().getShape();<NEW_LINE>if (shapeSubstitutions.containsKey(outputShape)) {<NEW_LINE>throw new IllegalStateException("shapeSubstitution customization found for shape " + outputShape + ", but this shape is referenced as the output for operation " + operation.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Check errors<NEW_LINE>if (operation.getErrors() != null) {<NEW_LINE>for (ErrorMap error : operation.getErrors()) {<NEW_LINE>String errorShape = error.getShape();<NEW_LINE>if (shapeSubstitutions.containsKey(errorShape)) {<NEW_LINE>throw new IllegalStateException("shapeSubstitution customization found for shape " + errorShape + ", but this shape is referenced as an error for operation " + operation.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getInput().getShape();
763,911
public static boolean isUnicodeIdentifierPart(int ch) {<NEW_LINE>// if props == 0, it will just fall through and return false<NEW_LINE>// cat == format<NEW_LINE>return ((1 << getType(ch)) & ((1 << UCharacterCategory.UPPERCASE_LETTER) | (1 << UCharacterCategory.LOWERCASE_LETTER) | (1 << UCharacterCategory.TITLECASE_LETTER) | (1 << UCharacterCategory.MODIFIER_LETTER) | (1 << UCharacterCategory.OTHER_LETTER) | (1 << UCharacterCategory.LETTER_NUMBER) | (1 << UCharacterCategory.CONNECTOR_PUNCTUATION) | (1 << UCharacterCategory.DECIMAL_DIGIT_NUMBER) | (1 << UCharacterCategory.COMBINING_SPACING_MARK) | (1 << UCharacterCategory.NON_SPACING_MARK))<MASK><NEW_LINE>}
) != 0 || isIdentifierIgnorable(ch);
1,792,340
public int compareTo(removeTableProperty_result other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.<MASK><NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetSec()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, other.sec);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTope(), other.isSetTope());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetTope()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tope, other.tope);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTnase(), other.isSetTnase());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetTnase()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tnase, other.tnase);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
getClass().getName());
51,670
public final Collection<Entry<K, V>> removeAllWithHash(int keyHash) {<NEW_LINE>List<Entry<K, V>> invalidated = new ArrayList<>();<NEW_LINE>int hash = spread(keyHash);<NEW_LINE>for (Node<K, V>[] tab = table; ; ) {<NEW_LINE>Node<K, V> f;<NEW_LINE>int n, i;<NEW_LINE>if (tab == null || (n = tab.length) == 0 || (f = tabAt(tab, i = (n - 1) & hash)) == null)<NEW_LINE>break;<NEW_LINE>else if (f.hash == MOVED)<NEW_LINE><MASK><NEW_LINE>else {<NEW_LINE>int nodesCount = 0;<NEW_LINE>synchronized (f) {<NEW_LINE>if (tabAt(tab, i) == f) {<NEW_LINE>nodesCount = nodesAt(f, invalidated);<NEW_LINE>setTabAt(tab, i, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (nodesCount > 0) {<NEW_LINE>addCount(-nodesCount, -nodesCount);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return invalidated;<NEW_LINE>}
tab = helpTransfer(tab, f);
1,302,659
public void run(TLObject response, TLRPC.TL_error error) {<NEW_LINE>AndroidUtilities.runOnUIThread(() -> {<NEW_LINE>if (response instanceof TLRPC.TL_messages_historyImport) {<NEW_LINE>importId = ((TLRPC.TL_messages_historyImport) response).id;<NEW_LINE>uploadSet.remove(historyPath);<NEW_LINE>getNotificationCenter().postNotificationName(NotificationCenter.historyImportProgressChanged, dialogId);<NEW_LINE>if (uploadSet.isEmpty()) {<NEW_LINE>startImport();<NEW_LINE>}<NEW_LINE>lastUploadTime = SystemClock.elapsedRealtime();<NEW_LINE>for (int a = 0, N = uploadMedia.size(); a < N; a++) {<NEW_LINE>getFileLoader().uploadFile(uploadMedia.get(a), false, true, ConnectionsManager.FileTypeFile);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>importingHistoryMap.remove(dialogId);<NEW_LINE>getNotificationCenter().postNotificationName(NotificationCenter.<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
historyImportProgressChanged, dialogId, req, error);
441,147
protected Triple<int[], int[], int[]> truncateSequences(int[] ids, int[] pairIds, int numTokensToRemove, TruncationStrategy truncationStrategy, int stride) {<NEW_LINE>if (numTokensToRemove <= 0) {<NEW_LINE>return Triple.of(ids, <MASK><NEW_LINE>}<NEW_LINE>int[] overflowingTokens = new int[0];<NEW_LINE>if (truncationStrategy.equals(TruncationStrategy.LONGEST_FIRST)) {<NEW_LINE>// TODO: optimize array copy<NEW_LINE>for (int i = 0; i < numTokensToRemove; i += 1) {<NEW_LINE>if (null == pairIds || ids.length > pairIds.length) {<NEW_LINE>int windowLen = overflowingTokens.length == 0 ? Math.min(ids.length, stride + 1) : 1;<NEW_LINE>overflowingTokens = ArrayUtils.addAll(overflowingTokens, Arrays.copyOfRange(ids, ids.length - windowLen, ids.length));<NEW_LINE>ids = ArrayUtils.remove(ids, ids.length - 1);<NEW_LINE>} else {<NEW_LINE>int windowLen = overflowingTokens.length == 0 ? Math.min(pairIds.length, stride + 1) : 1;<NEW_LINE>overflowingTokens = ArrayUtils.addAll(overflowingTokens, Arrays.copyOfRange(pairIds, pairIds.length - windowLen, pairIds.length));<NEW_LINE>pairIds = ArrayUtils.remove(pairIds, pairIds.length - 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (truncationStrategy.equals(TruncationStrategy.ONLY_FIRST)) {<NEW_LINE>if (ids.length > numTokensToRemove) {<NEW_LINE>int windowLen = Math.min(ids.length, stride + numTokensToRemove);<NEW_LINE>overflowingTokens = Arrays.copyOfRange(ids, ids.length - windowLen, ids.length);<NEW_LINE>ids = Arrays.copyOfRange(ids, 0, ids.length - numTokensToRemove);<NEW_LINE>} else {<NEW_LINE>System.err.println(String.format("Cannot remove %d tokens from first sequence %s", numTokensToRemove, Arrays.toString(ids)));<NEW_LINE>}<NEW_LINE>} else if (truncationStrategy.equals(TruncationStrategy.ONLY_SECOND) && null != pairIds) {<NEW_LINE>if (pairIds.length > numTokensToRemove) {<NEW_LINE>int windowLen = Math.min(pairIds.length, stride + numTokensToRemove);<NEW_LINE>overflowingTokens = Arrays.copyOfRange(pairIds, pairIds.length - windowLen, pairIds.length);<NEW_LINE>pairIds = Arrays.copyOfRange(pairIds, 0, pairIds.length - numTokensToRemove);<NEW_LINE>} else {<NEW_LINE>System.err.println(String.format("Cannot remove %d tokens from second sequence %s", numTokensToRemove, Arrays.toString(pairIds)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Triple.of(ids, pairIds, overflowingTokens);<NEW_LINE>}
pairIds, new int[0]);
569,336
private void executeOnAuthorizationRequest(OIDCResponseType parsedResponseType, AuthorizationEndpointRequest request, String redirectUri) throws ClientPolicyException {<NEW_LINE>ClientModel client = session.getContext().getClient();<NEW_LINE>String codeChallenge = request.getCodeChallenge();<NEW_LINE>String codeChallengeMethod = request.getCodeChallengeMethod();<NEW_LINE>String pkceCodeChallengeMethod = OIDCAdvancedConfigWrapper.fromClientModel(client).getPkceCodeChallengeMethod();<NEW_LINE>// check whether code challenge method is specified<NEW_LINE>if (codeChallengeMethod == null) {<NEW_LINE>throw new ClientPolicyException(OAuthErrorException.INVALID_REQUEST, "Missing parameter: code_challenge_method");<NEW_LINE>}<NEW_LINE>// check whether acceptable code challenge method is specified<NEW_LINE>if (!isAcceptableCodeChallengeMethod(codeChallengeMethod)) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>// check whether specified code challenge method is configured one in advance<NEW_LINE>if (pkceCodeChallengeMethod != null && !codeChallengeMethod.equals(pkceCodeChallengeMethod)) {<NEW_LINE>throw new ClientPolicyException(OAuthErrorException.INVALID_REQUEST, "Invalid parameter: code challenge method is not configured one");<NEW_LINE>}<NEW_LINE>// check whether code challenge is specified<NEW_LINE>if (codeChallenge == null) {<NEW_LINE>throw new ClientPolicyException(OAuthErrorException.INVALID_REQUEST, "Missing parameter: code_challenge");<NEW_LINE>}<NEW_LINE>// check whether code challenge is formatted along with the PKCE specification<NEW_LINE>if (!isValidPkceCodeChallenge(codeChallenge)) {<NEW_LINE>throw new ClientPolicyException(OAuthErrorException.INVALID_REQUEST, "Invalid parameter: code_challenge");<NEW_LINE>}<NEW_LINE>}
ClientPolicyException(OAuthErrorException.INVALID_REQUEST, "Invalid parameter: invalid code_challenge_method");
755,434
private long createPhoto(PrintWriter respWriter) throws RemoteInvocationException {<NEW_LINE>// make create photo request and send with the rest client synchronously<NEW_LINE>// response of create request does not have body, therefore use EmptyRecord as template<NEW_LINE>// create an instance of photo pragmatically<NEW_LINE>// this resembles to photo-create.json<NEW_LINE>final LatLong newLatLong = new LatLong().setLatitude(37.42394f).setLongitude(-122.0708f);<NEW_LINE>final EXIF newExif = new EXIF().setLocation(newLatLong);<NEW_LINE>final Photo newPhoto = new Photo().setTitle("New Photo").setFormat(PhotoFormats<MASK><NEW_LINE>final Request<IdResponse<Long>> createReq1 = _photoBuilders.create().input(newPhoto).build();<NEW_LINE>final ResponseFuture<IdResponse<Long>> createFuture1 = _restClient.sendRequest(createReq1);<NEW_LINE>// Future.getResource() blocks until server responds<NEW_LINE>final Response<IdResponse<Long>> createResp1 = createFuture1.getResponse();<NEW_LINE>createResp1.getEntity();<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final IdResponse<Long> entity = createResp1.getEntity();<NEW_LINE>final long newPhotoId = entity.getId();<NEW_LINE>respWriter.println("New photo ID: " + newPhotoId);<NEW_LINE>return newPhotoId;<NEW_LINE>}
.PNG).setExif(newExif);
1,254,347
public static boolean canMergeAnnounceURLs(TOTorrent new_torrent, TOTorrent dest_torrent) {<NEW_LINE>try {<NEW_LINE>List<List<String>> new_groups = announceGroupsToList(new_torrent);<NEW_LINE>List<List<String<MASK><NEW_LINE>Set<String> all_dest = new HashSet<>();<NEW_LINE>for (List<String> l : dest_groups) {<NEW_LINE>all_dest.addAll(l);<NEW_LINE>}<NEW_LINE>for (List<String> l : new_groups) {<NEW_LINE>for (String u : l) {<NEW_LINE>List<URL> mods = applyAllDNSMods(new URL(u));<NEW_LINE>if (mods != null) {<NEW_LINE>for (URL m : mods) {<NEW_LINE>if (!all_dest.contains(UrlUtils.getCanonicalString(m))) {<NEW_LINE>return (true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>Debug.out(e);<NEW_LINE>}<NEW_LINE>return (false);<NEW_LINE>}
>> dest_groups = announceGroupsToList(dest_torrent);
139,598
protected Function createFunction(Program prog, Address addr, boolean doDisassembly, TaskMonitor monitor) throws DemangledException {<NEW_LINE>Listing listing = prog.getListing();<NEW_LINE>Function func = listing.getFunctionAt(addr);<NEW_LINE>if (func != null) {<NEW_LINE>return func;<NEW_LINE>}<NEW_LINE>if (addr.isExternalAddress()) {<NEW_LINE>Symbol extSymbol = prog.getSymbolTable().getPrimarySymbol(addr);<NEW_LINE>CreateExternalFunctionCmd cmd = new CreateExternalFunctionCmd(extSymbol);<NEW_LINE>if (!cmd.applyTo(prog)) {<NEW_LINE>throw new DemangledException(<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (doDisassembly) {<NEW_LINE>// make sure it is executable!<NEW_LINE>AddressSetView execSet = prog.getMemory().getExecuteSet();<NEW_LINE>if (execSet.contains(addr)) {<NEW_LINE>DisassembleCommand cmd = new DisassembleCommand(addr, null, true);<NEW_LINE>cmd.applyTo(prog, monitor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>CreateFunctionCmd cmd = new CreateFunctionCmd(addr);<NEW_LINE>if (!cmd.applyTo(prog, monitor)) {<NEW_LINE>throw new DemangledException("Unable to create function: " + cmd.getStatusMsg());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return listing.getFunctionAt(addr);<NEW_LINE>}
"Unable to create function: " + cmd.getStatusMsg());
1,308,596
public ListRouteCalculatorsResult listRouteCalculators(ListRouteCalculatorsRequest listRouteCalculatorsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRouteCalculatorsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListRouteCalculatorsRequest> request = null;<NEW_LINE>Response<ListRouteCalculatorsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListRouteCalculatorsRequestMarshaller().marshall(listRouteCalculatorsRequest);<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<ListRouteCalculatorsResult, JsonUnmarshallerContext> unmarshaller = new ListRouteCalculatorsResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<ListRouteCalculatorsResult> responseHandler = new JsonResponseHandler<ListRouteCalculatorsResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
1,153,276
private static void upgradeTable(final Connection connection, final int currentVersion) throws SQLException {<NEW_LINE>LOGGER.info(LOG_UPGRADING_TABLE, DATABASE_NAME, TABLE_NAME, currentVersion, TABLE_VERSION);<NEW_LINE>for (int version = currentVersion; version < TABLE_VERSION; version++) {<NEW_LINE>LOGGER.trace(LOG_UPGRADING_TABLE, DATABASE_NAME, <MASK><NEW_LINE>switch(version) {<NEW_LINE>// case 1: Alter table to version 2<NEW_LINE>default:<NEW_LINE>getMessage(LOG_UPGRADING_TABLE_MISSING, DATABASE_NAME, TABLE_NAME, TABLE_VERSION);<NEW_LINE>throw new IllegalStateException(getMessage(LOG_UPGRADING_TABLE_MISSING, DATABASE_NAME, TABLE_NAME, version, TABLE_VERSION));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MediaTableTablesVersions.setTableVersion(connection, TABLE_NAME, TABLE_VERSION);<NEW_LINE>}
TABLE_NAME, version, version + 1);
1,663,129
public long sweepNextBatch(ShardAndStrategy shardStrategy, long sweepTs) {<NEW_LINE>metrics.updateSweepTimestamp(shardStrategy, sweepTs);<NEW_LINE>long lastSweptTs = progress.getLastSweptTimestamp(shardStrategy);<NEW_LINE>if (lastSweptTs + 1 >= sweepTs) {<NEW_LINE>return 0L;<NEW_LINE>}<NEW_LINE>log.debug("Beginning iteration of targeted sweep for {}, and sweep timestamp {}. Last previously swept " + "timestamp for this shard and strategy was {}.", SafeArg.of("shardStrategy", shardStrategy.toText()), SafeArg.of("sweepTs", sweepTs), SafeArg.of("lastSweptTs", lastSweptTs));<NEW_LINE>SweepBatchWithPartitionInfo batchWithInfo = reader.getNextBatchToSweep(shardStrategy, lastSweptTs, sweepTs);<NEW_LINE>SweepBatch sweepBatch = batchWithInfo.sweepBatch();<NEW_LINE>metrics.registerEntriesReadInBatch(<MASK><NEW_LINE>deleter.sweep(sweepBatch.writes(), Sweeper.of(shardStrategy));<NEW_LINE>if (!sweepBatch.isEmpty()) {<NEW_LINE>log.debug("Put {} ranged tombstones and swept up to timestamp {} for {}.", SafeArg.of("tombstones", sweepBatch.writes().size()), SafeArg.of("lastSweptTs", sweepBatch.lastSweptTimestamp()), SafeArg.of("shardStrategy", shardStrategy.toText()));<NEW_LINE>}<NEW_LINE>cleaner.clean(shardStrategy, batchWithInfo.partitionsForPreviousLastSweptTs(lastSweptTs), sweepBatch.lastSweptTimestamp(), sweepBatch.dedicatedRows());<NEW_LINE>metrics.updateNumberOfTombstones(shardStrategy, sweepBatch.writes().size());<NEW_LINE>metrics.updateProgressForShard(shardStrategy, sweepBatch.lastSweptTimestamp());<NEW_LINE>if (sweepBatch.isEmpty()) {<NEW_LINE>metrics.registerOccurrenceOf(shardStrategy, SweepOutcome.NOTHING_TO_SWEEP);<NEW_LINE>} else {<NEW_LINE>metrics.registerOccurrenceOf(shardStrategy, SweepOutcome.SUCCESS);<NEW_LINE>}<NEW_LINE>return sweepBatch.entriesRead();<NEW_LINE>}
shardStrategy, sweepBatch.entriesRead());
343,663
public io.kubernetes.client.proto.V1beta1Extensions.DaemonSetUpdateStrategy buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1beta1Extensions.DaemonSetUpdateStrategy result = new io.kubernetes.client.proto.V1beta1Extensions.DaemonSetUpdateStrategy(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>result.type_ = type_;<NEW_LINE>if (((from_bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>to_bitField0_ |= 0x00000002;<NEW_LINE>}<NEW_LINE>if (rollingUpdateBuilder_ == null) {<NEW_LINE>result.rollingUpdate_ = rollingUpdate_;<NEW_LINE>} else {<NEW_LINE>result<MASK><NEW_LINE>}<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
.rollingUpdate_ = rollingUpdateBuilder_.build();
585,058
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {<NEW_LINE>// Resolve out-of-range months. This is necessary in order to<NEW_LINE>// obtain the correct year. We correct to<NEW_LINE>// a 12- or 13-month year (add/subtract 12 or 13, depending<NEW_LINE>// on the year) but since we _always_ number from 0..12, and<NEW_LINE>// the leap year determines whether or not month 5 (Adar 1)<NEW_LINE>// is present, we allow 0..12 in any given year.<NEW_LINE>while (month < 0) {<NEW_LINE>month += monthsInYear(--eyear);<NEW_LINE>}<NEW_LINE>// Careful: allow 0..12 in all years<NEW_LINE>while (month > 12) {<NEW_LINE>month -= monthsInYear(eyear++);<NEW_LINE>}<NEW_LINE>long day = startOfYear(eyear);<NEW_LINE>if (month != 0) {<NEW_LINE>if (isLeapYear(eyear)) {<NEW_LINE>day += LEAP_MONTH_START[month][yearType(eyear)];<NEW_LINE>} else {<NEW_LINE>day += MONTH_START[<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return (int) (day + 347997);<NEW_LINE>}
month][yearType(eyear)];
499,691
final ListAssetsResult executeListAssets(ListAssetsRequest listAssetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAssetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListAssetsRequest> request = null;<NEW_LINE>Response<ListAssetsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListAssetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAssetsRequest));<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, "IoTSiteWise");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAssets");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI endpointTraitHost = null;<NEW_LINE>if (!clientConfiguration.isDisableHostPrefixInjection()) {<NEW_LINE>String hostPrefix = "api.";<NEW_LINE>String resolvedHostPrefix = String.format("api.");<NEW_LINE>endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListAssetsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new ListAssetsResultJsonUnmarshaller());
1,286,862
public void writeFields(Object object) {<NEW_LINE>Class type = object.getClass();<NEW_LINE>Object[] defaultValues = getDefaultValues(type);<NEW_LINE>OrderedMap<String, FieldMetadata> fields = getFields(type);<NEW_LINE>int defaultIndex = 0;<NEW_LINE>Array<String> fieldNames = fields.orderedKeys();<NEW_LINE>for (int i = 0, n = fieldNames.size; i < n; i++) {<NEW_LINE>FieldMetadata metadata = fields.get(fieldNames.get(i));<NEW_LINE>if (ignoreDeprecated && metadata.deprecated)<NEW_LINE>continue;<NEW_LINE>Field field = metadata.field;<NEW_LINE>try {<NEW_LINE>Object value = field.get(object);<NEW_LINE>if (defaultValues != null) {<NEW_LINE>Object defaultValue = defaultValues[defaultIndex++];<NEW_LINE>if (value == null && defaultValue == null)<NEW_LINE>continue;<NEW_LINE>if (value != null && defaultValue != null) {<NEW_LINE>if (value.equals(defaultValue))<NEW_LINE>continue;<NEW_LINE>if (value.getClass().isArray() && defaultValue.getClass().isArray()) {<NEW_LINE>equals1[0] = value;<NEW_LINE>equals2[0] = defaultValue;<NEW_LINE>if (Arrays.deepEquals(equals1, equals2))<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (debug)<NEW_LINE>System.out.println("Writing field: " + field.getName() + " (" + <MASK><NEW_LINE>writer.name(field.getName());<NEW_LINE>writeValue(value, field.getType(), metadata.elementType);<NEW_LINE>} catch (ReflectionException ex) {<NEW_LINE>throw new SerializationException("Error accessing field: " + field.getName() + " (" + type.getName() + ")", ex);<NEW_LINE>} catch (SerializationException ex) {<NEW_LINE>ex.addTrace(field + " (" + type.getName() + ")");<NEW_LINE>throw ex;<NEW_LINE>} catch (Exception runtimeEx) {<NEW_LINE>SerializationException ex = new SerializationException(runtimeEx);<NEW_LINE>ex.addTrace(field + " (" + type.getName() + ")");<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
type.getName() + ")");
1,548,694
public static RoaringBitmap and(final RoaringBitmap x1, final RoaringBitmap x2) {<NEW_LINE>final RoaringBitmap answer = new RoaringBitmap();<NEW_LINE>final int length1 = x1.highLowContainer.size(), length2 <MASK><NEW_LINE>int pos1 = 0, pos2 = 0;<NEW_LINE>while (pos1 < length1 && pos2 < length2) {<NEW_LINE>final char s1 = x1.highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>final char s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>if (s1 == s2) {<NEW_LINE>final Container c1 = x1.highLowContainer.getContainerAtIndex(pos1);<NEW_LINE>final Container c2 = x2.highLowContainer.getContainerAtIndex(pos2);<NEW_LINE>final Container c = c1.and(c2);<NEW_LINE>if (!c.isEmpty()) {<NEW_LINE>answer.highLowContainer.append(s1, c);<NEW_LINE>}<NEW_LINE>++pos1;<NEW_LINE>++pos2;<NEW_LINE>} else if (s1 < s2) {<NEW_LINE>pos1 = x1.highLowContainer.advanceUntil(s2, pos1);<NEW_LINE>} else {<NEW_LINE>pos2 = x2.highLowContainer.advanceUntil(s1, pos2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return answer;<NEW_LINE>}
= x2.highLowContainer.size();
1,785,329
private synchronized // currently allow direct global state updates from external sources (if you need to, send an event on the bus instead)<NEW_LINE>PipelineInterpreter.State reloadAndSave() {<NEW_LINE>// read all rules and parse them<NEW_LINE>Map<String, Rule> ruleNameMap = Maps.newHashMap();<NEW_LINE>ruleService.loadAll().forEach(ruleDao -> {<NEW_LINE>Rule rule;<NEW_LINE>try {<NEW_LINE>rule = pipelineRuleParser.parseRule(ruleDao.id(), ruleDao.source(), false);<NEW_LINE>} catch (ParseException e) {<NEW_LINE>log.warn("Ignoring non parseable rule <{}/{}> with errors <{}>", ruleDao.title(), ruleDao.id(), e.getErrors());<NEW_LINE>rule = Rule.alwaysFalse("Failed to parse rule: " + ruleDao.id());<NEW_LINE>}<NEW_LINE>ruleNameMap.put(rule.name(), rule);<NEW_LINE>});<NEW_LINE>// read all pipelines and parse them<NEW_LINE>ImmutableMap.Builder<String, Pipeline> pipelineIdMap = ImmutableMap.builder();<NEW_LINE>pipelineService.loadAll().forEach(pipelineDao -> {<NEW_LINE>Pipeline pipeline;<NEW_LINE>try {<NEW_LINE>pipeline = pipelineRuleParser.parsePipeline(pipelineDao.id(), pipelineDao.source());<NEW_LINE>} catch (ParseException e) {<NEW_LINE>pipeline = Pipeline.empty(<MASK><NEW_LINE>}<NEW_LINE>// noinspection ConstantConditions<NEW_LINE>pipelineIdMap.put(pipelineDao.id(), resolvePipeline(pipeline, ruleNameMap));<NEW_LINE>});<NEW_LINE>final ImmutableMap<String, Pipeline> currentPipelines = pipelineIdMap.build();<NEW_LINE>// read all stream connections of those pipelines to allow processing messages through them<NEW_LINE>final HashMultimap<String, Pipeline> connections = HashMultimap.create();<NEW_LINE>for (PipelineConnections streamConnection : pipelineStreamConnectionsService.loadAll()) {<NEW_LINE>streamConnection.pipelineIds().stream().map(currentPipelines::get).filter(Objects::nonNull).forEach(pipeline -> connections.put(streamConnection.streamId(), pipeline));<NEW_LINE>}<NEW_LINE>ImmutableSetMultimap<String, Pipeline> streamPipelineConnections = ImmutableSetMultimap.copyOf(connections);<NEW_LINE>final RuleMetricsConfigDto ruleMetricsConfig = ruleMetricsConfigService.get();<NEW_LINE>final PipelineInterpreter.State newState = stateFactory.newState(currentPipelines, streamPipelineConnections, ruleMetricsConfig);<NEW_LINE>latestState.set(newState);<NEW_LINE>return newState;<NEW_LINE>}
"Failed to parse pipeline" + pipelineDao.id());
1,476,032
public GlmModelData deserializeModel(Params meta, Iterable<String> data) {<NEW_LINE>GlmModelData modelData = new GlmModelData();<NEW_LINE>modelData.featureColNames = meta.get(GlmTrainParams.FEATURE_COLS);<NEW_LINE>modelData.offsetColName = meta.get(GlmTrainParams.OFFSET_COL);<NEW_LINE>modelData.weightColName = meta.get(GlmTrainParams.WEIGHT_COL);<NEW_LINE>modelData.labelColName = meta.get(GlmTrainParams.LABEL_COL);<NEW_LINE>modelData.familyName = meta.get(GlmTrainParams.FAMILY);<NEW_LINE>modelData.variancePower = meta.get(GlmTrainParams.VARIANCE_POWER);<NEW_LINE>modelData.linkName = meta.get(GlmTrainParams.LINK);<NEW_LINE>modelData.linkPower = meta.get(GlmTrainParams.LINK_POWER);<NEW_LINE>modelData.fitIntercept = meta.get(GlmTrainParams.FIT_INTERCEPT);<NEW_LINE>modelData.regParam = meta.get(GlmTrainParams.REG_PARAM);<NEW_LINE>modelData.numIter = <MASK><NEW_LINE>modelData.epsilon = meta.get(GlmTrainParams.EPSILON);<NEW_LINE>Iterator<String> dataIterator = data.iterator();<NEW_LINE>modelData.coefficients = JsonConverter.fromJson(dataIterator.next(), double[].class);<NEW_LINE>modelData.intercept = JsonConverter.fromJson(dataIterator.next(), double.class);<NEW_LINE>modelData.diagInvAtWA = JsonConverter.fromJson(dataIterator.next(), double[].class);<NEW_LINE>if (dataIterator.hasNext()) {<NEW_LINE>modelData.modelSummary = JsonConverter.fromJson(dataIterator.next(), GlmModelSummary.class);<NEW_LINE>}<NEW_LINE>return modelData;<NEW_LINE>}
meta.get(GlmTrainParams.MAX_ITER);
1,726,131
static void lzwCompress(OutputStream output, int codesize, byte[] toCompress) throws IOException {<NEW_LINE>byte c;<NEW_LINE>short index;<NEW_LINE>int clearcode;<NEW_LINE>int endofinfo;<NEW_LINE>int numbits;<NEW_LINE>short prefix = (short) 0xFFFF;<NEW_LINE>clearcode = 1 << codesize;<NEW_LINE>endofinfo = clearcode + 1;<NEW_LINE>numbits = codesize + 1;<NEW_LINE>int limit = (1 << numbits) - 1;<NEW_LINE>var strings = new LZWStringTable();<NEW_LINE>strings.clearTable(codesize);<NEW_LINE>final var bitFile = new BitFile(output);<NEW_LINE>bitFile.writeBits(clearcode, numbits);<NEW_LINE>for (byte compress : toCompress) {<NEW_LINE>c = compress;<NEW_LINE>if ((index = strings.findCharString(prefix, c)) != -1)<NEW_LINE>prefix = index;<NEW_LINE>else {<NEW_LINE>bitFile.writeBits(prefix, numbits);<NEW_LINE>if (strings.addCharString(prefix, c) > limit) {<NEW_LINE>if (++numbits > 12) {<NEW_LINE>bitFile.writeBits(clearcode, numbits - 1);<NEW_LINE>strings.clearTable(codesize);<NEW_LINE>numbits = codesize + 1;<NEW_LINE>}<NEW_LINE>limit = (1 << numbits) - 1;<NEW_LINE>}<NEW_LINE>prefix = (short) ((short) c & 0xFF);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (prefix != -1)<NEW_LINE><MASK><NEW_LINE>bitFile.writeBits(endofinfo, numbits);<NEW_LINE>bitFile.flush();<NEW_LINE>}
bitFile.writeBits(prefix, numbits);
191,078
public UpdateBasePathMappingResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateBasePathMappingResult updateBasePathMappingResult = new UpdateBasePathMappingResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return updateBasePathMappingResult;<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("basePath", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateBasePathMappingResult.setBasePath(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("restApiId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateBasePathMappingResult.setRestApiId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("stage", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateBasePathMappingResult.setStage(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return updateBasePathMappingResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,359,719
final GetMemberResult executeGetMember(GetMemberRequest getMemberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getMemberRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetMemberRequest> request = null;<NEW_LINE>Response<GetMemberResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new GetMemberRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getMemberRequest));<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, "Macie2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetMember");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetMemberResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetMemberResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,212,676
protected void initializeContainerNetworking(ByteOrder byteOrder) throws IOException, DatabusException {<NEW_LINE>// instruct netty not to rename our threads in the I/O and boss thread pools<NEW_LINE>ThreadRenamingRunnable.setThreadNameDeterminer(ThreadNameDeterminer.CURRENT);<NEW_LINE>_httpBootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(_bossExecutorService, _ioExecutorService));<NEW_LINE>_httpBootstrap.setPipelineFactory(new HttpServerPipelineFactory(this));<NEW_LINE>_httpBootstrap.setOption("bufferFactory", DirectChannelBufferFactory.getInstance(byteOrder));<NEW_LINE>_httpBootstrap.setOption("child.bufferFactory"<MASK><NEW_LINE>if (_containerStaticConfig.getTcp().isEnabled()) {<NEW_LINE>_tcpBootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(_bossExecutorService, _ioExecutorService));<NEW_LINE>_tcpBootstrap.setPipelineFactory(new TcpServerPipelineFactory(this, byteOrder));<NEW_LINE>_tcpBootstrap.setOption("bufferFactory", DirectChannelBufferFactory.getInstance(byteOrder));<NEW_LINE>_tcpBootstrap.setOption("child.bufferFactory", DirectChannelBufferFactory.getInstance(byteOrder));<NEW_LINE>// LOG.debug("endianness:" + ((ChannelBufferFactory)_tcpBootstrap.getOption("bufferFactory")).getDefaultOrder());<NEW_LINE>}<NEW_LINE>}
, DirectChannelBufferFactory.getInstance(byteOrder));
1,563,745
// DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static com.sun.jdi.event.EventQueue eventQueue(com.sun.jdi.VirtualMachine a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart("com.sun.jdi.VirtualMachine", "eventQueue", "JDI CALL: com.sun.jdi.VirtualMachine({0}).eventQueue()", new Object[] { a });<NEW_LINE>}<NEW_LINE>Object retValue = null;<NEW_LINE>try {<NEW_LINE>com.sun.jdi.event.EventQueue ret;<NEW_LINE>ret = a.eventQueue();<NEW_LINE>retValue = ret;<NEW_LINE>return ret;<NEW_LINE>} catch (com.sun.jdi.InternalException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.report(ex);<NEW_LINE>throw new org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper(ex);<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>if (a instanceof com.sun.jdi.Mirror) {<NEW_LINE>com.sun.jdi.VirtualMachine vm = ((com.sun.jdi.Mirror) a).virtualMachine();<NEW_LINE>try {<NEW_LINE>vm.dispose();<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException vmdex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new org.netbeans.modules.debugger.<MASK><NEW_LINE>} catch (Error err) {<NEW_LINE>retValue = err;<NEW_LINE>throw err;<NEW_LINE>} catch (RuntimeException rex) {<NEW_LINE>retValue = rex;<NEW_LINE>throw rex;<NEW_LINE>} finally {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallEnd("com.sun.jdi.VirtualMachine", "eventQueue", retValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
jpda.jdi.VMDisconnectedExceptionWrapper(ex);
1,852,357
protected Result generateContent(int id, ByteBuffer content, boolean recycle, boolean lastContent, Callback callback, FCGI.FrameType frameType) {<NEW_LINE>id &= 0xFF_FF;<NEW_LINE>int contentLength = content == null ? 0 : content.remaining();<NEW_LINE>Result result = new Result(byteBufferPool, callback);<NEW_LINE>while (contentLength > 0 || lastContent) {<NEW_LINE>ByteBuffer buffer = acquire(8);<NEW_LINE>BufferUtil.clearToFill(buffer);<NEW_LINE>result = result.append(buffer, true);<NEW_LINE>// Generate the frame header<NEW_LINE>buffer.put((byte) 0x01);<NEW_LINE>buffer.put((byte) frameType.code);<NEW_LINE>buffer.putShort((short) id);<NEW_LINE>int length = Math.min(MAX_CONTENT_LENGTH, contentLength);<NEW_LINE>buffer.putShort((short) length);<NEW_LINE>buffer.putShort((short) 0);<NEW_LINE>BufferUtil.flipToFlush(buffer, 0);<NEW_LINE>if (contentLength == 0)<NEW_LINE>break;<NEW_LINE>// Slice the content to avoid copying<NEW_LINE>int limit = content.limit();<NEW_LINE>content.limit(content.position() + length);<NEW_LINE>ByteBuffer slice = content.slice();<NEW_LINE>// Don't recycle the slice<NEW_LINE>result = result.append(slice, false);<NEW_LINE>content.position(content.limit());<NEW_LINE>content.limit(limit);<NEW_LINE>contentLength -= length;<NEW_LINE>// Recycle the content buffer if needed<NEW_LINE>if (recycle && contentLength == 0)<NEW_LINE>result = <MASK><NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
result.append(content, true);
574,270
public ImmutableList<Artifact> processDeps(RuleContext ruleContext, boolean isBinary) {<NEW_LINE>if (isBinary) {<NEW_LINE>// Currently, Android Databinding generates a class with a fixed name into the Java package<NEW_LINE>// of an android_library. This means that if an android_binary depends on two<NEW_LINE>// android_library rules with databinding in the same java package, there will be a mysterious<NEW_LINE>// one version violation. This is an explicit check for this case so that the error is not so<NEW_LINE>// mysterious.<NEW_LINE>ImmutableMultimap<String, String> javaPackagesToLabel = getJavaPackagesWithDatabindingToLabelMap(ruleContext);<NEW_LINE>for (Entry<String, Collection<String>> entry : javaPackagesToLabel.asMap().entrySet()) {<NEW_LINE>if (entry.getValue().size() > 1) {<NEW_LINE>String javaPackage = entry.getKey().isEmpty() ? "<default package>" : entry.getKey();<NEW_LINE>ruleContext.attributeError("deps", String.format("This target depends on multiple android_library targets " + "with databinding in the same Java package. This is not supported by " + "databinding and will result in class conflicts. The conflicting " + "android_library targets are:\n" + " Java package %s:\n" + " %s", javaPackage, Joiner.on("\n ").join(entry.getValue())));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ImmutableList.Builder<Artifact> dataBindingJavaInputs = ImmutableList.builder();<NEW_LINE>if (AndroidResources.definesAndroidResources(ruleContext.attributes())) {<NEW_LINE>dataBindingJavaInputs.add(getLayoutInfoFile());<NEW_LINE>dataBindingJavaInputs<MASK><NEW_LINE>}<NEW_LINE>for (Artifact transitiveBRFile : getTransitiveBRFiles(ruleContext)) {<NEW_LINE>dataBindingJavaInputs.add(DataBinding.symlinkDepsMetadataIntoOutputTree(ruleContext, transitiveBRFile));<NEW_LINE>}<NEW_LINE>for (Artifact directSetterStoreFile : getDirectSetterStoreFiles(ruleContext).toList()) {<NEW_LINE>dataBindingJavaInputs.add(DataBinding.symlinkDepsMetadataIntoOutputTree(ruleContext, directSetterStoreFile));<NEW_LINE>}<NEW_LINE>for (Artifact classInfo : getDirectClassInfo(ruleContext).toList()) {<NEW_LINE>dataBindingJavaInputs.add(DataBinding.symlinkDepsMetadataIntoOutputTree(ruleContext, classInfo));<NEW_LINE>}<NEW_LINE>return dataBindingJavaInputs.build();<NEW_LINE>}
.add(getClassInfoFile(ruleContext));
827,826
private List<CountAtBucket> nonZeroBuckets() {<NEW_LINE>List<CountAtBucket> buckets = new ArrayList<>();<NEW_LINE>long zeroSnap = zeros.get();<NEW_LINE>if (zeroSnap > 0) {<NEW_LINE>buckets.add(new CountAtBucket(UPPER_BOUNDS[getRangeIndex(ZERO.bucketIdx, ZERO.offset)], zeroSnap));<NEW_LINE>}<NEW_LINE>long lowerSnap = lower.get();<NEW_LINE>if (lowerSnap > 0) {<NEW_LINE>buckets.add(new CountAtBucket(UPPER_BOUNDS[getRangeIndex(LOWER.bucketIdx, LOWER.offset)], lowerSnap));<NEW_LINE>}<NEW_LINE>long upperSnap = upper.get();<NEW_LINE>if (upperSnap > 0) {<NEW_LINE>buckets.add(new CountAtBucket(UPPER_BOUNDS[getRangeIndex(UPPER.bucketIdx, UPPER.offset)], upperSnap));<NEW_LINE>}<NEW_LINE>for (int i = 0; i < values.length(); i++) {<NEW_LINE>AtomicLongArray bucket = values.get(i);<NEW_LINE>if (bucket != null) {<NEW_LINE>for (int j = 0; j < bucket.length(); j++) {<NEW_LINE>long <MASK><NEW_LINE>if (cnt > 0) {<NEW_LINE>buckets.add(new CountAtBucket(UPPER_BOUNDS[getRangeIndex(i, j)], cnt));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return buckets;<NEW_LINE>}
cnt = bucket.get(j);
1,075,455
private Response sendVerifyEmail(KeycloakSession session, LoginFormsProvider forms, UserModel user, AuthenticationSessionModel authSession, EventBuilder event) throws UriBuilderException, IllegalArgumentException {<NEW_LINE>RealmModel realm = session.getContext().getRealm();<NEW_LINE>UriInfo uriInfo = session.getContext().getUri();<NEW_LINE>int validityInSecs = realm.getActionTokenGeneratedByUserLifespan(VerifyEmailActionToken.TOKEN_TYPE);<NEW_LINE>int absoluteExpirationInSecs = Time.currentTime() + validityInSecs;<NEW_LINE>String authSessionEncodedId = AuthenticationSessionCompoundId.fromAuthSession(authSession).getEncodedId();<NEW_LINE>VerifyEmailActionToken token = new VerifyEmailActionToken(user.getId(), absoluteExpirationInSecs, authSessionEncodedId, user.getEmail(), authSession.getClient().getClientId());<NEW_LINE>UriBuilder builder = Urls.actionTokenBuilder(uriInfo.getBaseUri(), token.serialize(session, realm, uriInfo), authSession.getClient().getClientId(), authSession.getTabId());<NEW_LINE>String link = builder.build(realm.getName()).toString();<NEW_LINE>long expirationInMinutes = TimeUnit.SECONDS.toMinutes(validityInSecs);<NEW_LINE>try {<NEW_LINE>session.getProvider(EmailTemplateProvider.class).setAuthenticationSession(authSession).setRealm(realm).setUser(user).sendVerifyEmail(link, expirationInMinutes);<NEW_LINE>event.success();<NEW_LINE>} catch (EmailException e) {<NEW_LINE><MASK><NEW_LINE>event.error(Errors.EMAIL_SEND_FAILED);<NEW_LINE>}<NEW_LINE>return forms.createResponse(UserModel.RequiredAction.VERIFY_EMAIL);<NEW_LINE>}
logger.error("Failed to send verification email", e);
773,772
void downloadFileList(@Nullable final OnDownloadFileListListener listener) throws UserNotRegisteredException {<NEW_LINE>checkRegistered();<NEW_LINE>Map<String, String> params = new HashMap<>();<NEW_LINE>params.put("deviceid", getDeviceId());<NEW_LINE>params.put("accessToken", getAccessToken());<NEW_LINE>params.put("allVersions", "true");<NEW_LINE>final OperationLog operationLog = new OperationLog("downloadFileList", DEBUG);<NEW_LINE>operationLog.startOperation();<NEW_LINE>AndroidNetworkUtils.sendRequest(app, LIST_FILES_URL, params, "Download file list", false, false, (resultJson, error, resultCode) -> {<NEW_LINE>int status;<NEW_LINE>String message;<NEW_LINE>List<RemoteFile> remoteFiles = new ArrayList<>();<NEW_LINE>if (!Algorithms.isEmpty(error)) {<NEW_LINE>status = STATUS_SERVER_ERROR;<NEW_LINE>message = "Download file list error: " + new BackupError(error);<NEW_LINE>} else if (!Algorithms.isEmpty(resultJson)) {<NEW_LINE>try {<NEW_LINE>JSONObject res = new JSONObject(resultJson);<NEW_LINE>String totalZipSize = res.getString("totalZipSize");<NEW_LINE>String totalFiles = res.getString("totalFiles");<NEW_LINE>String totalFileVersions = res.getString("totalFileVersions");<NEW_LINE>JSONArray allFiles = res.getJSONArray("allFiles");<NEW_LINE>for (int i = 0; i < allFiles.length(); i++) {<NEW_LINE>remoteFiles.add(new RemoteFile(<MASK><NEW_LINE>}<NEW_LINE>status = STATUS_SUCCESS;<NEW_LINE>message = "Total files: " + totalFiles + " " + "Total zip size: " + AndroidUtils.formatSize(app, Long.parseLong(totalZipSize)) + " " + "Total file versions: " + totalFileVersions;<NEW_LINE>} catch (JSONException e) {<NEW_LINE>status = STATUS_PARSE_JSON_ERROR;<NEW_LINE>message = "Download file list error: json parsing";<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>status = STATUS_EMPTY_RESPONSE_ERROR;<NEW_LINE>message = "Download file list error: empty response";<NEW_LINE>}<NEW_LINE>operationLog.finishOperation("(" + status + "): " + message);<NEW_LINE>if (listener != null) {<NEW_LINE>listener.onDownloadFileList(status, message, remoteFiles);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
allFiles.getJSONObject(i)));
1,752,761
public static void checkAdminRoleOrPermissions(Authorizer authorizer, SecurityContext securityContext, EntityReference entityReference, EntityReference ownerReference, JsonPatch patch) {<NEW_LINE>AuthenticationContext authenticationCtx = SecurityUtil.getAuthenticationContext(securityContext);<NEW_LINE>if (authorizer.isAdmin(authenticationCtx) || authorizer.isBot(authenticationCtx) || authorizer.hasPermissions(authenticationCtx, ownerReference)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<MetadataOperation> <MASK><NEW_LINE>// If there are no specific metadata operations that can be determined from the JSON Patch, deny the changes.<NEW_LINE>if (metadataOperations.isEmpty()) {<NEW_LINE>throw new AuthorizationException(noPermission(authenticationCtx.getPrincipal()));<NEW_LINE>}<NEW_LINE>for (MetadataOperation metadataOperation : metadataOperations) {<NEW_LINE>if (!authorizer.hasPermissions(authenticationCtx, entityReference, metadataOperation)) {<NEW_LINE>throw new AuthorizationException(noPermission(authenticationCtx.getPrincipal(), metadataOperation.value()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
metadataOperations = JsonPatchUtils.getMetadataOperations(patch);
1,406,140
public String[] introspectSelf() {<NEW_LINE>com.ibm.ws.rsadapter.FFDCLogger info = new com.ibm.<MASK><NEW_LINE>info.append(dsConfig.get().introspectSelf());<NEW_LINE>if (dsConfig.get().enableMultithreadedAccessDetection)<NEW_LINE>info.append("Multithreaded access was detected?", detectedMultithreadedAccess);<NEW_LINE>info.append("Vendor implementation class:", vendorImplClass);<NEW_LINE>info.append("Type:", type);<NEW_LINE>info.append("Underlying DataSource or Driver Object: " + AdapterUtil.toString(dataSourceOrDriver), dataSourceOrDriver);<NEW_LINE>info.append("Instance id:", instanceID);<NEW_LINE>info.append("Log Writer:", logWriter);<NEW_LINE>info.append("Counter of fatal connection errors on ManagedConnections created by this MCF:", fatalErrorCount);<NEW_LINE>return info.toStringArray();<NEW_LINE>}
ws.rsadapter.FFDCLogger(this);
1,500,147
/* (non-Javadoc)<NEW_LINE>* @see com.ibm.ws.sib.processor.impl.interfaces.DestinationHandler#notifyReceiveAllowed(com.ibm.ws.sib.processor.impl.interfaces.DestinationHandler)<NEW_LINE>*/<NEW_LINE>public void notifyReceiveAllowed(DestinationHandler destinationHandler) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "notifyReceiveAllowed", new Object[] { destinationHandler });<NEW_LINE>if (isPubSub()) {<NEW_LINE>// Notify consumers on this localization<NEW_LINE>SubscriptionTypeFilter filter = new SubscriptionTypeFilter();<NEW_LINE>filter.LOCAL = Boolean.TRUE;<NEW_LINE>SIMPIterator itr = <MASK><NEW_LINE>while (itr.hasNext()) {<NEW_LINE>ControllableSubscription subscription = (ControllableSubscription) itr.next();<NEW_LINE>ConsumerDispatcher cd = (ConsumerDispatcher) subscription.getOutputHandler();<NEW_LINE>if (cd != null)<NEW_LINE>cd.notifyReceiveAllowed(destinationHandler);<NEW_LINE>}<NEW_LINE>itr.finished();<NEW_LINE>} else {<NEW_LINE>// tell the local consumer dispatcher that this destinations receiveAllowed has changed<NEW_LINE>ConsumerDispatcher cm = (ConsumerDispatcher) getLocalPtoPConsumerManager();<NEW_LINE>if (cm != null) {<NEW_LINE>cm.notifyReceiveAllowed(destinationHandler);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// tell the any RME remote consumer dispatchers that this destinations receiveAllowed has changed<NEW_LINE>notifyReceiveAllowedRCD(destinationHandler);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "notifyReceiveAllowed");<NEW_LINE>}
getSubscriptionIndex().iterator(filter);
630,853
private List<NameValueCountPair> listCreatorUnitPair(Business business, EffectivePerson effectivePerson) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(TaskCompleted.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LINE>Root<TaskCompleted> root = cq.from(TaskCompleted.class);<NEW_LINE>Predicate p = cb.equal(root.get(TaskCompleted_.person), effectivePerson.getDistinguishedName());<NEW_LINE>p = cb.and(p, cb.or(cb.equal(root.get(TaskCompleted_.latest), true), cb.isNull(root.get(TaskCompleted_.latest))));<NEW_LINE>cq.select(root.get(TaskCompleted_.<MASK><NEW_LINE>List<String> os = em.createQuery(cq).getResultList().stream().distinct().collect(Collectors.toList());<NEW_LINE>List<NameValueCountPair> wos = new ArrayList<>();<NEW_LINE>for (String str : os) {<NEW_LINE>if (StringUtils.isNotEmpty(str)) {<NEW_LINE>NameValueCountPair o = new NameValueCountPair();<NEW_LINE>o.setValue(str);<NEW_LINE>o.setName(StringUtils.defaultString(StringUtils.substringBefore(str, "@"), str));<NEW_LINE>wos.add(o);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>SortTools.asc(wos, "name");<NEW_LINE>return wos;<NEW_LINE>}
creatorUnit)).where(p);
348,070
private boolean checkClass(TypeElement element) {<NEW_LINE>if (element.getKind() != ElementKind.CLASS) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Set<Modifier> modifiers = element.getModifiers();<NEW_LINE>Element enclosing = element.getEnclosingElement();<NEW_LINE>if (!(enclosing instanceof PackageElement)) {<NEW_LINE>if (!modifiers.contains(Modifier.STATIC)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Elements elements = getHelper().getCompilationController().getElements();<NEW_LINE>Types types = getHelper().getCompilationController().getTypes();<NEW_LINE>List<? extends AnnotationMirror> allAnnotations = elements.getAllAnnotationMirrors(element);<NEW_LINE>if (modifiers.contains(Modifier.ABSTRACT) && !getHelper().hasAnnotation(allAnnotations, DECORATOR)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TypeElement extensionElement = elements.getTypeElement(EXTENSION);<NEW_LINE>if (extensionElement != null) {<NEW_LINE><MASK><NEW_LINE>if (types.isAssignable(element.asType(), extensionType)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<ExecutableElement> constructors = ElementFilter.constructorsIn(element.getEnclosedElements());<NEW_LINE>boolean foundCtor = constructors.size() == 0;<NEW_LINE>for (ExecutableElement ctor : constructors) {<NEW_LINE>if (ctor.getParameters().size() == 0) {<NEW_LINE>foundCtor = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (getHelper().hasAnnotation(allAnnotations, FieldInjectionPointLogic.INJECT_ANNOTATION)) {<NEW_LINE>foundCtor = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return foundCtor;<NEW_LINE>}
TypeMirror extensionType = extensionElement.asType();
256,884
private static Object instantiateIfNecessary(Object module, List<Method> declaredMethods, Binder binder) {<NEW_LINE>// If the module is already an object, no need to instantiate.<NEW_LINE>if (!(module instanceof Class)) {<NEW_LINE>return module;<NEW_LINE>}<NEW_LINE>// If none of the methods require instances, no need to instantiate.<NEW_LINE>if (declaredMethods.stream().noneMatch(DaggerCompatibilityModule::methodRequiresInstance)) {<NEW_LINE>return module;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Constructor<?> cxtor = ((Class<?>) module).getDeclaredConstructor();<NEW_LINE>cxtor.setAccessible(true);<NEW_LINE>return cxtor.newInstance();<NEW_LINE>} catch (NoSuchMethodException nsee) {<NEW_LINE>// If no no-args cxtor exists, just return the class. We'll fail with a better error<NEW_LINE>// message later on.<NEW_LINE>return module;<NEW_LINE>} catch (ReflectiveOperationException roe) {<NEW_LINE>// If instantiation failed, record the error and proceed. We'll add additional good<NEW_LINE>// error message later on.<NEW_LINE>binder.addError(new Message(Errors.format(<MASK><NEW_LINE>return module;<NEW_LINE>}<NEW_LINE>}
"Unable to create an instance of %s for DaggerAdapter", module), roe));
820,685
private static void buildConversionMap() {<NEW_LINE>// Values in the map below may be always changed<NEW_LINE>ArrayMap<String, String> keyValueMap = new ArrayMap<>(10);<NEW_LINE>keyValueMap.put("top", "0");<NEW_LINE>keyValueMap.put("left", "0");<NEW_LINE>keyValueMap.put("right", "DUMMY_RIGHT");<NEW_LINE>keyValueMap.put("bottom", "DUMMY_BOTTOM");<NEW_LINE>keyValueMap.put("width", "DUMMY_WIDTH");<NEW_LINE>keyValueMap.put("height", "DUMMY_HEIGHT");<NEW_LINE>keyValueMap.put("screen_width", "DUMMY_DATA");<NEW_LINE>keyValueMap.put("screen_height", "DUMMY_DATA");<NEW_LINE>keyValueMap.put("margin", Integer.toString((int) Tools.dpToPx(2)));<NEW_LINE>keyValueMap.put("preferred_scale", Float.toString(LauncherPreferences.PREF_BUTTONSIZE));<NEW_LINE>conversionMap <MASK><NEW_LINE>}
= new WeakReference<>(keyValueMap);
1,216,968
private void sendResultNotification(DestroyedActivityInfo activityInfo, ManualDumpData data) {<NEW_LINE>final Context context = getWatcher().getContext();<NEW_LINE>Intent targetIntent = new Intent();<NEW_LINE>targetIntent.setClassName(getWatcher().getContext(), mTargetActivity);<NEW_LINE>targetIntent.putExtra(SharePluginInfo.ISSUE_ACTIVITY_NAME, activityInfo.mActivityName);<NEW_LINE>targetIntent.putExtra(SharePluginInfo.ISSUE_REF_KEY, activityInfo.mKey);<NEW_LINE>targetIntent.putExtra(SharePluginInfo.ISSUE_LEAK_PROCESS, MatrixUtil.getProcessName(context));<NEW_LINE>targetIntent.putExtra(SharePluginInfo.ISSUE_DUMP_DATA, data);<NEW_LINE>PendingIntent pIntent = PendingIntent.getActivity(context, 0, targetIntent, PendingIntent.FLAG_UPDATE_CURRENT);<NEW_LINE>String dumpingHeapTitle = context.getString(R.string.resource_canary_leak_tip);<NEW_LINE>ResourceConfig config = getWatcher().getResourcePlugin().getConfig();<NEW_LINE>String dumpingHeapContent = String.format(Locale.getDefault(), "[%s] has leaked for [%s]min!!!", activityInfo.mActivityName, TimeUnit.MILLISECONDS.toMinutes(config.getScanIntervalMillis() * config.getMaxRedetectTimes()));<NEW_LINE>Notification.Builder builder;<NEW_LINE>if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {<NEW_LINE>builder = new Notification.Builder(context, getNotificationChannelIdCompat(context));<NEW_LINE>} else {<NEW_LINE>builder <MASK><NEW_LINE>}<NEW_LINE>builder.setContentTitle(dumpingHeapTitle).setPriority(Notification.PRIORITY_DEFAULT).setStyle(new Notification.BigTextStyle().bigText(dumpingHeapContent)).setAutoCancel(true).setContentIntent(pIntent).setSmallIcon(R.drawable.ic_launcher).setWhen(System.currentTimeMillis());<NEW_LINE>Notification notification = builder.build();<NEW_LINE>mNotificationManager.notify(NOTIFICATION_ID + activityInfo.mKey.hashCode(), notification);<NEW_LINE>}
= new Notification.Builder(context);
678,814
public <U extends IAggregableReduceOp<T, Writable>> void combine(U acc) {<NEW_LINE>if (this.getClass().isAssignableFrom(acc.getClass())) {<NEW_LINE>AggregableVariance<T> accu <MASK><NEW_LINE>Long totalCount = count + accu.getCount();<NEW_LINE>Double totalMean = (accu.getMean() * accu.getCount() + mean * count) / totalCount;<NEW_LINE>// the variance of the union is the sum of variances<NEW_LINE>Double variance = variation / (count - 1);<NEW_LINE>Double otherVariance = accu.getVariation() / (accu.getCount() - 1);<NEW_LINE>Double totalVariation = (variance + otherVariance) * (totalCount - 1);<NEW_LINE>count = totalCount;<NEW_LINE>mean = totalMean;<NEW_LINE>variation = variation;<NEW_LINE>} else<NEW_LINE>throw new UnsupportedOperationException("Tried to combine() incompatible " + acc.getClass().getName() + " operator where " + this.getClass().getName() + " expected");<NEW_LINE>}
= (AggregableVariance<T>) acc;
266,423
private IJsonType findReference(JsonSchemaType parent, IFile enclosing, Bindings jsonObj) {<NEW_LINE>Object value = jsonObj.get(JSCH_REF);<NEW_LINE>String ref;<NEW_LINE>Token token;<NEW_LINE>if (value instanceof Pair) {<NEW_LINE>ref = (String) ((Pair) value).getSecond();<NEW_LINE>token = ((Token[]) ((Pair) value).getFirst())[1];<NEW_LINE>} else {<NEW_LINE>ref = (String) value;<NEW_LINE>token = null;<NEW_LINE>}<NEW_LINE>if (ref == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>URI uri;<NEW_LINE>try {<NEW_LINE>// support refs like: "#/properties/blah". They are the same as: "#/blah"<NEW_LINE>ref = ref.replace("/properties/", "/").replace("/properties#", "/");<NEW_LINE>uri = new URI(ref);<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>parent.addIssue(new JsonIssue(IIssue.Kind.Error, token, "Invalid URI syntax: ${e.getReason()}"));<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (scheme != null && !scheme.isEmpty() && !scheme.equalsIgnoreCase("file")) {<NEW_LINE>parent.addIssue(new JsonIssue(IIssue.Kind.Error, token, "Unsupported URI scheme: '$scheme'. A reference must be local to a resource file."));<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String filePart = uri.getRawSchemeSpecificPart();<NEW_LINE>if (filePart != null && !filePart.isEmpty()) {<NEW_LINE>Pair<IJsonType, JsonSchemaTransformer> pair = findBaseType(token, parent, enclosing, uri, filePart);<NEW_LINE>IJsonType definition = pair == null ? null : findFragmentType(token, uri, pair);<NEW_LINE>if (definition == null) {<NEW_LINE>parent.addIssue(new JsonIssue(IIssue.Kind.Error, token, "Invalid URI: $uri"));<NEW_LINE>}<NEW_LINE>return definition;<NEW_LINE>} else {<NEW_LINE>// relative to this file<NEW_LINE>IJsonType fragment = findFragmentRef(parent, enclosing, token, uri);<NEW_LINE>if (fragment != null) {<NEW_LINE>return fragment;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new UnsupportedOperationException("Unhandled URI: $ref");<NEW_LINE>}
String scheme = uri.getScheme();
1,152,557
public void insertHoleAt(final JSONArray args, final CallbackContext callbackContext) throws JSONException {<NEW_LINE>String id = args.getString(0);<NEW_LINE>final int holeIndex = args.getInt(1);<NEW_LINE>JSONArray <MASK><NEW_LINE>final ArrayList<LatLng> newHole = PluginUtil.JSONArray2LatLngList(holeJson);<NEW_LINE>final Polygon polygon = this.getPolygon(id);<NEW_LINE>// ------------------------<NEW_LINE>// Update the hole list<NEW_LINE>// ------------------------<NEW_LINE>String propertyId = "polygon_holePaths_" + polygonHashCode;<NEW_LINE>final ArrayList<ArrayList<LatLng>> holes = (ArrayList<ArrayList<LatLng>>) pluginMap.objects.get(propertyId);<NEW_LINE>holes.add(holeIndex, newHole);<NEW_LINE>pluginMap.objects.put(propertyId, holes);<NEW_LINE>cordova.getActivity().runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>// Update the polygon<NEW_LINE>try {<NEW_LINE>polygon.setHoles(holes);<NEW_LINE>} catch (Exception e) {<NEW_LINE>// Ignore this error<NEW_LINE>// e.printStackTrace();<NEW_LINE>}<NEW_LINE>callbackContext.success();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
holeJson = args.getJSONArray(2);
123,236
public void init(Container container) throws Exception {<NEW_LINE>managerIdentityService = container.getService(ManagerIdentityService.class);<NEW_LINE>assetStorageService = container.getService(AssetStorageService.class);<NEW_LINE>// Configure SMTP<NEW_LINE>String host = container.getConfig(<MASK><NEW_LINE>int port = getInteger(container.getConfig(), OR_EMAIL_PORT, OR_EMAIL_PORT_DEFAULT);<NEW_LINE>String user = container.getConfig().getOrDefault(OR_EMAIL_USER, null);<NEW_LINE>String password = container.getConfig().getOrDefault(OR_EMAIL_PASSWORD, null);<NEW_LINE>String headersStr = container.getConfig().getOrDefault(OR_EMAIL_X_HEADERS, null);<NEW_LINE>if (!TextUtil.isNullOrEmpty(headersStr)) {<NEW_LINE>headers = Arrays.stream(headersStr.split("\\R")).map(s -> s.split(":", 2)).collect(Collectors.toMap(arr -> arr[0].trim(), arr -> arr.length == 2 ? arr[1].trim() : ""));<NEW_LINE>}<NEW_LINE>defaultFrom = container.getConfig().getOrDefault(OR_EMAIL_FROM, OR_EMAIL_FROM_DEFAULT);<NEW_LINE>if (!TextUtil.isNullOrEmpty(host) && !TextUtil.isNullOrEmpty(user) && !TextUtil.isNullOrEmpty(password)) {<NEW_LINE>MailerBuilder.MailerRegularBuilder mailerBuilder = MailerBuilder.withSMTPServer(host, port, user, password);<NEW_LINE>boolean startTls = getBoolean(container.getConfig(), OR_EMAIL_TLS, OR_EMAIL_TLS_DEFAULT);<NEW_LINE>mailerBuilder.withTransportStrategy(startTls ? TransportStrategy.SMTP_TLS : TransportStrategy.SMTP);<NEW_LINE>mailer = mailerBuilder.buildMailer();<NEW_LINE>try {<NEW_LINE>mailer.testConnection();<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.log(Level.SEVERE, "Failed to connect to SMTP server so disabling email notifications", e);<NEW_LINE>mailer = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).getOrDefault(OR_EMAIL_HOST, null);
1,549,499
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.grpc.service.DeviceManagementGrpc.DeviceManagementImplBase#<NEW_LINE>* updateDevice(com.sitewhere.grpc.service.GUpdateDeviceRequest,<NEW_LINE>* io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void updateDevice(GUpdateDeviceRequest request, StreamObserver<GUpdateDeviceResponse> responseObserver) {<NEW_LINE>try {<NEW_LINE>GrpcUtils.handleServerMethodEntry(this, DeviceManagementGrpc.getUpdateDeviceMethod());<NEW_LINE>IDeviceCreateRequest apiRequest = DeviceModelConverter.asApiDeviceCreateRequest(request.getRequest());<NEW_LINE>IDevice apiResult = getDeviceManagement().updateDevice(CommonModelConverter.asApiUuid(request.getId()), apiRequest);<NEW_LINE>GUpdateDeviceResponse.Builder response = GUpdateDeviceResponse.newBuilder();<NEW_LINE>response.setDevice(DeviceModelConverter.asGrpcDevice(apiResult));<NEW_LINE>responseObserver.onNext(response.build());<NEW_LINE>responseObserver.onCompleted();<NEW_LINE>} catch (Throwable e) {<NEW_LINE>GrpcUtils.handleServerMethodException(DeviceManagementGrpc.<MASK><NEW_LINE>} finally {<NEW_LINE>GrpcUtils.handleServerMethodExit(DeviceManagementGrpc.getUpdateDeviceMethod());<NEW_LINE>}<NEW_LINE>}
getUpdateDeviceMethod(), e, responseObserver);
1,103,546
public AnalyzedRefreshTable analyze(RefreshStatement<Expression> refreshStatement, ParamTypeHints paramTypeHints, CoordinatorTxnCtx txnCtx) {<NEW_LINE>var exprAnalyzerWithFieldsAsString = new ExpressionAnalyzer(txnCtx, nodeCtx, paramTypeHints, FieldProvider.FIELDS_AS_LITERAL, null);<NEW_LINE>var exprCtx = new ExpressionAnalysisContext(txnCtx.sessionContext());<NEW_LINE>HashMap<Table<Symbol>, DocTableInfo> analyzedTables = new HashMap<>();<NEW_LINE>for (var table : refreshStatement.tables()) {<NEW_LINE>var analyzedTable = table.map(t -> exprAnalyzerWithFieldsAsString.convert(t, exprCtx));<NEW_LINE>// resolve table info and validate whether a table exists<NEW_LINE>var tableInfo = (DocTableInfo) schemas.resolveTableInfo(table.getName(), Operation.REFRESH, txnCtx.sessionContext().sessionUser(), txnCtx.sessionContext().searchPath());<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return new AnalyzedRefreshTable(analyzedTables);<NEW_LINE>}
analyzedTables.put(analyzedTable, tableInfo);
126,517
public boolean trySearch(SearchState state) throws RaiseException {<NEW_LINE>// no library or extension found, try to load directly as a class<NEW_LINE>Script script;<NEW_LINE>String className = buildClassName(state.searchFile);<NEW_LINE>int lastSlashIndex = className.lastIndexOf('/');<NEW_LINE>if (lastSlashIndex > -1 && lastSlashIndex < className.length() - 1 && !Character.isJavaIdentifierStart(className.charAt(lastSlashIndex + 1))) {<NEW_LINE>if (lastSlashIndex == -1) {<NEW_LINE>className = '_' + className;<NEW_LINE>} else {<NEW_LINE>className = className.substring(0, lastSlashIndex + 1) + '_' + className.substring(lastSlashIndex + 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>className = <MASK><NEW_LINE>try {<NEW_LINE>Class scriptClass = Class.forName(className);<NEW_LINE>script = (Script) scriptClass.newInstance();<NEW_LINE>} catch (Exception cnfe) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>state.library = new ScriptClassLibrary(script);<NEW_LINE>return true;<NEW_LINE>}
className.replace('/', '.');
1,279,330
private void resizeUpdateCapacity() {<NEW_LINE>final int newCapacity = (int<MASK><NEW_LINE>// first, copy the stack of variables<NEW_LINE>final StoredDoubleVector[] tmp1 = new StoredDoubleVector[newCapacity];<NEW_LINE>System.arraycopy(vectorStack, 0, tmp1, 0, vectorStack.length);<NEW_LINE>vectorStack = tmp1;<NEW_LINE>// then, copy the stack of former values<NEW_LINE>final double[] tmp2 = new double[newCapacity];<NEW_LINE>System.arraycopy(valueStack, 0, tmp2, 0, valueStack.length);<NEW_LINE>valueStack = tmp2;<NEW_LINE>// then, copy the stack of world stamps<NEW_LINE>final int[] tmp3 = new int[newCapacity];<NEW_LINE>System.arraycopy(stampStack, 0, tmp3, 0, stampStack.length);<NEW_LINE>stampStack = tmp3;<NEW_LINE>// then, copy the stack of indices<NEW_LINE>final int[] tmp4 = new int[newCapacity];<NEW_LINE>System.arraycopy(indexStack, 0, tmp4, 0, indexStack.length);<NEW_LINE>indexStack = tmp4;<NEW_LINE>}
) (vectorStack.length * loadfactor);
614,781
public void marshall(Assignment assignment, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (assignment == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(assignment.getAssignmentId(), ASSIGNMENTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(assignment.getWorkerId(), WORKERID_BINDING);<NEW_LINE>protocolMarshaller.marshall(assignment.getHITId(), HITID_BINDING);<NEW_LINE>protocolMarshaller.marshall(assignment.getAssignmentStatus(), ASSIGNMENTSTATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(assignment.getAutoApprovalTime(), AUTOAPPROVALTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(assignment.getAcceptTime(), ACCEPTTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(assignment.getSubmitTime(), SUBMITTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(assignment.getApprovalTime(), APPROVALTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(assignment.getRejectionTime(), REJECTIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(assignment.getAnswer(), ANSWER_BINDING);<NEW_LINE>protocolMarshaller.marshall(assignment.getRequesterFeedback(), REQUESTERFEEDBACK_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
assignment.getDeadline(), DEADLINE_BINDING);
1,014,201
public static void removeTask(@Nonnull final Project project, LocalTask task, TaskManager manager) {<NEW_LINE>if (task.isDefault()) {<NEW_LINE>Messages.showInfoMessage(project, "Default task cannot be removed", "Cannot Remove");<NEW_LINE>} else {<NEW_LINE>List<ChangeListInfo> infos = task.getChangeLists();<NEW_LINE>List<LocalChangeList> lists = ContainerUtil.mapNotNull(infos, new NullableFunction<ChangeListInfo, LocalChangeList>() {<NEW_LINE><NEW_LINE>public LocalChangeList fun(ChangeListInfo changeListInfo) {<NEW_LINE>LocalChangeList changeList = ChangeListManager.getInstance(project).getChangeList(changeListInfo.id);<NEW_LINE>return changeList != null && !changeList<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>boolean removeIt = true;<NEW_LINE>l: for (LocalChangeList list : lists) {<NEW_LINE>if (!list.getChanges().isEmpty()) {<NEW_LINE>int result = Messages.showYesNoCancelDialog(project, "Changelist associated with '" + task.getSummary() + "' is not empty.\n" + "Do you want to remove it and move the changes to the active changelist?", "Changelist Not Empty", Messages.getWarningIcon());<NEW_LINE>switch(result) {<NEW_LINE>case 0:<NEW_LINE>break l;<NEW_LINE>case 1:<NEW_LINE>removeIt = false;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (removeIt) {<NEW_LINE>for (LocalChangeList list : lists) {<NEW_LINE>ChangeListManager.getInstance(project).removeChangeList(list);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>manager.removeTask(task);<NEW_LINE>}<NEW_LINE>}
.isDefault() ? changeList : null;
1,687,727
public <T extends SaveFileFormat> T load(InputStream is, Class<T> format) {<NEW_LINE>entitySerializer.preLoad();<NEW_LINE><MASK><NEW_LINE>SaveFileFormat partial = new SaveFileFormat((IntBag) null);<NEW_LINE>partial.componentIdentifiers = kryo.readObject(input, SaveFileFormat.ComponentIdentifiers.class);<NEW_LINE>transmuterEntrySerializer.identifiers = partial.componentIdentifiers;<NEW_LINE>partial.archetypes = kryo.readObject(input, ArchetypeMapper.class);<NEW_LINE>entitySerializer.archetypeMapper = partial.archetypes;<NEW_LINE>entitySerializer.serializationState = partial;<NEW_LINE>if (entitySerializer.archetypeMapper != null) {<NEW_LINE>entitySerializer.archetypeMapper.serializationState = partial;<NEW_LINE>transmuterEntrySerializer.identifiers = partial.componentIdentifiers;<NEW_LINE>}<NEW_LINE>referenceTracker.inspectTypes(partial.componentIdentifiers.typeToId.keySet());<NEW_LINE>entitySerializer.factory.configureWith(input.readInt());<NEW_LINE>T t = kryo.readObject(input, format);<NEW_LINE>t.tracker = entitySerializer.keyTracker;<NEW_LINE>referenceTracker.translate(intBagEntitySerializer.getTranslatedIds());<NEW_LINE>// TODO do we want to clear those?<NEW_LINE>entitySerializer.clearSerializerCache();<NEW_LINE>return t;<NEW_LINE>}
Input input = new ByteBufferInput(is);
1,766,721
private JComponent createTempoPanel() {<NEW_LINE>tempoSlider = new JSlider(0, 300);<NEW_LINE>tempoSlider.setValue(100);<NEW_LINE>final JLabel label = new JLabel("Tempo: 100%");<NEW_LINE>tempoSlider.setPaintLabels(true);<NEW_LINE>tempoSlider.addChangeListener(new ChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void stateChanged(ChangeEvent arg0) {<NEW_LINE>double newTempo <MASK><NEW_LINE>label.setText(String.format("Tempo: %3d", tempoSlider.getValue()) + "%");<NEW_LINE>player.setTempo(newTempo);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>JPanel panel = new JPanel(new BorderLayout());<NEW_LINE>label.setToolTipText("The time stretching factor in % (100 is no change).");<NEW_LINE>panel.add(label, BorderLayout.NORTH);<NEW_LINE>panel.add(tempoSlider, BorderLayout.CENTER);<NEW_LINE>panel.setBorder(new TitledBorder("Tempo control"));<NEW_LINE>return panel;<NEW_LINE>}
= tempoSlider.getValue() / 100.0;
1,301,342
public RelNode toRel(ToRelContext context) {<NEW_LINE>// Make sure rowType's list is immutable. If rowType is DynamicRecordType, creates a new<NEW_LINE>// RelOptTable by replacing with immutable RelRecordType using the same field list.<NEW_LINE>if (this.getRowType().isDynamicStruct()) {<NEW_LINE>final RelDataType staticRowType = new RelRecordType(getRowType().getFieldList());<NEW_LINE>final RelOptTable relOptTable = this.copy(staticRowType);<NEW_LINE>return relOptTable.toRel(context);<NEW_LINE>}<NEW_LINE>// If there are any virtual columns, create a copy of this table without<NEW_LINE>// those virtual columns.<NEW_LINE>final List<ColumnStrategy> strategies = getColumnStrategies();<NEW_LINE>if (strategies.contains(ColumnStrategy.VIRTUAL)) {<NEW_LINE>final RelDataTypeFactory.Builder b = context.getCluster().getTypeFactory().builder();<NEW_LINE>for (RelDataTypeField field : rowType.getFieldList()) {<NEW_LINE>if (strategies.get(field.getIndex()) != ColumnStrategy.VIRTUAL) {<NEW_LINE>b.add(field.getName(), field.getType());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final RelOptTable relOptTable = new RelOptTableImpl(this.schema, b.build(), this.names, this.table, this.expressionFunction, this.rowCount) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public <T> T unwrap(Class<T> clazz) {<NEW_LINE>if (clazz.isAssignableFrom(InitializerExpressionFactory.class)) {<NEW_LINE>return clazz.cast(NullInitializerExpressionFactory.INSTANCE);<NEW_LINE>}<NEW_LINE>return super.unwrap(clazz);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>return relOptTable.toRel(context);<NEW_LINE>}<NEW_LINE>if (table instanceof TranslatableTable) {<NEW_LINE>return ((TranslatableTable) table).toRel(context, this);<NEW_LINE>}<NEW_LINE>final RelOptCluster cluster = context.getCluster();<NEW_LINE>if (Hook.ENABLE_BINDABLE.get(false)) {<NEW_LINE>return LogicalTableScan.create(cluster, this);<NEW_LINE>}<NEW_LINE>if (CalcitePrepareImpl.ENABLE_ENUMERABLE && table instanceof QueryableTable) {<NEW_LINE>return EnumerableTableScan.create(cluster, this);<NEW_LINE>}<NEW_LINE>if (table instanceof ScannableTable || table instanceof FilterableTable || table instanceof ProjectableFilterableTable) {<NEW_LINE>return LogicalTableScan.create(cluster, this);<NEW_LINE>}<NEW_LINE>if (CalcitePrepareImpl.ENABLE_ENUMERABLE) {<NEW_LINE>return <MASK><NEW_LINE>}<NEW_LINE>throw new AssertionError();<NEW_LINE>}
EnumerableTableScan.create(cluster, this);
1,320,808
public static void main(String[] args) {<NEW_LINE>Point s1 = new Point(2147000000, 1);<NEW_LINE>Point e1 = new Point(-2147000000, -1);<NEW_LINE>Point s2 = <MASK><NEW_LINE>Point e2 = new Point(0, 0);<NEW_LINE>Point intersection = intersection(s1, e1, s2, e2);<NEW_LINE>System.out.println("Line Segment 1: " + s1 + " to " + e1);<NEW_LINE>System.out.println("Line Segment 2: " + s2 + " to " + e2);<NEW_LINE>System.out.println("Intersection: " + (intersection == null ? "None" : intersection));<NEW_LINE>if (intersection != null) {<NEW_LINE>System.out.println("Intersection is on segment1: " + Tester.checkIfPointOnLineSegments(s1, intersection, e1));<NEW_LINE>System.out.println("Intersection is on segment1: " + Tester.checkIfPointOnLineSegments(s2, intersection, e2));<NEW_LINE>}<NEW_LINE>}
new Point(-10, 0);
1,083,260
public void populateItem(final Item<RepositoryCommit> commitItem) {<NEW_LINE>final RepositoryCommit commit = commitItem.getModelObject();<NEW_LINE>// author gravatar<NEW_LINE>commitItem.add(new AvatarImage("commitAuthor", commit.getAuthorIdent(), null, 16, false));<NEW_LINE>// merge icon<NEW_LINE>if (commit.getParentCount() > 1) {<NEW_LINE>commitItem.add(WicketUtils.newImage("commitIcon", "commit_merge_16x16.png"));<NEW_LINE>} else {<NEW_LINE>commitItem.add(WicketUtils.newBlankImage("commitIcon"));<NEW_LINE>}<NEW_LINE>// short message<NEW_LINE>String shortMessage = commit.getShortMessage();<NEW_LINE>String trimmedMessage = shortMessage;<NEW_LINE>if (commit.getRefs() != null && commit.getRefs().size() > 0) {<NEW_LINE>trimmedMessage = StringUtils.trimString(shortMessage, Constants.LEN_SHORTLOG_REFS);<NEW_LINE>} else {<NEW_LINE>trimmedMessage = StringUtils.trimString(shortMessage, Constants.LEN_SHORTLOG);<NEW_LINE>}<NEW_LINE>LinkPanel shortlog = new LinkPanel("commitShortMessage", "list", trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(change.repository, commit.getName()));<NEW_LINE>if (!shortMessage.equals(trimmedMessage)) {<NEW_LINE>WicketUtils.setHtmlTooltip(shortlog, shortMessage);<NEW_LINE>}<NEW_LINE>commitItem.add(shortlog);<NEW_LINE>// commit hash link<NEW_LINE>int hashLen = app().settings().getInteger(<MASK><NEW_LINE>LinkPanel commitHash = new LinkPanel("hashLink", null, commit.getName().substring(0, hashLen), CommitPage.class, WicketUtils.newObjectParameter(change.repository, commit.getName()));<NEW_LINE>WicketUtils.setCssClass(commitHash, "shortsha1");<NEW_LINE>WicketUtils.setHtmlTooltip(commitHash, commit.getName());<NEW_LINE>commitItem.add(commitHash);<NEW_LINE>if (showSwatch) {<NEW_LINE>// set repository color<NEW_LINE>String color = StringUtils.getColor(StringUtils.stripDotGit(change.repository));<NEW_LINE>WicketUtils.setCssStyle(commitItem, MessageFormat.format("border-left: 2px solid {0};", color));<NEW_LINE>}<NEW_LINE>}
Keys.web.shortCommitIdLength, 6);
1,713,001
final UpdateClusterKafkaVersionResult executeUpdateClusterKafkaVersion(UpdateClusterKafkaVersionRequest updateClusterKafkaVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateClusterKafkaVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateClusterKafkaVersionRequest> request = null;<NEW_LINE>Response<UpdateClusterKafkaVersionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateClusterKafkaVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateClusterKafkaVersionRequest));<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, "Kafka");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateClusterKafkaVersion");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateClusterKafkaVersionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateClusterKafkaVersionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
1,681,272
public static XMethod findInvocationLeastUpperBound(InvokeInstruction inv, ConstantPoolGen cpg, JavaClassAndMethodChooser methodChooser) {<NEW_LINE>if (DEBUG_METHOD_LOOKUP) {<NEW_LINE>System.out.println("Find prototype method for " + SignatureConverter.convertMethodSignature(inv, cpg));<NEW_LINE>}<NEW_LINE>short opcode = inv.getOpcode();<NEW_LINE>if (opcode == Const.INVOKESTATIC) {<NEW_LINE>if (methodChooser == INSTANCE_METHOD) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (methodChooser == STATIC_METHOD) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Find the method<NEW_LINE>if (opcode == Const.INVOKESPECIAL) {<NEW_LINE>// Non-virtual dispatch<NEW_LINE>return findExactMethod(inv, cpg, methodChooser);<NEW_LINE>} else {<NEW_LINE>String className = inv.getClassName(cpg);<NEW_LINE>String methodName = inv.getName(cpg);<NEW_LINE>String methodSig = inv.getSignature(cpg);<NEW_LINE>if (DEBUG_METHOD_LOOKUP) {<NEW_LINE>System.out.println("[Class name is " + className + "]");<NEW_LINE>System.out.println("[Method name is " + methodName + "]");<NEW_LINE>System.out.println("[Method signature is " + methodSig + "]");<NEW_LINE>}<NEW_LINE>if (className.startsWith(Values.SIG_ARRAY_PREFIX)) {<NEW_LINE>// Java 1.5 allows array classes to appear as the class name<NEW_LINE>className = Values.DOTTED_JAVA_LANG_OBJECT;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return thisOrNothing(findInvocationLeastUpperBound(getXClassFromDottedClassName(className), methodName, methodSig, opcode == Const.INVOKESTATIC, opcode <MASK><NEW_LINE>} catch (CheckedAnalysisException e) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
== Const.INVOKEINTERFACE), methodChooser);
629,190
// from grammar, things that can be inside struct-field block<NEW_LINE>private void convertCommonFieldSettings(SDField field, ParsedField parsed) {<NEW_LINE>convertMatchSettings(field, parsed.matchSettings());<NEW_LINE><MASK><NEW_LINE>if (indexing.isPresent()) {<NEW_LINE>field.setIndexingScript(indexing.get().script());<NEW_LINE>}<NEW_LINE>parsed.getWeight().ifPresent(value -> field.setWeight(value));<NEW_LINE>parsed.getStemming().ifPresent(value -> field.setStemming(value));<NEW_LINE>parsed.getNormalizing().ifPresent(value -> convertNormalizing(field, value));<NEW_LINE>for (var attribute : parsed.getAttributes()) {<NEW_LINE>convertAttribute(field, attribute);<NEW_LINE>}<NEW_LINE>for (var summaryField : parsed.getSummaryFields()) {<NEW_LINE>var dataType = field.getDataType();<NEW_LINE>var otherType = summaryField.getType();<NEW_LINE>if (otherType != null) {<NEW_LINE>dataType = context.resolveType(otherType);<NEW_LINE>}<NEW_LINE>convertSummaryField(field, summaryField, dataType);<NEW_LINE>}<NEW_LINE>for (String command : parsed.getQueryCommands()) {<NEW_LINE>field.addQueryCommand(command);<NEW_LINE>}<NEW_LINE>for (var structField : parsed.getStructFields()) {<NEW_LINE>convertStructField(field, structField);<NEW_LINE>}<NEW_LINE>}
var indexing = parsed.getIndexing();
695,514
private View buildView() {<NEW_LINE>final View result = View.inflate(getContext(), R.layout.dialog_main, null);<NEW_LINE>editText = result.findViewById(R.id.main_dialog_chat_bottom_message_edittext);<NEW_LINE>rootView = result.findViewById(R.id.main_dialog_root_view);<NEW_LINE>emojiButton = result.<MASK><NEW_LINE>final ImageView sendButton = result.findViewById(R.id.main_dialog_send);<NEW_LINE>emojiButton.setColorFilter(ContextCompat.getColor(getContext(), R.color.emoji_icons), PorterDuff.Mode.SRC_IN);<NEW_LINE>sendButton.setColorFilter(ContextCompat.getColor(getContext(), R.color.emoji_icons), PorterDuff.Mode.SRC_IN);<NEW_LINE>emojiButton.setOnClickListener(ignore -> emojiPopup.toggle());<NEW_LINE>sendButton.setOnClickListener(ignore -> {<NEW_LINE>final String text = editText.getText().toString().trim();<NEW_LINE>if (text.length() > 0) {<NEW_LINE>chatAdapter.add(text);<NEW_LINE>editText.setText("");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>final RecyclerView recyclerView = result.findViewById(R.id.main_dialog_recycler_view);<NEW_LINE>recyclerView.setAdapter(chatAdapter);<NEW_LINE>recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), RecyclerView.VERTICAL, false));<NEW_LINE>setUpEmojiPopup();<NEW_LINE>return rootView;<NEW_LINE>}
findViewById(R.id.main_dialog_emoji);
415,355
public FloatBuffer fillFloatBuffer(FloatBuffer fb, boolean columnMajor) {<NEW_LINE>// if (columnMajor){<NEW_LINE>// fb.put(m00).put(m10).put(m20);<NEW_LINE>// fb.put(m01).put(m11).put(m21);<NEW_LINE>// fb.put(m02).put(m12).put(m22);<NEW_LINE>// }else{<NEW_LINE>// fb.put(m00).put(m01).put(m02);<NEW_LINE>// fb.put(m10).put(m11).put(m12);<NEW_LINE>// fb.put(m20).put(m21).put(m22);<NEW_LINE>// }<NEW_LINE>TempVars vars = TempVars.get();<NEW_LINE><MASK><NEW_LINE>fb.put(vars.matrixWrite, 0, 9);<NEW_LINE>vars.release();<NEW_LINE>return fb;<NEW_LINE>}
fillFloatArray(vars.matrixWrite, columnMajor);
725,189
private void addInnerConfigurationMethod(GeneratorAdapter staticInit) {<NEW_LINE>if (isConfigurationProperties) {<NEW_LINE>if (beanTypeInnerClasses.size() > 0) {<NEW_LINE>classWriter.visitField(ACC_PRIVATE | ACC_FINAL | ACC_STATIC, FIELD_INNER_CLASSES, Type.getType(Set.class).<MASK><NEW_LINE>pushStoreClassesAsSet(staticInit, beanTypeInnerClasses.toArray(new String[0]));<NEW_LINE>staticInit.putStatic(beanDefinitionType, FIELD_INNER_CLASSES, Type.getType(Set.class));<NEW_LINE>GeneratorAdapter isInnerConfigurationMethod = startProtectedMethod(classWriter, "isInnerConfiguration", boolean.class.getName(), Class.class.getName());<NEW_LINE>isInnerConfigurationMethod.getStatic(beanDefinitionType, FIELD_INNER_CLASSES, Type.getType(Set.class));<NEW_LINE>isInnerConfigurationMethod.loadArg(0);<NEW_LINE>isInnerConfigurationMethod.invokeInterface(Type.getType(Collection.class), org.objectweb.asm.commons.Method.getMethod(ReflectionUtils.getRequiredMethod(Collection.class, "contains", Object.class)));<NEW_LINE>isInnerConfigurationMethod.returnValue();<NEW_LINE>isInnerConfigurationMethod.visitMaxs(1, 1);<NEW_LINE>isInnerConfigurationMethod.visitEnd();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getDescriptor(), null, null);
1,080,825
protected void handleDeclaringTypeNodes(NodeList list) {<NEW_LINE>for (int i = 0, n = list.getLength(); i < n; i += 1) {<NEW_LINE>Node node = list.item(i);<NEW_LINE>if (node instanceof Element) {<NEW_LINE>Element element = (Element) node;<NEW_LINE>if (element.getNodeName().equals(SuggestionElementStatics.DECLARING_TYPE)) {<NEW_LINE>String declaringTypeName = <MASK><NEW_LINE>NodeList suggestions = element.getChildNodes();<NEW_LINE>for (int j = 0; j < suggestions.getLength(); j++) {<NEW_LINE>Node suggNode = suggestions.item(j);<NEW_LINE>if (suggNode instanceof Element) {<NEW_LINE>SuggestionDescriptor descriptor = getSuggestionDescriptor((Element) suggNode, declaringTypeName);<NEW_LINE>if (descriptor != null) {<NEW_LINE>projectSuggestions.addSuggestion(descriptor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
element.getAttribute(SuggestionElementStatics.TYPE_ATT);
369,842
public IRubyObject op_cmp(ThreadContext context, IRubyObject other) {<NEW_LINE>final BigInteger otherValue;<NEW_LINE>if (other instanceof RubyFixnum) {<NEW_LINE>otherValue = fix2big((RubyFixnum) other);<NEW_LINE>} else if (other instanceof RubyBignum) {<NEW_LINE>otherValue = ((RubyBignum) other).value;<NEW_LINE>} else if (other instanceof RubyFloat) {<NEW_LINE>RubyFloat flt = (RubyFloat) other;<NEW_LINE>if (flt.isInfinite()) {<NEW_LINE>if (flt.value > 0.0)<NEW_LINE>return RubyFixnum.minus_one(context.runtime);<NEW_LINE>return RubyFixnum.one(context.runtime);<NEW_LINE>}<NEW_LINE>return dbl_cmp(context.runtime, big2dbl(this), flt.value);<NEW_LINE>} else {<NEW_LINE>return coerceCmp(context, sites<MASK><NEW_LINE>}<NEW_LINE>// wow, the only time we can use the java protocol ;)<NEW_LINE>return RubyFixnum.newFixnum(context.runtime, value.compareTo(otherValue));<NEW_LINE>}
(context).op_cmp, other);
731,334
private void installFile(File file, String groupId, String artifactId, String version, String classifier, String packaging) throws MojoExecutionException {<NEW_LINE>InvocationRequest request = new DefaultInvocationRequest();<NEW_LINE>// request.setPomFile( new File( "/path/to/pom.xml" ) );<NEW_LINE>request.setGoals(Collections.singletonList("install:install-file"));<NEW_LINE>Properties props = new Properties();<NEW_LINE>props.setProperty("file", file.getAbsolutePath());<NEW_LINE>props.setProperty("groupId", groupId);<NEW_LINE>props.setProperty("artifactId", artifactId);<NEW_LINE>props.setProperty("packaging", packaging);<NEW_LINE>props.setProperty("version", version);<NEW_LINE>props.setProperty("interactiveMode", "false");<NEW_LINE>if (classifier != null)<NEW_LINE>props.setProperty("classifier", classifier);<NEW_LINE>props.setProperty("localRepositoryPath", cn1libsDirectory.getAbsolutePath());<NEW_LINE>request.setProperties(props);<NEW_LINE>Invoker invoker = new DefaultInvoker();<NEW_LINE>try {<NEW_LINE>invoker.execute(request);<NEW_LINE>} catch (MavenInvocationException ex) {<NEW_LINE>throw new MojoExecutionException(<MASK><NEW_LINE>}<NEW_LINE>}
ex.getMessage(), ex);
1,660,610
void allSlotsInOptionalInfoDo() throws CorruptDataException {<NEW_LINE>U32Pointer optionalInfo = J9ROMClassHelper.optionalInfo(romClass);<NEW_LINE>SelfRelativePointer cursor = SelfRelativePointer.cast(optionalInfo);<NEW_LINE>if (romClass.optionalFlags().anyBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_SOURCE_FILE_NAME)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_ROM_UTF8, cursor, "optionalFileNameUTF8");<NEW_LINE>cursor = cursor.add(1);<NEW_LINE>}<NEW_LINE>if (romClass.optionalFlags().anyBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_GENERIC_SIGNATURE)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_ROM_UTF8, cursor, "optionalGenSigUTF8");<NEW_LINE>cursor = cursor.add(1);<NEW_LINE>}<NEW_LINE>if (romClass.optionalFlags().anyBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_SOURCE_DEBUG_EXTENSION)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_SRP, cursor, "optionalSourceDebugExtSRP");<NEW_LINE>allSlotsInSourceDebugExtensionDo(J9SourceDebugExtensionPointer.cast(cursor.get()));<NEW_LINE>cursor = cursor.add(1);<NEW_LINE>}<NEW_LINE>if (romClass.optionalFlags().anyBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_ENCLOSING_METHOD)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_SRP, cursor, "optionalEnclosingMethodSRP");<NEW_LINE>allSlotsInEnclosingObjectDo(J9EnclosingObjectPointer.cast(cursor.get()));<NEW_LINE>cursor = cursor.add(1);<NEW_LINE>}<NEW_LINE>if (romClass.optionalFlags().anyBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_SIMPLE_NAME)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_ROM_UTF8, cursor, "optionalSimpleNameUTF8");<NEW_LINE>cursor = cursor.add(1);<NEW_LINE>}<NEW_LINE>if (romClass.optionalFlags().allBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_VERIFY_EXCLUDE)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_U32, cursor, "optionalVerifyExclude");<NEW_LINE>cursor = cursor.add(1);<NEW_LINE>}<NEW_LINE>if (romClass.optionalFlags().allBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_CLASS_ANNOTATION_INFO)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_SRP, cursor, "classAnnotationsSRP");<NEW_LINE>allSlotsInAnnotationDo(U32Pointer.cast(cursor.get()), "classAnnotations");<NEW_LINE>cursor = cursor.add(1);<NEW_LINE>}<NEW_LINE>if (romClass.optionalFlags().allBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_RECORD_ATTRIBUTE)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_SRP, cursor, "recordAttributeSRP");<NEW_LINE>recordAttributeDo(U32Pointer.cast(cursor.get()));<NEW_LINE>cursor = cursor.add(1);<NEW_LINE>}<NEW_LINE>if (romClass.optionalFlags().allBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_PERMITTEDSUBCLASSES_ATTRIBUTE)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_SRP, cursor, "permittedSubclassesAttributeSRP");<NEW_LINE>permittedSubclassAttributeDo(U32Pointer.cast(cursor.get()));<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (ValueTypeHelper.getValueTypeHelper().areValueTypesSupported()) {<NEW_LINE>if (romClass.optionalFlags().allBitsIn(J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_INJECTED_INTERFACE_INFO)) {<NEW_LINE>classWalkerCallback.addSlot(clazz, SlotType.J9_SRP, cursor, "optionalInjectedInterfaces");<NEW_LINE>cursor = cursor.add(1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>classWalkerCallback.addSection(clazz, optionalInfo, cursor.getAddress() - optionalInfo.getAddress(), "optionalInfo", true);<NEW_LINE>}
cursor = cursor.add(1);
176,566
private static boolean open(FileObject fo, String generate) {<NEW_LINE>if (fo == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!fo.isValid()) {<NEW_LINE>if (generate != null) {<NEW_LINE>try (OutputStream os = fo.getOutputStream()) {<NEW_LINE>os.write(generate.getBytes(StandardCharsets.UTF_8));<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Exceptions.printStackTrace(Exceptions.attachLocalizedMessage(ex, Bundle.MSG_CannotGenerate(fo)));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>fo = fo.getParent().getFileObject(fo.getNameExt());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Openable o = fo.getLookup(<MASK><NEW_LINE>if (o != null) {<NEW_LINE>o.open();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Editable e = fo.getLookup().lookup(Editable.class);<NEW_LINE>if (e != null) {<NEW_LINE>e.edit();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
).lookup(Openable.class);
248,044
public String convertValueToString(Object cell) {<NEW_LINE>final StringWriter stringWriter = new StringWriter();<NEW_LINE>HashMap<String, Object> scopes = new HashMap<>();<NEW_LINE>Object value = getModel().getValue(cell);<NEW_LINE>if (value instanceof AccountDeviceInstanceKey) {<NEW_LINE>final AccountDeviceInstanceKey adiKey = (AccountDeviceInstanceKey) value;<NEW_LINE>scopes.put("accountName", adiKey.getAccountDeviceInstance().<MASK><NEW_LINE>scopes.put("size", Math.round(Math.log(adiKey.getMessageCount()) + 5));<NEW_LINE>scopes.put("iconFileName", CommunicationsGraph.class.getResource(Utils.getIconFilePath(adiKey.getAccountDeviceInstance().getAccount().getAccountType())));<NEW_LINE>scopes.put("pinned", pinnedAccountModel.isAccountPinned(adiKey.getAccountDeviceInstance()));<NEW_LINE>scopes.put("MARKER_PIN_URL", MARKER_PIN_URL);<NEW_LINE>scopes.put("locked", lockedVertexModel.isVertexLocked((mxCell) cell));<NEW_LINE>scopes.put("LOCK_URL", LOCK_URL);<NEW_LINE>labelMustache.execute(stringWriter, scopes);<NEW_LINE>return stringWriter.toString();<NEW_LINE>} else {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>}
getAccount().getTypeSpecificID());
1,537,661
public org.osmdroid.views.overlay.Polygon toPolygon(Polygon polygon) {<NEW_LINE>org.osmdroid.views.overlay.Polygon newPoloygon = new org.osmdroid.views.overlay.Polygon();<NEW_LINE>List<GeoPoint> pts = new ArrayList<>();<NEW_LINE>List<List<GeoPoint>> holes = new ArrayList<>();<NEW_LINE>List<LineString> rings = polygon.getRings();<NEW_LINE>if (!rings.isEmpty()) {<NEW_LINE>Double z = null;<NEW_LINE>// Add the polygon points<NEW_LINE>LineString polygonLineString = rings.get(0);<NEW_LINE>for (Point point : polygonLineString.getPoints()) {<NEW_LINE>GeoPoint latLng = toLatLng(point);<NEW_LINE>pts.add(latLng);<NEW_LINE>}<NEW_LINE>// Add the holes<NEW_LINE>for (int i = 1; i < rings.size(); i++) {<NEW_LINE>LineString <MASK><NEW_LINE>List<GeoPoint> holeLatLngs = new ArrayList<GeoPoint>();<NEW_LINE>for (Point point : hole.getPoints()) {<NEW_LINE>GeoPoint latLng = toLatLng(point);<NEW_LINE>holeLatLngs.add(latLng);<NEW_LINE>if (point.hasZ()) {<NEW_LINE>z = (z == null) ? point.getZ() : Math.max(z, point.getZ());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>holes.add(holeLatLngs);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>newPoloygon.setPoints(pts);<NEW_LINE>newPoloygon.setHoles(holes);<NEW_LINE>if (polygonOptions != null) {<NEW_LINE>newPoloygon.getFillPaint().setColor(polygonOptions.getFillColor());<NEW_LINE>newPoloygon.getOutlinePaint().setColor(polygonOptions.getStrokeColor());<NEW_LINE>newPoloygon.getOutlinePaint().setStrokeWidth(polygonOptions.getStrokeWidth());<NEW_LINE>newPoloygon.setTitle(polygonOptions.getTitle());<NEW_LINE>}<NEW_LINE>return newPoloygon;<NEW_LINE>}
hole = rings.get(i);
1,487,638
private void readJMX(ParserConfig config) {<NEW_LINE>ArrayList<Node> nodeList = null;<NEW_LINE>try {<NEW_LINE>nodeList = getNodeList("scouter/jmx");<NEW_LINE>if (nodeList == null || nodeList.size() == 0)<NEW_LINE>return;<NEW_LINE>int count = 100;<NEW_LINE>int interval = 10000;<NEW_LINE>String path = ".";<NEW_LINE>Node jmxNode = nodeList.get(0);<NEW_LINE>ArrayList<Node> list = getNodeList(jmxNode, "count");<NEW_LINE>if (list != null && list.size() > 0) {<NEW_LINE>count = Integer.parseInt(getValue(list.get(0)));<NEW_LINE>}<NEW_LINE>list = getNodeList(jmxNode, "interval");<NEW_LINE>if (list != null && list.size() > 0) {<NEW_LINE>interval = Integer.parseInt(getValue(list.get(0)));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (list != null && list.size() > 0) {<NEW_LINE>path = getValue(list.get(0));<NEW_LINE>}<NEW_LINE>System.out.println("JMX: count " + count + ", interval " + interval + ", path " + path);<NEW_LINE>config.setJMXConfig(count, interval, path);<NEW_LINE>readJMXserver(jmxNode, config);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>System.err.println(ex.getMessage());<NEW_LINE>}<NEW_LINE>}
list = getNodeList(jmxNode, "path");
1,207,742
private JPanel build(String messageText, Icon icon, String initialValue) {<NEW_LINE>JPanel dataPanel = new JPanel(new BorderLayout());<NEW_LINE>inputTextArea = new JTextArea(10, 50);<NEW_LINE>DockingUtils.installUndoRedo(inputTextArea);<NEW_LINE>inputTextArea.addKeyListener(new KeyAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void keyPressed(KeyEvent e) {<NEW_LINE>KeyStroke keyStrokeForEvent = KeyStroke.getKeyStrokeForEvent(e);<NEW_LINE>if (SUBMIT_KEYSTROKE.equals(keyStrokeForEvent)) {<NEW_LINE>okCallback();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>inputTextArea.setLineWrap(true);<NEW_LINE>inputTextArea.setWrapStyleWord(true);<NEW_LINE>if (initialValue != null) {<NEW_LINE>inputTextArea.setText(initialValue);<NEW_LINE>}<NEW_LINE>inputTextArea.selectAll();<NEW_LINE>JLabel messageLabel = new GDLabel();<NEW_LINE>messageLabel.setText(messageText);<NEW_LINE>messageLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));<NEW_LINE>String metaKeyText = "Control";<NEW_LINE>OperatingSystem OS = Platform.CURRENT_PLATFORM.getOperatingSystem();<NEW_LINE>if (OS == OperatingSystem.MAC_OS_X) {<NEW_LINE>metaKeyText = "Command";<NEW_LINE>}<NEW_LINE>JLabel hintLabel = new <MASK><NEW_LINE>hintLabel.setHorizontalAlignment(SwingConstants.CENTER);<NEW_LINE>Font font = hintLabel.getFont();<NEW_LINE>Font smallerFont = font.deriveFont(12F);<NEW_LINE>Font smallItalicFont = smallerFont.deriveFont(Font.ITALIC);<NEW_LINE>hintLabel.setFont(smallItalicFont);<NEW_LINE>hintLabel.setForeground(Color.LIGHT_GRAY);<NEW_LINE>dataPanel.add(messageLabel, BorderLayout.NORTH);<NEW_LINE>dataPanel.add(new JScrollPane(inputTextArea), BorderLayout.CENTER);<NEW_LINE>dataPanel.add(hintLabel, BorderLayout.SOUTH);<NEW_LINE>JLabel iconLabel = new GDLabel();<NEW_LINE>iconLabel.setIcon(icon);<NEW_LINE>iconLabel.setVerticalAlignment(SwingConstants.TOP);<NEW_LINE>JPanel separatorPanel = new JPanel();<NEW_LINE>separatorPanel.setPreferredSize(new Dimension(15, 1));<NEW_LINE>JPanel iconPanel = new JPanel(new BorderLayout());<NEW_LINE>iconPanel.add(iconLabel, BorderLayout.CENTER);<NEW_LINE>iconPanel.add(separatorPanel, BorderLayout.EAST);<NEW_LINE>JPanel workPanel = new JPanel(new BorderLayout());<NEW_LINE>workPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));<NEW_LINE>workPanel.add(iconPanel, BorderLayout.WEST);<NEW_LINE>workPanel.add(dataPanel, BorderLayout.CENTER);<NEW_LINE>return workPanel;<NEW_LINE>}
GLabel("(" + metaKeyText + "-Enter to accept)");
958,618
private Image annotateFolderIcon(VCSContext context, Image icon) {<NEW_LINE>boolean isVersioned = false;<NEW_LINE>for (Iterator i = context.getRootFiles().iterator(); i.hasNext(); ) {<NEW_LINE>File file = (File) i.next();<NEW_LINE>FileInformation info = cache.markAsSeenInUI(file);<NEW_LINE>if (info != null && (info.getStatus() & STATUS_BADGEABLE) != 0) {<NEW_LINE>isVersioned = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!isVersioned) {<NEW_LINE>return icon;<NEW_LINE>}<NEW_LINE>Image badge = null;<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>LOG.log(Level.FINE, "annotateFolderIcon(): for {0}", new Object[] { context.getRootFiles() });<NEW_LINE>}<NEW_LINE>if (cache.containsFileOfStatus(context, FileInformation.STATUS_VERSIONED_CONFLICT, true)) {<NEW_LINE>badge = ImageUtilities.assignToolTipToImage(ImageUtilities.loadImage(badgeConflicts, true), toolTipConflict);<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>LOG.log(Level.FINE, "annotateFolderIcon(): contains conflict");<NEW_LINE>}<NEW_LINE>} else if (cache.containsFileOfStatus(context, FileInformation.STATUS_LOCAL_CHANGE, true)) {<NEW_LINE>badge = ImageUtilities.assignToolTipToImage(ImageUtilities.loadImage(badgeModified, true), toolTipModified);<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>LOG.log(Level.FINE, "annotateFolderIcon(): contains local change");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (badge != null) {<NEW_LINE>return ImageUtilities.mergeImages(<MASK><NEW_LINE>} else {<NEW_LINE>return icon;<NEW_LINE>}<NEW_LINE>}
icon, badge, 16, 9);
1,257,828
@Decompress<NEW_LINE>@Path("batch")<NEW_LINE>@Status(Status.CREATED)<NEW_LINE>@Consumes(APPLICATION_JSON)<NEW_LINE>@Produces(APPLICATION_JSON_WITH_CHARSET)<NEW_LINE>@RolesAllowed({ "admin", "$owner=$graph $action=edge_write" })<NEW_LINE>public String create(@Context HugeConfig config, @Context GraphManager manager, @PathParam("graph") String graph, @QueryParam("check_vertex") @DefaultValue("true") boolean checkVertex, List<JsonEdge> jsonEdges) {<NEW_LINE>LOG.debug("Graph [{}] create edges: {}", graph, jsonEdges);<NEW_LINE>checkCreatingBody(jsonEdges);<NEW_LINE>checkBatchSize(config, jsonEdges);<NEW_LINE>HugeGraph g = graph(manager, graph);<NEW_LINE>TriFunction<HugeGraph, Object, String, Vertex> getVertex = checkVertex ? EdgeAPI::getVertex : EdgeAPI::newVertex;<NEW_LINE>return this.commit(config, g, jsonEdges.size(), () -> {<NEW_LINE>List<Id> ids = new ArrayList<>(jsonEdges.size());<NEW_LINE>for (JsonEdge jsonEdge : jsonEdges) {<NEW_LINE>Vertex srcVertex = getVertex.apply(g, jsonEdge.source, jsonEdge.sourceLabel);<NEW_LINE>Vertex tgtVertex = getVertex.apply(g, <MASK><NEW_LINE>Edge edge = srcVertex.addEdge(jsonEdge.label, tgtVertex, jsonEdge.properties());<NEW_LINE>ids.add((Id) edge.id());<NEW_LINE>}<NEW_LINE>return manager.serializer(g).writeIds(ids);<NEW_LINE>});<NEW_LINE>}
jsonEdge.target, jsonEdge.targetLabel);
1,557,121
static RealVector makeValues(PreferenceDomain domain) {<NEW_LINE>if (!domain.hasPrecision()) {<NEW_LINE>throw new IllegalArgumentException("domain is not discrete");<NEW_LINE>}<NEW_LINE>final double min = domain.getMinimum();<NEW_LINE>final double max = domain.getMaximum();<NEW_LINE>final double prec = domain.getPrecision();<NEW_LINE>final double nv = (max - min) / prec;<NEW_LINE>int n = (int) nv;<NEW_LINE>if (Math.abs(nv - n) > 1.0e-6) {<NEW_LINE>// one more to cover everything...<NEW_LINE>n += 1;<NEW_LINE>}<NEW_LINE>if (n == 0) {<NEW_LINE>throw new IllegalArgumentException("range has no elements");<NEW_LINE>}<NEW_LINE>double[] values = new double[n + 1];<NEW_LINE>for (int i = 0; i <= n; i++) {<NEW_LINE>values[i] <MASK><NEW_LINE>}<NEW_LINE>return new ArrayRealVector(values);<NEW_LINE>}
= min + (prec * i);
1,815,286
// Stolen from org.openide.util.Utilities:<NEW_LINE>private static <T> List<T> topologicalSort(Collection<T> c, Map<? super T, ? extends Collection<? extends T>> edges) throws TopologicalSortException {<NEW_LINE>Map<T, Boolean> finished = new HashMap<>();<NEW_LINE>List<T> r = new ArrayList<>(Math.max(c.size(), 1));<NEW_LINE>List<T> cRev = new ArrayList<>(c);<NEW_LINE>Collections.reverse(cRev);<NEW_LINE>Iterator<T> it = cRev.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>List<T> cycle = visit(it.next(), edges, finished, r);<NEW_LINE>if (cycle != null) {<NEW_LINE>throw new TopologicalSortException(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.reverse(r);<NEW_LINE>if (r.size() != c.size()) {<NEW_LINE>r.retainAll(c);<NEW_LINE>}<NEW_LINE>return r;<NEW_LINE>}
"Cycle detected: " + cycle.toString());
893,138
protected void renderItemStack(T te, @Nonnull World world, double x, double y, double z, float tick) {<NEW_LINE>EntityItem ei = this.enityItem;<NEW_LINE>if (ei == null) {<NEW_LINE>this.enityItem = ei = new EntityItem(world, 0, 0, 0, getFloatingItem(te));<NEW_LINE>}<NEW_LINE>ei.setItem(getFloatingItem(te));<NEW_LINE>ei.hoverStart = (float) ((EnderIO.proxy.getTickCount() * 0.05f + (tick * 0.05f)) % (Math.PI * 2));<NEW_LINE>RenderUtil.bindBlockTexture();<NEW_LINE>GlStateManager.pushMatrix();<NEW_LINE>glTranslated(x + 0.5, y + 0.7, z + 0.5);<NEW_LINE>glScalef(1.1f, 1.1f, 1.1f);<NEW_LINE>BlockPos p;<NEW_LINE>if (te != null) {<NEW_LINE>p = te.getPos();<NEW_LINE>} else {<NEW_LINE>p = new <MASK><NEW_LINE>}<NEW_LINE>rand.setSeed(p.getX() + p.getY() + p.getZ());<NEW_LINE>rand.nextBoolean();<NEW_LINE>if (Minecraft.getMinecraft().gameSettings.fancyGraphics) {<NEW_LINE>GlStateManager.rotate(rand.nextFloat() * 360f, 0, 1, 0);<NEW_LINE>}<NEW_LINE>ei.hoverStart += rand.nextFloat();<NEW_LINE>GlStateManager.translate(0, -0.15f, 0);<NEW_LINE>if (rei == null) {<NEW_LINE>rei = new InnerRenderEntityItem(Minecraft.getMinecraft().getRenderManager(), Minecraft.getMinecraft().getRenderItem());<NEW_LINE>}<NEW_LINE>rei.doRender(ei, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);<NEW_LINE>GlStateManager.popMatrix();<NEW_LINE>}
BlockPos(0, 0, 0);
1,741,645
public Node rewriteCastExpression(CastExpression castExpression) {<NEW_LINE><MASK><NEW_LINE>TypeDescriptor fromType = fromExpression.getTypeDescriptor();<NEW_LINE>TypeDescriptor toType = castExpression.getTypeDescriptor();<NEW_LINE>if (!isBasicType(toType) || !isBasicType(fromType)) {<NEW_LINE>return castExpression;<NEW_LINE>}<NEW_LINE>PrimitiveTypeDescriptor fromPrimitiveType = fromType.toUnboxedType();<NEW_LINE>PrimitiveTypeDescriptor toPrimitiveType = toType.toUnboxedType();<NEW_LINE>// Skip conversion if not needed.<NEW_LINE>if (fromPrimitiveType.equals(toPrimitiveType)) {<NEW_LINE>return fromExpression;<NEW_LINE>}<NEW_LINE>// Primitive char needs to be converted first to int through ".code".<NEW_LINE>if (isPrimitiveChar(fromPrimitiveType)) {<NEW_LINE>fromExpression = convertCharCode(fromExpression);<NEW_LINE>fromPrimitiveType = PrimitiveTypes.INT;<NEW_LINE>}<NEW_LINE>// Conversion to char must go through int.<NEW_LINE>if (isPrimitiveChar(toPrimitiveType) && !isPrimitiveInt(fromPrimitiveType)) {<NEW_LINE>fromExpression = convertTo(fromExpression, PrimitiveTypes.INT);<NEW_LINE>fromPrimitiveType = PrimitiveTypes.INT;<NEW_LINE>}<NEW_LINE>// Conversion from float/double to a type that is narrower than int must go through int.<NEW_LINE>if (isPrimitiveFloatOrDouble(fromPrimitiveType) && PrimitiveTypes.INT.isWiderThan(toPrimitiveType)) {<NEW_LINE>fromExpression = convertTo(fromExpression, PrimitiveTypes.INT);<NEW_LINE>fromPrimitiveType = PrimitiveTypes.INT;<NEW_LINE>}<NEW_LINE>// Apply final conversion if needed.<NEW_LINE>return fromPrimitiveType.equals(toPrimitiveType) ? fromExpression : convertTo(fromExpression, toPrimitiveType);<NEW_LINE>}
Expression fromExpression = castExpression.getExpression();
1,468,386
public static FileInfo parseFilename(String filename) throws ParseException {<NEW_LINE>if (filename == null) {<NEW_LINE>throw new ParseException("The filename must not be null", 0);<NEW_LINE>}<NEW_LINE>final String ext = ".json";<NEW_LINE>if (!filename.endsWith(ext)) {<NEW_LINE>throwBadFormat(filename);<NEW_LINE>}<NEW_LINE>filename = filename.substring(0, filename.length() - ext.length());<NEW_LINE>final String delim = "-";<NEW_LINE>String[] <MASK><NEW_LINE>if (parts.length < 3) {<NEW_LINE>throwBadFormat(filename);<NEW_LINE>}<NEW_LINE>filename = TextUtils.join(delim, Arrays.copyOf(parts, parts.length - 2));<NEW_LINE>if (!filename.equals(FILENAME_PREFIX)) {<NEW_LINE>throwBadFormat(filename);<NEW_LINE>}<NEW_LINE>Date date = _dateFormat.parse(parts[parts.length - 2] + delim + parts[parts.length - 1]);<NEW_LINE>if (date == null) {<NEW_LINE>throwBadFormat(filename);<NEW_LINE>}<NEW_LINE>return new FileInfo(filename, date);<NEW_LINE>}
parts = filename.split(delim);
106,405
private void project4(double[] output) {<NEW_LINE>int observationIndex = 0;<NEW_LINE>for (int viewIndex = 0; viewIndex < structure.views.size; viewIndex++) {<NEW_LINE>SceneStructureMetric.View view = structure.views.get(viewIndex);<NEW_LINE>SceneStructureCommon.Camera camera = structure.cameras.get(view.camera);<NEW_LINE>Se3_F64 world_to_view = lookupWorldToView(view);<NEW_LINE>// =========== Project General Points in this View<NEW_LINE>{<NEW_LINE>SceneObservations.View obsView = observations.views.get(viewIndex);<NEW_LINE>for (int i = 0; i < obsView.size(); i++) {<NEW_LINE>obsView.getPixel(i, observedPixel);<NEW_LINE>SceneStructureCommon.Point worldPt = structure.points.data[observedPixel.index];<NEW_LINE>worldPt.get(p4);<NEW_LINE>// TODO Explain why this is correct. The last row is omitted when converted to 3D<NEW_LINE>SePointOps_F64.transformV(world_to_view, p4, cameraPt);<NEW_LINE>camera.model.project(cameraPt.x, cameraPt.y, cameraPt.z, predictedPixel);<NEW_LINE>int outputIndex = observationIndex * 2;<NEW_LINE>output[outputIndex] = predictedPixel.x - observedPixel.p.x;<NEW_LINE>output[outputIndex + 1] = predictedPixel.y - observedPixel.p.y;<NEW_LINE>observationIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// =========== Project Rigid Object Points in this View<NEW_LINE>if (observations.hasRigid()) {<NEW_LINE>SceneObservations.View obsView = <MASK><NEW_LINE>for (int i = 0; i < obsView.size(); i++) {<NEW_LINE>obsView.getPixel(i, observedPixel);<NEW_LINE>// Use lookup table to figure out which rigid object it belongs to<NEW_LINE>int rigidIndex = structure.lookupRigid[observedPixel.index];<NEW_LINE>SceneStructureMetric.Rigid rigid = structure.rigids.get(rigidIndex);<NEW_LINE>// Compute the point's index on the rigid object<NEW_LINE>int pointIndex = observedPixel.index - rigid.indexFirst;<NEW_LINE>// Load the 3D location of point on the rigid body<NEW_LINE>SceneStructureCommon.Point objectPt = rigid.points[pointIndex];<NEW_LINE>objectPt.get(p4);<NEW_LINE>// Transform to world frame and from world to camera<NEW_LINE>SePointOps_F64.transformV(rigid.object_to_world, p4, worldPt);<NEW_LINE>SePointOps_F64.transform(world_to_view, worldPt, cameraPt);<NEW_LINE>camera.model.project(cameraPt.x, cameraPt.y, cameraPt.z, predictedPixel);<NEW_LINE>int outputIndex = observationIndex * 2;<NEW_LINE>output[outputIndex] = predictedPixel.x - observedPixel.p.x;<NEW_LINE>output[outputIndex + 1] = predictedPixel.y - observedPixel.p.y;<NEW_LINE>observationIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
observations.viewsRigid.get(viewIndex);
1,042,248
private State createStateForType(PlugwiseCommandType ctype, Object value) throws BindingConfigParseException {<NEW_LINE>Class<? extends Type> typeClass = ctype.getTypeClass();<NEW_LINE>// the logic below covers all possible command types and value types<NEW_LINE>if (typeClass == DecimalType.class && value instanceof Float) {<NEW_LINE>return new DecimalType((Float) value);<NEW_LINE>} else if (typeClass == DecimalType.class && value instanceof Double) {<NEW_LINE>return new DecimalType((Double) value);<NEW_LINE>} else if (typeClass == OnOffType.class && value instanceof Boolean) {<NEW_LINE>return ((Boolean) value).booleanValue() ? OnOffType.ON : OnOffType.OFF;<NEW_LINE>} else if (typeClass == DateTimeType.class && value instanceof Calendar) {<NEW_LINE>return <MASK><NEW_LINE>} else if (typeClass == DateTimeType.class && value instanceof DateTime) {<NEW_LINE>return new DateTimeType(((DateTime) value).toCalendar(Locale.getDefault()));<NEW_LINE>} else if (typeClass == StringType.class && value instanceof String) {<NEW_LINE>return new StringType((String) value);<NEW_LINE>}<NEW_LINE>logger.debug("less efficient (generic) logic is applied for converting a Plugwise value " + "(command type class: {}, value class {})", typeClass.getName(), value.getClass().getName());<NEW_LINE>List<Class<? extends State>> stateTypeList = new ArrayList<Class<? extends State>>();<NEW_LINE>stateTypeList.add((Class<? extends State>) typeClass);<NEW_LINE>return TypeParser.parseState(stateTypeList, value.toString());<NEW_LINE>}
new DateTimeType((Calendar) value);
1,778,421
final DescribeUserPoolResult executeDescribeUserPool(DescribeUserPoolRequest describeUserPoolRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeUserPoolRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeUserPoolRequest> request = null;<NEW_LINE>Response<DescribeUserPoolResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeUserPoolRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeUserPoolRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Cognito Identity Provider");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeUserPool");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeUserPoolResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeUserPoolResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
58,549
public static ListDDLPublishRecordsResponse unmarshall(ListDDLPublishRecordsResponse listDDLPublishRecordsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDDLPublishRecordsResponse.setRequestId(_ctx.stringValue("ListDDLPublishRecordsResponse.RequestId"));<NEW_LINE>listDDLPublishRecordsResponse.setSuccess(_ctx.booleanValue("ListDDLPublishRecordsResponse.Success"));<NEW_LINE>listDDLPublishRecordsResponse.setErrorMessage(_ctx.stringValue("ListDDLPublishRecordsResponse.ErrorMessage"));<NEW_LINE>listDDLPublishRecordsResponse.setErrorCode(_ctx.stringValue("ListDDLPublishRecordsResponse.ErrorCode"));<NEW_LINE>List<DDLPublishRecord> dDLPublishRecordList = new ArrayList<DDLPublishRecord>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListDDLPublishRecordsResponse.DDLPublishRecordList.Length"); i++) {<NEW_LINE>DDLPublishRecord dDLPublishRecord = new DDLPublishRecord();<NEW_LINE>dDLPublishRecord.setAuditStatus(_ctx.stringValue<MASK><NEW_LINE>dDLPublishRecord.setAuditExpireTime(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].AuditExpireTime"));<NEW_LINE>dDLPublishRecord.setCreatorId(_ctx.longValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].CreatorId"));<NEW_LINE>dDLPublishRecord.setFinality(_ctx.booleanValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].Finality"));<NEW_LINE>dDLPublishRecord.setFinalityReason(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].FinalityReason"));<NEW_LINE>dDLPublishRecord.setPublishStatus(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishStatus"));<NEW_LINE>dDLPublishRecord.setRiskLevel(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].RiskLevel"));<NEW_LINE>dDLPublishRecord.setStatusDesc(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].StatusDesc"));<NEW_LINE>dDLPublishRecord.setWorkflowInstanceId(_ctx.longValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].WorkflowInstanceId"));<NEW_LINE>List<PublishTaskInfo> publishTaskInfoList = new ArrayList<PublishTaskInfo>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList.Length"); j++) {<NEW_LINE>PublishTaskInfo publishTaskInfo = new PublishTaskInfo();<NEW_LINE>publishTaskInfo.setDbId(_ctx.longValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].DbId"));<NEW_LINE>publishTaskInfo.setLogic(_ctx.booleanValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].Logic"));<NEW_LINE>publishTaskInfo.setPlanTime(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].PlanTime"));<NEW_LINE>publishTaskInfo.setPublishStrategy(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].PublishStrategy"));<NEW_LINE>publishTaskInfo.setStatusDesc(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].StatusDesc"));<NEW_LINE>publishTaskInfo.setTaskJobStatus(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].TaskJobStatus"));<NEW_LINE>List<PublishJob> publishJobList = new ArrayList<PublishJob>();<NEW_LINE>for (int k = 0; k < _ctx.lengthValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].PublishJobList.Length"); k++) {<NEW_LINE>PublishJob publishJob = new PublishJob();<NEW_LINE>publishJob.setExecuteCount(_ctx.longValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].PublishJobList[" + k + "].ExecuteCount"));<NEW_LINE>publishJob.setScripts(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].PublishJobList[" + k + "].Scripts"));<NEW_LINE>publishJob.setTableName(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].PublishJobList[" + k + "].TableName"));<NEW_LINE>publishJob.setStatusDesc(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].PublishJobList[" + k + "].StatusDesc"));<NEW_LINE>publishJob.setTaskJobStatus(_ctx.stringValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].PublishJobList[" + k + "].TaskJobStatus"));<NEW_LINE>publishJob.setDBTaskGroupId(_ctx.longValue("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].PublishTaskInfoList[" + j + "].PublishJobList[" + k + "].DBTaskGroupId"));<NEW_LINE>publishJobList.add(publishJob);<NEW_LINE>}<NEW_LINE>publishTaskInfo.setPublishJobList(publishJobList);<NEW_LINE>publishTaskInfoList.add(publishTaskInfo);<NEW_LINE>}<NEW_LINE>dDLPublishRecord.setPublishTaskInfoList(publishTaskInfoList);<NEW_LINE>dDLPublishRecordList.add(dDLPublishRecord);<NEW_LINE>}<NEW_LINE>listDDLPublishRecordsResponse.setDDLPublishRecordList(dDLPublishRecordList);<NEW_LINE>return listDDLPublishRecordsResponse;<NEW_LINE>}
("ListDDLPublishRecordsResponse.DDLPublishRecordList[" + i + "].AuditStatus"));
885,141
public void stretchDIBits(int dx, int dy, int dw, int dh, int sx, int sy, int sw, int sh, byte[] image, int usage, long rop) {<NEW_LINE>byte[] record = new byte[26 + (image.length + image.length % 2)];<NEW_LINE>int pos = 0;<NEW_LINE>pos = setUint32(record, pos, record.length / 2);<NEW_LINE>pos = setUint16(record, pos, RECORD_STRETCH_DIBITS);<NEW_LINE>pos = setUint32(record, pos, rop);<NEW_LINE>pos = setUint16(record, pos, usage);<NEW_LINE>pos = setInt16(record, pos, sh);<NEW_LINE>pos = setInt16(record, pos, sw);<NEW_LINE>pos = setInt16(record, pos, sy);<NEW_LINE>pos = setInt16(record, pos, sx);<NEW_LINE>pos = setInt16(record, pos, dw);<NEW_LINE>pos = setInt16(record, pos, dh);<NEW_LINE>pos = <MASK><NEW_LINE>pos = setInt16(record, pos, dx);<NEW_LINE>pos = setBytes(record, pos, image);<NEW_LINE>if (image.length % 2 == 1)<NEW_LINE>pos = setByte(record, pos, 0);<NEW_LINE>records.add(record);<NEW_LINE>}
setInt16(record, pos, dy);
285,751
public static List<Integer> parsePagesOption(String pagesSpec) throws ParseException {<NEW_LINE>if (pagesSpec.equals("all")) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<Integer> rv = new ArrayList<>();<NEW_LINE>String[] ranges = pagesSpec.split(",");<NEW_LINE>for (int i = 0; i < ranges.length; i++) {<NEW_LINE>String[] r = ranges[i].split("-");<NEW_LINE>if (r.length == 0 || !Utils.isNumeric(r[0]) || r.length > 1 && !Utils.isNumeric(r[1])) {<NEW_LINE>throw new ParseException("Syntax error in page range specification");<NEW_LINE>}<NEW_LINE>if (r.length < 2) {<NEW_LINE>rv.add(Integer.parseInt(r[0]));<NEW_LINE>} else {<NEW_LINE>int t = Integer.parseInt(r[0]);<NEW_LINE>int f = Integer.parseInt(r[1]);<NEW_LINE>if (t > f) {<NEW_LINE>throw new ParseException("Syntax error in page range specification");<NEW_LINE>}<NEW_LINE>rv.addAll(Utils.range<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.sort(rv);<NEW_LINE>return rv;<NEW_LINE>}
(t, f + 1));
415,424
private String buildRouterInfo(String ip, String domain, RouterConfig config) {<NEW_LINE>String group = m_configManager.queryServerGroupByIp(ip);<NEW_LINE>Domain domainConfig = m_configManager.getRouterConfig().findDomain(domain);<NEW_LINE>List<Server> servers = new ArrayList<Server>();<NEW_LINE>if (domainConfigNotExist(group, domainConfig)) {<NEW_LINE>if (config != null) {<NEW_LINE>Domain d = config.findDomain(domain);<NEW_LINE>if (d != null && d.findGroup(group) != null) {<NEW_LINE>servers = d.findGroup(group).getServers();<NEW_LINE>if (servers.isEmpty()) {<NEW_LINE>Cat.logError(new RuntimeException("Error when build router config, domain: " + domain));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (servers.isEmpty()) {<NEW_LINE>servers = <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>servers = domainConfig.findGroup(group).getServers();<NEW_LINE>}<NEW_LINE>return buildServerStr(servers);<NEW_LINE>}
m_configManager.queryServersByDomain(group, domain);
1,344,213
public Object _reflectiveCall(String className, Object instance, String methodName, ModuleLog L, Object... args) {<NEW_LINE>try {<NEW_LINE>L.d("cls " + className + ", inst " + instance);<NEW_LINE>className = className == null && instance != null ? instance.getClass().getName() : className;<NEW_LINE>Class<?> cls = instance == null ? Class.forName(className) : instance.getClass();<NEW_LINE>Class<?>[] types = null;<NEW_LINE>if (args != null && args.length > 0) {<NEW_LINE>types = new Class[args.length];<NEW_LINE>for (int i = 0; i < types.length; i++) {<NEW_LINE>types[i] = args[i].getClass();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Method method = cls.getDeclaredMethod(methodName, types);<NEW_LINE>return method.invoke(instance, args);<NEW_LINE>} catch (ClassNotFoundException t) {<NEW_LINE>L.w("Cannot call " + methodName + " of " + className, t);<NEW_LINE>return false;<NEW_LINE>} catch (NoSuchMethodException t) {<NEW_LINE>L.w("Cannot call " + <MASK><NEW_LINE>return false;<NEW_LINE>} catch (IllegalAccessException t) {<NEW_LINE>L.w("Cannot call " + methodName + " of " + className, t);<NEW_LINE>return false;<NEW_LINE>} catch (InvocationTargetException t) {<NEW_LINE>L.w("Cannot call " + methodName + " of " + className, t);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
methodName + " of " + className, t);
1,333,267
public static TaobaoFilmGetSchedulesResponse unmarshall(TaobaoFilmGetSchedulesResponse taobaoFilmGetSchedulesResponse, UnmarshallerContext _ctx) {<NEW_LINE>taobaoFilmGetSchedulesResponse.setRequestId<MASK><NEW_LINE>taobaoFilmGetSchedulesResponse.setErrorCode(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.ErrorCode"));<NEW_LINE>taobaoFilmGetSchedulesResponse.setMsg(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.Msg"));<NEW_LINE>taobaoFilmGetSchedulesResponse.setSubCode(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.SubCode"));<NEW_LINE>taobaoFilmGetSchedulesResponse.setSubMsg(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.SubMsg"));<NEW_LINE>taobaoFilmGetSchedulesResponse.setLogsId(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.LogsId"));<NEW_LINE>List<SchedulesItem> schedules = new ArrayList<SchedulesItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("TaobaoFilmGetSchedulesResponse.Schedules.Length"); i++) {<NEW_LINE>SchedulesItem schedulesItem = new SchedulesItem();<NEW_LINE>schedulesItem.setCinemaId(_ctx.longValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].CinemaId"));<NEW_LINE>schedulesItem.setCloseTime(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].CloseTime"));<NEW_LINE>schedulesItem.setHallName(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].HallName"));<NEW_LINE>schedulesItem.setId(_ctx.longValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].Id"));<NEW_LINE>schedulesItem.setIsExpired(_ctx.booleanValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].IsExpired"));<NEW_LINE>schedulesItem.setMaxCanBuy(_ctx.longValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].MaxCanBuy"));<NEW_LINE>schedulesItem.setPrice(_ctx.longValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].Price"));<NEW_LINE>schedulesItem.setScheduleArea(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].ScheduleArea"));<NEW_LINE>schedulesItem.setSectionId(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].SectionId"));<NEW_LINE>schedulesItem.setServiceFee(_ctx.longValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].ServiceFee"));<NEW_LINE>schedulesItem.setShowDate(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].ShowDate"));<NEW_LINE>schedulesItem.setShowId(_ctx.longValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].ShowId"));<NEW_LINE>schedulesItem.setShowTime(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].ShowTime"));<NEW_LINE>schedulesItem.setShowVersion(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].ShowVersion"));<NEW_LINE>schedulesItem.setHallId(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.Schedules[" + i + "].HallId"));<NEW_LINE>schedules.add(schedulesItem);<NEW_LINE>}<NEW_LINE>taobaoFilmGetSchedulesResponse.setSchedules(schedules);<NEW_LINE>return taobaoFilmGetSchedulesResponse;<NEW_LINE>}
(_ctx.stringValue("TaobaoFilmGetSchedulesResponse.RequestId"));
1,797,892
public void addHeader(Header header, boolean top) throws IllegalArgumentException {<NEW_LINE>if (header == null) {<NEW_LINE>throw new IllegalArgumentException("Message: Null Header");<NEW_LINE>}<NEW_LINE>if (!(header instanceof HeaderImpl)) {<NEW_LINE>throw new IllegalArgumentException("Message: header must" + " be from IBM jain sip implementation." + " received " + header.getClass().toString());<NEW_LINE>}<NEW_LINE>HeaderImpl h = (HeaderImpl) header;<NEW_LINE>// insert new header in existing chain<NEW_LINE>// the new header<NEW_LINE>HeaderEntry n;<NEW_LINE>// header to be on the left of new header<NEW_LINE>HeaderEntry l;<NEW_LINE>// header to be on the right of new header<NEW_LINE>HeaderEntry r;<NEW_LINE>String headerName = header.getName();<NEW_LINE>Field member = getDirectAccessMember(headerName);<NEW_LINE>HeaderEntry direct = member == null ? null : getDirectHeaderEntry(member);<NEW_LINE>if (top) {<NEW_LINE>// insert new header before existing headers<NEW_LINE>r = topHeader(headerName, direct);<NEW_LINE>l = r == null ? m_bottom : r.m_prev;<NEW_LINE>n = new HeaderEntry(l, h, r);<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, "addHeader", "m_prev(l) is " + l + " m_header(h) is " + h + " m_next(r) is " + r);<NEW_LINE>}<NEW_LINE>// update direct pointer if there is one<NEW_LINE>if (member != null) {<NEW_LINE>setDirectHeaderEntry(member, n);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// insert new header after existing headers<NEW_LINE><MASK><NEW_LINE>r = l == null ? m_top : l.m_next;<NEW_LINE>n = new HeaderEntry(l, h, r);<NEW_LINE>// update direct pointer if there is one and it's not set<NEW_LINE>if (member != null && direct == null) {<NEW_LINE>setDirectHeaderEntry(member, n);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (l == null) {<NEW_LINE>m_top = n;<NEW_LINE>} else {<NEW_LINE>l.m_next = n;<NEW_LINE>}<NEW_LINE>if (r == null) {<NEW_LINE>m_bottom = n;<NEW_LINE>} else {<NEW_LINE>r.m_prev = n;<NEW_LINE>}<NEW_LINE>}
l = bottomHeader(headerName, direct);
454,355
// ---------//<NEW_LINE>// onEvent //<NEW_LINE>// ---------//<NEW_LINE>@Override<NEW_LINE>public void onEvent(UserEvent event) {<NEW_LINE>try {<NEW_LINE>// Ignore RELEASING<NEW_LINE>if (event.movement == MouseMovement.RELEASING) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (event instanceof LocationEvent) {<NEW_LINE>// Location => enclosed/enclosing entities(s)<NEW_LINE>handleLocationEvent((LocationEvent) event);<NEW_LINE>} else if (event instanceof IdEvent) {<NEW_LINE>// Id => indexed entity<NEW_LINE>handleIdEvent((IdEvent) event);<NEW_LINE>} else if (event instanceof EntityListEvent) {<NEW_LINE>// List => display contour of (one) entity<NEW_LINE>handleEntityListEvent((EntityListEvent<E>) event);<NEW_LINE>}<NEW_LINE>} catch (ConcurrentModificationException cme) {<NEW_LINE>// This can happen because of processing being done on EntityIndex...<NEW_LINE>// So, just abort the current UI stuff<NEW_LINE>throw cme;<NEW_LINE>} catch (Throwable ex) {<NEW_LINE>logger.warn(getClass().getSimpleName(<MASK><NEW_LINE>}<NEW_LINE>}
) + " onEvent error " + ex, ex);
1,608,253
public void evaluateCodeSnippet(String codeSnippet, String[] localVariableTypeNames, String[] localVariableNames, int[] localVariableModifiers, IType declaringType, boolean isStatic, boolean isConstructorCall, ICodeSnippetRequestor requestor, IProgressMonitor progressMonitor) throws org.eclipse.jdt.core.JavaModelException {<NEW_LINE>checkBuilderState();<NEW_LINE>int length = localVariableTypeNames.length;<NEW_LINE>char[][] varTypeNames = new char[length][];<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>varTypeNames[i] = localVariableTypeNames[i].toCharArray();<NEW_LINE>}<NEW_LINE>length = localVariableNames.length;<NEW_LINE>char[][] varNames = new char[length][];<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>varNames[i] = localVariableNames[i].toCharArray();<NEW_LINE>}<NEW_LINE>Map options = this.project.getOptions(true);<NEW_LINE>// transfer the imports of the IType to the evaluation context<NEW_LINE>if (declaringType != null) {<NEW_LINE>// retrieves the package statement<NEW_LINE>this.context.setPackageName(declaringType.getPackageFragment().getElementName().toCharArray());<NEW_LINE>ICompilationUnit compilationUnit = declaringType.getCompilationUnit();<NEW_LINE>if (compilationUnit != null) {<NEW_LINE>// retrieves the import statement<NEW_LINE>IImportDeclaration[] imports = compilationUnit.getImports();<NEW_LINE>int importsLength = imports.length;<NEW_LINE>if (importsLength != 0) {<NEW_LINE>char[][] importsNames = new char[importsLength][];<NEW_LINE>for (int i = 0; i < importsLength; i++) {<NEW_LINE>importsNames[i] = imports[i].getElementName().toCharArray();<NEW_LINE>}<NEW_LINE>this.context.setImports(importsNames);<NEW_LINE>// turn off import complaints for implicitly added ones<NEW_LINE>options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// try to retrieve imports from the source<NEW_LINE>SourceMapper sourceMapper = ((AbstractClassFile) declaringType.getClassFile()).getSourceMapper();<NEW_LINE>if (sourceMapper != null) {<NEW_LINE>char[][] imports = sourceMapper.getImports((BinaryType) declaringType);<NEW_LINE>if (imports != null) {<NEW_LINE><MASK><NEW_LINE>// turn off import complaints for implicitly added ones<NEW_LINE>options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>INameEnvironment environment = null;<NEW_LINE>try {<NEW_LINE>String fullyQualifiedName = declaringType == null ? null : declaringType.getFullyQualifiedName('.');<NEW_LINE>this.context.evaluate(codeSnippet.toCharArray(), varTypeNames, varNames, localVariableModifiers, fullyQualifiedName == null ? null : fullyQualifiedName.toCharArray(), isStatic, isConstructorCall, environment = getBuildNameEnvironment(), options, getInfrastructureEvaluationRequestor(requestor), getProblemFactory());<NEW_LINE>} catch (InstallException e) {<NEW_LINE>handleInstallException(e);<NEW_LINE>} finally {<NEW_LINE>if (environment != null)<NEW_LINE>environment.cleanup();<NEW_LINE>}<NEW_LINE>}
this.context.setImports(imports);
1,204,278
public com.amazonaws.services.codedeploy.model.ThrottlingException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.codedeploy.model.ThrottlingException throttlingException = new com.amazonaws.services.codedeploy.model.ThrottlingException(null);<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>} 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 throttlingException;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,654,033
public static DeploymentState aggregateState(Set<DeploymentState> states) {<NEW_LINE>if (states.size() == 1) {<NEW_LINE>DeploymentState state = states.iterator().next();<NEW_LINE>logger.debug("aggregateState: Deployment State Set Size = 1. Deployment State " + state);<NEW_LINE>// a stream which is known to the stream definition streamDefinitionRepository<NEW_LINE>// but unknown to deployers is undeployed<NEW_LINE>if (state == null || state == DeploymentState.unknown) {<NEW_LINE>logger.debug("aggregateState: Returning " + DeploymentState.undeployed);<NEW_LINE>return DeploymentState.undeployed;<NEW_LINE>} else {<NEW_LINE>logger.debug("aggregateState: Returning " + state);<NEW_LINE>return state;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>DeploymentState result = DeploymentState.partial;<NEW_LINE>if (states.isEmpty() || states.contains(DeploymentState.error)) {<NEW_LINE>logger.debug("aggregateState: Returning " + DeploymentState.error);<NEW_LINE>result = DeploymentState.error;<NEW_LINE>} else if (states.contains(DeploymentState.deployed) && states.contains(DeploymentState.failed)) {<NEW_LINE>logger.debug("aggregateState: Returning " + DeploymentState.partial);<NEW_LINE>result = DeploymentState.partial;<NEW_LINE>} else if (states.contains(DeploymentState.failed)) {<NEW_LINE>logger.debug("aggregateState: Returning " + DeploymentState.failed);<NEW_LINE>result = DeploymentState.failed;<NEW_LINE>} else if (states.contains(DeploymentState.deploying)) {<NEW_LINE>logger.<MASK><NEW_LINE>result = DeploymentState.deploying;<NEW_LINE>}<NEW_LINE>logger.debug("aggregateState: Returning " + DeploymentState.partial);<NEW_LINE>return result;<NEW_LINE>}
debug("aggregateState: Returning " + DeploymentState.deploying);