idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
631,363
public void invoke(PHPRuleContext context, List<Hint> hints) {<NEW_LINE>PHPParseResult <MASK><NEW_LINE>if (phpParseResult.getProgram() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FileObject fileObject = phpParseResult.getSnapshot().getSource().getFileObject();<NEW_LINE>if (fileObject == null || CodeUtils.isPhpVersionLessThan(fileObject, PhpVersion.PHP_53)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (CancelSupport.getDefault().isCancelled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int caretOffset = getCaretOffset();<NEW_LINE>final BaseDocument doc = context.doc;<NEW_LINE>OffsetRange lineBounds = VerificationUtils.createLineBounds(caretOffset, doc);<NEW_LINE>if (lineBounds.containsInclusive(caretOffset)) {<NEW_LINE>CheckVisitor checkVisitor = new CheckVisitor(context, doc, lineBounds);<NEW_LINE>phpParseResult.getProgram().accept(checkVisitor);<NEW_LINE>if (CancelSupport.getDefault().isCancelled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>hints.addAll(checkVisitor.getHints());<NEW_LINE>}<NEW_LINE>}
phpParseResult = (PHPParseResult) context.parserResult;
784,483
final GetBuiltinSlotTypesResult executeGetBuiltinSlotTypes(GetBuiltinSlotTypesRequest getBuiltinSlotTypesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getBuiltinSlotTypesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetBuiltinSlotTypesRequest> request = null;<NEW_LINE>Response<GetBuiltinSlotTypesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetBuiltinSlotTypesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBuiltinSlotTypesRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBuiltinSlotTypes");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetBuiltinSlotTypesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBuiltinSlotTypesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "Lex Model Building Service");
70,456
private Mono<Response<SshPublicKeyGenerateKeyPairResultInner>> generateKeyPairWithResponseAsync(String resourceGroupName, String sshPublicKeyName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (sshPublicKeyName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter sshPublicKeyName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2020-06-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = <MASK><NEW_LINE>return service.generateKeyPair(this.client.getEndpoint(), resourceGroupName, sshPublicKeyName, apiVersion, this.client.getSubscriptionId(), accept, context);<NEW_LINE>}
this.client.mergeContext(context);
1,575,523
static void encodeAsNumpy(NDArray array, OutputStream os) throws IOException {<NEW_LINE><MASK><NEW_LINE>sb.append("{'descr': '").append(array.getDataType().asNumpy()).append("', 'fortran_order': False, 'shape': ");<NEW_LINE>long[] shape = array.getShape().getShape();<NEW_LINE>if (shape.length == 1) {<NEW_LINE>sb.append('(').append(shape[0]).append(",)");<NEW_LINE>} else {<NEW_LINE>sb.append(array.getShape());<NEW_LINE>}<NEW_LINE>sb.append(", }");<NEW_LINE>int len = sb.length() + 1;<NEW_LINE>int padding = ARRAY_ALIGN - (NUMPY_MAGIC.length + len + 4) % ARRAY_ALIGN;<NEW_LINE>ByteBuffer bb = ByteBuffer.allocate(2);<NEW_LINE>bb.order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>bb.putShort((short) (padding + len));<NEW_LINE>os.write(NUMPY_MAGIC);<NEW_LINE>os.write(1);<NEW_LINE>// version 1.0<NEW_LINE>os.write(0);<NEW_LINE>os.write(bb.array());<NEW_LINE>os.write(sb.toString().getBytes(StandardCharsets.US_ASCII));<NEW_LINE>for (int i = 0; i < padding; ++i) {<NEW_LINE>os.write(' ');<NEW_LINE>}<NEW_LINE>os.write('\n');<NEW_LINE>os.write(array.toByteArray());<NEW_LINE>}
StringBuilder sb = new StringBuilder(80);
278,040
public int compareTo(TSummaries other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetFinished(<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetFinished()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.finished, other.finished);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetSessionId()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTotalFiles(), other.isSetTotalFiles());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetTotalFiles()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalFiles, other.totalFiles);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetDeletedFiles(), other.isSetDeletedFiles());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetDeletedFiles()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deletedFiles, other.deletedFiles);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetSummaries(), other.isSetSummaries());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetSummaries()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.summaries, other.summaries);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
), other.isSetFinished());
508,982
public static NodeValue dtGetTimezone(NodeValue nv) {<NEW_LINE>DateTimeStruct dts = parseAnyDT(nv);<NEW_LINE>if (dts == null || dts.timezone == null)<NEW_LINE>throw new ExprEvalException("Not a datatype with a timezone: " + nv);<NEW_LINE>if ("".equals(dts.timezone))<NEW_LINE>return null;<NEW_LINE>if ("Z".equals(dts.timezone)) {<NEW_LINE>Node n = NodeFactory.createLiteral("PT0S", NodeFactory.getType(XSDDatatype.XSD + "#dayTimeDuration"));<NEW_LINE>return NodeValue.makeNode(n);<NEW_LINE>}<NEW_LINE>if ("+00:00".equals(dts.timezone)) {<NEW_LINE>Node n = NodeFactory.createLiteral("PT0S", NodeFactory.getType(XSDDatatype.XSD + "#dayTimeDuration"));<NEW_LINE>return NodeValue.makeNode(n);<NEW_LINE>}<NEW_LINE>if ("-00:00".equals(dts.timezone)) {<NEW_LINE>Node n = NodeFactory.createLiteral("-PT0S", NodeFactory.getType(XSDDatatype.XSD + "#dayTimeDuration"));<NEW_LINE>return NodeValue.makeNode(n);<NEW_LINE>}<NEW_LINE>String s = dts.timezone;<NEW_LINE>int idx = 0;<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (s.charAt(0) == '-')<NEW_LINE>sb.append('-');<NEW_LINE>// Skip '-' or '+'<NEW_LINE>idx++;<NEW_LINE>sb.append("PT");<NEW_LINE>digitsTwo(<MASK><NEW_LINE>idx += 2;<NEW_LINE>// The ":"<NEW_LINE>idx++;<NEW_LINE>digitsTwo(s, idx, sb, 'M');<NEW_LINE>idx += 2;<NEW_LINE>return NodeValue.makeNode(sb.toString(), null, XSDDatatype.XSD + "#dayTimeDuration");<NEW_LINE>}
s, idx, sb, 'H');
1,744,575
protected StreamMappingMethod instantiateMappingMethod(Method method, Collection<String> existingVariables, Assignment assignment, MethodReference factoryMethod, boolean mapNullToDefault, String loopVariableName, List<LifecycleCallbackMethodReference> beforeMappingMethods, List<LifecycleCallbackMethodReference> afterMappingMethods, SelectionParameters selectionParameters) {<NEW_LINE>Set<Type> helperImports = new HashSet<>();<NEW_LINE>if (method.getResultType().isIterableType()) {<NEW_LINE>helperImports.add(ctx.getTypeFactory()<MASK><NEW_LINE>}<NEW_LINE>Type sourceParameterType = first(method.getSourceParameters()).getType();<NEW_LINE>if (!sourceParameterType.isCollectionType() && !sourceParameterType.isArrayType() && sourceParameterType.isIterableType()) {<NEW_LINE>helperImports.add(ctx.getTypeFactory().getType(StreamSupport.class));<NEW_LINE>}<NEW_LINE>return new StreamMappingMethod(method, existingVariables, assignment, factoryMethod, mapNullToDefault, loopVariableName, beforeMappingMethods, afterMappingMethods, selectionParameters, helperImports);<NEW_LINE>}
.getType(Collectors.class));
763,645
public static MonthView create(ViewGroup parent, LayoutInflater inflater, DateFormat weekdayNameFormat, Listener listener, Calendar today, int dividerColor, int dayBackgroundResId, int dayTextColorResId, int titleTextStyle, boolean displayHeader, int headerTextColor, boolean displayDayNamesHeaderRowView, boolean showAlwaysDigitNumbers, List<CalendarCellDecorator> decorators, Locale locale, DayViewAdapter adapter) {<NEW_LINE>final MonthView view = (MonthView) inflater.inflate(R.layout.month, parent, false);<NEW_LINE>// Set the views<NEW_LINE>view.title = new TextView(new ContextThemeWrapper(view.getContext(), titleTextStyle));<NEW_LINE>view.grid = (CalendarGridView) view.findViewById(R.id.calendar_grid);<NEW_LINE>view.dayNamesHeaderRowView = view.findViewById(R.id.day_names_header_row);<NEW_LINE>// Add the month title as the first child of MonthView<NEW_LINE>view.addView(view.title, 0);<NEW_LINE>view.setDayViewAdapter(adapter);<NEW_LINE>view.setDividerColor(dividerColor);<NEW_LINE>view.setDayTextColor(dayTextColorResId);<NEW_LINE>view.setDisplayHeader(displayHeader);<NEW_LINE>view.setHeaderTextColor(headerTextColor);<NEW_LINE>if (dayBackgroundResId != 0) {<NEW_LINE>view.setDayBackground(dayBackgroundResId);<NEW_LINE>}<NEW_LINE>view.isRtl = getLayoutDirectionFromLocale(locale) == ViewCompat.LAYOUT_DIRECTION_RTL;<NEW_LINE>view.locale = locale;<NEW_LINE>view.alwaysDigitNumbers = showAlwaysDigitNumbers;<NEW_LINE>int firstDayOfWeek = today.getFirstDayOfWeek();<NEW_LINE>final CalendarRowView headerRow = (CalendarRowView) view.grid.getChildAt(0);<NEW_LINE>if (displayDayNamesHeaderRowView) {<NEW_LINE>final int originalDayOfWeek = today.get(Calendar.DAY_OF_WEEK);<NEW_LINE>for (int offset = 0; offset < 7; offset++) {<NEW_LINE>today.set(Calendar.DAY_OF_WEEK, getDayOfWeek(firstDayOfWeek, offset, view.isRtl));<NEW_LINE>final TextView textView = (TextView) headerRow.getChildAt(offset);<NEW_LINE>textView.setText(weekdayNameFormat.format<MASK><NEW_LINE>}<NEW_LINE>today.set(Calendar.DAY_OF_WEEK, originalDayOfWeek);<NEW_LINE>} else {<NEW_LINE>view.dayNamesHeaderRowView.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>view.listener = listener;<NEW_LINE>view.decorators = decorators;<NEW_LINE>return view;<NEW_LINE>}
(today.getTime()));
1,144,461
private void internalStreamScreen(Device device, FileDescriptor fd) throws IOException {<NEW_LINE>MediaFormat format = createFormat(bitRate, maxFps, codecOptions);<NEW_LINE>device.setRotationListener(this);<NEW_LINE>boolean alive;<NEW_LINE>try {<NEW_LINE>do {<NEW_LINE>MediaCodec codec = createCodec(encoderName);<NEW_LINE>IBinder display = createDisplay();<NEW_LINE>ScreenInfo screenInfo = device.getScreenInfo();<NEW_LINE>Rect contentRect = screenInfo.getContentRect();<NEW_LINE>// include the locked video orientation<NEW_LINE>Rect videoRect = screenInfo.getVideoSize().toRect();<NEW_LINE>// does not include the locked video orientation<NEW_LINE>Rect unlockedVideoRect = screenInfo.getUnlockedVideoSize().toRect();<NEW_LINE>int videoRotation = screenInfo.getVideoRotation();<NEW_LINE><MASK><NEW_LINE>setSize(format, videoRect.width(), videoRect.height());<NEW_LINE>configure(codec, format);<NEW_LINE>Surface surface = codec.createInputSurface();<NEW_LINE>setDisplaySurface(display, surface, videoRotation, contentRect, unlockedVideoRect, layerStack);<NEW_LINE>codec.start();<NEW_LINE>try {<NEW_LINE>alive = encode(codec, fd);<NEW_LINE>// do not call stop() on exception, it would trigger an IllegalStateException<NEW_LINE>codec.stop();<NEW_LINE>} finally {<NEW_LINE>destroyDisplay(display);<NEW_LINE>codec.release();<NEW_LINE>surface.release();<NEW_LINE>}<NEW_LINE>} while (alive);<NEW_LINE>} finally {<NEW_LINE>device.setRotationListener(null);<NEW_LINE>}<NEW_LINE>}
int layerStack = device.getLayerStack();
1,037,806
private OperatorNode<SequenceOperator> convertPipe(Query_statementContext queryStatementContext, List<Pipeline_stepContext> nodes, Scope scope) {<NEW_LINE>OperatorNode<SequenceOperator> result = convertQuery(queryStatementContext.getChild(0), scope.getRoot());<NEW_LINE>for (Pipeline_stepContext step : nodes) {<NEW_LINE>if (getParseTreeIndex(step.getChild(0)) == yqlplusParser.RULE_vespa_grouping) {<NEW_LINE>result = OperatorNode.create(SequenceOperator.PIPE, result, List.of(), ImmutableList.of(convertExpr(step.getChild(0), scope)));<NEW_LINE>} else {<NEW_LINE>List<String> name = readName(step.namespaced_name());<NEW_LINE>List<OperatorNode<ExpressionOperator>> args = ImmutableList.of();<NEW_LINE>// LPAREN (argument[$in_select] (COMMA argument[$in_select])*) RPAREN<NEW_LINE>if (step.getChildCount() > 1) {<NEW_LINE>ArgumentsContext arguments = step.arguments();<NEW_LINE>if (arguments.getChildCount() > 2) {<NEW_LINE>List<ArgumentContext> argumentContextList = arguments.argument();<NEW_LINE>args = Lists.<MASK><NEW_LINE>for (ArgumentContext argumentContext : argumentContextList) {<NEW_LINE>args.add(convertExpr(argumentContext.expression(), scope.getRoot()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result = OperatorNode.create(SequenceOperator.PIPE, result, scope.resolvePath(name), args);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
newArrayListWithExpectedSize(argumentContextList.size());
85,905
public static DescribeDingTalkResponse unmarshall(DescribeDingTalkResponse describeDingTalkResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDingTalkResponse.setRequestId(_ctx.stringValue("DescribeDingTalkResponse.RequestId"));<NEW_LINE>PageInfo pageInfo = new PageInfo();<NEW_LINE>pageInfo.setPageSize(_ctx.integerValue("DescribeDingTalkResponse.PageInfo.PageSize"));<NEW_LINE>pageInfo.setTotalCount(_ctx.integerValue("DescribeDingTalkResponse.PageInfo.TotalCount"));<NEW_LINE>pageInfo.setCurrentPage(_ctx.integerValue("DescribeDingTalkResponse.PageInfo.CurrentPage"));<NEW_LINE>describeDingTalkResponse.setPageInfo(pageInfo);<NEW_LINE>List<ActionListArr> actionList <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDingTalkResponse.ActionList.Length"); i++) {<NEW_LINE>ActionListArr actionListArr = new ActionListArr();<NEW_LINE>actionListArr.setGmtModified(_ctx.longValue("DescribeDingTalkResponse.ActionList[" + i + "].GmtModified"));<NEW_LINE>actionListArr.setId(_ctx.integerValue("DescribeDingTalkResponse.ActionList[" + i + "].Id"));<NEW_LINE>actionListArr.setAliUid(_ctx.longValue("DescribeDingTalkResponse.ActionList[" + i + "].AliUid"));<NEW_LINE>actionListArr.setGmtCreate(_ctx.longValue("DescribeDingTalkResponse.ActionList[" + i + "].GmtCreate"));<NEW_LINE>actionListArr.setUrl(_ctx.stringValue("DescribeDingTalkResponse.ActionList[" + i + "].Url"));<NEW_LINE>actionListArr.setIntervalTime(_ctx.integerValue("DescribeDingTalkResponse.ActionList[" + i + "].IntervalTime"));<NEW_LINE>actionListArr.setActionName(_ctx.stringValue("DescribeDingTalkResponse.ActionList[" + i + "].ActionName"));<NEW_LINE>actionListArr.setStatus(_ctx.integerValue("DescribeDingTalkResponse.ActionList[" + i + "].Status"));<NEW_LINE>actionListArr.setConfigList(_ctx.stringValue("DescribeDingTalkResponse.ActionList[" + i + "].ConfigList"));<NEW_LINE>actionListArr.setGroupIdList(_ctx.stringValue("DescribeDingTalkResponse.ActionList[" + i + "].GroupIdList"));<NEW_LINE>actionListArr.setDingTalkLang(_ctx.stringValue("DescribeDingTalkResponse.ActionList[" + i + "].DingTalkLang"));<NEW_LINE>actionList.add(actionListArr);<NEW_LINE>}<NEW_LINE>describeDingTalkResponse.setActionList(actionList);<NEW_LINE>return describeDingTalkResponse;<NEW_LINE>}
= new ArrayList<ActionListArr>();
1,578,525
public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {<NEW_LINE>LOG.trace("Executing {}", RpcMethod.PRIV_FIND_PRIVACY_GROUP.getMethodName());<NEW_LINE>final String[] addresses = requestContext.getRequiredParameter(0, String[].class);<NEW_LINE>LOG.trace("Finding a privacy group with members {}", Arrays.toString(addresses));<NEW_LINE>final List<PrivacyGroup> response;<NEW_LINE>try {<NEW_LINE>response = Arrays.asList(privacyController.findPrivacyGroupByMembers(Arrays.asList(addresses), privacyIdProvider.getPrivacyUserId(requestContext.getUser())));<NEW_LINE>} catch (final MultiTenancyValidationException e) {<NEW_LINE>LOG.error("Unauthorized privacy multi-tenancy rpc request. {}", e.getMessage());<NEW_LINE>return new JsonRpcErrorResponse(requestContext.getRequest().getId(), FIND_PRIVACY_GROUP_ERROR);<NEW_LINE>} catch (final Exception e) {<NEW_LINE><MASK><NEW_LINE>return new JsonRpcErrorResponse(requestContext.getRequest().getId(), FIND_PRIVACY_GROUP_ERROR);<NEW_LINE>}<NEW_LINE>return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), response);<NEW_LINE>}
LOG.error("Failed to fetch privacy group", e);
1,583,504
public static void main(String[] args) {<NEW_LINE>BackEnd be = new BackEnd();<NEW_LINE>Value<Integer> vAge = be.allocate("age", 0);<NEW_LINE>StreamSink<Integer> sAge = new StreamSink<>();<NEW_LINE>ValueOutput<Integer> out = vAge.construct(sAge);<NEW_LINE>Cell<Optional<Integer>> age = out.value;<NEW_LINE>Listener l = age.listen(oa -> {<NEW_LINE>System.out.println("age = " + (oa.isPresent() ? Integer.toString(oa.get()) : "<empty>"));<NEW_LINE>});<NEW_LINE>try {<NEW_LINE>Thread.sleep(1000);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>sAge.send(5);<NEW_LINE>try {<NEW_LINE>Thread.sleep(1000);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>}<NEW_LINE>l.unlisten();<NEW_LINE>}
System.out.println("SEND 5");
952,632
protected void initActivityInstanceEvent(HistoricActivityInstanceEventEntity evt, ExecutionEntity execution, PvmScope eventSource, String activityInstanceId, String parentActivityInstanceId, HistoryEventType eventType) {<NEW_LINE>evt.setId(activityInstanceId);<NEW_LINE>evt.setEventType(eventType.getEventName());<NEW_LINE>evt.setActivityInstanceId(activityInstanceId);<NEW_LINE>evt.setParentActivityInstanceId(parentActivityInstanceId);<NEW_LINE>evt.setProcessDefinitionId(execution.getProcessDefinitionId());<NEW_LINE>evt.setProcessInstanceId(execution.getProcessInstanceId());<NEW_LINE>evt.setExecutionId(execution.getId());<NEW_LINE>evt.setTenantId(execution.getTenantId());<NEW_LINE>evt.setRootProcessInstanceId(execution.getRootProcessInstanceId());<NEW_LINE>if (isHistoryRemovalTimeStrategyStart()) {<NEW_LINE>provideRemovalTime(evt);<NEW_LINE>}<NEW_LINE>ProcessDefinitionEntity definition = execution.getProcessDefinition();<NEW_LINE>if (definition != null) {<NEW_LINE>evt.setProcessDefinitionKey(definition.getKey());<NEW_LINE>}<NEW_LINE>evt.setActivityId(eventSource.getId());<NEW_LINE>evt.setActivityName((String) eventSource.getProperty("name"));<NEW_LINE>evt.setActivityType((String) eventSource.getProperty("type"));<NEW_LINE>// update sub process reference<NEW_LINE>ExecutionEntity subProcessInstance = execution.getSubProcessInstance();<NEW_LINE>if (subProcessInstance != null) {<NEW_LINE>evt.<MASK><NEW_LINE>}<NEW_LINE>// update sub case reference<NEW_LINE>CaseExecutionEntity subCaseInstance = execution.getSubCaseInstance();<NEW_LINE>if (subCaseInstance != null) {<NEW_LINE>evt.setCalledCaseInstanceId(subCaseInstance.getId());<NEW_LINE>}<NEW_LINE>}
setCalledProcessInstanceId(subProcessInstance.getId());
298,395
private float[][] swapResults(MatrixLocations srcData, MatrixLocations dstData, float[] times, float[] distances, float[] weights) {<NEW_LINE>boolean hasTimes = times != null;<NEW_LINE>boolean hasDistances = distances != null;<NEW_LINE>boolean hasWeights = weights != null;<NEW_LINE>float[] newTimes = new float[hasTimes ? times.length : 0];<NEW_LINE>float[] newDistances = new float[hasDistances ? distances.length : 0];<NEW_LINE>float[] newWeights = new float[hasWeights ? weights.length : 0];<NEW_LINE>int i = 0;<NEW_LINE><MASK><NEW_LINE>int dstSize = dstData.size();<NEW_LINE>for (int dst = 0; dst < dstSize; dst++) {<NEW_LINE>for (int src = 0; src < srcSize; src++) {<NEW_LINE>int index = dst + src * dstSize;<NEW_LINE>if (hasTimes)<NEW_LINE>newTimes[index] = times[i];<NEW_LINE>if (hasDistances)<NEW_LINE>newDistances[index] = distances[i];<NEW_LINE>if (hasWeights)<NEW_LINE>newWeights[index] = weights[i];<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new float[][] { newTimes, newDistances, newWeights };<NEW_LINE>}
int srcSize = srcData.size();
1,826,045
public boolean isKnownPackage(String qualifiedPackageName) {<NEW_LINE>if (this.knownPackageNames == null) {<NEW_LINE>LinkedHashSet<String> names = new LinkedHashSet<>(this.typeLocators.size());<NEW_LINE>Set<Entry<String, String>> keyTable = this.typeLocators.entrySet();<NEW_LINE>for (Entry<String, String> entry : keyTable) {<NEW_LINE>// is a type name of the form p1/p2/A<NEW_LINE>String packageName = entry.getKey();<NEW_LINE>int last = packageName.lastIndexOf('/');<NEW_LINE>packageName = last == -1 ? null : packageName.substring(0, last);<NEW_LINE>while (packageName != null && !names.contains(packageName)) {<NEW_LINE>names.add(packageName);<NEW_LINE><MASK><NEW_LINE>packageName = last == -1 ? null : packageName.substring(0, last);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.knownPackageNames = new String[names.size()];<NEW_LINE>names.toArray(this.knownPackageNames);<NEW_LINE>Arrays.sort(this.knownPackageNames);<NEW_LINE>}<NEW_LINE>int result = Arrays.binarySearch(this.knownPackageNames, qualifiedPackageName);<NEW_LINE>return result >= 0;<NEW_LINE>}
last = packageName.lastIndexOf('/');
452,615
public static void validateOutputLayer(String layerName, Layer layer) {<NEW_LINE>IActivation activation;<NEW_LINE>ILossFunction loss;<NEW_LINE>long nOut;<NEW_LINE>boolean isLossLayer = false;<NEW_LINE>if (layer instanceof BaseOutputLayer && !(layer instanceof OCNNOutputLayer)) {<NEW_LINE>activation = ((BaseOutputLayer) layer).getActivationFn();<NEW_LINE>loss = ((BaseOutputLayer) layer).getLossFn();<NEW_LINE>nOut = ((BaseOutputLayer) layer).getNOut();<NEW_LINE>} else if (layer instanceof LossLayer) {<NEW_LINE>activation = ((LossLayer) layer).getActivationFn();<NEW_LINE>loss = ((<MASK><NEW_LINE>nOut = ((LossLayer) layer).getNOut();<NEW_LINE>isLossLayer = true;<NEW_LINE>} else if (layer instanceof RnnLossLayer) {<NEW_LINE>activation = ((RnnLossLayer) layer).getActivationFn();<NEW_LINE>loss = ((RnnLossLayer) layer).getLossFn();<NEW_LINE>nOut = ((RnnLossLayer) layer).getNOut();<NEW_LINE>isLossLayer = true;<NEW_LINE>} else if (layer instanceof CnnLossLayer) {<NEW_LINE>activation = ((CnnLossLayer) layer).getActivationFn();<NEW_LINE>loss = ((CnnLossLayer) layer).getLossFn();<NEW_LINE>nOut = ((CnnLossLayer) layer).getNOut();<NEW_LINE>isLossLayer = true;<NEW_LINE>} else {<NEW_LINE>// Not an output layer<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>OutputLayerUtil.validateOutputLayerConfiguration(layerName, nOut, isLossLayer, activation, loss);<NEW_LINE>}
LossLayer) layer).getLossFn();
67,743
public void executionPhaseStarting(ActionGraph actionGraph, Supplier<ImmutableSet<Artifact>> topLevelArtifacts) throws AbruptExitException, InterruptedException {<NEW_LINE>IncludeParser.HintsRules hintsRules;<NEW_LINE>if (useIncludeHints) {<NEW_LINE>try {<NEW_LINE>hintsRules = (IncludeParser.HintsRules) env.getSkyframeExecutor().evaluateSkyKeyForExecutionSetup(env.<MASK><NEW_LINE>} catch (ExecException e) {<NEW_LINE>throw new AbruptExitException(DetailedExitCode.of(FailureDetail.newBuilder().setMessage("could not initialize include hints: " + e.getMessage()).setIncludeScanning(IncludeScanning.newBuilder().setCode(IncludeScanning.Code.INITIALIZE_INCLUDE_HINTS_ERROR)).build()), e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>hintsRules = IncludeParser.HintsRules.EMPTY;<NEW_LINE>}<NEW_LINE>includeScannerSupplier.init(new IncludeParser(new IncludeParser.Hints(hintsRules, env.getSyscallCache(), env.getSkyframeBuildView().getArtifactFactory())));<NEW_LINE>}
getReporter(), IncludeHintsFunction.INCLUDE_HINTS_KEY);
1,465,243
public Supplier<Set<ServiceLocator>> exposedServices() {<NEW_LINE>return () -> {<NEW_LINE>return applicationContext.getBeansWithAnnotation(RSocketService.class).values().stream().filter(bean -> !(bean instanceof RSocketServiceHealth || bean instanceof MetricsService)).map(o -> {<NEW_LINE>Class<?> managedBeanClass = AopUtils.isAopProxy(o) ? AopUtils.getTargetClass(o) : o.getClass();<NEW_LINE>RSocketService rsocketService = AnnotationUtils.findAnnotation(managedBeanClass, RSocketService.class);<NEW_LINE>// noinspection ConstantConditions<NEW_LINE>String serviceName = rsocketService<MASK><NEW_LINE>if (!rsocketService.name().isEmpty()) {<NEW_LINE>serviceName = rsocketService.name();<NEW_LINE>}<NEW_LINE>String group = properties.getGroup();<NEW_LINE>if (group == null || group.isEmpty()) {<NEW_LINE>group = rsocketService.group();<NEW_LINE>}<NEW_LINE>String version = properties.getVersion();<NEW_LINE>if (version == null || version.isEmpty()) {<NEW_LINE>version = rsocketService.version();<NEW_LINE>}<NEW_LINE>return new ServiceLocator(group, serviceName, version, rsocketService.tags());<NEW_LINE>}).collect(Collectors.toSet());<NEW_LINE>};<NEW_LINE>}
.serviceInterface().getCanonicalName();
120,570
private TruffleString parseString() {<NEW_LINE>// String buffer is only instantiated if string contains escape sequences.<NEW_LINE>int start = ++pos;<NEW_LINE>TruffleStringBuilder sb = null;<NEW_LINE>while (pos < length) {<NEW_LINE>final int c = next();<NEW_LINE>if (c <= 0x1f) {<NEW_LINE>// Characters < 0x1f are not allowed in JSON strings.<NEW_LINE>throw syntaxError(pos, ERR_STRING_CONTAINS_CONTROL_CHARACTER);<NEW_LINE>} else if (c == '\\') {<NEW_LINE>if (sb == null) {<NEW_LINE>sb = Strings.builderCreate(pos - start + 16);<NEW_LINE>}<NEW_LINE>Strings.builderAppend(sb, source, start, pos - 1);<NEW_LINE>Strings.builderAppend(sb, parseEscapeSequence());<NEW_LINE>start = pos;<NEW_LINE>} else if (c == '"') {<NEW_LINE>if (sb != null) {<NEW_LINE>Strings.builderAppend(sb, <MASK><NEW_LINE>return Strings.builderToString(sb);<NEW_LINE>}<NEW_LINE>return Strings.substring(context, source, start, pos - 1 - start);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw error(lexerMessage(MSG_MISSING_CLOSE_QUOTE), pos, length);<NEW_LINE>}
source, start, pos - 1);
181,462
public Session withDefaultProperties(Map<String, String> systemPropertyDefaults, Map<String, Map<String, String>> catalogPropertyDefaults, AccessControl accessControl) {<NEW_LINE>requireNonNull(systemPropertyDefaults, "systemPropertyDefaults is null");<NEW_LINE>requireNonNull(catalogPropertyDefaults, "catalogPropertyDefaults is null");<NEW_LINE>checkState(transactionId.isEmpty(), "property defaults can not be added to a transaction already in progress");<NEW_LINE>// NOTE: properties should not be validated here and instead will be validated in beginTransactionId<NEW_LINE>Map<String, String> <MASK><NEW_LINE>systemProperties.putAll(systemPropertyDefaults);<NEW_LINE>systemProperties.putAll(this.systemProperties);<NEW_LINE>Map<String, Map<String, String>> catalogProperties = catalogPropertyDefaults.entrySet().stream().map(entry -> Maps.immutableEntry(entry.getKey(), new HashMap<>(entry.getValue()))).collect(Collectors.toMap(Entry::getKey, Entry::getValue));<NEW_LINE>for (Entry<String, Map<String, String>> catalogEntry : this.catalogProperties.entrySet()) {<NEW_LINE>catalogProperties.computeIfAbsent(catalogEntry.getKey(), id -> new HashMap<>()).putAll(catalogEntry.getValue());<NEW_LINE>}<NEW_LINE>return new Session(queryId, transactionId, clientTransactionSupport, identity, source, catalog, schema, path, traceToken, timeZoneKey, locale, remoteUserAddress, userAgent, clientInfo, clientTags, clientCapabilities, resourceEstimates, start, systemProperties, catalogProperties, sessionPropertyManager, preparedStatements, protocolHeaders);<NEW_LINE>}
systemProperties = new HashMap<>();
727,402
public static JARVerifier create(String keystore, String alias, char[] passwd) throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException {<NEW_LINE>KeyStore keyStore = KeyStore.getInstance("JKS");<NEW_LINE>FileInputStream fileIn = null;<NEW_LINE>try {<NEW_LINE>fileIn = new FileInputStream(keystore);<NEW_LINE>keyStore.load(fileIn, passwd);<NEW_LINE>} finally {<NEW_LINE>if (null != fileIn) {<NEW_LINE>fileIn.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Certificate[] chain = keyStore.getCertificateChain(alias);<NEW_LINE>if (chain == null) {<NEW_LINE>Certificate cert = keyStore.getCertificate(alias);<NEW_LINE>if (cert == null) {<NEW_LINE>throw new IllegalArgumentException("No trusted certificate or chain found for alias: " + alias);<NEW_LINE>}<NEW_LINE>chain = new Certificate[] { cert };<NEW_LINE>}<NEW_LINE>X509Certificate[] certChain = new X509Certificate[chain.length];<NEW_LINE>CertificateFactory <MASK><NEW_LINE>for (int count = 0; count < chain.length; count++) {<NEW_LINE>ByteArrayInputStream certIn = new ByteArrayInputStream(chain[count].getEncoded());<NEW_LINE>X509Certificate cert = (X509Certificate) cf.generateCertificate(certIn);<NEW_LINE>certChain[count] = cert;<NEW_LINE>}<NEW_LINE>JARVerifier jarVerifier = new JARVerifier(certChain);<NEW_LINE>return jarVerifier;<NEW_LINE>}
cf = CertificateFactory.getInstance("X.509");
301,263
private boolean compareConfigurations(String serverConfigFilePath, String clientSiteName, Map<String, String> clientSiteProps) {<NEW_LINE>HadoopConfigurationFileParser parser = new HadoopConfigurationFileParser();<NEW_LINE>Map<String, String> serverSiteProps;<NEW_LINE>try {<NEW_LINE>serverSiteProps = parser.parseXmlConfiguration(serverConfigFilePath);<NEW_LINE>} catch (Exception e) {<NEW_LINE>mMsg.append(String.format("Failed to parse server-side %s.%n", serverConfigFilePath));<NEW_LINE>mMsg.append(ValidationUtils.getErrorInfo(e));<NEW_LINE>mAdvice.append(String.format("Please fix the parsing error in %s.%n", serverConfigFilePath));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean matches = true;<NEW_LINE>for (Map.Entry<String, String> prop : clientSiteProps.entrySet()) {<NEW_LINE>if (!serverSiteProps.containsKey(prop.getKey())) {<NEW_LINE>matches = false;<NEW_LINE>mMsg.append(String.format("%s is configured in %s, but not configured in %s.%n", prop.getKey(), clientSiteName, serverConfigFilePath));<NEW_LINE>mAdvice.append(String.format("Please configure property %s in %s.%n", prop.getKey(), serverConfigFilePath));<NEW_LINE>} else if (!prop.getValue().equals(serverSiteProps.get(prop.getKey()))) {<NEW_LINE>matches = false;<NEW_LINE>mMsg.append(String.format("%s is set to %s in %s, but to %s in %s.%n", prop.getKey(), prop.getValue(), clientSiteName, serverSiteProps.get(prop.getKey()), serverConfigFilePath));<NEW_LINE>mAdvice.append(String.format("Please fix the inconsistency on property %s.%n", prop.getKey()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!matches) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, String> prop : serverSiteProps.entrySet()) {<NEW_LINE>if (!clientSiteProps.containsKey(prop.getKey())) {<NEW_LINE>matches = false;<NEW_LINE>mMsg.append(String.format("%s is configured in %s, but not configured in %s.%n", prop.getKey(), serverConfigFilePath, clientSiteName));<NEW_LINE>mAdvice.append(String.format("Please configure %s in %s.%n", prop<MASK><NEW_LINE>} else if (!prop.getValue().equals(clientSiteProps.get(prop.getKey()))) {<NEW_LINE>matches = false;<NEW_LINE>mMsg.append(String.format("%s is set to %s in %s, but to %s in %s.%n", prop.getKey(), prop.getValue(), prop.getValue(), clientSiteProps.get(prop.getKey()), clientSiteName));<NEW_LINE>mAdvice.append(String.format("Please fix the inconsistency on property %s.%n", prop.getKey()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return matches;<NEW_LINE>}
.getKey(), clientSiteName));
1,236,904
private void replacePipeAliases(ConsoleEngine consoleEngine, Map<String, List<String>> customPipes, ArgsParser ap) {<NEW_LINE>List<String> words = ap.args();<NEW_LINE>if (consoleEngine != null && words.contains(pipeName.get(Pipe.NAMED))) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>boolean trace = false;<NEW_LINE>for (int i = 0; i < words.size(); i++) {<NEW_LINE>if (words.get(i).equals(pipeName.get(Pipe.NAMED))) {<NEW_LINE>if (i + 1 < words.size() && consoleEngine.hasAlias(words.get(i + 1))) {<NEW_LINE>trace = true;<NEW_LINE>List<String> args = new ArrayList<>();<NEW_LINE>String pipeAlias = consoleEngine.getAlias(<MASK><NEW_LINE>while (i < words.size() - 1 && !names.isPipe(words.get(i + 1), customPipes.keySet())) {<NEW_LINE>args.add(words.get(++i));<NEW_LINE>}<NEW_LINE>sb.append(replacePipeAlias(ap, pipeAlias, args, customPipes));<NEW_LINE>} else {<NEW_LINE>sb.append(words.get(i)).append(' ');<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>sb.append(words.get(i)).append(' ');<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ap.parse(sb.toString());<NEW_LINE>if (trace) {<NEW_LINE>consoleEngine.trace(ap.line());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
words.get(++i));
731,243
private String uploadImage(MediaFile mediaFile) {<NEW_LINE>AppLog.i(T.POSTS, "PostUploadHandler > UploadImage: " + mediaFile.getFilePath());<NEW_LINE>if (mediaFile.getFilePath() == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Uri imageUri = Uri.parse(mediaFile.getFilePath());<NEW_LINE>File imageFile = null;<NEW_LINE>if (imageUri.toString().contains("content:")) {<NEW_LINE>String[] projection = new String[] { Images.Media._ID, Images.Media.DATA, Images.Media.MIME_TYPE };<NEW_LINE>Cursor cur = mContext.getContentResolver().query(imageUri, projection, null, null, null);<NEW_LINE>if (cur != null && cur.moveToFirst()) {<NEW_LINE>int dataColumn = cur.getColumnIndex(Images.Media.DATA);<NEW_LINE>String thumbData = cur.getString(dataColumn);<NEW_LINE>imageFile = new File(thumbData);<NEW_LINE>mediaFile.<MASK><NEW_LINE>}<NEW_LINE>SqlUtils.closeCursor(cur);<NEW_LINE>} else {<NEW_LINE>// file is not in media library<NEW_LINE>String path = imageUri.toString().replace("file://", "");<NEW_LINE>imageFile = new File(path);<NEW_LINE>mediaFile.setFilePath(path);<NEW_LINE>}<NEW_LINE>// check if the file exists<NEW_LINE>if (imageFile == null) {<NEW_LINE>mErrorMessage = mContext.getString(R.string.file_not_found);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String fullSizeUrl = uploadImageFile(mediaFile, mSite);<NEW_LINE>if (fullSizeUrl == null) {<NEW_LINE>mErrorMessage = mContext.getString(R.string.error_media_upload);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return mediaFile.getImageHtmlForUrls(fullSizeUrl, null, false);<NEW_LINE>}
setFilePath(imageFile.getPath());
791,557
public static UpdateExperimentBasicInfoResponse unmarshall(UpdateExperimentBasicInfoResponse updateExperimentBasicInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>updateExperimentBasicInfoResponse.setRequestId(_ctx.stringValue("UpdateExperimentBasicInfoResponse.requestId"));<NEW_LINE>Result result = new Result();<NEW_LINE>result.setExperimentId(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.experimentId"));<NEW_LINE>result.setName(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.name"));<NEW_LINE>result.setDescription(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.description"));<NEW_LINE>result.setStatus(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.status"));<NEW_LINE>result.setBase(_ctx.booleanValue("UpdateExperimentBasicInfoResponse.result.base"));<NEW_LINE>result.setOnlineTime(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.onlineTime"));<NEW_LINE>result.setOfflineTime(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.offlineTime"));<NEW_LINE>List<String> buckets = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("UpdateExperimentBasicInfoResponse.result.buckets.Length"); i++) {<NEW_LINE>buckets.add(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.buckets[" + i + "]"));<NEW_LINE>}<NEW_LINE>result.setBuckets(buckets);<NEW_LINE>List<Algorithm> algorithms = new ArrayList<Algorithm>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("UpdateExperimentBasicInfoResponse.result.algorithms.Length"); i++) {<NEW_LINE>Algorithm algorithm = new Algorithm();<NEW_LINE>algorithm.setKey(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].key"));<NEW_LINE>algorithm.setName(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].name"));<NEW_LINE>algorithm.setCategory(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].category"));<NEW_LINE>algorithm.setType(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].type"));<NEW_LINE>algorithm.setDefaultValue(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].defaultValue"));<NEW_LINE>algorithm.setExperimentValue(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].experimentValue"));<NEW_LINE>algorithm.setHasConfig(_ctx.booleanValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].hasConfig"));<NEW_LINE>List<ConfigItem> config = new ArrayList<ConfigItem>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].config.Length"); j++) {<NEW_LINE>ConfigItem configItem = new ConfigItem();<NEW_LINE>configItem.setKey(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].config[" + j + "].key"));<NEW_LINE>configItem.setName(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i <MASK><NEW_LINE>configItem.setDefaultValue(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].config[" + j + "].defaultValue"));<NEW_LINE>configItem.setExperimentValue(_ctx.stringValue("UpdateExperimentBasicInfoResponse.result.algorithms[" + i + "].config[" + j + "].experimentValue"));<NEW_LINE>config.add(configItem);<NEW_LINE>}<NEW_LINE>algorithm.setConfig(config);<NEW_LINE>algorithms.add(algorithm);<NEW_LINE>}<NEW_LINE>result.setAlgorithms(algorithms);<NEW_LINE>updateExperimentBasicInfoResponse.setResult(result);<NEW_LINE>return updateExperimentBasicInfoResponse;<NEW_LINE>}
+ "].config[" + j + "].name"));
708,120
private void onChunkOperationComplete(PutChunk chunk) {<NEW_LINE>if (chunk.getChunkBlobId() == null) {<NEW_LINE>// the overall operation has failed if any of the chunk fails.<NEW_LINE>if (chunk.getChunkException() == null) {<NEW_LINE>logger.error("{}: Operation on chunk failed, but no exception was set", loggingContext);<NEW_LINE>}<NEW_LINE>logger.error("{}: Failed putting chunk at index: {}, failing the entire operation", <MASK><NEW_LINE>setOperationCompleted();<NEW_LINE>} else if (chunk != metadataPutChunk) {<NEW_LINE>// a data chunk has succeeded.<NEW_LINE>logger.trace("{}: Successfully put data chunk with blob id : {}", loggingContext, chunk.getChunkBlobId());<NEW_LINE>metadataPutChunk.addChunkId(chunk.chunkBlobId, chunk.chunkBlobSize, chunk.chunkIndex);<NEW_LINE>metadataPutChunk.maybeNotifyForChunkCreation(chunk);<NEW_LINE>} else {<NEW_LINE>blobId = chunk.getChunkBlobId();<NEW_LINE>if (chunk.failedAttempts > 0) {<NEW_LINE>logger.trace("{}: Slipped put succeeded for chunk: {}", loggingContext, chunk.getChunkBlobId());<NEW_LINE>routerMetrics.slippedPutSuccessCount.inc();<NEW_LINE>} else {<NEW_LINE>logger.trace("{}: Successfully put chunk: {} ", loggingContext, chunk.getChunkBlobId());<NEW_LINE>}<NEW_LINE>setOperationCompleted();<NEW_LINE>}<NEW_LINE>long operationLatencyMs = time.milliseconds() - chunk.chunkFillCompleteAtMs;<NEW_LINE>if (chunk.chunkBlobProperties.isEncrypted()) {<NEW_LINE>routerMetrics.putEncryptedChunkOperationLatencyMs.update(operationLatencyMs);<NEW_LINE>} else {<NEW_LINE>routerMetrics.putChunkOperationLatencyMs.update(operationLatencyMs, TimeUnit.MILLISECONDS);<NEW_LINE>}<NEW_LINE>chunk.clear();<NEW_LINE>}
loggingContext, chunk.getChunkIndex());
1,824,224
public Request<DescribeMovingAddressesRequest> marshall(DescribeMovingAddressesRequest describeMovingAddressesRequest) {<NEW_LINE>if (describeMovingAddressesRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeMovingAddressesRequest> request = new DefaultRequest<DescribeMovingAddressesRequest>(describeMovingAddressesRequest, "AmazonEC2");<NEW_LINE>request.addParameter("Action", "DescribeMovingAddresses");<NEW_LINE>request.addParameter("Version", "2015-10-01");<NEW_LINE>java.util.List<String> publicIpsList = describeMovingAddressesRequest.getPublicIps();<NEW_LINE>int publicIpsListIndex = 1;<NEW_LINE>for (String publicIpsListValue : publicIpsList) {<NEW_LINE>if (publicIpsListValue != null) {<NEW_LINE>request.addParameter("PublicIp." + publicIpsListIndex<MASK><NEW_LINE>}<NEW_LINE>publicIpsListIndex++;<NEW_LINE>}<NEW_LINE>if (describeMovingAddressesRequest.getNextToken() != null) {<NEW_LINE>request.addParameter("NextToken", StringUtils.fromString(describeMovingAddressesRequest.getNextToken()));<NEW_LINE>}<NEW_LINE>java.util.List<Filter> filtersList = describeMovingAddressesRequest.getFilters();<NEW_LINE>int filtersListIndex = 1;<NEW_LINE>for (Filter filtersListValue : filtersList) {<NEW_LINE>Filter filterMember = filtersListValue;<NEW_LINE>if (filterMember != null) {<NEW_LINE>if (filterMember.getName() != null) {<NEW_LINE>request.addParameter("Filter." + filtersListIndex + ".Name", StringUtils.fromString(filterMember.getName()));<NEW_LINE>}<NEW_LINE>java.util.List<String> valuesList = filterMember.getValues();<NEW_LINE>int valuesListIndex = 1;<NEW_LINE>for (String valuesListValue : valuesList) {<NEW_LINE>if (valuesListValue != null) {<NEW_LINE>request.addParameter("Filter." + filtersListIndex + ".Value." + valuesListIndex, StringUtils.fromString(valuesListValue));<NEW_LINE>}<NEW_LINE>valuesListIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>filtersListIndex++;<NEW_LINE>}<NEW_LINE>if (describeMovingAddressesRequest.getMaxResults() != null) {<NEW_LINE>request.addParameter("MaxResults", StringUtils.fromInteger(describeMovingAddressesRequest.getMaxResults()));<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
, StringUtils.fromString(publicIpsListValue));
1,153,664
public void execute() {<NEW_LINE>if (!enableArtemisPlugin) {<NEW_LINE>getLog().info("Plugin disabled via 'enableArtemisPlugin' set to false.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (context != null && !context.hasDelta(sourceDirectory))<NEW_LINE>return;<NEW_LINE>log.info("");<NEW_LINE>log.info("CONFIGURATION");<NEW_LINE>log.info(WeaverLog.LINE.replaceAll("\n", ""));<NEW_LINE>log.info(WeaverLog.format("enablePooledWeaving", enablePooledWeaving));<NEW_LINE>log.info(WeaverLog.format("generateLinkMutators", generateLinkMutators));<NEW_LINE>log.info(WeaverLog<MASK><NEW_LINE>log.info(WeaverLog.LINE.replaceAll("\n", ""));<NEW_LINE>Weaver.enablePooledWeaving(enablePooledWeaving);<NEW_LINE>Weaver.generateLinkMutators(generateLinkMutators);<NEW_LINE>Weaver.optimizeEntitySystems(optimizeEntitySystems);<NEW_LINE>Weaver weaver = new Weaver(outputDirectory);<NEW_LINE>WeaverLog weaverLog = weaver.execute();<NEW_LINE>for (String s : weaverLog.getFormattedLog().split("\n")) {<NEW_LINE>log.info(s);<NEW_LINE>}<NEW_LINE>}
.format("optimizeEntitySystems", optimizeEntitySystems));
533,583
public static void main(String[] __) {<NEW_LINE>Log.info("Converting icons...");<NEW_LINE>Time.mark();<NEW_LINE>Fi.get("fontgen/icons").deleteDirectory();<NEW_LINE>Fi.get("fontgen/icon_parts").deleteDirectory();<NEW_LINE>Fi[] list = new Fi("icons").list();<NEW_LINE>Seq<Fi> <MASK><NEW_LINE>for (Fi img : list) {<NEW_LINE>if (img.extension().equals("png")) {<NEW_LINE>Fi dst = new Fi("fontgen/icons").child(img.nameWithoutExtension().replace("icon-", "") + ".svg");<NEW_LINE>new IconConverter().convert(new Pixmap(img), dst);<NEW_LINE>dst.copyTo(new Fi("fontgen/icon_parts/").child(dst.name()));<NEW_LINE>files.add(dst);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Seq<String> args = Seq.with("inkscape", "--batch-process", "--verb", "EditSelectAll;SelectionUnion;FitCanvasToSelectionOrDrawing;FileSave");<NEW_LINE>args.addAll(files.map(Fi::absolutePath));<NEW_LINE>Fi.get("fontgen/extra").findAll().each(f -> f.copyTo(Fi.get("fontgen/icons").child(f.name())));<NEW_LINE>Log.info("Merging paths...");<NEW_LINE>Log.info(OS.exec(args.toArray(String.class)));<NEW_LINE>Log.info("Done converting icons in &lm@&lgs.", Time.elapsed() / 1000f);<NEW_LINE>System.exit(0);<NEW_LINE>}
files = new Seq<>();
952,153
public int compare(MapMarker mapMarker1, MapMarker mapMarker2) {<NEW_LINE>if (sortByMode == BY_DATE_ADDED_DESC || sortByMode == BY_DATE_ADDED_ASC) {<NEW_LINE>long t1 = visited ? mapMarker1.visitedDate : mapMarker1.creationDate;<NEW_LINE>long t2 = visited ? mapMarker2.visitedDate : mapMarker2.creationDate;<NEW_LINE>if (t1 > t2) {<NEW_LINE>return <MASK><NEW_LINE>} else if (t1 == t2) {<NEW_LINE>return 0;<NEW_LINE>} else {<NEW_LINE>return sortByMode == BY_DATE_ADDED_DESC ? 1 : -1;<NEW_LINE>}<NEW_LINE>} else if (location != null && (sortByMode == BY_DISTANCE_DESC || sortByMode == BY_DISTANCE_ASC)) {<NEW_LINE>int d1 = (int) MapUtils.getDistance(location, mapMarker1.getLatitude(), mapMarker1.getLongitude());<NEW_LINE>int d2 = (int) MapUtils.getDistance(location, mapMarker2.getLatitude(), mapMarker2.getLongitude());<NEW_LINE>if (d1 > d2) {<NEW_LINE>return sortByMode == BY_DISTANCE_DESC ? -1 : 1;<NEW_LINE>} else if (d1 == d2) {<NEW_LINE>return 0;<NEW_LINE>} else {<NEW_LINE>return sortByMode == BY_DISTANCE_DESC ? 1 : -1;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String n1 = mapMarker1.getName(ctx);<NEW_LINE>String n2 = mapMarker2.getName(ctx);<NEW_LINE>return n1.compareToIgnoreCase(n2);<NEW_LINE>}<NEW_LINE>}
sortByMode == BY_DATE_ADDED_DESC ? -1 : 1;
1,442,690
public PersistenceResponse fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException {<NEW_LINE>for (PersistenceManagerEventHandler handler : persistenceManagerEventHandlers) {<NEW_LINE>PersistenceManagerEventHandlerResponse response = handler.preFetch(this, persistencePackage, cto);<NEW_LINE>if (PersistenceManagerEventHandlerResponse.PersistenceManagerEventHandlerResponseStatus.HANDLED_BREAK == response.getStatus()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// check to see if there is a custom handler registered<NEW_LINE>for (CustomPersistenceHandler handler : getCustomPersistenceHandlers()) {<NEW_LINE>if (handler.canHandleFetch(persistencePackage)) {<NEW_LINE>if (!handler.willHandleSecurity(persistencePackage)) {<NEW_LINE>adminRemoteSecurityService.securityCheck(persistencePackage, EntityOperationType.FETCH);<NEW_LINE>}<NEW_LINE>DynamicResultSet results = handler.fetch(persistencePackage, cto, dynamicEntityDao, (RecordHelper) getCompatibleModule(OperationType.BASIC));<NEW_LINE>return executePostFetchHandlers(persistencePackage, cto, new PersistenceResponse().withDynamicResultSet(results));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>adminRemoteSecurityService.securityCheck(persistencePackage, EntityOperationType.FETCH);<NEW_LINE>PersistenceModule myModule = getCompatibleModule(persistencePackage.getPersistencePerspective().getOperationTypes().getFetchType());<NEW_LINE>try {<NEW_LINE>DynamicResultSet results = myModule.fetch(persistencePackage, cto);<NEW_LINE>return executePostFetchHandlers(persistencePackage, cto, new PersistenceResponse<MASK><NEW_LINE>} catch (ServiceException e) {<NEW_LINE>if (e.getCause() instanceof NoPossibleResultsException) {<NEW_LINE>DynamicResultSet drs = new DynamicResultSet(null, new Entity[] {}, 0);<NEW_LINE>return executePostFetchHandlers(persistencePackage, cto, new PersistenceResponse().withDynamicResultSet(drs));<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
().withDynamicResultSet(results));
1,329,913
final GetDomainResult executeGetDomain(GetDomainRequest getDomainRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDomainRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetDomainRequest> request = null;<NEW_LINE>Response<GetDomainResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDomainRequest));<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, "Lightsail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDomain");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetDomainResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new GetDomainResultJsonUnmarshaller());
642,988
private void createExternalAssociation(Program program, String extProgName) {<NEW_LINE>int result = OptionDialog.showOptionDialog(null, "No Program Association", "The external program name \"" + extProgName + "\" is not associated with a Ghidra Program\n" + "Would you like to create an association?", "Create Association", OptionDialog.QUESTION_MESSAGE);<NEW_LINE>if (result == OptionDialog.CANCEL_OPTION) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DataTreeDialog dialog = new DataTreeDialog(null, "Choose External Program (" + extProgName + ")", DataTreeDialog.OPEN);<NEW_LINE>dialog.setSearchText(extProgName);<NEW_LINE>dialog.setHelpLocation(new HelpLocation("ReferencesPlugin", "ChooseExternalProgram"));<NEW_LINE>tool.showDialog(dialog);<NEW_LINE>DomainFile domainFile = dialog.getDomainFile();<NEW_LINE>if (dialog.wasCancelled() || domainFile == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String pathName = domainFile.toString();<NEW_LINE>ExternalManager externalManager = program.getExternalManager();<NEW_LINE>String externalLibraryPath = externalManager.getExternalLibraryPath(extProgName);<NEW_LINE>if (!pathName.equals(externalLibraryPath)) {<NEW_LINE>Command cmd = new SetExternalNameCmd(extProgName, domainFile.getPathname());<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
tool.execute(cmd, program);
1,261,342
public Mapper.Builder<?, ?> parse(String name, Map<String, Object> node, ParserContext parserContext) throws MapperParsingException {<NEW_LINE>Builder builder = new Builder(name);<NEW_LINE>TypeParsers.parseField(builder, name, node, parserContext);<NEW_LINE>for (Iterator<Map.Entry<String, Object>> iterator = node.entrySet().iterator(); iterator.hasNext(); ) {<NEW_LINE>Map.Entry<String, Object> entry = iterator.next();<NEW_LINE>String propName = entry.getKey();<NEW_LINE>Object propNode = entry.getValue();<NEW_LINE>if (propName.equals("null_value")) {<NEW_LINE>if (propNode == null) {<NEW_LINE>throw new MapperParsingException("Property [null_value] cannot be null.");<NEW_LINE>}<NEW_LINE>builder.nullValue(ScaledFloatFieldMapper.parse(propNode));<NEW_LINE>iterator.remove();<NEW_LINE>} else if (propName.equals("ignore_malformed")) {<NEW_LINE>builder.ignoreMalformed(TypeParsers.nodeBooleanValue(name<MASK><NEW_LINE>iterator.remove();<NEW_LINE>} else if (propName.equals("coerce")) {<NEW_LINE>builder.coerce(TypeParsers.nodeBooleanValue(name, "coerce", propNode, parserContext));<NEW_LINE>iterator.remove();<NEW_LINE>} else if (propName.equals("scaling_factor")) {<NEW_LINE>builder.scalingFactor(ScaledFloatFieldMapper.parse(propNode));<NEW_LINE>iterator.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return builder;<NEW_LINE>}
, "ignore_malformed", propNode, parserContext));
1,252,855
public static void renderStitching(BufferedImage imageA, BufferedImage imageB, Homography2D_F64 fromAtoB) {<NEW_LINE>// specify size of output image<NEW_LINE>double scale = 0.5;<NEW_LINE>// Convert into a BoofCV color format<NEW_LINE>Planar<GrayF32> colorA = ConvertBufferedImage.convertFromPlanar(imageA, null, true, GrayF32.class);<NEW_LINE>Planar<GrayF32> colorB = ConvertBufferedImage.convertFromPlanar(imageB, null, true, GrayF32.class);<NEW_LINE>// Where the output images are rendered into<NEW_LINE>Planar<GrayF32> work = colorA.createSameShape();<NEW_LINE>// Adjust the transform so that the whole image can appear inside of it<NEW_LINE>Homography2D_F64 fromAToWork = new Homography2D_F64(scale, 0, colorA.width / 4, 0, scale, colorA.height / 4, 0, 0, 1);<NEW_LINE>Homography2D_F64 fromWorkToA = fromAToWork.invert(null);<NEW_LINE>// Used to render the results onto an image<NEW_LINE>PixelTransformHomography_F32 model = new PixelTransformHomography_F32();<NEW_LINE>InterpolatePixelS<GrayF32> interp = FactoryInterpolation.bilinearPixelS(GrayF32.class, BorderType.ZERO);<NEW_LINE>ImageDistort<Planar<GrayF32>, Planar<GrayF32>> distort = DistortSupport.createDistortPL(GrayF32.<MASK><NEW_LINE>distort.setRenderAll(false);<NEW_LINE>// Render first image<NEW_LINE>model.setTo(fromWorkToA);<NEW_LINE>distort.apply(colorA, work);<NEW_LINE>// Render second image<NEW_LINE>Homography2D_F64 fromWorkToB = fromWorkToA.concat(fromAtoB, null);<NEW_LINE>model.setTo(fromWorkToB);<NEW_LINE>distort.apply(colorB, work);<NEW_LINE>// Convert the rendered image into a BufferedImage<NEW_LINE>BufferedImage output = new BufferedImage(work.width, work.height, imageA.getType());<NEW_LINE>ConvertBufferedImage.convertTo(work, output, true);<NEW_LINE>Graphics2D g2 = output.createGraphics();<NEW_LINE>// draw lines around the distorted image to make it easier to see<NEW_LINE>Homography2D_F64 fromBtoWork = fromWorkToB.invert(null);<NEW_LINE>Point2D_I32[] corners = new Point2D_I32[4];<NEW_LINE>corners[0] = renderPoint(0, 0, fromBtoWork);<NEW_LINE>corners[1] = renderPoint(colorB.width, 0, fromBtoWork);<NEW_LINE>corners[2] = renderPoint(colorB.width, colorB.height, fromBtoWork);<NEW_LINE>corners[3] = renderPoint(0, colorB.height, fromBtoWork);<NEW_LINE>g2.setColor(Color.ORANGE);<NEW_LINE>g2.setStroke(new BasicStroke(4));<NEW_LINE>g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);<NEW_LINE>g2.drawLine(corners[0].x, corners[0].y, corners[1].x, corners[1].y);<NEW_LINE>g2.drawLine(corners[1].x, corners[1].y, corners[2].x, corners[2].y);<NEW_LINE>g2.drawLine(corners[2].x, corners[2].y, corners[3].x, corners[3].y);<NEW_LINE>g2.drawLine(corners[3].x, corners[3].y, corners[0].x, corners[0].y);<NEW_LINE>ShowImages.showWindow(output, "Stitched Images", true);<NEW_LINE>}
class, model, interp, false);
1,743,919
public void write(final MutableDirectBuffer buffer, int offset) {<NEW_LINE>// protocol header<NEW_LINE>messageHeaderEncoder.wrap(buffer, offset).blockLength(responseEncoder.sbeBlockLength()).templateId(responseEncoder.sbeTemplateId()).schemaId(responseEncoder.sbeSchemaId()).version(responseEncoder.sbeSchemaVersion());<NEW_LINE>offset += messageHeaderEncoder.encodedLength();<NEW_LINE>// protocol message<NEW_LINE>responseEncoder.wrap(buffer, offset).recordType(recordType).partitionId(partitionId).valueType(valueType).intent(intent).key<MASK><NEW_LINE>offset = responseEncoder.limit();<NEW_LINE>final int eventLength = valueWriter.getLength();<NEW_LINE>buffer.putInt(offset, eventLength, Protocol.ENDIANNESS);<NEW_LINE>offset += valueHeaderLength();<NEW_LINE>valueWriter.write(buffer, offset);<NEW_LINE>offset += eventLength;<NEW_LINE>responseEncoder.limit(offset);<NEW_LINE>responseEncoder.putRejectionReason(rejectionReason, 0, rejectionReason.capacity());<NEW_LINE>}
(key).rejectionType(rejectionType);
677,565
public static DbfsRecordResponse unmarshall(DbfsRecordResponse dbfsRecordResponse, UnmarshallerContext _ctx) {<NEW_LINE>dbfsRecordResponse.setRequestId(_ctx.stringValue("DbfsRecordResponse.RequestId"));<NEW_LINE>dbfsRecordResponse.setPageNo(_ctx.longValue("DbfsRecordResponse.PageNo"));<NEW_LINE>dbfsRecordResponse.setPageSize(_ctx.longValue("DbfsRecordResponse.PageSize"));<NEW_LINE>dbfsRecordResponse.setTotal(_ctx.longValue("DbfsRecordResponse.Total"));<NEW_LINE>List<RecordsItem> records = new ArrayList<RecordsItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DbfsRecordResponse.Records.Length"); i++) {<NEW_LINE>RecordsItem recordsItem = new RecordsItem();<NEW_LINE>recordsItem.setId(_ctx.longValue("DbfsRecordResponse.Records[" + i + "].Id"));<NEW_LINE>recordsItem.setBatchStrategyNo(_ctx.stringValue<MASK><NEW_LINE>recordsItem.setAccountId(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].AccountId"));<NEW_LINE>recordsItem.setDbfsId(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].DbfsId"));<NEW_LINE>recordsItem.setEcsId(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].EcsId"));<NEW_LINE>recordsItem.setTaskId(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].TaskId"));<NEW_LINE>recordsItem.setRegionId(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].RegionId"));<NEW_LINE>recordsItem.setZoneId(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].ZoneId"));<NEW_LINE>recordsItem.setState(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].State"));<NEW_LINE>recordsItem.setCurrentVersion(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].CurrentVersion"));<NEW_LINE>recordsItem.setTargetVersion(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].TargetVersion"));<NEW_LINE>recordsItem.setUpgradeStartTime(_ctx.longValue("DbfsRecordResponse.Records[" + i + "].UpgradeStartTime"));<NEW_LINE>recordsItem.setUpgradeEndTime(_ctx.longValue("DbfsRecordResponse.Records[" + i + "].UpgradeEndTime"));<NEW_LINE>recordsItem.setTaskExecutionCounts(_ctx.integerValue("DbfsRecordResponse.Records[" + i + "].TaskExecutionCounts"));<NEW_LINE>recordsItem.setTaskErrorReason(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].TaskErrorReason"));<NEW_LINE>recordsItem.setCreateTime(_ctx.longValue("DbfsRecordResponse.Records[" + i + "].CreateTime"));<NEW_LINE>recordsItem.setUpdateTime(_ctx.longValue("DbfsRecordResponse.Records[" + i + "].UpdateTime"));<NEW_LINE>recordsItem.setIsDel(_ctx.stringValue("DbfsRecordResponse.Records[" + i + "].IsDel"));<NEW_LINE>records.add(recordsItem);<NEW_LINE>}<NEW_LINE>dbfsRecordResponse.setRecords(records);<NEW_LINE>return dbfsRecordResponse;<NEW_LINE>}
("DbfsRecordResponse.Records[" + i + "].BatchStrategyNo"));
754,193
public T readArrayMappingJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) {<NEW_LINE>ObjectReader autoTypeReader = checkAutoType(jsonReader, this.objectClass, this.features | features);<NEW_LINE>if (autoTypeReader != null && autoTypeReader != this && autoTypeReader.getObjectClass() != this.objectClass) {<NEW_LINE>return (T) autoTypeReader.readArrayMappingJSONBObject(jsonReader, fieldType, fieldName, features);<NEW_LINE>}<NEW_LINE>jsonReader.startArray();<NEW_LINE>Object object = defaultCreator.get();<NEW_LINE>fieldReader0.readFieldValue(jsonReader, object);<NEW_LINE><MASK><NEW_LINE>fieldReader2.readFieldValue(jsonReader, object);<NEW_LINE>fieldReader3.readFieldValue(jsonReader, object);<NEW_LINE>fieldReader4.readFieldValue(jsonReader, object);<NEW_LINE>fieldReader5.readFieldValue(jsonReader, object);<NEW_LINE>if (buildFunction != null) {<NEW_LINE>return (T) buildFunction.apply(object);<NEW_LINE>}<NEW_LINE>return (T) object;<NEW_LINE>}
fieldReader1.readFieldValue(jsonReader, object);
332,496
public DynamicType make(String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory) {<NEW_LINE>MethodDescription accessorMethod = methodAccessorFactory.registerAccessorFor(<MASK><NEW_LINE>LinkedHashMap<String, TypeDescription> parameterFields = extractFields(accessorMethod);<NEW_LINE>DynamicType.Builder<?> builder = new ByteBuddy(classFileVersion).with(TypeValidation.DISABLED).with(PrecomputedMethodGraph.INSTANCE).subclass(Object.class, ConstructorStrategy.Default.NO_CONSTRUCTORS).name(auxiliaryTypeName).modifiers(DEFAULT_TYPE_MODIFIER).implement(Runnable.class, Callable.class).intercept(new MethodCall(accessorMethod, assigner)).implement(serializableProxy ? new Class<?>[] { Serializable.class } : new Class<?>[0]).defineConstructor().withParameters(parameterFields.values()).intercept(ConstructorCall.INSTANCE);<NEW_LINE>for (Map.Entry<String, TypeDescription> field : parameterFields.entrySet()) {<NEW_LINE>builder = builder.defineField(field.getKey(), field.getValue(), Visibility.PRIVATE);<NEW_LINE>}<NEW_LINE>return builder.make();<NEW_LINE>}
specialMethodInvocation, MethodAccessorFactory.AccessType.DEFAULT);
403,970
protected void renderBehaviorizedJavaScriptAnchorStart(FacesContext facesContext, ResponseWriter writer, UIComponent component, String clientId, Map<String, List<ClientBehavior>> behaviors, FormInfo formInfo) throws IOException {<NEW_LINE>String commandOnclick;<NEW_LINE>if (component instanceof HtmlCommandLink) {<NEW_LINE>commandOnclick = ((HtmlCommandLink) component).getOnclick();<NEW_LINE>} else {<NEW_LINE>commandOnclick = (String) component.getAttributes().get(HTML.ONCLICK_ATTR);<NEW_LINE>}<NEW_LINE>// Calculate the script necessary to submit form<NEW_LINE>String serverEventCode = buildServerOnclick(facesContext, component, clientId, formInfo);<NEW_LINE>String onclick = null;<NEW_LINE>if (commandOnclick == null && (behaviors.isEmpty() || (!behaviors.containsKey(ClientBehaviorEvents.CLICK) && !behaviors.containsKey(ClientBehaviorEvents.ACTION)))) {<NEW_LINE>// we need to render only the submit script<NEW_LINE>onclick = serverEventCode;<NEW_LINE>} else {<NEW_LINE>boolean hasSubmittingBehavior = hasSubmittingBehavior(behaviors, ClientBehaviorEvents.CLICK) || <MASK><NEW_LINE>if (!hasSubmittingBehavior) {<NEW_LINE>// Ensure required resource javascript is available<NEW_LINE>ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, writer);<NEW_LINE>}<NEW_LINE>// render a javascript that chain the related code<NEW_LINE>Collection<ClientBehaviorContext.Parameter> paramList = HtmlRendererUtils.getClientBehaviorContextParameters(HtmlRendererUtils.mapAttachedParamsToStringValues(facesContext, component));<NEW_LINE>onclick = HtmlRendererUtils.buildBehaviorChain(facesContext, component, ClientBehaviorEvents.CLICK, paramList, ClientBehaviorEvents.ACTION, paramList, behaviors, commandOnclick, hasSubmittingBehavior ? null : serverEventCode);<NEW_LINE>}<NEW_LINE>writer.startElement(HTML.ANCHOR_ELEM, component);<NEW_LINE>writer.writeURIAttribute(HTML.HREF_ATTR, "#", null);<NEW_LINE>writer.writeAttribute(HTML.ONCLICK_ATTR, onclick, null);<NEW_LINE>}
hasSubmittingBehavior(behaviors, ClientBehaviorEvents.ACTION);
1,356,579
private void processFile(File file, String license) {<NEW_LINE>try {<NEW_LINE>String content = FileUtils.readFileToString(file);<NEW_LINE>int indexOfPackageStart = content.indexOf("package ");<NEW_LINE>if (indexOfPackageStart != -1) {<NEW_LINE>int indexOfPackageEnd = content.indexOf(";", indexOfPackageStart + 1);<NEW_LINE>int indexOfFirstImport = content.indexOf("import ", indexOfPackageEnd);<NEW_LINE>if (indexOfFirstImport != -1) {<NEW_LINE>if (content.substring(indexOfFirstImport - 2, indexOfFirstImport).equals("//")) {<NEW_LINE>indexOfFirstImport = indexOfFirstImport - 2;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (indexOfFirstImport == -1) {<NEW_LINE>int indexOfFirstPublic = content.indexOf("public ", indexOfPackageEnd);<NEW_LINE>int indexOfFirstPrivate = <MASK><NEW_LINE>if (indexOfFirstPublic != -1 && indexOfFirstPrivate != -1) {<NEW_LINE>if (indexOfFirstPublic < indexOfFirstPrivate) {<NEW_LINE>indexOfFirstImport = indexOfFirstPublic;<NEW_LINE>} else {<NEW_LINE>indexOfFirstImport = indexOfFirstPrivate;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (indexOfFirstPrivate != -1) {<NEW_LINE>indexOfFirstImport = indexOfFirstPrivate;<NEW_LINE>} else if (indexOfFirstPublic != -1) {<NEW_LINE>indexOfFirstImport = indexOfFirstPublic;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (indexOfFirstImport != -1) {<NEW_LINE>String first = content.substring(0, indexOfPackageEnd + 1);<NEW_LINE>String second = content.substring(indexOfFirstImport);<NEW_LINE>String total = first + "\n\n" + license + "\n\n" + second;<NEW_LINE>if (total.equals(content)) {<NEW_LINE>same++;<NEW_LINE>} else {<NEW_LINE>changed++;<NEW_LINE>}<NEW_LINE>FileUtils.writeStringToFile(file, total);<NEW_LINE>} else {<NEW_LINE>skipped++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOGGER.error("", e);<NEW_LINE>}<NEW_LINE>}
content.indexOf("private ", indexOfPackageEnd);
763,855
private void readNameIdMapV2(FileChannel nameIdMapHolder) throws IOException, InterruptedException {<NEW_LINE>nameIdMap.clear();<NEW_LINE>long localFileCounter = -1;<NEW_LINE>nameIdMapHolder.position(0);<NEW_LINE>NameFileIdEntry nameFileIdEntry;<NEW_LINE>final Map<Integer, String> idFileNameMap = new HashMap<>(1_000);<NEW_LINE>while ((nameFileIdEntry = readNextNameIdEntryV2(nameIdMapHolder)) != null) {<NEW_LINE>final long absFileId = <MASK><NEW_LINE>if (localFileCounter < absFileId) {<NEW_LINE>localFileCounter = absFileId;<NEW_LINE>}<NEW_LINE>if (absFileId != 0) {<NEW_LINE>nameIdMap.put(nameFileIdEntry.name, nameFileIdEntry.fileId);<NEW_LINE>idNameMap.put(nameFileIdEntry.fileId, nameFileIdEntry.name);<NEW_LINE>idFileNameMap.put(nameFileIdEntry.fileId, nameFileIdEntry.fileSystemName);<NEW_LINE>} else {<NEW_LINE>nameIdMap.remove(nameFileIdEntry.name);<NEW_LINE>idNameMap.remove(nameFileIdEntry.fileId);<NEW_LINE>idFileNameMap.remove(nameFileIdEntry.fileId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (final Map.Entry<String, Integer> nameIdEntry : nameIdMap.entrySet()) {<NEW_LINE>final int fileId = nameIdEntry.getValue();<NEW_LINE>if (fileId > 0) {<NEW_LINE>final long externalId = composeFileId(id, nameIdEntry.getValue());<NEW_LINE>if (files.get(externalId) == null) {<NEW_LINE>final Path path = storagePath.resolve(idFileNameMap.get((nameIdEntry.getValue())));<NEW_LINE>final AsyncFile file = new AsyncFile(path, pageSize);<NEW_LINE>if (file.exists()) {<NEW_LINE>file.open();<NEW_LINE>files.add(externalId, file);<NEW_LINE>} else {<NEW_LINE>idNameMap.remove(fileId);<NEW_LINE>nameIdMap.put(nameIdEntry.getKey(), -fileId);<NEW_LINE>idNameMap.put(-fileId, nameIdEntry.getKey());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Math.abs(nameFileIdEntry.fileId);
1,703,793
static private void validateModel(Model model, String className, ClassLoader classLoader) {<NEW_LINE>Collection c = null;<NEW_LINE>if (!(c = model.validate(className, classLoader, null)).isEmpty()) {<NEW_LINE>Iterator iter = c.iterator();<NEW_LINE>StringBuilder validationMsgs = new StringBuilder();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Exception ex = (Exception) iter.next();<NEW_LINE>String validationMsg = ex.getLocalizedMessage();<NEW_LINE>logger.fine(// NOI18N<NEW_LINE>I18NHelper.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>messages, "core.configuration.validationproblem", className, validationMsg));<NEW_LINE>// NOI18N<NEW_LINE>validationMsgs.append<MASK><NEW_LINE>}<NEW_LINE>throw new JDOFatalUserException(// NOI18N<NEW_LINE>I18NHelper.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>messages, "core.configuration.validationfailed", className, validationMsgs.toString()));<NEW_LINE>}<NEW_LINE>}
(validationMsg).append('\n');
1,655,935
private ITrxItemProcessor<I_M_InOut, Void> mkProcessor() {<NEW_LINE>return new ITrxItemProcessor<I_M_InOut, Void>() {<NEW_LINE><NEW_LINE>private final IDesadvBL desadvBL = <MASK><NEW_LINE><NEW_LINE>private ITrxItemProcessorContext processorCtx;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void setTrxItemProcessorCtx(final ITrxItemProcessorContext processorCtx) {<NEW_LINE>this.processorCtx = processorCtx;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void process(final I_M_InOut item) throws Exception {<NEW_LINE>// Also add invalid ones. The user can sort it out in the desadv window<NEW_LINE>// final IEDIDocumentBL ediDocumentBL = Services.get(IEDIDocumentBL.class);<NEW_LINE>// final List<Exception> feedback = ediDocumentBL.isValidInOut(item);<NEW_LINE>// if (!feedback.isEmpty())<NEW_LINE>// {<NEW_LINE>// final String errorMessage = ediDocumentBL.buildFeedback(feedback);<NEW_LINE>// throw new AdempiereException(errorMessage);<NEW_LINE>// }<NEW_LINE>final String trxNameBackup = InterfaceWrapperHelper.getTrxName(item);<NEW_LINE>try {<NEW_LINE>EDI_Desadv_Aggregate_M_InOuts.this.addLog("@Added@: @M_InOut_ID@ " + item.getDocumentNo());<NEW_LINE>InterfaceWrapperHelper.setTrxName(item, processorCtx.getTrxName());<NEW_LINE>final I_EDI_Desadv desadv = desadvBL.addToDesadvCreateForInOutIfNotExist(item);<NEW_LINE>if (desadv == null) {<NEW_LINE>EDI_Desadv_Aggregate_M_InOuts.this.addLog("Could not create desadv for M_InOut=" + item);<NEW_LINE>} else {<NEW_LINE>InterfaceWrapperHelper.save(item);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>InterfaceWrapperHelper.setTrxName(item, trxNameBackup);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void getResult() {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
Services.get(IDesadvBL.class);
1,318,088
public static Map<String, String> readSettingsFromStream(InputSource inputSource, String profileName) throws CoreException {<NEW_LINE>final ProfileDefaultHandler handler = new ProfileDefaultHandler(profileName);<NEW_LINE>try {<NEW_LINE>final SAXParserFactory factory = SAXParserFactory.newInstance();<NEW_LINE>final <MASK><NEW_LINE>parser.parse(inputSource, handler);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new CoreException(new Status(IStatus.WARNING, IConstants.PLUGIN_ID, e.getMessage(), e));<NEW_LINE>}<NEW_LINE>int version = handler.getVersion();<NEW_LINE>if (handler.getSettings() == null) {<NEW_LINE>if (!Objects.equals(profileName, handler.fName)) {<NEW_LINE>JavaLanguageServerPlugin.logError("Invalid settings: java.format.settings.profile=" + profileName + ". The '" + profileName + "' profile doesn't exist.");<NEW_LINE>} else {<NEW_LINE>JavaLanguageServerPlugin.logError("Invalid Formatter settings. Check 'java.format.settings.url' and 'java.format.settings.profile'");<NEW_LINE>}<NEW_LINE>return Collections.emptyMap();<NEW_LINE>}<NEW_LINE>if (version == ProfileVersionerCore.getCurrentVersion()) {<NEW_LINE>return handler.getSettings();<NEW_LINE>}<NEW_LINE>return ProfileVersionerCore.updateAndComplete(handler.getSettings(), version);<NEW_LINE>}
SAXParser parser = factory.newSAXParser();
248,389
protected SetExpressionHelper<E> addListener(InvalidationListener listener) {<NEW_LINE>if (invalidationListeners == null) {<NEW_LINE>invalidationListeners = new InvalidationListener[] { listener };<NEW_LINE>invalidationSize = 1;<NEW_LINE>} else {<NEW_LINE>final int oldCapacity = invalidationListeners.length;<NEW_LINE>if (locked) {<NEW_LINE>final int newCapacity = (invalidationSize < oldCapacity) ? oldCapacity : (oldCapacity * 3) / 2 + 1;<NEW_LINE>invalidationListeners = <MASK><NEW_LINE>} else if (invalidationSize == oldCapacity) {<NEW_LINE>invalidationSize = trim(invalidationSize, invalidationListeners);<NEW_LINE>if (invalidationSize == oldCapacity) {<NEW_LINE>final int newCapacity = (oldCapacity * 3) / 2 + 1;<NEW_LINE>invalidationListeners = Arrays.copyOf(invalidationListeners, newCapacity);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>invalidationListeners[invalidationSize++] = listener;<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
Arrays.copyOf(invalidationListeners, newCapacity);
1,824,658
protected Object replaceGeneric(Object thisObj, Object searchValue, Object replaceValue) {<NEW_LINE>requireObjectCoercible(thisObj);<NEW_LINE>if (isSpecialProfile.profile(!(searchValue == Undefined.instance || searchValue == Null.instance))) {<NEW_LINE>if (isRegExp.profile(getIsRegExpNode().executeBoolean(searchValue))) {<NEW_LINE>Object flags = getFlags(searchValue);<NEW_LINE>requireObjectCoercible(flags);<NEW_LINE>if (indexOf(toString(flags), 'g') == -1) {<NEW_LINE>errorBranch.enter();<NEW_LINE>throw Errors.createTypeError("Only global regexps allowed");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Object replacer = getMethod(searchValue, Symbol.SYMBOL_REPLACE);<NEW_LINE>if (callSpecialProfile.profile(replacer != Undefined.instance)) {<NEW_LINE>return call(replacer, searchValue, new Object<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// all child nodes must be checked to avoid race conditions on shared ASTs<NEW_LINE>if (toString2Node == null || toString3Node == null || isCallableNode == null) {<NEW_LINE>CompilerDirectives.transferToInterpreterAndInvalidate();<NEW_LINE>toString2Node = insert(JSToStringNode.create());<NEW_LINE>toString3Node = insert(JSToStringNode.create());<NEW_LINE>isCallableNode = insert(IsCallableNode.create());<NEW_LINE>}<NEW_LINE>return performReplaceAllGeneric(searchValue, replaceValue, thisObj);<NEW_LINE>}
[] { thisObj, replaceValue });
161,757
public void generateStoreSaveValueIfNecessary(Scope scope, CodeStream codeStream) {<NEW_LINE>// push receiver<NEW_LINE>codeStream.aload_0();<NEW_LINE>// push the 2 parameters of "setResult(Object, Class)"<NEW_LINE>if (this.expression == null || this.expression.resolvedType == TypeBinding.VOID) {<NEW_LINE>// expressionType == VoidBinding if code snippet is the expression "System.out.println()"<NEW_LINE>// push null<NEW_LINE>codeStream.aconst_null();<NEW_LINE>// void.class<NEW_LINE>codeStream.generateClassLiteralAccessForType(scope, TypeBinding.VOID, null);<NEW_LINE>} else {<NEW_LINE>// swap with expression<NEW_LINE>int valueTypeID <MASK><NEW_LINE>if (valueTypeID == T_long || valueTypeID == T_double) {<NEW_LINE>codeStream.dup_x2();<NEW_LINE>codeStream.pop();<NEW_LINE>} else {<NEW_LINE>codeStream.swap();<NEW_LINE>}<NEW_LINE>// generate wrapper if needed<NEW_LINE>if (this.expression.resolvedType.isBaseType() && this.expression.resolvedType != TypeBinding.NULL) {<NEW_LINE>codeStream.generateBoxingConversion(this.expression.resolvedType.id);<NEW_LINE>}<NEW_LINE>// generate the expression type<NEW_LINE>codeStream.generateClassLiteralAccessForType(scope, this.expression.resolvedType, null);<NEW_LINE>}<NEW_LINE>// generate the invoke virtual to "setResult(Object,Class)"<NEW_LINE>codeStream.invoke(Opcodes.OPC_invokevirtual, this.setResultMethod, null);<NEW_LINE>}
= this.expression.resolvedType.id;
897,354
private boolean isRowEditable(int row, boolean isAlwaysUpdateableColumn) {<NEW_LINE>// Entire Table not editable or no row<NEW_LINE>if (// metas: check !isAlwaysUpdateableColumn<NEW_LINE>(m_readOnly && !isAlwaysUpdateableColumn) || row < 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// If not Active - not editable<NEW_LINE>if (// && m_TabNo != Find.s_TabNo)<NEW_LINE>m_indexActiveColumn > 0) {<NEW_LINE>Object value = getValueAt(row, m_indexActiveColumn);<NEW_LINE>if (value instanceof Boolean) {<NEW_LINE>if (!((Boolean) value).booleanValue()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else if ("N".equals(value)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// If Processed - not editable (Find always editable)<NEW_LINE>if (// && m_TabNo != Find.s_TabNo)<NEW_LINE>// metas<NEW_LINE>m_indexProcessedColumn > 0 && !isAlwaysUpdateableColumn) {<NEW_LINE>Object processed = getValueAt(row, m_indexProcessedColumn);<NEW_LINE>if (processed instanceof Boolean) {<NEW_LINE>if (((Boolean) processed).booleanValue()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else if ("Y".equals(processed)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>final ImmutablePair<ClientId, OrgId> co = getClientOrg(row);<NEW_LINE>final ClientId clientId = co.getLeft();<NEW_LINE>final OrgId orgId = co.getRight();<NEW_LINE>if (clientId == null || orgId == null) {<NEW_LINE>// usually that's the case of a row for which the underlying record was deleted by some outside BL or process.<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final int Record_ID = getKeyID(row);<NEW_LINE>final IUserRolePermissions role = Env.getUserRolePermissions(m_ctx);<NEW_LINE>try {<NEW_LINE>return role.canUpdate(clientId, orgId, m_AD_Table_ID, Record_ID, false);<NEW_LINE>} catch (Exception ex) {<NEW_LINE><MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
log.warn("Failed checking role access. Considering row not editable.", ex);
40,605
// Visible for testing<NEW_LINE>BiIntFunction<Throwable, Completable> retryStrategy(final Executor executor, final HttpRequestMetaData requestMetaData) {<NEW_LINE>return (count, t) -> {<NEW_LINE>if (count > maxTotalRetries) {<NEW_LINE>return failed(t);<NEW_LINE>}<NEW_LINE>if (loadBalancerReadySubscriber != null && t instanceof NoAvailableHostException) {<NEW_LINE>final Completable onHostsAvailable = loadBalancerReadySubscriber.onHostsAvailable();<NEW_LINE>return sdStatus == null ? onHostsAvailable : onHostsAvailable.ambWith(sdStatus);<NEW_LINE>}<NEW_LINE>final BackOffPolicy backOffPolicy = retryFor.apply(requestMetaData, t);<NEW_LINE>if (backOffPolicy != NO_RETRIES) {<NEW_LINE>if (t instanceof DelayedRetry) {<NEW_LINE>final Duration constant = ((DelayedRetry) t).delay();<NEW_LINE>return backOffPolicy.newStrategy(executor).apply(count, t).concat(executor.timer(constant));<NEW_LINE>}<NEW_LINE>return backOffPolicy.newStrategy(executor<MASK><NEW_LINE>}<NEW_LINE>return failed(t);<NEW_LINE>};<NEW_LINE>}
).apply(count, t);
311,610
public void write(ConnectorSession session, CheckpointEntries entries, Path targetPath) {<NEW_LINE>RowType metadataEntryType = checkpointSchemaManager.getMetadataEntryType();<NEW_LINE>RowType protocolEntryType = checkpointSchemaManager.getProtocolEntryType();<NEW_LINE>RowType txnEntryType = checkpointSchemaManager.getTxnEntryType();<NEW_LINE>RowType addEntryType = checkpointSchemaManager.getAddEntryType(entries.getMetadataEntry());<NEW_LINE>RowType removeEntryType = checkpointSchemaManager.getRemoveEntryType();<NEW_LINE>List<String> columnNames = ImmutableList.of("metaData", "protocol", "txn", "add", "remove");<NEW_LINE>List<Type> columnTypes = ImmutableList.of(metadataEntryType, protocolEntryType, txnEntryType, addEntryType, removeEntryType);<NEW_LINE>Properties schema = buildSchemaProperties(columnNames, columnTypes);<NEW_LINE>Configuration conf = hdfsEnvironment.getConfiguration(new HdfsEnvironment<MASK><NEW_LINE>configureCompression(conf, SNAPPY);<NEW_LINE>JobConf jobConf = toJobConf(conf);<NEW_LINE>RecordFileWriter writer = new RecordFileWriter(targetPath, columnNames, fromHiveStorageFormat(PARQUET), schema, PARQUET.getEstimatedWriterMemoryUsage(), jobConf, typeManager, DateTimeZone.UTC, session);<NEW_LINE>PageBuilder pageBuilder = new PageBuilder(columnTypes);<NEW_LINE>writeMetadataEntry(pageBuilder, metadataEntryType, entries.getMetadataEntry());<NEW_LINE>writeProtocolEntry(pageBuilder, protocolEntryType, entries.getProtocolEntry());<NEW_LINE>for (TransactionEntry transactionEntry : entries.getTransactionEntries()) {<NEW_LINE>writeTransactionEntry(pageBuilder, txnEntryType, transactionEntry);<NEW_LINE>}<NEW_LINE>for (AddFileEntry addFileEntry : entries.getAddFileEntries()) {<NEW_LINE>writeAddFileEntry(pageBuilder, addEntryType, addFileEntry);<NEW_LINE>}<NEW_LINE>for (RemoveFileEntry removeFileEntry : entries.getRemoveFileEntries()) {<NEW_LINE>writeRemoveFileEntry(pageBuilder, removeEntryType, removeFileEntry);<NEW_LINE>}<NEW_LINE>// Not writing commit infos for now. DB does not keep them in the checkpoints by default<NEW_LINE>writer.appendRows(pageBuilder.build());<NEW_LINE>writer.commit();<NEW_LINE>}
.HdfsContext(session), targetPath);
164,733
public CreateAgentStatusResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateAgentStatusResult createAgentStatusResult = new CreateAgentStatusResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return createAgentStatusResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("AgentStatusARN", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createAgentStatusResult.setAgentStatusARN(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("AgentStatusId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createAgentStatusResult.setAgentStatusId(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return createAgentStatusResult;<NEW_LINE>}
class).unmarshall(context));
792,543
final UpdateSqlInjectionMatchSetResult executeUpdateSqlInjectionMatchSet(UpdateSqlInjectionMatchSetRequest updateSqlInjectionMatchSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateSqlInjectionMatchSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateSqlInjectionMatchSetRequest> request = null;<NEW_LINE>Response<UpdateSqlInjectionMatchSetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateSqlInjectionMatchSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateSqlInjectionMatchSetRequest));<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, "WAF Regional");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateSqlInjectionMatchSet");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateSqlInjectionMatchSetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateSqlInjectionMatchSetResultJsonUnmarshaller());<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.endEvent(Field.RequestMarshallTime);
182,284
@CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_initializeCompiler")<NEW_LINE>public static void initializeCompiler(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long compilerHandle, JByteArray hsOptions, JObject hsCompilable, boolean firstInitialization) {<NEW_LINE>try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, InitializeCompiler, env)) {<NEW_LINE>HotSpotTruffleCompilerImpl compiler = LibGraalObjectHandles.resolve(compilerHandle, HotSpotTruffleCompilerImpl.class);<NEW_LINE>Map<String, Object> options = decodeOptions(env, hsOptions);<NEW_LINE>CompilableTruffleAST compilable = new HSCompilableTruffleAST(s, hsCompilable);<NEW_LINE>compiler.<MASK><NEW_LINE>} catch (Throwable t) {<NEW_LINE>JNIExceptionWrapper.throwInHotSpot(env, t);<NEW_LINE>}<NEW_LINE>}
initialize(options, compilable, firstInitialization);
546,312
ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW_LINE>ActionResult<Wo> <MASK><NEW_LINE>Business business = new Business(emc);<NEW_LINE>if (StringUtils.isBlank(wi.getName()) || StringUtils.isBlank(wi.getUnit())) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>CacheKey cacheKey = new CacheKey(this.getClass(), wi.getName(), wi.getUnit());<NEW_LINE>Optional<?> optional = CacheManager.get(cacheCategory, cacheKey);<NEW_LINE>if (optional.isPresent()) {<NEW_LINE>result.setData((Wo) optional.get());<NEW_LINE>} else {<NEW_LINE>Wo wo = this.getUnitDutity(business, wi.getName(), wi.getUnit());<NEW_LINE>CacheManager.put(cacheCategory, cacheKey, wo);<NEW_LINE>result.setData(wo);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
result = new ActionResult<>();
224,688
private void remove_concave_corners_at_close() {<NEW_LINE>add_corner_for_snap_angle();<NEW_LINE>if (corner_list.size() < 4) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>IntPoint[] corner_arr = new IntPoint[corner_list.size()];<NEW_LINE>Iterator<IntPoint> it = corner_list.iterator();<NEW_LINE>for (int i = 0; i < corner_arr.length; ++i) {<NEW_LINE>corner_arr[i] = it.next();<NEW_LINE>}<NEW_LINE>int new_length = corner_arr.length;<NEW_LINE>IntPoint first_corner = corner_arr[0];<NEW_LINE>IntPoint second_corner = corner_arr[1];<NEW_LINE>while (new_length > 3) {<NEW_LINE>IntPoint last_corner = corner_arr[new_length - 1];<NEW_LINE>if (last_corner.side_of(second_corner, first_corner) != Side.ON_THE_LEFT) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>--new_length;<NEW_LINE>}<NEW_LINE>if (new_length != corner_arr.length) {<NEW_LINE>// recalculate the corner_list<NEW_LINE>corner_list = new java.<MASK><NEW_LINE>for (int i = 0; i < new_length; ++i) {<NEW_LINE>corner_list.add(corner_arr[i]);<NEW_LINE>}<NEW_LINE>add_corner_for_snap_angle();<NEW_LINE>}<NEW_LINE>}
util.LinkedList<IntPoint>();
524,860
public static void vertical3(Kernel1D_S32 kernel, GrayU16 src, GrayI16 dst) {<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 radius = kernel.getRadius();<NEW_LINE>final int imgWidth = dst.getWidth();<NEW_LINE>final int imgHeight = dst.getHeight();<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[indexSrc] & 0xFFFF) * k1;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * k2;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc<MASK><NEW_LINE>dataDst[indexDst++] = (short) total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
[indexSrc] & 0xFFFF) * k3;
1,399,074
public Mono<Void> pUnsubscribe(ByteBuffer... patterns) {<NEW_LINE>monosListener.acquire();<NEW_LINE>return Mono.defer(() -> {<NEW_LINE>List<CompletableFuture<?>> futures = new ArrayList<>(patterns.length);<NEW_LINE>for (ByteBuffer channel : patterns) {<NEW_LINE>ChannelName cn = toChannelName(channel);<NEW_LINE>CompletableFuture<Codec> f = subscribeService.unsubscribe(cn, PubSubType.PUNSUBSCRIBE);<NEW_LINE>f = f.whenComplete((res, e) -> {<NEW_LINE>synchronized (RedissonReactiveSubscription.this.patterns) {<NEW_LINE>Collection<PubSubConnectionEntry> entries = RedissonReactiveSubscription.<MASK><NEW_LINE>entries.stream().filter(en -> en.hasListeners(cn)).forEach(ee -> RedissonReactiveSubscription.this.patterns.remove(cn));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>futures.add(f);<NEW_LINE>}<NEW_LINE>CompletableFuture<Void> future = CompletableFuture.allOf(futures.toArray(new CompletableFuture[0]));<NEW_LINE>future = future.whenComplete((r, e) -> {<NEW_LINE>monosListener.release();<NEW_LINE>});<NEW_LINE>return Mono.fromFuture(future);<NEW_LINE>});<NEW_LINE>}
this.patterns.get(cn);
492,144
public static void serverTick(Level level, BlockPos worldPosition, BlockState state, TileTerraPlate self) {<NEW_LINE>boolean removeMana = true;<NEW_LINE>if (self.hasValidPlatform()) {<NEW_LINE>List<ItemStack> items = self.getItems();<NEW_LINE>SimpleContainer inv = self.getInventory();<NEW_LINE>ITerraPlateRecipe recipe = self.getCurrentRecipe(inv);<NEW_LINE>if (recipe != null) {<NEW_LINE>removeMana = false;<NEW_LINE>IManaSpark spark = self.getAttachedSpark();<NEW_LINE>if (spark != null) {<NEW_LINE>SparkHelper.getSparksAround(level, worldPosition.getX() + 0.5, worldPosition.getY() + 0.5, worldPosition.getZ() + 0.5, spark.getNetwork()).filter(otherSpark -> spark != otherSpark && IXplatAbstractions.INSTANCE.findManaReceiver(level, otherSpark.getAttachPos(), null) instanceof IManaPool).forEach(os -> os.registerTransfer(spark));<NEW_LINE>}<NEW_LINE>if (self.mana > 0) {<NEW_LINE>VanillaPacketDispatcher.dispatchTEToNearbyPlayers(self);<NEW_LINE>int proportion = Float.floatToIntBits(self.getCompletion());<NEW_LINE>IXplatAbstractions.INSTANCE.sendToNear(level, worldPosition, new PacketBotaniaEffect(EffectType.TERRA_PLATE, worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), proportion));<NEW_LINE>}<NEW_LINE>if (self.mana >= recipe.getMana()) {<NEW_LINE>ItemStack result = recipe.assemble(inv);<NEW_LINE>for (ItemStack item : items) {<NEW_LINE>item.setCount(0);<NEW_LINE>}<NEW_LINE>ItemEntity item = new ItemEntity(level, worldPosition.getX() + 0.5, worldPosition.getY() + 0.2, worldPosition.getZ() + 0.5, result);<NEW_LINE>item.setDeltaMovement(Vec3.ZERO);<NEW_LINE>level.addFreshEntity(item);<NEW_LINE>level.playSound(null, item.getX(), item.getY(), item.getZ(), ModSounds.terrasteelCraft, <MASK><NEW_LINE>self.mana = 0;<NEW_LINE>level.updateNeighbourForOutputSignal(worldPosition, state.getBlock());<NEW_LINE>VanillaPacketDispatcher.dispatchTEToNearbyPlayers(self);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (removeMana) {<NEW_LINE>self.receiveMana(-1000);<NEW_LINE>}<NEW_LINE>}
SoundSource.BLOCKS, 1F, 1F);
421,139
final ListPipelinesResult executeListPipelines(ListPipelinesRequest listPipelinesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPipelinesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListPipelinesRequest> request = null;<NEW_LINE>Response<ListPipelinesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListPipelinesRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Data Pipeline");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPipelines");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListPipelinesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPipelinesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(listPipelinesRequest));
85,243
public ChannelInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ChannelInfo channelInfo = new ChannelInfo();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();<NEW_LINE>if (name.equals("ChannelName")) {<NEW_LINE>channelInfo.setChannelName(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("ChannelARN")) {<NEW_LINE>channelInfo.setChannelARN(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("ChannelType")) {<NEW_LINE>channelInfo.setChannelType(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("ChannelStatus")) {<NEW_LINE>channelInfo.setChannelStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("CreationTime")) {<NEW_LINE>channelInfo.setCreationTime(DateJsonUnmarshaller.getInstance<MASK><NEW_LINE>} else if (name.equals("SingleMasterConfiguration")) {<NEW_LINE>channelInfo.setSingleMasterConfiguration(SingleMasterConfigurationJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("Version")) {<NEW_LINE>channelInfo.setVersion(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else {<NEW_LINE>reader.skipValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>return channelInfo;<NEW_LINE>}
().unmarshall(context));
541,898
public void run() {<NEW_LINE>Realm realm = RealmManager.getInstance().getNewRealm();<NEW_LINE>realm.executeTransaction(new Realm.Transaction() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void execute(Realm realm) {<NEW_LINE>String accountJid = chat.getAccount().toString();<NEW_LINE>String userJid = chat.getUser().toString();<NEW_LINE>ChatDataRealm chatRealm = realm.where(ChatDataRealm.class).equalTo("accountJid", accountJid).equalTo("userJid", userJid).findFirst();<NEW_LINE>if (chatRealm == null)<NEW_LINE>chatRealm <MASK><NEW_LINE>chatRealm.setLastPosition(chat.getLastPosition());<NEW_LINE>chatRealm.setArchived(chat.isArchived());<NEW_LINE>chatRealm.setHistoryRequestedAtStart(chat.isHistoryRequestedAtStart());<NEW_LINE>NotificationStateRealm notificationStateRealm = chatRealm.getNotificationState();<NEW_LINE>if (notificationStateRealm == null)<NEW_LINE>notificationStateRealm = new NotificationStateRealm();<NEW_LINE>notificationStateRealm.setMode(chat.getNotificationState().getMode());<NEW_LINE>notificationStateRealm.setTimestamp(chat.getNotificationState().getTimestamp());<NEW_LINE>chatRealm.setNotificationState(notificationStateRealm);<NEW_LINE>RealmObject realmObject = realm.copyToRealmOrUpdate(chatRealm);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
= new ChatDataRealm(accountJid, userJid);
379,746
public static Animator createCircularReveal(@NonNull CircularRevealWidget view, float centerX, float centerY, float endRadius) {<NEW_LINE>Animator revealInfoAnimator = ObjectAnimator.ofObject(view, CircularRevealProperty.CIRCULAR_REVEAL, CircularRevealEvaluator.CIRCULAR_REVEAL, new RevealInfo<MASK><NEW_LINE>if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {<NEW_LINE>// Ideally, the start radius would be inferred from the RevealInfo at the time of animation<NEW_LINE>// start (usually on the next event loop iteration). So we approximate.<NEW_LINE>RevealInfo revealInfo = view.getRevealInfo();<NEW_LINE>if (revealInfo == null) {<NEW_LINE>throw new IllegalStateException("Caller must set a non-null RevealInfo before calling this.");<NEW_LINE>}<NEW_LINE>float startRadius = revealInfo.radius;<NEW_LINE>Animator circularRevealAnimator = ViewAnimationUtils.createCircularReveal((View) view, (int) centerX, (int) centerY, startRadius, endRadius);<NEW_LINE>AnimatorSet set = new AnimatorSet();<NEW_LINE>set.playTogether(revealInfoAnimator, circularRevealAnimator);<NEW_LINE>return set;<NEW_LINE>} else {<NEW_LINE>return revealInfoAnimator;<NEW_LINE>}<NEW_LINE>}
(centerX, centerY, endRadius));
1,277,525
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>overridePendingTransition(R.anim.activity_slide_up, R.anim.activity_slide_down);<NEW_LINE>mCache = App.getInstance(this).getBitmapCache();<NEW_LINE>context = this;<NEW_LINE>sharedPrefs = context.getSharedPreferences("com.klinker.android.twitter_world_preferences", 0);<NEW_LINE>settings = AppSettings.getInstance(this);<NEW_LINE>try {<NEW_LINE>ViewConfiguration config = ViewConfiguration.get(this);<NEW_LINE>Field menuKeyField = <MASK><NEW_LINE>if (menuKeyField != null) {<NEW_LINE>menuKeyField.setAccessible(true);<NEW_LINE>menuKeyField.setBoolean(config, false);<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>// Ignore<NEW_LINE>}<NEW_LINE>if (getIntent().getBooleanExtra("from_widget", false) || ((settings.advanceWindowed && !getIntent().getBooleanExtra("long_click", false)) || !settings.advanceWindowed && getIntent().getBooleanExtra("long_click", false))) {<NEW_LINE>setUpWindow();<NEW_LINE>}<NEW_LINE>setUpTheme();<NEW_LINE>getFromIntent();<NEW_LINE>setContentView(R.layout.tweet_pager);<NEW_LINE>ViewPager pager = (ViewPager) findViewById(R.id.pager);<NEW_LINE>ProfilePagerAdapter mPagerAdapter = new ProfilePagerAdapter(getFragmentManager(), context, name, screenName, proPic, tweetId, isRetweet, isMyProfile);<NEW_LINE>pager.setAdapter(mPagerAdapter);<NEW_LINE>pager.setOffscreenPageLimit(3);<NEW_LINE>if (settings.addonTheme) {<NEW_LINE>PagerTitleStrip strip = (PagerTitleStrip) findViewById(R.id.pager_title_strip);<NEW_LINE>strip.setBackgroundColor(settings.pagerTitleInt);<NEW_LINE>if (!settings.showTitleStrip) {<NEW_LINE>strip.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Utils.setActionBar(context, !settings.advanceWindowed);<NEW_LINE>// set it to the profile<NEW_LINE>pager.setCurrentItem(1);<NEW_LINE>}
ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
1,053,880
private void computeEnumUniqNames() {<NEW_LINE>Map<String, String> definitiveNames = new HashMap<>();<NEW_LINE>for (String h : enumNames.keySet()) {<NEW_LINE>boolean hasDefName = false;<NEW_LINE>List<String> <MASK><NEW_LINE>for (String name : nameCandidates) {<NEW_LINE>String candidate = sanitizeOCamlTypeName(name);<NEW_LINE>if (!definitiveNames.containsKey(candidate) && !reservedWords.contains(candidate)) {<NEW_LINE>definitiveNames.put(candidate, h);<NEW_LINE>hasDefName = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!hasDefName) {<NEW_LINE>int i = 0;<NEW_LINE>String candidate;<NEW_LINE>while (definitiveNames.containsKey(candidate = sanitizeOCamlTypeName(nameCandidates.get(0) + "_" + i))) {<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>definitiveNames.put(candidate, h);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>enumUniqNames = definitiveNames.entrySet().stream().collect(Collectors.toMap(Map.Entry::getValue, Map.Entry::getKey));<NEW_LINE>}
nameCandidates = enumNames.get(h);
348,225
public byte[] messageDecrypt(byte[] input) throws InvalidCipherTextException {<NEW_LINE>if (forEncryption) {<NEW_LINE>throw new IllegalStateException("cipher initialised for decryption");<NEW_LINE>}<NEW_LINE>int c1Len = (n + 7) >> 3;<NEW_LINE>int c2Len = input.length - c1Len;<NEW_LINE>// split ciphertext (c1||c2)<NEW_LINE>byte[][] c1c2 = ByteUtils.split(input, c1Len);<NEW_LINE>byte[] c1 = c1c2[0];<NEW_LINE>byte[] c2 = c1c2[1];<NEW_LINE>// decrypt c1 ...<NEW_LINE>GF2Vector hrmVec = GF2Vector.OS2VP(n, c1);<NEW_LINE>GF2Vector[] decC1 = McElieceCCA2Primitives.decryptionPrimitive((McElieceCCA2PrivateKeyParameters) key, hrmVec);<NEW_LINE>byte[] rBytes = <MASK><NEW_LINE>// ... and obtain error vector z<NEW_LINE>GF2Vector z = decC1[1];<NEW_LINE>// get PRNG object<NEW_LINE>DigestRandomGenerator sr0 = new DigestRandomGenerator(new SHA1Digest());<NEW_LINE>// seed PRNG with r'<NEW_LINE>sr0.addSeedMaterial(rBytes);<NEW_LINE>// generate random sequence<NEW_LINE>byte[] mBytes = new byte[c2Len];<NEW_LINE>sr0.nextBytes(mBytes);<NEW_LINE>// XOR with c2 to obtain m<NEW_LINE>for (int i = 0; i < c2Len; i++) {<NEW_LINE>mBytes[i] ^= c2[i];<NEW_LINE>}<NEW_LINE>// compute H(r||m)<NEW_LINE>byte[] rmBytes = ByteUtils.concatenate(rBytes, mBytes);<NEW_LINE>byte[] hrm = new byte[messDigest.getDigestSize()];<NEW_LINE>messDigest.update(rmBytes, 0, rmBytes.length);<NEW_LINE>messDigest.doFinal(hrm, 0);<NEW_LINE>// compute Conv(H(r||m))<NEW_LINE>hrmVec = Conversions.encode(n, t, hrm);<NEW_LINE>// check that Conv(H(m||r)) = z<NEW_LINE>if (!hrmVec.equals(z)) {<NEW_LINE>throw new InvalidCipherTextException("Bad Padding: invalid ciphertext");<NEW_LINE>}<NEW_LINE>// return plaintext m<NEW_LINE>return mBytes;<NEW_LINE>}
decC1[0].getEncoded();
1,834,660
public RelDataType validateImpl(RelDataType targetRowType) {<NEW_LINE>resolvedNamespace = Preconditions.checkNotNull(resolveImpl(id));<NEW_LINE>if (resolvedNamespace instanceof TableNamespace) {<NEW_LINE>SqlValidatorTable table = resolvedNamespace.getTable();<NEW_LINE>if (validator.shouldExpandIdentifiers()) {<NEW_LINE>// TODO: expand qualifiers for column references also<NEW_LINE>List<String<MASK><NEW_LINE>if (qualifiedNames != null) {<NEW_LINE>// Assign positions to the components of the fully-qualified<NEW_LINE>// identifier, as best we can. We assume that qualification<NEW_LINE>// adds names to the front, e.g. FOO.BAR becomes BAZ.FOO.BAR.<NEW_LINE>List<SqlParserPos> poses = new ArrayList<>(Collections.nCopies(qualifiedNames.size(), id.getParserPosition()));<NEW_LINE>int offset = qualifiedNames.size() - id.names.size();<NEW_LINE>// Test offset in case catalog supports fewer qualifiers than catalog<NEW_LINE>// reader.<NEW_LINE>if (offset >= 0) {<NEW_LINE>for (int i = 0; i < id.names.size(); i++) {<NEW_LINE>poses.set(i + offset, id.getComponentParserPosition(i));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>id.setNames(qualifiedNames, poses);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>RelDataType rowType = resolvedNamespace.getRowType();<NEW_LINE>if (extendList != null) {<NEW_LINE>if (!(resolvedNamespace instanceof TableNamespace)) {<NEW_LINE>throw new RuntimeException("cannot convert");<NEW_LINE>}<NEW_LINE>resolvedNamespace = ((TableNamespace) resolvedNamespace).extend(extendList);<NEW_LINE>rowType = resolvedNamespace.getRowType();<NEW_LINE>}<NEW_LINE>// Build a list of monotonic expressions.<NEW_LINE>final ImmutableList.Builder<Pair<SqlNode, SqlMonotonicity>> builder = ImmutableList.builder();<NEW_LINE>List<RelDataTypeField> fields = rowType.getFieldList();<NEW_LINE>for (RelDataTypeField field : fields) {<NEW_LINE>final String fieldName = field.getName();<NEW_LINE>final SqlMonotonicity monotonicity = resolvedNamespace.getMonotonicity(fieldName);<NEW_LINE>if (monotonicity != SqlMonotonicity.NOT_MONOTONIC) {<NEW_LINE>builder.add(Pair.of((SqlNode) new SqlIdentifier(fieldName, SqlParserPos.ZERO), monotonicity));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>monotonicExprs = builder.build();<NEW_LINE>// Validation successful.<NEW_LINE>return rowType;<NEW_LINE>}
> qualifiedNames = table.getQualifiedName();
594,530
public List<Object> apply(Object o) {<NEW_LINE>// if (o instanceof Tbl) {<NEW_LINE>//<NEW_LINE>// Tbl tbl = (Tbl)o;<NEW_LINE>//<NEW_LINE>// if ( tbl.getTblPr()==null ) {<NEW_LINE>// tbl.setTblPr( Context.getWmlObjectFactory().createTblPr() );<NEW_LINE>// }<NEW_LINE>//<NEW_LINE>// if (tbl.getTblPr().getTblStyle()==null) {<NEW_LINE>// // Make table style explicit<NEW_LINE>// tbl.getTblPr().setTblStyle(Context.getWmlObjectFactory().createCTTblPrBaseTblStyle() );<NEW_LINE>// tbl.getTblPr().getTblStyle().setVal(defaultTableStyle);<NEW_LINE>//<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>if (o instanceof P) {<NEW_LINE>P p = (P) o;<NEW_LINE>if (p.getPPr() == null) {<NEW_LINE>p.setPPr(Context.getWmlObjectFactory().createPPr());<NEW_LINE>}<NEW_LINE>if (p.getPPr().getPStyle() == null) {<NEW_LINE>// String newStyle = styleMapping.get(defaultParagraphStyle);<NEW_LINE>// if (newStyle==null) {<NEW_LINE>// newStyle=defaultParagraphStyle;<NEW_LINE>// }<NEW_LINE>String newStyle = defaultParagraphStyle;<NEW_LINE>p.getPPr().setPStyle(Context.getWmlObjectFactory().createPPrBasePStyle());<NEW_LINE>if (tblStack.size() == 0) {<NEW_LINE>p.getPPr().<MASK><NEW_LINE>} else {<NEW_LINE>// We're in a table<NEW_LINE>String resultStyle = getCellPStyle(newStyle, true);<NEW_LINE>if (resultStyle == null) {<NEW_LINE>p.getPPr().getPStyle().setVal(newStyle);<NEW_LINE>} else {<NEW_LINE>p.getPPr().getPStyle().setVal(resultStyle);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// }<NEW_LINE>} else {<NEW_LINE>PStyle pstyle = p.getPPr().getPStyle();<NEW_LINE>String styleVal = pstyle.getVal();<NEW_LINE>if (styleVal != null) {<NEW_LINE>if (tblStack.size() > 0) {<NEW_LINE>log.debug("Fixing " + pstyle.getVal());<NEW_LINE>String newStyle = getCellPStyle(styleVal, styleVal.equals(defaultParagraphStyle));<NEW_LINE>if (newStyle == null) {<NEW_LINE>log.debug("getCellPStyle returned null, so leave as is");<NEW_LINE>} else {<NEW_LINE>p.getPPr().getPStyle().setVal(newStyle);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
getPStyle().setVal(newStyle);
1,449,635
public void run(RegressionEnvironment env) {<NEW_LINE>SupportVirtualDWFactory.getWindows().clear();<NEW_LINE>SupportVirtualDWFactory.setDestroyed(false);<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create context CtxSegmented as partition by theString from SupportBean", path);<NEW_LINE>env.compileDeploy("@public context CtxSegmented create window TestVDWWindow.test:vdw() as SupportBean", path);<NEW_LINE>env.compileDeploy("select * from TestVDWWindow", path);<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>env.sendEventBean(<MASK><NEW_LINE>// Independent windows for independent contexts<NEW_LINE>env.assertThat(() -> assertEquals(2, SupportVirtualDWFactory.getWindows().size()));<NEW_LINE>env.undeployAll();<NEW_LINE>env.assertThat(() -> {<NEW_LINE>for (SupportVirtualDW vdw : SupportVirtualDWFactory.getWindows()) {<NEW_LINE>assertTrue(vdw.isDestroyed());<NEW_LINE>}<NEW_LINE>assertTrue(SupportVirtualDWFactory.isDestroyed());<NEW_LINE>});<NEW_LINE>}
new SupportBean("E2", 2));
1,754,538
private void loadColumns() {<NEW_LINE>ArrayList<MReportColumn> list = new ArrayList<MReportColumn>();<NEW_LINE>String sql = "SELECT * FROM PA_ReportColumn WHERE PA_ReportColumnSet_ID=? AND IsActive='Y' ORDER BY SeqNo";<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sql, get_TrxName());<NEW_LINE>pstmt.setInt(1, getPA_ReportColumnSet_ID());<NEW_LINE><MASK><NEW_LINE>while (rs.next()) list.add(new MReportColumn(getCtx(), rs, null));<NEW_LINE>rs.close();<NEW_LINE>pstmt.close();<NEW_LINE>pstmt = null;<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.log(Level.SEVERE, sql, e);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>if (pstmt != null)<NEW_LINE>pstmt.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>m_columns = new MReportColumn[list.size()];<NEW_LINE>list.toArray(m_columns);<NEW_LINE>log.finest("ID=" + getPA_ReportColumnSet_ID() + " - Size=" + list.size());<NEW_LINE>}
ResultSet rs = pstmt.executeQuery();
783,873
protected static int underflowDistanceMul(float op1, float op2) {<NEW_LINE>float result = op1 * op2;<NEW_LINE>if (op1 > 0 && op2 < 0) {<NEW_LINE>return result == Float.NEGATIVE_INFINITY ? -1 : HALFWAY - scaleTo(result, HALFWAY);<NEW_LINE>} else if (op1 < 0 && op2 > 0) {<NEW_LINE>return result == Float.NEGATIVE_INFINITY ? -1 : <MASK><NEW_LINE>} else if (op1 > 0 && op2 > 0) {<NEW_LINE>return result == Float.POSITIVE_INFINITY ? Integer.MAX_VALUE : HALFWAY + scaleTo(Math.min(op1, op2), HALFWAY);<NEW_LINE>} else if (op1 < 0 && op2 < 0) {<NEW_LINE>return result == Float.POSITIVE_INFINITY ? Integer.MAX_VALUE : HALFWAY + scaleTo(Math.abs(Math.max(op1, op2)), HALFWAY);<NEW_LINE>} else {<NEW_LINE>// One of them is zero<NEW_LINE>return HALFWAY;<NEW_LINE>}<NEW_LINE>}
HALFWAY - scaleTo(result, HALFWAY);
1,818,777
public static boolean scrollToVisible(JViewport viewport, Rectangle fieldArea) {<NEW_LINE>Rectangle viewArea = viewport.getViewRect();<NEW_LINE>if (viewArea.contains(fieldArea)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Point pos = new Point();<NEW_LINE>pos.x = viewArea.x;<NEW_LINE>if (fieldArea.x + fieldArea.width > viewArea.x + viewArea.width) {<NEW_LINE>pos.x = fieldArea.x + fieldArea.width - viewArea.width + 5;<NEW_LINE>}<NEW_LINE>pos.x = pos.x > fieldArea.x ? fieldArea.x - 5 : pos.x;<NEW_LINE>if (pos.x + viewArea.width > viewport.getView().getWidth()) {<NEW_LINE>pos.x = viewport.getView().getWidth() - viewArea.width;<NEW_LINE>}<NEW_LINE>pos.y = viewArea.y;<NEW_LINE>if (fieldArea.y + fieldArea.height > viewArea.y + viewArea.height) {<NEW_LINE>pos.y = fieldArea.y + fieldArea.height - viewArea.height + 5;<NEW_LINE>}<NEW_LINE>pos.y = pos.y > fieldArea.y ? fieldArea.y - 5 : pos.y;<NEW_LINE>if (pos.y + viewArea.height > viewport.getView().getHeight()) {<NEW_LINE>pos.y = viewport.getView()<MASK><NEW_LINE>}<NEW_LINE>viewport.setViewPosition(pos);<NEW_LINE>return true;<NEW_LINE>}
.getHeight() - viewArea.height;
1,662,729
public NicTO toNicTO(NicProfile profile) {<NEW_LINE>NicTO to = new NicTO();<NEW_LINE>to.setDeviceId(profile.getDeviceId());<NEW_LINE>to.setBroadcastType(profile.getBroadcastType());<NEW_LINE>to.setType(profile.getTrafficType());<NEW_LINE>to.setIp(profile.getIPv4Address());<NEW_LINE>to.setNetmask(profile.getIPv4Netmask());<NEW_LINE>to.<MASK><NEW_LINE>to.setDns1(profile.getIPv4Dns1());<NEW_LINE>to.setDns2(profile.getIPv4Dns2());<NEW_LINE>to.setGateway(profile.getIPv4Gateway());<NEW_LINE>to.setDefaultNic(profile.isDefaultNic());<NEW_LINE>to.setBroadcastUri(profile.getBroadCastUri());<NEW_LINE>to.setIsolationuri(profile.getIsolationUri());<NEW_LINE>to.setNetworkRateMbps(profile.getNetworkRate());<NEW_LINE>to.setName(profile.getName());<NEW_LINE>to.setSecurityGroupEnabled(profile.isSecurityGroupEnabled());<NEW_LINE>to.setIp6Address(profile.getIPv6Address());<NEW_LINE>to.setIp6Cidr(profile.getIPv6Cidr());<NEW_LINE>NetworkVO network = _networkDao.findById(profile.getNetworkId());<NEW_LINE>to.setNetworkUuid(network.getUuid());<NEW_LINE>// Workaround to make sure the TO has the UUID we need for Nicira integration<NEW_LINE>NicVO nicVO = _nicDao.findById(profile.getId());<NEW_LINE>if (nicVO != null) {<NEW_LINE>to.setUuid(nicVO.getUuid());<NEW_LINE>// disable pxe on system vm nics to speed up boot time<NEW_LINE>if (nicVO.getVmType() != VirtualMachine.Type.User) {<NEW_LINE>to.setPxeDisable(true);<NEW_LINE>}<NEW_LINE>List<String> secIps = null;<NEW_LINE>if (nicVO.getSecondaryIp()) {<NEW_LINE>secIps = _nicSecIpDao.getSecondaryIpAddressesForNic(nicVO.getId());<NEW_LINE>}<NEW_LINE>to.setNicSecIps(secIps);<NEW_LINE>} else {<NEW_LINE>s_logger.warn("Unabled to load NicVO for NicProfile " + profile.getId());<NEW_LINE>// Workaround for dynamically created nics<NEW_LINE>// FixMe: uuid and secondary IPs can be made part of nic profile<NEW_LINE>to.setUuid(UUID.randomUUID().toString());<NEW_LINE>}<NEW_LINE>to.setDetails(getNicDetails(network));<NEW_LINE>// check whether the this nic has secondary ip addresses set<NEW_LINE>// set nic secondary ip address in NicTO which are used for security group<NEW_LINE>// configuration. Use full when vm stop/start<NEW_LINE>return to;<NEW_LINE>}
setMac(profile.getMacAddress());
641,637
public boolean onOptionsItemSelected(MenuItem item) {<NEW_LINE>if (InputHelper.isEmpty(url))<NEW_LINE>return super.onOptionsItemSelected(item);<NEW_LINE>if (item.getItemId() == R.id.viewAsCode) {<NEW_LINE>ViewerFragment viewerFragment = (ViewerFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(), ViewerFragment.TAG);<NEW_LINE>if (viewerFragment != null) {<NEW_LINE>viewerFragment.onViewAsCode();<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} else if (item.getItemId() == R.id.download) {<NEW_LINE>if (ActivityHelper.checkAndRequestReadWritePermission(this)) {<NEW_LINE>RestProvider.downloadFile(this, url);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} else if (item.getItemId() == R.id.browser) {<NEW_LINE>ActivityHelper.openChooser(this, htmlUrl != null ? htmlUrl : url);<NEW_LINE>return true;<NEW_LINE>} else if (item.getItemId() == R.id.copy) {<NEW_LINE>AppHelper.copyToClipboard(this, htmlUrl != null ? htmlUrl : url);<NEW_LINE>return true;<NEW_LINE>} else if (item.getItemId() == R.id.share) {<NEW_LINE>ActivityHelper.shareUrl(this, htmlUrl != null ? htmlUrl : url);<NEW_LINE>return true;<NEW_LINE>} else if (item.getItemId() == android.R.id.home) {<NEW_LINE>Uri uri = Uri.parse(url);<NEW_LINE>if (uri == null) {<NEW_LINE>finish();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>String gistId = LinkParserHelper.getGistId(uri);<NEW_LINE>if (!InputHelper.isEmpty(gistId)) {<NEW_LINE>startActivity(GistActivity.createIntent(this, gistId, isEnterprise()));<NEW_LINE>} else {<NEW_LINE>RepoFilesActivity.startActivity(<MASK><NEW_LINE>}<NEW_LINE>finish();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return super.onOptionsItemSelected(item);<NEW_LINE>}
this, url, isEnterprise());
1,416,113
public Point computeSize(int wHint, int hHint, boolean changed) {<NEW_LINE>Control[] controls = getControls(true);<NEW_LINE>if (controls.length == 0)<NEW_LINE>return new Point(wHint, hHint);<NEW_LINE>int width = 0;<NEW_LINE>int height = 0;<NEW_LINE>boolean vertical = (getStyle() & SWT.VERTICAL) != 0;<NEW_LINE>if (vertical) {<NEW_LINE>width = wHint;<NEW_LINE>height += (controls.length - 1) * getSashWidth();<NEW_LINE>} else {<NEW_LINE>height = hHint;<NEW_LINE>width <MASK><NEW_LINE>}<NEW_LINE>for (int i = 0; i < controls.length; i++) {<NEW_LINE>if (vertical) {<NEW_LINE>Point size = controls[i].computeSize(wHint, SWT.DEFAULT);<NEW_LINE>height += size.y;<NEW_LINE>} else {<NEW_LINE>Point size = controls[i].computeSize(SWT.DEFAULT, hHint);<NEW_LINE>if (controls[i].getData(MAINTAIN_SIZE) != null) {<NEW_LINE>size.x = fixedSize;<NEW_LINE>}<NEW_LINE>width += size.x;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// if (wHint != SWT.DEFAULT) width = wHint;<NEW_LINE>// if (hHint != SWT.DEFAULT) height = hHint;<NEW_LINE>return new Point(width, height);<NEW_LINE>}
+= controls.length * getSashWidth();
1,016,193
public static void keytool(String cmd) {<NEW_LINE>log.info("keytool " + cmd);<NEW_LINE>ArrayList<String> list = new ArrayList<String>();<NEW_LINE>StringTokenizer st = new StringTokenizer(cmd, " ");<NEW_LINE>String quoteBuffer = null;<NEW_LINE>while (st.hasMoreTokens()) {<NEW_LINE>String token = st.nextToken();<NEW_LINE>// System.out.println("= " + token + " = quoteBuffer=" + quoteBuffer + " - Size=" + list.size() );<NEW_LINE>if (quoteBuffer == null) {<NEW_LINE>if (token.startsWith("\""))<NEW_LINE>quoteBuffer = token.substring(1);<NEW_LINE>else<NEW_LINE>list.add(token);<NEW_LINE>} else<NEW_LINE>quoteBuffer += " " + token;<NEW_LINE>if (token.endsWith("\"")) {<NEW_LINE>String str = quoteBuffer.substring(0, quoteBuffer.length() - 1);<NEW_LINE>// System.out.println(" Buffer= " + str );<NEW_LINE>list.add(str);<NEW_LINE>quoteBuffer = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// all tokens<NEW_LINE>//<NEW_LINE>String[] args = new String[list.size()];<NEW_LINE>list.toArray(args);<NEW_LINE>// vpj-cd add support java 8<NEW_LINE>Class<?> keyTool = null;<NEW_LINE>try {<NEW_LINE>final String version = System.getProperty("java.version");<NEW_LINE>if (version.startsWith("1.8"))<NEW_LINE>keyTool = Class.forName(KEYTOOL_JAVA8);<NEW_LINE>if (version.startsWith("11"))<NEW_LINE>keyTool = Class.forName(KEYTOOL_JAVA8);<NEW_LINE>if (version.startsWith("17"))<NEW_LINE>keyTool = Class.forName(KEYTOOL_JAVA8);<NEW_LINE>Class[] argTypes = new Class[<MASK><NEW_LINE>Method main = keyTool.getDeclaredMethod("main", argTypes);<NEW_LINE>main.invoke(null, (Object) args);<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
] { String[].class };
1,340,586
public InputStream newInputStream(Path path, OpenOption... options) throws IOException {<NEW_LINE>// Validate options. Only read is supported.<NEW_LINE>if (options.length > 1 || (options.length > 0 && !options[0].equals(StandardOpenOption.READ))) {<NEW_LINE>throw LoggingUtility.logError(ClientLoggerHolder.LOGGER, new UnsupportedOperationException("Only the read option is supported."));<NEW_LINE>}<NEW_LINE>AzureResource resource = new AzureResource(path);<NEW_LINE>AzurePath.ensureFileSystemOpen(resource.getPath());<NEW_LINE>// Ensure the path points to a file.<NEW_LINE>if (!resource.checkDirStatus().equals(DirectoryStatus.NOT_A_DIRECTORY)) {<NEW_LINE>throw LoggingUtility.logError(ClientLoggerHolder.LOGGER, new IOException("Path either does not exist or points to a directory." + "Path must point to a file. Path: " <MASK><NEW_LINE>}<NEW_LINE>// Note that methods on BlobInputStream are already synchronized.<NEW_LINE>return new NioBlobInputStream(resource.getBlobClient().openInputStream(), resource.getPath());<NEW_LINE>}
+ path.toString()));
1,183,496
public static QueryPushAnalysisTaskListResponse unmarshall(QueryPushAnalysisTaskListResponse queryPushAnalysisTaskListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryPushAnalysisTaskListResponse.setRequestId(_ctx.stringValue("QueryPushAnalysisTaskListResponse.RequestId"));<NEW_LINE>queryPushAnalysisTaskListResponse.setResultMessage(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultMessage"));<NEW_LINE>queryPushAnalysisTaskListResponse.setResultCode(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultCode"));<NEW_LINE>ResultContent resultContent = new ResultContent();<NEW_LINE>List<DataItem> data = new ArrayList<DataItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryPushAnalysisTaskListResponse.ResultContent.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setType(_ctx.longValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].Type"));<NEW_LINE>dataItem.setTaskName(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].TaskName"));<NEW_LINE>dataItem.setGmtCreate(_ctx.longValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].GmtCreate"));<NEW_LINE>dataItem.setTemplateName(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].TemplateName"));<NEW_LINE>dataItem.setTaskId(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].TaskId"));<NEW_LINE>dataItem.setTemplateId(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].TemplateId"));<NEW_LINE>List<ListItem> list = new ArrayList<ListItem>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].List.Length"); j++) {<NEW_LINE>ListItem listItem = new ListItem();<NEW_LINE>listItem.setType(_ctx.longValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].List[" + j + "].Type"));<NEW_LINE>listItem.setTaskName(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].List[" + j + "].TaskName"));<NEW_LINE>listItem.setGmtCreate(_ctx.longValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i <MASK><NEW_LINE>listItem.setTemplateName(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].List[" + j + "].TemplateName"));<NEW_LINE>listItem.setTaskId(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].List[" + j + "].TaskId"));<NEW_LINE>listItem.setTemplateId(_ctx.stringValue("QueryPushAnalysisTaskListResponse.ResultContent.Data[" + i + "].List[" + j + "].TemplateId"));<NEW_LINE>list.add(listItem);<NEW_LINE>}<NEW_LINE>dataItem.setList(list);<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>resultContent.setData(data);<NEW_LINE>queryPushAnalysisTaskListResponse.setResultContent(resultContent);<NEW_LINE>return queryPushAnalysisTaskListResponse;<NEW_LINE>}
+ "].List[" + j + "].GmtCreate"));
147,093
private void createOrUpdateBpartnerProduct(@NonNull final JsonRequestBPartnerProductUpsert jsonRequestBPartnerProductUpsert, @NonNull final SyncAdvise effectiveSyncAdvise, @NonNull final ProductId productId, @NonNull final String orgCode) {<NEW_LINE>final ExternalIdentifier externalIdentifier = ExternalIdentifier.of(jsonRequestBPartnerProductUpsert.getBpartnerIdentifier());<NEW_LINE>final BPartnerId bPartnerId = getBPartnerId(externalIdentifier, orgCode);<NEW_LINE>final BPartnerProduct existingBPartnerProduct = productRepository.getByIdOrNull(productId, bPartnerId);<NEW_LINE>if (existingBPartnerProduct != null) {<NEW_LINE>if (effectiveSyncAdvise.getIfExists().isUpdate()) {<NEW_LINE>final BPartnerProduct bPartnerProduct = syncBPartnerProductWithJson(jsonRequestBPartnerProductUpsert, existingBPartnerProduct, bPartnerId);<NEW_LINE>productRepository.updateBPartnerProduct(bPartnerProduct);<NEW_LINE>}<NEW_LINE>} else if (effectiveSyncAdvise.isFailIfNotExists()) {<NEW_LINE>throw MissingResourceException.builder().resourceName("C_BPartner_Product").resourceIdentifier("{c_bpartner_identifier:" + jsonRequestBPartnerProductUpsert.getBpartnerIdentifier() + ", m_product_id: " + productId.getRepoId()).build(<MASK><NEW_LINE>} else {<NEW_LINE>final CreateBPartnerProductRequest createBPartnerProductRequest = getCreateBPartnerProductRequest(jsonRequestBPartnerProductUpsert, productId, bPartnerId);<NEW_LINE>productRepository.createBPartnerProduct(createBPartnerProductRequest);<NEW_LINE>}<NEW_LINE>}
).setParameter("effectiveSyncAdvise", effectiveSyncAdvise);
1,709,877
private void updateIfNeeded(@NonNull final Project project, @NonNull final AntBuildExtender extender) {<NEW_LINE>// NOI18N<NEW_LINE>Parameters.notNull("project", project);<NEW_LINE>// NOI18N<NEW_LINE>Parameters.notNull("extender", extender);<NEW_LINE>if (extender.getExtension(J2SEDeployProperties.getCurrentExtensionName()) != null) {<NEW_LINE>// Already has a current version of extension<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.// NOI18N<NEW_LINE>log(// NOI18N<NEW_LINE>Level.FINE, "The project {0} ({1}) already has a current version ({2}) of JWS extension.", new Object[] { ProjectUtils.getInformation(project).getDisplayName(), FileUtil.getFileDisplayName(project.getProjectDirectory()), J2SEDeployProperties.getCurrentExtensionName() });<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>reenter.set(Boolean.TRUE);<NEW_LINE>try {<NEW_LINE>boolean needsUpdate = false;<NEW_LINE>for (String oldExt : J2SEDeployProperties.getOldExtensionNames()) {<NEW_LINE>final AntBuildExtender.Extension <MASK><NEW_LINE>if (extension != null) {<NEW_LINE>extender.removeExtension(oldExt);<NEW_LINE>needsUpdate = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (needsUpdate) {<NEW_LINE>try {<NEW_LINE>// There was an old extension which needs to be updated<NEW_LINE>J2SEDeployProperties.updateJ2SEDeployExtension(project);<NEW_LINE>ProjectManager.getDefault().saveProject(project);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>reenter.remove();<NEW_LINE>}<NEW_LINE>}
extension = extender.getExtension(oldExt);
1,111,296
private void initialize() {<NEW_LINE>visualizer.setDecoration(new IconValidationDecorator());<NEW_LINE>viewModel = new SharedDatabaseLoginDialogViewModel(frame, dialogService, preferencesService);<NEW_LINE>databaseType.getItems().addAll(DBMSType.values());<NEW_LINE>databaseType.getSelectionModel().select(0);<NEW_LINE>database.textProperty().bindBidirectional(viewModel.databaseproperty());<NEW_LINE>host.textProperty().bindBidirectional(viewModel.hostProperty());<NEW_LINE>user.textProperty().bindBidirectional(viewModel.userProperty());<NEW_LINE>password.textProperty().bindBidirectional(viewModel.passwordProperty());<NEW_LINE>port.textProperty().bindBidirectional(viewModel.portProperty());<NEW_LINE>serverTimezone.textProperty().<MASK><NEW_LINE>databaseType.valueProperty().bindBidirectional(viewModel.selectedDbmstypeProperty());<NEW_LINE>folder.textProperty().bindBidirectional(viewModel.folderProperty());<NEW_LINE>browseButton.disableProperty().bind(viewModel.autosaveProperty().not());<NEW_LINE>folder.disableProperty().bind(viewModel.autosaveProperty().not());<NEW_LINE>autosave.selectedProperty().bindBidirectional(viewModel.autosaveProperty());<NEW_LINE>useSSL.selectedProperty().bindBidirectional(viewModel.useSSLProperty());<NEW_LINE>fileKeystore.textProperty().bindBidirectional(viewModel.keyStoreProperty());<NEW_LINE>browseKeystore.disableProperty().bind(viewModel.useSSLProperty().not());<NEW_LINE>passwordKeystore.disableProperty().bind(viewModel.useSSLProperty().not());<NEW_LINE>passwordKeystore.textProperty().bindBidirectional(viewModel.keyStorePasswordProperty());<NEW_LINE>rememberPassword.selectedProperty().bindBidirectional(viewModel.rememberPasswordProperty());<NEW_LINE>// Must be executed after the initialization of the view, otherwise it doesn't work<NEW_LINE>Platform.runLater(() -> {<NEW_LINE>visualizer.initVisualization(viewModel.dbValidation(), database, true);<NEW_LINE>visualizer.initVisualization(viewModel.hostValidation(), host, true);<NEW_LINE>visualizer.initVisualization(viewModel.portValidation(), port, true);<NEW_LINE>visualizer.initVisualization(viewModel.userValidation(), user, true);<NEW_LINE>EasyBind.subscribe(autosave.selectedProperty(), selected -> visualizer.initVisualization(viewModel.folderValidation(), folder, true));<NEW_LINE>EasyBind.subscribe(useSSL.selectedProperty(), selected -> visualizer.initVisualization(viewModel.keystoreValidation(), fileKeystore, true));<NEW_LINE>});<NEW_LINE>}
bindBidirectional(viewModel.serverTimezoneProperty());
1,175,141
private void deleteProjects(Session session) {<NEW_LINE>LOGGER.trace("Project deleting");<NEW_LINE>var projectDeleteQuery = session.createQuery("FROM ProjectEntity pr WHERE pr.deleted = :deleted ");<NEW_LINE>projectDeleteQuery.setParameter(DELETED_KEY, true);<NEW_LINE>projectDeleteQuery.setMaxResults(this.recordUpdateLimit);<NEW_LINE>List<ProjectEntity> projectEntities = projectDeleteQuery.list();<NEW_LINE>List<String> projectIds = new ArrayList<>();<NEW_LINE>if (!projectEntities.isEmpty()) {<NEW_LINE>for (ProjectEntity projectEntity : projectEntities) {<NEW_LINE>projectIds.add(projectEntity.getId());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>mdbRoleService.deleteEntityResourcesWithServiceUser(projectIds, ModelDBServiceResourceTypes.PROJECT);<NEW_LINE>var transaction = session.beginTransaction();<NEW_LINE>var updateDeletedStatusExperimentQueryString = "UPDATE ExperimentEntity exp SET exp.deleted = :deleted WHERE exp.project_id IN (:projectIds)";<NEW_LINE>var <MASK><NEW_LINE>deletedExperimentQuery.setParameter(DELETED_KEY, true);<NEW_LINE>deletedExperimentQuery.setParameter("projectIds", projectIds);<NEW_LINE>deletedExperimentQuery.executeUpdate();<NEW_LINE>transaction.commit();<NEW_LINE>for (ProjectEntity projectEntity : projectEntities) {<NEW_LINE>try {<NEW_LINE>transaction = session.beginTransaction();<NEW_LINE>session.delete(projectEntity);<NEW_LINE>transaction.commit();<NEW_LINE>} catch (OptimisticLockException ex) {<NEW_LINE>LOGGER.info("DeleteEntitiesCron : deleteProjects : Exception: {}", ex.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (OptimisticLockException ex) {<NEW_LINE>LOGGER.info("DeleteEntitiesCron : deleteProjects : Exception: {}", ex.getMessage());<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOGGER.warn("DeleteEntitiesCron : deleteProjects : Exception: ", ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOGGER.debug("Project Deleted successfully : Deleted projects count {}", projectIds.size());<NEW_LINE>}
deletedExperimentQuery = session.createQuery(updateDeletedStatusExperimentQueryString);
1,718,252
public void main() {<NEW_LINE>startif(new Condition(uSegments, Operator.GREATER_THAN, 0f));<NEW_LINE>{<NEW_LINE>// translate from texture to orthagonal coordinates<NEW_LINE>RVec2 delta = new RVec2("delta");<NEW_LINE>delta.assign(vTextureCoord.multiply(2f).subtract(1f));<NEW_LINE>// multiply the mapping angle to compress the image angularly,<NEW_LINE>// while maintaining vertical symmetry<NEW_LINE>// wraparound implements the kaleidoscope repetition<NEW_LINE>RFloat theta = new RFloat("theta");<NEW_LINE>// x,y are reversed for vertical symmetry<NEW_LINE>theta.assign(atan(delta.x(), delta.y()));<NEW_LINE>startif(new Condition(theta<MASK><NEW_LINE>theta.assignMultiply(-1);<NEW_LINE>endif();<NEW_LINE>theta.assignMultiply(uSegments);<NEW_LINE>// map theta and length back to orthagonal coordinates<NEW_LINE>RVec2 uv = new RVec2("uv");<NEW_LINE>uv.assign(castVec2(cos(theta), sin(theta)));<NEW_LINE>uv.assignMultiply(length(delta));<NEW_LINE>// translate back to texture coordiantes<NEW_LINE>uv.assignAdd(1f);<NEW_LINE>uv.assignMultiply(0.5f);<NEW_LINE>GL_FRAG_COLOR.assign(texture2D(uTexture, uv));<NEW_LINE>}<NEW_LINE>ifelse();<NEW_LINE>{<NEW_LINE>GL_FRAG_COLOR.assign(texture2D(uTexture, vTextureCoord));<NEW_LINE>}<NEW_LINE>endif();<NEW_LINE>}
, Operator.LESS_THAN, 0));
770,211
// B.3 pg 62<NEW_LINE>public ECPoint twice() {<NEW_LINE>if (this.isInfinity()) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>ECCurve curve = this.getCurve();<NEW_LINE>SecP160R2FieldElement Y1 = (SecP160R2FieldElement) this.y;<NEW_LINE>if (Y1.isZero()) {<NEW_LINE>return curve.getInfinity();<NEW_LINE>}<NEW_LINE>SecP160R2FieldElement X1 = (SecP160R2FieldElement) this.x, Z1 = (SecP160R2FieldElement) this.zs[0];<NEW_LINE>int c;<NEW_LINE>int[] Y1Squared = Nat160.create();<NEW_LINE>SecP160R2Field.square(Y1.x, Y1Squared);<NEW_LINE>int[] T = Nat160.create();<NEW_LINE>SecP160R2Field.square(Y1Squared, T);<NEW_LINE>int[] M = Nat160.create();<NEW_LINE>SecP160R2Field.square(X1.x, M);<NEW_LINE>c = Nat160.addBothTo(M, M, M);<NEW_LINE><MASK><NEW_LINE>int[] S = Y1Squared;<NEW_LINE>SecP160R2Field.multiply(Y1Squared, X1.x, S);<NEW_LINE>c = Nat.shiftUpBits(5, S, 2, 0);<NEW_LINE>SecP160R2Field.reduce32(c, S);<NEW_LINE>int[] t1 = Nat160.create();<NEW_LINE>c = Nat.shiftUpBits(5, T, 3, 0, t1);<NEW_LINE>SecP160R2Field.reduce32(c, t1);<NEW_LINE>SecP160R2FieldElement X3 = new SecP160R2FieldElement(T);<NEW_LINE>SecP160R2Field.square(M, X3.x);<NEW_LINE>SecP160R2Field.subtract(X3.x, S, X3.x);<NEW_LINE>SecP160R2Field.subtract(X3.x, S, X3.x);<NEW_LINE>SecP160R2FieldElement Y3 = new SecP160R2FieldElement(S);<NEW_LINE>SecP160R2Field.subtract(S, X3.x, Y3.x);<NEW_LINE>SecP160R2Field.multiply(Y3.x, M, Y3.x);<NEW_LINE>SecP160R2Field.subtract(Y3.x, t1, Y3.x);<NEW_LINE>SecP160R2FieldElement Z3 = new SecP160R2FieldElement(M);<NEW_LINE>SecP160R2Field.twice(Y1.x, Z3.x);<NEW_LINE>if (!Z1.isOne()) {<NEW_LINE>SecP160R2Field.multiply(Z3.x, Z1.x, Z3.x);<NEW_LINE>}<NEW_LINE>return new SecP160K1Point(curve, X3, Y3, new ECFieldElement[] { Z3 });<NEW_LINE>}
SecP160R2Field.reduce32(c, M);
1,641,821
public Response renderForm(MultivaluedMap<String, String> formData, List<FormMessage> errors) {<NEW_LINE>String executionId = formExecution.getId();<NEW_LINE>processor.getAuthenticationSession().setAuthNote(AuthenticationProcessor.CURRENT_AUTHENTICATION_EXECUTION, executionId);<NEW_LINE>String code = processor.generateCode();<NEW_LINE>URI <MASK><NEW_LINE>LoginFormsProvider form = processor.getSession().getProvider(LoginFormsProvider.class).setAuthenticationSession(processor.getAuthenticationSession()).setActionUri(actionUrl).setExecution(executionId).setClientSessionCode(code).setFormData(formData).setErrors(errors);<NEW_LINE>for (AuthenticationExecutionModel formActionExecution : formActionExecutions) {<NEW_LINE>if (!formActionExecution.isEnabled())<NEW_LINE>continue;<NEW_LINE>FormAction action = processor.getSession().getProvider(FormAction.class, formActionExecution.getAuthenticator());<NEW_LINE>FormContext result = new FormContextImpl(formActionExecution);<NEW_LINE>action.buildPage(result, form);<NEW_LINE>}<NEW_LINE>FormContext context = new FormContextImpl(formExecution);<NEW_LINE>return formAuthenticator.render(context, form);<NEW_LINE>}
actionUrl = getActionUrl(executionId, code);
57,009
public CcCompilationContext createCcCompilationContext(Object headers, Object systemIncludes, Object includes, Object quoteIncludes, Object frameworkIncludes, Object defines, Object localDefines, Sequence<?> directTextualHdrs, Sequence<?> directPublicHdrs, Sequence<?> directPrivateHdrs, Object purposeNoneable, StarlarkThread thread) throws EvalException {<NEW_LINE>if (checkObjectsBound(purposeNoneable)) {<NEW_LINE>checkPrivateStarlarkificationAllowlist(thread);<NEW_LINE>}<NEW_LINE>CcCompilationContext.Builder ccCompilationContext = CcCompilationContext.builder(/* actionConstructionContext= */<NEW_LINE>null, /* configuration= */<NEW_LINE>null, /* label= */<NEW_LINE>null);<NEW_LINE>ImmutableList<Artifact> headerList = toNestedSetOfArtifacts(headers, "headers").toList();<NEW_LINE>ImmutableList<Artifact> textualHdrsList = Sequence.cast(directTextualHdrs, Artifact.<MASK><NEW_LINE>ImmutableList<Artifact> modularPublicHdrsList = Sequence.cast(directPublicHdrs, Artifact.class, "direct_public_headers").getImmutableList();<NEW_LINE>ImmutableList<Artifact> modularPrivateHdrsList = Sequence.cast(directPrivateHdrs, Artifact.class, "direct_private_headers").getImmutableList();<NEW_LINE>ccCompilationContext.addDeclaredIncludeSrcs(headerList);<NEW_LINE>ccCompilationContext.addModularPublicHdrs(headerList);<NEW_LINE>ccCompilationContext.addSystemIncludeDirs(toNestedSetOfStrings(systemIncludes, "system_includes").toList().stream().map(x -> PathFragment.create(x)).collect(ImmutableList.toImmutableList()));<NEW_LINE>ccCompilationContext.addIncludeDirs(toNestedSetOfStrings(includes, "includes").toList().stream().map(x -> PathFragment.create(x)).collect(ImmutableList.toImmutableList()));<NEW_LINE>ccCompilationContext.addQuoteIncludeDirs(toNestedSetOfStrings(quoteIncludes, "quote_includes").toList().stream().map(x -> PathFragment.create(x)).collect(ImmutableList.toImmutableList()));<NEW_LINE>ccCompilationContext.addFrameworkIncludeDirs(toNestedSetOfStrings(frameworkIncludes, "framework_includes").toList().stream().map(x -> PathFragment.create(x)).collect(ImmutableList.toImmutableList()));<NEW_LINE>ccCompilationContext.addDefines(toNestedSetOfStrings(defines, "defines").toList());<NEW_LINE>ccCompilationContext.addNonTransitiveDefines(toNestedSetOfStrings(localDefines, "local_defines").toList());<NEW_LINE>ccCompilationContext.addTextualHdrs(textualHdrsList);<NEW_LINE>ccCompilationContext.addModularPublicHdrs(modularPublicHdrsList);<NEW_LINE>ccCompilationContext.addModularPrivateHdrs(modularPrivateHdrsList);<NEW_LINE>if (purposeNoneable != null && purposeNoneable != Starlark.UNBOUND) {<NEW_LINE>ccCompilationContext.setPurpose((String) purposeNoneable);<NEW_LINE>}<NEW_LINE>return ccCompilationContext.build();<NEW_LINE>}
class, "direct_textual_headers").getImmutableList();
595,036
private // Copies schemas from searchdefinitions/ to schemas/ if searchdefinitions/ exists<NEW_LINE>void moveSearchDefinitionsToSchemasDir(java.nio.file.Path applicationDir) throws IOException {<NEW_LINE>File schemasDir = applicationDir.resolve(ApplicationPackage.SCHEMAS_DIR.getRelative()).toFile();<NEW_LINE>File sdDir = applicationDir.resolve(ApplicationPackage.SEARCH_DEFINITIONS_DIR.getRelative()).toFile();<NEW_LINE>if (sdDir.exists() && sdDir.isDirectory()) {<NEW_LINE>File[<MASK><NEW_LINE>if (sdFiles != null) {<NEW_LINE>Files.createDirectories(schemasDir.toPath());<NEW_LINE>Arrays.asList(sdFiles).forEach(file -> Exceptions.uncheck(() -> Files.move(file.toPath(), schemasDir.toPath().resolve(file.toPath().getFileName()), StandardCopyOption.REPLACE_EXISTING)));<NEW_LINE>}<NEW_LINE>Files.delete(sdDir.toPath());<NEW_LINE>}<NEW_LINE>}
] sdFiles = sdDir.listFiles();
354,158
public void start(Stage stage) {<NEW_LINE>this.stage = stage;<NEW_LINE>WorkspaceWindow workspaceWindow = new WorkspaceWindow();<NEW_LINE>workspaceWindow.readFromFile();<NEW_LINE>if (WorkspaceWindow.getWorkspace() == null) {<NEW_LINE>workspaceWindow.show(null);<NEW_LINE>}<NEW_LINE>if (WorkspaceWindow.getWorkspace() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>GlobalConfig.getInstance().setWorkspace(WorkspaceWindow.getWorkspace().getAbsolutePath());<NEW_LINE>stage.setTitle(SystemProperties.getInstance().getSystemName());<NEW_LINE>mainWindow = new MainWindow(stage, SystemProperties.getInstance().getWidth(), SystemProperties.getInstance().getHeight());<NEW_LINE>mainWindow.<MASK><NEW_LINE>scene = mainWindow.getScene();<NEW_LINE>// ImageView iv = new ImageView(new Image("file:images/LisaSumoIcon.png"));<NEW_LINE>// mainWindow.getCenterAnchorPane().getChildren().add(iv);<NEW_LINE>stage.setOnCloseRequest((WindowEvent event) -> {<NEW_LINE>Actions.getInstance().exitSystem(event, stage);<NEW_LINE>});<NEW_LINE>DLRLogger.setLevel(LogLevel.parse(GlobalConfig.getInstance().getLoggingLevel()));<NEW_LINE>initMainMenu();<NEW_LINE>stage.getIcons().add(SystemProperties.getInstance().getMainIcon());<NEW_LINE>Message.setProgramName(SystemProperties.getInstance().getSystemName());<NEW_LINE>Message.setIcon(SystemProperties.getInstance().getMainIcon());<NEW_LINE>mainWindow.getCenterArea().set(new CenterAdmin().getNode());<NEW_LINE>mainWindow.getTopArea().getMainToolBar().addToolBar(fileToolBar);<NEW_LINE>mainWindow.getTopArea().getMainToolBar().addToolBar(simulationToolBar);<NEW_LINE>bottomBarUpdate();<NEW_LINE>changeApplicationTitleListener();<NEW_LINE>mainWindow.show();<NEW_LINE>}
getStage().setMaximized(true);
1,656,588
public ServiceResponse serviceImpl(Query call, HttpServletResponse response, Authorization authorization, final JsonObjectWithDefault permissions) throws APIException {<NEW_LINE>if (call.get("redirect_link", null) == null || call.get("image_name", null) == null) {<NEW_LINE>throw new APIException(400, "Bad Request. No enough parameter present");<NEW_LINE>}<NEW_LINE>String redirectLink = call.get("redirect_link", null);<NEW_LINE>String imageName = call.get("image_name", null);<NEW_LINE>String info = call.get("info", null);<NEW_LINE>boolean deleteSlide = call.get("deleteSlide", false);<NEW_LINE>JsonTray skillSlideshow = DAO.skillSlideshow;<NEW_LINE>JSONObject result = new JSONObject();<NEW_LINE>JSONObject skillSlideshowObj = new JSONObject();<NEW_LINE>if (skillSlideshow.has("slideshow")) {<NEW_LINE>skillSlideshowObj = skillSlideshow.getJSONObject("slideshow");<NEW_LINE>}<NEW_LINE>if (!deleteSlide) {<NEW_LINE>try {<NEW_LINE>JSONObject slideObj = new JSONObject();<NEW_LINE>slideObj.put("image_name", imageName);<NEW_LINE>slideObj.put("info", info);<NEW_LINE>skillSlideshowObj.put(redirectLink, slideObj);<NEW_LINE>skillSlideshow.put("slideshow", skillSlideshowObj, true);<NEW_LINE>result.put("accepted", true);<NEW_LINE>result.put("message", "Added new Slide " + call<MASK><NEW_LINE>return new ServiceResponse(result);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new APIException(500, "Failed : Unable to add slide with path " + call.get("redirect_link") + " !");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>skillSlideshowObj.remove(redirectLink);<NEW_LINE>skillSlideshow.put("slideshow", skillSlideshowObj, true);<NEW_LINE>result.put("accepted", true);<NEW_LINE>result.put("message", "Removed Slide with path " + call.get("redirect_link") + " successfully !");<NEW_LINE>return new ServiceResponse(result);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new APIException(501, "Failed to remove Slide: " + call.get("redirect_link") + " doesn't exists!");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.get("redirect_link") + " successfully !");
326,807
private void processModifiedFunctionNamespace(long id, Symbol mySym, Symbol resultSym) {<NEW_LINE>// default thunks may lie about their namespace<NEW_LINE>Namespace // default thunks may lie about their namespace<NEW_LINE>myNs = isDefaultThunk(mySym) ? mySym.getProgram().getGlobalNamespace() : mySym.getParentNamespace();<NEW_LINE>// default thunks may lie about their namespace<NEW_LINE>Namespace // default thunks may lie about their namespace<NEW_LINE>resultNs = isDefaultThunk(resultSym) ? resultSym.getProgram().getGlobalNamespace() : resultSym.getParentNamespace();<NEW_LINE>try {<NEW_LINE>Namespace desiredNs = resolveNamespace(myPgm, myNs);<NEW_LINE>// Is the result namespace the one we actually want it to be?<NEW_LINE>if (desiredNs != null && (desiredNs != resultNs)) {<NEW_LINE>// Check to see if latest and my both changed the namespace.<NEW_LINE>boolean renamedInMy = Arrays.binarySearch(myRenameIDs, id) >= 0;<NEW_LINE>boolean renamedInLatest = Arrays.<MASK><NEW_LINE>if (renamedInMy && renamedInLatest) {<NEW_LINE>Symbol latestSym = latestSymTab.getSymbol(id);<NEW_LINE>Namespace myNamespace = mySym.getParentNamespace();<NEW_LINE>Namespace latestNamespace = latestSym.getParentNamespace();<NEW_LINE>Namespace equivNamespace = DiffUtility.getNamespace(latestNamespace, myPgm);<NEW_LINE>if (myNamespace != equivNamespace) {<NEW_LINE>// Both Latest and My put function in new namespace.<NEW_LINE>saveRenameConflict(id);<NEW_LINE>}<NEW_LINE>// Else Latest already moved to the same namespace as My.<NEW_LINE>} else {<NEW_LINE>// Moved to new namespace only in My.<NEW_LINE>resultSym.setNamespace(desiredNs);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (UsrException e1) {<NEW_LINE>String msg = "Failed to set namespace to '" + myNs.getName(true) + "' for function '" + resultSym.getName(true) + "'.";<NEW_LINE>Msg.showError(this, null, "Rename Function Symbol Error", msg);<NEW_LINE>}<NEW_LINE>}
binarySearch(latestRenameIDs, id) >= 0;
854,163
public void marshall(CreateDistributionRequest createDistributionRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createDistributionRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createDistributionRequest.getDistributionName(), DISTRIBUTIONNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDistributionRequest.getOrigin(), ORIGIN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDistributionRequest.getDefaultCacheBehavior(), DEFAULTCACHEBEHAVIOR_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDistributionRequest.getCacheBehaviorSettings(), CACHEBEHAVIORSETTINGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createDistributionRequest.getBundleId(), BUNDLEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDistributionRequest.getIpAddressType(), IPADDRESSTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDistributionRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createDistributionRequest.getCacheBehaviors(), CACHEBEHAVIORS_BINDING);
899,361
public void errorResponse(byte[] err, @NotNull AbstractService service) {<NEW_LINE>MySQLResponseService responseService = (MySQLResponseService) service;<NEW_LINE>boolean executeResponse = responseService.syncAndExecute();<NEW_LINE>if (executeResponse) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>responseService.getConnection().businessClose("unfinished sync");<NEW_LINE>RouteResultsetNode rNode = (RouteResultsetNode) responseService.getAttachment();<NEW_LINE>session.getTargetMap().remove(rNode);<NEW_LINE>}<NEW_LINE>ErrorPacket errPacket = new ErrorPacket();<NEW_LINE>errPacket.read(err);<NEW_LINE>String errMsg = new String(errPacket.getMessage());<NEW_LINE>if (!isFail()) {<NEW_LINE>setFail(errMsg);<NEW_LINE>}<NEW_LINE>LOGGER.info("error response from " + responseService + " err " + errMsg + " code:" + errPacket.getErrNo());<NEW_LINE>this.tryErrorFinished(this.decrementToZero(responseService));<NEW_LINE>}
session.releaseConnectionIfSafe(responseService, false);
1,831,231
protected void encodeEvents(FacesContext context, Schedule schedule) throws IOException {<NEW_LINE>String clientId = schedule.getClientId(context);<NEW_LINE>ScheduleModel model = schedule.getValue();<NEW_LINE>Map<String, String> params = context<MASK><NEW_LINE>if (model instanceof LazyScheduleModel) {<NEW_LINE>String startDateParam = params.get(clientId + "_start");<NEW_LINE>String endDateParam = params.get(clientId + "_end");<NEW_LINE>ZoneId zoneId = CalendarUtils.calculateZoneId(schedule.getTimeZone());<NEW_LINE>LocalDateTime startDate = CalendarUtils.toLocalDateTime(zoneId, startDateParam);<NEW_LINE>LocalDateTime endDate = CalendarUtils.toLocalDateTime(zoneId, endDateParam);<NEW_LINE>LazyScheduleModel lazyModel = ((LazyScheduleModel) model);<NEW_LINE>// Clear old events<NEW_LINE>lazyModel.clear();<NEW_LINE>// Lazy load events<NEW_LINE>lazyModel.loadEvents(startDate, endDate);<NEW_LINE>}<NEW_LINE>encodeEventsAsJSON(context, schedule, model);<NEW_LINE>}
.getExternalContext().getRequestParameterMap();
1,113,856
public com.squareup.okhttp.Call throttlingBlacklistConditionIdGetAsync(String conditionId, String ifNoneMatch, String ifModifiedSince, final ApiCallback<BlockingCondition> callback) throws ApiException {<NEW_LINE>ProgressResponseBody.ProgressListener progressListener = null;<NEW_LINE>ProgressRequestBody.ProgressRequestListener progressRequestListener = null;<NEW_LINE>if (callback != null) {<NEW_LINE>progressListener = new ProgressResponseBody.ProgressListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void update(long bytesRead, long contentLength, boolean done) {<NEW_LINE>callback.onDownloadProgress(bytesRead, contentLength, done);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {<NEW_LINE>callback.<MASK><NEW_LINE>}<NEW_LINE>};<NEW_LINE>}<NEW_LINE>com.squareup.okhttp.Call call = throttlingBlacklistConditionIdGetValidateBeforeCall(conditionId, ifNoneMatch, ifModifiedSince, progressListener, progressRequestListener);<NEW_LINE>Type localVarReturnType = new TypeToken<BlockingCondition>() {<NEW_LINE>}.getType();<NEW_LINE>apiClient.executeAsync(call, localVarReturnType, callback);<NEW_LINE>return call;<NEW_LINE>}
onUploadProgress(bytesWritten, contentLength, done);
614,457
public Void visit(SqlDataTypeSpec type) {<NEW_LINE>if (type.getTypeNameSpec() instanceof SqlUserDefinedTypeNameSpec) {<NEW_LINE>SqlIdentifier typeName = type.getTypeName();<NEW_LINE>if (HazelcastTypeUtils.isObjectIdentifier(typeName)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (HazelcastTypeUtils.isJsonIdentifier(type.getTypeName())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!(type.getTypeNameSpec() instanceof SqlBasicTypeNameSpec)) {<NEW_LINE>throw error(type, RESOURCE.error("Complex type specifications are not supported"));<NEW_LINE>}<NEW_LINE>SqlTypeName typeName = SqlTypeName.get(type.getTypeName().getSimple());<NEW_LINE>switch(typeName) {<NEW_LINE>case BOOLEAN:<NEW_LINE>case TINYINT:<NEW_LINE>case SMALLINT:<NEW_LINE>case INTEGER:<NEW_LINE>case BIGINT:<NEW_LINE>case DECIMAL:<NEW_LINE>case REAL:<NEW_LINE>case DOUBLE:<NEW_LINE>case VARCHAR:<NEW_LINE>case DATE:<NEW_LINE>case TIME:<NEW_LINE>case TIMESTAMP:<NEW_LINE>case TIMESTAMP_WITH_LOCAL_TIME_ZONE:<NEW_LINE>case NULL:<NEW_LINE>return null;<NEW_LINE>case CHAR:<NEW_LINE>// char should be not accessible by users, we have only VARCHAR<NEW_LINE>case ANY:<NEW_LINE>// visible to users as OBJECT<NEW_LINE>default:<NEW_LINE>throw error(type, ValidatorResource.RESOURCE.notSupported<MASK><NEW_LINE>}<NEW_LINE>}
(typeName.getName()));
1,807,130
public void marshall(DocumentVersionMetadata documentVersionMetadata, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (documentVersionMetadata == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getId(), ID_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getContentType(), CONTENTTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getSize(), SIZE_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getSignature(), SIGNATURE_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getCreatedTimestamp(), CREATEDTIMESTAMP_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getModifiedTimestamp(), MODIFIEDTIMESTAMP_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getContentCreatedTimestamp(), CONTENTCREATEDTIMESTAMP_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getContentModifiedTimestamp(), CONTENTMODIFIEDTIMESTAMP_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getCreatorId(), CREATORID_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getThumbnail(), THUMBNAIL_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentVersionMetadata.getSource(), SOURCE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
documentVersionMetadata.getStatus(), STATUS_BINDING);
613,518
private // Returns 'true' if mapping available 'false' otherwise<NEW_LINE>boolean mapAlgName() {<NEW_LINE>if (AlgNameMapper.isOID(this.algName)) {<NEW_LINE>// OID provided to the ctor<NEW_LINE>// get rid of possible leading "OID."<NEW_LINE>this.oid = AlgNameMapper.normalize(this.algName);<NEW_LINE>// try to find mapping OID->algName<NEW_LINE>this.algName = AlgNameMapper.map2AlgName(this.oid);<NEW_LINE>// if there is no mapping OID->algName<NEW_LINE>// set OID as algName<NEW_LINE>if (this.algName == null) {<NEW_LINE>this.algName = this.oid;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String stdName = AlgNameMapper.getStandardName(this.algName);<NEW_LINE>// Alg name provided to the ctor<NEW_LINE>// try to find mapping algName->OID or<NEW_LINE>// (algName->stdAlgName)->OID<NEW_LINE>this.oid = <MASK><NEW_LINE>if (this.oid == null) {<NEW_LINE>if (stdName == null) {<NEW_LINE>// no above mappings available<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>this.oid = AlgNameMapper.map2OID(stdName);<NEW_LINE>if (this.oid == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>this.algName = stdName;<NEW_LINE>} else if (stdName != null) {<NEW_LINE>this.algName = stdName;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
AlgNameMapper.map2OID(this.algName);
1,774,757
private DefaultActionGroup createPopupActionGroup() {<NEW_LINE>final LayoutTree tree = myLayoutTreeComponent.getLayoutTree();<NEW_LINE>DefaultActionGroup popupActionGroup = new DefaultActionGroup();<NEW_LINE>popupActionGroup.add(createAddGroup());<NEW_LINE>final RemovePackagingElementAction removeAction = new RemovePackagingElementAction(this);<NEW_LINE>removeAction.registerCustomShortcutSet(CommonShortcuts.getDelete(), tree);<NEW_LINE>popupActionGroup.add(removeAction);<NEW_LINE>popupActionGroup.<MASK><NEW_LINE>popupActionGroup.add(new InlineArtifactAction(this));<NEW_LINE>popupActionGroup.add(new RenamePackagingElementAction(this));<NEW_LINE>popupActionGroup.add(new SurroundElementWithAction(this));<NEW_LINE>popupActionGroup.add(AnSeparator.getInstance());<NEW_LINE>popupActionGroup.add(new HideContentAction(this));<NEW_LINE>popupActionGroup.add(new LayoutTreeNavigateAction(myLayoutTreeComponent));<NEW_LINE>popupActionGroup.add(new LayoutTreeFindUsagesAction(myLayoutTreeComponent, myContext.getParent()));<NEW_LINE>popupActionGroup.add(AnSeparator.getInstance());<NEW_LINE>CommonActionsManager actionsManager = CommonActionsManager.getInstance();<NEW_LINE>DefaultTreeExpander treeExpander = new DefaultTreeExpander(tree);<NEW_LINE>popupActionGroup.add(actionsManager.createExpandAllAction(treeExpander, tree));<NEW_LINE>popupActionGroup.add(actionsManager.createCollapseAllAction(treeExpander, tree));<NEW_LINE>return popupActionGroup;<NEW_LINE>}
add(new ExtractArtifactAction(this));
676,963
public void receiveFileInfo(List<String> phase1FileNames, List<Long> phase1FileSizes, List<String> phase1ExistingFileNames, List<Long> phase1ExistingFileSizes, int totalTranslogOps, ActionListener<Void> listener) {<NEW_LINE>final String action = PeerRecoveryTargetService.Actions.FILES_INFO;<NEW_LINE>RecoveryFilesInfoRequest request = new RecoveryFilesInfoRequest(recoveryId, shardId, phase1FileNames, phase1FileSizes, phase1ExistingFileNames, phase1ExistingFileSizes, totalTranslogOps);<NEW_LINE>final TransportRequestOptions options = TransportRequestOptions.builder().withTimeout(recoverySettings.internalActionTimeout()).build();<NEW_LINE>final Writeable.Reader<TransportResponse.Empty> reader = in -> TransportResponse.Empty.INSTANCE;<NEW_LINE>final ActionListener<TransportResponse.Empty> responseListener = ActionListener.<MASK><NEW_LINE>executeRetryableAction(action, request, options, responseListener, reader);<NEW_LINE>}
map(listener, r -> null);