idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
761,365
default Map<String, FilterMeta> initFilterBy(FacesContext context) {<NEW_LINE>Map<String, FilterMeta> <MASK><NEW_LINE>AtomicBoolean filtered = new AtomicBoolean();<NEW_LINE>// build columns filterBy<NEW_LINE>forEachColumn(c -> {<NEW_LINE>FilterMeta meta = FilterMeta.of(context, getVar(), c);<NEW_LINE>if (meta != null) {<NEW_LINE>filterBy.put(meta.getColumnKey(), meta);<NEW_LINE>filtered.set(filtered.get() || meta.isActive());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>// merge internal filterBy with user filterBy<NEW_LINE>Object userFilterBy = getFilterBy();<NEW_LINE>if (userFilterBy != null) {<NEW_LINE>updateFilterByWithUserFilterBy(context, filterBy, userFilterBy, filtered);<NEW_LINE>}<NEW_LINE>// build global filterBy<NEW_LINE>updateFilterByWithGlobalFilter(context, filterBy, filtered);<NEW_LINE>// finally set if default filtering is enabled<NEW_LINE>setDefaultFilter(filtered.get());<NEW_LINE>setFilterByAsMap(filterBy);<NEW_LINE>return filterBy;<NEW_LINE>}
filterBy = new LinkedHashMap<>();
1,148,260
public void toWML(String in, javax.xml.transform.Result result, String author, java.util.Calendar date, RelationshipsPart docPartRelsNewer, RelationshipsPart docPartRelsOlder) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("in: " + in);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>XMLInputFactory inputFactory = XMLInputFactory.newInstance();<NEW_LINE>inputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);<NEW_LINE>// a DTD is merely ignored, its presence doesn't cause an exception<NEW_LINE>inputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);<NEW_LINE>int nsIndex = in.indexOf("xmlns:");<NEW_LINE>int closeTag = in.indexOf(">", nsIndex);<NEW_LINE>String topLevelDecs = in.substring(0, closeTag);<NEW_LINE>log.debug(topLevelDecs);<NEW_LINE>if (topLevelDecs.contains("xmlns:a14")) {<NEW_LINE>// OK<NEW_LINE>} else {<NEW_LINE>in = topLevelDecs + " xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\"" + in.substring(closeTag);<NEW_LINE>}<NEW_LINE>// 2017 10 02: workaround for where right side contains w14:paraId, but left side doesn't<NEW_LINE>if (topLevelDecs.contains("xmlns:w14")) {<NEW_LINE>// OK<NEW_LINE>} else {<NEW_LINE>in = topLevelDecs + <MASK><NEW_LINE>}<NEW_LINE>if (topLevelDecs.contains("xmlns:o")) {<NEW_LINE>// OK<NEW_LINE>} else {<NEW_LINE>in = topLevelDecs + " xmlns:o=\"urn:schemas-microsoft-com:office:office\"" + in.substring(closeTag);<NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Diff result:" + in);<NEW_LINE>}<NEW_LINE>Reader reader = new StringReader(in);<NEW_LINE>String simplified = null;<NEW_LINE>try {<NEW_LINE>simplified = combineAdjacent(inputFactory.createXMLStreamReader(reader));<NEW_LINE>} catch (XMLStreamException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>// log.debug("left: " + XmlUtils.marshaltoString(objectLeft, true, false));<NEW_LINE>// log.debug("right: " + XmlUtils.marshaltoString(objectRight, true, false));<NEW_LINE>}<NEW_LINE>log.debug("\n\n Diff'd input to transform: \n\n" + simplified);<NEW_LINE>StreamSource src = new StreamSource(new StringReader(simplified));<NEW_LINE>transformDiffxOutputToWml(result, author, date, docPartRelsNewer, docPartRelsOlder, src);<NEW_LINE>} catch (Exception exc) {<NEW_LINE>exc.printStackTrace();<NEW_LINE>}<NEW_LINE>}
" xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\"" + in.substring(closeTag);
1,251,328
public PluggableSCMMaterialConfig fromJSON(JsonReader jsonReader, ConfigHelperOptions options) {<NEW_LINE>PluggableSCMMaterialConfig pluggableSCMMaterialConfig = new PluggableSCMMaterialConfig();<NEW_LINE>CruiseConfig cruiseConfig = options.getCruiseConfig();<NEW_LINE>if (cruiseConfig != null) {<NEW_LINE>String ref = jsonReader.getString("ref");<NEW_LINE>pluggableSCMMaterialConfig.setSCMConfig(cruiseConfig.getSCMs().find(ref));<NEW_LINE>pluggableSCMMaterialConfig.setScmId(ref);<NEW_LINE>}<NEW_LINE>jsonReader.readStringIfPresent("destination", pluggableSCMMaterialConfig::setFolder);<NEW_LINE>jsonReader.optJsonObject("filter").ifPresent(filterReader -> {<NEW_LINE>pluggableSCMMaterialConfig.setFilter(FilterRepresenter.fromJSON(filterReader));<NEW_LINE>});<NEW_LINE>jsonReader.optBoolean("invert_filter"<MASK><NEW_LINE>return pluggableSCMMaterialConfig;<NEW_LINE>}
).ifPresent(pluggableSCMMaterialConfig::setInvertFilter);
261,789
private static void fixFieldUsage(MethodNode mth, IndexInsnNode insn) {<NEW_LINE>InsnArg instanceArg = insn.getArg(insn.getType() == InsnType.IGET ? 0 : 1);<NEW_LINE>if (instanceArg.contains(AFlag.SUPER)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (instanceArg.isInsnWrap() && ((InsnWrapArg) instanceArg).getWrapInsn().getType() == InsnType.CAST) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FieldInfo fieldInfo = (FieldInfo) insn.getIndex();<NEW_LINE>ArgType clsType = fieldInfo.getDeclClass().getType();<NEW_LINE>ArgType instanceType = instanceArg.getType();<NEW_LINE>if (Objects.equals(clsType, instanceType)) {<NEW_LINE>// cast not needed<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FieldNode fieldNode = mth.root().resolveField(fieldInfo);<NEW_LINE>if (fieldNode == null) {<NEW_LINE>// unknown field<NEW_LINE>TypeCompareEnum result = mth.root().getTypeCompare().compareTypes(instanceType, clsType);<NEW_LINE>if (result.isEqual() || (result == TypeCompareEnum.NARROW_BY_GENERIC && !instanceType.isGenericType())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else if (isFieldVisibleInMethod(fieldNode, mth)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// insert cast<NEW_LINE>IndexInsnNode castInsn = new IndexInsnNode(InsnType.CAST, clsType, 1);<NEW_LINE>castInsn.addArg(instanceArg.duplicate());<NEW_LINE>castInsn.add(AFlag.SYNTHETIC);<NEW_LINE><MASK><NEW_LINE>InsnArg castArg = InsnArg.wrapInsnIntoArg(castInsn);<NEW_LINE>castArg.setType(clsType);<NEW_LINE>insn.replaceArg(instanceArg, castArg);<NEW_LINE>InsnRemover.unbindArgUsage(mth, instanceArg);<NEW_LINE>}
castInsn.add(AFlag.EXPLICIT_CAST);
13,442
static <K, V> CacheConfig<K, V> createCacheConfig(HazelcastClientInstanceImpl client, CacheConfig<K, V> newCacheConfig, boolean urgent) {<NEW_LINE>try {<NEW_LINE>String nameWithPrefix = newCacheConfig.getNameWithPrefix();<NEW_LINE>int partitionId = client.getClientPartitionService().getPartitionId(nameWithPrefix);<NEW_LINE>InternalSerializationService serializationService = client.getSerializationService();<NEW_LINE>ClientMessage request = CacheCreateConfigCodec.encodeRequest(CacheConfigHolder.of(newCacheConfig, serializationService), true);<NEW_LINE>ClientInvocation clientInvocation = new ClientInvocation(client, request, nameWithPrefix, partitionId);<NEW_LINE>Future<ClientMessage> future = urgent ? clientInvocation.invokeUrgent() : clientInvocation.invoke();<NEW_LINE>final <MASK><NEW_LINE>final CacheConfigHolder cacheConfigHolder = CacheCreateConfigCodec.decodeResponse(response);<NEW_LINE>if (cacheConfigHolder == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return cacheConfigHolder.asCacheConfig(serializationService);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw rethrow(e);<NEW_LINE>}<NEW_LINE>}
ClientMessage response = future.get();
336,558
ByteBuffer[] force(FileChannel.MapMode MAP_MODE, ByteBuffer[] dumpBuffer, long bufferSize, long bufferExt, long entrySize) throws IOException {<NEW_LINE>if (MAP_MODE == FileChannel.MapMode.PRIVATE) {<NEW_LINE>// NOI18N<NEW_LINE>java.io.File newBufferFile = new java.io.File(getAbsolutePath() + ".new");<NEW_LINE>long length = delegate.length();<NEW_LINE>FileChannel channel = new FileOutputStream(newBufferFile).getChannel();<NEW_LINE>int offset_start = 0;<NEW_LINE>for (int i = 0; i < dumpBuffer.length; i++) {<NEW_LINE>ByteBuffer buf = dumpBuffer[i];<NEW_LINE>long offset_end = (((i + 1) * bufferSize) / entrySize) * entrySize + entrySize;<NEW_LINE>if (offset_end > length) {<NEW_LINE>offset_end = length;<NEW_LINE>}<NEW_LINE>buf.limit((int) <MASK><NEW_LINE>buf.position(offset_start);<NEW_LINE>channel.write(buf);<NEW_LINE>offset_start = (int) (offset_end - (i + 1) * bufferSize);<NEW_LINE>}<NEW_LINE>delegate.delete();<NEW_LINE>newBufferFile.renameTo(delegate);<NEW_LINE>// NOI18N<NEW_LINE>return newRandomAccessFile("rw").mmapAsBuffers(MAP_MODE, length, bufferSize, bufferExt);<NEW_LINE>} else {<NEW_LINE>for (ByteBuffer buf : dumpBuffer) {<NEW_LINE>((MappedByteBuffer) buf).force();<NEW_LINE>}<NEW_LINE>return dumpBuffer;<NEW_LINE>}<NEW_LINE>}
(offset_end - i * bufferSize));
618,277
public void read(org.apache.thrift.protocol.TProtocol iprot, drainReplicationTable_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>switch(schemeField.id) {<NEW_LINE>case // SUCCESS<NEW_LINE>0:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {<NEW_LINE>struct.success = iprot.readBool();<NEW_LINE>struct.setSuccessIsSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case // TNASE<NEW_LINE>1:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {<NEW_LINE>struct.tnase = new org.apache.accumulo.core<MASK><NEW_LINE>struct.tnase.read(iprot);<NEW_LINE>struct.setTnaseIsSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>iprot.readFieldEnd();<NEW_LINE>}<NEW_LINE>iprot.readStructEnd();<NEW_LINE>// check for required fields of primitive type, which can't be checked in the validate method<NEW_LINE>struct.validate();<NEW_LINE>}
.clientImpl.thrift.ThriftNotActiveServiceException();
136,950
// Implementations for KotlinPropertyVisitor.<NEW_LINE>@Override<NEW_LINE>public void visitAnyProperty(Clazz clazz, KotlinDeclarationContainerMetadata kotlinDeclarationContainerMetadata, KotlinPropertyMetadata kotlinPropertyMetadata) {<NEW_LINE>kotlinPropertyMetadata.versionRequirementAccept(clazz, kotlinDeclarationContainerMetadata, this);<NEW_LINE>kotlinPropertyMetadata.typeAccept(clazz, kotlinDeclarationContainerMetadata, this);<NEW_LINE>kotlinPropertyMetadata.setterParametersAccept(clazz, kotlinDeclarationContainerMetadata, this);<NEW_LINE>kotlinPropertyMetadata.<MASK><NEW_LINE>kotlinPropertyMetadata.typeParametersAccept(clazz, kotlinDeclarationContainerMetadata, this);<NEW_LINE>if (kotlinPropertyMetadata.syntheticMethodForAnnotations != null) {<NEW_LINE>kotlinPropertyMetadata.referencedSyntheticMethodForAnnotations.accept(kotlinPropertyMetadata.referencedSyntheticMethodClass, annotationCounter.reset());<NEW_LINE>kotlinPropertyMetadata.flags.common.hasAnnotations = annotationCounter.getCount() > 0;<NEW_LINE>} else if (kotlinPropertyMetadata.referencedBackingField != null) {<NEW_LINE>kotlinPropertyMetadata.referencedBackingField.accept(kotlinPropertyMetadata.referencedBackingFieldClass, annotationCounter);<NEW_LINE>kotlinPropertyMetadata.flags.common.hasAnnotations = annotationCounter.getCount() > 0;<NEW_LINE>} else {<NEW_LINE>kotlinPropertyMetadata.flags.common.hasAnnotations = false;<NEW_LINE>}<NEW_LINE>if (kotlinPropertyMetadata.flags.hasGetter && kotlinPropertyMetadata.referencedGetterMethod != null) {<NEW_LINE>kotlinPropertyMetadata.referencedGetterMethod.accept(clazz, annotationCounter.reset());<NEW_LINE>kotlinPropertyMetadata.getterFlags.common.hasAnnotations = annotationCounter.getCount() > 0;<NEW_LINE>}<NEW_LINE>if (kotlinPropertyMetadata.flags.hasSetter && kotlinPropertyMetadata.referencedSetterMethod != null) {<NEW_LINE>kotlinPropertyMetadata.referencedSetterMethod.accept(clazz, annotationCounter.reset());<NEW_LINE>kotlinPropertyMetadata.setterFlags.common.hasAnnotations = annotationCounter.getCount() > 0;<NEW_LINE>}<NEW_LINE>}
receiverTypeAccept(clazz, kotlinDeclarationContainerMetadata, this);
834,942
public List<String> suggestionList(final String query) throws IOException, ExtractionException {<NEW_LINE>final List<String> suggestions = new ArrayList<>();<NEW_LINE>final Downloader dl = NewPipe.getDownloader();<NEW_LINE>final String url = SOUNDCLOUD_API_V2_URL + "search/queries" + "?q=" + URLEncoder.encode(query, UTF_8) + "&client_id=" + SoundcloudParsingHelper.clientId() + "&limit=10";<NEW_LINE>final String response = dl.get(url, <MASK><NEW_LINE>try {<NEW_LINE>final JsonArray collection = JsonParser.object().from(response).getArray("collection");<NEW_LINE>for (final Object suggestion : collection) {<NEW_LINE>if (suggestion instanceof JsonObject) {<NEW_LINE>suggestions.add(((JsonObject) suggestion).getString("query"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return suggestions;<NEW_LINE>} catch (final JsonParserException e) {<NEW_LINE>throw new ParsingException("Could not parse json response", e);<NEW_LINE>}<NEW_LINE>}
getExtractorLocalization()).responseBody();
886,631
public static int add(int[] x, int[] y, int[] z) {<NEW_LINE>long c = 0;<NEW_LINE>c += (x[0] & M) + (y[0] & M);<NEW_LINE>z[0] = (int) c;<NEW_LINE>c >>>= 32;<NEW_LINE>c += (x[1] & M) + (y[1] & M);<NEW_LINE>z[1] = (int) c;<NEW_LINE>c >>>= 32;<NEW_LINE>c += (x[2] & M) + (y[2] & M);<NEW_LINE>z<MASK><NEW_LINE>c >>>= 32;<NEW_LINE>c += (x[3] & M) + (y[3] & M);<NEW_LINE>z[3] = (int) c;<NEW_LINE>c >>>= 32;<NEW_LINE>c += (x[4] & M) + (y[4] & M);<NEW_LINE>z[4] = (int) c;<NEW_LINE>c >>>= 32;<NEW_LINE>c += (x[5] & M) + (y[5] & M);<NEW_LINE>z[5] = (int) c;<NEW_LINE>c >>>= 32;<NEW_LINE>return (int) c;<NEW_LINE>}
[2] = (int) c;
1,082,555
public CloseableIterable<FileScanTask> planFiles(TableOperations ops, Snapshot snapshot, Expression rowFilter, boolean ignoreResiduals, boolean caseSensitive, boolean colStats) {<NEW_LINE>ManifestGroup manifestGroup = new ManifestGroup(ops.io(), snapshot.dataManifests(), snapshot.deleteManifests()).caseSensitive(caseSensitive).select(colStats ? SCAN_WITH_STATS_COLUMNS : SCAN_COLUMNS).filterData(rowFilter).specsById(ops.current().specsById()).ignoreDeleted();<NEW_LINE>if (ignoreResiduals) {<NEW_LINE>manifestGroup = manifestGroup.ignoreResiduals();<NEW_LINE>}<NEW_LINE>if (snapshot.dataManifests().size() > 1 && (PLAN_SCANS_WITH_WORKER_POOL || context().planWithCustomizedExecutor())) {<NEW_LINE>manifestGroup = manifestGroup.planWith(<MASK><NEW_LINE>}<NEW_LINE>return manifestGroup.planFiles();<NEW_LINE>}
context().planExecutor());
1,333,379
final DeleteRuleResult executeDeleteRule(DeleteRuleRequest deleteRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DeleteRuleRequest> request = null;<NEW_LINE>Response<DeleteRuleResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteRuleRequest));<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, "EventBridge");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRule");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteRuleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteRuleResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
867,222
public DataType toDataType() throws DuplicateNameException, IOException {<NEW_LINE>Structure struct = new StructureDataType(FBPT_Entry.class.getSimpleName(), 0);<NEW_LINE>struct.add(STRING, <MASK><NEW_LINE>struct.add(STRING, FBPK_Constants.NAME_MAX_LENGTH + 1, "guid1", null);<NEW_LINE>struct.add(STRING, FBPK_Constants.NAME_MAX_LENGTH + 1, "guid2", null);<NEW_LINE>struct.add(STRING, 2, "padding", null);<NEW_LINE>if (FBPK_Constants.LAST_PARTITION_ENTRY.equals(name) || isLast) {<NEW_LINE>try {<NEW_LINE>struct.setName(FBPT_Entry.class.getSimpleName() + "_last");<NEW_LINE>} catch (InvalidNameException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>struct.add(DWORD, "unknown1", null);<NEW_LINE>if (!isLast) {<NEW_LINE>struct.add(DWORD, "unknown2", null);<NEW_LINE>struct.add(DWORD, "unknown3", null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return struct;<NEW_LINE>}
FBPK_Constants.NAME_MAX_LENGTH, "name", null);
59,989
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {<NEW_LINE>// We have to call defaultReadObject first.<NEW_LINE>in.defaultReadObject();<NEW_LINE>Object[] args;<NEW_LINE>String resourceBundleName = (String) in.readObject();<NEW_LINE>String key = <MASK><NEW_LINE>int len = in.readInt();<NEW_LINE>if (len < -1) {<NEW_LINE>throw new NegativeArraySizeException();<NEW_LINE>} else if (len == -1) {<NEW_LINE>args = null;<NEW_LINE>} else if (len < 255) {<NEW_LINE>args = new Object[len];<NEW_LINE>for (int i = 0; i < args.length; i++) {<NEW_LINE>args[i] = in.readObject();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>List<Object> argList = new ArrayList<>(Math.min(len, 1024));<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>argList.add(in.readObject());<NEW_LINE>}<NEW_LINE>args = argList.toArray(new Object[argList.size()]);<NEW_LINE>}<NEW_LINE>msg = new LocalizableMessageFactory(resourceBundleName).getMessage(key, args);<NEW_LINE>}
(String) in.readObject();
297,057
private static void onMathJaxTypesetCompleted(final Object mathjaxElObject, final String text, final boolean error, final Object commandObject, final int attempt) {<NEW_LINE>final Element mathjaxEl = (Element) mathjaxElObject;<NEW_LINE>if (attempt < MAX_RENDER_ATTEMPTS) {<NEW_LINE>// if mathjax displayed an error, try re-rendering once more<NEW_LINE>Element[] errorEls = DomUtils.getElementsByClassName(mathjaxEl, "MathJax_Error");<NEW_LINE>if (errorEls != null && errorEls.length > 0 && attempt < MAX_RENDER_ATTEMPTS) {<NEW_LINE>// hide the error and retry in 25ms (experimentally this seems to<NEW_LINE>// produce a better shot at rendering successfully than an immediate<NEW_LINE>// or deferred retry)<NEW_LINE>mathjaxEl.getStyle().setVisibility(Visibility.HIDDEN);<NEW_LINE>new Timer() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>typesetNative(mathjaxEl, text, commandObject, attempt + 1);<NEW_LINE>}<NEW_LINE>}.schedule(25);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// show whatever we've got (could be an error if we ran out of retries)<NEW_LINE>mathjaxEl.getStyle().setVisibility(Visibility.VISIBLE);<NEW_LINE>// execute callback<NEW_LINE>if (commandObject != null && commandObject instanceof MathJaxTypeset.Callback) {<NEW_LINE>MathJaxTypeset.Callback <MASK><NEW_LINE>callback.onMathJaxTypesetComplete(error);<NEW_LINE>}<NEW_LINE>}
callback = (MathJaxTypeset.Callback) commandObject;
1,065,261
public View onCreateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent) {<NEW_LINE>final View view = inflater.inflate(R.layout.dd_debug_drawer_module_device, parent, false);<NEW_LINE>view.setClickable(false);<NEW_LINE>view.setEnabled(false);<NEW_LINE>final TextView deviceMakeLabel = view.findViewById(R.id.dd_debug_device_make);<NEW_LINE>final TextView deviceModelLabel = view.findViewById(R.id.dd_debug_device_model);<NEW_LINE>final TextView deviceResolutionLabel = view.<MASK><NEW_LINE>final TextView deviceDensityLabel = view.findViewById(R.id.dd_debug_device_density);<NEW_LINE>final TextView deviceReleaseLabel = view.findViewById(R.id.dd_debug_device_release);<NEW_LINE>final TextView deviceApiLabel = view.findViewById(R.id.dd_debug_device_api);<NEW_LINE>final DisplayMetrics displayMetrics = parent.getContext().getResources().getDisplayMetrics();<NEW_LINE>final String densityBucket = getDensityString(displayMetrics);<NEW_LINE>final String deviceMake = truncateAt(Build.MANUFACTURER, 20);<NEW_LINE>final String deviceModel = truncateAt(Build.MODEL, 20);<NEW_LINE>final String deviceResolution = displayMetrics.heightPixels + "x" + displayMetrics.widthPixels;<NEW_LINE>final String deviceDensity = displayMetrics.densityDpi + "dpi (" + densityBucket + ")";<NEW_LINE>final String deviceRelease = Build.VERSION.RELEASE;<NEW_LINE>final String deviceApi = String.valueOf(Build.VERSION.SDK_INT);<NEW_LINE>deviceModelLabel.setText(deviceModel);<NEW_LINE>deviceMakeLabel.setText(deviceMake);<NEW_LINE>deviceResolutionLabel.setText(deviceResolution);<NEW_LINE>deviceDensityLabel.setText(deviceDensity);<NEW_LINE>deviceApiLabel.setText(deviceApi);<NEW_LINE>deviceReleaseLabel.setText(deviceRelease);<NEW_LINE>return view;<NEW_LINE>}
findViewById(R.id.dd_debug_device_resolution);
924,450
final CancelSpotInstanceRequestsResult executeCancelSpotInstanceRequests(CancelSpotInstanceRequestsRequest cancelSpotInstanceRequestsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(cancelSpotInstanceRequestsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CancelSpotInstanceRequestsRequest> request = null;<NEW_LINE>Response<CancelSpotInstanceRequestsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CancelSpotInstanceRequestsRequestMarshaller().marshall(super.beforeMarshalling(cancelSpotInstanceRequestsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<CancelSpotInstanceRequestsResult> responseHandler = new StaxResponseHandler<CancelSpotInstanceRequestsResult>(new CancelSpotInstanceRequestsResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelSpotInstanceRequests");
1,605,022
protected void execute(final Event e) {<NEW_LINE>if (potionEffect) {<NEW_LINE>for (LivingEntity livingEntity : entities.getArray(e)) {<NEW_LINE>PotionEffect[] potionEffects = this.potionEffects.getArray(e);<NEW_LINE>PotionEffectUtils.addEffects(livingEntity, potionEffects);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>final PotionEffectType[] ts = potions.getArray(e);<NEW_LINE>if (ts.length == 0)<NEW_LINE>return;<NEW_LINE>if (!apply) {<NEW_LINE>for (LivingEntity en : entities.getArray(e)) {<NEW_LINE>for (final PotionEffectType t : <MASK><NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int a = 0;<NEW_LINE>if (tier != null) {<NEW_LINE>final Number amp = tier.getSingle(e);<NEW_LINE>if (amp == null)<NEW_LINE>return;<NEW_LINE>a = amp.intValue() - 1;<NEW_LINE>}<NEW_LINE>int d = DEFAULT_DURATION;<NEW_LINE>if (duration != null) {<NEW_LINE>final Timespan dur = duration.getSingle(e);<NEW_LINE>if (dur == null)<NEW_LINE>return;<NEW_LINE>d = (int) (dur.getTicks_i() >= Integer.MAX_VALUE ? Integer.MAX_VALUE : dur.getTicks_i());<NEW_LINE>}<NEW_LINE>for (final LivingEntity en : entities.getArray(e)) {<NEW_LINE>for (final PotionEffectType t : ts) {<NEW_LINE>int duration = d;<NEW_LINE>if (!replaceExisting) {<NEW_LINE>if (en.hasPotionEffect(t)) {<NEW_LINE>for (final PotionEffect eff : en.getActivePotionEffects()) {<NEW_LINE>if (eff.getType() == t) {<NEW_LINE>duration += eff.getDuration();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>en.addPotionEffect(new PotionEffect(t, duration, a, ambient, particles), true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ts) en.removePotionEffect(t);
1,146,624
private static void showTree(StringBuilder builder, MetaPackage mp, boolean onlyCompiled) {<NEW_LINE>List<MetaPackage> childPackages = mp.getChildPackages();<NEW_LINE>for (MetaPackage childPackage : childPackages) {<NEW_LINE>showTree(builder, childPackage, onlyCompiled);<NEW_LINE>}<NEW_LINE>List<MetaClass> packageClasses = mp.getPackageClasses();<NEW_LINE>for (MetaClass metaClass : packageClasses) {<NEW_LINE>for (IMetaMember member : metaClass.getMetaMembers()) {<NEW_LINE>boolean isCompiled = member.isCompiled();<NEW_LINE>if (!onlyCompiled || isCompiled) {<NEW_LINE>builder.append(mp.getName()).append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append(metaClass.getName<MASK><NEW_LINE>builder.append(member.toStringUnqualifiedMethodName(true, true)).append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append(isCompiled ? "Y" : "N").append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append(getCompiledAttributeOrNA(member, ATTR_COMPILER, S_HYPEN)).append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append(getQueuedAttributeOrNA(member, ATTR_STAMP, S_HYPEN)).append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append(getCompiledAttributeOrNA(member, ATTR_STAMP, S_HYPEN)).append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append(getLastCompilationTime(member)).append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append(getCompiledAttributeOrNA(member, ATTR_BYTES, S_HYPEN)).append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append(getCompiledAttributeOrNA(member, ATTR_NMSIZE, S_HYPEN)).append(HEADLESS_SEPARATOR);<NEW_LINE>builder.append(getCompiledAttributeOrNA(member, ATTR_DECOMPILES, "0"));<NEW_LINE>builder.append(S_NEWLINE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
()).append(HEADLESS_SEPARATOR);
1,153,619
public ProtectionGroupLimits unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ProtectionGroupLimits protectionGroupLimits = new ProtectionGroupLimits();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("MaxProtectionGroups", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>protectionGroupLimits.setMaxProtectionGroups(context.getUnmarshaller(Long.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("PatternTypeLimits", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>protectionGroupLimits.setPatternTypeLimits(ProtectionGroupPatternTypeLimitsJsonUnmarshaller.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 protectionGroupLimits;<NEW_LINE>}
class).unmarshall(context));
1,013,681
private void processEntity(BeforeAnalysisContext context) {<NEW_LINE>final Class<? extends Annotation> entityAnnotation = (Class<? extends Annotation>) context.access().findClassByName(AT_ENTITY);<NEW_LINE>final Class<? extends Annotation> superclassAnnotation = (Class<? extends Annotation>) context.access().findClassByName(AT_MAPPED_SUPERCLASS);<NEW_LINE>Set<Class<?>> annotatedSet = new HashSet<>();<NEW_LINE>tracer.parsing(() -> "Looking up annotated by " + AT_ENTITY);<NEW_LINE>if (entityAnnotation != null) {<NEW_LINE>annotatedSet.addAll(util.findAnnotated(AT_ENTITY));<NEW_LINE>}<NEW_LINE>tracer.parsing(() -> "Looking up annotated by " + AT_MAPPED_SUPERCLASS);<NEW_LINE>if (superclassAnnotation != null) {<NEW_LINE>annotatedSet.addAll(util.findAnnotated(AT_MAPPED_SUPERCLASS));<NEW_LINE>}<NEW_LINE>if (annotatedSet.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>annotatedSet.forEach(aClass -> {<NEW_LINE>tracer.parsing(() -> "Processing annotated class " + aClass.getName());<NEW_LINE>String resourceName = aClass.getName().replace('.', '/') + ".class";<NEW_LINE>InputStream resourceStream = aClass.<MASK><NEW_LINE>Resources.registerResource(resourceName, resourceStream);<NEW_LINE>for (Field declaredField : aClass.getDeclaredFields()) {<NEW_LINE>if (!Modifier.isPublic(declaredField.getModifiers()) && declaredField.getAnnotations().length == 0) {<NEW_LINE>RuntimeReflection.register(declaredField);<NEW_LINE>tracer.parsing(() -> " added non annotated field " + declaredField);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getClassLoader().getResourceAsStream(resourceName);
479,915
public void parse(final ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {<NEW_LINE>ByteBuffer content = ByteBuffer.allocate(78);<NEW_LINE>dataSource.read(content);<NEW_LINE>((Buffer) content).position(6);<NEW_LINE>dataReferenceIndex = IsoTypeReader.readUInt16(content);<NEW_LINE>long tmp = IsoTypeReader.readUInt16(content);<NEW_LINE>assert 0 == tmp : "reserved byte not 0";<NEW_LINE>tmp = IsoTypeReader.readUInt16(content);<NEW_LINE>assert 0 == tmp : "reserved byte not 0";<NEW_LINE>// should be zero<NEW_LINE>predefined[0] = IsoTypeReader.readUInt32(content);<NEW_LINE>// should be zero<NEW_LINE>predefined[1<MASK><NEW_LINE>// should be zero<NEW_LINE>predefined[2] = IsoTypeReader.readUInt32(content);<NEW_LINE>width = IsoTypeReader.readUInt16(content);<NEW_LINE>height = IsoTypeReader.readUInt16(content);<NEW_LINE>horizresolution = IsoTypeReader.readFixedPoint1616(content);<NEW_LINE>vertresolution = IsoTypeReader.readFixedPoint1616(content);<NEW_LINE>tmp = IsoTypeReader.readUInt32(content);<NEW_LINE>assert 0 == tmp : "reserved byte not 0";<NEW_LINE>frameCount = IsoTypeReader.readUInt16(content);<NEW_LINE>int compressornameDisplayAbleData = IsoTypeReader.readUInt8(content);<NEW_LINE>if (compressornameDisplayAbleData > 31) {<NEW_LINE>// System.out.println("invalid compressor name displayable data: " + compressornameDisplayAbleData);<NEW_LINE>compressornameDisplayAbleData = 31;<NEW_LINE>}<NEW_LINE>byte[] bytes = new byte[compressornameDisplayAbleData];<NEW_LINE>content.get(bytes);<NEW_LINE>compressorname = Utf8.convert(bytes);<NEW_LINE>if (compressornameDisplayAbleData < 31) {<NEW_LINE>byte[] zeros = new byte[31 - compressornameDisplayAbleData];<NEW_LINE>content.get(zeros);<NEW_LINE>// assert Mp4Arrays.equals(zeros, new byte[zeros.length]) : "The compressor name length was not filled up with zeros";<NEW_LINE>}<NEW_LINE>depth = IsoTypeReader.readUInt16(content);<NEW_LINE>tmp = IsoTypeReader.readUInt16(content);<NEW_LINE>assert 0xFFFF == tmp;<NEW_LINE>initContainer(dataSource, contentSize - 78, boxParser);<NEW_LINE>}
] = IsoTypeReader.readUInt32(content);
582,894
public static ListCorpMetricsResponse unmarshall(ListCorpMetricsResponse listCorpMetricsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCorpMetricsResponse.setRequestId(_ctx.stringValue("ListCorpMetricsResponse.RequestId"));<NEW_LINE>listCorpMetricsResponse.setTotalCount(_ctx.integerValue("ListCorpMetricsResponse.TotalCount"));<NEW_LINE>listCorpMetricsResponse.setMessage(_ctx.stringValue("ListCorpMetricsResponse.Message"));<NEW_LINE>listCorpMetricsResponse.setPageSize(_ctx.integerValue("ListCorpMetricsResponse.PageSize"));<NEW_LINE>listCorpMetricsResponse.setPageNumber(_ctx.integerValue("ListCorpMetricsResponse.PageNumber"));<NEW_LINE>listCorpMetricsResponse.setCode<MASK><NEW_LINE>listCorpMetricsResponse.setSuccess(_ctx.stringValue("ListCorpMetricsResponse.Success"));<NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListCorpMetricsResponse.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setDateId(_ctx.stringValue("ListCorpMetricsResponse.Data[" + i + "].DateId"));<NEW_LINE>dataItem.setDeviceGroupId(_ctx.stringValue("ListCorpMetricsResponse.Data[" + i + "].DeviceGroupId"));<NEW_LINE>dataItem.setDeviceId(_ctx.stringValue("ListCorpMetricsResponse.Data[" + i + "].DeviceId"));<NEW_LINE>dataItem.setUserGroupId(_ctx.stringValue("ListCorpMetricsResponse.Data[" + i + "].UserGroupId"));<NEW_LINE>dataItem.setTagCode(_ctx.stringValue("ListCorpMetricsResponse.Data[" + i + "].TagCode"));<NEW_LINE>dataItem.setCorpId(_ctx.stringValue("ListCorpMetricsResponse.Data[" + i + "].CorpId"));<NEW_LINE>dataItem.setTagMetrics(_ctx.stringValue("ListCorpMetricsResponse.Data[" + i + "].TagMetrics"));<NEW_LINE>dataItem.setTagValue(_ctx.stringValue("ListCorpMetricsResponse.Data[" + i + "].TagValue"));<NEW_LINE>dataItem.setPersonId(_ctx.stringValue("ListCorpMetricsResponse.Data[" + i + "].PersonId"));<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>listCorpMetricsResponse.setData(data);<NEW_LINE>return listCorpMetricsResponse;<NEW_LINE>}
(_ctx.stringValue("ListCorpMetricsResponse.Code"));
1,693,075
private static HRDParameters readHRDParameters(BitReader _in) {<NEW_LINE>HRDParameters hrd = new HRDParameters();<NEW_LINE>hrd.cpbCntMinus1 = readUEtrace(_in, "SPS: cpb_cnt_minus1");<NEW_LINE>hrd.bitRateScale = (int) readNBit(_in, 4, "HRD: bit_rate_scale");<NEW_LINE>hrd.cpbSizeScale = (int) <MASK><NEW_LINE>hrd.bitRateValueMinus1 = new int[hrd.cpbCntMinus1 + 1];<NEW_LINE>hrd.cpbSizeValueMinus1 = new int[hrd.cpbCntMinus1 + 1];<NEW_LINE>hrd.cbrFlag = new boolean[hrd.cpbCntMinus1 + 1];<NEW_LINE>for (int SchedSelIdx = 0; SchedSelIdx <= hrd.cpbCntMinus1; SchedSelIdx++) {<NEW_LINE>hrd.bitRateValueMinus1[SchedSelIdx] = readUEtrace(_in, "HRD: bit_rate_value_minus1");<NEW_LINE>hrd.cpbSizeValueMinus1[SchedSelIdx] = readUEtrace(_in, "HRD: cpb_size_value_minus1");<NEW_LINE>hrd.cbrFlag[SchedSelIdx] = readBool(_in, "HRD: cbr_flag");<NEW_LINE>}<NEW_LINE>hrd.initialCpbRemovalDelayLengthMinus1 = (int) readNBit(_in, 5, "HRD: initial_cpb_removal_delay_length_minus1");<NEW_LINE>hrd.cpbRemovalDelayLengthMinus1 = (int) readNBit(_in, 5, "HRD: cpb_removal_delay_length_minus1");<NEW_LINE>hrd.dpbOutputDelayLengthMinus1 = (int) readNBit(_in, 5, "HRD: dpb_output_delay_length_minus1");<NEW_LINE>hrd.timeOffsetLength = (int) readNBit(_in, 5, "HRD: time_offset_length");<NEW_LINE>return hrd;<NEW_LINE>}
readNBit(_in, 4, "HRD: cpb_size_scale");
65,300
public Node visitQueryNoWith(SqlBaseParser.QueryNoWithContext context) {<NEW_LINE>QueryBody term = (QueryBody) visit(context.queryTerm());<NEW_LINE>Optional<OrderBy<MASK><NEW_LINE>if (context.ORDER() != null) {<NEW_LINE>orderBy = Optional.of(new OrderBy(getLocation(context.ORDER()), visit(context.sortItem(), SortItem.class)));<NEW_LINE>}<NEW_LINE>if (term instanceof QuerySpecification) {<NEW_LINE>// When we have a simple query specification<NEW_LINE>// followed by order by limit, fold the order by and limit<NEW_LINE>// clauses into the query specification (analyzer/planner<NEW_LINE>// expects this structure to resolve references with respect<NEW_LINE>// to columns defined in the query specification)<NEW_LINE>QuerySpecification query = (QuerySpecification) term;<NEW_LINE>return new Query(getLocation(context), Optional.empty(), new QuerySpecification(getLocation(context), query.getSelect(), query.getFrom(), query.getWhere(), query.getGroupBy(), query.getHaving(), orderBy, getTextIfPresent(context.limit)), Optional.empty(), Optional.empty());<NEW_LINE>}<NEW_LINE>return new Query(getLocation(context), Optional.empty(), term, orderBy, getTextIfPresent(context.limit));<NEW_LINE>}
> orderBy = Optional.empty();
430,665
public void controlResized(ControlEvent e) {<NEW_LINE>Rectangle area;<NEW_LINE>if (e.widget instanceof Composite) {<NEW_LINE>area = ((Composite) e.widget).getClientArea();<NEW_LINE>} else if (e.widget instanceof Table) {<NEW_LINE>area = ((Table) <MASK><NEW_LINE>} else {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>org.eclipse.swt.graphics.Point preferredSize = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);<NEW_LINE>int width = area.width - 2 * table.getBorderWidth();<NEW_LINE>if (preferredSize.y > area.height + table.getHeaderHeight()) {<NEW_LINE>org.eclipse.swt.graphics.Point vBarSize = table.getVerticalBar().getSize();<NEW_LINE>width -= vBarSize.x;<NEW_LINE>}<NEW_LINE>org.eclipse.swt.graphics.Point oldSize = table.getSize();<NEW_LINE>if (oldSize.x > area.width) {<NEW_LINE>adjustColumnSize(width - 20);<NEW_LINE>table.setSize(area.width, area.height);<NEW_LINE>} else {<NEW_LINE>table.setSize(area.width, area.height);<NEW_LINE>adjustColumnSize(width - 20);<NEW_LINE>}<NEW_LINE>super.controlResized(e);<NEW_LINE>}
e.widget).getClientArea();
1,560,136
public SyncStatus attachDatabase(JournalContext journalContext, String udbType, String udbConnectionUri, String udbDbName, String dbName, Map<String, String> map, boolean ignoreSyncErrors) throws IOException {<NEW_LINE>try (LockResource l = getDbLock(dbName)) {<NEW_LINE>if (mDBs.containsKey(dbName)) {<NEW_LINE>throw new IOException(String.format("Unable to attach database. Database name %s (type: %s) already exists.", dbName, udbType));<NEW_LINE>}<NEW_LINE>applyAndJournal(journalContext, Journal.JournalEntry.newBuilder().setAttachDb(alluxio.proto.journal.Table.AttachDbEntry.newBuilder().setUdbType(udbType).setUdbConnectionUri(udbConnectionUri).setUdbDbName(udbDbName).setDbName(dbName).putAllConfig(map).build()).build());<NEW_LINE>boolean syncError = false;<NEW_LINE>try {<NEW_LINE>SyncStatus status = mDBs.get(dbName).sync(journalContext);<NEW_LINE>syncError <MASK><NEW_LINE>return status;<NEW_LINE>} catch (Exception e) {<NEW_LINE>// Failed to connect to and sync the udb.<NEW_LINE>syncError = true;<NEW_LINE>// log the error and stack<NEW_LINE>LOG.error(String.format("Sync (during attach) failed for db '%s'.", dbName), e);<NEW_LINE>throw new IOException(String.format("Failed to connect underDb for Alluxio db '%s': %s", dbName, e.getMessage()), e);<NEW_LINE>} finally {<NEW_LINE>if (syncError && !ignoreSyncErrors) {<NEW_LINE>applyAndJournal(journalContext, Journal.JournalEntry.newBuilder().setDetachDb(alluxio.proto.journal.Table.DetachDbEntry.newBuilder().setDbName(dbName).build()).build());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= status.getTablesErrorsCount() > 0;
384,805
public void initialize(final ModelValidationEngine engine, final MClient client) {<NEW_LINE>if (client != null)<NEW_LINE>m_AD_Client_ID = client.getAD_Client_ID();<NEW_LINE>Services.registerService(ITextTemplateBL.class, TextTemplateBL.get());<NEW_LINE>engine.addModelChange(I_C_DunningRunEntry.Table_Name, this);<NEW_LINE>//<NEW_LINE>final TreeSet<String> tableNames = new TreeSet<>();<NEW_LINE>for (final MADBoilerPlateVarEval timing : MADBoilerPlateVarEval.getAll(Env.getCtx())) {<NEW_LINE>final I_C_DocType dt = timing.getC_DocType();<NEW_LINE>if (dt == null || dt.getC_DocType_ID() <= 0)<NEW_LINE>continue;<NEW_LINE>final String tableName = getTableNameByDocBaseType(dt.getDocBaseType());<NEW_LINE>if (tableName == null)<NEW_LINE>continue;<NEW_LINE>final ArrayKey key = new ArrayKey(timing.getAD_Client_ID(), tableName, dt.getC_DocType_ID(), timing.getEvalTime());<NEW_LINE>Set<MADBoilerPlateVar> <MASK><NEW_LINE>if (list == null) {<NEW_LINE>list = new TreeSet<>();<NEW_LINE>}<NEW_LINE>final MADBoilerPlateVar var = MADBoilerPlateVar.get(timing.getCtx(), timing.getAD_BoilerPlate_Var_ID());<NEW_LINE>list.add(var);<NEW_LINE>s_cacheVars.put(key, list);<NEW_LINE>tableNames.add(tableName);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>for (final String tableName : tableNames) {<NEW_LINE>engine.addDocValidate(tableName, this);<NEW_LINE>}<NEW_LINE>}
list = s_cacheVars.get(key);
1,002,004
private void loadNode53() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerConfigurationType_SupportedPrivateKeyFormats, new QualifiedName(0, "SupportedPrivateKeyFormats"), new LocalizedText("en", "SupportedPrivateKeyFormats"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.String, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfigurationType_SupportedPrivateKeyFormats, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfigurationType_SupportedPrivateKeyFormats, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfigurationType_SupportedPrivateKeyFormats, Identifiers.HasProperty, Identifiers.ServerConfigurationType.expanded(), false));<NEW_LINE><MASK><NEW_LINE>}
this.nodeManager.addNode(node);
536,229
final ListResourceRecordSetsResult executeListResourceRecordSets(ListResourceRecordSetsRequest listResourceRecordSetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listResourceRecordSetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListResourceRecordSetsRequest> request = null;<NEW_LINE>Response<ListResourceRecordSetsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListResourceRecordSetsRequestMarshaller().marshall(super.beforeMarshalling(listResourceRecordSetsRequest));<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, "Route 53");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ListResourceRecordSetsResult> responseHandler = new StaxResponseHandler<ListResourceRecordSetsResult>(new ListResourceRecordSetsResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListResourceRecordSets");
641,490
private static List<Pair<TregexPattern, TsurgeonPattern>> parseOperations(List<CoreNLPProtos.TsurgeonRequest.Operation> protoOperations) {<NEW_LINE>List<Pair<TregexPattern, TsurgeonPattern>> operations = new ArrayList<>();<NEW_LINE>// TODO: could add headfinder and basic category options<NEW_LINE>TregexPatternCompiler compiler = new TregexPatternCompiler();<NEW_LINE>for (CoreNLPProtos.TsurgeonRequest.Operation protoOp : protoOperations) {<NEW_LINE>TregexPattern tregex = compiler.compile(protoOp.getTregex());<NEW_LINE>List<TsurgeonPattern> surgeries = protoOp.getTsurgeonList().stream().map(Tsurgeon::parseOperation).collect(Collectors.toList());<NEW_LINE>TsurgeonPattern <MASK><NEW_LINE>operations.add(new Pair<>(tregex, tsurgeon));<NEW_LINE>}<NEW_LINE>return operations;<NEW_LINE>}
tsurgeon = Tsurgeon.collectOperations(surgeries);
1,089,891
private void initComponents() {<NEW_LINE>jtfUserNotice = new JTextField(20);<NEW_LINE>jtfUserNotice.setEditable(false);<NEW_LINE>GridBagConstraints gbc_jtfUserNotice = new GridBagConstraints();<NEW_LINE>gbc_jtfUserNotice.gridwidth = 1;<NEW_LINE>gbc_jtfUserNotice.gridheight = 1;<NEW_LINE>gbc_jtfUserNotice.gridx = 0;<NEW_LINE>gbc_jtfUserNotice.gridy = 0;<NEW_LINE>gbc_jtfUserNotice.insets = new Insets(<MASK><NEW_LINE>ImageIcon editIcon = new ImageIcon(getClass().getResource("images/edit_user_notice.png"));<NEW_LINE>jbEditUserNotice = new JButton(editIcon);<NEW_LINE>jbEditUserNotice.setToolTipText(res.getString("JUserNotice.jbEditUserNotice.tooltip"));<NEW_LINE>jbEditUserNotice.addActionListener(evt -> {<NEW_LINE>try {<NEW_LINE>CursorUtil.setCursorBusy(JUserNotice.this);<NEW_LINE>editUserNotice();<NEW_LINE>} finally {<NEW_LINE>CursorUtil.setCursorFree(JUserNotice.this);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>GridBagConstraints gbc_jbEditUserNotice = new GridBagConstraints();<NEW_LINE>gbc_jbEditUserNotice.gridwidth = 1;<NEW_LINE>gbc_jbEditUserNotice.gridheight = 1;<NEW_LINE>gbc_jbEditUserNotice.gridx = 1;<NEW_LINE>gbc_jbEditUserNotice.gridy = 0;<NEW_LINE>gbc_jbEditUserNotice.insets = new Insets(0, 0, 0, 5);<NEW_LINE>ImageIcon clearIcon = new ImageIcon(getClass().getResource("images/clear_user_notice.png"));<NEW_LINE>jbClearUserNotice = new JButton(clearIcon);<NEW_LINE>jbClearUserNotice.setToolTipText(res.getString("JUserNotice.jbClearUserNotice.tooltip"));<NEW_LINE>jbClearUserNotice.addActionListener(evt -> {<NEW_LINE>try {<NEW_LINE>CursorUtil.setCursorBusy(JUserNotice.this);<NEW_LINE>clearUserNotice();<NEW_LINE>} finally {<NEW_LINE>CursorUtil.setCursorFree(JUserNotice.this);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>GridBagConstraints gbc_jbClearUserNotice = new GridBagConstraints();<NEW_LINE>gbc_jbClearUserNotice.gridwidth = 1;<NEW_LINE>gbc_jbClearUserNotice.gridheight = 1;<NEW_LINE>gbc_jbClearUserNotice.gridx = 2;<NEW_LINE>gbc_jbClearUserNotice.gridy = 0;<NEW_LINE>gbc_jbClearUserNotice.insets = new Insets(0, 0, 0, 0);<NEW_LINE>setLayout(new GridBagLayout());<NEW_LINE>add(jtfUserNotice, gbc_jtfUserNotice);<NEW_LINE>add(jbEditUserNotice, gbc_jbEditUserNotice);<NEW_LINE>add(jbClearUserNotice, gbc_jbClearUserNotice);<NEW_LINE>populate();<NEW_LINE>}
0, 0, 0, 5);
956,705
public ListStreamKeysResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListStreamKeysResult listStreamKeysResult = new ListStreamKeysResult();<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 listStreamKeysResult;<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("nextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listStreamKeysResult.setNextToken(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("streamKeys", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listStreamKeysResult.setStreamKeys(new ListUnmarshaller<StreamKeySummary>(StreamKeySummaryJsonUnmarshaller.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 listStreamKeysResult;<NEW_LINE>}
class).unmarshall(context));
181,322
public void translate(GeyserSession session, PlayerInputPacket packet) {<NEW_LINE>ServerboundPlayerInputPacket playerInputPacket = new ServerboundPlayerInputPacket(packet.getInputMotion().getX(), packet.getInputMotion().getY(), packet.isJumping(), packet.isSneaking());<NEW_LINE>session.sendDownstreamPacket(playerInputPacket);<NEW_LINE>// Bedrock only sends movement vehicle packets while moving<NEW_LINE>// This allows horses to take damage while standing on magma<NEW_LINE>Entity vehicle = session.getPlayerEntity().getVehicle();<NEW_LINE>boolean sendMovement = false;<NEW_LINE>if (vehicle instanceof AbstractHorseEntity && !(vehicle instanceof LlamaEntity)) {<NEW_LINE>sendMovement = vehicle.isOnGround();<NEW_LINE>} else if (vehicle instanceof BoatEntity) {<NEW_LINE>if (vehicle.getPassengers().size() == 1) {<NEW_LINE>// The player is the only rider<NEW_LINE>sendMovement = true;<NEW_LINE>} else {<NEW_LINE>// Check if the player is the front rider<NEW_LINE>if (session.getPlayerEntity().isRidingInFront()) {<NEW_LINE>sendMovement = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (sendMovement) {<NEW_LINE>long timeSinceVehicleMove = System.currentTimeMillis<MASK><NEW_LINE>if (timeSinceVehicleMove >= 100) {<NEW_LINE>Vector3f vehiclePosition = vehicle.getPosition();<NEW_LINE>if (vehicle instanceof BoatEntity) {<NEW_LINE>// Remove some Y position to prevents boats flying up<NEW_LINE>vehiclePosition = vehiclePosition.down(EntityDefinitions.BOAT.offset());<NEW_LINE>}<NEW_LINE>ServerboundMoveVehiclePacket moveVehiclePacket = new ServerboundMoveVehiclePacket(vehiclePosition.getX(), vehiclePosition.getY(), vehiclePosition.getZ(), vehicle.getYaw() - 90, vehicle.getPitch());<NEW_LINE>session.sendDownstreamPacket(moveVehiclePacket);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
() - session.getLastVehicleMoveTimestamp();
1,121,642
protected void configure() {<NEW_LINE>bind(Scheduler.class).to(MesosSchedulerImpl.class);<NEW_LINE>bind(org.apache.mesos.v1.scheduler.Scheduler.class).to(VersionedMesosSchedulerImpl.class);<NEW_LINE>bind(MesosSchedulerImpl.class).in(Singleton.class);<NEW_LINE>bind(MesosCallbackHandler.class).to(MesosCallbackHandlerImpl.class);<NEW_LINE>bind(MesosCallbackHandlerImpl.class).in(Singleton.class);<NEW_LINE>// TODO(zmanji): Create singleThreadedExecutor (non-scheduled) variant.<NEW_LINE>bind(Executor.class).annotatedWith(SchedulerExecutor.class).toInstance(AsyncUtil.singleThreadLoggingScheduledExecutor("SchedulerImpl-%d", LOG));<NEW_LINE>switch(kind) {<NEW_LINE>case SCHEDULER_DRIVER:<NEW_LINE>bind(Driver.class).to(SchedulerDriverService.class);<NEW_LINE>bind(SchedulerDriverService.class<MASK><NEW_LINE>break;<NEW_LINE>case V0_DRIVER:<NEW_LINE>bind(Driver.class).to(VersionedSchedulerDriverService.class);<NEW_LINE>bind(VersionedSchedulerDriverService.class).in(Singleton.class);<NEW_LINE>PubsubEventModule.bindRegisteredSubscriber(binder(), VersionedSchedulerDriverService.class);<NEW_LINE>break;<NEW_LINE>case V1_DRIVER:<NEW_LINE>bind(Driver.class).to(VersionedSchedulerDriverService.class);<NEW_LINE>bind(VersionedSchedulerDriverService.class).in(Singleton.class);<NEW_LINE>PubsubEventModule.bindRegisteredSubscriber(binder(), VersionedSchedulerDriverService.class);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>checkState(false, "Unknown driver kind.");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>PubsubEventModule.bindSubscriber(binder(), TaskStatusStats.class);<NEW_LINE>bind(TaskStatusStats.class).in(Singleton.class);<NEW_LINE>}
).in(Singleton.class);
428,016
final DeleteLoginProfileResult executeDeleteLoginProfile(DeleteLoginProfileRequest deleteLoginProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteLoginProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteLoginProfileRequest> request = null;<NEW_LINE>Response<DeleteLoginProfileResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteLoginProfileRequestMarshaller().marshall(super.beforeMarshalling(deleteLoginProfileRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteLoginProfile");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DeleteLoginProfileResult> responseHandler = new StaxResponseHandler<DeleteLoginProfileResult>(new DeleteLoginProfileResultStaxUnmarshaller());<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.CLIENT_ENDPOINT, endpoint);
637,318
public void characterDataChanged(final CharacterDataChangeEvent event) {<NEW_LINE>final ScriptableObject target = event.getCharacterData().getScriptableObject();<NEW_LINE>if (subtree_ || target == node_) {<NEW_LINE>final MutationRecord mutationRecord = new MutationRecord();<NEW_LINE>final Scriptable scope = getParentScope();<NEW_LINE>mutationRecord.setParentScope(scope);<NEW_LINE>mutationRecord.setPrototype(getPrototype(mutationRecord.getClass()));<NEW_LINE>mutationRecord.setType("characterData");<NEW_LINE>mutationRecord.setTarget(target);<NEW_LINE>if (characterDataOldValue_) {<NEW_LINE>mutationRecord.setOldValue(event.getOldValue());<NEW_LINE>}<NEW_LINE>final Window window = getWindow();<NEW_LINE>final HtmlPage owningPage = (HtmlPage) window<MASK><NEW_LINE>final JavaScriptEngine jsEngine = (JavaScriptEngine) window.getWebWindow().getWebClient().getJavaScriptEngine();<NEW_LINE>jsEngine.addPostponedAction(new PostponedAction(owningPage, "MutationObserver.characterDataChanged") {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void execute() throws Exception {<NEW_LINE>final NativeArray array = new NativeArray(new Object[] { mutationRecord });<NEW_LINE>ScriptRuntime.setBuiltinProtoAndParent(array, scope, TopLevel.Builtins.Array);<NEW_LINE>jsEngine.callFunction(owningPage, function_, scope, MutationObserver.this, new Object[] { array });<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
.getDocument().getPage();
231,229
// end utilities<NEW_LINE>static void test_i386(byte[] code) {<NEW_LINE>fd_chains.clean();<NEW_LINE>System.out.printf("Emulate i386 code\n");<NEW_LINE>try {<NEW_LINE>// Initialize emulator in X86-32bit mode<NEW_LINE>Unicorn mu = new Unicorn(Unicorn.UC_ARCH_X86, Unicorn.UC_MODE_32);<NEW_LINE>// map 2MB memory for this emulation<NEW_LINE>mu.mem_map(ADDRESS, 2 * 1024 * 1024, Unicorn.UC_PROT_ALL);<NEW_LINE>// write machine code to be emulated to memory<NEW_LINE>mu.mem_write(ADDRESS, code);<NEW_LINE>// initialize stack<NEW_LINE>mu.reg_write(Unicorn.UC_X86_REG_ESP, ADDRESS + 0x200000L);<NEW_LINE>// handle interrupt ourself<NEW_LINE>mu.hook_add(new MyInterruptHook(), null);<NEW_LINE>// emulate machine code in infinite time<NEW_LINE>mu.emu_start(ADDRESS, ADDRESS + <MASK><NEW_LINE>// now print out some registers<NEW_LINE>System.out.printf(">>> Emulation done\n");<NEW_LINE>} catch (UnicornException uex) {<NEW_LINE>System.out.printf("ERROR: %s\n", uex.getMessage());<NEW_LINE>}<NEW_LINE>fd_chains.print_report();<NEW_LINE>}
code.length, 0, 0);
692,445
public Document[] parse(final DigestURL location, final String mimeType, final String charset, final VocabularyScraper scraper, final int timezoneOffset, final InputStream source) throws Parser.Failure, InterruptedException {<NEW_LINE>Document[] docs = null;<NEW_LINE>File tempFile = null;<NEW_LINE>FileOutputStream out = null;<NEW_LINE>try {<NEW_LINE>tempFile = File.createTempFile("apk" + <MASK><NEW_LINE>out = new FileOutputStream(tempFile);<NEW_LINE>int read = 0;<NEW_LINE>final byte[] data = new byte[1024];<NEW_LINE>while ((read = source.read(data, 0, 1024)) != -1) {<NEW_LINE>out.write(data, 0, read);<NEW_LINE>}<NEW_LINE>out.close();<NEW_LINE>out = null;<NEW_LINE>JarFile jf = new JarFile(tempFile);<NEW_LINE>docs = parse(location, mimeType, charset, jf);<NEW_LINE>} catch (IOException e) {<NEW_LINE>ConcurrentLog.logException(e);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>if (out != null) {<NEW_LINE>out.close();<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>ConcurrentLog.logException(e);<NEW_LINE>} finally {<NEW_LINE>if (tempFile != null) {<NEW_LINE>if (!tempFile.delete()) {<NEW_LINE>log.warn("Could not delete temporary file " + tempFile);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return docs;<NEW_LINE>}
System.currentTimeMillis(), "jar");
521,904
private static boolean match(@Nonnull SingleChildDescriptor childDescriptor1, @Nonnull SingleChildDescriptor childDescriptor2, @Nonnull AbstractMatchingVisitor g, @Nonnull Set<PsiElementRole> skippedRoles, @Nullable DuplicatesProfile duplicatesProfile) {<NEW_LINE>if (childDescriptor1.getType() != childDescriptor2.getType()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final PsiElement element1 = childDescriptor1.getElement();<NEW_LINE>final PsiElement element2 = childDescriptor2.getElement();<NEW_LINE>if (duplicatesProfile != null) {<NEW_LINE>final PsiElementRole role1 = element1 != null ? duplicatesProfile.getRole(element1) : null;<NEW_LINE>final PsiElementRole role2 = element2 != null ? duplicatesProfile.getRole(element2) : null;<NEW_LINE>if (role1 == role2 && skippedRoles.contains(role1)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>switch(childDescriptor1.getType()) {<NEW_LINE>case DEFAULT:<NEW_LINE>return g.match(element1, element2);<NEW_LINE>case OPTIONALLY_IN_PATTERN:<NEW_LINE>case OPTIONALLY:<NEW_LINE>return g.matchOptionally(element1, element2);<NEW_LINE>case CHILDREN:<NEW_LINE>return g.matchSons(element1, element2);<NEW_LINE>case CHILDREN_OPTIONALLY_IN_PATTERN:<NEW_LINE>case CHILDREN_OPTIONALLY:<NEW_LINE>return <MASK><NEW_LINE>case CHILDREN_IN_ANY_ORDER:<NEW_LINE>return g.matchSonsInAnyOrder(element1, element2);<NEW_LINE>default:<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
g.matchSonsOptionally(element1, element2);
646,636
public Object visit(ASTVariableDeclaration node, Object data) {<NEW_LINE>String variableName = node.getImage();<NEW_LINE>ASTBlockStatement variableContext = node.getFirstParentOfType(ASTBlockStatement.class);<NEW_LINE>if (variableContext == null) {<NEW_LINE>// if there is no parent BlockStatement, e.g. in triggers<NEW_LINE>return data;<NEW_LINE>}<NEW_LINE>List<ApexNode<?>> <MASK><NEW_LINE>// Variable expression catch things like the `a` in `a + b`<NEW_LINE>potentialUsages.addAll(variableContext.findDescendantsOfType(ASTVariableExpression.class));<NEW_LINE>// Reference expressions catch things like the `a` in `a.foo()`<NEW_LINE>potentialUsages.addAll(variableContext.findDescendantsOfType(ASTReferenceExpression.class));<NEW_LINE>for (ApexNode<?> usage : potentialUsages) {<NEW_LINE>if (usage.getParent() == node) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (StringUtils.equalsIgnoreCase(variableName, usage.getImage())) {<NEW_LINE>return data;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>addViolation(data, node, variableName);<NEW_LINE>return data;<NEW_LINE>}
potentialUsages = new ArrayList<>();
357,255
public static List<PageInfo> findLayerPages(CssContext c, Layer layer, List<PageBox> pages) {<NEW_LINE>PageFinder finder = new PageFinder(pages);<NEW_LINE>Rectangle bounds = findLayerRect(c, layer);<NEW_LINE>Box container = layer.getMaster();<NEW_LINE>AffineTransform transform = container.getContainingLayer().getCurrentTransformMatrix();<NEW_LINE>Area overflowClip = container.getAbsoluteClipBox(c);<NEW_LINE>transformBounds(bounds, transform);<NEW_LINE>bounds = applyOverflowClip(bounds, overflowClip);<NEW_LINE>int firstPage = finder.findPageAdjusted(c, (int) bounds.getMinY());<NEW_LINE>int lastPage = finder.findPageAdjusted(c, (<MASK><NEW_LINE>List<PageInfo> result = new ArrayList<>();<NEW_LINE>for (int i = firstPage; i <= lastPage; i++) {<NEW_LINE>result.add(new PageInfo(i, PageInfo.BASE_PAGE));<NEW_LINE>if (pages.get(i).shouldInsertPages()) {<NEW_LINE>int maxXShadowPage = pages.get(i).getMaxShadowPagesForXPos(c, (int) bounds.getMaxX());<NEW_LINE>int minXShadowPage = pages.get(i).getMaxShadowPagesForXPos(c, (int) bounds.getMinX());<NEW_LINE>int shadowPageCount = Math.max(maxXShadowPage, minXShadowPage);<NEW_LINE>shadowPageCount = Math.min(shadowPageCount, pages.get(i).getMaxInsertedPages());<NEW_LINE>for (int j = 0; j < shadowPageCount; j++) {<NEW_LINE>result.add(new PageInfo(i, j));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
int) bounds.getMaxY());
900,210
private void imageAspectCalc(Image img) {<NEW_LINE>if (img == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int iW = img.getWidth();<NEW_LINE>int iH = img.getHeight();<NEW_LINE>Style s = getStyle();<NEW_LINE>int width = getWidth() - s.getHorizontalPadding();<NEW_LINE>int height = getHeight<MASK><NEW_LINE>float r2;<NEW_LINE>if (imageInitialPosition == IMAGE_FIT) {<NEW_LINE>r2 = Math.min(((float) width) / ((float) iW), ((float) height) / ((float) iH));<NEW_LINE>} else {<NEW_LINE>r2 = Math.max(((float) width) / ((float) iW), ((float) height) / ((float) iH));<NEW_LINE>}<NEW_LINE>// calculate the image position to fit<NEW_LINE>prefW = (int) (((float) iW) * r2);<NEW_LINE>prefH = (int) (((float) iH) * r2);<NEW_LINE>prefX = s.getPaddingLeftNoRTL() + (width - prefW) / 2;<NEW_LINE>prefY = s.getPaddingTop() + (height - prefH) / 2;<NEW_LINE>}
() - s.getVerticalPadding();
1,698,408
static HttpData convertRequest(ServiceRequestContext ctx, AggregatedHttpRequest request) {<NEW_LINE>ZipkinHttpCollector.metrics.incrementMessages();<NEW_LINE>String encoding = request.headers().get(HttpHeaderNames.CONTENT_ENCODING);<NEW_LINE>HttpData content = request.content();<NEW_LINE>if (!content.isEmpty() && encoding != null && encoding.contains("gzip")) {<NEW_LINE>content = StreamDecoderFactory.gzip().newDecoder(ctx.alloc<MASK><NEW_LINE>// The implementation of the armeria decoder is to return an empty body on failure<NEW_LINE>if (content.isEmpty()) {<NEW_LINE>ZipkinHttpCollector.maybeLog("Malformed gzip body", ctx, request);<NEW_LINE>content.close();<NEW_LINE>throw new IllegalArgumentException("Cannot gunzip spans");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (content.isEmpty())<NEW_LINE>ZipkinHttpCollector.maybeLog("Empty POST body", ctx, request);<NEW_LINE>if (content.length() == 2 && "[]".equals(content.toStringAscii())) {<NEW_LINE>ZipkinHttpCollector.maybeLog("Empty JSON list POST body", ctx, request);<NEW_LINE>content.close();<NEW_LINE>content = HttpData.empty();<NEW_LINE>}<NEW_LINE>ZipkinHttpCollector.metrics.incrementBytes(content.length());<NEW_LINE>return content;<NEW_LINE>}
()).decode(content);
1,238,220
public static BufferedImage convertPalettetoRGB(BufferedImage src, BufferedImage dst) {<NEW_LINE>ColorModel pcm = src.getColorModel();<NEW_LINE>if (!(pcm instanceof PaletteColorModel || pcm instanceof IndexColorModel)) {<NEW_LINE>throw new UnsupportedOperationException("Cannot convert " + pcm.getClass().getName() + " to RGB");<NEW_LINE>}<NEW_LINE>int width = src.getWidth();<NEW_LINE>int height = src.getHeight();<NEW_LINE>if (dst == null) {<NEW_LINE>ColorModel cmodel = new ComponentColorModel(pcm.getColorSpace(), new int[] { 8, 8, 8 }, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE);<NEW_LINE>SampleModel sampleModel = <MASK><NEW_LINE>DataBuffer dataBuffer = sampleModel.createDataBuffer();<NEW_LINE>WritableRaster rasterDst = Raster.createWritableRaster(sampleModel, dataBuffer, null);<NEW_LINE>dst = new BufferedImage(cmodel, rasterDst, false, null);<NEW_LINE>}<NEW_LINE>WritableRaster rasterDst = dst.getRaster();<NEW_LINE>WritableRaster raster = src.getRaster();<NEW_LINE>byte[] b = new byte[3];<NEW_LINE>for (int i = 0; i < height; i++) {<NEW_LINE>for (int j = 0; j < width; j++) {<NEW_LINE>int rgb = pcm.getRGB(raster.getSample(j, i, 0));<NEW_LINE>b[0] = (byte) ((rgb >> 16) & 0xff);<NEW_LINE>b[1] = (byte) ((rgb >> 8) & 0xff);<NEW_LINE>b[2] = (byte) (rgb & 0xff);<NEW_LINE>rasterDst.setDataElements(j, i, b);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return dst;<NEW_LINE>}
cmodel.createCompatibleSampleModel(width, height);
254,476
public void run(ApplicationArguments args) throws Exception {<NEW_LINE>String collectType = properties.getCollectType();<NEW_LINE>if (!properties.getCollect() || StringUtil.isBlank(collectType)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>log.info("Start monitoring the running status of dynamic thread pool.");<NEW_LINE>threadPoolMonitors = Lists.newArrayList();<NEW_LINE>collectExecutor = new ScheduledThreadPoolExecutor(new Integer(1), ThreadFactoryBuilder.builder().daemon(true).prefix("client.scheduled.collect.data").build());<NEW_LINE>// Get dynamic thread pool monitoring component.<NEW_LINE>List<String> collectTypes = Arrays.asList(collectType.split(","));<NEW_LINE>ApplicationContextHolder.getBeansOfType(ThreadPoolMonitor.class).forEach((key, val) -> {<NEW_LINE>if (collectTypes.contains(val.getType())) {<NEW_LINE>threadPoolMonitors.add(val);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Collection<DynamicThreadPoolMonitor> dynamicThreadPoolMonitors = DynamicThreadPoolServiceLoader.getSingletonServiceInstances(DynamicThreadPoolMonitor.class);<NEW_LINE>dynamicThreadPoolMonitors.stream().filter(each -> collectTypes.contains(each.getType())).forEach(each -> threadPoolMonitors.add(each));<NEW_LINE>// Execute dynamic thread pool monitoring component.<NEW_LINE>collectExecutor.scheduleWithFixedDelay(() -> scheduleRunnable(), properties.getInitialDelay(), properties.<MASK><NEW_LINE>}
getCollectInterval(), TimeUnit.MILLISECONDS);
1,477,164
public String generateReadName(final ClusterData cluster, final Integer pairNumber) {<NEW_LINE>final StringBuilder builder = new StringBuilder(bufferSize);<NEW_LINE>builder.append(this.nameBase);<NEW_LINE>builder.append(encodeInt<MASK><NEW_LINE>builder.append(SEPARATOR);<NEW_LINE>builder.append(encodeInt(cluster.getTile()));<NEW_LINE>builder.append(SEPARATOR);<NEW_LINE>builder.append(encodeInt(cluster.getX()));<NEW_LINE>builder.append(SEPARATOR);<NEW_LINE>builder.append(encodeInt(cluster.getY()));<NEW_LINE>builder.append(' ');<NEW_LINE>if (pairNumber != null)<NEW_LINE>builder.append(encodeInt(pairNumber));<NEW_LINE>builder.append(SEPARATOR);<NEW_LINE>// encoded in read name as Y == fails filter<NEW_LINE>builder.append(cluster.isPf() ? 'N' : 'Y');<NEW_LINE>builder.append(SEPARATOR);<NEW_LINE>builder.append(CONTROL_FIELD_VALUE);<NEW_LINE>builder.append(SEPARATOR);<NEW_LINE>if (cluster.getMatchedBarcode() != null)<NEW_LINE>builder.append(cluster.getMatchedBarcode());<NEW_LINE>// Update the buffer size so that next time through we don't need to grow the builder<NEW_LINE>if (builder.length() > this.bufferSize) {<NEW_LINE>this.bufferSize = builder.length();<NEW_LINE>}<NEW_LINE>return builder.toString();<NEW_LINE>}
(cluster.getLane()));
1,288,381
protected void configure() {<NEW_LINE>bind(Config.class).toInstance(config);<NEW_LINE>bind(BridgeAddressProvider.class).to(Preferences.class);<NEW_LINE>bind(SeedNodeRepository.class).to(DefaultSeedNodeRepository.class);<NEW_LINE>bind(NetworkFilter.class).to(CoreNetworkFilter.class).in(Singleton.class);<NEW_LINE>bind(File.class).annotatedWith(named(STORAGE_DIR)).toInstance(config.storageDir);<NEW_LINE>CoinFormatter btcFormatter = new ImmutableCoinFormatter(config.networkParameters.getMonetaryFormat());<NEW_LINE>bind(CoinFormatter.class).annotatedWith(named(FormattingUtils.BTC_FORMATTER_KEY)).toInstance(btcFormatter);<NEW_LINE>bind(File.class).annotatedWith(named(KEY_STORAGE_DIR)).toInstance(config.keyStorageDir);<NEW_LINE>bind(NetworkProtoResolver.class).to(CoreNetworkProtoResolver.class);<NEW_LINE>bind(PersistenceProtoResolver.class).to(CorePersistenceProtoResolver.class);<NEW_LINE>bindConstant().annotatedWith(named(USE_DEV_PRIVILEGE_KEYS)).to(config.useDevPrivilegeKeys);<NEW_LINE>bindConstant().annotatedWith(named(USE_DEV_MODE)<MASK><NEW_LINE>bindConstant().annotatedWith(named(USE_DEV_MODE_HEADER)).to(config.useDevModeHeader);<NEW_LINE>bindConstant().annotatedWith(named(REFERRAL_ID)).to(config.referralId);<NEW_LINE>// ordering is used for shut down sequence<NEW_LINE>install(new TradeModule(config));<NEW_LINE>install(new EncryptionServiceModule(config));<NEW_LINE>install(new OfferModule(config));<NEW_LINE>install(new P2PModule(config));<NEW_LINE>install(new BitcoinModule(config));<NEW_LINE>install(new DaoModule(config));<NEW_LINE>install(new AlertModule(config));<NEW_LINE>install(new FilterModule(config));<NEW_LINE>install(new CorePresentationModule(config));<NEW_LINE>bind(PubKeyRing.class).toProvider(PubKeyRingProvider.class);<NEW_LINE>}
).to(config.useDevMode);
802,853
public static BlockEncodingBuffer createBlockEncodingBuffers(DecodedBlockNode decodedBlockNode, ArrayAllocator bufferAllocator, boolean isNested) {<NEW_LINE>requireNonNull(decodedBlockNode, "decodedBlockNode is null");<NEW_LINE>requireNonNull(bufferAllocator, "bufferAllocator is null");<NEW_LINE>// decodedBlock could be a block or ColumnarArray/Map/Row<NEW_LINE>Object decodedBlock = decodedBlockNode.getDecodedBlock();<NEW_LINE>// Skip the Dictionary/RLE block node. The mapping info is not needed when creating buffers.<NEW_LINE>// This is because the AbstractBlockEncodingBuffer is only created once, while position mapping for Dictionary/RLE blocks<NEW_LINE>// need to be done for every incoming block.<NEW_LINE>if (decodedBlock instanceof DictionaryBlock) {<NEW_LINE>decodedBlockNode = decodedBlockNode.getChildren().get(0);<NEW_LINE>decodedBlock = decodedBlockNode.getDecodedBlock();<NEW_LINE>} else if (decodedBlock instanceof RunLengthEncodedBlock) {<NEW_LINE>decodedBlockNode = decodedBlockNode.getChildren().get(0);<NEW_LINE>decodedBlock = decodedBlockNode.getDecodedBlock();<NEW_LINE>}<NEW_LINE>verify(!(decodedBlock instanceof DictionaryBlock), "Nested RLEs and dictionaries are not supported");<NEW_LINE>verify(!(decodedBlock instanceof RunLengthEncodedBlock), "Nested RLEs and dictionaries are not supported");<NEW_LINE>if (decodedBlock instanceof LongArrayBlock) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (decodedBlock instanceof Int128ArrayBlock) {<NEW_LINE>return new Int128ArrayBlockEncodingBuffer(bufferAllocator, isNested);<NEW_LINE>}<NEW_LINE>if (decodedBlock instanceof IntArrayBlock) {<NEW_LINE>return new IntArrayBlockEncodingBuffer(bufferAllocator, isNested);<NEW_LINE>}<NEW_LINE>if (decodedBlock instanceof ShortArrayBlock) {<NEW_LINE>return new ShortArrayBlockEncodingBuffer(bufferAllocator, isNested);<NEW_LINE>}<NEW_LINE>if (decodedBlock instanceof ByteArrayBlock) {<NEW_LINE>return new ByteArrayBlockEncodingBuffer(bufferAllocator, isNested);<NEW_LINE>}<NEW_LINE>if (decodedBlock instanceof VariableWidthBlock) {<NEW_LINE>return new VariableWidthBlockEncodingBuffer(bufferAllocator, isNested);<NEW_LINE>}<NEW_LINE>if (decodedBlock instanceof ColumnarArray) {<NEW_LINE>return new ArrayBlockEncodingBuffer(decodedBlockNode, bufferAllocator, isNested);<NEW_LINE>}<NEW_LINE>if (decodedBlock instanceof ColumnarMap) {<NEW_LINE>return new MapBlockEncodingBuffer(decodedBlockNode, bufferAllocator, isNested);<NEW_LINE>}<NEW_LINE>if (decodedBlock instanceof ColumnarRow) {<NEW_LINE>return new RowBlockEncodingBuffer(decodedBlockNode, bufferAllocator, isNested);<NEW_LINE>}<NEW_LINE>throw new IllegalArgumentException("Unsupported encoding: " + decodedBlock.getClass().getSimpleName());<NEW_LINE>}
return new LongArrayBlockEncodingBuffer(bufferAllocator, isNested);
1,791,341
static Map<TargetExpression, List<TargetExpression>> expandPackageTargets(BuildSystemProvider provider, BlazeContext context, WorkspacePathResolver pathResolver, Collection<WildcardTargetPattern> wildcardPatterns) {<NEW_LINE>List<ListenableFuture<Entry<TargetExpression, List<TargetExpression>>>> futures = Lists.newArrayList();<NEW_LINE>for (WildcardTargetPattern pattern : wildcardPatterns) {<NEW_LINE>if (!pattern.isRecursive() || pattern.toString().startsWith("-")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>File dir = pathResolver.resolveToFile(pattern.getBasePackage());<NEW_LINE>if (!FileOperationProvider.getInstance().isDirectory(dir)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>futures.add(FetchExecutor.EXECUTOR.submit(() -> {<NEW_LINE>List<TargetExpression> expandedTargets = new ArrayList<>();<NEW_LINE>traversePackageRecursively(provider, pathResolver, dir, expandedTargets);<NEW_LINE>return Maps.<MASK><NEW_LINE>}));<NEW_LINE>}<NEW_LINE>if (futures.isEmpty()) {<NEW_LINE>return ImmutableMap.of();<NEW_LINE>}<NEW_LINE>FutureResult<List<Entry<TargetExpression, List<TargetExpression>>>> result = FutureUtil.waitForFuture(context, Futures.allAsList(futures)).withProgressMessage("Expanding wildcard target patterns...").timed("ExpandWildcardTargets", EventType.Other).onError("Expanding wildcard target patterns failed").run();<NEW_LINE>if (!result.success()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return result.result().stream().collect(Collectors.toMap(Entry::getKey, Entry::getValue, (x, y) -> x));<NEW_LINE>}
immutableEntry(pattern.originalPattern, expandedTargets);
1,059,968
protected void initAttrs(float density) {<NEW_LINE>super.initAttrs(density);<NEW_LINE>attrsPT = new RenderingLineAttributes("publicTransportLine");<NEW_LINE>attrsPT.defaultWidth = (int) (12 * density);<NEW_LINE>attrsPT.defaultWidth3 = (int) (7 * density);<NEW_LINE>attrsPT.defaultColor = ContextCompat.getColor(view.getContext(), R.color.nav_track);<NEW_LINE>attrsPT.paint3.setStrokeCap(Cap.BUTT);<NEW_LINE>attrsPT.paint3.setColor(Color.WHITE);<NEW_LINE>attrsPT.paint2.setStrokeCap(Cap.BUTT);<NEW_LINE>attrsPT.paint2.setColor(Color.BLACK);<NEW_LINE>attrsW = new RenderingLineAttributes("walkingRouteLine");<NEW_LINE>attrsW.defaultWidth = (int) (12 * density);<NEW_LINE>attrsW.defaultWidth3 = (int) (7 * density);<NEW_LINE>attrsW.defaultColor = ContextCompat.getColor(view.getContext(), R.color.nav_track_walk_fill);<NEW_LINE>attrsW.paint3.setStrokeCap(Cap.BUTT);<NEW_LINE>attrsW.<MASK><NEW_LINE>attrsW.paint2.setStrokeCap(Cap.BUTT);<NEW_LINE>attrsW.paint2.setColor(Color.BLACK);<NEW_LINE>}
paint3.setColor(Color.WHITE);
14,166
private void checkAdd(Var var, Node node, boolean parentOnly) {<NEW_LINE>if (!CHECKING)<NEW_LINE>return;<NEW_LINE>if (var == null)<NEW_LINE>throw new NullPointerException("check(" + var + ", " + node + "): null var");<NEW_LINE>if (node == null)<NEW_LINE>throw new NullPointerException("check(" + var + ", " + node + "): null node value");<NEW_LINE>if (parent != null && UNIQUE_NAMES_CHECK_PARENT && parent.contains(var)) {<NEW_LINE>throw new IllegalArgumentException("Attempt to reassign parent variable '" + var + "' from '" + FmtUtils.stringForNode(parent.get(var)) + "' to '" + FmtUtils.stringForNode(node) + "'");<NEW_LINE>}<NEW_LINE>if (parentOnly)<NEW_LINE>return;<NEW_LINE>if (UNIQUE_NAMES_CHECK && contains1(var))<NEW_LINE>throw new IllegalArgumentException("Attempt to reassign '" + var + "' from '" + FmtUtils.stringForNode(get(var)) + "' to '" + FmtUtils<MASK><NEW_LINE>}
.stringForNode(node) + "'");
797,304
void update_route(Business business, List<WrapRoute> wraps, Process process) throws Exception {<NEW_LINE>List<String> ids = business.route().listWithProcess(process.getId());<NEW_LINE>List<Route> os = business.entityManagerContainer().list(Route.class, ids);<NEW_LINE>for (Route o : os) {<NEW_LINE>if (null == jpaInWrapList(o, wraps)) {<NEW_LINE>business.entityManagerContainer().remove(o);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (null != wraps) {<NEW_LINE>for (WrapRoute w : wraps) {<NEW_LINE>Route o = wrapInJpaList(w, os);<NEW_LINE>if (null == o) {<NEW_LINE>o = new Route();<NEW_LINE>o.<MASK><NEW_LINE>WrapRoute.inCopier.copy(w, o);<NEW_LINE>o.setDistributeFactor(process.getDistributeFactor());<NEW_LINE>business.entityManagerContainer().persist(o, CheckPersistType.all);<NEW_LINE>} else {<NEW_LINE>WrapRoute.inCopier.copy(w, o);<NEW_LINE>business.entityManagerContainer().check(o, CheckPersistType.all);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setProcess(process.getId());
161,649
protected void initModel() {<NEW_LINE>PageManager pageManager = resource.getResourceResolver().adaptTo(PageManager.class);<NEW_LINE>if (pageManager == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Page page = pageManager.getContainingPage(resource);<NEW_LINE>while (page != null) {<NEW_LINE><MASK><NEW_LINE>if (contentResource != null) {<NEW_LINE>ValueMap valueMap = contentResource.getValueMap();<NEW_LINE>Boolean isPWAEnabled = valueMap.get(PN_PWA_ENABLED, Boolean.class);<NEW_LINE>if (isPWAEnabled != null && isPWAEnabled) {<NEW_LINE>this.isEnabled = true;<NEW_LINE>this.themeColor = colorToHex(valueMap.get(PN_PWA_THEME_COLOR, ""));<NEW_LINE>this.iconPath = valueMap.get(PN_PWA_ICON_PATH, "");<NEW_LINE>String startURL = valueMap.get(PN_PWA_START_URL, "");<NEW_LINE>this.manifestPath = replaceSuffix(startURL, MANIFEST_NAME);<NEW_LINE>String mappingName = page.getPath().replace(CONTENT_PATH, "").replace("/", ".");<NEW_LINE>this.serviceWorkerPath = "/" + mappingName + "sw.js";<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>page = page.getParent();<NEW_LINE>}<NEW_LINE>}
Resource contentResource = page.getContentResource();
1,017,544
default void dispatchResized(Rect frame) {<NEW_LINE>Rect emptyRect = new Rect(0, 0, 0, 0);<NEW_LINE>int apiLevel = RuntimeEnvironment.getApiLevel();<NEW_LINE>if (apiLevel <= Build.VERSION_CODES.JELLY_BEAN) {<NEW_LINE>dispatchResized(frame.width(), frame.height(), emptyRect, emptyRect, true, null);<NEW_LINE>} else if (apiLevel <= VERSION_CODES.JELLY_BEAN_MR1) {<NEW_LINE>dispatchResized(frame, emptyRect, emptyRect, true, null);<NEW_LINE>} else if (apiLevel <= Build.VERSION_CODES.KITKAT) {<NEW_LINE>dispatchResized(frame, emptyRect, emptyRect, emptyRect, true, null);<NEW_LINE>} else if (apiLevel <= Build.VERSION_CODES.LOLLIPOP_MR1) {<NEW_LINE>dispatchResized(frame, emptyRect, emptyRect, emptyRect, emptyRect, true, null);<NEW_LINE>} else if (apiLevel <= Build.VERSION_CODES.M) {<NEW_LINE>dispatchResized(frame, emptyRect, emptyRect, emptyRect, emptyRect, emptyRect, true, null);<NEW_LINE>} else if (apiLevel <= Build.VERSION_CODES.N_MR1) {<NEW_LINE>dispatchResized(frame, emptyRect, emptyRect, emptyRect, emptyRect, emptyRect, true, null, frame, false, false);<NEW_LINE>} else if (apiLevel <= Build.VERSION_CODES.O_MR1) {<NEW_LINE>dispatchResized(frame, emptyRect, emptyRect, emptyRect, emptyRect, emptyRect, true, new MergedConfiguration(), frame, false, false, 0);<NEW_LINE>} else {<NEW_LINE>// apiLevel >= Build.VERSION_CODES.P<NEW_LINE>dispatchResized(frame, emptyRect, emptyRect, emptyRect, emptyRect, emptyRect, true, new MergedConfiguration(), frame, false, false, 0, new android.<MASK><NEW_LINE>}<NEW_LINE>}
view.DisplayCutout.ParcelableWrapper());
1,742,497
public void displayRequest(RequestContainer request) {<NEW_LINE>if (!(request instanceof RestRequestContainer))<NEW_LINE>throw new IllegalArgumentException("Other request types not yet supported");<NEW_LINE>RestRequestContainer restRequest = (RestRequestContainer) request;<NEW_LINE>urlBinding.bindTo(requestUrl.textProperty(), restRequest);<NEW_LINE>httpMethodBinding.bindTo(httpMethod.valueProperty(), restRequest);<NEW_LINE>urlBinding.addListener(s -> request.setDirty(true));<NEW_LINE>httpMethodBinding.addListener(s -> request.setDirty(true));<NEW_LINE>// bind to param tab:<NEW_LINE>request.onInvalidate.clear();<NEW_LINE>// contract with query-param tab<NEW_LINE>request.onInvalidate.add(() -> requestUrl.setText(restRequest.getUrl()));<NEW_LINE>request.getAspect(RestQueryParamAspect.class).ifPresent(a -> {<NEW_LINE>a.<MASK><NEW_LINE>a.linkToUrlTextfield(requestUrl.textProperty());<NEW_LINE>});<NEW_LINE>completer.attachVariableCompletionTo(requestUrl);<NEW_LINE>}
parseQueryParams(requestUrl.getText());
1,774,385
public int send(final MarsTaskWrapper taskWrapper, Bundle taskProperties) throws RemoteException {<NEW_LINE>final StnLogic.Task _task = new StnLogic.Task(StnLogic.Task.EShort, 0, "", null);<NEW_LINE>// Set host & cgi path<NEW_LINE>final String host = taskProperties.getString(MarsTaskProperty.OPTIONS_HOST);<NEW_LINE>final String cgiPath = taskProperties.getString(MarsTaskProperty.OPTIONS_CGI_PATH);<NEW_LINE>_task.shortLinkHostList = new ArrayList<>();<NEW_LINE>_task.shortLinkHostList.add(host);<NEW_LINE>_task.cgi = cgiPath;<NEW_LINE>final boolean shortSupport = taskProperties.<MASK><NEW_LINE>final boolean longSupport = taskProperties.getBoolean(MarsTaskProperty.OPTIONS_CHANNEL_LONG_SUPPORT, false);<NEW_LINE>if (shortSupport && longSupport) {<NEW_LINE>_task.channelSelect = StnLogic.Task.EBoth;<NEW_LINE>} else if (shortSupport) {<NEW_LINE>_task.channelSelect = StnLogic.Task.EShort;<NEW_LINE>} else if (longSupport) {<NEW_LINE>_task.channelSelect = StnLogic.Task.ELong;<NEW_LINE>} else {<NEW_LINE>Log.e(TAG, "invalid channel strategy");<NEW_LINE>throw new RemoteException("Invalid Channel Strategy");<NEW_LINE>}<NEW_LINE>// Set cmdID if necessary<NEW_LINE>int cmdID = taskProperties.getInt(MarsTaskProperty.OPTIONS_CMD_ID, -1);<NEW_LINE>if (cmdID != -1) {<NEW_LINE>_task.cmdID = cmdID;<NEW_LINE>}<NEW_LINE>TASK_ID_TO_WRAPPER.put(_task.taskID, taskWrapper);<NEW_LINE>// Send<NEW_LINE>Log.i(TAG, "now start task with id %d", _task.taskID);<NEW_LINE>StnLogic.startTask(_task);<NEW_LINE>if (StnLogic.hasTask(_task.taskID)) {<NEW_LINE>Log.i(TAG, "stn task started with id %d", _task.taskID);<NEW_LINE>} else {<NEW_LINE>Log.e(TAG, "stn task start failed with id %d", _task.taskID);<NEW_LINE>}<NEW_LINE>return _task.taskID;<NEW_LINE>}
getBoolean(MarsTaskProperty.OPTIONS_CHANNEL_SHORT_SUPPORT, true);
380,558
synchronized void keepAlive() {<NEW_LINE>if (!ftpClient.isConnected()) {<NEW_LINE>LOGGER.log(Level.FINE, "Ending keep-alive (NOOP) for {0}, not connected", configuration.getHost());<NEW_LINE>keepAliveTask.cancel();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>LOGGER.log(Level.FINE, "Keep-alive (NOOP) for {0}", configuration.getHost());<NEW_LINE>ftpClient.noop();<NEW_LINE>ftpClient.getReplyString();<NEW_LINE>preventNoOperationTimeout();<NEW_LINE>scheduleKeepAlive();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>LOGGER.log(Level.FINE, "Keep-alive (NOOP/PWD) error for " + configuration.getHost(), ex);<NEW_LINE>keepAliveTask.cancel();<NEW_LINE>silentDisconnect(true);<NEW_LINE>WindowsJdk7WarningPanel.warn();<NEW_LINE>// #209043 - just inform user in the log, do not show any dialog<NEW_LINE>if (io != null) {<NEW_LINE>String message;<NEW_LINE>String reason = getReplyString();<NEW_LINE>if (StringUtils.hasText(reason)) {<NEW_LINE>message = NbBundle.getMessage(FtpClient.class, "MSG_FtpCannotKeepAlive", configuration.getHost(), reason);<NEW_LINE>} else {<NEW_LINE>message = NbBundle.getMessage(FtpClient.class, "MSG_FtpCannotKeepAliveNoReason", configuration.getHost());<NEW_LINE>}<NEW_LINE>io.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getErr().println(message);
380,653
public ClusterState execute(ClusterState currentState) {<NEW_LINE>final SnapshotDeletionsInProgress deletionsInProgress = currentState.custom(SnapshotDeletionsInProgress.TYPE, SnapshotDeletionsInProgress.EMPTY);<NEW_LINE>boolean changed = false;<NEW_LINE>final List<SnapshotDeletionsInProgress.Entry> remainingEntries = deletionsInProgress.getEntries();<NEW_LINE>List<SnapshotDeletionsInProgress.Entry> updatedEntries = new ArrayList<<MASK><NEW_LINE>for (SnapshotDeletionsInProgress.Entry entry : remainingEntries) {<NEW_LINE>if (entry.repository().equals(repository)) {<NEW_LINE>changed = true;<NEW_LINE>deletionsToFail.add(entry.uuid());<NEW_LINE>} else {<NEW_LINE>updatedEntries.add(entry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final SnapshotDeletionsInProgress updatedDeletions = changed ? SnapshotDeletionsInProgress.of(updatedEntries) : null;<NEW_LINE>final SnapshotsInProgress snapshotsInProgress = currentState.custom(SnapshotsInProgress.TYPE, SnapshotsInProgress.EMPTY);<NEW_LINE>final List<SnapshotsInProgress.Entry> snapshotEntries = new ArrayList<>();<NEW_LINE>boolean changedSnapshots = false;<NEW_LINE>for (SnapshotsInProgress.Entry entry : snapshotsInProgress.entries()) {<NEW_LINE>if (entry.repository().equals(repository)) {<NEW_LINE>// We failed to read repository data for this delete, it is not the job of SnapshotsService to<NEW_LINE>// retry these kinds of issues so we fail all the pending snapshots<NEW_LINE>snapshotsToFail.add(entry.snapshot());<NEW_LINE>changedSnapshots = true;<NEW_LINE>} else {<NEW_LINE>// Entry is for another repository we just keep it as is<NEW_LINE>snapshotEntries.add(entry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final SnapshotsInProgress updatedSnapshotsInProgress = changedSnapshots ? SnapshotsInProgress.of(snapshotEntries) : null;<NEW_LINE>return updateWithSnapshots(currentState, updatedSnapshotsInProgress, updatedDeletions);<NEW_LINE>}
>(remainingEntries.size());
907,740
public static QueryMetrics createFromDelimitedStringAndClientSideMetrics(String delimitedString, ClientSideMetrics clientSideMetrics, String activityId, String indexUtilizationInfoJSONString) {<NEW_LINE>HashMap<String, Double> metrics = QueryMetricsUtils.parseDelimitedString(delimitedString);<NEW_LINE>double indexHitRatio;<NEW_LINE>double retrievedDocumentCount;<NEW_LINE>indexHitRatio = metrics.get(QueryMetricsConstants.IndexHitRatio);<NEW_LINE>retrievedDocumentCount = metrics.get(QueryMetricsConstants.RetrievedDocumentCount);<NEW_LINE>long indexHitCount = (long) (indexHitRatio * retrievedDocumentCount);<NEW_LINE>double outputDocumentCount = metrics.get(QueryMetricsConstants.OutputDocumentCount);<NEW_LINE>double outputDocumentSize = metrics.get(QueryMetricsConstants.OutputDocumentSize);<NEW_LINE>double retrievedDocumentSize = metrics.get(QueryMetricsConstants.RetrievedDocumentSize);<NEW_LINE>Duration totalQueryExecutionTime = QueryMetricsUtils.getDurationFromMetrics(metrics, QueryMetricsConstants.TotalQueryExecutionTimeInMs);<NEW_LINE>IndexUtilizationInfo indexUtilizationInfo = null;<NEW_LINE>if (indexUtilizationInfoJSONString != null) {<NEW_LINE>indexUtilizationInfo = IndexUtilizationInfo.createFromJSONString(Utils.decodeBase64String(indexUtilizationInfoJSONString));<NEW_LINE>}<NEW_LINE>List<String> <MASK><NEW_LINE>activities.add(activityId);<NEW_LINE>return new QueryMetrics(activities, (long) retrievedDocumentCount, (long) retrievedDocumentSize, (long) outputDocumentCount, (long) outputDocumentSize, indexHitCount, totalQueryExecutionTime, QueryPreparationTimes.createFromDelimitedString(delimitedString), QueryMetricsUtils.getDurationFromMetrics(metrics, QueryMetricsConstants.IndexLookupTimeInMs), QueryMetricsUtils.getDurationFromMetrics(metrics, QueryMetricsConstants.DocumentLoadTimeInMs), QueryMetricsUtils.getDurationFromMetrics(metrics, QueryMetricsConstants.VMExecutionTimeInMs), RuntimeExecutionTimes.createFromDelimitedString(delimitedString), QueryMetricsUtils.getDurationFromMetrics(metrics, QueryMetricsConstants.DocumentWriteTimeInMs), clientSideMetrics, indexUtilizationInfo);<NEW_LINE>}
activities = new ArrayList<>();
283,653
// delete.<NEW_LINE>@PUT<NEW_LINE>@Path("/delete")<NEW_LINE>@Produces("application/json")<NEW_LINE>public Response delete(@Context HttpServletRequest httpServletRequest, @Context final HttpServletResponse httpServletResponse, final DeleteForm deleteForm) {<NEW_LINE>final InitDataObject initData = new WebResource.InitBuilder(webResource).requiredBackendUser(true).requiredFrontendUser(false).requestAndResponse(httpServletRequest, httpServletResponse).rejectWhenNoUser(true).init();<NEW_LINE>Response response;<NEW_LINE>User user;<NEW_LINE>try {<NEW_LINE>user = initData.getUser();<NEW_LINE>if (null != deleteForm.getItems() && null != user) {<NEW_LINE>this.notificationAPI.deleteNotifications(user.getUserId(), deleteForm.getItems().toArray(new String[] {}));<NEW_LINE>}<NEW_LINE>response = // 200<NEW_LINE>Response.ok(new ResponseEntityView(Boolean.TRUE, list(new MessageEntity(LanguageUtil.get(user.getLocale(), "notifications.success.delete", deleteForm.getItems())<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>// this is an unknown error, so we report as a 500.<NEW_LINE>response = ExceptionMapperUtil.createResponse(e, Response.Status.INTERNAL_SERVER_ERROR);<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
)))).build();
166,056
private JavacNode generateBuilderAbstractClass(SuperBuilderJob job, JCExpression superclassBuilderClass, List<JCExpression> superclassTypeParams, String classGenericName, String builderGenericName) {<NEW_LINE>JavacTreeMaker maker = job.parentType.getTreeMaker();<NEW_LINE>JCModifiers mods = maker.Modifiers(Flags.STATIC | Flags.ABSTRACT | Flags.PUBLIC);<NEW_LINE>// Keep any type params of the annotated class.<NEW_LINE>ListBuffer<JCTypeParameter> allTypeParams = new ListBuffer<JCTypeParameter>();<NEW_LINE>allTypeParams.appendList(copyTypeParams(job.sourceNode, job.typeParams));<NEW_LINE>// Add builder-specific type params required for inheritable builders.<NEW_LINE>// 1. The return type for the build() method, named "C", which extends the annotated class.<NEW_LINE>JCExpression annotatedClass = namePlusTypeParamsToTypeReference(maker, job.parentType, job.typeParams);<NEW_LINE>allTypeParams.append(maker.TypeParameter(job.toName(classGenericName), List.<JCExpression>of(annotatedClass)));<NEW_LINE>// 2. The return type for all setter methods, named "B", which extends this builder class.<NEW_LINE>Name builderClassName = job.toName(job.builderClassName);<NEW_LINE>ListBuffer<JCExpression> typeParamsForBuilder = getTypeParamExpressions(job.typeParams, maker, job.sourceNode);<NEW_LINE>typeParamsForBuilder.append(maker.Ident(<MASK><NEW_LINE>typeParamsForBuilder.append(maker.Ident(job.toName(builderGenericName)));<NEW_LINE>JCTypeApply typeApply = maker.TypeApply(namePlusTypeParamsToTypeReference(maker, job.parentType, builderClassName, false, List.<JCTypeParameter>nil()), typeParamsForBuilder.toList());<NEW_LINE>allTypeParams.append(maker.TypeParameter(job.toName(builderGenericName), List.<JCExpression>of(typeApply)));<NEW_LINE>JCExpression extending = null;<NEW_LINE>if (superclassBuilderClass != null) {<NEW_LINE>// If the annotated class extends another class, we want this builder to extend the builder of the superclass.<NEW_LINE>// 1. Add the type parameters of the superclass.<NEW_LINE>typeParamsForBuilder = getTypeParamExpressions(superclassTypeParams, maker, job.sourceNode);<NEW_LINE>// 2. Add the builder type params <C, B>.<NEW_LINE>typeParamsForBuilder.append(maker.Ident(job.toName(classGenericName)));<NEW_LINE>typeParamsForBuilder.append(maker.Ident(job.toName(builderGenericName)));<NEW_LINE>extending = maker.TypeApply(superclassBuilderClass, typeParamsForBuilder.toList());<NEW_LINE>}<NEW_LINE>JCClassDecl builder = maker.ClassDef(mods, builderClassName, allTypeParams.toList(), extending, List.<JCExpression>nil(), List.<JCTree>nil());<NEW_LINE>recursiveSetGeneratedBy(builder, job.sourceNode);<NEW_LINE>return injectType(job.parentType, builder);<NEW_LINE>}
job.toName(classGenericName)));
1,199,884
private static JWSHeader convert(JwsHeader headers) {<NEW_LINE>JWSHeader.Builder builder = new JWSHeader.Builder(JWSAlgorithm.parse(headers.getAlgorithm().getName()));<NEW_LINE>if (headers.getJwkSetUrl() != null) {<NEW_LINE>builder.jwkURL(convertAsURI(JoseHeaderNames.JKU, headers.getJwkSetUrl()));<NEW_LINE>}<NEW_LINE>Map<String, Object> jwk = headers.getJwk();<NEW_LINE>if (!CollectionUtils.isEmpty(jwk)) {<NEW_LINE>try {<NEW_LINE>builder.jwk(JWK.parse(jwk));<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new JwtEncodingException(String.format(ENCODING_ERROR_MESSAGE_TEMPLATE, "Unable to convert '" + JoseHeaderNames.JWK + "' JOSE header"), ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String keyId = headers.getKeyId();<NEW_LINE>if (StringUtils.hasText(keyId)) {<NEW_LINE>builder.keyID(keyId);<NEW_LINE>}<NEW_LINE>if (headers.getX509Url() != null) {<NEW_LINE>builder.x509CertURL(convertAsURI(JoseHeaderNames.X5U, headers.getX509Url()));<NEW_LINE>}<NEW_LINE>List<String> x509CertificateChain = headers.getX509CertificateChain();<NEW_LINE>if (!CollectionUtils.isEmpty(x509CertificateChain)) {<NEW_LINE>List<Base64> x5cList = new ArrayList<>();<NEW_LINE>x509CertificateChain.forEach((x5c) -> x5cList.add(new Base64(x5c)));<NEW_LINE>if (!x5cList.isEmpty()) {<NEW_LINE>builder.x509CertChain(x5cList);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String x509SHA1Thumbprint = headers.getX509SHA1Thumbprint();<NEW_LINE>if (StringUtils.hasText(x509SHA1Thumbprint)) {<NEW_LINE>builder.x509CertThumbprint(new Base64URL(x509SHA1Thumbprint));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (StringUtils.hasText(x509SHA256Thumbprint)) {<NEW_LINE>builder.x509CertSHA256Thumbprint(new Base64URL(x509SHA256Thumbprint));<NEW_LINE>}<NEW_LINE>String type = headers.getType();<NEW_LINE>if (StringUtils.hasText(type)) {<NEW_LINE>builder.type(new JOSEObjectType(type));<NEW_LINE>}<NEW_LINE>String contentType = headers.getContentType();<NEW_LINE>if (StringUtils.hasText(contentType)) {<NEW_LINE>builder.contentType(contentType);<NEW_LINE>}<NEW_LINE>Set<String> critical = headers.getCritical();<NEW_LINE>if (!CollectionUtils.isEmpty(critical)) {<NEW_LINE>builder.criticalParams(critical);<NEW_LINE>}<NEW_LINE>Map<String, Object> customHeaders = new HashMap<>();<NEW_LINE>headers.getHeaders().forEach((name, value) -> {<NEW_LINE>if (!JWSHeader.getRegisteredParameterNames().contains(name)) {<NEW_LINE>customHeaders.put(name, value);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (!customHeaders.isEmpty()) {<NEW_LINE>builder.customParams(customHeaders);<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
String x509SHA256Thumbprint = headers.getX509SHA256Thumbprint();
635,336
static List<CommentAnnotation> parse(String comment) {<NEW_LINE>// TODO(b/139159612): This is reinventing a large part of JSDocInfoParser. We should<NEW_LINE>// try to consolidate as much as possible. This requires several steps:<NEW_LINE>// 1. Make all the annotations we look for first-class in JSDocInfo<NEW_LINE>// 2. Support custom annotations (may already be done?)<NEW_LINE>// 3. Fix up existing code so that all these annotations are in @fileoverview<NEW_LINE>// 4. Change this code to simply inspect the script's JSDocInfo instead of re-parsing<NEW_LINE>List<CommentAnnotation> out = new ArrayList<>();<NEW_LINE>Matcher matcher = ANNOTATION_RE.matcher(comment);<NEW_LINE>while (matcher.find()) {<NEW_LINE>String <MASK><NEW_LINE>String value = Strings.nullToEmpty(matcher.group(ANNOTATION_VALUE_GROUP));<NEW_LINE>out.add(new CommentAnnotation(name, value));<NEW_LINE>}<NEW_LINE>return out;<NEW_LINE>}
name = matcher.group(ANNOTATION_NAME_GROUP);
1,322,606
public void testCreateAndCancelBeforeExpiration() {<NEW_LINE>try {<NEW_LINE>svExpiredTimerInfos.clear();<NEW_LINE>// start user tran so that the create and cancel are in the same tx<NEW_LINE>UserTransaction ut = null;<NEW_LINE>try {<NEW_LINE>ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");<NEW_LINE>} catch (NamingException ex) {<NEW_LINE>String msg = "NamingException caught while looking up java:comp/UserTransaction";<NEW_LINE>svLogger.logp(Level.SEVERE, CLASSNAME, "testCreateAndCancelBeforeExpiration", msg, ex);<NEW_LINE>fail(msg + " - " + ex);<NEW_LINE>}<NEW_LINE>ut.begin();<NEW_LINE>ivBean.executeTest(TstName.TEST_CREATE_TIMER);<NEW_LINE>Collection<String> infos = ivBean.getInfoOfAllTimers();<NEW_LINE>assertEquals("Unexpected number of timers", 1, infos.size());<NEW_LINE>assertTrue("Did not contain expected timer info", infos.contains(DEFAULT_INFO));<NEW_LINE>ivBean.executeTest(TstName.TEST_CANCEL_TIMER);<NEW_LINE>ut.commit();<NEW_LINE>infos = ivBean.getInfoOfAllTimers();<NEW_LINE>assertEquals("Unexpected number of timers", 0, infos.size());<NEW_LINE>assertEquals("Unexpected timer expiration : " + svExpiredTimerInfos, 0, svExpiredTimerInfos.size());<NEW_LINE>FATHelper.sleep(<MASK><NEW_LINE>assertEquals("Timeout method invoked after being canceled : " + svExpiredTimerInfos, 0, svExpiredTimerInfos.size());<NEW_LINE>} catch (Throwable t) {<NEW_LINE>FATHelper.checkForAssertion(t);<NEW_LINE>String msg = "Caught unexpected exception in testCreateAndCancelBeforeExpiration";<NEW_LINE>svLogger.logp(Level.SEVERE, CLASSNAME, "testCreateAndCancelBeforeExpiration", msg, t);<NEW_LINE>fail(msg + t);<NEW_LINE>}<NEW_LINE>}
AnnotationTxLocal.DURATION + AnnotationTxLocal.BUFFER);
467,795
public static ClientMessage encodeRequest(java.lang.String name, java.util.UUID txnId, long threadId, com.hazelcast.internal.serialization.Data key) {<NEW_LINE>ClientMessage clientMessage = ClientMessage.createForEncode();<NEW_LINE>clientMessage.setRetryable(false);<NEW_LINE>clientMessage.setOperationName("TransactionalMap.Get");<NEW_LINE>ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[REQUEST_INITIAL_FRAME_SIZE], UNFRAGMENTED_MESSAGE);<NEW_LINE>encodeInt(initialFrame.content, TYPE_FIELD_OFFSET, REQUEST_MESSAGE_TYPE);<NEW_LINE>encodeInt(initialFrame.content, PARTITION_ID_FIELD_OFFSET, -1);<NEW_LINE>encodeUUID(<MASK><NEW_LINE>encodeLong(initialFrame.content, REQUEST_THREAD_ID_FIELD_OFFSET, threadId);<NEW_LINE>clientMessage.add(initialFrame);<NEW_LINE>StringCodec.encode(clientMessage, name);<NEW_LINE>DataCodec.encode(clientMessage, key);<NEW_LINE>return clientMessage;<NEW_LINE>}
initialFrame.content, REQUEST_TXN_ID_FIELD_OFFSET, txnId);
519,030
// Reads the prstatus structure.<NEW_LINE>private IOSThread readThread(DataEntry entry) throws IOException {<NEW_LINE>_reader.seek(entry.offset);<NEW_LINE>// signalNumber<NEW_LINE>_signalNumber = _reader.readInt();<NEW_LINE>// Ignore code<NEW_LINE>_reader.readInt();<NEW_LINE>// Ignore errno<NEW_LINE>_reader.readInt();<NEW_LINE>// Ignore cursig<NEW_LINE>_reader.readShort();<NEW_LINE>// Ignore dummy<NEW_LINE>_reader.readShort();<NEW_LINE>// Ignore pending<NEW_LINE>_reader.readElfWord();<NEW_LINE>// Ignore blocked<NEW_LINE>_reader.readElfWord();<NEW_LINE>long pid = _reader.readInt() & 0xffffffffL;<NEW_LINE>// Ignore ppid<NEW_LINE>_reader.readInt();<NEW_LINE>// Ignore pgroup<NEW_LINE>_reader.readInt();<NEW_LINE>// Ignore session<NEW_LINE>_reader.readInt();<NEW_LINE>// utime_sec<NEW_LINE>long utimeSec = _reader.readElfWord();<NEW_LINE>// utime_usec<NEW_LINE>long utimeUSec = _reader.readElfWord();<NEW_LINE>// stime_sec<NEW_LINE>long stimeSec = _reader.readElfWord();<NEW_LINE>// stime_usec<NEW_LINE>long stimeUSec = _reader.readElfWord();<NEW_LINE>// Ignore cutime_sec<NEW_LINE>_reader.readElfWord();<NEW_LINE>// Ignore cutime_usec<NEW_LINE>_reader.readElfWord();<NEW_LINE>// Ignore cstime_sec<NEW_LINE>_reader.readElfWord();<NEW_LINE>// Ignore cstime_usec<NEW_LINE>_reader.readElfWord();<NEW_LINE>// Registers are in a elf_gregset_t (which is defined per platform).<NEW_LINE>Map<String, Number> registers = readRegisters();<NEW_LINE>Properties properties = new Properties();<NEW_LINE>properties.setProperty("Thread user time secs", Long.toString(utimeSec));<NEW_LINE>properties.setProperty("Thread user time usecs", Long.toString(utimeUSec));<NEW_LINE>properties.setProperty("Thread sys time secs"<MASK><NEW_LINE>properties.setProperty("Thread sys time usecs", Long.toString(stimeUSec));<NEW_LINE>if (pid == _pid) {<NEW_LINE>// main thread (in Linux JVM fork&abort case this is the only thread)<NEW_LINE>for (DataEntry registerEntry : _highwordRegisterEntries) {<NEW_LINE>try {<NEW_LINE>readHighwordRegisters(registerEntry, registers);<NEW_LINE>} catch (InvalidDumpFormatException e) {<NEW_LINE>logger.warning(e.toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new LinuxThread(pid, registers, properties);<NEW_LINE>}
, Long.toString(stimeSec));
1,031,910
public boolean onMapClick(@NonNull LatLng point) {<NEW_LINE>// Reset the lists once enough LatLngQuad points have been tapped<NEW_LINE>if (boundsFeatureList.size() == 4) {<NEW_LINE>boundsFeatureList = new ArrayList<>();<NEW_LINE>boundsCirclePointList = new ArrayList<>();<NEW_LINE>}<NEW_LINE>boundsFeatureList.add(Feature.fromGeometry(Point.fromLngLat(point.getLongitude(), point.getLatitude())));<NEW_LINE>// Add the click point to the CircleLayer and update the display of the CircleLayer data<NEW_LINE>boundsCirclePointList.add(Point.fromLngLat(point.getLongitude(), point.getLatitude()));<NEW_LINE>Style style = mapboxMap.getStyle();<NEW_LINE>if (style != null) {<NEW_LINE>GeoJsonSource circleSource = style.getSourceAs(CIRCLE_SOURCE_ID);<NEW_LINE>if (circleSource != null) {<NEW_LINE>circleSource.setGeoJson(FeatureCollection.fromFeatures(boundsFeatureList));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Once the 4 LatLngQuad points have been set for where the image will placed...<NEW_LINE>if (boundsCirclePointList.size() == 4) {<NEW_LINE>// Create the LatLng objects to use in the LatLngQuad<NEW_LINE>LatLng latLng1 = new LatLng(boundsCirclePointList.get(0).latitude(), boundsCirclePointList.get(0).longitude());<NEW_LINE>LatLng latLng2 = new LatLng(boundsCirclePointList.get(1).latitude(), boundsCirclePointList.get(1).longitude());<NEW_LINE>LatLng latLng3 = new LatLng(boundsCirclePointList.get(2).latitude(), boundsCirclePointList.get(2).longitude());<NEW_LINE>LatLng latLng4 = new LatLng(boundsCirclePointList.get(3).latitude(), boundsCirclePointList.get(3).longitude());<NEW_LINE>quad = new LatLngQuad(<MASK><NEW_LINE>// Launch the intent to open the device's image gallery picker<NEW_LINE>Intent pickPhotoIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);<NEW_LINE>pickPhotoIntent.setType("image/*");<NEW_LINE>startActivityForResult(pickPhotoIntent, PHOTO_PICK_CODE);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
latLng1, latLng2, latLng3, latLng4);
442,120
private static List<PropertyShape> findPropertyShapes(Set<Node> traversed, Map<Node, Shape> parsed, Graph shapesGraph, Node shapeNode) {<NEW_LINE>List<Triple> propertyTriples = G.find(shapesGraph, shapeNode, SHACL.property, null).toList();<NEW_LINE>List<PropertyShape> propertyShapes = new ArrayList<>();<NEW_LINE>for (Triple t : propertyTriples) {<NEW_LINE>// Must be a property shape.<NEW_LINE>Node propertyShape = object(t);<NEW_LINE>long x = countSP(shapesGraph, propertyShape, SHACL.path);<NEW_LINE>if (x == 0) {<NEW_LINE>// Is it a typo? -> Can we find it as a subject?<NEW_LINE>boolean existsAsSubject = G.contains(shapesGraph, propertyShape, null, null);<NEW_LINE>if (!existsAsSubject)<NEW_LINE>throw new ShaclParseException("Missing property shape: node=" + displayStr(shapeNode) <MASK><NEW_LINE>else<NEW_LINE>throw new ShaclParseException("No sh:path on a property shape: node=" + displayStr(shapeNode) + " sh:property " + displayStr(propertyShape));<NEW_LINE>}<NEW_LINE>if (x > 1) {<NEW_LINE>List<Node> paths = listSP(shapesGraph, propertyShape, SHACL.path);<NEW_LINE>throw new ShaclParseException("Multiple sh:path on a property shape: " + displayStr(shapeNode) + " sh:property" + displayStr(propertyShape) + " : " + paths);<NEW_LINE>}<NEW_LINE>PropertyShape ps = (PropertyShape) parseShapeStep(traversed, parsed, shapesGraph, propertyShape);<NEW_LINE>propertyShapes.add(ps);<NEW_LINE>}<NEW_LINE>return propertyShapes;<NEW_LINE>}
+ " sh:property " + displayStr(propertyShape));
1,542,526
public Source unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Source source = new Source();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("s3Bucket", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>source.setS3Bucket(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("s3Key", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>source.setS3Key(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("etag", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>source.setEtag(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("architecture", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>source.setArchitecture(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 source;<NEW_LINE>}
class).unmarshall(context));
707,372
private EventHandler<ActionEvent> loadDmbsFromFileAction() {<NEW_LINE>return ev -> {<NEW_LINE>final FileChooser fileChooser = new FileChooser();<NEW_LINE>fileChooser.setTitle("Open Database File");<NEW_LINE>if (!"".equals(fieldFile.getText().trim())) {<NEW_LINE>final Path path = Paths.get(fieldFile.getText().trim());<NEW_LINE>if (path.getParent().toFile().exists()) {<NEW_LINE>final String parentFolder = path.getParent().toString();<NEW_LINE>if (!"".equals(parentFolder)) {<NEW_LINE>fileChooser.setInitialDirectory(new File(parentFolder));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (path.toFile().exists()) {<NEW_LINE>fileChooser.setInitialFileName(fieldFile.getText());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final File file = fileChooser.<MASK><NEW_LINE>if (file != null) {<NEW_LINE>fieldFile.setText(Paths.get(".").toAbsolutePath().getParent().relativize(file.toPath()).toString());<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
showOpenDialog(ui.getStage());
1,469,562
static final <E extends EnumType> E[] enums(Class<? extends E> type) {<NEW_LINE>// Java implementation<NEW_LINE>if (Enum.class.isAssignableFrom(type)) {<NEW_LINE>return type.getEnumConstants();<NEW_LINE>} else // [#4427] Scala implementation<NEW_LINE>{<NEW_LINE>try {<NEW_LINE>// There's probably a better way to do this:<NEW_LINE>// http://stackoverflow.com/q/36068089/521799<NEW_LINE>Class<?> companionClass = Thread.currentThread().getContextClassLoader().loadClass(type.getName() + "$");<NEW_LINE>java.lang.reflect.Field module = companionClass.getField("MODULE$");<NEW_LINE>Object companion = module.get(companionClass);<NEW_LINE>return (E[]) companionClass.getMethod<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new MappingException("Error while looking up Scala enum", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
("values").invoke(companion);
1,297,826
protected WebRtcServiceState handleGroupJoinedMembershipChanged(@NonNull WebRtcServiceState currentState) {<NEW_LINE>Log.i(tag, "handleGroupJoinedMembershipChanged():");<NEW_LINE>GroupCall groupCall = currentState.getCallInfoState().requireGroupCall();<NEW_LINE>PeekInfo peekInfo = groupCall.getPeekInfo();<NEW_LINE>if (peekInfo == null) {<NEW_LINE>return currentState;<NEW_LINE>}<NEW_LINE>if (currentState.getCallSetupState(RemotePeer.GROUP_CALL_ID).hasSentJoinedMessage()) {<NEW_LINE>return currentState;<NEW_LINE>}<NEW_LINE>String eraId = WebRtcUtil.getGroupCallEraId(groupCall);<NEW_LINE>webRtcInteractor.sendGroupCallMessage(currentState.getCallInfoState().getCallRecipient(), eraId);<NEW_LINE>List<UUID> members = new ArrayList<>(peekInfo.getJoinedMembers());<NEW_LINE>if (!members.contains(SignalStore.account().requireAci().uuid())) {<NEW_LINE>members.add(SignalStore.account().requireAci().uuid());<NEW_LINE>}<NEW_LINE>webRtcInteractor.updateGroupCallUpdateMessage(currentState.getCallInfoState().getCallRecipient().getId(), eraId, members<MASK><NEW_LINE>return currentState.builder().changeCallSetupState(RemotePeer.GROUP_CALL_ID).sentJoinedMessage(true).build();<NEW_LINE>}
, WebRtcUtil.isCallFull(peekInfo));
1,579,342
protected JComponent createCenterPanel() {<NEW_LINE>final JPanel panel = new JPanel(new GridBagLayout());<NEW_LINE>GridBagConstraints gbc = new GridBagConstraints();<NEW_LINE>gbc.fill = GridBagConstraints.HORIZONTAL;<NEW_LINE>gbc.weightx = 1.0;<NEW_LINE>gbc.gridwidth = 2;<NEW_LINE>panel.add(super.createCenterPanel(), gbc);<NEW_LINE>myCbSearchInComments = new JCheckBox(RefactoringBundle.message("search.in.comments.and.strings"), isSearchInCommentsAndStrings());<NEW_LINE>myCbSearchTextOccurences = new JCheckBox(RefactoringBundle.message("search.for.text.occurrences"), isSearchForTextOccurrences());<NEW_LINE>gbc.weightx = 0;<NEW_LINE>gbc.gridwidth = 1;<NEW_LINE>gbc.gridy = 1;<NEW_LINE>gbc.gridx = 0;<NEW_LINE>panel.add(myCbSearchInComments, gbc);<NEW_LINE>gbc.gridx = 1;<NEW_LINE><MASK><NEW_LINE>final ActionListener actionListener = new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>setEnabledSearchSettngs(myRbInlineAll.isSelected());<NEW_LINE>}<NEW_LINE>};<NEW_LINE>myRbInlineThisOnly.addActionListener(actionListener);<NEW_LINE>myRbInlineAll.addActionListener(actionListener);<NEW_LINE>setEnabledSearchSettngs(myRbInlineAll.isSelected());<NEW_LINE>return panel;<NEW_LINE>}
panel.add(myCbSearchTextOccurences, gbc);
372,906
public void initSDK(MethodCall methodCall, MethodChannel.Result result) {<NEW_LINE>int sdkAppID = methodCall.argument("sdkAppID");<NEW_LINE>int logLevel = methodCall.argument("logLevel");<NEW_LINE>String <MASK><NEW_LINE>final String listenerUuid = methodCall.argument("listenerUuid");<NEW_LINE>// Global configuration<NEW_LINE>V2TIMManager.getInstance().callExperimentalAPI("setUIPlatform", uiPlatform, null);<NEW_LINE>// The main thread initializes the SDK<NEW_LINE>// if (SessionWrapper.isMainProcess(context)) {<NEW_LINE>V2TIMSDKConfig config = new V2TIMSDKConfig();<NEW_LINE>config.setLogLevel(logLevel);<NEW_LINE>Boolean res = V2TIMManager.getInstance().initSDK(context, sdkAppID, config, new V2TIMSDKListener() {<NEW_LINE><NEW_LINE>public void onConnecting() {<NEW_LINE>makeEventData("onConnecting", null, listenerUuid);<NEW_LINE>}<NEW_LINE><NEW_LINE>public void onConnectSuccess() {<NEW_LINE>makeEventData("onConnectSuccess", null, listenerUuid);<NEW_LINE>}<NEW_LINE><NEW_LINE>public void onConnectFailed(int code, String error) {<NEW_LINE>HashMap<String, Object> err = new HashMap<String, Object>();<NEW_LINE>err.put("code", code);<NEW_LINE>err.put("desc", error);<NEW_LINE>makeEventData("onConnectFailed", err, listenerUuid);<NEW_LINE>}<NEW_LINE><NEW_LINE>public void onKickedOffline() {<NEW_LINE>makeEventData("onKickedOffline", null, listenerUuid);<NEW_LINE>}<NEW_LINE><NEW_LINE>public void onUserSigExpired() {<NEW_LINE>makeEventData("onUserSigExpired", null, listenerUuid);<NEW_LINE>}<NEW_LINE><NEW_LINE>public void onSelfInfoUpdated(V2TIMUserFullInfo info) {<NEW_LINE>makeEventData("onSelfInfoUpdated", CommonUtil.convertV2TIMUserFullInfoToMap(info), listenerUuid);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>CommonUtil.returnSuccess(result, res);<NEW_LINE>// }<NEW_LINE>}
uiPlatform = methodCall.argument("uiPlatform");
1,770,705
public void mouseClicked(MouseEvent e) {<NEW_LINE>int mods = e.getModifiersEx();<NEW_LINE>boolean shift = (mods & MouseEvent.SHIFT_DOWN_MASK) > 0;<NEW_LINE>boolean ctrl = (mods & MouseEvent.CTRL_DOWN_MASK) > 0;<NEW_LINE>boolean alt = shift & ctrl;<NEW_LINE>ctrl = ctrl & (!alt);<NEW_LINE>shift = shift & (!alt);<NEW_LINE>boolean nomods = !(shift | ctrl | alt);<NEW_LINE>double tolerance = getPosition(e.getX() + CLICK_CLOSENESS, <MASK><NEW_LINE>double position = getPosition(e.getX(), e.getY());<NEW_LINE>if (e.getButton() == 1) {<NEW_LINE>Bookmark nearest = findBookmark(position, tolerance);<NEW_LINE>if (nearest == null)<NEW_LINE>userSet(position);<NEW_LINE>else<NEW_LINE>userSet(nearest.position);<NEW_LINE>}<NEW_LINE>if (e.getButton() == 3) {<NEW_LINE>popupPosition = position;<NEW_LINE>popupMenu.show(JScrubber.this, e.getX(), e.getY());<NEW_LINE>}<NEW_LINE>}
e.getY()) - position;
1,084,711
public void showConfirmationSetNickname(final String alias) {<NEW_LINE>LinearLayout layout = new LinearLayout(this);<NEW_LINE>layout.setOrientation(LinearLayout.VERTICAL);<NEW_LINE>LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);<NEW_LINE>params.setMargins(scaleWidthPx(20, outMetrics), scaleHeightPx(16, outMetrics), scaleWidthPx(17, outMetrics), 0);<NEW_LINE>final EmojiEditText input = new EmojiEditText(this);<NEW_LINE>layout.addView(input, params);<NEW_LINE>input.setSingleLine();<NEW_LINE>input.setSelectAllOnFocus(true);<NEW_LINE>input.requestFocus();<NEW_LINE>input.setTextColor(ColorUtils.getThemeColor(this, android.R.attr.textColorSecondary));<NEW_LINE>input.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);<NEW_LINE>input.setEmojiSize(dp2px(EMOJI_SIZE, outMetrics));<NEW_LINE>input.setImeOptions(EditorInfo.IME_ACTION_DONE);<NEW_LINE>input.setInputType(InputType.TYPE_CLASS_TEXT);<NEW_LINE>showKeyboardDelayed(input);<NEW_LINE>MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);<NEW_LINE>input.setImeActionLabel(getString(R.string.add_nickname), EditorInfo.IME_ACTION_DONE);<NEW_LINE>if (alias == null) {<NEW_LINE>input.setHint(getString(R.string.nickname_title));<NEW_LINE>builder.setTitle(getString(R.string.add_nickname));<NEW_LINE>} else {<NEW_LINE>input.setHint(alias);<NEW_LINE>input.setText(alias);<NEW_LINE>input.setSelection(input.length());<NEW_LINE>builder.setTitle(getString(R.string.edit_nickname));<NEW_LINE>}<NEW_LINE>int colorDisableButton = ContextCompat.getColor(this, R.color.teal_300_038_teal_200_038);<NEW_LINE>int colorEnableButton = ContextCompat.getColor(<MASK><NEW_LINE>input.addTextChangedListener(new TextWatcher() {<NEW_LINE><NEW_LINE>private void handleText() {<NEW_LINE>if (setNicknameDialog != null) {<NEW_LINE>final Button okButton = setNicknameDialog.getButton(AlertDialog.BUTTON_POSITIVE);<NEW_LINE>if (input.getText().length() == 0) {<NEW_LINE>okButton.setEnabled(false);<NEW_LINE>okButton.setTextColor(colorDisableButton);<NEW_LINE>} else {<NEW_LINE>okButton.setEnabled(true);<NEW_LINE>okButton.setTextColor(colorEnableButton);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onTextChanged(CharSequence s, int start, int before, int count) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void beforeTextChanged(CharSequence s, int start, int count, int after) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void afterTextChanged(Editable s) {<NEW_LINE>handleText();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.setPositiveButton(getString(R.string.button_set), (dialog, whichButton) -> onClickAlertDialog(input, alias));<NEW_LINE>builder.setNegativeButton(getString(R.string.general_cancel), (dialog, whichButton) -> setNicknameDialog.dismiss());<NEW_LINE>builder.setView(layout);<NEW_LINE>setNicknameDialog = builder.create();<NEW_LINE>setNicknameDialog.show();<NEW_LINE>setNicknameDialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false);<NEW_LINE>setNicknameDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(colorDisableButton);<NEW_LINE>setNicknameDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(v -> onClickAlertDialog(input, alias));<NEW_LINE>setNicknameDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setOnClickListener(v -> setNicknameDialog.dismiss());<NEW_LINE>}
this, R.color.teal_300_teal_200);
267,479
final GetCustomRulePolicyResult executeGetCustomRulePolicy(GetCustomRulePolicyRequest getCustomRulePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCustomRulePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetCustomRulePolicyRequest> request = null;<NEW_LINE>Response<GetCustomRulePolicyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetCustomRulePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getCustomRulePolicyRequest));<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, "Config Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCustomRulePolicy");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetCustomRulePolicyResult>> 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 GetCustomRulePolicyResultJsonUnmarshaller());
944,497
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TagResourceRequest> request = null;<NEW_LINE>Response<TagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Cognito Identity");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
1,055,048
public static String qualifyStaticImport(String qualifiedName, SuggestedFix.Builder fix, VisitorState state) {<NEW_LINE>String name = qualifiedName.substring(qualifiedName.lastIndexOf(".") + 1);<NEW_LINE>AtomicBoolean foundConflict = new AtomicBoolean(false);<NEW_LINE>new TreeScanner<Void, Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void visitMethod(MethodTree method, Void unused) {<NEW_LINE>process(method, method.getName());<NEW_LINE>return super.visitMethod(method, null);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void visitIdentifier(IdentifierTree ident, Void unused) {<NEW_LINE>process(ident, ident.getName());<NEW_LINE>return super.visitIdentifier(ident, null);<NEW_LINE>}<NEW_LINE><NEW_LINE>private void process(Tree tree, Name identifier) {<NEW_LINE>if (!identifier.contentEquals(name)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Symbol symbol = getSymbol(tree);<NEW_LINE>if (symbol == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String identifierQualifiedName = symbol.owner.getQualifiedName() + "." + symbol.getSimpleName();<NEW_LINE>if (!qualifiedName.equals(identifierQualifiedName)) {<NEW_LINE>foundConflict.set(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}.scan(state.getPath().getCompilationUnit(), null);<NEW_LINE>if (foundConflict.get()) {<NEW_LINE>String className = qualifiedName.substring(0, qualifiedName.lastIndexOf("."));<NEW_LINE>return qualifyType(state, <MASK><NEW_LINE>}<NEW_LINE>fix.addStaticImport(qualifiedName);<NEW_LINE>return name;<NEW_LINE>}
fix, className) + "." + name;
46,329
public void paintMarginAreas(RenderingContext c, int additionalClearance, short mode) {<NEW_LINE>for (int i = 0; i < MARGIN_AREA_DEFS.length; i++) {<NEW_LINE>MarginAreaContainer container = _marginAreas[i];<NEW_LINE>if (container != null) {<NEW_LINE>currentMarginAreaContainer = container;<NEW_LINE>TableBox table = _marginAreas[i].getTable();<NEW_LINE>Point p = container.getArea().getPaintingPosition(c, this, additionalClearance, mode);<NEW_LINE>c.getOutputDevice().translate(p.x, p.y);<NEW_LINE>table.getLayer().propagateCurrentTransformationMatrix(c);<NEW_LINE>SimplePainter painter = new SimplePainter(p.x, p.y);<NEW_LINE>Object token = c.getOutputDevice().<MASK><NEW_LINE>painter.paintLayer(c, table.getLayer());<NEW_LINE>c.getOutputDevice().endStructure(token);<NEW_LINE>c.getOutputDevice().translate(-p.x, -p.y);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>currentMarginAreaContainer = null;<NEW_LINE>}
startStructure(StructureType.RUNNING, table);
1,503,664
public static String streamAttachment(HttpServletResponse response, MAttachment attachment, int attachmentIndex) {<NEW_LINE>if (attachment == null)<NEW_LINE>return "No Attachment";<NEW_LINE>int realIndex = -1;<NEW_LINE>MAttachmentEntry[] entries = attachment.getEntries();<NEW_LINE>for (int i = 0; i < entries.length; i++) {<NEW_LINE>MAttachmentEntry entry = entries[i];<NEW_LINE>if (entry.getIndex() == attachmentIndex) {<NEW_LINE>realIndex = i;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (realIndex < 0) {<NEW_LINE>log.fine("No Attachment Entry for Index=" + attachmentIndex + " - " + attachment);<NEW_LINE>return "Attachment Entry not found";<NEW_LINE>}<NEW_LINE>MAttachmentEntry entry = entries[realIndex];<NEW_LINE>if (entry.getData() == null) {<NEW_LINE>log.fine("Empty Attachment Entry for Index=" + attachmentIndex + " - " + attachment);<NEW_LINE>return "Attachment Entry empty";<NEW_LINE>}<NEW_LINE>// Stream Attachment Entry<NEW_LINE>try {<NEW_LINE>// 2k Buffer<NEW_LINE>int bufferSize = 2048;<NEW_LINE>int fileLength = entry.getData().length;<NEW_LINE>//<NEW_LINE>response.setContentType(entry.getContentType());<NEW_LINE>response.setBufferSize(bufferSize);<NEW_LINE>response.setContentLength(fileLength);<NEW_LINE>//<NEW_LINE>log.fine(entry.toString());<NEW_LINE>// timer start<NEW_LINE>long time = System.currentTimeMillis();<NEW_LINE>//<NEW_LINE>ServletOutputStream out = response.getOutputStream();<NEW_LINE>out.write(entry.getData());<NEW_LINE>out.flush();<NEW_LINE>out.close();<NEW_LINE>//<NEW_LINE>time = System.currentTimeMillis() - time;<NEW_LINE>double speed = (fileLength / 1024) / ((double) time / 1000);<NEW_LINE>log.info("Length=" + fileLength + " - " + time + " ms - " + speed + <MASK><NEW_LINE>} catch (IOException ex) {<NEW_LINE>log.log(Level.SEVERE, ex.toString());<NEW_LINE>return "Streaming error - " + ex;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
" kB/sec - " + entry.getContentType());
807,408
public int computeValue(PuzzleState state) {<NEW_LINE>int value = 0;<NEW_LINE><MASK><NEW_LINE>if (parent == null) {<NEW_LINE>for (int x = 0; x < DIMENSION; x++) {<NEW_LINE>for (int y = 0; y < DIMENSION; y++) {<NEW_LINE>int piece = state.getPiece(x, y);<NEW_LINE>if (piece == BLANK_TILE_VALUE) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int goalX = piece % DIMENSION;<NEW_LINE>int goalY = piece / DIMENSION;<NEW_LINE>value += Math.abs(x - goalX) + Math.abs(y - goalY);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>value = parent.getHeuristicValue(this);<NEW_LINE>int x = parent.getEmptyPiece() % DIMENSION;<NEW_LINE>int y = parent.getEmptyPiece() / DIMENSION;<NEW_LINE>int x2 = state.getEmptyPiece() % DIMENSION;<NEW_LINE>int y2 = state.getEmptyPiece() / DIMENSION;<NEW_LINE>int piece = state.getPiece(x, y);<NEW_LINE>if (x2 > x) {<NEW_LINE>int targetX = piece % DIMENSION;<NEW_LINE>// right<NEW_LINE>if (targetX > x)<NEW_LINE>value++;<NEW_LINE>else<NEW_LINE>value--;<NEW_LINE>} else if (x2 < x) {<NEW_LINE>int targetX = piece % DIMENSION;<NEW_LINE>// left<NEW_LINE>if (targetX < x)<NEW_LINE>value++;<NEW_LINE>else<NEW_LINE>value--;<NEW_LINE>} else if (y2 > y) {<NEW_LINE>int targetY = piece / DIMENSION;<NEW_LINE>// down<NEW_LINE>if (targetY > y)<NEW_LINE>value++;<NEW_LINE>else<NEW_LINE>value--;<NEW_LINE>} else {<NEW_LINE>int targetY = piece / DIMENSION;<NEW_LINE>// up<NEW_LINE>if (targetY < y)<NEW_LINE>value++;<NEW_LINE>else<NEW_LINE>value--;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return value;<NEW_LINE>}
PuzzleState parent = state.getParent();
439,225
private static void validateExtendedKeyUsage(X509Certificate[] certs, List<String> expectedEKU) throws GeneralSecurityException {<NEW_LINE>if (expectedEKU == null || expectedEKU.size() == 0) {<NEW_LINE>logger.debug("Extended Key Usage validation is not enabled.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<String> extendedKeyUsage = certs[0].getExtendedKeyUsage();<NEW_LINE>if (extendedKeyUsage == null) {<NEW_LINE>String message = "Extended key usage extension is expected, but unavailable";<NEW_LINE>throw new GeneralSecurityException(message);<NEW_LINE>}<NEW_LINE>boolean isCritical = false;<NEW_LINE>Set critSet = certs[0].getCriticalExtensionOIDs();<NEW_LINE>if (critSet != null) {<NEW_LINE>isCritical = critSet.contains("2.5.29.37");<NEW_LINE>}<NEW_LINE>List<String> ekuList = new LinkedList<>();<NEW_LINE>extendedKeyUsage.forEach(s -> ekuList.add<MASK><NEW_LINE>for (String eku : expectedEKU) {<NEW_LINE>if (!ekuList.contains(eku.toLowerCase())) {<NEW_LINE>String message = String.format("Extended Key Usage \'%s\' is missing.", eku);<NEW_LINE>if (isCritical) {<NEW_LINE>throw new GeneralSecurityException(message);<NEW_LINE>}<NEW_LINE>logger.warn(message);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(s.toLowerCase()));
1,183,575
public void push(CollectorRegistry registry) throws IOException {<NEW_LINE>Socket s = new Socket(host, port);<NEW_LINE>BufferedWriter writer = new BufferedWriter(new PrintWriter(new OutputStreamWriter(s.getOutputStream(), Charset.forName("UTF-8"))));<NEW_LINE>Matcher m = INVALID_GRAPHITE_CHARS.matcher("");<NEW_LINE>long now = System.currentTimeMillis() / 1000;<NEW_LINE>for (Collector.MetricFamilySamples metricFamilySamples : Collections.list(registry.metricFamilySamples())) {<NEW_LINE>for (Collector.MetricFamilySamples.Sample sample : metricFamilySamples.samples) {<NEW_LINE>m.reset(sample.name);<NEW_LINE>writer.write(m.replaceAll("_"));<NEW_LINE>for (int i = 0; i < sample.labelNames.size(); ++i) {<NEW_LINE>m.reset(sample<MASK><NEW_LINE>writer.write("." + sample.labelNames.get(i) + "." + m.replaceAll("_"));<NEW_LINE>}<NEW_LINE>writer.write(" " + sample.value + " " + now + "\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>writer.close();<NEW_LINE>s.close();<NEW_LINE>}
.labelValues.get(i));
176,776
final CreateImageBuilderResult executeCreateImageBuilder(CreateImageBuilderRequest createImageBuilderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createImageBuilderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateImageBuilderRequest> request = null;<NEW_LINE>Response<CreateImageBuilderResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateImageBuilderRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createImageBuilderRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "AppStream");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateImageBuilder");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateImageBuilderResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateImageBuilderResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
1,819,288
public static int runShellCommand(String cmd, Boolean useRoot) {<NEW_LINE>// Assume "failure" exit code if an error is caught.<NEW_LINE>int exitCode = 255;<NEW_LINE>Process shellProc = null;<NEW_LINE>DataOutputStream shellOut = null;<NEW_LINE>try {<NEW_LINE>shellProc = Runtime.getRuntime().exec(<MASK><NEW_LINE>shellOut = new DataOutputStream(shellProc.getOutputStream());<NEW_LINE>BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(shellOut));<NEW_LINE>Log.d(TAG, "runShellCommand: " + cmd);<NEW_LINE>bufferedWriter.write(cmd);<NEW_LINE>bufferedWriter.flush();<NEW_LINE>shellOut.close();<NEW_LINE>shellOut = null;<NEW_LINE>exitCode = shellProc.waitFor();<NEW_LINE>} catch (IOException | InterruptedException e) {<NEW_LINE>Log.w(TAG, "runShellCommand: Exception", e);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>if (shellOut != null) {<NEW_LINE>shellOut.close();<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>Log.w(TAG, "Failed to close shell stream", e);<NEW_LINE>}<NEW_LINE>if (shellProc != null) {<NEW_LINE>shellProc.destroy();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return exitCode;<NEW_LINE>}
(useRoot) ? "su" : "sh");
1,214,201
private void handleResult(Protocol.Digest digest, BatchReadBlobsResponse.Response batchResponse, ImmutableCollection<Callable<WritableByteChannel>> writableByteChannels) throws IOException {<NEW_LINE>if (!Status.fromCodeValue(batchResponse.getStatus().getCode()).isOk()) {<NEW_LINE>throw new BuckUncheckedExecutionException(String.format("Invalid batchResponse from CAS server for digest: [%s], code: [%s] message: [%s].", digest, batchResponse.getStatus().getCode(), batchResponse.getStatus().getMessage()));<NEW_LINE>}<NEW_LINE>MessageDigest messageDigest = protocol.getMessageDigest();<NEW_LINE>for (ByteBuffer dataByteBuffer : batchResponse.getData().asReadOnlyByteBufferList()) {<NEW_LINE>messageDigest.update(dataByteBuffer.duplicate());<NEW_LINE>for (Callable<WritableByteChannel> callable : writableByteChannels) {<NEW_LINE>// Reset buffer position for each channel that's written to<NEW_LINE>try (WritableByteChannel channel = callable.call()) {<NEW_LINE>channel.write(dataByteBuffer.duplicate());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new BuckUncheckedExecutionException("Unable to write " + digest + " to channel");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String receivedHash = HashCode.fromBytes(messageDigest.<MASK><NEW_LINE>if (digest.getSize() != batchResponse.getData().size() || !digest.getHash().equals(receivedHash)) {<NEW_LINE>throw new BuckUncheckedExecutionException("Digest of received bytes: " + receivedHash + ":" + batchResponse.getData().size() + " doesn't match expected digest: " + digest);<NEW_LINE>}<NEW_LINE>}
digest()).toString();
12,476
public List<IndexableField> createFields(ParseContext context, String name, RangeFieldMapper.Range range, boolean indexed, boolean docValued, boolean stored) {<NEW_LINE>assert range != null : "range cannot be null when creating fields";<NEW_LINE>List<IndexableField> fields = new ArrayList<>();<NEW_LINE>if (indexed) {<NEW_LINE>fields.add(getRangeField(name, range));<NEW_LINE>}<NEW_LINE>if (docValued) {<NEW_LINE>RangeFieldMapper.BinaryRangesDocValuesField field = (RangeFieldMapper.BinaryRangesDocValuesField) context.doc().getByKey(name);<NEW_LINE>if (field == null) {<NEW_LINE>field = new RangeFieldMapper.BinaryRangesDocValuesField(name, range, this);<NEW_LINE>context.doc().addWithKey(name, field);<NEW_LINE>} else {<NEW_LINE>field.add(range);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (stored) {<NEW_LINE>fields.add(new StoredField(name<MASK><NEW_LINE>}<NEW_LINE>return fields;<NEW_LINE>}
, range.toString()));
75,737
private void loadingFinished(Runnable continuation) {<NEW_LINE>if (!myLoadingFinished.compareAndSet(false, true))<NEW_LINE>return;<NEW_LINE>myEditor.putUserData(ASYNC_LOADER, null);<NEW_LINE>if (myEditorComponent.isDisposed())<NEW_LINE>return;<NEW_LINE>if (continuation != null) {<NEW_LINE>continuation.run();<NEW_LINE>}<NEW_LINE>myEditorComponent.loadingFinished();<NEW_LINE>if (myDelayedState != null && PsiDocumentManager.getInstance(myProject).isCommitted(myEditor.getDocument())) {<NEW_LINE>TextEditorState state = new TextEditorState();<NEW_LINE>// don't do any scrolling<NEW_LINE>state.RELATIVE_CARET_POSITION = Integer.MAX_VALUE;<NEW_LINE>state.setFoldingState(myDelayedState.getFoldingState());<NEW_LINE>myProvider.setStateImpl(myProject, myEditor, state);<NEW_LINE>myDelayedState = null;<NEW_LINE>}<NEW_LINE>for (Runnable runnable : myDelayedActions) {<NEW_LINE>myEditor.getScrollingModel().disableAnimation();<NEW_LINE>runnable.run();<NEW_LINE>}<NEW_LINE>myEditor.getScrollingModel().enableAnimation();<NEW_LINE>if (FileEditorManager.getInstance(myProject).getSelectedTextEditor() == myEditor) {<NEW_LINE>IdeFocusManager.getInstance(myProject).requestFocusInProject(myTextEditor.getPreferredFocusedComponent(), myProject);<NEW_LINE>}<NEW_LINE>EditorNotifications.getInstance(myProject<MASK><NEW_LINE>}
).updateNotifications(myTextEditor.myFile);
107,368
public void marshall(ASN1Subject aSN1Subject, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (aSN1Subject == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getCountry(), COUNTRY_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getOrganization(), ORGANIZATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getOrganizationalUnit(), ORGANIZATIONALUNIT_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getDistinguishedNameQualifier(), DISTINGUISHEDNAMEQUALIFIER_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getState(), STATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getCommonName(), COMMONNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getLocality(), LOCALITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getTitle(), TITLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getSurname(), SURNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getGivenName(), GIVENNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getInitials(), INITIALS_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getPseudonym(), PSEUDONYM_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getGenerationQualifier(), GENERATIONQUALIFIER_BINDING);<NEW_LINE>protocolMarshaller.marshall(aSN1Subject.getCustomAttributes(), CUSTOMATTRIBUTES_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
aSN1Subject.getSerialNumber(), SERIALNUMBER_BINDING);
1,836,377
public int compareTo(TExternalCompaction other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetQueueName(), other.isSetQueueName());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetQueueName()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueName, other.queueName);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetCompactor(), other.isSetCompactor());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetCompactor()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compactor, other.compactor);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetUpdates(<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetUpdates()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updates, other.updates);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetJob(), other.isSetJob());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetJob()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job, other.job);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
), other.isSetUpdates());
1,332,444
protected synchronized SSLSocketFactory createSocketFactory(URL providerURL) throws IOException {<NEW_LINE>final String methodName = "createSocketFactory(URL)";<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, methodName, providerURL);<NEW_LINE>}<NEW_LINE>final Map<String, Object> connectionInfo = new <MASK><NEW_LINE>connectionInfo.put(CONNECTION_INFO_DIRECTION, DIRECTION_OUTBOUND);<NEW_LINE>connectionInfo.put(CONNECTION_INFO_REMOTE_HOST, providerURL.getHost());<NEW_LINE>connectionInfo.put(CONNECTION_INFO_REMOTE_PORT, providerURL.getPort() == -1 ? "434" : Integer.toString(providerURL.getPort()));<NEW_LINE>SSLConfig sslConfig;<NEW_LINE>if (AcmeConfigService.getThreadLocalAcmeConfig() != null) {<NEW_LINE>sslConfig = AcmeConfigService.getThreadLocalAcmeConfig().getSSLConfig();<NEW_LINE>} else {<NEW_LINE>sslConfig = AcmeProviderImpl.getSSLConfig();<NEW_LINE>}<NEW_LINE>if (sslConfig.getProperty(Constants.SSLPROP_TRUST_STORE) != null) {<NEW_LINE>SSLContext ctx;<NEW_LINE>try {<NEW_LINE>ctx = JSSEHelper.getInstance().getSSLContext(connectionInfo, sslConfig);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.exit(tc, methodName, ctx.getClass());<NEW_LINE>}<NEW_LINE>return ctx.getSocketFactory();<NEW_LINE>} catch (SSLException e) {<NEW_LINE>throw new IOException("Failed to generate SSLContext with custom TrustManager.", e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>String protocol = sslConfig.getProperty(Constants.SSLPROP_PROTOCOL);<NEW_LINE>SSLContext sslContext = null;<NEW_LINE>if (protocol != null) {<NEW_LINE>sslContext = SSLContext.getInstance(protocol);<NEW_LINE>sslContext.init(null, AbstractJSSEProvider.getDefaultTrustManager(), null);<NEW_LINE>} else {<NEW_LINE>sslContext = SSLContext.getDefault();<NEW_LINE>}<NEW_LINE>return sslContext.getSocketFactory();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IOException("Failed to generate SSLSocketFactory with default TrustManager.", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
HashMap<String, Object>();
1,278,125
public void mouseClicked(CellMouseEvent cellEvent) {<NEW_LINE>if (cellEvent.getCellValue() instanceof GuiCellModel && cellEvent.getMouseEvent().getButton() != MouseEvent.BUTTON1) {<NEW_LINE>cellEvent.getTable().setRowSelectionInterval(cellEvent.getRow(), cellEvent.getRow());<NEW_LINE>GuiCellModel cellModel = (GuiCellModel) cellEvent.getCellValue();<NEW_LINE>List<MenuItem> menuItems = cellModel.getPopupMenu();<NEW_LINE>// if there are menu items, show a popup menu for<NEW_LINE>// this item with all the menu items.<NEW_LINE>if (CollectionUtils.isNotEmpty(menuItems)) {<NEW_LINE>final JPopupMenu popupMenu = new JPopupMenu();<NEW_LINE>for (MenuItem mItem : menuItems) {<NEW_LINE>JMenuItem jMenuItem = new JMenuItem(mItem.getTitle());<NEW_LINE>if (mItem.getAction() != null) {<NEW_LINE>jMenuItem.addActionListener((evt) -> mItem.<MASK><NEW_LINE>}<NEW_LINE>popupMenu.add(jMenuItem);<NEW_LINE>}<NEW_LINE>popupMenu.show(cellEvent.getTable(), cellEvent.getMouseEvent().getX(), cellEvent.getMouseEvent().getY());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getAction().run());
981,422
private LayoutFeeder createFeeder(LayoutComponent[] components, LayoutComponent targetContainer) {<NEW_LINE>assert components.length == 1 || (components.length > 1 && components[0].getParent() == null);<NEW_LINE>LayoutFeeder feeder = new LayoutFeeder(components, targetContainer, operations, dragger);<NEW_LINE>unresizedOnRemove = null;<NEW_LINE>LayoutRegion origSpace = null;<NEW_LINE>for (LayoutComponent comp : components) {<NEW_LINE>if (comp.getParent() != null) {<NEW_LINE>if (origSpace == null) {<NEW_LINE>origSpace = new LayoutRegion();<NEW_LINE>origSpace.set(comp.getCurrentSpace());<NEW_LINE>} else {<NEW_LINE>origSpace.expand(comp.getCurrentSpace());<NEW_LINE>}<NEW_LINE>for (int dim = 0; dim < DIM_COUNT; dim++) {<NEW_LINE>LayoutInterval <MASK><NEW_LINE>if (compInt.getParent() != null) {<NEW_LINE>Object start = layoutModel.getChangeMark();<NEW_LINE>removeComponentInterval(compInt, dim);<NEW_LINE>visualState.updateSpaceAfterRemove(comp.getParent().getDefaultLayoutRoot(dim), dim);<NEW_LINE>if (dragger.isResizing(dim)) {<NEW_LINE>layoutModel.removeComponentFromLinkSizedGroup(comp, dim);<NEW_LINE>}<NEW_LINE>Object end = layoutModel.getChangeMark();<NEW_LINE>feeder.setUndo(start, end, dim);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (comp.getParent() != targetContainer) {<NEW_LINE>layoutModel.removeComponent(comp, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (comp.getParent() == null) {<NEW_LINE>layoutModel.addComponent(comp, targetContainer, -1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>feeder.setUp(origSpace, unresizedOnRemove);<NEW_LINE>unresizedOnRemove = null;<NEW_LINE>return feeder;<NEW_LINE>}
compInt = comp.getLayoutInterval(dim);
598,593
final DeleteClientCertificateResult executeDeleteClientCertificate(DeleteClientCertificateRequest deleteClientCertificateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteClientCertificateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteClientCertificateRequest> request = null;<NEW_LINE>Response<DeleteClientCertificateResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteClientCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteClientCertificateRequest));<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, "API Gateway");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteClientCertificate");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteClientCertificateResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteClientCertificateResultJsonUnmarshaller());<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());
1,426,702
private void addEnumerations() {<NEW_LINE>Iterator<DefinedType> typeIter = schema.getTypes().iterator();<NEW_LINE>while (typeIter.hasNext()) {<NEW_LINE>DefinedType type = typeIter.next();<NEW_LINE>if (type instanceof EnumerationType) {<NEW_LINE>EEnum enumeration = eFactory.createEEnum();<NEW_LINE>enumeration.setName(type.getName());<NEW_LINE>EEnumLiteral nullValue = eFactory.createEEnumLiteral();<NEW_LINE>nullValue.setName("NULL");<NEW_LINE>nullValue.setLiteral("NULL");<NEW_LINE>nullValue.setValue(0);<NEW_LINE>enumeration.getELiterals().add(nullValue);<NEW_LINE>int counter = 1;<NEW_LINE>Iterator<String> values = ((EnumerationType) type).getElements().iterator();<NEW_LINE>while (values.hasNext()) {<NEW_LINE><MASK><NEW_LINE>if (!stringVal.equals("NULL")) {<NEW_LINE>EEnumLiteral value = eFactory.createEEnumLiteral();<NEW_LINE>value.setName(stringVal);<NEW_LINE>value.setLiteral(stringVal);<NEW_LINE>value.setValue(counter);<NEW_LINE>counter++;<NEW_LINE>enumeration.getELiterals().add(value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>schemaPack.getEClassifiers().add(enumeration);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String stringVal = values.next();
420,358
/*<NEW_LINE>public static int tokenize(String text, String posModelPath, boolean lowercase, boolean useTargetNERRestriction, String sentIDPrefix,<NEW_LINE>boolean useTargetParserParentRestriction, String numThreads, boolean batchProcessSents, int numMaxSentencesPerBatchFile,<NEW_LINE>File saveSentencesSerDirFile, Map<String, DataInstance> sents, int numFilesTillNow) throws InterruptedException, ExecutionException,<NEW_LINE>IOException {<NEW_LINE>if (pipeline == null) {<NEW_LINE>Properties props = new Properties();<NEW_LINE>List<String> anns = new ArrayList<String>();<NEW_LINE>anns.add("tokenize");<NEW_LINE>anns.add("ssplit");<NEW_LINE>anns.add("pos");<NEW_LINE>anns.add("lemma");<NEW_LINE><NEW_LINE>if (useTargetParserParentRestriction) {<NEW_LINE>anns.add("parse");<NEW_LINE>}<NEW_LINE>if (useTargetNERRestriction) {<NEW_LINE>anns.add("ner");<NEW_LINE>}<NEW_LINE><NEW_LINE>props.setProperty("annotators", StringUtils.join(anns, ","));<NEW_LINE>props.setProperty("parse.maxlen", "80");<NEW_LINE>props.setProperty("threads", numThreads);<NEW_LINE><NEW_LINE>props.put("tokenize.options", "ptb3Escaping=false,normalizeParentheses=false,escapeForwardSlashAsterisk=false");<NEW_LINE><NEW_LINE>if (posModelPath != null) {<NEW_LINE>props.setProperty("pos.model", posModelPath);<NEW_LINE>}<NEW_LINE>pipeline = new StanfordCoreNLP(props);<NEW_LINE>}<NEW_LINE>if (lowercase)<NEW_LINE>text = text.toLowerCase();<NEW_LINE><NEW_LINE>Annotation doc = new Annotation(text);<NEW_LINE>pipeline.annotate(doc);<NEW_LINE>Redwood.log(Redwood.DBG, "Done annotating text");<NEW_LINE><NEW_LINE>int i = -1;<NEW_LINE>for (CoreMap s : doc.get(CoreAnnotations.SentencesAnnotation.class)) {<NEW_LINE>i++;<NEW_LINE>if (useTargetParserParentRestriction)<NEW_LINE>inferParentParseTag(s.get(TreeAnnotation.class));<NEW_LINE>sents.put(sentIDPrefix + i, s.get(CoreAnnotations.TokensAnnotation.class));<NEW_LINE>if (batchProcessSents && sents.size() >= numMaxSentencesPerBatchFile) {<NEW_LINE>numFilesTillNow++;<NEW_LINE>File file = new File(saveSentencesSerDirFile + "/sents_" + numFilesTillNow);<NEW_LINE>IOUtils.writeObjectToFile(sents, file);<NEW_LINE>sents = new HashMap<String, DataInstance>();<NEW_LINE>Data.sentsFiles.add(file);<NEW_LINE>}<NEW_LINE><NEW_LINE>}<NEW_LINE>if (sents.size() > 0 && batchProcessSents) {<NEW_LINE>numFilesTillNow++;<NEW_LINE>File file = new <MASK><NEW_LINE>IOUtils.writeObjectToFile(sents, file);<NEW_LINE>Data.sentsFiles.add(file);<NEW_LINE>sents.clear();<NEW_LINE>}<NEW_LINE>// not lugging around sents if batch processing<NEW_LINE>if (batchProcessSents)<NEW_LINE>sents = null;<NEW_LINE>return numFilesTillNow;<NEW_LINE>}<NEW_LINE>*/<NEW_LINE>private static void inferParentParseTag(Tree tree) {<NEW_LINE>String grandstr = tree.value();<NEW_LINE>for (Tree child : tree.children()) {<NEW_LINE>for (Tree grand : child.children()) {<NEW_LINE>if (grand.isLeaf()) {<NEW_LINE>((CoreLabel) grand.label()).set(CoreAnnotations.GrandparentAnnotation.class, grandstr);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>inferParentParseTag(child);<NEW_LINE>}<NEW_LINE>}
File(saveSentencesSerDirFile + "/sents_" + numFilesTillNow);
1,186,798
private void addKeyWord(String keyWord, int cursorPosition, boolean preBlankEnable) {<NEW_LINE>int cursorIndex = markdownEdit.getSelectionStart();<NEW_LINE>String curContent = markdownEdit.getText().toString();<NEW_LINE>String preStr = curContent.substring(0, cursorIndex);<NEW_LINE>String sufStr = curContent.substring(cursorIndex);<NEW_LINE>boolean needPreBlank = preBlankEnable && !StringUtils.isBlank(preStr) && preStr.charAt(preStr.length() - 1) != ' ' && preStr.charAt(preStr.<MASK><NEW_LINE>String newStr = preStr;<NEW_LINE>if (needPreBlank) {<NEW_LINE>newStr = newStr.concat(" ");<NEW_LINE>}<NEW_LINE>newStr = newStr.concat(keyWord).concat(" ").concat(sufStr);<NEW_LINE>int newCursorIndex = cursorIndex + (needPreBlank ? 1 : 0) + (cursorPosition == -1 ? keyWord.length() + 1 : cursorPosition);<NEW_LINE>markdownEdit.setText(newStr);<NEW_LINE>markdownEdit.setSelection(newCursorIndex);<NEW_LINE>}
length() - 1) != '\n';
349,660
public boolean update(DataObject data, Event event) throws NoTransitionException, ConcurrentOperationException {<NEW_LINE>DataObjectInStore obj = this.findObject(data, data.getDataStore());<NEW_LINE>if (obj == null) {<NEW_LINE>throw new CloudRuntimeException("can't find mapping in ObjectInDataStore table for: " + data);<NEW_LINE>}<NEW_LINE>boolean result = true;<NEW_LINE>if (data.getDataStore().getRole() == DataStoreRole.Image || data.getDataStore().getRole() == DataStoreRole.ImageCache) {<NEW_LINE>switch(data.getType()) {<NEW_LINE>case TEMPLATE:<NEW_LINE>result = this.stateMachines.transitTo(obj, event, null, templateDataStoreDao);<NEW_LINE>break;<NEW_LINE>case SNAPSHOT:<NEW_LINE>result = this.stateMachines.transitTo(obj, event, null, snapshotDataStoreDao);<NEW_LINE>break;<NEW_LINE>case VOLUME:<NEW_LINE>result = this.stateMachines.transitTo(obj, event, null, volumeDataStoreDao);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>} else if (data.getType() == DataObjectType.TEMPLATE && data.getDataStore().getRole() == DataStoreRole.Primary) {<NEW_LINE>result = this.stateMachines.transitTo(obj, event, null, templatePoolDao);<NEW_LINE>} else if (data.getType() == DataObjectType.SNAPSHOT && data.getDataStore().getRole() == DataStoreRole.Primary) {<NEW_LINE>result = this.stateMachines.transitTo(obj, event, null, snapshotDataStoreDao);<NEW_LINE>} else {<NEW_LINE>throw new CloudRuntimeException("Invalid data or store type: " + data.getType() + " " + data.<MASK><NEW_LINE>}<NEW_LINE>if (!result) {<NEW_LINE>throw new ConcurrentOperationException("Multiple threads are trying to update data object state, racing condition");<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getDataStore().getRole());