idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
857,763
public static double winrateToHandicap(double pWinrate) {<NEW_LINE>// we assume each additional handicap lowers winrate by fixed percentage.<NEW_LINE>// this is pretty accurate for human handicap games at least.<NEW_LINE>// also this kind of property is a requirement for handicaps to determined based on rank<NEW_LINE>// difference.<NEW_LINE>// lets convert the 0%-50% range and 100%-50% from both the move and and pass into range of 0-1<NEW_LINE>double moveWinrateSymmetric = 1 - Math.abs(1 - (pWinrate / 100) * 2);<NEW_LINE>double passWinrateSymmetric = 1 - Math.abs(1 - (mHandicapWinrate / 100) * 2);<NEW_LINE>// convert the symmetric move winrate into correctly scaled log scale, so that winrate of<NEW_LINE>// passWinrate equals 1 handicap.<NEW_LINE>double handicapSymmetric = Math.log(moveWinrateSymmetric<MASK><NEW_LINE>// make it negative if we had low winrate below 50.<NEW_LINE>return Math.signum(pWinrate - 50) * handicapSymmetric;<NEW_LINE>}
) / Math.log(passWinrateSymmetric);
334,532
final CreateAppCookieStickinessPolicyResult executeCreateAppCookieStickinessPolicy(CreateAppCookieStickinessPolicyRequest createAppCookieStickinessPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAppCookieStickinessPolicyRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateAppCookieStickinessPolicyRequest> request = null;<NEW_LINE>Response<CreateAppCookieStickinessPolicyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateAppCookieStickinessPolicyRequestMarshaller().marshall(super.beforeMarshalling(createAppCookieStickinessPolicyRequest));<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, "Elastic Load Balancing");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAppCookieStickinessPolicy");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<CreateAppCookieStickinessPolicyResult> responseHandler = new StaxResponseHandler<CreateAppCookieStickinessPolicyResult>(new CreateAppCookieStickinessPolicyResultStaxUnmarshaller());<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 awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,185,132
public static GmmDiscretizer trainDiscretizer(List<Integer> values, int nrClasses, boolean extraZero) {<NEW_LINE>List<Integer> retained = new ArrayList<Integer>(values);<NEW_LINE>Integer zero = Integer.valueOf(0);<NEW_LINE>if (extraZero && retained.contains(zero)) {<NEW_LINE>// remove all zeroes<NEW_LINE>int i = 0;<NEW_LINE>while (i < retained.size()) {<NEW_LINE>if (retained.get(i).equals(zero))<NEW_LINE>retained.remove(i);<NEW_LINE>else<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>double[][] trainingData = new double[retained<MASK><NEW_LINE>for (int i = 0; i < retained.size(); i++) {<NEW_LINE>trainingData[i][0] = (double) retained.get(i);<NEW_LINE>}<NEW_LINE>int trainClasses;<NEW_LINE>if (extraZero) {<NEW_LINE>// one class is not trained but assigned<NEW_LINE>trainClasses = nrClasses - 1;<NEW_LINE>} else {<NEW_LINE>trainClasses = nrClasses;<NEW_LINE>}<NEW_LINE>GMMTrainerParams gmmParams = new GMMTrainerParams();<NEW_LINE>gmmParams.totalComponents = trainClasses;<NEW_LINE>gmmParams.emMinIterations = 1000;<NEW_LINE>gmmParams.emMaxIterations = 2000;<NEW_LINE>GMM model = (new GMMTrainer().train(trainingData, gmmParams));<NEW_LINE>return new GmmDiscretizer(model, extraZero);<NEW_LINE>}
.size()][1];
654,689
private JCMethodDecl generateBuilderMethod(SuperBuilderJob job) {<NEW_LINE>JavacTreeMaker maker = job.getTreeMaker();<NEW_LINE>JCExpression call = maker.NewClass(null, List.<JCExpression>nil(), namePlusTypeParamsToTypeReference(maker, job.parentType, job.toName(job.builderImplClassName), false, job.typeParams), List.<JCExpression>nil(), null);<NEW_LINE>JCStatement statement = maker.Return(call);<NEW_LINE>JCBlock body = maker.Block(0, List.<JCStatement>of(statement));<NEW_LINE>int modifiers = Flags.PUBLIC;<NEW_LINE>modifiers |= Flags.STATIC;<NEW_LINE>// Add any type params of the annotated class to the return type.<NEW_LINE>ListBuffer<JCExpression> typeParameterNames = new ListBuffer<JCExpression>();<NEW_LINE>typeParameterNames.appendList(typeParameterNames(maker, job.typeParams));<NEW_LINE>// Now add the <?, ?>.<NEW_LINE>JCWildcard wildcard = maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null);<NEW_LINE>typeParameterNames.append(wildcard);<NEW_LINE>typeParameterNames.append(wildcard);<NEW_LINE>// And return type annotations.<NEW_LINE>List<JCAnnotation> annsOnParamType = List.nil();<NEW_LINE>if (job.checkerFramework.generateUnique())<NEW_LINE>annsOnParamType = List.of(maker.Annotation(genTypeRef(job.parentType, CheckerFrameworkVersion.NAME__UNIQUE), List.<JCExpression>nil()));<NEW_LINE>JCTypeApply returnType = maker.TypeApply(namePlusTypeParamsToTypeReference(maker, job.parentType, job.toName(job.builderAbstractClassName), false, List.<JCTypeParameter>nil(), annsOnParamType), typeParameterNames.toList());<NEW_LINE>List<JCAnnotation> annsOnMethod = job.checkerFramework.generateSideEffectFree() ? List.of(maker.Annotation(genTypeRef(job.parentType, CheckerFrameworkVersion.NAME__SIDE_EFFECT_FREE), List.<JCExpression>nil())) : List.<JCAnnotation>nil();<NEW_LINE>JCMethodDecl methodDef = maker.MethodDef(maker.Modifiers(modifiers, annsOnMethod), job.toName(job.builderMethodName), returnType, copyTypeParams(job.sourceNode, job.typeParams), List.<JCVariableDecl>nil(), List.<JCExpression><MASK><NEW_LINE>createRelevantNonNullAnnotation(job.parentType, methodDef);<NEW_LINE>return methodDef;<NEW_LINE>}
nil(), body, null);
849,815
private boolean isJoinNodeOrderMatch(JoinNode jn, List<Order> orderBys) {<NEW_LINE>// onCondition column in orderBys will be saved to onOrders,<NEW_LINE>// eg: if jn.onCond = (t1.id=t2.id),<NEW_LINE>// orderBys is t1.id,t2.id,t1.name, and onOrders = {t1.id,t2.id};<NEW_LINE>List<Order> leftOnOrders = jn.getLeftJoinOnOrders();<NEW_LINE>if (leftOnOrders.size() >= orderBys.size()) {<NEW_LINE>return PlanUtil.orderContains(leftOnOrders, orderBys);<NEW_LINE>}<NEW_LINE>List<Order> onOrdersTest = orderBys.subList(<MASK><NEW_LINE>if (!PlanUtil.orderContains(leftOnOrders, onOrdersTest)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>List<Order> pushedOrders = PlanUtil.getPushDownOrders(jn, orderBys.subList(onOrdersTest.size(), orderBys.size()));<NEW_LINE>if (jn.isLeftOrderMatch()) {<NEW_LINE>List<Order> leftChildOrders = jn.getLeftNode().getOrderBys();<NEW_LINE>List<Order> leftRemainOrders = leftChildOrders.subList(leftOnOrders.size(), leftChildOrders.size());<NEW_LINE>if (PlanUtil.orderContains(leftRemainOrders, pushedOrders))<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
0, leftOnOrders.size());
1,261,613
private static HUTraceEventQuery updateEventTimeFromParameter(@NonNull final HUTraceEventQuery query, @NonNull final DocumentFilterParam parameter) {<NEW_LINE>errorIfQueryValueNotNull("EventTime", query.getEventTime(), query);<NEW_LINE>switch(parameter.getOperator()) {<NEW_LINE>case EQUAL:<NEW_LINE>final Instant value = parameter.getValueAsInstant();<NEW_LINE>return query.withEventTimeOperator(EventTimeOperator.EQUAL).withEventTime(value);<NEW_LINE>case BETWEEN:<NEW_LINE>final Instant valueFrom = parameter.getValueAsInstant();<NEW_LINE>final Instant valueTo = parameter.getValueToAsInstant();<NEW_LINE>return query.withEventTimeOperator(EventTimeOperator.BETWEEN).withEventTime(valueFrom).withEventTimeTo(valueTo);<NEW_LINE>default:<NEW_LINE>throw new AdempiereException("Unexpected operator=" + parameter.getOperator() + " in parameter").appendParametersToMessage().setParameter("HUTraceEventQuery", query<MASK><NEW_LINE>}<NEW_LINE>}
).setParameter("DocumentFilterParam", parameter);
680,065
private // F743-15628 d649636<NEW_LINE>void addJCDIInterceptors() {<NEW_LINE>// Must be in a JCDI enabled module, and not a ManagedBean<NEW_LINE>JCDIHelper jcdiHelper = ivEJBModuleMetaDataImpl.ivJCDIHelper;<NEW_LINE>if (// F743-34301.1<NEW_LINE>jcdiHelper != null && !ivBmd.isManagedBean()) {<NEW_LINE>// Obtain the interceptor to start the interceptor chain. F743-29169<NEW_LINE>J2EEName j2eeName = ivEJBModuleMetaDataImpl.ivJ2EEName;<NEW_LINE>ivJCDIFirstInterceptorClass = jcdiHelper.getFirstEJBInterceptor(j2eeName, ivEjbClass);<NEW_LINE>if (ivJCDIFirstInterceptorClass != null) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, <MASK><NEW_LINE>ivInterceptorNameToClassMap.put(ivJCDIFirstInterceptorClass.getName(), ivJCDIFirstInterceptorClass);<NEW_LINE>}<NEW_LINE>// Obtain the interceptor at the end of the interceptor chain.<NEW_LINE>ivJCDILastInterceptorClass = jcdiHelper.getEJBInterceptor(j2eeName, ivEjbClass);<NEW_LINE>if (ivJCDILastInterceptorClass != null) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, "addJCDIInterceptor : " + ivJCDILastInterceptorClass.getName());<NEW_LINE>ivInterceptorNameToClassMap.put(ivJCDILastInterceptorClass.getName(), ivJCDILastInterceptorClass);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"addJCDIInterceptor : " + ivJCDIFirstInterceptorClass.getName());
534,392
private void notifyException(Throwable ex) {<NEW_LINE>Util.bug(null, ex);<NEW_LINE>if (mNotified)<NEW_LINE>return;<NEW_LINE>Context context = getContext();<NEW_LINE>if (context == null)<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>Intent intent = new Intent("biz.bokhorst.xprivacy.action.EXCEPTION");<NEW_LINE>intent.putExtra("Message", ex.toString());<NEW_LINE>context.sendBroadcast(intent);<NEW_LINE>NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);<NEW_LINE>// Build notification<NEW_LINE>NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context);<NEW_LINE>notificationBuilder.<MASK><NEW_LINE>notificationBuilder.setContentTitle(context.getString(R.string.app_name));<NEW_LINE>notificationBuilder.setContentText(ex.toString());<NEW_LINE>notificationBuilder.setWhen(System.currentTimeMillis());<NEW_LINE>notificationBuilder.setAutoCancel(true);<NEW_LINE>Notification notification = notificationBuilder.build();<NEW_LINE>// Display notification<NEW_LINE>notificationManager.notify(Util.NOTIFY_CORRUPT, notification);<NEW_LINE>mNotified = true;<NEW_LINE>} catch (Throwable exex) {<NEW_LINE>Util.bug(null, exex);<NEW_LINE>}<NEW_LINE>}
setSmallIcon(R.drawable.ic_launcher);
1,505,472
public boolean union(RWSet other) {<NEW_LINE>if (other == null || isFull) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean ret = false;<NEW_LINE>if (other instanceof MethodRWSet) {<NEW_LINE>MethodRWSet o = (MethodRWSet) other;<NEW_LINE>if (o.getCallsNative()) {<NEW_LINE><MASK><NEW_LINE>setCallsNative();<NEW_LINE>}<NEW_LINE>if (o.isFull) {<NEW_LINE>ret = !isFull | ret;<NEW_LINE>isFull = true;<NEW_LINE>if (true) {<NEW_LINE>throw new RuntimeException("attempt to add full set " + o + " into " + this);<NEW_LINE>}<NEW_LINE>globals = null;<NEW_LINE>fields = null;<NEW_LINE>return ret;<NEW_LINE>}<NEW_LINE>if (o.globals != null) {<NEW_LINE>if (globals == null) {<NEW_LINE>globals = new HashSet<SootField>();<NEW_LINE>}<NEW_LINE>ret = globals.addAll(o.globals) | ret;<NEW_LINE>if (globals.size() > MAX_SIZE) {<NEW_LINE>globals = null;<NEW_LINE>isFull = true;<NEW_LINE>throw new RuntimeException("attempt to add full set " + o + " into " + this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (o.fields != null) {<NEW_LINE>for (Object field : o.fields.keySet()) {<NEW_LINE>ret = addFieldRef(o.getBaseForField(field), field) | ret;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (other instanceof StmtRWSet) {<NEW_LINE>StmtRWSet oth = (StmtRWSet) other;<NEW_LINE>if (oth.base != null) {<NEW_LINE>ret = addFieldRef(oth.base, oth.field) | ret;<NEW_LINE>} else if (oth.field != null) {<NEW_LINE>ret = addGlobal((SootField) oth.field) | ret;<NEW_LINE>}<NEW_LINE>} else if (other instanceof SiteRWSet) {<NEW_LINE>SiteRWSet oth = (SiteRWSet) other;<NEW_LINE>for (RWSet set : oth.sets) {<NEW_LINE>this.union(set);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!getCallsNative() && other.getCallsNative()) {<NEW_LINE>setCallsNative();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
ret = !getCallsNative() | ret;
1,649,153
final CreateDiskResult executeCreateDisk(CreateDiskRequest createDiskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDiskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateDiskRequest> request = null;<NEW_LINE>Response<CreateDiskResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateDiskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDiskRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lightsail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDisk");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateDiskResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDiskResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,405,743
private synchronized String createSequential(String path, byte[] data, List<ACL> acl, CreateMode createMode) throws KeeperException, InterruptedException {<NEW_LINE><MASK><NEW_LINE>boolean first = true;<NEW_LINE>// String newPath = path + this.identifier;<NEW_LINE>String newPath = path;<NEW_LINE>while (true) {<NEW_LINE>try {<NEW_LINE>if (!first) {<NEW_LINE>// Check if we succeeded on a previous attempt<NEW_LINE>String previousResult = findPreviousSequentialNode(newPath);<NEW_LINE>if (previousResult != null) {<NEW_LINE>return previousResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>first = false;<NEW_LINE>return zk.create(newPath, data, acl, createMode);<NEW_LINE>} catch (KeeperException e) {<NEW_LINE>ensureConnectivity(e);<NEW_LINE>switch(e.code()) {<NEW_LINE>case CONNECTIONLOSS:<NEW_LINE>case SESSIONEXPIRED:<NEW_LINE>case OPERATIONTIMEOUT:<NEW_LINE>retryOrThrow(retryCounter, e, "create");<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>retryCounter.sleepUntilNextRetry();<NEW_LINE>retryCounter.useRetry();<NEW_LINE>}<NEW_LINE>}
RetryCounter retryCounter = retryCounterFactory.create();
1,726,261
public static void handleStaleStatement(WSJdbcWrapper jdbcWrapper) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())<NEW_LINE>Tr.<MASK><NEW_LINE>if (jdbcWrapper instanceof WSJdbcObject)<NEW_LINE>try {<NEW_LINE>WSJdbcConnection connWrapper = (WSJdbcConnection) ((WSJdbcObject) jdbcWrapper).getConnectionWrapper();<NEW_LINE>WSRdbManagedConnectionImpl mc = connWrapper.managedConn;<NEW_LINE>// Instead of closing the statements, mark them as<NEW_LINE>// not poolable so that they are prevented from being cached again when closed.<NEW_LINE>connWrapper.markStmtsAsNotPoolable();<NEW_LINE>// Clear out the cache.<NEW_LINE>if (mc != null)<NEW_LINE>mc.clearStatementCache();<NEW_LINE>} catch (NullPointerException nullX) {<NEW_LINE>// No FFDC code needed; probably closed by another thread.<NEW_LINE>if (!((WSJdbcObject) jdbcWrapper).isClosed())<NEW_LINE>throw nullX;<NEW_LINE>}<NEW_LINE>}
event(tc, "Encountered a Stale Statement: " + jdbcWrapper);
536,532
public AgentNetworkInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AgentNetworkInfo agentNetworkInfo = new AgentNetworkInfo();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("ipAddress", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>agentNetworkInfo.setIpAddress(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("macAddress", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>agentNetworkInfo.setMacAddress(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return agentNetworkInfo;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
547,131
private static void runAssertionAllCombinations(RegressionEnvironment env, String field, AtomicInteger milestone) {<NEW_LINE>String[] methods = "getMinuteOfHour,getMonthOfYear,getDayOfMonth,getDayOfWeek,getDayOfYear,getEra,gethourOfDay,getmillisOfSecond,getsecondOfMinute,getweekyear,getyear".split(",");<NEW_LINE>StringWriter epl = new StringWriter();<NEW_LINE>epl.append("@name('s0') select ");<NEW_LINE>int count = 0;<NEW_LINE>String delimiter = "";<NEW_LINE>for (String method : methods) {<NEW_LINE>epl.append(delimiter).append(field).append(".").append(method).append("() ").append("c").append(Integer.toString(count++));<NEW_LINE>delimiter = ",";<NEW_LINE>}<NEW_LINE>epl.append(" from SupportDateTime");<NEW_LINE>env.compileDeployAddListenerMile(epl.toString(), "s0", milestone.getAndIncrement());<NEW_LINE>SupportDateTime sdt = SupportDateTime.make("2002-05-30T09:01:02.003");<NEW_LINE>sdt.getCaldate().<MASK><NEW_LINE>env.sendEventBean(sdt);<NEW_LINE>boolean java8date = field.equals("zoneddate") || field.equals("localdate");<NEW_LINE>env.assertPropsNew("s0", "c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10".split(","), new Object[] { 1, java8date ? 5 : 4, 30, java8date ? THURSDAY : 5, 150, 1, 9, 3, 2, 22, 2002 });<NEW_LINE>env.undeployAll();<NEW_LINE>}
set(Calendar.MILLISECOND, 3);
1,356,136
private void escape(StringBuffer sb, String text) {<NEW_LINE>if (text == null) {<NEW_LINE>// NOI18N<NEW_LINE>text = "<null>";<NEW_LINE>}<NEW_LINE>for (int i = 0; i < text.length(); i++) {<NEW_LINE>char <MASK><NEW_LINE>if (ch == '<') {<NEW_LINE>// NOI18N<NEW_LINE>sb.append("&lt;");<NEW_LINE>} else if (ch == '>') {<NEW_LINE>// NOI18N<NEW_LINE>sb.append("&gt;");<NEW_LINE>} else if (ch == '&') {<NEW_LINE>// NOI18N<NEW_LINE>sb.append("&amp;");<NEW_LINE>} else if (ch < 0x20 && ch != '\t' && ch != '\r' && ch != '\n') {<NEW_LINE>// #119820<NEW_LINE>sb.append('^').append((char) (ch + 0x40));<NEW_LINE>} else {<NEW_LINE>sb.append(ch);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ch = text.charAt(i);
1,780,262
public void execute(Event e) {<NEW_LINE>List<CommandSender> receivers = new ArrayList<>();<NEW_LINE>if (worlds == null) {<NEW_LINE>receivers.addAll(Bukkit.getOnlinePlayers());<NEW_LINE>receivers.<MASK><NEW_LINE>} else {<NEW_LINE>for (World world : worlds.getArray(e)) receivers.addAll(world.getPlayers());<NEW_LINE>}<NEW_LINE>for (Expression<?> message : getMessages()) {<NEW_LINE>if (message instanceof VariableString) {<NEW_LINE>BaseComponent[] components = BungeeConverter.convert(((VariableString) message).getMessageComponents(e));<NEW_LINE>receivers.forEach(receiver -> receiver.spigot().sendMessage(components));<NEW_LINE>} else if (message instanceof ExprColoured && ((ExprColoured) message).isUnsafeFormat()) {<NEW_LINE>// Manually marked as trusted<NEW_LINE>for (Object realMessage : message.getArray(e)) {<NEW_LINE>BaseComponent[] components = BungeeConverter.convert(ChatMessages.parse((String) realMessage));<NEW_LINE>receivers.forEach(receiver -> receiver.spigot().sendMessage(components));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (Object messageObject : message.getArray(e)) {<NEW_LINE>String realMessage = messageObject instanceof String ? (String) messageObject : Classes.toString(messageObject);<NEW_LINE>receivers.forEach(receiver -> receiver.sendMessage(realMessage));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
add(Bukkit.getConsoleSender());
1,085,187
private void parseClass(Element element, DozerBuilder.ClassDefinitionBuilder classBuilder) {<NEW_LINE>if (StringUtils.isNotEmpty(getAttribute(element, MAP_GET_METHOD_ATTRIBUTE))) {<NEW_LINE>classBuilder.mapGetMethod(getAttribute(element, MAP_GET_METHOD_ATTRIBUTE));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(getAttribute(element, MAP_SET_METHOD_ATTRIBUTE))) {<NEW_LINE>classBuilder.mapSetMethod(getAttribute(element, MAP_SET_METHOD_ATTRIBUTE));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(getAttribute(element, BEAN_FACTORY))) {<NEW_LINE>classBuilder.beanFactory(getAttribute(element, BEAN_FACTORY));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(getAttribute(element, FACTORY_BEANID_ATTRIBUTE))) {<NEW_LINE>classBuilder.factoryBeanId(getAttribute(element, FACTORY_BEANID_ATTRIBUTE));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(getAttribute(element, CREATE_METHOD_ATTRIBUTE))) {<NEW_LINE>classBuilder.createMethod(getAttribute(element, CREATE_METHOD_ATTRIBUTE));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(getAttribute(element, MAP_NULL_ATTRIBUTE))) {<NEW_LINE>classBuilder.mapNull(Boolean.valueOf(getAttribute(element, MAP_NULL_ATTRIBUTE)));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(getAttribute(element, MAP_EMPTY_STRING_ATTRIBUTE))) {<NEW_LINE>classBuilder.mapEmptyString(Boolean.valueOf(getAttribute(element, MAP_EMPTY_STRING_ATTRIBUTE)));<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(getAttribute(element, IS_ACCESSIBLE_ATTRIBUTE))) {<NEW_LINE>classBuilder.isAccessible(Boolean.valueOf(<MASK><NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(getAttribute(element, SKIP_CONSTRUCTOR_ATTRIBUTE))) {<NEW_LINE>classBuilder.skipConstructor(Boolean.valueOf(getAttribute(element, SKIP_CONSTRUCTOR_ATTRIBUTE)));<NEW_LINE>}<NEW_LINE>}
getAttribute(element, IS_ACCESSIBLE_ATTRIBUTE)));
1,520,827
// lookup<NEW_LINE>public static void ToXContent(PainlessCast painlessCast, XContentBuilderWrapper builder) {<NEW_LINE>builder.startObject();<NEW_LINE>if (painlessCast.originalType != null) {<NEW_LINE>builder.field("originalType", painlessCast.originalType.getSimpleName());<NEW_LINE>}<NEW_LINE>if (painlessCast.targetType != null) {<NEW_LINE>builder.field("targetType", <MASK><NEW_LINE>}<NEW_LINE>builder.field("explicitCast", painlessCast.explicitCast);<NEW_LINE>if (painlessCast.unboxOriginalType != null) {<NEW_LINE>builder.field("unboxOriginalType", painlessCast.unboxOriginalType.getSimpleName());<NEW_LINE>}<NEW_LINE>if (painlessCast.unboxTargetType != null) {<NEW_LINE>builder.field("unboxTargetType", painlessCast.unboxTargetType.getSimpleName());<NEW_LINE>}<NEW_LINE>if (painlessCast.boxOriginalType != null) {<NEW_LINE>builder.field("boxOriginalType", painlessCast.boxOriginalType.getSimpleName());<NEW_LINE>}<NEW_LINE>builder.endObject();<NEW_LINE>}
painlessCast.targetType.getSimpleName());
379,218
boolean removeBond() {<NEW_LINE>final <MASK><NEW_LINE>if (device.getBondState() == BluetoothDevice.BOND_NONE)<NEW_LINE>return true;<NEW_LINE>mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_VERBOSE, "Removing bond information...");<NEW_LINE>boolean result = false;<NEW_LINE>try {<NEW_LINE>// noinspection JavaReflectionMemberAccess<NEW_LINE>final Method removeBond = device.getClass().getMethod("removeBond");<NEW_LINE>mRequestCompleted = false;<NEW_LINE>mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_DEBUG, "gatt.getDevice().removeBond() (hidden)");<NEW_LINE>// noinspection ConstantConditions<NEW_LINE>result = (Boolean) removeBond.invoke(device);<NEW_LINE>// We have to wait until device is unbounded<NEW_LINE>try {<NEW_LINE>synchronized (mLock) {<NEW_LINE>while (!mRequestCompleted && !mAborted) mLock.wait();<NEW_LINE>}<NEW_LINE>} catch (final InterruptedException e) {<NEW_LINE>loge("Sleeping interrupted", e);<NEW_LINE>}<NEW_LINE>} catch (final Exception e) {<NEW_LINE>Log.w(TAG, "An exception occurred while removing bond information", e);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
BluetoothDevice device = mGatt.getDevice();
734,431
@SuppressWarnings("unchecked")<NEW_LINE>public <T> T put(final Key<T> key, @Nullable final T value, final CopyOnWriteContextMap owner, final AtomicReferenceFieldUpdater<CopyOnWriteContextMap, CopyContextMap> mapUpdater) {<NEW_LINE>final int i = findIndex(key);<NEW_LINE>final Object returnValue;<NEW_LINE>final Object[] context;<NEW_LINE>if (i < 0) {<NEW_LINE>returnValue = null;<NEW_LINE>context = new Object[this.context.length + 2];<NEW_LINE>arraycopy(this.context, 0, context, 0, this.context.length);<NEW_LINE>context[<MASK><NEW_LINE>context[this.context.length + 1] = value;<NEW_LINE>} else {<NEW_LINE>returnValue = this.context[i + 1];<NEW_LINE>context = new Object[this.context.length];<NEW_LINE>arraycopy(this.context, 0, context, 0, this.context.length);<NEW_LINE>context[i + 1] = value;<NEW_LINE>}<NEW_LINE>return mapUpdater.compareAndSet(owner, this, new SevenOrMoreContextMap(context)) ? (T) returnValue : owner.put(key, value);<NEW_LINE>}
this.context.length] = key;
1,179,334
private static void createMappingIfNeeded(JestClient jestClient, String indexName, String typeName) throws ElasticWriterException, IOException {<NEW_LINE>synchronized (CREATE_MAPPING_LOCK) {<NEW_LINE>IndicesExists indicesExists = new IndicesExists.<MASK><NEW_LINE>boolean indexExists = jestClient.execute(indicesExists).isSucceeded();<NEW_LINE>if (!indexExists) {<NEW_LINE>CreateIndex createIndex = new CreateIndex.Builder(indexName).build();<NEW_LINE>JestResult result = jestClient.execute(createIndex);<NEW_LINE>if (!result.isSucceeded()) {<NEW_LINE>throw new ElasticWriterException(String.format("Failed to create index: %s", result.getErrorMessage()));<NEW_LINE>} else {<NEW_LINE>log.info("Created index {}", indexName);<NEW_LINE>}<NEW_LINE>URL url = ElasticWriter.class.getResource("/elastic-mapping.json");<NEW_LINE>String mapping = Resources.toString(url, Charsets.UTF_8);<NEW_LINE>PutMapping putMapping = new PutMapping.Builder(indexName, typeName, mapping).build();<NEW_LINE>result = jestClient.execute(putMapping);<NEW_LINE>if (!result.isSucceeded()) {<NEW_LINE>throw new ElasticWriterException(String.format("Failed to create mapping: %s", result.getErrorMessage()));<NEW_LINE>} else {<NEW_LINE>log.info("Created mapping for index {}", indexName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Builder(indexName).build();
1,091,463
protected void addPlatformSpecificLibraryLocationInformationForStatic(Artifact artifact, StringBuffer buffer) throws UMAException {<NEW_LINE>buffer.append(artifact.getTargetNameWithScope() + "_depend=" + getLibName(artifact) + "\n");<NEW_LINE>buffer.append("ifeq ($(UMA_TARGET_TYPE),EXE)\n");<NEW_LINE>buffer.append(artifact.getTargetNameWithScope() + "_link=" <MASK><NEW_LINE>buffer.append("endif\n");<NEW_LINE>buffer.append(artifact.getTargetNameWithScope() + "_ondisk=" + getLibName(artifact) + "\n");<NEW_LINE>buffer.append(artifact.getTargetNameWithScope() + "_path=" + UMA.UMA_PATH_TO_ROOT_VAR + artifact.getTargetPath(this) + "\n");<NEW_LINE>buffer.append(artifact.getTargetNameWithScope() + "_pdb=" + getPdbName(artifact) + "\n");<NEW_LINE>buffer.append(artifact.getTargetNameWithScope() + "_exp=" + getExpName(artifact) + "\n");<NEW_LINE>}
+ getLibLinkName(artifact) + "\n");
1,297,658
final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListTagsForResourceRequest> request = null;<NEW_LINE>Response<ListTagsForResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Panorama");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListTagsForResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
341,999
private NamingEnumeration<SearchResult> checkSearchCache(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws WIMException {<NEW_LINE>final String METHODNAME = "checkSearchCache";<NEW_LINE>NamingEnumeration<SearchResult> neu = null;<NEW_LINE>if (getSearchResultsCache() != null) {<NEW_LINE>String key = null;<NEW_LINE>if (filterArgs == null) {<NEW_LINE>key = toKey(name, filterExpr, cons);<NEW_LINE>} else {<NEW_LINE>key = toKey(name, filterExpr, filterArgs, cons);<NEW_LINE>}<NEW_LINE>CachedNamingEnumeration cached = (CachedNamingEnumeration) getSearchResultsCache().get(key);<NEW_LINE>if (cached == null) {<NEW_LINE>if (tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(<MASK><NEW_LINE>}<NEW_LINE>neu = search(name, filterExpr, filterArgs, cons, null);<NEW_LINE>String[] reqAttrIds = cons.getReturningAttributes();<NEW_LINE>neu = updateSearchCache(name, key, neu, reqAttrIds);<NEW_LINE>} else {<NEW_LINE>if (tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, METHODNAME + " Hit cache: " + key);<NEW_LINE>}<NEW_LINE>neu = (CachedNamingEnumeration) cached.clone();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>neu = search(name, filterExpr, filterArgs, cons, null);<NEW_LINE>}<NEW_LINE>return neu;<NEW_LINE>}
tc, METHODNAME + " Miss cache: " + key);
217,077
private void _postStopServerArchive(boolean skipArchives) throws Exception {<NEW_LINE>final String method = "_postStopServerArchive";<NEW_LINE>Log.entering(c, method, skipArchives);<NEW_LINE>SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy-HH-mm-ss");<NEW_LINE>Date d = new Date(System.currentTimeMillis());<NEW_LINE>String runLevel = RepeatTestFilter.getRepeatActionsAsString();<NEW_LINE>String logDirectoryName = "";<NEW_LINE>if (runLevel == null || runLevel.isEmpty()) {<NEW_LINE>logDirectoryName = pathToAutoFVTOutputServersFolder + "/" + serverToUse + "-" + sdf.format(d);<NEW_LINE>} else {<NEW_LINE>logDirectoryName = pathToAutoFVTOutputServersFolder + "/" + serverToUse + "-" + runLevel + "-" + sdf.format(d);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>RemoteFile serverFolder = new RemoteFile(machine, serverRoot);<NEW_LINE>runJextract(serverFolder);<NEW_LINE>// Copy the log files: try to move them instead if we can<NEW_LINE>recursivelyCopyDirectory(serverFolder, logFolder, false, skipArchives, true);<NEW_LINE>deleteServerMarkerFile();<NEW_LINE>Log.exiting(c, method);<NEW_LINE>}
LocalFile logFolder = new LocalFile(logDirectoryName);
1,770,125
protected void internalTransform(Body b, String phaseName, Map<String, String> options) {<NEW_LINE>// removes all redundant load-stores<NEW_LINE>boolean changed = true;<NEW_LINE>PatchingChain<Unit> units = b.getUnits();<NEW_LINE>while (changed) {<NEW_LINE>changed = false;<NEW_LINE>Unit prevprevprev = null, prevprev = null, prev = null;<NEW_LINE>ExceptionalUnitGraph <MASK><NEW_LINE>Iterator<Unit> it = units.snapshotIterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>Unit u = it.next();<NEW_LINE>if (prev != null && prev instanceof PushInst && u instanceof StoreInst) {<NEW_LINE>if (prevprev != null && prevprev instanceof StoreInst && prevprevprev != null && prevprevprev instanceof PushInst) {<NEW_LINE>Local lprev = ((StoreInst) prevprev).getLocal();<NEW_LINE>Local l = ((StoreInst) u).getLocal();<NEW_LINE>if (l == lprev && eug.getSuccsOf(prevprevprev).size() == 1 && eug.getSuccsOf(prevprev).size() == 1) {<NEW_LINE>fixJumps(prevprevprev, prev, b.getTraps());<NEW_LINE>fixJumps(prevprev, u, b.getTraps());<NEW_LINE>units.remove(prevprevprev);<NEW_LINE>units.remove(prevprev);<NEW_LINE>changed = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>prevprevprev = prevprev;<NEW_LINE>prevprev = prev;<NEW_LINE>prev = u;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// end while changes have been made<NEW_LINE>}
eug = ExceptionalUnitGraphFactory.createExceptionalUnitGraph(b);
739,097
public void send(Map<String, List<String>> poolMap) {<NEW_LINE>try {<NEW_LINE>for (String poolId : poolMap.keySet()) {<NEW_LINE>TestResourcePoolExample example = new TestResourcePoolExample();<NEW_LINE>example.createCriteria().andStatusEqualTo("VALID").andTypeEqualTo("NODE").andIdEqualTo(poolId);<NEW_LINE>List<TestResourcePool> pools = testResourcePoolMapper.selectByExample(example);<NEW_LINE>if (CollectionUtils.isNotEmpty(pools)) {<NEW_LINE>List<String> poolIds = pools.stream().map(pool -> pool.getId()).<MASK><NEW_LINE>TestResourceExample resourceExample = new TestResourceExample();<NEW_LINE>resourceExample.createCriteria().andTestResourcePoolIdIn(poolIds);<NEW_LINE>List<TestResource> testResources = testResourceMapper.selectByExampleWithBLOBs(resourceExample);<NEW_LINE>for (TestResource testResource : testResources) {<NEW_LINE>String configuration = testResource.getConfiguration();<NEW_LINE>NodeDTO node = JSON.parseObject(configuration, NodeDTO.class);<NEW_LINE>String nodeIp = node.getIp();<NEW_LINE>Integer port = node.getPort();<NEW_LINE>String uri = String.format(JMeterService.BASE_URL + "/jmeter/stop", nodeIp, port);<NEW_LINE>restTemplate.postForEntity(uri, poolMap.get(poolId), void.class);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>LogUtil.error(e.getMessage());<NEW_LINE>}<NEW_LINE>}
collect(Collectors.toList());
1,391,342
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {<NEW_LINE>FragmentActivity activity = requireActivity();<NEW_LINE>PackageUsageInfo packageUsageInfo = requireArguments().getParcelable(ARG_PACKAGE_USAGE_INFO);<NEW_LINE>LayoutInflater inflater = LayoutInflater.from(activity);<NEW_LINE>if (packageUsageInfo == null || inflater == null) {<NEW_LINE>return super.onCreateDialog(savedInstanceState);<NEW_LINE>}<NEW_LINE>View view = inflater.inflate(R.layout.dialog_app_usage_details, null);<NEW_LINE>RecyclerViewWithEmptyView recyclerView = view.findViewById(android.R.id.list);<NEW_LINE>recyclerView.setHasFixedSize(true);<NEW_LINE>recyclerView.setLayoutManager(new LinearLayoutManager(activity));<NEW_LINE>new FastScrollerBuilder(recyclerView).useMd2Style().build();<NEW_LINE>recyclerView.setEmptyView(view.findViewById(android.R.id.empty));<NEW_LINE>AppUsageDetailsAdapter adapter = new AppUsageDetailsAdapter(activity);<NEW_LINE>recyclerView.setAdapter(adapter);<NEW_LINE>adapter.setDefaultList(packageUsageInfo.entries);<NEW_LINE>MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(activity).setView(view).setNegativeButton(R.string.ok, (dialog, which) -> {<NEW_LINE>if (getDialog() == null)<NEW_LINE>dismiss();<NEW_LINE>});<NEW_LINE>DialogTitleBuilder titleBuilder = new DialogTitleBuilder(activity);<NEW_LINE>ApplicationInfo applicationInfo = packageUsageInfo.applicationInfo;<NEW_LINE>if (applicationInfo != null) {<NEW_LINE>PackageManager pm = activity.getPackageManager();<NEW_LINE>titleBuilder.setTitle(applicationInfo.loadLabel(pm)).setStartIcon(applicationInfo.loadIcon(pm));<NEW_LINE>} else<NEW_LINE>titleBuilder.setTitle(packageUsageInfo.packageName);<NEW_LINE>if (Users.getUsersIds().length > 1) {<NEW_LINE>titleBuilder.setSubtitle(getString(R.string.user_with_id, packageUsageInfo.userId));<NEW_LINE>}<NEW_LINE>builder.<MASK><NEW_LINE>return builder.create();<NEW_LINE>}
setCustomTitle(titleBuilder.build());
134,484
void readData(GroupConfig groupCfg, InternalConfig internalCfg) throws IOException {<NEW_LINE>groupConfig = groupCfg;<NEW_LINE>internalConfig = internalCfg;<NEW_LINE>FileObject cfgFOInput = getConfigFOInput();<NEW_LINE>if (cfgFOInput == null) {<NEW_LINE>throw new // NOI18N<NEW_LINE>FileNotFoundException("[WinSys] Missing Group configuration file:" + <MASK><NEW_LINE>}<NEW_LINE>InputStream is = null;<NEW_LINE>try {<NEW_LINE>synchronized (RW_LOCK) {<NEW_LINE>// DUMP BEGIN<NEW_LINE>// DUMP END<NEW_LINE>is = cfgFOInput.getInputStream();<NEW_LINE>PersistenceManager.getDefault().getXMLParser(this).parse(new InputSource(is));<NEW_LINE>}<NEW_LINE>} catch (SAXException exc) {<NEW_LINE>// Turn into annotated IOException<NEW_LINE>String msg = NbBundle.getMessage(GroupParser.class, "EXC_GroupParse", cfgFOInput);<NEW_LINE>throw (IOException) new IOException(msg).initCause(exc);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>if (is != null) {<NEW_LINE>is.close();<NEW_LINE>}<NEW_LINE>} catch (IOException exc) {<NEW_LINE>Logger.getLogger(GroupParser.class.getName()).log(Level.INFO, null, exc);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>groupCfg = groupConfig;<NEW_LINE>internalCfg = internalConfig;<NEW_LINE>groupConfig = null;<NEW_LINE>internalConfig = null;<NEW_LINE>}
GroupParser.this.getName());
511,677
public void addInvitedSignaling(MethodCall methodCall, final MethodChannel.Result result) {<NEW_LINE>HashMap<String, Object> info = CommonUtil.getParam(methodCall, result, "info");<NEW_LINE>V2TIMSignalingInfo param = new V2TIMSignalingInfo();<NEW_LINE>if (info.get("inviteID") != null) {<NEW_LINE>param.setInviteID((String) info.get("inviteID"));<NEW_LINE>}<NEW_LINE>if (info.get("groupID") != null) {<NEW_LINE>param.setGroupID((String) info.get("groupID"));<NEW_LINE>}<NEW_LINE>if (info.get("inviter") != null) {<NEW_LINE>param.setInviter((String<MASK><NEW_LINE>}<NEW_LINE>if (info.get("inviteeList") != null) {<NEW_LINE>param.setInviteeList((List<String>) info.get("inviteeList"));<NEW_LINE>}<NEW_LINE>if (info.get("data") != null) {<NEW_LINE>param.setData((String) info.get("data"));<NEW_LINE>}<NEW_LINE>if (info.get("timeout") != null) {<NEW_LINE>param.setTimeout((Integer) info.get("timeout"));<NEW_LINE>}<NEW_LINE>if (info.get("actionType") != null) {<NEW_LINE>param.setActionType((Integer) info.get("actionType"));<NEW_LINE>}<NEW_LINE>if (info.get("businessID") != null) {<NEW_LINE>param.setBusinessID((Integer) info.get("businessID"));<NEW_LINE>}<NEW_LINE>V2TIMManager.getSignalingManager().addInvitedSignaling(param, new V2TIMCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess() {<NEW_LINE>CommonUtil.returnSuccess(result, null);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(int code, String desc) {<NEW_LINE>CommonUtil.returnError(result, code, desc);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
) info.get("inviter"));
351,647
private Map<Integer, InsnFormatter> registerFormatters() {<NEW_LINE>Map<Integer, InsnFormatter> map = new HashMap<>();<NEW_LINE>map.put(DexOpcodes.NOP, fi -> fi.getCodeWriter().add("nop"));<NEW_LINE>map.put(DexOpcodes.SGET_OBJECT, staticFieldInsn("sget-object"));<NEW_LINE>map.put(DexOpcodes.SPUT_BOOLEAN, staticFieldInsn("sput-boolean"));<NEW_LINE>map.put(DexOpcodes.CONST, constInsn("const"));<NEW_LINE>map.put(DexOpcodes<MASK><NEW_LINE>map.put(DexOpcodes.CONST_STRING, stringInsn("const-string"));<NEW_LINE>map.put(DexOpcodes.INVOKE_VIRTUAL, invokeInsn("invoke-virtual"));<NEW_LINE>map.put(DexOpcodes.INVOKE_DIRECT, invokeInsn("invoke-direct"));<NEW_LINE>map.put(DexOpcodes.INVOKE_SUPER, invokeInsn("invoke-super"));<NEW_LINE>map.put(DexOpcodes.INVOKE_STATIC, invokeInsn("invoke-static"));<NEW_LINE>map.put(DexOpcodes.MOVE_RESULT, oneArgsInsn("move-result"));<NEW_LINE>map.put(DexOpcodes.RETURN_VOID, noArgsInsn("return-void"));<NEW_LINE>map.put(DexOpcodes.GOTO, gotoInsn("goto"));<NEW_LINE>map.put(DexOpcodes.GOTO_16, gotoInsn("goto-16"));<NEW_LINE>map.put(DexOpcodes.MOVE, simpleInsn("move"));<NEW_LINE>// TODO: complete list<NEW_LINE>return map;<NEW_LINE>}
.CONST_HIGH16, constInsn("const/high16"));
8,688
private void sendHash() {<NEW_LINE>final Element checksum = new Element("checksum", description.<MASK><NEW_LINE>checksum.setAttribute("creator", "initiator");<NEW_LINE>checksum.setAttribute("name", "a-file-offer");<NEW_LINE>Element hash = checksum.addChild("file").addChild("hash", "urn:xmpp:hashes:2");<NEW_LINE>hash.setAttribute("algo", "sha-1").setContent(Base64.encodeToString(file.getSha1Sum(), Base64.NO_WRAP));<NEW_LINE>final JinglePacket packet = this.bootstrapPacket(JinglePacket.Action.SESSION_INFO);<NEW_LINE>packet.addJingleChild(checksum);<NEW_LINE>xmppConnectionService.sendIqPacket(id.account, packet, (account, response) -> {<NEW_LINE>if (response.getType() == IqPacket.TYPE.ERROR) {<NEW_LINE>Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": ignoring error response to our session-info (hash transmission)");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getVersion().getNamespace());
1,093,127
public void merge(int i, int j) {<NEW_LINE>float nij = n[i] + n[j];<NEW_LINE>for (int k = 0; k < i; k++) {<NEW_LINE>proximity[index(i, k)] = (d(i, k) * n[i] + d(j, k) * n[j] - d(j, i) * n[i] * n[j] / nij) / nij;<NEW_LINE>}<NEW_LINE>for (int k = i + 1; k < j; k++) {<NEW_LINE>proximity[index(k, i)] = (d(k, i) * n[i] + d(j, k) * n[j] - d(j, i) * n[i] * n<MASK><NEW_LINE>}<NEW_LINE>for (int k = j + 1; k < size; k++) {<NEW_LINE>proximity[index(k, i)] = (d(k, i) * n[i] + d(k, j) * n[j] - d(j, i) * n[i] * n[j] / nij) / nij;<NEW_LINE>}<NEW_LINE>n[i] += n[j];<NEW_LINE>}
[j] / nij) / nij;
1,302,522
// session factories ////////////////////////////////////////////////////////<NEW_LINE>@Override<NEW_LINE>public void initSessionFactories() {<NEW_LINE>if (sessionFactories == null) {<NEW_LINE>sessionFactories = new HashMap<>();<NEW_LINE>if (usingRelationalDatabase) {<NEW_LINE>initDbSqlSessionFactory();<NEW_LINE>}<NEW_LINE>if (isAsyncHistoryEnabled) {<NEW_LINE>initAsyncHistorySessionFactory();<NEW_LINE>}<NEW_LINE>if (agendaFactory != null) {<NEW_LINE>addSessionFactory(new AgendaSessionFactory(agendaFactory));<NEW_LINE>}<NEW_LINE>addSessionFactory(new GenericManagerFactory(EntityCache.class, EntityCacheImpl.class));<NEW_LINE>commandContextFactory.setSessionFactories(sessionFactories);<NEW_LINE>} else {<NEW_LINE>if (usingRelationalDatabase) {<NEW_LINE>initDbSqlSessionFactoryEntitySettings();<NEW_LINE>}<NEW_LINE>if (isAsyncHistoryEnabled) {<NEW_LINE>if (!sessionFactories.containsKey(AsyncHistorySession.class)) {<NEW_LINE>initAsyncHistorySessionFactory();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!sessionFactories.containsKey(FlowableEngineAgenda.class)) {<NEW_LINE>if (agendaFactory != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (isLoggingSessionEnabled()) {<NEW_LINE>if (!sessionFactories.containsKey(LoggingSession.class)) {<NEW_LINE>LoggingSessionFactory loggingSessionFactory = new LoggingSessionFactory();<NEW_LINE>loggingSessionFactory.setLoggingListener(loggingListener);<NEW_LINE>loggingSessionFactory.setObjectMapper(objectMapper);<NEW_LINE>sessionFactories.put(LoggingSession.class, loggingSessionFactory);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!sessionFactories.containsKey(VariableListenerSession.class)) {<NEW_LINE>VariableListenerSessionFactory variableListenerSessionFactory = new VariableListenerSessionFactory();<NEW_LINE>sessionFactories.put(VariableListenerSession.class, variableListenerSessionFactory);<NEW_LINE>}<NEW_LINE>if (customSessionFactories != null) {<NEW_LINE>for (SessionFactory sessionFactory : customSessionFactories) {<NEW_LINE>addSessionFactory(sessionFactory);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addSessionFactory(new AgendaSessionFactory(agendaFactory));
196,882
private static void putPositiveIntAscii(final byte[] dest, final int offset, final int value, final int digitCount) {<NEW_LINE>int quotient = value;<NEW_LINE>int i = digitCount;<NEW_LINE>while (quotient >= 10_000) {<NEW_LINE>final int lastFourDigits = quotient % 10_000;<NEW_LINE>quotient /= 10_000;<NEW_LINE>final int p1 = (lastFourDigits / 100) << 1;<NEW_LINE>final int p2 = (lastFourDigits % 100) << 1;<NEW_LINE>i -= 4;<NEW_LINE>dest[offset + i] = ASCII_DIGITS[p1];<NEW_LINE>dest[offset + i + 1] = ASCII_DIGITS[p1 + 1];<NEW_LINE>dest[offset + i + 2] = ASCII_DIGITS[p2];<NEW_LINE>dest[offset + i + 3] = ASCII_DIGITS[p2 + 1];<NEW_LINE>}<NEW_LINE>if (quotient >= 100) {<NEW_LINE>final int position <MASK><NEW_LINE>quotient /= 100;<NEW_LINE>dest[offset + i - 1] = ASCII_DIGITS[position + 1];<NEW_LINE>dest[offset + i - 2] = ASCII_DIGITS[position];<NEW_LINE>}<NEW_LINE>if (quotient >= 10) {<NEW_LINE>final int position = quotient << 1;<NEW_LINE>dest[offset + 1] = ASCII_DIGITS[position + 1];<NEW_LINE>dest[offset] = ASCII_DIGITS[position];<NEW_LINE>} else {<NEW_LINE>dest[offset] = (byte) (ZERO + quotient);<NEW_LINE>}<NEW_LINE>}
= (quotient % 100) << 1;
924,097
public static Element serializeExecutionAction(Document doc, XCScheme.SchemePrePostAction action) {<NEW_LINE>Element executionAction = doc.createElement("ExecutionAction");<NEW_LINE>executionAction.setAttribute("ActionType", "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction");<NEW_LINE>Element actionContent = doc.createElement("ActionContent");<NEW_LINE>actionContent.setAttribute("title", "Run Script");<NEW_LINE>actionContent.setAttribute(<MASK><NEW_LINE>actionContent.setAttribute("shellToInvoke", "/bin/bash");<NEW_LINE>Optional<XCScheme.BuildableReference> buildableReference = action.getBuildableReference();<NEW_LINE>if (buildableReference.isPresent()) {<NEW_LINE>Element environmentBuildable = doc.createElement("EnvironmentBuildable");<NEW_LINE>environmentBuildable.appendChild(serializeBuildableReference(doc, buildableReference.get()));<NEW_LINE>actionContent.appendChild(environmentBuildable);<NEW_LINE>}<NEW_LINE>executionAction.appendChild(actionContent);<NEW_LINE>return executionAction;<NEW_LINE>}
"scriptText", action.getCommand());
1,500,826
public void createBeforeUnloadDialog(WebView view, String message, final JsResult result, String responseMessage, String confirmButtonTitle, String cancelButtonTitle) {<NEW_LINE>String alertMessage = (responseMessage != null && !responseMessage.isEmpty()) ? responseMessage : message;<NEW_LINE>DialogInterface.OnClickListener confirmClickListener = new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>result.confirm();<NEW_LINE>dialog.dismiss();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>DialogInterface.OnClickListener cancelClickListener = new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>result.cancel();<NEW_LINE>dialog.dismiss();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>Activity activity = inAppBrowserDelegate != null ? inAppBrowserDelegate.getActivity() : plugin.activity;<NEW_LINE>AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.Theme_AppCompat_Dialog_Alert);<NEW_LINE>alertDialogBuilder.setMessage(alertMessage);<NEW_LINE>if (confirmButtonTitle != null && !confirmButtonTitle.isEmpty()) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>alertDialogBuilder.setPositiveButton(android.R.string.ok, confirmClickListener);<NEW_LINE>}<NEW_LINE>if (cancelButtonTitle != null && !cancelButtonTitle.isEmpty()) {<NEW_LINE>alertDialogBuilder.setNegativeButton(cancelButtonTitle, cancelClickListener);<NEW_LINE>} else {<NEW_LINE>alertDialogBuilder.setNegativeButton(android.R.string.cancel, cancelClickListener);<NEW_LINE>}<NEW_LINE>alertDialogBuilder.setOnCancelListener(new DialogInterface.OnCancelListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onCancel(DialogInterface dialog) {<NEW_LINE>result.cancel();<NEW_LINE>dialog.dismiss();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>AlertDialog alertDialog = alertDialogBuilder.create();<NEW_LINE>alertDialog.show();<NEW_LINE>}
alertDialogBuilder.setPositiveButton(confirmButtonTitle, confirmClickListener);
1,610,532
public ErrorInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ErrorInfo errorInfo = new ErrorInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("code", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>errorInfo.setCode(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("message", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>errorInfo.setMessage(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return errorInfo;<NEW_LINE>}
class).unmarshall(context));
1,508,189
private <R> R readEntity(ElasticsearchPersistentEntity<?> entity, Map<String, Object> source) {<NEW_LINE>ElasticsearchPersistentEntity<?> targetEntity = computeClosestEntity(entity, source);<NEW_LINE>SpELExpressionEvaluator evaluator = new DefaultSpELExpressionEvaluator(source, spELContext);<NEW_LINE>MapValueAccessor accessor = new MapValueAccessor(source);<NEW_LINE>InstanceCreatorMetadata<?> creatorMetadata = entity.getInstanceCreatorMetadata();<NEW_LINE>ParameterValueProvider<ElasticsearchPersistentProperty> propertyValueProvider = creatorMetadata != null && creatorMetadata.hasParameters() ? getParameterProvider(entity, accessor, evaluator) : NoOpParameterValueProvider.INSTANCE;<NEW_LINE>EntityInstantiator instantiator = instantiators.getInstantiatorFor(targetEntity);<NEW_LINE>@SuppressWarnings({ "unchecked" })<NEW_LINE>R instance = (R) instantiator.createInstance(targetEntity, propertyValueProvider);<NEW_LINE>if (!targetEntity.requiresPropertyPopulation()) {<NEW_LINE>return instance;<NEW_LINE>}<NEW_LINE>ElasticsearchPropertyValueProvider valueProvider = new ElasticsearchPropertyValueProvider(accessor, evaluator);<NEW_LINE>R result = readProperties(targetEntity, instance, valueProvider);<NEW_LINE>if (source instanceof Document) {<NEW_LINE>Document document = (Document) source;<NEW_LINE>if (document.hasId()) {<NEW_LINE>ElasticsearchPersistentProperty idProperty = targetEntity.getIdProperty();<NEW_LINE>PersistentPropertyAccessor<R> propertyAccessor = new ConvertingPropertyAccessor<>(targetEntity.getPropertyAccessor(result), conversionService);<NEW_LINE>// Only deal with String because ES generated Ids are strings !<NEW_LINE>if (idProperty != null && idProperty.getType().isAssignableFrom(String.class)) {<NEW_LINE>propertyAccessor.setProperty(idProperty, document.getId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (document.hasVersion()) {<NEW_LINE><MASK><NEW_LINE>ElasticsearchPersistentProperty versionProperty = targetEntity.getVersionProperty();<NEW_LINE>// Only deal with Long because ES versions are longs !<NEW_LINE>if (versionProperty != null && versionProperty.getType().isAssignableFrom(Long.class)) {<NEW_LINE>// check that a version was actually returned in the response, -1 would indicate that<NEW_LINE>// a search didn't request the version ids in the response, which would be an issue<NEW_LINE>Assert.isTrue(version != -1, "Version in response is -1");<NEW_LINE>targetEntity.getPropertyAccessor(result).setProperty(versionProperty, version);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (targetEntity.hasSeqNoPrimaryTermProperty() && document.hasSeqNo() && document.hasPrimaryTerm()) {<NEW_LINE>if (isAssignedSeqNo(document.getSeqNo()) && isAssignedPrimaryTerm(document.getPrimaryTerm())) {<NEW_LINE>SeqNoPrimaryTerm seqNoPrimaryTerm = new SeqNoPrimaryTerm(document.getSeqNo(), document.getPrimaryTerm());<NEW_LINE>ElasticsearchPersistentProperty property = targetEntity.getRequiredSeqNoPrimaryTermProperty();<NEW_LINE>targetEntity.getPropertyAccessor(result).setProperty(property, seqNoPrimaryTerm);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (source instanceof SearchDocument) {<NEW_LINE>SearchDocument searchDocument = (SearchDocument) source;<NEW_LINE>populateScriptFields(targetEntity, result, searchDocument);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
long version = document.getVersion();
1,257,646
public static void createGlueModel(PosTexNormalWriterUnsafe buffer) {<NEW_LINE>Vec3 diff = Vec3.atLowerCornerOf(Direction.SOUTH.getNormal());<NEW_LINE>Vec3 extension = diff.normalize().scale(1 / 32f - 1 / 128f);<NEW_LINE>Vec3 plane = VecHelper.axisAlingedPlaneOf(diff);<NEW_LINE>Direction.Axis axis = Direction.getNearest(diff.x, diff.y, diff.z).getAxis();<NEW_LINE>Vec3 start = Vec3.ZERO.subtract(extension);<NEW_LINE>Vec3 end = Vec3.ZERO.add(extension);<NEW_LINE>plane = plane.scale(1 / 2f);<NEW_LINE>Vec3 a1 = plane.add(start);<NEW_LINE>Vec3 b1 = plane.add(end);<NEW_LINE>plane = VecHelper.rotate(plane, -90, axis);<NEW_LINE>Vec3 a2 = plane.add(start);<NEW_LINE>Vec3 b2 = plane.add(end);<NEW_LINE>plane = VecHelper.rotate(plane, -90, axis);<NEW_LINE>Vec3 a3 = plane.add(start);<NEW_LINE>Vec3 b3 = plane.add(end);<NEW_LINE>plane = VecHelper.rotate(plane, -90, axis);<NEW_LINE>Vec3 a4 = plane.add(start);<NEW_LINE>Vec3 b4 = plane.add(end);<NEW_LINE>float minU;<NEW_LINE>float maxU;<NEW_LINE>float minV;<NEW_LINE>float maxV;<NEW_LINE>if (USE_ATLAS) {<NEW_LINE>TextureAtlasSprite sprite = AllStitchedTextures.SUPER_GLUE.get();<NEW_LINE>minU = sprite.getU0();<NEW_LINE>maxU = sprite.getU1();<NEW_LINE>minV = sprite.getV0();<NEW_LINE>maxV = sprite.getV1();<NEW_LINE>} else {<NEW_LINE>minU = minV = 0;<NEW_LINE>maxU = maxV = 1;<NEW_LINE>}<NEW_LINE>// inside quad<NEW_LINE>buffer.putVertex((float) a1.x, (float) a1.y, (float) a1.z, 0, 0, -1, maxU, minV);<NEW_LINE>buffer.putVertex((float) a2.x, (float) a2.y, (float) a2.z, 0, 0, -1, maxU, maxV);<NEW_LINE>buffer.putVertex((float) a3.x, (float) a3.y, (float) a3.z, 0, 0, -1, minU, maxV);<NEW_LINE>buffer.putVertex((float) a4.x, (float) a4.y, (float) a4.z, 0, 0, -1, minU, minV);<NEW_LINE>// outside quad<NEW_LINE>buffer.putVertex((float) b4.x, (float) b4.y, (float) b4.z, 0, 0, 1f, minU, minV);<NEW_LINE>buffer.putVertex((float) b3.x, (float) b3.y, (float) b3.z, 0, <MASK><NEW_LINE>buffer.putVertex((float) b2.x, (float) b2.y, (float) b2.z, 0, 0, 1f, maxU, maxV);<NEW_LINE>buffer.putVertex((float) b1.x, (float) b1.y, (float) b1.z, 0, 0, 1f, maxU, minV);<NEW_LINE>}
0, 1f, minU, maxV);
1,295,385
public void contributeParameters(Map<String, Object> parameters) throws JRException {<NEW_LINE>RemoteXmlDataAdapter remoteXmlDataAdapter = getRemoteXmlDataAdapter();<NEW_LINE>if (remoteXmlDataAdapter != null) {<NEW_LINE>if (remoteXmlDataAdapter.isUseConnection()) {<NEW_LINE>String fileName = remoteXmlDataAdapter.getFileName();<NEW_LINE>if (fileName.toLowerCase().startsWith("https://") || fileName.toLowerCase().startsWith("http://") || fileName.toLowerCase().startsWith("file:")) {<NEW_LINE>// JRXPathQueryExecuterFactory.XML_URL not available.<NEW_LINE>// Once this is available, remove XML_URL from this class.<NEW_LINE>parameters.put(XML_URL, fileName);<NEW_LINE>} else {<NEW_LINE>InputStream dataStream = RepositoryUtil.getInstance(getJasperReportsContext()).getInputStreamFromLocation(remoteXmlDataAdapter.getFileName());<NEW_LINE>try {<NEW_LINE>Document document = JRXmlUtils.parse(dataStream, remoteXmlDataAdapter.isNamespaceAware());<NEW_LINE>parameters.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, document);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>dataStream.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.warn("Failed to close input stream for " + remoteXmlDataAdapter.getFileName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Locale locale = remoteXmlDataAdapter.getLocale();<NEW_LINE>if (locale != null) {<NEW_LINE>parameters.<MASK><NEW_LINE>}<NEW_LINE>TimeZone timeZone = remoteXmlDataAdapter.getTimeZone();<NEW_LINE>if (timeZone != null) {<NEW_LINE>parameters.put(JRXPathQueryExecuterFactory.XML_TIME_ZONE, timeZone);<NEW_LINE>}<NEW_LINE>String datePattern = remoteXmlDataAdapter.getDatePattern();<NEW_LINE>if (datePattern != null && datePattern.trim().length() > 0) {<NEW_LINE>parameters.put(JRXPathQueryExecuterFactory.XML_DATE_PATTERN, datePattern);<NEW_LINE>}<NEW_LINE>String numberPattern = remoteXmlDataAdapter.getNumberPattern();<NEW_LINE>if (numberPattern != null && numberPattern.trim().length() > 0) {<NEW_LINE>parameters.put(JRXPathQueryExecuterFactory.XML_NUMBER_PATTERN, numberPattern);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
put(JRXPathQueryExecuterFactory.XML_LOCALE, locale);
1,192,797
void ifAnonymousModeLogin(boolean pendingJoin) {<NEW_LINE>if (chatC.isInAnonymousMode()) {<NEW_LINE>Intent loginIntent = new Intent(this, LoginActivity.class);<NEW_LINE>if (pendingJoin && getIntent() != null && getIntent().getDataString() != null) {<NEW_LINE>String link = getIntent().getDataString();<NEW_LINE>MegaApplication.getChatManagement().setPendingJoinLink(link);<NEW_LINE>loginIntent.putExtra(VISIBLE_FRAGMENT, LOGIN_FRAGMENT);<NEW_LINE>loginIntent.setAction(ACTION_JOIN_OPEN_CHAT_LINK);<NEW_LINE>loginIntent.setData<MASK><NEW_LINE>} else {<NEW_LINE>loginIntent.putExtra(VISIBLE_FRAGMENT, TOUR_FRAGMENT);<NEW_LINE>}<NEW_LINE>loginIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);<NEW_LINE>startActivity(loginIntent);<NEW_LINE>app.setIsLoggingRunning(true);<NEW_LINE>}<NEW_LINE>closeChat(true);<NEW_LINE>finish();<NEW_LINE>}
(Uri.parse(link));
1,117,725
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TagResourceRequest> request = null;<NEW_LINE>Response<TagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DLM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,689,371
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>builder.field(COUNT.getPreferredName(), count);<NEW_LINE>builder.field(CARDINALITY.getPreferredName(), cardinality);<NEW_LINE>if (minValue != null) {<NEW_LINE>builder.field(MIN_VALUE.getPreferredName(), toIntegerIfInteger(minValue));<NEW_LINE>}<NEW_LINE>if (maxValue != null) {<NEW_LINE>builder.field(MAX_VALUE.getPreferredName(), toIntegerIfInteger(maxValue));<NEW_LINE>}<NEW_LINE>if (meanValue != null) {<NEW_LINE>builder.field(MEAN_VALUE.getPreferredName<MASK><NEW_LINE>}<NEW_LINE>if (medianValue != null) {<NEW_LINE>builder.field(MEDIAN_VALUE.getPreferredName(), toIntegerIfInteger(medianValue));<NEW_LINE>}<NEW_LINE>if (topHits.isEmpty() == false) {<NEW_LINE>builder.field(TOP_HITS.getPreferredName(), topHits);<NEW_LINE>}<NEW_LINE>builder.endObject();<NEW_LINE>return builder;<NEW_LINE>}
(), toIntegerIfInteger(meanValue));
47,873
public static void init(FMLInitializationEvent event) {<NEW_LINE>INSTANCE.registerMessage(PacketItemInfo.Handler.class, PacketItemInfo.class, PacketHandler.nextID(), Side.CLIENT);<NEW_LINE>INSTANCE.registerMessage(PacketItemList.Handler.class, PacketItemList.class, PacketHandler.nextID(), Side.CLIENT);<NEW_LINE>INSTANCE.registerMessage(PacketRequestMissingItems.Handler.class, PacketRequestMissingItems.class, PacketHandler.nextID(), Side.SERVER);<NEW_LINE>INSTANCE.registerMessage(PacketFetchItem.Handler.class, PacketFetchItem.class, PacketHandler.nextID(), Side.SERVER);<NEW_LINE>INSTANCE.registerMessage(PacketMoveItems.Handler.class, PacketMoveItems.class, PacketHandler.nextID(), Side.SERVER);<NEW_LINE>INSTANCE.registerMessage(PacketDatabaseReset.Handler.class, PacketDatabaseReset.class, PacketHandler.nextID(), Side.CLIENT);<NEW_LINE>INSTANCE.registerMessage(PacketGuiSettings.Handler.class, PacketGuiSettings.class, PacketHandler.nextID(), Side.SERVER);<NEW_LINE>INSTANCE.registerMessage(PacketStoredCraftingRecipe.Handler.class, PacketStoredCraftingRecipe.class, PacketHandler.<MASK><NEW_LINE>INSTANCE.registerMessage(PacketSetExtractionDisabled.Handler.class, PacketSetExtractionDisabled.class, PacketHandler.nextID(), Side.SERVER);<NEW_LINE>INSTANCE.registerMessage(PacketUpdateExtractionDisabled.Handler.class, PacketUpdateExtractionDisabled.class, PacketHandler.nextID(), Side.CLIENT);<NEW_LINE>INSTANCE.registerMessage(PacketPrimeInventoryPanelRemote.Handler.class, PacketPrimeInventoryPanelRemote.class, PacketHandler.nextID(), Side.CLIENT);<NEW_LINE>INSTANCE.registerMessage(PacketGuiSettingsUpdated.Handler.class, PacketGuiSettingsUpdated.class, PacketHandler.nextID(), Side.CLIENT);<NEW_LINE>INSTANCE.registerMessage(PacketActive.Handler.class, PacketActive.class, PacketHandler.nextID(), Side.CLIENT);<NEW_LINE>INSTANCE.registerMessage(PacketItemToCheck.Handler.class, PacketItemToCheck.class, PacketHandler.nextID(), Side.SERVER);<NEW_LINE>INSTANCE.registerMessage(PacketItemCount.Handler.class, PacketItemCount.class, PacketHandler.nextID(), Side.SERVER);<NEW_LINE>}
nextID(), Side.SERVER);
1,625,835
public io.kubernetes.client.proto.V1beta1Extensions.IngressList buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1beta1Extensions.IngressList result = new io.kubernetes.client.proto.V1beta1Extensions.IngressList(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>if (metadataBuilder_ == null) {<NEW_LINE>result.metadata_ = metadata_;<NEW_LINE>} else {<NEW_LINE>result.metadata_ = metadataBuilder_.build();<NEW_LINE>}<NEW_LINE>if (itemsBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>items_ = java.<MASK><NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>}<NEW_LINE>result.items_ = items_;<NEW_LINE>} else {<NEW_LINE>result.items_ = itemsBuilder_.build();<NEW_LINE>}<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
util.Collections.unmodifiableList(items_);
1,806,728
final CreateTableResult executeCreateTable(CreateTableRequest createTableRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createTableRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateTableRequest> request = null;<NEW_LINE>Response<CreateTableResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateTableRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createTableRequest));<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, "Keyspaces");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTable");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateTableResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateTableResultJsonUnmarshaller());<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 awsRequestMetrics = executionContext.getAwsRequestMetrics();
13,097
final GetPatchBaselineResult executeGetPatchBaseline(GetPatchBaselineRequest getPatchBaselineRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPatchBaselineRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetPatchBaselineRequest> request = null;<NEW_LINE>Response<GetPatchBaselineResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetPatchBaselineRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getPatchBaselineRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SSM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetPatchBaseline");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetPatchBaselineResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetPatchBaselineResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
984,859
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "create window MyWindow#keepall as SupportBean;" + "insert into MyWindow select * from SupportBean;" + "@name('s0') on SupportBean_S0 select theString, sum(intPrimitive) as c0, sum(intPrimitive, group_by:()) as c1" + " from MyWindow group by theString;";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE><MASK><NEW_LINE>makeSendEvent(env, "E2", 20);<NEW_LINE>makeSendEvent(env, "E1", 30);<NEW_LINE>makeSendEvent(env, "E3", 40);<NEW_LINE>makeSendEvent(env, "E2", 50);<NEW_LINE>env.sendEventBean(new SupportBean_S0(0));<NEW_LINE>env.assertPropsPerRowLastNewAnyOrder("s0", "theString,c0,c1".split(","), new Object[][] { { "E1", 40, 150 }, { "E2", 70, 150 }, { "E3", 40, 150 } });<NEW_LINE>makeSendEvent(env, "E1", 60);<NEW_LINE>env.sendEventBean(new SupportBean_S0(0));<NEW_LINE>env.assertPropsPerRowLastNewAnyOrder("s0", "theString,c0,c1".split(","), new Object[][] { { "E1", 100, 210 }, { "E2", 70, 210 }, { "E3", 40, 210 } });<NEW_LINE>env.undeployAll();<NEW_LINE>}
makeSendEvent(env, "E1", 10);
693,635
private MessageExtBrokerInner toMessageExtBrokerInner(MessageExt msgExt) {<NEW_LINE>TopicConfig topicConfig = this.getBrokerController().getTopicConfigManager().createTopicOfTranCheckMaxTime(TCMT_QUEUE_NUMS, PermName.PERM_READ | PermName.PERM_WRITE);<NEW_LINE>int queueId = ThreadLocalRandom.current().nextInt(99999999) % TCMT_QUEUE_NUMS;<NEW_LINE>MessageExtBrokerInner inner = new MessageExtBrokerInner();<NEW_LINE>inner.setTopic(topicConfig.getTopicName());<NEW_LINE>inner.setBody(msgExt.getBody());<NEW_LINE>inner.setFlag(msgExt.getFlag());<NEW_LINE>MessageAccessor.setProperties(<MASK><NEW_LINE>inner.setPropertiesString(MessageDecoder.messageProperties2String(msgExt.getProperties()));<NEW_LINE>inner.setTagsCode(MessageExtBrokerInner.tagsString2tagsCode(msgExt.getTags()));<NEW_LINE>inner.setQueueId(queueId);<NEW_LINE>inner.setSysFlag(msgExt.getSysFlag());<NEW_LINE>inner.setBornHost(msgExt.getBornHost());<NEW_LINE>inner.setBornTimestamp(msgExt.getBornTimestamp());<NEW_LINE>inner.setStoreHost(msgExt.getStoreHost());<NEW_LINE>inner.setReconsumeTimes(msgExt.getReconsumeTimes());<NEW_LINE>inner.setMsgId(msgExt.getMsgId());<NEW_LINE>inner.setWaitStoreMsgOK(false);<NEW_LINE>return inner;<NEW_LINE>}
inner, msgExt.getProperties());
308,039
public <Req, Resp> BlockingClientCall<Req, Resp> newBlockingCall(final MethodDescriptor<Req, Resp> methodDescriptor, final BufferDecoderGroup decompressors) {<NEW_LINE>final BlockingHttpClient client = streamingHttpClient.asBlockingClient();<NEW_LINE>GrpcSerializer<Req> serializerIdentity = serializer(methodDescriptor);<NEW_LINE>GrpcDeserializer<Resp> deserializerIdentity = deserializer(methodDescriptor);<NEW_LINE>List<GrpcDeserializer<Resp>> deserializers = deserializers(methodDescriptor, decompressors.decoders());<NEW_LINE>CharSequence acceptedEncoding = decompressors.advertisedMessageEncoding();<NEW_LINE>CharSequence requestContentType = grpcContentType(methodDescriptor.requestDescriptor().serializerDescriptor().contentType());<NEW_LINE>CharSequence responseContentType = grpcContentType(methodDescriptor.responseDescriptor().serializerDescriptor().contentType());<NEW_LINE>return (metadata, request) -> {<NEW_LINE>Duration timeout = timeoutForRequest(metadata.timeout());<NEW_LINE>GrpcSerializer<Req> serializer = serializer(methodDescriptor, serializerIdentity, metadata.requestCompressor());<NEW_LINE>String mdPath = methodDescriptor.httpPath();<NEW_LINE>HttpRequest httpRequest = client.post(UNKNOWN_PATH.equals(mdPath) ? metadata.path() : mdPath);<NEW_LINE>initRequest(httpRequest, requestContentType, serializer.messageEncoding(), acceptedEncoding, timeout);<NEW_LINE>httpRequest.payloadBody(serializer.serialize(request, client.executionContext().bufferAllocator()));<NEW_LINE>try {<NEW_LINE>assignStrategy(httpRequest, metadata);<NEW_LINE>final HttpResponse response = client.request(httpRequest);<NEW_LINE>return validateResponseAndGetPayload(response, responseContentType, client.executionContext().bufferAllocator(), readGrpcMessageEncodingRaw(response.headers(), deserializerIdentity<MASK><NEW_LINE>} catch (Throwable cause) {<NEW_LINE>throw toGrpcException(cause);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
, deserializers, GrpcDeserializer::messageEncoding));
370,624
private Menu createMenu(ToolItem toolItem) {<NEW_LINE>if (menu != null) {<NEW_LINE>menu.dispose();<NEW_LINE>}<NEW_LINE>{<NEW_LINE>MenuManager menuManager = new MenuManager();<NEW_LINE>ToolBar toolBar = toolItem.getParent();<NEW_LINE>menu = new Menu(toolBar);<NEW_LINE>List<StreamValueManagerDescriptor> managers = new ArrayList<>(streamManagers.keySet());<NEW_LINE>managers.sort(Comparator.comparing(StreamValueManagerDescriptor::getLabel));<NEW_LINE>for (StreamValueManagerDescriptor manager : managers) {<NEW_LINE>final CommandContributionItemParameter parameters = new CommandContributionItemParameter(valueController.getValueSite(), manager.getId(), ResultSetHandlerSwitchContentViewer.COMMAND_ID, CommandContributionItem.STYLE_RADIO);<NEW_LINE>parameters.parameters = Map.of(ResultSetHandlerSwitchContentViewer.PARAM_STREAM_MANAGER_ID, manager.getId());<NEW_LINE>menuManager.add(new CommandContributionItem(parameters));<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>streamEditor.contributeSettings(menuManager, editorControl);<NEW_LINE>} catch (DBCException e) {<NEW_LINE>log.error(e);<NEW_LINE>}<NEW_LINE>for (IContributionItem item : menuManager.getItems()) {<NEW_LINE>item.fill(menu, -1);<NEW_LINE>}<NEW_LINE>toolBar.addDisposeListener(<MASK><NEW_LINE>}<NEW_LINE>for (MenuItem item : menu.getItems()) {<NEW_LINE>if (item.getData() instanceof StreamValueManagerDescriptor) {<NEW_LINE>item.setSelection(item.getData() == curStreamManager);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return menu;<NEW_LINE>}
e -> menu.dispose());
624,216
private void finishDismiss(View dismissView, int originalLayoutHeight) {<NEW_LINE>// Make sure no other animation is running. Remove animation from running list, that just finished<NEW_LINE>boolean noAnimationLeft;<NEW_LINE>synchronized (mAnimationLock) {<NEW_LINE>--mDismissAnimationRefCount;<NEW_LINE>mAnimatedViews.remove(dismissView);<NEW_LINE>noAnimationLeft = mDismissAnimationRefCount == 0;<NEW_LINE>}<NEW_LINE>if (noAnimationLeft) {<NEW_LINE>// No active animations, process all pending dismisses.<NEW_LINE>for (PendingDismissData dismiss : mPendingDismisses) {<NEW_LINE>if (mUndoStyle == UndoStyle.SINGLE_POPUP) {<NEW_LINE>for (Undoable undoable : mUndoActions) {<NEW_LINE>undoable.discard();<NEW_LINE>}<NEW_LINE>mUndoActions.clear();<NEW_LINE>}<NEW_LINE>Undoable undoable = mCallbacks.onDismiss(dismiss.position);<NEW_LINE>if (undoable != null) {<NEW_LINE>mUndoActions.add(undoable);<NEW_LINE>}<NEW_LINE>mValidDelayedMsgId++;<NEW_LINE>}<NEW_LINE>if (!mUndoActions.isEmpty()) {<NEW_LINE>changePopupText();<NEW_LINE>changeButtonLabel();<NEW_LINE>// Show undo popup<NEW_LINE>float yLocationOffset = mListView.getResources().getDimension(R.dimen.undo_bottom_offset);<NEW_LINE>mUndoPopup.setWidth((int) Math.min(mScreenDensity * 400, mListView.getWidth() * 0.9f));<NEW_LINE>mUndoPopup.showAtLocation(mListView, Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM, 0, (int) yLocationOffset);<NEW_LINE>// Queue the dismiss only if required<NEW_LINE>if (!mTouchBeforeAutoHide) {<NEW_LINE>// Send a delayed message to hide popup<NEW_LINE>mHideUndoHandler.sendMessageDelayed(mHideUndoHandler<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>ViewGroup.LayoutParams lp;<NEW_LINE>for (PendingDismissData pendingDismiss : mPendingDismisses) {<NEW_LINE>pendingDismiss.view.setAlpha(1f);<NEW_LINE>pendingDismiss.view.setTranslationX(0);<NEW_LINE>lp = pendingDismiss.childView.getLayoutParams();<NEW_LINE>lp.height = originalLayoutHeight;<NEW_LINE>pendingDismiss.childView.setLayoutParams(lp);<NEW_LINE>}<NEW_LINE>mPendingDismisses.clear();<NEW_LINE>}<NEW_LINE>}
.obtainMessage(mValidDelayedMsgId), mUndoHideDelay);
255,796
public Node newRegexpNode(int line, Node contents, RegexpNode end) {<NEW_LINE>Ruby runtime = configuration.getRuntime();<NEW_LINE>RegexpOptions options = end.getOptions();<NEW_LINE>Encoding encoding = lexer.getEncoding();<NEW_LINE>if (contents == null) {<NEW_LINE>ByteList newValue = ByteList.create("");<NEW_LINE>if (encoding != null) {<NEW_LINE>newValue.setEncoding(encoding);<NEW_LINE>}<NEW_LINE>lexer.checkRegexpFragment(runtime, newValue, options);<NEW_LINE>return new RegexpNode(line, newValue, options.withoutOnce());<NEW_LINE>} else if (contents instanceof StrNode) {<NEW_LINE>ByteList meat = (ByteList) ((StrNode) contents).getValue().clone();<NEW_LINE>lexer.checkRegexpFragment(runtime, meat, options);<NEW_LINE>lexer.checkRegexpSyntax(runtime, meat, options.withoutOnce());<NEW_LINE>return new RegexpNode(contents.getLine(), meat, options.withoutOnce());<NEW_LINE>} else if (contents instanceof DStrNode) {<NEW_LINE>DStrNode dStrNode = (DStrNode) contents;<NEW_LINE>for (int i = 0; i < dStrNode.size(); i++) {<NEW_LINE>Node fragment = dStrNode.get(i);<NEW_LINE>if (fragment instanceof StrNode) {<NEW_LINE>ByteList frag = ((StrNode) fragment).getValue();<NEW_LINE>lexer.checkRegexpFragment(runtime, frag, options);<NEW_LINE>// if (!lexer.isOneEight()) encoding = frag.getEncoding();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>DRegexpNode dRegexpNode = new DRegexpNode(line, options, encoding);<NEW_LINE>dRegexpNode.add(new StrNode(contents.getLine(), createMaster(options)));<NEW_LINE>dRegexpNode.addAll(dStrNode);<NEW_LINE>return dRegexpNode;<NEW_LINE>}<NEW_LINE>// EvStrNode: #{val}: no fragment check, but at least set encoding<NEW_LINE>ByteList master = createMaster(options);<NEW_LINE>lexer.checkRegexpFragment(runtime, master, options);<NEW_LINE>encoding = master.getEncoding();<NEW_LINE>DRegexpNode node = new <MASK><NEW_LINE>node.add(new StrNode(contents.getLine(), master));<NEW_LINE>node.add(contents);<NEW_LINE>return node;<NEW_LINE>}
DRegexpNode(line, options, encoding);
559,062
protected PointsToSet computeRefinedReachingObjects(VarNode v) {<NEW_LINE>// must reset the refinement heuristic for each query<NEW_LINE>this.fieldCheckHeuristic = HeuristicType.getHeuristic(heuristicType, pag.getTypeManager(), getMaxPasses());<NEW_LINE>doPointsTo = true;<NEW_LINE>numPasses = 0;<NEW_LINE>PointsToSet contextSensitiveResult = null;<NEW_LINE>while (true) {<NEW_LINE>numPasses++;<NEW_LINE>if (DEBUG_PASS != -1 && numPasses > DEBUG_PASS) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (numPasses > maxPasses) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (DEBUG) {<NEW_LINE>logger.debug("PASS " + numPasses);<NEW_LINE>logger.debug("" + fieldCheckHeuristic);<NEW_LINE>}<NEW_LINE>clearState();<NEW_LINE>pointsTo = new AllocAndContextSet();<NEW_LINE>try {<NEW_LINE>refineP2Set(new VarAndContext<MASK><NEW_LINE>contextSensitiveResult = pointsTo;<NEW_LINE>} catch (TerminateEarlyException e) {<NEW_LINE>logger.debug(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>if (!fieldCheckHeuristic.runNewPass()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return contextSensitiveResult;<NEW_LINE>}
(v, EMPTY_CALLSTACK), null);
570,865
private static TlsKeyExchange createKeyExchangeServer(TlsServer server, int keyExchange) throws IOException {<NEW_LINE>TlsKeyExchangeFactory factory = server.getKeyExchangeFactory();<NEW_LINE>switch(keyExchange) {<NEW_LINE>case KeyExchangeAlgorithm.DH_anon:<NEW_LINE>return factory.createDHanonKeyExchangeServer(keyExchange, server.getDHConfig());<NEW_LINE>case KeyExchangeAlgorithm.DH_DSS:<NEW_LINE>case KeyExchangeAlgorithm.DH_RSA:<NEW_LINE>return factory.createDHKeyExchange(keyExchange);<NEW_LINE>case KeyExchangeAlgorithm.DHE_DSS:<NEW_LINE>case KeyExchangeAlgorithm.DHE_RSA:<NEW_LINE>return factory.createDHEKeyExchangeServer(keyExchange, server.getDHConfig());<NEW_LINE>case KeyExchangeAlgorithm.ECDH_anon:<NEW_LINE>return factory.createECDHanonKeyExchangeServer(keyExchange, server.getECDHConfig());<NEW_LINE>case KeyExchangeAlgorithm.ECDH_ECDSA:<NEW_LINE>case KeyExchangeAlgorithm.ECDH_RSA:<NEW_LINE>return factory.createECDHKeyExchange(keyExchange);<NEW_LINE>case KeyExchangeAlgorithm.ECDHE_ECDSA:<NEW_LINE>case KeyExchangeAlgorithm.ECDHE_RSA:<NEW_LINE>return factory.createECDHEKeyExchangeServer(<MASK><NEW_LINE>case KeyExchangeAlgorithm.RSA:<NEW_LINE>return factory.createRSAKeyExchange(keyExchange);<NEW_LINE>case KeyExchangeAlgorithm.DHE_PSK:<NEW_LINE>return factory.createPSKKeyExchangeServer(keyExchange, server.getPSKIdentityManager(), server.getDHConfig(), null);<NEW_LINE>case KeyExchangeAlgorithm.ECDHE_PSK:<NEW_LINE>return factory.createPSKKeyExchangeServer(keyExchange, server.getPSKIdentityManager(), null, server.getECDHConfig());<NEW_LINE>case KeyExchangeAlgorithm.PSK:<NEW_LINE>case KeyExchangeAlgorithm.RSA_PSK:<NEW_LINE>return factory.createPSKKeyExchangeServer(keyExchange, server.getPSKIdentityManager(), null, null);<NEW_LINE>case KeyExchangeAlgorithm.SRP:<NEW_LINE>case KeyExchangeAlgorithm.SRP_DSS:<NEW_LINE>case KeyExchangeAlgorithm.SRP_RSA:<NEW_LINE>return factory.createSRPKeyExchangeServer(keyExchange, server.getSRPLoginParameters());<NEW_LINE>default:<NEW_LINE>throw new TlsFatalAlert(AlertDescription.internal_error);<NEW_LINE>}<NEW_LINE>}
keyExchange, server.getECDHConfig());
830,969
public static <T> void processDense(T data, Adapter<T> adapter, Collector collector) {<NEW_LINE>// Number of nodes<NEW_LINE>final int <MASK><NEW_LINE>// Best distance for each node<NEW_LINE>double[] best = new double[n];<NEW_LINE>Arrays.fill(best, Double.POSITIVE_INFINITY);<NEW_LINE>// Best previous node<NEW_LINE>int[] src = new int[n];<NEW_LINE>// Nodes already handled<NEW_LINE>// byte[] uses more memory, but it will be faster.<NEW_LINE>byte[] connected = new byte[n];<NEW_LINE>// We always start at "random" node 0<NEW_LINE>// Note: we use this below in the "j" loop!<NEW_LINE>int current = 0;<NEW_LINE>connected[current] = 1;<NEW_LINE>best[current] = 0;<NEW_LINE>// Search<NEW_LINE>for (int i = n - 2; i >= 0; i--) {<NEW_LINE>// Update best and src from current:<NEW_LINE>int newbesti = -1;<NEW_LINE>double newbestd = Double.POSITIVE_INFINITY;<NEW_LINE>// Note: we assume we started with 0, and can thus skip it<NEW_LINE>for (int j = 0; j < n; ++j) {<NEW_LINE>if (connected[j] == 1) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final double dist = adapter.distance(data, current, j);<NEW_LINE>if (dist < best[j]) {<NEW_LINE>best[j] = dist;<NEW_LINE>src[j] = current;<NEW_LINE>}<NEW_LINE>if (best[j] < newbestd || newbesti == -1) {<NEW_LINE>newbestd = best[j];<NEW_LINE>newbesti = j;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>assert (newbesti >= 0);<NEW_LINE>// Flag<NEW_LINE>connected[newbesti] = 1;<NEW_LINE>// Store edge<NEW_LINE>collector.addEdge(newbestd, src[newbesti], newbesti);<NEW_LINE>// Continue<NEW_LINE>current = newbesti;<NEW_LINE>}<NEW_LINE>}
n = adapter.size(data);
1,023,388
public static HashMap<String, Object> convertImageMessageElem(V2TIMImageElem elem) {<NEW_LINE>HashMap<String, Object> img = new HashMap<String, Object>();<NEW_LINE>img.put("path", elem.getPath());<NEW_LINE>LinkedList<Object> imgList = new LinkedList<Object>();<NEW_LINE>for (int i = 0; i < elem.getImageList().size(); i++) {<NEW_LINE>HashMap<String, Object> item = new HashMap<String, Object>();<NEW_LINE>V2TIMImageElem.V2TIMImage imgInstance = elem.getImageList().get(i);<NEW_LINE>item.put("size", imgInstance.getSize());<NEW_LINE>item.put("height", imgInstance.getHeight());<NEW_LINE>item.put("type", imgInstance.getType());<NEW_LINE>item.put(<MASK><NEW_LINE>item.put("UUID", imgInstance.getUUID());<NEW_LINE>item.put("width", imgInstance.getWidth());<NEW_LINE>imgList.add(item);<NEW_LINE>}<NEW_LINE>img.put("imageList", imgList);<NEW_LINE>return img;<NEW_LINE>}
"url", imgInstance.getUrl());
387,695
public ParcelFileDescriptor performNextcloudRequestAndBodyStreamV2(ParcelFileDescriptor input, ParcelFileDescriptor requestBodyParcelFileDescriptor) {<NEW_LINE>// read the input<NEW_LINE>final InputStream is = new ParcelFileDescriptor.AutoCloseInputStream(input);<NEW_LINE>final InputStream requestBodyInputStream = requestBodyParcelFileDescriptor != null ? new ParcelFileDescriptor.AutoCloseInputStream(requestBodyParcelFileDescriptor) : null;<NEW_LINE>Exception exception = null;<NEW_LINE>Response response = new Response();<NEW_LINE>try {<NEW_LINE>// Start request and catch exceptions<NEW_LINE>NextcloudRequest request = deserializeObjectAndCloseStream(is);<NEW_LINE>response = processRequestV2(request, requestBodyInputStream);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log_OC.<MASK><NEW_LINE>exception = e;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// Write exception to the stream followed by the actual network stream<NEW_LINE>InputStream exceptionStream = serializeObjectToInputStreamV2(exception, response.getPlainHeadersString());<NEW_LINE>InputStream resultStream = new java.io.SequenceInputStream(exceptionStream, response.getBody());<NEW_LINE>return ParcelFileDescriptorUtil.pipeFrom(resultStream, thread -> Log.d(TAG, "Done sending result"), response.getMethod());<NEW_LINE>} catch (IOException e) {<NEW_LINE>Log_OC.e(TAG, "Error while sending response back to client app", e);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
e(TAG, "Error during Nextcloud request", e);
333,491
public boolean canBeTargetedBy(MageObject source, UUID sourceControllerId, Game game) {<NEW_LINE>if (source != null) {<NEW_LINE>if (abilities.containsKey(ShroudAbility.getInstance().getId())) {<NEW_LINE>if (null == game.getContinuousEffects().asThough(this.getId(), AsThoughEffectType.SHROUD, null, sourceControllerId, game)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (game.getPlayer(this.getControllerId()).hasOpponent(sourceControllerId, game) && null == game.getContinuousEffects().asThough(this.getId(), AsThoughEffectType.HEXPROOF, null, sourceControllerId, game) && abilities.stream().filter(HexproofBaseAbility.class::isInstance).map(HexproofBaseAbility.class::cast).anyMatch(ability -> ability.checkObject(source, game))) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (hasProtectionFrom(source, game)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// example: Fiendslayer Paladin tried to target with Ultimate Price<NEW_LINE>return !game.getContinuousEffects().preventedByRuleModification(new TargetEvent(this, source.getId(), sourceControllerId<MASK><NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
), null, game, true);
915,850
private Switch createPlayerButtons() {<NEW_LINE>final Switch playerItemSwitch <MASK><NEW_LINE>final List<Mapping> mappings = playerItemSwitch.getMappings();<NEW_LINE>Mapping commandMapping;<NEW_LINE>mappings.add(commandMapping = SitemapFactory.eINSTANCE.createMapping());<NEW_LINE>commandMapping.setCmd(NextPreviousType.PREVIOUS.name());<NEW_LINE>commandMapping.setLabel("<<");<NEW_LINE>mappings.add(commandMapping = SitemapFactory.eINSTANCE.createMapping());<NEW_LINE>commandMapping.setCmd(PlayPauseType.PAUSE.name());<NEW_LINE>commandMapping.setLabel("||");<NEW_LINE>mappings.add(commandMapping = SitemapFactory.eINSTANCE.createMapping());<NEW_LINE>commandMapping.setCmd(PlayPauseType.PLAY.name());<NEW_LINE>commandMapping.setLabel(">");<NEW_LINE>mappings.add(commandMapping = SitemapFactory.eINSTANCE.createMapping());<NEW_LINE>commandMapping.setCmd(NextPreviousType.NEXT.name());<NEW_LINE>commandMapping.setLabel(">>");<NEW_LINE>return playerItemSwitch;<NEW_LINE>}
= SitemapFactory.eINSTANCE.createSwitch();
1,239,787
public void paint(Graphics g) {<NEW_LINE>boolean selected;<NEW_LINE>boolean focused;<NEW_LINE>int xpos;<NEW_LINE>selected = isRowSelected(currentlyPaintedRow);<NEW_LINE>focused = JTreeTable.this.isFocusOwner();<NEW_LINE>int rHeight = getRowHeight();<NEW_LINE>// move tree according to offsetX<NEW_LINE>g.translate(-offsetX, -currentlyPaintedRow * rHeight);<NEW_LINE>if (isGTK) {<NEW_LINE>// Optimized for GTK but doesn't paint selection on the left side of renderer<NEW_LINE>// paint tree row, according to current Clip only one row is painted<NEW_LINE>super.paint(g);<NEW_LINE>// draw row background<NEW_LINE>Rectangle rowBounds = getRowBounds(currentlyPaintedRow);<NEW_LINE>xpos = rowBounds.x + rowBounds.width;<NEW_LINE>g.setColor(getRowColor(currentlyPaintedRow, selected, focused));<NEW_LINE>g.fillRect(xpos, currentlyPaintedRow * rHeight, getWidth() + offsetX - xpos, rHeight);<NEW_LINE>} else {<NEW_LINE>// draw row background<NEW_LINE>xpos = selected ? 0 : getRowBounds(currentlyPaintedRow).x;<NEW_LINE>g.setColor(getRowColor(currentlyPaintedRow, selected, focused));<NEW_LINE>g.fillRect(xpos, currentlyPaintedRow * rHeight, <MASK><NEW_LINE>// paint tree row, according to current Clip only one row is painted<NEW_LINE>super.paint(g);<NEW_LINE>}<NEW_LINE>}
getWidth() + offsetX, rHeight);
26,071
public static Process createIdaProcess(final String idaExe, final File idcPath, final String idbFileName, final String outputDirectory) throws IdaException {<NEW_LINE>final String idcFileString = idcPath.getAbsolutePath();<NEW_LINE>final String sArgument = getSArgument(<MASK><NEW_LINE>// Setup the invocation of the IDA to SQL exporter<NEW_LINE>final ProcessBuilder processBuilder = new ProcessBuilder(idaExe, "-A", "-OExporterModule:" + outputDirectory, sArgument, idbFileName);<NEW_LINE>// ESCA-JAVA0166:<NEW_LINE>// Now launch the exporter to export the IDB to the database<NEW_LINE>try {<NEW_LINE>Process processInfo = null;<NEW_LINE>processBuilder.redirectErrorStream(true);<NEW_LINE>processInfo = processBuilder.start();<NEW_LINE>// Java manages the streams internally - if they are full, the<NEW_LINE>// process blocks, i.e. IDA hangs, so we need to consume them.<NEW_LINE>try (BufferedReader reader = new BufferedReader(new InputStreamReader(processInfo.getInputStream()))) {<NEW_LINE>reader.lines().forEach(System.out::println);<NEW_LINE>} catch (final IOException exception) {<NEW_LINE>// Ignore<NEW_LINE>}<NEW_LINE>return processInfo;<NEW_LINE>} catch (final Exception exception) {<NEW_LINE>try {<NEW_LINE>// TODO: What can we do here ? Do we have a ZyLib-wide logger ?<NEW_LINE>// CUtilityFunctions.logException(exception);<NEW_LINE>} catch (final UnknownFormatConversionException e) {<NEW_LINE>// Some Windows error messages contain %1 characters.<NEW_LINE>}<NEW_LINE>throw new IdaException("Failed attempting to launch the importer with IDA: " + exception, exception);<NEW_LINE>}<NEW_LINE>}
idcFileString, SystemHelpers.isRunningWindows());
1,103,202
public void maintainTranslations(@NonNull final I_AD_Language language, @NonNull final String maintenanceMode) {<NEW_LINE>logger.info("Mode={}, language={}", maintenanceMode, language);<NEW_LINE>int deleteNo = 0;<NEW_LINE>int insertNo = 0;<NEW_LINE>// Delete<NEW_LINE>if (MAINTENANCEMODE_Delete.equals(maintenanceMode) || MAINTENANCEMODE_ReCreate.equals(maintenanceMode)) {<NEW_LINE>deleteNo = removeTranslations(language);<NEW_LINE>}<NEW_LINE>// Add<NEW_LINE>if (MAINTENANCEMODE_Add.equals(maintenanceMode) || MAINTENANCEMODE_ReCreate.equals(maintenanceMode)) {<NEW_LINE>if (language.isActive() && (language.isSystemLanguage() || language.isBaseLanguage())) {<NEW_LINE>insertNo = addMissingTranslations(language);<NEW_LINE>} else {<NEW_LINE>throw new AdempiereException("Language not active System Language: " + language);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Delete<NEW_LINE>if (MAINTENANCEMODE_Delete.equals(maintenanceMode)) {<NEW_LINE>if (language.isSystemLanguage()) {<NEW_LINE>language.setIsSystemLanguage(false);<NEW_LINE>InterfaceWrapperHelper.save(language);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Loggables.withLogger(logger, Level.DEBUG).addLog(<MASK><NEW_LINE>}
"@Deleted@=" + deleteNo + " - @Inserted@=" + insertNo);
550,662
protected boolean canProveSuperClass(Resource sup) {<NEW_LINE>OntModel om = (OntModel) getModel();<NEW_LINE>if (om.getReasoner() != null) {<NEW_LINE>if (om.getReasoner().getReasonerCapabilities().contains(null, ReasonerVocabulary.supportsP, RDFS.subClassOf)) {<NEW_LINE>// this reasoner does transitive closure on sub-classes, so we just ask<NEW_LINE>return hasSuperClass(sup);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// otherwise, we have to search upwards through the class hierarchy<NEW_LINE>Set<OntClass> seen = new HashSet<>();<NEW_LINE>List<OntClass> queue = new ArrayList<>();<NEW_LINE>queue.add(this);<NEW_LINE>while (!queue.isEmpty()) {<NEW_LINE>OntClass <MASK><NEW_LINE>if (!seen.contains(c)) {<NEW_LINE>seen.add(c);<NEW_LINE>if (c.equals(sup)) {<NEW_LINE>// found the super class<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>// queue the supers<NEW_LINE>for (Iterator<OntClass> i = c.listSuperClasses(); i.hasNext(); ) {<NEW_LINE>queue.add(i.next());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// to get here, we didn't find the class we were looking for<NEW_LINE>return false;<NEW_LINE>}
c = queue.remove(0);
657,060
public boolean removeIPEntryfromPool(@Nonnull IPv4Address ip) {<NEW_LINE>if (!isIPAvailableInRepo(ip)) {<NEW_LINE>log.info("The request IP address {} is not valid, either because it is in use at this point " + "or it is not an existing IP in DHCP pool", ip);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (ip.equals(startingAddress)) {<NEW_LINE>log.info("The request IP address {} is the starting address of DHCP pool, " + "not allow to remove that address", startingAddress);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>DHCPBinding binding = dhcpRepository.stream().filter(binding1 -> binding1.getIPv4Address().equals(ip)).findAny().get();<NEW_LINE>dhcpRepository.remove(binding);<NEW_LINE><MASK><NEW_LINE>this.setPoolSize(this.getPoolSize() - 1);<NEW_LINE>return true;<NEW_LINE>}
log.info("The request IP address {} completely removed from DHCP pool", ip);
973,770
public void onUserLogin(final int AD_Org_ID, final int AD_Role_ID, final int AD_User_ID) {<NEW_LINE>DBException.registerExceptionWrapper(DLMReferenceExceptionWrapper.INSTANCE);<NEW_LINE>// gh #1411: only register the connection customizer if it was enabled.<NEW_LINE>final IDLMService dlmService = Services.get(IDLMService.class);<NEW_LINE>if (dlmService.isConnectionCustomizerEnabled(AD_User_ID)) {<NEW_LINE>Services.get(IConnectionCustomizerService.class).registerPermanentCustomizer(DLMPermanentIniCustomizer.INSTANCE);<NEW_LINE>}<NEW_LINE>Services.get(ICoordinatorService.class<MASK><NEW_LINE>// gh #968: register handler to try to get back archived records, if PO could not load them<NEW_LINE>NoDataFoundHandlers.get().addHandler(UnArchiveRecordHandler.INSTANCE);<NEW_LINE>}
).registerInspector(LastUpdatedInspector.INSTANCE);
1,750,312
protected LeafNode createIntArrayLeafNode(String line) {<NEW_LINE>StringTokenizer tok = new StringTokenizer(line, " ");<NEW_LINE>// read the indices from the tokenized String<NEW_LINE>int numTokens = tok.countTokens();<NEW_LINE>int index = 0;<NEW_LINE>// The data to be saved in the leaf node:<NEW_LINE>int[] indices;<NEW_LINE>if (numTokens == 2) {<NEW_LINE>// we do not have any indices<NEW_LINE>// discard useless token<NEW_LINE>tok.nextToken();<NEW_LINE>indices = new int[0];<NEW_LINE>} else {<NEW_LINE>indices = new int[(numTokens - 1) / 2];<NEW_LINE>while (index * 2 < numTokens - 1) {<NEW_LINE>// while we are not at the<NEW_LINE>// last token<NEW_LINE>String nextToken = tok.nextToken();<NEW_LINE>if (index == 0) {<NEW_LINE>// we are at first token, discard all open brackets<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>// we are not at first token, only one open bracket<NEW_LINE>nextToken = nextToken.substring(1);<NEW_LINE>}<NEW_LINE>// store the index of the unit<NEW_LINE>indices[index] = Integer.parseInt(nextToken);<NEW_LINE>// discard next token<NEW_LINE>tok.nextToken();<NEW_LINE>// increase index<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new LeafNode.IntArrayLeafNode(indices);<NEW_LINE>}
nextToken = nextToken.substring(4);
115,140
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>BottomSheetDialog dialog = (BottomSheetDialog) super.onCreateDialog(savedInstanceState);<NEW_LINE>dialog.getBehavior().setPeekHeight((int) (getResources().getDisplayMetrics().heightPixels * 0.50));<NEW_LINE>ShapeAppearanceModel shapeAppearanceModel = ShapeAppearanceModel.builder().setTopLeftCorner(CornerFamily.ROUNDED, ViewUtil.dpToPx(requireContext(), 18)).setTopRightCorner(CornerFamily.ROUNDED, ViewUtil.dpToPx(requireContext(), 18)).build();<NEW_LINE>MaterialShapeDrawable dialogBackground = new MaterialShapeDrawable(shapeAppearanceModel);<NEW_LINE>dialogBackground.setTint(ContextCompat.getColor(requireContext(), R.color.react_with_any_background));<NEW_LINE>dialog.getBehavior().addBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStateChanged(@NonNull View bottomSheet, int newState) {<NEW_LINE>if (bottomSheet.getBackground() != dialogBackground) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSlide(@NonNull View bottomSheet, float slideOffset) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>boolean shadows = requireArguments().getBoolean(ARG_SHADOWS, true);<NEW_LINE>if (!shadows) {<NEW_LINE>Window window = dialog.getWindow();<NEW_LINE>if (window != null) {<NEW_LINE>window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return dialog;<NEW_LINE>}
ViewCompat.setBackground(bottomSheet, dialogBackground);
61,795
private Mono<Response<Flux<ByteBuffer>>> deleteGremlinGraphWithResponseAsync(String resourceGroupName, String accountName, String databaseName, String graphName, 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 (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (accountName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (databaseName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (graphName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter graphName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.deleteGremlinGraph(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, databaseName, graphName, this.<MASK><NEW_LINE>}
client.getApiVersion(), context);
565,692
public Response execute(SubmitContext submitContext, Request request, long timeStarted) throws Exception {<NEW_LINE>Session queueSession = null;<NEW_LINE>JMSConnectionHolder jmsConnectionHolder = null;<NEW_LINE>try {<NEW_LINE>init(submitContext, request);<NEW_LINE>jmsConnectionHolder = new JMSConnectionHolder(jmsEndpoint, hermes, false, clientID, username, password);<NEW_LINE>// session<NEW_LINE>queueSession = jmsConnectionHolder.getSession();<NEW_LINE>// destination<NEW_LINE>Queue queue = jmsConnectionHolder.getQueue(jmsConnectionHolder.getJmsEndpoint().getReceive());<NEW_LINE>// consumer<NEW_LINE>MessageConsumer messageConsumer = queueSession.createConsumer(queue, submitContext.expand(messageSelector));<NEW_LINE>return makeResponse(submitContext, <MASK><NEW_LINE>} catch (JMSException jmse) {<NEW_LINE>return errorResponse(submitContext, request, timeStarted, jmse);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>SoapUI.logError(t);<NEW_LINE>} finally {<NEW_LINE>if (jmsConnectionHolder != null) {<NEW_LINE>jmsConnectionHolder.closeAll();<NEW_LINE>}<NEW_LINE>closeSessionAndConnection(jmsConnectionHolder != null ? jmsConnectionHolder.getConnection() : null, queueSession);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
request, timeStarted, null, messageConsumer);
1,516,123
public InnerLiteral extractInnerLiteral() {<NEW_LINE>assert properties.hasInnerLiteral();<NEW_LINE>int literalEnd = properties.getInnerLiteralEnd();<NEW_LINE><MASK><NEW_LINE>AbstractStringBuffer literal = getEncoding().createStringBuffer(literalEnd - literalStart);<NEW_LINE>AbstractStringBuffer mask = getEncoding().createStringBuffer(literalEnd - literalStart);<NEW_LINE>boolean hasMask = false;<NEW_LINE>for (int i = literalStart; i < literalEnd; i++) {<NEW_LINE>CharacterClass cc = root.getFirstAlternative().getTerms().get(i).asCharacterClass();<NEW_LINE>assert cc.getCharSet().matchesSingleChar() || cc.getCharSet().matches2CharsWith1BitDifference();<NEW_LINE>assert getEncoding().isFixedCodePointWidth(cc.getCharSet());<NEW_LINE>cc.extractSingleChar(literal, mask);<NEW_LINE>hasMask |= cc.getCharSet().matches2CharsWith1BitDifference();<NEW_LINE>}<NEW_LINE>return new InnerLiteral(literal.materialize(), hasMask ? mask.materialize() : null, root.getFirstAlternative().get(literalStart).getMaxPath() - 1);<NEW_LINE>}
int literalStart = properties.getInnerLiteralStart();
853,209
final DeleteQuickConnectResult executeDeleteQuickConnect(DeleteQuickConnectRequest deleteQuickConnectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteQuickConnectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteQuickConnectRequest> request = null;<NEW_LINE>Response<DeleteQuickConnectResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteQuickConnectRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteQuickConnectRequest));<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, "Connect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteQuickConnect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteQuickConnectResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteQuickConnectResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
470,155
private ExecutionResults runJREUninstallerWindows(Progress progress, File location) throws UninstallationException {<NEW_LINE>ExecutionResults results = null;<NEW_LINE>try {<NEW_LINE>String id = getInstallationID(location);<NEW_LINE>if (id != null) {<NEW_LINE>LogManager.log("... uninstall ID : " + id);<NEW_LINE><MASK><NEW_LINE>final String[] commands;<NEW_LINE>if (logFile != null) {<NEW_LINE>commands = new String[] { "msiexec.exe", "/qn", "/x", id, "/log", logFile.getAbsolutePath() };<NEW_LINE>} else {<NEW_LINE>commands = new String[] { "msiexec.exe", "/qn", "/x", id };<NEW_LINE>}<NEW_LINE>progress.setDetail(PROGRESS_DETAIL_RUNNING_JRE_UNINSTALLER);<NEW_LINE>ProgressThread progressThread = new ProgressThread(progress, new File[] { location }, -1 * FileUtils.getSize(location));<NEW_LINE>try {<NEW_LINE>progressThread.start();<NEW_LINE>return SystemUtils.executeCommand(commands);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new UninstallationException(ResourceUtils.getString(ConfigurationLogic.class, ERROR_UNINSTALL_JRE_ERROR_KEY), e);<NEW_LINE>} finally {<NEW_LINE>progressThread.finish();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LogManager.log("... cannot fing JRE in the uninstall section");<NEW_LINE>}<NEW_LINE>} catch (NativeException e) {<NEW_LINE>throw new UninstallationException(ERROR_UNINSTALL_JDK_ERROR_KEY, e);<NEW_LINE>} finally {<NEW_LINE>progress.setPercentage(progress.COMPLETE);<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
final File logFile = getLog("jre_uninstall");
102,021
public static Map readUiConfig() {<NEW_LINE>File file = new File(confPath);<NEW_LINE>// check whether ui config is update, if not , skip reload config<NEW_LINE>if (!isFileModified(file)) {<NEW_LINE>return uiConfig;<NEW_LINE>}<NEW_LINE>// reload config<NEW_LINE>Map ret = Utils.readStormConfig();<NEW_LINE>ret.remove(Config.STORM_ZOOKEEPER_ROOT);<NEW_LINE>ret.remove(Config.STORM_ZOOKEEPER_SERVERS);<NEW_LINE>ret.remove("cluster.name");<NEW_LINE>if (file.exists()) {<NEW_LINE>FileInputStream fileStream;<NEW_LINE>try {<NEW_LINE>fileStream = new FileInputStream(file);<NEW_LINE>Yaml yaml = new Yaml();<NEW_LINE>Map clientConf = (<MASK><NEW_LINE>if (clientConf != null) {<NEW_LINE>ret.putAll(clientConf);<NEW_LINE>}<NEW_LINE>} catch (FileNotFoundException e) {<NEW_LINE>}<NEW_LINE>if (!ret.containsKey(Config.NIMBUS_HOST)) {<NEW_LINE>ret.put(Config.NIMBUS_HOST, "localhost");<NEW_LINE>}<NEW_LINE>uiConfig = ret;<NEW_LINE>isInitialized = false;<NEW_LINE>// flush cluster config<NEW_LINE>flushClusterConfig();<NEW_LINE>// flush cluster cache<NEW_LINE>flushClusterCache();<NEW_LINE>} else {<NEW_LINE>LOG.error("can not find UI configuration file: {}", confPath);<NEW_LINE>}<NEW_LINE>return uiConfig;<NEW_LINE>}
Map) yaml.load(fileStream);
11,661
public static void main(String[] args) throws InterruptedException {<NEW_LINE>FSTOrderedConcurrentJobExecutor jex = new FSTOrderedConcurrentJobExecutor(8);<NEW_LINE>final long sumtim = System.currentTimeMillis();<NEW_LINE>for (int i = 0; i < 4; i++) {<NEW_LINE>final int finalI = i;<NEW_LINE>FSTRunnable job = new FSTRunnable() {<NEW_LINE><NEW_LINE>int count = finalI;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void runConcurrent() {<NEW_LINE>long tim = System.currentTimeMillis();<NEW_LINE>for (int j = 0; j < 99999999; j++) {<NEW_LINE>String s = "asdipo" + j + "oij";<NEW_LINE>int idx = s.indexOf("oij");<NEW_LINE>for (int k = 0; k < 1; k++) {<NEW_LINE>String ss = "asdipo" + k + "oij";<NEW_LINE>idx = s.indexOf("oij");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println("tim " + count + " " + (System<MASK><NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void runInOrder() {<NEW_LINE>System.out.println(finalI);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>jex.addCall(job);<NEW_LINE>}<NEW_LINE>jex.waitForFinish();<NEW_LINE>System.out.println("all time " + (System.currentTimeMillis() - sumtim));<NEW_LINE>}
.currentTimeMillis() - tim));
1,391,216
public ConfirmSignUpResult confirmSignUp(ConfirmSignUpRequest confirmSignUpRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(confirmSignUpRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ConfirmSignUpRequest> request = null;<NEW_LINE>Response<ConfirmSignUpResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ConfirmSignUpRequestMarshaller().marshall(confirmSignUpRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Unmarshaller<ConfirmSignUpResult, JsonUnmarshallerContext> unmarshaller = new ConfirmSignUpResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<ConfirmSignUpResult> responseHandler = new JsonResponseHandler<ConfirmSignUpResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
949,093
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>targetsButton = new javax.swing.JButton();<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(targetsButton, org.openide.util.NbBundle.getMessage(GenericElementPanel.class, "LBL_SignEncrypt"));<NEW_LINE>targetsButton.addActionListener(new java.awt.event.ActionListener() {<NEW_LINE><NEW_LINE>public void actionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>targetsButtonActionPerformed(evt);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);<NEW_LINE>this.setLayout(layout);<NEW_LINE>layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(targetsButton).addContainerGap(<MASK><NEW_LINE>layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(targetsButton).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));<NEW_LINE>}
156, Short.MAX_VALUE)));
315,730
private void handle(APIUpdateLoadBalancerListenerMsg msg) {<NEW_LINE>thdf.chainSubmit(new ChainTask(msg) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String getSyncSignature() {<NEW_LINE>return getSyncId();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(SyncTaskChain chain) {<NEW_LINE>APIUpdateLoadBalancerListenerEvent evt = new <MASK><NEW_LINE>LoadBalancerListenerVO lblVo = dbf.findByUuid(msg.getUuid(), LoadBalancerListenerVO.class);<NEW_LINE>boolean update = false;<NEW_LINE>if (msg.getName() != null) {<NEW_LINE>lblVo.setName(msg.getName());<NEW_LINE>update = true;<NEW_LINE>}<NEW_LINE>if (msg.getDescription() != null) {<NEW_LINE>lblVo.setDescription(msg.getDescription());<NEW_LINE>update = true;<NEW_LINE>}<NEW_LINE>if (update) {<NEW_LINE>dbf.update(lblVo);<NEW_LINE>}<NEW_LINE>evt.setInventory(LoadBalancerListenerInventory.valueOf(lblVo));<NEW_LINE>bus.publish(evt);<NEW_LINE>chain.next();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String getName() {<NEW_LINE>return "update-lb-listener";<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
APIUpdateLoadBalancerListenerEvent(msg.getId());
1,493,330
public static DropGlobalIndexBuilder createBuilder(final String schemaName, final String primaryTableName, final String indexName, ExecutionContext executionContext) {<NEW_LINE>ReplaceTableNameWithQuestionMarkVisitor visitor = new ReplaceTableNameWithQuestionMarkVisitor(schemaName, executionContext);<NEW_LINE>final String dropIndexSql = "DROP INDEX " + SqlIdentifier.surroundWithBacktick(indexName) + " ON " + SqlIdentifier.surroundWithBacktick(schemaName) + "." + SqlIdentifier.surroundWithBacktick(primaryTableName);<NEW_LINE>SqlDropIndex sqlDropIndex = SqlDdlNodes.dropIndex(new SqlIdentifier(indexName, SqlParserPos.ZERO), new SqlIdentifier(primaryTableName, SqlParserPos.ZERO), dropIndexSql, SqlParserPos.ZERO);<NEW_LINE>sqlDropIndex = (SqlDropIndex) sqlDropIndex.accept(visitor);<NEW_LINE>final RelOptCluster cluster = SqlConverter.getInstance(executionContext).createRelOptCluster(null);<NEW_LINE>DropIndex dropIndex = DropIndex.create(cluster, sqlDropIndex, new SqlIdentifier(primaryTableName, SqlParserPos.ZERO));<NEW_LINE>DropGlobalIndexPreparedData preparedData = new DropGlobalIndexPreparedData(schemaName, primaryTableName, indexName, false);<NEW_LINE>return new <MASK><NEW_LINE>}
DropGlobalIndexBuilder(dropIndex, preparedData, executionContext);
1,753,954
public static Geometry makeAtlasBatch(Spatial spat, AssetManager mgr, int atlasSize) {<NEW_LINE>List<Geometry> geometries = new ArrayList<>();<NEW_LINE>GeometryBatchFactory.gatherGeoms(spat, geometries);<NEW_LINE>TextureAtlas atlas = createAtlas(spat, atlasSize);<NEW_LINE>if (atlas == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Geometry geom = new Geometry();<NEW_LINE>Mesh mesh = new Mesh();<NEW_LINE><MASK><NEW_LINE>applyAtlasCoords(geometries, mesh, atlas);<NEW_LINE>mesh.updateCounts();<NEW_LINE>mesh.updateBound();<NEW_LINE>geom.setMesh(mesh);<NEW_LINE>Material mat = new Material(mgr, "Common/MatDefs/Light/Lighting.j3md");<NEW_LINE>Texture diffuseMap = atlas.getAtlasTexture("DiffuseMap");<NEW_LINE>Texture normalMap = atlas.getAtlasTexture("NormalMap");<NEW_LINE>Texture specularMap = atlas.getAtlasTexture("SpecularMap");<NEW_LINE>if (diffuseMap != null) {<NEW_LINE>mat.setTexture("DiffuseMap", diffuseMap);<NEW_LINE>}<NEW_LINE>if (normalMap != null) {<NEW_LINE>mat.setTexture("NormalMap", normalMap);<NEW_LINE>}<NEW_LINE>if (specularMap != null) {<NEW_LINE>mat.setTexture("SpecularMap", specularMap);<NEW_LINE>}<NEW_LINE>mat.setFloat("Shininess", 16.0f);<NEW_LINE>geom.setMaterial(mat);<NEW_LINE>return geom;<NEW_LINE>}
GeometryBatchFactory.mergeGeometries(geometries, mesh);
1,571,149
public void createBindings() {<NEW_LINE>AbstractMachine machine = (AbstractMachine) Configuration.get().getMachine();<NEW_LINE>DoubleConverter doubleConverter = new DoubleConverter(Configuration.get().getLengthDisplayFormat());<NEW_LINE>LengthConverter lengthConverter = new LengthConverter();<NEW_LINE>NamedConverter<Axis> axisConverter = new NamedConverter<>(machine.getAxes());<NEW_LINE>if (referenceCamera.getHead() == null) {<NEW_LINE>// fixed camera<NEW_LINE>MutableLocationProxy headOffsets = new MutableLocationProxy();<NEW_LINE>bind(UpdateStrategy.READ_WRITE, referenceCamera, "headOffsets", headOffsets, "location");<NEW_LINE>addWrappedBinding(headOffsets, "lengthX", textFieldLocationX, "text", lengthConverter);<NEW_LINE>addWrappedBinding(headOffsets, "lengthY", textFieldLocationY, "text", lengthConverter);<NEW_LINE>addWrappedBinding(headOffsets, "lengthZ", textFieldLocationZ, "text", lengthConverter);<NEW_LINE>addWrappedBinding(headOffsets, "rotation", textFieldLocationRotation, "text", doubleConverter);<NEW_LINE>} else {<NEW_LINE>// moving camera<NEW_LINE>addWrappedBinding(referenceCamera, "axisX", axisX, "selectedItem", axisConverter);<NEW_LINE>addWrappedBinding(referenceCamera, "axisY", axisY, "selectedItem", axisConverter);<NEW_LINE>addWrappedBinding(referenceCamera, <MASK><NEW_LINE>addWrappedBinding(referenceCamera, "axisRotation", axisRotation, "selectedItem", axisConverter);<NEW_LINE>MutableLocationProxy headOffsets = new MutableLocationProxy();<NEW_LINE>bind(UpdateStrategy.READ_WRITE, referenceCamera, "headOffsets", headOffsets, "location");<NEW_LINE>addWrappedBinding(headOffsets, "lengthX", textFieldOffX, "text", lengthConverter);<NEW_LINE>addWrappedBinding(headOffsets, "lengthY", textFieldOffY, "text", lengthConverter);<NEW_LINE>addWrappedBinding(headOffsets, "lengthZ", textFieldOffZ, "text", lengthConverter);<NEW_LINE>addWrappedBinding(headOffsets, "rotation", textFieldOffRotation, "text", doubleConverter);<NEW_LINE>addWrappedBinding(referenceCamera, "safeZ", textFieldSafeZ, "text", lengthConverter);<NEW_LINE>}<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldOffX);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldOffY);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldOffZ);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldOffRotation);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldLocationX);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldLocationY);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldLocationZ);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldLocationRotation);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldSafeZ);<NEW_LINE>}
"axisZ", axisZ, "selectedItem", axisConverter);
639,691
public void onServiceConnected(ComponentName name, final IBinder service) {<NEW_LINE>Thread bindThread = new Thread(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>final boolean cameraStartSucess = RTABMapLib.startCamera(nativeApplication, service, getApplicationContext(), getActivity(), mCameraDriver);<NEW_LINE>runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>mProgressDialog.dismiss();<NEW_LINE>if (!cameraStartSucess) {<NEW_LINE>mToast.makeText(getApplicationContext(), String.format("Failed to intialize Tango camera! RTAB-Map may not be built with Tango support."), mToast.LENGTH_LONG).show();<NEW_LINE>if (mCameraServiceConnectionUsed) {<NEW_LINE>if (!DISABLE_LOG)<NEW_LINE>Log.i(TAG, String.format("unbindService"));<NEW_LINE>getActivity().unbindService(mCameraServiceConnection);<NEW_LINE>}<NEW_LINE>mCameraServiceConnectionUsed = false;<NEW_LINE>} else {<NEW_LINE>updateState(mState == State.STATE_VISUALIZING ? <MASK><NEW_LINE>if (mState == State.STATE_VISUALIZING_CAMERA && mItemLocalizationMode.isChecked()) {<NEW_LINE>RTABMapLib.setPausedMapping(nativeApplication, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>});<NEW_LINE>bindThread.start();<NEW_LINE>}
State.STATE_VISUALIZING_CAMERA : State.STATE_CAMERA);
706,428
/*<NEW_LINE>* @param password The incoming password.<NEW_LINE>* @param encryptedPassword The stored password digest.<NEW_LINE>* @return true if the password matches, false otherwise.<NEW_LINE>* @throws NoSuchAlgorithmException encryption exceptions.<NEW_LINE>* @throws InvalidKeySpecException encryption exceptions.<NEW_LINE>*/<NEW_LINE>public boolean checkPassword(char[] password, String encryptedPassword) throws NoSuchAlgorithmException, InvalidKeySpecException {<NEW_LINE>String storedPassword = new String(fromHex(encryptedPassword));<NEW_LINE>String[] parts = storedPassword.split(":");<NEW_LINE>int iterations = Integer.parseInt(parts[0]);<NEW_LINE>byte[] salt = fromHex(parts[1]);<NEW_LINE>byte[] hash <MASK><NEW_LINE>PBEKeySpec spec = new PBEKeySpec(password, salt, iterations, keyLength);<NEW_LINE>SecretKeyFactory skf = SecretKeyFactory.getInstance(keyAlgorythm);<NEW_LINE>byte[] testHash = skf.generateSecret(spec).getEncoded();<NEW_LINE>// This is time independent version of array comparison.<NEW_LINE>// This is done to ensure that time based attacks do not happen.<NEW_LINE>// Read more here for time based attacks in this context.<NEW_LINE>// https://security.stackexchange.com/questions/74547/timing-attack-against-hmac-in-authenticated-encryption<NEW_LINE>int diff = hash.length ^ testHash.length;<NEW_LINE>for (int i = 0; i < hash.length && i < testHash.length; i++) {<NEW_LINE>diff |= hash[i] ^ testHash[i];<NEW_LINE>}<NEW_LINE>return diff == 0;<NEW_LINE>}
= fromHex(parts[2]);
453,022
public static Optional<Add> create(String statement) {<NEW_LINE>Matcher argumentMatcher = ARGUMENT_TOKENIZER.matcher(statement.trim());<NEW_LINE>if (!argumentMatcher.find()) {<NEW_LINE>return Optional.absent();<NEW_LINE>}<NEW_LINE>String commandName = argumentMatcher.group();<NEW_LINE>if (!(StringUtils.equals(commandName, "ADD") || StringUtils.equals(commandName, "COPY"))) {<NEW_LINE>return Optional.absent();<NEW_LINE>}<NEW_LINE>String lastToken = null;<NEW_LINE>Collection<String> <MASK><NEW_LINE>while (argumentMatcher.find()) {<NEW_LINE>if (lastToken != null) {<NEW_LINE>sources.add(lastToken);<NEW_LINE>}<NEW_LINE>lastToken = argumentMatcher.group().replaceAll("(^\")|(\"$)", "");<NEW_LINE>}<NEW_LINE>if (sources.isEmpty()) {<NEW_LINE>throw new DockerClientException("Wrong ADD or COPY format");<NEW_LINE>}<NEW_LINE>return Optional.of(new Add(sources, lastToken));<NEW_LINE>}
sources = new ArrayList<>();
1,550,863
public Composite createContents(IFormatterControlManager manager, Composite parent) {<NEW_LINE>final int numColumns = 4;<NEW_LINE>if (fPixelConverter == null) {<NEW_LINE>fPixelConverter = new PixelConverter(parent);<NEW_LINE>}<NEW_LINE>final SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL);<NEW_LINE>sashForm.setFont(parent.getFont());<NEW_LINE>Composite scrollContainer = new Composite(sashForm, SWT.NONE);<NEW_LINE>GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);<NEW_LINE>scrollContainer.setLayoutData(gridData);<NEW_LINE>scrollContainer.setFont(sashForm.getFont());<NEW_LINE>GridLayout layout = new GridLayout(2, false);<NEW_LINE>layout.marginHeight = 0;<NEW_LINE>layout.marginWidth = 0;<NEW_LINE>layout.horizontalSpacing = 0;<NEW_LINE>layout.verticalSpacing = 0;<NEW_LINE>scrollContainer.setLayout(layout);<NEW_LINE>ScrolledPageContent scroll = new ScrolledPageContent(scrollContainer, SWT.V_SCROLL | SWT.H_SCROLL);<NEW_LINE>scroll.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));<NEW_LINE>final Composite settingsContainer = scroll.getBody();<NEW_LINE>settingsContainer.setLayout(new PageLayout(scroll, 400, 400));<NEW_LINE>settingsContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));<NEW_LINE>Composite settingsPane = new Composite(settingsContainer, SWT.NONE);<NEW_LINE>settingsPane.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));<NEW_LINE>layout = new GridLayout(1, false);<NEW_LINE>layout.verticalSpacing = (int) (1.5 * fPixelConverter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING));<NEW_LINE>layout.horizontalSpacing = fPixelConverter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);<NEW_LINE>layout.marginHeight = fPixelConverter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);<NEW_LINE>layout.marginWidth = fPixelConverter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);<NEW_LINE>settingsPane.setLayout(layout);<NEW_LINE>createOptions(manager, settingsPane);<NEW_LINE>settingsContainer.setSize(settingsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));<NEW_LINE>Label sashHandle = new Label(scrollContainer, SWT.SEPARATOR | SWT.VERTICAL);<NEW_LINE>gridData = new GridData(SWT.RIGHT, SWT.FILL, false, true);<NEW_LINE>sashHandle.setLayoutData(gridData);<NEW_LINE>final Composite previewPane = new <MASK><NEW_LINE>previewPane.setLayout(createGridLayout(numColumns, true));<NEW_LINE>previewPane.setFont(sashForm.getFont());<NEW_LINE>doCreatePreviewPane(previewPane, numColumns);<NEW_LINE>sashForm.setWeights(new int[] { 3, 3 });<NEW_LINE>return sashForm;<NEW_LINE>}
Composite(sashForm, SWT.NONE);
956,713
public void playAll(final Activity context, final long[] list, int position, final long sourceId, final TimberUtils.IdType sourceType, final boolean forceShuffle, final Song currentSong, boolean navigateNowPlaying) {<NEW_LINE>if (context instanceof BaseActivity) {<NEW_LINE>CastSession castSession = ((BaseActivity) context).getCastSession();<NEW_LINE>if (castSession != null) {<NEW_LINE>navigateNowPlaying = false;<NEW_LINE>TimberCastHelper.startCasting(castSession, currentSong);<NEW_LINE>} else {<NEW_LINE>MusicPlayer.playAll(context, list, position, -1, <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>MusicPlayer.playAll(context, list, position, -1, TimberUtils.IdType.NA, false);<NEW_LINE>}<NEW_LINE>if (navigateNowPlaying) {<NEW_LINE>NavigationUtils.navigateToNowplaying(context, true);<NEW_LINE>}<NEW_LINE>}
TimberUtils.IdType.NA, false);
1,635,365
protected InternalCompletableFuture<Data> putIfAbsentAsyncInternal(Object key, Data valueData, long ttl, TimeUnit ttlUnit, long maxIdle, TimeUnit maxIdleUnit) {<NEW_LINE>key = toNearCacheKeyWithStrategy(key);<NEW_LINE>try {<NEW_LINE>return super.putIfAbsentAsyncInternal(key, valueData, <MASK><NEW_LINE>} finally {<NEW_LINE>// If the operation is retried, the return value can be wrong.<NEW_LINE>// Consider: key k isn't present. We do putIfAbsent(k, v). The operation puts the value, updates<NEW_LINE>// the backup, but before the response is sent, the member crashes. The caller doesn't receive the response,<NEW_LINE>// so retries with the new key owner. This time, the operation does nothing because the key isn't absent,<NEW_LINE>// and returns the old value.<NEW_LINE>// The unnecessary invalidation doesn't hurt as much as non-invalidated near cache would.<NEW_LINE>invalidateNearCache(key);<NEW_LINE>}<NEW_LINE>}
ttl, ttlUnit, maxIdle, maxIdleUnit);
1,558,557
private String formatSamlString(String saml) {<NEW_LINE>// TODO Auto-generated method stub<NEW_LINE>String samlString = saml;<NEW_LINE>// String line_separator = System.getProperty("line.separator");<NEW_LINE>if (saml != null) {<NEW_LINE>// On Mac and Sun JDK, we see that these two lines are separated by new line<NEW_LINE>// <?xml version="1.0" encoding="UTF-8"?><NEW_LINE>// <saml:Assertion ID="Assertion-uuid425e1163-0153-1711-9985-95bb9b289022" IssueInstant=......<NEW_LINE>String[] <MASK><NEW_LINE>if (lines.length == 2 && lines[0].startsWith("<?") && lines[0].endsWith("?>")) {<NEW_LINE>samlString = lines[0].concat(lines[1]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return samlString;<NEW_LINE>}
lines = saml.split("\r\n|\r|\n");
1,297,351
protected void encodeHeader(FacesContext context, Panel panel, Menu optionsMenu) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>UIComponent header = panel.getFacet("header");<NEW_LINE>String headerText = panel.getHeader();<NEW_LINE>String clientId = panel.getClientId(context);<NEW_LINE>boolean shouldRenderFacet = ComponentUtils.shouldRenderFacet(header, panel.isRenderEmptyFacets());<NEW_LINE>if (headerText == null && !shouldRenderFacet) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.writeAttribute("id", panel.getClientId(context) + "_header", null);<NEW_LINE>writer.writeAttribute("class", Panel.PANEL_TITLEBAR_CLASS, null);<NEW_LINE>// Title<NEW_LINE>writer.startElement("span", null);<NEW_LINE>writer.writeAttribute("class", Panel.PANEL_TITLE_CLASS, null);<NEW_LINE>if (shouldRenderFacet) {<NEW_LINE>renderChild(context, header);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>writer.endElement("span");<NEW_LINE>// Options<NEW_LINE>if (panel.isClosable()) {<NEW_LINE>encodeIcon(context, panel, "ui-icon-closethick", clientId + "_closer", panel.getCloseTitle(), MessageFactory.getMessage(Panel.ARIA_CLOSE));<NEW_LINE>}<NEW_LINE>if (panel.isToggleable()) {<NEW_LINE>String icon = panel.isCollapsed() ? "ui-icon-plusthick" : "ui-icon-minusthick";<NEW_LINE>encodeIcon(context, panel, icon, clientId + "_toggler", panel.getToggleTitle(), MessageFactory.getMessage(Panel.ARIA_TOGGLE));<NEW_LINE>}<NEW_LINE>if (optionsMenu != null) {<NEW_LINE>encodeIcon(context, panel, "ui-icon-gear", clientId + "_menu", panel.getMenuTitle(), MessageFactory.getMessage(Panel.ARIA_OPTIONS_MENU));<NEW_LINE>}<NEW_LINE>// Actions<NEW_LINE>UIComponent actionsFacet = panel.getFacet("actions");<NEW_LINE>if (ComponentUtils.shouldRenderFacet(actionsFacet)) {<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.writeAttribute("class", Panel.PANEL_ACTIONS_CLASS, null);<NEW_LINE>actionsFacet.encodeAll(context);<NEW_LINE>writer.endElement("div");<NEW_LINE>}<NEW_LINE>writer.endElement("div");<NEW_LINE>}
writer.writeText(headerText, null);
1,234,611
public boolean onMapClick(@NonNull LatLng point) {<NEW_LINE>PointF pointf = mapboxMap.getProjection().toScreenLocation(point);<NEW_LINE>RectF rectF = new RectF(pointf.x - 10, pointf.y - 10, pointf.x + 10, pointf.y + 10);<NEW_LINE>Feature feature = firstFeatureOnLayers(rectF);<NEW_LINE>final Map<String, Object> arguments = new HashMap<>();<NEW_LINE>arguments.put("x", pointf.x);<NEW_LINE>arguments.put("y", pointf.y);<NEW_LINE>arguments.put("lng", point.getLongitude());<NEW_LINE>arguments.put(<MASK><NEW_LINE>if (feature != null) {<NEW_LINE>arguments.put("id", feature.id());<NEW_LINE>methodChannel.invokeMethod("feature#onTap", arguments);<NEW_LINE>} else {<NEW_LINE>methodChannel.invokeMethod("map#onMapClick", arguments);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
"lat", point.getLatitude());
1,827,479
public IpV4Option newInstance(byte[] rawData, int offset, int length, Class<? extends IpV4Option> dataClass) {<NEW_LINE>if (rawData == null || dataClass == null) {<NEW_LINE>StringBuilder sb = new StringBuilder(50);<NEW_LINE>sb.append("rawData: ").append(rawData).append(" dataClass: ").append(dataClass);<NEW_LINE>throw new NullPointerException(sb.toString());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Method newInstance = dataClass.getMethod("newInstance", byte[].class, <MASK><NEW_LINE>return (IpV4Option) newInstance.invoke(null, rawData, offset, length);<NEW_LINE>} catch (SecurityException e) {<NEW_LINE>throw new IllegalStateException(e);<NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>throw new IllegalStateException(e);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new IllegalStateException(e);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>throw new IllegalStateException(e);<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>if (e.getTargetException() instanceof IllegalRawDataException) {<NEW_LINE>return IllegalIpV4Option.newInstance(rawData, offset, length);<NEW_LINE>}<NEW_LINE>throw new IllegalArgumentException(e);<NEW_LINE>}<NEW_LINE>}
int.class, int.class);
1,675,962
/*<NEW_LINE>* Remembers all type bindings defined in the given parsed unit, adding local/anonymous types if specified.<NEW_LINE>*/<NEW_LINE>private void rememberAllTypes(CompilationUnitDeclaration parsedUnit, org.eclipse.jdt.core.ICompilationUnit cu, boolean includeLocalTypes) {<NEW_LINE><MASK><NEW_LINE>if (types != null) {<NEW_LINE>for (TypeDeclaration type : types) {<NEW_LINE>rememberWithMemberTypes(type, cu.getType(String.valueOf(type.name)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!includeLocalTypes || (parsedUnit.localTypes.isEmpty() && parsedUnit.functionalExpressions == null))<NEW_LINE>return;<NEW_LINE>HandleFactory factory = new HandleFactory();<NEW_LINE>HashSet existingElements = new HashSet(parsedUnit.localTypes.size() + parsedUnit.functionalExpressionsCount);<NEW_LINE>HashMap knownScopes = new HashMap(parsedUnit.localTypes.size() + parsedUnit.functionalExpressionsCount);<NEW_LINE>for (LocalTypeBinding localType : parsedUnit.localTypes.values()) {<NEW_LINE>ClassScope classScope = localType.scope;<NEW_LINE>TypeDeclaration typeDecl = classScope.referenceType();<NEW_LINE>IType typeHandle = (IType) factory.createElement(classScope, cu, existingElements, knownScopes);<NEW_LINE>rememberWithMemberTypes(typeDecl, typeHandle);<NEW_LINE>}<NEW_LINE>if (parsedUnit.functionalExpressions != null) {<NEW_LINE>for (int i = 0; i < parsedUnit.functionalExpressionsCount; i += 1) {<NEW_LINE>if (parsedUnit.functionalExpressions[i] instanceof LambdaExpression) {<NEW_LINE>final LambdaExpression expression = (LambdaExpression) parsedUnit.functionalExpressions[i];<NEW_LINE>if (expression.resolvedType != null && expression.resolvedType.isValidBinding()) {<NEW_LINE>IType typeHandle = (IType) factory.createLambdaTypeElement(expression, cu, existingElements, knownScopes);<NEW_LINE>remember(typeHandle, expression.getTypeBinding());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
TypeDeclaration[] types = parsedUnit.types;
812,534
public void execute(String commandName, ConsoleInput ci, CommandLine commands) {<NEW_LINE>if (commands.hasOption('l')) {<NEW_LINE><MASK><NEW_LINE>showAdds(ci);<NEW_LINE>ci.out.println("> -----");<NEW_LINE>return;<NEW_LINE>} else if (commands.hasOption('h') || commands.getArgs().length == 0) {<NEW_LINE>printHelp(ci.out, (String) null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String outputDir = ".";<NEW_LINE>if (commands.hasOption('o'))<NEW_LINE>outputDir = commands.getOptionValue('o');<NEW_LINE>else<NEW_LINE>outputDir = ci.getDefaultSaveDirectory();<NEW_LINE>File f = new File(outputDir);<NEW_LINE>if (!f.isAbsolute()) {<NEW_LINE>// make it relative to current directory<NEW_LINE>try {<NEW_LINE>outputDir = new File(".", outputDir).getCanonicalPath();<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new CoreException("exception occurred while converting directory: ./" + outputDir + " to its canonical path");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean scansubdir = commands.hasOption('r');<NEW_LINE>boolean finding = commands.hasOption('f');<NEW_LINE>String[] whatelse = commands.getArgs();<NEW_LINE>for (int i = 0; i < whatelse.length; i++) {<NEW_LINE>String arg = whatelse[i];<NEW_LINE>try {<NEW_LINE>// firstly check if it is a valid URL<NEW_LINE>new URL(arg);<NEW_LINE>addRemote(ci, arg, outputDir);<NEW_LINE>} catch (MalformedURLException e) {<NEW_LINE>// assume that it's a local file or file id from a previous find<NEW_LINE>addLocal(ci, arg, outputDir, scansubdir, finding);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ci.out.println("> -----");
747,607
public static void main(String[] args) throws Exception {<NEW_LINE>String author = args.length == <MASK><NEW_LINE>// Connect to the sever<NEW_LINE>ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", PORT).usePlaintext().build();<NEW_LINE>RxChatGrpc.RxChatStub stub = RxChatGrpc.newRxStub(channel);<NEW_LINE>CountDownLatch done = new CountDownLatch(1);<NEW_LINE>ConsoleReader console = new ConsoleReader();<NEW_LINE>console.println("Type /quit to exit");<NEW_LINE>disposables.add(Single.just(Empty.getDefaultInstance()).as(stub::getMessages).filter(message -> !message.getAuthor().equals(author)).subscribe(message -> printLine(console, message.getAuthor(), message.getMessage())));<NEW_LINE>disposables.add(// Send connection message<NEW_LINE>Observable.just(// Send user input<NEW_LINE>author + " joined.").concatWith(// Send disconnect message<NEW_LINE>Observable.fromIterable(new ConsoleIterator(console, author + " > "))).concatWith(Single.just(author + " left.")).map(msg -> toMessage(author, msg)).flatMapSingle(stub::postMessage).subscribe(ChatClient::doNothing, throwable -> printLine(console, "ERROR", throwable.getMessage()), done::countDown));<NEW_LINE>// Wait for a signal to exit, then clean up<NEW_LINE>done.await();<NEW_LINE>disposables.dispose();<NEW_LINE>channel.shutdown();<NEW_LINE>channel.awaitTermination(1, TimeUnit.SECONDS);<NEW_LINE>console.getTerminal().restore();<NEW_LINE>}
0 ? "Random_Stranger" : args[0];
1,351,473
public static DescribeAccessWhitelistEcsListResponse unmarshall(DescribeAccessWhitelistEcsListResponse describeAccessWhitelistEcsListResponse, UnmarshallerContext context) {<NEW_LINE>describeAccessWhitelistEcsListResponse.setRequestId(context.stringValue("DescribeAccessWhitelistEcsListResponse.RequestId"));<NEW_LINE>describeAccessWhitelistEcsListResponse.setTotalCount<MASK><NEW_LINE>describeAccessWhitelistEcsListResponse.setModule(context.stringValue("DescribeAccessWhitelistEcsListResponse.module"));<NEW_LINE>List<Ecs> ecsList = new ArrayList<Ecs>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeAccessWhitelistEcsListResponse.EcsList.Length"); i++) {<NEW_LINE>Ecs ecs = new Ecs();<NEW_LINE>ecs.setInstanceName(context.stringValue("DescribeAccessWhitelistEcsListResponse.EcsList[" + i + "].InstanceName"));<NEW_LINE>ecs.setInstanceId(context.stringValue("DescribeAccessWhitelistEcsListResponse.EcsList[" + i + "].InstanceId"));<NEW_LINE>ecs.setIP(context.stringValue("DescribeAccessWhitelistEcsListResponse.EcsList[" + i + "].IP"));<NEW_LINE>ecsList.add(ecs);<NEW_LINE>}<NEW_LINE>describeAccessWhitelistEcsListResponse.setEcsList(ecsList);<NEW_LINE>return describeAccessWhitelistEcsListResponse;<NEW_LINE>}
(context.integerValue("DescribeAccessWhitelistEcsListResponse.TotalCount"));
1,456,320
final ReplicationGroup executeDecreaseReplicaCount(DecreaseReplicaCountRequest decreaseReplicaCountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(decreaseReplicaCountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DecreaseReplicaCountRequest> request = null;<NEW_LINE>Response<ReplicationGroup> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DecreaseReplicaCountRequestMarshaller().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, "ElastiCache");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DecreaseReplicaCount");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ReplicationGroup> responseHandler = new StaxResponseHandler<ReplicationGroup>(new ReplicationGroupStaxUnmarshaller());<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(decreaseReplicaCountRequest));
286,029
protected void recordClassUsages(Path file) throws IOException {<NEW_LINE>if (file.toFile().isDirectory()) {<NEW_LINE>File[] children = file.toFile().listFiles();<NEW_LINE>if (children != null) {<NEW_LINE>for (File child : children) {<NEW_LINE>recordClassUsages(child.toPath());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (file.toFile().isFile()) {<NEW_LINE>if (file.toFile().getPath().endsWith(DOT_CLASS)) {<NEW_LINE>byte[] bytes = Files.toByteArray(file.toFile());<NEW_LINE>recordClassUsages(file.toFile(), file.toFile().getName(), bytes);<NEW_LINE>} else if (file.toFile().getPath().endsWith(DOT_JAR)) {<NEW_LINE>ZipInputStream zis = null;<NEW_LINE>try {<NEW_LINE>FileInputStream fis = new FileInputStream(file.toFile());<NEW_LINE>try {<NEW_LINE>zis = new ZipInputStream(fis);<NEW_LINE>ZipEntry entry = zis.getNextEntry();<NEW_LINE>while (entry != null) {<NEW_LINE>String name = entry.getName();<NEW_LINE>if (// Skip resource type classes like R$drawable; they will<NEW_LINE>name.endsWith(DOT_CLASS) && // reference the integer id's we're looking for, but these aren't<NEW_LINE>// actual usages we need to track; if somebody references the<NEW_LINE>// field elsewhere, we'll catch that<NEW_LINE>!isResourceClass(name)) {<NEW_LINE>byte[] <MASK><NEW_LINE>if (bytes != null) {<NEW_LINE>recordClassUsages(file.toFile(), name, bytes);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>entry = zis.getNextEntry();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>Closeables.close(fis, true);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>Closeables.close(zis, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
bytes = ByteStreams.toByteArray(zis);
664,592
private boolean addDownloadRequest() {<NEW_LINE>SingularityS3DownloaderAsyncHandler existingHandler = downloadRequestToHandler.get(artifactDownloadRequest.getS3Artifact());<NEW_LINE>if (existingHandler != null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final SingularityS3DownloaderAsyncHandler newHandler = new SingularityS3DownloaderAsyncHandler(artifactManagerProvider.get(), artifactDownloadRequest, continuation, <MASK><NEW_LINE>existingHandler = downloadRequestToHandler.putIfAbsent(artifactDownloadRequest.getS3Artifact(), newHandler);<NEW_LINE>if (existingHandler != null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>LOG.trace("Queing new downloader for {} ({} handlers, {} active threads, {} queue size, {} max) after {}", artifactDownloadRequest, downloadRequestToHandler.size(), downloadService.getActiveCount(), downloadService.getQueue().size(), configuration.getNumDownloaderThreads(), JavaUtils.duration(start));<NEW_LINE>ListenableFuture<?> future = listeningDownloadWrapper.submit(newHandler);<NEW_LINE>future.addListener(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>notifyDownloadFinished(newHandler);<NEW_LINE>}<NEW_LINE>}, listeningResponseExecutorService);<NEW_LINE>return true;<NEW_LINE>}
metrics, exceptionNotifier, SingularityS3DownloaderCoordinator.this);
239,262
// Called from the handler thread<NEW_LINE>private void doHandleMessage(Message msg) {<NEW_LINE>@Nullable<NEW_LINE>MessageParams params = null;<NEW_LINE>switch(msg.what) {<NEW_LINE>case MSG_QUEUE_INPUT_BUFFER:<NEW_LINE>params = (MessageParams) msg.obj;<NEW_LINE>doQueueInputBuffer(params.index, params.offset, params.size, params.presentationTimeUs, params.flags);<NEW_LINE>break;<NEW_LINE>case MSG_QUEUE_SECURE_INPUT_BUFFER:<NEW_LINE><MASK><NEW_LINE>doQueueSecureInputBuffer(params.index, params.offset, params.cryptoInfo, params.presentationTimeUs, params.flags);<NEW_LINE>break;<NEW_LINE>case MSG_OPEN_CV:<NEW_LINE>conditionVariable.open();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>pendingRuntimeException.compareAndSet(null, new IllegalStateException(String.valueOf(msg.what)));<NEW_LINE>}<NEW_LINE>if (params != null) {<NEW_LINE>recycleMessageParams(params);<NEW_LINE>}<NEW_LINE>}
params = (MessageParams) msg.obj;