idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,093,569
public final static int copyDir(File originalDir, File copyDir, FileFilter filter, TaskMonitor monitor) throws IOException, CancelledException {<NEW_LINE>if (monitor == null) {<NEW_LINE>monitor = TaskMonitor.DUMMY;<NEW_LINE>}<NEW_LINE>if (!originalDir.exists()) {<NEW_LINE>// nothing to do<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>File[] originalDirFiles = originalDir.listFiles(filter);<NEW_LINE>if (originalDirFiles == null || originalDirFiles.length == 0) {<NEW_LINE>// nothing to do<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int copiedFilesCount = 0;<NEW_LINE><MASK><NEW_LINE>for (File file : originalDirFiles) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>monitor.setMessage("Copying " + file.getAbsolutePath());<NEW_LINE>File destinationFile = new File(copyDir, file.getName());<NEW_LINE>if (file.isDirectory()) {<NEW_LINE>copiedFilesCount += doCopyDir(file, destinationFile, filter, monitor);<NEW_LINE>} else {<NEW_LINE>destinationFile.getParentFile().mkdirs();<NEW_LINE>// use a dummy monitor as not to ruin the progress<NEW_LINE>copyFile(file, destinationFile, false, TaskMonitor.DUMMY);<NEW_LINE>copiedFilesCount++;<NEW_LINE>}<NEW_LINE>monitor.incrementProgress(1);<NEW_LINE>}<NEW_LINE>return copiedFilesCount;<NEW_LINE>}
monitor.initialize(originalDirFiles.length);
1,705,619
public void establishEquilibrium() {<NEW_LINE>final int count = getNeuronCount();<NEW_LINE>if (this.on == null) {<NEW_LINE>this.on = new int[count];<NEW_LINE>this.off = new int[count];<NEW_LINE>}<NEW_LINE>for (int i = 0; i < count; i++) {<NEW_LINE><MASK><NEW_LINE>this.off[i] = 0;<NEW_LINE>}<NEW_LINE>for (int n = 0; n < this.runCycles * count; n++) {<NEW_LINE>run((int) RangeRandomizer.randomize(0, count - 1));<NEW_LINE>}<NEW_LINE>for (int n = 0; n < this.annealCycles * count; n++) {<NEW_LINE>final int i = (int) RangeRandomizer.randomize(0, count - 1);<NEW_LINE>run(i);<NEW_LINE>if (getCurrentState().getBoolean(i)) {<NEW_LINE>this.on[i]++;<NEW_LINE>} else {<NEW_LINE>this.off[i]++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < count; i++) {<NEW_LINE>getCurrentState().setData(i, this.on[i] > this.off[i]);<NEW_LINE>}<NEW_LINE>}
this.on[i] = 0;
758,093
final GetCampaignActivitiesResult executeGetCampaignActivities(GetCampaignActivitiesRequest getCampaignActivitiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCampaignActivitiesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetCampaignActivitiesRequest> request = null;<NEW_LINE>Response<GetCampaignActivitiesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetCampaignActivitiesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getCampaignActivitiesRequest));<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, "Pinpoint");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCampaignActivities");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetCampaignActivitiesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetCampaignActivitiesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,054,726
private static void addCtor(ClassWriter cw, String stubClassName, Set<String> classConstantFieldNames, Class<?> remoteInterface, boolean isAbstractInterface) {<NEW_LINE>MethodVisitor mv;<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, INDENT + "adding method : <init> ()V");<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// public <Class Name>_Stub()<NEW_LINE>// {<NEW_LINE>// }<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);<NEW_LINE>mv.visitCode();<NEW_LINE>mv.visitVarInsn(ALOAD, 0);<NEW_LINE>if (isAbstractInterface) {<NEW_LINE>mv.visitMethodInsn(INVOKESPECIAL, "javax/rmi/CORBA/Stub", "<init>", "()V");<NEW_LINE>} else {<NEW_LINE>// Non-abstract interfaces extend SerializableStub. // PM46698<NEW_LINE>// RTC111522<NEW_LINE>JITUtils.loadClassConstant(mv, stubClassName, classConstantFieldNames, remoteInterface);<NEW_LINE>mv.visitMethodInsn(INVOKESPECIAL, "com/ibm/ejs/container/SerializableStub", "<init>", "(Ljava/lang/Class;)V");<NEW_LINE>}<NEW_LINE>mv.visitInsn(RETURN);<NEW_LINE><MASK><NEW_LINE>mv.visitEnd();<NEW_LINE>}
mv.visitMaxs(3, 1);
529,054
private void writeMethodDeclaration(IndentingWriter writer, GroovyMethodDeclaration methodDeclaration) {<NEW_LINE>writeAnnotations(writer, methodDeclaration);<NEW_LINE>writeModifiers(writer, METHOD_MODIFIERS, methodDeclaration.getModifiers());<NEW_LINE>writer.print(getUnqualifiedName(methodDeclaration.getReturnType()) + " " + methodDeclaration.getName() + "(");<NEW_LINE>List<Parameter> parameters = methodDeclaration.getParameters();<NEW_LINE>if (!parameters.isEmpty()) {<NEW_LINE>writer.print(parameters.stream().map((parameter) -> getUnqualifiedName(parameter.getType()) + " " + parameter.getName()).collect(Collectors.joining(", ")));<NEW_LINE>}<NEW_LINE>writer.println(") {");<NEW_LINE>writer.indented(() -> {<NEW_LINE>List<GroovyStatement<MASK><NEW_LINE>for (GroovyStatement statement : statements) {<NEW_LINE>if (statement instanceof GroovyExpressionStatement) {<NEW_LINE>writeExpression(writer, ((GroovyExpressionStatement) statement).getExpression());<NEW_LINE>} else if (statement instanceof GroovyReturnStatement) {<NEW_LINE>writeExpression(writer, ((GroovyReturnStatement) statement).getExpression());<NEW_LINE>}<NEW_LINE>writer.println();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>writer.println("}");<NEW_LINE>writer.println();<NEW_LINE>}
> statements = methodDeclaration.getStatements();
1,227,063
public static GetCopyrightPersonListResponse unmarshall(GetCopyrightPersonListResponse getCopyrightPersonListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getCopyrightPersonListResponse.setRequestId(_ctx.stringValue("GetCopyrightPersonListResponse.RequestId"));<NEW_LINE>getCopyrightPersonListResponse.setPageNum(_ctx.integerValue("GetCopyrightPersonListResponse.PageNum"));<NEW_LINE>getCopyrightPersonListResponse.setPageSize(_ctx.integerValue("GetCopyrightPersonListResponse.PageSize"));<NEW_LINE>getCopyrightPersonListResponse.setSuccess(_ctx.booleanValue("GetCopyrightPersonListResponse.Success"));<NEW_LINE>getCopyrightPersonListResponse.setTotalItemNum(_ctx.integerValue("GetCopyrightPersonListResponse.TotalItemNum"));<NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetCopyrightPersonListResponse.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setLegalPersonType(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].LegalPersonType"));<NEW_LINE>dataItem.setRoleType(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].RoleType"));<NEW_LINE>dataItem.setCity(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].City"));<NEW_LINE>dataItem.setUseType(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].UseType"));<NEW_LINE>dataItem.setPhone(_ctx.stringValue<MASK><NEW_LINE>dataItem.setCounty(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].County"));<NEW_LINE>dataItem.setUserPk(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].UserPk"));<NEW_LINE>dataItem.setCardType(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].CardType"));<NEW_LINE>dataItem.setEmail(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Email"));<NEW_LINE>dataItem.setExpiredDate(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].ExpiredDate"));<NEW_LINE>dataItem.setCardNum(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].CardNum"));<NEW_LINE>dataItem.setAddress(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Address"));<NEW_LINE>dataItem.setOwnerType(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].OwnerType"));<NEW_LINE>dataItem.setName(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Name"));<NEW_LINE>dataItem.setPersonId(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].PersonId"));<NEW_LINE>dataItem.setAuditStatus(_ctx.integerValue("GetCopyrightPersonListResponse.Data[" + i + "].AuditStatus"));<NEW_LINE>dataItem.setProvince(_ctx.stringValue("GetCopyrightPersonListResponse.Data[" + i + "].Province"));<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>getCopyrightPersonListResponse.setData(data);<NEW_LINE>return getCopyrightPersonListResponse;<NEW_LINE>}
("GetCopyrightPersonListResponse.Data[" + i + "].Phone"));
969,139
protected void purgePendingMessages() {<NEW_LINE>final long now = System.nanoTime();<NEW_LINE>final long timeout = OGlobalConfiguration.DISTRIBUTED_ASYNCH_RESPONSES_TIMEOUT.getValueAsLong();<NEW_LINE>for (Iterator<Entry<Long, ODistributedResponseManager>> it = responsesByRequestIds.entrySet().iterator(); it.hasNext(); ) {<NEW_LINE>final Entry<Long, ODistributedResponseManager> item = it.next();<NEW_LINE>final ODistributedResponseManager resp = item.getValue();<NEW_LINE>final long timeElapsed = (now - resp.getSentOn()) / 1000000;<NEW_LINE>if (timeElapsed > timeout) {<NEW_LINE>// EXPIRED REQUEST, FREE IT!<NEW_LINE>final List<String<MASK><NEW_LINE>ODistributedServerLog.warn(this, manager.getLocalNodeName(), missingNodes.toString(), DIRECTION.IN, "%d missed response(s) for message %d by nodes %s after %dms when timeout is %dms", missingNodes.size(), resp.getMessageId(), missingNodes, timeElapsed, timeout);<NEW_LINE>Orient.instance().getProfiler().updateCounter("distributed.db." + resp.getDatabaseName() + ".timeouts", "Number of messages in timeouts", +1, "distributed.db.*.timeouts");<NEW_LINE>Orient.instance().getProfiler().updateCounter("distributed.node.timeouts", "Number of messages in timeouts", +1, "distributed.node.timeouts");<NEW_LINE>resp.timeout();<NEW_LINE>it.remove();<NEW_LINE>} else if (resp.isFinished()) {<NEW_LINE>it.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> missingNodes = resp.getMissingNodes();
1,805,255
public void endElement(String namespaceURI, String localName, String qName) {<NEW_LINE>log.fine("EndElement:" + qName);<NEW_LINE>int tagID = getTagID(qName);<NEW_LINE>switch(tagID) {<NEW_LINE>case TAG_ID_PROCESSVAR:<NEW_LINE>log.fine("PV:" + currPv.toString());<NEW_LINE>firePvChanged(new PvChangeEvent(this, currPv.getKeyValue(), currPv, PvChangeEvent.PV_CONFIRMED));<NEW_LINE>currValue = currPv;<NEW_LINE>// If we have PV's on stack, the new PV is a recursive attribute<NEW_LINE>if (!pvStack.empty()) {<NEW_LINE>Object[] stackElems = pvStack.pop();<NEW_LINE>currPv = (ProcessVar) stackElems[0];<NEW_LINE>currAttrib = stackElems[1];<NEW_LINE>} else {<NEW_LINE>log.severe("NO more PV's on Stack");<NEW_LINE>}<NEW_LINE>if (currPv == rootPv) {<NEW_LINE>currAttrib = ((ProcessVar) currValue).getKeyValue();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>case TAG_ID_PVATTRIBUTE:<NEW_LINE>// if currently parsed PV is null, then we just finished a recursive one<NEW_LINE>if (currPv != null) {<NEW_LINE>// This is a plain attribute<NEW_LINE>currPv.put(currAttrib, currValue);<NEW_LINE>}<NEW_LINE>currValue = null;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
currPv.put(currAttrib, currValue);
1,131,638
// This method is copied from the superclass but its parts are swapped<NEW_LINE>@Override<NEW_LINE>public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {<NEW_LINE>for (ComponentConnector child : event.getOldChildren()) {<NEW_LINE>if (child.getParent() == this) {<NEW_LINE>// Skip current children<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>getWidget().remove(child.getWidget());<NEW_LINE>VCaption vCaption = childIdToCaption.get(child.getConnectorId());<NEW_LINE>if (vCaption != null) {<NEW_LINE>childIdToCaption.remove(child.getConnectorId());<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>int index = 0;<NEW_LINE>for (ComponentConnector child : getChildComponents()) {<NEW_LINE>VCaption childCaption = childIdToCaption.get(child.getConnectorId());<NEW_LINE>if (childCaption != null) {<NEW_LINE>getWidget().addOrMove(childCaption, index++);<NEW_LINE>}<NEW_LINE>getWidget().addOrMove(child.getWidget(), index++);<NEW_LINE>}<NEW_LINE>}
getWidget().remove(vCaption);
1,552,616
final DescribeLoggingConfigurationResult executeDescribeLoggingConfiguration(DescribeLoggingConfigurationRequest describeLoggingConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeLoggingConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DescribeLoggingConfigurationRequest> request = null;<NEW_LINE>Response<DescribeLoggingConfigurationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeLoggingConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeLoggingConfigurationRequest));<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, "Network Firewall");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLoggingConfiguration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeLoggingConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeLoggingConfigurationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,033,818
private Object fetchFromIndex(ODatabase graph, OIdentifiable iFrom, Iterable<OIdentifiable> iTo, String[] iEdgeTypes) {<NEW_LINE>String edgeClassName = null;<NEW_LINE>if (iEdgeTypes == null) {<NEW_LINE>edgeClassName = "E";<NEW_LINE>} else if (iEdgeTypes.length == 1) {<NEW_LINE>edgeClassName = iEdgeTypes[0];<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>OClass edgeClass = graph.getMetadata().getSchema().getClass(edgeClassName);<NEW_LINE>if (edgeClass == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Set<OIndex> indexes = <MASK><NEW_LINE>if (indexes == null || indexes.size() == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>OIndex index = indexes.iterator().next();<NEW_LINE>OMultiCollectionIterator<OVertex> result = new OMultiCollectionIterator<OVertex>();<NEW_LINE>for (OIdentifiable to : iTo) {<NEW_LINE>final OCompositeKey key = new OCompositeKey(iFrom, to);<NEW_LINE>try (Stream<ORID> stream = index.getInternal().getRids(key)) {<NEW_LINE>result.add(stream.map((rid) -> ((ODocument) rid.getRecord()).rawField("in")).collect(Collectors.toSet()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
edgeClass.getInvolvedIndexes("out", "in");
1,361,678
protected void processSimpleContent(SchemaRep.SimpleContent el) throws Schema2BeansException {<NEW_LINE>processContainsSubElements(el);<NEW_LINE>// System.out.println("lastDefinedType="+lastDefinedType);<NEW_LINE>if (lastDefinedType == null)<NEW_LINE>return;<NEW_LINE>SchemaRep.ElementExpr schemaTypeDef = schema.getSchemaTypeDefResolvedNamespace(lastDefinedType);<NEW_LINE>if (schemaTypeDef == null)<NEW_LINE>return;<NEW_LINE>// System.out.println("processSimpleContent: schemaTypeDef="+schemaTypeDef);<NEW_LINE>String javaType = null;<NEW_LINE>if (schemaTypeDef instanceof SchemaRep.HasJavaTypeName) {<NEW_LINE>javaType = ((SchemaRep.<MASK><NEW_LINE>}<NEW_LINE>addExtraDataForType((String) parentUniqueNames.peek(), (String) parentTypes.peek(), schemaTypeDef);<NEW_LINE>if (javaType != null) {<NEW_LINE>handler.javaType((String) parentUniqueNames.peek(), (String) parentTypes.peek(), javaType);<NEW_LINE>}<NEW_LINE>}
HasJavaTypeName) schemaTypeDef).getJavaTypeName();
999,216
private boolean pruneProductConfig() {<NEW_LINE>log.fine("In pruneProductConfig");<NEW_LINE>boolean retVal = false;<NEW_LINE>DefaultMutableTreeNode rootProductConfig = this.m_RadioButtonTreeCellRenderer.root;<NEW_LINE>Enumeration children = rootProductConfig.breadthFirstEnumeration();<NEW_LINE>log.fine("About to prune");<NEW_LINE>if (children != null) {<NEW_LINE>while (children.hasMoreElements()) {<NEW_LINE>DefaultMutableTreeNode child = (DefaultMutableTreeNode) children.nextElement();<NEW_LINE><MASK><NEW_LINE>log.fine("level: " + child.getLevel());<NEW_LINE>nodeUserObject m_nodeUserObject = (nodeUserObject) child.getUserObject();<NEW_LINE>log.fine("isMandatory: " + m_nodeUserObject.isMandatory);<NEW_LINE>log.fine("isChosen: " + m_nodeUserObject.isChosen);<NEW_LINE>if (!(child.isRoot() || m_nodeUserObject.isChosen || m_nodeUserObject.isMandatory)) {<NEW_LINE>log.fine("Removing: " + child);<NEW_LINE>child.removeFromParent();<NEW_LINE>retVal = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>log.fine("Exiting pruneConfig");<NEW_LINE>return retVal;<NEW_LINE>}
log.fine("Analyzing: " + child);
944,404
void showAlertHelp() {<NEW_LINE>logDebug("showAlertHelp");<NEW_LINE><MASK><NEW_LINE>LayoutInflater inflater = getLayoutInflater();<NEW_LINE>View v = inflater.inflate(R.layout.dialog_2fa_help, null);<NEW_LINE>builder.setView(v);<NEW_LINE>Button cancelButton = (Button) v.findViewById(R.id.cancel_button_help);<NEW_LINE>cancelButton.setOnClickListener(this);<NEW_LINE>Button playStoreButton = (Button) v.findViewById(R.id.play_store_button_help);<NEW_LINE>playStoreButton.setOnClickListener(this);<NEW_LINE>helpDialog = builder.create();<NEW_LINE>helpDialog.setCanceledOnTouchOutside(false);<NEW_LINE>helpDialog.setOnDismissListener(dialog -> isHelpDialogShown = false);<NEW_LINE>try {<NEW_LINE>helpDialog.show();<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>isHelpDialogShown = true;<NEW_LINE>}
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);
526,123
public void cancelExportTask(CancelExportTaskRequest cancelExportTaskRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(cancelExportTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CancelExportTaskRequest> request = null;<NEW_LINE>Response<Void> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CancelExportTaskRequestMarshaller().marshall(cancelExportTaskRequest);<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>JsonResponseHandler<Void> responseHandler = new JsonResponseHandler<Void>(null);<NEW_LINE>invoke(request, responseHandler, executionContext);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
1,178,817
final EnableVgwRoutePropagationResult executeEnableVgwRoutePropagation(EnableVgwRoutePropagationRequest enableVgwRoutePropagationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(enableVgwRoutePropagationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<EnableVgwRoutePropagationRequest> request = null;<NEW_LINE>Response<EnableVgwRoutePropagationResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new EnableVgwRoutePropagationRequestMarshaller().marshall(super.beforeMarshalling(enableVgwRoutePropagationRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "EnableVgwRoutePropagation");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<EnableVgwRoutePropagationResult> responseHandler = new StaxResponseHandler<EnableVgwRoutePropagationResult>(new EnableVgwRoutePropagationResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,554,643
public void serialize(ExtensibleTreeMap<?, ?> value, JsonGenerator gen, SerializerProvider serializers) throws IOException {<NEW_LINE>if (value instanceof Reference) {<NEW_LINE>Reference<?> reference = (Reference<?>) value;<NEW_LINE><MASK><NEW_LINE>if (ref != null) {<NEW_LINE>gen.writeStartObject(value);<NEW_LINE>gen.writeFieldName("$ref");<NEW_LINE>gen.writeString(ref);<NEW_LINE>gen.writeEndObject();<NEW_LINE>// if this is a ref no extensions or map entries are relevant<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>gen.writeStartObject(value);<NEW_LINE>ParameterizedType mapType = (ParameterizedType) value.getClass().getGenericSuperclass();<NEW_LINE>Class<?> valueType = (Class<?>) mapType.getActualTypeArguments()[0];<NEW_LINE>JsonSerializer<Object> valueSerializer = serializers.findValueSerializer(valueType);<NEW_LINE>for (Map.Entry<String, ?> entry : value.entrySet()) {<NEW_LINE>gen.writeFieldName(entry.getKey());<NEW_LINE>valueSerializer.serialize(entry.getValue(), gen, serializers);<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, Object> extension : value.getExtensions().entrySet()) {<NEW_LINE>gen.writeFieldName(extension.getKey());<NEW_LINE>Object extensionValue = extension.getValue();<NEW_LINE>serializers.findValueSerializer(extensionValue.getClass()).serialize(extensionValue, gen, serializers);<NEW_LINE>}<NEW_LINE>gen.writeEndObject();<NEW_LINE>}
String ref = reference.getRef();
257,881
public void mapPartition(Iterable<Tuple2<Integer, Row>> values, Collector<Tuple2<Integer, String>> out) {<NEW_LINE>LOG.info("start the random forests training");<NEW_LINE>int parallel <MASK><NEW_LINE>int superStep = getIterationRuntimeContext().getSuperstepNumber();<NEW_LINE>int taskId = getRuntimeContext().getIndexOfThisSubtask();<NEW_LINE>final Params localParams = params.clone();<NEW_LINE>if (trees == null) {<NEW_LINE>trees = new ArrayList<>();<NEW_LINE>}<NEW_LINE>// create dense data.<NEW_LINE>if (this.data == null) {<NEW_LINE>data = new DenseData(cnt, TreeUtil.getFeatureMeta(localParams.get(RandomForestTrainParams.FEATURE_COLS), categoricalColsSize), TreeUtil.getLabelMeta(localParams.get(RandomForestTrainParams.LABEL_COL), localParams.get(RandomForestTrainParams.FEATURE_COLS).length, categoricalColsSize));<NEW_LINE>}<NEW_LINE>IterableWrapper wrapper = new IterableWrapper(values);<NEW_LINE>// read instance to data.<NEW_LINE>data.readFromInstances(wrapper);<NEW_LINE>// Non-empty partition.<NEW_LINE>if (wrapper.getTreeId() >= 0) {<NEW_LINE>LOG.info("start the random forests training {}", wrapper.getTreeId());<NEW_LINE>// rewrite gain for this tree.<NEW_LINE>localParams.set(Criteria.Gain.GAIN, getGainFromParams(localParams, wrapper.getTreeId()));<NEW_LINE>// rewrite seed.<NEW_LINE>localParams.set(HasSeed.SEED, localParams.get(HasSeed.SEED) + superStep * (taskId + 1));<NEW_LINE>// fit the decision tree.<NEW_LINE>Node root = new DecisionTree(data, localParams, executorService).fit();<NEW_LINE>trees.add(Tuple2.of(wrapper.getTreeId(), root));<NEW_LINE>LOG.info("end the random forests training {}", wrapper.getTreeId());<NEW_LINE>}<NEW_LINE>if (superStep * parallel >= localParams.get(RandomForestTrainParams.NUM_TREES)) {<NEW_LINE>for (Tuple2<Integer, Node> tree : trees) {<NEW_LINE>// serialize the tree.<NEW_LINE>for (String serialized : TreeModelDataConverter.serializeTree(tree.f1)) {<NEW_LINE>out.collect(Tuple2.of(tree.f0, serialized));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>out.collect(Tuple2.of(-1, ""));<NEW_LINE>}<NEW_LINE>LOG.info("end the random forests training");<NEW_LINE>}
= getRuntimeContext().getNumberOfParallelSubtasks();
805,319
private static Parser_return parse(String sql, int bracket_cnt) {<NEW_LINE>int index = 0;<NEW_LINE>boolean in_quote = false;<NEW_LINE>do {<NEW_LINE>if (sql.charAt(index) == '\'') {<NEW_LINE>in_quote = !in_quote;<NEW_LINE>} else if (sql.charAt(index) == '{' && !in_quote) {<NEW_LINE>if (index + 1 == sql.length()) {<NEW_LINE>// What ever string we get should have had limit nnn<NEW_LINE>// added to the end and this test is veru unlikely<NEW_LINE>throw new RuntimeException("Invalid java escape syntax - badly matched '{'");<NEW_LINE>}<NEW_LINE>Parser_return pR = parse(sql.substring(index + 1), ++bracket_cnt);<NEW_LINE>bracket_cnt = pR.bracket_cnt;<NEW_LINE>String sql_snippet = pR.sql_value;<NEW_LINE>sql = sql.substring(0, index) + " " + sql_snippet;<NEW_LINE>index += pR.end_idx;<NEW_LINE>} else if (sql.charAt(index) == '}' && !in_quote) {<NEW_LINE>Pair ptr = new Pair(0);<NEW_LINE>ptr.end = index;<NEW_LINE>Parser_return pR = new Parser_return();<NEW_LINE>pR.sql_value = process_sql(sql, ptr);<NEW_LINE>pR.bracket_cnt = --bracket_cnt;<NEW_LINE>pR<MASK><NEW_LINE>return pR;<NEW_LINE>}<NEW_LINE>index++;<NEW_LINE>} while (index < sql.length());<NEW_LINE>if (in_quote) {<NEW_LINE>throw new RuntimeException("Invalid java escape syntax - badly matched '''");<NEW_LINE>}<NEW_LINE>Parser_return pR = new Parser_return();<NEW_LINE>pR.sql_value = sql;<NEW_LINE>pR.bracket_cnt = bracket_cnt;<NEW_LINE>pR.end_idx = sql.length();<NEW_LINE>return pR;<NEW_LINE>}
.end_idx = ptr.end + 1;
120,043
final InviteAccountToOrganizationResult executeInviteAccountToOrganization(InviteAccountToOrganizationRequest inviteAccountToOrganizationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(inviteAccountToOrganizationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<InviteAccountToOrganizationRequest> request = null;<NEW_LINE>Response<InviteAccountToOrganizationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new InviteAccountToOrganizationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(inviteAccountToOrganizationRequest));<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, "Organizations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "InviteAccountToOrganization");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<InviteAccountToOrganizationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new InviteAccountToOrganizationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,038,625
public void beginBuildModelWithOptions() {<NEW_LINE>// BEGIN: com.azure.ai.formrecognizer.administration.DocumentModelAdministrationClient.beginBuildModel#string-DocumentBuildMode-BuildModelOptions-Context<NEW_LINE>String trainingFilesUrl = "{SAS-URL-of-your-container-in-blob-storage}";<NEW_LINE>String modelId = "custom-model-id";<NEW_LINE>String prefix = "Invoice";<NEW_LINE>Map<String, String> attrs = new HashMap<String, String>();<NEW_LINE>attrs.put("createdBy", "sample");<NEW_LINE>DocumentModel documentModel = documentModelAdministrationClient.beginBuildModel(trainingFilesUrl, DocumentBuildMode.TEMPLATE, new BuildModelOptions().setModelId(modelId).setDescription("model desc").setPrefix(prefix).setTags(attrs), Context.NONE).getFinalResult();<NEW_LINE>System.out.printf("Model ID: %s%n", documentModel.getModelId());<NEW_LINE>System.out.printf(<MASK><NEW_LINE>System.out.printf("Model Created on: %s%n", documentModel.getCreatedOn());<NEW_LINE>System.out.printf("Model assigned tags: %s%n", documentModel.getTags());<NEW_LINE>documentModel.getDocTypes().forEach((key, docTypeInfo) -> {<NEW_LINE>docTypeInfo.getFieldSchema().forEach((field, documentFieldSchema) -> {<NEW_LINE>System.out.printf("Field: %s", field);<NEW_LINE>System.out.printf("Field type: %s", documentFieldSchema.getType());<NEW_LINE>System.out.printf("Field confidence: %.2f", docTypeInfo.getFieldConfidence().get(field));<NEW_LINE>});<NEW_LINE>});<NEW_LINE>// END: com.azure.ai.formrecognizer.administration.DocumentModelAdministrationClient.beginBuildModel#string-DocumentBuildMode-BuildModelOptions-Context<NEW_LINE>}
"Model Description: %s%n", documentModel.getDescription());
524,509
protected void configureSorterProperties() {<NEW_LINE>// need to hack: if a structureChange is the result of a setModel<NEW_LINE>// the rowsorter is not yet updated<NEW_LINE>if (ignoreAddColumn || (!getControlsSorterProperties()))<NEW_LINE>return;<NEW_LINE>getSortController().setStringValueProvider(getStringValueRegistry());<NEW_LINE>// configure from table properties<NEW_LINE>getSortController().setSortable(sortable);<NEW_LINE>getSortController().setSortsOnUpdates(sortsOnUpdates);<NEW_LINE>getSortController().setSortOrderCycle(getSortOrderCycle());<NEW_LINE>// configure from column properties<NEW_LINE>List<TableColumn> columns = getColumns(true);<NEW_LINE>for (TableColumn tableColumn : columns) {<NEW_LINE>int modelIndex = tableColumn.getModelIndex();<NEW_LINE>getSortController().setSortable(modelIndex, tableColumn instanceof TableColumnExt ? ((TableColumnExt) tableColumn<MASK><NEW_LINE>getSortController().setComparator(modelIndex, tableColumn instanceof TableColumnExt ? ((TableColumnExt) tableColumn).getComparator() : null);<NEW_LINE>}<NEW_LINE>}
).isSortable() : true);
479,127
public void buildInternal(View view) {<NEW_LINE>if (osmPoint instanceof OsmNotesPoint) {<NEW_LINE>OsmNotesPoint notes = (OsmNotesPoint) osmPoint;<NEW_LINE>buildRow(view, R.drawable.ic_action_note_dark, null, notes.getText(), 0, false, null, false, <MASK><NEW_LINE>buildRow(view, R.drawable.ic_group, null, notes.getAuthor(), 0, false, null, false, 0, false, null, false);<NEW_LINE>} else if (osmPoint instanceof OpenstreetmapPoint) {<NEW_LINE>OpenstreetmapPoint point = (OpenstreetmapPoint) osmPoint;<NEW_LINE>for (Map.Entry<String, String> e : point.getEntity().getTags().entrySet()) {<NEW_LINE>if (POI_TYPE_TAG.equals(e.getKey())) {<NEW_LINE>String poiTranslation = e.getValue();<NEW_LINE>Map<String, PoiType> poiTypeMap = app.getPoiTypes().getAllTranslatedNames(false);<NEW_LINE>PoiType poiType = poiTypeMap.get(poiTranslation.toLowerCase());<NEW_LINE>int resId = 0;<NEW_LINE>if (poiType != null) {<NEW_LINE>String id = null;<NEW_LINE>if (RenderingIcons.containsBigIcon(poiType.getIconKeyName())) {<NEW_LINE>id = poiType.getIconKeyName();<NEW_LINE>} else if (RenderingIcons.containsBigIcon(poiType.getOsmTag() + "_" + poiType.getOsmValue())) {<NEW_LINE>id = poiType.getOsmTag() + "_" + poiType.getOsmValue();<NEW_LINE>}<NEW_LINE>if (id != null) {<NEW_LINE>resId = RenderingIcons.getBigIconResourceId(id);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (resId == 0) {<NEW_LINE>resId = R.drawable.ic_action_folder_stroke;<NEW_LINE>}<NEW_LINE>buildRow(view, resId, null, poiTranslation, 0, false, null, false, 0, false, null, false);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, String> e : point.getEntity().getTags().entrySet()) {<NEW_LINE>if (POI_TYPE_TAG.equals(e.getKey()) || e.getKey().startsWith(Entity.REMOVE_TAG_PREFIX)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String text = e.getKey() + "=" + e.getValue();<NEW_LINE>buildRow(view, R.drawable.ic_action_info_dark, null, text, 0, false, null, false, 0, false, null, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
0, false, null, false);
94,272
public void performOperation(Random rnd, Genome[] parents, int parentIndex, Genome[] offspring, int offspringIndex) {<NEW_LINE>IntegerArrayGenome mother = (IntegerArrayGenome) parents[parentIndex];<NEW_LINE>IntegerArrayGenome father = (IntegerArrayGenome) parents[parentIndex + 1];<NEW_LINE>IntegerArrayGenome offspring1 = (IntegerArrayGenome) this.owner.getPopulation()<MASK><NEW_LINE>IntegerArrayGenome offspring2 = (IntegerArrayGenome) this.owner.getPopulation().getGenomeFactory().factor();<NEW_LINE>offspring[offspringIndex] = offspring1;<NEW_LINE>offspring[offspringIndex + 1] = offspring2;<NEW_LINE>final int geneLength = mother.size();<NEW_LINE>// the chromosome must be cut at two positions, determine them<NEW_LINE>final int cutpoint1 = (int) (rnd.nextInt(geneLength - this.cutLength));<NEW_LINE>final int cutpoint2 = cutpoint1 + this.cutLength;<NEW_LINE>// keep track of which genes have been taken in each of the two<NEW_LINE>// offspring, defaults to false.<NEW_LINE>final Set<Integer> taken1 = new HashSet<Integer>();<NEW_LINE>final Set<Integer> taken2 = new HashSet<Integer>();<NEW_LINE>// handle cut section<NEW_LINE>for (int i = 0; i < geneLength; i++) {<NEW_LINE>if (!((i < cutpoint1) || (i > cutpoint2))) {<NEW_LINE>offspring1.copy(father, i, i);<NEW_LINE>offspring2.copy(mother, i, i);<NEW_LINE>taken1.add(father.getData()[i]);<NEW_LINE>taken2.add(mother.getData()[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// handle outer sections<NEW_LINE>for (int i = 0; i < geneLength; i++) {<NEW_LINE>if ((i < cutpoint1) || (i > cutpoint2)) {<NEW_LINE>offspring1.getData()[i] = SpliceNoRepeat.getNotTaken(mother, taken1);<NEW_LINE>offspring2.getData()[i] = SpliceNoRepeat.getNotTaken(father, taken2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getGenomeFactory().factor();
914,195
public SOAPMessage invoke(SOAPMessage request) {<NEW_LINE>SOAPMessage response = null;<NEW_LINE>System.out.println("Just got into server side app");<NEW_LINE>try {<NEW_LINE>String hdrText = request.getSOAPHeader().getTextContent();<NEW_LINE>System.out.println("Incoming SOAP Header:" + hdrText);<NEW_LINE>StringReader respMsg = null;<NEW_LINE>if (com.ibm.ws.wssecurity.fat.samltoken.utils.isSAMLAssertionInHeader(request)) {<NEW_LINE>System.out.println("SAML Assertion found in SOAP Request Header");<NEW_LINE>respMsg = new StringReader("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Body xmlns=\"http://wssec.basic.cxf.fats/types\"><provider>This is WSSECFVT CXF SSL Web Service (using SAML).</provider></soapenv:Body></soapenv:Envelope>");<NEW_LINE>} else {<NEW_LINE>System.out.println("SAML Assertion was NOT found in SOAP Request Header");<NEW_LINE>respMsg = new StringReader("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Body xmlns=\"http://wssec.basic.cxf.fats/types\"><provider>SAML Assertion Missing in SSL Web Service.</provider></soapenv:Body></soapenv:Envelope>");<NEW_LINE>}<NEW_LINE>// SOAPBody sb = request.getSOAPBody();<NEW_LINE>// System.out.println("Incoming SOAPBody: " + sb.getValue() );<NEW_LINE><MASK><NEW_LINE>MessageFactory factory = MessageFactory.newInstance();<NEW_LINE>response = factory.createMessage();<NEW_LINE>response.getSOAPPart().setContent(src);<NEW_LINE>response.saveChanges();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
Source src = new StreamSource(respMsg);
1,733,977
private static List<String> createVirtualHostAliasesToUpdate(boolean add, String[] vhHostAliases, List<String> hostAliasesFromEndpoint) {<NEW_LINE>List<String> vhHostAliasesAsList = null;<NEW_LINE>if (vhHostAliases == null) {<NEW_LINE>if (add) {<NEW_LINE>vhHostAliasesAsList <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>vhHostAliasesAsList = new LinkedList<String>(Arrays.asList(vhHostAliases));<NEW_LINE>}<NEW_LINE>for (String hafe : hostAliasesFromEndpoint) {<NEW_LINE>if (add) {<NEW_LINE>if (!vhHostAliasesAsList.contains(hafe)) {<NEW_LINE>vhHostAliasesAsList.add(hafe);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (vhHostAliasesAsList.contains(hafe)) {<NEW_LINE>vhHostAliasesAsList.remove(hafe);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return vhHostAliasesAsList;<NEW_LINE>}
= new ArrayList<String>();
360,793
public void marshall(Profile profile, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (profile == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(profile.getProfileArn(), PROFILEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getProfileName(), PROFILENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getIsDefault(), ISDEFAULT_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getAddress(), ADDRESS_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getTimezone(), TIMEZONE_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getDistanceUnit(), DISTANCEUNIT_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getTemperatureUnit(), TEMPERATUREUNIT_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getWakeWord(), WAKEWORD_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getLocale(), LOCALE_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getSetupModeDisabled(), SETUPMODEDISABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getMaxVolumeLimit(), MAXVOLUMELIMIT_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getPSTNEnabled(), PSTNENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getDataRetentionOptIn(), DATARETENTIONOPTIN_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getAddressBookArn(), ADDRESSBOOKARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(profile.getMeetingRoomConfiguration(), MEETINGROOMCONFIGURATION_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
1,624,786
public void run(RegressionEnvironment env) {<NEW_LINE>String[] <MASK><NEW_LINE>String epl = "@Name('s0') select irstream theString as c0, sum(intPrimitive) as c1," + "window(*) as c2 from SupportBean.win:length(2)";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.milestone(0);<NEW_LINE>Object e1 = sendSupportBean(env, "E1", 10);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "E1", 10, new Object[] { e1 } });<NEW_LINE>env.milestone(1);<NEW_LINE>Object e2 = sendSupportBean(env, "E2", 100);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "E2", 10 + 100, new Object[] { e1, e2 } });<NEW_LINE>env.milestone(2);<NEW_LINE>Object e3 = sendSupportBean(env, "E3", 11);<NEW_LINE>env.assertPropsIRPair("s0", fields, new Object[] { "E3", 100 + 11, new Object[] { e2, e3 } }, new Object[] { "E1", 100 + 11, new Object[] { e2, e3 } });<NEW_LINE>env.milestone(3);<NEW_LINE>env.milestone(4);<NEW_LINE>Object e4 = sendSupportBean(env, "E4", 9);<NEW_LINE>env.assertPropsIRPair("s0", fields, new Object[] { "E4", 11 + 9, new Object[] { e3, e4 } }, new Object[] { "E2", 11 + 9, new Object[] { e3, e4 } });<NEW_LINE>env.undeployAll();<NEW_LINE>}
fields = "c0,c1,c2".split(",");
1,336,440
private void renderImports() {<NEW_LINE>TypeDeclaration typeDeclaration = type.getDeclaration();<NEW_LINE>// goog.module(...) declaration.<NEW_LINE>sourceBuilder.appendln("goog.module('" + typeDeclaration.getImplModuleName() + "');");<NEW_LINE>sourceBuilder.newLine();<NEW_LINE>// goog.require(...) for eager imports.<NEW_LINE>Map<String, String> aliasesByPath = new HashMap<>();<NEW_LINE>sourceBuilder.emitBlock(imports.stream().filter(i -> i.getImportCategory().needsGoogRequireInImpl()).collect(ImmutableList.toImmutableList()), eagerImport -> {<NEW_LINE>String alias = eagerImport.getAlias();<NEW_LINE>String path = eagerImport.getImplModulePath();<NEW_LINE>String previousAlias = aliasesByPath.get(path);<NEW_LINE>if (previousAlias == null) {<NEW_LINE>sourceBuilder.appendln("const " + alias + " = goog.require('" + path + "');");<NEW_LINE>aliasesByPath.put(path, alias);<NEW_LINE>} else {<NEW_LINE>// Do not goog.require second time to avoid JsCompiler warnings.<NEW_LINE>sourceBuilder.appendln("const " + <MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>// goog.forwardDeclare(...) for lazy imports.<NEW_LINE>sourceBuilder.emitBlock(imports.stream().filter(i -> i.getImportCategory().needsGoogForwardDeclare()).collect(ImmutableList.toImmutableList()), lazyImport -> {<NEW_LINE>String alias = lazyImport.getAlias();<NEW_LINE>String path = lazyImport.getImplModulePath();<NEW_LINE>sourceBuilder.appendln("let " + alias + " = goog.forwardDeclare('" + path + "');");<NEW_LINE>});<NEW_LINE>}
alias + " = " + previousAlias + ";");
268,232
CertificateValidatorBuilder parse(String keyUsage) {<NEW_LINE>if (keyUsage == null || keyUsage.trim().length() == 0)<NEW_LINE>return _parent;<NEW_LINE>String[] strs = keyUsage.split("[,]");<NEW_LINE>for (String s : strs) {<NEW_LINE>try {<NEW_LINE>KeyUsageBits bit = KeyUsageBits.parse(s.trim());<NEW_LINE>switch(bit) {<NEW_LINE>case CRLSIGN:<NEW_LINE>enablecRLSignBit();<NEW_LINE>break;<NEW_LINE>case DATA_ENCIPHERMENT:<NEW_LINE>enableDataEncriphermentBit();<NEW_LINE>break;<NEW_LINE>case DECIPHER_ONLY:<NEW_LINE>enableDecipherOnlyBit();<NEW_LINE>break;<NEW_LINE>case DIGITAL_SIGNATURE:<NEW_LINE>enableDigitalSignatureBit();<NEW_LINE>break;<NEW_LINE>case ENCIPHERMENT_ONLY:<NEW_LINE>enableEnciphermentOnlyBit();<NEW_LINE>break;<NEW_LINE>case KEY_AGREEMENT:<NEW_LINE>enableKeyAgreementBit();<NEW_LINE>break;<NEW_LINE>case KEY_ENCIPHERMENT:<NEW_LINE>enableKeyEnciphermentBit();<NEW_LINE>break;<NEW_LINE>case KEYCERTSIGN:<NEW_LINE>enableKeyCertSign();<NEW_LINE>break;<NEW_LINE>case NON_REPUDIATION:<NEW_LINE>enableNonRepudiationBit();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE><MASK><NEW_LINE>} catch (IndexOutOfBoundsException e) {<NEW_LINE>logger.warnf("Invalid key usage bit: \"%s\"", s);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return _parent;<NEW_LINE>}
logger.warnf("Unable to parse key usage bit: \"%s\"", s);
263,758
public ListIdentitiesResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>ListIdentitiesResult listIdentitiesResult = new ListIdentitiesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 2;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.nextEvent();<NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return listIdentitiesResult;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("Identities", targetDepth)) {<NEW_LINE>listIdentitiesResult.withIdentities(<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("Identities/member", targetDepth)) {<NEW_LINE>listIdentitiesResult.withIdentities(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>listIdentitiesResult.setNextToken(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return listIdentitiesResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
new ArrayList<String>());
483,866
public // means that a message never expires.<NEW_LINE>void testSetTimeToLive_B_SecOff(HttpServletRequest request, HttpServletResponse response) throws Throwable {<NEW_LINE>JMSContext jmsContextQCFBindings = qcfBindings.createContext();<NEW_LINE>emptyQueue(qcfBindings, queue1);<NEW_LINE>JMSConsumer jmsConsumer = jmsContextQCFBindings.createConsumer(queue1);<NEW_LINE>JMSProducer jmsProducer = jmsContextQCFBindings.createProducer();<NEW_LINE>TextMessage msgOut = jmsContextQCFBindings.createTextMessage();<NEW_LINE>long defaultTimeToLive = jmsProducer.getTimeToLive();<NEW_LINE>System.out.<MASK><NEW_LINE>boolean testFailed = false;<NEW_LINE>int shortTTL = 500;<NEW_LINE>jmsProducer.setTimeToLive(shortTTL);<NEW_LINE>jmsProducer.send(queue1, msgOut);<NEW_LINE>try {<NEW_LINE>Thread.sleep(shortTTL + 10000);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>// Ignore<NEW_LINE>}<NEW_LINE>Message msgIn1 = jmsConsumer.receive(30000);<NEW_LINE>if (msgIn1 != null) {<NEW_LINE>System.out.println("Message did not expire within [ " + shortTTL + " ]");<NEW_LINE>testFailed = true;<NEW_LINE>} else {<NEW_LINE>System.out.println("Message expired within [ " + shortTTL + " ]");<NEW_LINE>}<NEW_LINE>jmsProducer.setTimeToLive(0);<NEW_LINE>jmsProducer.send(queue1, msgOut);<NEW_LINE>try {<NEW_LINE>Thread.sleep(10000);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>// Ignore<NEW_LINE>}<NEW_LINE>Message msgIn2 = jmsConsumer.receive(30000);<NEW_LINE>if (msgIn2 != null) {<NEW_LINE>System.out.println("Message did not expire within [ " + 0 + " ]");<NEW_LINE>testFailed = true;<NEW_LINE>} else {<NEW_LINE>System.out.println("Message expired within [ " + 0 + " ]");<NEW_LINE>}<NEW_LINE>jmsConsumer.close();<NEW_LINE>jmsContextQCFBindings.close();<NEW_LINE>if (testFailed) {<NEW_LINE>throw new Exception("testSetTimeToLive_B_SecOff failed");<NEW_LINE>}<NEW_LINE>}
println("Default time to live [ " + defaultTimeToLive + " ]");
1,255,432
public synchronized boolean insert(MBeanServerForwarderDelegate filter) {<NEW_LINE>if (filter != null && !contains(filter)) {<NEW_LINE>MBeanServerForwarderDelegate prev = null;<NEW_LINE>MBeanServerForwarderDelegate next = (first instanceof MBeanServerForwarderDelegate) ? (MBeanServerForwarderDelegate) first : null;<NEW_LINE>while (true) {<NEW_LINE>final int nextPriority = (next != null) ? next.getPriority() : 0;<NEW_LINE>if (filter.getPriority() >= nextPriority) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (next == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>prev = next;<NEW_LINE>MBeanServer _next = next.getMBeanServer();<NEW_LINE>next = (_next instanceof MBeanServerForwarderDelegate) ? (MBeanServerForwarderDelegate) _next : null;<NEW_LINE>}<NEW_LINE>if (filter instanceof DelayedMBeanHelper) {<NEW_LINE>DelayedMBeanHelper helper = (DelayedMBeanHelper) filter;<NEW_LINE>helper.setMBeanServerNotificationSupport(mbServerDelegate);<NEW_LINE>mbServerDelegate.addDelayedMBeanHelper(helper);<NEW_LINE>}<NEW_LINE>filter.setMBeanServer(<MASK><NEW_LINE>if (prev != null) {<NEW_LINE>prev.setMBeanServer(filter);<NEW_LINE>} else {<NEW_LINE>first = filter;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
next != null ? next : last);
1,488,034
private byte[] retransform(byte[] bytes) {<NEW_LINE>if (!determinedNeedToRetransform) {<NEW_LINE>try {<NEW_LINE>String s = System.getProperty("insight.enabled", "false");<NEW_LINE>if (s.equals("true")) {<NEW_LINE>// Access the weavingTransformer field, of type WeavingTransformer<NEW_LINE>ClassLoader cl = typeRegistry.getClassLoader();<NEW_LINE>Field f = cl.getClass().getSuperclass().getDeclaredField("weavingTransformer");<NEW_LINE>if (f != null) {<NEW_LINE>f.setAccessible(true);<NEW_LINE>retransformWeavingTransformer = f.get(cl);<NEW_LINE>// Stash the weavingtransformer instance and transformIfNecessaryMethod<NEW_LINE>// byte[] transformIfNecessary(String className, byte[] bytes) {<NEW_LINE>retransformWeavingTransformMethod = retransformWeavingTransformer.getClass().getDeclaredMethod("transformIfNecessary", String.class, byte[].class);<NEW_LINE>retransformNecessary = true;<NEW_LINE>}<NEW_LINE>if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {<NEW_LINE>log.info("Determining if retransform necessary, result = " + retransformNecessary);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.log(Level.SEVERE, "Unexpected exception when determining if Spring Insight enabled", e);<NEW_LINE>retransformNecessary = false;<NEW_LINE>}<NEW_LINE>determinedNeedToRetransform = true;<NEW_LINE>}<NEW_LINE>if (retransformNecessary) {<NEW_LINE>try {<NEW_LINE>retransformWeavingTransformMethod.setAccessible(true);<NEW_LINE>byte[] newdata = (byte[]) retransformWeavingTransformMethod.invoke(retransformWeavingTransformer, this.slashedtypename, bytes);<NEW_LINE>// System.err.println("RETRANSFORMATION RUNNING. oldsize=" + bytes.length + " newsize=" + newdata.length);<NEW_LINE>if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {<NEW_LINE>log.info("retransform was attempted, oldsize=" + bytes.<MASK><NEW_LINE>}<NEW_LINE>return newdata;<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (GlobalConfiguration.isRuntimeLogging) {<NEW_LINE>log.log(Level.SEVERE, "Unexpected exception when trying to run other weaving transformers", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return bytes;<NEW_LINE>}
length + " newsize=" + newdata.length);
879,371
public DescribeThingTypeResult describeThingType(DescribeThingTypeRequest describeThingTypeRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeThingTypeRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeThingTypeRequest> request = null;<NEW_LINE>Response<DescribeThingTypeResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeThingTypeRequestMarshaller().marshall(describeThingTypeRequest);<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<DescribeThingTypeResult, JsonUnmarshallerContext> unmarshaller = new DescribeThingTypeResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<DescribeThingTypeResult> responseHandler = new JsonResponseHandler<DescribeThingTypeResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,065,334
public static ListDegradeRulesOfResourceResponse unmarshall(ListDegradeRulesOfResourceResponse listDegradeRulesOfResourceResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDegradeRulesOfResourceResponse.setRequestId(_ctx.stringValue("ListDegradeRulesOfResourceResponse.RequestId"));<NEW_LINE>listDegradeRulesOfResourceResponse.setCode(_ctx.stringValue("ListDegradeRulesOfResourceResponse.Code"));<NEW_LINE>listDegradeRulesOfResourceResponse.setMessage(_ctx.stringValue("ListDegradeRulesOfResourceResponse.Message"));<NEW_LINE>listDegradeRulesOfResourceResponse.setSuccess(_ctx.booleanValue("ListDegradeRulesOfResourceResponse.Success"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setPageIndex(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.PageIndex"));<NEW_LINE>data.setPageSize(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.TotalCount"));<NEW_LINE>data.setTotalPage(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.TotalPage"));<NEW_LINE>List<DatasItem> datas <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListDegradeRulesOfResourceResponse.Data.Datas.Length"); i++) {<NEW_LINE>DatasItem datasItem = new DatasItem();<NEW_LINE>datasItem.setAppName(_ctx.stringValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].AppName"));<NEW_LINE>datasItem.setEnable(_ctx.booleanValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].Enable"));<NEW_LINE>datasItem.setHalfOpenBaseAmountPerStep(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].HalfOpenBaseAmountPerStep"));<NEW_LINE>datasItem.setHalfOpenRecoveryStepNum(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].HalfOpenRecoveryStepNum"));<NEW_LINE>datasItem.setMinRequestAmount(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].MinRequestAmount"));<NEW_LINE>datasItem.setNamespace(_ctx.stringValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].Namespace"));<NEW_LINE>datasItem.setRecoveryTimeoutMs(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].RecoveryTimeoutMs"));<NEW_LINE>datasItem.setResource(_ctx.stringValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].Resource"));<NEW_LINE>datasItem.setRuleId(_ctx.longValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].RuleId"));<NEW_LINE>datasItem.setSlowRtMs(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].SlowRtMs"));<NEW_LINE>datasItem.setStatDurationMs(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].StatDurationMs"));<NEW_LINE>datasItem.setStrategy(_ctx.integerValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].Strategy"));<NEW_LINE>datasItem.setThreshold(_ctx.floatValue("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].Threshold"));<NEW_LINE>datas.add(datasItem);<NEW_LINE>}<NEW_LINE>data.setDatas(datas);<NEW_LINE>listDegradeRulesOfResourceResponse.setData(data);<NEW_LINE>return listDegradeRulesOfResourceResponse;<NEW_LINE>}
= new ArrayList<DatasItem>();
575,289
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {<NEW_LINE>resp.setContentType("text/html");<NEW_LINE>// Send jaxws request<NEW_LINE>try (PrintWriter out = resp.getWriter()) {<NEW_LINE>out.println("<html><head><title>Product Portal Page</title></head><body>");<NEW_LINE>String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth").path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH).queryParam("redirect_uri", "http://localhost:8181/product-portal").<MASK><NEW_LINE>String acctUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth").path(ServiceUrlConstants.ACCOUNT_SERVICE_PATH).queryParam("referrer", "product-portal").build("demo").toString();<NEW_LINE>out.println("<p>Goto: <a href=\"/customer-portal\">customers</a> | <a href=\"" + logoutUri + "\">logout</a> | <a href=\"" + acctUri + "\">manage acct</a></p>");<NEW_LINE>out.println("Servlet User Principal <b>" + req.getUserPrincipal() + "</b> made this request.");<NEW_LINE>String unsecuredWsClientResponse = sendWsReq(req, "1", false);<NEW_LINE>String securedWsClientResponse = sendWsReq(req, "1", true);<NEW_LINE>String securedWsClient2Response = sendWsReq(req, "2", true);<NEW_LINE>out.println("<p>Product with ID 1 - unsecured request (it should end with failure): <b>" + unsecuredWsClientResponse + "</b></p><br>");<NEW_LINE>out.println("<p>Product with ID 1 - secured request: <b>" + securedWsClientResponse + "</b></p><br>");<NEW_LINE>out.println("<p>Product with ID 2 - secured request: <b>" + securedWsClient2Response + "</b></p><br>");<NEW_LINE>out.println("</body></html>");<NEW_LINE>out.flush();<NEW_LINE>}<NEW_LINE>}
build("demo").toString();
429,381
public Response<Void> deleteByIdWithResponse(String id, String ifMatch, String certificateName1, byte[] certificateRawBytes, Boolean certificateIsVerified, CertificatePurpose certificatePurpose, OffsetDateTime certificateCreated, OffsetDateTime certificateLastUpdated, Boolean certificateHasPrivateKey, String certificateNonce, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.<MASK><NEW_LINE>}<NEW_LINE>String provisioningServiceName = Utils.getValueFromIdByName(id, "provisioningServices");<NEW_LINE>if (provisioningServiceName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'provisioningServices'.", id)));<NEW_LINE>}<NEW_LINE>String certificateName = Utils.getValueFromIdByName(id, "certificates");<NEW_LINE>if (certificateName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));<NEW_LINE>}<NEW_LINE>return this.deleteWithResponse(resourceGroupName, ifMatch, provisioningServiceName, certificateName, certificateName1, certificateRawBytes, certificateIsVerified, certificatePurpose, certificateCreated, certificateLastUpdated, certificateHasPrivateKey, certificateNonce, context);<NEW_LINE>}
format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
621,635
protected JComponent createCenterPanel() {<NEW_LINE>JPanel panel = new JPanel(new GridBagLayout());<NEW_LINE>// First stroke<NEW_LINE>myFirstStrokePanel = new StrokePanel(KeyMapBundle.message("first.stroke.panel.title"));<NEW_LINE>panel.add(myFirstStrokePanel, new GridBagConstraints(0, 0, 2, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));<NEW_LINE>// Second stroke panel<NEW_LINE>panel.add(myEnableSecondKeystroke, new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));<NEW_LINE>mySecondStrokePanel = new StrokePanel(KeyMapBundle.message("second.stroke.panel.title"));<NEW_LINE>panel.add(mySecondStrokePanel, new GridBagConstraints(1, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));<NEW_LINE>// Shortcut preview<NEW_LINE>JPanel previewPanel = new JPanel(new BorderLayout());<NEW_LINE>previewPanel.setBorder(IdeBorderFactory.createTitledBorder(KeyMapBundle.message("shortcut.preview.ide.border.factory.title"), true));<NEW_LINE>previewPanel.add(myKeystrokePreview);<NEW_LINE>panel.add(previewPanel, new GridBagConstraints(0, 2, 2, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));<NEW_LINE>// Conflicts<NEW_LINE>JPanel conflictsPanel = new JPanel(new BorderLayout());<NEW_LINE>conflictsPanel.setBorder(IdeBorderFactory.createTitledBorder(KeyMapBundle.message("conflicts.ide.border.factory.title"), true));<NEW_LINE>myConflictInfoArea.setEditable(false);<NEW_LINE>myConflictInfoArea.setBackground(panel.getBackground());<NEW_LINE>myConflictInfoArea.setLineWrap(true);<NEW_LINE>myConflictInfoArea.setWrapStyleWord(true);<NEW_LINE>final JScrollPane conflictInfoScroll = ScrollPaneFactory.createScrollPane(myConflictInfoArea);<NEW_LINE>conflictInfoScroll.setPreferredSize(new Dimension(260, 60));<NEW_LINE>conflictInfoScroll.setBorder(null);<NEW_LINE>conflictsPanel.add(conflictInfoScroll);<NEW_LINE>panel.add(conflictsPanel, new GridBagConstraints(0, 3, 2, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, <MASK><NEW_LINE>myEnableSecondKeystroke.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>handleSecondKey();<NEW_LINE>updateCurrentKeyStrokeInfo();<NEW_LINE>if (myEnableSecondKeystroke.isSelected()) {<NEW_LINE>IdeFocusManager.getGlobalInstance().doForceFocusWhenFocusSettlesDown(mySecondStrokePanel.getShortcutTextField());<NEW_LINE>} else {<NEW_LINE>IdeFocusManager.getGlobalInstance().doForceFocusWhenFocusSettlesDown(myFirstStrokePanel.getShortcutTextField());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return panel;<NEW_LINE>}
0), 0, 0));
1,784,965
public void onClick(View arg0) {<NEW_LINE>ParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 800);<NEW_LINE>ps.setScaleRange(0.7f, 1.3f);<NEW_LINE>ps.setSpeedRange(0.1f, 0.25f);<NEW_LINE>ps.setRotationSpeedRange(90, 180);<NEW_LINE>ps.setFadeOut(200, new AccelerateInterpolator());<NEW_LINE>ps.oneShot(arg0, 70);<NEW_LINE>ParticleSystem ps2 = new ParticleSystem(this, 100, R.drawable.star_white, 800);<NEW_LINE>ps2.setScaleRange(0.7f, 1.3f);<NEW_LINE>ps2.setSpeedRange(0.1f, 0.25f);<NEW_LINE>ps.setRotationSpeedRange(90, 180);<NEW_LINE>ps2.setFadeOut<MASK><NEW_LINE>ps2.oneShot(arg0, 70);<NEW_LINE>}
(200, new AccelerateInterpolator());
1,536,655
private TransitLayer map(TransitTuningParameters tuningParameters) {<NEW_LINE>StopIndexForRaptor stopIndex;<NEW_LINE>Map<TripPattern, TripPatternWithRaptorStopIndexes> newTripPatternForOld;<NEW_LINE>HashMap<LocalDate, List<TripPatternForDate>> tripPatternsByStopByDate;<NEW_LINE>List<List<Transfer>> transferByStopIndex;<NEW_LINE>LOG.info("Mapping transitLayer from Graph...");<NEW_LINE>stopIndex = new StopIndexForRaptor(graph.index.getAllStops(), tuningParameters);<NEW_LINE>Collection<TripPattern> allTripPatterns = graph.tripPatternForId.values();<NEW_LINE>TripPatternMapper tripPatternMapper = new TripPatternMapper();<NEW_LINE>newTripPatternForOld = <MASK><NEW_LINE>tripPatternsByStopByDate = mapTripPatterns(allTripPatterns, newTripPatternForOld);<NEW_LINE>transferByStopIndex = mapTransfers(stopIndex, graph.transfersByStop);<NEW_LINE>TransferIndexGenerator transferIndexGenerator = null;<NEW_LINE>if (OTPFeature.TransferConstraints.isOn()) {<NEW_LINE>transferIndexGenerator = new TransferIndexGenerator(graph.getTransferService().listAll(), newTripPatternForOld.values(), stopIndex);<NEW_LINE>transferIndexGenerator.generateTransfers();<NEW_LINE>}<NEW_LINE>var transferCache = new RaptorRequestTransferCache(tuningParameters.transferCacheMaxSize());<NEW_LINE>LOG.info("Mapping complete.");<NEW_LINE>return new TransitLayer(tripPatternsByStopByDate, transferByStopIndex, graph.getTransferService(), stopIndex, graph.getTimeZone().toZoneId(), transferCache, tripPatternMapper, transferIndexGenerator);<NEW_LINE>}
tripPatternMapper.mapOldTripPatternToRaptorTripPattern(stopIndex, allTripPatterns);
203,829
private void showSubject(SslCertificate.DName subject, View dialogView) {<NEW_LINE>TextView cnView = dialogView.findViewById(R.id.value_subject_CN);<NEW_LINE>cnView.setText(subject.getCName());<NEW_LINE>cnView.setVisibility(View.VISIBLE);<NEW_LINE>TextView oView = dialogView.findViewById(R.id.value_subject_O);<NEW_LINE>oView.setText(subject.getOName());<NEW_LINE>oView.setVisibility(View.VISIBLE);<NEW_LINE>TextView ouView = dialogView.findViewById(R.id.value_subject_OU);<NEW_LINE>ouView.setText(subject.getUName());<NEW_LINE>ouView.setVisibility(View.VISIBLE);<NEW_LINE>// SslCertificates don't offer this information<NEW_LINE>dialogView.findViewById(R.id.value_subject_C).setVisibility(View.GONE);<NEW_LINE>dialogView.findViewById(R.id.value_subject_ST).setVisibility(View.GONE);<NEW_LINE>dialogView.findViewById(R.id.value_subject_L).setVisibility(View.GONE);<NEW_LINE>dialogView.findViewById(R.id.label_subject_C<MASK><NEW_LINE>dialogView.findViewById(R.id.label_subject_ST).setVisibility(View.GONE);<NEW_LINE>dialogView.findViewById(R.id.label_subject_L).setVisibility(View.GONE);<NEW_LINE>}
).setVisibility(View.GONE);
883,615
protected PresentationContext negotiate(AAssociateRQ rq, AAssociateAC ac, PresentationContext rqpc) {<NEW_LINE>String as = rqpc.getAbstractSyntax();<NEW_LINE>TransferCapability tc = roleSelection(rq, ac, as);<NEW_LINE>int pcid = rqpc.getPCID();<NEW_LINE>if (tc == null)<NEW_LINE>return new PresentationContext(pcid, PresentationContext.ABSTRACT_SYNTAX_NOT_SUPPORTED, rqpc.getTransferSyntax());<NEW_LINE>String ts = tc.selectTransferSyntax(rqpc.getTransferSyntaxes());<NEW_LINE>if (ts == null)<NEW_LINE>return new PresentationContext(pcid, PresentationContext.TRANSFER_SYNTAX_NOT_SUPPORTED, rqpc.getTransferSyntax());<NEW_LINE>byte[] info = negotiate(rq.getExtNegotiationFor(as), tc);<NEW_LINE>if (info != null)<NEW_LINE>ac.addExtendedNegotiation(<MASK><NEW_LINE>return new PresentationContext(pcid, PresentationContext.ACCEPTANCE, ts);<NEW_LINE>}
new ExtendedNegotiation(as, info));
1,071,918
protected void writeProcessRecord(String cName, Object... object) {<NEW_LINE>UpgradePhase phase = getUpgradePhase();<NEW_LINE>SortedMap<String, Object> recordMap = new TreeMap<String, Object>();<NEW_LINE>recordMap.put("phase", phase);<NEW_LINE>recordMap.put("cName", cName);<NEW_LINE>recordMap.put("timestamp", System.currentTimeMillis());<NEW_LINE>SortedMap<String, Object> actionMap = new TreeMap<String, Object>();<NEW_LINE>SortedMap<String, String> paramMap = new TreeMap<String, String>();<NEW_LINE>switch(phase) {<NEW_LINE>case START:<NEW_LINE>break;<NEW_LINE>case BACKUP:<NEW_LINE>actionMap.put("backup", getBackupZipPath().toString());<NEW_LINE>break;<NEW_LINE>case DOWNLOAD:<NEW_LINE>actionMap.put("download", <MASK><NEW_LINE>break;<NEW_LINE>case PROCESS_STOP:<NEW_LINE>actionMap.put("stop_process", JSONHelper.toString(object[0]));<NEW_LINE>actionMap.put("ratio", String.valueOf(object[1]));<NEW_LINE>actionMap.put("processes", object[2]);<NEW_LINE>break;<NEW_LINE>case OVERRIDE_FILE:<NEW_LINE>paramMap.put("source", String.valueOf(object[0]));<NEW_LINE>paramMap.put("target", getRootDir());<NEW_LINE>paramMap.put("backup", getBackupZipPath().toString());<NEW_LINE>actionMap.put("override", paramMap);<NEW_LINE>break;<NEW_LINE>case PROCESS_START:<NEW_LINE>actionMap.put("start_process", JSONHelper.toString(object[0]));<NEW_LINE>actionMap.put("ratio", String.valueOf(object[1]));<NEW_LINE>actionMap.put("processes", object[2]);<NEW_LINE>break;<NEW_LINE>case END:<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>recordMap.put("action", actionMap);<NEW_LINE>this.upgradeContext.appendProcessRecord(new UpgradeOperationRecord(recordMap));<NEW_LINE>}
getUpgradePackagePath().toString());
1,424,542
protected SnippetTemplate.Arguments makeArguments(InstanceOfUsageReplacer replacer, LoweringTool tool) {<NEW_LINE>InstanceOfNode node = (InstanceOfNode) replacer.instanceOf;<NEW_LINE>TypeReference typeReference = node.type();<NEW_LINE>SharedType type = (SharedType) typeReference.getType();<NEW_LINE>DynamicHub hub = type.getHub();<NEW_LINE>if (typeReference.isExact()) {<NEW_LINE>SnippetTemplate.Arguments args = new SnippetTemplate.Arguments(typeEquality, node.graph().getGuardsStage(), tool.getLoweringStage());<NEW_LINE>args.add("object", node.getValue());<NEW_LINE>args.add("trueValue", replacer.trueValue);<NEW_LINE>args.add("falseValue", replacer.falseValue);<NEW_LINE>args.addConst("allowsNull", node.allowsNull());<NEW_LINE>args.add("exactType", hub);<NEW_LINE>return args;<NEW_LINE>} else {<NEW_LINE>assert type.getSingleImplementor() == null : "Canonicalization of InstanceOfNode produces exact type for single implementor";<NEW_LINE>SnippetTemplate.Arguments args = new SnippetTemplate.Arguments(instanceOf, node.graph().getGuardsStage(), tool.getLoweringStage());<NEW_LINE>args.add("object", node.getValue());<NEW_LINE>args.add("trueValue", replacer.trueValue);<NEW_LINE>args.add("falseValue", replacer.falseValue);<NEW_LINE>args.addConst("allowsNull", node.allowsNull());<NEW_LINE>args.add(<MASK><NEW_LINE>args.add("range", hub.getTypeCheckRange());<NEW_LINE>args.add("slot", hub.getTypeCheckSlot());<NEW_LINE>args.addConst("typeIDSlotOffset", runtimeConfig.getTypeIDSlotsOffset());<NEW_LINE>return args;<NEW_LINE>}<NEW_LINE>}
"start", hub.getTypeCheckStart());
266,166
private void onCursorPos(double xpos, double ypos) {<NEW_LINE>int xDelta;<NEW_LINE>int yDelta;<NEW_LINE>int x = (<MASK><NEW_LINE>int y = context.getHeight() - (int) Math.round(ypos);<NEW_LINE>if (mouseX == 0)<NEW_LINE>mouseX = x;<NEW_LINE>if (mouseY == 0)<NEW_LINE>mouseY = y;<NEW_LINE>xDelta = x - mouseX;<NEW_LINE>yDelta = y - mouseY;<NEW_LINE>mouseX = x;<NEW_LINE>mouseY = y;<NEW_LINE>if (xDelta == 0 && yDelta == 0)<NEW_LINE>return;<NEW_LINE>final MouseMotionEvent mouseMotionEvent = new MouseMotionEvent(x, y, xDelta, yDelta, mouseWheel, 0);<NEW_LINE>mouseMotionEvent.setTime(getInputTimeNanos());<NEW_LINE>EXECUTOR.addToExecute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>mouseMotionEvents.add(mouseMotionEvent);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
int) Math.round(xpos);
1,296,952
private static JPanel createLayerConfigurationPanel(@Nonnull final ModuleEditor moduleEditor) {<NEW_LINE>BorderLayoutPanel panel = JBUI.Panels.simplePanel();<NEW_LINE>ModifiableRootModel moduleRootModel = moduleEditor.getModifiableRootModelProxy();<NEW_LINE>final MutableCollectionComboBoxModel<String> model = new MutableCollectionComboBoxModel<String>(new ArrayList<String>(moduleRootModel.getLayers().keySet()), moduleRootModel.getCurrentLayerName());<NEW_LINE>final ComboBox comboBox = new ComboBox(model);<NEW_LINE>comboBox.setEnabled(model.getSize() > 1);<NEW_LINE>moduleEditor.addChangeListener(moduleRootModel1 -> {<NEW_LINE>model.update(new ArrayList<String>(moduleRootModel1.getLayers().keySet()));<NEW_LINE>model.setSelectedItem(moduleRootModel1.getCurrentLayerName());<NEW_LINE>model.update();<NEW_LINE>comboBox.setEnabled(comboBox.getItemCount() > 1);<NEW_LINE>});<NEW_LINE>comboBox.addItemListener(e -> {<NEW_LINE>if (e.getStateChange() == ItemEvent.SELECTED) {<NEW_LINE>moduleEditor.getModifiableRootModelProxy().setCurrentLayer((String) comboBox.getSelectedItem());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>DefaultActionGroup group = new DefaultActionGroup();<NEW_LINE>group.add(new NewLayerAction(moduleEditor, false));<NEW_LINE>group.<MASK><NEW_LINE>group.add(new NewLayerAction(moduleEditor, true));<NEW_LINE>ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, true);<NEW_LINE>actionToolbar.setTargetComponent(panel);<NEW_LINE>JComponent toolbarComponent = actionToolbar.getComponent();<NEW_LINE>toolbarComponent.setBorder(JBUI.Borders.empty());<NEW_LINE>panel.addToLeft(LabeledComponent.left(comboBox, "Layer")).addToRight(toolbarComponent);<NEW_LINE>return panel;<NEW_LINE>}
add(new DeleteLayerAction(moduleEditor));
115,647
public boolean save(RandomAccessFile raf) throws IOException {<NEW_LINE>int globalOffset = 2;<NEW_LINE>int lastWritten = 0;<NEW_LINE>raf.seek(0);<NEW_LINE>for (int i = 0; i < 1024; i++) {<NEW_LINE>raf.seek(globalOffset * 4096L);<NEW_LINE>T chunk = chunks[i];<NEW_LINE>if (chunk == null || chunk.isEmpty()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>lastWritten = chunk.save(raf);<NEW_LINE>int sectors = (lastWritten >> 12) + (lastWritten % 4096 == 0 ? 0 : 1);<NEW_LINE>raf.seek(i * 4);<NEW_LINE>raf.write(globalOffset >>> 16);<NEW_LINE>raf.write(globalOffset >> 8 & 0xFF);<NEW_LINE>raf.write(globalOffset & 0xFF);<NEW_LINE>raf.write(sectors);<NEW_LINE>// write timestamp<NEW_LINE>raf.seek(4096 + i * 4);<NEW_LINE>raf.<MASK><NEW_LINE>globalOffset += sectors;<NEW_LINE>}<NEW_LINE>// padding<NEW_LINE>if (lastWritten % 4096 != 0) {<NEW_LINE>raf.seek(globalOffset * 4096L - 1);<NEW_LINE>raf.write(0);<NEW_LINE>}<NEW_LINE>return globalOffset != 2;<NEW_LINE>}
writeInt(chunk.getTimestamp());
357,982
public static String format(IPath filePath, String input) {<NEW_LINE>if (filePath == null || input == null || input.trim().length() == 0) {<NEW_LINE>return input;<NEW_LINE>}<NEW_LINE>IContentType contentType = Platform.getContentTypeManager().findContentTypeFor(filePath.lastSegment());<NEW_LINE>if (contentType != null) {<NEW_LINE>// Format the string before returning it<NEW_LINE>IScriptFormatterFactory factory = ScriptFormatterManager.getSelected(contentType.getId());<NEW_LINE>if (factory != null) {<NEW_LINE>IDocument document = new Document(input);<NEW_LINE>IPartitioningConfiguration partitioningConfiguration = (IPartitioningConfiguration) factory.getPartitioningConfiguration();<NEW_LINE>CompositePartitionScanner partitionScanner = new CompositePartitionScanner(partitioningConfiguration.createSubPartitionScanner(), new NullSubPartitionScanner(), new NullPartitionerSwitchStrategy());<NEW_LINE>IDocumentPartitioner partitioner = new ExtendedFastPartitioner(partitionScanner, partitioningConfiguration.getContentTypes());<NEW_LINE>partitionScanner<MASK><NEW_LINE>partitioner.connect(document);<NEW_LINE>document.setDocumentPartitioner(partitioner);<NEW_LINE>final String lineDelimiter = TextUtilities.getDefaultLineDelimiter(document);<NEW_LINE>IResource parentResource = ResourcesPlugin.getWorkspace().getRoot().findMember(filePath.removeLastSegments(1));<NEW_LINE>if (parentResource != null) {<NEW_LINE>IProject project = parentResource.getProject();<NEW_LINE>Map<String, String> preferences = factory.retrievePreferences(new PreferencesLookupDelegate(project));<NEW_LINE>TextEdit formattedTextEdit = factory.createFormatter(lineDelimiter, preferences).format(input, 0, input.length(), 0, false, null, StringUtil.EMPTY);<NEW_LINE>try {<NEW_LINE>formattedTextEdit.apply(document);<NEW_LINE>input = document.get();<NEW_LINE>} catch (Exception e) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>IdeLog.// $NON-NLS-1$<NEW_LINE>logWarning(// $NON-NLS-1$<NEW_LINE>CommonEditorPlugin.getDefault(), // $NON-NLS-1$<NEW_LINE>"Error while formatting the file template code", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return input;<NEW_LINE>}
.setPartitioner((IExtendedPartitioner) partitioner);
1,771,453
public static DAOSet fromServices(ServiceSet services, FutureJdbi jdbi, Executor executor, MDBConfig mdbConfig) {<NEW_LINE>var set = new DAOSet();<NEW_LINE>set.uacApisUtil = new UACApisUtil(executor, services.uac);<NEW_LINE>set.metadataDAO = new MetadataDAORdbImpl();<NEW_LINE>set.commitDAO = new CommitDAORdbImpl(services.authService, services.mdbRoleService);<NEW_LINE>set.repositoryDAO = new RepositoryDAORdbImpl(services.authService, services.mdbRoleService, set.commitDAO, set.metadataDAO);<NEW_LINE>set.blobDAO = new BlobDAORdbImpl(services.authService, services.mdbRoleService);<NEW_LINE>set.experimentRunDAO = new ExperimentRunDAORdbImpl(mdbConfig, services.authService, services.mdbRoleService, set.repositoryDAO, set.commitDAO, set.blobDAO, set.metadataDAO);<NEW_LINE>if (services.artifactStoreService != null) {<NEW_LINE>set.artifactStoreDAO = new ArtifactStoreDAORdbImpl(services.artifactStoreService, mdbConfig);<NEW_LINE>} else {<NEW_LINE>set.artifactStoreDAO = new ArtifactStoreDAODisabled();<NEW_LINE>}<NEW_LINE>set.commentDAO = new CommentDAORdbImpl(services.authService);<NEW_LINE>set.datasetDAO = new DatasetDAORdbImpl(services.authService, services.mdbRoleService);<NEW_LINE>set.lineageDAO = new LineageDAORdbImpl();<NEW_LINE>set.datasetVersionDAO = new DatasetVersionDAORdbImpl(services.authService, services.mdbRoleService);<NEW_LINE>set.futureExperimentRunDAO = new FutureExperimentRunDAO(executor, jdbi, mdbConfig, services.uac, set.artifactStoreDAO, set.datasetVersionDAO, set.repositoryDAO, set.commitDAO, set.blobDAO, set.uacApisUtil);<NEW_LINE>set.futureProjectDAO = new FutureProjectDAO(executor, jdbi, services.uac, set.artifactStoreDAO, set.datasetVersionDAO, mdbConfig, set.futureExperimentRunDAO, set.uacApisUtil);<NEW_LINE>set.futureEventDAO = new FutureEventDAO(executor, jdbi, mdbConfig, ServiceEnum.Service.MODELDB_SERVICE.name());<NEW_LINE>set.futureExperimentDAO = new FutureExperimentDAO(executor, jdbi, <MASK><NEW_LINE>return set;<NEW_LINE>}
services.uac, mdbConfig, set);
1,718,683
private List<ItemEntity> createAudioChangeItems() {<NEW_LINE>List<ItemEntity> list = new ArrayList<>();<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_original), R<MASK><NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_child), R.drawable.audio_effect_setting_changetype_child, AUDIO_VOICECHANGER_TYPE_1));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_luoli), R.drawable.audio_effect_setting_changetype_luoli, AUDIO_VOICECHANGER_TYPE_2));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_dashu), R.drawable.audio_effect_setting_changetype_dashu, AUDIO_VOICECHANGER_TYPE_3));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_metal), R.drawable.audio_effect_setting_changetype_metal, AUDIO_VOICECHANGER_TYPE_4));<NEW_LINE>// list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_sick), R.drawable.audio_effect_setting_changetype_sick, AUDIO_VOICECHANGER_TYPE_5));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_foreign), R.drawable.audio_effect_setting_changetype_foreign, AUDIO_VOICECHANGER_TYPE_6));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_kunsou), R.drawable.audio_effect_setting_changetype_kunsou, AUDIO_VOICECHANGER_TYPE_7));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_feizai), R.drawable.audio_effect_setting_changetype_feizai, AUDIO_VOICECHANGER_TYPE_8));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_dianliu), R.drawable.audio_effect_setting_changetype_dianliu, AUDIO_VOICECHANGER_TYPE_9));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_machine), R.drawable.audio_effect_setting_changetype_machine, AUDIO_VOICECHANGER_TYPE_10));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_kongling), R.drawable.audio_effect_setting_changetype_kongling, AUDIO_VOICECHANGER_TYPE_11));<NEW_LINE>list.get(0).mIsSelected = true;<NEW_LINE>return list;<NEW_LINE>}
.drawable.audio_effect_setting_changetype_original_open, AUDIO_VOICECHANGER_TYPE_0));
864,505
private void prepareMinMaxExpr(HDFSScanNodePredicates scanNodePredicates, ScanOperatorPredicates predicates, ExecPlan context) {<NEW_LINE>List<ScalarOperator> minMaxConjuncts = predicates.getMinMaxConjuncts();<NEW_LINE>TupleDescriptor minMaxTuple = context.getDescTbl().createTupleDescriptor();<NEW_LINE>for (ScalarOperator minMaxConjunct : minMaxConjuncts) {<NEW_LINE>for (ColumnRefOperator columnRefOperator : Utils.extractColumnRef(minMaxConjunct)) {<NEW_LINE>SlotDescriptor slotDescriptor = context.getDescTbl().addSlotDescriptor(minMaxTuple, new SlotId(columnRefOperator.getId()));<NEW_LINE>Column column = predicates.getMinMaxColumnRefMap().get(columnRefOperator);<NEW_LINE>slotDescriptor.setColumn(column);<NEW_LINE>slotDescriptor.setIsNullable(column.isAllowNull());<NEW_LINE>slotDescriptor.setIsMaterialized(true);<NEW_LINE>context.getColRefToExpr().put(columnRefOperator, new SlotRef(columnRefOperator<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>minMaxTuple.computeMemLayout();<NEW_LINE>scanNodePredicates.setMinMaxTuple(minMaxTuple);<NEW_LINE>ScalarOperatorToExpr.FormatterContext minMaxFormatterContext = new ScalarOperatorToExpr.FormatterContext(context.getColRefToExpr());<NEW_LINE>for (ScalarOperator minMaxConjunct : minMaxConjuncts) {<NEW_LINE>scanNodePredicates.getMinMaxConjuncts().add(ScalarOperatorToExpr.buildExecExpression(minMaxConjunct, minMaxFormatterContext));<NEW_LINE>}<NEW_LINE>}
.toString(), slotDescriptor));
117,301
public void handleNotification(Notification notification) {<NEW_LINE>super.handleNotification(notification);<NEW_LINE>Sandbox sandbox = Sandbox.getInstance();<NEW_LINE><MASK><NEW_LINE>switch(notification.getName()) {<NEW_LINE>case UIBasicItemProperties.TAGS_BUTTON_CLICKED:<NEW_LINE>viewComponent.show(uiStage);<NEW_LINE>break;<NEW_LINE>case MsgAPI.ITEM_SELECTION_CHANGED:<NEW_LINE>Set<Entity> selection = notification.getBody();<NEW_LINE>if (selection.size() == 1) {<NEW_LINE>setObservable(selection.iterator().next());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case MsgAPI.EMPTY_SPACE_CLICKED:<NEW_LINE>setObservable(null);<NEW_LINE>break;<NEW_LINE>case TagsDialog.LIST_CHANGED:<NEW_LINE>viewComponent.updateView();<NEW_LINE>MainItemComponent mainItemComponent = observable.getComponent(MainItemComponent.class);<NEW_LINE>mainItemComponent.tags = viewComponent.getTags();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
UIStage uiStage = sandbox.getUIStage();
355,027
private void handleShowExport() throws AnalysisException {<NEW_LINE>ShowExportStmt showExportStmt = (ShowExportStmt) stmt;<NEW_LINE><MASK><NEW_LINE>Database db = catalog.getDb(showExportStmt.getDbName());<NEW_LINE>if (db == null) {<NEW_LINE>ErrorReport.reportAnalysisException(ErrorCode.ERR_BAD_DB_ERROR, showExportStmt.getDbName());<NEW_LINE>}<NEW_LINE>long dbId = db.getId();<NEW_LINE>ExportMgr exportMgr = catalog.getExportMgr();<NEW_LINE>Set<ExportJob.JobState> states = null;<NEW_LINE>ExportJob.JobState state = showExportStmt.getJobState();<NEW_LINE>if (state != null) {<NEW_LINE>states = Sets.newHashSet(state);<NEW_LINE>}<NEW_LINE>List<List<String>> infos = exportMgr.getExportJobInfosByIdOrState(dbId, showExportStmt.getJobId(), states, showExportStmt.getQueryId(), showExportStmt.getOrderByPairs(), showExportStmt.getLimit());<NEW_LINE>resultSet = new ShowResultSet(showExportStmt.getMetaData(), infos);<NEW_LINE>}
Catalog catalog = Catalog.getCurrentCatalog();
1,329,460
final DeleteActivityResult executeDeleteActivity(DeleteActivityRequest deleteActivityRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteActivityRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DeleteActivityRequest> request = null;<NEW_LINE>Response<DeleteActivityResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteActivityRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteActivityRequest));<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, "SFN");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteActivity");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteActivityResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteActivityResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
264,348
public static SandboxedServiceContext create(final ServiceContext serviceContext) {<NEW_LINE>if (serviceContext instanceof SandboxedServiceContext) {<NEW_LINE>return (SandboxedServiceContext) serviceContext;<NEW_LINE>}<NEW_LINE>final KafkaClientSupplier kafkaClientSupplier = new SandboxedKafkaClientSupplier();<NEW_LINE>final KafkaTopicClient kafkaTopicClient = SandboxedKafkaTopicClient.createProxy(serviceContext.getTopicClient(), serviceContext::getAdminClient);<NEW_LINE>final SchemaRegistryClient schemaRegistryClient = SandboxedSchemaRegistryClient.<MASK><NEW_LINE>final Supplier<ConnectClient> connectClientSupplier = () -> SandboxConnectClient.createProxy(serviceContext.getConnectClient());<NEW_LINE>final KafkaConsumerGroupClient kafkaConsumerGroupClient = SandboxedKafkaConsumerGroupClient.createProxy(serviceContext.getConsumerGroupClient());<NEW_LINE>return new SandboxedServiceContext(kafkaClientSupplier, kafkaTopicClient, schemaRegistryClient, connectClientSupplier, kafkaConsumerGroupClient);<NEW_LINE>}
createProxy(serviceContext.getSchemaRegistryClient());
772,813
public void marshall(AssessmentFrameworkShareRequest assessmentFrameworkShareRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (assessmentFrameworkShareRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getId(), ID_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getFrameworkId(), FRAMEWORKID_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getFrameworkName(), FRAMEWORKNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getSourceAccount(), SOURCEACCOUNT_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getDestinationAccount(), DESTINATIONACCOUNT_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getDestinationRegion(), DESTINATIONREGION_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getExpirationTime(), EXPIRATIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getCreationTime(), CREATIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getLastUpdated(), LASTUPDATED_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getComment(), COMMENT_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getStandardControlsCount(), STANDARDCONTROLSCOUNT_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getCustomControlsCount(), CUSTOMCONTROLSCOUNT_BINDING);<NEW_LINE>protocolMarshaller.marshall(assessmentFrameworkShareRequest.getComplianceType(), COMPLIANCETYPE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
assessmentFrameworkShareRequest.getFrameworkDescription(), FRAMEWORKDESCRIPTION_BINDING);
913,029
public List<Result> resetOffsets(ClusterDO clusterDO, OffsetResetDTO dto) {<NEW_LINE>if (ValidateUtils.isNull(dto)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<PartitionOffsetDTO> offsetDTOList = this.getPartitionOffsetDTOList(clusterDO, dto);<NEW_LINE>if (ValidateUtils.isEmptyList(offsetDTOList)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>OffsetLocationEnum offsetLocation = dto.getLocation().equals(OffsetLocationEnum.ZOOKEEPER.location) ? OffsetLocationEnum.ZOOKEEPER : OffsetLocationEnum.BROKER;<NEW_LINE>ResultStatus result = checkConsumerGroupExist(clusterDO, dto.getTopicName(), dto.getConsumerGroup(), offsetLocation, dto.getCreateIfAbsent());<NEW_LINE>if (ResultStatus.SUCCESS.getCode() != result.getCode()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ConsumerGroup consumerGroup = new ConsumerGroup(clusterDO.getId(), dto.getConsumerGroup(), OffsetLocationEnum.getOffsetStoreLocation(dto.getLocation()));<NEW_LINE>return consumerService.resetConsumerOffset(clusterDO, dto.<MASK><NEW_LINE>}
getTopicName(), consumerGroup, offsetDTOList);
1,026,555
public void printGroupWithDetails(Group group) {<NEW_LINE>System.out.println(group.getName());<NEW_LINE>GroupDetailResponse groupDetails;<NEW_LINE>try {<NEW_LINE>groupDetails = keywhizClient.<MASK><NEW_LINE>} catch (IOException e) {<NEW_LINE>throw Throwables.propagate(e);<NEW_LINE>}<NEW_LINE>System.out.println(INDENT + "Clients:");<NEW_LINE>groupDetails.getClients().stream().sorted(Comparator.comparing(Client::getName)).forEach(c -> System.out.println(DOUBLE_INDENT + c.getName()));<NEW_LINE>System.out.println(INDENT + "Secrets:");<NEW_LINE>groupDetails.getSecrets().stream().sorted(Comparator.comparing(SanitizedSecret::name)).forEach(s -> System.out.println(DOUBLE_INDENT + SanitizedSecret.displayName(s)));<NEW_LINE>System.out.println(INDENT + "Metadata:");<NEW_LINE>if (!groupDetails.getMetadata().isEmpty()) {<NEW_LINE>String metadata;<NEW_LINE>try {<NEW_LINE>metadata = new ObjectMapper().writeValueAsString(groupDetails.getMetadata());<NEW_LINE>} catch (JsonProcessingException e) {<NEW_LINE>throw Throwables.propagate(e);<NEW_LINE>}<NEW_LINE>System.out.println(DOUBLE_INDENT + metadata);<NEW_LINE>}<NEW_LINE>if (!groupDetails.getDescription().isEmpty()) {<NEW_LINE>System.out.println(INDENT + "Description:");<NEW_LINE>System.out.println(DOUBLE_INDENT + groupDetails.getDescription());<NEW_LINE>}<NEW_LINE>if (!groupDetails.getCreatedBy().isEmpty()) {<NEW_LINE>System.out.println(INDENT + "Created by:");<NEW_LINE>System.out.println(DOUBLE_INDENT + groupDetails.getCreatedBy());<NEW_LINE>}<NEW_LINE>System.out.println(INDENT + "Created at:");<NEW_LINE>Date d = new Date(groupDetails.getCreationDate().toEpochSecond() * 1000);<NEW_LINE>System.out.println(DOUBLE_INDENT + DateFormat.getDateTimeInstance().format(d));<NEW_LINE>if (!groupDetails.getUpdatedBy().isEmpty()) {<NEW_LINE>System.out.println(INDENT + "Updated by:");<NEW_LINE>System.out.println(DOUBLE_INDENT + groupDetails.getUpdatedBy());<NEW_LINE>}<NEW_LINE>System.out.println(INDENT + "Updated at:");<NEW_LINE>d = new Date(groupDetails.getUpdateDate().toEpochSecond() * 1000);<NEW_LINE>System.out.println(DOUBLE_INDENT + DateFormat.getDateTimeInstance().format(d));<NEW_LINE>}
groupDetailsForId(group.getId());
72,552
public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget());<NEW_LINE>Player player = game.<MASK><NEW_LINE>if (player == null || permanent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>List<Permanent> attachments = new ArrayList<>();<NEW_LINE>for (UUID permId : permanent.getAttachments()) {<NEW_LINE>Permanent attachment = game.getPermanent(permId);<NEW_LINE>if (attachment != null) {<NEW_LINE>if (attachment.hasSubtype(SubType.AURA, game) || attachment.hasSubtype(SubType.EQUIPMENT, game)) {<NEW_LINE>attachments.add(attachment);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>new ReturnToHandTargetEffect().apply(game, source);<NEW_LINE>if (!attachments.isEmpty()) {<NEW_LINE>Target target = new TargetCreaturePermanent(1, 1, StaticFilters.FILTER_PERMANENT_CREATURE, true);<NEW_LINE>Permanent newCreature = null;<NEW_LINE>if (player.choose(Outcome.BoostCreature, target, source, game)) {<NEW_LINE>newCreature = game.getPermanent(target.getFirstTarget());<NEW_LINE>}<NEW_LINE>for (Permanent attachment : attachments) {<NEW_LINE>if (!attachment.hasSubtype(SubType.AURA, game) && !attachment.hasSubtype(SubType.EQUIPMENT, game)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, player.getId());<NEW_LINE>effect.setTargetPointer(new FixedTarget(attachment, game));<NEW_LINE>game.addEffect(effect, source);<NEW_LINE>if (newCreature != null) {<NEW_LINE>attachment.attachTo(newCreature.getId(), source, game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getPlayer(source.getControllerId());
128,200
int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException {<NEW_LINE>final String jobIdString = options.getString(jobArg.getDest());<NEW_LINE>final String hostPattern = options.getString(hostArg.getDest());<NEW_LINE>final boolean full = options.getBoolean(fullArg.getDest());<NEW_LINE>if (Strings.isNullOrEmpty(jobIdString) && Strings.isNullOrEmpty(hostPattern)) {<NEW_LINE>if (!json) {<NEW_LINE>out.printf("WARNING: listing status of all hosts in the cluster is a slow operation. " + "Consider adding the --job and/or --host flag(s)!");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Set<JobId> jobIds = client.jobs(jobIdString, hostPattern).get().keySet();<NEW_LINE>if (!Strings.isNullOrEmpty(jobIdString) && jobIds.isEmpty()) {<NEW_LINE>if (json) {<NEW_LINE>out.println("{ }");<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return 1;<NEW_LINE>}<NEW_LINE>final Map<JobId, JobStatus> statuses = new TreeMap<>(client.jobStatuses(jobIds).get());<NEW_LINE>if (json) {<NEW_LINE>showJsonStatuses(out, hostPattern, jobIds, statuses);<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>final JobStatusTable table = jobStatusTable(out, full);<NEW_LINE>final boolean noHostMatchedEver = showStatusesForHosts(hostPattern, jobIds, statuses, new HostStatusDisplayer() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void matchedStatus(JobStatus jobStatus, Iterable<String> matchingHosts, Map<String, TaskStatus> taskStatuses) {<NEW_LINE>displayTask(full, table, jobStatus.getJob().getId(), jobStatus, taskStatuses, matchingHosts);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (noHostMatchedEver) {<NEW_LINE>String domainsSwitchString = "";<NEW_LINE>final List<String> domains = options.get("domains");<NEW_LINE>if (domains.size() > 0) {<NEW_LINE>domainsSwitchString = "-d " + Joiner.on(",").join(domains);<NEW_LINE>}<NEW_LINE>out.printf("There are no jobs deployed to hosts with the host pattern '%s'%n" + "Run 'helios %s hosts %s' to check your host exists and is up.%n", hostPattern, domainsSwitchString, hostPattern);<NEW_LINE>return 1;<NEW_LINE>}<NEW_LINE>table.print();<NEW_LINE>return 0;<NEW_LINE>}
out.printf("job id matcher \"%s\" matched no jobs%n", jobIdString);
182,720
protected void sendEmail(Context context, String email, boolean isRegister, RegistrationData rd) throws MessagingException, IOException, SQLException {<NEW_LINE>String base = configurationService.getProperty("dspace.ui.url");<NEW_LINE>// Note change from "key=" to "token="<NEW_LINE>String specialLink = new StringBuffer().append(base).append(base.endsWith("/") ? "" : "/").append(isRegister ? "register" : "forgot").append("/").append(rd.getToken()).toString();<NEW_LINE>Locale locale = context.getCurrentLocale();<NEW_LINE>Email bean = Email.getEmail(I18nUtil.getEmailFilename(locale, isRegister ? "register" : "change_password"));<NEW_LINE>bean.addRecipient(email);<NEW_LINE>bean.addArgument(specialLink);<NEW_LINE>bean.send();<NEW_LINE>// Breadcrumbs<NEW_LINE>if (log.isInfoEnabled()) {<NEW_LINE>log.info("Sent " + (isRegister ? "registration" <MASK><NEW_LINE>}<NEW_LINE>}
: "account") + " information to " + email);
1,270,619
public Pair<Double, SGDVector> lossAndGradient(SGDVector truth, SGDVector prediction) {<NEW_LINE>DenseVector labels, densePred;<NEW_LINE>if (truth instanceof SparseVector) {<NEW_LINE>labels = ((SparseVector) truth).densify();<NEW_LINE>} else {<NEW_LINE>labels = (DenseVector) truth;<NEW_LINE>}<NEW_LINE>if (prediction instanceof SparseVector) {<NEW_LINE>densePred = ((SparseVector) prediction).densify();<NEW_LINE>} else {<NEW_LINE>densePred = (DenseVector) prediction;<NEW_LINE>}<NEW_LINE>double loss = 0.0;<NEW_LINE>for (int i = 0; i < prediction.size(); i++) {<NEW_LINE>double label = labels.get(i);<NEW_LINE>double <MASK><NEW_LINE>double yhat = SigmoidNormalizer.sigmoid(pred);<NEW_LINE>// numerically stable form of loss computation<NEW_LINE>loss += Math.max(pred, 0) - (pred * label) + Math.log1p(Math.exp(-Math.abs(pred)));<NEW_LINE>densePred.set(i, -(yhat - label));<NEW_LINE>}<NEW_LINE>return new Pair<>(loss, densePred);<NEW_LINE>}
pred = densePred.get(i);
1,617,937
public void validateInstance(ModuleMetaData mmd, ClassLoader loader, Object instance) {<NEW_LINE>// perform BeanValidation function<NEW_LINE>Validator validator = beanValidationSvc.getValidator(mmd, loader);<NEW_LINE>Set<ConstraintViolation<Object>> cvSet = null;<NEW_LINE>try {<NEW_LINE>cvSet = validator.validate(instance);<NEW_LINE>} catch (ValidationException ve) {<NEW_LINE>// Method validate() will throw a ValidationException when the validator fails<NEW_LINE>// unexpectedly, not when the bean configuration violates constraints (i.e. fails validation.)<NEW_LINE>Object[] msgArgs = new Object[] { Util.identity(validator), ve, Util.identity(instance) };<NEW_LINE>Tr.error(tc, "BEAN_VALIDATION_VALIDATOR_FAILED_J2CA1008", msgArgs);<NEW_LINE>}<NEW_LINE>if (cvSet != null && !cvSet.isEmpty()) {<NEW_LINE>StringBuilder msg = new StringBuilder();<NEW_LINE>for (ConstraintViolation<?> constraintViolation : cvSet) {<NEW_LINE>msg.append("\n\t" + constraintViolation);<NEW_LINE>}<NEW_LINE>ConstraintViolationException cve = new ConstraintViolationException(msg.toString(), (Set) cvSet);<NEW_LINE>Object[] msgArgs = new Object[] { Util.identity(instance), cve.getMessage() };<NEW_LINE>Tr.<MASK><NEW_LINE>throw cve;<NEW_LINE>}<NEW_LINE>}
error(tc, "BEAN_VALIDATION_FAILED_J2CA0238", msgArgs);
1,176,615
protected void preventUnsavedChanges(BeforeCloseEvent event) {<NEW_LINE>CloseAction action = event.getCloseAction();<NEW_LINE>if (action instanceof ChangeTrackerCloseAction && ((ChangeTrackerCloseAction) action).isCheckForUnsavedChanges() && hasUnsavedChanges()) {<NEW_LINE>Configuration configuration = getBeanLocator(<MASK><NEW_LINE>ClientConfig clientConfig = configuration.getConfig(ClientConfig.class);<NEW_LINE>ScreenValidation screenValidation = getBeanLocator().get(ScreenValidation.NAME);<NEW_LINE>UnknownOperationResult result = new UnknownOperationResult();<NEW_LINE>if (clientConfig.getUseSaveConfirmation()) {<NEW_LINE>screenValidation.showSaveConfirmationDialog(this, action).onCommit(() -> result.resume(closeWithCommit())).onDiscard(() -> result.resume(closeWithDiscard())).onCancel(result::fail);<NEW_LINE>} else {<NEW_LINE>screenValidation.showUnsavedChangesDialog(this, action).onDiscard(() -> result.resume(closeWithDiscard())).onCancel(result::fail);<NEW_LINE>}<NEW_LINE>event.preventWindowClose(result);<NEW_LINE>}<NEW_LINE>}
).get(Configuration.NAME);
122,362
final DeleteConnectionResult executeDeleteConnection(DeleteConnectionRequest deleteConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteConnectionRequest> request = null;<NEW_LINE>Response<DeleteConnectionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteConnectionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteConnection");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteConnectionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteConnectionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,637,329
private void addBlockVisitor(@NonNull MarkwonVisitor.Builder builder) {<NEW_LINE>if (!config.blocksEnabled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>builder.on(JLatexMathBlock.class, new MarkwonVisitor.NodeVisitor<JLatexMathBlock>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void visit(@NonNull MarkwonVisitor visitor, @NonNull JLatexMathBlock jLatexMathBlock) {<NEW_LINE>visitor.blockStart(jLatexMathBlock);<NEW_LINE>final String latex = jLatexMathBlock.latex();<NEW_LINE>final int length = visitor.length();<NEW_LINE>// @since 4.0.2 we cannot append _raw_ latex as a placeholder-text,<NEW_LINE>// because Android will draw formula for each line of text, thus<NEW_LINE>// leading to formula duplicated (drawn on each line of text)<NEW_LINE>visitor.builder()<MASK><NEW_LINE>final MarkwonConfiguration configuration = visitor.configuration();<NEW_LINE>final AsyncDrawableSpan span = new JLatexAsyncDrawableSpan(configuration.theme(), new JLatextAsyncDrawable(latex, jLatextAsyncDrawableLoader, jLatexBlockImageSizeResolver, null, true), config.theme.blockTextColor());<NEW_LINE>visitor.setSpans(length, span);<NEW_LINE>visitor.blockEnd(jLatexMathBlock);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.append(prepareLatexTextPlaceholder(latex));
1,184,597
public Request<ListDimensionsRequest> marshall(ListDimensionsRequest listDimensionsRequest) {<NEW_LINE>if (listDimensionsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListDimensionsRequest)");<NEW_LINE>}<NEW_LINE>Request<ListDimensionsRequest> request = new DefaultRequest<ListDimensionsRequest>(listDimensionsRequest, "AWSIot");<NEW_LINE><MASK><NEW_LINE>String uriResourcePath = "/dimensions";<NEW_LINE>if (listDimensionsRequest.getNextToken() != null) {<NEW_LINE>request.addParameter("nextToken", StringUtils.fromString(listDimensionsRequest.getNextToken()));<NEW_LINE>}<NEW_LINE>if (listDimensionsRequest.getMaxResults() != null) {<NEW_LINE>request.addParameter("maxResults", StringUtils.fromInteger(listDimensionsRequest.getMaxResults()));<NEW_LINE>}<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.0");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.setHttpMethod(HttpMethodName.GET);
1,843,268
private void replaceFileManagerJdk9(Context context, JavaFileManager newFiler) {<NEW_LINE>try {<NEW_LINE>JavaCompiler compiler = (JavaCompiler) Permit.invoke(Permit.getMethod(JavaCompiler.class, "instance", Context.class), null, context);<NEW_LINE>try {<NEW_LINE>Field fileManagerField = Permit.getField(JavaCompiler.class, "fileManager");<NEW_LINE>Permit.<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Field writerField = Permit.getField(JavaCompiler.class, "writer");<NEW_LINE>ClassWriter writer = (ClassWriter) writerField.get(compiler);<NEW_LINE>Field fileManagerField = Permit.getField(ClassWriter.class, "fileManager");<NEW_LINE>Permit.set(fileManagerField, writer, newFiler);<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>}
set(fileManagerField, compiler, newFiler);
903,022
private void threeWayStringQuickSort(String[] array, int low, int high, int digit) {<NEW_LINE>if (low >= high) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int lowerThan = low;<NEW_LINE>int greaterThan = high;<NEW_LINE>int pivot = charAt(array[low], digit);<NEW_LINE>// If digit exists, check if it is the rightmost character accessed<NEW_LINE>if (pivot != -1 && digit > rightmostCharacterAccessed) {<NEW_LINE>rightmostCharacterAccessed = digit;<NEW_LINE>}<NEW_LINE>int index = low + 1;<NEW_LINE>while (index <= greaterThan) {<NEW_LINE>int currentChar = charAt<MASK><NEW_LINE>if (currentChar < pivot) {<NEW_LINE>ArrayUtil.exchange(array, lowerThan++, index++);<NEW_LINE>} else if (currentChar > pivot) {<NEW_LINE>ArrayUtil.exchange(array, index, greaterThan--);<NEW_LINE>} else {<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Now array[low..lowerThan - 1] < pivot = array[lowerThan..greaterThan] < array[greaterThan + 1..high]<NEW_LINE>threeWayStringQuickSort(array, low, lowerThan - 1, digit);<NEW_LINE>if (pivot >= 0) {<NEW_LINE>threeWayStringQuickSort(array, lowerThan, greaterThan, digit + 1);<NEW_LINE>}<NEW_LINE>threeWayStringQuickSort(array, greaterThan + 1, high, digit);<NEW_LINE>}
(array[index], digit);
1,263,332
public void mergeUserPrivileges(PolarAccountInfo other) {<NEW_LINE>instPriv.mergePriv(other.instPriv, PrivManageType.GRANT_PRIVILEGE);<NEW_LINE>for (String dbKey : other.getDbPrivMap().keySet()) {<NEW_LINE>PolarDbPriv <MASK><NEW_LINE>PolarDbPriv otherDbPriv = other.dbPrivMap.get(dbKey);<NEW_LINE>if (curDbPriv == null) {<NEW_LINE>dbPrivMap.put(dbKey, otherDbPriv);<NEW_LINE>} else {<NEW_LINE>curDbPriv.mergePriv(otherDbPriv, PrivManageType.GRANT_PRIVILEGE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (String tableKey : other.getTbPrivMap().keySet()) {<NEW_LINE>PolarTbPriv curTablePriv = tbPrivMap.get(tableKey);<NEW_LINE>PolarTbPriv otherTablePriv = other.tbPrivMap.get(tableKey);<NEW_LINE>if (curTablePriv == null) {<NEW_LINE>tbPrivMap.put(tableKey, otherTablePriv);<NEW_LINE>} else {<NEW_LINE>curTablePriv.mergePriv(otherTablePriv, PrivManageType.GRANT_PRIVILEGE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
curDbPriv = dbPrivMap.get(dbKey);
939,111
protected boolean post_default_network_rules(final Connect conn, final String vmName, final NicTO nic, final Long vmId, final InetAddress dhcpServerIp, final String hostIp, final String hostMacAddr) {<NEW_LINE>if (!_canBridgeFirewall) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final List<InterfaceDef> intfs = getInterfaces(conn, vmName);<NEW_LINE>if (intfs.size() < nic.getDeviceId()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final InterfaceDef intf = intfs.get(nic.getDeviceId());<NEW_LINE>final String brname = intf.getBrName();<NEW_LINE>final String vif = intf.getDevName();<NEW_LINE>final Script cmd = new Script(_securityGroupPath, _timeout, s_logger);<NEW_LINE>cmd.add("post_default_network_rules");<NEW_LINE>cmd.add("--vmname", vmName);<NEW_LINE>cmd.add("--vmid", vmId.toString());<NEW_LINE>cmd.add(<MASK><NEW_LINE>cmd.add("--vmmac", nic.getMac());<NEW_LINE>cmd.add("--vif", vif);<NEW_LINE>cmd.add("--brname", brname);<NEW_LINE>if (dhcpServerIp != null) {<NEW_LINE>cmd.add("--dhcpSvr", dhcpServerIp.getHostAddress());<NEW_LINE>}<NEW_LINE>cmd.add("--hostIp", hostIp);<NEW_LINE>cmd.add("--hostMacAddr", hostMacAddr);<NEW_LINE>final String result = cmd.execute();<NEW_LINE>if (result != null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
"--vmip", nic.getIp());
94,448
public void marshall(CreateInstanceRequest createInstanceRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createInstanceRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getStackId(), STACKID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getLayerIds(), LAYERIDS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getInstanceType(), INSTANCETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getAutoScalingType(), AUTOSCALINGTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getHostname(), HOSTNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getOs(), OS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getAmiId(), AMIID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getSshKeyName(), SSHKEYNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getAvailabilityZone(), AVAILABILITYZONE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getVirtualizationType(), VIRTUALIZATIONTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getArchitecture(), ARCHITECTURE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getRootDeviceType(), ROOTDEVICETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getBlockDeviceMappings(), BLOCKDEVICEMAPPINGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getInstallUpdatesOnBoot(), INSTALLUPDATESONBOOT_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getEbsOptimized(), EBSOPTIMIZED_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getAgentVersion(), AGENTVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createInstanceRequest.getTenancy(), TENANCY_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createInstanceRequest.getSubnetId(), SUBNETID_BINDING);
535,261
private static ErrorDescription hint(HintContext ctx, String bundleKey) {<NEW_LINE>TreePath annotationPath = ctx.getVariables().get("$annotation");<NEW_LINE>Element annotation = ctx.getInfo().getTrees().getElement(annotationPath);<NEW_LINE>if (annotation == null || annotation.getKind() != ElementKind.ANNOTATION_TYPE) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>for (AnnotationMirror am : annotation.getAnnotationMirrors()) {<NEW_LINE>Name fqn = ((TypeElement) am.getAnnotationType().asElement()).getQualifiedName();<NEW_LINE>if (fqn.contentEquals(Retention.class.getName())) {<NEW_LINE>for (Entry<? extends ExecutableElement, ? extends AnnotationValue> e : am.getElementValues().entrySet()) {<NEW_LINE>if (e.getKey().getSimpleName().contentEquals("value")) {<NEW_LINE>Object val = e.getValue().getValue();<NEW_LINE>if (val instanceof VariableElement && ((VariableElement) val).getKind() == ElementKind.ENUM_CONSTANT) {<NEW_LINE>VariableElement ve = (VariableElement) val;<NEW_LINE>if (ve.getSimpleName().contentEquals(RetentionPolicy.RUNTIME.name())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String fqn = ((TypeElement) annotation)<MASK><NEW_LINE>return ErrorDescriptionFactory.forName(ctx, annotationPath, NbBundle.getMessage(AnnotationsNotRuntime.class, bundleKey, fqn));<NEW_LINE>}
.getQualifiedName().toString();
841,343
private static void registerManagedAllocationIntrinsics() {<NEW_LINE>// handle functions (first name is official, second name is deprecated and for compatibility<NEW_LINE>add("_graalvm_llvm_create_handle", "truffle_handle_for_managed", (args, nodeFactory) -> GraalVMCreateHandleNodeGen.create(args.get(1)));<NEW_LINE>add("_graalvm_llvm_resolve_handle", "truffle_managed_from_handle", (args, nodeFactory) -> GraalVMResolveHandleNodeGen.create(args.get(1)));<NEW_LINE>add("_graalvm_llvm_release_handle", "truffle_release_handle", (args, nodeFactory) -> GraalVMReleaseHandleNodeGen.create(args.get(1)));<NEW_LINE>add("_graalvm_llvm_create_deref_handle", "truffle_deref_handle_for_managed", (args, nodeFactory) -> GraalVMCreateDerefHandleNodeGen.create(<MASK><NEW_LINE>add("_graalvm_llvm_is_handle", "truffle_is_handle_to_managed", (args, nodeFactory) -> GraalVMIsHandleNodeGen.create(args.get(1)));<NEW_LINE>add("_graalvm_llvm_points_to_handle_space", (args, nodeFactory) -> GraalVMPointsToHandleSpaceNodeGen.create(args.get(1)));<NEW_LINE>add("_graalvm_llvm_resolve_function", (args, nodeFactory) -> GraalVMResolveFunctionNodeGen.create(args.get(1)));<NEW_LINE>// deprecated<NEW_LINE>add("truffle_cannot_be_handle", (args, nodeFactory) -> LLVMTruffleCannotBeHandle.create(args.get(1)));<NEW_LINE>add("truffle_managed_malloc", (args, nodeFactory) -> LLVMTruffleManagedMallocNodeGen.create(args.get(1)));<NEW_LINE>add("truffle_assign_managed", (args, nodeFactory) -> LLVMTruffleWriteManagedToSymbolNodeGen.create(args.get(1), args.get(2)));<NEW_LINE>add("truffle_virtual_malloc", (args, nodeFactory) -> LLVMVirtualMallocNodeGen.create(args.get(1)));<NEW_LINE>}
args.get(1)));
397,535
void retryOnException() {<NEW_LINE>Predicate<Throwable> rateLimitPredicate = rle -> (rle instanceof RateLimitExceededException) && "RL-101".equals(((RateLimitExceededException) rle).getErrorCode());<NEW_LINE>RetryConfig config = RetryConfig.custom().maxAttempts(3).waitDuration(Duration.of(1, SECONDS)).retryOnException(rateLimitPredicate).build();<NEW_LINE>RetryRegistry registry = RetryRegistry.of(config);<NEW_LINE>Retry retry = <MASK><NEW_LINE>FlightSearchService service = new FlightSearchService();<NEW_LINE>service.setPotentialFailure(new RateLimitFailNTimes(2));<NEW_LINE>SearchRequest request = new SearchRequest("NYC", "LAX", "07/31/2020");<NEW_LINE>List<Flight> flights = retry.executeSupplier(() -> service.searchFlights(request));<NEW_LINE>System.out.println(flights);<NEW_LINE>}
registry.retry("flightSearchService", config);
1,706,286
public static JRPrintHyperlink evaluateHyperlink(JRHyperlink hyperlink, JRFillExpressionEvaluator expressionEvaluator, byte evaluationType) throws JRException {<NEW_LINE>if (hyperlink == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Boolean hyperlinkWhen = (Boolean) expressionEvaluator.evaluate(hyperlink.getHyperlinkWhenExpression(), evaluationType);<NEW_LINE>if (hyperlink.getHyperlinkWhenExpression() != null && !Boolean.TRUE.equals(hyperlinkWhen)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>JRBasePrintHyperlink printHyperlink = new JRBasePrintHyperlink();<NEW_LINE>printHyperlink.setLinkType(hyperlink.getLinkType());<NEW_LINE>printHyperlink.setLinkTarget(hyperlink.getLinkTarget());<NEW_LINE>printHyperlink.setHyperlinkReference((String) expressionEvaluator.evaluate(hyperlink.getHyperlinkReferenceExpression(), evaluationType));<NEW_LINE>printHyperlink.setHyperlinkAnchor((String) expressionEvaluator.evaluate(hyperlink<MASK><NEW_LINE>printHyperlink.setHyperlinkPage((Integer) expressionEvaluator.evaluate(hyperlink.getHyperlinkPageExpression(), evaluationType));<NEW_LINE>printHyperlink.setHyperlinkTooltip((String) expressionEvaluator.evaluate(hyperlink.getHyperlinkTooltipExpression(), evaluationType));<NEW_LINE>printHyperlink.setHyperlinkParameters(evaluateHyperlinkParameters(hyperlink, expressionEvaluator, evaluationType));<NEW_LINE>return printHyperlink;<NEW_LINE>}
.getHyperlinkAnchorExpression(), evaluationType));
125,979
private void installGroovySemanticHighlighting() {<NEW_LINE>try {<NEW_LINE>semanticReconciler = new GroovySemanticReconciler();<NEW_LINE>// fReconcilingListeners.getListeners() contains fSemanticManager.getReconciler()<NEW_LINE>org.eclipse.core.runtime.ListenerList<IJavaReconcilingListener> list = ReflectionUtils.throwableGetPrivateField(CompilationUnitEditor.class, "fReconcilingListeners", this);<NEW_LINE>synchronized (list) {<NEW_LINE>Object[] listeners = list.getListeners();<NEW_LINE>for (int i = 0, n = listeners.length; i < n; i += 1) {<NEW_LINE>if (listeners[i] == fSemanticManager.getReconciler()) {<NEW_LINE>listeners[i] = semanticReconciler;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>fSemanticManager.uninstall();<NEW_LINE>semanticReconciler.install(this, (JavaSourceViewer) getSourceViewer());<NEW_LINE>ReflectionUtils.throwableExecutePrivateMethod(CompilationUnitEditor.class, "addReconcileListener", new Class[] { IJavaReconcilingListener.class }, this, <MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>GroovyPlugin.getDefault().logError("GroovyEditor: failed to install semantic reconciler", e);<NEW_LINE>}<NEW_LINE>}
new Object[] { semanticReconciler });
1,075,116
public static void main(String[] args) throws IOException {<NEW_LINE>// Use the factory to get Cex.IO exchange API using default settings<NEW_LINE>Exchange exchange = ExchangeFactory.INSTANCE.createExchange(CexIOExchange.class);<NEW_LINE>// Interested in the public market data feed (no authentication)<NEW_LINE>MarketDataService marketDataService = exchange.getMarketDataService();<NEW_LINE>// Get the latest ticker data showing BTC to USD<NEW_LINE>Ticker ticker = marketDataService.getTicker(new CurrencyPair(Currency.BTC, Currency.USD));<NEW_LINE>System.out.println("Pair: " + ticker.getCurrencyPair());<NEW_LINE>System.out.println("Last: " + ticker.getLast());<NEW_LINE>System.out.println("Volume: " + ticker.getVolume());<NEW_LINE>System.out.println("High: " + ticker.getHigh());<NEW_LINE>System.out.println("Low: " + ticker.getLow());<NEW_LINE>System.out.println("Bid: " + ticker.getBid());<NEW_LINE>System.out.println(<MASK><NEW_LINE>System.out.println("Timestamp: " + ticker.getTimestamp());<NEW_LINE>}
"Ask: " + ticker.getAsk());
1,286,233
public static void down(GrayS32 input, GrayS32 output) {<NEW_LINE>int maxY = input.height - input.height % 2;<NEW_LINE>int maxX = input.width - input.width % 2;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxY, 2, y -> {<NEW_LINE>for (int y = 0; y < maxY; y += 2) {<NEW_LINE>int indexOut = output.startIndex + (y / 2) * output.stride;<NEW_LINE>int indexIn0 = input.startIndex + y * input.stride;<NEW_LINE>int indexIn1 = indexIn0 + input.stride;<NEW_LINE>for (int x = 0; x < maxX; x += 2) {<NEW_LINE>int total = input.data[indexIn0++];<NEW_LINE>total += input.data[indexIn0++];<NEW_LINE>total += input.data[indexIn1++];<NEW_LINE>total += input.data[indexIn1++];<NEW_LINE>output.data[indexOut++] = (<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>if (maxX != input.width) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxY, 2, y -> {<NEW_LINE>for (int y = 0; y < maxY; y += 2) {<NEW_LINE>int indexOut = output.startIndex + (y / 2) * output.stride + output.width - 1;<NEW_LINE>int indexIn0 = input.startIndex + y * input.stride + maxX;<NEW_LINE>int indexIn1 = indexIn0 + input.stride;<NEW_LINE>int total = input.data[indexIn0];<NEW_LINE>total += input.data[indexIn1];<NEW_LINE>output.data[indexOut] = ((total + 1) / 2);<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}<NEW_LINE>if (maxY != input.height) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxX, 2, x -> {<NEW_LINE>for (int x = 0; x < maxX; x += 2) {<NEW_LINE>int indexOut = output.startIndex + (output.height - 1) * output.stride + x / 2;<NEW_LINE>int indexIn0 = input.startIndex + (input.height - 1) * input.stride + x;<NEW_LINE>int total = input.data[indexIn0++];<NEW_LINE>total += input.data[indexIn0++];<NEW_LINE>output.data[indexOut++] = ((total + 1) / 2);<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}<NEW_LINE>if (maxX != input.width && maxY != input.height) {<NEW_LINE>int indexOut = output.startIndex + (output.height - 1) * output.stride + output.width - 1;<NEW_LINE>int indexIn = input.startIndex + (input.height - 1) * input.stride + input.width - 1;<NEW_LINE>output.data[indexOut] = input.data[indexIn];<NEW_LINE>}<NEW_LINE>}
(total + 2) / 4);
973,639
public static void vertical9(Kernel1D_S32 kernel, GrayU16 src, GrayI16 dst, int divisor, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>final short[] dataSrc = src.data;<NEW_LINE>final short[] dataDst = dst.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kernel.data[3];<NEW_LINE>final int k5 = kernel.data[4];<NEW_LINE>final int k6 = kernel.data[5];<NEW_LINE>final int k7 = kernel.data[6];<NEW_LINE>final int k8 = kernel.data[7];<NEW_LINE>final int k9 = kernel.data[8];<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int imgWidth = dst.getWidth();<NEW_LINE>final int imgHeight = dst.getHeight();<NEW_LINE>final int halfDivisor = divisor / 2;<NEW_LINE>final int yEnd = imgHeight - radius;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(radius, yEnd, y -> {<NEW_LINE>for (int y = radius; y < yEnd; y++) {<NEW_LINE>int indexDst = dst.startIndex + y * dst.stride;<NEW_LINE>int i = src.startIndex + (y - radius) * src.stride;<NEW_LINE>final int iEnd = i + imgWidth;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>int total = (dataSrc<MASK><NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * k2;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * k3;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * k4;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * k5;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * k6;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * k7;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * k8;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * k9;<NEW_LINE>dataDst[indexDst++] = (short) ((total + halfDivisor) / divisor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
[indexSrc] & 0xFFFF) * k1;
128,763
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {<NEW_LINE>// Get URI<NEW_LINE>String uri = "";<NEW_LINE>if (request instanceof HttpServletRequest) {<NEW_LINE>HttpServletRequest req = (HttpServletRequest) request;<NEW_LINE>uri = req.getRequestURI();<NEW_LINE>}<NEW_LINE>// Ignore static content<NEW_LINE>boolean check = uri.indexOf("Servlet") != -1;<NEW_LINE>boolean pass = true;<NEW_LINE>// We need to check<NEW_LINE>if (check) {<NEW_LINE>String enc = request.getCharacterEncoding();<NEW_LINE>try {<NEW_LINE>enc = request.getCharacterEncoding();<NEW_LINE>if (enc == null)<NEW_LINE>request.setCharacterEncoding(WebEnv.ENCODING);<NEW_LINE>if (enc == null)<NEW_LINE>log.finer("Checked=" + uri);<NEW_LINE>else<NEW_LINE>log.finer("Checked=" + uri + " - Enc=" + enc);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.log(Level.SEVERE, "Set CharacterEndocung=" + enc + "->" + WebEnv.ENCODING, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// else<NEW_LINE>// log.finer("NotChecked=" + uri);<NEW_LINE>// ** Start **<NEW_LINE>if (pass)<NEW_LINE>chain.doFilter(request, response);<NEW_LINE>else {<NEW_LINE>log.warning("Rejected " + uri);<NEW_LINE>String msg = "Error: Access Rejected";<NEW_LINE>WebDoc doc = WebDoc.create(msg);<NEW_LINE>// Body<NEW_LINE>body b = doc.getBody();<NEW_LINE>b.addElement(new p<MASK><NEW_LINE>// fini<NEW_LINE>response.setContentType("text/html");<NEW_LINE>PrintWriter out = new PrintWriter(response.getOutputStream());<NEW_LINE>doc.output(out);<NEW_LINE>out.close();<NEW_LINE>}<NEW_LINE>}
(uri, AlignType.CENTER));
445,391
@ResponseBody<NEW_LINE>public PersistableProductReview createProductReview(@PathVariable final String store, @Valid @RequestBody PersistableProductReview review, HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>try {<NEW_LINE>MerchantStore merchantStore = (MerchantStore) request.getAttribute(Constants.MERCHANT_STORE);<NEW_LINE>if (merchantStore != null) {<NEW_LINE>if (!merchantStore.getCode().equals(store)) {<NEW_LINE>merchantStore = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (merchantStore == null) {<NEW_LINE>merchantStore = merchantStoreService.getByCode(store);<NEW_LINE>}<NEW_LINE>if (merchantStore == null) {<NEW_LINE>LOGGER.error("Merchant store is null for code " + store);<NEW_LINE>response.sendError(500, "Merchant store is null for code " + store);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// rating already exist<NEW_LINE>ProductReview prodReview = productReviewService.getByProductAndCustomer(review.getProductId(), review.getCustomerId());<NEW_LINE>if (prodReview != null) {<NEW_LINE>response.sendError(500, "A review already exist for this customer and product");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// rating maximum 5<NEW_LINE>if (review.getRating() > Constants.MAX_REVIEW_RATING_SCORE) {<NEW_LINE>response.sendError(503, "Maximum rating score is " + Constants.MAX_REVIEW_RATING_SCORE);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>PersistableProductReviewPopulator populator = new PersistableProductReviewPopulator();<NEW_LINE>populator.setLanguageService(languageService);<NEW_LINE>populator.setCustomerService(customerService);<NEW_LINE>populator.setProductService(productService);<NEW_LINE>com.salesmanager.core.model.catalog.product.review.ProductReview rev = new com.salesmanager.core.model.catalog.product.review.ProductReview();<NEW_LINE>populator.populate(review, rev, <MASK><NEW_LINE>productReviewService.create(rev);<NEW_LINE>review.setId(rev.getId());<NEW_LINE>return review;<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.error("Error while saving product review", e);<NEW_LINE>try {<NEW_LINE>response.sendError(503, "Error while saving product review" + e.getMessage());<NEW_LINE>} catch (Exception ignore) {<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
merchantStore, merchantStore.getDefaultLanguage());
1,377,151
// fromContentlet.<NEW_LINE>@CloseDBIfOpened<NEW_LINE>@Override<NEW_LINE>public void validateVanityUrl(final Contentlet contentlet) {<NEW_LINE>final Language language = Try.of(() -> WebAPILocator.getLanguageWebAPI().getLanguage(HttpServletRequestThreadLocal.INSTANCE.getRequest())).getOrElse(APILocator.getLanguageAPI().getDefaultLanguage());<NEW_LINE>// check fields<NEW_LINE>checkMissingField(contentlet, language, VanityUrlContentType.ACTION_FIELD_VAR);<NEW_LINE>checkMissingField(contentlet, language, VanityUrlContentType.URI_FIELD_VAR);<NEW_LINE>checkMissingField(contentlet, language, VanityUrlContentType.FORWARD_TO_FIELD_VAR);<NEW_LINE>checkMissingField(contentlet, language, VanityUrlContentType.SITE_FIELD_VAR);<NEW_LINE>checkMissingField(<MASK><NEW_LINE>checkMissingField(contentlet, language, VanityUrlContentType.ORDER_FIELD_VAR);<NEW_LINE>final Integer action = (int) contentlet.getLongProperty(VanityUrlContentType.ACTION_FIELD_VAR);<NEW_LINE>final String uri = contentlet.getStringProperty(VanityUrlContentType.URI_FIELD_VAR);<NEW_LINE>if (!this.allowedActions.contains(action)) {<NEW_LINE>throwContentletValidationError(language, "message.vanity.url.error.invalidAction");<NEW_LINE>}<NEW_LINE>if (!VanityUrlUtil.isValidRegex(uri)) {<NEW_LINE>throwContentletValidationError(language, "message.vanity.url.error.invalidURIPattern");<NEW_LINE>}<NEW_LINE>}
contentlet, language, VanityUrlContentType.TITLE_FIELD_VAR);
1,066,510
public void elemUpdate(DoubleElemUpdateFunc func) {<NEW_LINE>StorageMethod method = VectorStorageUtils.getStorageMethod(vector);<NEW_LINE>switch(method) {<NEW_LINE>case DENSE:<NEW_LINE>{<NEW_LINE>double[] values = getVector().getStorage().getValues();<NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>values[i] = func.update();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case SPARSE:<NEW_LINE>{<NEW_LINE>// Just update the exist element now!!<NEW_LINE>ObjectIterator<Entry> iter = getVector().getStorage().entryIterator();<NEW_LINE>Entry entry;<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>entry = iter.next();<NEW_LINE>entry.<MASK><NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case SORTED:<NEW_LINE>{<NEW_LINE>// Just update the exist element now!!<NEW_LINE>double[] values = getVector().getStorage().getValues();<NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>values[i] = func.update();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>throw new UnsupportedOperationException("Unsupport storage method " + method);<NEW_LINE>}<NEW_LINE>}
setValue(func.update());
1,181,413
public void marshall(CreateEnvironmentRequest createEnvironmentRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createEnvironmentRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createEnvironmentRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEnvironmentRequest.getEnvironmentAccountConnectionId(), ENVIRONMENTACCOUNTCONNECTIONID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEnvironmentRequest.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEnvironmentRequest.getProtonServiceRoleArn(), PROTONSERVICEROLEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEnvironmentRequest.getProvisioningRepository(), PROVISIONINGREPOSITORY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEnvironmentRequest.getSpec(), SPEC_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEnvironmentRequest.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEnvironmentRequest.getTemplateMajorVersion(), TEMPLATEMAJORVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createEnvironmentRequest.getTemplateName(), TEMPLATENAME_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createEnvironmentRequest.getTemplateMinorVersion(), TEMPLATEMINORVERSION_BINDING);
769,537
private void parseChunkHeader(String line, HashMap<String, String> chunkOptions) {<NEW_LINE>String modeId = display_.getModeId();<NEW_LINE>Pattern pattern = null;<NEW_LINE>if (modeId == "mode/rmarkdown")<NEW_LINE>pattern = RegexUtil.RE_RMARKDOWN_CHUNK_BEGIN;<NEW_LINE>else if (modeId == "mode/sweave")<NEW_LINE>pattern = RegexUtil.RE_SWEAVE_CHUNK_BEGIN;<NEW_LINE>else if (modeId == "mode/rhtml")<NEW_LINE>pattern = RegexUtil.RE_RHTML_CHUNK_BEGIN;<NEW_LINE>else if (modeId == "mode/r")<NEW_LINE>pattern = RegexUtil.RE_EMBEDDED_R_CHUNK_BEGIN;<NEW_LINE>if (pattern == null)<NEW_LINE>return;<NEW_LINE>Match match = pattern.match(line, 0);<NEW_LINE>if (match == null)<NEW_LINE>return;<NEW_LINE>String extracted = match.getGroup(1);<NEW_LINE>chunkPreamble_ = extractChunkPreamble(extracted, modeId);<NEW_LINE>String chunkLabel = ChunkContextUi.extractChunkLabel(extracted);<NEW_LINE>if (!StringUtil.isNullOrEmpty(chunkLabel))<NEW_LINE>tbChunkLabel_.setText(chunkLabel);<NEW_LINE>// if we had a chunk label, then we want to navigate our cursor to<NEW_LINE>// the first comma in the chunk header; otherwise, we start at the<NEW_LINE>// first space. this is done to accept chunk headers of the form<NEW_LINE>//<NEW_LINE>// ```{r message=FALSE}<NEW_LINE>//<NEW_LINE>// ie, those with no comma after the engine used<NEW_LINE>int argsStartIdx = StringUtil.isNullOrEmpty(chunkLabel) ? extracted.indexOf(' '<MASK><NEW_LINE>String arguments = extracted.substring(argsStartIdx + 1);<NEW_LINE>TextCursor cursor = new TextCursor(arguments);<NEW_LINE>// consume commas and whitespace if needed<NEW_LINE>cursor.consumeUntilRegex("[^\\s,]");<NEW_LINE>int startIndex = 0;<NEW_LINE>do {<NEW_LINE>if (!cursor.fwdToCharacter('=', false))<NEW_LINE>break;<NEW_LINE>int equalsIndex = cursor.getIndex();<NEW_LINE>int endIndex = arguments.length();<NEW_LINE>if (cursor.fwdToCharacter(',', true) || cursor.fwdToCharacter(' ', true)) {<NEW_LINE>endIndex = cursor.getIndex();<NEW_LINE>}<NEW_LINE>chunkOptions.put(arguments.substring(startIndex, equalsIndex).trim(), arguments.substring(equalsIndex + 1, endIndex).trim());<NEW_LINE>startIndex = cursor.getIndex() + 1;<NEW_LINE>} while (cursor.moveToNextCharacter());<NEW_LINE>}
) : extracted.indexOf(',');
599,243
public StripeResponseStream requestStream(StripeRequest request) throws ApiConnectionException {<NEW_LINE>try {<NEW_LINE>final HttpURLConnection conn = createStripeConnection(request);<NEW_LINE>// Calling `getResponseCode()` triggers the request.<NEW_LINE>final int responseCode = conn.getResponseCode();<NEW_LINE>final HttpHeaders headers = HttpHeaders.of(conn.getHeaderFields());<NEW_LINE>final InputStream responseStream = (responseCode >= 200 && responseCode < 300) ? conn.getInputStream() : conn.getErrorStream();<NEW_LINE>return new <MASK><NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new ApiConnectionException(String.format("IOException during API request to Stripe (%s): %s " + "Please check your internet connection and try again. If this problem persists," + "you should check Stripe's service status at https://twitter.com/stripestatus," + " or let us know at support@stripe.com.", Stripe.getApiBase(), e.getMessage()), e);<NEW_LINE>}<NEW_LINE>}
StripeResponseStream(responseCode, headers, responseStream);
1,153,958
public static DescribeServerCertificatesResponse unmarshall(DescribeServerCertificatesResponse describeServerCertificatesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeServerCertificatesResponse.setRequestId(_ctx.stringValue("DescribeServerCertificatesResponse.RequestId"));<NEW_LINE>List<ServerCertificate> serverCertificates = new ArrayList<ServerCertificate>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeServerCertificatesResponse.ServerCertificates.Length"); i++) {<NEW_LINE>ServerCertificate serverCertificate = new ServerCertificate();<NEW_LINE>serverCertificate.setCreateTimeStamp(_ctx.longValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].CreateTimeStamp"));<NEW_LINE>serverCertificate.setAliCloudCertificateName(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].AliCloudCertificateName"));<NEW_LINE>serverCertificate.setStandardType(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].StandardType"));<NEW_LINE>serverCertificate.setExpireTime(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].ExpireTime"));<NEW_LINE>serverCertificate.setEncryptionKeyLength(_ctx.integerValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].EncryptionKeyLength"));<NEW_LINE>serverCertificate.setCreateTime(_ctx.stringValue<MASK><NEW_LINE>serverCertificate.setServerCertificateId(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].ServerCertificateId"));<NEW_LINE>serverCertificate.setExpireTimeStamp(_ctx.longValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].ExpireTimeStamp"));<NEW_LINE>serverCertificate.setRegionId(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].RegionId"));<NEW_LINE>serverCertificate.setEncryptionAlgorithm(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].EncryptionAlgorithm"));<NEW_LINE>serverCertificate.setServerCertificateName(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].ServerCertificateName"));<NEW_LINE>serverCertificate.setFingerprint(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].Fingerprint"));<NEW_LINE>serverCertificate.setCommonName(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].CommonName"));<NEW_LINE>serverCertificate.setResourceGroupId(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].ResourceGroupId"));<NEW_LINE>serverCertificate.setRegionIdAlias(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].RegionIdAlias"));<NEW_LINE>serverCertificate.setIsAliCloudCertificate(_ctx.integerValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].IsAliCloudCertificate"));<NEW_LINE>serverCertificate.setAliCloudCertificateId(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].AliCloudCertificateId"));<NEW_LINE>List<String> subjectAlternativeNames = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].SubjectAlternativeNames.Length"); j++) {<NEW_LINE>subjectAlternativeNames.add(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].SubjectAlternativeNames[" + j + "]"));<NEW_LINE>}<NEW_LINE>serverCertificate.setSubjectAlternativeNames(subjectAlternativeNames);<NEW_LINE>List<Tag> tags = new ArrayList<Tag>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].Tags.Length"); j++) {<NEW_LINE>Tag tag = new Tag();<NEW_LINE>tag.setTagValue(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].Tags[" + j + "].TagValue"));<NEW_LINE>tag.setTagKey(_ctx.stringValue("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].Tags[" + j + "].TagKey"));<NEW_LINE>tags.add(tag);<NEW_LINE>}<NEW_LINE>serverCertificate.setTags(tags);<NEW_LINE>serverCertificates.add(serverCertificate);<NEW_LINE>}<NEW_LINE>describeServerCertificatesResponse.setServerCertificates(serverCertificates);<NEW_LINE>return describeServerCertificatesResponse;<NEW_LINE>}
("DescribeServerCertificatesResponse.ServerCertificates[" + i + "].CreateTime"));
1,364,385
public InputStream stream(java.net.URI uri, IProgressMonitor progressMonitor) throws CoreException {<NEW_LINE>WebLocation location = new WebLocation(uri.toString());<NEW_LINE>SubMonitor monitor = SubMonitor.convert(progressMonitor);<NEW_LINE>monitor.subTask(NLS.bind("Fetching {0}", location.getUrl()));<NEW_LINE>try {<NEW_LINE>HttpClient client = new HttpClient();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>org.eclipse.mylyn.commons.net.WebUtil.configureHttpClient(client, "");<NEW_LINE>boolean success = false;<NEW_LINE>GetMethod method = new GetMethod(location.getUrl());<NEW_LINE>try {<NEW_LINE>HostConfiguration hostConfiguration = org.eclipse.mylyn.commons.net.WebUtil.<MASK><NEW_LINE>int result = org.eclipse.mylyn.commons.net.WebUtil.execute(client, hostConfiguration, method, monitor);<NEW_LINE>if (result == HttpStatus.SC_OK) {<NEW_LINE>InputStream in = org.eclipse.mylyn.commons.net.WebUtil.getResponseBodyAsStream(method, monitor);<NEW_LINE>success = true;<NEW_LINE>return in;<NEW_LINE>} else {<NEW_LINE>throw toException(location, result);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw toException(location, e);<NEW_LINE>} finally {<NEW_LINE>if (!success) {<NEW_LINE>method.releaseConnection();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>monitor.done();<NEW_LINE>}<NEW_LINE>}
createHostConfiguration(client, location, monitor);
578,195
private void populateMoveLineMap(Map<List<Object>, Pair<List<MoveLine>, List<MoveLine>>> moveLineMap, List<MoveLine> reconciliableMoveLineList, boolean isCredit) {<NEW_LINE>for (MoveLine moveLine : reconciliableMoveLineList) {<NEW_LINE>Move move = moveLine.getMove();<NEW_LINE>List<Object> keys = new ArrayList<Object>();<NEW_LINE>keys.add(move.getCompany());<NEW_LINE>keys.add(moveLine.getAccount());<NEW_LINE>keys.add(moveLine.getPartner());<NEW_LINE>Pair<List<MoveLine>, List<MoveLine>> moveLineLists = moveLineMap.get(keys);<NEW_LINE>if (moveLineLists == null) {<NEW_LINE>moveLineLists = Pair.of(new ArrayList<>(), new ArrayList<>());<NEW_LINE>moveLineMap.put(keys, moveLineLists);<NEW_LINE>}<NEW_LINE>List<MoveLine> moveLineList = isCredit ? moveLineLists.getLeft<MASK><NEW_LINE>moveLineList.add(moveLine);<NEW_LINE>}<NEW_LINE>}
() : moveLineLists.getRight();
1,293,209
V remove(final long key, int hash, Object value) {<NEW_LINE>lock();<NEW_LINE>try {<NEW_LINE>int c = count - 1;<NEW_LINE>HashEntry<V>[] tab = table;<NEW_LINE>int index = hash & (tab.length - 1);<NEW_LINE>HashEntry<V> first = tab[index];<NEW_LINE>HashEntry<V> e = first;<NEW_LINE>while (e != null && (e.hash != hash || key != e.<MASK><NEW_LINE>V oldValue = null;<NEW_LINE>if (e != null) {<NEW_LINE>V v = e.value;<NEW_LINE>if (value == null || value.equals(v)) {<NEW_LINE>oldValue = v;<NEW_LINE>// All entries following removed node can stay<NEW_LINE>// in list, but all preceding ones need to be<NEW_LINE>// cloned.<NEW_LINE>++modCount;<NEW_LINE>HashEntry<V> newFirst = e.next;<NEW_LINE>for (HashEntry<V> p = first; p != e; p = p.next) newFirst = new HashEntry<V>(p.key, p.hash, newFirst, p.value);<NEW_LINE>tab[index] = newFirst;<NEW_LINE>// write-volatile<NEW_LINE>count = c;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return oldValue;<NEW_LINE>} finally {<NEW_LINE>unlock();<NEW_LINE>}<NEW_LINE>}
key)) e = e.next;
193,361
final CreateConfigurationSetEventDestinationResult executeCreateConfigurationSetEventDestination(CreateConfigurationSetEventDestinationRequest createConfigurationSetEventDestinationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createConfigurationSetEventDestinationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateConfigurationSetEventDestinationRequest> request = null;<NEW_LINE>Response<CreateConfigurationSetEventDestinationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateConfigurationSetEventDestinationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createConfigurationSetEventDestinationRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Pinpoint SMS Voice");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateConfigurationSetEventDestination");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateConfigurationSetEventDestinationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateConfigurationSetEventDestinationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
96,491
public static void checkFileList(Object path) {<NEW_LINE>boolean checkSwitch = Config.getConfig().getPluginFilter();<NEW_LINE>if (path != null) {<NEW_LINE>File file = (File) Reflection.invokeMethod(path, "toFile", new Class[] {});<NEW_LINE>if (checkSwitch && !file.exists()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>HashMap<String, Object> params = null;<NEW_LINE>try {<NEW_LINE>params = new HashMap<String, Object>();<NEW_LINE>params.put("path", file.getPath());<NEW_LINE>List<String> stackInfo = StackTrace.getParamStackTraceArray();<NEW_LINE>params.put("stack", stackInfo);<NEW_LINE>try {<NEW_LINE>params.put(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>params.put("realpath", file.getAbsolutePath());<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>LogTool.traceHookWarn(t.getMessage(), t);<NEW_LINE>}<NEW_LINE>HookHandler.doCheck(CheckParameter.Type.DIRECTORY, params);<NEW_LINE>}<NEW_LINE>}
"realpath", file.getCanonicalPath());
1,774,938
protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap, BpmnJsonConverterContext converterContext) {<NEW_LINE>HttpServiceTask task = new HttpServiceTask();<NEW_LINE>task.setType("http");<NEW_LINE>String <MASK><NEW_LINE>if (StringUtils.isNotEmpty(parallelInSameTransaction)) {<NEW_LINE>task.setParallelInSameTransaction(Boolean.parseBoolean(parallelInSameTransaction));<NEW_LINE>}<NEW_LINE>addField("requestMethod", PROPERTY_HTTPTASK_REQ_METHOD, "GET", elementNode, task);<NEW_LINE>addField("requestUrl", PROPERTY_HTTPTASK_REQ_URL, elementNode, task);<NEW_LINE>addField("requestHeaders", PROPERTY_HTTPTASK_REQ_HEADERS, elementNode, task);<NEW_LINE>addField("requestBody", PROPERTY_HTTPTASK_REQ_BODY, elementNode, task);<NEW_LINE>addField("requestBodyEncoding", PROPERTY_HTTPTASK_REQ_BODY_ENCODING, elementNode, task);<NEW_LINE>addField("requestTimeout", PROPERTY_HTTPTASK_REQ_TIMEOUT, elementNode, task);<NEW_LINE>addField("disallowRedirects", PROPERTY_HTTPTASK_REQ_DISALLOW_REDIRECTS, elementNode, task);<NEW_LINE>addField("failStatusCodes", PROPERTY_HTTPTASK_REQ_FAIL_STATUS_CODES, elementNode, task);<NEW_LINE>addField("handleStatusCodes", PROPERTY_HTTPTASK_REQ_HANDLE_STATUS_CODES, elementNode, task);<NEW_LINE>addField("responseVariableName", PROPERTY_HTTPTASK_RESPONSE_VARIABLE_NAME, elementNode, task);<NEW_LINE>addField("ignoreException", PROPERTY_HTTPTASK_REQ_IGNORE_EXCEPTION, elementNode, task);<NEW_LINE>addField("saveRequestVariables", PROPERTY_HTTPTASK_SAVE_REQUEST_VARIABLES, elementNode, task);<NEW_LINE>addField("saveResponseParameters", PROPERTY_HTTPTASK_SAVE_RESPONSE_PARAMETERS, elementNode, task);<NEW_LINE>addField("resultVariablePrefix", PROPERTY_HTTPTASK_RESULT_VARIABLE_PREFIX, elementNode, task);<NEW_LINE>addField("saveResponseParametersTransient", PROPERTY_HTTPTASK_SAVE_RESPONSE_TRANSIENT, elementNode, task);<NEW_LINE>addField("saveResponseVariableAsJson", PROPERTY_HTTPTASK_SAVE_RESPONSE_AS_JSON, elementNode, task);<NEW_LINE>task.setSkipExpression(getPropertyValueAsString(PROPERTY_SKIP_EXPRESSION, elementNode));<NEW_LINE>return task;<NEW_LINE>}
parallelInSameTransaction = getPropertyValueAsString(PROPERTY_HTTPTASK_PARALLEL_IN_SAME_TRANSACTION, elementNode);
1,553,046
public static DescribeBindersResponse unmarshall(DescribeBindersResponse describeBindersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBindersResponse.setRequestId(_ctx.stringValue("DescribeBindersResponse.RequestId"));<NEW_LINE>describeBindersResponse.setErrorMessage(_ctx.stringValue("DescribeBindersResponse.ErrorMessage"));<NEW_LINE>describeBindersResponse.setErrorCode(_ctx.stringValue("DescribeBindersResponse.ErrorCode"));<NEW_LINE>describeBindersResponse.setTotalCount(_ctx.integerValue("DescribeBindersResponse.TotalCount"));<NEW_LINE>describeBindersResponse.setMessage(_ctx.stringValue("DescribeBindersResponse.Message"));<NEW_LINE>describeBindersResponse.setPageSize(_ctx.integerValue("DescribeBindersResponse.PageSize"));<NEW_LINE>describeBindersResponse.setDynamicCode(_ctx.stringValue("DescribeBindersResponse.DynamicCode"));<NEW_LINE>describeBindersResponse.setCode(_ctx.stringValue("DescribeBindersResponse.Code"));<NEW_LINE>describeBindersResponse.setDynamicMessage(_ctx.stringValue("DescribeBindersResponse.DynamicMessage"));<NEW_LINE>describeBindersResponse.setPageNumber(_ctx.integerValue("DescribeBindersResponse.PageNumber"));<NEW_LINE>describeBindersResponse.setSuccess(_ctx.booleanValue("DescribeBindersResponse.Success"));<NEW_LINE>List<EslItemBindInfo> eslItemBindInfos = new ArrayList<EslItemBindInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeBindersResponse.EslItemBindInfos.Length"); i++) {<NEW_LINE>EslItemBindInfo eslItemBindInfo = new EslItemBindInfo();<NEW_LINE>eslItemBindInfo.setPromotionText(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].PromotionText"));<NEW_LINE>eslItemBindInfo.setBindId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].BindId"));<NEW_LINE>eslItemBindInfo.setStoreId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].StoreId"));<NEW_LINE>eslItemBindInfo.setTemplateId(_ctx.stringValue<MASK><NEW_LINE>eslItemBindInfo.setEslPic(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslPic"));<NEW_LINE>eslItemBindInfo.setEslStatus(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslStatus"));<NEW_LINE>eslItemBindInfo.setItemTitle(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ItemTitle"));<NEW_LINE>eslItemBindInfo.setOriginalPrice(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].OriginalPrice"));<NEW_LINE>eslItemBindInfo.setTemplateSceneId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].TemplateSceneId"));<NEW_LINE>eslItemBindInfo.setGmtModified(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].GmtModified"));<NEW_LINE>eslItemBindInfo.setActionPrice(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ActionPrice"));<NEW_LINE>eslItemBindInfo.setPriceUnit(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].PriceUnit"));<NEW_LINE>eslItemBindInfo.setEslConnectAp(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslConnectAp"));<NEW_LINE>eslItemBindInfo.setSkuId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].SkuId"));<NEW_LINE>eslItemBindInfo.setEslBarCode(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslBarCode"));<NEW_LINE>eslItemBindInfo.setItemShortTitle(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ItemShortTitle"));<NEW_LINE>eslItemBindInfo.setBePromotion(_ctx.booleanValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].BePromotion"));<NEW_LINE>eslItemBindInfo.setEslModel(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslModel"));<NEW_LINE>eslItemBindInfo.setItemBarCode(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ItemBarCode"));<NEW_LINE>eslItemBindInfo.setItemId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ItemId"));<NEW_LINE>eslItemBindInfo.setPromotionStart(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].PromotionStart"));<NEW_LINE>eslItemBindInfo.setPromotionEnd(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].PromotionEnd"));<NEW_LINE>eslItemBindInfos.add(eslItemBindInfo);<NEW_LINE>}<NEW_LINE>describeBindersResponse.setEslItemBindInfos(eslItemBindInfos);<NEW_LINE>return describeBindersResponse;<NEW_LINE>}
("DescribeBindersResponse.EslItemBindInfos[" + i + "].TemplateId"));
535,200
private void resolveSpecialization(JMethod method) {<NEW_LINE>// TODO (cromwellian): Move to GwtAstBuilder eventually<NEW_LINE>if (method.getSpecialization() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Specialization specialization = method.getSpecialization();<NEW_LINE>if (specialization.getParams() == null) {<NEW_LINE>logger.log(Type.ERROR, "Missing 'params' attribute at @SpecializeMethod for method " + method.getQualifiedName());<NEW_LINE>errorsFound = true;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<JType> resolvedParams = <MASK><NEW_LINE>JType resolvedReturn = translate(specialization.getReturns());<NEW_LINE>String targetMethodSignature = JjsUtils.computeSignature(specialization.getTarget(), resolvedParams, resolvedReturn, false);<NEW_LINE>JMethod targetMethod = JMethod.getExternalizedMethod(method.getEnclosingType().getName(), targetMethodSignature, false);<NEW_LINE>JMethod resolvedTargetMethod = translate(method.getSourceInfo(), targetMethod);<NEW_LINE>if (resolvedTargetMethod.isExternal()) {<NEW_LINE>error(method.getSourceInfo(), "Unable to locate @SpecializeMethod target " + targetMethodSignature + " for method " + method.getQualifiedName());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>flowInto(resolvedTargetMethod);<NEW_LINE>specialization.resolve(resolvedParams, resolvedReturn, resolvedTargetMethod);<NEW_LINE>}
translate(specialization.getParams());
1,325,474
private OptionType type(ConfiguredOptionData annotation, ExecutableElement element) {<NEW_LINE>if (annotation.type == null || annotation.type.equals(CONFIGURED_OPTION_CLASS)) {<NEW_LINE>// guess from method<NEW_LINE>List<? extends VariableElement> parameters = element.getParameters();<NEW_LINE>if (parameters.size() != 1) {<NEW_LINE>messager.printMessage(Diagnostic.Kind.ERROR, "Method " + element + " is annotated with @Configured, " + "yet it does not have explicit type, or exactly one parameter", element);<NEW_LINE>throw new IllegalStateException("Could not determine property type");<NEW_LINE>} else {<NEW_LINE>VariableElement parameter = parameters.iterator().next();<NEW_LINE>TypeMirror paramType = parameter.asType();<NEW_LINE>TypeMirror erasedType = typeUtils.erasure(paramType);<NEW_LINE>if (typeUtils.isSameType(erasedType, erasedListType) || typeUtils.isSameType(erasedType, erasedSetType) || typeUtils.isSameType(erasedType, erasedIterableType)) {<NEW_LINE>DeclaredType type = (DeclaredType) paramType;<NEW_LINE>TypeMirror genericType = type.getTypeArguments().get(0);<NEW_LINE>return new OptionType(genericType.toString(), "LIST");<NEW_LINE>}<NEW_LINE>if (typeUtils.isSameType(erasedType, erasedMapType)) {<NEW_LINE>DeclaredType type = (DeclaredType) paramType;<NEW_LINE>TypeMirror genericType = type.getTypeArguments().get(1);<NEW_LINE>return new OptionType(genericType.toString(), "MAP");<NEW_LINE>}<NEW_LINE>String typeName;<NEW_LINE>if (paramType instanceof PrimitiveType) {<NEW_LINE>typeName = typeUtils.boxedClass((<MASK><NEW_LINE>} else {<NEW_LINE>typeName = paramType.toString();<NEW_LINE>}<NEW_LINE>return new OptionType(typeName, annotation.kind);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// use the one defined on annotation<NEW_LINE>return new OptionType(annotation.type, annotation.kind);<NEW_LINE>}<NEW_LINE>}
PrimitiveType) paramType).toString();
34,724
public MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) {<NEW_LINE>String sql;<NEW_LINE>SqlMethod sqlMethod = SqlMethod.LOGIC_DELETE;<NEW_LINE>if (tableInfo.isWithLogicDelete()) {<NEW_LINE>sql = String.format(sqlMethod.getSql(), tableInfo.getTableName(), sqlLogicSet(tableInfo), sqlWhereEntityWrapper(true, tableInfo), sqlComment());<NEW_LINE>SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass);<NEW_LINE>return addUpdateMappedStatement(mapperClass, modelClass, getMethod(sqlMethod), sqlSource);<NEW_LINE>} else {<NEW_LINE>sqlMethod = SqlMethod.DELETE;<NEW_LINE>sql = String.format(sqlMethod.getSql(), tableInfo.getTableName(), sqlWhereEntityWrapper(true<MASK><NEW_LINE>SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass);<NEW_LINE>return this.addDeleteMappedStatement(mapperClass, getMethod(sqlMethod), sqlSource);<NEW_LINE>}<NEW_LINE>}
, tableInfo), sqlComment());
1,486,189
public static String parseInlineEmotes(String markdown, JSONObject mediaMetadataObject) throws JSONException {<NEW_LINE><MASK><NEW_LINE>if (mediaMetadataNames != null) {<NEW_LINE>for (int i = 0; i < mediaMetadataNames.length(); i++) {<NEW_LINE>if (!mediaMetadataNames.isNull(i)) {<NEW_LINE>String mediaMetadataKey = mediaMetadataNames.getString(i);<NEW_LINE>if (mediaMetadataObject.isNull(mediaMetadataKey)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>JSONObject item = mediaMetadataObject.getJSONObject(mediaMetadataKey);<NEW_LINE>if (item.isNull(JSONUtils.STATUS_KEY) || !item.getString(JSONUtils.STATUS_KEY).equals("valid") || item.isNull(JSONUtils.ID_KEY) || item.isNull(JSONUtils.T_KEY) || item.isNull(JSONUtils.S_KEY)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String emote_type = item.getString(JSONUtils.T_KEY);<NEW_LINE>String emote_id = item.getString(JSONUtils.ID_KEY);<NEW_LINE>JSONObject s_key = item.getJSONObject(JSONUtils.S_KEY);<NEW_LINE>if (s_key.isNull(JSONUtils.U_KEY)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String emote_url = s_key.getString(JSONUtils.U_KEY);<NEW_LINE>markdown = markdown.replace("![img](" + emote_id + ")", "[" + emote_type + "](" + emote_url + ") ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return markdown;<NEW_LINE>}
JSONArray mediaMetadataNames = mediaMetadataObject.names();