idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
381,015
public ParameterMapping unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ParameterMapping parameterMapping = new ParameterMapping();<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("Name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>parameterMapping.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Type", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>parameterMapping.setType(TypeJsonUnmarshaller.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 parameterMapping;<NEW_LINE>}
().unmarshall(context));
363,854
public void updateMessageWithNewAttachments(final String messageId, final List<File> files) {<NEW_LINE>Realm realm = MessageDatabaseManager.getInstance().getNewBackgroundRealm();<NEW_LINE>realm.executeTransaction(new Realm.Transaction() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void execute(Realm realm) {<NEW_LINE>MessageItem messageItem = realm.where(MessageItem.class).equalTo(MessageItem.Fields.UNIQUE_ID, messageId).findFirst();<NEW_LINE>if (messageItem != null) {<NEW_LINE>RealmList<Attachment> attachments = messageItem.getAttachments();<NEW_LINE>// remove temporary attachments created from uri<NEW_LINE>// to replace it with attachments created from files<NEW_LINE>attachments.deleteAllFromRealm();<NEW_LINE>for (File file : files) {<NEW_LINE>Attachment attachment = new Attachment();<NEW_LINE>attachment.setFilePath(file.getPath());<NEW_LINE>attachment.setFileSize(file.length());<NEW_LINE>attachment.setTitle(file.getName());<NEW_LINE>attachment.setIsImage(FileManager.fileIsImage(file));<NEW_LINE>attachment.setMimeType(HttpFileUploadManager.getMimeType(file.getPath()));<NEW_LINE>attachment.setDuration((long) 0);<NEW_LINE>if (attachment.isImage()) {<NEW_LINE>HttpFileUploadManager.ImageSize imageSize = HttpFileUploadManager.getImageSizes(file.getPath());<NEW_LINE>attachment.<MASK><NEW_LINE>attachment.setImageWidth(imageSize.getWidth());<NEW_LINE>}<NEW_LINE>attachments.add(attachment);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
setImageHeight(imageSize.getHeight());
1,836,868
public Collection<? extends AlternativeLocation> overrides(ParserResult info, ElementHandle handle) {<NEW_LINE>assert handle instanceof ModelElement;<NEW_LINE>if (handle instanceof MethodScope) {<NEW_LINE>MethodScope method = (MethodScope) handle;<NEW_LINE>final ElementFilter methodNameFilter = ElementFilter.forName(NameKind.exact(method.getName()));<NEW_LINE>final Set<MethodElement> overridenMethods = methodNameFilter.filter(getInheritedMethods(info, method));<NEW_LINE>List<AlternativeLocation> retval = new ArrayList<>();<NEW_LINE>for (MethodElement methodElement : overridenMethods) {<NEW_LINE>retval.add(MethodLocation.newInstance(methodElement));<NEW_LINE>}<NEW_LINE>return retval;<NEW_LINE>} else if (handle instanceof FieldElement) {<NEW_LINE>FieldElement field = (FieldElement) handle;<NEW_LINE>final ElementFilter fieldNameFilter = ElementFilter.forName(NameKind.exact(field.getName()));<NEW_LINE>Set<org.netbeans.modules.php.editor.api.elements.FieldElement> overridenFields = fieldNameFilter.filter(getInheritedFields(info, field));<NEW_LINE>List<AlternativeLocation> retval = new ArrayList<>();<NEW_LINE>for (org.netbeans.modules.php.editor.api.elements.FieldElement fieldElement : overridenFields) {<NEW_LINE>retval.add(FieldLocation.newInstance(fieldElement));<NEW_LINE>}<NEW_LINE>return retval;<NEW_LINE>} else if (handle instanceof ClassConstantElement) {<NEW_LINE>ClassConstantElement constant = (ClassConstantElement) handle;<NEW_LINE>final ElementFilter constantNameFilter = ElementFilter.forName(NameKind.exact(constant.getName()));<NEW_LINE>Set<TypeConstantElement> overridenConstants = constantNameFilter.filter<MASK><NEW_LINE>List<AlternativeLocation> retval = new ArrayList<>();<NEW_LINE>for (TypeConstantElement constantElement : overridenConstants) {<NEW_LINE>retval.add(ClassConstantLocation.newInstance(constantElement));<NEW_LINE>}<NEW_LINE>return retval;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
(getInheritedClassConstants(info, constant));
1,195,700
protected CmmnElement convert(XMLStreamReader xtr, ConversionHelper conversionHelper) {<NEW_LINE>Case caze = new Case();<NEW_LINE>caze.setName(xtr.getAttributeValue(null, CmmnXmlConstants.ATTRIBUTE_NAME));<NEW_LINE>caze.setInitiatorVariableName(xtr.getAttributeValue(CmmnXmlConstants.FLOWABLE_EXTENSIONS_NAMESPACE, CmmnXmlConstants.ATTRIBUTE_INITIATOR_VARIABLE_NAME));<NEW_LINE>String candidateUsersString = CmmnXmlUtil.getAttributeValue(CmmnXmlConstants.ATTRIBUTE_CASE_CANDIDATE_USERS, xtr);<NEW_LINE>if (StringUtils.isNotEmpty(candidateUsersString)) {<NEW_LINE>List<String> candidateUsers = CmmnXmlUtil.parseDelimitedList(candidateUsersString);<NEW_LINE>caze.setCandidateStarterUsers(candidateUsers);<NEW_LINE>}<NEW_LINE>String candidateGroupsString = CmmnXmlUtil.<MASK><NEW_LINE>if (StringUtils.isNotEmpty(candidateGroupsString)) {<NEW_LINE>List<String> candidateGroups = CmmnXmlUtil.parseDelimitedList(candidateGroupsString);<NEW_LINE>caze.setCandidateStarterGroups(candidateGroups);<NEW_LINE>}<NEW_LINE>if ("true".equals(xtr.getAttributeValue(CmmnXmlConstants.FLOWABLE_EXTENSIONS_NAMESPACE, CmmnXmlConstants.ATTRIBUTE_IS_ASYNCHRONOUS))) {<NEW_LINE>caze.setAsync(true);<NEW_LINE>}<NEW_LINE>conversionHelper.getCmmnModel().addCase(caze);<NEW_LINE>conversionHelper.setCurrentCase(caze);<NEW_LINE>return caze;<NEW_LINE>}
getAttributeValue(CmmnXmlConstants.ATTRIBUTE_CASE_CANDIDATE_GROUPS, xtr);
57,166
public void authorizeContainer(String apiKey, String containerName) {<NEW_LINE>_logger.infof("Authorizing %s for %s\n", apiKey, containerName);<NEW_LINE>// add the container if it does not exist; update datelastaccessed if it<NEW_LINE>// does<NEW_LINE>java.sql.Date now = new java.sql.Date(new <MASK><NEW_LINE>String insertContainersString = String.format("REPLACE INTO %s (%s, %s, %s) VALUES (?, ?, ?)", TABLE_CONTAINERS, COLUMN_CONTAINER_NAME, COLUMN_DATE_CREATED, COLUMN_DATE_LAST_ACCESSED);<NEW_LINE>int numInsertRows;<NEW_LINE>try (PreparedStatement insertContainers = _dbConn.prepareStatement(insertContainersString)) {<NEW_LINE>insertContainers.setString(1, containerName);<NEW_LINE>insertContainers.setDate(2, now);<NEW_LINE>insertContainers.setDate(3, now);<NEW_LINE>numInsertRows = executeUpdate(insertContainers);<NEW_LINE>} catch (SQLException e) {<NEW_LINE>throw new BatfishException("Could not update containers table", e);<NEW_LINE>}<NEW_LINE>// MySQL says 2 rows impacted when an old row is updated; otherwise it<NEW_LINE>// says 1<NEW_LINE>if (numInsertRows == 1) {<NEW_LINE>_logger.infof("New container added\n");<NEW_LINE>}<NEW_LINE>// return if already accessible<NEW_LINE>if (isAccessibleNetwork(apiKey, containerName, false)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int numRows;<NEW_LINE>String insertPermissionsString = String.format("INSERT INTO %s (%s, %s) VALUES (?, ?)", TABLE_PERMISSIONS, COLUMN_APIKEY, COLUMN_CONTAINER_NAME);<NEW_LINE>try (PreparedStatement insertPermissions = _dbConn.prepareStatement(insertPermissionsString)) {<NEW_LINE>insertPermissions.setString(1, apiKey);<NEW_LINE>insertPermissions.setString(2, containerName);<NEW_LINE>numRows = executeUpdate(insertPermissions);<NEW_LINE>} catch (SQLException e) {<NEW_LINE>throw new BatfishException("Could not update permissions table", e);<NEW_LINE>}<NEW_LINE>if (numRows > 0) {<NEW_LINE>String cacheKey = getPermsCacheKey(apiKey, containerName);<NEW_LINE>_cachePermissions.put(cacheKey, Boolean.TRUE);<NEW_LINE>_logger.infof("Authorization successful\n");<NEW_LINE>}<NEW_LINE>}
Date().getTime());
1,704,663
final DeleteNotificationResult executeDeleteNotification(DeleteNotificationRequest deleteNotificationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteNotificationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteNotificationRequest> request = null;<NEW_LINE>Response<DeleteNotificationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteNotificationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteNotificationRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Budgets");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteNotification");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteNotificationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteNotificationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
928,036
private static List<URL> serviceItemToUrls(ConfigItem item, ConfiguratorConfig config) {<NEW_LINE>List<URL> urls = new ArrayList<>();<NEW_LINE>List<<MASK><NEW_LINE>addresses.forEach(addr -> {<NEW_LINE>StringBuilder urlBuilder = new StringBuilder();<NEW_LINE>urlBuilder.append("override://").append(addr).append('/');<NEW_LINE>urlBuilder.append(appendService(config.getKey()));<NEW_LINE>urlBuilder.append(toParameterString(item));<NEW_LINE>parseEnabled(item, config, urlBuilder);<NEW_LINE>urlBuilder.append("&configVersion=").append(config.getConfigVersion());<NEW_LINE>List<String> apps = item.getApplications();<NEW_LINE>if (CollectionUtils.isNotEmpty(apps)) {<NEW_LINE>apps.forEach(app -> {<NEW_LINE>StringBuilder tmpUrlBuilder = new StringBuilder(urlBuilder);<NEW_LINE>urls.add(URL.valueOf(tmpUrlBuilder.append("&application=").append(app).toString()));<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>urls.add(URL.valueOf(urlBuilder.toString()));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return urls;<NEW_LINE>}
String> addresses = parseAddresses(item);
1,838,810
public void main() {<NEW_LINE>super.main();<NEW_LINE>RMat4 inverseV = (RMat4) getGlobal(DefaultShaderVar.U_INVERSE_VIEW_MATRIX);<NEW_LINE>RVec4 color = (RVec4) getGlobal(DefaultShaderVar.G_COLOR);<NEW_LINE>RVec4 cmColor = new RVec4("cmColor");<NEW_LINE>RVec3 eyeDir = (RVec3) getGlobal(DefaultShaderVar.V_EYE_DIR);<NEW_LINE>RVec3 normal = (RVec3) getGlobal(DefaultShaderVar.V_NORMAL);<NEW_LINE>RVec3 reflected = new RVec3("reflected");<NEW_LINE>reflected.assign(reflect(eyeDir.xyz(), normal));<NEW_LINE>reflected.assign(normalize(reflected));<NEW_LINE>int cubeMapCount = 0, sphereMapCount = 0;<NEW_LINE>for (int i = 0; i < mTextures.size(); i++) {<NEW_LINE>if (mTextures.get(i).getTextureType() == TextureType.SPHERE_MAP) {<NEW_LINE>reflected.z().assignAdd(1.0f);<NEW_LINE>RFloat m = new RFloat("m");<NEW_LINE>m.assign(inversesqrt(<MASK><NEW_LINE>m.assignMultiply(-.5f);<NEW_LINE>cmColor.assign(texture2D(muTextures[sphereMapCount++], reflected.xy().multiply(m).add(castVec2(.5f))));<NEW_LINE>} else if (mTextures.get(i).getTextureType() == TextureType.CUBE_MAP) {<NEW_LINE>RVec3 viewNormal = new RVec3("viewNormal");<NEW_LINE>viewNormal.assign(castVec3(multiply(inverseV, castVec4(normal, 0))));<NEW_LINE>reflected.assign(reflect(eyeDir.xyz(), viewNormal));<NEW_LINE>reflected.assign(castVec3(multiply(inverseV, castVec4(reflected, 0))));<NEW_LINE>reflected.x().assignMultiply(-1);<NEW_LINE>cmColor.assign(textureCube(muCubeTextures[cubeMapCount++], reflected));<NEW_LINE>}<NEW_LINE>cmColor.assignMultiply(muInfluences[i]);<NEW_LINE>color.assignAdd(cmColor);<NEW_LINE>}<NEW_LINE>}
dot(reflected, reflected)));
999,212
private BulkResponse bulkIndexWithRetry(BulkRequest bulkRequest, String jobId, Supplier<Boolean> shouldRetry, Consumer<String> retryMsgHandler, BiConsumer<BulkRequest, ActionListener<BulkResponse>> actionExecutor) {<NEW_LINE>if (isShutdown || isResetMode) {<NEW_LINE>throw new ElasticsearchException("Bulk indexing has failed as {}", isShutdown ? "node is shutting down." : "machine learning feature is being reset.");<NEW_LINE>}<NEW_LINE>final PlainActionFuture<BulkResponse<MASK><NEW_LINE>final Object key = new Object();<NEW_LINE>final ActionListener<BulkResponse> removeListener = ActionListener.runBefore(getResponse, () -> onGoingRetryableBulkActions.remove(key));<NEW_LINE>BulkRetryableAction bulkRetryableAction = new BulkRetryableAction(jobId, new BulkRequestRewriter(bulkRequest), () -> (isShutdown == false && isResetMode == false) && shouldRetry.get(), retryMsgHandler, actionExecutor, removeListener);<NEW_LINE>onGoingRetryableBulkActions.put(key, bulkRetryableAction);<NEW_LINE>bulkRetryableAction.run();<NEW_LINE>if (isShutdown || isResetMode) {<NEW_LINE>bulkRetryableAction.cancel(new CancellableThreads.ExecutionCancelledException(isShutdown ? "Node is shutting down" : "Machine learning feature is being reset"));<NEW_LINE>}<NEW_LINE>return getResponse.actionGet();<NEW_LINE>}
> getResponse = PlainActionFuture.newFuture();
114,908
private Object mapValue(Map<String, Object> options, String key, Map<String, Object> map) {<NEW_LINE>Object out = null;<NEW_LINE>if (map.containsKey(key)) {<NEW_LINE>out = map.get(key);<NEW_LINE>} else if (key.contains(".")) {<NEW_LINE>String[] keys = key.split("\\.");<NEW_LINE>out = map.get(keys[0]);<NEW_LINE>for (int i = 1; i < keys.length; i++) {<NEW_LINE>if (out instanceof Map) {<NEW_LINE>Map<String, Object> m = keysToString((Map<Object, Object>) out);<NEW_LINE>out = m.get(keys[i]);<NEW_LINE>} else if (canConvert(out)) {<NEW_LINE>out = engine.toMap(out)<MASK><NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!(out instanceof Map) && canConvert(out)) {<NEW_LINE>out = objectToMap(options, out);<NEW_LINE>}<NEW_LINE>return out;<NEW_LINE>}
.get(keys[i]);
932,973
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {<NEW_LINE>if (!(message instanceof TextMessage))<NEW_LINE>throw new MessageFormatException("Message: " + message);<NEW_LINE>String tableName;<NEW_LINE>if (destination instanceof Queue)<NEW_LINE>tableName = ((Queue) destination).getQueueName();<NEW_LINE>else if (destination instanceof Topic)<NEW_LINE>tableName = ((Topic) destination).getTopicName();<NEW_LINE>else<NEW_LINE>throw new InvalidDestinationException("Destination: " + destination);<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>try {<NEW_LINE>if (!session.transactionInProgress) {<NEW_LINE>session.con.mc.con.setAutoCommit(false);<NEW_LINE>session.con.mc.notify(ConnectionEvent.LOCAL_TRANSACTION_STARTED, session.con, null);<NEW_LINE>session.transactionInProgress = true;<NEW_LINE>}<NEW_LINE>pstmt = session.con.mc.con.prepareStatement("insert into " + tableName + " (messageText) values (?)");<NEW_LINE>pstmt.setString(1, ((TextMessage) message).getText());<NEW_LINE>pstmt.executeUpdate();<NEW_LINE><MASK><NEW_LINE>} catch (JMSException x) {<NEW_LINE>throw x;<NEW_LINE>} catch (RuntimeException x) {<NEW_LINE>throw x;<NEW_LINE>} catch (Exception x) {<NEW_LINE>throw (JMSException) new JMSException(x.getMessage()).initCause(x);<NEW_LINE>} finally {<NEW_LINE>if (pstmt != null)<NEW_LINE>try {<NEW_LINE>pstmt.close();<NEW_LINE>} catch (SQLException x) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
notifyEndpoints(destination, message, deliveryMode);
269,818
private static synchronized void _focusLost(JTextComponent c, Component newFocused, List<PropertyChangeEvent> events) {<NEW_LINE>Item item = item(c);<NEW_LINE>// NOI18N<NEW_LINE>assert (item != null) : "Not registered!";<NEW_LINE>// For explicit close notifications: in practice the closing comes first before focus lost.<NEW_LINE>if (item.focused) {<NEW_LINE>item.focused = false;<NEW_LINE>if (!item.ignoreAncestorChange && firstValidComponent() != c) {<NEW_LINE>// NOI18N<NEW_LINE>throw new IllegalStateException("Invalid ordering of focusLost()");<NEW_LINE>}<NEW_LINE>c.removePropertyChangeListener(PropertyDocL.INSTANCE);<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.FINE, FOCUS_LOST_PROPERTY + ": " <MASK><NEW_LINE>logItemListFinest();<NEW_LINE>}<NEW_LINE>events.add(new PropertyChangeEvent(EditorRegistry.class, FOCUS_LOST_PROPERTY, c, newFocused));<NEW_LINE>}<NEW_LINE>}
+ dumpComponent(c) + '\n');
1,362,691
private // TODO: This will only handle first-order dependencies and does not check for circular dependencies<NEW_LINE>List<WorldRasterizer> ensureRasterizerOrdering(ListMultimap<Class<? extends WorldFacet>, FacetProvider> providerChains, boolean scalable) {<NEW_LINE>List<WorldRasterizer> orderedRasterizers = Lists.newArrayList();<NEW_LINE>Set<Class<? extends WorldRasterizer>> addedRasterizers = new HashSet<>();<NEW_LINE>for (WorldRasterizer rasterizer : rasterizers) {<NEW_LINE>// Does this have dependencies on other rasterizers<NEW_LINE>RequiresRasterizer requiresRasterizer = rasterizer.getClass().getAnnotation(RequiresRasterizer.class);<NEW_LINE>if (requiresRasterizer != null) {<NEW_LINE>List<Class<? extends WorldRasterizer>> antecedentClassList = Arrays.<MASK><NEW_LINE>List<WorldRasterizer> antecedents = rasterizers.stream().filter(r -> antecedentClassList.contains(r.getClass())).collect(Collectors.toList());<NEW_LINE>// Add all antecedents to the list first<NEW_LINE>antecedents.forEach(dependency -> {<NEW_LINE>if (!addedRasterizers.contains(dependency.getClass())) {<NEW_LINE>tryAddRasterizer(orderedRasterizers, dependency, providerChains, scalable);<NEW_LINE>addedRasterizers.add(dependency.getClass());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// Then add this one<NEW_LINE>tryAddRasterizer(orderedRasterizers, rasterizer, providerChains, scalable);<NEW_LINE>} else {<NEW_LINE>tryAddRasterizer(orderedRasterizers, rasterizer, providerChains, scalable);<NEW_LINE>addedRasterizers.add(rasterizer.getClass());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return orderedRasterizers;<NEW_LINE>}
asList(requiresRasterizer.value());
413,954
public UpdateSecurityProfileResult updateSecurityProfile(UpdateSecurityProfileRequest updateSecurityProfileRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateSecurityProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateSecurityProfileRequest> request = null;<NEW_LINE>Response<UpdateSecurityProfileResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new <MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<UpdateSecurityProfileResult, JsonUnmarshallerContext> unmarshaller = new UpdateSecurityProfileResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<UpdateSecurityProfileResult> responseHandler = new JsonResponseHandler<UpdateSecurityProfileResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
UpdateSecurityProfileRequestMarshaller().marshall(updateSecurityProfileRequest);
586,289
private static AggregateCall rollUp(int groupCount, RelBuilder relBuilder, AggregateCall aggregateCall, TileKey tileKey) {<NEW_LINE>if (aggregateCall.isDistinct()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>final Pair<SqlAggFunction, List<Integer>> seek = Pair.of(aggregation, aggregateCall.getArgList());<NEW_LINE>final int offset = tileKey.dimensions.cardinality();<NEW_LINE>final ImmutableList<Lattice.Measure> measures = tileKey.measures;<NEW_LINE>// First, try to satisfy the aggregation by rolling up an aggregate in the<NEW_LINE>// materialization.<NEW_LINE>final int i = find(measures, seek);<NEW_LINE>tryRoll: if (i >= 0) {<NEW_LINE>final SqlAggFunction roll = SubstitutionVisitor.getRollup(aggregation);<NEW_LINE>if (roll == null) {<NEW_LINE>break tryRoll;<NEW_LINE>}<NEW_LINE>return AggregateCall.create(roll, false, aggregateCall.isApproximate(), ImmutableList.of(offset + i), -1, groupCount, relBuilder.peek(), null, aggregateCall.name);<NEW_LINE>}<NEW_LINE>// Second, try to satisfy the aggregation based on group set columns.<NEW_LINE>tryGroup: {<NEW_LINE>List<Integer> newArgs = Lists.newArrayList();<NEW_LINE>for (Integer arg : aggregateCall.getArgList()) {<NEW_LINE>int z = tileKey.dimensions.indexOf(arg);<NEW_LINE>if (z < 0) {<NEW_LINE>break tryGroup;<NEW_LINE>}<NEW_LINE>newArgs.add(z);<NEW_LINE>}<NEW_LINE>return AggregateCall.create(aggregation, false, aggregateCall.isApproximate(), newArgs, -1, groupCount, relBuilder.peek(), null, aggregateCall.name);<NEW_LINE>}<NEW_LINE>// No roll up possible.<NEW_LINE>return null;<NEW_LINE>}
SqlAggFunction aggregation = aggregateCall.getAggregation();
1,266,536
private static Map<String, String> createDefaultCheckerSetMap() {<NEW_LINE>Map<String, String> folderMap = new HashMap<>();<NEW_LINE>folderMap.put(Tool.COVERITY.name(), "codecc_default_rules_" + Tool.COVERITY.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.KLOCWORK.name(), "codecc_default_rules_" + Tool.KLOCWORK.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.PINPOINT.name(), "codecc_default_rules_" + Tool.PINPOINT.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.CPPLINT.name(), "codecc_default_rules_" + Tool.CPPLINT.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.CHECKSTYLE.name(), "codecc_default_rules_" + Tool.CHECKSTYLE.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.STYLECOP.name(), "codecc_default_rules_" + Tool.STYLECOP.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.GOML.name(), "codecc_default_rules_" + Tool.GOML.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.DETEKT.name(), "codecc_default_rules_" + Tool.DETEKT.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.PYLINT.name(), "codecc_default_rules_" + Tool.PYLINT.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.OCCHECK.name(), "codecc_default_rules_" + Tool.OCCHECK.name().toLowerCase());<NEW_LINE>folderMap.put(ComConstants.PHPCSStandardCode.PSR2.name(), "codecc_default_psr2_rules");<NEW_LINE>folderMap.put(ComConstants.PHPCSStandardCode.PSR12.name(), "codecc_default_psr12_rules");<NEW_LINE>folderMap.put(ComConstants.PHPCSStandardCode.PSR1.name(), "codecc_default_psr1_rules");<NEW_LINE>folderMap.put(ComConstants.PHPCSStandardCode.PEAR.name(), "codecc_default_pear_rules");<NEW_LINE>folderMap.put(ComConstants.PHPCSStandardCode.Zend.name(), "codecc_default_zend_rules");<NEW_LINE>folderMap.put(ComConstants.PHPCSStandardCode.Squiz.name(), "codecc_default_squiz_rules");<NEW_LINE>folderMap.put(ComConstants.PHPCSStandardCode.MySource.name(), "codecc_default_mysource_rules");<NEW_LINE>folderMap.put(ComConstants.PHPCSStandardCode.Generic.name(), "codecc_default_generic_rules");<NEW_LINE>folderMap.put(ComConstants.EslintFrameworkType.react.name(), "codecc_default_react_rules");<NEW_LINE>folderMap.put(ComConstants.EslintFrameworkType.vue.name(), "codecc_default_vue_rules");<NEW_LINE>folderMap.put(ComConstants.EslintFrameworkType.standard.name(), "codecc_default_standard_rules");<NEW_LINE>folderMap.put(Tool.SENSITIVE.name(), "codecc_default_rules_" + Tool.SENSITIVE.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.HORUSPY.name(), "codecc_v2_default_" + Tool.HORUSPY.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.WOODPECKER_SENSITIVE.name(), "codecc_v2_default_" + Tool.WOODPECKER_SENSITIVE.name().toLowerCase());<NEW_LINE>folderMap.put(Tool.RIPS.name(), "codecc_v2_default_" + Tool.RIPS.<MASK><NEW_LINE>return folderMap;<NEW_LINE>}
name().toLowerCase());
1,035,866
public static /*<NEW_LINE>int MXImperativeInvokeEx(Pointer creator, int num_inputs, PointerByReference inputs,<NEW_LINE>IntBuffer num_outputs, PointerByReference outputs, int num_params,<NEW_LINE>String param_keys[], String param_vals[],<NEW_LINE>PointerByReference out_stypes);<NEW_LINE><NEW_LINE>int MXNDArraySyncCopyFromCPU(Pointer handle, Pointer data, NativeSize size);<NEW_LINE><NEW_LINE>int MXNDArraySyncCopyFromNDArray(Pointer handle_dst, Pointer handle_src, int i);<NEW_LINE><NEW_LINE>int MXNDArraySyncCheckFormat(Pointer handle, byte full_check);<NEW_LINE><NEW_LINE><NEW_LINE>int MXNDArrayReshape(Pointer handle, int ndim, IntBuffer dims, PointerByReference out);<NEW_LINE><NEW_LINE>int MXNDArrayReshape64(Pointer handle, int ndim, LongBuffer dims, byte reverse,<NEW_LINE>PointerByReference out);<NEW_LINE><NEW_LINE>int MXNDArrayGetData(Pointer handle, PointerByReference out_pdata);<NEW_LINE><NEW_LINE>int <MASK><NEW_LINE><NEW_LINE>int MXNDArrayFromDLPack(Pointer dlpack, PointerByReference out_handle);<NEW_LINE><NEW_LINE>int MXNDArrayCallDLPackDeleter(Pointer dlpack);<NEW_LINE><NEW_LINE>int MXNDArrayGetDType(Pointer handle, IntBuffer out_dtype);<NEW_LINE><NEW_LINE>int MXNDArrayGetAuxType(Pointer handle, int i, IntBuffer out_type);<NEW_LINE><NEW_LINE>int MXNDArrayGetAuxNDArray(Pointer handle, int i, PointerByReference out);<NEW_LINE><NEW_LINE>int MXNDArrayGetDataNDArray(Pointer handle, PointerByReference out);<NEW_LINE><NEW_LINE>int MXNDArrayGetContext(Pointer handle, IntBuffer out_dev_type, IntBuffer out_dev_id);<NEW_LINE>*/<NEW_LINE>Pointer detachGradient(Pointer handle) {<NEW_LINE>PointerByReference ref = REFS.acquire();<NEW_LINE>checkCall(LIB.MXNDArrayDetach(handle, ref));<NEW_LINE>Pointer pointer = ref.getValue();<NEW_LINE>REFS.recycle(ref);<NEW_LINE>return pointer;<NEW_LINE>}
MXNDArrayToDLPack(Pointer handle, PointerByReference out_dlpack);
483,799
FragmentResult runRemoteQueryAt(Location.Remote location, TransactionMode transactionMode, String queryString, MapValue parameters) {<NEW_LINE>ExecutionOptions executionOptions = plan.inFabricContext() ? new ExecutionOptions(location.getGraphId()) : new ExecutionOptions();<NEW_LINE>lifecycle.startExecution(true);<NEW_LINE>Mono<StatementResult> statementResult = ctx.getRemote().run(location, executionOptions, queryString, transactionMode, parameters);<NEW_LINE>Flux<Record> records = statementResult.flatMapMany(sr -> sr.records().doOnComplete(() -> sr.summary().subscribe(this::updateSummary)));<NEW_LINE>// 'onComplete' signal coming from an inner stream might cause more data being requested from an upstream operator<NEW_LINE>// and the request will be done using the thread that invoked 'onComplete'.<NEW_LINE>// Since 'onComplete' is invoked by driver IO thread ( Netty event loop ), this might cause the driver thread to block<NEW_LINE>// or perform a computationally intensive operation in an upstream operator if the upstream operator is Cypher local execution<NEW_LINE>// that produces records directly in 'request' call.<NEW_LINE>Flux<Record> recordsWithCompletionDelegation <MASK><NEW_LINE>Flux<Record> prefetchedRecords = prefetcher.addPrefetch(recordsWithCompletionDelegation);<NEW_LINE>Mono<ExecutionPlanDescription> planDescription = statementResult.flatMap(StatementResult::summary).map(Summary::executionPlanDescription).map(remotePlanDescription -> new RemoteExecutionPlanDescription(remotePlanDescription, location));<NEW_LINE>// TODO: We currently need to override here since we can't get it from remote properly<NEW_LINE>// but our result here is not as accurate as what the remote might report.<NEW_LINE>Mono<QueryExecutionType> executionType = Mono.just(EffectiveQueryType.queryExecutionType(plan, accessMode));<NEW_LINE>return new FragmentResult(prefetchedRecords, planDescription, executionType);<NEW_LINE>}
= new CompletionDelegatingOperator(records, fabricWorkerExecutor);
418,549
private String buildMainQuery(String orderBy, OrmQueryRequest<?> request, CQueryPredicates predicates, SpiRawSql.Sql sql) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(sql.getPreFrom());<NEW_LINE>sb.append(" ");<NEW_LINE>String s = sql.getPreWhere();<NEW_LINE>BindParams bindParams = request.query().getBindParams();<NEW_LINE>if (bindParams != null && bindParams.requiresNamedParamsPrepare()) {<NEW_LINE>// convert named parameters into positioned parameters<NEW_LINE>// Named Parameters only allowed prior to dynamic where<NEW_LINE>// clause (so not allowed in having etc - use unparsed)<NEW_LINE>s = BindParamsParser.parse(bindParams, s);<NEW_LINE>}<NEW_LINE>sb.append(s).append(" ");<NEW_LINE>String dynamicWhere = null;<NEW_LINE>if (request.query().getId() != null) {<NEW_LINE>// need to convert this as well. This avoids the<NEW_LINE>// assumption that id has its proper dbColumn assigned<NEW_LINE>// which may change if using multiple raw sql statements<NEW_LINE>// against the same bean.<NEW_LINE>BeanDescriptor<?> descriptor = request.descriptor();<NEW_LINE>// FIXME: I think this is broken... needs to be logical<NEW_LINE>// and then parsed for RawSqlSelect...<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>String dbWhere = predicates.getDbWhere();<NEW_LINE>if (hasValue(dbWhere)) {<NEW_LINE>if (dynamicWhere == null) {<NEW_LINE>dynamicWhere = dbWhere;<NEW_LINE>} else {<NEW_LINE>dynamicWhere += " and " + dbWhere;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (hasValue(dynamicWhere)) {<NEW_LINE>if (sql.isAndWhereExpr()) {<NEW_LINE>sb.append(" and ");<NEW_LINE>} else {<NEW_LINE>sb.append(" where ");<NEW_LINE>}<NEW_LINE>sb.append(dynamicWhere).append(" ");<NEW_LINE>}<NEW_LINE>String preHaving = sql.getPreHaving();<NEW_LINE>if (hasValue(preHaving)) {<NEW_LINE>sb.append(preHaving).append(" ");<NEW_LINE>}<NEW_LINE>String dbHaving = predicates.getDbHaving();<NEW_LINE>if (hasValue(dbHaving)) {<NEW_LINE>if (sql.isAndHavingExpr()) {<NEW_LINE>sb.append(" and ");<NEW_LINE>} else {<NEW_LINE>sb.append(" having ");<NEW_LINE>}<NEW_LINE>sb.append(dbHaving).append(" ");<NEW_LINE>}<NEW_LINE>if (hasValue(orderBy)) {<NEW_LINE>sb.append(" ").append(sql.getOrderByPrefix()).append(" ").append(orderBy);<NEW_LINE>}<NEW_LINE>return sb.toString().trim();<NEW_LINE>}
dynamicWhere = descriptor.idBinderIdSql(null);
1,733,068
public ApiResponse<Subscription> subscriptionGetSubscriptionWithHttpInfo() throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/subscription";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new <MASK><NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json", "text/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<Subscription> localVarReturnType = new GenericType<Subscription>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
HashMap<String, String>();
1,221,749
private void internalCheck(Set<String> sqlServerSet, Map<String, Set<String>> connStrMap) throws Exception {<NEW_LINE>StringBuilder errorInfo = new StringBuilder();<NEW_LINE>boolean sqlServerSetMark = false;<NEW_LINE>if (sqlServerSet.size() > 0) {<NEW_LINE>errorInfo.append(System.lineSeparator());<NEW_LINE>errorInfo.append("> Id generator does not support SqlServer yet. ");<NEW_LINE>errorInfo.append("These SqlServer logic databases have been configured with id generator: ");<NEW_LINE>errorInfo.append(StringUtils.join(sqlServerSet, ", "));<NEW_LINE>errorInfo.append(".");<NEW_LINE>sqlServerSetMark = true;<NEW_LINE>}<NEW_LINE>boolean connStrMapMark = false;<NEW_LINE>for (String key : connStrMap.keySet()) {<NEW_LINE>Set<String> value = connStrMap.get(key);<NEW_LINE>if (value.size() > 1) {<NEW_LINE>if (!connStrMapMark) {<NEW_LINE>errorInfo.append(System.lineSeparator());<NEW_LINE>errorInfo.append("> Duplicated databases found in multiple logic databases with different sequenceDbNames. ");<NEW_LINE>errorInfo.append("Below are the connection strings of the duplicated databases: ");<NEW_LINE>connStrMapMark = true;<NEW_LINE>}<NEW_LINE>errorInfo.append(System.lineSeparator());<NEW_LINE>errorInfo.append(" > ");<NEW_LINE>errorInfo.append(key);<NEW_LINE>errorInfo.append(" (sequenceDbNames: ");<NEW_LINE>errorInfo.append(StringUtils<MASK><NEW_LINE>errorInfo.append(")");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (sqlServerSetMark || connStrMapMark) {<NEW_LINE>throw new DalConfigException(errorInfo.toString());<NEW_LINE>}<NEW_LINE>}
.join(value, ", "));
708,417
public static String computeDefinitionName(String ref, Set<String> reserved) {<NEW_LINE>final String[] refParts = ref.split("#/");<NEW_LINE>if (refParts.length > 2) {<NEW_LINE>throw new RuntimeException("Invalid ref format: " + ref);<NEW_LINE>}<NEW_LINE>final String file = refParts[0];<NEW_LINE>final String definitionPath = refParts.length == 2 ? refParts[1] : null;<NEW_LINE>String plausibleName;<NEW_LINE>if (definitionPath != null) {<NEW_LINE>// the name will come from the last element of the definition path<NEW_LINE>final String[] jsonPathElements = definitionPath.split("/");<NEW_LINE>plausibleName = jsonPathElements[jsonPathElements.length - 1];<NEW_LINE>} else {<NEW_LINE>// no definition path, so we must come up with a name from the file<NEW_LINE>final String[] filePathElements = file.split("/");<NEW_LINE>plausibleName = <MASK><NEW_LINE>final String[] split = plausibleName.split("\\.");<NEW_LINE>plausibleName = split[0];<NEW_LINE>}<NEW_LINE>String tryName = plausibleName;<NEW_LINE>for (int i = 2; reserved.contains(tryName); i++) {<NEW_LINE>tryName = plausibleName + "_" + i;<NEW_LINE>}<NEW_LINE>return tryName;<NEW_LINE>}
filePathElements[filePathElements.length - 1];
296,723
public void add(final long rangeStart, final long rangeEnd) {<NEW_LINE>rangeSanityCheck(rangeStart, rangeEnd);<NEW_LINE>if (rangeStart >= rangeEnd) {<NEW_LINE>// empty range<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int hbStart = (Util.highbits(rangeStart));<NEW_LINE>final int lbStart = (Util.lowbits(rangeStart));<NEW_LINE>final int hbLast = (Util.highbits(rangeEnd - 1));<NEW_LINE>final int lbLast = (Util.lowbits(rangeEnd - 1));<NEW_LINE>for (int hb = hbStart; hb <= hbLast; ++hb) {<NEW_LINE>// first container may contain partial range<NEW_LINE>final int containerStart = (hb == hbStart) ? lbStart : 0;<NEW_LINE>// last container may contain partial range<NEW_LINE>final int containerLast = (hb == hbLast) ? lbLast : Util.maxLowBitAsInteger();<NEW_LINE>final int i = highLowContainer.getIndex((char) hb);<NEW_LINE>if (i >= 0) {<NEW_LINE>final Container c = highLowContainer.getContainerAtIndex(i).iadd(containerStart, containerLast + 1);<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>highLowContainer.insertNewKeyValueAt(-i - 1, (char) hb, Container.rangeOfOnes(containerStart, containerLast + 1));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
highLowContainer.setContainerAtIndex(i, c);
319,540
public static void main(String[] args) {<NEW_LINE>Exercise39_DeleteTheMinimum deleteTheMinimum = new Exercise39_DeleteTheMinimum();<NEW_LINE>RedBlackBSTDeleteMin<Integer, Integer> redBlackBST = deleteTheMinimum.new RedBlackBSTDeleteMin<>();<NEW_LINE>redBlackBST.put(10, 10);<NEW_LINE>redBlackBST.put(4, 4);<NEW_LINE>redBlackBST.put(6, 6);<NEW_LINE>redBlackBST.put(1, 1);<NEW_LINE><MASK><NEW_LINE>redBlackBST.put(15, 15);<NEW_LINE>redBlackBST.put(12, 12);<NEW_LINE>while (!redBlackBST.isEmpty()) {<NEW_LINE>for (Integer key : redBlackBST.keys()) {<NEW_LINE>StdOut.println(key);<NEW_LINE>}<NEW_LINE>StdOut.println();<NEW_LINE>StdOut.println("Delete min");<NEW_LINE>redBlackBST.deleteMin();<NEW_LINE>}<NEW_LINE>}
redBlackBST.put(2, 2);
1,671,638
public static void main(String[] args) {<NEW_LINE>try {<NEW_LINE>UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>JFrame jframe = new JFrame("Balloon Tips on FilteredTextField");<NEW_LINE>jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<NEW_LINE><MASK><NEW_LINE>jframe.setLocation(400, 400);<NEW_LINE>JPanel jpanel = new JPanel();<NEW_LINE>jpanel.setLayout(new BorderLayout());<NEW_LINE>FilteredTextField ftfield = new FilteredTextField(10);<NEW_LINE>ftfield.setCharacters(LOWERCASE_CHARS);<NEW_LINE>ftfield.addCharacter('-');<NEW_LINE>ftfield.addCharacter('_');<NEW_LINE>ftfield.addCharacter(' ');<NEW_LINE>ftfield.setMaximumLength(10);<NEW_LINE>ftfield.setEntryError("Only lower case letters, hyphens, underscores, and spaces allowed.");<NEW_LINE>ftfield.setValidRegex("^a+[a-z-_ ]*");<NEW_LINE>ftfield.setValidError("The string must begin with the letter 'a'.");<NEW_LINE>jpanel.add(new JLabel("Type some text into either field"), BorderLayout.NORTH);<NEW_LINE>jpanel.add(ftfield, BorderLayout.CENTER);<NEW_LINE>jpanel.add(new FilteredTextField(10), BorderLayout.SOUTH);<NEW_LINE>jframe.getContentPane().add(jpanel);<NEW_LINE>jframe.setVisible(true);<NEW_LINE>}
jframe.setSize(400, 75);
1,076,653
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TagResourceRequest> request = null;<NEW_LINE>Response<TagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Comprehend");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");
886,574
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {<NEW_LINE>InternalLogId logId = InternalLogId.allocate(ServletAdapter.class, null);<NEW_LINE>logger.log(FINE, "[{0}] RPC started", logId);<NEW_LINE>if (!ServletAdapter.isGrpc(req)) {<NEW_LINE>resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "the request is not a gRPC request");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// remove the leading "/"<NEW_LINE>String method = req.getRequestURI().substring(1);<NEW_LINE>// Liberty change: remove application context root from path<NEW_LINE>// then perform authentication/authorization<NEW_LINE>method = GrpcServletUtils.translateLibertyPath(method);<NEW_LINE>if (resp.isCommitted()) {<NEW_LINE>// security error might have already occurred<NEW_LINE>logger.log(Level.SEVERE, nls.getFormattedMessage("response.already.committed", new Object[] { method }, "The response has already been committed."));<NEW_LINE>logger.log(FINE, "[{0}] RPC exited for service [{1}]", new Object[] { logId, method });<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean libertyAuth = true;<NEW_LINE>if (GrpcServerComponent.isSecurityEnabled()) {<NEW_LINE>libertyAuth = GrpcServerSecurity.doServletAuth(req, resp, method);<NEW_LINE>}<NEW_LINE>AsyncContext asyncCtx = req.startAsync(req, resp);<NEW_LINE>if (logger.isLoggable(FINEST)) {<NEW_LINE>logger.log(FINE, "Liberty inbound gRPC request path translated to {0}", method);<NEW_LINE>}<NEW_LINE>Metadata headers = getHeaders(req, libertyAuth);<NEW_LINE>if (logger.isLoggable(FINEST)) {<NEW_LINE>logger.log(FINEST, "[{0}] method: {1}", new Object[] { logId, method });<NEW_LINE>logger.log(FINEST, "[{0}] headers: {1}", new Object[] { logId, headers });<NEW_LINE>}<NEW_LINE>Long timeoutNanos = headers.get(TIMEOUT_KEY);<NEW_LINE>if (timeoutNanos == null) {<NEW_LINE>timeoutNanos = 0L;<NEW_LINE>}<NEW_LINE>asyncCtx.setTimeout(TimeUnit.NANOSECONDS.toMillis(timeoutNanos));<NEW_LINE>StatsTraceContext statsTraceCtx = StatsTraceContext.newServerContext(streamTracerFactories, method, headers);<NEW_LINE>ServletServerStream stream = new ServletServerStream(asyncCtx, statsTraceCtx, maxInboundMessageSize, attributes.toBuilder().set(Grpc.TRANSPORT_ATTR_REMOTE_ADDR, new InetSocketAddress(req.getRemoteHost(), req.getRemotePort())).set(Grpc.TRANSPORT_ATTR_LOCAL_ADDR, new InetSocketAddress(req.getLocalAddr(), req.getLocalPort())).build(), getAuthority(req), logId);<NEW_LINE>if (logger.isLoggable(FINEST)) {<NEW_LINE>logger.log(FINE, "set the listeners on async request {0}", asyncCtx.getRequest());<NEW_LINE>}<NEW_LINE>asyncCtx.getRequest().getInputStream().setReadListener(new GrpcReadListener(stream, asyncCtx, logId));<NEW_LINE>asyncCtx.addListener(new GrpcAsycListener(stream, logId));<NEW_LINE>if (logger.isLoggable(FINEST)) {<NEW_LINE>logger.log(FINE, "[{0}] the listeners set on async request {1}", new Object[] { logId, asyncCtx.getRequest() });<NEW_LINE>}<NEW_LINE>transportListener.streamCreated(stream, method, headers);<NEW_LINE>stream.setWriteListener();<NEW_LINE>stream.transportState().runOnTransportThread(<MASK><NEW_LINE>}
stream.transportState()::onStreamAllocated);
448,678
private ICompletionProposal[] filterProposals(ICompletionProposal[] proposals, IDocument document, int offset, DocumentEvent event) {<NEW_LINE>int length = proposals <MASK><NEW_LINE>List<ICompletionProposal> filtered = new ArrayList<ICompletionProposal>(length);<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>ICompletionProposal proposal = proposals[i];<NEW_LINE>if (proposal instanceof ICompletionProposalExtension2) {<NEW_LINE>ICompletionProposalExtension2 p = (ICompletionProposalExtension2) proposal;<NEW_LINE>if (p.validate(document, offset, event)) {<NEW_LINE>filtered.add(proposal);<NEW_LINE>}<NEW_LINE>} else if (proposal instanceof ICompletionProposalExtension) {<NEW_LINE>ICompletionProposalExtension p = (ICompletionProposalExtension) proposal;<NEW_LINE>if (p.isValidFor(document, offset)) {<NEW_LINE>filtered.add(proposal);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>IdeLog.// $NON-NLS-1$<NEW_LINE>logInfo(// $NON-NLS-1$<NEW_LINE>UIEplPlugin.getDefault(), // $NON-NLS-1$<NEW_LINE>MessageFormat.format("Filtered list to {0} proposals", filtered.size()), IUiEplScopes.CONTENT_ASSIST);<NEW_LINE>return filtered.toArray(new ICompletionProposal[filtered.size()]);<NEW_LINE>}
== null ? 0 : proposals.length;
533,609
public void removeLogicalColumnList(String logicalTableName, List<String> columnNameList) {<NEW_LINE>CacheLine cacheLine = getCacheLine(logicalTableName);<NEW_LINE>for (String columnName : columnNameList) {<NEW_LINE>columnName = columnName.toLowerCase();<NEW_LINE>Map<String, Histogram> histogramMap = cacheLine.getHistogramMap();<NEW_LINE>if (histogramMap != null) {<NEW_LINE>histogramMap.remove(columnName);<NEW_LINE>}<NEW_LINE>Map<String, CountMinSketch> countMinSketchMap = cacheLine.getCountMinSketchMap();<NEW_LINE>if (countMinSketchMap != null) {<NEW_LINE>countMinSketchMap.remove(columnName);<NEW_LINE>}<NEW_LINE>Map<String, Long> cardinalityMap = cacheLine.getCardinalityMap();<NEW_LINE>if (cardinalityMap != null) {<NEW_LINE>cardinalityMap.remove(columnName);<NEW_LINE>}<NEW_LINE>Map<String, Long> nullCountMap = cacheLine.getNullCountMap();<NEW_LINE>if (nullCountMap != null) {<NEW_LINE>nullCountMap.remove(columnName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>getSds(<MASK><NEW_LINE>}
).removeLogicalTableColumnList(logicalTableName, columnNameList);
65,677
private int readProcessId(int dft) throws IOException {<NEW_LINE>ByteBuffer bb = ByteBuffer.allocate(128);<NEW_LINE>fileChannel.position(0);<NEW_LINE>int <MASK><NEW_LINE>fileChannel.position(0);<NEW_LINE>if (len == 0)<NEW_LINE>return dft;<NEW_LINE>if (len == 128)<NEW_LINE>// Too much.<NEW_LINE>return dft;<NEW_LINE>// Bug in Jena 3.3.0<NEW_LINE>// byte[] b = ByteBufferLib.bb2array(bb, 0, len);<NEW_LINE>bb.flip();<NEW_LINE>byte[] b = new byte[len];<NEW_LINE>bb.get(b);<NEW_LINE>String pidStr = StrUtils.fromUTF8bytes(b);<NEW_LINE>// Remove all leading and trailing (vertical and horizontal) whitespace.<NEW_LINE>pidStr = pidStr.replaceAll("[\\s\\t\\n\\r]+$", "");<NEW_LINE>pidStr = pidStr.replaceAll("^[\\s\\t\\n\\r]+", "");<NEW_LINE>try {<NEW_LINE>// Process id.<NEW_LINE>return Integer.parseInt(pidStr);<NEW_LINE>} catch (NumberFormatException ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>Log.warn(this, "Bad process id: file='" + filepath + "': read='" + pidStr + "'");<NEW_LINE>return dft;<NEW_LINE>}<NEW_LINE>}
len = fileChannel.read(bb);
818,196
public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'pipe' is set<NEW_LINE>if (pipe == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'ioutil' is set<NEW_LINE>if (ioutil == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'http' is set<NEW_LINE>if (http == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'url' is set<NEW_LINE>if (url == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'context' is set<NEW_LINE>if (context == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/fake/test-query-parameters".replaceAll("\\{format\\}", "json");<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context));<NEW_LINE>final String[] localVarAccepts = {};<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);<NEW_LINE>}
throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat");
471,282
private IStatus performOperation(ProfileChangeOperation operation, IProgressMonitor monitor) {<NEW_LINE>IStatus <MASK><NEW_LINE>if (status.isOK()) {<NEW_LINE>ProvisioningJob provisioningJob = operation.getProvisioningJob(monitor);<NEW_LINE>if (provisioningJob == null) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>System.err.println("Trying to install from the Eclipse IDE? This won't work!");<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>// provisioningJob.addJobChangeListener(new JobChangeAdapter() {<NEW_LINE>// @Override<NEW_LINE>// public void done(IJobChangeEvent event) {<NEW_LINE>// if(event.getResult().isOK()) {<NEW_LINE>// workbench.restart();<NEW_LINE>// }<NEW_LINE>// super.done(event);<NEW_LINE>// }<NEW_LINE>// });<NEW_LINE>// provisioningJob.schedule();<NEW_LINE>status = provisioningJob.runModal(monitor);<NEW_LINE>}<NEW_LINE>if (!status.isOK()) {<NEW_LINE>ArchiPlugin.INSTANCE.getLog().log(status);<NEW_LINE>}<NEW_LINE>return status;<NEW_LINE>}
status = operation.resolveModal(monitor);
890,671
public static void addToolChain(NativeToolChainRegistryInternal toolChainRegistry, ServiceRegistry serviceRegistry) {<NEW_LINE>final FileResolver fileResolver = <MASK><NEW_LINE>final ExecActionFactory execActionFactory = serviceRegistry.get(ExecActionFactory.class);<NEW_LINE>final CompilerOutputFileNamingSchemeFactory compilerOutputFileNamingSchemeFactory = serviceRegistry.get(CompilerOutputFileNamingSchemeFactory.class);<NEW_LINE>final Instantiator instantiator = serviceRegistry.get(Instantiator.class);<NEW_LINE>final BuildOperationExecutor buildOperationExecutor = serviceRegistry.get(BuildOperationExecutor.class);<NEW_LINE>final CompilerMetaDataProviderFactory metaDataProviderFactory = serviceRegistry.get(CompilerMetaDataProviderFactory.class);<NEW_LINE>final SystemLibraryDiscovery standardLibraryDiscovery = serviceRegistry.get(SystemLibraryDiscovery.class);<NEW_LINE>final WorkerLeaseService workerLeaseService = serviceRegistry.get(WorkerLeaseService.class);<NEW_LINE>toolChainRegistry.registerFactory(Clang.class, new NamedDomainObjectFactory<Clang>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Clang create(String name) {<NEW_LINE>return instantiator.newInstance(ClangToolChain.class, name, buildOperationExecutor, OperatingSystem.current(), fileResolver, execActionFactory, compilerOutputFileNamingSchemeFactory, metaDataProviderFactory, standardLibraryDiscovery, instantiator, workerLeaseService);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>toolChainRegistry.registerDefaultToolChain(ClangToolChain.DEFAULT_NAME, Clang.class);<NEW_LINE>}
serviceRegistry.get(FileResolver.class);
81,423
void initLocalServerModel(List<DocumentRoot> documentRoots) {<NEW_LINE>if (canceled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int size = documentRoots.size();<NEW_LINE>List<LocalServer> localServers <MASK><NEW_LINE>LocalServer selected = null;<NEW_LINE>for (DocumentRoot root : documentRoots) {<NEW_LINE>String srcRoot = new File(root.getDocumentRoot(), sourcesFolderProvider.getSourcesFolderName()).getAbsolutePath();<NEW_LINE>LocalServer ls = new LocalServer(null, root.getUrl(), root.getDocumentRoot(), srcRoot, true);<NEW_LINE>localServers.add(ls);<NEW_LINE>if (selected == null) {<NEW_LINE>selected = ls;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ComboBoxModel model = new LocalServer.ComboBoxModel(localServers.toArray(new LocalServer[localServers.size()]));<NEW_LINE>// store settings<NEW_LINE>if (selected != null) {<NEW_LINE>model.setSelectedItem(selected);<NEW_LINE>descriptor.putProperty(COPY_SRC_TARGET, selected);<NEW_LINE>}<NEW_LINE>descriptor.putProperty(COPY_SRC_TARGETS, model);<NEW_LINE>// update UI<NEW_LINE>runAsLocalWeb.setLocalServerModel(model);<NEW_LINE>runAsLocalWeb.setCopyFilesState(true);<NEW_LINE>readingDocumentRoots = false;<NEW_LINE>fireChangeEvent();<NEW_LINE>}
= new ArrayList<>(size);
285,862
public void marshall(ReservationResourceSpecification reservationResourceSpecification, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (reservationResourceSpecification == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(reservationResourceSpecification.getChannelClass(), CHANNELCLASS_BINDING);<NEW_LINE>protocolMarshaller.marshall(reservationResourceSpecification.getCodec(), CODEC_BINDING);<NEW_LINE>protocolMarshaller.marshall(reservationResourceSpecification.getMaximumBitrate(), MAXIMUMBITRATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(reservationResourceSpecification.getMaximumFramerate(), MAXIMUMFRAMERATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(reservationResourceSpecification.getResolution(), RESOLUTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(reservationResourceSpecification.getResourceType(), RESOURCETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(reservationResourceSpecification.getVideoQuality(), VIDEOQUALITY_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
reservationResourceSpecification.getSpecialFeature(), SPECIALFEATURE_BINDING);
1,639,187
public ParseNode visitCreateTableAsSelect(StarRocksParser.CreateTableAsSelectContext context) {<NEW_LINE>Map<String, String> properties = new HashMap<>();<NEW_LINE>if (context.properties() != null) {<NEW_LINE>List<Property> propertyList = visit(context.properties().property(), Property.class);<NEW_LINE>for (Property property : propertyList) {<NEW_LINE>properties.put(property.getKey(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>CreateTableStmt createTableStmt = new CreateTableStmt(context.IF() != null, false, qualifiedNameToTableName(getQualifiedName(context.qualifiedName())), null, "olap", null, context.partitionDesc() == null ? null : (PartitionDesc) visit(context.partitionDesc()), context.distributionDesc() == null ? null : (DistributionDesc) visit(context.distributionDesc()), properties, null, context.comment() == null ? null : ((StringLiteral) visit(context.comment().string())).getStringValue());<NEW_LINE>List<Identifier> columns = visitIfPresent(context.identifier(), Identifier.class);<NEW_LINE>return new CreateTableAsSelectStmt(createTableStmt, columns == null ? null : columns.stream().map(Identifier::getValue).collect(toList()), (QueryStatement) visit(context.queryStatement()));<NEW_LINE>}
), property.getValue());
481,116
public void close() {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, "close");<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "SocketChannel close starting, local: " + socket.getLocalSocketAddress() + " remote: " + socket.getRemoteSocketAddress());<NEW_LINE>}<NEW_LINE>// synchronize on this SocketIOChannel to prevent duplicate closes from<NEW_LINE>// being processed<NEW_LINE>synchronized (this) {<NEW_LINE>if (closed) {<NEW_LINE>processClose = false;<NEW_LINE>}<NEW_LINE>closed = true;<NEW_LINE>}<NEW_LINE>if (processClose) {<NEW_LINE>try {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())<NEW_LINE>Tr.event(tc, "AsyncSocketChannel close, local: " + socket.getLocalSocketAddress() + " remote: " + socket.getRemoteSocketAddress());<NEW_LINE>if (asyncChannel != null) {<NEW_LINE>asyncChannel.close();<NEW_LINE>}<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "IOException while closing channel " + ioe.getMessage());<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>super.close();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "close called on channel already closed, local: " + socket.getLocalSocketAddress() + <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.exit(tc, "close");<NEW_LINE>}<NEW_LINE>}
" remote: " + socket.getRemoteSocketAddress());
342,939
protected TaskManager createTaskManagerImpl(TaskConfiguration taskConfig) {<NEW_LINE>PoiWriterConfiguration configuration = new PoiWriterConfiguration();<NEW_LINE>configuration.setAllTags(getBooleanArgument(taskConfig, PARAM_ALL_TAGS, true));<NEW_LINE>configuration.addBboxConfiguration(getStringArgument(taskConfig, PARAM_BBOX, null));<NEW_LINE>configuration.setComment(getStringArgument(taskConfig, PARAM_COMMENT, null));<NEW_LINE>configuration.setFilterCategories(getBooleanArgument(taskConfig, PARAM_FILTER_CATEGORIES, true));<NEW_LINE>configuration.setGeoTags(getBooleanArgument(taskConfig, PARAM_GEO_TAGS, false));<NEW_LINE>configuration.setNames(getBooleanArgument(taskConfig, PARAM_NAMES, true));<NEW_LINE>configuration.setNormalize(getBooleanArgument(taskConfig, PARAM_NORMALIZE, false));<NEW_LINE>configuration.addOutputFile(getStringArgument(taskConfig, PARAM_OUTFILE, Constants.DEFAULT_PARAM_OUTFILE));<NEW_LINE>configuration.setPreferredLanguage(getStringArgument(taskConfig, PARAM_PREFERRED_LANGUAGE, null));<NEW_LINE>configuration.setProgressLogs(getBooleanArgument(taskConfig, PARAM_PROGRESS_LOGS, true));<NEW_LINE>configuration.loadTagMappingFile(getStringArgument(taskConfig, PARAM_TAG_MAPPING_FILE, null));<NEW_LINE>configuration.setWays(getBooleanArgument<MASK><NEW_LINE>// If set to true, progress messages will be forwarded to a GUI message handler<NEW_LINE>// boolean guiMode = getBooleanArgument(taskConfig, "gui-mode", false);<NEW_LINE>ProgressManager progressManager = new DummyProgressManager();<NEW_LINE>// Use graphical progress manager if plugin is called from map maker GUI<NEW_LINE>// Tell the logger which progress manager to use<NEW_LINE>LoggerWrapper.setDefaultProgressManager(progressManager);<NEW_LINE>Sink task = new PoiWriterTask(configuration, progressManager);<NEW_LINE>return new SinkManager(taskConfig.getId(), task, taskConfig.getPipeArgs());<NEW_LINE>}
(taskConfig, PARAM_WAYS, true));
1,227,018
protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand2 = instruction.getOperands().get(1).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand3 = instruction.getOperands().get(2).getRootNode().getChildren().get(0);<NEW_LINE>final String targetRegister = (registerOperand1.getValue());<NEW_LINE>final String sourceRegister1 = (registerOperand2.getValue());<NEW_LINE>final String sourceRegister2 = (registerOperand3.getValue());<NEW_LINE>final OperandSize dw = OperandSize.DWORD;<NEW_LINE>long baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>final String tmpResult = environment.getNextVariableString();<NEW_LINE>final String tmpRm15to0 = environment.getNextVariableString();<NEW_LINE>final String tmpRm31to16 = environment.getNextVariableString();<NEW_LINE>final String tmpRn15to0 = environment.getNextVariableString();<NEW_LINE>final String tmpRn31to16 = environment.getNextVariableString();<NEW_LINE>final <MASK><NEW_LINE>final String tmpVar1Sat = environment.getNextVariableString();<NEW_LINE>final String tmpVar3 = environment.getNextVariableString();<NEW_LINE>final String tmpVar3Sat = environment.getNextVariableString();<NEW_LINE>// Low<NEW_LINE>instructions.add(ReilHelpers.createAnd(baseOffset++, dw, sourceRegister1, dw, String.valueOf(0xFFFFL), dw, tmpRn15to0));<NEW_LINE>instructions.add(ReilHelpers.createAnd(baseOffset++, dw, sourceRegister2, dw, String.valueOf(0xFFFFL), dw, tmpRm15to0));<NEW_LINE>instructions.add(ReilHelpers.createAdd(baseOffset++, dw, tmpRn15to0, dw, tmpRm15to0, dw, tmpVar1));<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, tmpRn15to0, tmpRm15to0, tmpVar1, "ADD", tmpVar1Sat, 16, "");<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>// High<NEW_LINE>instructions.add(ReilHelpers.createBsh(baseOffset++, dw, sourceRegister1, dw, String.valueOf(-16L), dw, tmpRn31to16));<NEW_LINE>instructions.add(ReilHelpers.createBsh(baseOffset++, dw, sourceRegister2, dw, String.valueOf(-16L), dw, tmpRm31to16));<NEW_LINE>instructions.add(ReilHelpers.createAdd(baseOffset++, dw, tmpRn31to16, dw, tmpRm31to16, dw, tmpVar3));<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, tmpRn31to16, tmpRm31to16, tmpVar3, "ADD", tmpVar3Sat, 16, "");<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>instructions.add(ReilHelpers.createBsh(baseOffset++, dw, tmpVar3Sat, dw, String.valueOf(16L), dw, tmpResult));<NEW_LINE>instructions.add(ReilHelpers.createOr(baseOffset++, dw, tmpResult, dw, tmpVar1Sat, dw, targetRegister));<NEW_LINE>}
String tmpVar1 = environment.getNextVariableString();
1,587,733
public static int[] HSLtoRGB(final float h, final float s, final float l, final float alpha) {<NEW_LINE>if (s < 0.0f || s > 100.0f) {<NEW_LINE>Timber.w("Color parameter outside of expected range - Saturation");<NEW_LINE>}<NEW_LINE>if (l < 0.0f || l > 100.0f) {<NEW_LINE>Timber.w("Color parameter outside of expected range - Luminance");<NEW_LINE>}<NEW_LINE>if (alpha < 0.0f || alpha > 1.0f) {<NEW_LINE>Timber.w("Color parameter outside of expected range - Alpha");<NEW_LINE>}<NEW_LINE>// Formula needs all values between 0 - 1.<NEW_LINE>final float hr = (h % 360.0f) / 360f;<NEW_LINE>final float sr = fixRawHSLValue(s, 100f, 1 / 100f);<NEW_LINE>final float lr = fixRawHSLValue(s, 100f, 1 / 100f);<NEW_LINE>final float q = (lr < 0.5) ? lr * (1 + sr) : (lr + sr) - (lr * sr);<NEW_LINE>final float p = 2 * lr - q;<NEW_LINE>final int r = Math.round(Math.max(0, HueToRGB(p, q, hr + (1.0f / 3.0f)) * 256));<NEW_LINE>final int g = Math.round(Math.max(0, HueToRGB(p, q, hr) * 256));<NEW_LINE>final int b = Math.round(Math.max(0, HueToRGB(p, q, hr - (1.0f / 3.0f)) * 256));<NEW_LINE>return new int[<MASK><NEW_LINE>}
] { r, g, b };
558,768
private Map<String, Object> fillProperties(IsochronesIntersection intersection, IsochronesRequest request) throws InternalServerException {<NEW_LINE>Map<String, Object> props = new HashMap<>();<NEW_LINE>List<Integer[]> contours = new ArrayList<>();<NEW_LINE>for (Pair<Integer, Integer> ref : intersection.getContourRefs()) {<NEW_LINE>Integer[] pair = new Integer[2];<NEW_LINE>pair[0] = ref.first;<NEW_LINE>pair[1] = ref.second;<NEW_LINE>contours.add(pair);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (request.hasAttributes()) {<NEW_LINE>List<IsochronesRequestEnums.Attributes> attr = new ArrayList<>(Arrays.asList(request.getAttributes()));<NEW_LINE>if (attr.contains(IsochronesRequestEnums.Attributes.AREA)) {<NEW_LINE>try {<NEW_LINE>double areaValue = 0;<NEW_LINE>if (request.hasAreaUnits())<NEW_LINE>areaValue = intersection.getArea(request.getAreaUnit().toString());<NEW_LINE>else<NEW_LINE>areaValue = intersection.getArea("");<NEW_LINE>props.put("area", FormatUtility.roundToDecimals(areaValue, 4));<NEW_LINE>} catch (InternalServerException e) {<NEW_LINE>throw new InternalServerException(IsochronesErrorCodes.UNKNOWN, "There was a problem calculating the area of the isochrone");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return props;<NEW_LINE>}
props.put("contours", contours);
792,314
private static void printHelp(Parser.Command command) {<NEW_LINE>Collection<AdminCommand.CommandDescriptor> commands;<NEW_LINE>if (command == null) {<NEW_LINE>// All commands.<NEW_LINE>commands = AdminCommand.Factory.getDescriptors();<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>// Commands specific to a component.<NEW_LINE>commands = AdminCommand.Factory.getDescriptors(command.getComponent());<NEW_LINE>if (commands.isEmpty()) {<NEW_LINE>System.out.println(String.format("No commands are available for component '%s'.", command.getComponent()));<NEW_LINE>} else {<NEW_LINE>System.out.println(String.format("All commands for component '%s':", command.getComponent()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>commands.stream().sorted(Comparator.comparing(AdminCommand.CommandDescriptor::getComponent).thenComparing(AdminCommand.CommandDescriptor::getName)).forEach(AdminCLIRunner::printCommandSummary);<NEW_LINE>}
System.out.println("All available commands:");
1,367,663
// intentionally raised by test case's ManagedTask implementation<NEW_LINE>@ExpectedFFDC("java.lang.IllegalMonitorStateException")<NEW_LINE>@Test<NEW_LINE>public void testFailManagedTask() throws Exception {<NEW_LINE>ManagedCounterTask task = new ManagedCounterTask();<NEW_LINE>task.failToGetExecutionProperties = true;<NEW_LINE>try {<NEW_LINE>schedxsvcClassloaderContext.scheduleAtFixedRate(task, 0, 37, TimeUnit.MICROSECONDS);<NEW_LINE>throw new Exception("Should not be able to schedule task when ManagedTask.getExecutionProperties fails");<NEW_LINE>} catch (NumberFormatException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>try {<NEW_LINE>schedxsvcClassloaderContext.invokeAll<MASK><NEW_LINE>throw new Exception("Should not be able to do invokeAll when ManagedTask.getExecutionProperties fails");<NEW_LINE>} catch (NumberFormatException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>try {<NEW_LINE>schedxsvcClassloaderContext.submit(task, "Result");<NEW_LINE>throw new Exception("Should not be able to submit a task when ManagedTask.getExecutionProperties fails");<NEW_LINE>} catch (NumberFormatException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>task.failToGetExecutionProperties = false;<NEW_LINE>task.failToGetManagedTaskListener = true;<NEW_LINE>try {<NEW_LINE>schedxsvcClassloaderContext.schedule((Runnable) task, 38, TimeUnit.NANOSECONDS);<NEW_LINE>throw new Exception("Should not be able to schedule task when ManagedTask.getManagedTaskListener fails");<NEW_LINE>} catch (IllegalMonitorStateException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>try {<NEW_LINE>schedxsvcClassloaderContext.invokeAny(Collections.singleton(task));<NEW_LINE>throw new Exception("Should not be able to do invokeAny when ManagedTask.getManagedTaskListener fails");<NEW_LINE>} catch (IllegalMonitorStateException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>try {<NEW_LINE>schedxsvcClassloaderContext.submit((Callable<Integer>) task);<NEW_LINE>throw new Exception("Should not be able to submit a task when ManagedTask.getManagedTaskListener fails");<NEW_LINE>} catch (IllegalMonitorStateException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>}
(Collections.singleton(task));
1,784,695
protected void handleSubscriptionException(CompletableFuture<Void> future, BackOffExecution backOffExecution, Throwable ex) {<NEW_LINE>getRequiredSubscriber().closeConnection();<NEW_LINE>if (ex instanceof RedisConnectionFailureException && isRunning()) {<NEW_LINE>BackOffExecution loggingBackOffExecution = () -> {<NEW_LINE>long recoveryInterval = backOffExecution.nextBackOff();<NEW_LINE>if (recoveryInterval != BackOffExecution.STOP) {<NEW_LINE>logger.error(String.format("Connection failure occurred: %s. Restarting subscription task after %s ms."<MASK><NEW_LINE>}<NEW_LINE>return recoveryInterval;<NEW_LINE>};<NEW_LINE>Runnable recoveryFunction = () -> {<NEW_LINE>CompletableFuture<Void> lazyListen = lazyListen(backOffExecution);<NEW_LINE>lazyListen.whenComplete(propagate(future));<NEW_LINE>};<NEW_LINE>if (potentiallyRecover(loggingBackOffExecution, recoveryFunction)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>logger.error("SubscriptionTask aborted with exception:", ex);<NEW_LINE>future.completeExceptionally(new IllegalStateException("Subscription attempts exceeded", ex));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (isRunning()) {<NEW_LINE>// log only if the container is still running to prevent close errors from logging<NEW_LINE>logger.error("SubscriptionTask aborted with exception:", ex);<NEW_LINE>}<NEW_LINE>future.completeExceptionally(ex);<NEW_LINE>}
, ex, recoveryInterval), ex);
833,662
protected void onLayout(boolean changed, int l, int t, int r, int b) {<NEW_LINE>int childCount = getChildCount();<NEW_LINE>for (int i = 0; i < childCount; i++) {<NEW_LINE>View child = getChildAt(i);<NEW_LINE>if (child.getVisibility() == GONE) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (child instanceof BlockGroup) {<NEW_LINE>BlockGroup bg = (BlockGroup) child;<NEW_LINE>// Get view coordinates of child from its workspace coordinates. Note that unlike<NEW_LINE>// onMeasure() above, workspaceToVirtualViewCoordinates() must be used for<NEW_LINE>// conversion here, so view scroll offset is properly applied for positioning.<NEW_LINE>mHelper.workspaceToVirtualViewCoordinates(<MASK><NEW_LINE>if (mHelper.useRtl()) {<NEW_LINE>mTemp.x -= bg.getMeasuredWidth();<NEW_LINE>}<NEW_LINE>child.layout(mTemp.x, mTemp.y, mTemp.x + bg.getMeasuredWidth(), mTemp.y + bg.getMeasuredHeight());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
bg.getFirstBlockPosition(), mTemp);
511,980
/*<NEW_LINE>* Resolve @param tags while method scope<NEW_LINE>*/<NEW_LINE>private void resolveParamTags(MethodScope scope, boolean reportMissing, boolean considerParamRefAsUsage) {<NEW_LINE>AbstractMethodDeclaration methodDecl = scope.referenceMethod();<NEW_LINE>int paramTagsSize = this.paramReferences == null ? 0 : this.paramReferences.length;<NEW_LINE>// If no referenced method (field initializer for example) then report a problem for each param tag<NEW_LINE>if (methodDecl == null) {<NEW_LINE>for (int i = 0; i < paramTagsSize; i++) {<NEW_LINE>JavadocSingleNameReference param = this.paramReferences[i];<NEW_LINE>scope.problemReporter().javadocUnexpectedTag(param.tagSourceStart, param.tagSourceEnd);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// If no param tags then report a problem for each method argument<NEW_LINE>int argumentsSize = methodDecl.arguments == null ? 0 : methodDecl.arguments.length;<NEW_LINE>if (paramTagsSize == 0) {<NEW_LINE>if (reportMissing) {<NEW_LINE>for (int i = 0; i < argumentsSize; i++) {<NEW_LINE>Argument arg = methodDecl.arguments[i];<NEW_LINE>scope.problemReporter().javadocMissingParamTag(arg.name, arg.sourceStart, arg.sourceEnd, methodDecl.binding.modifiers);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LocalVariableBinding[] bindings = new LocalVariableBinding[paramTagsSize];<NEW_LINE>int maxBindings = 0;<NEW_LINE>// Scan all @param tags<NEW_LINE>for (int i = 0; i < paramTagsSize; i++) {<NEW_LINE>JavadocSingleNameReference param = this.paramReferences[i];<NEW_LINE>param.resolve(scope, true, considerParamRefAsUsage);<NEW_LINE>if (param.binding != null && param.binding.isValidBinding()) {<NEW_LINE>// Verify duplicated tags<NEW_LINE>boolean found = false;<NEW_LINE>for (int j = 0; j < maxBindings && !found; j++) {<NEW_LINE>if (bindings[j] == param.binding) {<NEW_LINE>scope.problemReporter().javadocDuplicatedParamTag(param.token, param.sourceStart, param.<MASK><NEW_LINE>found = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!found) {<NEW_LINE>bindings[maxBindings++] = (LocalVariableBinding) param.binding;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Look for undocumented arguments<NEW_LINE>if (reportMissing) {<NEW_LINE>for (int i = 0; i < argumentsSize; i++) {<NEW_LINE>Argument arg = methodDecl.arguments[i];<NEW_LINE>boolean found = false;<NEW_LINE>for (int j = 0; j < maxBindings && !found; j++) {<NEW_LINE>LocalVariableBinding binding = bindings[j];<NEW_LINE>if (arg.binding == binding) {<NEW_LINE>found = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!found) {<NEW_LINE>scope.problemReporter().javadocMissingParamTag(arg.name, arg.sourceStart, arg.sourceEnd, methodDecl.binding.modifiers);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
sourceEnd, methodDecl.binding.modifiers);
1,451,443
public Image _getIcon(int iconType, String iconURL) {<NEW_LINE>Image icon = null;<NEW_LINE>try {<NEW_LINE>icon = ImageUtilities.loadImage(iconURL);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>Logger.getLogger(getClass().getName()).log(<MASK><NEW_LINE>}<NEW_LINE>if (null == icon) {<NEW_LINE>try {<NEW_LINE>// the URL may point to an external file<NEW_LINE>icon = ImageIO.read(new URL(iconURL));<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Logger.getLogger(getClass().getName()).log(Level.INFO, null, ex);<NEW_LINE>// fall back to the original:<NEW_LINE>if (null != originalDO && !FileUtil.isParentOf(FileUtil.getConfigRoot(), originalDO.getPrimaryFile())) {<NEW_LINE>icon = getOriginal().getIcon(BeanInfo.ICON_COLOR_16x16);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return icon;<NEW_LINE>}
Level.INFO, null, ex);
1,041,987
public boolean onContextItemSelected(MenuItem item) {<NEW_LINE>if (selectedUrl == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final int itemId = item.getItemId();<NEW_LINE>if (itemId == R.id.open_in_browser_item) {<NEW_LINE>IntentUtils.openInBrowser(getContext(), selectedUrl);<NEW_LINE>} else if (itemId == R.id.share_url_item) {<NEW_LINE>ShareUtils.shareLink(getContext(), selectedUrl);<NEW_LINE>} else if (itemId == R.id.copy_url_item) {<NEW_LINE>ClipData clipData = ClipData.newPlainText(selectedUrl, selectedUrl);<NEW_LINE>ClipboardManager cm = (ClipboardManager) getContext(<MASK><NEW_LINE>cm.setPrimaryClip(clipData);<NEW_LINE>Snackbar s = Snackbar.make(this, R.string.copied_url_msg, Snackbar.LENGTH_LONG);<NEW_LINE>ViewCompat.setElevation(s.getView(), 100);<NEW_LINE>s.show();<NEW_LINE>} else if (itemId == R.id.go_to_position_item) {<NEW_LINE>if (Timeline.isTimecodeLink(selectedUrl) && timecodeSelectedListener != null) {<NEW_LINE>timecodeSelectedListener.accept(Timeline.getTimecodeLinkTime(selectedUrl));<NEW_LINE>} else {<NEW_LINE>Log.e(TAG, "Selected go_to_position_item, but URL was no timecode link: " + selectedUrl);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>selectedUrl = null;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>selectedUrl = null;<NEW_LINE>return true;<NEW_LINE>}
).getSystemService(Context.CLIPBOARD_SERVICE);
639,978
protected void consumeCaseLabel() {<NEW_LINE>// // SwitchLabel ::= 'case' ConstantExpression ':'<NEW_LINE>// this.expressionLengthPtr--;<NEW_LINE>// Expression expression = this.expressionStack[this.expressionPtr--];<NEW_LINE>// CaseStatement caseStatement = new CaseStatement(expression, expression.sourceEnd, this.intStack[this.intPtr--]);<NEW_LINE>// // Look for $fall-through$ tag in leading comment for case statement<NEW_LINE>// if (hasLeadingTagComment(FALL_THROUGH_TAG, caseStatement.sourceStart)) {<NEW_LINE>// caseStatement.bits |= ASTNode.DocumentedFallthrough;<NEW_LINE>// }<NEW_LINE>// pushOnAstStack(caseStatement);<NEW_LINE>Expression[] constantExpressions = null;<NEW_LINE>int length = 0;<NEW_LINE>if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {<NEW_LINE>this.expressionPtr -= length;<NEW_LINE>System.arraycopy(this.expressionStack, this.expressionPtr + 1, constantExpressions = new Expression[length], 0, length);<NEW_LINE>} else {<NEW_LINE>// TODO : ERROR<NEW_LINE>}<NEW_LINE>CaseStatement caseStatement = new CaseStatement(constantExpressions[0], constantExpressions[length - 1].sourceEnd, this.intStack[this.intPtr--]);<NEW_LINE>if (constantExpressions.length > 1) {<NEW_LINE>if (!this.parsingJava14Plus) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>caseStatement.constantExpressions = constantExpressions;<NEW_LINE>// Look for $fall-through$ tag in leading comment for case statement<NEW_LINE>if (hasLeadingTagComment(FALL_THROUGH_TAG, caseStatement.sourceStart)) {<NEW_LINE>caseStatement.bits |= ASTNode.DocumentedFallthrough;<NEW_LINE>}<NEW_LINE>pushOnAstStack(caseStatement);<NEW_LINE>}
problemReporter().multiConstantCaseLabelsNotSupported(caseStatement);
398,572
public void exitRmsc_community_list(Rmsc_community_listContext ctx) {<NEW_LINE>List<String> names = ctx.names.stream().map(AristaControlPlaneExtractor::toString).<MASK><NEW_LINE>if (ctx.DELETE() != null) {<NEW_LINE>extractSetCommunityListDelete(ctx, names);<NEW_LINE>} else if (ctx.ADDITIVE() != null) {<NEW_LINE>extractSetCommunityListAdditive(ctx, names);<NEW_LINE>} else {<NEW_LINE>RouteMapSetCommunityListDelete del = _currentRouteMapClause.getSetCommunityListDelete();<NEW_LINE>boolean add = _currentRouteMapClause.getAdditive();<NEW_LINE>if (add && del != null) {<NEW_LINE>// list delete is set, and either list or non-list additive is set<NEW_LINE>warn(ctx, "set community community-list ambiguous; specify either additive or delete");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (add) {<NEW_LINE>// list or non-list additive is set<NEW_LINE>extractSetCommunityListAdditive(ctx, names);<NEW_LINE>} else if (del != null) {<NEW_LINE>// delete is set<NEW_LINE>extractSetCommunityListDelete(ctx, names);<NEW_LINE>} else {<NEW_LINE>extractSetCommunityList(ctx, names);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
collect(ImmutableList.toImmutableList());
182,205
static LithoNode render(final LayoutStateContext layoutStateContext, final ComponentContext c, final Component component, @Nullable final String globalKeyToReuse, final int widthSpec, final int heightSpec, @Nullable final LithoNode current, @Nullable final PerfEvent layoutStatePerfEvent) {<NEW_LINE>if (layoutStatePerfEvent != null) {<NEW_LINE>final String event = current == null ? EVENT_START_CREATE_LAYOUT : EVENT_START_RECONCILE;<NEW_LINE>layoutStatePerfEvent.markerPoint(event);<NEW_LINE>}<NEW_LINE>@Nullable<NEW_LINE>final LithoNode node;<NEW_LINE>if (current == null) {<NEW_LINE>node = create(layoutStateContext, c, widthSpec, heightSpec, component, true, false, null);<NEW_LINE>// This needs to finish layout on the UI thread.<NEW_LINE>if (node != null && layoutStateContext.isLayoutInterrupted()) {<NEW_LINE>if (layoutStatePerfEvent != null) {<NEW_LINE>layoutStatePerfEvent.markerPoint(EVENT_END_CREATE_LAYOUT);<NEW_LINE>}<NEW_LINE>return node;<NEW_LINE>} else {<NEW_LINE>// Layout is complete, disable interruption from this point on.<NEW_LINE>layoutStateContext.markLayoutUninterruptible();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>final ComponentContext updatedScopedContext = update(layoutStateContext, c, component, true, globalKeyToReuse);<NEW_LINE>final Component updated = updatedScopedContext.getComponentScope();<NEW_LINE>node = current.reconcile(layoutStateContext, c, updated, updatedScopedContext.getScopedComponentInfo(), globalKeyToReuse);<NEW_LINE>}<NEW_LINE>if (layoutStatePerfEvent != null) {<NEW_LINE>final String event <MASK><NEW_LINE>layoutStatePerfEvent.markerPoint(event);<NEW_LINE>}<NEW_LINE>return node;<NEW_LINE>}
= current == null ? EVENT_END_CREATE_LAYOUT : EVENT_END_RECONCILE;
890,247
public void select(int imageWidth, int imageHeight, @Nullable FastAccess<Point> prior, FastAccess<Point> detected, int limit, FastArray<Point> selected) {<NEW_LINE>BoofMiscOps.checkTrue(limit > 0);<NEW_LINE>selected.reset();<NEW_LINE>// the limit is more than the total number of features. Return them all!<NEW_LINE>if ((prior == null || prior.size == 0) && detected.size <= limit) {<NEW_LINE>// make a copy of the results with no pruning since it already has the desired number, or less<NEW_LINE>selected.addAll(detected);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Adjust the grid to the requested limit and image shape<NEW_LINE>int targetCellSize = configUniform.selectTargetCellSize(limit, imageWidth, imageHeight);<NEW_LINE>grid.<MASK><NEW_LINE>// Note all the prior features<NEW_LINE>if (prior != null) {<NEW_LINE>for (int i = 0; i < prior.size; i++) {<NEW_LINE>Point p = prior.data[i];<NEW_LINE>getGridCell(p).priorCount++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Add all detected points to the grid<NEW_LINE>for (int i = 0; i < detected.size; i++) {<NEW_LINE>Point p = detected.data[i];<NEW_LINE>getGridCell(p).detected.add(p);<NEW_LINE>}<NEW_LINE>// Add points until the limit has been reached or there are no more cells to add<NEW_LINE>final FastAccess<Info<Point>> cells = grid.cells;<NEW_LINE>// predeclare the output list<NEW_LINE>selected.resize(limit);<NEW_LINE>selected.reset();<NEW_LINE>while (selected.size < limit) {<NEW_LINE>boolean change = false;<NEW_LINE>for (int cellidx = 0; cellidx < cells.size && selected.size < limit; cellidx++) {<NEW_LINE>Info<Point> info = cells.get(cellidx);<NEW_LINE>// if there's a prior feature here, note it and move on<NEW_LINE>if (info.priorCount > 0) {<NEW_LINE>info.priorCount--;<NEW_LINE>change = true;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Are there any detected features remaining?<NEW_LINE>if (info.detected.isEmpty())<NEW_LINE>continue;<NEW_LINE>// Randomly select one and add it tot he grid<NEW_LINE>selected.add(info.detected.remove(rand.nextInt(info.detected.size())));<NEW_LINE>change = true;<NEW_LINE>}<NEW_LINE>if (!change)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
initialize(targetCellSize, imageWidth, imageHeight);
1,546,120
private void init(Class<?> jaxRsClass, ThreadLocalizedContext tlContext, boolean lcEnc) throws IllegalPathParamTypeException {<NEW_LINE>do {<NEW_LINE>for (final Field field : jaxRsClass.getDeclaredFields()) {<NEW_LINE>if (field.isAnnotationPresent(PathParam.class)) {<NEW_LINE>add(field, newPathParamGetter(field, tlContext, lcEnc));<NEW_LINE>} else if (field.isAnnotationPresent(CookieParam.class)) {<NEW_LINE>add(field, newCookieParamGetter(field, tlContext, lcEnc));<NEW_LINE>} else if (field.isAnnotationPresent(HeaderParam.class)) {<NEW_LINE>add(field, newHeaderParamGetter(field, tlContext, lcEnc));<NEW_LINE>} else if (field.isAnnotationPresent(MatrixParam.class)) {<NEW_LINE>add(field, newMatrixParamGetter(field, tlContext, lcEnc));<NEW_LINE>} else if (field.isAnnotationPresent(QueryParam.class)) {<NEW_LINE>add(field, newQueryParamGetter(field, tlContext, lcEnc));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (final Method method : jaxRsClass.getDeclaredMethods()) {<NEW_LINE>if (isBeanSetter(method, PathParam.class)) {<NEW_LINE>add(method, newPathParamGetter(method, tlContext, lcEnc));<NEW_LINE>} else if (isBeanSetter(method, CookieParam.class)) {<NEW_LINE>add(method, newCookieParamGetter<MASK><NEW_LINE>} else if (isBeanSetter(method, HeaderParam.class)) {<NEW_LINE>add(method, newHeaderParamGetter(method, tlContext, lcEnc));<NEW_LINE>} else if (isBeanSetter(method, MatrixParam.class)) {<NEW_LINE>add(method, newMatrixParamGetter(method, tlContext, lcEnc));<NEW_LINE>} else if (isBeanSetter(method, QueryParam.class)) {<NEW_LINE>add(method, newQueryParamGetter(method, tlContext, lcEnc));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>jaxRsClass = jaxRsClass.getSuperclass();<NEW_LINE>} while (jaxRsClass != null);<NEW_LINE>}
(method, tlContext, lcEnc));
867,734
public void deleteTopics(final List<String> topicsToDelete) {<NEW_LINE>if (!isDeleteTopicEnabled) {<NEW_LINE>log.info("Cannot delete topics since 'delete.topic.enable' is false. ");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final DeleteTopicsResult deleteTopicsResult = adminClient.deleteTopics(topicsToDelete);<NEW_LINE>final Map<String, KafkaFuture<Void>> results = deleteTopicsResult.values();<NEW_LINE>List<String> failList = new ArrayList<>();<NEW_LINE>for (final Map.Entry<String, KafkaFuture<Void>> entry : results.entrySet()) {<NEW_LINE>try {<NEW_LINE>entry.getValue().get(30, TimeUnit.SECONDS);<NEW_LINE>} catch (Exception e) {<NEW_LINE>failList.add(entry.getKey());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!failList.isEmpty()) {<NEW_LINE>throw new RuntimeException("Failed to clean up topics: " + failList.stream().collect(<MASK><NEW_LINE>}<NEW_LINE>}
Collectors.joining(",")));
1,476,492
private void cleanModuleFolder(Context context) {<NEW_LINE>if (ModulesStatus.getInstance().getDnsCryptState() != STOPPED) {<NEW_LINE>Toast.makeText(context, R.string.btnDNSCryptStop, Toast.LENGTH_SHORT).show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>cachedExecutor.submit(() -> {<NEW_LINE>boolean successfully1 = !FileManager.deleteFileSynchronous(<MASK><NEW_LINE>boolean successfully2 = !FileManager.deleteFileSynchronous(context, appDataDir + "/app_data/dnscrypt-proxy", "public-resolvers.md.minisig");<NEW_LINE>boolean successfully3 = !FileManager.deleteFileSynchronous(context, appDataDir + "/app_data/dnscrypt-proxy", "relays.md");<NEW_LINE>boolean successfully4 = !FileManager.deleteFileSynchronous(context, appDataDir + "/app_data/dnscrypt-proxy", "relays.md.minisig");<NEW_LINE>Activity activity = getActivity();<NEW_LINE>if (activity == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (successfully1 || successfully2 || successfully3 || successfully4) {<NEW_LINE>activity.runOnUiThread(() -> Toast.makeText(activity, R.string.done, Toast.LENGTH_SHORT).show());<NEW_LINE>} else {<NEW_LINE>activity.runOnUiThread(() -> Toast.makeText(activity, R.string.wrong, Toast.LENGTH_SHORT).show());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
context, appDataDir + "/app_data/dnscrypt-proxy", "public-resolvers.md");
337,384
private void install(NpmPackage npmPackage, PackageInstallationSpec theInstallationSpec, PackageInstallOutcomeJson theOutcome) throws ImplementationGuideInstallationException {<NEW_LINE>String name = npmPackage.getNpm().get("name").getAsString();<NEW_LINE>String version = npmPackage.getNpm().get("version").getAsString();<NEW_LINE>String fhirVersion = npmPackage.fhirVersion();<NEW_LINE>String currentFhirVersion = myFhirContext.getVersion().getVersion().getFhirVersionString();<NEW_LINE>assertFhirVersionsAreCompatible(fhirVersion, currentFhirVersion);<NEW_LINE>List<String> installTypes;<NEW_LINE>if (!theInstallationSpec.getInstallResourceTypes().isEmpty()) {<NEW_LINE>installTypes = theInstallationSpec.getInstallResourceTypes();<NEW_LINE>} else {<NEW_LINE>installTypes = DEFAULT_INSTALL_TYPES;<NEW_LINE>}<NEW_LINE>ourLog.info("Installing package: {}#{}", name, version);<NEW_LINE>int[] count = new int[installTypes.size()];<NEW_LINE>for (int i = 0; i < installTypes.size(); i++) {<NEW_LINE>Collection<IBaseResource> resources = parseResourcesOfType(installTypes.get(i), npmPackage);<NEW_LINE>count[i] = resources.size();<NEW_LINE>for (IBaseResource next : resources) {<NEW_LINE>try {<NEW_LINE>next = isStructureDefinitionWithoutSnapshot(next) ? generateSnapshot(next) : next;<NEW_LINE>create(next, theOutcome);<NEW_LINE>} catch (Exception e) {<NEW_LINE>ourLog.warn("Failed to upload resource of type {} with ID {} - Error: {}", myFhirContext.getResourceType(next), next.getIdElement().getValue(), e.toString());<NEW_LINE>throw new ImplementationGuideInstallationException(Msg.code(1286) + String.format("Error installing IG %s#%s: %s", name<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ourLog.info(String.format("Finished installation of package %s#%s:", name, version));<NEW_LINE>for (int i = 0; i < count.length; i++) {<NEW_LINE>ourLog.info(String.format("-- Created or updated %s resources of type %s", count[i], installTypes.get(i)));<NEW_LINE>}<NEW_LINE>}
, version, e), e);
176,918
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {<NEW_LINE>LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);<NEW_LINE>AdapterItemType type = <MASK><NEW_LINE>View view;<NEW_LINE>switch(type) {<NEW_LINE>case DESCRIPTION:<NEW_LINE>view = inflater.inflate(R.layout.list_item_description_with_image, parent, false);<NEW_LINE>return new DescriptionHolder(view);<NEW_LINE>case MENU_ITEM:<NEW_LINE>view = inflater.inflate(R.layout.profile_edit_list_item, parent, false);<NEW_LINE>return new ItemHolder(view);<NEW_LINE>case DIVIDER:<NEW_LINE>view = inflater.inflate(R.layout.divider, parent, false);<NEW_LINE>return new DividerHolder(view);<NEW_LINE>case HEADER:<NEW_LINE>view = inflater.inflate(R.layout.list_item_move_header, parent, false);<NEW_LINE>return new HeaderHolder(view);<NEW_LINE>case BUTTON:<NEW_LINE>view = inflater.inflate(R.layout.preference_button, parent, false);<NEW_LINE>return new ButtonHolder(view);<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException("Unsupported view type");<NEW_LINE>}<NEW_LINE>}
AdapterItemType.values()[viewType];
532,037
protected void encodeScript(FacesContext context, PickList pickList) throws IOException {<NEW_LINE>WidgetBuilder wb = getWidgetBuilder(context);<NEW_LINE>wb.init("PickList", pickList).attr("effect", pickList.getEffect()).attr("effectSpeed", pickList.getEffectSpeed()).attr("escape", pickList.isEscape()).attr("showSourceControls", pickList.isShowSourceControls(), false).attr("showTargetControls", pickList.isShowTargetControls(), false).attr("disabled", pickList.isDisabled(), false).attr("filterEvent", pickList.getFilterEvent(), null).attr("filterDelay", pickList.getFilterDelay(), Integer.MAX_VALUE).attr("filterMatchMode", pickList.getFilterMatchMode(), null).nativeAttr("filterFunction", pickList.getFilterFunction(), null).attr("showCheckbox", pickList.isShowCheckbox(), false).callback("onTransfer", "function(e)", pickList.getOnTransfer()).attr("tabindex", pickList.getTabindex(), "0").attr("escapeValue", pickList.isEscapeValue()).attr("transferOnDblclick", pickList.isTransferOnDblclick(), true).attr("transferOnCheckboxClick", <MASK><NEW_LINE>encodeClientBehaviors(context, pickList);<NEW_LINE>wb.finish();<NEW_LINE>}
pickList.isTransferOnCheckboxClick(), false);
734,494
protected void doInit() {<NEW_LINE>super.doInit();<NEW_LINE>myResourceTreeModel.updateResources();<NEW_LINE>getTable().getModel().addTableModelListener(new ModelListener());<NEW_LINE>getVerticalScrollBar().addAdjustmentListener(vscrollController.get());<NEW_LINE>getTableHeader().addMouseListener(new MouseAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseClicked(MouseEvent mouseEvent) {<NEW_LINE>if (!mouseEventHandling(mouseEvent)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final TableHeaderUiFacadeImpl tableHeader = getTableHeaderUiFacade();<NEW_LINE>final ColumnImpl column = tableHeader.findColumnByViewIndex(getTable().columnAtPoint(mouseEvent.getPoint()));<NEW_LINE>final ResourceDefaultColumn resourceColumn = ResourceDefaultColumn.find(column.getID());<NEW_LINE>getUiFacade().getUndoManager().undoableEdit(GanttLanguage.getInstance().getText("task.sort"), new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>if (resourceColumn == ResourceDefaultColumn.NAME) {<NEW_LINE>Comparator<HumanResource> comparator;<NEW_LINE>if (column.getSort() == SortOrder.ASCENDING) {<NEW_LINE>column.setSort(SortOrder.DESCENDING);<NEW_LINE>comparator = new AscendingNameComparator().reversed();<NEW_LINE>} else {<NEW_LINE>column.setSort(SortOrder.ASCENDING);<NEW_LINE>comparator = new AscendingNameComparator();<NEW_LINE>}<NEW_LINE>List<HumanResource> sorted = new ArrayList<>(getProject().<MASK><NEW_LINE>sorted.sort(comparator);<NEW_LINE>myResourceTreeModel.updateResources(sorted);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getHumanResourceManager().getResources());
782,133
private MultiValuesMap<VirtualFile, Artifact> computeFileToArtifactsMap() {<NEW_LINE>final MultiValuesMap<VirtualFile, Artifact> result = new MultiValuesMap<VirtualFile, Artifact>();<NEW_LINE>for (final Artifact artifact : myArtifactManager.getArtifacts()) {<NEW_LINE>final <MASK><NEW_LINE>ArtifactUtil.processPackagingElements(artifact, null, new PackagingElementProcessor<PackagingElement<?>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean process(@Nonnull PackagingElement<?> element, @Nonnull PackagingElementPath path) {<NEW_LINE>if (element instanceof FileOrDirectoryCopyPackagingElement<?>) {<NEW_LINE>final VirtualFile root = ((FileOrDirectoryCopyPackagingElement) element).findFile();<NEW_LINE>if (root != null) {<NEW_LINE>result.put(root, artifact);<NEW_LINE>}<NEW_LINE>} else if (element instanceof ModuleOutputPackagingElement) {<NEW_LINE>for (VirtualFile sourceRoot : ((ModuleOutputPackagingElement) element).getSourceRoots(context)) {<NEW_LINE>result.put(sourceRoot, artifact);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}, context, true);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
PackagingElementResolvingContext context = myArtifactManager.getResolvingContext();
70,620
private void init() {<NEW_LINE>if (gridField != null) {<NEW_LINE>getComponent().setTooltiptext(gridField.getDescription());<NEW_LINE>int displayLength = gridField.getDisplayLength();<NEW_LINE>if (displayLength > MAX_DISPLAY_LENGTH)<NEW_LINE>displayLength = MAX_DISPLAY_LENGTH;<NEW_LINE>else if (displayLength <= 0 || displayLength < MIN_DISPLAY_LENGTH)<NEW_LINE>displayLength = MIN_DISPLAY_LENGTH;<NEW_LINE>getComponent().getDecimalbox().setCols(displayLength);<NEW_LINE>}<NEW_LINE>if (!DisplayType.isNumeric(displayType))<NEW_LINE>displayType = DisplayType.Number;<NEW_LINE>DecimalFormat format = DisplayType.getNumberFormat(displayType, AEnv.getLanguage(Env.getCtx()));<NEW_LINE>getComponent().getDecimalbox().setFormat(format.toPattern());<NEW_LINE>popupMenu = new WEditorPopupMenu(true, true, false);<NEW_LINE>if (gridField != null && gridField.getGridTab() != null) {<NEW_LINE>WRecordInfo.addMenu(popupMenu);<NEW_LINE>}<NEW_LINE>getComponent().<MASK><NEW_LINE>}
setContext(popupMenu.getId());
438,470
public void swapDirectory(final File directory) {<NEW_LINE>localFileListFragmentInterface.setLoading(true);<NEW_LINE>final Handler uiHandler = new Handler(Looper.getMainLooper());<NEW_LINE>Executors.newSingleThreadExecutor().execute(() -> {<NEW_LINE>List<File> fileList;<NEW_LINE>if (directory == null) {<NEW_LINE>fileList = new ArrayList<>();<NEW_LINE>} else {<NEW_LINE>if (mLocalFolderPicker) {<NEW_LINE>fileList = getFolders(directory);<NEW_LINE>} else {<NEW_LINE>fileList = getFiles(directory);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!fileList.isEmpty()) {<NEW_LINE>FileSortOrder sortOrder = preferences.getSortOrderByType(FileSortOrder.Type.localFileListView);<NEW_LINE>fileList = sortOrder.sortLocalFiles(fileList);<NEW_LINE>// Fetch preferences for showing hidden files<NEW_LINE>boolean showHiddenFiles = preferences.isShowHiddenFilesEnabled();<NEW_LINE>if (!showHiddenFiles) {<NEW_LINE>fileList = filterHiddenFiles(fileList);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>uiHandler.post(() -> {<NEW_LINE>mFiles = newFiles;<NEW_LINE>mFilesAll = new ArrayList<>();<NEW_LINE>mFilesAll.addAll(mFiles);<NEW_LINE>notifyDataSetChanged();<NEW_LINE>localFileListFragmentInterface.setLoading(false);<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
final List<File> newFiles = fileList;
550,138
private void forcePrint(String text, Object... params) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (int i = 0; i < indent; i++) sb.append(" ");<NEW_LINE>sb.append(text);<NEW_LINE>Object[] t;<NEW_LINE>if (printClassNames && params.length > 0) {<NEW_LINE>sb.append(" [");<NEW_LINE>for (int i = 0; i < params.length; i++) {<NEW_LINE>if (i > 0)<NEW_LINE>sb.append(", ");<NEW_LINE>sb.append("%s");<NEW_LINE>}<NEW_LINE>sb.append("]");<NEW_LINE>t = new Object[params.length + params.length];<NEW_LINE>for (int i = 0; i < params.length; i++) {<NEW_LINE>t<MASK><NEW_LINE>t[i + params.length] = (params[i] == null) ? "NULL " : params[i].getClass();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>t = params;<NEW_LINE>}<NEW_LINE>sb.append("\n");<NEW_LINE>out.printf(sb.toString(), t);<NEW_LINE>out.flush();<NEW_LINE>}
[i] = params[i];
1,560,490
private void updatePorts(Instance instance) {<NEW_LINE>final var nrBits = instance.getAttributeValue(StdAttr.WIDTH).getWidth();<NEW_LINE>var nrOfPorts = nrBits;<NEW_LINE>final var dir = instance.getAttributeValue(PioAttributes.PIO_DIRECTION);<NEW_LINE>final var hasIrq = hasIrqPin(instance.getAttributeSet());<NEW_LINE>if (dir == PioAttributes.PORT_INOUT)<NEW_LINE>nrOfPorts *= 2;<NEW_LINE>var index = hasIrq ? 2 : 1;<NEW_LINE>nrOfPorts += index;<NEW_LINE>final var ps = new Port[nrOfPorts];<NEW_LINE>if (hasIrq) {<NEW_LINE>ps[IRQ_INDEX] = new Port(20, 0, Port.OUTPUT, 1);<NEW_LINE>ps[IRQ_INDEX].setToolTip<MASK><NEW_LINE>}<NEW_LINE>ps[RESET_INDEX] = new Port(0, 110, Port.INPUT, 1);<NEW_LINE>ps[RESET_INDEX].setToolTip(S.getter("SocPioResetInput"));<NEW_LINE>if (dir == PioAttributes.PORT_INPUT || dir == PioAttributes.PORT_INOUT) {<NEW_LINE>for (var b = 0; b < nrBits; b++) {<NEW_LINE>ps[index + b] = new Port(370 - b * 10, 120, Port.INPUT, 1);<NEW_LINE>ps[index + b].setToolTip(S.getter("SocPioInputPinx", Integer.toString(b)));<NEW_LINE>}<NEW_LINE>index += nrBits;<NEW_LINE>}<NEW_LINE>if (dir == PioAttributes.PORT_INOUT || dir == PioAttributes.PORT_OUTPUT || dir == PioAttributes.PORT_BIDIR) {<NEW_LINE>final var portType = (dir == PioAttributes.PORT_BIDIR) ? Port.INOUT : Port.OUTPUT;<NEW_LINE>for (var b = 0; b < nrBits; b++) {<NEW_LINE>ps[index + b] = new Port(370 - b * 10, 0, portType, 1);<NEW_LINE>ps[index + b].setToolTip((dir == PioAttributes.PORT_BIDIR) ? S.getter("SocPioBidirPinx", Integer.toString(b)) : S.getter("SocPioOutputPinx", Integer.toString(b)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>instance.setPorts(ps);<NEW_LINE>}
(S.getter("SocPioIrqOutput"));
23,882
public static GetRefPackageJobResponse unmarshall(GetRefPackageJobResponse getRefPackageJobResponse, UnmarshallerContext _ctx) {<NEW_LINE>getRefPackageJobResponse.setRequestId(_ctx.stringValue("GetRefPackageJobResponse.RequestId"));<NEW_LINE>getRefPackageJobResponse.setPageIndex(_ctx.integerValue("GetRefPackageJobResponse.PageIndex"));<NEW_LINE>getRefPackageJobResponse.setPageSize(_ctx.integerValue("GetRefPackageJobResponse.PageSize"));<NEW_LINE>getRefPackageJobResponse.setTotalCount(_ctx.longValue("GetRefPackageJobResponse.TotalCount"));<NEW_LINE>getRefPackageJobResponse.setTotalPage<MASK><NEW_LINE>List<Job> jobs = new ArrayList<Job>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetRefPackageJobResponse.Jobs.Length"); i++) {<NEW_LINE>Job job = new Job();<NEW_LINE>job.setJobName(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].JobName"));<NEW_LINE>job.setProjectName(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].ProjectName"));<NEW_LINE>job.setJobType(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].JobType"));<NEW_LINE>job.setApiType(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].ApiType"));<NEW_LINE>job.setCode(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].Code"));<NEW_LINE>job.setPlanJson(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].PlanJson"));<NEW_LINE>job.setProperties(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].Properties"));<NEW_LINE>job.setPackages(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].Packages"));<NEW_LINE>job.setIsCommitted(_ctx.booleanValue("GetRefPackageJobResponse.Jobs[" + i + "].IsCommitted"));<NEW_LINE>job.setCreator(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].Creator"));<NEW_LINE>job.setCreateTime(_ctx.longValue("GetRefPackageJobResponse.Jobs[" + i + "].CreateTime"));<NEW_LINE>job.setModifier(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].Modifier"));<NEW_LINE>job.setModifyTime(_ctx.longValue("GetRefPackageJobResponse.Jobs[" + i + "].ModifyTime"));<NEW_LINE>job.setDescription(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].Description"));<NEW_LINE>job.setEngineVersion(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].EngineVersion"));<NEW_LINE>job.setClusterId(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].ClusterId"));<NEW_LINE>job.setQueueName(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].QueueName"));<NEW_LINE>job.setFolderId(_ctx.longValue("GetRefPackageJobResponse.Jobs[" + i + "].FolderId"));<NEW_LINE>job.setJobId(_ctx.stringValue("GetRefPackageJobResponse.Jobs[" + i + "].JobId"));<NEW_LINE>jobs.add(job);<NEW_LINE>}<NEW_LINE>getRefPackageJobResponse.setJobs(jobs);<NEW_LINE>return getRefPackageJobResponse;<NEW_LINE>}
(_ctx.integerValue("GetRefPackageJobResponse.TotalPage"));
1,117,259
public List<DataFetcherResult<MLModel>> batchLoad(final List<String> urns, final QueryContext context) throws Exception {<NEW_LINE>final List<Urn> mlModelUrns = urns.stream().map(UrnUtils::getUrn).collect(Collectors.toList());<NEW_LINE>try {<NEW_LINE>final Map<Urn, EntityResponse> mlModelMap = _entityClient.batchGetV2(ML_MODEL_ENTITY_NAME, new HashSet<>(mlModelUrns), <MASK><NEW_LINE>final List<EntityResponse> gmsResults = mlModelUrns.stream().map(modelUrn -> mlModelMap.getOrDefault(modelUrn, null)).collect(Collectors.toList());<NEW_LINE>return gmsResults.stream().map(gmsMlModel -> gmsMlModel == null ? null : DataFetcherResult.<MLModel>newResult().data(MLModelMapper.map(gmsMlModel)).build()).collect(Collectors.toList());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException("Failed to batch load MLModels", e);<NEW_LINE>}<NEW_LINE>}
null, context.getAuthentication());
711,789
private static void transform(CFGModel model, Map<String, Object> bindings, ModelChecker.Witness witness, Set<StateElementPair> done) {<NEW_LINE>if (witness.binding instanceof List<?>) {<NEW_LINE>// we're at at a leaf of the witness trees<NEW_LINE>// The witness binding is a list of operations, apply them<NEW_LINE>List<?> objects = (List<?>) witness.binding;<NEW_LINE>ControlFlowNode node = model.getCfg().findNodeById(witness.state);<NEW_LINE><MASK><NEW_LINE>CtElement targetElement;<NEW_LINE>// naming convention: "_e" means a bound expression between a metavariable and a subexpression of a statement<NEW_LINE>if (bindings.containsKey("_e")) {<NEW_LINE>targetElement = (CtElement) bindings.get("_e");<NEW_LINE>} else {<NEW_LINE>if (kind == BranchKind.STATEMENT) {<NEW_LINE>targetElement = node.getStatement();<NEW_LINE>} else if (kind == BranchKind.BRANCH || kind == BranchKind.BLOCK_BEGIN) {<NEW_LINE>targetElement = ((SmPLMethodCFG.NodeTag) node.getTag()).getAnchor();<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("unexpected node kind " + kind);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>StateElementPair target = new StateElementPair(witness.state, targetElement);<NEW_LINE>if (done.contains(target)) {<NEW_LINE>System.out.println("WARNING: already transformed " + target + ": " + model.getCfg().findNodeById(witness.state));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>done.add(target);<NEW_LINE>// Process any prepend operations in the list<NEW_LINE>objects.stream().filter((obj) -> obj instanceof Operation).forEachOrdered((obj) -> {<NEW_LINE>((Operation) obj).accept(OperationCategory.PREPEND, targetElement, bindings);<NEW_LINE>});<NEW_LINE>// Process any append operations in the list, in reverse order to preserve correct output order<NEW_LINE>objects.stream().filter((obj) -> obj instanceof Operation).collect(Collectors.toCollection(LinkedList::new)).descendingIterator().forEachRemaining((obj) -> {<NEW_LINE>((Operation) obj).accept(OperationCategory.APPEND, targetElement, bindings);<NEW_LINE>});<NEW_LINE>// Process any delete operations in the list<NEW_LINE>objects.stream().filter((obj) -> obj instanceof Operation).forEachOrdered((obj) -> {<NEW_LINE>((Operation) obj).accept(OperationCategory.DELETE, targetElement, bindings);<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>// The witness binding is an actual metavariable binding, record it and process sub-witnesses<NEW_LINE>bindings.put(witness.metavar, witness.binding);<NEW_LINE>for (ModelChecker.Witness subWitness : witness.witnesses) {<NEW_LINE>transform(model, bindings, subWitness, done);<NEW_LINE>}<NEW_LINE>bindings.remove(witness.metavar);<NEW_LINE>}<NEW_LINE>}
BranchKind kind = node.getKind();
985,329
public String search(@RequestParam(value = "identifier") String email, Model m, Authentication auth, HttpServletRequest req) {<NEW_LINE>// check locally first<NEW_LINE>UserInfo localUser = userInfoService.getByEmailAddress(email);<NEW_LINE>if (localUser != null) {<NEW_LINE>Map<String, Object> e = new HashMap<>();<NEW_LINE>e.put("issuer", ImmutableSet.of(config.getIssuer()));<NEW_LINE>e.put("name", "email");<NEW_LINE>e.put("value", localUser.getEmail());<NEW_LINE>Map<String, Object> ev = new HashMap<>();<NEW_LINE>ev.put("issuer", ImmutableSet.of<MASK><NEW_LINE>ev.put("name", "email_verified");<NEW_LINE>ev.put("value", localUser.getEmailVerified());<NEW_LINE>Map<String, Object> s = new HashMap<>();<NEW_LINE>s.put("issuer", ImmutableSet.of(config.getIssuer()));<NEW_LINE>s.put("name", "sub");<NEW_LINE>s.put("value", localUser.getSub());<NEW_LINE>m.addAttribute(JsonEntityView.ENTITY, ImmutableSet.of(e, ev, s));<NEW_LINE>return JsonEntityView.VIEWNAME;<NEW_LINE>} else {<NEW_LINE>// otherwise do a webfinger lookup<NEW_LINE>IssuerServiceResponse resp = webfingerIssuerService.getIssuer(req);<NEW_LINE>if (resp != null && resp.getIssuer() != null) {<NEW_LINE>// we found an issuer, return that<NEW_LINE>Map<String, Object> e = new HashMap<>();<NEW_LINE>e.put("issuer", ImmutableSet.of(resp.getIssuer()));<NEW_LINE>e.put("name", "email");<NEW_LINE>e.put("value", email);<NEW_LINE>Map<String, Object> ev = new HashMap<>();<NEW_LINE>ev.put("issuer", ImmutableSet.of(resp.getIssuer()));<NEW_LINE>ev.put("name", "email_verified");<NEW_LINE>ev.put("value", true);<NEW_LINE>m.addAttribute(JsonEntityView.ENTITY, ImmutableSet.of(e, ev));<NEW_LINE>return JsonEntityView.VIEWNAME;<NEW_LINE>} else {<NEW_LINE>m.addAttribute(HttpCodeView.CODE, HttpStatus.NOT_FOUND);<NEW_LINE>return JsonErrorView.VIEWNAME;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(config.getIssuer()));
1,432,520
public ListBackendEnvironmentsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListBackendEnvironmentsResult listBackendEnvironmentsResult = new ListBackendEnvironmentsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return listBackendEnvironmentsResult;<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("backendEnvironments", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listBackendEnvironmentsResult.setBackendEnvironments(new ListUnmarshaller<BackendEnvironment>(BackendEnvironmentJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("nextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listBackendEnvironmentsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listBackendEnvironmentsResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
487,210
private double[] determineMinMaxDistance(Relation<ParameterizationFunction> relation, int dimensionality) {<NEW_LINE>double[] min = new double[dimensionality - 1];<NEW_LINE>double[] max = new double[dimensionality - 1];<NEW_LINE>Arrays.fill(max, Math.PI);<NEW_LINE>HyperBoundingBox box = new HyperBoundingBox(min, max);<NEW_LINE>double d_min = Double<MASK><NEW_LINE>for (DBIDIter iditer = relation.iterDBIDs(); iditer.valid(); iditer.advance()) {<NEW_LINE>ParameterizationFunction f = relation.get(iditer);<NEW_LINE>HyperBoundingBox minMax = f.determineAlphaMinMax(box);<NEW_LINE>double f_min = f.function(SpatialUtil.getMin(minMax));<NEW_LINE>double f_max = f.function(SpatialUtil.getMax(minMax));<NEW_LINE>d_min = Math.min(d_min, f_min);<NEW_LINE>d_max = Math.max(d_max, f_max);<NEW_LINE>}<NEW_LINE>return new double[] { d_min, d_max };<NEW_LINE>}
.POSITIVE_INFINITY, d_max = Double.NEGATIVE_INFINITY;
633,581
public static ListSensitiveColumnsDetailResponse unmarshall(ListSensitiveColumnsDetailResponse listSensitiveColumnsDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>listSensitiveColumnsDetailResponse.setRequestId(_ctx.stringValue("ListSensitiveColumnsDetailResponse.RequestId"));<NEW_LINE>listSensitiveColumnsDetailResponse.setErrorCode(_ctx.stringValue("ListSensitiveColumnsDetailResponse.ErrorCode"));<NEW_LINE>listSensitiveColumnsDetailResponse.setErrorMessage(_ctx.stringValue("ListSensitiveColumnsDetailResponse.ErrorMessage"));<NEW_LINE>listSensitiveColumnsDetailResponse.setSuccess(_ctx.booleanValue("ListSensitiveColumnsDetailResponse.Success"));<NEW_LINE>List<SensitiveColumnsDetail> sensitiveColumnsDetailList = new ArrayList<SensitiveColumnsDetail>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList.Length"); i++) {<NEW_LINE>SensitiveColumnsDetail sensitiveColumnsDetail = new SensitiveColumnsDetail();<NEW_LINE>sensitiveColumnsDetail.setDbId(_ctx.longValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].DbId"));<NEW_LINE>sensitiveColumnsDetail.setColumnName(_ctx.stringValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].ColumnName"));<NEW_LINE>sensitiveColumnsDetail.setColumnDescription(_ctx.stringValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].ColumnDescription"));<NEW_LINE>sensitiveColumnsDetail.setTableName(_ctx.stringValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].TableName"));<NEW_LINE>sensitiveColumnsDetail.setDbType(_ctx.stringValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].DbType"));<NEW_LINE>sensitiveColumnsDetail.setColumnType(_ctx.stringValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].ColumnType"));<NEW_LINE>sensitiveColumnsDetail.setLogic(_ctx.booleanValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].Logic"));<NEW_LINE>sensitiveColumnsDetail.setSchemaName(_ctx.stringValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].SchemaName"));<NEW_LINE>sensitiveColumnsDetail.setSearchName(_ctx.stringValue("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].SearchName"));<NEW_LINE>sensitiveColumnsDetail.setEnvType(_ctx.stringValue<MASK><NEW_LINE>sensitiveColumnsDetailList.add(sensitiveColumnsDetail);<NEW_LINE>}<NEW_LINE>listSensitiveColumnsDetailResponse.setSensitiveColumnsDetailList(sensitiveColumnsDetailList);<NEW_LINE>return listSensitiveColumnsDetailResponse;<NEW_LINE>}
("ListSensitiveColumnsDetailResponse.SensitiveColumnsDetailList[" + i + "].EnvType"));
98,724
private boolean isSqlServerTableSequenceAvailable(String incrementerName) {<NEW_LINE>boolean result = false;<NEW_LINE>DatabaseMetaData metaData;<NEW_LINE>Connection connection = null;<NEW_LINE>try {<NEW_LINE>connection = this.incrementerDataSource.getConnection();<NEW_LINE>metaData = connection.getMetaData();<NEW_LINE>String[] types = { "TABLE" };<NEW_LINE>ResultSet tables = metaData.getTables(<MASK><NEW_LINE>while (tables.next()) {<NEW_LINE>if (tables.getString("TABLE_NAME").equals(incrementerName)) {<NEW_LINE>result = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (SQLException sqe) {<NEW_LINE>logger.warn(sqe.getMessage(), sqe);<NEW_LINE>} finally {<NEW_LINE>if (connection != null) {<NEW_LINE>try {<NEW_LINE>connection.close();<NEW_LINE>} catch (SQLException sqe) {<NEW_LINE>logger.warn(sqe.getMessage(), sqe);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
null, null, "%", types);
1,379,146
private IT createInitialTransform() {<NEW_LINE>float scale = 0.8f;<NEW_LINE>IT fitModel = createFitModelStructure();<NEW_LINE>if (fitModel instanceof Affine2D_F64) {<NEW_LINE>Affine2D_F64 H = new Affine2D_F64(scale, 0, 0, scale, stitchWidth / 4, stitchHeight / 4);<NEW_LINE>return (IT) H.invert(null);<NEW_LINE>} else if (fitModel instanceof Homography2D_F64) {<NEW_LINE>Homography2D_F64 H = new Homography2D_F64(scale, 0, stitchWidth / 4, 0, scale, stitchHeight / 4, 0, 0, 1);<NEW_LINE>return (<MASK><NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("Need to support this model type: " + fitModel.getClass().getSimpleName());<NEW_LINE>}<NEW_LINE>}
IT) H.invert(null);
296,685
private DefaultArtifactSources processJarPluginExecutionConfig(Object config, boolean test) {<NEW_LINE>if (config == null || !(config instanceof Xpp3Dom)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Xpp3Dom dom = (Xpp3Dom) config;<NEW_LINE>final List<String> includes = collectChildValues(dom.getChild("includes"));<NEW_LINE>final List<String> excludes = collectChildValues(dom.getChild("excludes"));<NEW_LINE>final PathFilter filter = includes == null && excludes == null ? null : new PathFilter(includes, excludes);<NEW_LINE>final String classifier = getClassifier(dom, test);<NEW_LINE>final Collection<SourceDir> sources = Collections.singletonList(new DefaultSourceDir(new DirectoryPathTree(test ? getTestSourcesSourcesDir() : getSourcesSourcesDir()), new DirectoryPathTree(test ? getTestClassesDir() : getClassesDir(), filter), Collections.emptyMap()));<NEW_LINE>final Collection<SourceDir> resources = test ? collectTestResources(filter) : collectMainResources(filter);<NEW_LINE>return new <MASK><NEW_LINE>}
DefaultArtifactSources(classifier, sources, resources);
159,846
public static DynamicConfigAddReplicatedMapConfigCodec.RequestParameters decodeRequest(ClientMessage clientMessage) {<NEW_LINE>ClientMessage.ForwardFrameIterator iterator = clientMessage.frameIterator();<NEW_LINE>RequestParameters request = new RequestParameters();<NEW_LINE>ClientMessage.Frame initialFrame = iterator.next();<NEW_LINE>request.asyncFillup = decodeBoolean(initialFrame.content, REQUEST_ASYNC_FILLUP_FIELD_OFFSET);<NEW_LINE>request.statisticsEnabled = decodeBoolean(initialFrame.content, REQUEST_STATISTICS_ENABLED_FIELD_OFFSET);<NEW_LINE>request.mergeBatchSize = decodeInt(initialFrame.content, REQUEST_MERGE_BATCH_SIZE_FIELD_OFFSET);<NEW_LINE>request.name = StringCodec.decode(iterator);<NEW_LINE>request.inMemoryFormat = StringCodec.decode(iterator);<NEW_LINE>request.<MASK><NEW_LINE>request.listenerConfigs = ListMultiFrameCodec.decodeNullable(iterator, ListenerConfigHolderCodec::decode);<NEW_LINE>request.splitBrainProtectionName = CodecUtil.decodeNullable(iterator, StringCodec::decode);<NEW_LINE>return request;<NEW_LINE>}
mergePolicy = StringCodec.decode(iterator);
438,015
public static Boolean monitor_nodes(EHandle caller, boolean on, ESeq opts_list) {<NEW_LINE>boolean all = false, visible = false, hidden = false;<NEW_LINE>int opts = 0;<NEW_LINE>for (; !opts_list.isNil(); opts_list = opts_list.tail()) {<NEW_LINE>EObject opt = opts_list.head();<NEW_LINE>ETuple2 tp;<NEW_LINE>if (opt == am_nodedown_reason) {<NEW_LINE>opts |= ERTS_NODES_MON_OPT_DOWN_REASON;<NEW_LINE>} else if ((tp = ETuple2.cast(opt)) != null) {<NEW_LINE>if (tp.elem1 == am_node_type) {<NEW_LINE>if (tp.elem2 == am_visible) {<NEW_LINE>if (hidden || all)<NEW_LINE>return null;<NEW_LINE>opts |= ERTS_NODES_MON_OPT_TYPE_VISIBLE;<NEW_LINE>visible = true;<NEW_LINE>} else if (tp.elem2 == am_hidden) {<NEW_LINE>if (visible || all)<NEW_LINE>return null;<NEW_LINE>opts |= ERTS_NODES_MON_OPT_TYPE_HIDDEN;<NEW_LINE>hidden = true;<NEW_LINE>} else if (tp.elem2 == am_all) {<NEW_LINE>if (visible || hidden)<NEW_LINE>return null;<NEW_LINE>opts |= ERTS_NODES_MON_OPT_TYPES;<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Boolean.valueOf(monitor_nodes<MASK><NEW_LINE>}
(caller, on, opts));
1,146,816
protected void flushToNode(ContainerUnloader container, NodeDraft nodeDraft, Node node) {<NEW_LINE>if (nodeDraft.getColor() != null) {<NEW_LINE>node.<MASK><NEW_LINE>}<NEW_LINE>if (nodeDraft.getLabel() != null) {<NEW_LINE>if (node.getLabel() == null || !nodeDraft.isCreatedAuto()) {<NEW_LINE>node.setLabel(nodeDraft.getLabel());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (node.getTextProperties() != null) {<NEW_LINE>node.getTextProperties().setVisible(nodeDraft.isLabelVisible());<NEW_LINE>}<NEW_LINE>if (nodeDraft.getLabelColor() != null && node.getTextProperties() != null) {<NEW_LINE>Color labelColor = nodeDraft.getLabelColor();<NEW_LINE>node.getTextProperties().setColor(labelColor);<NEW_LINE>} else {<NEW_LINE>node.getTextProperties().setColor(new Color(0, 0, 0, 0));<NEW_LINE>}<NEW_LINE>if (nodeDraft.getLabelSize() != -1f && node.getTextProperties() != null) {<NEW_LINE>node.getTextProperties().setSize(nodeDraft.getLabelSize());<NEW_LINE>}<NEW_LINE>if ((nodeDraft.getX() != 0 || nodeDraft.getY() != 0 || nodeDraft.getZ() != 0) && (node.x() == 0 && node.y() == 0 && node.z() == 0)) {<NEW_LINE>node.setX(nodeDraft.getX());<NEW_LINE>node.setY(nodeDraft.getY());<NEW_LINE>node.setZ(nodeDraft.getZ());<NEW_LINE>}<NEW_LINE>if (nodeDraft.getSize() != 0 && !Float.isNaN(nodeDraft.getSize())) {<NEW_LINE>node.setSize(nodeDraft.getSize());<NEW_LINE>} else if (node.size() == 0) {<NEW_LINE>node.setSize(10f);<NEW_LINE>}<NEW_LINE>// Timeset<NEW_LINE>if (nodeDraft.getTimeSet() != null) {<NEW_LINE>flushTimeSet(nodeDraft.getTimeSet(), node);<NEW_LINE>}<NEW_LINE>// Graph timeset<NEW_LINE>if (nodeDraft.getGraphTimestamp() != null) {<NEW_LINE>node.addTimestamp(nodeDraft.getGraphTimestamp());<NEW_LINE>} else if (nodeDraft.getGraphInterval() != null) {<NEW_LINE>node.addInterval(nodeDraft.getGraphInterval());<NEW_LINE>}<NEW_LINE>// Attributes<NEW_LINE>flushToElementAttributes(container, nodeDraft, node);<NEW_LINE>}
setColor(nodeDraft.getColor());
1,143,667
protected void compareCandidatesBest(Record record, Collection<Record> candidates) {<NEW_LINE>double max = 0.0;<NEW_LINE>Record best = null;<NEW_LINE>// go through all candidates, and find the best<NEW_LINE>for (Record candidate : candidates) {<NEW_LINE>if (isSameAs(record, candidate))<NEW_LINE>continue;<NEW_LINE>double <MASK><NEW_LINE>if (prob > max) {<NEW_LINE>max = prob;<NEW_LINE>best = candidate;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// pass on the best match, if any<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Best candidate at " + max + " is " + best);<NEW_LINE>}<NEW_LINE>if (max > config.getThreshold())<NEW_LINE>registerMatch(record, best, max);<NEW_LINE>else if (config.getMaybeThreshold() != 0.0 && max > config.getMaybeThreshold())<NEW_LINE>registerMatchPerhaps(record, best, max);<NEW_LINE>else<NEW_LINE>registerNoMatchFor(record);<NEW_LINE>}
prob = compare(record, candidate);
702,135
public Pack threadList(Pack param) {<NEW_LINE>MapPack mpack = ThreadUtil.getThreadList();<NEW_LINE>ListValue ids = mpack.getList("id");<NEW_LINE>ListValue txid = mpack.newList("txid");<NEW_LINE>ListValue elapsed = mpack.newList("elapsed");<NEW_LINE>ListValue service = mpack.newList("service");<NEW_LINE>for (int i = 0; i < ids.size(); i++) {<NEW_LINE>long tid = CastUtil.clong<MASK><NEW_LINE>TraceContext ctx = TraceContextManager.getContextByThreadId(tid);<NEW_LINE>if (ctx != null) {<NEW_LINE>txid.add(new TextValue(Hexa32.toString32(ctx.txid)));<NEW_LINE>service.add(new TextValue(ctx.serviceName));<NEW_LINE>long etime = System.currentTimeMillis() - ctx.startTime;<NEW_LINE>elapsed.add(new DecimalValue(etime));<NEW_LINE>} else {<NEW_LINE>txid.add(new NullValue());<NEW_LINE>elapsed.add(new NullValue());<NEW_LINE>service.add(new NullValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return mpack;<NEW_LINE>}
(ids.get(i));
71,733
final BundleInstanceResult executeBundleInstance(BundleInstanceRequest bundleInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(bundleInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BundleInstanceRequest> request = null;<NEW_LINE>Response<BundleInstanceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BundleInstanceRequestMarshaller().marshall(super.beforeMarshalling(bundleInstanceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BundleInstance");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<BundleInstanceResult> responseHandler = new StaxResponseHandler<BundleInstanceResult>(new BundleInstanceResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,031,072
private Boolean isSlaMissed(final ExecutableFlow flow) {<NEW_LINE>final SlaType type = slaOption.getType();<NEW_LINE>logger.info("SLA type for flow " + flow.<MASK><NEW_LINE>if (flow.getStartTime() < 0) {<NEW_LINE>logger.info("Start time is less than 0 for flow " + flow.getId());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Status status;<NEW_LINE>if (type.getComponent() == SlaType.ComponentType.FLOW) {<NEW_LINE>logger.info("SLA type is flow.");<NEW_LINE>if (this.checkTime < flow.getStartTime()) {<NEW_LINE>logger.info("checktime = " + this.checkTime);<NEW_LINE>logger.info("SLA duration = " + slaOption.getDuration().toMillis() + " ms");<NEW_LINE>this.checkTime = flow.getStartTime() + slaOption.getDuration().toMillis();<NEW_LINE>logger.info("checktime updated to " + this.checkTime);<NEW_LINE>}<NEW_LINE>status = flow.getStatus();<NEW_LINE>logger.info("Flow status = " + status.toString());<NEW_LINE>} else {<NEW_LINE>// JOB<NEW_LINE>final ExecutableNode node = flow.getExecutableNode(slaOption.getJobName());<NEW_LINE>if (node.getStartTime() < 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (this.checkTime < node.getStartTime()) {<NEW_LINE>this.checkTime = node.getStartTime() + slaOption.getDuration().toMillis();<NEW_LINE>}<NEW_LINE>status = node.getStatus();<NEW_LINE>}<NEW_LINE>if (this.checkTime < DateTime.now().getMillis()) {<NEW_LINE>switch(slaOption.getType()) {<NEW_LINE>case FLOW_FINISH:<NEW_LINE>logger.info("isFlowFinished?");<NEW_LINE>return !isFlowFinished(status);<NEW_LINE>case FLOW_SUCCEED:<NEW_LINE>logger.info("isFlowSucceeded?");<NEW_LINE>return !isFlowSucceeded(status);<NEW_LINE>case JOB_FINISH:<NEW_LINE>return !isJobFinished(status);<NEW_LINE>case JOB_SUCCEED:<NEW_LINE>return !isJobFinished(status);<NEW_LINE>}<NEW_LINE>} else if (slaOption.getType().getStatus() == StatusType.SUCCEED) {<NEW_LINE>logger.info("slaOption.status = SUCCEED and status = " + status.toString());<NEW_LINE>return (status == Status.FAILED || status == Status.KILLED);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
getId() + " is " + type);
147,966
public void onDrawOver(@NonNull Canvas c, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {<NEW_LINE>super.onDrawOver(c, parent, state);<NEW_LINE>final int childCount = parent.getChildCount();<NEW_LINE>for (int i = 0; i < childCount; i++) {<NEW_LINE>final View child = parent.getChildAt(i);<NEW_LINE>int position = parent.getChildLayoutPosition(child);<NEW_LINE>int column = (position + 1) % mSpanCount;<NEW_LINE>final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();<NEW_LINE>final int childBottom = child.getBottom() + params.bottomMargin + Math.round(ViewCompat.getTranslationY(child));<NEW_LINE>final int childRight = child.getRight() + params.rightMargin + Math.round(ViewCompat.getTranslationX(child));<NEW_LINE>if (childBottom < parent.getHeight()) {<NEW_LINE>c.drawLine(child.getLeft(), childBottom, childRight, childBottom, mDividerPaint);<NEW_LINE>}<NEW_LINE>if (column < mSpanCount) {<NEW_LINE>c.drawLine(childRight, child.getTop(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
), childRight, childBottom, mDividerPaint);
231,665
private static void createRocksDB(RocksDBReference reference, RocksDBConfig dbConfig) {<NEW_LINE>try {<NEW_LINE>List<ColumnFamilyHandle> columnFamilyHandleList = new ArrayList<>();<NEW_LINE>RocksDB db = RocksDB.open(reference.getDbOptions(), dbConfig.filePath(), reference.getColumnFamilyDescriptors(), columnFamilyHandleList);<NEW_LINE>reference.setRocksDB(db);<NEW_LINE>Map<String, ColumnFamilyHandle> handleMap = new ConcurrentHashMap<>();<NEW_LINE>for (ColumnFamilyHandle columnFamilyHandle : columnFamilyHandleList) {<NEW_LINE>String name = new String(columnFamilyHandle.getName(), StandardCharsets.UTF_8);<NEW_LINE>handleMap.put(name, columnFamilyHandle);<NEW_LINE>}<NEW_LINE>reference.setColumnFamilyHandleRegistry(handleMap);<NEW_LINE>} catch (RocksDBException e) {<NEW_LINE>log.error("Error while opening rocks database", e);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
throw new NitriteIOException("failed to open database", e);
1,807,161
public static byte[] convertDate4(Date v) {<NEW_LINE>ByteArrayOutputStream bb = new ByteArrayOutputStream(4 + 1);<NEW_LINE>LittleEndianDataOutputStream out = new LittleEndianDataOutputStream(bb);<NEW_LINE>try {<NEW_LINE>if (v instanceof OriginalDate) {<NEW_LINE>MysqlDateTime t = MySQLTimeTypeUtil.toMysqlDate(v);<NEW_LINE>if (t.getYear() == 0 && t.getMonth() == 0 && t.getDay() == 0) {<NEW_LINE>return new byte[] { 0 };<NEW_LINE>}<NEW_LINE>out.writeByte(4);<NEW_LINE>out.writeShort((int) t.getYear());<NEW_LINE>out.writeByte((int) t.getMonth());<NEW_LINE>out.writeByte((<MASK><NEW_LINE>} else {<NEW_LINE>if (v.getYear() == 0 && v.getMonth() == 0 && v.getDate() == 0) {<NEW_LINE>return new byte[] { 0 };<NEW_LINE>}<NEW_LINE>out.writeByte(4);<NEW_LINE>out.writeShort(v.getYear() + 1900);<NEW_LINE>out.writeByte(v.getMonth() + 1);<NEW_LINE>out.writeByte(v.getDate());<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>return null;<NEW_LINE>} finally {<NEW_LINE>IOUtils.closeQuietly(out);<NEW_LINE>}<NEW_LINE>return bb.toByteArray();<NEW_LINE>}
int) t.getDay());
647,019
public ListApprovedOriginsResult listApprovedOrigins(ListApprovedOriginsRequest listApprovedOriginsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listApprovedOriginsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListApprovedOriginsRequest> request = null;<NEW_LINE>Response<ListApprovedOriginsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListApprovedOriginsRequestMarshaller().marshall(listApprovedOriginsRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<ListApprovedOriginsResult, JsonUnmarshallerContext> unmarshaller = new ListApprovedOriginsResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<ListApprovedOriginsResult> responseHandler = <MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
new JsonResponseHandler<ListApprovedOriginsResult>(unmarshaller);
266,690
private String uploadFile(String sourceFile, String destinationUrl) throws IOException, URISyntaxException {<NEW_LINE>Common.logger.add(new LogEntry(LogEntry.PB_LOG_DEBUG, "Start"));<NEW_LINE>String result = ERROR;<NEW_LINE>httpClient = createHttpsClient();<NEW_LINE>HttpParams params = httpClient.getParams();<NEW_LINE>if (isUrlDirect(destinationUrl) == false) {<NEW_LINE>setProxy();<NEW_LINE>String proxyHost = System.getProperty("http.proxyHost");<NEW_LINE>String proxyPort = System.getProperty("http.proxyPort");<NEW_LINE>if ((proxyHost != null) && (proxyPort != null)) {<NEW_LINE>try {<NEW_LINE>HttpHost proxy = new HttpHost(proxyHost, Integer.parseInt(proxyPort));<NEW_LINE>httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>Common.logger.add(new LogEntry(LogEntry.PB_LOG_ERROR, e.getMessage()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>params.setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);<NEW_LINE>HttpConnectionParams.setConnectionTimeout(params, HTTP_TIMEOUT);<NEW_LINE>HttpConnectionParams.setSoTimeout(params, HTTP_TIMEOUT);<NEW_LINE>URL url = new URL(fixUrl(destinationUrl));<NEW_LINE>HttpPost httpPost = new HttpPost(url.toURI());<NEW_LINE><MASK><NEW_LINE>if (sourceFileObject.exists() == false)<NEW_LINE>throw (new IOException("source file not found"));<NEW_LINE>FileBody fileContent = new FileBody(new File(sourceFile));<NEW_LINE>MultipartEntity reqEntity = new MultipartEntity();<NEW_LINE>// Insert Authorization header if required<NEW_LINE>if (m_username.length() > 0) {<NEW_LINE>byte[] encodedPasswordBuffer = (m_username + ":" + m_password).getBytes();<NEW_LINE>Base64 encoder = new Base64();<NEW_LINE>String encodedPassword = encoder.encodeToString(encodedPasswordBuffer);<NEW_LINE>encodedPassword = encodedPassword.substring(0, encodedPassword.length() - 2);<NEW_LINE>httpPost.setHeader("Authorization", "Basic " + encodedPassword);<NEW_LINE>}<NEW_LINE>reqEntity.addPart("SpbImagerFile", fileContent);<NEW_LINE>httpPost.setHeader("Cache-Control", "no-cache");<NEW_LINE>httpPost.setHeader("User-Agent", "Symbol RhoElements");<NEW_LINE>httpPost.getParams().setBooleanParameter("http.protocol.expect-continue", false);<NEW_LINE>Common.logger.add(new LogEntry(LogEntry.PB_LOG_INFO, "executing request " + httpPost.getRequestLine()));<NEW_LINE>httpPost.setEntity(reqEntity);<NEW_LINE>result = httpClient.execute(httpPost, new CustomHttpResponse());<NEW_LINE>Common.logger.add(new LogEntry(LogEntry.PB_LOG_DEBUG, "End"));<NEW_LINE>return result;<NEW_LINE>}
File sourceFileObject = new File(sourceFile);
857,806
private void parseAndWrite(ConsumerRecord<?, ?> record, byte[] recordArray) {<NEW_LINE>stream.setValue(new ByteArrayInputStream(recordArray));<NEW_LINE>if (kafkaJsonLoader == null) {<NEW_LINE>JsonLoaderOptions jsonLoaderOptions = new JsonLoaderOptions();<NEW_LINE>jsonLoaderOptions.allTextMode = readOptions.isAllTextMode();<NEW_LINE>jsonLoaderOptions.readNumbersAsDouble = readOptions.isReadNumbersAsDouble();<NEW_LINE>jsonLoaderOptions.skipMalformedRecords = readOptions.isSkipInvalidRecords();<NEW_LINE>jsonLoaderOptions.allowNanInf = readOptions.isAllowNanInf();<NEW_LINE>jsonLoaderOptions.enableEscapeAnyChar = readOptions.isAllowEscapeAnyChar();<NEW_LINE>jsonLoaderOptions.skipMalformedDocument = readOptions.isSkipInvalidRecords();<NEW_LINE>kafkaJsonLoader = (KafkaJsonLoader) new KafkaJsonLoader.KafkaJsonLoaderBuilder().resultSetLoader(resultSetLoader).standardOptions(negotiator.queryOptions()).options(jsonLoaderOptions).errorContext(negotiator.parentErrorContext()).fromStream(() -> stream).build();<NEW_LINE>}<NEW_LINE>RowSetLoader rowWriter = resultSetLoader.writer();<NEW_LINE>rowWriter.start();<NEW_LINE>if (kafkaJsonLoader.parser().next()) {<NEW_LINE>writeValue(rowWriter, MetaDataField.KAFKA_TOPIC, record.topic());<NEW_LINE>writeValue(rowWriter, MetaDataField.KAFKA_PARTITION_ID, record.partition());<NEW_LINE>writeValue(rowWriter, MetaDataField.<MASK><NEW_LINE>writeValue(rowWriter, MetaDataField.KAFKA_TIMESTAMP, record.timestamp());<NEW_LINE>writeValue(rowWriter, MetaDataField.KAFKA_MSG_KEY, record.key() != null ? record.key().toString() : null);<NEW_LINE>rowWriter.save();<NEW_LINE>}<NEW_LINE>}
KAFKA_OFFSET, record.offset());
1,013,778
public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>// use default library if unset<NEW_LINE>if (StringUtils.isEmpty(library)) {<NEW_LINE>setLibrary(DEFAULT_MSF4J_LIBRARY);<NEW_LINE>}<NEW_LINE>if (additionalProperties.containsKey(CodegenConstants.IMPL_FOLDER)) {<NEW_LINE>implFolder = (String) additionalProperties.get(CodegenConstants.IMPL_FOLDER);<NEW_LINE>}<NEW_LINE>if ("joda".equals(dateLibrary)) {<NEW_LINE>supportingFiles.add(new SupportingFile("JodaDateTimeProvider.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "JodaDateTimeProvider.java"));<NEW_LINE>supportingFiles.add(new SupportingFile("JodaLocalDateProvider.mustache", (sourceFolder + '/' + apiPackage).replace(<MASK><NEW_LINE>} else if (dateLibrary.startsWith("java8")) {<NEW_LINE>supportingFiles.add(new SupportingFile("OffsetDateTimeProvider.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "OffsetDateTimeProvider.java"));<NEW_LINE>supportingFiles.add(new SupportingFile("LocalDateProvider.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "LocalDateProvider.java"));<NEW_LINE>}<NEW_LINE>supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml").doNotOverwrite());<NEW_LINE>supportingFiles.add(new SupportingFile("README.mustache", "", "README.md").doNotOverwrite());<NEW_LINE>supportingFiles.add(new SupportingFile("ApiException.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "ApiException.java"));<NEW_LINE>supportingFiles.add(new SupportingFile("ApiOriginFilter.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "ApiOriginFilter.java"));<NEW_LINE>supportingFiles.add(new SupportingFile("ApiResponseMessage.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "ApiResponseMessage.java"));<NEW_LINE>supportingFiles.add(new SupportingFile("NotFoundException.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "NotFoundException.java"));<NEW_LINE>supportingFiles.add(new SupportingFile("jacksonJsonProvider.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "JacksonJsonProvider.java"));<NEW_LINE>supportingFiles.add(new SupportingFile("RFC3339DateFormat.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "RFC3339DateFormat.java"));<NEW_LINE>// supportingFiles.add(new SupportingFile("bootstrap.mustache", (implFolder + '/' + apiPackage).replace(".", "/"), "Bootstrap.java").doNotOverwrite());<NEW_LINE>// supportingFiles.add(new SupportingFile("web.mustache", ("src/main/webapp/WEB-INF"), "web.xml").doNotOverwrite());<NEW_LINE>supportingFiles.add(new SupportingFile("StringUtil.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "StringUtil.java"));<NEW_LINE>supportingFiles.add(new SupportingFile("Application.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "Application.java"));<NEW_LINE>}
".", "/"), "JodaLocalDateProvider.java"));
565,310
private static void buildNewBoundForSplitHashOrKey(int partColCnt, int actualPartColCnt, PartitionStrategy strategy, SqlPartition sqlPartition, SingleValuePartitionBoundSpec newBound) {<NEW_LINE><MASK><NEW_LINE>SearchDatumInfo newBndValDatum;<NEW_LINE>if (partColCnt <= 1) {<NEW_LINE>SqlPartitionValueItem oneValItem = partVals.getItems().get(0);<NEW_LINE>PartitionField bndValPartFld = buildNewBoundPartFieldForHashValLiteral(oneValItem);<NEW_LINE>newBndValDatum = SearchDatumInfo.createFromField(bndValPartFld);<NEW_LINE>newBound.setSingleDatum(newBndValDatum);<NEW_LINE>} else {<NEW_LINE>List<PartitionField> bndFields = new ArrayList<>();<NEW_LINE>List<SqlPartition> newPartAstList = new ArrayList<>();<NEW_LINE>newPartAstList.add(sqlPartition);<NEW_LINE>int newPrefixPartColCnt = PartitionInfoUtil.getNewPrefixPartColCntBySqlPartitionAst(partColCnt, actualPartColCnt, strategy, newPartAstList);<NEW_LINE>for (int i = 0; i < newPrefixPartColCnt; i++) {<NEW_LINE>SqlPartitionValueItem oneValItem = partVals.getItems().get(i);<NEW_LINE>PartitionField bndValPartFld = buildNewBoundPartFieldForHashValLiteral(oneValItem);<NEW_LINE>bndFields.add(bndValPartFld);<NEW_LINE>}<NEW_LINE>if (newPrefixPartColCnt < partColCnt && strategy == PartitionStrategy.KEY) {<NEW_LINE>for (int i = newPrefixPartColCnt; i < partColCnt; i++) {<NEW_LINE>PartitionField maxBndValPartFld = buildBoundPartFieldForHashLongVal(PartitionInfoUtil.getHashSpaceMaxValue());<NEW_LINE>bndFields.add(maxBndValPartFld);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>newBndValDatum = SearchDatumInfo.createFromFields(bndFields);<NEW_LINE>newBound.setSingleDatum(newBndValDatum);<NEW_LINE>}<NEW_LINE>}
SqlPartitionValue partVals = sqlPartition.getValues();
1,268,845
private TreeItem<Object> findOrCreateTreeItem(final TreeItem<Object> parent, final Object value) {<NEW_LINE>ObservableList<TreeItem<Object>> children = parent.getChildren();<NEW_LINE>TreeItem<Object> found = null;<NEW_LINE>int placeToInsert = 0;<NEW_LINE>boolean foundInsertPos = false;<NEW_LINE>for (TreeItem<Object> child : children) {<NEW_LINE>int stringCompare = child.getValue().toString().<MASK><NEW_LINE>if (stringCompare == 0) {<NEW_LINE>found = child;<NEW_LINE>break;<NEW_LINE>} else if (!foundInsertPos && stringCompare < 0) {<NEW_LINE>// make sure sub packages listed before classes in this package<NEW_LINE>if (not(child.getValue() instanceof MetaPackage && value instanceof MetaClass)) {<NEW_LINE>placeToInsert++;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (child.getValue() instanceof MetaPackage && value instanceof MetaClass) {<NEW_LINE>placeToInsert++;<NEW_LINE>} else {<NEW_LINE>foundInsertPos = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (found == null) {<NEW_LINE>found = new TreeItem<>(value);<NEW_LINE>children.add(placeToInsert, found);<NEW_LINE>if (value instanceof MetaPackage) {<NEW_LINE>final String packageName = value.toString();<NEW_LINE>found.expandedProperty().addListener(new ChangeListener<Boolean>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {<NEW_LINE>if (newValue != null) {<NEW_LINE>if (newValue == true) {<NEW_LINE>openPackageNodes.add(packageName);<NEW_LINE>} else {<NEW_LINE>openPackageNodes.remove(packageName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (sameVmCommand && openPackageNodes.contains(packageName)) {<NEW_LINE>found.setExpanded(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean hasCompiledChildren = false;<NEW_LINE>if (value instanceof MetaPackage && ((MetaPackage) value).hasCompiledClasses()) {<NEW_LINE>hasCompiledChildren = true;<NEW_LINE>} else if (value instanceof MetaClass && ((MetaClass) value).hasCompiledMethods()) {<NEW_LINE>hasCompiledChildren = true;<NEW_LINE>}<NEW_LINE>if (UserInterfaceUtil.IMAGE_TICK != null && hasCompiledChildren) {<NEW_LINE>found.setGraphic(new ImageView(UserInterfaceUtil.IMAGE_TICK));<NEW_LINE>}<NEW_LINE>return found;<NEW_LINE>}
compareTo(value.toString());
763,565
private // d472972 - rewrote entire method to pass CTS.<NEW_LINE>EJBInterceptorBinding validateAndMergeStyle2Bindings(EJBInterceptorBinding binding1, EJBInterceptorBinding binding2) throws EJBConfigurationException {<NEW_LINE>// Add binding 2 interceptor-class list, unless it is empty.<NEW_LINE>ArrayList<String> interceptorNames = binding1.ivInterceptorClassNames;<NEW_LINE>if (!binding2.ivInterceptorClassNames.isEmpty()) {<NEW_LINE>interceptorNames.addAll(binding2.ivInterceptorClassNames);<NEW_LINE>}<NEW_LINE>// Add binding 2 interceptor-order list, unless it is empty.<NEW_LINE>ArrayList<String> interceptorOrder = binding1.ivInterceptorOrder;<NEW_LINE>if (!binding2.ivInterceptorOrder.isEmpty()) {<NEW_LINE>interceptorOrder.addAll(binding2.ivInterceptorOrder);<NEW_LINE>}<NEW_LINE>// CTS expects the exclude-default-interceptors setting in prior style 2<NEW_LINE>// interceptor-binding to be overridden by current interceptor-binding setting.<NEW_LINE>Boolean excludeDefault = binding1.ivExcludeDefaultLevelInterceptors;<NEW_LINE>if (binding2.ivExcludeDefaultLevelInterceptors != null) {<NEW_LINE>excludeDefault = binding2.ivExcludeDefaultLevelInterceptors;<NEW_LINE>}<NEW_LINE>// Bindings are valid, so merge into a single binding.<NEW_LINE>EJBInterceptorBinding mergedBinding;<NEW_LINE>mergedBinding = new EJBInterceptorBinding(<MASK><NEW_LINE>// Set whether or not default or class level interceptors are excluded.<NEW_LINE>if (excludeDefault != null) {<NEW_LINE>mergedBinding.setExcludeDefaultInterceptors(excludeDefault);<NEW_LINE>}<NEW_LINE>// Return merged binding.<NEW_LINE>return mergedBinding;<NEW_LINE>}
binding1.ivEjbName, interceptorNames, interceptorOrder);
322,873
protected void handleTagNMethod(Tag tag) {<NEW_LINE>Map<String, String> tagAttributes = tag.getAttributes();<NEW_LINE>String attrCompiler = tagAttributes.get(ATTR_COMPILER);<NEW_LINE>renameCompilationCompletedTimestamp(tag);<NEW_LINE>if (attrCompiler != null && attrCompiler.length() > 0) {<NEW_LINE>if (C1.equalsIgnoreCase(attrCompiler)) {<NEW_LINE>handleMethodLine(tag, EventType.NMETHOD_C1);<NEW_LINE>} else if (C2.equalsIgnoreCase(attrCompiler)) {<NEW_LINE>handleMethodLine(tag, EventType.NMETHOD_C2);<NEW_LINE>} else if (J9.equalsIgnoreCase(attrCompiler)) {<NEW_LINE>handleMethodLine(tag, EventType.NMETHOD_J9);<NEW_LINE>} else if (ZING.equalsIgnoreCase(attrCompiler)) {<NEW_LINE>handleMethodLine(tag, EventType.NMETHOD_ZING);<NEW_LINE>} else if (FALCON.equalsIgnoreCase(attrCompiler)) {<NEW_LINE>handleMethodLine(tag, EventType.NMETHOD_FALCON);<NEW_LINE>} else if (JVMCI.equalsIgnoreCase(attrCompiler)) {<NEW_LINE>handleMethodLine(tag, EventType.NMETHOD_JVMCI);<NEW_LINE>} else {<NEW_LINE>logger.error("Unexpected Compiler attribute: {} {}", attrCompiler, tag.toString(true));<NEW_LINE>logError("Unexpected Compiler attribute: " + attrCompiler);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String attrCompileKind = tagAttributes.get(ATTR_COMPILE_KIND);<NEW_LINE>if (attrCompileKind != null && C2N.equalsIgnoreCase(attrCompileKind)) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>logError("Missing Compiler attribute " + tag);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
handleMethodLine(tag, EventType.NMETHOD_C2N);
1,229,918
default String defaultToString() {<NEW_LINE>if (equals(Constants.DOT)) {<NEW_LINE>return ".";<NEW_LINE>}<NEW_LINE>if (equals(Constants.LINE_TERMINATOR)) {<NEW_LINE>return "[\\r\\n\\u2028\\u2029]";<NEW_LINE>}<NEW_LINE>if (equals(Constants.DIGITS)) {<NEW_LINE>return "\\d";<NEW_LINE>}<NEW_LINE>if (equals(Constants.NON_DIGITS)) {<NEW_LINE>return "\\D";<NEW_LINE>}<NEW_LINE>if (equals(Constants.WORD_CHARS)) {<NEW_LINE>return "\\w";<NEW_LINE>}<NEW_LINE>if (equals(Constants.NON_WORD_CHARS)) {<NEW_LINE>return "\\W";<NEW_LINE>}<NEW_LINE>if (equals(Constants.WHITE_SPACE)) {<NEW_LINE>return "\\s";<NEW_LINE>}<NEW_LINE>if (equals(Constants.NON_WHITE_SPACE)) {<NEW_LINE>return "\\S";<NEW_LINE>}<NEW_LINE>if (matchesNothing()) {<NEW_LINE>return "[]";<NEW_LINE>}<NEW_LINE>if (matchesSingleChar()) {<NEW_LINE>return Range.toString(getLo(0), getHi(0));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
return "[" + rangesToString() + "]";
52,284
public void prepare() throws IOException {<NEW_LINE>for (StringItem s : this) {<NEW_LINE>if (s.data.length() > 0x7FFF) {<NEW_LINE>useUTF8 = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ByteArrayOutputStream baos = new ByteArrayOutputStream();<NEW_LINE>int i = 0;<NEW_LINE>int offset = 0;<NEW_LINE>baos.reset();<NEW_LINE>Map<String, Integer> map = new HashMap<String, Integer>();<NEW_LINE>for (StringItem item : this) {<NEW_LINE>item.index = i++;<NEW_LINE>String stringData = item.data;<NEW_LINE>Integer of = map.get(stringData);<NEW_LINE>if (of != null) {<NEW_LINE>item.dataOffset = of;<NEW_LINE>} else {<NEW_LINE>item.dataOffset = offset;<NEW_LINE>map.put(stringData, offset);<NEW_LINE>if (useUTF8) {<NEW_LINE>int length = stringData.length();<NEW_LINE>byte[] data = stringData.getBytes("UTF-8");<NEW_LINE>int u8lenght = data.length;<NEW_LINE>if (length > 0x7F) {<NEW_LINE>offset++;<NEW_LINE>baos.write((length >> 8) | 0x80);<NEW_LINE>}<NEW_LINE>baos.write(length);<NEW_LINE>if (u8lenght > 0x7F) {<NEW_LINE>offset++;<NEW_LINE>baos.write((u8lenght >> 8) | 0x80);<NEW_LINE>}<NEW_LINE>baos.write(u8lenght);<NEW_LINE>baos.write(data);<NEW_LINE>baos.write(0);<NEW_LINE>offset += 3 + u8lenght;<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>byte[] data = stringData.getBytes("UTF-16LE");<NEW_LINE>if (length > 0x7FFF) {<NEW_LINE>int x = (length >> 16) | 0x8000;<NEW_LINE>baos.write(x);<NEW_LINE>baos.write(x >> 8);<NEW_LINE>offset += 2;<NEW_LINE>}<NEW_LINE>baos.write(length);<NEW_LINE>baos.write(length >> 8);<NEW_LINE>baos.write(data);<NEW_LINE>baos.write(0);<NEW_LINE>baos.write(0);<NEW_LINE>offset += 4 + data.length;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// TODO<NEW_LINE>stringData = baos.toByteArray();<NEW_LINE>}
int length = stringData.length();
1,479,448
public static void logAddRoute(Logger log, Route route) {<NEW_LINE>String method = StringKit.padRight(route.getHttpMethod().name(), 6);<NEW_LINE>switch(route.getHttpMethod()) {<NEW_LINE>case ALL:<NEW_LINE>method = Ansi.BgBlack.and(Ansi.White).format(" %s ", method);<NEW_LINE>break;<NEW_LINE>case GET:<NEW_LINE>method = Ansi.BgGreen.and(Ansi.Black).format(" %s ", method);<NEW_LINE>break;<NEW_LINE>case POST:<NEW_LINE>method = Ansi.BgBlue.and(Ansi.Black<MASK><NEW_LINE>break;<NEW_LINE>case DELETE:<NEW_LINE>method = Ansi.BgRed.and(Ansi.Black).format(" %s ", method);<NEW_LINE>break;<NEW_LINE>case PUT:<NEW_LINE>method = Ansi.BgYellow.and(Ansi.Black).format(" %s ", method);<NEW_LINE>break;<NEW_LINE>case OPTIONS:<NEW_LINE>method = Ansi.BgCyan.and(Ansi.Black).format(" %s ", method);<NEW_LINE>break;<NEW_LINE>case BEFORE:<NEW_LINE>method = Ansi.BgMagenta.and(Ansi.Black).format(" %s ", method);<NEW_LINE>break;<NEW_LINE>case AFTER:<NEW_LINE>method = Ansi.BgWhite.and(Ansi.Black).format(" %s ", method);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>String msg = (route.getHttpMethod().equals(HttpMethod.BEFORE) || route.getHttpMethod().equals(HttpMethod.AFTER)) ? " hook" : "route";<NEW_LINE>log.info("{}Add {} {} {}", getStartedSymbol(), msg, method, route.getPath());<NEW_LINE>}
).format(" %s ", method);
889,509
public static GetSipAgentGroupInfoResponse unmarshall(GetSipAgentGroupInfoResponse getSipAgentGroupInfoResponse, UnmarshallerContext context) {<NEW_LINE>getSipAgentGroupInfoResponse.setRequestId(context.stringValue("GetSipAgentGroupInfoResponse.RequestId"));<NEW_LINE>getSipAgentGroupInfoResponse.setSuccess(context.booleanValue("GetSipAgentGroupInfoResponse.Success"));<NEW_LINE>getSipAgentGroupInfoResponse.setCode(context.stringValue("GetSipAgentGroupInfoResponse.Code"));<NEW_LINE>getSipAgentGroupInfoResponse.setMessage(context.stringValue("GetSipAgentGroupInfoResponse.Message"));<NEW_LINE>getSipAgentGroupInfoResponse.setHttpStatusCode(context.integerValue("GetSipAgentGroupInfoResponse.HttpStatusCode"));<NEW_LINE>getSipAgentGroupInfoResponse.setProvider(context.stringValue("GetSipAgentGroupInfoResponse.Provider"));<NEW_LINE>List<SipAgent> sipAgents = new ArrayList<SipAgent>();<NEW_LINE>for (int i = 0; i < context.lengthValue("GetSipAgentGroupInfoResponse.SipAgents.Length"); i++) {<NEW_LINE>SipAgent sipAgent = new SipAgent();<NEW_LINE>sipAgent.setId(context.longValue<MASK><NEW_LINE>sipAgent.setName(context.stringValue("GetSipAgentGroupInfoResponse.SipAgents[" + i + "].Name"));<NEW_LINE>sipAgent.setIp(context.stringValue("GetSipAgentGroupInfoResponse.SipAgents[" + i + "].Ip"));<NEW_LINE>sipAgent.setPort(context.stringValue("GetSipAgentGroupInfoResponse.SipAgents[" + i + "].Port"));<NEW_LINE>sipAgent.setSendInterface(context.integerValue("GetSipAgentGroupInfoResponse.SipAgents[" + i + "].SendInterface"));<NEW_LINE>sipAgent.setStatus(context.booleanValue("GetSipAgentGroupInfoResponse.SipAgents[" + i + "].Status"));<NEW_LINE>sipAgents.add(sipAgent);<NEW_LINE>}<NEW_LINE>getSipAgentGroupInfoResponse.setSipAgents(sipAgents);<NEW_LINE>return getSipAgentGroupInfoResponse;<NEW_LINE>}
("GetSipAgentGroupInfoResponse.SipAgents[" + i + "].Id"));
202,042
public static void processAllEntryProbeExtensions(Event event, RequestContext requestContext) {<NEW_LINE>if (event == requestContext.getRootEvent()) {<NEW_LINE>// Add the request to Active Request list<NEW_LINE>requestContext.setRequestContextIndex(activeRequests.add(requestContext));<NEW_LINE>}<NEW_LINE>List<ProbeExtension> probeExtnList = RequestProbeService.getProbeExtensions();<NEW_LINE>for (int i = 0; i < probeExtnList.size(); i++) {<NEW_LINE>ProbeExtension probeExtension = probeExtnList.get(i);<NEW_LINE>try {<NEW_LINE>// Entry enabled??<NEW_LINE>if (probeExtension.invokeForEventEntry()) {<NEW_LINE>// To be sampled ??<NEW_LINE>if (requestContext.getRequestId().getSequenceNumber() % probeExtension.getRequestSampleRate() == 0) {<NEW_LINE>if (event == requestContext.getRootEvent() && probeExtension.invokeForRootEventsOnly() == true && (probeExtension.invokeForEventTypes() == null || probeExtension.invokeForEventTypes().contains(event.getType()))) {<NEW_LINE>probeExtension.processEntryEvent(event, requestContext);<NEW_LINE>}<NEW_LINE>if (probeExtension.invokeForRootEventsOnly() == false && (probeExtension.invokeForEventTypes() == null || probeExtension.invokeForEventTypes().contains(event.getType()))) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "----------------Probe extension invocation failure---------------");<NEW_LINE>Tr.debug(tc, probeExtension.getClass().getName() + ".processEntryEvent failed because of the following reason:");<NEW_LINE>Tr.debug(tc, e.getMessage());<NEW_LINE>}<NEW_LINE>FFDCFilter.processException(e, RequestProbeService.class.getName() + ".processAllEntryProbeExtensions", "148");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
probeExtension.processEntryEvent(event, requestContext);
191,840
public static String injectAfterAnnotation(Message extend, Message by, String extendProto, String byContent) {<NEW_LINE>// Insert after annotated message<NEW_LINE>Pattern messageRegexp = Pattern.compile("[\\n\\r]?([ \\t]*)(message\\s+" + extend.getName() + "\\s+\\{)", Pattern.MULTILINE);<NEW_LINE>int messageIndex = -1, openBracketIndex = -1;<NEW_LINE>Matcher <MASK><NEW_LINE>if (matcher.find()) {<NEW_LINE>// Calculate indentation of option<NEW_LINE>int is = matcher.start(1), ie = matcher.end(1);<NEW_LINE>String indentation = generateIndentation(extendProto.substring(is, ie), 4);<NEW_LINE>// Make a replace<NEW_LINE>messageIndex = matcher.start(2);<NEW_LINE>openBracketIndex = matcher.end(2);<NEW_LINE>extendProto = extendProto.substring(0, openBracketIndex) + LINE_SEPARATOR + indentation + "// " + generateTimestamp(extend, by) + LINE_SEPARATOR + insertIndentation(byContent, indentation) + LINE_SEPARATOR + extendProto.substring(openBracketIndex);<NEW_LINE>}<NEW_LINE>// Remove annotation<NEW_LINE>Pattern annotationRegexp = Pattern.compile("[\\n\\r]?([ \\t]*@Extend\\s*\\([^)]+" + by.getName() + "[^)]*\\))");<NEW_LINE>String annotationSpace = extendProto.substring(0, messageIndex);<NEW_LINE>matcher = annotationRegexp.matcher(annotationSpace);<NEW_LINE>int astart = -1, aend = 0;<NEW_LINE>while (matcher.find(aend)) {<NEW_LINE>astart = matcher.start(1);<NEW_LINE>aend = matcher.end(1);<NEW_LINE>}<NEW_LINE>if (astart > -1)<NEW_LINE>extendProto = extendProto.substring(0, astart) + "// " + extendProto.substring(astart);<NEW_LINE>return extendProto;<NEW_LINE>}
matcher = messageRegexp.matcher(extendProto);
187,699
public void init(SortedKeyValueIterator<Key, Value> source, Map<String, String> options, IteratorEnvironment env) throws IOException {<NEW_LINE>super.init(source, options, env);<NEW_LINE>combineAllColumns = false;<NEW_LINE>if (options.containsKey(ALL_OPTION)) {<NEW_LINE>combineAllColumns = Boolean.parseBoolean<MASK><NEW_LINE>}<NEW_LINE>if (!combineAllColumns) {<NEW_LINE>if (!options.containsKey(COLUMNS_OPTION))<NEW_LINE>throw new IllegalArgumentException("Must specify " + COLUMNS_OPTION + " option");<NEW_LINE>String encodedColumns = options.get(COLUMNS_OPTION);<NEW_LINE>if (encodedColumns.isEmpty())<NEW_LINE>throw new IllegalArgumentException("The " + COLUMNS_OPTION + " must not be empty");<NEW_LINE>combiners = new ColumnSet(Lists.newArrayList(Splitter.on(",").split(encodedColumns)));<NEW_LINE>}<NEW_LINE>isMajorCompaction = env.getIteratorScope() == IteratorScope.majc;<NEW_LINE>String rofco = options.get(REDUCE_ON_FULL_COMPACTION_ONLY_OPTION);<NEW_LINE>if (rofco != null) {<NEW_LINE>reduceOnFullCompactionOnly = Boolean.parseBoolean(rofco);<NEW_LINE>} else {<NEW_LINE>reduceOnFullCompactionOnly = false;<NEW_LINE>}<NEW_LINE>if (reduceOnFullCompactionOnly && isMajorCompaction && !env.isFullMajorCompaction()) {<NEW_LINE>// adjust configuration so that no columns are combined for a partial major compaction<NEW_LINE>combineAllColumns = false;<NEW_LINE>combiners = new ColumnSet();<NEW_LINE>}<NEW_LINE>}
(options.get(ALL_OPTION));
1,249,857
final PutMetricDataResult executePutMetricData(PutMetricDataRequest putMetricDataRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putMetricDataRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutMetricDataRequest> request = null;<NEW_LINE>Response<PutMetricDataResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutMetricDataRequestMarshaller().marshall<MASK><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, "CloudWatch");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutMetricData");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<PutMetricDataResult> responseHandler = new StaxResponseHandler<PutMetricDataResult>(new PutMetricDataResultStaxUnmarshaller());<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>}
(super.beforeMarshalling(putMetricDataRequest));