idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
267,819
protected String[] process(final long offset, final String[] firstFour, final String[] secondFour) {<NEW_LINE>final String diff1 = environment.getNextVariableString();<NEW_LINE>final String diff2 = environment.getNextVariableString();<NEW_LINE>final String diff3 = environment.getNextVariableString();<NEW_LINE>final String diff4 = environment.getNextVariableString();<NEW_LINE>final String diff1Sat = environment.getNextVariableString();<NEW_LINE>final String diff2Sat = environment.getNextVariableString();<NEW_LINE>final String diff3Sat = environment.getNextVariableString();<NEW_LINE>final String diff4Sat = environment.getNextVariableString();<NEW_LINE>final String usignedDoesSat = environment.getNextVariableString();<NEW_LINE>long baseOffset = offset;<NEW_LINE>// Do the Subs<NEW_LINE>instructions.add(ReilHelpers.createSub(baseOffset++, dw, firstFour[0], dw, secondFour[0], dw, diff1));<NEW_LINE>instructions.add(ReilHelpers.createSub(baseOffset++, dw, firstFour[1], dw, secondFour[1], dw, diff2));<NEW_LINE>instructions.add(ReilHelpers.createSub(baseOffset++, dw, firstFour[2], dw, secondFour[2], dw, diff3));<NEW_LINE>instructions.add(ReilHelpers.createSub(baseOffset++, dw, firstFour[3], dw, secondFour[3], dw, diff4));<NEW_LINE>// Do the sat<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, firstFour[0], secondFour[0], diff1, subOperation, diff1Sat, 8, usignedDoesSat);<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, firstFour[1], secondFour[1], diff2, subOperation, diff2Sat, 8, usignedDoesSat);<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, firstFour[2], secondFour[2], diff3, <MASK><NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, firstFour[3], secondFour[3], diff4, subOperation, diff4Sat, 8, usignedDoesSat);<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>return new String[] { diff1Sat, diff2Sat, diff3Sat, diff4Sat };<NEW_LINE>}
subOperation, diff3Sat, 8, usignedDoesSat);
263,243
void readOemPermissions(@NonNull XmlPullParser parser) throws IOException, XmlPullParserException {<NEW_LINE>final String packageName = parser.getAttributeValue(null, "package");<NEW_LINE>if (TextUtils.isEmpty(packageName)) {<NEW_LINE>Log.w(TAG, "package is required for <oem-permissions> in " + parser.getPositionDescription());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ArrayMap<String, Boolean> permissions = mOemPermissions.get(packageName);<NEW_LINE>if (permissions == null) {<NEW_LINE>permissions = new ArrayMap<>();<NEW_LINE>}<NEW_LINE>final int depth = parser.getDepth();<NEW_LINE>while (XmlUtils.nextElementWithin(parser, depth)) {<NEW_LINE>final String name = parser.getName();<NEW_LINE>if ("permission".equals(name)) {<NEW_LINE>final String permName = parser.getAttributeValue(null, "name");<NEW_LINE>if (TextUtils.isEmpty(permName)) {<NEW_LINE>Log.w(TAG, "name is required for <permission> in " + parser.getPositionDescription());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>permissions.put(permName, Boolean.TRUE);<NEW_LINE>} else if ("deny-permission".equals(name)) {<NEW_LINE>String permName = <MASK><NEW_LINE>if (TextUtils.isEmpty(permName)) {<NEW_LINE>Log.w(TAG, "name is required for <deny-permission> in " + parser.getPositionDescription());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>permissions.put(permName, Boolean.FALSE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mOemPermissions.put(packageName, permissions);<NEW_LINE>}
parser.getAttributeValue(null, "name");
563,820
public void marshall(PutSessionRequest putSessionRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (putSessionRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getBotName(), BOTNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getBotAlias(), BOTALIAS_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getUserId(), USERID_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getSessionAttributes(), SESSIONATTRIBUTES_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getDialogAction(), DIALOGACTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getRecentIntentSummaryView(), RECENTINTENTSUMMARYVIEW_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getActiveContexts(), ACTIVECONTEXTS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
putSessionRequest.getAccept(), ACCEPT_BINDING);
678,933
public void calcStats(Stats stats) {<NEW_LINE>stats.clear();<NEW_LINE>stats._num = _dataSize;<NEW_LINE>int totalCount = 0;<NEW_LINE>long sumOfSq = 0;<NEW_LINE>for (int i = 0; i < _staticConfig.getBucketsNum() + 2; ++i) {<NEW_LINE>int count = _histogram[i];<NEW_LINE>totalCount += count;<NEW_LINE>int curValue = _bucketValues[i];<NEW_LINE>stats._sum += curValue * count;<NEW_LINE>sumOfSq += curValue * curValue * count;<NEW_LINE>if (count > 0) {<NEW_LINE>if (curValue < stats._min)<NEW_LINE>stats._min = curValue;<NEW_LINE>if (curValue > stats._max)<NEW_LINE>stats._max = curValue;<NEW_LINE>if (Integer.MIN_VALUE == stats._median && totalCount >= _dataSize / 2)<NEW_LINE>stats._median = curValue;<NEW_LINE>if (Integer.MIN_VALUE == stats._perc75 && totalCount >= _dataSize * 0.75)<NEW_LINE>stats._perc75 = curValue;<NEW_LINE>if (Integer.MIN_VALUE == stats._perc90 && totalCount >= _dataSize * 0.90)<NEW_LINE>stats._perc90 = curValue;<NEW_LINE>if (Integer.MIN_VALUE == stats._perc95 && totalCount >= _dataSize * 0.95)<NEW_LINE>stats._perc95 = curValue;<NEW_LINE>if (Integer.MIN_VALUE == stats._perc99 && totalCount >= _dataSize * 0.99)<NEW_LINE>stats._perc99 = curValue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>stats._mean = 0 != stats._num ? 1.0 * stats<MASK><NEW_LINE>stats._stdDev = 1 >= _dataSize ? 0.0 : Math.sqrt((sumOfSq - 2.0 * stats._mean * stats._sum + _dataSize * stats._mean * stats._mean) / (_dataSize - 1.0));<NEW_LINE>}
._sum / stats._num : 0.0;
1,621,524
public static ListPhoneNumbersResponse unmarshall(ListPhoneNumbersResponse listPhoneNumbersResponse, UnmarshallerContext context) {<NEW_LINE>listPhoneNumbersResponse.setRequestId<MASK><NEW_LINE>listPhoneNumbersResponse.setSuccess(context.booleanValue("ListPhoneNumbersResponse.Success"));<NEW_LINE>listPhoneNumbersResponse.setCode(context.stringValue("ListPhoneNumbersResponse.Code"));<NEW_LINE>listPhoneNumbersResponse.setMessage(context.stringValue("ListPhoneNumbersResponse.Message"));<NEW_LINE>listPhoneNumbersResponse.setHttpStatusCode(context.integerValue("ListPhoneNumbersResponse.HttpStatusCode"));<NEW_LINE>List<PhoneNumber> phoneNumbers = new ArrayList<PhoneNumber>();<NEW_LINE>for (int i = 0; i < context.lengthValue("ListPhoneNumbersResponse.PhoneNumbers.Length"); i++) {<NEW_LINE>PhoneNumber phoneNumber = new PhoneNumber();<NEW_LINE>phoneNumber.setPhoneNumberId(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PhoneNumberId"));<NEW_LINE>phoneNumber.setInstanceId(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].InstanceId"));<NEW_LINE>phoneNumber.setNumber(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].Number"));<NEW_LINE>phoneNumber.setPhoneNumberDescription(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PhoneNumberDescription"));<NEW_LINE>phoneNumber.setTestOnly(context.booleanValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].TestOnly"));<NEW_LINE>phoneNumber.setRemainingTime(context.integerValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].RemainingTime"));<NEW_LINE>phoneNumber.setAllowOutbound(context.booleanValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].AllowOutbound"));<NEW_LINE>phoneNumber.setUsage(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].Usage"));<NEW_LINE>phoneNumber.setTrunks(context.integerValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].Trunks"));<NEW_LINE>phoneNumber.setProvince(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].Province"));<NEW_LINE>phoneNumber.setCity(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].City"));<NEW_LINE>phoneNumber.setAssignee(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].Assignee"));<NEW_LINE>phoneNumber.setNumberCommodityStatus(context.integerValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].NumberCommodityStatus"));<NEW_LINE>ContactFlow contactFlow = new ContactFlow();<NEW_LINE>contactFlow.setContactFlowId(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.ContactFlowId"));<NEW_LINE>contactFlow.setInstanceId(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.InstanceId"));<NEW_LINE>contactFlow.setContactFlowName(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.ContactFlowName"));<NEW_LINE>contactFlow.setContactFlowDescription(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.ContactFlowDescription"));<NEW_LINE>contactFlow.setType(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.Type"));<NEW_LINE>phoneNumber.setContactFlow(contactFlow);<NEW_LINE>PrivacyNumber privacyNumber = new PrivacyNumber();<NEW_LINE>privacyNumber.setPoolId(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PrivacyNumber.PoolId"));<NEW_LINE>privacyNumber.setType(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PrivacyNumber.Type"));<NEW_LINE>privacyNumber.setTelX(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PrivacyNumber.TelX"));<NEW_LINE>privacyNumber.setPoolName(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PrivacyNumber.PoolName"));<NEW_LINE>privacyNumber.setPhoneNumber(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PrivacyNumber.PhoneNumber"));<NEW_LINE>privacyNumber.setExtra(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PrivacyNumber.Extra"));<NEW_LINE>privacyNumber.setBizId(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PrivacyNumber.BizId"));<NEW_LINE>privacyNumber.setSubId(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PrivacyNumber.SubId"));<NEW_LINE>privacyNumber.setRegionNameCity(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].PrivacyNumber.RegionNameCity"));<NEW_LINE>phoneNumber.setPrivacyNumber(privacyNumber);<NEW_LINE>List<SkillGroup> skillGroups = new ArrayList<SkillGroup>();<NEW_LINE>for (int j = 0; j < context.lengthValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].SkillGroups.Length"); j++) {<NEW_LINE>SkillGroup skillGroup = new SkillGroup();<NEW_LINE>skillGroup.setSkillGroupId(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].SkillGroups[" + j + "].SkillGroupId"));<NEW_LINE>skillGroup.setSkillGroupName(context.stringValue("ListPhoneNumbersResponse.PhoneNumbers[" + i + "].SkillGroups[" + j + "].SkillGroupName"));<NEW_LINE>skillGroups.add(skillGroup);<NEW_LINE>}<NEW_LINE>phoneNumber.setSkillGroups(skillGroups);<NEW_LINE>phoneNumbers.add(phoneNumber);<NEW_LINE>}<NEW_LINE>listPhoneNumbersResponse.setPhoneNumbers(phoneNumbers);<NEW_LINE>return listPhoneNumbersResponse;<NEW_LINE>}
(context.stringValue("ListPhoneNumbersResponse.RequestId"));
815,817
private List<Wo> list(Business business, Wi wi) throws Exception {<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>List<Unit> os = business.unit().pick(wi.getUnitList());<NEW_LINE>List<String> unitIds = ListTools.extractField(os, Unit.id_FIELDNAME, String.class, true, true);<NEW_LINE>List<Identity> list = new ArrayList<>();<NEW_LINE>if (ListTools.isNotEmpty(unitIds)) {<NEW_LINE>list = business.entityManagerContainer().fetchIn(Identity.class, ListTools.toList(Identity.id_FIELDNAME, Identity.person_FIELDNAME, Identity.orderNumber_FIELDNAME<MASK><NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(list)) {<NEW_LINE>Map<String, Integer> map = new HashMap<>();<NEW_LINE>for (Identity identity : list) {<NEW_LINE>map.put(identity.getPerson(), identity.getOrderNumber());<NEW_LINE>}<NEW_LINE>for (Person o : business.person().pick(new ArrayList<>(map.keySet()))) {<NEW_LINE>o.setOrderNumber(map.get(o.getId()));<NEW_LINE>wos.add(this.convert(business, o, Wo.class));<NEW_LINE>}<NEW_LINE>wos = wos.stream().sorted(Comparator.comparing(Wo::getOrderNumber, Comparator.nullsLast(Integer::compareTo)).thenComparing(Comparator.comparing(Wo::getName, Comparator.nullsFirst(String::compareTo)).reversed())).collect(Collectors.toList());<NEW_LINE>}<NEW_LINE>return wos;<NEW_LINE>}
), Identity.unit_FIELDNAME, unitIds);
1,808,385
private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String dataCollectionEndpointName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (dataCollectionEndpointName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter dataCollectionEndpointName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2021-04-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, dataCollectionEndpointName, apiVersion, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
714,929
public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) {<NEW_LINE>if (object == null) {<NEW_LINE>jsonWriter.writeNull();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>GeoJsonPolygon polygon = (GeoJsonPolygon) object;<NEW_LINE>if (jsonWriter.isUTF8()) {<NEW_LINE>jsonWriter.writeRaw(utf8Prefix);<NEW_LINE>} else if (jsonWriter.isUTF16()) {<NEW_LINE>jsonWriter.writeRaw(charsPrefix);<NEW_LINE>} else {<NEW_LINE>jsonWriter.startObject();<NEW_LINE>jsonWriter.writeName("type");<NEW_LINE>jsonWriter.writeColon();<NEW_LINE>jsonWriter.writeString("Point");<NEW_LINE>jsonWriter.writeName("coordinates");<NEW_LINE>jsonWriter.writeColon();<NEW_LINE>}<NEW_LINE>List<GeoJsonLineString<MASK><NEW_LINE>jsonWriter.startArray();<NEW_LINE>for (int i = 0; i < coordinates.size(); i++) {<NEW_LINE>if (i != 0) {<NEW_LINE>jsonWriter.writeComma();<NEW_LINE>}<NEW_LINE>GeoJsonLineString lineString = coordinates.get(i);<NEW_LINE>jsonWriter.startArray();<NEW_LINE>List<Point> points = lineString.getCoordinates();<NEW_LINE>for (int j = 0; j < points.size(); j++) {<NEW_LINE>if (j != 0) {<NEW_LINE>jsonWriter.writeComma();<NEW_LINE>}<NEW_LINE>Point point = points.get(i);<NEW_LINE>jsonWriter.writeDoubleArray(point.getX(), point.getY());<NEW_LINE>}<NEW_LINE>jsonWriter.endArray();<NEW_LINE>}<NEW_LINE>jsonWriter.endArray();<NEW_LINE>jsonWriter.endObject();<NEW_LINE>}
> coordinates = polygon.getCoordinates();
1,762,075
public String showShortcutsDialog() {<NEW_LINE><MASK><NEW_LINE>d.init(this);<NEW_LINE>final DialogDescriptor descriptor = new DialogDescriptor(d, loc("Add_Shortcut_Dialog"), true, new Object[] { DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION }, DialogDescriptor.OK_OPTION, DialogDescriptor.DEFAULT_ALIGN, null, d.getListener());<NEW_LINE>descriptor.setClosingOptions(new Object[] { DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION });<NEW_LINE>descriptor.setAdditionalOptions(new Object[] { d.getBClear(), d.getBTab() });<NEW_LINE>descriptor.setValid(d.isShortcutValid());<NEW_LINE>d.addPropertyChangeListener(new PropertyChangeListener() {<NEW_LINE><NEW_LINE>public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE>if (evt.getPropertyName() == null || ShortcutsDialog.PROP_SHORTCUT_VALID.equals(evt.getPropertyName())) {<NEW_LINE>descriptor.setValid(d.isShortcutValid());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>DialogDisplayer.getDefault().notify(descriptor);<NEW_LINE>if (descriptor.getValue() == DialogDescriptor.OK_OPTION)<NEW_LINE>return d.getTfShortcut().getText();<NEW_LINE>return null;<NEW_LINE>}
final ShortcutsDialog d = new ShortcutsDialog();
437,241
public YamlDatabaseDiscoveryRuleConfiguration swapToYamlConfiguration(final AlgorithmProvidedDatabaseDiscoveryRuleConfiguration data) {<NEW_LINE>YamlDatabaseDiscoveryRuleConfiguration result = new YamlDatabaseDiscoveryRuleConfiguration();<NEW_LINE>result.setDataSources(data.getDataSources().stream().collect(Collectors.toMap(DatabaseDiscoveryDataSourceRuleConfiguration::getGroupName, this::swapToYamlConfiguration, (oldValue, currentValue) -> oldValue, LinkedHashMap::new)));<NEW_LINE>if (null != data.getDiscoveryHeartbeats()) {<NEW_LINE>data.getDiscoveryHeartbeats().forEach((key, value) -> result.getDiscoveryHeartbeats().put(key, swapToYamlConfiguration(value)));<NEW_LINE>}<NEW_LINE>if (null != data.getDiscoveryTypes()) {<NEW_LINE>data.getDiscoveryTypes().forEach((key, value) -> result.getDiscoveryTypes().put(key, new YamlShardingSphereAlgorithmConfiguration(value.getType(), <MASK><NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
value.getProps())));
620,823
private void append() {<NEW_LINE>if (maskBuffer.capacity() - bufferPos < 8) {<NEW_LINE>maskBuffer = growBuffer(maskBuffer, maskBufferGrowth());<NEW_LINE>maskBuffer.position(0);<NEW_LINE>}<NEW_LINE>maskBuffer.putLong(bufferPos, mask);<NEW_LINE>bufferPos += bytesPerMask;<NEW_LINE>for (Container container : slice) {<NEW_LINE>if (!container.isEmpty()) {<NEW_LINE>Container toSerialize = container.runOptimize();<NEW_LINE>int serializedSize = toSerialize.serializedSizeInBytes();<NEW_LINE>int type = (toSerialize instanceof BitmapContainer) ? BITMAP : (toSerialize instanceof RunContainer) ? RUN : ARRAY;<NEW_LINE>int required = serializedSize + (<MASK><NEW_LINE>if (containers.capacity() - serializedContainerSize < required) {<NEW_LINE>containers = growBuffer(containers, containerGrowth() * 1024);<NEW_LINE>}<NEW_LINE>containers.put(serializedContainerSize, (byte) type);<NEW_LINE>if (type == BITMAP) {<NEW_LINE>containers.putChar(serializedContainerSize + 1, (char) (container.getCardinality()));<NEW_LINE>containers.position(serializedContainerSize + 3);<NEW_LINE>toSerialize.writeArray(containers);<NEW_LINE>containers.position(0);<NEW_LINE>serializedContainerSize += required;<NEW_LINE>} else if (type == RUN) {<NEW_LINE>containers.position(serializedContainerSize + 1);<NEW_LINE>toSerialize.writeArray(containers);<NEW_LINE>containers.position(0);<NEW_LINE>serializedContainerSize += required;<NEW_LINE>} else {<NEW_LINE>containers.putChar(serializedContainerSize + 1, (char) (container.getCardinality()));<NEW_LINE>containers.position(serializedContainerSize + 3);<NEW_LINE>toSerialize.writeArray(containers);<NEW_LINE>containers.position(0);<NEW_LINE>serializedContainerSize += required;<NEW_LINE>}<NEW_LINE>// for reuse<NEW_LINE>container.clear();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mask = 0;<NEW_LINE>key++;<NEW_LINE>}
type == BITMAP ? 3 : 1);
1,473,327
public final PatternInclusionExpressionContext patternInclusionExpression() throws RecognitionException {<NEW_LINE>PatternInclusionExpressionContext _localctx = new PatternInclusionExpressionContext(_ctx, getState());<NEW_LINE><MASK><NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(1672);<NEW_LINE>match(PATTERN);<NEW_LINE>setState(1676);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>while (_la == ATCHAR) {<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(1673);<NEW_LINE>annotationEnum();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(1678);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>setState(1679);<NEW_LINE>match(LBRACK);<NEW_LINE>setState(1680);<NEW_LINE>patternExpression();<NEW_LINE>setState(1681);<NEW_LINE>match(RBRACK);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
enterRule(_localctx, 220, RULE_patternInclusionExpression);
833,637
private boolean initRocksDB(final StoreEngineOptions opts) {<NEW_LINE>RocksDBOptions rocksOpts = opts.getRocksDBOptions();<NEW_LINE>if (rocksOpts == null) {<NEW_LINE>rocksOpts = new RocksDBOptions();<NEW_LINE>opts.setRocksDBOptions(rocksOpts);<NEW_LINE>}<NEW_LINE>String dbPath = rocksOpts.getDbPath();<NEW_LINE>if (Strings.isNotBlank(dbPath)) {<NEW_LINE>try {<NEW_LINE>FileUtils.forceMkdir(new File(dbPath));<NEW_LINE>} catch (final Throwable t) {<NEW_LINE><MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>dbPath = "";<NEW_LINE>}<NEW_LINE>final String childPath = "db_" + this.storeId + "_" + opts.getServerAddress().getPort();<NEW_LINE>rocksOpts.setDbPath(Paths.get(dbPath, childPath).toString());<NEW_LINE>this.dbPath = new File(rocksOpts.getDbPath());<NEW_LINE>final RocksRawKVStore rocksRawKVStore = new RocksRawKVStore();<NEW_LINE>if (!rocksRawKVStore.init(rocksOpts)) {<NEW_LINE>LOG.error("Fail to init [RocksRawKVStore].");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>this.rawKVStore = rocksRawKVStore;<NEW_LINE>return true;<NEW_LINE>}
LOG.error("Fail to make dir for dbPath {}.", dbPath);
620,838
public static Bitmap rotateImageExif(@NonNull BitmapPool pool, @NonNull Bitmap inBitmap, int exifOrientation) {<NEW_LINE>if (!isExifOrientationRequired(exifOrientation)) {<NEW_LINE>return inBitmap;<NEW_LINE>}<NEW_LINE>final Matrix matrix = new Matrix();<NEW_LINE>initializeMatrixForRotation(exifOrientation, matrix);<NEW_LINE>// From Bitmap.createBitmap.<NEW_LINE>final RectF newRect = new RectF(0, 0, inBitmap.getWidth(), inBitmap.getHeight());<NEW_LINE>matrix.mapRect(newRect);<NEW_LINE>final int newWidth = Math.round(newRect.width());<NEW_LINE>final int newHeight = Math.<MASK><NEW_LINE>Bitmap.Config config = getNonNullConfig(inBitmap);<NEW_LINE>Bitmap result = pool.get(newWidth, newHeight, config);<NEW_LINE>matrix.postTranslate(-newRect.left, -newRect.top);<NEW_LINE>result.setHasAlpha(inBitmap.hasAlpha());<NEW_LINE>applyMatrix(inBitmap, result, matrix);<NEW_LINE>return result;<NEW_LINE>}
round(newRect.height());
1,297,910
<T> T evictionOrder(boolean hottest, Function<V, V> transformer, Function<Stream<CacheEntry<K, V>>, T> mappingFunction) {<NEW_LINE>Comparator<Node<K, V>> comparator = Comparator.comparingInt(node -> {<NEW_LINE>K key = node.getKey();<NEW_LINE>return (key == null) ? 0 : frequencySketch().frequency(key);<NEW_LINE>});<NEW_LINE>Iterable<Node<K, V>> iterable;<NEW_LINE>if (hottest) {<NEW_LINE>iterable = () -> {<NEW_LINE>var secondary = PeekingIterator.comparing(accessOrderProbationDeque().descendingIterator(), accessOrderWindowDeque().descendingIterator(), comparator);<NEW_LINE>return PeekingIterator.concat(accessOrderProtectedDeque().descendingIterator(), secondary);<NEW_LINE>};<NEW_LINE>} else {<NEW_LINE>iterable = () -> {<NEW_LINE>var primary = PeekingIterator.comparing(accessOrderWindowDeque().iterator(), accessOrderProbationDeque().iterator(), comparator.reversed());<NEW_LINE>return PeekingIterator.concat(primary, <MASK><NEW_LINE>};<NEW_LINE>}<NEW_LINE>return snapshot(iterable, transformer, mappingFunction);<NEW_LINE>}
accessOrderProtectedDeque().iterator());
1,189,955
private static void addToBranch(MXCIFQuadTreeNodeBranch<Object> branch, double x, double y, double width, double height, Object value, MXCIFQuadTree<Object> tree, boolean unique, String indexName) {<NEW_LINE>QuadrantAppliesEnum quadrant = branch.getBb().getQuadrantApplies(x, y, width, height);<NEW_LINE>if (quadrant == QuadrantAppliesEnum.NW) {<NEW_LINE>branch.setNw(addToNode(x, y, width, height, value, branch.getNw(), tree, unique, indexName));<NEW_LINE>} else if (quadrant == QuadrantAppliesEnum.NE) {<NEW_LINE>branch.setNe(addToNode(x, y, width, height, value, branch.getNe()<MASK><NEW_LINE>} else if (quadrant == QuadrantAppliesEnum.SW) {<NEW_LINE>branch.setSw(addToNode(x, y, width, height, value, branch.getSw(), tree, unique, indexName));<NEW_LINE>} else if (quadrant == QuadrantAppliesEnum.SE) {<NEW_LINE>branch.setSe(addToNode(x, y, width, height, value, branch.getSe(), tree, unique, indexName));<NEW_LINE>} else if (quadrant == QuadrantAppliesEnum.SOME) {<NEW_LINE>int numAdded = addToData(branch, x, y, width, height, value, unique, indexName);<NEW_LINE>branch.incCount(numAdded);<NEW_LINE>} else {<NEW_LINE>throw new IllegalStateException("Applies to none");<NEW_LINE>}<NEW_LINE>}
, tree, unique, indexName));
1,316,629
private void traverseToLeaves(final PackageDependenciesNode treeNode, final StringBuffer denyRules, final StringBuffer allowRules) {<NEW_LINE>final Enumeration enumeration = treeNode.breadthFirstEnumeration();<NEW_LINE>while (enumeration.hasMoreElements()) {<NEW_LINE>PsiElement childPsiElement = ((PackageDependenciesNode) enumeration.nextElement()).getPsiElement();<NEW_LINE>if (myIllegalDependencies.containsKey(childPsiElement)) {<NEW_LINE>final Map<DependencyRule, Set<PsiFile>> <MASK><NEW_LINE>for (final DependencyRule rule : illegalDeps.keySet()) {<NEW_LINE>if (rule.isDenyRule()) {<NEW_LINE>if (denyRules.indexOf(rule.getDisplayText()) == -1) {<NEW_LINE>denyRules.append(rule.getDisplayText());<NEW_LINE>denyRules.append("\n");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (allowRules.indexOf(rule.getDisplayText()) == -1) {<NEW_LINE>allowRules.append(rule.getDisplayText());<NEW_LINE>allowRules.append("\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
illegalDeps = myIllegalDependencies.get(childPsiElement);
1,673,400
public DataBuffer convertDataEx(DataTypeEx typeSrc, DataBuffer source, DataTypeEx typeDst) {<NEW_LINE>int elementSize = 0;<NEW_LINE>if (typeDst.ordinal() <= 2)<NEW_LINE>elementSize = 1;<NEW_LINE>else if (typeDst.ordinal() <= 5)<NEW_LINE>elementSize = 2;<NEW_LINE>else if (typeDst.ordinal() == 6)<NEW_LINE>elementSize = 4;<NEW_LINE>else if (typeDst.ordinal() == 7)<NEW_LINE>elementSize = 8;<NEW_LINE>else<NEW_LINE>throw new UnsupportedOperationException("Unknown target TypeEx: " + typeDst.name());<NEW_LINE>// flushQueue should be blocking here, because typeConversion happens on cpu side<NEW_LINE>Nd4j.getExecutioner().commit();<NEW_LINE>DataBuffer buffer = null;<NEW_LINE>if (!(source instanceof CompressedDataBuffer))<NEW_LINE>AtomicAllocator.getInstance().synchronizeHostData(source);<NEW_LINE>if (CompressionUtils.goingToCompress(typeSrc, typeDst)) {<NEW_LINE>// all types below 8 are compression modes<NEW_LINE>Pointer pointer = new BytePointer(source.length() * elementSize);<NEW_LINE>CompressionDescriptor descriptor = new CompressionDescriptor(<MASK><NEW_LINE>descriptor.setCompressionType(CompressionType.LOSSY);<NEW_LINE>descriptor.setCompressedLength(source.length() * elementSize);<NEW_LINE>buffer = new CompressedDataBuffer(pointer, descriptor);<NEW_LINE>} else {<NEW_LINE>CompressedDataBuffer compressed = (CompressedDataBuffer) source;<NEW_LINE>CompressionDescriptor descriptor = compressed.getCompressionDescriptor();<NEW_LINE>// decompression mode<NEW_LINE>buffer = Nd4j.createBuffer(descriptor.getNumberOfElements(), false);<NEW_LINE>AllocationPoint point = AtomicAllocator.getInstance().getAllocationPoint(buffer);<NEW_LINE>point.tickDeviceWrite();<NEW_LINE>}<NEW_LINE>convertDataEx(typeSrc, source, typeDst, buffer);<NEW_LINE>return buffer;<NEW_LINE>}
source, typeDst.name());
618,152
public static Bundle bundleFromSerializedString(String string) {<NEW_LINE>if (string == null)<NEW_LINE>return new Bundle();<NEW_LINE>Bundle result = new Bundle();<NEW_LINE>fromSerialized(string, result, new SerializedPut<Bundle>() {<NEW_LINE><NEW_LINE>public void put(Bundle object, String key, char type, String value) throws NumberFormatException {<NEW_LINE>switch(type) {<NEW_LINE>case 'i':<NEW_LINE>object.putInt(key, Integer.parseInt(value));<NEW_LINE>break;<NEW_LINE>case 'd':<NEW_LINE>object.putDouble(key, Double.parseDouble(value));<NEW_LINE>break;<NEW_LINE>case 'l':<NEW_LINE>object.putLong(key, Long.parseLong(value));<NEW_LINE>break;<NEW_LINE>case 's':<NEW_LINE>object.putString(key, value<MASK><NEW_LINE>break;<NEW_LINE>case 'b':<NEW_LINE>object.putBoolean(key, Boolean.parseBoolean(value));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return result;<NEW_LINE>}
.replace(SEPARATOR_ESCAPE, SERIALIZATION_SEPARATOR));
975,039
public DdlResult execute(ByteString ddlBlob, GraphDef graphDef, int partitionCount) throws InvalidProtocolBufferException {<NEW_LINE>TypeDefPb typeDefPb = TypeDefPb.parseFrom(ddlBlob);<NEW_LINE>TypeDef <MASK><NEW_LINE>long version = graphDef.getSchemaVersion();<NEW_LINE>String label = typeDef.getLabel();<NEW_LINE>if (!graphDef.hasLabel(label)) {<NEW_LINE>throw new DdlException("label [" + label + "] not exists, schema version [" + version + "]");<NEW_LINE>}<NEW_LINE>LabelId labelId = graphDef.getLabelId(label);<NEW_LINE>Set<EdgeKind> edgeKindSet = graphDef.getIdToKinds().get(labelId);<NEW_LINE>if (edgeKindSet != null && edgeKindSet.size() > 0) {<NEW_LINE>throw new DdlException("cannot drop label [" + label + "], since it has related edgeKinds");<NEW_LINE>}<NEW_LINE>GraphDef.Builder graphDefBuilder = GraphDef.newBuilder(graphDef);<NEW_LINE>version++;<NEW_LINE>graphDefBuilder.setVersion(version);<NEW_LINE>graphDefBuilder.removeTypeDef(label);<NEW_LINE>Set<String> remainPropertyNames = new HashSet<>();<NEW_LINE>for (TypeDef remainTypeDef : graphDefBuilder.getAllTypeDefs()) {<NEW_LINE>for (PropertyDef property : remainTypeDef.getProperties()) {<NEW_LINE>remainPropertyNames.add(property.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>graphDefBuilder.clearUnusedPropertyName(remainPropertyNames);<NEW_LINE>GraphDef newGraphDef = graphDefBuilder.build();<NEW_LINE>List<Operation> operations = new ArrayList<>(partitionCount);<NEW_LINE>for (int i = 0; i < partitionCount; i++) {<NEW_LINE>operations.add(makeOperation(i, version, labelId));<NEW_LINE>}<NEW_LINE>return new DdlResult(newGraphDef, operations);<NEW_LINE>}
typeDef = TypeDef.parseProto(typeDefPb);
912,130
public IPSetReferenceStatement unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>IPSetReferenceStatement iPSetReferenceStatement = new IPSetReferenceStatement();<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("ARN", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>iPSetReferenceStatement.setARN(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("IPSetForwardedIPConfig", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>iPSetReferenceStatement.setIPSetForwardedIPConfig(IPSetForwardedIPConfigJsonUnmarshaller.getInstance<MASK><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 iPSetReferenceStatement;<NEW_LINE>}
().unmarshall(context));
1,288,171
public void map(LongWritable key, Text value, OutputCollector<LongWritable, Text> output, Reporter reporter) throws IOException {<NEW_LINE>int slotId = Integer.parseInt(value.toString().trim());<NEW_LINE>generator.fireRandom(slotId);<NEW_LINE>try {<NEW_LINE>DecimalFormat df = new DecimalFormat("00000");<NEW_LINE>String name = "part-" + df.format(slotId);<NEW_LINE>FileSystem <MASK><NEW_LINE>Path crawldb = new Path(new Path(new Path(workdir, CRAWLDB_DIR_NAME), "current"), name);<NEW_LINE>SequenceFile.Writer crawldbOut = new SequenceFile.Writer(fs, job, crawldb, Text.class, CrawlDatum.class);<NEW_LINE>Path crawl = new Path(new Path(workdir, CrawlDatum.PARSE_DIR_NAME), name);<NEW_LINE>SequenceFile.Writer crawlOut = new SequenceFile.Writer(fs, job, crawl, Text.class, CrawlDatum.class);<NEW_LINE>Path generate = new Path(new Path(workdir, CrawlDatum.FETCH_DIR_NAME), name);<NEW_LINE>SequenceFile.Writer generateOut = new SequenceFile.Writer(fs, job, generate, Text.class, CrawlDatum.class);<NEW_LINE>CrawlDatum datum = new CrawlDatum();<NEW_LINE>long i = slotId - 1;<NEW_LINE>while (i < generator.totalpages) {<NEW_LINE>key.set(i);<NEW_LINE>Text textUrl = generator.nextUrlText();<NEW_LINE>if (i < generator.pages) {<NEW_LINE>datum.setStatus(CrawlDatum.STATUS_FETCH_SUCCESS);<NEW_LINE>crawlOut.append(textUrl, datum);<NEW_LINE>datum.setStatus(CrawlDatum.STATUS_FETCH_SUCCESS);<NEW_LINE>generateOut.append(textUrl, datum);<NEW_LINE>datum.setStatus(CrawlDatum.STATUS_DB_FETCHED);<NEW_LINE>crawldbOut.append(textUrl, datum);<NEW_LINE>} else {<NEW_LINE>datum.setStatus(CrawlDatum.STATUS_LINKED);<NEW_LINE>crawldbOut.append(textUrl, datum);<NEW_LINE>}<NEW_LINE>output.collect(key, textUrl);<NEW_LINE>if (0 == ((i / generator.slots) % 10000)) {<NEW_LINE>log.info("still running: " + i + " of <" + generator.pages + ", " + generator.totalpages + ">");<NEW_LINE>}<NEW_LINE>i = i + generator.slots;<NEW_LINE>}<NEW_LINE>crawlOut.close();<NEW_LINE>crawldbOut.close();<NEW_LINE>generateOut.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// TODO Auto-generated catch block<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
fs = workdir.getFileSystem(job);
8,953
private static void fillDocumentsTableArrays() {<NEW_LINE>if (documentsTableID == null) {<NEW_LINE>String sql = "SELECT t.AD_Table_ID, t.TableName " + "FROM AD_Table t, AD_Column c " + "WHERE t.AD_Table_ID=c.AD_Table_ID AND " + "c.ColumnName='Posted' AND " + "IsView='N' " + "ORDER BY t.AD_Table_ID";<NEW_LINE>ArrayList<Integer> tableIDs = new ArrayList<Integer>();<NEW_LINE>ArrayList<String> tableNames = new ArrayList<String>();<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sql, null);<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>while (rs.next()) {<NEW_LINE>tableIDs.add(rs.getInt(1));<NEW_LINE>tableNames.add(rs.getString(2));<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>throw new DBException(e, sql);<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>rs = null;<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>// Convert to array<NEW_LINE>documentsTableID = new <MASK><NEW_LINE>documentsTableName = new String[tableIDs.size()];<NEW_LINE>for (int i = 0; i < documentsTableID.length; i++) {<NEW_LINE>documentsTableID[i] = tableIDs.get(i);<NEW_LINE>documentsTableName[i] = tableNames.get(i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
int[tableIDs.size()];
1,517,758
protected void readFromTaskOnInitialize() {<NEW_LINE>Date date;<NEW_LINE>if (model.getValue(Task.DUE_DATE) != 0) {<NEW_LINE>date = new Date(model.getValue(Task.DUE_DATE));<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < 7; i++) daysOfWeek[i].setChecked(i == dayOfWeek);<NEW_LINE>}<NEW_LINE>// read recurrence rule<NEW_LINE>if (recurrence.length() > 0) {<NEW_LINE>try {<NEW_LINE>RRule rrule = new RRule(recurrence);<NEW_LINE>setRepeatValue(rrule.getInterval());<NEW_LINE>setRepeatUntilValue(model.getValue(Task.REPEAT_UNTIL));<NEW_LINE>interval.setSelection(intervalValue);<NEW_LINE>// clear all day of week checks, then update them<NEW_LINE>for (int i = 0; i < 7; i++) daysOfWeek[i].setChecked(false);<NEW_LINE>for (WeekdayNum day : rrule.getByDay()) {<NEW_LINE>for (int i = 0; i < 7; i++) if (daysOfWeek[i].getTag().equals(day.wday))<NEW_LINE>daysOfWeek[i].setChecked(true);<NEW_LINE>}<NEW_LINE>// suppress first call to interval.onItemSelected<NEW_LINE>setInterval = true;<NEW_LINE>} catch (Exception e) {<NEW_LINE>// invalid RRULE<NEW_LINE>// $NON-NLS-1$<NEW_LINE>recurrence = "";<NEW_LINE>exceptionService.reportError("repeat-parse-exception", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>doRepeat = recurrence.length() > 0;<NEW_LINE>// read flag<NEW_LINE>if (model.repeatAfterCompletion())<NEW_LINE>type.setSelection(TYPE_COMPLETION_DATE);<NEW_LINE>else<NEW_LINE>type.setSelection(TYPE_DUE_DATE);<NEW_LINE>refreshDisplayView();<NEW_LINE>}
int dayOfWeek = date.getDay();
512,791
public Object execute(ExecutionEvent event) throws ExecutionException {<NEW_LINE>final IProject selectedProject = getSelectedProject(event.getApplicationContext());<NEW_LINE>if (selectedProject == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Job job = new Job(Messages.GitProjectView_AttachGitRepo_jobTitle) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>SubMonitor sub = <MASK><NEW_LINE>try {<NEW_LINE>getGitRepositoryManager().createOrAttach(selectedProject, sub.newChild(100));<NEW_LINE>} catch (CoreException e) {<NEW_LINE>IdeLog.logError(GitUIPlugin.getDefault(), e, IDebugScopes.DEBUG);<NEW_LINE>return e.getStatus();<NEW_LINE>} finally {<NEW_LINE>sub.done();<NEW_LINE>}<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>job.setUser(true);<NEW_LINE>job.setPriority(Job.LONG);<NEW_LINE>job.schedule();<NEW_LINE>return null;<NEW_LINE>}
SubMonitor.convert(monitor, 100);
1,068,419
private void applyNewSplits(String textureRegionName, int[] splits) {<NEW_LINE>// first need to modify original image<NEW_LINE>FileHandle packAtlas = Gdx.files.internal(plugin.getAPI().getProjectPath() + "/assets/orig/pack/pack.atlas");<NEW_LINE>FileHandle imagesDir = Gdx.files.internal(plugin.getAPI().getProjectPath() + "/assets/orig/pack/");<NEW_LINE>TextureAtlas.TextureAtlasData atlas = new TextureAtlas.TextureAtlasData(packAtlas, imagesDir, false);<NEW_LINE>BufferedImage finalImage = imageUtils.<MASK><NEW_LINE>imageUtils.saveImage(finalImage, plugin.getAPI().getProjectPath() + "/assets/orig/images/" + textureRegionName + ".9.png");<NEW_LINE>// now need to modify the pack<NEW_LINE>String content = packAtlas.readString();<NEW_LINE>int regionIndex = content.indexOf(textureRegionName);<NEW_LINE>int splitStart = content.indexOf("split: ", regionIndex) + "split: ".length();<NEW_LINE>int splitEnd = content.indexOf("orig: ", splitStart);<NEW_LINE>String splitStr = splits[0] + ", " + splits[1] + ", " + splits[2] + ", " + splits[3] + "\n ";<NEW_LINE>String newContent = content.substring(0, splitStart) + splitStr + content.substring(splitEnd, content.length());<NEW_LINE>File test = new File(plugin.getAPI().getProjectPath() + "/assets/orig/pack/pack.atlas");<NEW_LINE>writeFile(newContent, test);<NEW_LINE>// reload<NEW_LINE>plugin.getAPI().reLoadProject();<NEW_LINE>}
extractImage(atlas, textureRegionName, splits);
73,305
public static String add_str(String a, String b, int n) {<NEW_LINE>a = trim(a, n);<NEW_LINE>b = trim(b, n);<NEW_LINE>String val = "";<NEW_LINE>int i, rem = 0;<NEW_LINE>char[<MASK><NEW_LINE>char[] c2 = b.toCharArray();<NEW_LINE>int[] ans = new int[a.length() + 1];<NEW_LINE>for (i = a.length(); i > 0; i--) {<NEW_LINE>ans[i] = (c1[i - 1] - 48 + c2[i - 1] - 48 + rem) % 10;<NEW_LINE>rem = (c1[i - 1] - 48 + c2[i - 1] - 48 + rem) / 10;<NEW_LINE>}<NEW_LINE>ans[0] = rem;<NEW_LINE>for (i = 0; i < ans.length; i++) val = val + ans[i];<NEW_LINE>val = trim(val, a.length() + 1);<NEW_LINE>return val;<NEW_LINE>}
] c1 = a.toCharArray();
1,409,276
Object repeat(VirtualFrame frame, Object obj, long n, @Cached PyObjectLookupAttr lookupNode, @Cached CallNode callNode, @Cached("createMul()") MulNode mulNode, @Shared("check") @SuppressWarnings("unused") @Cached com.oracle.graal.python.lib.PySequenceCheckNode checkNode, @Cached TransformExceptionToNativeNode transformExceptionToNativeNode) {<NEW_LINE>try {<NEW_LINE>Object imulCallable = lookupNode.execute(frame, obj, __IMUL__);<NEW_LINE>if (imulCallable != PNone.NO_VALUE) {<NEW_LINE>Object ret = callNode.execute(frame, imulCallable, n);<NEW_LINE>return ret;<NEW_LINE>}<NEW_LINE>return mulNode.executeObject(frame, obj, n);<NEW_LINE>} catch (PException e) {<NEW_LINE>transformExceptionToNativeNode.execute(e);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
return getContext().getNativeNull();
371,172
/*<NEW_LINE>* Verify if method identifier positions include selection.<NEW_LINE>* If so, create field reference, store it and abort comment parse.<NEW_LINE>* Otherwise return null as we do not need this reference.<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException {<NEW_LINE>// may be > 0 for inner class constructor reference<NEW_LINE>int memberPtr = this.identifierLengthStack[0] - 1;<NEW_LINE>int start = (int) (this.identifierPositionStack<MASK><NEW_LINE>int end = (int) this.identifierPositionStack[memberPtr];<NEW_LINE>if (start <= this.selectionStart && this.selectionEnd <= end) {<NEW_LINE>this.selectedNode = (ASTNode) super.createMethodReference(receiver, arguments);<NEW_LINE>this.abort = true;<NEW_LINE>if (SelectionEngine.DEBUG) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>System.out.println(" selected method=" + this.selectedNode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
[memberPtr] >>> 32);
144,384
public boolean execute(Object object) throws ContractExeException {<NEW_LINE>TransactionResultCapsule ret = (TransactionResultCapsule) object;<NEW_LINE>if (Objects.isNull(ret)) {<NEW_LINE>throw new RuntimeException(ActuatorConstant.TX_RESULT_NULL);<NEW_LINE>}<NEW_LINE>long fee = calcFee();<NEW_LINE>AccountStore accountStore = chainBaseManager.getAccountStore();<NEW_LINE>DynamicPropertiesStore dynamicStore = chainBaseManager.getDynamicPropertiesStore();<NEW_LINE>ExchangeStore exchangeStore = chainBaseManager.getExchangeStore();<NEW_LINE>ExchangeV2Store exchangeV2Store = chainBaseManager.getExchangeV2Store();<NEW_LINE>AssetIssueStore assetIssueStore = chainBaseManager.getAssetIssueStore();<NEW_LINE>try {<NEW_LINE>final ExchangeTransactionContract exchangeTransactionContract = this.any.unpack(ExchangeTransactionContract.class);<NEW_LINE>AccountCapsule accountCapsule = accountStore.get(exchangeTransactionContract.getOwnerAddress().toByteArray());<NEW_LINE>ExchangeCapsule exchangeCapsule = Commons.getExchangeStoreFinal(dynamicStore, exchangeStore, exchangeV2Store).get(ByteArray.fromLong(exchangeTransactionContract.getExchangeId()));<NEW_LINE>byte[] firstTokenID = exchangeCapsule.getFirstTokenId();<NEW_LINE>byte[] secondTokenID = exchangeCapsule.getSecondTokenId();<NEW_LINE>byte[] tokenID = exchangeTransactionContract.getTokenId().toByteArray();<NEW_LINE>long tokenQuant = exchangeTransactionContract.getQuant();<NEW_LINE>byte[] anotherTokenID;<NEW_LINE>long anotherTokenQuant = <MASK><NEW_LINE>if (Arrays.equals(tokenID, firstTokenID)) {<NEW_LINE>anotherTokenID = secondTokenID;<NEW_LINE>} else {<NEW_LINE>anotherTokenID = firstTokenID;<NEW_LINE>}<NEW_LINE>long newBalance = accountCapsule.getBalance() - calcFee();<NEW_LINE>accountCapsule.setBalance(newBalance);<NEW_LINE>if (Arrays.equals(tokenID, TRX_SYMBOL_BYTES)) {<NEW_LINE>accountCapsule.setBalance(newBalance - tokenQuant);<NEW_LINE>} else {<NEW_LINE>accountCapsule.reduceAssetAmountV2(tokenID, tokenQuant, dynamicStore, assetIssueStore);<NEW_LINE>}<NEW_LINE>if (Arrays.equals(anotherTokenID, TRX_SYMBOL_BYTES)) {<NEW_LINE>accountCapsule.setBalance(newBalance + anotherTokenQuant);<NEW_LINE>} else {<NEW_LINE>accountCapsule.addAssetAmountV2(anotherTokenID, anotherTokenQuant, dynamicStore, assetIssueStore);<NEW_LINE>}<NEW_LINE>accountStore.put(accountCapsule.createDbKey(), accountCapsule);<NEW_LINE>Commons.putExchangeCapsule(exchangeCapsule, dynamicStore, exchangeStore, exchangeV2Store, assetIssueStore);<NEW_LINE>ret.setExchangeReceivedAmount(anotherTokenQuant);<NEW_LINE>ret.setStatus(fee, code.SUCESS);<NEW_LINE>} catch (ItemNotFoundException | InvalidProtocolBufferException e) {<NEW_LINE>logger.debug(e.getMessage(), e);<NEW_LINE>ret.setStatus(fee, code.FAILED);<NEW_LINE>throw new ContractExeException(e.getMessage());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
exchangeCapsule.transaction(tokenID, tokenQuant);
401,812
protected void initAgents(MessageLogger logger) {<NEW_LINE>List<MapNode> markers = map.getOsmMap().getMarkers();<NEW_LINE>if (markers.size() < 2) {<NEW_LINE>logger.log("Error: Please set two markers with mouse-left.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>visitedStates.clear();<NEW_LINE>String[] locs = new String[markers.size()];<NEW_LINE>for (int i = 0; i < markers.size(); i++) {<NEW_LINE>MapNode node = markers.get(i);<NEW_LINE>Point2D pt = new Point2D(node.getLon(), node.getLat());<NEW_LINE>locs[i] = map.getNearestLocation(pt);<NEW_LINE>}<NEW_LINE>MapAgentFrame.SelectionState state = frame.getSelection();<NEW_LINE>heuristic = createHeuristic(state.getIndex(MapAgentFrame.HEURISTIC_SEL), locs[1]);<NEW_LINE>search = SearchFactory.getInstance().createSearch(state.getIndex(MapAgentFrame.SEARCH_SEL), state.getIndex(MapAgentFrame.Q_SEARCH_IMPL_SEL), heuristic);<NEW_LINE>search.addNodeListener((node) -> visitedStates.add(node.getState()));<NEW_LINE>Agent<MASK><NEW_LINE>switch(state.getIndex(MapAgentFrame.AGENT_SEL)) {<NEW_LINE>case 0:<NEW_LINE>agent = new SimpleMapAgent(map, search, locs[1]).setNotifier(env);<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>Problem<String, MoveToAction> p = new BidirectionalMapProblem(map, null, locs[1]);<NEW_LINE>OnlineSearchProblem<String, MoveToAction> osp = new GeneralProblem<>(null, p::getActions, null, p::testGoal, p::getStepCosts);<NEW_LINE>agent = new LRTAStarAgent<>(osp, MapFunctions.createPerceptToStateFunction(), s -> heuristic.applyAsDouble(new Node<>(s)));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>env.addAgent(agent, locs[0]);<NEW_LINE>}
<DynamicPercept, MoveToAction> agent = null;
228,530
private static ValidatorDefinition loadSingleValidator(ObjectNode node) {<NEW_LINE>node.warnIfAdditionalProperties(VALIDATOR_PROPERTIES);<NEW_LINE>String name = node.expectStringMember("name").getValue();<NEW_LINE>String id = node.getStringMemberOrDefault("id", name);<NEW_LINE>ValidatorDefinition def = new ValidatorDefinition(name, id);<NEW_LINE>def.sourceLocation = node.getSourceLocation();<NEW_LINE>def.message = node.getStringMemberOrDefault("message", null);<NEW_LINE>def.severity = node.getStringMember("severity").map(value -> value.expectOneOf(SEVERITIES)).map(value -> Severity.fromString(value).get()).orElse(null);<NEW_LINE>node.getMember("namespaces").ifPresent(value -> def.namespaces.addAll(loadArrayOfString("namespaces", value)));<NEW_LINE>def.configuration = node.getObjectMember("configuration").<MASK><NEW_LINE>node.getStringMember("selector").ifPresent(selector -> {<NEW_LINE>def.selector = Selector.fromNode(selector);<NEW_LINE>});<NEW_LINE>return def;<NEW_LINE>}
orElse(Node.objectNode());
1,238,729
private static void throwBadAccess(long pointer, long size, Map.Entry<Long, Allocation> fentry, Map.Entry<Long, Allocation> centry) {<NEW_LINE>long now = System.nanoTime();<NEW_LINE>long faddr = fentry == null ? 0 : fentry.getKey();<NEW_LINE>long fsize = fentry == null ? 0 : fentry.getValue().sizeInBytes;<NEW_LINE>long foffset <MASK><NEW_LINE>long caddr = centry == null ? 0 : centry.getKey();<NEW_LINE>long csize = centry == null ? 0 : centry.getValue().sizeInBytes;<NEW_LINE>long coffset = caddr - (pointer + size);<NEW_LINE>boolean floorIsNearest = foffset < coffset;<NEW_LINE>long naddr = floorIsNearest ? faddr : caddr;<NEW_LINE>long nsize = floorIsNearest ? fsize : csize;<NEW_LINE>long noffset = floorIsNearest ? foffset : coffset;<NEW_LINE>List<FreeTrace> recentFrees = Arrays.stream(freeTraces).filter(Objects::nonNull).filter(trace -> trace.contains(pointer)).sorted().collect(Collectors.toList());<NEW_LINE>AssertionError error = new AssertionError(format("Bad access to address 0x%x with size %s, nearest valid allocation is " + "0x%x (%s bytes, off by %s bytes). " + "Recent relevant frees (of %s) are attached as suppressed exceptions.", pointer, size, naddr, nsize, noffset, freeCounter.get()));<NEW_LINE>for (FreeTrace recentFree : recentFrees) {<NEW_LINE>recentFree.referenceTime = now;<NEW_LINE>error.addSuppressed(recentFree);<NEW_LINE>}<NEW_LINE>throw error;<NEW_LINE>}
= pointer - (faddr + fsize);
1,763,125
public static float computeLodEntropy(Mesh terrainBlock, Buffer lodIndices) {<NEW_LINE>// Bounding box for the terrain block<NEW_LINE>BoundingBox bbox = (BoundingBox) terrainBlock.getBound();<NEW_LINE>// Vertex positions for the block<NEW_LINE>FloatBuffer positions = terrainBlock.getFloatBuffer(Type.Position);<NEW_LINE>// Prepare to cast rays<NEW_LINE>Vector3f pos = new Vector3f();<NEW_LINE>Vector3f dir = new Vector3f(0, -1, 0);<NEW_LINE>Ray ray = new Ray(pos, dir);<NEW_LINE>// Prepare collision results<NEW_LINE>CollisionResults results = new CollisionResults();<NEW_LINE>// Set the LOD indices on the block<NEW_LINE>VertexBuffer originalIndices = terrainBlock.getBuffer(Type.Index);<NEW_LINE>terrainBlock.clearBuffer(Type.Index);<NEW_LINE>if (lodIndices instanceof IntBuffer)<NEW_LINE>terrainBlock.setBuffer(Type.Index, 3, (IntBuffer) lodIndices);<NEW_LINE>else if (lodIndices instanceof ShortBuffer) {<NEW_LINE>terrainBlock.setBuffer(Type.Index, 3, (ShortBuffer) lodIndices);<NEW_LINE>} else {<NEW_LINE>terrainBlock.setBuffer(Type.Index, 3, (ByteBuffer) lodIndices);<NEW_LINE>}<NEW_LINE>// Recalculate collision mesh<NEW_LINE>terrainBlock.createCollisionData();<NEW_LINE>float entropy = 0;<NEW_LINE>for (int i = 0; i < positions.limit() / 3; i++) {<NEW_LINE>BufferUtils.populateFromBuffer(pos, positions, i);<NEW_LINE>float realHeight = pos.y;<NEW_LINE>pos.addLocal(0, bbox.getYExtent(), 0);<NEW_LINE>ray.setOrigin(pos);<NEW_LINE>results.clear();<NEW_LINE>terrainBlock.collideWith(ray, Matrix4f.IDENTITY, bbox, results);<NEW_LINE>if (results.size() > 0) {<NEW_LINE>Vector3f contactPoint = results.getClosestCollision().getContactPoint();<NEW_LINE>float delta = Math.abs(realHeight - contactPoint.y);<NEW_LINE>entropy = Math.max(delta, entropy);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Restore original indices<NEW_LINE><MASK><NEW_LINE>terrainBlock.setBuffer(originalIndices);<NEW_LINE>return entropy;<NEW_LINE>}
terrainBlock.clearBuffer(Type.Index);
569,387
private Object aliascmd(CommandInput input) {<NEW_LINE>final String[] usage = { "alias - create command alias", "Usage: alias [ALIAS] [COMMANDLINE]", " -? --help Displays command help" };<NEW_LINE>Object out = null;<NEW_LINE>try {<NEW_LINE>Options opt = parseOptions(usage, input.args());<NEW_LINE>List<String> args = opt.args();<NEW_LINE>if (args.isEmpty()) {<NEW_LINE>out = aliases;<NEW_LINE>} else if (args.size() == 1) {<NEW_LINE>out = aliases.getOrDefault(args.get(0), null);<NEW_LINE>} else {<NEW_LINE>String alias = String.join(" ", args.subList(1, args.size()));<NEW_LINE>for (int j = 0; j < 10; j++) {<NEW_LINE>alias = alias.replaceAll("%" + j, "\\$" + j);<NEW_LINE>alias = alias.replaceAll("%\\{" + j + <MASK><NEW_LINE>alias = alias.replaceAll("%\\{" + j + ":-", "\\$\\{" + j + ":-");<NEW_LINE>}<NEW_LINE>alias = alias.replaceAll("%@", "\\$@");<NEW_LINE>alias = alias.replaceAll("%\\{@}", "\\$\\{@\\}");<NEW_LINE>aliases.put(args.get(0), alias);<NEW_LINE>persist(aliasFile, aliases);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>exception = e;<NEW_LINE>}<NEW_LINE>return out;<NEW_LINE>}
"}", "\\$\\{" + j + "\\}");
1,663,379
public double alpha(HullWhiteOneFactorPiecewiseConstantParameters data, double startExpiry, double endExpiry, double numeraireTime, double bondMaturity) {<NEW_LINE>double factor1 = Math.exp(-data.getMeanReversion() * numeraireTime) - Math.exp(-data.getMeanReversion() * bondMaturity);<NEW_LINE>double numerator = 2 * data.getMeanReversion() * data.getMeanReversion() * data.getMeanReversion();<NEW_LINE>int indexStart = Math.abs(Arrays.binarySearch(data.getVolatilityTime().toArray(), startExpiry) + 1);<NEW_LINE>// Period in which the time startExpiry is; volatilityTime.get(i-1) <= startExpiry < volatilityTime.get(i);<NEW_LINE>int indexEnd = Math.abs(Arrays.binarySearch(data.getVolatilityTime().toArray(), endExpiry) + 1);<NEW_LINE>// Period in which the time endExpiry is; volatilityTime.get(i-1) <= endExpiry < volatilityTime.get(i);<NEW_LINE>int sLen = indexEnd - indexStart + 1;<NEW_LINE>double[] s = new double[sLen + 1];<NEW_LINE>s[0] = startExpiry;<NEW_LINE>System.arraycopy(data.getVolatilityTime().toArray(), indexStart, s, 1, sLen - 1);<NEW_LINE>s[sLen] = endExpiry;<NEW_LINE>double factor2 = 0d;<NEW_LINE>double[] exp2as <MASK><NEW_LINE>for (int loopperiod = 0; loopperiod < sLen + 1; loopperiod++) {<NEW_LINE>exp2as[loopperiod] = Math.exp(2 * data.getMeanReversion() * s[loopperiod]);<NEW_LINE>}<NEW_LINE>for (int loopperiod = 0; loopperiod < sLen; loopperiod++) {<NEW_LINE>factor2 += data.getVolatility().get(loopperiod + indexStart - 1) * data.getVolatility().get(loopperiod + indexStart - 1) * (exp2as[loopperiod + 1] - exp2as[loopperiod]);<NEW_LINE>}<NEW_LINE>return factor1 * Math.sqrt(factor2 / numerator);<NEW_LINE>}
= new double[sLen + 1];
1,213,866
public void solveVelocityConstraints(SolverData data) {<NEW_LINE>float mA = m_invMassA, mB = m_invMassB;<NEW_LINE>float iA = m_invIA, iB = m_invIB;<NEW_LINE>Vec2 vA = data.velocities[m_indexA].v;<NEW_LINE>float wA = data.velocities[m_indexA].w;<NEW_LINE>Vec2 vB = data.velocities[m_indexB].v;<NEW_LINE>float wB = <MASK><NEW_LINE>final Vec2 temp = pool.popVec2();<NEW_LINE>final Vec2 P = pool.popVec2();<NEW_LINE>// Solve spring constraint<NEW_LINE>{<NEW_LINE>float Cdot = Vec2.dot(m_ax, temp.set(vB).subLocal(vA)) + m_sBx * wB - m_sAx * wA;<NEW_LINE>float impulse = -m_springMass * (Cdot + m_bias + m_gamma * m_springImpulse);<NEW_LINE>m_springImpulse += impulse;<NEW_LINE>P.x = impulse * m_ax.x;<NEW_LINE>P.y = impulse * m_ax.y;<NEW_LINE>float LA = impulse * m_sAx;<NEW_LINE>float LB = impulse * m_sBx;<NEW_LINE>vA.x -= mA * P.x;<NEW_LINE>vA.y -= mA * P.y;<NEW_LINE>wA -= iA * LA;<NEW_LINE>vB.x += mB * P.x;<NEW_LINE>vB.y += mB * P.y;<NEW_LINE>wB += iB * LB;<NEW_LINE>}<NEW_LINE>// Solve rotational motor constraint<NEW_LINE>{<NEW_LINE>float Cdot = wB - wA - m_motorSpeed;<NEW_LINE>float impulse = -m_motorMass * Cdot;<NEW_LINE>float oldImpulse = m_motorImpulse;<NEW_LINE>float maxImpulse = data.step.dt * m_maxMotorTorque;<NEW_LINE>m_motorImpulse = MathUtils.clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse);<NEW_LINE>impulse = m_motorImpulse - oldImpulse;<NEW_LINE>wA -= iA * impulse;<NEW_LINE>wB += iB * impulse;<NEW_LINE>}<NEW_LINE>// Solve point to line constraint<NEW_LINE>{<NEW_LINE>float Cdot = Vec2.dot(m_ay, temp.set(vB).subLocal(vA)) + m_sBy * wB - m_sAy * wA;<NEW_LINE>float impulse = -m_mass * Cdot;<NEW_LINE>m_impulse += impulse;<NEW_LINE>P.x = impulse * m_ay.x;<NEW_LINE>P.y = impulse * m_ay.y;<NEW_LINE>float LA = impulse * m_sAy;<NEW_LINE>float LB = impulse * m_sBy;<NEW_LINE>vA.x -= mA * P.x;<NEW_LINE>vA.y -= mA * P.y;<NEW_LINE>wA -= iA * LA;<NEW_LINE>vB.x += mB * P.x;<NEW_LINE>vB.y += mB * P.y;<NEW_LINE>wB += iB * LB;<NEW_LINE>}<NEW_LINE>pool.pushVec2(2);<NEW_LINE>// data.velocities[m_indexA].v = vA;<NEW_LINE>data.velocities[m_indexA].w = wA;<NEW_LINE>// data.velocities[m_indexB].v = vB;<NEW_LINE>data.velocities[m_indexB].w = wB;<NEW_LINE>}
data.velocities[m_indexB].w;
1,587,352
protected static void logLTCSerialReuseInfo(Object affinity, String pmiName, MCWrapper mcWrapperTemp, PoolManager pm) {<NEW_LINE>final <MASK><NEW_LINE>if (isTracingEnabled && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "allocateConnection_Common: HandleCount = " + mcWrapperTemp.getHandleCount());<NEW_LINE>}<NEW_LINE>if (pm.logSerialReuseMessage) {<NEW_LINE>Tr.info(tc, "ATTEMPT_TO_SHARE_LTC_CONNECTION_J2CA0086", new Object[] { mcWrapperTemp, pmiName });<NEW_LINE>pm.logSerialReuseMessage = false;<NEW_LINE>}<NEW_LINE>if (isTracingEnabled && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Attempt to share connection within LTC (J2CA0086)");<NEW_LINE>Tr.debug(tc, "mcWrapper = " + mcWrapperTemp);<NEW_LINE>Tr.debug(tc, "pmiName = " + pmiName);<NEW_LINE>}<NEW_LINE>}
boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();
1,061,935
private void init() {<NEW_LINE>// process init<NEW_LINE>// account provider<NEW_LINE>SurenessAccountProvider accountProvider = new DocumentAccountProvider();<NEW_LINE>List<Processor> processorList = new LinkedList<>();<NEW_LINE>NoneProcessor noneProcessor = new NoneProcessor();<NEW_LINE>processorList.add(noneProcessor);<NEW_LINE>JwtProcessor jwtProcessor = new JwtProcessor();<NEW_LINE>processorList.add(jwtProcessor);<NEW_LINE>PasswordProcessor passwordProcessor = new PasswordProcessor();<NEW_LINE>passwordProcessor.setAccountProvider(accountProvider);<NEW_LINE>processorList.add(passwordProcessor);<NEW_LINE>DigestProcessor digestProcessor = new DigestProcessor();<NEW_LINE>digestProcessor.setAccountProvider(accountProvider);<NEW_LINE>processorList.add(digestProcessor);<NEW_LINE>DefaultProcessorManager processorManager = new DefaultProcessorManager(processorList);<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("DefaultProcessorManager init");<NEW_LINE>}<NEW_LINE>// pathRoleMatcher init<NEW_LINE>// pathTree resource provider<NEW_LINE>PathTreeProvider pathTreeProvider = new DocumentPathTreeProvider();<NEW_LINE>DefaultPathRoleMatcher pathRoleMatcher = new DefaultPathRoleMatcher();<NEW_LINE>pathRoleMatcher.setPathTreeProvider(pathTreeProvider);<NEW_LINE>pathRoleMatcher.buildTree();<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("DefaultPathRoleMatcher init");<NEW_LINE>}<NEW_LINE>// SubjectFactory init<NEW_LINE>SubjectFactory subjectFactory = new SurenessSubjectFactory();<NEW_LINE>List<SubjectCreate> subjectCreates = Arrays.asList(new NoneSubjectSolonCreator(), new DigestSubjectSolonCreator(), new BasicSubjectSolonCreator<MASK><NEW_LINE>subjectFactory.registerSubjectCreator(subjectCreates);<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("SurenessSubjectFactory init");<NEW_LINE>}<NEW_LINE>// surenessSecurityManager init<NEW_LINE>SurenessSecurityManager securityManager = SurenessSecurityManager.getInstance();<NEW_LINE>securityManager.setPathRoleMatcher(pathRoleMatcher);<NEW_LINE>securityManager.setSubjectFactory(subjectFactory);<NEW_LINE>securityManager.setProcessorManager(processorManager);<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("SurenessSecurityManager init");<NEW_LINE>}<NEW_LINE>}
(), new JwtSubjectSolonCreator());
860,431
final DescribeCostCategoryDefinitionResult executeDescribeCostCategoryDefinition(DescribeCostCategoryDefinitionRequest describeCostCategoryDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCostCategoryDefinitionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeCostCategoryDefinitionRequest> request = null;<NEW_LINE>Response<DescribeCostCategoryDefinitionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeCostCategoryDefinitionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeCostCategoryDefinitionRequest));<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, "Cost Explorer");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCostCategoryDefinition");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeCostCategoryDefinitionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeCostCategoryDefinitionResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
529,804
public ListenableFuture<Boolean> displayFailure() {<NEW_LINE>SettableFuture<Boolean> result = new SettableFuture<>();<NEW_LINE>this.keyboardView.setVisibility(View.INVISIBLE);<NEW_LINE>this.<MASK><NEW_LINE>this.failureView.setVisibility(View.GONE);<NEW_LINE>this.lockedView.setVisibility(View.GONE);<NEW_LINE>this.failureView.getBackground().setColorFilter(getResources().getColor(R.color.red_500), PorterDuff.Mode.SRC_IN);<NEW_LINE>this.failureView.setVisibility(View.VISIBLE);<NEW_LINE>TranslateAnimation shake = new TranslateAnimation(0, 30, 0, 0);<NEW_LINE>shake.setDuration(50);<NEW_LINE>shake.setRepeatCount(7);<NEW_LINE>shake.setAnimationListener(new Animation.AnimationListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationStart(Animation animation) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationEnd(Animation animation) {<NEW_LINE>result.set(true);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationRepeat(Animation animation) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>this.failureView.startAnimation(shake);<NEW_LINE>return result;<NEW_LINE>}
progressBar.setVisibility(View.GONE);
847,883
private PreviewRouteLineInfo createPreviewRouteLineInfo() {<NEW_LINE>OsmandSettings settings = requireSettings();<NEW_LINE>int colorDay = settings.CUSTOM_ROUTE_COLOR_DAY.getModeValue(appMode);<NEW_LINE>int colorNight = settings.CUSTOM_ROUTE_COLOR_NIGHT.getModeValue(appMode);<NEW_LINE>ColoringType coloringType = settings.ROUTE_COLORING_TYPE.getModeValue(appMode);<NEW_LINE>String routeInfoAttribute = <MASK><NEW_LINE>String widthKey = settings.ROUTE_LINE_WIDTH.getModeValue(appMode);<NEW_LINE>boolean showTurnArrows = settings.ROUTE_SHOW_TURN_ARROWS.getModeValue(appMode);<NEW_LINE>PreviewRouteLineInfo previewRouteLineInfo = new PreviewRouteLineInfo(colorDay, colorNight, coloringType, routeInfoAttribute, widthKey, showTurnArrows);<NEW_LINE>previewRouteLineInfo.setIconId(appMode.getNavigationIcon().getIconId());<NEW_LINE>previewRouteLineInfo.setIconColor(appMode.getProfileColor(isNightMode()));<NEW_LINE>return previewRouteLineInfo;<NEW_LINE>}
settings.ROUTE_INFO_ATTRIBUTE.getModeValue(appMode);
226,853
Value parse(JsonParser parser, Value value, Context context) throws IOException {<NEW_LINE>JsonToken token;<NEW_LINE>if (parser.currentToken() != START_OBJECT) {<NEW_LINE>token = parser.nextToken();<NEW_LINE>if (token != START_OBJECT) {<NEW_LINE>throwExpectedStartObject(parser, token);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>FieldParser fieldParser = null;<NEW_LINE>String currentFieldName = null;<NEW_LINE>JsonLocation currentPosition = null;<NEW_LINE>final List<String[]> requiredFields = this.requiredFieldSets.isEmpty() ? null : new ArrayList<>(this.requiredFieldSets);<NEW_LINE>while ((token = parser.nextToken()) != JsonToken.END_OBJECT) {<NEW_LINE>if (token == JsonToken.FIELD_NAME) {<NEW_LINE>currentFieldName = parser.currentName();<NEW_LINE>currentPosition = parser.getTokenLocation();<NEW_LINE>fieldParser = fieldParsers.get(currentFieldName);<NEW_LINE>} else {<NEW_LINE>if (currentFieldName == null) {<NEW_LINE>throwNoFieldFound(parser);<NEW_LINE>}<NEW_LINE>if (fieldParser == null) {<NEW_LINE>unknownFieldParser.acceptUnknownField(this, currentFieldName, currentPosition, parser, value, context);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>if (requiredFields != null) {<NEW_LINE>// Check to see if this field is a required field, if it is we can<NEW_LINE>// remove the entry as the requirement is satisfied<NEW_LINE>maybeMarkRequiredField(currentFieldName, requiredFields);<NEW_LINE>}<NEW_LINE>parseSub(parser, fieldParser, currentFieldName, value, context);<NEW_LINE>}<NEW_LINE>fieldParser = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (requiredFields != null && requiredFields.isEmpty() == false) {<NEW_LINE>throwMissingRequiredFields(requiredFields);<NEW_LINE>}<NEW_LINE>return value;<NEW_LINE>}
fieldParser.assertSupports(parser, currentFieldName);
147,080
public void makeGraph() {<NEW_LINE>Dimension size = graphPanel.getSize();<NEW_LINE>// canvas size<NEW_LINE>int width = (int) size.getWidth();<NEW_LINE>int height = (int) size.getHeight();<NEW_LINE>if (!dynamicGraphSize.isSelected()) {<NEW_LINE>String wstr = graphWidth.getText();<NEW_LINE><MASK><NEW_LINE>if (wstr.length() != 0) {<NEW_LINE>width = Integer.parseInt(wstr);<NEW_LINE>}<NEW_LINE>if (hstr.length() != 0) {<NEW_LINE>height = Integer.parseInt(hstr);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String yAxisStr = maxValueYAxisLabel.getText();<NEW_LINE>int maxYAxisScale = yAxisStr.length() == 0 ? 0 : Integer.parseInt(yAxisStr);<NEW_LINE>graphPanel.setData(this.getData());<NEW_LINE>graphPanel.setTitle(graphTitle.getText());<NEW_LINE>graphPanel.setMaxYAxisScale(maxYAxisScale);<NEW_LINE>graphPanel.setYAxisLabels(Y_AXIS_LABEL);<NEW_LINE>graphPanel.setYAxisTitle(Y_AXIS_TITLE);<NEW_LINE>graphPanel.setXAxisLabels(getXAxisLabels());<NEW_LINE>graphPanel.setLegendLabels(getLegendLabels());<NEW_LINE>graphPanel.setColor(getLinesColors());<NEW_LINE>graphPanel.setShowGrouping(numberShowGrouping.isSelected());<NEW_LINE>graphPanel.setLegendPlacement(StatGraphProperties.getPlacementNameMap().get(legendPlacementList.getSelectedItem()));<NEW_LINE>graphPanel.setPointShape(StatGraphProperties.getPointShapeMap().get(pointShapeLine.getSelectedItem()));<NEW_LINE>graphPanel.setStrokeWidth(Float.parseFloat((String) strokeWidthList.getSelectedItem()));<NEW_LINE>graphPanel.setTitleFont(JMeterUIDefaults.createFont(StatGraphProperties.getFontNameMap().get(titleFontNameList.getSelectedItem()), StatGraphProperties.getFontStyleMap().get(titleFontStyleList.getSelectedItem()), Integer.parseInt((String) titleFontSizeList.getSelectedItem())));<NEW_LINE>graphPanel.setLegendFont(JMeterUIDefaults.createFont(StatGraphProperties.getFontNameMap().get(fontNameList.getSelectedItem()), StatGraphProperties.getFontStyleMap().get(fontStyleList.getSelectedItem()), Integer.parseInt((String) fontSizeList.getSelectedItem())));<NEW_LINE>graphPanel.setHeight(height);<NEW_LINE>graphPanel.setWidth(width);<NEW_LINE>graphPanel.setIncrYAxisScale(getIncrScaleYAxis());<NEW_LINE>// Draw the graph<NEW_LINE>graphPanel.repaint();<NEW_LINE>}
String hstr = graphHeight.getText();
594,168
public void updateUserFromContactPersonIfFeasible(@NonNull final ContactPerson contactPerson, @Nullable final String oldContactPersonMail, @Nullable final Language oldContactPersonLanguage) {<NEW_LINE>final UserId userId = contactPerson.getUserId();<NEW_LINE>if (userId == null) {<NEW_LINE>// no user to update the email<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final User user = userRepo.getByIdInTrx(userId);<NEW_LINE>final boolean updateUserMail = isFitForUpdate(user.getEmailAddress(), oldContactPersonMail);<NEW_LINE>final boolean updateUserLanguage = isFitForUpdate(user.getUserLanguage(), oldContactPersonLanguage);<NEW_LINE>if (!updateUserMail && !updateUserLanguage) {<NEW_LINE>// nothing to do<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final UserBuilder updatedUser = user.toBuilder();<NEW_LINE>if (updateUserMail) {<NEW_LINE>updatedUser.emailAddress(contactPerson.getEmailAddessStringOrNull());<NEW_LINE>}<NEW_LINE>if (updateUserLanguage) {<NEW_LINE>updatedUser.userLanguage(contactPerson.getLanguage());<NEW_LINE>if (contactPerson.getLanguage() != null) {<NEW_LINE>updatedUser.language(contactPerson.getLanguage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>userRepo.<MASK><NEW_LINE>}
save(updatedUser.build());
1,515,722
private void initSender() throws PwmUnrecoverableException {<NEW_LINE>if (StringUtil.isEmpty(settings.getSenderImplementation())) {<NEW_LINE>final String msg = "telemetry sender implementation not specified";<NEW_LINE>throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_TELEMETRY_SEND_ERROR, msg));<NEW_LINE>}<NEW_LINE>final TelemetrySender telemetrySender;<NEW_LINE>try {<NEW_LINE>final String senderClass = settings.getSenderImplementation();<NEW_LINE>final Class theClass = Class.forName(senderClass);<NEW_LINE>telemetrySender = (TelemetrySender) theClass.getDeclaredConstructor().newInstance();<NEW_LINE>} catch (final Exception e) {<NEW_LINE>final String msg = "unable to load implementation class: " + e.getMessage();<NEW_LINE>throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_INTERNAL, msg));<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final String macrodSettings = MacroRequest.forNonUserSpecific(getPwmApplication(), null).<MASK><NEW_LINE>telemetrySender.init(getPwmApplication(), getSessionLabel(), macrodSettings);<NEW_LINE>} catch (final Exception e) {<NEW_LINE>final String msg = "unable to init implementation class: " + e.getMessage();<NEW_LINE>throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_INTERNAL, msg));<NEW_LINE>}<NEW_LINE>sender = telemetrySender;<NEW_LINE>}
expandMacros(settings.getSenderSettings());
1,541,330
private void validateSolution(Result bestMatch, ParserRuleContext currentCtx, STNode nextToken) {<NEW_LINE>Solution sol = bestMatch.solution;<NEW_LINE>if (sol == null || sol.action == Action.REMOVE) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Special case the `KEEP` of `DOCUMENTATION_STRING` since we are skipping them in errorHandler.<NEW_LINE>// This will avoid `KEEP` of invalid `DOCUMENTATION_STRING` tokens.<NEW_LINE>// It is assumed that recover will not be invoked on a valid `DOCUMENTATION_STRING` token.<NEW_LINE>if (sol.action == Action.KEEP && nextToken.kind == SyntaxKind.DOCUMENTATION_STRING) {<NEW_LINE>bestMatch.solution = new Solution(Action.REMOVE, currentCtx, SyntaxKind.<MASK><NEW_LINE>}<NEW_LINE>// If best match is INSERT fix followed by immediate REMOVE fix,<NEW_LINE>// then it could be repeated next time coming to the error handler.<NEW_LINE>// Therefore in such case, set the solution to immediate REMOVE fix.<NEW_LINE>if (sol.action != Action.INSERT || bestMatch.fixesSize() < 2) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Solution firstFix = bestMatch.popFix();<NEW_LINE>Solution secondFix = bestMatch.peekFix();<NEW_LINE>bestMatch.pushFix(firstFix);<NEW_LINE>if (secondFix.action == Action.REMOVE && secondFix.depth == 1) {<NEW_LINE>bestMatch.solution = secondFix;<NEW_LINE>}<NEW_LINE>}
DOCUMENTATION_STRING, currentCtx.toString());
517,120
public MaryData process(MaryData d) throws Exception {<NEW_LINE>String phoneString = d.getPlainText();<NEW_LINE>MaryData result = new MaryData(getOutputType(), d.getLocale(), true);<NEW_LINE>Document doc = result.getDocument();<NEW_LINE>Element root = doc.getDocumentElement();<NEW_LINE>root.setAttribute("xml:lang", MaryUtils.locale2xmllang(d.getLocale()));<NEW_LINE>Element insertHere = root;<NEW_LINE>Voice defaultVoice = d.getDefaultVoice();<NEW_LINE>if (defaultVoice != null) {<NEW_LINE>Element voiceElement = MaryXML.createElement(doc, MaryXML.VOICE);<NEW_LINE>voiceElement.setAttribute("name", defaultVoice.getName());<NEW_LINE>root.appendChild(voiceElement);<NEW_LINE>insertHere = voiceElement;<NEW_LINE>}<NEW_LINE>int cumulDur = 0;<NEW_LINE>boolean isFirst = true;<NEW_LINE>StringTokenizer stTokens = new StringTokenizer(phoneString);<NEW_LINE>while (stTokens.hasMoreTokens()) {<NEW_LINE>Element token = MaryXML.createElement(doc, MaryXML.TOKEN);<NEW_LINE>insertHere.appendChild(token);<NEW_LINE>String tokenPhonemes = stTokens.nextToken();<NEW_LINE>token.setAttribute("ph", tokenPhonemes);<NEW_LINE>StringTokenizer stSyllables = new StringTokenizer(tokenPhonemes, "-_");<NEW_LINE>while (stSyllables.hasMoreTokens()) {<NEW_LINE>Element syllable = MaryXML.createElement(doc, MaryXML.SYLLABLE);<NEW_LINE>token.appendChild(syllable);<NEW_LINE><MASK><NEW_LINE>syllable.setAttribute("ph", syllablePhonemes);<NEW_LINE>int stress = 0;<NEW_LINE>if (syllablePhonemes.startsWith("'"))<NEW_LINE>stress = 1;<NEW_LINE>else if (syllablePhonemes.startsWith(","))<NEW_LINE>stress = 2;<NEW_LINE>if (stress != 0) {<NEW_LINE>// Simplified: Give a "pressure accent" do stressed syllables<NEW_LINE>syllable.setAttribute("accent", "*");<NEW_LINE>token.setAttribute("accent", "*");<NEW_LINE>}<NEW_LINE>Allophone[] phones = allophoneSet.splitIntoAllophones(syllablePhonemes);<NEW_LINE>for (int i = 0; i < phones.length; i++) {<NEW_LINE>Element ph = MaryXML.createElement(doc, MaryXML.PHONE);<NEW_LINE>ph.setAttribute("p", phones[i].name());<NEW_LINE>int dur = 70;<NEW_LINE>if (phones[i].isVowel()) {<NEW_LINE>dur = 100;<NEW_LINE>if (stress == 1)<NEW_LINE>dur *= 1.5;<NEW_LINE>else if (stress == 2)<NEW_LINE>dur *= 1.2;<NEW_LINE>}<NEW_LINE>ph.setAttribute("d", String.valueOf(dur));<NEW_LINE>cumulDur += dur;<NEW_LINE>ph.setAttribute("end", String.valueOf(cumulDur));<NEW_LINE>syllable.appendChild(ph);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Element boundary = MaryXML.createElement(doc, MaryXML.BOUNDARY);<NEW_LINE>boundary.setAttribute("bi", "4");<NEW_LINE>boundary.setAttribute("duration", "400");<NEW_LINE>insertHere.appendChild(boundary);<NEW_LINE>return result;<NEW_LINE>}
String syllablePhonemes = stSyllables.nextToken();
669,714
public boolean onInterceptTouchEvent(MotionEvent ev) {<NEW_LINE>if (!mEnabled)<NEW_LINE>return false;<NEW_LINE>final int action = ev.getAction() & MotionEventCompat.ACTION_MASK;<NEW_LINE>if (action == MotionEvent.ACTION_DOWN && DEBUG)<NEW_LINE>Log.v(TAG, "Received ACTION_DOWN");<NEW_LINE>if (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP || (action != MotionEvent.ACTION_DOWN && mIsUnableToDrag)) {<NEW_LINE>endDrag();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>switch(action) {<NEW_LINE>case MotionEvent.ACTION_MOVE:<NEW_LINE>try {<NEW_LINE>final int activePointerId = mActivePointerId;<NEW_LINE>if (activePointerId == INVALID_POINTER)<NEW_LINE>break;<NEW_LINE>final int pointerIndex = this.getPointerIndex(ev, activePointerId);<NEW_LINE>final float x = MotionEventCompat.getX(ev, pointerIndex);<NEW_LINE>final float dx = x - mLastMotionX;<NEW_LINE>final float xDiff = Math.abs(dx);<NEW_LINE>final float y = MotionEventCompat.getY(ev, pointerIndex);<NEW_LINE>final float yDiff = Math.abs(y - mLastMotionY);<NEW_LINE>if (DEBUG)<NEW_LINE>Log.v(TAG, "onInterceptTouch moved to:(" + x + ", " + y + "), diff:(" + xDiff + ", " + yDiff + "), mLastMotionX:" + mLastMotionX);<NEW_LINE>if (xDiff > mTouchSlop && xDiff > yDiff && thisSlideAllowed(dx)) {<NEW_LINE>if (DEBUG)<NEW_LINE>Log.v(TAG, "Starting drag! from onInterceptTouch");<NEW_LINE>startDrag();<NEW_LINE>mLastMotionX = x;<NEW_LINE>setScrollingCacheEnabled(true);<NEW_LINE>} else if (yDiff > mTouchSlop) {<NEW_LINE>mIsUnableToDrag = true;<NEW_LINE>}<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case MotionEvent.ACTION_DOWN:<NEW_LINE>mActivePointerId = ev.getAction() & ((Build.VERSION.SDK_INT >= 8) ? <MASK><NEW_LINE>mLastMotionX = mInitialMotionX = MotionEventCompat.getX(ev, mActivePointerId);<NEW_LINE>mLastMotionY = MotionEventCompat.getY(ev, mActivePointerId);<NEW_LINE>if (thisTouchAllowed(ev)) {<NEW_LINE>mIsBeingDragged = false;<NEW_LINE>mIsUnableToDrag = false;<NEW_LINE>if (isMenuOpen() && mViewBehind.menuTouchInQuickReturn(mContent, mCurItem, ev.getX() + mScrollX)) {<NEW_LINE>mQuickReturn = true;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>mIsUnableToDrag = true;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case MotionEventCompat.ACTION_POINTER_UP:<NEW_LINE>onSecondaryPointerUp(ev);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (!mIsBeingDragged) {<NEW_LINE>if (mVelocityTracker == null) {<NEW_LINE>mVelocityTracker = VelocityTracker.obtain();<NEW_LINE>}<NEW_LINE>mVelocityTracker.addMovement(ev);<NEW_LINE>}<NEW_LINE>return mIsBeingDragged || mQuickReturn;<NEW_LINE>}
MotionEvent.ACTION_POINTER_INDEX_MASK : MotionEvent.ACTION_POINTER_INDEX_MASK);
470,780
public void start() {<NEW_LINE>if (LOG_EGL) {<NEW_LINE>Log.w("EglHelper", "start() tid=" + Thread.currentThread().getId());<NEW_LINE>}<NEW_LINE>mEgl = <MASK><NEW_LINE>mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);<NEW_LINE>if (mEglDisplay == EGL10.EGL_NO_DISPLAY) {<NEW_LINE>throw new RuntimeException("eglGetDisplay failed");<NEW_LINE>}<NEW_LINE>int[] version = new int[2];<NEW_LINE>if (!mEgl.eglInitialize(mEglDisplay, version)) {<NEW_LINE>throw new RuntimeException("eglInitialize failed");<NEW_LINE>}<NEW_LINE>GameSurface view = mGLSurfaceViewWeakRef.get();<NEW_LINE>if (view == null) {<NEW_LINE>mEglConfig = null;<NEW_LINE>mEglContext = null;<NEW_LINE>} else {<NEW_LINE>mEglConfig = view.mEGLConfigChooser.chooseConfig(mEgl, mEglDisplay);<NEW_LINE>mEglContext = view.mEGLContextFactory.createContext(mEgl, mEglDisplay, mEglConfig);<NEW_LINE>}<NEW_LINE>if (mEglContext == null || mEglContext == EGL10.EGL_NO_CONTEXT) {<NEW_LINE>mEglContext = null;<NEW_LINE>throwEglException("createContext");<NEW_LINE>}<NEW_LINE>if (LOG_EGL) {<NEW_LINE>Log.w("EglHelper", "createContext " + mEglContext + " tid=" + Thread.currentThread().getId());<NEW_LINE>}<NEW_LINE>mEglSurface = null;<NEW_LINE>}
(EGL10) EGLContext.getEGL();
1,821,176
public void insertGroupMessageToLocalStorage(final MethodCall methodCall, final MethodChannel.Result result) {<NEW_LINE>final String data = CommonUtil.getParam(methodCall, result, "data");<NEW_LINE>final String groupID = CommonUtil.<MASK><NEW_LINE>final String sender = CommonUtil.getParam(methodCall, result, "sender");<NEW_LINE>V2TIMMessageManager msgManager = V2TIMManager.getInstance().getMessageManager();<NEW_LINE>final V2TIMMessage msg = msgManager.createCustomMessage(data.getBytes());<NEW_LINE>V2TIMManager.getMessageManager().insertGroupMessageToLocalStorage(msg, groupID, sender, new V2TIMValueCallback<V2TIMMessage>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(int i, String s) {<NEW_LINE>CommonUtil.returnError(result, i, s);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(V2TIMMessage v2TIMMessage) {<NEW_LINE>CommonUtil.returnSuccess(result, CommonUtil.convertV2TIMMessageToMap(v2TIMMessage));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getParam(methodCall, result, "groupID");
968,295
public List<DataObject> execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {<NEW_LINE>Revision virtualRevision = getRevisionByRoid(roid);<NEW_LINE>IfcModelSet ifcModelSet = new IfcModelSet();<NEW_LINE>PackageMetaData lastPackageMetaData = null;<NEW_LINE>Map<Integer, Long> pidRoidMap = new HashMap<>();<NEW_LINE>pidRoidMap.put(virtualRevision.getProject().getId(), virtualRevision.getOid());<NEW_LINE>for (ConcreteRevision concreteRevision : virtualRevision.getConcreteRevisions()) {<NEW_LINE>int highestStopId = findHighestStopRid(<MASK><NEW_LINE>PackageMetaData packageMetaData = getBimServer().getMetaDataManager().getPackageMetaData(concreteRevision.getProject().getSchema());<NEW_LINE>lastPackageMetaData = packageMetaData;<NEW_LINE>IfcModel subModel = getDatabaseSession().createServerModel(packageMetaData, pidRoidMap);<NEW_LINE>OldQuery query = new OldQuery(packageMetaData, concreteRevision.getProject().getId(), concreteRevision.getId(), virtualRevision.getOid(), Deep.YES, highestStopId);<NEW_LINE>getDatabaseSession().getMap(subModel, query);<NEW_LINE>subModel.getModelMetaData().setDate(concreteRevision.getDate());<NEW_LINE>ifcModelSet.add(subModel);<NEW_LINE>}<NEW_LINE>IfcModelInterface ifcModel = getDatabaseSession().createServerModel(lastPackageMetaData, pidRoidMap);<NEW_LINE>try {<NEW_LINE>ifcModel = getBimServer().getMergerFactory().createMerger(getDatabaseSession(), getAuthorization().getUoid()).merge(virtualRevision.getProject(), ifcModelSet, new ModelHelper(getBimServer().getMetaDataManager(), ifcModel));<NEW_LINE>} catch (MergeException e) {<NEW_LINE>throw new UserException(e);<NEW_LINE>}<NEW_LINE>List<DataObject> dataObjects = new ArrayList<DataObject>();<NEW_LINE>for (Long oid : ifcModel.keySet()) {<NEW_LINE>EObject eObject = ifcModel.get(oid);<NEW_LINE>if (eObject.eClass().getEAnnotation("hidden") == null) {<NEW_LINE>DataObject dataObject = null;<NEW_LINE>if (eObject instanceof IfcRoot) {<NEW_LINE>IfcRoot ifcRoot = (IfcRoot) eObject;<NEW_LINE>String guid = ifcRoot.getGlobalId() != null ? ifcRoot.getGlobalId() : "";<NEW_LINE>String name = ifcRoot.getName() != null ? ifcRoot.getName() : "";<NEW_LINE>dataObject = StoreFactory.eINSTANCE.createDataObject();<NEW_LINE>dataObject.setType(eObject.eClass().getName());<NEW_LINE>((IdEObjectImpl) dataObject).setOid(oid);<NEW_LINE>dataObject.setGuid(guid);<NEW_LINE>dataObject.setName(name);<NEW_LINE>} else {<NEW_LINE>dataObject = StoreFactory.eINSTANCE.createDataObject();<NEW_LINE>dataObject.setType(eObject.eClass().getName());<NEW_LINE>((IdEObjectImpl) dataObject).setOid(oid);<NEW_LINE>dataObject.setGuid("");<NEW_LINE>dataObject.setName("");<NEW_LINE>}<NEW_LINE>GetDataObjectByOidDatabaseAction.fillDataObject(ifcModel.getObjects(), eObject, dataObject);<NEW_LINE>dataObjects.add(dataObject);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return dataObjects;<NEW_LINE>}
concreteRevision.getProject(), concreteRevision);
483,349
public List<String> wordsAbbreviation(List<String> dict) {<NEW_LINE>int len = dict.size();<NEW_LINE>String[] ans = new String[len];<NEW_LINE>int[] prefix = new int[len];<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>prefix[i] = 1;<NEW_LINE>// make abbreviation for each string<NEW_LINE>ans[i] = abbreviate(dict<MASK><NEW_LINE>}<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>while (true) {<NEW_LINE>HashSet<Integer> set = new HashSet<>();<NEW_LINE>for (int j = i + 1; j < len; j++) {<NEW_LINE>if (ans[j].equals(ans[i])) {<NEW_LINE>// check all strings with the same abbreviation<NEW_LINE>set.add(j);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (set.isEmpty()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>set.add(i);<NEW_LINE>for (int k : set) {<NEW_LINE>// increase the prefix<NEW_LINE>ans[k] = abbreviate(dict.get(k), ++prefix[k]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Arrays.asList(ans);<NEW_LINE>}
.get(i), 1);
192,047
private HBox createEntry(Environment environment) {<NEW_LINE>JFXButton renameButton = new JFXButton();<NEW_LINE>renameButton.setGraphic(new FontAwesomeIconView(FontAwesomeIcon.PENCIL, "1.5em"));<NEW_LINE>renameButton.setOnAction(e -> triggerRenameDialog(environment));<NEW_LINE>JFXButton editButton = new JFXButton();<NEW_LINE>editButton.setGraphic(new FontAwesomeIconView(FontAwesomeIcon.LIST, "1.5em"));<NEW_LINE>editButton.setOnAction(e -> triggerEditEnvDialog(environment));<NEW_LINE>JFXToggleNode global = new JFXToggleNode(new FontAwesomeIconView(FontAwesomeIcon.GLOBE, "1.5em"));<NEW_LINE>global.<MASK><NEW_LINE>global.selectedProperty().addListener((obs, o, n) -> {<NEW_LINE>if (n != null) {<NEW_LINE>environment.setGlobal(n);<NEW_LINE>if (n)<NEW_LINE>environment.setActive(false);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>JFXButton colorButton = new JFXButton();<NEW_LINE>FontAwesomeIconView icon = new FontAwesomeIconView(FontAwesomeIcon.PAINT_BRUSH, "1.5em");<NEW_LINE>primaryIconFill = icon.getFill();<NEW_LINE>colorButton.setGraphic(icon);<NEW_LINE>if (environment.getColor() != null) {<NEW_LINE>icon.setFill(Color.web(environment.getColor()));<NEW_LINE>}<NEW_LINE>colorButton.setOnAction(e -> triggerEditEnvColorDialog(environment, icon));<NEW_LINE>JFXButton deleteButton = new JFXButton();<NEW_LINE>deleteButton.setGraphic(new FontAwesomeIconView(FontAwesomeIcon.TIMES, "1.5em"));<NEW_LINE>deleteButton.setOnAction(e -> {<NEW_LINE>onCommand.invoke(new DeleteEnvironment(environment));<NEW_LINE>refresh();<NEW_LINE>});<NEW_LINE>Label envName = new Label(environment.getName());<NEW_LINE>HBox.setHgrow(envName, Priority.ALWAYS);<NEW_LINE>return new HBox(envName, renameButton, editButton, global, colorButton, deleteButton);<NEW_LINE>}
setSelected(environment.isGlobal());
1,688,233
private <A> Map<SpringAggregate<? super A>, Map<Class<? extends A>, String>> buildAggregateHierarchy(String[] aggregatePrototypes) {<NEW_LINE>Map<SpringAggregate<? super A>, Map<Class<? extends A>, String>> hierarchy = new HashMap<>();<NEW_LINE>for (String prototype : aggregatePrototypes) {<NEW_LINE>Class<A> aggregateType = (Class<A>) beanFactory.getType(prototype);<NEW_LINE>SpringAggregate<A> springAggregate = new SpringAggregate<>(prototype, aggregateType);<NEW_LINE>Class<? super A> topType = topAnnotatedAggregateType(aggregateType);<NEW_LINE>SpringAggregate<? super A> topSpringAggregate = new SpringAggregate<>(beanName(topType), topType);<NEW_LINE>hierarchy.compute(topSpringAggregate, (type, subtypes) -> {<NEW_LINE>if (subtypes == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (!type.equals(springAggregate)) {<NEW_LINE>subtypes.put(aggregateType, prototype);<NEW_LINE>}<NEW_LINE>return subtypes;<NEW_LINE>});<NEW_LINE>}<NEW_LINE>return hierarchy;<NEW_LINE>}
subtypes = new HashMap<>();
80,634
final UpdateFindingsResult executeUpdateFindings(UpdateFindingsRequest updateFindingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateFindingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdateFindingsRequest> request = null;<NEW_LINE>Response<UpdateFindingsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateFindingsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateFindingsRequest));<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, "AccessAnalyzer");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateFindings");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateFindingsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateFindingsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,481,931
public Representation represent() {<NEW_LINE>// Modification date (Fri, 17 Apr 2012 10:10:10 GMT) unchanged.<NEW_LINE>Calendar cal = new GregorianCalendar(2012, 4, 17, 10, 10, 10);<NEW_LINE>Representation result = new StringRepresentation("<a href=" + getReference() + ">" + System.currentTimeMillis() + "</a>");<NEW_LINE>result.setMediaType(MediaType.TEXT_HTML);<NEW_LINE>result.setModificationDate(cal.getTime());<NEW_LINE>// Expiration date (Fri, 17 Apr 2012 13:10:10 GMT) unchanged.<NEW_LINE>cal.roll(Calendar.HOUR, 3);<NEW_LINE>result.setExpirationDate(cal.getTime());<NEW_LINE>// Setting E-Tag<NEW_LINE>result.setTag(new Tag("xyz123"));<NEW_LINE>// Setting a cache directive<NEW_LINE>getResponse().getCacheDirectives().<MASK><NEW_LINE>return result;<NEW_LINE>}
add(CacheDirective.publicInfo());
709,244
private static List<Token> matchArgument(List<Token> tokens, List<Token> arguments) throws MismatchException {<NEW_LINE>var nestingLevel = 0;<NEW_LINE>var tokensConsumed = 0;<NEW_LINE>var noTokens = tokens.size();<NEW_LINE>var firstToken = tokens.get(0);<NEW_LINE>var currToken = firstToken;<NEW_LINE>String curr = currToken.getValue();<NEW_LINE>var matchedTokens = new LinkedList<Token>();<NEW_LINE>while (true) {<NEW_LINE>if (nestingLevel == 0 && (",".equals(curr) || ")".equals(curr))) {<NEW_LINE>if (tokensConsumed > 0) {<NEW_LINE>arguments.add(Token.builder().setLine(firstToken.getLine()).setColumn(firstToken.getColumn()).setURI(firstToken.getURI()).setValueAndOriginalValue(serialize(matchedTokens).trim()).setType<MASK><NEW_LINE>}<NEW_LINE>return tokens.subList(tokensConsumed, noTokens);<NEW_LINE>}<NEW_LINE>if ("(".equals(curr)) {<NEW_LINE>nestingLevel++;<NEW_LINE>} else if (")".equals(curr)) {<NEW_LINE>nestingLevel--;<NEW_LINE>}<NEW_LINE>tokensConsumed++;<NEW_LINE>if (tokensConsumed == noTokens) {<NEW_LINE>throw new MismatchException("reached the end of the stream while matching a macro argument");<NEW_LINE>}<NEW_LINE>matchedTokens.add(currToken);<NEW_LINE>currToken = tokens.get(tokensConsumed);<NEW_LINE>curr = currToken.getValue();<NEW_LINE>}<NEW_LINE>}
(STRING).build());
848,096
private void createConfigurations(Project project) {<NEW_LINE>ConfigurationContainer configurations = project.getConfigurations();<NEW_LINE>Capability enforcedCapability = new DefaultShadowedCapability(new ProjectDerivedCapability(project), "-derived-enforced-platform");<NEW_LINE>Configuration api = configurations.create(API_CONFIGURATION_NAME, AS_BUCKET);<NEW_LINE>Configuration apiElements = createConsumableApi(project, configurations, api, API_ELEMENTS_CONFIGURATION_NAME, Category.REGULAR_PLATFORM);<NEW_LINE>Configuration enforcedApiElements = createConsumableApi(project, configurations, api, ENFORCED_API_ELEMENTS_CONFIGURATION_NAME, Category.ENFORCED_PLATFORM);<NEW_LINE>enforcedApiElements.getOutgoing().capability(enforcedCapability);<NEW_LINE>Configuration runtime = project.getConfigurations().create(RUNTIME_CONFIGURATION_NAME, AS_BUCKET);<NEW_LINE>runtime.extendsFrom(api);<NEW_LINE>Configuration runtimeElements = createConsumableRuntime(project, runtime, RUNTIME_ELEMENTS_CONFIGURATION_NAME, Category.REGULAR_PLATFORM);<NEW_LINE>Configuration enforcedRuntimeElements = createConsumableRuntime(project, runtime, ENFORCED_RUNTIME_ELEMENTS_CONFIGURATION_NAME, Category.ENFORCED_PLATFORM);<NEW_LINE>enforcedRuntimeElements.getOutgoing().capability(enforcedCapability);<NEW_LINE>Configuration classpath = configurations.create(CLASSPATH_CONFIGURATION_NAME, AS_RESOLVABLE_CONFIGURATION);<NEW_LINE>classpath.extendsFrom(runtimeElements);<NEW_LINE>declareConfigurationUsage(project.getObjects(), classpath, <MASK><NEW_LINE>createSoftwareComponent(project, apiElements, runtimeElements);<NEW_LINE>}
Usage.JAVA_RUNTIME, LibraryElements.JAR);
305,289
private String jobPropertiesToJsonString() {<NEW_LINE>Map<String, String> jobProperties = Maps.newHashMap();<NEW_LINE>jobProperties.put("partitions", partitions == null ? STAR_STRING : Joiner.on(",").join(partitions.getPartitionNames()));<NEW_LINE>jobProperties.put("columnToColumnExpr", columnDescs == null ? STAR_STRING : Joiner.on(",").join(columnDescs));<NEW_LINE>jobProperties.put("whereExpr", whereExpr == null ? <MASK><NEW_LINE>if (getFormat().equalsIgnoreCase("json")) {<NEW_LINE>jobProperties.put("dataFormat", "json");<NEW_LINE>} else {<NEW_LINE>jobProperties.put("columnSeparator", columnSeparator == null ? "\t" : columnSeparator.toString());<NEW_LINE>jobProperties.put("rowDelimiter", rowDelimiter == null ? "\t" : rowDelimiter.toString());<NEW_LINE>}<NEW_LINE>jobProperties.put("maxErrorNum", String.valueOf(maxErrorNum));<NEW_LINE>jobProperties.put("maxBatchIntervalS", String.valueOf(taskSchedIntervalS));<NEW_LINE>jobProperties.put("maxBatchRows", String.valueOf(maxBatchRows));<NEW_LINE>jobProperties.put("currentTaskConcurrentNum", String.valueOf(currentTaskConcurrentNum));<NEW_LINE>jobProperties.put("desireTaskConcurrentNum", String.valueOf(desireTaskConcurrentNum));<NEW_LINE>jobProperties.putAll(this.jobProperties);<NEW_LINE>Gson gson = new GsonBuilder().disableHtmlEscaping().create();<NEW_LINE>return gson.toJson(jobProperties);<NEW_LINE>}
STAR_STRING : whereExpr.toSql());
735,617
public void init() {<NEW_LINE>model = new DefaultDiagramModel();<NEW_LINE>model.setMaxConnections(-1);<NEW_LINE>StateMachineConnector connector = new StateMachineConnector();<NEW_LINE>connector.setOrientation(StateMachineConnector.Orientation.ANTICLOCKWISE);<NEW_LINE>connector.setPaintStyle("{stroke:'#7D7463',strokeWidth:3}");<NEW_LINE>model.setDefaultConnector(connector);<NEW_LINE>Element start = new Element(null, "15em", "5em");<NEW_LINE>start.addEndPoint(new BlankEndPoint(EndPointAnchor.BOTTOM));<NEW_LINE>start.setStyleClass("start-node");<NEW_LINE>Element idle = new Element("Idle", "10em", "20em");<NEW_LINE>idle.addEndPoint(new BlankEndPoint(EndPointAnchor.TOP));<NEW_LINE>idle.addEndPoint(new BlankEndPoint(EndPointAnchor.BOTTOM_RIGHT));<NEW_LINE>idle.addEndPoint(new BlankEndPoint(EndPointAnchor.BOTTOM_LEFT));<NEW_LINE>Element turnedOn = new Element("TurnedOn", "10em", "35em");<NEW_LINE>turnedOn.addEndPoint(new BlankEndPoint(EndPointAnchor.TOP));<NEW_LINE>turnedOn.addEndPoint(new BlankEndPoint(EndPointAnchor.RIGHT));<NEW_LINE>turnedOn.addEndPoint(new BlankEndPoint(EndPointAnchor.BOTTOM_RIGHT));<NEW_LINE>Element activity = new Element("Activity", "45em", "35em");<NEW_LINE>activity.addEndPoint(<MASK><NEW_LINE>activity.addEndPoint(new BlankEndPoint(EndPointAnchor.BOTTOM_LEFT));<NEW_LINE>activity.addEndPoint(new BlankEndPoint(EndPointAnchor.TOP));<NEW_LINE>activity.addEndPoint(new BlankEndPoint(EndPointAnchor.TOP_RIGHT));<NEW_LINE>activity.addEndPoint(new BlankEndPoint(EndPointAnchor.TOP_LEFT));<NEW_LINE>model.addElement(start);<NEW_LINE>model.addElement(idle);<NEW_LINE>model.addElement(turnedOn);<NEW_LINE>model.addElement(activity);<NEW_LINE>model.connect(createConnection(start.getEndPoints().get(0), idle.getEndPoints().get(0), null));<NEW_LINE>model.connect(createConnection(idle.getEndPoints().get(1), turnedOn.getEndPoints().get(0), "Turn On"));<NEW_LINE>model.connect(createConnection(turnedOn.getEndPoints().get(0), idle.getEndPoints().get(2), "Turn Off"));<NEW_LINE>model.connect(createConnection(turnedOn.getEndPoints().get(1), activity.getEndPoints().get(0), null));<NEW_LINE>model.connect(createConnection(activity.getEndPoints().get(1), turnedOn.getEndPoints().get(2), "Request Turn Off"));<NEW_LINE>model.connect(createConnection(activity.getEndPoints().get(2), activity.getEndPoints().get(2), "Talk"));<NEW_LINE>model.connect(createConnection(activity.getEndPoints().get(3), activity.getEndPoints().get(3), "Run"));<NEW_LINE>model.connect(createConnection(activity.getEndPoints().get(4), activity.getEndPoints().get(4), "Walk"));<NEW_LINE>}
new BlankEndPoint(EndPointAnchor.LEFT));
422,607
private static Model modelFromName(String modelName) {<NEW_LINE>try {<NEW_LINE>Class <MASK><NEW_LINE>return (Model) c.getMethod("MODEL").invoke(null);<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>Log.e(LOG_TAG, "Could not find model \"" + modelName + "\"");<NEW_LINE>return null;<NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>Log.e(LOG_TAG, "Class provided as \"foam:model\", \"" + modelName + "\", is not a real Model, has no .MODEL()");<NEW_LINE>return null;<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>Log.e(LOG_TAG, "Could not execute \"" + modelName + ".MODEL()\". Provide a FOAM-generated Model.");<NEW_LINE>return null;<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>Log.e(LOG_TAG, "Exception inside \"" + modelName + ".MODEL()\": " + e.getCause());<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
c = Class.forName(modelName);
1,783,531
private void writeList(IdEObject object, ByteBuffer buffer, PackageMetaData packageMetaData, EStructuralFeature feature) throws BimserverDatabaseException {<NEW_LINE>if (feature.getEType() instanceof EEnum) {<NEW_LINE>// Aggregate relations to enums never occur... at this<NEW_LINE>// moment<NEW_LINE>} else if (feature.getEType() instanceof EClass) {<NEW_LINE>EList<?> list = (EList<?>) object.eGet(feature);<NEW_LINE>buffer.putInt(list.size());<NEW_LINE>for (Object o : list) {<NEW_LINE>if (o == null) {<NEW_LINE>buffer.order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>buffer.putShort((short) -1);<NEW_LINE>buffer.order(ByteOrder.BIG_ENDIAN);<NEW_LINE>} else {<NEW_LINE>IdEObject listObject = (IdEObject) o;<NEW_LINE>if (listObject.eClass().getEAnnotation("wrapped") != null || listObject.eClass().getEStructuralFeature("wrappedValue") != null) {<NEW_LINE>writeWrappedValue(object.getPid(), object.getRid(), listObject, buffer, packageMetaData);<NEW_LINE>} else if (feature.getEAnnotation("twodimensionalarray") != null) {<NEW_LINE>EStructuralFeature lf = listObject.<MASK><NEW_LINE>writeList(listObject, buffer, packageMetaData, lf);<NEW_LINE>} else if (feature.getEAnnotation("dbembed") != null) {<NEW_LINE>writeEmbeddedValue(object.getPid(), object.getRid(), listObject, buffer, packageMetaData);<NEW_LINE>} else {<NEW_LINE>writeReference(object, listObject, buffer, feature);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (feature.getEType() instanceof EDataType) {<NEW_LINE>EList<?> list = (EList<?>) object.eGet(feature);<NEW_LINE>buffer.putInt(list.size());<NEW_LINE>for (Object o : list) {<NEW_LINE>writePrimitiveValue(feature, o, buffer);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
eClass().getEStructuralFeature("List");
738,723
private static void addValue(StringBuilder buf, Object value, boolean addLinks) throws URISyntaxException {<NEW_LINE>// Note: To be bug-compatible with Javadoc from Java 5/6/7, we currently don't escape HTML tags in String-valued annotations.<NEW_LINE>if (value instanceof ITypeBinding) {<NEW_LINE>ITypeBinding typeBinding = (ITypeBinding) value;<NEW_LINE>IJavaElement type = typeBinding.getJavaElement();<NEW_LINE>if (type == null || !addLinks) {<NEW_LINE>buf.append(typeBinding.getName());<NEW_LINE>} else {<NEW_LINE>String uri = JavaElementLinks.createURI(JavaElementLinks.JAVADOC_SCHEME, type);<NEW_LINE>String name = type.getElementName();<NEW_LINE>addLink(buf, uri, name);<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>buf.append(".class");<NEW_LINE>} else if (value instanceof IVariableBinding) {<NEW_LINE>// only enum constants<NEW_LINE>IVariableBinding variableBinding = (IVariableBinding) value;<NEW_LINE>IJavaElement variable = variableBinding.getJavaElement();<NEW_LINE>if (variable == null || !addLinks) {<NEW_LINE>buf.<MASK><NEW_LINE>} else {<NEW_LINE>String uri = JavaElementLinks.createURI(JavaElementLinks.JAVADOC_SCHEME, variable);<NEW_LINE>String name = variable.getElementName();<NEW_LINE>addLink(buf, uri, name);<NEW_LINE>}<NEW_LINE>} else if (value instanceof IAnnotationBinding) {<NEW_LINE>IAnnotationBinding annotationBinding = (IAnnotationBinding) value;<NEW_LINE>addAnnotation(buf, annotationBinding, addLinks);<NEW_LINE>} else if (value instanceof String) {<NEW_LINE>buf.append(ASTNodes.getEscapedStringLiteral((String) value));<NEW_LINE>} else if (value instanceof Character) {<NEW_LINE>buf.append(ASTNodes.getEscapedCharacterLiteral(((Character) value).charValue()));<NEW_LINE>} else if (value instanceof Object[]) {<NEW_LINE>Object[] values = (Object[]) value;<NEW_LINE>buf.append('{');<NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>if (i > 0) {<NEW_LINE>buf.append(JavaElementLabels.COMMA_STRING);<NEW_LINE>}<NEW_LINE>addValue(buf, values[i], addLinks);<NEW_LINE>}<NEW_LINE>buf.append('}');<NEW_LINE>} else {<NEW_LINE>// primitive types (except char) or null<NEW_LINE>buf.append(String.valueOf(value));<NEW_LINE>}<NEW_LINE>}
append(variableBinding.getName());
1,091,543
public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>if (sources == null) {<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>}<NEW_LINE>final SecurityContext securityContext = ctx.getSecurityContext();<NEW_LINE>final ConfigurationProvider config = StructrApp.getConfiguration();<NEW_LINE>final App app = StructrApp.getInstance(securityContext);<NEW_LINE>final PropertyMap properties = new PropertyMap();<NEW_LINE>// the type to query for<NEW_LINE>Class type = null;<NEW_LINE>if (sources.length >= 1 && sources[0] != null) {<NEW_LINE>final String typeString = sources[0].toString();<NEW_LINE>type = config.getNodeEntityClass(typeString);<NEW_LINE>if (type == null) {<NEW_LINE>logger.warn("Error in get_or_create(): type \"{}\" not found.", typeString);<NEW_LINE>return ERROR_MESSAGE_TYPE_NOT_FOUND + typeString;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// exit gracefully instead of crashing..<NEW_LINE>if (type == null) {<NEW_LINE>logger.warn("Error in get_or_create(): no type specified. Parameters: {}", getParametersAsString(sources));<NEW_LINE>return ERROR_MESSAGE_NO_TYPE_SPECIFIED;<NEW_LINE>}<NEW_LINE>// extension for native javascript objects<NEW_LINE>if (sources.length == 2 && sources[1] instanceof Map) {<NEW_LINE>properties.putAll(PropertyMap.inputTypeToJavaType(securityContext, type, (Map) sources[1]));<NEW_LINE>} else {<NEW_LINE>final int parameter_count = sources.length;<NEW_LINE>if (parameter_count % 2 == 0) {<NEW_LINE>throw new FrameworkException(400, "Invalid number of parameters: " + parameter_count + ". Should be uneven: " + ERROR_MESSAGE_GET_OR_CREATE);<NEW_LINE>}<NEW_LINE>for (int c = 1; c < parameter_count; c += 2) {<NEW_LINE>if (sources[c] == null) {<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>}<NEW_LINE>final PropertyKey key = StructrApp.key(type, sources[c].toString());<NEW_LINE>if (key != null) {<NEW_LINE>final PropertyConverter inputConverter = key.inputConverter(securityContext);<NEW_LINE>Object value = sources[c + 1];<NEW_LINE>if (inputConverter != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>properties.put(key, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final GraphObject obj = app.nodeQuery(type).disableSorting().pageSize(1).and(properties).getFirst();<NEW_LINE>if (obj != null) {<NEW_LINE>// return existing object<NEW_LINE>return obj;<NEW_LINE>}<NEW_LINE>// create new object<NEW_LINE>return app.create(type, properties);<NEW_LINE>} catch (final IllegalArgumentException e) {<NEW_LINE>logParameterError(caller, sources, ctx.isJavaScriptContext());<NEW_LINE>return usage(ctx.isJavaScriptContext());<NEW_LINE>}<NEW_LINE>}
value = inputConverter.convert(value);
119,885
private Column.ColumnType expectUdt(ObjectTypeDefinition definition) throws SkipException {<NEW_LINE>boolean isUdt = DirectiveHelper.getDirective(CqlDirectives.ENTITY, definition).flatMap(d -> DirectiveHelper.getEnumArgument(d, CqlDirectives.ENTITY_TARGET, EntityModel.Target.class, context)).filter(target -> target == EntityModel.Target.UDT).isPresent();<NEW_LINE>if (isUdt) {<NEW_LINE>if (checkForInputType && !DirectiveHelper.getDirective(CqlDirectives.INPUT, definition).isPresent()) {<NEW_LINE>invalidMapping("%s: type '%s' must also be annotated with @%s", messagePrefix, definition.getName(), CqlDirectives.INPUT);<NEW_LINE>throw SkipException.INSTANCE;<NEW_LINE>}<NEW_LINE>return ImmutableUserDefinedType.builder().keyspace(context.getKeyspace().name()).name(definition.<MASK><NEW_LINE>}<NEW_LINE>invalidMapping("%s: can't map type '%s' to CQL -- " + "if a field references an object type, then that object should map to a UDT", messagePrefix, definition.getName());<NEW_LINE>throw SkipException.INSTANCE;<NEW_LINE>}
getName()).build();
851,601
private void calculate(Map<Double, Object> labelOverrideMap) {<NEW_LINE>// a check if all axis data are the exact same values<NEW_LINE>if (minValue == maxValue) {<NEW_LINE>String label = labelOverrideMap.isEmpty() ? " " : labelOverrideMap.values().iterator().next().toString();<NEW_LINE>tickLabels.add(label);<NEW_LINE>tickLocations.add(workingSpace / 2.0);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// tick space - a percentage of the working space available for ticks<NEW_LINE>// in plot space<NEW_LINE>double tickSpace = styler.getPlotContentSize() * workingSpace;<NEW_LINE>// this prevents an infinite loop when the plot gets sized really small.<NEW_LINE>if (tickSpace < styler.getXAxisTickMarkSpacingHint()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// where the tick should begin in the working space in pixels<NEW_LINE>double margin = // in plot space double gridStep = getGridStepForDecimal(tickSpace);<NEW_LINE>Utils.// in plot space double gridStep = getGridStepForDecimal(tickSpace);<NEW_LINE>getTickStartOffset(// in plot space double gridStep = getGridStepForDecimal(tickSpace);<NEW_LINE>workingSpace, tickSpace);<NEW_LINE>// generate all tickLabels and tickLocations from the first to last position<NEW_LINE>for (Entry<Double, Object> entry : labelOverrideMap.entrySet()) {<NEW_LINE>Object value = entry.getValue();<NEW_LINE>String tickLabel = value == null ? " " : value.toString();<NEW_LINE>tickLabels.add(tickLabel);<NEW_LINE>double tickLabelPosition = margin + ((entry.getKey().doubleValue() - minValue) / <MASK><NEW_LINE>tickLocations.add(tickLabelPosition);<NEW_LINE>}<NEW_LINE>}
(maxValue - minValue) * tickSpace);
554,729
final PutLoggingConfigurationResult executePutLoggingConfiguration(PutLoggingConfigurationRequest putLoggingConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putLoggingConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutLoggingConfigurationRequest> request = null;<NEW_LINE>Response<PutLoggingConfigurationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutLoggingConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putLoggingConfigurationRequest));<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, "WAF Regional");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutLoggingConfiguration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutLoggingConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutLoggingConfigurationResultJsonUnmarshaller());<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,462,087
public void tagIndirectlyAccessibleMembers() {<NEW_LINE>if (!isPrototype()) {<NEW_LINE>this.prototype.tagIndirectlyAccessibleMembers();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// https://bugs.eclipse.org/bugs/show_bug.cgi?id=328281<NEW_LINE>for (int i = 0, n = this.fields().length; i < n; i += 1) {<NEW_LINE>if (!this.fields[i].isPrivate())<NEW_LINE>this.fields[<MASK><NEW_LINE>}<NEW_LINE>for (int i = 0, n = this.memberTypes().length; i < n; i += 1) {<NEW_LINE>if (!this.memberTypes[i].isPrivate())<NEW_LINE>this.memberTypes[i].modifiers |= ExtraCompilerModifiers.AccLocallyUsed;<NEW_LINE>}<NEW_LINE>if (this.superclass.isPrivate())<NEW_LINE>if (// should always be true because private super type can only be accessed in same CU<NEW_LINE>this.superclass instanceof SourceTypeBinding)<NEW_LINE>((SourceTypeBinding) this.superclass).tagIndirectlyAccessibleMembers();<NEW_LINE>}
i].modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
137,702
public static Map<String, String> waitTillComponentHasRolled(String namespaceName, LabelSelector selector, Map<String, String> snapshot) {<NEW_LINE>String componentName = selector.getMatchLabels().get(Labels.STRIMZI_NAME_LABEL);<NEW_LINE>LOGGER.info("Waiting for component with name: {} rolling update", componentName);<NEW_LINE>LOGGER.debug("Waiting for rolling update of component matching LabelSelector: {}", selector);<NEW_LINE>TestUtils.waitFor("component with name " + componentName + " rolling update", Constants.WAIT_FOR_ROLLING_UPDATE_INTERVAL, ResourceOperation.timeoutForPodsOperation(snapshot.size()), () -> {<NEW_LINE>try {<NEW_LINE>return componentHasRolled(namespaceName, selector, snapshot);<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>LOGGER.info("Component with name: {} has been successfully rolled", componentName);<NEW_LINE>LOGGER.debug("Component matching LabelSelector: {} successfully rolled", selector);<NEW_LINE>return <MASK><NEW_LINE>}
PodUtils.podSnapshot(namespaceName, selector);
1,628,315
private void writeSummary() {<NEW_LINE>final File summaryFile = new <MASK><NEW_LINE>try (final PrintWriter writer = new PrintWriter(new FileWriter(summaryFile))) {<NEW_LINE>writer.println("##########################################################################################");<NEW_LINE>writer.println("# STRTableSummary");<NEW_LINE>writer.println("# ---------------------------------------");<NEW_LINE>writer.println("# maxPeriod = " + maxPeriod);<NEW_LINE>writer.println("# maxRepeatLength = " + maxRepeatLength);<NEW_LINE>for (final String name : annotations.keySet()) {<NEW_LINE>writer.println("# " + name + " = " + annotations.get(name));<NEW_LINE>}<NEW_LINE>writer.println("##########################################################################################");<NEW_LINE>writer.println(String.join("\t", "period", "repeatLength", "totalCounts", "emittedCounts", "intendedDecimation", "actualDecimation"));<NEW_LINE>for (int period = 1; period <= maxPeriod; period++) {<NEW_LINE>for (int repeatLength = period == 1 ? 1 : 2; repeatLength <= maxRepeatLength; repeatLength++) {<NEW_LINE>final long total = totalCounts[period][repeatLength];<NEW_LINE>final long emitted = emittedCounts[period][repeatLength];<NEW_LINE>final int decimation = decimationTable.decimationBit(period, repeatLength);<NEW_LINE>final double actualDecimation = total > 0 ? (MathUtils.INV_LOG_2 * (Math.log(total) - Math.log(emitted))) : 0;<NEW_LINE>writer.println(Utils.join("\t", period, repeatLength, total, emitted, decimation, Math.round(actualDecimation * 100) / 100.0));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (final IOException e) {<NEW_LINE>throw new GATKException("unexpected issues writing summary file in " + dir);<NEW_LINE>}<NEW_LINE>}
File(dir, STRTableFile.SUMMARY_FILE_NAME);
158,438
private Map toMap(JSONObject jsonObject) throws JSONException {<NEW_LINE>Map parentBean = new HashMap();<NEW_LINE>Iterator i = jsonObject.keys();<NEW_LINE>while (i.hasNext()) {<NEW_LINE>String key = (String) i.next();<NEW_LINE>Object <MASK><NEW_LINE>if (value instanceof JSONObject) {<NEW_LINE>Map subBean = toMap((JSONObject) value);<NEW_LINE>parentBean.put(key, subBean);<NEW_LINE>} else if (value instanceof JSONArray) {<NEW_LINE>JSONArray array = (JSONArray) value;<NEW_LINE>int length = array.length();<NEW_LINE>List list = new ArrayList(length);<NEW_LINE>for (int j = 0; j < length; j++) {<NEW_LINE>Object itemValue = array.get(j);<NEW_LINE>if (itemValue instanceof JSONObject) {<NEW_LINE>list.add(toMap((JSONObject) itemValue));<NEW_LINE>} else {<NEW_LINE>list.add(itemValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>parentBean.put(key, list);<NEW_LINE>} else {<NEW_LINE>parentBean.put(key, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return parentBean;<NEW_LINE>}
value = jsonObject.get(key);
1,046,112
public int size() {<NEW_LINE>// SUM ALL THE COLLECTION SIZES<NEW_LINE>int size = 0;<NEW_LINE>final int totSources = sources.size();<NEW_LINE>for (int i = 0; i < totSources; ++i) {<NEW_LINE>final Object o = sources.get(i);<NEW_LINE>if (o != null)<NEW_LINE>if (o instanceof Collection<?>)<NEW_LINE>size += ((Collection<?>) o).size();<NEW_LINE>else if (o instanceof Map<?, ?>)<NEW_LINE>size += ((Map<?, ?>) o).size();<NEW_LINE>else if (o instanceof OSizeable)<NEW_LINE>size += ((<MASK><NEW_LINE>else if (o.getClass().isArray())<NEW_LINE>size += Array.getLength(o);<NEW_LINE>else if (o instanceof Iterator<?> && o instanceof OResettable) {<NEW_LINE>while (((Iterator<?>) o).hasNext()) {<NEW_LINE>size++;<NEW_LINE>((Iterator<?>) o).next();<NEW_LINE>}<NEW_LINE>((OResettable) o).reset();<NEW_LINE>} else<NEW_LINE>size++;<NEW_LINE>}<NEW_LINE>return size;<NEW_LINE>}
OSizeable) o).size();
1,293,815
private void addBindings() {<NEW_LINE>if (dataModel.getDirection() == OfferDirection.BUY) {<NEW_LINE>volumeDescriptionLabel.bind(createStringBinding(() -> Res.get("createOffer.amountPriceBox.buy.volumeDescription", dataModel.getTradeCurrencyCode().get())<MASK><NEW_LINE>} else {<NEW_LINE>volumeDescriptionLabel.bind(createStringBinding(() -> Res.get("createOffer.amountPriceBox.sell.volumeDescription", dataModel.getTradeCurrencyCode().get()), dataModel.getTradeCurrencyCode()));<NEW_LINE>}<NEW_LINE>volumePromptLabel.bind(createStringBinding(() -> Res.get("createOffer.volume.prompt", dataModel.getTradeCurrencyCode().get()), dataModel.getTradeCurrencyCode()));<NEW_LINE>totalToPay.bind(createStringBinding(() -> btcFormatter.formatCoinWithCode(dataModel.totalToPayAsCoinProperty().get()), dataModel.totalToPayAsCoinProperty()));<NEW_LINE>tradeAmount.bind(createStringBinding(() -> btcFormatter.formatCoinWithCode(dataModel.getAmount().get()), dataModel.getAmount()));<NEW_LINE>tradeCurrencyCode.bind(dataModel.getTradeCurrencyCode());<NEW_LINE>triggerPriceDescription.bind(createStringBinding(this::getTriggerPriceDescriptionLabel, dataModel.getTradeCurrencyCode()));<NEW_LINE>percentagePriceDescription.bind(createStringBinding(this::getPercentagePriceDescription, dataModel.getTradeCurrencyCode()));<NEW_LINE>}
, dataModel.getTradeCurrencyCode()));
748,817
protected Integer doInBackground(Object... params) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<String> commands = (List<String>) params[0];<NEW_LINE>StringBuilder res = (StringBuilder) params[1];<NEW_LINE>Log.i(TAG, "Executing root commands of" + commands.size());<NEW_LINE>try {<NEW_LINE>if (!hasRoot())<NEW_LINE>return exitCode;<NEW_LINE>if (commands != null && commands.size() > 0) {<NEW_LINE>List<String> output = Shell.su(String.valueOf(commands))<MASK><NEW_LINE>if (output != null) {<NEW_LINE>exitCode = 0;<NEW_LINE>if (output.size() > 0) {<NEW_LINE>for (String str : output) {<NEW_LINE>res.append(str);<NEW_LINE>res.append("\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>exitCode = 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>if (res != null)<NEW_LINE>res.append("\n").append(ex);<NEW_LINE>}<NEW_LINE>return exitCode;<NEW_LINE>}
.exec().getOut();
375,415
public void error(VirtualConnection vc, TCPWriteRequestContext wrc, IOException ioe) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled())<NEW_LINE>c_logger.traceEntry(this, "SipResolverTcpTransport: error: write error id=" + hashCode());<NEW_LINE>if (_shutdown == true)<NEW_LINE>return;<NEW_LINE>_transportErrorCount++;<NEW_LINE>// increment connection failed count to force rollover.<NEW_LINE>_connectionFailedCount++;<NEW_LINE>if (c_logger.isTraceDebugEnabled())<NEW_LINE>c_logger.traceDebug("SipResolverTcpTransport: error: write failed: " + hashCode());<NEW_LINE>_writeState = WRITE_STATE_DISCONNECTED;<NEW_LINE>if (_transportErrorCount < _TransportErrorsAllowed) {<NEW_LINE>if (c_logger.isTraceDebugEnabled())<NEW_LINE>c_logger.traceDebug("SipResolverTcpTransport: error: calling transportError - _transprtErrorCount: " + _transportErrorCount);<NEW_LINE>_transportListener.transportError(ioe, this);<NEW_LINE>} else {<NEW_LINE>if (c_logger.isTraceDebugEnabled())<NEW_LINE>c_logger.traceDebug("SipResolverTcpTransport: error: calling transportFailed - _transprtErrorCount: " + _transportErrorCount);<NEW_LINE>_transportErrorCount = 0;<NEW_LINE>_connectionFailedCount = 0;<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (c_logger.isTraceEntryExitEnabled())<NEW_LINE>c_logger.traceExit(this, "SipResolverTcpTransport: error: write error id=" + hashCode());<NEW_LINE>}
_transportListener.transportFailed(ioe, this);
62,160
final CreateMeetingWithAttendeesResult executeCreateMeetingWithAttendees(CreateMeetingWithAttendeesRequest createMeetingWithAttendeesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createMeetingWithAttendeesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateMeetingWithAttendeesRequest> request = null;<NEW_LINE>Response<CreateMeetingWithAttendeesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateMeetingWithAttendeesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createMeetingWithAttendeesRequest));<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, "Chime SDK Meetings");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateMeetingWithAttendees");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateMeetingWithAttendeesResult>> 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 CreateMeetingWithAttendeesResultJsonUnmarshaller());
458,980
private Map<String, Set<String>> listPortNames(Archive archive) {<NEW_LINE>try (URLClassLoader moduleClassLoader = new BootClassLoaderFactory(archive, parent).createClassLoader()) {<NEW_LINE>Set<String> <MASK><NEW_LINE>Set<String> outboundPorts = new HashSet<>();<NEW_LINE>Map<String, Set<String>> portsMap = new HashMap<>();<NEW_LINE>for (Resource resource : visibleConfigurationMetadataResources(moduleClassLoader)) {<NEW_LINE>Properties properties = new Properties();<NEW_LINE>properties.load(resource.getInputStream());<NEW_LINE>inboundPorts.addAll(Arrays.asList(StringUtils.delimitedListToStringArray(properties.getProperty(CONFIGURATION_PROPERTIES_INBOUND_PORTS), ",", " ")));<NEW_LINE>portsMap.put("inbound", inboundPorts);<NEW_LINE>outboundPorts.addAll(Arrays.asList(StringUtils.delimitedListToStringArray(properties.getProperty(CONFIGURATION_PROPERTIES_OUTBOUND_PORTS), ",", " ")));<NEW_LINE>portsMap.put("outbound", outboundPorts);<NEW_LINE>}<NEW_LINE>return portsMap;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new AppMetadataResolutionException("Exception trying to list configuration properties for application " + archive, e);<NEW_LINE>}<NEW_LINE>}
inboundPorts = new HashSet<>();
124,993
private void handleCreateImageRampup(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException {<NEW_LINE>try {<NEW_LINE>final String jsonPayload = HttpRequestUtils.getBody(req);<NEW_LINE>final ImageRampupPlanRequestDTO imageRampupPlanRequest = this.converterUtils.convertToDTO(jsonPayload, ImageRampupPlanRequestDTO.class);<NEW_LINE>// Check for required permission to invoke the API<NEW_LINE>final String imageType = imageRampupPlanRequest.getImageTypeName();<NEW_LINE>if (imageType == null) {<NEW_LINE>log.error("Required field imageType is null. Must provide valid imageType to " + "create rampup.");<NEW_LINE>throw new ImageMgmtValidationException(ErrorCode.BAD_REQUEST, "Required field imageType is null. Must provide valid imageType to create rampup.");<NEW_LINE>}<NEW_LINE>if (!hasImageManagementPermission(imageType, session.getUser(), Type.CREATE)) {<NEW_LINE>log.debug(String.format("Invalid permission to create image rampup " + "plan for user: %s, image type: %s.", session.getUser().getUserId(), imageType));<NEW_LINE>throw new ImageMgmtInvalidPermissionException(ErrorCode.FORBIDDEN, "Invalid permission to " + "create image rampup plan");<NEW_LINE>}<NEW_LINE>// Polupate ImageRampupPlanRequestDTO to transfer the input request<NEW_LINE>imageRampupPlanRequest.setCreatedBy(session.getUser().getUserId());<NEW_LINE>imageRampupPlanRequest.setModifiedBy(session.getUser().getUserId());<NEW_LINE>if (!CollectionUtils.isEmpty(imageRampupPlanRequest.getImageRampups())) {<NEW_LINE>for (final ImageRampupDTO imageRampupRequest : imageRampupPlanRequest.getImageRampups()) {<NEW_LINE>imageRampupRequest.setCreatedBy(session.<MASK><NEW_LINE>imageRampupRequest.setModifiedBy(session.getUser().getUserId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Create image version metadata and image version id<NEW_LINE>final Integer imageRampupPlanId = this.imageRampupService.createImageRampupPlan(imageRampupPlanRequest);<NEW_LINE>// prepare to send response<NEW_LINE>resp.setStatus(HttpStatus.SC_CREATED);<NEW_LINE>resp.setHeader("Location", CREATE_IMAGE_RAMPUP_URI_TEMPLATE.createURI(imageRampupPlanId.toString()));<NEW_LINE>sendResponse(resp, HttpServletResponse.SC_CREATED, new HashMap<>());<NEW_LINE>} catch (final ImageMgmtException e) {<NEW_LINE>log.error("Exception while creating image rampup plan", e);<NEW_LINE>sendErrorResponse(resp, e.getErrorCode().getCode(), e.getMessage());<NEW_LINE>} catch (final Exception e) {<NEW_LINE>log.error("Exception while creating image rampup plan", e);<NEW_LINE>sendErrorResponse(resp, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Exception while creating image rampup plan. " + e.getMessage());<NEW_LINE>}<NEW_LINE>}
getUser().getUserId());
428,694
private void loadNode60() {<NEW_LINE>UaMethodNode node = new UaMethodNode(this.context, Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_Close, new QualifiedName(0, "Close"), new LocalizedText("en", "Close"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), true, true);<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_Close, Identifiers.HasProperty, Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_Close_InputArguments.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_Close, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_Close, Identifiers.HasComponent, Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
1,726,373
public ClusterMergeHistory run(Relation<O> relation) {<NEW_LINE>final QueryBuilder<O> qb = new QueryBuilder<>(relation, distance);<NEW_LINE>final DistanceQuery<O> distQ = qb.distanceQuery();<NEW_LINE>final KNNSearcher<DBIDRef> knnQ = qb.kNNByDBID(minPts);<NEW_LINE>// We need array addressing later.<NEW_LINE>final ArrayDBIDs ids = DBIDUtil.ensureArray(relation.getDBIDs());<NEW_LINE>// Compute the core distances<NEW_LINE>// minPts + 1: ignore query point.<NEW_LINE>final WritableDoubleDataStore coredists = computeCoreDists(ids, knnQ, minPts);<NEW_LINE>WritableDBIDDataStore pi = DataStoreUtil.makeDBIDStorage(ids, DataStoreFactory.HINT_HOT | DataStoreFactory.HINT_STATIC);<NEW_LINE>WritableDoubleDataStore lambda = DataStoreUtil.makeDoubleStorage(ids, DataStoreFactory.HINT_HOT | <MASK><NEW_LINE>// Temporary storage for m.<NEW_LINE>WritableDoubleDataStore m = DataStoreUtil.makeDoubleStorage(ids, DataStoreFactory.HINT_HOT | DataStoreFactory.HINT_TEMP);<NEW_LINE>FiniteProgress progress = LOG.isVerbose() ? new FiniteProgress("Running HDBSCAN*-SLINK", ids.size(), LOG) : null;<NEW_LINE>// has to be an array for monotonicity reasons!<NEW_LINE>ModifiableDBIDs processedIDs = DBIDUtil.newArray(ids.size());<NEW_LINE>for (DBIDIter id = ids.iter(); id.valid(); id.advance()) {<NEW_LINE>// Steps 1,3,4 are exactly as in SLINK<NEW_LINE>pi.put(id, id);<NEW_LINE>// Step 2 is modified to use a different distance<NEW_LINE>step2(id, processedIDs, distQ, coredists, m);<NEW_LINE>step3(id, pi, lambda, processedIDs, m);<NEW_LINE>step4(id, pi, lambda, processedIDs);<NEW_LINE>processedIDs.add(id);<NEW_LINE>LOG.incrementProcessed(progress);<NEW_LINE>}<NEW_LINE>LOG.ensureCompleted(progress);<NEW_LINE>return //<NEW_LINE>SLINK.convertOutput(new ClusterMergeHistoryBuilder(ids, distance.isSquared()), ids, pi, lambda).complete(coredists);<NEW_LINE>}
DataStoreFactory.HINT_STATIC, Double.POSITIVE_INFINITY);
592,646
protected ExecutionEntity createEmbeddedSubProcessHierarchy(SubProcess subProcess, ExecutionEntity defaultParentExecution, Map<String, SubProcess> subProcessesToCreate, Set<String> movingExecutionIds, ProcessInstanceChangeState processInstanceChangeState, CommandContext commandContext) {<NEW_LINE>ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);<NEW_LINE>if (processInstanceChangeState.getProcessInstanceActiveEmbeddedExecutions().containsKey(subProcess.getId())) {<NEW_LINE>return processInstanceChangeState.getProcessInstanceActiveEmbeddedExecutions().get(subProcess.getId()).get(0);<NEW_LINE>}<NEW_LINE>if (processInstanceChangeState.getCreatedEmbeddedSubProcesses().containsKey(subProcess.getId())) {<NEW_LINE>return processInstanceChangeState.getCreatedEmbeddedSubProcesses().get(subProcess.getId());<NEW_LINE>}<NEW_LINE>// Create the parent, if needed<NEW_LINE>ExecutionEntity parentSubProcess = defaultParentExecution;<NEW_LINE>if (subProcess.getSubProcess() != null) {<NEW_LINE>parentSubProcess = createEmbeddedSubProcessHierarchy(subProcess.getSubProcess(), defaultParentExecution, subProcessesToCreate, movingExecutionIds, processInstanceChangeState, commandContext);<NEW_LINE>processInstanceChangeState.getCreatedEmbeddedSubProcesses().put(subProcess.getSubProcess().getId(), parentSubProcess);<NEW_LINE>}<NEW_LINE>ExecutionEntityManager executionEntityManager = processEngineConfiguration.getExecutionEntityManager();<NEW_LINE>ExecutionEntity subProcessExecution = executionEntityManager.createChildExecution(parentSubProcess);<NEW_LINE>subProcessExecution.setCurrentFlowElement(subProcess);<NEW_LINE>subProcessExecution.setScope(true);<NEW_LINE>FlowableEventDispatcher eventDispatcher = processEngineConfiguration.getEventDispatcher();<NEW_LINE>if (eventDispatcher != null && eventDispatcher.isEnabled()) {<NEW_LINE>eventDispatcher.dispatchEvent(FlowableEventBuilder.createActivityEvent(FlowableEngineEventType.ACTIVITY_STARTED, subProcess.getId(), subProcess.getName(), subProcessExecution.getId(), subProcessExecution.getProcessInstanceId(), subProcessExecution.getProcessDefinitionId(), subProcess), processEngineConfiguration.getEngineCfgKey());<NEW_LINE>}<NEW_LINE>subProcessExecution.setVariablesLocal(processDataObjects(subProcess.getDataObjects()));<NEW_LINE>processEngineConfiguration.<MASK><NEW_LINE>List<BoundaryEvent> boundaryEvents = subProcess.getBoundaryEvents();<NEW_LINE>if (CollectionUtil.isNotEmpty(boundaryEvents)) {<NEW_LINE>executeBoundaryEvents(boundaryEvents, subProcessExecution);<NEW_LINE>}<NEW_LINE>if (subProcess instanceof EventSubProcess) {<NEW_LINE>processCreatedEventSubProcess((EventSubProcess) subProcess, subProcessExecution, movingExecutionIds, commandContext);<NEW_LINE>}<NEW_LINE>ProcessInstanceHelper processInstanceHelper = processEngineConfiguration.getProcessInstanceHelper();<NEW_LINE>// Process containing child Event SubProcesses not contained in this creation hierarchy<NEW_LINE>List<EventSubProcess> childEventSubProcesses = subProcess.findAllSubFlowElementInFlowMapOfType(EventSubProcess.class);<NEW_LINE>childEventSubProcesses.stream().filter(childEventSubProcess -> !subProcessesToCreate.containsKey(childEventSubProcess.getId())).forEach(childEventSubProcess -> processInstanceHelper.processEventSubProcess(subProcessExecution, childEventSubProcess, commandContext));<NEW_LINE>return subProcessExecution;<NEW_LINE>}
getActivityInstanceEntityManager().recordActivityStart(subProcessExecution);
788,643
private static void assertIndexChoice(RegressionEnvironment env, boolean namedWindow, String[] indexes, Object[] preloadedEvents, String datawindow, IndexAssertion[] assertions) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplCreate = namedWindow ? "@name('create-window') @public create window MyInfra." + datawindow + " as SupportSimpleBeanOne" : "@name('create-table') @public create table MyInfra(s1 string primary key, i1 int, d1 double, l1 long)";<NEW_LINE>env.compileDeploy(eplCreate, path);<NEW_LINE>env.compileDeploy("insert into MyInfra select s1,i1,d1,l1 from SupportSimpleBeanOne", path);<NEW_LINE>for (String index : indexes) {<NEW_LINE>env.compileDeploy("@name('create-index') " + index, path);<NEW_LINE>}<NEW_LINE>for (Object event : preloadedEvents) {<NEW_LINE>env.sendEventBean(event);<NEW_LINE>}<NEW_LINE>int count = 0;<NEW_LINE>for (IndexAssertion assertion : assertions) {<NEW_LINE>log.info("======= Testing #" + count++);<NEW_LINE>String consumeEpl = INDEX_CALLBACK_HOOK + (assertion.getHint() == null ? "" : assertion.getHint()) + "@name('s0') on SupportSimpleBeanTwo as ssb2 " + "select * " <MASK><NEW_LINE>String epl = "@name('s0') " + consumeEpl;<NEW_LINE>if (assertion.getEventSendAssertion() == null) {<NEW_LINE>env.assertThat(() -> {<NEW_LINE>try {<NEW_LINE>env.compileWCheckedEx(epl, path);<NEW_LINE>fail();<NEW_LINE>} catch (EPCompileException ex) {<NEW_LINE>assertTrue(ex.getMessage().contains("index hint busted"));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>env.compileDeploy(epl, path).addListener("s0");<NEW_LINE>env.assertThat(() -> SupportQueryPlanIndexHook.assertOnExprTableAndReset(assertion.getExpectedIndexName(), assertion.getIndexBackingClass()));<NEW_LINE>assertion.getEventSendAssertion().run();<NEW_LINE>env.undeployModuleContaining("s0");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>env.undeployAll();<NEW_LINE>}
+ "from MyInfra as ssb1 where " + assertion.getWhereClause();
29,426
protected void onDecoraTag(final Tag tag) {<NEW_LINE>String tagName = tag.getName().toString();<NEW_LINE>if (tag.getType() == TagType.SELF_CLOSING) {<NEW_LINE>checkNestedDecoraTags();<NEW_LINE><MASK><NEW_LINE>decoraTagStart = tag.getTagPosition();<NEW_LINE>decoraTagEnd = tag.getTagPosition() + tag.getTagLength();<NEW_LINE>defineDecoraTag();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (tag.getType() == TagType.START) {<NEW_LINE>checkNestedDecoraTags();<NEW_LINE>decoraTagName = tagName.substring(7);<NEW_LINE>decoraTagStart = tag.getTagPosition();<NEW_LINE>decoraTagDefaultValueStart = tag.getTagPosition() + tag.getTagLength();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// closed tag type<NEW_LINE>decoraTagEnd = tag.getTagPosition() + tag.getTagLength();<NEW_LINE>decoraTagDefaultValueEnd = tag.getTagPosition();<NEW_LINE>defineDecoraTag();<NEW_LINE>}
decoraTagName = tagName.substring(7);
1,699,524
public void sessionPut(HttpServletRequest request, HttpServletResponse response) throws Throwable {<NEW_LINE>boolean createSession = Boolean.parseBoolean(request.getParameter("createSession"));<NEW_LINE>HttpSession session = request.getSession(createSession);<NEW_LINE>if (createSession)<NEW_LINE>System.out.println("Created a new session with sessionID=" + session.getId());<NEW_LINE>else<NEW_LINE>System.out.println("Re-using existing session with sessionID=" + session == null ? null : session.getId());<NEW_LINE>String <MASK><NEW_LINE>String value = request.getParameter("value");<NEW_LINE>String type = request.getParameter("type");<NEW_LINE>Object val = toType(type, value);<NEW_LINE>session.setAttribute(key, val);<NEW_LINE>String sessionID = session.getId();<NEW_LINE>System.out.println("Put entry: " + key + '=' + value + " into sessionID=" + sessionID);<NEW_LINE>response.getWriter().write("session id: [" + sessionID + "]");<NEW_LINE>// Normally, session postinvoke writes the updates after the servlet returns control to the test logic.<NEW_LINE>// This can be a problem if the test logic proceeds to execute further test logic based on the expectation<NEW_LINE>// that updates made under the previous servlet request have gone into effect. Tests that are vulnerable<NEW_LINE>// to this can use the sync=true parameter to force update to be made before servlet returns.<NEW_LINE>boolean sync = Boolean.parseBoolean(request.getParameter("sync"));<NEW_LINE>if (sync)<NEW_LINE>((IBMSession) session).sync();<NEW_LINE>}
key = request.getParameter("key");
550,606
final DeleteManagedPrefixListResult executeDeleteManagedPrefixList(DeleteManagedPrefixListRequest deleteManagedPrefixListRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteManagedPrefixListRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteManagedPrefixListRequest> request = null;<NEW_LINE>Response<DeleteManagedPrefixListResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new DeleteManagedPrefixListRequestMarshaller().marshall(super.beforeMarshalling(deleteManagedPrefixListRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteManagedPrefixList");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DeleteManagedPrefixListResult> responseHandler = new StaxResponseHandler<DeleteManagedPrefixListResult>(new DeleteManagedPrefixListResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,019,304
private void build() {<NEW_LINE>List<Node> children = new ArrayList<>();<NEW_LINE>VBox row = null;<NEW_LINE>int count = 0;<NEW_LINE>final SourceGridView view = getSkinnable();<NEW_LINE>for (CalendarSource source : view.getCalendarSources()) {<NEW_LINE>for (Calendar calendar : source.getCalendars()) {<NEW_LINE>view.getCalendarVisibilityProperty(calendar).removeListener(buildWeakListener);<NEW_LINE>view.getCalendarVisibilityProperty(calendar).addListener(buildWeakListener);<NEW_LINE>if (!view.isCalendarVisible(calendar)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (count == 0) {<NEW_LINE>row = new VBox();<NEW_LINE>row.getStyleClass().add("column");<NEW_LINE>children.add(row);<NEW_LINE>}<NEW_LINE>row.getChildren().<MASK><NEW_LINE>count++;<NEW_LINE>if (count == view.getMaximumRowsPerColumn()) {<NEW_LINE>count = 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>container.getChildren().setAll(children);<NEW_LINE>}
add(new CalendarItem(calendar));
1,845,111
private List<CSharpMethodHost> buildUpdateMethodHosts(List<CSharpParameterHost> allColumns, List<GenTaskBySqlBuilder> currentTableBuilders) throws Exception {<NEW_LINE>List<CSharpMethodHost> methods = new ArrayList<>();<NEW_LINE>for (GenTaskBySqlBuilder builder : currentTableBuilders) {<NEW_LINE>if (!builder.getCrud_type().equals("update")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>CSharpMethodHost method = new CSharpMethodHost();<NEW_LINE>method.setCrud_type(builder.getCrud_type());<NEW_LINE>method.setName(builder.getMethod_name());<NEW_LINE>method.setSql(builder.getSql_content());<NEW_LINE>method.setScalarType(builder.getScalarType());<NEW_LINE>method.setPaging(builder.getPagination());<NEW_LINE>List<CSharpParameterHost> parameters = new ArrayList<>();<NEW_LINE>String[] fields = StringUtils.split(builder.getFields(), ",");<NEW_LINE>for (String field : fields) {<NEW_LINE>for (CSharpParameterHost pHost : allColumns) {<NEW_LINE>if (pHost.getName().equals(field)) {<NEW_LINE>parameters.add(pHost);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<CSharpParameterHost> whereParams = buildMethodParameterHost4SqlConditin(builder, allColumns);<NEW_LINE>Pattern pt = Pattern.compile("where.*", Pattern.CASE_INSENSITIVE);<NEW_LINE>Matcher mt = pt.<MASK><NEW_LINE>if (mt.find())<NEW_LINE>parameters.addAll(buildSqlParamName(whereParams, mt.group()));<NEW_LINE>else<NEW_LINE>parameters.addAll(whereParams);<NEW_LINE>method.setParameters(parameters);<NEW_LINE>methods.add(method);<NEW_LINE>}<NEW_LINE>return methods;<NEW_LINE>}
matcher(method.getSql());
1,841,674
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {<NEW_LINE>builder.addConstructorArgValue(this.expectReply);<NEW_LINE>parseInputChannel(element, parserContext, builder);<NEW_LINE>IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "error-channel");<NEW_LINE>BeanDefinition payloadExpressionDef = IntegrationNamespaceUtils.createExpressionDefIfAttributeDefined("payload-expression", element);<NEW_LINE>if (payloadExpressionDef != null) {<NEW_LINE>builder.addPropertyValue("payloadExpression", payloadExpressionDef);<NEW_LINE>}<NEW_LINE>parseHeaders(element, builder);<NEW_LINE>if (this.expectReply) {<NEW_LINE>IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "reply-channel");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "request-timeout");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "reply-timeout");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "extract-reply-payload");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "reply-key");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "convert-exceptions");<NEW_LINE>} else {<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "send-timeout", "requestTimeout");<NEW_LINE>}<NEW_LINE>BeanDefinition expressionDef = IntegrationNamespaceUtils.createExpressionDefinitionFromValueOrExpression("view-name", "view-expression", parserContext, element, false);<NEW_LINE>if (expressionDef != null) {<NEW_LINE>builder.addPropertyValue("viewExpression", expressionDef);<NEW_LINE>}<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "errors-key");<NEW_LINE>IntegrationNamespaceUtils.<MASK><NEW_LINE>IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "message-converters");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "merge-with-default-converters");<NEW_LINE>parseHeaderMapper(element, parserContext, builder);<NEW_LINE>BeanDefinition requestMappingDef = createRequestMapping(element);<NEW_LINE>builder.addPropertyValue("requestMapping", requestMappingDef);<NEW_LINE>parseCrossOrigin(element, builder);<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "request-payload-type", "requestPayloadTypeClass");<NEW_LINE>BeanDefinition statusCodeExpressionDef = IntegrationNamespaceUtils.createExpressionDefIfAttributeDefined("status-code-expression", element);<NEW_LINE>if (statusCodeExpressionDef == null) {<NEW_LINE>statusCodeExpressionDef = IntegrationNamespaceUtils.createExpressionDefIfAttributeDefined("reply-timeout-status-code-expression", element);<NEW_LINE>}<NEW_LINE>if (statusCodeExpressionDef != null) {<NEW_LINE>builder.addPropertyValue("statusCodeExpression", statusCodeExpressionDef);<NEW_LINE>}<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, IntegrationNamespaceUtils.AUTO_STARTUP);<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, IntegrationNamespaceUtils.PHASE);<NEW_LINE>IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "validator");<NEW_LINE>}
setValueIfAttributeDefined(builder, element, "error-code");
1,524,987
public JSDynamicObject createPrototype(final JSRealm realm, JSFunctionObject ctor) {<NEW_LINE>JSContext ctx = realm.getContext();<NEW_LINE>Shape protoShape = JSShape.createPrototypeShape(ctx, INSTANCE, realm.getObjectPrototype());<NEW_LINE>JSObject prototype = JSStringObject.create(protoShape, Strings.EMPTY_STRING);<NEW_LINE>JSObjectUtil.setOrVerifyPrototype(ctx, prototype, realm.getObjectPrototype());<NEW_LINE>JSObjectUtil.putConstructorProperty(ctx, prototype, ctor);<NEW_LINE>// sets the length just for the prototype<NEW_LINE>JSObjectUtil.putDataProperty(ctx, prototype, LENGTH, 0, JSAttributes.notConfigurableNotEnumerableNotWritable());<NEW_LINE>JSObjectUtil.putFunctionsFromContainer(<MASK><NEW_LINE>if (ctx.isOptionNashornCompatibilityMode() || ctx.getParserOptions().getEcmaScriptVersion() >= JSConfig.ECMAScript2019) {<NEW_LINE>JSObjectUtil.putFunctionsFromContainer(realm, prototype, StringPrototypeBuiltins.EXTENSION_BUILTINS);<NEW_LINE>}<NEW_LINE>if (ctx.isOptionAnnexB()) {<NEW_LINE>// trimLeft/trimRight are the same objects as trimStart/trimEnd<NEW_LINE>Object trimStart = JSObject.get(prototype, TRIM_START);<NEW_LINE>Object trimEnd = JSObject.get(prototype, TRIM_END);<NEW_LINE>JSObjectUtil.putDataProperty(ctx, prototype, TRIM_LEFT, trimStart, JSAttributes.configurableNotEnumerableWritable());<NEW_LINE>JSObjectUtil.putDataProperty(ctx, prototype, TRIM_RIGHT, trimEnd, JSAttributes.configurableNotEnumerableWritable());<NEW_LINE>}<NEW_LINE>return prototype;<NEW_LINE>}
realm, prototype, StringPrototypeBuiltins.BUILTINS);
1,264,999
private BufferedImage generateColoredIcon(BufferedImage image) {<NEW_LINE>Color color = null;<NEW_LINE>if (model.getColorCode() != null) {<NEW_LINE>String colorString = model.getColorCode();<NEW_LINE>color = decodeColor(colorString);<NEW_LINE>}<NEW_LINE>if (color == null)<NEW_LINE>return image;<NEW_LINE>int width = image.getWidth();<NEW_LINE>int height = image.getHeight();<NEW_LINE>boolean hasAlpha = image.getColorModel().hasAlpha();<NEW_LINE>BufferedImage newImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>WritableRaster raster = newImage.getRaster();<NEW_LINE>for (int xx = 0; xx < width; xx++) {<NEW_LINE>for (int yy = 0; yy < height; yy++) {<NEW_LINE>int originalPixel = image.getRGB(xx, yy);<NEW_LINE>int originalAlpha;<NEW_LINE>if (hasAlpha) {<NEW_LINE>originalAlpha = new Color(originalPixel, true).getAlpha();<NEW_LINE>} else {<NEW_LINE>// Due to ImageIO's issue, `hasAlpha` is assigned `false` although PNG file has alpha channel.<NEW_LINE>// Regarding PNG files of Material Icon, in this case, the file is 1bit depth binary(BLACK or WHITE).<NEW_LINE>// Therefore BLACK is `alpha = 0` and WHITE is `alpha = 255`<NEW_LINE>originalAlpha <MASK><NEW_LINE>}<NEW_LINE>int[] pixels = new int[4];<NEW_LINE>pixels[0] = color.getRed();<NEW_LINE>pixels[1] = color.getGreen();<NEW_LINE>pixels[2] = color.getBlue();<NEW_LINE>pixels[3] = combineAlpha(originalAlpha, color.getAlpha());<NEW_LINE>raster.setPixel(xx, yy, pixels);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return newImage;<NEW_LINE>}
= originalPixel == 0xFF000000 ? 0 : 255;
281,087
// creates the rate computation<NEW_LINE>private RateComputation createRateComputation(SchedulePeriod period, int scheduleIndex) {<NEW_LINE>// handle where index value at start date is known<NEW_LINE>LocalDate endDate = period.getEndDate();<NEW_LINE>if (firstIndexValue != null && scheduleIndex == 0) {<NEW_LINE>return createRateComputation(endDate);<NEW_LINE>}<NEW_LINE>YearMonth referenceStartMonth = YearMonth.from(period.getStartDate().minus(lag));<NEW_LINE>YearMonth referenceEndMonth = YearMonth.from<MASK><NEW_LINE>if (indexCalculationMethod.equals(PriceIndexCalculationMethod.INTERPOLATED)) {<NEW_LINE>// interpolate between data from two different months<NEW_LINE>double weight = 1d - (endDate.getDayOfMonth() - 1d) / endDate.lengthOfMonth();<NEW_LINE>return InflationInterpolatedRateComputation.of(index, referenceStartMonth, referenceEndMonth, weight);<NEW_LINE>} else if (indexCalculationMethod.equals(PriceIndexCalculationMethod.MONTHLY)) {<NEW_LINE>// no interpolation<NEW_LINE>return InflationMonthlyRateComputation.of(index, referenceStartMonth, referenceEndMonth);<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("PriceIndexCalculationMethod " + indexCalculationMethod.toString() + " is not supported");<NEW_LINE>}<NEW_LINE>}
(endDate.minus(lag));
1,049,675
public Object evaluateRecord(OIdentifiable iRecord, ODocument iCurrentResult, OSQLFilterCondition iCondition, Object iLeft, Object iRight, OCommandContext iContext, final ODocumentSerializer serializer) {<NEW_LINE>OLuceneFullTextIndex index = involvedIndex(iRecord, iCurrentResult, iCondition, iLeft, iRight);<NEW_LINE>if (index == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>MemoryIndex memoryIndex = (MemoryIndex) iContext.getVariable(MEMORY_INDEX);<NEW_LINE>if (memoryIndex == null) {<NEW_LINE>memoryIndex = new MemoryIndex();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>memoryIndex.reset();<NEW_LINE>try {<NEW_LINE>// In case of collection field evaluate the query with every item until matched<NEW_LINE>if (iLeft instanceof List && index.isCollectionIndex()) {<NEW_LINE>return matchCollectionIndex((List) iLeft, iRight, index, memoryIndex);<NEW_LINE>} else {<NEW_LINE>return matchField(iLeft, iRight, index, memoryIndex);<NEW_LINE>}<NEW_LINE>} catch (ParseException e) {<NEW_LINE>OLogManager.instance().error(this, "error occurred while building query", e);<NEW_LINE>} catch (IOException e) {<NEW_LINE>OLogManager.instance().error(this, "error occurred while building memory index", e);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
iContext.setVariable(MEMORY_INDEX, memoryIndex);
945,633
protected void service(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws ServletException, IOException {<NEW_LINE>PrintWriter responseWriter = servletResponse.getWriter();<NEW_LINE>responseWriter.println(prependType("Entry"));<NEW_LINE>String operation = servletRequest.getParameter(OPERATION_PARAMETER_NAME);<NEW_LINE>if (operation == null) {<NEW_LINE>responseWriter.println("Error: No operation parameter [ " + OPERATION_PARAMETER_NAME + " ]");<NEW_LINE>servletResponse.setStatus(HttpServletResponse.SC_BAD_REQUEST);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (operation.equals(OPERATION_DECREMENT)) {<NEW_LINE><MASK><NEW_LINE>responseWriter.println("Decrement [ " + Integer.toString(finalCount) + " ]");<NEW_LINE>} else if (operation.equals(OPERATION_INCREMENT)) {<NEW_LINE>int finalCount = servletCount.increment();<NEW_LINE>responseWriter.println("Increment [ " + Integer.toString(finalCount) + " ]");<NEW_LINE>} else if (operation.equals(OPERATION_GET_COUNT)) {<NEW_LINE>int count = servletCount.getCount();<NEW_LINE>responseWriter.println("Count [ " + Integer.toString(count) + " ]");<NEW_LINE>} else if (operation.equals(OPERATION_DISPLAY_LOG)) {<NEW_LINE>displayApplicationLog(responseWriter, servletRequest, servletResponse);<NEW_LINE>} else {<NEW_LINE>responseWriter.println("Error: Unknown operation parameter [ " + OPERATION_PARAMETER_NAME + " ] [ " + operation + " ]");<NEW_LINE>servletResponse.setStatus(HttpServletResponse.SC_BAD_REQUEST);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>responseWriter.println(prependType("Exit"));<NEW_LINE>}
int finalCount = servletCount.decrement();
197,140
public void run() {<NEW_LINE>// Get the controller and localBitEndPoint outside the loop since these will not change once a Drillbit and<NEW_LINE>// StatusThread is started<NEW_LINE>final Controller controller = dContext.getController();<NEW_LINE>final DrillbitEndpoint localBitEndPoint = dContext.getEndpoint();<NEW_LINE>while (true) {<NEW_LINE>final List<DrillRpcFuture<Ack><MASK><NEW_LINE>for (final FragmentExecutor fragmentExecutor : runningFragments.values()) {<NEW_LINE>final FragmentStatus status = fragmentExecutor.getStatus();<NEW_LINE>if (status == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final DrillbitEndpoint foremanEndpoint = fragmentExecutor.getContext().getForemanEndpoint();<NEW_LINE>// If local endpoint is the Foreman for this running fragment, then submit the status locally bypassing the<NEW_LINE>// Control Tunnel<NEW_LINE>if (localBitEndPoint.equals(foremanEndpoint)) {<NEW_LINE>workBus.statusUpdate(status);<NEW_LINE>} else {<NEW_LINE>// else send the status to remote Foreman over Control Tunnel<NEW_LINE>futures.add(controller.getTunnel(foremanEndpoint).sendFragmentStatus(status));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (final DrillRpcFuture<Ack> future : futures) {<NEW_LINE>try {<NEW_LINE>future.checkedGet();<NEW_LINE>} catch (final RpcException ex) {<NEW_LINE>logger.info("Failure while sending intermediate fragment status to Foreman", ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Thread.sleep(STATUS_PERIOD_SECONDS * 1000);<NEW_LINE>} catch (final InterruptedException e) {<NEW_LINE>// Preserve evidence that the interruption occurred so that code higher up on the call stack can learn of the<NEW_LINE>// interruption and respond to it if it wants to.<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>// exit status thread on interrupt.<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> futures = Lists.newArrayList();
534,417
public IpAddressUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>IpAddressUpdate ipAddressUpdate = new IpAddressUpdate();<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("IpId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>ipAddressUpdate.setIpId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("SubnetId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>ipAddressUpdate.setSubnetId(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("Ip", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>ipAddressUpdate.setIp(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 ipAddressUpdate;<NEW_LINE>}
class).unmarshall(context));
592,633
public static ListProofChainResponse unmarshall(ListProofChainResponse listProofChainResponse, UnmarshallerContext _ctx) {<NEW_LINE>listProofChainResponse.setRequestId(_ctx.stringValue("ListProofChainResponse.RequestId"));<NEW_LINE>listProofChainResponse.setCode(_ctx.integerValue("ListProofChainResponse.Code"));<NEW_LINE>listProofChainResponse.setSuccess(_ctx.booleanValue("ListProofChainResponse.Success"));<NEW_LINE>listProofChainResponse.setMessage(_ctx.stringValue("ListProofChainResponse.Message"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setTotal(_ctx.integerValue("ListProofChainResponse.Data.Total"));<NEW_LINE>data.setNum(_ctx.integerValue("ListProofChainResponse.Data.Num"));<NEW_LINE>data.setSize(_ctx.integerValue("ListProofChainResponse.Data.Size"));<NEW_LINE>List<ProofChainInfo> pageData = new ArrayList<ProofChainInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListProofChainResponse.Data.PageData.Length"); i++) {<NEW_LINE>ProofChainInfo proofChainInfo = new ProofChainInfo();<NEW_LINE>proofChainInfo.setBizChainId(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].BizChainId"));<NEW_LINE>proofChainInfo.setName(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].Name"));<NEW_LINE>proofChainInfo.setRemark(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].Remark"));<NEW_LINE>proofChainInfo.setRoleType(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].RoleType"));<NEW_LINE>proofChainInfo.setBizChainCode(_ctx.stringValue<MASK><NEW_LINE>proofChainInfo.setDataTypeCode(_ctx.stringValue("ListProofChainResponse.Data.PageData[" + i + "].DataTypeCode"));<NEW_LINE>pageData.add(proofChainInfo);<NEW_LINE>}<NEW_LINE>data.setPageData(pageData);<NEW_LINE>listProofChainResponse.setData(data);<NEW_LINE>return listProofChainResponse;<NEW_LINE>}
("ListProofChainResponse.Data.PageData[" + i + "].BizChainCode"));
1,093,233
public void loadSkin() {<NEW_LINE>this.grantOwnershipItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.CHATROOM_MEMBER_OWNER), 16, 16));<NEW_LINE>this.grantAdminItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.CHATROOM_MEMBER_ADMIN), 16, 16));<NEW_LINE>this.grantMembershipItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.CHATROOM_MEMBER_STANDARD), 16, 16));<NEW_LINE>this.grantModeratorItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.<MASK><NEW_LINE>this.grantVoiceItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.CHATROOM_MEMBER_STANDARD), 16, 16));<NEW_LINE>this.revokeAdminItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.CHATROOM_MEMBER_STANDARD), 16, 16));<NEW_LINE>this.revokeMembershipItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.CHATROOM_MEMBER_GUEST), 16, 16));<NEW_LINE>this.revokeModeratorItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.CHATROOM_MEMBER_STANDARD), 16, 16));<NEW_LINE>this.revokeOwnershipItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.CHATROOM_MEMBER_ADMIN), 16, 16));<NEW_LINE>this.revokeVoiceItem.setIcon(ImageUtils.getScaledRoundedIcon(ImageLoader.getImage(ImageLoader.CHAT_ROOM_REVOKE_VOICE), 16, 16));<NEW_LINE>this.kickItem.setIcon(new ImageIcon(ImageLoader.getImage(ImageLoader.KICK_ICON_16x16)));<NEW_LINE>this.banItem.setIcon(new ImageIcon(ImageLoader.getImage(ImageLoader.BAN_ICON_16x16)));<NEW_LINE>this.changeNicknameItem.setIcon(new ImageIcon(ImageLoader.getImage(ImageLoader.CHANGE_NICKNAME_ICON_16x16)));<NEW_LINE>this.changeRoomSubjectItem.setIcon(new ImageIcon(ImageLoader.getImage(ImageLoader.CHANGE_ROOM_SUBJECT_ICON_16x16)));<NEW_LINE>}
CHATROOM_MEMBER_MODERATOR), 16, 16));
465,818
private Iterable<FoundItemDescriptor<PsiFileSystemItem>> matchQualifiers(MinusculeMatcher qualifierMatcher, Iterable<? extends PsiFileSystemItem> iterable) {<NEW_LINE>List<FoundItemDescriptor<PsiFileSystemItem>> matching = new ArrayList<>();<NEW_LINE>for (PsiFileSystemItem item : iterable) {<NEW_LINE>ProgressManager.checkCanceled();<NEW_LINE>String qualifier = Objects.requireNonNull(getParentPath(item));<NEW_LINE>FList<TextRange> fragments = qualifierMatcher.matchingFragments(qualifier);<NEW_LINE>if (fragments != null) {<NEW_LINE>int gapPenalty = fragments.isEmpty() ? 0 : qualifier.length() - fragments.get(fragments.size(<MASK><NEW_LINE>int degree = qualifierMatcher.matchingDegree(qualifier, false, fragments) - gapPenalty;<NEW_LINE>matching.add(new FoundItemDescriptor<>(item, degree));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (matching.size() > 1) {<NEW_LINE>Comparator<FoundItemDescriptor<PsiFileSystemItem>> comparator = Comparator.comparing((FoundItemDescriptor<PsiFileSystemItem> res) -> res.getWeight()).reversed();<NEW_LINE>Collections.sort(matching, comparator);<NEW_LINE>}<NEW_LINE>return matching;<NEW_LINE>}
) - 1).getEndOffset();
1,147,393
public FrameDetail mapRow(ResultSet rs, int rowNum) throws SQLException {<NEW_LINE>FrameDetail frame = new FrameDetail();<NEW_LINE>frame.id = rs.getString("pk_frame");<NEW_LINE>frame.dependCount = rs.getInt("int_depend_count");<NEW_LINE>frame.exitStatus = rs.getInt("int_exit_status");<NEW_LINE>frame.jobId = rs.getString("pk_job");<NEW_LINE>frame.layerId = rs.getString("pk_layer");<NEW_LINE>frame.showId = rs.getString("pk_show");<NEW_LINE>frame.maxRss = rs.getLong("int_mem_max_used");<NEW_LINE>frame.name = rs.getString("str_name");<NEW_LINE>frame.number = rs.getInt("int_number");<NEW_LINE>frame.dispatchOrder = rs.getInt("int_dispatch_order");<NEW_LINE>frame.retryCount = rs.getInt("int_retries");<NEW_LINE>frame.dateStarted = rs.getTimestamp("ts_started");<NEW_LINE>frame.dateStopped = rs.getTimestamp("ts_stopped");<NEW_LINE>frame.dateUpdated = rs.getTimestamp("ts_updated");<NEW_LINE>frame.dateLLU = rs.getTimestamp("ts_llu");<NEW_LINE>frame.version = rs.getInt("int_version");<NEW_LINE>if (rs.getString("str_host") != null) {<NEW_LINE>frame.lastResource = String.format("%s/%d/%d", rs.getString("str_host"), rs.getInt("int_cores")<MASK><NEW_LINE>} else {<NEW_LINE>frame.lastResource = "";<NEW_LINE>}<NEW_LINE>frame.state = FrameState.valueOf(rs.getString("str_state"));<NEW_LINE>return frame;<NEW_LINE>}
, rs.getInt("int_gpus"));