idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
168,010
private Mono<Response<List<PrivateEndpointConnectionInner>>> listPrivateEndpointConnectionsWithResponseAsync(String resourceGroupName, String resourceName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.listPrivateEndpointConnections(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
1,674,353
final SyncResourceResult executeSyncResource(SyncResourceRequest syncResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(syncResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<SyncResourceRequest> request = null;<NEW_LINE>Response<SyncResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new SyncResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(syncResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SyncResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<SyncResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new SyncResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "Service Catalog AppRegistry");
770,640
private Map<String, Object> simpleTypeToAvro(FieldInfo fieldInfo, SimpleTypeInfo typeInfo) {<NEW_LINE>Map<String, Object> field = new HashMap<String, Object>();<NEW_LINE>// Field name<NEW_LINE>String name = SchemaUtils.toCamelCase(fieldInfo.getFieldName());<NEW_LINE>field.put("name", name);<NEW_LINE>// Field default value (for Avro unions, corresponds to _first_ field type in list)<NEW_LINE>field.put("default", null);<NEW_LINE>// Field type<NEW_LINE>String[] type = new String[] { "null", typeInfo.<MASK><NEW_LINE>field.put("type", type);<NEW_LINE>// Field metadata<NEW_LINE>String dbFieldName = fieldInfo.getFieldName();<NEW_LINE>int dbFieldPosition = fieldInfo.getFieldPosition();<NEW_LINE>String dbFieldType = fieldInfo.getFieldTypeInfo().getName();<NEW_LINE>String meta = buildMetaString(dbFieldName, dbFieldPosition, dbFieldType, null);<NEW_LINE>field.put("meta", meta);<NEW_LINE>// Return the Map for this field<NEW_LINE>return field;<NEW_LINE>}
getPrimitiveType().getAvroType() };
1,636,137
public List<JoinCpuLoadBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {<NEW_LINE>final String id = decodingContext.getApplicationId();<NEW_LINE>final long baseTimestamp = decodingContext.getBaseTimestamp();<NEW_LINE>final long timestampDelta = decodingContext.getTimestampDelta();<NEW_LINE>final long initialTimestamp = baseTimestamp + timestampDelta;<NEW_LINE>int numValues = valueBuffer.readVInt();<NEW_LINE>List<Long> timestamps = this.codec.<MASK><NEW_LINE>// decode headers<NEW_LINE>final byte[] header = valueBuffer.readPrefixedBytes();<NEW_LINE>AgentStatHeaderDecoder headerDecoder = new BitCountingHeaderDecoder(header);<NEW_LINE>JoinLongFieldEncodingStrategy jvmCpuLoadEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());<NEW_LINE>JoinLongFieldEncodingStrategy systemCpuLoadEncodingStrategy = JoinLongFieldEncodingStrategy.getFromCode(headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode(), headerDecoder.getCode());<NEW_LINE>// decode values<NEW_LINE>final List<JoinLongFieldBo> jvmCpuLoadList = this.codec.decodeValues(valueBuffer, jvmCpuLoadEncodingStrategy, numValues);<NEW_LINE>final List<JoinLongFieldBo> systemCpuLoadList = this.codec.decodeValues(valueBuffer, systemCpuLoadEncodingStrategy, numValues);<NEW_LINE>List<JoinCpuLoadBo> joinCpuLoadBoList = new ArrayList<>(numValues);<NEW_LINE>for (int i = 0; i < numValues; i++) {<NEW_LINE>JoinCpuLoadBo joinCpuLoadBo = new JoinCpuLoadBo();<NEW_LINE>joinCpuLoadBo.setId(id);<NEW_LINE>joinCpuLoadBo.setTimestamp(timestamps.get(i));<NEW_LINE>joinCpuLoadBo.setJvmCpuLoadJoinValue(jvmCpuLoadList.get(i).toLongFieldBo());<NEW_LINE>joinCpuLoadBo.setSystemCpuLoadJoinValue(systemCpuLoadList.get(i).toLongFieldBo());<NEW_LINE>joinCpuLoadBoList.add(joinCpuLoadBo);<NEW_LINE>}<NEW_LINE>return joinCpuLoadBoList;<NEW_LINE>}
decodeTimestamps(initialTimestamp, valueBuffer, numValues);
1,043,633
public static SearchProjectsByRegionResponse unmarshall(SearchProjectsByRegionResponse searchProjectsByRegionResponse, UnmarshallerContext _ctx) {<NEW_LINE>searchProjectsByRegionResponse.setRequestId(_ctx.stringValue("SearchProjectsByRegionResponse.RequestId"));<NEW_LINE>searchProjectsByRegionResponse.setCode(_ctx.integerValue("SearchProjectsByRegionResponse.Code"));<NEW_LINE>searchProjectsByRegionResponse.setSuccess(_ctx.booleanValue("SearchProjectsByRegionResponse.Success"));<NEW_LINE>searchProjectsByRegionResponse.setMessage(_ctx.stringValue("SearchProjectsByRegionResponse.Message"));<NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("SearchProjectsByRegionResponse.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setFullName(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].FullName"));<NEW_LINE>dataItem.setName(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].Name"));<NEW_LINE>dataItem.setId(_ctx.integerValue("SearchProjectsByRegionResponse.Data[" + i + "].Id"));<NEW_LINE>dataItem.setDescription(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].Description"));<NEW_LINE>dataItem.setMode(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].Mode"));<NEW_LINE>dataItem.setType(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].Type"));<NEW_LINE>dataItem.setStamp(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].Stamp"));<NEW_LINE>dataItem.setStatus(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].Status"));<NEW_LINE>dataItem.setParentId(_ctx.integerValue("SearchProjectsByRegionResponse.Data[" + i + "].ParentId"));<NEW_LINE>dataItem.setIdPath(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].IdPath"));<NEW_LINE>dataItem.setAoneType(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].AoneType"));<NEW_LINE>dataItem.setAoneId(_ctx.integerValue<MASK><NEW_LINE>List<String> icons = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("SearchProjectsByRegionResponse.Data[" + i + "].Icons.Length"); j++) {<NEW_LINE>icons.add(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].Icons[" + j + "]"));<NEW_LINE>}<NEW_LINE>dataItem.setIcons(icons);<NEW_LINE>List<String> customFieldMap = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("SearchProjectsByRegionResponse.Data[" + i + "].CustomFieldMap.Length"); j++) {<NEW_LINE>customFieldMap.add(_ctx.stringValue("SearchProjectsByRegionResponse.Data[" + i + "].CustomFieldMap[" + j + "]"));<NEW_LINE>}<NEW_LINE>dataItem.setCustomFieldMap(customFieldMap);<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>searchProjectsByRegionResponse.setData(data);<NEW_LINE>return searchProjectsByRegionResponse;<NEW_LINE>}
("SearchProjectsByRegionResponse.Data[" + i + "].AoneId"));
849,236
private void initValues(@NonNull Context context, boolean editMode) {<NEW_LINE>mBorderWidth = context.getResources().getDimension(R.dimen.cpb_default_stroke_width);<NEW_LINE>mSweepSpeed = 1f;<NEW_LINE>mRotationSpeed = 1f;<NEW_LINE>if (editMode) {<NEW_LINE>mColors = new int[] { Color.BLUE };<NEW_LINE>mMinSweepAngle = 20;<NEW_LINE>mMaxSweepAngle = 300;<NEW_LINE>} else {<NEW_LINE>mColors = new int[] { context.getResources().getColor(R.color.cpb_default_color) };<NEW_LINE>mMinSweepAngle = context.getResources().getInteger(R.integer.cpb_default_min_sweep_angle);<NEW_LINE>mMaxSweepAngle = context.getResources().<MASK><NEW_LINE>}<NEW_LINE>mStyle = CircularProgressDrawable.STYLE_ROUNDED;<NEW_LINE>mPowerManager = Utils.powerManager(context);<NEW_LINE>}
getInteger(R.integer.cpb_default_max_sweep_angle);
216,343
public static <T> T newInstance(Class parent, Class<T> type, String[] args) {<NEW_LINE>if (!parent.isAssignableFrom(type)) {<NEW_LINE>throw new DataProcessingException("Not a valid " + parent.getSimpleName() + " class: '" + type.getSimpleName() + "' (" + type.getName() + ')');<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Constructor constructor = type.getConstructor(String[].class);<NEW_LINE>return (T) constructor.newInstance((Object) args);<NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>if (args.length == 0) {<NEW_LINE>try {<NEW_LINE>return type.newInstance();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new DataProcessingException("Unexpected error instantiating custom " + parent.getSimpleName() + " class '" + type.getSimpleName() + "' (" + type.getName() + ')', e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new DataProcessingException("Could not find a public constructor with a String[] parameter in custom " + parent.getSimpleName() + " class '" + type.getSimpleName() + "' (" + type.getName() + ')', e);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new DataProcessingException("Unexpected error instantiating custom " + parent.getSimpleName() + " class '" + type.getSimpleName() + "' (" + type.<MASK><NEW_LINE>}<NEW_LINE>}
getName() + ')', e);
830,729
public void updateRoute(RotatedTileBox tb, TransportRouteResult route) {<NEW_LINE>if (tb.getMapDensity() != getMapDensity() || this.route != route) {<NEW_LINE>this.route = route;<NEW_LINE>List<Location> locations;<NEW_LINE>Map<<MASK><NEW_LINE>if (route == null) {<NEW_LINE>locations = Collections.emptyList();<NEW_LINE>styleMap = Collections.emptyMap();<NEW_LINE>} else {<NEW_LINE>LatLon start = transportHelper.getStartLocation();<NEW_LINE>LatLon end = transportHelper.getEndLocation();<NEW_LINE>List<Way> list = new ArrayList<>();<NEW_LINE>List<GeometryWayStyle<?>> styles = new ArrayList<>();<NEW_LINE>calculateTransportResult(start, end, route, list, styles);<NEW_LINE>List<Location> locs = new ArrayList<>();<NEW_LINE>Map<Integer, GeometryWayStyle<?>> stlMap = new TreeMap<>();<NEW_LINE>int i = 0;<NEW_LINE>int k = 0;<NEW_LINE>if (list.size() > 0) {<NEW_LINE>for (Way w : list) {<NEW_LINE>stlMap.put(k, styles.get(i++));<NEW_LINE>for (Node n : w.getNodes()) {<NEW_LINE>Location ln = new Location("");<NEW_LINE>ln.setLatitude(n.getLatitude());<NEW_LINE>ln.setLongitude(n.getLongitude());<NEW_LINE>locs.add(ln);<NEW_LINE>k++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>locations = locs;<NEW_LINE>styleMap = stlMap;<NEW_LINE>}<NEW_LINE>updateWay(locations, styleMap, tb);<NEW_LINE>}<NEW_LINE>}
Integer, GeometryWayStyle<?>> styleMap;
692,031
public static KeyPair generateKeyPair(KeyPairType keyPairType, int keySize, Provider provider) throws CryptoException {<NEW_LINE>try {<NEW_LINE>// Get a key pair generator<NEW_LINE>KeyPairGenerator keyPairGen = null;<NEW_LINE>if (provider != null) {<NEW_LINE>keyPairGen = KeyPairGenerator.getInstance(keyPairType.jce(), provider);<NEW_LINE>} else {<NEW_LINE>// Always use BC provider for RSA<NEW_LINE>if (keyPairType == RSA) {<NEW_LINE>keyPairGen = KeyPairGenerator.getInstance(keyPairType.jce(), BOUNCY_CASTLE.jce());<NEW_LINE>} else {<NEW_LINE>// Use default provider for DSA<NEW_LINE>keyPairGen = KeyPairGenerator.getInstance(keyPairType.jce());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Create a SecureRandom<NEW_LINE>SecureRandom rand = SecureRandom.getInstance("SHA1PRNG");<NEW_LINE>// Initialise key pair generator with key strength and randomness<NEW_LINE>keyPairGen.initialize(keySize, rand);<NEW_LINE>// Generate and return the key pair<NEW_LINE>return keyPairGen.generateKeyPair();<NEW_LINE>} catch (GeneralSecurityException ex) {<NEW_LINE>throw new CryptoException(MessageFormat.format(res.getString(<MASK><NEW_LINE>}<NEW_LINE>}
"NoGenerateKeypair.exception.message"), keyPairType), ex);
1,771,154
public synchronized int read(byte[] b, int off, int len) throws IOException {<NEW_LINE>if (in == null) {<NEW_LINE>throw new IOException("Stream Closed");<NEW_LINE>}<NEW_LINE>while (slack == null) {<NEW_LINE>// might read too much<NEW_LINE>char[<MASK><NEW_LINE>int n = in.read(buf);<NEW_LINE>if (n == -1) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>if (n > 0) {<NEW_LINE>slack = new String(buf, 0, n).getBytes(encoding);<NEW_LINE>begin = 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (len > slack.length - begin) {<NEW_LINE>len = slack.length - begin;<NEW_LINE>}<NEW_LINE>System.arraycopy(slack, begin, b, off, len);<NEW_LINE>if ((begin += len) >= slack.length) {<NEW_LINE>slack = null;<NEW_LINE>}<NEW_LINE>return len;<NEW_LINE>}
] buf = new char[len];
289,828
// -------------------------------------------------------------------------<NEW_LINE>// XXX: QueryPart API<NEW_LINE>// -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public final void accept(Context<?> ctx) {<NEW_LINE>switch(ctx.family()) {<NEW_LINE>case CUBRID:<NEW_LINE>case FIREBIRD:<NEW_LINE>case SQLITE:<NEW_LINE>ctx<MASK><NEW_LINE>break;<NEW_LINE>case DERBY:<NEW_LINE>ctx.visit(K_CURRENT).sql(' ').visit(K_SCHEMA);<NEW_LINE>break;<NEW_LINE>case H2:<NEW_LINE>ctx.visit(K_SCHEMA).sql("()");<NEW_LINE>break;<NEW_LINE>case MARIADB:<NEW_LINE>case MYSQL:<NEW_LINE>ctx.visit(K_DATABASE).sql("()");<NEW_LINE>break;<NEW_LINE>case HSQLDB:<NEW_LINE>case POSTGRES:<NEW_LINE>case YUGABYTEDB:<NEW_LINE>ctx.visit(K_CURRENT_SCHEMA);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>ctx.visit(K_CURRENT_SCHEMA).sql("()");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
.visit(inline(""));
1,278,053
public int[] sortEvenOdd(int[] nums) {<NEW_LINE>List<Integer> odds = new ArrayList<>();<NEW_LINE>List<Integer> evens = new ArrayList<>();<NEW_LINE>for (int i = 0; i < nums.length; i++) {<NEW_LINE>if (i % 2 == 0) {<NEW_LINE>evens.add(nums[i]);<NEW_LINE>} else {<NEW_LINE>odds.add(nums[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.sort(odds, Collections.reverseOrder());<NEW_LINE>Collections.sort(evens);<NEW_LINE>int[] ans = new int[nums.length];<NEW_LINE>for (int i = 0, j = 0, k = 0; i < nums.length; i++) {<NEW_LINE>if (i % 2 == 0) {<NEW_LINE>ans[i] <MASK><NEW_LINE>} else {<NEW_LINE>ans[i] = odds.get(k++);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ans;<NEW_LINE>}
= evens.get(j++);
151,622
public void resize(int newSize, double defaultValue) {<NEW_LINE>if (m_bLockedInSize)<NEW_LINE>throw new GeometryException("invalid call. Attribute Stream is locked and cannot be resized.");<NEW_LINE>if (newSize <= m_size) {<NEW_LINE>if ((newSize * 5) / 4 < m_buffer.length) {<NEW_LINE>// decrease when the 25%<NEW_LINE>// margin is exceeded<NEW_LINE>long[] newBuffer = new long[newSize];<NEW_LINE>System.arraycopy(m_buffer, <MASK><NEW_LINE>m_buffer = newBuffer;<NEW_LINE>}<NEW_LINE>m_size = newSize;<NEW_LINE>} else {<NEW_LINE>if (newSize > m_buffer.length) {<NEW_LINE>int sz = (newSize < 64) ? Math.max(newSize * 2, 4) : (newSize * 5) / 4;<NEW_LINE>long[] newBuffer = new long[sz];<NEW_LINE>System.arraycopy(m_buffer, 0, newBuffer, 0, m_size);<NEW_LINE>m_buffer = newBuffer;<NEW_LINE>}<NEW_LINE>for (int i = m_size; i < newSize; i++) m_buffer[i] = (long) defaultValue;<NEW_LINE>m_size = newSize;<NEW_LINE>}<NEW_LINE>}
0, newBuffer, 0, newSize);
1,445,147
private static List<LaunchableGradleTask> tasks(DefaultGradleProject owner, TaskContainerInternal tasks, String projectOptions) {<NEW_LINE>if ("omit_all_tasks".equals(projectOptions)) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>} else if ("skip_task_graph_realization".equals(projectOptions)) {<NEW_LINE>return tasks.getNames().stream().map(t -> buildFromTaskName(new LaunchableGradleProjectTask(), owner.getProjectIdentifier(), t)).collect(Collectors.toList());<NEW_LINE>}<NEW_LINE>tasks.discoverTasks();<NEW_LINE>tasks.realize();<NEW_LINE>SortedSet<String> taskNames = tasks.getNames();<NEW_LINE>List<LaunchableGradleTask> out = new ArrayList<LaunchableGradleTask>(taskNames.size());<NEW_LINE>for (String taskName : taskNames) {<NEW_LINE>Task t = tasks.findByName(taskName);<NEW_LINE>if (t != null) {<NEW_LINE>out.add(buildFromTask(new LaunchableGradleProjectTask(), owner.getProjectIdentifier(), <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return out;<NEW_LINE>}
t).setProject(owner));
500,733
public final // JPA2.g:366:1: arithmetic_factor : ( ( '+' | '-' ) )? arithmetic_primary ;<NEW_LINE>JPA2Parser.arithmetic_factor_return arithmetic_factor() throws RecognitionException {<NEW_LINE>JPA2Parser.arithmetic_factor_return retval = new JPA2Parser.arithmetic_factor_return();<NEW_LINE>retval.start = input.LT(1);<NEW_LINE>Object root_0 = null;<NEW_LINE>Token set393 = null;<NEW_LINE>ParserRuleReturnScope arithmetic_primary394 = null;<NEW_LINE>Object set393_tree = null;<NEW_LINE>try {<NEW_LINE>// JPA2.g:367:5: ( ( ( '+' | '-' ) )? arithmetic_primary )<NEW_LINE>// JPA2.g:367:7: ( ( '+' | '-' ) )? arithmetic_primary<NEW_LINE>{<NEW_LINE>root_0 = (Object) adaptor.nil();<NEW_LINE>// JPA2.g:367:7: ( ( '+' | '-' ) )?<NEW_LINE>int alt109 = 2;<NEW_LINE>int LA109_0 = input.LA(1);<NEW_LINE>if ((LA109_0 == 65 || LA109_0 == 67)) {<NEW_LINE>alt109 = 1;<NEW_LINE>}<NEW_LINE>switch(alt109) {<NEW_LINE>case 1:<NEW_LINE>// JPA2.g:<NEW_LINE>{<NEW_LINE>set393 = input.LT(1);<NEW_LINE>if (input.LA(1) == 65 || input.LA(1) == 67) {<NEW_LINE>input.consume();<NEW_LINE>if (state.backtracking == 0)<NEW_LINE>adaptor.addChild(root_0, (Object) adaptor.create(set393));<NEW_LINE>state.errorRecovery = false;<NEW_LINE>state.failed = false;<NEW_LINE>} else {<NEW_LINE>if (state.backtracking > 0) {<NEW_LINE>state.failed = true;<NEW_LINE>return retval;<NEW_LINE>}<NEW_LINE>MismatchedSetException mse = new MismatchedSetException(null, input);<NEW_LINE>throw mse;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>pushFollow(FOLLOW_arithmetic_primary_in_arithmetic_factor3485);<NEW_LINE>arithmetic_primary394 = arithmetic_primary();<NEW_LINE>state._fsp--;<NEW_LINE>if (state.failed)<NEW_LINE>return retval;<NEW_LINE>if (state.backtracking == 0)<NEW_LINE>adaptor.addChild(root_0, arithmetic_primary394.getTree());<NEW_LINE>}<NEW_LINE>retval.stop = input.LT(-1);<NEW_LINE>if (state.backtracking == 0) {<NEW_LINE>retval.tree = (Object) adaptor.rulePostProcessing(root_0);<NEW_LINE>adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>reportError(re);<NEW_LINE>recover(input, re);<NEW_LINE>retval.tree = (Object) adaptor.errorNode(input, retval.start, input.<MASK><NEW_LINE>} finally {<NEW_LINE>// do for sure before leaving<NEW_LINE>}<NEW_LINE>return retval;<NEW_LINE>}
LT(-1), re);
1,626,053
public static boolean showEclipseReferenceResolver(@NonNull EclipseProjectReference ref, @NonNull Map<String, String> resolvedEntries) {<NEW_LINE>File workspace = ref.getEclipseWorkspaceLocation();<NEW_LINE>if (workspace != null && !workspace.exists() && resolvedEntries.get(workspace.getPath()) != null) {<NEW_LINE>ref.updateReference(null, resolvedEntries.get(workspace.getPath()));<NEW_LINE>}<NEW_LINE>if (!ref.getEclipseProjectLocation().exists() && resolvedEntries.get(ref.getEclipseProjectLocation().getParent()) != null) {<NEW_LINE>File f = new File(resolvedEntries.get(ref.getEclipseProjectLocation().getParent()));<NEW_LINE>f = new File(f, ref.getEclipseProjectLocation().getName());<NEW_LINE>if (f.exists()) {<NEW_LINE>ref.updateReference(f.getPath(), null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (ref.isEclipseProjectReachable()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>UpdateEclipseReferencePanel p = new UpdateEclipseReferencePanel(ref);<NEW_LINE>DialogDescriptor dd = new DialogDescriptor(p, org.openide.util.NbBundle.getMessage(UpdateEclipseReferencePanel.class, "TITLE_Synchronize_with_Eclipse"), true, DialogDescriptor.OK_CANCEL_OPTION, null, null);<NEW_LINE>p.setDialogDescriptor(dd);<NEW_LINE>Dialog dlg = DialogDisplayer.getDefault().createDialog(dd);<NEW_LINE>dlg.setVisible(true);<NEW_LINE>if (dd.getValue() == DialogDescriptor.OK_OPTION) {<NEW_LINE>if (p.eclipseProjectTextField.isEnabled()) {<NEW_LINE>resolvedEntries.put(ref.getEclipseProjectLocation().getParent(), <MASK><NEW_LINE>}<NEW_LINE>if (workspace != null && p.eclipseWorkspaceTextField.isEnabled()) {<NEW_LINE>resolvedEntries.put(workspace.getPath(), p.eclipseWorkspaceTextField.getText());<NEW_LINE>}<NEW_LINE>ref.updateReference(p.eclipseProjectTextField.isEnabled() ? p.eclipseProjectTextField.getText() : null, p.eclipseWorkspaceTextField.isEnabled() ? p.eclipseWorkspaceTextField.getText() : null);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
p.eclipseProjectTextField.getText());
984,517
void twoComponentGenotypeLikelihoodByRead(final GenotypeAlleleCounts genotypeAlleleCounts, final double[] likelihoodByRead, final double[] readLikelihoodComponentsByAlleleCount, final int readCount) {<NEW_LINE>final int allele0 = genotypeAlleleCounts.alleleIndexAt(0);<NEW_LINE>final int freq0 = genotypeAlleleCounts.alleleCountAt(0);<NEW_LINE>final int allele1 = genotypeAlleleCounts.alleleIndexAt(1);<NEW_LINE>// no need to get it from genotypeAlleleCounts.<NEW_LINE>final int freq1 = ploidy - freq0;<NEW_LINE>int allele0LnLkOffset = readCount * ((ploidy <MASK><NEW_LINE>int allele1LnLkOffset = readCount * ((ploidy + 1) * allele1 + freq1);<NEW_LINE>for (int r = 0; r < readCount; r++) {<NEW_LINE>final double lnLk0 = readLikelihoodComponentsByAlleleCount[allele0LnLkOffset++];<NEW_LINE>final double lnLk1 = readLikelihoodComponentsByAlleleCount[allele1LnLkOffset++];<NEW_LINE>likelihoodByRead[r] = MathUtils.approximateLog10SumLog10(lnLk0, lnLk1);<NEW_LINE>}<NEW_LINE>}
+ 1) * allele0 + freq0);
1,678,564
protected void componentShowing() {<NEW_LINE>// NOI18N<NEW_LINE>Log.getLogger().entering("QueryBuilder", "componentShowing");<NEW_LINE>String command = getSqlCommand();<NEW_LINE>if (_queryModel == null)<NEW_LINE>_queryModel = new QueryModel(quoter);<NEW_LINE>Log.getLogger().finest(" * command=" + command);<NEW_LINE>// Parse the current query, in case it has changed<NEW_LINE>// Special case for handling null queries -- prompt for an initial table<NEW_LINE>// We should probably allow this, since the user can delete the last table in the<NEW_LINE>// editor anyway, so we need to be able to deal with empty queries as a special case.<NEW_LINE>if ((command == null) || (command.trim().length() == 0)) {<NEW_LINE>Log.<MASK><NEW_LINE>setVisible(true);<NEW_LINE>this.repaint();<NEW_LINE>String msg = NbBundle.getMessage(QueryBuilder.class, "EMPTY_QUERY_ADD_TABLE");<NEW_LINE>// NOI18N<NEW_LINE>NotifyDescriptor // NOI18N<NEW_LINE>d = new NotifyDescriptor.Message(msg + "\n\n", NotifyDescriptor.ERROR_MESSAGE);<NEW_LINE>DialogDisplayer.getDefault().notify(d);<NEW_LINE>_queryBuilderPane.getQueryBuilderGraphFrame().addTable();<NEW_LINE>} else {<NEW_LINE>String queryText = getSqlText();<NEW_LINE>// parse and populate only if the query has changed.<NEW_LINE>if (queryText == null || (!command.trim().equalsIgnoreCase(queryText.trim()))) {<NEW_LINE>this.populate(command, false);<NEW_LINE>setVisible(true);<NEW_LINE>this.repaint();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>activateActions();<NEW_LINE>_queryBuilderPane.getQueryBuilderSqlTextArea().requestFocus();<NEW_LINE>if (DEBUG)<NEW_LINE>// NOI18N<NEW_LINE>System.out.println(" _queryBuilderPane.getQueryBuilderSqlTextArea().requestFocus () called. ");<NEW_LINE>}
getLogger().finest("QBShowing command is null");
1,398,484
private void hydrateDeploymentNode(DeploymentNode deploymentNode, DeploymentNode parent) {<NEW_LINE>deploymentNode.setParent(parent);<NEW_LINE>addElementToInternalStructures(deploymentNode);<NEW_LINE>deploymentNode.getChildren().forEach(child -> hydrateDeploymentNode(child, deploymentNode));<NEW_LINE>for (SoftwareSystemInstance softwareSystemInstance : deploymentNode.getSoftwareSystemInstances()) {<NEW_LINE>Element softwareSystem = getElement(softwareSystemInstance.getSoftwareSystemId());<NEW_LINE>if (!(softwareSystem instanceof SoftwareSystem)) {<NEW_LINE>throw new WorkspaceValidationException(String.format("A software system instance is associated with a software system (id=%s) that does not exist in the model."<MASK><NEW_LINE>}<NEW_LINE>softwareSystemInstance.setSoftwareSystem((SoftwareSystem) softwareSystem);<NEW_LINE>softwareSystemInstance.setParent(deploymentNode);<NEW_LINE>addElementToInternalStructures(softwareSystemInstance);<NEW_LINE>}<NEW_LINE>for (ContainerInstance containerInstance : deploymentNode.getContainerInstances()) {<NEW_LINE>Element container = getElement(containerInstance.getContainerId());<NEW_LINE>if (!(container instanceof Container)) {<NEW_LINE>throw new WorkspaceValidationException(String.format("A container instance is associated with a container (id=%s) that does not exist in the model.", containerInstance.getContainerId()));<NEW_LINE>}<NEW_LINE>containerInstance.setContainer((Container) container);<NEW_LINE>containerInstance.setParent(deploymentNode);<NEW_LINE>addElementToInternalStructures(containerInstance);<NEW_LINE>}<NEW_LINE>for (InfrastructureNode infrastructureNode : deploymentNode.getInfrastructureNodes()) {<NEW_LINE>infrastructureNode.setParent(deploymentNode);<NEW_LINE>addElementToInternalStructures(infrastructureNode);<NEW_LINE>}<NEW_LINE>}
, softwareSystemInstance.getSoftwareSystemId()));
1,367,066
private List<Fact> createFacts_BankFee(@NonNull final AcctSchema as, @NonNull final DocLine_BankStatement line) {<NEW_LINE>final BigDecimal bankFeeAmt = line.getBankFeeAmt();<NEW_LINE>if (bankFeeAmt.signum() == 0) {<NEW_LINE>return ImmutableList.of();<NEW_LINE>}<NEW_LINE>final Fact fact = new Fact(this, as, PostingType.Actual);<NEW_LINE>final FactLineBuilder bankAssetFactLine = prepareBankAssetFactLine(fact, line);<NEW_LINE>final FactLineBuilder interestFactLine = fact.createLine().setDocLine(line).setCurrencyId(line.getCurrencyId()).orgIdIfValid(getBankOrgId()).bpartnerIdIfNotNull(line.getBPartnerId());<NEW_LINE>bankAssetFactLine.setAmtSource(null, bankFeeAmt);<NEW_LINE>interestFactLine.setAmtSource(bankFeeAmt, null);<NEW_LINE>interestFactLine.setAccount(getAccount<MASK><NEW_LINE>bankAssetFactLine.buildAndAdd();<NEW_LINE>interestFactLine.buildAndAdd();<NEW_LINE>return ImmutableList.of(fact);<NEW_LINE>}
(AccountType.PayBankFee, as));
1,600,380
public void marshall(RegisterCACertificateRequest registerCACertificateRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (registerCACertificateRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(registerCACertificateRequest.getCaCertificate(), CACERTIFICATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerCACertificateRequest.getVerificationCertificate(), VERIFICATIONCERTIFICATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerCACertificateRequest.getSetAsActive(), SETASACTIVE_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerCACertificateRequest.getAllowAutoRegistration(), ALLOWAUTOREGISTRATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerCACertificateRequest.getRegistrationConfig(), REGISTRATIONCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerCACertificateRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
1,156,749
public void channelActive(ChannelHandlerContext ctx) throws Exception {<NEW_LINE>Promise<X509Certificate> unusedPromise = ctx.channel().attr(CLIENT_CERTIFICATE_PROMISE_KEY).get().addListener((Promise<X509Certificate> promise) -> {<NEW_LINE>if (promise.isSuccess()) {<NEW_LINE>sslClientCertificateHash = getCertificateHash(promise.get());<NEW_LINE>// Set the client cert hash key attribute for both this channel,<NEW_LINE>// used for collecting metrics on specific clients.<NEW_LINE>ctx.channel().attr(CLIENT_CERTIFICATE_HASH_KEY).set(sslClientCertificateHash);<NEW_LINE>clientAddress = ctx.channel().attr(REMOTE_ADDRESS_KEY).get();<NEW_LINE>metrics.registerActiveConnection("epp", sslClientCertificateHash, ctx.channel());<NEW_LINE>channelRead(ctx, Unpooled.wrappedBuffer(helloBytes));<NEW_LINE>} else {<NEW_LINE>logger.atWarning().withCause(promise.cause()).log("Cannot finish handshake for channel %s, remote IP %s", ctx.channel(), ctx.channel().attr(REMOTE_ADDRESS_KEY).get());<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>super.channelActive(ctx);<NEW_LINE>}
ChannelFuture unusedFuture = ctx.close();
1,574,809
private static JsonObject serializeBase(JavaResource resource) {<NEW_LINE>JsonObject root = Json.object();<NEW_LINE>ResourceKind kind = resource.getKind();<NEW_LINE>switch(kind) {<NEW_LINE>case CLASS:<NEW_LINE>Path clazz = ((ClassResource) resource).getPath();<NEW_LINE>root.add("kind", "class");<NEW_LINE>root.add("source", IOUtil.toString(clazz));<NEW_LINE>break;<NEW_LINE>case JAR:<NEW_LINE>Path jar = ((JarResource) resource).getPath();<NEW_LINE>root.add("kind", "jar");<NEW_LINE>root.add("source", IOUtil.toString(jar));<NEW_LINE>break;<NEW_LINE>case WAR:<NEW_LINE>Path war = ((WarResource) resource).getPath();<NEW_LINE>root.add("kind", "war");<NEW_LINE>root.add("source", IOUtil.toString(war));<NEW_LINE>break;<NEW_LINE>case DIRECTORY:<NEW_LINE>Path dir = ((DirectoryResource) resource).getPath();<NEW_LINE>root.add("kind", "directory");<NEW_LINE>root.add("source", IOUtil.toString(dir));<NEW_LINE>break;<NEW_LINE>case MAVEN:<NEW_LINE>MavenResource maven = (MavenResource) resource;<NEW_LINE>root.add("kind", "maven");<NEW_LINE>root.add("source", maven.getCoords());<NEW_LINE>break;<NEW_LINE>case URL:<NEW_LINE>UrlResource url = (UrlResource) resource;<NEW_LINE>root.add("kind", "url");<NEW_LINE>root.add("source", url.getUrl().toString());<NEW_LINE>break;<NEW_LINE>case INSTRUMENTATION:<NEW_LINE><MASK><NEW_LINE>root.add("source", "n/a");<NEW_LINE>break;<NEW_LINE>case DEBUGGER:<NEW_LINE>root.add("kind", "debugger");<NEW_LINE>root.add("source", "n/a");<NEW_LINE>break;<NEW_LINE>case EMPTY:<NEW_LINE>root.add("kind", "empty");<NEW_LINE>root.add("source", "n/a");<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalStateException("Unsupported kind: " + kind);<NEW_LINE>}<NEW_LINE>return root;<NEW_LINE>}
root.add("kind", "instrumentation");
477,142
public static InputStream openForReading(Form form, ScopedFile file) throws IOException {<NEW_LINE>switch(file.getScope()) {<NEW_LINE>case Asset:<NEW_LINE>return form.openAsset(file.getFileName());<NEW_LINE>case App:<NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {<NEW_LINE>return new FileInputStream(new File(Environment.getExternalStorageDirectory(), file.getFileName()));<NEW_LINE>}<NEW_LINE>return new FileInputStream(new File(form.getExternalFilesDir(""), file.getFileName()));<NEW_LINE>case Cache:<NEW_LINE>return new FileInputStream(new File(URI.create(form.getCachePath(file.getFileName()))));<NEW_LINE>case Legacy:<NEW_LINE>return new FileInputStream(new File(Environment.getExternalStorageDirectory(), file.getFileName()));<NEW_LINE>case Private:<NEW_LINE>return new FileInputStream(new File(URI.create(form.getPrivatePath(file.getFileName()))));<NEW_LINE>case Shared:<NEW_LINE>String[] parts = file.getFileName().split("/", 2);<NEW_LINE>Uri contentUri <MASK><NEW_LINE>String[] projection = new String[] { MediaStore.Files.FileColumns._ID, MediaStore.Files.FileColumns.DISPLAY_NAME };<NEW_LINE>Cursor cursor = null;<NEW_LINE>try {<NEW_LINE>cursor = form.getContentResolver().query(contentUri, projection, MediaStore.Files.FileColumns.DISPLAY_NAME + " = ?", new String[] { parts[1] }, null);<NEW_LINE>int idColumn = cursor.getColumnIndexOrThrow(MediaStore.Files.FileColumns._ID);<NEW_LINE>if (cursor.moveToFirst()) {<NEW_LINE>long id = cursor.getLong(idColumn);<NEW_LINE>Uri targetUri = ContentUris.withAppendedId(contentUri, id);<NEW_LINE>return form.getContentResolver().openInputStream(targetUri);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>IOUtils.closeQuietly(LOG_TAG, cursor);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>throw new IOException("Unsupported file scope: " + file.getScope());<NEW_LINE>}
= getContentUriForPath(parts[0]);
238,801
public <G extends FulfillmentGroupItem> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {<NEW_LINE>CreateResponse<G> createResponse = context.createOrRetrieveCopyInstance(this);<NEW_LINE>if (createResponse.isAlreadyPopulated()) {<NEW_LINE>return createResponse;<NEW_LINE>}<NEW_LINE>FulfillmentGroupItem cloned = createResponse.getClone();<NEW_LINE>cloned.setFulfillmentGroup(fulfillmentGroup.createOrRetrieveCopyInstance(context).getClone());<NEW_LINE>cloned.setOrderItem(orderItem.createOrRetrieveCopyInstance(context).getClone());<NEW_LINE>cloned.setProratedOrderAdjustmentAmount(proratedOrderAdjustment == null ? null : new Money(proratedOrderAdjustment));<NEW_LINE>cloned.setQuantity(quantity);<NEW_LINE>if (getStatus() != null) {<NEW_LINE>cloned.setStatus(getStatus());<NEW_LINE>}<NEW_LINE>cloneTaxDetails(context, cloned);<NEW_LINE>cloned.setTotalItemAmount(totalItemAmount == null ? null : new Money(totalItemAmount));<NEW_LINE>cloned.setTotalItemTaxableAmount(totalItemTaxableAmount == null ? <MASK><NEW_LINE>cloned.setTotalTax(totalTax == null ? null : new Money(totalTax));<NEW_LINE>return createResponse;<NEW_LINE>}
null : new Money(totalItemTaxableAmount));
269,425
public S3DestinationConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>S3DestinationConfig s3DestinationConfig = new S3DestinationConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("bucket", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>s3DestinationConfig.setBucket(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("prefix", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>s3DestinationConfig.setPrefix(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 s3DestinationConfig;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,027,797
private Optional<PaymentAllocationBuilder> preparePaymentAllocationBuilder(@NonNull final PaymentAllocationCriteria paymentAllocationCriteria) {<NEW_LINE>final boolean paymentAllocationItemsMissing = CollectionUtils.<MASK><NEW_LINE>if (paymentAllocationItemsMissing) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>final I_C_Payment payment = paymentAllocationCriteria.getPayment();<NEW_LINE>final PaymentDocument paymentDocument = toPaymentDocument(payment);<NEW_LINE>final ZonedDateTime paymentDate = TimeUtil.asZonedDateTime(paymentDocument.getDateTrx(), ZoneId.systemDefault());<NEW_LINE>final ImmutableList<PayableDocument> invoiceDocuments = paymentAllocationCriteria.getPaymentAllocationPayableItems().stream().map(paymentAllocationPayableItem -> toPayableDocument(paymentAllocationPayableItem, paymentDate)).collect(ImmutableList.toImmutableList());<NEW_LINE>final LocalDate dateTrx = TimeUtil.asLocalDate(paymentAllocationCriteria.getDateTrx());<NEW_LINE>final PaymentAllocationBuilder builder = PaymentAllocationBuilder.newBuilder().invoiceProcessingServiceCompanyService(invoiceProcessingServiceCompanyService).defaultDateTrx(dateTrx).paymentDocuments(ImmutableList.of(paymentDocument)).payableDocuments(invoiceDocuments).allowPartialAllocations(paymentAllocationCriteria.isAllowPartialAllocations()).payableRemainingOpenAmtPolicy(PaymentAllocationBuilder.PayableRemainingOpenAmtPolicy.DO_NOTHING).allowPurchaseSalesInvoiceCompensation(paymentAllocationBL.isPurchaseSalesInvoiceCompensationAllowed());<NEW_LINE>return Optional.of(builder);<NEW_LINE>}
isEmpty(paymentAllocationCriteria.getPaymentAllocationPayableItems());
1,641,774
public static void generateDependencyList(JavaCodeWriter writer, ValidateResult validatorResult, JspCoreContext context, boolean isTrackDependencies) {<NEW_LINE>writer.println("private static String[] _jspx_dependants;");<NEW_LINE>if (validatorResult.getDependencyList().size() > 0 || isTrackDependencies) {<NEW_LINE>writer.println("static {");<NEW_LINE>writer.print("_jspx_dependants = new String[");<NEW_LINE>if (validatorResult.getDependencyList().size() > 0) {<NEW_LINE>writer.print("" + validatorResult.getDependencyList().size());<NEW_LINE>} else {<NEW_LINE>writer.print("" + 0);<NEW_LINE>}<NEW_LINE>writer.print("];");<NEW_LINE>writer.println();<NEW_LINE>int count = 0;<NEW_LINE>String dependencyName = null;<NEW_LINE>long dependencyTimeStamp;<NEW_LINE>// String dependencyFullName=null;<NEW_LINE>// File dependencyFile=null;<NEW_LINE>for (Iterator itr = validatorResult.getDependencyList().iterator(); itr.hasNext(); ) {<NEW_LINE>writer.print("_jspx_dependants[" + (count++) + "] = \"");<NEW_LINE>dependencyName = <MASK><NEW_LINE>dependencyTimeStamp = context.getRealTimeStamp(dependencyName);<NEW_LINE>// dependencyFullName=context.getRealPath(dependencyName);<NEW_LINE>// dependencyFile = new File(dependencyFullName);<NEW_LINE>// writer.print(dependencyName+Constants.TIMESTAMP_DELIMETER+dependencyFile.lastModified() + Constants.TIMESTAMP_DELIMETER+ (new java.util.Date(dependencyFile.lastModified())).toString());<NEW_LINE>writer.print(dependencyName + Constants.TIMESTAMP_DELIMETER + dependencyTimeStamp + Constants.TIMESTAMP_DELIMETER + (new java.util.Date(dependencyTimeStamp)).toString());<NEW_LINE>writer.print("\";");<NEW_LINE>writer.println();<NEW_LINE>}<NEW_LINE>writer.println("}");<NEW_LINE>writer.println();<NEW_LINE>}<NEW_LINE>writer.println("public String[] getDependants() {");<NEW_LINE>writer.println("return _jspx_dependants;");<NEW_LINE>writer.println("}");<NEW_LINE>}
(String) itr.next();
1,455,816
public void initialize() throws IOException {<NEW_LINE>if (this.compliance == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.releaseInHex = Integer.toHexString(Integer.parseInt(this.compliance)).toUpperCase();<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>Path filePath = this.jdkHome.toPath().resolve("lib").resolve("ct.sym");<NEW_LINE>URI t = filePath.toUri();<NEW_LINE>if (!Files.exists(filePath)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>URI uri = URI.create("jar:file:" + t.getRawPath());<NEW_LINE>try {<NEW_LINE>this.<MASK><NEW_LINE>} catch (FileSystemNotFoundException fne) {<NEW_LINE>// Ignore and move on<NEW_LINE>}<NEW_LINE>if (this.fs == null) {<NEW_LINE>HashMap<String, ?> env = new HashMap<>();<NEW_LINE>try {<NEW_LINE>this.fs = FileSystems.newFileSystem(uri, env);<NEW_LINE>} catch (FileSystemAlreadyExistsException e) {<NEW_LINE>this.fs = FileSystems.getFileSystem(uri);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>this.releasePath = this.fs.getPath("/");<NEW_LINE>if (!Files.exists(this.fs.getPath(this.releaseInHex))) {<NEW_LINE>// $NON-NLS-1$//$NON-NLS-2$<NEW_LINE>throw new IllegalArgumentException("release " + this.compliance + " is not found in the system");<NEW_LINE>}<NEW_LINE>super.initialize();<NEW_LINE>}
fs = FileSystems.getFileSystem(uri);
1,495,857
protected void readConfig(IPath configPath) throws ErrorException {<NEW_LINE>try {<NEW_LINE>String xmlFile = configPath.toString();<NEW_LINE>File configFile = new File(xmlFile);<NEW_LINE>DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();<NEW_LINE>DocumentBuilder dBuilder;<NEW_LINE>dBuilder = dbFactory.newDocumentBuilder();<NEW_LINE>Document doc = dBuilder.parse(configFile);<NEW_LINE>doc.getDocumentElement().normalize();<NEW_LINE>NodeList nList = doc.getElementsByTagName("EnclaveConfiguration");<NEW_LINE>Node nNode = nList.item(0);<NEW_LINE>if (nNode.getNodeType() == Node.ELEMENT_NODE) {<NEW_LINE>Element e = (Element) nNode;<NEW_LINE>this.prodId = e.getElementsByTagName("ProdID").item(0).getTextContent();<NEW_LINE>this.isvSvn = e.getElementsByTagName("ISVSVN").item(0).getTextContent();<NEW_LINE>this.stackMinSize = e.getElementsByTagName("StackMinSize").item(0).getTextContent();<NEW_LINE>this.stackMaxSize = e.getElementsByTagName("StackMaxSize").item(0).getTextContent();<NEW_LINE>this.heapMinSize = e.getElementsByTagName("HeapMinSize").item(0).getTextContent();<NEW_LINE>this.heapInitSize = e.getElementsByTagName("HeapInitSize").item(0).getTextContent();<NEW_LINE>this.heapMaxSize = e.getElementsByTagName("HeapMaxSize").item(0).getTextContent();<NEW_LINE>this.tcsNum = e.getElementsByTagName("TCSNum").item(0).getTextContent();<NEW_LINE>this.tcsMaxNum = e.getElementsByTagName("TCSMaxNum").item(0).getTextContent();<NEW_LINE>this.tcsPool = e.getElementsByTagName("TCSMinPool").item(0).getTextContent();<NEW_LINE>this.tcsPolicy = e.getElementsByTagName("TCSPolicy").item(0).getTextContent();<NEW_LINE>this.disableDebug = e.getElementsByTagName("DisableDebug").item(0).getTextContent();<NEW_LINE>}<NEW_LINE>} catch (ParserConfigurationException e) {<NEW_LINE>Activator.log(e);<NEW_LINE>e.printStackTrace();<NEW_LINE>quitWithError("Could not parse '" + <MASK><NEW_LINE>} catch (SAXException e) {<NEW_LINE>Activator.log(e);<NEW_LINE>e.printStackTrace();<NEW_LINE>quitWithError("Could not parse '" + configPath.toOSString() + "'");<NEW_LINE>} catch (IOException e) {<NEW_LINE>Activator.log(e);<NEW_LINE>e.printStackTrace();<NEW_LINE>quitWithError("Could not read'" + configPath.toOSString() + "'");<NEW_LINE>}<NEW_LINE>}
configPath.toOSString() + "'");
982,452
public AttributeType putAttributeType(String label, AttributeType.ValueType valueType) {<NEW_LINE>if (valueType == null)<NEW_LINE>throw exception(TypeDBException.of(ATTRIBUTE_VALUE_TYPE_MISSING, label));<NEW_LINE>if (!valueType.isWritable())<NEW_LINE>throw exception(TypeDBException.of(UNSUPPORTED_OPERATION));<NEW_LINE>TypeVertex vertex = graphMgr.schema().getType(label);<NEW_LINE>switch(valueType) {<NEW_LINE>case BOOLEAN:<NEW_LINE>if (vertex != null)<NEW_LINE>return AttributeTypeImpl.Boolean.of(graphMgr, vertex);<NEW_LINE>else<NEW_LINE>return new AttributeTypeImpl.Boolean(graphMgr, label);<NEW_LINE>case LONG:<NEW_LINE>if (vertex != null)<NEW_LINE>return AttributeTypeImpl.Long.of(graphMgr, vertex);<NEW_LINE>else<NEW_LINE>return new AttributeTypeImpl.Long(graphMgr, label);<NEW_LINE>case DOUBLE:<NEW_LINE>if (vertex != null)<NEW_LINE>return AttributeTypeImpl.Double.of(graphMgr, vertex);<NEW_LINE>else<NEW_LINE>return new <MASK><NEW_LINE>case STRING:<NEW_LINE>if (vertex != null)<NEW_LINE>return AttributeTypeImpl.String.of(graphMgr, vertex);<NEW_LINE>else<NEW_LINE>return new AttributeTypeImpl.String(graphMgr, label);<NEW_LINE>case DATETIME:<NEW_LINE>if (vertex != null)<NEW_LINE>return AttributeTypeImpl.DateTime.of(graphMgr, vertex);<NEW_LINE>else<NEW_LINE>return new AttributeTypeImpl.DateTime(graphMgr, label);<NEW_LINE>default:<NEW_LINE>throw exception(TypeDBException.of(UNSUPPORTED_OPERATION, "putAttributeType", valueType.name()));<NEW_LINE>}<NEW_LINE>}
AttributeTypeImpl.Double(graphMgr, label);
1,266,788
public void updateScene(final DependencyGraphScene scene) {<NEW_LINE>assert SwingUtilities.isEventDispatchThread();<NEW_LINE>// add all nodes and edges now<NEW_LINE>GraphNode rootNode = cache.get(root.getDependencyConflictId());<NEW_LINE>// root needs to go first..<NEW_LINE>scene.addNode(rootNode);<NEW_LINE>for (GraphNode nd : cache.values()) {<NEW_LINE>if (nd != rootNode) {<NEW_LINE>scene.addNode(nd);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (GraphEdge<MavenDependencyNode> ed : edges) {<NEW_LINE>scene.addEdge(ed);<NEW_LINE>GraphNode grNode = cache.get(ed.getTarget().getDependencyConflictId());<NEW_LINE>if (grNode == null) {<NEW_LINE>// FOR conflicting nodes..<NEW_LINE>grNode = cache.get(ed.getTarget().getRelatedDependencyConflictId());<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>GraphNode parentGrNode = cache.get(ed.getSource().getDependencyConflictId());<NEW_LINE>scene.setEdgeSource(ed, parentGrNode);<NEW_LINE>}<NEW_LINE>}
scene.setEdgeTarget(ed, grNode);
229,345
private void decompileJar(String jarFilePath, String outputDir) throws IOException {<NEW_LINE>DecompilationOptions decompilationOptions = new DecompilationOptions();<NEW_LINE>decompilationOptions.setSettings(DecompilerSettings.javaDefaults());<NEW_LINE>decompilationOptions.setFullDecompilation(true);<NEW_LINE>final File jarFile = new File(jarFilePath);<NEW_LINE>if (!jarFile.exists()) {<NEW_LINE>throw new FileNotFoundException("File not found: " + jarFilePath);<NEW_LINE>}<NEW_LINE>final DecompilerSettings settings = decompilationOptions.getSettings();<NEW_LINE>settings.setTypeLoader(new InputTypeLoader());<NEW_LINE>settings.setExcludeNestedTypes(false);<NEW_LINE>final JarFile jar = new JarFile(jarFile);<NEW_LINE>final Enumeration<JarEntry> entries = jar.entries();<NEW_LINE>final boolean oldShowSyntheticMembers = settings.getShowSyntheticMembers();<NEW_LINE>final ITypeLoader oldTypeLoader = settings.getTypeLoader();<NEW_LINE>settings.setShowSyntheticMembers(false);<NEW_LINE>settings.setTypeLoader(new CompositeTypeLoader(new <MASK><NEW_LINE>try {<NEW_LINE>MetadataSystem metadataSystem = new NoRetryMetadataSystem(settings.getTypeLoader());<NEW_LINE>int classesDecompiled = 0;<NEW_LINE>while (entries.hasMoreElements()) {<NEW_LINE>final JarEntry entry = entries.nextElement();<NEW_LINE>final String name = entry.getName();<NEW_LINE>if (!name.endsWith(".class")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final String internalName = StringUtilities.removeRight(name, ".class");<NEW_LINE>try {<NEW_LINE>decompileType(metadataSystem, internalName, decompilationOptions, outputDir);<NEW_LINE>if (++classesDecompiled % 100 == 0) {<NEW_LINE>metadataSystem = new NoRetryMetadataSystem(settings.getTypeLoader());<NEW_LINE>}<NEW_LINE>} catch (final Throwable t) {<NEW_LINE>t.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>settings.setShowSyntheticMembers(oldShowSyntheticMembers);<NEW_LINE>settings.setTypeLoader(oldTypeLoader);<NEW_LINE>}<NEW_LINE>}
JarTypeLoader(jar), oldTypeLoader));
1,430,195
public void allocateUnassigned(RoutingAllocation allocation) {<NEW_LINE>final RoutingNodes routingNodes = allocation.routingNodes();<NEW_LINE>final RoutingNodes.UnassignedShards.UnassignedIterator unassignedIterator = routingNodes.unassigned().iterator();<NEW_LINE>while (unassignedIterator.hasNext()) {<NEW_LINE>final ShardRouting shard = unassignedIterator.next();<NEW_LINE>final AllocateUnassignedDecision allocateUnassignedDecision = makeAllocationDecision(shard, allocation, logger);<NEW_LINE>if (allocateUnassignedDecision.isDecisionTaken() == false) {<NEW_LINE>// no decision was taken by this allocator<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (allocateUnassignedDecision.getAllocationDecision() == AllocationDecision.YES) {<NEW_LINE>unassignedIterator.initialize(allocateUnassignedDecision.getTargetNode().getId(), allocateUnassignedDecision.getAllocationId(), shard.primary() ? ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE : allocation.clusterInfo().getShardSize(shard, ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE<MASK><NEW_LINE>} else {<NEW_LINE>unassignedIterator.removeAndIgnore(allocateUnassignedDecision.getAllocationStatus(), allocation.changes());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
), allocation.changes());
458,868
private long streamMessagesForRecording() {<NEW_LINE>try (ExclusivePublication publication = aeron.addExclusivePublication(CHANNEL, STREAM_ID)) {<NEW_LINE>final IdleStrategy idleStrategy = YieldingIdleStrategy.INSTANCE;<NEW_LINE>while (!publication.isConnected()) {<NEW_LINE>idleStrategy.idle();<NEW_LINE>}<NEW_LINE>final long startNs = System.nanoTime();<NEW_LINE>final UnsafeBuffer buffer = this.buffer;<NEW_LINE>for (long i = 0; i < NUMBER_OF_MESSAGES; i++) {<NEW_LINE>buffer.putLong(0, i);<NEW_LINE>idleStrategy.reset();<NEW_LINE>while (publication.offer(buffer, 0, MESSAGE_LENGTH) < 0) {<NEW_LINE>idleStrategy.idle();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final long stopPosition = publication.position();<NEW_LINE>final CountersReader counters = aeron.countersReader();<NEW_LINE>final int counterId = RecordingPos.findCounterIdBySession(counters, publication.sessionId());<NEW_LINE>idleStrategy.reset();<NEW_LINE>while (counters.getCounterValue(counterId) < stopPosition) {<NEW_LINE>idleStrategy.idle();<NEW_LINE>}<NEW_LINE>final long durationMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs);<NEW_LINE>final double dataRate = (stopPosition * 1000.0d / durationMs) / MEGABYTE;<NEW_LINE>final double recordingMb = stopPosition / MEGABYTE;<NEW_LINE>final long msgRate <MASK><NEW_LINE>System.out.printf("Recorded %.02f MB @ %.02f MB/s - %,d msg/sec - %d byte payload + 32 byte header%n", recordingMb, dataRate, msgRate, MESSAGE_LENGTH);<NEW_LINE>return RecordingPos.getRecordingId(counters, counterId);<NEW_LINE>}<NEW_LINE>}
= (NUMBER_OF_MESSAGES / durationMs) * 1000L;
1,157,647
public InputRowListPlusRawValues transform(@Nullable final InputRowListPlusRawValues row) {<NEW_LINE>if (row == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final InputRowListPlusRawValues inputRowListPlusRawValues;<NEW_LINE>if (transforms.isEmpty() || row.getInputRows() == null) {<NEW_LINE>inputRowListPlusRawValues = row;<NEW_LINE>} else {<NEW_LINE>final List<InputRow> originalRows = row.getInputRows();<NEW_LINE>final List<InputRow> transformedRows = new ArrayList<>(originalRows.size());<NEW_LINE>for (InputRow originalRow : originalRows) {<NEW_LINE>transformedRows.add(new TransformedInputRow(originalRow, transforms));<NEW_LINE>}<NEW_LINE>inputRowListPlusRawValues = InputRowListPlusRawValues.ofList(row.getRawValuesList(), transformedRows);<NEW_LINE>}<NEW_LINE>if (valueMatcher != null) {<NEW_LINE>if (inputRowListPlusRawValues.getInputRows() != null) {<NEW_LINE>// size of inputRows and rawValues are the same<NEW_LINE>int size = inputRowListPlusRawValues.getInputRows().size();<NEW_LINE>final List<InputRow> matchedRows = new ArrayList<>(size);<NEW_LINE>final List<Map<String, Object>> matchedVals = new ArrayList<>(size);<NEW_LINE>final List<InputRow> inputRows = inputRowListPlusRawValues.getInputRows();<NEW_LINE>final List<Map<String, Object>> inputVals = inputRowListPlusRawValues.getRawValuesList();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>rowSupplierForValueMatcher.set(inputRows.get(i));<NEW_LINE>if (valueMatcher.matches()) {<NEW_LINE>matchedRows.add(inputRows.get(i));<NEW_LINE>matchedVals.add<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return InputRowListPlusRawValues.ofList(matchedVals, matchedRows);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return inputRowListPlusRawValues;<NEW_LINE>}
(inputVals.get(i));
739,064
public Map<String, BlobContainer> children() throws IOException {<NEW_LINE>try (AmazonS3Reference clientReference = blobStore.clientReference()) {<NEW_LINE>return executeListing(clientReference, listObjectsRequest(keyPath)).stream().flatMap(listing -> {<NEW_LINE>assert listing.getObjectSummaries().stream().noneMatch(s -> {<NEW_LINE>for (String commonPrefix : listing.getCommonPrefixes()) {<NEW_LINE>if (s.getKey().substring(keyPath.length()).startsWith(commonPrefix)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}) : "Response contained children for listed common prefixes.";<NEW_LINE>return listing.getCommonPrefixes().stream();<NEW_LINE>}).map(prefix -> prefix.substring(keyPath.length())).filter(// Stripping the trailing slash off of the common prefix<NEW_LINE>name -> name.isEmpty() == false).map(name -> name.substring(0, name.length() - 1)).collect(Collectors.toMap(Function.identity(), name -> blobStore.blobContainer(path().add(name))));<NEW_LINE>} catch (final AmazonClientException e) {<NEW_LINE>throw new IOException("Exception when listing children of [" + path().<MASK><NEW_LINE>}<NEW_LINE>}
buildAsString() + ']', e);
327,221
public Object parseContent(Object object, JSONObject exJson) throws Exception {<NEW_LINE>object = JSONObject.toJSON(object);<NEW_LINE>if (object instanceof JSONObject) {<NEW_LINE>JSONObject jsonObject = (JSONObject) object;<NEW_LINE>if ("innerFun".equals(jsonObject.getString("__innerType__"))) {<NEW_LINE>String name = jsonObject.getString("name");<NEW_LINE>JSONObject nameJson = exJson.getJSONObject(name);<NEW_LINE>nameJson <MASK><NEW_LINE>jsonObject = Tools.deepMerge(nameJson, jsonObject);<NEW_LINE>return innerFunResult(jsonObject);<NEW_LINE>} else {<NEW_LINE>JSONObject retJson = new JSONObject();<NEW_LINE>for (String key : jsonObject.keySet()) {<NEW_LINE>retJson.put(key, parseContent(jsonObject.get(key), exJson));<NEW_LINE>}<NEW_LINE>return retJson;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (object instanceof JSONArray) {<NEW_LINE>JSONArray jsonArray = (JSONArray) object;<NEW_LINE>for (int index = 0; index < jsonArray.size(); index++) {<NEW_LINE>jsonArray.set(index, parseContent(jsonArray.get(index), exJson));<NEW_LINE>}<NEW_LINE>return jsonArray;<NEW_LINE>}<NEW_LINE>return object;<NEW_LINE>}
= nameJson == null ? exJson : nameJson;
1,154,769
public void run() {<NEW_LINE>// Call the API so we can get the updated coordinates.<NEW_LINE>call = service.loadLocation();<NEW_LINE>call.enqueue(new Callback<IssModel>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(Call<IssModel> call, Response<IssModel> response) {<NEW_LINE>// We only need the latitude and longitude from the API.<NEW_LINE>if (response.body() != null) {<NEW_LINE>double latitude = response.body().getIssPosition().getLatitude();<NEW_LINE>double longitude = response.body().getIssPosition().getLongitude();<NEW_LINE>updateMarkerPosition(new LatLng(latitude, longitude));<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFailure(Call<IssModel> call, Throwable throwable) {<NEW_LINE>// If retrofit fails or the API was unreachable, an error will be called.<NEW_LINE>// to check if throwable is null, then give a custom message.<NEW_LINE>if (throwable.getMessage() == null) {<NEW_LINE>Timber.e("Http connection failed");<NEW_LINE>} else {<NEW_LINE>Timber.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// Schedule the next execution time for this runnable.<NEW_LINE>handler.postDelayed(this, apiCallTime);<NEW_LINE>}
e(throwable.getMessage());
180,113
public <A> void createUnidirectional(DeployBeanDescriptor<?> targetDesc, Class<A> targetType, BeanTable beanTable, DeployTableJoin oneToManyJoin) {<NEW_LINE>// create the 'shadow' unidirectional property<NEW_LINE>// which is put on the target descriptor<NEW_LINE>DeployBeanPropertyAssocOne<A> unidirectional = new DeployBeanPropertyAssocOne<>(targetDesc, targetType);<NEW_LINE>unidirectional.setUndirectionalShadow();<NEW_LINE>unidirectional.setNullable(false);<NEW_LINE>unidirectional.setDbRead(true);<NEW_LINE>unidirectional.setDbInsertable(true);<NEW_LINE>unidirectional.setDbUpdateable(false);<NEW_LINE>unidirectional.setBeanTable(beanTable);<NEW_LINE>unidirectional.<MASK><NEW_LINE>unidirectional.setJoinType(true);<NEW_LINE>unidirectional.setJoinColumns(oneToManyJoin.columns(), true);<NEW_LINE>targetDesc.setUnidirectional(unidirectional);<NEW_LINE>}
setName(beanTable.getBaseTable());
375,918
protected Optional<ABCAnalysisLine> createABCAnalysisLine(ABCAnalysis abcAnalysis, Product product) throws AxelorException {<NEW_LINE>ABCAnalysisLine abcAnalysisLine = null;<NEW_LINE>List<StockLocation> stockLocationList = stockLocationService.getAllLocationAndSubLocation(abcAnalysis.getStockLocation(), false);<NEW_LINE>BigDecimal productQty = BigDecimal.ZERO;<NEW_LINE>BigDecimal productWorth = BigDecimal.ZERO;<NEW_LINE>List<StockLocationLine> stockLocationLineList;<NEW_LINE>int offset = 0;<NEW_LINE>Query<StockLocationLine> stockLocationLineQuery = stockLocationLineRepository.all().filter("self.stockLocation IN :stockLocationList AND self.product.id = :productId AND self.currentQty != 0 ").bind("stockLocationList", stockLocationList).bind("productId", product.getId());<NEW_LINE>while (!(stockLocationLineList = stockLocationLineQuery.fetch(FETCH_LIMIT, offset)).isEmpty()) {<NEW_LINE>offset += stockLocationLineList.size();<NEW_LINE>abcAnalysis = abcAnalysisRepository.find(abcAnalysis.getId());<NEW_LINE>if (abcAnalysisLine == null) {<NEW_LINE>abcAnalysisLine = super.createABCAnalysisLine(abcAnalysis, product).get();<NEW_LINE>}<NEW_LINE>for (StockLocationLine stockLocationLine : stockLocationLineList) {<NEW_LINE>BigDecimal convertedQty = unitConversionService.convert(stockLocationLine.getUnit(), product.getUnit(), stockLocationLine.getCurrentQty(), 5, product);<NEW_LINE><MASK><NEW_LINE>productWorth = productWorth.add(stockLocationLine.getAvgPrice());<NEW_LINE>}<NEW_LINE>super.incTotalQty(productQty);<NEW_LINE>super.incTotalWorth(productWorth);<NEW_LINE>JPA.clear();<NEW_LINE>}<NEW_LINE>if (abcAnalysisLine != null) {<NEW_LINE>setQtyWorth(abcAnalysisLineRepository.find(abcAnalysisLine.getId()), productQty, productWorth);<NEW_LINE>}<NEW_LINE>return Optional.ofNullable(abcAnalysisLine);<NEW_LINE>}
productQty = productQty.add(convertedQty);
510,728
protected void createGetMethod(String url) {<NEW_LINE>URI uri = URI.create(url);<NEW_LINE>String authority = uri.getAuthority();<NEW_LINE>if ((uri.getUserInfo() == null) && authority != null) {<NEW_LINE>int <MASK><NEW_LINE>if (userInfoIndex != -1) {<NEW_LINE>String userInfo = authority.substring(0, userInfoIndex);<NEW_LINE>String encodedUserInfo = HttpUtils.urlEncodeWithUtf8(getUsername()) + ":" + HttpUtils.urlEncodeWithUtf8(getPassword());<NEW_LINE>uri = URI.create(url.replace(userInfo, encodedUserInfo));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>getMethod = new HttpGet(uri);<NEW_LINE>getMethod.getParams().setParameter(ClientPNames.HANDLE_REDIRECTS, true);<NEW_LINE>state.setAttribute(ClientContext.CREDS_PROVIDER, new WsdlCredentialsProvider());<NEW_LINE>if (SoapUI.getSettings().getBoolean(HttpSettings.AUTHENTICATE_PREEMPTIVELY)) {<NEW_LINE>if (!StringUtils.isNullOrEmpty(getUsername()) && !StringUtils.isNullOrEmpty(getPassword())) {<NEW_LINE>UsernamePasswordCredentials creds = new UsernamePasswordCredentials(getUsername(), getPassword());<NEW_LINE>getMethod.addHeader(BasicScheme.authenticate(creds, "utf-8", false));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
userInfoIndex = authority.lastIndexOf("@");
1,839,912
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>List<DataSourceInfoGroup> dataSourceGroups = new ArrayList<>();<NEW_LINE>List<DataSourceInfo> dataSources = new ArrayList<>();<NEW_LINE>List<ApplicationResource> privateResources = getContainerWrapper().getPrivateDataSources();<NEW_LINE>List<ApplicationResource> globalResources = getContainerWrapper().getGlobalDataSources();<NEW_LINE>// filter out anything that is not a datasource<NEW_LINE>// and use only those datasources that are properly configured<NEW_LINE>// as aggregated totals would not make any sense otherwise<NEW_LINE>filterValidDataSources(privateResources, dataSources);<NEW_LINE>filterValidDataSources(globalResources, dataSources);<NEW_LINE>// sort datasources by JDBC URL<NEW_LINE>Collections.sort(dataSources, new Comparator<DataSourceInfo>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(DataSourceInfo ds1, DataSourceInfo ds2) {<NEW_LINE>String jdbcUrl1 = ds1.getJdbcUrl();<NEW_LINE>String jdbcUrl2 = ds2.getJdbcUrl();<NEW_LINE>// here we rely on the the filter not to add any datasources with a null jdbcUrl to the list<NEW_LINE>return jdbcUrl1.compareToIgnoreCase(jdbcUrl2);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// group datasources by JDBC URL and calculate aggregated totals<NEW_LINE>DataSourceInfoGroup dsGroup = null;<NEW_LINE>for (DataSourceInfo ds : dataSources) {<NEW_LINE>if (dsGroup == null || !dsGroup.getJdbcUrl().equalsIgnoreCase(ds.getJdbcUrl())) {<NEW_LINE>dsGroup = new DataSourceInfoGroup().builder(ds);<NEW_LINE>dataSourceGroups.add(dsGroup);<NEW_LINE>} else {<NEW_LINE>dsGroup.addDataSourceInfo(ds);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new ModelAndView(<MASK><NEW_LINE>}
getViewName(), "dataSourceGroups", dataSourceGroups);
878,060
public AuthStatus secureResponse(MessageInfo messageInfo, Subject serviceSubject) throws AuthException {<NEW_LINE>AuthStatus[] status = new AuthStatus[module.length];<NEW_LINE>for (int i = 0; i < module.length; i++) {<NEW_LINE>if (module[i] == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (isLoggable(FINE)) {<NEW_LINE>logIfLevel(FINE, null, "ServerAuthContext: ", authContextID, "of AppContext: ", getAppContext(), "calling secureResponse on module");<NEW_LINE>}<NEW_LINE>status[i] = module[i].secureResponse(messageInfo, serviceSubject);<NEW_LINE>if (authContextHelperHelper.exitContext(secureResponseSuccessValues, i, status[i])) {<NEW_LINE>return authContextHelperHelper.getReturnStatus(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return authContextHelperHelper.getReturnStatus(secureResponseSuccessValues, SEND_FAILURE, status, status.length - 1);<NEW_LINE>}
secureResponseSuccessValues, SEND_FAILURE, status, i);
1,005,285
private void init() {<NEW_LINE>// Retrieve entire file and re-populate the list.<NEW_LINE>File snapshotFile = new File(filename);<NEW_LINE>if (!snapshotFile.exists()) {<NEW_LINE>snapshotFile.getParentFile().mkdirs();<NEW_LINE>logger.info("Snapshot status file do not exist on system. Bypassing initilization phase.");<NEW_LINE>backupMetadataMap <MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try (final ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(snapshotFile))) {<NEW_LINE>backupMetadataMap = (Map<String, LinkedList<BackupMetadata>>) inputStream.readObject();<NEW_LINE>logger.info("Snapshot status of size {} fetched successfully from {}", backupMetadataMap.size(), filename);<NEW_LINE>} catch (IOException e) {<NEW_LINE>logger.error("Error while trying to fetch snapshot status from {}. Error: {}. If this is first time after upgrading Priam, ignore this.", filename, e.getLocalizedMessage());<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("Error while trying to fetch snapshot status from {}. Error: {}.", filename, e.getLocalizedMessage());<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>if (backupMetadataMap == null)<NEW_LINE>backupMetadataMap = new MaxSizeHashMap<>(capacity);<NEW_LINE>}
= new MaxSizeHashMap<>(capacity);
15,726
public static DescribeAccountsResponse unmarshall(DescribeAccountsResponse describeAccountsResponse, UnmarshallerContext context) {<NEW_LINE>describeAccountsResponse.setRequestId(context.stringValue("DescribeAccountsResponse.RequestId"));<NEW_LINE>describeAccountsResponse.setPageSize(context.integerValue("DescribeAccountsResponse.PageSize"));<NEW_LINE>describeAccountsResponse.setCurrentPage(context.integerValue("DescribeAccountsResponse.CurrentPage"));<NEW_LINE>describeAccountsResponse.setTotalCount(context.integerValue("DescribeAccountsResponse.TotalCount"));<NEW_LINE>List<Account> items = new ArrayList<Account>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeAccountsResponse.Items.Length"); i++) {<NEW_LINE>Account account = new Account();<NEW_LINE>account.setId(context.longValue("DescribeAccountsResponse.Items[" + i + "].Id"));<NEW_LINE>account.setUserId(context.longValue("DescribeAccountsResponse.Items[" + i + "].UserId"));<NEW_LINE>account.setFirstLevelDepartId(context.longValue("DescribeAccountsResponse.Items[" + i + "].FirstLevelDepartId"));<NEW_LINE>account.setLoginName(context.stringValue("DescribeAccountsResponse.Items[" + i + "].LoginName"));<NEW_LINE>account.setFullName(context.stringValue("DescribeAccountsResponse.Items[" + i + "].FullName"));<NEW_LINE>account.setCellphoneNum(context.stringValue("DescribeAccountsResponse.Items[" + i + "].CellphoneNum"));<NEW_LINE>account.setTelephoneNum(context.stringValue("DescribeAccountsResponse.Items[" + i + "].TelephoneNum"));<NEW_LINE>account.setEmail(context.stringValue("DescribeAccountsResponse.Items[" + i + "].Email"));<NEW_LINE>account.setActiveStatus(context.stringValue<MASK><NEW_LINE>account.setDeleteStatus(context.stringValue("DescribeAccountsResponse.Items[" + i + "].DeleteStatus"));<NEW_LINE>account.setDataInstance(context.stringValue("DescribeAccountsResponse.Items[" + i + "].DataInstance"));<NEW_LINE>account.setCreateTime(context.longValue("DescribeAccountsResponse.Items[" + i + "].CreateTime"));<NEW_LINE>account.setLoginDataTime(context.longValue("DescribeAccountsResponse.Items[" + i + "].LoginDataTime"));<NEW_LINE>account.setLoginPolicyName(context.stringValue("DescribeAccountsResponse.Items[" + i + "].LoginPolicyName"));<NEW_LINE>account.setFirstLevelDepartName(context.stringValue("DescribeAccountsResponse.Items[" + i + "].FirstLevelDepartName"));<NEW_LINE>account.setRoleNames(context.stringValue("DescribeAccountsResponse.Items[" + i + "].RoleNames"));<NEW_LINE>account.setInstanceName(context.stringValue("DescribeAccountsResponse.Items[" + i + "].InstanceName"));<NEW_LINE>account.setAliUid(context.longValue("DescribeAccountsResponse.Items[" + i + "].AliUid"));<NEW_LINE>account.setAccountTypeId(context.longValue("DescribeAccountsResponse.Items[" + i + "].AccountTypeId"));<NEW_LINE>EventCount eventCount = new EventCount();<NEW_LINE>Total total = new Total();<NEW_LINE>total.setTotalCount(context.longValue("DescribeAccountsResponse.Items[" + i + "].EventCount.Total.TotalCount"));<NEW_LINE>total.setUndealCount(context.longValue("DescribeAccountsResponse.Items[" + i + "].EventCount.Total.UndealCount"));<NEW_LINE>total.setConfirmCount(context.longValue("DescribeAccountsResponse.Items[" + i + "].EventCount.Total.ConfirmCount"));<NEW_LINE>total.setExcludeCount(context.longValue("DescribeAccountsResponse.Items[" + i + "].EventCount.Total.ExcludeCount"));<NEW_LINE>eventCount.setTotal(total);<NEW_LINE>account.setEventCount(eventCount);<NEW_LINE>items.add(account);<NEW_LINE>}<NEW_LINE>describeAccountsResponse.setItems(items);<NEW_LINE>return describeAccountsResponse;<NEW_LINE>}
("DescribeAccountsResponse.Items[" + i + "].ActiveStatus"));
1,406,916
public void loadMapTileAsync(final MapTileRequestState pState) {<NEW_LINE>synchronized (mQueueLockObject) {<NEW_LINE>if (DEBUG_TILE_PROVIDERS) {<NEW_LINE>ClientLog.d(LOG_TAG, "MapTileModuleProviderBase.loadMaptileAsync() on provider: " + getName() + " for tile: " + pState.getMapTile());<NEW_LINE>if (mPending.containsKey(pState.getMapTile()))<NEW_LINE>ClientLog.d(LOG_TAG, "MapTileModuleProviderBase.loadMaptileAsync() tile already exists in request queue for modular provider. Moving to front of queue.");<NEW_LINE>else<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// this will put the tile in the queue, or move it to the front of<NEW_LINE>// the queue if it's already present<NEW_LINE>mPending.put(pState.getMapTile(), pState);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>mExecutor.execute(getTileLoader());<NEW_LINE>} catch (final RejectedExecutionException e) {<NEW_LINE>ClientLog.e(LOG_TAG, "RejectedExecutionException", e);<NEW_LINE>}<NEW_LINE>}
ClientLog.d(LOG_TAG, "MapTileModuleProviderBase.loadMaptileAsync() adding tile to request queue for modular provider.");
698,445
public String transformMarkdown(String source) {<NEW_LINE>List<String> <MASK><NEW_LINE>String state = "root";<NEW_LINE>boolean prevLineIsEmpty = true;<NEW_LINE>for (String line : source.split("\n")) {<NEW_LINE>switch(state) {<NEW_LINE>case "root":<NEW_LINE>if (match(fourspacesOrTab, line) && prevLineIsEmpty) {<NEW_LINE>output.add(line);<NEW_LINE>state = "tab";<NEW_LINE>} else if (match(javacodeblock, line)) {<NEW_LINE>output.add("");<NEW_LINE>state = "java";<NEW_LINE>} else if (match(othercodeblock, line)) {<NEW_LINE>output.add("");<NEW_LINE>state = "other";<NEW_LINE>} else {<NEW_LINE>prevLineIsEmpty = line.isEmpty();<NEW_LINE>output.add("// " + line);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case "tab":<NEW_LINE>if (match(spaceOrTab, line)) {<NEW_LINE>output.add(line);<NEW_LINE>} else if (line.isEmpty()) {<NEW_LINE>output.add("");<NEW_LINE>} else {<NEW_LINE>output.add("// " + line);<NEW_LINE>state = "root";<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case "java":<NEW_LINE>if (match(endcodeblock, line)) {<NEW_LINE>output.add("");<NEW_LINE>state = "root";<NEW_LINE>} else {<NEW_LINE>output.add(line);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case "other":<NEW_LINE>if (match(endcodeblock, line)) {<NEW_LINE>output.add("");<NEW_LINE>state = "root";<NEW_LINE>} else {<NEW_LINE>output.add("// " + line);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return String.join("\n", output);<NEW_LINE>}
output = new ArrayList<>();
874,337
public void parseSelectFields(JoinInfo joinInfo) {<NEW_LINE>String sideTableName = joinInfo.getSideTableName();<NEW_LINE>String nonSideTableName = joinInfo.getNonSideTable();<NEW_LINE>List<String> fields = Lists.newArrayList();<NEW_LINE>int sideTableFieldIndex = 0;<NEW_LINE>for (int i = 0; i < outFieldInfoList.size(); i++) {<NEW_LINE>FieldInfo <MASK><NEW_LINE>if (fieldInfo.getTable().equalsIgnoreCase(sideTableName)) {<NEW_LINE>String sideFieldName = sideTableInfo.getPhysicalFields().getOrDefault(fieldInfo.getFieldName(), fieldInfo.getFieldName());<NEW_LINE>fields.add(sideFieldName);<NEW_LINE>sideSelectFieldsType.put(sideTableFieldIndex, getTargetFieldType(fieldInfo.getFieldName()));<NEW_LINE>sideFieldIndex.put(i, sideTableFieldIndex);<NEW_LINE>sideFieldNameIndex.put(i, sideFieldName);<NEW_LINE>sideTableFieldIndex++;<NEW_LINE>} else if (fieldInfo.getTable().equalsIgnoreCase(nonSideTableName)) {<NEW_LINE>int nonSideIndex = rowTypeInfo.getFieldIndex(fieldInfo.getFieldName());<NEW_LINE>inFieldIndex.put(i, nonSideIndex);<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("unknown table " + fieldInfo.getTable());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (fields.size() == 0) {<NEW_LINE>throw new RuntimeException("select non field from table " + sideTableName);<NEW_LINE>}<NEW_LINE>sideSelectFields = String.join(",", fields);<NEW_LINE>}
fieldInfo = outFieldInfoList.get(i);
1,368,463
private void handleUpdatedFeedStatus(Feed feed) {<NEW_LINE>if (feed != null) {<NEW_LINE>if (DownloadService.isDownloadingFile(feed.getDownload_url())) {<NEW_LINE>viewBinding.subscribeButton.setEnabled(false);<NEW_LINE>viewBinding.subscribeButton.setText(R.string.subscribing_label);<NEW_LINE>} else if (feedInFeedlist(feed)) {<NEW_LINE>viewBinding.subscribeButton.setEnabled(true);<NEW_LINE>viewBinding.subscribeButton.setText(R.string.open_podcast);<NEW_LINE>if (didPressSubscribe) {<NEW_LINE>didPressSubscribe = false;<NEW_LINE>if (UserPreferences.isEnableAutodownload()) {<NEW_LINE>boolean autoDownload = viewBinding.autoDownloadCheckBox.isChecked();<NEW_LINE>Feed feed1 = DBReader.getFeed(getFeedId(feed));<NEW_LINE>FeedPreferences feedPreferences = feed1.getPreferences();<NEW_LINE>feedPreferences.setAutoDownload(autoDownload);<NEW_LINE>DBWriter.setFeedPreferences(feedPreferences);<NEW_LINE>SharedPreferences preferences = getSharedPreferences(PREFS, MODE_PRIVATE);<NEW_LINE>SharedPreferences.Editor editor = preferences.edit();<NEW_LINE><MASK><NEW_LINE>editor.apply();<NEW_LINE>}<NEW_LINE>openFeed();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>viewBinding.subscribeButton.setEnabled(true);<NEW_LINE>viewBinding.subscribeButton.setText(R.string.subscribe_label);<NEW_LINE>if (UserPreferences.isEnableAutodownload()) {<NEW_LINE>viewBinding.autoDownloadCheckBox.setVisibility(View.VISIBLE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
editor.putBoolean(PREF_LAST_AUTO_DOWNLOAD, autoDownload);
972,221
final DeleteUserResult executeDeleteUser(DeleteUserRequest deleteUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteUserRequest> request = null;<NEW_LINE>Response<DeleteUserResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteUserRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "mq");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUser");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteUserResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteUserResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
126,968
public static IRubyObject doAcceptNonblock(RubySocket sock, ThreadContext context, boolean ex) {<NEW_LINE>try {<NEW_LINE>Channel channel = sock.getChannel();<NEW_LINE>if (channel instanceof SelectableChannel) {<NEW_LINE>SelectableChannel selectable = (SelectableChannel) channel;<NEW_LINE>synchronized (selectable.blockingLock()) {<NEW_LINE>boolean oldBlocking = selectable.isBlocking();<NEW_LINE>try {<NEW_LINE>selectable.configureBlocking(false);<NEW_LINE>IRubyObject socket = doAccept(sock, context, ex);<NEW_LINE>if (!(socket instanceof RubySocket))<NEW_LINE>return socket;<NEW_LINE>SocketChannel socketChannel = (SocketChannel) ((RubySocket) socket).getChannel();<NEW_LINE>InetSocketAddress addr = (InetSocketAddress) socketChannel.socket().getRemoteSocketAddress();<NEW_LINE>return context.runtime.newArray(socket, Sockaddr.packSockaddrFromAddress(context, addr));<NEW_LINE>} finally {<NEW_LINE>selectable.configureBlocking(oldBlocking);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw sockerr(context.runtime, e.getLocalizedMessage(), e);<NEW_LINE>}<NEW_LINE>}
throw context.runtime.newErrnoENOPROTOOPTError();
499,533
public ListRootsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListRootsResult listRootsResult = new ListRootsResult();<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 listRootsResult;<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("Roots", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listRootsResult.setRoots(new ListUnmarshaller<Root>(RootJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listRootsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listRootsResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,476,605
public JComponent prepareRenderingComponent(JXMonthView monthView, Calendar calendar, CalendarState dayState) {<NEW_LINE>JComponent c = super.<MASK><NEW_LINE>int px = monthView.getBoxPaddingX();<NEW_LINE>int py = monthView.getBoxPaddingY();<NEW_LINE>// scale borders<NEW_LINE>Border border = null;<NEW_LINE>if (dayState == CalendarState.TITLE && monthView.isTraversable()) {<NEW_LINE>Border b = c.getBorder();<NEW_LINE>if (b instanceof CompoundBorder && ((CompoundBorder) b).getInsideBorder() instanceof EmptyBorder)<NEW_LINE>border = new CompoundBorder(((CompoundBorder) b).getOutsideBorder(), new FlatEmptyBorder(py * 2, 0, py * 2, 0));<NEW_LINE>} else if (dayState == CalendarState.TODAY)<NEW_LINE>border = new FlatLineBorder(new Insets(py, px, py, px), monthView.getTodayBackground());<NEW_LINE>if (border == null)<NEW_LINE>border = new FlatEmptyBorder(py, px, py, px);<NEW_LINE>c.setBorder(border);<NEW_LINE>return c;<NEW_LINE>}
prepareRenderingComponent(monthView, calendar, dayState);
127,200
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject sourceObject = source.getSourceObject(game);<NEW_LINE>Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));<NEW_LINE>if (controller != null && sourceObject != null && opponent != null) {<NEW_LINE>if (opponent.getLibrary().hasCards()) {<NEW_LINE>Card card = opponent.getLibrary().getFromTop(game);<NEW_LINE>if (card != null && opponent.moveCards(card, Zone.EXILED, source, game)) {<NEW_LINE>if (!card.isLand(game)) {<NEW_LINE>if (controller.chooseUse(outcome, "Cast " + card.getLogName() + " without paying its mana cost from exile?", source, game)) {<NEW_LINE>game.getState().setValue("PlayFromNotOwnHandZone" + card.<MASK><NEW_LINE>controller.cast(controller.chooseAbilityForCast(card, game, true), game, true, new ApprovingObject(source, game));<NEW_LINE>game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
getId(), Boolean.TRUE);
1,348,123
public PersistenceResponse addEntity(EntityForm entityForm, String[] customCriteria, List<SectionCrumb> sectionCrumb) throws ServiceException {<NEW_LINE>PersistencePackageRequest ppr = getRequestForEntityForm(entityForm, customCriteria, sectionCrumb);<NEW_LINE>// If the entity form has dynamic forms inside of it, we need to persist those as well.<NEW_LINE>// They are typically done in their own custom persistence handlers, which will get triggered<NEW_LINE>// based on the criteria specific in the PersistencePackage.<NEW_LINE>for (Entry<String, EntityForm> entry : entityForm.getDynamicForms().entrySet()) {<NEW_LINE>DynamicEntityFormInfo info = entityForm.getDynamicFormInfo(entry.getKey());<NEW_LINE>if (info.getCustomCriteriaOverride() != null) {<NEW_LINE>customCriteria = info.getCustomCriteriaOverride();<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>String propertyValue;<NEW_LINE>if (entityForm.getFields().containsKey(propertyName)) {<NEW_LINE>propertyValue = entityForm.findField(propertyName).getValue();<NEW_LINE>} else {<NEW_LINE>propertyValue = info.getPropertyValue();<NEW_LINE>}<NEW_LINE>customCriteria = new String[] { info.getCriteriaName(), entityForm.getId(), propertyName, propertyValue };<NEW_LINE>}<NEW_LINE>PersistencePackageRequest subRequest = getRequestForEntityForm(entry.getValue(), customCriteria, sectionCrumb);<NEW_LINE>ppr.addSubRequest(info.getPropertyName(), subRequest);<NEW_LINE>}<NEW_LINE>return add(ppr);<NEW_LINE>}
String propertyName = info.getPropertyName();
1,815,288
public com.amazonaws.services.polly.model.InvalidS3KeyException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.polly.model.InvalidS3KeyException invalidS3KeyException = new com.amazonaws.services.<MASK><NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 invalidS3KeyException;<NEW_LINE>}
polly.model.InvalidS3KeyException(null);
1,410,638
private void initQRCodeReaderView() {<NEW_LINE>View content = getLayoutInflater().inflate(R.<MASK><NEW_LINE>qrCodeReaderView = (QRCodeReaderView) content.findViewById(R.id.qrdecoderview);<NEW_LINE>resultTextView = (TextView) content.findViewById(R.id.result_text_view);<NEW_LINE>flashlightCheckBox = (CheckBox) content.findViewById(R.id.flashlight_checkbox);<NEW_LINE>enableDecodingCheckBox = (CheckBox) content.findViewById(R.id.enable_decoding_checkbox);<NEW_LINE>pointsOverlayView = (PointsOverlayView) content.findViewById(R.id.points_overlay_view);<NEW_LINE>qrCodeReaderView.setAutofocusInterval(2000L);<NEW_LINE>qrCodeReaderView.setOnQRCodeReadListener(this);<NEW_LINE>qrCodeReaderView.setBackCamera();<NEW_LINE>flashlightCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {<NEW_LINE>qrCodeReaderView.setTorchEnabled(isChecked);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>enableDecodingCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {<NEW_LINE>qrCodeReaderView.setQRDecodingEnabled(isChecked);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>qrCodeReaderView.startCamera();<NEW_LINE>}
layout.content_decoder, mainLayout, true);
539,759
public DashEncryption unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DashEncryption dashEncryption = new DashEncryption();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("keyRotationIntervalSeconds", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dashEncryption.setKeyRotationIntervalSeconds(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("spekeKeyProvider", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dashEncryption.setSpekeKeyProvider(SpekeKeyProviderJsonUnmarshaller.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 dashEncryption;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
903,264
public static void main(String[] args) {<NEW_LINE>JetInstance instance1 = Jet.newJetInstance();<NEW_LINE>JetInstance instance2 = Jet.newJetInstance();<NEW_LINE>Pipeline p = Pipeline.create();<NEW_LINE>p.readFrom(Sources.<Integer, Integer>mapJournal("source", START_FROM_OLDEST)).withoutTimestamps().writeTo(Sinks.list("sink"));<NEW_LINE>JobConfig jobConfig = new JobConfig();<NEW_LINE>// job name is optional<NEW_LINE>String jobName = "sampleJob";<NEW_LINE>jobConfig.setName(jobName);<NEW_LINE>instance1.newJob(p, jobConfig);<NEW_LINE>// jobs can be also tracked via other Jet nodes<NEW_LINE>List<Job> jobs = instance2.getJobs();<NEW_LINE>Job trackedJob1 = jobs.get(0);<NEW_LINE>// job status can be queried via the tracked job object<NEW_LINE>System.out.println("Tracked job: " + trackedJob1.getName() + ", status: " + trackedJob1.getStatus());<NEW_LINE>// we can use the tracked job object to cancel the job<NEW_LINE>trackedJob1.cancel();<NEW_LINE>try {<NEW_LINE>// let's wait until execution of the job is completed on the cluster<NEW_LINE>trackedJob1.join();<NEW_LINE>assert false;<NEW_LINE>} catch (CancellationException e) {<NEW_LINE>System.out.println("Job is cancelled.");<NEW_LINE>}<NEW_LINE>// Let's query the job status again. Now the status is FAILED.<NEW_LINE>// It is expected status for streaming jobs when they are cancelled.<NEW_LINE>System.out.println("Status: " + trackedJob1.getStatus());<NEW_LINE>// running or completed jobs can be also queried by name<NEW_LINE>Job trackedJob2 = requireNonNull<MASK><NEW_LINE>System.out.println("Tracked job status: " + trackedJob2.getStatus());<NEW_LINE>instance1.getCluster().shutdown();<NEW_LINE>}
(instance1.getJob(jobName));
1,075,398
protected void init(double[] x, double[] y) {<NEW_LINE>if (x.length != y.length) {<NEW_LINE>// Arrays must have the same length<NEW_LINE>// TODO log something<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (x.length < 2) {<NEW_LINE>// Spline edges must have at least two points<NEW_LINE>// TODO log something<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>t = new double[x.length];<NEW_LINE>// start point is always 0.0<NEW_LINE>t[0] = 0.0;<NEW_LINE>length = 0.0;<NEW_LINE>// Calculate the partial proportions of each section between each set<NEW_LINE>// of points and the total length of sum of all sections<NEW_LINE>for (int i = 1; i < t.length; i++) {<NEW_LINE>double lx = x[i] - x[i - 1];<NEW_LINE>double ly = y[i<MASK><NEW_LINE>// If either diff is zero there is no point performing the square root<NEW_LINE>if (0.0 == lx) {<NEW_LINE>t[i] = Math.abs(ly);<NEW_LINE>} else if (0.0 == ly) {<NEW_LINE>t[i] = Math.abs(lx);<NEW_LINE>} else {<NEW_LINE>t[i] = Math.sqrt(lx * lx + ly * ly);<NEW_LINE>}<NEW_LINE>length += t[i];<NEW_LINE>t[i] += t[i - 1];<NEW_LINE>}<NEW_LINE>for (int j = 1; j < (t.length) - 1; j++) {<NEW_LINE>t[j] = t[j] / length;<NEW_LINE>}<NEW_LINE>// end point is always 1.0<NEW_LINE>t[(t.length) - 1] = 1.0;<NEW_LINE>splineX = new mxSpline1D(t, x);<NEW_LINE>splineY = new mxSpline1D(t, y);<NEW_LINE>}
] - y[i - 1];
1,486,266
private void calculatePathsBetweenVerticesAsync(V v1, V v2) {<NEW_LINE>if (v1.equals(v2)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CallbackAccumulator<List<V>> accumulator = new CallbackAccumulator<>(path -> {<NEW_LINE>Collection<E> edges = pathToEdgesAsync(path);<NEW_LINE>SystemUtilities.runSwingLater(() -> setInHoverPathOnSwing(edges));<NEW_LINE>});<NEW_LINE>TaskMonitor timeoutMonitor = TimeoutTaskMonitor.timeoutIn(ALGORITHM_TIMEOUT, TimeUnit.SECONDS, new TaskMonitorAdapter(true));<NEW_LINE>try {<NEW_LINE>GraphAlgorithms.findPaths(graph, v1, v2, accumulator, timeoutMonitor);<NEW_LINE>} catch (ConcurrentModificationException e) {<NEW_LINE>// TODO temp fix for 8.0.<NEW_LINE>// This exception can happen when the current graph is being mutated off of the<NEW_LINE>// Swing thread, such as when grouping and ungrouping. For now, squash the<NEW_LINE>// problem, as it is only a UI feature. Post-"big graph branch merge", update<NEW_LINE>// how we schedule this task in relation to background graph jobs (maybe just make<NEW_LINE>// this task a job)<NEW_LINE>} catch (CancelledException e) {<NEW_LINE>SystemUtilities.runSwingLater(() <MASK><NEW_LINE>}<NEW_LINE>}
-> setStatusTextSwing("Path computation halted by user or timeout.\n" + "Paths shown in graph are not complete!"));
876,201
private static Map<String, List<String>> createRequestHeaders(String host, int port, ClientEndpointConfig clientEndpointConfiguration) {<NEW_LINE>Map<String, List<String>> headers = new HashMap<>();<NEW_LINE>List<Extension> extensions = clientEndpointConfiguration.getExtensions();<NEW_LINE>List<String> subProtocols = clientEndpointConfiguration.getPreferredSubprotocols();<NEW_LINE>Map<String, Object> userProperties = clientEndpointConfiguration.getUserProperties();<NEW_LINE>if (userProperties.get(Constants.AUTHORIZATION_HEADER_NAME) != null) {<NEW_LINE>List<String> authValues = new ArrayList<>(1);<NEW_LINE>authValues.add((String) userProperties<MASK><NEW_LINE>headers.put(Constants.AUTHORIZATION_HEADER_NAME, authValues);<NEW_LINE>}<NEW_LINE>// Host header<NEW_LINE>List<String> hostValues = new ArrayList<>(1);<NEW_LINE>if (port == -1) {<NEW_LINE>hostValues.add(host);<NEW_LINE>} else {<NEW_LINE>hostValues.add(host + ':' + port);<NEW_LINE>}<NEW_LINE>headers.put(Constants.HOST_HEADER_NAME, hostValues);<NEW_LINE>// Upgrade header<NEW_LINE>List<String> upgradeValues = new ArrayList<>(1);<NEW_LINE>upgradeValues.add(Constants.UPGRADE_HEADER_VALUE);<NEW_LINE>headers.put(Constants.UPGRADE_HEADER_NAME, upgradeValues);<NEW_LINE>// Connection header<NEW_LINE>List<String> connectionValues = new ArrayList<>(1);<NEW_LINE>connectionValues.add(Constants.CONNECTION_HEADER_VALUE);<NEW_LINE>headers.put(Constants.CONNECTION_HEADER_NAME, connectionValues);<NEW_LINE>// WebSocket version header<NEW_LINE>List<String> wsVersionValues = new ArrayList<>(1);<NEW_LINE>wsVersionValues.add(Constants.WS_VERSION_HEADER_VALUE);<NEW_LINE>headers.put(Constants.WS_VERSION_HEADER_NAME, wsVersionValues);<NEW_LINE>// WebSocket key<NEW_LINE>List<String> wsKeyValues = new ArrayList<>(1);<NEW_LINE>wsKeyValues.add(generateWsKeyValue());<NEW_LINE>headers.put(Constants.WS_KEY_HEADER_NAME, wsKeyValues);<NEW_LINE>// WebSocket sub-protocols<NEW_LINE>if (subProtocols != null && subProtocols.size() > 0) {<NEW_LINE>headers.put(Constants.WS_PROTOCOL_HEADER_NAME, subProtocols);<NEW_LINE>}<NEW_LINE>// WebSocket extensions<NEW_LINE>if (extensions != null && extensions.size() > 0) {<NEW_LINE>headers.put(Constants.WS_EXTENSIONS_HEADER_NAME, generateExtensionHeaders(extensions));<NEW_LINE>}<NEW_LINE>return headers;<NEW_LINE>}
.get(Constants.AUTHORIZATION_HEADER_NAME));
566,412
private X509TrustManager trustManager(SSLSocketFactory sslSocketFactory) throws Exception {<NEW_LINE>Class <MASK><NEW_LINE>Class sslSocketClass = Class.forName("com.android.org.conscrypt.OpenSSLSocketImpl");<NEW_LINE>Object context = readFieldOrNull(sslSocketFactory, sslParametersClass, "sslParameters");<NEW_LINE>if (context == null) {<NEW_LINE>// If that didn't work, try the Google Play Services SSL provider before giving up. This<NEW_LINE>// must be loaded by the SSLSocketFactory's class loader.<NEW_LINE>try {<NEW_LINE>Class<?> gmsSslParametersClass = Class.forName("com.google.android.gms.org.conscrypt.SSLParametersImpl", false, sslSocketFactory.getClass().getClassLoader());<NEW_LINE>context = readFieldOrNull(sslSocketFactory, gmsSslParametersClass, "sslParameters");<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>return trustManager2(sslSocketFactory);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>X509TrustManager x509TrustManager = readFieldOrNull(context, X509TrustManager.class, "x509TrustManager");<NEW_LINE>if (x509TrustManager != null)<NEW_LINE>return x509TrustManager;<NEW_LINE>return readFieldOrNull(context, X509TrustManager.class, "trustManager");<NEW_LINE>}
sslParametersClass = Class.forName("com.android.org.conscrypt.SSLParametersImpl");
1,211,895
public Object tryMovingDispatch(ProceedingJoinPoint joinpoint, String clusterId, ForwardInfo forwardInfo) throws Throwable {<NEW_LINE>String targetMethodName = joinpoint.getSignature().getName();<NEW_LINE>logger.<MASK><NEW_LINE>if (forwardInfo != null && forwardInfo.getType() == ForwardType.MOVING) {<NEW_LINE>logger.info("[tryMovingDispatch][isMoving][self process]{}, {}", targetMethodName, clusterId);<NEW_LINE>return joinpoint.proceed();<NEW_LINE>}<NEW_LINE>Long clusterDbId = dcMetaCache.clusterId2DbId(clusterId);<NEW_LINE>MetaServer exportServer = exportServer(clusterDbId);<NEW_LINE>if (exportServer == currentClusterServer) {<NEW_LINE>throw new IllegalStateException("export server should not be current " + exportServer);<NEW_LINE>}<NEW_LINE>if (exportServer != null) {<NEW_LINE>Object[] args = joinpoint.getArgs();<NEW_LINE>if (forwardInfo == null) {<NEW_LINE>forwardInfo = new ForwardInfo();<NEW_LINE>replace(args, forwardInfo);<NEW_LINE>}<NEW_LINE>forwardInfo.setType(ForwardType.MOVING);<NEW_LINE>Method method = ObjectUtils.getMethod(targetMethodName, MetaServer.class);<NEW_LINE>if (method == null) {<NEW_LINE>// impossible to happen<NEW_LINE>throw new IllegalStateException("can not find method " + targetMethodName);<NEW_LINE>}<NEW_LINE>return method.invoke(exportServer, args);<NEW_LINE>}<NEW_LINE>return joinpoint.proceed();<NEW_LINE>}
info("[tryMovingDispatch]{}, {}", targetMethodName, clusterId);
1,478,951
protected void exportBottomPen(JRPen leftPen, JRPen bottomPen, JRPen rightPen, JRPrintElement element) {<NEW_LINE>if (bottomPen.getLineWidth() > 0f) {<NEW_LINE>float leftOffset <MASK><NEW_LINE>float rightOffset = rightPen.getLineWidth() / 2;<NEW_LINE>int lcOffsetX = getOffsetX();<NEW_LINE>int lcOffsetY = getOffsetY();<NEW_LINE>preparePen(bottomPen, LineCapStyle.BUTT);<NEW_LINE>if (bottomPen.getLineStyleValue() == LineStyleEnum.DOUBLE) {<NEW_LINE>float bottomOffset = bottomPen.getLineWidth();<NEW_LINE>pdfContent.strokeLine(element.getX() + lcOffsetX - leftOffset, pageFormat.getPageHeight() - element.getY() - lcOffsetY - element.getHeight() - bottomOffset / 3, element.getX() + lcOffsetX + element.getWidth() + rightOffset, pageFormat.getPageHeight() - element.getY() - lcOffsetY - element.getHeight() - bottomOffset / 3);<NEW_LINE>pdfContent.strokeLine(element.getX() + lcOffsetX + leftOffset / 3, pageFormat.getPageHeight() - element.getY() - lcOffsetY - element.getHeight() + bottomOffset / 3, element.getX() + lcOffsetX + element.getWidth() - rightOffset / 3, pageFormat.getPageHeight() - element.getY() - lcOffsetY - element.getHeight() + bottomOffset / 3);<NEW_LINE>} else {<NEW_LINE>pdfContent.strokeLine(element.getX() + lcOffsetX - leftOffset, pageFormat.getPageHeight() - element.getY() - lcOffsetY - element.getHeight(), element.getX() + lcOffsetX + element.getWidth() + rightOffset, pageFormat.getPageHeight() - element.getY() - lcOffsetY - element.getHeight());<NEW_LINE>}<NEW_LINE>resetPen();<NEW_LINE>}<NEW_LINE>}
= leftPen.getLineWidth() / 2;
1,015,522
static Bundle jsonFromGoogleUser(@NonNull GoogleSignInAccount acct) {<NEW_LINE>Bundle auth = new Bundle();<NEW_LINE>auth.putString("accessToken", null);<NEW_LINE>auth.putString("accessTokenExpirationDate", null);<NEW_LINE>auth.putString("refreshToken", null);<NEW_LINE>auth.putString("idToken", acct.getIdToken());<NEW_LINE>// auth.putDouble("idTokenExpirationDate", acct.getExpirationTimeSecs());<NEW_LINE>Uri photoUrl = acct.getPhotoUrl();<NEW_LINE>Bundle user = new Bundle();<NEW_LINE>user.putString("uid", acct.getId());<NEW_LINE>user.putString("displayName", acct.getDisplayName());<NEW_LINE>user.putString("firstName", acct.getGivenName());<NEW_LINE>user.putString("lastName", acct.getFamilyName());<NEW_LINE>user.putString(<MASK><NEW_LINE>user.putString("photoURL", photoUrl != null ? photoUrl.toString() : null);<NEW_LINE>user.putString("serverAuthCode", acct.getServerAuthCode());<NEW_LINE>user.putBundle("auth", auth);<NEW_LINE>// TODO: Bacon: If google ever surfaces this value, we should add it for parity with iOS<NEW_LINE>user.putString("domain", null);<NEW_LINE>ArrayList scopes = new ArrayList();<NEW_LINE>for (Scope scope : acct.getGrantedScopes()) {<NEW_LINE>String scopeString = scope.toString();<NEW_LINE>if (scopeString.startsWith("http")) {<NEW_LINE>scopes.add(scopeString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>user.putStringArrayList("scopes", scopes);<NEW_LINE>return user;<NEW_LINE>}
"email", acct.getEmail());
609,560
public static RoaringBitmap or(final RoaringBitmap x1, final RoaringBitmap x2) {<NEW_LINE>final RoaringBitmap answer = new RoaringBitmap();<NEW_LINE>int pos1 = 0, pos2 = 0;<NEW_LINE>final int length1 = x1.highLowContainer.size(), length2 = x2.highLowContainer.size();<NEW_LINE>main: if (pos1 < length1 && pos2 < length2) {<NEW_LINE>char s1 = x1.highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>char s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>while (true) {<NEW_LINE>if (s1 == s2) {<NEW_LINE>answer.highLowContainer.append(s1, x1.highLowContainer.getContainerAtIndex(pos1).or(x2.highLowContainer.getContainerAtIndex(pos2)));<NEW_LINE>pos1++;<NEW_LINE>pos2++;<NEW_LINE>if ((pos1 == length1) || (pos2 == length2)) {<NEW_LINE>break main;<NEW_LINE>}<NEW_LINE>s1 = x1.highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>} else if (s1 < s2) {<NEW_LINE>answer.highLowContainer.appendCopy(x1.highLowContainer, pos1);<NEW_LINE>pos1++;<NEW_LINE>if (pos1 == length1) {<NEW_LINE>break main;<NEW_LINE>}<NEW_LINE>s1 = x1.highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>} else {<NEW_LINE>answer.highLowContainer.<MASK><NEW_LINE>pos2++;<NEW_LINE>if (pos2 == length2) {<NEW_LINE>break main;<NEW_LINE>}<NEW_LINE>s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (pos1 == length1) {<NEW_LINE>answer.highLowContainer.appendCopy(x2.highLowContainer, pos2, length2);<NEW_LINE>} else if (pos2 == length2) {<NEW_LINE>answer.highLowContainer.appendCopy(x1.highLowContainer, pos1, length1);<NEW_LINE>}<NEW_LINE>return answer;<NEW_LINE>}
appendCopy(x2.highLowContainer, pos2);
727,572
private void processFeatureRange(FeatureRange range, PredicateOptions options) {<NEW_LINE>range.clearPartitions();<NEW_LINE>int arity = options.getArity();<NEW_LINE>RangePruner rangePruner = new RangePruner(range, options, arity);<NEW_LINE>long from = rangePruner.getFrom();<NEW_LINE><MASK><NEW_LINE>if (from < 0) {<NEW_LINE>if (to < 0) {<NEW_LINE>// Special case for to==-1. -X-0 means the same as -X-1, but is more efficient.<NEW_LINE>partitionRange(range, (to == -1 ? 0 : -to), -from, arity, true);<NEW_LINE>} else {<NEW_LINE>partitionRange(range, 0, -from, arity, true);<NEW_LINE>partitionRange(range, 0, to, arity, false);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>partitionRange(range, from, to, arity, false);<NEW_LINE>}<NEW_LINE>}
long to = rangePruner.getTo();
882,696
private void process(int groupOrd, int facetOrd) throws IOException {<NEW_LINE>if (facetOrd < startFacetOrd || facetOrd >= endFacetOrd) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int segmentGroupedFacetsIndex = groupOrd * (facetFieldNumTerms + 1) + facetOrd;<NEW_LINE>if (segmentGroupedFacetHits.exists(segmentGroupedFacetsIndex)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>segmentTotalCount++;<NEW_LINE>segmentFacetCounts[facetOrd]++;<NEW_LINE>segmentGroupedFacetHits.put(segmentGroupedFacetsIndex);<NEW_LINE>BytesRef groupKey;<NEW_LINE>if (groupOrd == -1) {<NEW_LINE>groupKey = null;<NEW_LINE>} else {<NEW_LINE>groupKey = BytesRef.deepCopyOf<MASK><NEW_LINE>}<NEW_LINE>final BytesRef facetValue;<NEW_LINE>if (facetOrd == facetFieldNumTerms) {<NEW_LINE>facetValue = null;<NEW_LINE>} else {<NEW_LINE>facetValue = BytesRef.deepCopyOf(facetFieldDocTermOrds.lookupOrd(facetOrd));<NEW_LINE>}<NEW_LINE>groupedFacetHits.add(new GroupedFacetHit(groupKey, facetValue));<NEW_LINE>}
(groupFieldTermsIndex.lookupOrd(groupOrd));
1,344,892
public Expr apply(Expr expr, Analyzer analyzer, ExprRewriter.ClauseType clauseType) throws AnalysisException {<NEW_LINE>if (!(expr instanceof CompoundPredicate))<NEW_LINE>return expr;<NEW_LINE>CompoundPredicate cp = (CompoundPredicate) expr;<NEW_LINE>List<Expr> children = cp.getChildren();<NEW_LINE>if (children.size() != 2) {<NEW_LINE>return expr;<NEW_LINE>}<NEW_LINE>Expr leftChild = cp.getChild(0);<NEW_LINE>Expr rightChild = cp.getChild(1);<NEW_LINE>boolean and = (cp.getOp() == CompoundPredicate.Operator.AND);<NEW_LINE>boolean or = (cp.getOp() == CompoundPredicate.Operator.OR);<NEW_LINE>boolean leftChildTrue = (leftChild instanceof BoolLiteral) && (((BoolLiteral<MASK><NEW_LINE>boolean leftChildFalse = (leftChild instanceof BoolLiteral) && (!((BoolLiteral) leftChild).getValue());<NEW_LINE>boolean rightChildTrue = (rightChild instanceof BoolLiteral) && (((BoolLiteral) rightChild).getValue());<NEW_LINE>boolean rightChildFalse = (rightChild instanceof BoolLiteral) && (!((BoolLiteral) rightChild).getValue());<NEW_LINE>// case true and expr ==> expr<NEW_LINE>if (leftChildTrue && and)<NEW_LINE>return rightChild;<NEW_LINE>// case expr and true ==> expr<NEW_LINE>if (and && rightChildTrue)<NEW_LINE>return leftChild;<NEW_LINE>// case false or expr ==> expr<NEW_LINE>if (leftChildFalse && or)<NEW_LINE>return rightChild;<NEW_LINE>// case expr or false ==> expr<NEW_LINE>if (or && rightChildFalse)<NEW_LINE>return leftChild;<NEW_LINE>// case false and expr ==> false<NEW_LINE>if (leftChildFalse && and)<NEW_LINE>return new BoolLiteral(false);<NEW_LINE>// case expr and false ==> false<NEW_LINE>if (and && rightChildFalse)<NEW_LINE>return new BoolLiteral(false);<NEW_LINE>// case true or expr ==> true<NEW_LINE>if (leftChildTrue && or)<NEW_LINE>return new BoolLiteral(true);<NEW_LINE>// case expr or true ==> true<NEW_LINE>if (or && rightChildTrue)<NEW_LINE>return new BoolLiteral(true);<NEW_LINE>// other case ,return origin expr<NEW_LINE>return expr;<NEW_LINE>}
) leftChild).getValue());
463,883
void startGatheringIteratedModel(final IStandaloneElementTag firstTag, final ProcessorExecutionVars processorExecutionVars, final String iterVariableName, final String iterStatusVariableName, final Object iteratedObject) {<NEW_LINE>SkipBody gatheredSkipBody = this.skipBodyByLevel[this.modelLevel];<NEW_LINE>gatheredSkipBody = (gatheredSkipBody == SkipBody.SKIP_ELEMENTS ? SkipBody.PROCESS_ONE_ELEMENT : gatheredSkipBody);<NEW_LINE>final boolean gatheredSkipCloseTagByLevel = this.skipCloseTagByLevel[this.modelLevel];<NEW_LINE>final Text precedingWhitespace = computeWhiteSpacePrecedingIteration(<MASK><NEW_LINE>this.gatheredModel = new IteratedGatheringModelProcessable(this.configuration, this.processorTemplateHandler, this.context, this, this.templateFlowController, gatheredSkipBody, gatheredSkipCloseTagByLevel, processorExecutionVars, iterVariableName, iterStatusVariableName, iteratedObject, precedingWhitespace);<NEW_LINE>this.gatheredModel.gatherStandaloneElement(firstTag);<NEW_LINE>}
firstTag.getElementDefinition().elementName);
1,518,822
public void started(Container moduleContainer) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug("started");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>WebAppConfiguration webConfig = (WebAppConfiguration) moduleContainer.adapt(WebAppConfig.class);<NEW_LINE>String name = webConfig.getModuleName();<NEW_LINE>SipAppDescManager appDescMangar = SipAppDescManager.getInstance();<NEW_LINE>SipAppDesc appDesc = appDescMangar.getSipAppDesc(name);<NEW_LINE>if (appDesc == null) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug("SipModuleStateListener Failed finding SipAppDesc for " + name);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String vhost = webConfig.getVirtualHostName();<NEW_LINE>appDesc.setVirtualHost(vhost, webConfig.getVirtualHostList());<NEW_LINE>List<SipServletDesc> siplets = appDesc.getSipServlets();<NEW_LINE>for (SipServletDesc sipDesc : siplets) {<NEW_LINE>// if the application contains load on startup servlets we<NEW_LINE>// need to initialize the application now.<NEW_LINE>// we can't simply use the Web Container initialization<NEW_LINE>// because of additional SIP Container properties that can<NEW_LINE>// only be set after the initialization<NEW_LINE>if (sipDesc.isServletLoadOnStartup()) {<NEW_LINE>try {<NEW_LINE>appDescMangar.initSipAppIfNeeded(name);<NEW_LINE>} catch (ServletException e) {<NEW_LINE>if (c_logger.isErrorEnabled()) {<NEW_LINE>c_logger.error("error.init.loadonstartup.app", <MASK><NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>if (c_logger.isErrorEnabled()) {<NEW_LINE>c_logger.error("error.init.loadonstartup.app", null, e.getLocalizedMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<SipServlet> sipServletsList = appDesc.getLoadOnStartupServlets();<NEW_LINE>synchronized (sipServletsList) {<NEW_LINE>Iterator<SipServlet> iterator = sipServletsList.iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>SipServlet sipServlet = (SipServlet) iterator.next();<NEW_LINE>EventsDispatcher.sipServletInitiated(appDesc, sipServlet, webConfig.getWebApp(), -1);<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(null, "module started", "Triggering event servlet initialized, servlet name " + sipServlet.getServletName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (UnableToAdaptException e) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(null, "started", "not SipAppDesc found not a sip application: " + moduleContainer.getName(), e);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>c_logger.traceExit(null, "moduleStarted");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
null, e.getLocalizedMessage());
1,431,354
final CreateClassificationJobResult executeCreateClassificationJob(CreateClassificationJobRequest createClassificationJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createClassificationJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateClassificationJobRequest> request = null;<NEW_LINE>Response<CreateClassificationJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateClassificationJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createClassificationJobRequest));<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, "CreateClassificationJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateClassificationJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new CreateClassificationJobResultJsonUnmarshaller());
4,795
public long handle(Emulator<?> emulator) {<NEW_LINE><MASK><NEW_LINE>long handle = context.getLongArg(0);<NEW_LINE>Pointer symbol = context.getPointerArg(1);<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("__dyld_dlsym handle=0x" + Long.toHexString(handle) + ", symbol=" + symbol.getString(0));<NEW_LINE>}<NEW_LINE>String symbolName = symbol.getString(0);<NEW_LINE>if ((int) handle == Dyld.RTLD_MAIN_ONLY && "_os_trace_redirect_func".equals(symbolName)) {<NEW_LINE>return _os_trace_redirect_func;<NEW_LINE>}<NEW_LINE>if ("sandbox_check".equals(symbolName)) {<NEW_LINE>return sandbox_check;<NEW_LINE>}<NEW_LINE>if ("_availability_version_check".equals(symbolName)) {<NEW_LINE>return __availability_version_check;<NEW_LINE>}<NEW_LINE>if ("dispatch_after".equals(symbolName)) {<NEW_LINE>return _dispatch_after;<NEW_LINE>}<NEW_LINE>if ("dispatch_async".equals(symbolName)) {<NEW_LINE>return _dispatch_async;<NEW_LINE>}<NEW_LINE>if ("objc_addLoadImageFunc".equals(symbolName)) {<NEW_LINE>return __dyld_register_func_for_add_image.peer;<NEW_LINE>}<NEW_LINE>return dlsym(emulator, handle, "_" + symbolName);<NEW_LINE>}
RegisterContext context = emulator.getContext();
906,528
public static void createIcebergTable(Database db, CreateTableStmt stmt) throws DdlException {<NEW_LINE>String tableName = stmt.getTableName();<NEW_LINE>Map<String, String<MASK><NEW_LINE>// validate iceberg table properties<NEW_LINE>validateProperties(properties, true);<NEW_LINE>IcebergProperty icebergProperty = new IcebergProperty(properties);<NEW_LINE>String icebergDb = icebergProperty.getDatabase();<NEW_LINE>String icebergTbl = icebergProperty.getTable();<NEW_LINE>// create iceberg table struct<NEW_LINE>// 1. Already set column def in Create Stmt, just create table<NEW_LINE>// 2. No column def in Create Stmt, get it from remote Iceberg schema.<NEW_LINE>IcebergTable table;<NEW_LINE>long tableId = getNextId();<NEW_LINE>if (stmt.getColumns().size() > 0) {<NEW_LINE>// set column def in CREATE TABLE<NEW_LINE>table = new IcebergTable(tableId, tableName, stmt.getColumns(), icebergProperty, null);<NEW_LINE>} else {<NEW_LINE>// get column def from remote Iceberg<NEW_LINE>table = getTableFromIceberg(tableId, tableName, icebergProperty, TableIdentifier.of(icebergDb, icebergTbl), true);<NEW_LINE>}<NEW_LINE>// check iceberg table if exists in doris database<NEW_LINE>if (!db.createTableWithLock(table, false, stmt.isSetIfNotExists()).first) {<NEW_LINE>ErrorReport.reportDdlException(ErrorCode.ERR_TABLE_EXISTS_ERROR, tableName);<NEW_LINE>}<NEW_LINE>LOG.info("successfully create table[{}-{}]", tableName, table.getId());<NEW_LINE>}
> properties = stmt.getProperties();
1,220,259
public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete() throws Throwable {<NEW_LINE>blackboxSubscriberWithoutSetupTest(new BlackboxTestStageTestRun() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(BlackboxTestStage stage) throws Throwable {<NEW_LINE>final String onCompleteMethod = "required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete_call";<NEW_LINE>final Subscription subs = new Subscription() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void request(long n) {<NEW_LINE>final Optional<StackTraceElement> onCompleteStackTraceElement = env.findCallerMethodInStackTrace(onCompleteMethod);<NEW_LINE>if (onCompleteStackTraceElement.isDefined()) {<NEW_LINE>final StackTraceElement stackElem = onCompleteStackTraceElement.get();<NEW_LINE>env.flop(String.format("Subscription::request MUST NOT be called from Subscriber::onComplete (Rule 2.3)! (Caller: %s::%s line %d)", stackElem.getClassName(), stackElem.getMethodName(), stackElem.getLineNumber()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void cancel() {<NEW_LINE>final Optional<StackTraceElement> <MASK><NEW_LINE>if (onCompleteStackElement.isDefined()) {<NEW_LINE>final StackTraceElement stackElem = onCompleteStackElement.get();<NEW_LINE>env.flop(String.format("Subscription::cancel MUST NOT be called from Subscriber::onComplete (Rule 2.3)! (Caller: %s::%s line %d)", stackElem.getClassName(), stackElem.getMethodName(), stackElem.getLineNumber()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>final Subscriber<T> sub = createSubscriber();<NEW_LINE>sub.onSubscribe(subs);<NEW_LINE>required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete_call(sub);<NEW_LINE>env.verifyNoAsyncErrorsNoDelay();<NEW_LINE>}<NEW_LINE><NEW_LINE>void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete_call(Subscriber<?> sub) {<NEW_LINE>sub.onComplete();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
onCompleteStackElement = env.findCallerMethodInStackTrace(onCompleteMethod);
458,807
protected RestTemplate createRestTemplate() {<NEW_LINE>ClientHttpRequestFactory requestFactory = ClientHttpRequestFactorySelector.getRequestFactory();<NEW_LINE>RestTemplate restTemplate = new RestTemplate(requestFactory);<NEW_LINE>List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>(2);<NEW_LINE>converters<MASK><NEW_LINE>converters.add(new FormMapHttpMessageConverter());<NEW_LINE>converters.add(new MappingJackson2HttpMessageConverter());<NEW_LINE>restTemplate.setMessageConverters(converters);<NEW_LINE>restTemplate.setErrorHandler(new LoggingErrorHandler());<NEW_LINE>if (!useParametersForClientAuthentication) {<NEW_LINE>List<ClientHttpRequestInterceptor> interceptors = restTemplate.getInterceptors();<NEW_LINE>if (interceptors == null) {<NEW_LINE>// defensively initialize list if it is null. (See SOCIAL-430)<NEW_LINE>interceptors = new ArrayList<ClientHttpRequestInterceptor>();<NEW_LINE>restTemplate.setInterceptors(interceptors);<NEW_LINE>}<NEW_LINE>interceptors.add(new PreemptiveBasicAuthClientHttpRequestInterceptor(clientId, clientSecret));<NEW_LINE>}<NEW_LINE>return restTemplate;<NEW_LINE>}
.add(new FormHttpMessageConverter());
1,705,793
final BatchStartResult executeBatchStart(BatchStartRequest batchStartRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchStartRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchStartRequest> request = null;<NEW_LINE>Response<BatchStartResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchStartRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchStartRequest));<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, "MediaLive");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchStart");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchStartResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchStartResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,481,034
public static void loadSources() throws IOException, ParserException {<NEW_LINE>loadWebSource();<NEW_LINE>if (familyCalendars.getCalendars().isEmpty()) {<NEW_LINE>totalWorkProperty.set(10);<NEW_LINE>createWebCalendar("https://www.nasa.gov/templateimages/redesign/calendar/iCal/nasa_calendar.ics", "NASA", Calendar.Style.STYLE1, communityCalendars);<NEW_LINE>workDoneProperty.set(1);<NEW_LINE>createWebCalendar("https://cantonbecker.com/astronomy-calendar/astrocal.ics", "Moon / Astro", Calendar.Style.STYLE2, communityCalendars);<NEW_LINE>workDoneProperty.set(2);<NEW_LINE>createWebCalendar("http://ical.mac.com/ical/US32Holidays.ics", "US Holidays", Calendar.Style.STYLE3, communityCalendars);<NEW_LINE>workDoneProperty.set(3);<NEW_LINE>createWebCalendar("https://www.google.com/calendar/ical/6g08e17mnjao5k7ddftfvq5gs8%40group.calendar.google.com/public/basic.ics", "FC Liverpool", Calendar.Style.STYLE5, communityCalendars);<NEW_LINE>workDoneProperty.set(4);<NEW_LINE>createWebCalendar("https://www.google.com/calendar/ical/ohg8jr90apq8k0vili2fbs17to%40group.calendar.google.com/public/basic.ics", "Real Madrid", Calendar.Style.STYLE4, communityCalendars);<NEW_LINE>workDoneProperty.set(5);<NEW_LINE>createWebCalendar("https://calendar.google.com/calendar/ical/flexcalendarfxdemo%40gmail.com/private-43f02ea9664382e80e6fbe0a541511ee/basic.ics", "Standard", Calendar.Style.STYLE1, familyCalendars);<NEW_LINE>workDoneProperty.set(6);<NEW_LINE>createWebCalendar("https://calendar.google.com/calendar/ical/75bjnbr2qr5qgetav71tug2sec%40group.calendar.google.com/private-c6c6a59d97aa2806fe28cfbdb2e2957b/basic.ics", "Home", Calendar.Style.STYLE2, familyCalendars);<NEW_LINE>workDoneProperty.set(7);<NEW_LINE>createWebCalendar("https://calendar.google.com/calendar/ical/5rj1uvaobtosjqoqqkpdlj01gg%40group.calendar.google.com/private-4dc56992aed93526cbab07da6cd4b69b/basic.ics", "School", Calendar.Style.STYLE3, familyCalendars);<NEW_LINE>workDoneProperty.set(8);<NEW_LINE>createWebCalendar("https://calendar.google.com/calendar/ical/0itqq6d7pukf1tapbll3lbad5c%40group.calendar.google.com/private-7fb78a4b949cede8228d791faba9061e/basic.ics", "Sports", Calendar.Style.STYLE4, familyCalendars);<NEW_LINE>workDoneProperty.set(9);<NEW_LINE>createWebCalendar("https://calendar.google.com/calendar/ical/u6em5saa8omkamh68bl7fikclo%40group.calendar.google.com/private-bce22b1e9b43b632c7edfad45d677b59/basic.ics", "Work", <MASK><NEW_LINE>workDoneProperty.set(10);<NEW_LINE>}<NEW_LINE>}
Calendar.Style.STYLE5, familyCalendars);
1,734,406
private int nextToken(boolean returnEOLs) throws IOException {<NEW_LINE>int lineno = lineNumber();<NEW_LINE>// Check to see whether the previous call to nextToken() left an<NEW_LINE>// EOL on the stream<NEW_LINE>if (curToken() == StreamTokenizer.TT_EOL) {<NEW_LINE>state.setStartOfLine(true);<NEW_LINE>} else if (!state.startOfFile()) {<NEW_LINE>state.setStartOfLine(false);<NEW_LINE>}<NEW_LINE>state.setStartOfFile(false);<NEW_LINE>int val = state.tok().nextToken();<NEW_LINE>if (!returnEOLs) {<NEW_LINE>if (val == StreamTokenizer.TT_EOL) {<NEW_LINE>do {<NEW_LINE>// Consume and return next token, setting state appropriately<NEW_LINE>val = state.tok().nextToken();<NEW_LINE>state.setStartOfLine(true);<NEW_LINE>printer.println();<NEW_LINE>} <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (lineNumber() > lineno + 1) {<NEW_LINE>// This is a little noisier than it needs to be, but does handle<NEW_LINE>// the case of multi-line comments properly<NEW_LINE>lineDirective();<NEW_LINE>}<NEW_LINE>return val;<NEW_LINE>}
while (val == StreamTokenizer.TT_EOL);
1,520,150
public void onApplicationReady(ApplicationReadyEvent event) {<NEW_LINE>ServiceInstance serviceInstance = DataWorkCloudApplication.getServiceInstance();<NEW_LINE>LinkisECMApplication.setECMServiceInstance(serviceInstance);<NEW_LINE>ECMContext context = event.getApplicationContext(<MASK><NEW_LINE>LinkisECMApplication.setContext(context);<NEW_LINE>ECMAsyncListenerBus emAsyncListenerBus = context.getECMAsyncListenerBus();<NEW_LINE>ECMSyncListenerBus emSyncListenerBus = context.getECMSyncListenerBus();<NEW_LINE>emAsyncListenerBus.start();<NEW_LINE>ECMReadyEvent ecmReadyEvent = new ECMReadyEvent(LinkisECMApplication.getParmas());<NEW_LINE>emAsyncListenerBus.postToAll(ecmReadyEvent);<NEW_LINE>emSyncListenerBus.postToAll(ecmReadyEvent);<NEW_LINE>LinkisECMApplication.setReady(true);<NEW_LINE>logger.info(String.format("ECM:%s is ready", serviceInstance));<NEW_LINE>}
).getBean(ECMContext.class);
98,373
private void recalcWidth(Date date, String prefix) {<NEW_LINE>try {<NEW_LINE>if (recalculatingWidths) {<NEW_LINE>// seen recursion here with width and format flipping, guard against it<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>recalculatingWidths = true;<NEW_LINE>String suffix = showTime && !multiline ? " hh:mm a" : "";<NEW_LINE>int width = getWidth();<NEW_LINE>if (maxWidthDate == null) {<NEW_LINE>maxWidthUsed = new int[TimeFormatter.DATEFORMATS_DESC.length];<NEW_LINE>maxWidthDate = new Date[TimeFormatter.DATEFORMATS_DESC.length];<NEW_LINE>}<NEW_LINE>int idxFormat = TimeFormatter.DATEFORMATS_DESC.length - 1;<NEW_LINE>GC gc = new GC(Display.getDefault());<NEW_LINE>gc.setFont(FontUtils.getAnyFontBold(gc));<NEW_LINE>try {<NEW_LINE>Point minSize = new Point(99999, 0);<NEW_LINE>for (int i = 0; i < TimeFormatter.DATEFORMATS_DESC.length; i++) {<NEW_LINE>if (maxWidthUsed[i] > width - PADDING) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>SimpleDateFormat temp = new SimpleDateFormat(TimeFormatter.DATEFORMATS_DESC[i] + suffix);<NEW_LINE>String <MASK><NEW_LINE>if (prefix != null) {<NEW_LINE>date_str = prefix + date_str;<NEW_LINE>}<NEW_LINE>Point newSize = gc.stringExtent(date_str);<NEW_LINE>if (newSize.x < width - PADDING) {<NEW_LINE>idxFormat = i;<NEW_LINE>if (maxWidthUsed[i] < newSize.x) {<NEW_LINE>maxWidthUsed[i] = newSize.x;<NEW_LINE>maxWidthDate[i] = date;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (newSize.x < minSize.x) {<NEW_LINE>minSize = newSize;<NEW_LINE>idxFormat = i;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>return;<NEW_LINE>} finally {<NEW_LINE>gc.dispose();<NEW_LINE>}<NEW_LINE>if (curFormat != idxFormat) {<NEW_LINE>// System.out.println(getTableID() + ":" + getName() + "] switch fmt to " + idxFormat + ", max=" + maxWidthUsed[idxFormat]);<NEW_LINE>curFormat = idxFormat;<NEW_LINE>invalidateCells();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>recalculatingWidths = false;<NEW_LINE>}<NEW_LINE>}
date_str = temp.format(date);
1,841,982
public ContainsPiiEntitiesResult containsPiiEntities(ContainsPiiEntitiesRequest containsPiiEntitiesRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(containsPiiEntitiesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ContainsPiiEntitiesRequest> request = null;<NEW_LINE>Response<ContainsPiiEntitiesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ContainsPiiEntitiesRequestMarshaller().marshall(containsPiiEntitiesRequest);<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<ContainsPiiEntitiesResult, JsonUnmarshallerContext> unmarshaller = new ContainsPiiEntitiesResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<ContainsPiiEntitiesResult> responseHandler = new JsonResponseHandler<ContainsPiiEntitiesResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,161,375
private void logService(BluetoothGattService service, boolean included) {<NEW_LINE>Timber.d("Service %s%s", BluetoothGattUuid.prettyPrint(service.getUuid()), included ? " (included)" : "");<NEW_LINE>for (BluetoothGattCharacteristic characteristic : service.getCharacteristics()) {<NEW_LINE>Timber.d("|- characteristic %s (#%d): %s%s", BluetoothGattUuid.prettyPrint(characteristic.getUuid()), characteristic.getInstanceId(), propertiesToString(characteristic.getProperties(), characteristic.getWriteType()), permissionsToString(characteristic.getPermissions()));<NEW_LINE>byte[] value = characteristic.getValue();<NEW_LINE>if (value != null && value.length > 0) {<NEW_LINE>Timber.d("|--> value: %s (%s)", byteInHex(value), byteToString(value));<NEW_LINE>}<NEW_LINE>for (BluetoothGattDescriptor descriptor : characteristic.getDescriptors()) {<NEW_LINE>Timber.d("|--- descriptor %s%s", BluetoothGattUuid.prettyPrint(descriptor.getUuid()), permissionsToString(descriptor.getPermissions()));<NEW_LINE>value = descriptor.getValue();<NEW_LINE>if (value != null && value.length > 0) {<NEW_LINE>Timber.d("|-----> value: %s (%s)", byteInHex(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (BluetoothGattService includedService : service.getIncludedServices()) {<NEW_LINE>logService(includedService, true);<NEW_LINE>}<NEW_LINE>}
value), byteToString(value));
355,480
public String payrollMovement(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) {<NEW_LINE>if (isCalloutActive() || value == null)<NEW_LINE>return "";<NEW_LINE>// get value<NEW_LINE>int HR_Movement_ID = ((<MASK><NEW_LINE>if (HR_Movement_ID == 0)<NEW_LINE>return "";<NEW_LINE>// Get amount from movement<NEW_LINE>X_HR_Movement movement = new X_HR_Movement(ctx, HR_Movement_ID, null);<NEW_LINE>X_HR_Concept concept = new X_HR_Concept(ctx, movement.getHR_Concept_ID(), null);<NEW_LINE>// MHRConcept concept = MHRConcept.get(ctx, movement.getHR_Concept_ID());<NEW_LINE>if (!concept.getColumnType().equals(X_HR_Concept.COLUMNTYPE_Amount))<NEW_LINE>return "@HR_Concept_ID@ <> @Amount@";<NEW_LINE>// Valid payroll<NEW_LINE>X_HR_Payroll payroll = new X_HR_Payroll(ctx, movement.getHR_Payroll_ID(), null);<NEW_LINE>// MHRPayroll payroll = MHRPayroll.get(ctx, movement.getHR_Payroll_ID());<NEW_LINE>if (payroll.getC_Charge_ID() == 0)<NEW_LINE>return "@C_Charge_ID@ @NotFound@";<NEW_LINE>// Get Amount<NEW_LINE>mTab.setValue("PayAmt", movement.getAmount());<NEW_LINE>mTab.setValue("C_Charge_ID", payroll.getC_Charge_ID());<NEW_LINE>// Set BP from Document<NEW_LINE>mTab.setValue("C_BPartner_ID", movement.getC_BPartner_ID());<NEW_LINE>return "";<NEW_LINE>}
Integer) value).intValue();
547,361
public void putFloat(long t, float v) {<NEW_LINE>if (writeCurArrayIndex == -1) {<NEW_LINE>if (capacity >= CAPACITY_THRESHOLD) {<NEW_LINE>((LinkedList<long[]>) timeRet).addFirst(new long[capacity]);<NEW_LINE>((LinkedList<float[]>) floatRet).<MASK><NEW_LINE>writeCurListIndex++;<NEW_LINE>writeCurArrayIndex = capacity - 1;<NEW_LINE>} else {<NEW_LINE>int newCapacity = capacity << 1;<NEW_LINE>long[] newTimeData = new long[newCapacity];<NEW_LINE>float[] newValueData = new float[newCapacity];<NEW_LINE>System.arraycopy(timeRet.get(0), 0, newTimeData, newCapacity - capacity, capacity);<NEW_LINE>System.arraycopy(floatRet.get(0), 0, newValueData, newCapacity - capacity, capacity);<NEW_LINE>timeRet.set(0, newTimeData);<NEW_LINE>floatRet.set(0, newValueData);<NEW_LINE>writeCurArrayIndex = newCapacity - capacity - 1;<NEW_LINE>capacity = newCapacity;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>timeRet.get(0)[writeCurArrayIndex] = t;<NEW_LINE>floatRet.get(0)[writeCurArrayIndex] = v;<NEW_LINE>writeCurArrayIndex--;<NEW_LINE>count++;<NEW_LINE>}
addFirst(new float[capacity]);
214,947
public UpdateRepositoryResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateRepositoryResult updateRepositoryResult = new UpdateRepositoryResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return updateRepositoryResult;<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("repository", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateRepositoryResult.setRepository(RepositoryDescriptionJsonUnmarshaller.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 updateRepositoryResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,122,994
<R extends Collection<E>, E, T1, T2, T3, T4, T5, T6> ManyInvocationSpec<E> fromMany(ConnectionFunction6<T1, T2, T3, T4, T5, T6, R> function, PipelineFunction6<T1, T2, T3, T4, T5, T6, R> pipelineFunction, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {<NEW_LINE>Assert.notNull(function, "ConnectionFunction must not be null!");<NEW_LINE><MASK><NEW_LINE>return fromMany(it -> function.apply(it, t1, t2, t3, t4, t5, t6), it -> pipelineFunction.apply(it, t1, t2, t3, t4, t5, t6));<NEW_LINE>}
Assert.notNull(pipelineFunction, "PipelineFunction must not be null!");
1,153,987
public void updateTaskPartitionList(int workerId, int workerNumPerProcess, List<Integer> processPartitionList) {<NEW_LINE>int index = workerNumPerProcess * workerId;<NEW_LINE>Map<Integer, List<Integer>> taskPartitionList = this.processTaskPartitionList.computeIfAbsent(workerId, k -> Maps.newHashMap());<NEW_LINE>LinkedList<Integer> partitionList = Lists.newLinkedList(processPartitionList);<NEW_LINE>int taskPartitionNum = partitionList.size() / workerNumPerProcess;<NEW_LINE>for (int i = 0; i < workerNumPerProcess - 1; i++) {<NEW_LINE>int taskIndex = index + i;<NEW_LINE>List<Integer> currTaskPartitionList = Lists.newArrayList();<NEW_LINE>for (int k = 0; k < taskPartitionNum; k++) {<NEW_LINE>currTaskPartitionList.add(partitionList.pollFirst());<NEW_LINE>}<NEW_LINE>taskPartitionList.put(taskIndex, currTaskPartitionList);<NEW_LINE>}<NEW_LINE>taskPartitionList.put(<MASK><NEW_LINE>}
index + workerNumPerProcess - 1, partitionList);
308,783
public void run() {<NEW_LINE>while (!Tray.this.appIsReady) {<NEW_LINE>Tray.this.ti.setImage(Tray.this<MASK><NEW_LINE>if (OS.isMacArchitecture)<NEW_LINE>setDockIcon(Tray.this.progressIcons[this.ic]);<NEW_LINE>this.ic++;<NEW_LINE>if (this.ic >= 4)<NEW_LINE>this.ic = 0;<NEW_LINE>try {<NEW_LINE>Thread.sleep(80);<NEW_LINE>} catch (final InterruptedException e) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// do not write a cache to disc; keep in RAM<NEW_LINE>ImageIO.setUseCache(false);<NEW_LINE>final Image trayIcon = ImageIO.read(new File(Tray.this.iconPath));<NEW_LINE>Tray.this.ti.setImage(trayIcon);<NEW_LINE>Tray.this.ti.setToolTip(Tray.this.readyMessage());<NEW_LINE>setDockIcon(trayIcon);<NEW_LINE>} catch (final IOException e) {<NEW_LINE>ConcurrentLog.logException(e);<NEW_LINE>}<NEW_LINE>Tray.this.progressIcons = null;<NEW_LINE>}
.progressIcons[this.ic]);
1,604,051
public static <T> Flux<IDocumentQueryExecutionComponent<T>> createAsync(BiFunction<String, PipelinedDocumentQueryParams<T>, Flux<IDocumentQueryExecutionComponent<T>>> createSourceComponentFunction, int skipCount, String continuationToken, PipelinedDocumentQueryParams<T> documentQueryParams) {<NEW_LINE>OffsetContinuationToken offsetContinuationToken;<NEW_LINE>Utils.ValueHolder<OffsetContinuationToken> outOffsetContinuationToken = new Utils.ValueHolder<>();<NEW_LINE>if (continuationToken != null) {<NEW_LINE>if (!OffsetContinuationToken.tryParse(continuationToken, outOffsetContinuationToken)) {<NEW_LINE>String message = String.format("Invalid JSON in continuation token %s for Skip~Context", continuationToken);<NEW_LINE>CosmosException dce = BridgeInternal.createCosmosException(HttpConstants.StatusCodes.BADREQUEST, message);<NEW_LINE>return Flux.error(dce);<NEW_LINE>}<NEW_LINE>offsetContinuationToken = outOffsetContinuationToken.v;<NEW_LINE>} else {<NEW_LINE>offsetContinuationToken <MASK><NEW_LINE>}<NEW_LINE>return createSourceComponentFunction.apply(offsetContinuationToken.getSourceToken(), documentQueryParams).map(component -> new SkipDocumentQueryExecutionContext<>(component, offsetContinuationToken.getOffset()));<NEW_LINE>}
= new OffsetContinuationToken(skipCount, null);
1,648,208
public String typeOf() {<NEW_LINE>List<? extends Expression> operands = children();<NEW_LINE>switch(getOperator()) {<NEW_LINE>case PRE_INCREMENT:<NEW_LINE>case PRE_DECREMENT:<NEW_LINE>case TO_NUMBER:<NEW_LINE>case NEGATION:<NEW_LINE>case INVERSE:<NEW_LINE>case MULTIPLICATION:<NEW_LINE>case DIVISION:<NEW_LINE>case MODULUS:<NEW_LINE>case SUBTRACTION:<NEW_LINE>case LSHIFT:<NEW_LINE>case RSHIFT:<NEW_LINE>case RUSHIFT:<NEW_LINE>case BITWISE_AND:<NEW_LINE>case BITWISE_OR:<NEW_LINE>case BITWISE_XOR:<NEW_LINE>case ASSIGN_MUL:<NEW_LINE>case ASSIGN_DIV:<NEW_LINE>case ASSIGN_MOD:<NEW_LINE>case ASSIGN_SUB:<NEW_LINE>case ASSIGN_LSH:<NEW_LINE>case ASSIGN_RSH:<NEW_LINE>case ASSIGN_USH:<NEW_LINE>case ASSIGN_AND:<NEW_LINE>case ASSIGN_XOR:<NEW_LINE>case ASSIGN_OR:<NEW_LINE>return "number";<NEW_LINE>case DELETE:<NEW_LINE>case IN:<NEW_LINE>case NOT:<NEW_LINE>case LESS_THAN:<NEW_LINE>case GREATER_THAN:<NEW_LINE>case LESS_EQUALS:<NEW_LINE>case GREATER_EQUALS:<NEW_LINE>case INSTANCE_OF:<NEW_LINE>case EQUAL:<NEW_LINE>case NOT_EQUAL:<NEW_LINE>case STRICTLY_EQUAL:<NEW_LINE>case STRICTLY_NOT_EQUAL:<NEW_LINE>return "boolean";<NEW_LINE>case VOID:<NEW_LINE>return "undefined";<NEW_LINE>case LOGICAL_OR:<NEW_LINE>case LOGICAL_AND:<NEW_LINE>case TERNARY:<NEW_LINE>{<NEW_LINE>String t1 = operands.get(operands.size() - 2).typeOf();<NEW_LINE>String t2 = operands.get(operands.size() - 1).typeOf();<NEW_LINE>return (t1 != null && t1.equals(t2)) ? t1 : null;<NEW_LINE>}<NEW_LINE>case ADDITION:<NEW_LINE>{<NEW_LINE>String t1 = operands.get(operands.size() - 2).typeOf();<NEW_LINE>String t2 = operands.get(operands.size(<MASK><NEW_LINE>if ("string".equals(t1) || "string".equals(t2)) {<NEW_LINE>return "string";<NEW_LINE>}<NEW_LINE>if ("number".equals(t1) && "number".equals(t2)) {<NEW_LINE>return "number";<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Trippy<NEW_LINE>case TYPEOF:<NEW_LINE>return "string";<NEW_LINE>case COMMA:<NEW_LINE>return operands.get(1).typeOf();<NEW_LINE>default:<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
) - 1).typeOf();
772,402
public void initialise() throws Exception {<NEW_LINE>panel = new JPanel();<NEW_LINE>propertySelectorPanel = createPropertySelectorPanel();<NEW_LINE>propertySelectorPanel.addSelectionListener(selListener);<NEW_LINE>propertySelectorPanel.setBorder(ComponentFactory.createTitledBorder("Restricted property"));<NEW_LINE>fillerSelectorPanel = createFillerSelectorPanel();<NEW_LINE>fillerSelectorPanel.addSelectionListener(selListener);<NEW_LINE>fillerSelectorPanel.setBorder(ComponentFactory.createTitledBorder("Restriction filler"));<NEW_LINE>panel.setLayout(new BorderLayout());<NEW_LINE>JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, false);<NEW_LINE>splitPane.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));<NEW_LINE>splitPane.setResizeWeight(0.5);<NEW_LINE>splitPane.setLeftComponent(propertySelectorPanel);<NEW_LINE>splitPane.setRightComponent(fillerSelectorPanel);<NEW_LINE>panel.add(splitPane);<NEW_LINE>java.util.List<RestrictionCreator<P, <MASK><NEW_LINE>typeCombo = new JComboBox(types.toArray());<NEW_LINE>cardinalitySpinner = new JSpinner(new SpinnerNumberModel(1, 0, Integer.MAX_VALUE, 1));<NEW_LINE>JComponent cardinalitySpinnerEditor = cardinalitySpinner.getEditor();<NEW_LINE>Dimension prefSize = cardinalitySpinnerEditor.getPreferredSize();<NEW_LINE>cardinalitySpinnerEditor.setPreferredSize(new Dimension(50, prefSize.height));<NEW_LINE>final JPanel typePanel = new JPanel();<NEW_LINE>typePanel.setBorder(ComponentFactory.createTitledBorder("Restriction type"));<NEW_LINE>panel.add(typePanel, BorderLayout.SOUTH);<NEW_LINE>typePanel.add(typeCombo);<NEW_LINE>typeCombo.addActionListener(e -> {<NEW_LINE>cardinalitySpinner.setEnabled(typeCombo.getSelectedItem() instanceof CardinalityRestrictionCreator);<NEW_LINE>});<NEW_LINE>JPanel spinnerHolder = new JPanel(new BorderLayout(4, 4));<NEW_LINE>spinnerHolder.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));<NEW_LINE>spinnerHolder.add(new JLabel("Cardinality"), BorderLayout.WEST);<NEW_LINE>spinnerHolder.add(cardinalitySpinner, BorderLayout.EAST);<NEW_LINE>JPanel spinnerAlignmentPanel = new JPanel(new BorderLayout());<NEW_LINE>spinnerAlignmentPanel.add(spinnerHolder, BorderLayout.WEST);<NEW_LINE>typePanel.add(spinnerAlignmentPanel);<NEW_LINE>cardinalitySpinner.setEnabled(typeCombo.getSelectedItem() instanceof CardinalityRestrictionCreator);<NEW_LINE>}
F>> types = createTypes();
1,743,397
private static Vector apply(CompIntFloatVector v1, IntDummyVector v2, Binary op) {<NEW_LINE>IntFloatVector[<MASK><NEW_LINE>Storage[] resParts = StorageSwitch.applyComp(v1, v2, op);<NEW_LINE>if (!op.isKeepStorage()) {<NEW_LINE>for (int i = 0; i < parts.length; i++) {<NEW_LINE>if (parts[i].getStorage() instanceof IntFloatSortedVectorStorage) {<NEW_LINE>resParts[i] = new IntFloatSparseVectorStorage(parts[i].getDim(), parts[i].getStorage().getIndices(), parts[i].getStorage().getValues());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int subDim = (v1.getDim() + v1.getNumPartitions() - 1) / v1.getNumPartitions();<NEW_LINE>int[] v2Indices = v2.getIndices();<NEW_LINE>for (int i = 0; i < v2Indices.length; i++) {<NEW_LINE>int gidx = v2Indices[i];<NEW_LINE>int pidx = (int) (gidx / subDim);<NEW_LINE>int subidx = gidx % subDim;<NEW_LINE>((IntFloatVectorStorage) resParts[pidx]).set(subidx, op.apply(parts[pidx].get(subidx), 1));<NEW_LINE>}<NEW_LINE>IntFloatVector[] res = new IntFloatVector[parts.length];<NEW_LINE>int i = 0;<NEW_LINE>for (IntFloatVector part : parts) {<NEW_LINE>res[i] = new IntFloatVector(part.getMatrixId(), part.getRowId(), part.getClock(), part.getDim(), (IntFloatVectorStorage) resParts[i]);<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>return new CompIntFloatVector(v1.getMatrixId(), v1.getRowId(), v1.getClock(), v1.getDim(), res, v1.getSubDim());<NEW_LINE>}
] parts = v1.getPartitions();
1,834,496
public static void main(String[] args) {<NEW_LINE>TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build();<NEW_LINE>LogsQueryClient logsQueryClient = new LogsQueryClientBuilder().credential(tokenCredential).httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)).buildClient();<NEW_LINE>LogsQueryResult queryResults = logsQueryClient.queryWorkspaceWithResponse("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "union * | where TimeGenerated > ago(10d) | project TenantId", null, new LogsQueryOptions().setAdditionalWorkspaces(Arrays.asList("srnagar-log-analytics-ws-2", "srnagar-log-analytics-ws")), Context.NONE).getValue();<NEW_LINE>System.out.println("Number of tables = " + queryResults.getAllTables().size());<NEW_LINE>// Sample to iterate by row<NEW_LINE>Set<String> results = new HashSet<>();<NEW_LINE>for (LogsTable table : queryResults.getAllTables()) {<NEW_LINE>for (LogsTableRow row : table.getRows()) {<NEW_LINE>Set<String> collect = row.getRow().stream().map(cell -> cell.getValueAsString()).<MASK><NEW_LINE>row.getRow().forEach(cell -> System.out.println(cell.getValueAsString()));<NEW_LINE>results.addAll(collect);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println("Collected tenants " + results);<NEW_LINE>}
collect(Collectors.toSet());
579,741
private void checkThatRecordIsIndexed(ODocument doc, OIndex index, List<String> fields) {<NEW_LINE>Object[] vals = new Object[fields.size()];<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < vals.length; i++) {<NEW_LINE>vals[i] = doc.field(fields.get(i));<NEW_LINE>}<NEW_LINE>Object indexKey = index.getDefinition().createValue(vals);<NEW_LINE>if (indexKey == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Collection<Object> indexKeys;<NEW_LINE>if (!(indexKey instanceof Collection)) {<NEW_LINE>indexKeys = Collections.singletonList(indexKey);<NEW_LINE>} else {<NEW_LINE>// noinspection unchecked<NEW_LINE>indexKeys = (Collection<Object>) indexKey;<NEW_LINE>}<NEW_LINE>for (final Object key : indexKeys) {<NEW_LINE>try (final Stream<ORID> stream = index.getInternal().getRids(key)) {<NEW_LINE>if (stream.noneMatch((rid) -> rid.equals(docId))) {<NEW_LINE>totalErrors++;<NEW_LINE>message("\rERROR: Index " + index.getName() + " - record not found: " + doc.getIdentity() + "\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ORID docId = doc.getIdentity();
404,661
void closeInternals(boolean waitForCloseCompletion) {<NEW_LINE>if (!this.getIsClosed()) {<NEW_LINE>if (this.sendLink != null && this.sendLink.getLocalState() != EndpointState.CLOSED) {<NEW_LINE>try {<NEW_LINE>this.parent.underlyingFactory.scheduleOnReactorThread(new DispatchHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onEvent() {<NEW_LINE>if (InternalSender.this.sendLink != null && InternalSender.this.sendLink.getLocalState() != EndpointState.CLOSED) {<NEW_LINE>TRACE_LOGGER.debug("Closing internal send link of requestresponselink to {}", RequestResponseLink.this.linkPath);<NEW_LINE>InternalSender.this.sendLink.close();<NEW_LINE>InternalSender.this.parent.underlyingFactory.deregisterForConnectionError(InternalSender.this.sendLink);<NEW_LINE>if (waitForCloseCompletion) {<NEW_LINE>RequestResponseLink.scheduleLinkCloseTimeout(InternalSender.this.closeFuture, InternalSender.this.parent.underlyingFactory.getOperationTimeout(), InternalSender.this.sendLink.getName());<NEW_LINE>} else {<NEW_LINE>AsyncUtil.completeFuture(InternalSender.this.closeFuture, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (IOException e) {<NEW_LINE>AsyncUtil.completeFutureExceptionally(this.closeFuture, e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>AsyncUtil.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
completeFuture(this.closeFuture, null);
182,830
public static Iterable<SegmentId> iterateAllPossibleParsings(String segmentId) {<NEW_LINE>List<String> splits = DELIMITER_SPLITTER.splitToList(segmentId);<NEW_LINE>String probableDataSource = tryExtractMostProbableDataSource(segmentId);<NEW_LINE>// Iterate parsings with the most probably data source first to allow the users of iterateAllPossibleParsings() to<NEW_LINE>// break from the iteration earlier with higher probability.<NEW_LINE>if (probableDataSource != null) {<NEW_LINE>List<SegmentId> probableParsings = iteratePossibleParsingsWithDataSource(probableDataSource, segmentId);<NEW_LINE>Iterable<SegmentId> otherPossibleParsings = () -> IntStream.range(1, splits.size() - 3).mapToObj(dataSourceDelimiterOrder -> DELIMITER_JOINER.join(splits.subList(0, dataSourceDelimiterOrder))).filter(dataSource -> dataSource.length() != probableDataSource.length()).flatMap(dataSource -> iteratePossibleParsingsWithDataSource(dataSource, segmentId).stream()).iterator();<NEW_LINE>return <MASK><NEW_LINE>} else {<NEW_LINE>return () -> IntStream.range(1, splits.size() - 3).mapToObj(dataSourceDelimiterOrder -> {<NEW_LINE>String dataSource = DELIMITER_JOINER.join(splits.subList(0, dataSourceDelimiterOrder));<NEW_LINE>return iteratePossibleParsingsWithDataSource(dataSource, segmentId);<NEW_LINE>}).flatMap(List::stream).iterator();<NEW_LINE>}<NEW_LINE>}
Iterables.concat(probableParsings, otherPossibleParsings);
1,309,769
public ShenyuAdminResult syncData() {<NEW_LINE>List<AppAuthDO> appAuthDOList = appAuthMapper.selectAll();<NEW_LINE>if (CollectionUtils.isEmpty(appAuthDOList)) {<NEW_LINE>return ShenyuAdminResult.success();<NEW_LINE>}<NEW_LINE>Set<String> idSet = appAuthDOList.stream().map(BaseDO::getId).collect(Collectors.toSet());<NEW_LINE>Map<String, List<AuthParamData>> paramMap = this.prepareAuthParamData(idSet);<NEW_LINE>Map<String, List<AuthPathData>> <MASK><NEW_LINE>List<AppAuthData> dataList = appAuthDOList.stream().filter(Objects::nonNull).map(appAuthDO -> {<NEW_LINE>String id = appAuthDO.getId();<NEW_LINE>return buildByEntityWithParamAndPath(appAuthDO, paramMap.get(id), pathMap.get(id));<NEW_LINE>}).collect(Collectors.toList());<NEW_LINE>eventPublisher.publishEvent(new DataChangedEvent(ConfigGroupEnum.APP_AUTH, DataEventTypeEnum.REFRESH, dataList));<NEW_LINE>return ShenyuAdminResult.success();<NEW_LINE>}
pathMap = this.prepareAuthPathData(idSet);