idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
302,277
public void build(EstimatePositionRequest request, EstimatePositionResponse response) {<NEW_LINE>String operating_system = request.getOperatingSystem();<NEW_LINE>String buid = request.getBuid();<NEW_LINE>String floor = request.getFloor();<NEW_LINE>String algorithm = request.getAlgorithm();<NEW_LINE>if (operating_system.isEmpty() || buid.isEmpty() || floor.isEmpty() || algorithm.isEmpty()) {<NEW_LINE>response.setSuccess(false);<NEW_LINE>response.setResponse("Service parameters cannot be empty!\n Returning...");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (debug == true) {<NEW_LINE>connectedNode.getLog().info("Got request, with info:\n os: " + operating_system + ",\n buid: " + buid + ",\n floor: " + floor + ",\n algorithm: " + algorithm + "\n");<NEW_LINE>}<NEW_LINE>String[] cmd = new String[3];<NEW_LINE>if (operating_system.equals("linux")) {<NEW_LINE>cmd[0] = "/bin/sh";<NEW_LINE>cmd[1] = "-c";<NEW_LINE>cmd[2] = "sudo iwlist wlo1 scan | awk '/Address/ {print $5}; /level/ {print $3}' | cut -d\"=\" -f2 ";<NEW_LINE>} else if (operating_system.equals("mac")) {<NEW_LINE>cmd[0] = "/bin/sh";<NEW_LINE>cmd[1] = "-c";<NEW_LINE>cmd[2] = "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -s | grep ':' | tr -s ' ' | cut -d' ' -f3 -f4| tr ' ' '\n'";<NEW_LINE>} else {<NEW_LINE>response.setSuccess(false);<NEW_LINE>response.setResponse("Only linux and mac are the available operating systems\n Returning...");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String[] aps = new String[200];<NEW_LINE>Process p;<NEW_LINE>String s, temp;<NEW_LINE>int counter = 0;<NEW_LINE>try {<NEW_LINE>p = Runtime.getRuntime().exec(cmd);<NEW_LINE>BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));<NEW_LINE>while ((s = br.readLine()) != null && counter <= 20) {<NEW_LINE>temp = "{\"bssid\":\"";<NEW_LINE>temp += s;<NEW_LINE>temp += "\",\"rss\":";<NEW_LINE>s = br.readLine();<NEW_LINE>temp += s;<NEW_LINE>temp += "}";<NEW_LINE>temp = temp.toLowerCase();<NEW_LINE>aps[counter++] = temp;<NEW_LINE>}<NEW_LINE>p.destroy();<NEW_LINE>br.close();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>aps = Arrays.copyOf(aps, counter);<NEW_LINE>String anyplace_response = client.estimatePositionOffline(buid, floor, aps, algorithm);<NEW_LINE>connectedNode.getLog(<MASK>
).info(anyplace_response + "\n");
1,413,692
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>personaIDLabel = <MASK><NEW_LINE>viewButton = new javax.swing.JButton();<NEW_LINE>setLayout(new java.awt.GridBagLayout());<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(personaIDLabel, org.openide.util.NbBundle.getMessage(PersonaPanel.class, "PersonaPanel.personaIDLabel.text"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);<NEW_LINE>add(personaIDLabel, gridBagConstraints);<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(viewButton, org.openide.util.NbBundle.getMessage(PersonaPanel.class, "PersonaPanel.viewButton.text"));<NEW_LINE>viewButton.setMargin(new java.awt.Insets(0, 5, 0, 5));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;<NEW_LINE>gridBagConstraints.weightx = 1.0;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);<NEW_LINE>add(viewButton, gridBagConstraints);<NEW_LINE>}
new javax.swing.JLabel();
1,275,338
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setTheme(MainActivity.nightMode ? R.style.AppTheme_Dark : R.style.AppTheme);<NEW_LINE>// set to full screen<NEW_LINE>getWindow().<MASK><NEW_LINE>// keep main display on?<NEW_LINE>if (MainActivity.prefs.getBoolean("keep_screen_on", false)) {<NEW_LINE>getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);<NEW_LINE>}<NEW_LINE>// hide the action bar<NEW_LINE>ActionBar actionBar = getActionBar();<NEW_LINE>if (actionBar != null)<NEW_LINE>actionBar.hide();<NEW_LINE>// prevent activity from falling asleep<NEW_LINE>PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);<NEW_LINE>wakeLock = Objects.requireNonNull(powerManager).newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, getString(R.string.app_name));<NEW_LINE>wakeLock.acquire();<NEW_LINE>// set the desired content screen<NEW_LINE>int resId = getIntent().getIntExtra(RES_ID, R.layout.dashboard);<NEW_LINE>setContentView(resId);<NEW_LINE>grid = findViewById(android.R.id.list);<NEW_LINE>grid.setOnItemLongClickListener(this);<NEW_LINE>// create data adapter<NEW_LINE>adapter = new ObdGaugeAdapter(this, R.layout.obd_gauge);
addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
1,138,074
protected Map<String, Object> defaultPrntOptions(boolean skipDefault) {<NEW_LINE>Map<String, Object> out = new HashMap<>();<NEW_LINE>if (engine != null && !skipDefault && engine.hasVariable(VAR_PRNT_OPTIONS)) {<NEW_LINE>out.putAll((Map<String, Object><MASK><NEW_LINE>out.remove(Printer.SKIP_DEFAULT_OPTIONS);<NEW_LINE>manageBooleanOptions(out);<NEW_LINE>}<NEW_LINE>out.putIfAbsent(Printer.MAXROWS, PRNT_MAX_ROWS);<NEW_LINE>out.putIfAbsent(Printer.MAX_DEPTH, PRNT_MAX_DEPTH);<NEW_LINE>out.putIfAbsent(Printer.INDENTION, PRNT_INDENTION);<NEW_LINE>out.putIfAbsent(Printer.COLUMNS_OUT, new ArrayList<String>());<NEW_LINE>out.putIfAbsent(Printer.COLUMNS_IN, new ArrayList<String>());<NEW_LINE>if (engine == null) {<NEW_LINE>out.remove(Printer.OBJECT_TO_MAP);<NEW_LINE>out.remove(Printer.OBJECT_TO_STRING);<NEW_LINE>out.remove(Printer.HIGHLIGHT_VALUE);<NEW_LINE>}<NEW_LINE>return out;<NEW_LINE>}
) engine.get(VAR_PRNT_OPTIONS));
879,371
public DescribeThingTypeResult describeThingType(DescribeThingTypeRequest describeThingTypeRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeThingTypeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DescribeThingTypeRequest> request = null;<NEW_LINE>Response<DescribeThingTypeResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeThingTypeRequestMarshaller().marshall(describeThingTypeRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<DescribeThingTypeResult, JsonUnmarshallerContext> unmarshaller = new DescribeThingTypeResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<DescribeThingTypeResult> responseHandler = new JsonResponseHandler<DescribeThingTypeResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
118,567
public void removeRelation(InternalRelation relation) {<NEW_LINE>Preconditions.checkArgument(!relation.isRemoved());<NEW_LINE>relation = relation.it();<NEW_LINE>for (int i = 0; i < relation.getLen(); i++) verifyWriteAccess(relation.getVertex(i));<NEW_LINE>// Delete from Vertex<NEW_LINE>for (int i = 0; i < relation.getLen(); i++) {<NEW_LINE>InternalVertex vertex = relation.getVertex(i);<NEW_LINE>vertex.removeRelation(relation);<NEW_LINE>if (!vertex.isNew()) {<NEW_LINE>vertexCache.add(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Update transaction data structures<NEW_LINE>if (relation.isNew()) {<NEW_LINE>addedRelations.remove(relation);<NEW_LINE>if (TypeUtil.hasSimpleInternalVertexKeyIndex(relation))<NEW_LINE>newVertexIndexEntries.remove((JanusGraphVertexProperty) relation);<NEW_LINE>} else {<NEW_LINE>Preconditions.checkArgument(relation.isLoaded());<NEW_LINE>Map<Long, InternalRelation> result = deletedRelations;<NEW_LINE>if (result == EMPTY_DELETED_RELATIONS) {<NEW_LINE>if (config.isSingleThreaded()) {<NEW_LINE>deletedRelations = result = new HashMap<>();<NEW_LINE>} else {<NEW_LINE>synchronized (this) {<NEW_LINE>result = deletedRelations;<NEW_LINE>if (result == EMPTY_DELETED_RELATIONS)<NEW_LINE>deletedRelations = result = new ConcurrentHashMap<>();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.put(relation.longId(), relation);<NEW_LINE>}<NEW_LINE>}
vertex, vertex.longId());
1,079,687
public void layoutContainer(Container parent) {<NEW_LINE>int width = parent.getWidth();<NEW_LINE>int height = parent.getHeight();<NEW_LINE>parentContainer = parent;<NEW_LINE>state.<MASK><NEW_LINE>if (DEBUG) {<NEW_LINE>Utils.log("Current system is:\n" + state.serialize());<NEW_LINE>}<NEW_LINE>for (String id : idsToConstraintWidgets.keySet()) {<NEW_LINE>if (id.equals("parent")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// ask the state to create a widget<NEW_LINE>ConstraintWidget constraintWidget = idsToConstraintWidgets.get(id);<NEW_LINE>if (constraintWidget instanceof Guideline) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (DEBUG) {<NEW_LINE>Utils.log("applying " + id);<NEW_LINE>}<NEW_LINE>state.constraints.apply(idsToConstraintWidgets, constraintWidget);<NEW_LINE>}<NEW_LINE>mLayout.setWidth(width);<NEW_LINE>mLayout.setHeight(height);<NEW_LINE>mLayout.layout();<NEW_LINE>mLayout.setOptimizationLevel(Optimizer.OPTIMIZATION_STANDARD);<NEW_LINE>mLayout.measure(Optimizer.OPTIMIZATION_STANDARD, BasicMeasure.EXACTLY, width, BasicMeasure.EXACTLY, height, 0, 0, 0, 0);<NEW_LINE>for (ConstraintWidget child : mLayout.getChildren()) {<NEW_LINE>Component component = (Component) child.getCompanionWidget();<NEW_LINE>if (component != null) {<NEW_LINE>if (DEBUG) {<NEW_LINE>Utils.log("applying " + child.getWidth() + " " + child.getHeight());<NEW_LINE>}<NEW_LINE>component.setBounds(child.getX(), child.getY(), child.getWidth(), child.getHeight());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
guidelines.apply(mLayout, idsToConstraintWidgets);
324,593
public double skewness() {<NEW_LINE>double mean = mean();<NEW_LINE>double numer = 0, denom = 0;<NEW_LINE>for (int i = 0; i < used; i++) {<NEW_LINE>numer += pow(values[i] - mean, 3);<NEW_LINE>denom += pow(values[i] - mean, 2);<NEW_LINE>}<NEW_LINE>// All the zero's we arent storing<NEW_LINE>numer += pow(-mean, 3) * (length - used);<NEW_LINE>denom += pow(-mean, 2) * (length - used);<NEW_LINE>numer /= length;<NEW_LINE>denom /= length;<NEW_LINE>double s1 = numer / (pow<MASK><NEW_LINE>if (// We can use the bias corrected formula<NEW_LINE>length >= 3)<NEW_LINE>return sqrt(length * (length - 1)) / (length - 2) * s1;<NEW_LINE>return s1;<NEW_LINE>}
(denom, 3.0 / 2.0));
306,050
public StepExecutionResult execute(ExecutionContext context) throws IOException, InterruptedException {<NEW_LINE>if (dryRunResultsPath.isPresent()) {<NEW_LINE>NSDictionary dryRunResult = new NSDictionary();<NEW_LINE>dryRunResult.put("relative-path-to-sign", dryRunResultsPath.get().getParent().relativize(pathToSign).toString());<NEW_LINE>dryRunResult.put("use-entitlements", pathToSigningEntitlements.isPresent());<NEW_LINE>dryRunResult.put("identity", getIdentityArg(codeSignIdentitySupplier.get()));<NEW_LINE>filesystem.writeContentsToPath(dryRunResult.toXMLPropertyList(), dryRunResultsPath.get());<NEW_LINE>return StepExecutionResults.SUCCESS;<NEW_LINE>}<NEW_LINE>ProcessExecutorParams.Builder paramsBuilder = ProcessExecutorParams.builder();<NEW_LINE>if (codesignAllocatePath.isPresent()) {<NEW_LINE>ImmutableList<String> commandPrefix = codesignAllocatePath.get().getCommandPrefix(resolver);<NEW_LINE>paramsBuilder.setEnvironment(ImmutableMap.of("CODESIGN_ALLOCATE", Joiner.on(" ").join(commandPrefix)));<NEW_LINE>}<NEW_LINE>ImmutableList.Builder<String> commandBuilder = ImmutableList.builder();<NEW_LINE>commandBuilder.addAll(codesign.getCommandPrefix(resolver));<NEW_LINE>commandBuilder.add("--force", "--sign", getIdentityArg(codeSignIdentitySupplier.get()));<NEW_LINE>commandBuilder.addAll(codesignFlags);<NEW_LINE>if (pathToSigningEntitlements.isPresent()) {<NEW_LINE>commandBuilder.add("--entitlements", pathToSigningEntitlements.get().toString());<NEW_LINE>}<NEW_LINE>commandBuilder.<MASK><NEW_LINE>ProcessExecutorParams processExecutorParams = paramsBuilder.setCommand(commandBuilder.build()).setDirectory(filesystem.getRootPath().getPath()).build();<NEW_LINE>// Must specify that stdout is expected or else output may be wrapped in Ansi escape chars.<NEW_LINE>Set<ProcessExecutor.Option> options = EnumSet.of(ProcessExecutor.Option.EXPECTING_STD_OUT);<NEW_LINE>ProcessExecutor processExecutor = context.getProcessExecutor();<NEW_LINE>if (LOG.isDebugEnabled()) {<NEW_LINE>LOG.debug("codesign command: %s", Joiner.on(" ").join(processExecutorParams.getCommand()));<NEW_LINE>}<NEW_LINE>ProcessExecutor.Result result = processExecutor.launchAndExecute(processExecutorParams, options, /* stdin */<NEW_LINE>Optional.empty(), /* timeOutMs */<NEW_LINE>Optional.of(codesignTimeout.toMillis()), /* timeOutHandler */<NEW_LINE>Optional.empty());<NEW_LINE>if (result.isTimedOut()) {<NEW_LINE>throw new RuntimeException("codesign timed out. This may be due to the keychain being locked.");<NEW_LINE>}<NEW_LINE>if (result.getExitCode() != 0) {<NEW_LINE>return StepExecutionResult.of(result);<NEW_LINE>}<NEW_LINE>return StepExecutionResults.SUCCESS;<NEW_LINE>}
add(pathToSign.toString());
952,418
protected void handleMessageInternal(Message<?> message) {<NEW_LINE>MessageHeaders headers = message.getHeaders();<NEW_LINE>String destination = SimpMessageHeaderAccessor.getDestination(headers);<NEW_LINE>String sessionId = SimpMessageHeaderAccessor.getSessionId(headers);<NEW_LINE>updateSessionReadTime(sessionId);<NEW_LINE>if (!checkDestinationPrefix(destination)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SimpMessageType messageType = SimpMessageHeaderAccessor.getMessageType(headers);<NEW_LINE>if (SimpMessageType.MESSAGE.equals(messageType)) {<NEW_LINE>logMessage(message);<NEW_LINE>sendMessageToSubscribers(destination, message);<NEW_LINE>} else if (SimpMessageType.CONNECT.equals(messageType)) {<NEW_LINE>logMessage(message);<NEW_LINE>if (sessionId != null) {<NEW_LINE>long[] heartbeatIn = SimpMessageHeaderAccessor.getHeartbeat(headers);<NEW_LINE>long[] heartbeatOut = getHeartbeatValue();<NEW_LINE>Principal user = SimpMessageHeaderAccessor.getUser(headers);<NEW_LINE>MessageChannel outChannel = getClientOutboundChannelForSession(sessionId);<NEW_LINE>this.sessions.put(sessionId, new SessionInfo(sessionId, user, outChannel, heartbeatIn, heartbeatOut));<NEW_LINE>SimpMessageHeaderAccessor connectAck = <MASK><NEW_LINE>initHeaders(connectAck);<NEW_LINE>connectAck.setSessionId(sessionId);<NEW_LINE>if (user != null) {<NEW_LINE>connectAck.setUser(user);<NEW_LINE>}<NEW_LINE>connectAck.setHeader(SimpMessageHeaderAccessor.CONNECT_MESSAGE_HEADER, message);<NEW_LINE>connectAck.setHeader(SimpMessageHeaderAccessor.HEART_BEAT_HEADER, heartbeatOut);<NEW_LINE>Message<byte[]> messageOut = MessageBuilder.createMessage(EMPTY_PAYLOAD, connectAck.getMessageHeaders());<NEW_LINE>getClientOutboundChannel().send(messageOut);<NEW_LINE>}<NEW_LINE>} else if (SimpMessageType.DISCONNECT.equals(messageType)) {<NEW_LINE>logMessage(message);<NEW_LINE>if (sessionId != null) {<NEW_LINE>Principal user = SimpMessageHeaderAccessor.getUser(headers);<NEW_LINE>handleDisconnect(sessionId, user, message);<NEW_LINE>}<NEW_LINE>} else if (SimpMessageType.SUBSCRIBE.equals(messageType)) {<NEW_LINE>logMessage(message);<NEW_LINE>this.subscriptionRegistry.registerSubscription(message);<NEW_LINE>} else if (SimpMessageType.UNSUBSCRIBE.equals(messageType)) {<NEW_LINE>logMessage(message);<NEW_LINE>this.subscriptionRegistry.unregisterSubscription(message);<NEW_LINE>}<NEW_LINE>}
SimpMessageHeaderAccessor.create(SimpMessageType.CONNECT_ACK);
1,467,730
public void worst() {<NEW_LINE><MASK><NEW_LINE>size = s.nextInt();<NEW_LINE>System.out.println("ENTER THE SIZES OF PROCESSES");<NEW_LINE>int[] s111 = new int[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>int a = s.nextInt();<NEW_LINE>s111[i] = a;<NEW_LINE>}<NEW_LINE>System.out.println("ENTER THE SIZE OF MEMORY BLOCK");<NEW_LINE>size1 = s.nextInt();<NEW_LINE>System.out.println("ENTER THE MEMORY PARTITIONS");<NEW_LINE>int[] s211 = new int[size1];<NEW_LINE>for (int i = 0; i < size1; i++) {<NEW_LINE>int a1 = s.nextInt();<NEW_LINE>s211[i] = a1;<NEW_LINE>}<NEW_LINE>int[] allocation11 = new int[size];<NEW_LINE>for (int i = 0; i < allocation11.length; i++) {<NEW_LINE>allocation11[i] = -1;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>int wst = -1;<NEW_LINE>for (int j = 0; j < size1; j++) {<NEW_LINE>if (s211[j] >= s111[i]) {<NEW_LINE>if (wst == -1)<NEW_LINE>wst = j;<NEW_LINE>else if (s211[wst] < s211[j])<NEW_LINE>wst = j;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (wst != -1) {<NEW_LINE>allocation11[i] = wst;<NEW_LINE>s211[wst] -= s111[i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println("\nProcess No.\t\tProcess Size\t\tBlock no.");<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>System.out.print(" " + (i + 1) + "\t\t\t" + s111[i] + "\t\t\t");<NEW_LINE>if (allocation11[i] != -1)<NEW_LINE>System.out.print(allocation11[i] + 1);<NEW_LINE>else<NEW_LINE>System.out.print("Not Allocated");<NEW_LINE>System.out.println();<NEW_LINE>}<NEW_LINE>}
System.out.println("ENTER THE NUMBER OF PROCESSES");
236,200
final DetachFromIndexResult executeDetachFromIndex(DetachFromIndexRequest detachFromIndexRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(detachFromIndexRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DetachFromIndexRequest> request = null;<NEW_LINE>Response<DetachFromIndexResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DetachFromIndexRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(detachFromIndexRequest));<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, "CloudDirectory");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DetachFromIndex");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DetachFromIndexResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DetachFromIndexResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
419,476
public static ListInboundOrderCasesResponse unmarshall(ListInboundOrderCasesResponse listInboundOrderCasesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listInboundOrderCasesResponse.setRequestId(_ctx.stringValue("ListInboundOrderCasesResponse.RequestId"));<NEW_LINE>listInboundOrderCasesResponse.setPageSize(_ctx.integerValue("ListInboundOrderCasesResponse.PageSize"));<NEW_LINE>listInboundOrderCasesResponse.setTotalCount(_ctx.integerValue("ListInboundOrderCasesResponse.TotalCount"));<NEW_LINE>listInboundOrderCasesResponse.setPageNumber(_ctx.integerValue("ListInboundOrderCasesResponse.PageNumber"));<NEW_LINE>listInboundOrderCasesResponse.setSuccess(_ctx.booleanValue("ListInboundOrderCasesResponse.Success"));<NEW_LINE>List<CaseBiz> cases = new ArrayList<CaseBiz>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListInboundOrderCasesResponse.Cases.Length"); i++) {<NEW_LINE>CaseBiz caseBiz = new CaseBiz();<NEW_LINE>caseBiz.setId(_ctx.stringValue("ListInboundOrderCasesResponse.Cases[" + i + "].Id"));<NEW_LINE>caseBiz.setOperateQuantity(_ctx.integerValue("ListInboundOrderCasesResponse.Cases[" + i + "].OperateQuantity"));<NEW_LINE>caseBiz.setCaseCode(_ctx.stringValue("ListInboundOrderCasesResponse.Cases[" + i + "].CaseCode"));<NEW_LINE>caseBiz.setCaseStatus(_ctx.stringValue("ListInboundOrderCasesResponse.Cases[" + i + "].CaseStatus"));<NEW_LINE>caseBiz.setBeConfirmInboundCase(_ctx.booleanValue("ListInboundOrderCasesResponse.Cases[" + i + "].BeConfirmInboundCase"));<NEW_LINE>caseBiz.setBeConfirmOutboundCase(_ctx.booleanValue("ListInboundOrderCasesResponse.Cases[" + i + "].BeConfirmOutboundCase"));<NEW_LINE>caseBiz.setApplyStatus(_ctx.stringValue<MASK><NEW_LINE>caseBiz.setPreboxingQuantity(_ctx.integerValue("ListInboundOrderCasesResponse.Cases[" + i + "].PreboxingQuantity"));<NEW_LINE>cases.add(caseBiz);<NEW_LINE>}<NEW_LINE>listInboundOrderCasesResponse.setCases(cases);<NEW_LINE>return listInboundOrderCasesResponse;<NEW_LINE>}
("ListInboundOrderCasesResponse.Cases[" + i + "].ApplyStatus"));
938,732
private Map<String, Object> toD3Format(Iterator<Map<String, Object>> result) {<NEW_LINE>List<Map<String, Object>> nodes = new ArrayList<>();<NEW_LINE>List<Map<String, Object>> rels = new ArrayList<>();<NEW_LINE>int i = 0;<NEW_LINE>while (result.hasNext()) {<NEW_LINE>Map<String, Object> row = result.next();<NEW_LINE>nodes.add(map("title", row.get("movie"), "label", "movie"));<NEW_LINE>int target = i;<NEW_LINE>i++;<NEW_LINE>for (Object name : (Collection) row.get("cast")) {<NEW_LINE>Map<String, Object> actor = map(<MASK><NEW_LINE>int source = nodes.indexOf(actor);<NEW_LINE>if (source == -1) {<NEW_LINE>nodes.add(actor);<NEW_LINE>source = i++;<NEW_LINE>}<NEW_LINE>rels.add(map("source", source, "target", target));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return map("nodes", nodes, "links", rels);<NEW_LINE>}
"title", name, "label", "actor");
531,374
private void breakFromList(Deque<BlockPos> closedList, int maxAmount, Level world, ServerPlayer player, ItemStack stack) {<NEW_LINE>int count = 0;<NEW_LINE>while (count++ < maxAmount && !closedList.isEmpty()) {<NEW_LINE>BlockPos pos = closedList.pollFirst();<NEW_LINE>int xpDropEvent = ForgeHooks.onBlockBreakEvent(world, player.gameMode.getGameModeForPlayer(), player, pos);<NEW_LINE>if (xpDropEvent < 0)<NEW_LINE>continue;<NEW_LINE>BlockState state = world.getBlockState(pos);<NEW_LINE>Block block = state.getBlock();<NEW_LINE>if (!block.isAir(state, world, pos) && state.getDestroyProgress(player, world, pos) != 0) {<NEW_LINE>if (player.abilities.instabuild) {<NEW_LINE>block.playerWillDestroy(world, pos, state, player);<NEW_LINE>if (block.removedByPlayer(state, world, pos, player, false, state.getFluidState()))<NEW_LINE>block.destroy(world, pos, state);<NEW_LINE>} else {<NEW_LINE>block.playerWillDestroy(world, pos, state, player);<NEW_LINE>BlockEntity te = world.getBlockEntity(pos);<NEW_LINE>consumeDurability(stack, world, state, pos, player);<NEW_LINE>if (block.removedByPlayer(state, world, pos, player, true, state.getFluidState())) {<NEW_LINE>block.destroy(world, pos, state);<NEW_LINE>block.playerDestroy(world, player, pos, state, te, stack);<NEW_LINE>if (world instanceof ServerLevel)<NEW_LINE>block.popExperience((ServerLevel) world, pos, xpDropEvent);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>world.levelEvent(2001, pos, Block.getId(state));<NEW_LINE>player.connection.send(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
new ClientboundBlockUpdatePacket(world, pos));
52,765
final GetFunctionResult executeGetFunction(GetFunctionRequest getFunctionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFunctionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetFunctionRequest> request = null;<NEW_LINE>Response<GetFunctionResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new GetFunctionRequestMarshaller().marshall(super.beforeMarshalling(getFunctionRequest));<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, "CloudFront");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetFunction");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<GetFunctionResult> responseHandler = new StaxResponseHandler<GetFunctionResult>(new GetFunctionResultStaxUnmarshaller(), false, false);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
91,329
public void createThread(TargetObject added) {<NEW_LINE>// System.err.println("createThread " + added + ":" + this);<NEW_LINE>synchronized (recorder.threadMap) {<NEW_LINE>ManagedThreadRecorder threadRecorder = recorder.getThreadRecorder((TargetThread) added);<NEW_LINE>TraceThread traceThread = threadRecorder.getTraceThread();<NEW_LINE>recorder.createSnapshot(<MASK><NEW_LINE>try (UndoableTransaction tid = UndoableTransaction.start(recorder.getTrace(), "Adjust thread creation", true)) {<NEW_LINE>long existing = traceThread.getCreationSnap();<NEW_LINE>if (existing == Long.MIN_VALUE) {<NEW_LINE>traceThread.setCreationSnap(recorder.getSnap());<NEW_LINE>} else {<NEW_LINE>traceThread.setDestructionSnap(Long.MAX_VALUE);<NEW_LINE>}<NEW_LINE>} catch (DuplicateNameException e) {<NEW_LINE>// Should be shrinking<NEW_LINE>throw new AssertionError(e);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>Msg.warn(this, "Unable to set creation snap for " + traceThread);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
traceThread + " started", traceThread, null);
1,050,193
protected void deploy(DeploymentInfo deploymentInfo) {<NEW_LINE>LOG.info("Deploying JAX-RS deployment for protocol instance : " + this);<NEW_LINE>DeploymentManager manager = Servlets.defaultContainer().addDeployment(deploymentInfo);<NEW_LINE>manager.deploy();<NEW_LINE>HttpHandler httpHandler;<NEW_LINE>// Get realm from owning agent asset<NEW_LINE><MASK><NEW_LINE>if (TextUtil.isNullOrEmpty(agentRealm)) {<NEW_LINE>throw new IllegalStateException("Cannot determine the realm that this agent belongs to");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>httpHandler = manager.start();<NEW_LINE>// Wrap the handler to inject the realm<NEW_LINE>HttpHandler handlerWrapper = exchange -> {<NEW_LINE>exchange.getRequestHeaders().put(HttpString.tryFromString(Constants.REALM_PARAM_NAME), agentRealm);<NEW_LINE>httpHandler.handleRequest(exchange);<NEW_LINE>};<NEW_LINE>WebService.RequestHandler requestHandler = pathStartsWithHandler(deploymentInfo.getDeploymentName(), deploymentInfo.getContextPath(), handlerWrapper);<NEW_LINE>LOG.info("Registering HTTP Server Protocol request handler '" + this.getClass().getSimpleName() + "' for request path: " + deploymentInfo.getContextPath());<NEW_LINE>// Add the handler before the greedy deployment handler<NEW_LINE>webService.getRequestHandlers().add(0, requestHandler);<NEW_LINE>deployment = new DeploymentInstance(deploymentInfo, requestHandler);<NEW_LINE>} catch (ServletException e) {<NEW_LINE>LOG.severe("Failed to deploy deployment: " + deploymentInfo.getDeploymentName());<NEW_LINE>}<NEW_LINE>}
String agentRealm = agent.getRealm();
49,575
public static void vertical(GrayF32 src, GrayI16 dst) {<NEW_LINE>if (src.height < dst.height)<NEW_LINE>throw new IllegalArgumentException("src height must be >= dst height");<NEW_LINE>if (src.width != dst.width)<NEW_LINE>throw new IllegalArgumentException("src width must equal dst width");<NEW_LINE>float scale = src.height / (float) dst.height;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, dst.width, x -> {<NEW_LINE>for (int x = 0; x < dst.width; x++) {<NEW_LINE>int indexDst = dst.startIndex + x;<NEW_LINE>for (int y = 0; y < dst.height - 1; y++) {<NEW_LINE>float srcY0 = y * scale;<NEW_LINE>float srcY1 <MASK><NEW_LINE>int isrcY0 = (int) srcY0;<NEW_LINE>int isrcY1 = (int) srcY1;<NEW_LINE>int index = src.getIndex(x, isrcY0);<NEW_LINE>// compute value of overlapped region<NEW_LINE>float startWeight = (1.0f - (srcY0 - isrcY0));<NEW_LINE>float start = src.data[index];<NEW_LINE>index += src.stride;<NEW_LINE>float middle = 0;<NEW_LINE>for (int i = isrcY0 + 1; i < isrcY1; i++) {<NEW_LINE>middle += src.data[index];<NEW_LINE>index += src.stride;<NEW_LINE>}<NEW_LINE>float endWeight = (srcY1 % 1);<NEW_LINE>float end = src.data[index];<NEW_LINE>dst.data[indexDst] = (short) ((start * startWeight + middle + end * endWeight) / scale + 0.5f);<NEW_LINE>indexDst += dst.stride;<NEW_LINE>}<NEW_LINE>// handle the last area as a special case<NEW_LINE>int y = dst.height - 1;<NEW_LINE>float srcY0 = y * scale;<NEW_LINE>int isrcY0 = (int) srcY0;<NEW_LINE>int isrcY1 = src.height - 1;<NEW_LINE>int index = src.getIndex(x, isrcY0);<NEW_LINE>// compute value of overlapped region<NEW_LINE>float startWeight = (1.0f - (srcY0 - isrcY0));<NEW_LINE>float start = src.data[index];<NEW_LINE>index += src.stride;<NEW_LINE>float middle = 0;<NEW_LINE>for (int i = isrcY0 + 1; i < isrcY1; i++) {<NEW_LINE>middle += src.data[index];<NEW_LINE>index += src.stride;<NEW_LINE>}<NEW_LINE>float end = isrcY1 != isrcY0 ? src.data[index] : 0;<NEW_LINE>dst.data[indexDst] = (short) ((start * startWeight + middle + end) / scale + 0.5f);<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
= (y + 1) * scale;
175,485
public Object handleOperation(String operation, Object[] params) throws IOException {<NEW_LINE>if (OPERATION_DOWNLOAD.equals(operation)) {<NEW_LINE>if (params.length == 2) {<NEW_LINE>downloadFile((String) params[0], (String) params[1]);<NEW_LINE>} else {<NEW_LINE>// partial download<NEW_LINE>return downloadFile((String) params[0], (String) params[1], (Long) params[2], (Long) params[3]);<NEW_LINE>}<NEW_LINE>} else if (OPERATION_UPLOAD.equals(operation)) {<NEW_LINE>uploadFile((String) params[0], (String) params[1], (Boolean) params[2]);<NEW_LINE>} else if (OPERATION_DELETE.equals(operation)) {<NEW_LINE>deleteFile(<MASK><NEW_LINE>} else if (OPERATION_DELETE_ALL.equals(operation)) {<NEW_LINE>deleteAll((List<String>) params[0]);<NEW_LINE>} else {<NEW_LINE>throw logUnsupportedOperationError("handleOperation", operation);<NEW_LINE>}<NEW_LINE>// currently all operations are void, so return null.<NEW_LINE>return null;<NEW_LINE>}
(String) params[0]);
1,377,890
protected void sync() {<NEW_LINE>inSync = true;<NEW_LINE>WSDLComponent secBinding = null;<NEW_LINE>WSDLComponent topSecBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp);<NEW_LINE>WSDLComponent protTokenKind = SecurityTokensModelHelper.getTokenElement(topSecBinding, ProtectionToken.class);<NEW_LINE>WSDLComponent protToken = SecurityTokensModelHelper.getTokenTypeElement(protTokenKind);<NEW_LINE>boolean secConv = (protToken instanceof SecureConversationToken);<NEW_LINE>setChBox(secConvChBox, secConv);<NEW_LINE>if (secConv) {<NEW_LINE>WSDLComponent bootPolicy = SecurityTokensModelHelper.getTokenElement(protToken, BootstrapPolicy.class);<NEW_LINE>secBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(bootPolicy);<NEW_LINE>Policy p = (Policy) secBinding.getParent();<NEW_LINE>setChBox(derivedKeysChBox, SecurityPolicyModelHelper.isRequireDerivedKeys(protToken));<NEW_LINE>setChBox(reqSigConfChBox, SecurityPolicyModelHelper.isRequireSignatureConfirmation(p));<NEW_LINE>setChBox(encryptSignatureChBox, SecurityPolicyModelHelper.isEncryptSignature(bootPolicy));<NEW_LINE>setChBox(encryptOrderChBox, SecurityPolicyModelHelper.isEncryptBeforeSigning(bootPolicy));<NEW_LINE>} else {<NEW_LINE>secBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp);<NEW_LINE>setChBox(derivedKeysChBox, false);<NEW_LINE>setChBox(reqSigConfChBox<MASK><NEW_LINE>setChBox(encryptSignatureChBox, SecurityPolicyModelHelper.isEncryptSignature(comp));<NEW_LINE>setChBox(encryptOrderChBox, SecurityPolicyModelHelper.isEncryptBeforeSigning(comp));<NEW_LINE>}<NEW_LINE>WSDLComponent tokenKind = SecurityTokensModelHelper.getTokenElement(secBinding, ProtectionToken.class);<NEW_LINE>WSDLComponent token = SecurityTokensModelHelper.getTokenTypeElement(tokenKind);<NEW_LINE>setChBox(reqDerivedKeys, SecurityPolicyModelHelper.isRequireDerivedKeys(token));<NEW_LINE>setCombo(algoSuiteCombo, AlgoSuiteModelHelper.getAlgorithmSuite(secBinding));<NEW_LINE>setCombo(layoutCombo, SecurityPolicyModelHelper.getMessageLayout(secBinding));<NEW_LINE>if (secConv) {<NEW_LINE>tokenKind = SecurityTokensModelHelper.getSupportingToken(secBinding.getParent(), suppTokenTypeUsed);<NEW_LINE>} else {<NEW_LINE>tokenKind = SecurityTokensModelHelper.getSupportingToken(comp, suppTokenTypeUsed);<NEW_LINE>}<NEW_LINE>token = SecurityTokensModelHelper.getTokenTypeElement(tokenKind);<NEW_LINE>setChBox(reqDerivedKeysIssued, SecurityPolicyModelHelper.isRequireDerivedKeys(token));<NEW_LINE>setCombo(tokenTypeCombo, SecurityTokensModelHelper.getIssuedTokenType(token));<NEW_LINE>setCombo(keyTypeCombo, SecurityTokensModelHelper.getIssuedKeyType(token));<NEW_LINE>setCombo(keySizeCombo, SecurityTokensModelHelper.getIssuedKeySize(token));<NEW_LINE>issuerAddressField.setText(SecurityTokensModelHelper.getIssuedIssuerAddress(token));<NEW_LINE>issuerMetadataField.setText(SecurityTokensModelHelper.getIssuedIssuerMetadataAddress(token));<NEW_LINE>enableDisable();<NEW_LINE>inSync = false;<NEW_LINE>}
, SecurityPolicyModelHelper.isRequireSignatureConfirmation(comp));
71,429
SearchInput.Result doExecute(WatchExecutionContext ctx, WatcherSearchTemplateRequest request) throws Exception {<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>logger.trace("[{}] running query for [{}] [{}]", ctx.id(), ctx.watch().id(), request.getSearchSource().utf8ToString());<NEW_LINE>}<NEW_LINE>SearchRequest <MASK><NEW_LINE>ClientHelper.assertNoAuthorizationHeader(ctx.watch().status().getHeaders());<NEW_LINE>final SearchResponse response = ClientHelper.executeWithHeaders(ctx.watch().status().getHeaders(), ClientHelper.WATCHER_ORIGIN, client, () -> client.search(searchRequest).actionGet(timeout));<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("[{}] found [{}] hits", ctx.id(), response.getHits().getTotalHits().value);<NEW_LINE>for (SearchHit hit : response.getHits()) {<NEW_LINE>logger.debug("[{}] hit [{}]", ctx.id(), hit.getSourceAsMap());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Payload payload;<NEW_LINE>final Params params;<NEW_LINE>if (request.isRestTotalHitsAsint()) {<NEW_LINE>params = new MapParams(Collections.singletonMap("rest_total_hits_as_int", "true"));<NEW_LINE>} else {<NEW_LINE>params = EMPTY_PARAMS;<NEW_LINE>}<NEW_LINE>if (input.getExtractKeys() != null) {<NEW_LINE>BytesReference bytes = XContentHelper.toXContent(response, XContentType.SMILE, params, false);<NEW_LINE>// EMPTY is safe here because we never use namedObject<NEW_LINE>try (XContentParser parser = XContentHelper.createParser(NamedXContentRegistry.EMPTY, LoggingDeprecationHandler.INSTANCE, bytes, XContentType.SMILE)) {<NEW_LINE>Map<String, Object> filteredKeys = XContentFilterKeysUtils.filterMapOrdered(input.getExtractKeys(), parser);<NEW_LINE>payload = new Payload.Simple(filteredKeys);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>payload = new Payload.XContent(response, params);<NEW_LINE>}<NEW_LINE>return new SearchInput.Result(request, payload);<NEW_LINE>}
searchRequest = searchTemplateService.toSearchRequest(request);
829,566
protected void exec() {<NEW_LINE>TMPDIR = super.tmpdir;<NEW_LINE>DIR = super.location;<NEW_LINE>datafile = super.filenames.get(0);<NEW_LINE>FileOps.ensureDir(TMPDIR);<NEW_LINE>FileOps.clearAll(TMPDIR);<NEW_LINE>if (!TMPDIR.equals(DIR)) {<NEW_LINE>FileOps.ensureDir(DIR);<NEW_LINE>FileOps.clearAll(DIR);<NEW_LINE>}<NEW_LINE>BulkLoaderX.DataTick = 100_000;<NEW_LINE>BulkLoader.DataTickPoint = BulkLoaderX.DataTick;<NEW_LINE>long maxMemory = Runtime.getRuntime().maxMemory();<NEW_LINE>// Java code to do all the steps.<NEW_LINE>System.out.printf("RAM = %,d\n", maxMemory);<NEW_LINE>System.out.println("STEP 1 - load node table");<NEW_LINE>step(() -> CmdxBuildNodeTable.main("--loc=" + DIR, "--threads=" + super.sortThreads, datafile));<NEW_LINE>System.out.println("STEP 2 - ingest triples and quads");<NEW_LINE>step(() -> CmdxIngestData.main("--loc=" + DIR, datafile));<NEW_LINE>System.out.println("STEP 3 - build indexes");<NEW_LINE>if (!isEmptyFile(loaderFiles.triplesFile)) {<NEW_LINE>step(() -> CmdxBuildIndex.main("--loc=" + DIR, "--threads=" + super.sortThreads, "--index=SPO"));<NEW_LINE>step(() -> CmdxBuildIndex.main("--loc=" + DIR, "--threads=" + super.sortThreads, "--index=POS"));<NEW_LINE>step(() -> CmdxBuildIndex.main("--loc=" + DIR, "--threads=" + super.sortThreads, "--index=OSP"));<NEW_LINE>}<NEW_LINE>if (!isEmptyFile(loaderFiles.quadsFile)) {<NEW_LINE>step(() -> CmdxBuildIndex.main("--loc=" + DIR, "--threads=" + super.sortThreads, "--index=GSPO"));<NEW_LINE>step(() -> CmdxBuildIndex.main("--loc=" + DIR, "--threads=" + super.sortThreads, "--index=GPOS"));<NEW_LINE>step(() -> CmdxBuildIndex.main("--loc=" + DIR, "--threads=" + super.sortThreads, "--index=GOSP"));<NEW_LINE>step(() -> CmdxBuildIndex.main("--loc=" + DIR, "--threads=" <MASK><NEW_LINE>step(() -> CmdxBuildIndex.main("--loc=" + DIR, "--threads=" + super.sortThreads, "--index=POSG"));<NEW_LINE>step(() -> CmdxBuildIndex.main("--loc=" + DIR, "--threads=" + super.sortThreads, "--index=OSPG"));<NEW_LINE>}<NEW_LINE>expel();<NEW_LINE>}
+ super.sortThreads, "--index=SPOG"));
1,622,417
public static CodegenExpression codegenPointInTime(DTLocalLongOpsIntervalForge forge, CodegenExpression inner, EPTypeClass innerType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) {<NEW_LINE>CodegenExpression timeZoneField = codegenClassScope.addOrGetFieldSharable(RuntimeSettingsTimeZoneField.INSTANCE);<NEW_LINE>CodegenMethod methodNode = codegenMethodScope.makeChild(EPTypePremade.BOOLEANBOXED.getEPType(), DTLocalLongOpsIntervalEval.class, codegenClassScope).addParam(EPTypePremade.LONGPRIMITIVE.getEPType(), "target");<NEW_LINE>CodegenBlock block = methodNode.getBlock().declareVar(EPTypePremade.CALENDAR.getEPType(), "cal", staticMethod(Calendar.class, "getInstance", timeZoneField)).declareVar(EPTypePremade.LONGPRIMITIVE.getEPType(), "startRemainder", forge.timeAbacus.calendarSetCodegen(ref("target"), ref("cal"), methodNode, codegenClassScope));<NEW_LINE>evaluateCalOpsCalendarCodegen(block, forge.calendarForges, ref("cal"), methodNode, exprSymbol, codegenClassScope);<NEW_LINE>block.declareVar(EPTypePremade.LONGPRIMITIVE.getEPType(), "time", forge.timeAbacus.calendarGetCodegen(ref("cal"), ref("startRemainder"), codegenClassScope)).methodReturn(forge.intervalForge.codegen(ref("time"), ref("time")<MASK><NEW_LINE>return localMethod(methodNode, inner);<NEW_LINE>}
, methodNode, exprSymbol, codegenClassScope));
600,927
public void onBindHeaderViewHolder(SectionedViewHolder commonHolder, final int section, boolean expanded) {<NEW_LINE>if (section < filteredSyncFolderItems.size()) {<NEW_LINE>HeaderViewHolder holder = (HeaderViewHolder) commonHolder;<NEW_LINE>holder.binding.headerContainer.setVisibility(View.VISIBLE);<NEW_LINE>holder.binding.title.setText(filteredSyncFolderItems.get(section).getFolderName());<NEW_LINE>if (MediaFolderType.VIDEO == filteredSyncFolderItems.get(section).getType()) {<NEW_LINE>holder.binding.type.setImageResource(R.drawable.video_32dp);<NEW_LINE>} else if (MediaFolderType.IMAGE == filteredSyncFolderItems.get(section).getType()) {<NEW_LINE>holder.binding.type.setImageResource(R.drawable.image_32dp);<NEW_LINE>} else {<NEW_LINE>holder.binding.type.setImageResource(R.drawable.folder_star_32dp);<NEW_LINE>}<NEW_LINE>holder.binding.<MASK><NEW_LINE>holder.binding.syncStatusButton.setTag(section);<NEW_LINE>holder.binding.syncStatusButton.setOnClickListener(v -> {<NEW_LINE>filteredSyncFolderItems.get(section).setEnabled(!filteredSyncFolderItems.get(section).isEnabled(), clock.getCurrentTime());<NEW_LINE>setSyncButtonActiveIcon(holder.binding.syncStatusButton, filteredSyncFolderItems.get(section).isEnabled());<NEW_LINE>clickListener.onSyncStatusToggleClick(section, filteredSyncFolderItems.get(section));<NEW_LINE>});<NEW_LINE>setSyncButtonActiveIcon(holder.binding.syncStatusButton, filteredSyncFolderItems.get(section).isEnabled());<NEW_LINE>if (light) {<NEW_LINE>holder.binding.settingsButton.setVisibility(View.GONE);<NEW_LINE>} else {<NEW_LINE>holder.binding.settingsButton.setVisibility(View.VISIBLE);<NEW_LINE>holder.binding.settingsButton.setTag(section);<NEW_LINE>holder.binding.settingsButton.setOnClickListener(v -> onOverflowIconClicked(section, filteredSyncFolderItems.get(section), v));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
syncStatusButton.setVisibility(View.VISIBLE);
954,208
private static //<NEW_LINE>//<NEW_LINE>void //<NEW_LINE>evaluateForksExecutionPaths(//<NEW_LINE>List<List<Tree>> allExecutionPaths, //<NEW_LINE>List<List<Tree>> currentPaths, //<NEW_LINE>List<Tree> currentPath, //<NEW_LINE>boolean lastIsCurrentPath, List<BreakTree> activeBreaks, Tree[] forks) {<NEW_LINE>int i = 0;<NEW_LINE>List<List<Tree>> generatedExecutionPaths = new LinkedList<>();<NEW_LINE>for (Tree fork : forks) {<NEW_LINE>if (fork != null) {<NEW_LINE><MASK><NEW_LINE>if (lastIsCurrentPath && ++i == forks.length) {<NEW_LINE>currentPathsForFork = pathsList(currentPath);<NEW_LINE>} else {<NEW_LINE>List<Tree> forkedPath = new LinkedList<>(currentPath);<NEW_LINE>allExecutionPaths.add(forkedPath);<NEW_LINE>currentPathsForFork = pathsList(forkedPath);<NEW_LINE>}<NEW_LINE>collectExecutionPaths(fork, allExecutionPaths, currentPathsForFork, activeBreaks);<NEW_LINE>generatedExecutionPaths.addAll(currentPathsForFork);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// we need to merge with paths created by fork<NEW_LINE>addAllWithoutDuplicates(currentPaths, generatedExecutionPaths);<NEW_LINE>}
List<List<Tree>> currentPathsForFork;
1,162,993
protected RecoverableUnitSection createLogSection(int sectionId, RecoverableUnit ru) throws SystemException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "createLogSection", new Object[] { sectionId, ru });<NEW_LINE>RecoverableUnitSection logSection = null;<NEW_LINE>try {<NEW_LINE>// Create a RecoverableUnitSection for multiple data entries for each prepared resource<NEW_LINE>logSection = ru.createSection(sectionId, false);<NEW_LINE>} catch (Exception e) {<NEW_LINE>FFDCFilter.processException(<MASK><NEW_LINE>final Throwable toThrow = new SystemException(e.toString()).initCause(e);<NEW_LINE>if (tc.isEventEnabled())<NEW_LINE>Tr.event(tc, "Exception raised creating log section", e);<NEW_LINE>throw (SystemException) toThrow;<NEW_LINE>} finally {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.exit(tc, "createLogSection", logSection);<NEW_LINE>}<NEW_LINE>return logSection;<NEW_LINE>}
e, "com.ibm.tx.jta.impl.RegisteredResources.createLogSection", "2349", this);
144,856
public void visitVariableExpression(VariableExpression expression) {<NEW_LINE>String variableName = expression.getName();<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// SPECIAL CASES<NEW_LINE>// "this" for static methods is the Class instance<NEW_LINE>ClassNode classNode = controller.getClassNode();<NEW_LINE>// if (controller.isInClosure()) classNode = controller.getOutermostClass();<NEW_LINE>if (variableName.equals("this")) {<NEW_LINE>if (controller.isStaticMethod() || (!controller.getCompileStack().isImplicitThis() && controller.isStaticContext())) {<NEW_LINE>if (controller.isInClosure())<NEW_LINE>classNode = controller.getOutermostClass();<NEW_LINE>visitClassExpression(new ClassExpression(classNode));<NEW_LINE>} else {<NEW_LINE>loadThis(expression);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// "super" also requires special handling<NEW_LINE>if (variableName.equals("super")) {<NEW_LINE>if (controller.isStaticMethod()) {<NEW_LINE>visitClassExpression(new ClassExpression(classNode.getSuperClass()));<NEW_LINE>} else {<NEW_LINE>loadThis(expression);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>BytecodeVariable variable = controller.getCompileStack().getVariable(variableName, false);<NEW_LINE>if (variable == null) {<NEW_LINE>processClassVariable(expression);<NEW_LINE>} else {<NEW_LINE>controller.getOperandStack().loadOrStoreVariable(<MASK><NEW_LINE>}<NEW_LINE>if (!controller.getCompileStack().isLHS())<NEW_LINE>controller.getAssertionWriter().record(expression);<NEW_LINE>}
variable, expression.isUseReferenceDirectly());
1,250,339
private static synchronized void persistCache(DataOutputStream os, Map<String, Map<File, Set<String>>> fc, Map<String, List<File>> cc) throws IOException {<NEW_LINE>os.writeInt(fc.size());<NEW_LINE>for (Map.Entry<String, Map<File, Set<String>>> entry : fc.entrySet()) {<NEW_LINE>os.writeUTF(entry.getKey());<NEW_LINE>final Map<File, Set<String>> map = entry.getValue();<NEW_LINE>os.writeInt(map.size());<NEW_LINE>for (Map.Entry<File, Set<String>> children : map.entrySet()) {<NEW_LINE>String[] parts = RelPaths.findRelativePath(children.getKey().getPath());<NEW_LINE>assert parts != null : "No relative for " + children.getKey();<NEW_LINE>os.writeUTF(parts[0]);<NEW_LINE>os.writeUTF(parts[1]);<NEW_LINE>os.writeInt(children.getValue().size());<NEW_LINE>for (String v : children.getValue()) {<NEW_LINE>os.writeUTF(v);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>os.writeInt(cc.size());<NEW_LINE>for (Map.Entry<String, List<File>> entry : cc.entrySet()) {<NEW_LINE>os.writeUTF(entry.getKey());<NEW_LINE>os.writeInt(entry.<MASK><NEW_LINE>for (File file : entry.getValue()) {<NEW_LINE>String[] parts = RelPaths.findRelativePath(file.getPath());<NEW_LINE>os.writeUTF(parts[0]);<NEW_LINE>os.writeUTF(parts[1]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getValue().size());
374,181
public static int dds(Model model, AbstractStrategy strategy, int dis, int dep) {<NEW_LINE>int c = 0;<NEW_LINE>try {<NEW_LINE>model.getSolver().getEngine().propagate();<NEW_LINE>} catch (ContradictionException e) {<NEW_LINE>return c;<NEW_LINE>}<NEW_LINE>Decision dec = strategy.getDecision();<NEW_LINE>if (dec != null) {<NEW_LINE>// apply the decision<NEW_LINE>if (dep >= dis) {<NEW_LINE>model.getEnvironment().worldPush();<NEW_LINE>try {<NEW_LINE>dec.buildNext();<NEW_LINE>dec.apply();<NEW_LINE>c += ilds(model, strategy, dis, dep - 1);<NEW_LINE>} catch (ContradictionException cex) {<NEW_LINE>model.getSolver().getEngine().flush();<NEW_LINE>}<NEW_LINE>model.getEnvironment().worldPop();<NEW_LINE>} else {<NEW_LINE>dec.buildNext();<NEW_LINE>}<NEW_LINE>if (dis > 0) {<NEW_LINE>model.getEnvironment().worldPush();<NEW_LINE>try {<NEW_LINE>dec.buildNext();<NEW_LINE>dec.apply();<NEW_LINE>c += ilds(model, strategy, dis - 1, dep);<NEW_LINE>} catch (ContradictionException cex) {<NEW_LINE>model.getSolver().getEngine().flush();<NEW_LINE>}<NEW_LINE>model.getEnvironment().worldPop();<NEW_LINE>}<NEW_LINE>} else if (dis == 0) {<NEW_LINE>assert model.getSolver()<MASK><NEW_LINE>c++;<NEW_LINE>// System.out.printf("Solution: %s\n", Arrays.toString(model.getVars()));<NEW_LINE>}<NEW_LINE>return c;<NEW_LINE>}
.isSatisfied() == ESat.TRUE;
1,248,443
private void exportTo(File file, IntPredicate filter) throws IOException {<NEW_LINE>//<NEW_LINE>CSVFormat //<NEW_LINE>csvformat = // $NON-NLS-1$<NEW_LINE>CSVFormat.DEFAULT.builder().setDelimiter(';').setQuote('"').setRecordSeparator("\r\n").// $NON-NLS-1$<NEW_LINE>setAllowDuplicateHeaderNames(true).build();<NEW_LINE>try (CSVPrinter printer = new CSVPrinter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8), csvformat)) {<NEW_LINE>//<NEW_LINE>//<NEW_LINE>printer.//<NEW_LINE>printRecord(//<NEW_LINE>Messages.CSVColumn_Date, //<NEW_LINE>Messages.CSVColumn_Value, //<NEW_LINE>Messages.CSVColumn_InboundTransferals, //<NEW_LINE>Messages.CSVColumn_OutboundTransferals, <MASK><NEW_LINE>for (int ii = 0; ii < totals.length; ii++) {<NEW_LINE>if (!filter.test(ii))<NEW_LINE>continue;<NEW_LINE>printer.print(dates[ii].toString());<NEW_LINE>printer.print(Values.Amount.format(totals[ii]));<NEW_LINE>printer.print(Values.Amount.format(inboundTransferals[ii]));<NEW_LINE>printer.print(Values.Amount.format(outboundTransferals[ii]));<NEW_LINE>printer.print(Values.Percent.format(delta[ii]));<NEW_LINE>printer.print(Values.Percent.format(accumulated[ii]));<NEW_LINE>printer.println();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Messages.CSVColumn_DeltaInPercent, Messages.CSVColumn_CumulatedPerformanceInPercent);
46,033
public static DescribeExporterOutputListResponse unmarshall(DescribeExporterOutputListResponse describeExporterOutputListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeExporterOutputListResponse.setRequestId(_ctx.stringValue("DescribeExporterOutputListResponse.RequestId"));<NEW_LINE>describeExporterOutputListResponse.setSuccess(_ctx.booleanValue("DescribeExporterOutputListResponse.Success"));<NEW_LINE>describeExporterOutputListResponse.setCode(_ctx.stringValue("DescribeExporterOutputListResponse.Code"));<NEW_LINE>describeExporterOutputListResponse.setMessage<MASK><NEW_LINE>describeExporterOutputListResponse.setPageNumber(_ctx.integerValue("DescribeExporterOutputListResponse.PageNumber"));<NEW_LINE>describeExporterOutputListResponse.setTotal(_ctx.integerValue("DescribeExporterOutputListResponse.Total"));<NEW_LINE>List<Datapoint> datapoints = new ArrayList<Datapoint>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeExporterOutputListResponse.Datapoints.Length"); i++) {<NEW_LINE>Datapoint datapoint = new Datapoint();<NEW_LINE>datapoint.setDestType(_ctx.stringValue("DescribeExporterOutputListResponse.Datapoints[" + i + "].DestType"));<NEW_LINE>datapoint.setCreateTime(_ctx.longValue("DescribeExporterOutputListResponse.Datapoints[" + i + "].CreateTime"));<NEW_LINE>datapoint.setDestName(_ctx.stringValue("DescribeExporterOutputListResponse.Datapoints[" + i + "].DestName"));<NEW_LINE>ConfigJson configJson = new ConfigJson();<NEW_LINE>configJson.setAk(_ctx.stringValue("DescribeExporterOutputListResponse.Datapoints[" + i + "].ConfigJson.ak"));<NEW_LINE>configJson.setEndpoint(_ctx.stringValue("DescribeExporterOutputListResponse.Datapoints[" + i + "].ConfigJson.endpoint"));<NEW_LINE>configJson.setLogstore(_ctx.stringValue("DescribeExporterOutputListResponse.Datapoints[" + i + "].ConfigJson.logstore"));<NEW_LINE>configJson.setProject(_ctx.stringValue("DescribeExporterOutputListResponse.Datapoints[" + i + "].ConfigJson.project"));<NEW_LINE>datapoint.setConfigJson(configJson);<NEW_LINE>datapoints.add(datapoint);<NEW_LINE>}<NEW_LINE>describeExporterOutputListResponse.setDatapoints(datapoints);<NEW_LINE>return describeExporterOutputListResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeExporterOutputListResponse.Message"));
1,605,022
protected void execute(final Event e) {<NEW_LINE>if (potionEffect) {<NEW_LINE>for (LivingEntity livingEntity : entities.getArray(e)) {<NEW_LINE>PotionEffect[] potionEffects = this.potionEffects.getArray(e);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>final PotionEffectType[] ts = potions.getArray(e);<NEW_LINE>if (ts.length == 0)<NEW_LINE>return;<NEW_LINE>if (!apply) {<NEW_LINE>for (LivingEntity en : entities.getArray(e)) {<NEW_LINE>for (final PotionEffectType t : ts) en.removePotionEffect(t);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int a = 0;<NEW_LINE>if (tier != null) {<NEW_LINE>final Number amp = tier.getSingle(e);<NEW_LINE>if (amp == null)<NEW_LINE>return;<NEW_LINE>a = amp.intValue() - 1;<NEW_LINE>}<NEW_LINE>int d = DEFAULT_DURATION;<NEW_LINE>if (duration != null) {<NEW_LINE>final Timespan dur = duration.getSingle(e);<NEW_LINE>if (dur == null)<NEW_LINE>return;<NEW_LINE>d = (int) (dur.getTicks_i() >= Integer.MAX_VALUE ? Integer.MAX_VALUE : dur.getTicks_i());<NEW_LINE>}<NEW_LINE>for (final LivingEntity en : entities.getArray(e)) {<NEW_LINE>for (final PotionEffectType t : ts) {<NEW_LINE>int duration = d;<NEW_LINE>if (!replaceExisting) {<NEW_LINE>if (en.hasPotionEffect(t)) {<NEW_LINE>for (final PotionEffect eff : en.getActivePotionEffects()) {<NEW_LINE>if (eff.getType() == t) {<NEW_LINE>duration += eff.getDuration();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>en.addPotionEffect(new PotionEffect(t, duration, a, ambient, particles), true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
PotionEffectUtils.addEffects(livingEntity, potionEffects);
964,019
public void run() {<NEW_LINE>boolean compressed = (mode & EFILE_COMPRESSED) > 0;<NEW_LINE>if (compressed && log.isLoggable(Level.FINE)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>boolean append = (mode & EFILE_MODE_APPEND) > 0;<NEW_LINE>if ((mode & ~(EFILE_MODE_APPEND | EFILE_MODE_READ_WRITE | EFILE_MODE_EXCL)) > 0) {<NEW_LINE>log.warning("ONLY APPEND AND READ_WRITE OPTIONS ARE IMPLEMENTED! mode=" + mode);<NEW_LINE>throw new NotImplemented();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (compressed) {<NEW_LINE>if ((mode & EFILE_MODE_READ_WRITE) == EFILE_MODE_READ_WRITE && append) {<NEW_LINE>posix_errno = Posix.EINVAL;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>log.warning("COMPRESSED NOT IMPLEMENTED!");<NEW_LINE>throw new NotImplemented();<NEW_LINE>} else {<NEW_LINE>if ((mode & EFILE_MODE_EXCL) == EFILE_MODE_EXCL) {<NEW_LINE>file.createNewFile();<NEW_LINE>}<NEW_LINE>switch(mode & EFILE_MODE_READ_WRITE) {<NEW_LINE>case EFILE_MODE_READ:<NEW_LINE>{<NEW_LINE>FileInputStream fo = new FileInputStream(file);<NEW_LINE>fd = fo.getChannel();<NEW_LINE>res_fd = getFDnumber(fo.getFD());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case EFILE_MODE_WRITE:<NEW_LINE>{<NEW_LINE>FileOutputStream fo = new FileOutputStream(file);<NEW_LINE>fd = fo.getChannel();<NEW_LINE>res_fd = getFDnumber(fo.getFD());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case EFILE_MODE_READ_WRITE:<NEW_LINE>{<NEW_LINE>RandomAccessFile rafff;<NEW_LINE>fd = (rafff = new RandomAccessFile(file, "rw")).getChannel();<NEW_LINE>res_fd = getFDnumber(rafff.getFD());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>throw new NotImplemented();<NEW_LINE>}<NEW_LINE>// switch<NEW_LINE>EFile.this.name = file;<NEW_LINE>result_ok = true;<NEW_LINE>}<NEW_LINE>} catch (FileNotFoundException fnfe) {<NEW_LINE>posix_errno = fileNotFound_to_posixErrno(file, mode);<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.log(Level.WARNING, "failed to open file", e);<NEW_LINE>posix_errno = fileNotFound_to_posixErrno(file, mode);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>log.log(Level.WARNING, "failed to open file", e);<NEW_LINE>posix_errno = fileNotFound_to_posixErrno(file, mode);<NEW_LINE>}<NEW_LINE>}
log.fine("EFile.open_compressed " + file_name);
119,209
final UpdateChannelResult executeUpdateChannel(UpdateChannelRequest updateChannelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateChannelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdateChannelRequest> request = null;<NEW_LINE>Response<UpdateChannelResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateChannelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateChannelRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Chime SDK Messaging");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateChannel");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateChannelResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateChannelResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
798,182
public mega.privacy.android.app.protobuf.TombstoneProtos.Thread buildPartial() {<NEW_LINE>mega.privacy.android.app.protobuf.TombstoneProtos.Thread result = new mega.privacy.android.app.protobuf.TombstoneProtos.Thread(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>result.id_ = id_;<NEW_LINE>result.name_ = name_;<NEW_LINE>if (registersBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000004) == 0x00000004)) {<NEW_LINE>registers_ = java.util.Collections.unmodifiableList(registers_);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>result.registers_ = registers_;<NEW_LINE>} else {<NEW_LINE>result.registers_ = registersBuilder_.build();<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000008) == 0x00000008)) {<NEW_LINE>backtraceNote_ = backtraceNote_.getUnmodifiableView();<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000008);<NEW_LINE>}<NEW_LINE>result.backtraceNote_ = backtraceNote_;<NEW_LINE>if (currentBacktraceBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000010) == 0x00000010)) {<NEW_LINE>currentBacktrace_ = java.util.Collections.unmodifiableList(currentBacktrace_);<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000010);<NEW_LINE>}<NEW_LINE>result.currentBacktrace_ = currentBacktrace_;<NEW_LINE>} else {<NEW_LINE>result.currentBacktrace_ = currentBacktraceBuilder_.build();<NEW_LINE>}<NEW_LINE>if (memoryDumpBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000020) == 0x00000020)) {<NEW_LINE>memoryDump_ = java.util.Collections.unmodifiableList(memoryDump_);<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000020);<NEW_LINE>}<NEW_LINE>result.memoryDump_ = memoryDump_;<NEW_LINE>} else {<NEW_LINE>result.memoryDump_ = memoryDumpBuilder_.build();<NEW_LINE>}<NEW_LINE>result.taggedAddrCtrl_ = taggedAddrCtrl_;<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000004);
805,548
public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<ModelMap> allModels) {<NEW_LINE>Map<String, Object> operations = (Map<String, Object>) objs.get("operations");<NEW_LINE>List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");<NEW_LINE>for (CodegenOperation op : operationList) {<NEW_LINE>// force http method to lower case<NEW_LINE>op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT);<NEW_LINE>String[] items = op.path.split("/", -1);<NEW_LINE>String scalaPath = "";<NEW_LINE>int pathParamIndex = 0;<NEW_LINE>for (int i = 0; i < items.length; ++i) {<NEW_LINE>if (items[i].matches("^\\{(.*)\\}$")) {<NEW_LINE>// wrap in {}<NEW_LINE>scalaPath = scalaPath + ":" + items[i].replace("{", "").replace("}", "");<NEW_LINE>pathParamIndex++;<NEW_LINE>} else {<NEW_LINE>scalaPath = scalaPath + items[i];<NEW_LINE>}<NEW_LINE>if (i != items.length - 1) {<NEW_LINE>scalaPath = scalaPath + "/";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>op.<MASK><NEW_LINE>}<NEW_LINE>return objs;<NEW_LINE>}
vendorExtensions.put("x-scalatra-path", scalaPath);
117,591
public void linkModelToMaterialTracking(@NonNull final MTLinkRequest request) {<NEW_LINE>final I_M_Material_Tracking materialTracking = request.getMaterialTrackingRecord();<NEW_LINE>final Object model = request.getModel();<NEW_LINE>final IMaterialTrackingDAO materialTrackingDAO = Services.get(IMaterialTrackingDAO.class);<NEW_LINE>//<NEW_LINE>// Retrieve existing reference<NEW_LINE>// and if exists and it's not linked to our material tracking, delete it<NEW_LINE>final List<I_M_Material_Tracking_Ref> existingRefs = materialTrackingDAO.retrieveMaterialTrackingRefsForModel(model);<NEW_LINE>final Map<Integer, I_M_Material_Tracking_Ref> materialTrackingId2refs = Maps.uniqueIndex(existingRefs, I_M_Material_Tracking_Ref::getM_Material_Tracking_ID);<NEW_LINE>if (!existingRefs.isEmpty()) {<NEW_LINE>final I_M_Material_Tracking_Ref existingRef = materialTrackingId2refs.<MASK><NEW_LINE>if (existingRef != null) {<NEW_LINE>// Case: material tracking was not changed => do nothing<NEW_LINE>final BigDecimal oldQtyIssued = existingRef.getQtyIssued();<NEW_LINE>final boolean needToUpdateQtyIssued = request.getQtyIssued() != null && request.getQtyIssued().compareTo(oldQtyIssued) != 0;<NEW_LINE>final String msg;<NEW_LINE>if (needToUpdateQtyIssued) {<NEW_LINE>msg = ": M_Material_Tracking_ID=" + materialTracking.getM_Material_Tracking_ID() + " of existing M_Material_Tracking_Ref is valid; update qtyIssued from " + oldQtyIssued + " to " + request.getQtyIssued();<NEW_LINE>existingRef.setQtyIssued(request.getQtyIssued());<NEW_LINE>save(existingRef);<NEW_LINE>listeners.afterQtyIssuedChanged(existingRef, oldQtyIssued);<NEW_LINE>} else {<NEW_LINE>msg = ": M_Material_Tracking_ID=" + materialTracking.getM_Material_Tracking_ID() + " of existing M_Material_Tracking_Ref is still valid; nothing to do";<NEW_LINE>}<NEW_LINE>logRequest(request, msg);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// If material tracking don't match and we're going under the assumption that they're already assigned, do NOT drop the assignment to create a new one.<NEW_LINE>// Instead, notify the user that he misconfigured something<NEW_LINE>if (IfModelAlreadyLinked.FAIL.equals(request.getIfModelAlreadyLinked())) {<NEW_LINE>String currentIds = existingRefs.stream().map(ref -> Integer.toString(ref.getM_Material_Tracking_ID())).collect(Collectors.joining(", "));<NEW_LINE>throw new AdempiereException("Cannot assign model to a different material tracking" + "\n Model: " + request.getModel() + "\n Material trackings (current): " + currentIds + "\n Material tracking (new): " + materialTracking);<NEW_LINE>} else if (IfModelAlreadyLinked.UNLINK_FROM_PREVIOUS.equals(request.getIfModelAlreadyLinked())) {<NEW_LINE>final I_M_Material_Tracking_Ref refToUnlink;<NEW_LINE>if (existingRefs.size() == 1 && request.getPreviousMaterialTrackingId() == null) {<NEW_LINE>refToUnlink = existingRefs.get(0);<NEW_LINE>} else {<NEW_LINE>refToUnlink = materialTrackingId2refs.get(request.getPreviousMaterialTrackingId());<NEW_LINE>}<NEW_LINE>if (refToUnlink != null) {<NEW_LINE>// Case: material tracking changed => delete old link<NEW_LINE>unlinkModelFromMaterialTracking(model, refToUnlink);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Create the new link<NEW_LINE>createMaterialTrackingRef(request);<NEW_LINE>}
get(materialTracking.getM_Material_Tracking_ID());
35,722
private void cullRamerDouglasPeucer(boolean[] survivor, int start, int end) {<NEW_LINE>double dmax = Double.NEGATIVE_INFINITY;<NEW_LINE>int index = -1;<NEW_LINE>WptPt startPt = rs.points.get(start);<NEW_LINE>WptPt endPt = rs.points.get(end);<NEW_LINE>for (int i = start + 1; i < end && !isCancelled(); i++) {<NEW_LINE>WptPt pt = rs.points.get(i);<NEW_LINE>double d = MapUtils.getOrthogonalDistance(pt.lat, pt.lon, startPt.lat, startPt.lon, endPt.lat, endPt.lon);<NEW_LINE>if (d > dmax) {<NEW_LINE>dmax = d;<NEW_LINE>index = i;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (dmax > epsilon) {<NEW_LINE><MASK><NEW_LINE>cullRamerDouglasPeucer(survivor, index, end);<NEW_LINE>} else {<NEW_LINE>survivor[end] = true;<NEW_LINE>}<NEW_LINE>}
cullRamerDouglasPeucer(survivor, start, index);
460,615
private void generateInvoicesIfNeeded() {<NEW_LINE>Check.assumeNotNull(shipmentsGenerateResult, "shipments generated");<NEW_LINE>final List<I_M_InOut> shipments = shipmentsGenerateResult.getInOuts();<NEW_LINE>if (shipments.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (invoiceMode == BillAssociatedInvoiceCandidates.NO) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Set<InvoiceCandidateId> invoiceCandidateIds = invoiceCandDAO.retrieveInvoiceCandidatesQueryForInOuts(shipments).listIds(InvoiceCandidateId::ofRepoId);<NEW_LINE>if (invoiceCandidateIds.isEmpty()) {<NEW_LINE>throw new AdempiereException("@NotFound@ @C_Invoice_Candidate_ID@").setParameter("shipments", shipments);<NEW_LINE>}<NEW_LINE>final PlainInvoicingParams invoicingParams = new PlainInvoicingParams();<NEW_LINE>final <MASK><NEW_LINE>invoicingParams.setIgnoreInvoiceSchedule(!adhereToInvoiceSchedule);<NEW_LINE>// e.g. "packaging" ICs from shipments might lack the order's payment term, but we still want them to be in the same invoice, unless they explicitly have a different payment term.<NEW_LINE>invoicingParams.setSupplementMissingPaymentTermIds(true);<NEW_LINE>final IInvoiceCandidateEnqueueResult enqueueResult = //<NEW_LINE>invoiceCandBL.enqueueForInvoicing().setFailOnChanges(false).setInvoicingParams(invoicingParams).enqueueInvoiceCandidateIds(invoiceCandidateIds);<NEW_LINE>Loggables.addLog("Invoice candidates enqueued: {}", enqueueResult);<NEW_LINE>}
boolean adhereToInvoiceSchedule = invoiceMode == BillAssociatedInvoiceCandidates.IF_INVOICE_SCHEDULE_PERMITS;
953,509
public void onClick(View v) {<NEW_LINE>Date date;<NEW_LINE>hideKeyboard(mToDoTextBodyEditText);<NEW_LINE>if (mUserToDoItem.getToDoDate() != null) {<NEW_LINE>// date = mUserToDoItem.getToDoDate();<NEW_LINE>date = mUserReminderDate;<NEW_LINE>} else {<NEW_LINE>date = new Date();<NEW_LINE>}<NEW_LINE>Calendar calendar = Calendar.getInstance();<NEW_LINE>calendar.setTime(date);<NEW_LINE>int year = <MASK><NEW_LINE>int month = calendar.get(Calendar.MONTH);<NEW_LINE>int day = calendar.get(Calendar.DAY_OF_MONTH);<NEW_LINE>DatePickerDialog datePickerDialog = DatePickerDialog.newInstance(AddToDoFragment.this, year, month, day);<NEW_LINE>if (theme.equals(MainFragment.DARKTHEME)) {<NEW_LINE>datePickerDialog.setThemeDark(true);<NEW_LINE>}<NEW_LINE>datePickerDialog.show(getActivity().getFragmentManager(), "DateFragment");<NEW_LINE>}
calendar.get(Calendar.YEAR);
1,211,434
public void bridgeStatusChanged(final ThingStatusInfo bridgeStatusInfo) {<NEW_LINE>logger.debug("DEV {}: Controller status is {}", unitId, bridgeStatusInfo.getStatus());<NEW_LINE>if (bridgeStatusInfo.getStatus() != ThingStatus.ONLINE) {<NEW_LINE>updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE, Constants.OFFLINE_CTLR_OFFLINE);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>logger.debug("DEV {}: Controller is ONLINE. Starting device initialisation.", unitId);<NEW_LINE>final Bridge bridge = getBridge();<NEW_LINE>if (bridge == null) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final PIMHandler bridgeHandler = (PIMHandler) bridge.getHandler();<NEW_LINE>if (bridgeHandler == null) {<NEW_LINE>logger.debug("DEV {}: bridge handler is null!", unitId);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>updateDeviceStatus(bridgeHandler);<NEW_LINE>pingDevice();<NEW_LINE>}
logger.debug("DEV {}: bridge is null!", unitId);
1,329,244
private SubTaskGroup createRootVolumeCreationTasks(List<NodeDetails> nodes) {<NEW_LINE>Map<UUID, List<NodeDetails>> rootVolumesPerAZ = nodes.stream().collect(Collectors.groupingBy(n -> n.azUuid));<NEW_LINE>SubTaskGroup subTaskGroup = getTaskExecutor().createSubTaskGroup("CreateRootVolumes", executor);<NEW_LINE>rootVolumesPerAZ.forEach((key, value) -> {<NEW_LINE>NodeDetails node = value.get(0);<NEW_LINE>UUID region = taskParams().nodeToRegion.get(node.nodeUuid);<NEW_LINE>String machineImage = taskParams().machineImages.get(region);<NEW_LINE>int numVolumes = value.size();<NEW_LINE>if (!taskParams().forceVMImageUpgrade) {<NEW_LINE>numVolumes = (int) value.stream().filter(n -> !machineImage.equals(n.machineImage)).count();<NEW_LINE>}<NEW_LINE>if (numVolumes == 0) {<NEW_LINE>log.info("Nothing to upgrade in AZ {}", node.cloudInfo.az);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CreateRootVolumes.Params params = new CreateRootVolumes.Params();<NEW_LINE>Cluster cluster = taskParams(<MASK><NEW_LINE>if (cluster == null) {<NEW_LINE>throw new IllegalArgumentException("No cluster available with UUID: " + node.placementUuid);<NEW_LINE>}<NEW_LINE>UserIntent userIntent = cluster.userIntent;<NEW_LINE>fillCreateParamsForNode(params, userIntent, node);<NEW_LINE>params.numVolumes = numVolumes;<NEW_LINE>params.machineImage = machineImage;<NEW_LINE>params.bootDisksPerZone = this.replacementRootVolumes;<NEW_LINE>log.info("Creating {} root volumes using {} in AZ {}", params.numVolumes, params.machineImage, node.cloudInfo.az);<NEW_LINE>CreateRootVolumes task = createTask(CreateRootVolumes.class);<NEW_LINE>task.initialize(params);<NEW_LINE>subTaskGroup.addSubTask(task);<NEW_LINE>});<NEW_LINE>getRunnableTask().addSubTaskGroup(subTaskGroup);<NEW_LINE>return subTaskGroup;<NEW_LINE>}
).getClusterByUuid(node.placementUuid);
1,570,492
final CreateEventDataStoreResult executeCreateEventDataStore(CreateEventDataStoreRequest createEventDataStoreRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createEventDataStoreRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateEventDataStoreRequest> request = null;<NEW_LINE>Response<CreateEventDataStoreResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateEventDataStoreRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createEventDataStoreRequest));<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, "CloudTrail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateEventDataStore");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateEventDataStoreResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateEventDataStoreResultJsonUnmarshaller());<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());
817,006
public static Optional<JwkEcPublicKey> tryDecodeEcKey(String keyId, Key key) {<NEW_LINE>// alg field is optional so not verified<NEW_LINE>// use field is optional so not verified<NEW_LINE>Optional<String> curveName = key.getStringProperty("crv");<NEW_LINE>Optional<ECParameterSpec> curve = curveName.flatMap(EcCurve::tryGet);<NEW_LINE>if (curve.isEmpty()) {<NEW_LINE>log.error("JWK EC %s curve '%s' is not supported", keyId, curveName);<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>Optional<BigInteger> x = key.getStringProperty("x").flatMap(encodedX -> decodeBigint<MASK><NEW_LINE>if (x.isEmpty()) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>Optional<BigInteger> y = key.getStringProperty("y").flatMap(encodedY -> decodeBigint(keyId, "y", encodedY));<NEW_LINE>if (y.isEmpty()) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>ECPoint w = new ECPoint(x.get(), y.get());<NEW_LINE>return Optional.of(new JwkEcPublicKey(keyId, curve.get(), w));<NEW_LINE>}
(keyId, "x", encodedX));
745,996
public RankerScorer scorer(LeafReaderContext context) throws IOException {<NEW_LINE>List<Scorer> scorers = new ArrayList<>(weights.size());<NEW_LINE>DisiPriorityQueue disiPriorityQueue = new DisiPriorityQueue(weights.size());<NEW_LINE>for (Weight weight : weights) {<NEW_LINE>Scorer scorer = weight.scorer(context);<NEW_LINE>if (scorer == null) {<NEW_LINE>scorer = new NoopScorer(this, DocIdSetIterator.empty());<NEW_LINE>}<NEW_LINE>scorers.add(scorer);<NEW_LINE>disiPriorityQueue.<MASK><NEW_LINE>}<NEW_LINE>DisjunctionDISI rankerIterator = new DisjunctionDISI(DocIdSetIterator.all(context.reader().maxDoc()), disiPriorityQueue, context.docBase, featureScoreCache);<NEW_LINE>return new RankerScorer(scorers, rankerIterator, ranker, context.docBase, featureScoreCache);<NEW_LINE>}
add(new DisiWrapper(scorer));
360,354
public static LeafSlice[] slices(List<LeafReaderContext> leaves, int maxDocsPerSlice, int maxSegmentsPerSlice) {<NEW_LINE>// Make a copy so we can sort:<NEW_LINE>List<LeafReaderContext> sortedLeaves = new ArrayList<>(leaves);<NEW_LINE>// Sort by maxDoc, descending:<NEW_LINE>Collections.sort(sortedLeaves, Collections.reverseOrder(Comparator.comparingInt(l -> l.reader(<MASK><NEW_LINE>final List<List<LeafReaderContext>> groupedLeaves = new ArrayList<>();<NEW_LINE>long docSum = 0;<NEW_LINE>List<LeafReaderContext> group = null;<NEW_LINE>for (LeafReaderContext ctx : sortedLeaves) {<NEW_LINE>if (ctx.reader().maxDoc() > maxDocsPerSlice) {<NEW_LINE>assert group == null;<NEW_LINE>groupedLeaves.add(Collections.singletonList(ctx));<NEW_LINE>} else {<NEW_LINE>if (group == null) {<NEW_LINE>group = new ArrayList<>();<NEW_LINE>group.add(ctx);<NEW_LINE>groupedLeaves.add(group);<NEW_LINE>} else {<NEW_LINE>group.add(ctx);<NEW_LINE>}<NEW_LINE>docSum += ctx.reader().maxDoc();<NEW_LINE>if (group.size() >= maxSegmentsPerSlice || docSum > maxDocsPerSlice) {<NEW_LINE>group = null;<NEW_LINE>docSum = 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LeafSlice[] slices = new LeafSlice[groupedLeaves.size()];<NEW_LINE>int upto = 0;<NEW_LINE>for (List<LeafReaderContext> currentLeaf : groupedLeaves) {<NEW_LINE>slices[upto] = new LeafSlice(currentLeaf);<NEW_LINE>++upto;<NEW_LINE>}<NEW_LINE>return slices;<NEW_LINE>}
).maxDoc())));
986,408
public MVMap.Decision decide(Record existingValue, Record providedValue) {<NEW_LINE>assert decision == null;<NEW_LINE>if (existingValue == null) {<NEW_LINE>// normally existingValue will always be there except of db initialization<NEW_LINE>// where some undo log entry was captured on disk but actual map entry was not<NEW_LINE>decision = MVMap.Decision.ABORT;<NEW_LINE>} else {<NEW_LINE>VersionedValue<Object> valueToRestore = existingValue.oldValue;<NEW_LINE>long operationId;<NEW_LINE>if (valueToRestore == null || (operationId = valueToRestore.getOperationId()) == 0 || TransactionStore.getTransactionId(operationId) == transactionId && TransactionStore.getLogId(operationId) < toLogId) {<NEW_LINE>int mapId = existingValue.mapId;<NEW_LINE>MVMap<Object, VersionedValue<Object>> map = store.openMap(mapId);<NEW_LINE>if (map != null && !map.isClosed()) {<NEW_LINE>Object key = existingValue.key;<NEW_LINE>VersionedValue<Object> previousValue = map.operate(key, <MASK><NEW_LINE>listener.onRollback(map, key, previousValue, valueToRestore);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>decision = MVMap.Decision.REMOVE;<NEW_LINE>}<NEW_LINE>return decision;<NEW_LINE>}
valueToRestore, MVMap.DecisionMaker.DEFAULT);
340,729
final ListInventoryEntriesResult executeListInventoryEntries(ListInventoryEntriesRequest listInventoryEntriesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listInventoryEntriesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListInventoryEntriesRequest> request = null;<NEW_LINE>Response<ListInventoryEntriesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListInventoryEntriesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listInventoryEntriesRequest));<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, "SSM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListInventoryEntries");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListInventoryEntriesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListInventoryEntriesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
194,532
void logResponseHeader(long seqId, String serviceName, String methodName, Metadata metadata, int maxHeaderBytes, GrpcLogRecord.EventLogger eventLogger, String rpcId, @Nullable SocketAddress peerAddress) {<NEW_LINE>checkNotNull(serviceName, "serviceName");<NEW_LINE>checkNotNull(methodName, "methodName");<NEW_LINE>checkNotNull(rpcId, "rpcId");<NEW_LINE>// Logging peer address only on the first incoming event. On server side, peer address will<NEW_LINE>// of logging request header<NEW_LINE>checkArgument(peerAddress == null || eventLogger == <MASK><NEW_LINE>PayloadBuilder<GrpcLogRecord.Metadata.Builder> pair = createMetadataProto(metadata, maxHeaderBytes);<NEW_LINE>GrpcLogRecord.Builder logEntryBuilder = createTimestamp().setSequenceId(seqId).setServiceName(serviceName).setMethodName(methodName).setEventType(EventType.GRPC_CALL_RESPONSE_HEADER).setEventLogger(eventLogger).setLogLevel(LogLevel.LOG_LEVEL_DEBUG).setMetadata(pair.payload).setPayloadSize(pair.size).setPayloadTruncated(pair.truncated).setRpcId(rpcId);<NEW_LINE>if (peerAddress != null) {<NEW_LINE>logEntryBuilder.setPeerAddress(socketAddressToProto(peerAddress));<NEW_LINE>}<NEW_LINE>sink.write(logEntryBuilder.build());<NEW_LINE>}
GrpcLogRecord.EventLogger.LOGGER_CLIENT, "peerAddress can only be specified for client");
695,750
private void initDataTypeConstMap() {<NEW_LINE>for (int i = 0; i < DataTypeSensorToCK.values().length - 1; i++) {<NEW_LINE>DataTypeSensorToCK dt = DataTypeSensorToCK.values()[i];<NEW_LINE>if (i > this.getEntry().getDataTypeConst().size() - 1) {<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), null);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String s = this.getEntry().getDataTypeConst().get(i);<NEW_LINE>if ("NULL".equalsIgnoreCase(s)) {<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), null);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>switch(dt) {<NEW_LINE>case NUMBER:<NEW_LINE>dataTypeConstMap.put(dt.getIndex()<MASK><NEW_LINE>break;<NEW_LINE>case STRING:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), s);<NEW_LINE>break;<NEW_LINE>case LIST:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), s);<NEW_LINE>break;<NEW_LINE>case DATE:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), Long.valueOf(s));<NEW_LINE>break;<NEW_LINE>case DATETIME:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), Long.valueOf(s));<NEW_LINE>break;<NEW_LINE>case BOOL:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), Integer.valueOf(s));<NEW_LINE>break;<NEW_LINE>case UNKNOWN:<NEW_LINE>dataTypeConstMap.put(dt.getIndex(), null);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, Long.valueOf(s));
1,634,941
public CompletableFuture<Void> retention(Stream stream) {<NEW_LINE>// Track the new request for this automatic truncation.<NEW_LINE>long requestId = requestIdGenerator.get();<NEW_LINE>String requestDescriptor = RequestTracker.buildRequestDescriptor("truncateStream", stream.getScope(), stream.getStreamName());<NEW_LINE>requestTracker.trackRequest(requestDescriptor, requestId);<NEW_LINE>OperationContext context = streamMetadataStore.createStreamContext(stream.getScope(), stream.getStreamName(), requestId);<NEW_LINE>log.debug(requestId, "Periodic background processing for retention called for stream {}/{}", stream.getScope(), stream.getStreamName());<NEW_LINE>return RetryHelper.withRetriesAsync(() -> streamMetadataStore.getConfiguration(stream.getScope(), stream.getStreamName(), context, executor).thenCompose(config -> streamMetadataTasks.retention(stream.getScope(), stream.getStreamName(), config.getRetentionPolicy(), System.currentTimeMillis(), context, this.streamMetadataTasks.retrieveDelegationToken())).exceptionally(e -> {<NEW_LINE>log.warn(requestId, "Exception thrown while performing auto retention for stream {} ", stream, e);<NEW_LINE>throw new CompletionException(e);<NEW_LINE>}), RetryHelper.UNCONDITIONAL_PREDICATE, 5, executor).exceptionally(e -> {<NEW_LINE>log.warn(requestId, "Unable to perform retention for stream {}. " + "Ignoring, retention will be attempted in next cycle.", stream, e);<NEW_LINE>return null;<NEW_LINE>}).thenRun(() <MASK><NEW_LINE>}
-> requestTracker.untrackRequest(requestDescriptor));
435,411
public org.python.Object __add__(org.python.Object other) {<NEW_LINE>if (other instanceof org.python.types.Int) {<NEW_LINE>long other_val = ((org.python.types.Int) other).value;<NEW_LINE>return new org.python.types.Float(this.value <MASK><NEW_LINE>} else if (other instanceof org.python.types.Bool) {<NEW_LINE>if (((org.python.types.Bool) other).value) {<NEW_LINE>return new org.python.types.Float(this.value + 1.0);<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>} else if (other instanceof org.python.types.Float) {<NEW_LINE>double other_val = ((org.python.types.Float) other).value;<NEW_LINE>return new org.python.types.Float(this.value + other_val);<NEW_LINE>} else if (other instanceof org.python.types.Complex) {<NEW_LINE>return ((org.python.types.Complex) other).__add__(this);<NEW_LINE>}<NEW_LINE>throw new org.python.exceptions.TypeError("unsupported operand type(s) for +: 'float' and '" + other.typeName() + "'");<NEW_LINE>}
+ ((double) other_val));
10,618
private String resolveHighestArtifactVersion(String stubsGroup, String stubsModule, String classifier, String version) {<NEW_LINE>Artifact artifact = new DefaultArtifact(stubsGroup, stubsModule, classifier, ARTIFACT_EXTENSION, version);<NEW_LINE>VersionRangeRequest versionRangeRequest = new VersionRangeRequest(artifact, this.remoteRepos, null);<NEW_LINE>VersionRangeResult rangeResult;<NEW_LINE>try {<NEW_LINE>rangeResult = this.repositorySystem.resolveVersionRange(this.session, versionRangeRequest);<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Resolved version range is [" + rangeResult + "]");<NEW_LINE>}<NEW_LINE>} catch (VersionRangeResolutionException e) {<NEW_LINE>throw new IllegalStateException("Cannot resolve version range", e);<NEW_LINE>}<NEW_LINE>if (rangeResult.getHighestVersion() == null) {<NEW_LINE>throw new IllegalArgumentException("For groupId [" + stubsGroup + "] artifactId [" + stubsModule + "] " + "and classifier [" + classifier + "] the version was not resolved! The following exceptions took place " + rangeResult.getExceptions());<NEW_LINE>}<NEW_LINE>return rangeResult.getHighestVersion() == null ? null : rangeResult<MASK><NEW_LINE>}
.getHighestVersion().toString();
1,343,573
public void postInit(KeycloakSessionFactory factory) {<NEW_LINE>List<String> clientAuthProviders = factory.getProviderFactoriesStream(ClientAuthenticator.class).map(ProviderFactory::getId).<MASK><NEW_LINE>ProviderConfigProperty allowedClientAuthenticatorsProperty = new ProviderConfigProperty(ALLOWED_CLIENT_AUTHENTICATORS, "Allowed Client Authenticators", "List of available client authentication methods, which are allowed for clients to use. Other client authentication methods will not be allowed.", ProviderConfigProperty.MULTIVALUED_LIST_TYPE, null);<NEW_LINE>allowedClientAuthenticatorsProperty.setOptions(clientAuthProviders);<NEW_LINE>ProviderConfigProperty autoConfiguredClientAuthenticator = new ProviderConfigProperty(DEFAULT_CLIENT_AUTHENTICATOR, "Default Client Authenticator", "This client authentication method will be set as the authentication method to new clients during register/update request of the client in case that client does not have explicitly set other client authenticator method. If it is not set, then the client authenticator won't be set on new clients. Regardless the value of this option, client is still always validated to match with any of the allowed client authentication methods", ProviderConfigProperty.LIST_TYPE, JWTClientAuthenticator.PROVIDER_ID);<NEW_LINE>autoConfiguredClientAuthenticator.setOptions(clientAuthProviders);<NEW_LINE>configProperties = Arrays.asList(allowedClientAuthenticatorsProperty, autoConfiguredClientAuthenticator);<NEW_LINE>}
collect(Collectors.toList());
574,437
public void marshall(Contact contact, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (contact == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(contact.getArn(), ARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getId(), ID_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getInitialContactId(), INITIALCONTACTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getPreviousContactId(), PREVIOUSCONTACTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getInitiationMethod(), INITIATIONMETHOD_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(contact.getChannel(), CHANNEL_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getQueueInfo(), QUEUEINFO_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getAgentInfo(), AGENTINFO_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getInitiationTimestamp(), INITIATIONTIMESTAMP_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getDisconnectTimestamp(), DISCONNECTTIMESTAMP_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getLastUpdateTimestamp(), LASTUPDATETIMESTAMP_BINDING);<NEW_LINE>protocolMarshaller.marshall(contact.getScheduledTimestamp(), SCHEDULEDTIMESTAMP_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
contact.getDescription(), DESCRIPTION_BINDING);
1,521,882
// Example usage of how to compute the diameter of a graph<NEW_LINE>public static void main(String[] args) {<NEW_LINE>Map<Integer, List<Edge>> graph = createGraph(5);<NEW_LINE>addUndirectedEdge(graph, 4, 2);<NEW_LINE>addUndirectedEdge(graph, 2, 0);<NEW_LINE>addUndirectedEdge(graph, 0, 1);<NEW_LINE>addUndirectedEdge(graph, 1, 2);<NEW_LINE>addUndirectedEdge(graph, 1, 3);<NEW_LINE>int diameter = graphDiameter(graph);<NEW_LINE>if (diameter != 3)<NEW_LINE>System.out.println("Wrong diameter!");<NEW_LINE>// No edges<NEW_LINE>graph = createGraph(5);<NEW_LINE>diameter = graphDiameter(graph);<NEW_LINE>if (diameter != 0)<NEW_LINE>System.out.println("Wrong diameter!");<NEW_LINE>graph = createGraph(8);<NEW_LINE>addUndirectedEdge(graph, 0, 5);<NEW_LINE>addUndirectedEdge(graph, 1, 5);<NEW_LINE>addUndirectedEdge(graph, 2, 5);<NEW_LINE>addUndirectedEdge(graph, 3, 5);<NEW_LINE>addUndirectedEdge(graph, 4, 5);<NEW_LINE><MASK><NEW_LINE>addUndirectedEdge(graph, 7, 5);<NEW_LINE>diameter = graphDiameter(graph);<NEW_LINE>if (diameter != 2)<NEW_LINE>System.out.println("Wrong diameter!");<NEW_LINE>graph = createGraph(9);<NEW_LINE>addUndirectedEdge(graph, 0, 5);<NEW_LINE>addUndirectedEdge(graph, 1, 5);<NEW_LINE>addUndirectedEdge(graph, 2, 5);<NEW_LINE>addUndirectedEdge(graph, 3, 5);<NEW_LINE>addUndirectedEdge(graph, 4, 5);<NEW_LINE>addUndirectedEdge(graph, 6, 5);<NEW_LINE>addUndirectedEdge(graph, 7, 5);<NEW_LINE>addUndirectedEdge(graph, 3, 8);<NEW_LINE>diameter = graphDiameter(graph);<NEW_LINE>if (diameter != 3)<NEW_LINE>System.out.println("Wrong diameter!");<NEW_LINE>}
addUndirectedEdge(graph, 6, 5);
1,506,607
public Aggregation toDruidAggregation(final PlannerContext plannerContext, final RowSignature rowSignature, final VirtualColumnRegistry virtualColumnRegistry, final RexBuilder rexBuilder, final String name, final AggregateCall aggregateCall, final Project project, final List<Aggregation> existingAggregations, final boolean finalizeAggregations) {<NEW_LINE>final List<RexNode> rexNodes = aggregateCall.getArgList().stream().map(i -> Expressions.fromFieldAccess(rowSignature, project, i)).<MASK><NEW_LINE>final List<DruidExpression> args = Expressions.toDruidExpressions(plannerContext, rowSignature, rexNodes);<NEW_LINE>if (args == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final String aggregatorName = finalizeAggregations ? Calcites.makePrefixedName(name, "a") : name;<NEW_LINE>final ColumnType outputType = Calcites.getColumnTypeForRelDataType(aggregateCall.getType());<NEW_LINE>if (outputType == null) {<NEW_LINE>throw new ISE("Cannot translate output sqlTypeName[%s] to Druid type for aggregator[%s]", aggregateCall.getType().getSqlTypeName(), aggregateCall.getName());<NEW_LINE>}<NEW_LINE>final String fieldName = getColumnName(plannerContext, virtualColumnRegistry, args.get(0), rexNodes.get(0));<NEW_LINE>final AggregatorFactory theAggFactory;<NEW_LINE>switch(args.size()) {<NEW_LINE>case 1:<NEW_LINE>theAggFactory = aggregatorType.createAggregatorFactory(aggregatorName, fieldName, null, outputType, -1);<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>theAggFactory = aggregatorType.createAggregatorFactory(aggregatorName, fieldName, null, outputType, RexLiteral.intValue(rexNodes.get(1)));<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IAE("aggregation[%s], Invalid number of arguments[%,d] to [%s] operator", aggregatorName, args.size(), aggregatorType.name());<NEW_LINE>}<NEW_LINE>return Aggregation.create(Collections.singletonList(theAggFactory), finalizeAggregations ? new FinalizingFieldAccessPostAggregator(name, aggregatorName) : null);<NEW_LINE>}
collect(Collectors.toList());
1,059,137
public void update(Set<UUID> activeClientIds) {<NEW_LINE>long currentTimeNano = System.nanoTime();<NEW_LINE>List<QueryClientState> victims = new ArrayList<>();<NEW_LINE>for (QueryClientState clientCursor : clientCursors.values()) {<NEW_LINE>// Close cursors that were opened by disconnected clients.<NEW_LINE>if (!activeClientIds.contains(clientCursor.getClientId())) {<NEW_LINE>victims.add(clientCursor);<NEW_LINE>}<NEW_LINE>// Close cursors created for the "cancel" operation, that are too old. This is needed to avoid a race<NEW_LINE>// condition between the query cancellation on a client and the query completion on a server.<NEW_LINE>if (clientCursor.isClosed() && clientCursor.getCreatedAtNano() + closedCursorCleanupTimeoutNs < currentTimeNano) {<NEW_LINE>victims.add(clientCursor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (QueryClientState victim : victims) {<NEW_LINE>QueryException error = QueryException.<MASK><NEW_LINE>AbstractSqlResult result = victim.getSqlResult();<NEW_LINE>if (result != null) {<NEW_LINE>result.close(error);<NEW_LINE>}<NEW_LINE>deleteClientCursor(victim.getQueryId());<NEW_LINE>}<NEW_LINE>}
clientMemberConnection(victim.getClientId());
1,806,475
private void initSkullItem(ItemStack skullStack) {<NEW_LINE>if (skullStack.hasTagCompound()) {<NEW_LINE><MASK><NEW_LINE>GameProfile gameProfile = null;<NEW_LINE>if (nbttagcompound.hasKey("SkullOwner", NBT.TAG_COMPOUND)) {<NEW_LINE>gameProfile = NBTUtil.readGameProfileFromNBT(nbttagcompound.getCompoundTag("SkullOwner"));<NEW_LINE>} else if (nbttagcompound.hasKey("SkullOwner", NBT.TAG_STRING) && !StringUtils.isNullOrEmpty(nbttagcompound.getString("SkullOwner"))) {<NEW_LINE>gameProfile = new GameProfile(null, nbttagcompound.getString("SkullOwner"));<NEW_LINE>}<NEW_LINE>if (gameProfile != null && !StringUtils.isNullOrEmpty(gameProfile.getName())) {<NEW_LINE>if (!gameProfile.isComplete() || !gameProfile.getProperties().containsKey("textures")) {<NEW_LINE>// TODO: FIND OUT HOW SKULLS LOAD GAME PROFILES<NEW_LINE>// gameProfile = MinecraftServer.getServer().getGameProfileRepository().(gameProfile.getName());<NEW_LINE>if (gameProfile != null) {<NEW_LINE>Property property = (Property) Iterables.getFirst(gameProfile.getProperties().get("textures"), (Object) null);<NEW_LINE>if (property == null) {<NEW_LINE>// gameProfile =<NEW_LINE>// MinecraftServer.getServer().func_147130_as().fillProfileProperties(gameProfile, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (gameProfile != null && gameProfile.isComplete() && gameProfile.getProperties().containsKey("textures")) {<NEW_LINE>NBTTagCompound profileNBT = new NBTTagCompound();<NEW_LINE>NBTUtil.writeGameProfile(profileNBT, gameProfile);<NEW_LINE>nbttagcompound.setTag("SkullOwner", profileNBT);<NEW_LINE>} else {<NEW_LINE>nbttagcompound.removeTag("SkullOwner");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
NBTTagCompound nbttagcompound = skullStack.getTagCompound();
118,199
public String invoice(final ICalloutField calloutField) {<NEW_LINE>final I_C_PaymentAllocate paymentAlloc = calloutField.getModel(I_C_PaymentAllocate.class);<NEW_LINE>final int C_Invoice_ID = paymentAlloc.getC_Invoice_ID();<NEW_LINE>if (// assuming it is resetting value<NEW_LINE>isCalloutActive() || C_Invoice_ID <= 0) {<NEW_LINE>return NO_ERROR;<NEW_LINE>}<NEW_LINE>// Check Payment<NEW_LINE>// final int C_Payment_ID = paymentAlloc.getC_Payment_ID();<NEW_LINE>final I_C_Payment payment = paymentAlloc.getC_Payment();<NEW_LINE>if (payment.getC_Charge_ID() > 0 || payment.getC_Invoice_ID() > 0 || payment.getC_Order_ID() > 0) {<NEW_LINE>throw new AdempiereException("@PaymentIsAllocated@");<NEW_LINE>}<NEW_LINE>paymentAlloc.setDiscountAmt(BigDecimal.ZERO);<NEW_LINE>paymentAlloc.setWriteOffAmt(BigDecimal.ZERO);<NEW_LINE>paymentAlloc.setOverUnderAmt(BigDecimal.ZERO);<NEW_LINE>int C_InvoicePaySchedule_ID = 0;<NEW_LINE>if (calloutField.getTabInfoContextAsInt("C_Invoice_ID") == C_Invoice_ID && calloutField.getTabInfoContextAsInt("C_InvoicePaySchedule_ID") > 0) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// Payment Date<NEW_LINE>final Timestamp ts = paymentAlloc.getC_Payment().getDateTrx();<NEW_LINE>//<NEW_LINE>final // 1..2<NEW_LINE>String // 1..2<NEW_LINE>sql = // 3 #1<NEW_LINE>"SELECT C_BPartner_ID,C_Currency_ID," + // 4..5 #2/3<NEW_LINE>" invoiceOpen(C_Invoice_ID, ?)," + // #4<NEW_LINE>" invoiceDiscount(C_Invoice_ID,?,?), IsSOTrx " + "FROM C_Invoice WHERE C_Invoice_ID=?";<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sql, ITrx.TRXNAME_None);<NEW_LINE>pstmt.setInt(1, C_InvoicePaySchedule_ID);<NEW_LINE>pstmt.setTimestamp(2, ts);<NEW_LINE>pstmt.setInt(3, C_InvoicePaySchedule_ID);<NEW_LINE>pstmt.setInt(4, C_Invoice_ID);<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>if (rs.next()) {<NEW_LINE>// mTab.setValue("C_BPartner_ID", new Integer(rs.getInt(1)));<NEW_LINE>// int C_Currency_ID = rs.getInt(2); // Set Invoice Currency<NEW_LINE>// mTab.setValue("C_Currency_ID", new Integer(C_Currency_ID));<NEW_LINE>//<NEW_LINE>// Set Invoice OPen Amount<NEW_LINE>BigDecimal InvoiceOpen = rs.getBigDecimal(3);<NEW_LINE>if (InvoiceOpen == null) {<NEW_LINE>InvoiceOpen = BigDecimal.ZERO;<NEW_LINE>}<NEW_LINE>// Set Discount Amt<NEW_LINE>BigDecimal DiscountAmt = rs.getBigDecimal(4);<NEW_LINE>if (DiscountAmt == null) {<NEW_LINE>DiscountAmt = BigDecimal.ZERO;<NEW_LINE>}<NEW_LINE>paymentAlloc.setInvoiceAmt(InvoiceOpen);<NEW_LINE>paymentAlloc.setAmount(InvoiceOpen.subtract(DiscountAmt));<NEW_LINE>paymentAlloc.setDiscountAmt(DiscountAmt);<NEW_LINE>}<NEW_LINE>} catch (final SQLException e) {<NEW_LINE>throw new DBException(e, sql);<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>rs = null;<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>return NO_ERROR;<NEW_LINE>}
C_InvoicePaySchedule_ID = calloutField.getTabInfoContextAsInt("C_InvoicePaySchedule_ID");
472,055
private BufferedImage generateAtlas(int mipMapLevel, List<BlockTile> tileImages, Color clearColor) {<NEW_LINE>int size = atlasSize / (1 << mipMapLevel);<NEW_LINE>int textureSize = tileSize / (1 << mipMapLevel);<NEW_LINE>int tilesPerDim = atlasSize / tileSize;<NEW_LINE>BufferedImage result = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>Graphics g = result.getGraphics();<NEW_LINE>g.setColor(clearColor);<NEW_LINE>g.fillRect(0, 0, size, size);<NEW_LINE>int totalIndex = 0;<NEW_LINE>for (int tileIndex = 0; tileIndex < tileImages.size(); tileIndex++) {<NEW_LINE>BlockTile <MASK><NEW_LINE>if (tile == null) {<NEW_LINE>totalIndex++;<NEW_LINE>} else {<NEW_LINE>for (int frameIndex = 0; frameIndex < tile.getLength(); frameIndex++) {<NEW_LINE>int posX = totalIndex % tilesPerDim;<NEW_LINE>int posY = totalIndex / tilesPerDim;<NEW_LINE>g.drawImage(tile.getImage(frameIndex).getScaledInstance(textureSize, textureSize, Image.SCALE_SMOOTH), posX * textureSize, posY * textureSize, null);<NEW_LINE>totalIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
tile = tileImages.get(tileIndex);
1,184,135
public <T> CancellablePromise<T> submit(@Nonnull Callable<? extends T> task) {<NEW_LINE>final AsyncPromise<T> promise = new AsyncPromise<>();<NEW_LINE>if (myExpiration != null) {<NEW_LINE>final Expiration.Handle expirationHandle = myExpiration.invokeOnExpiration(promise::cancel);<NEW_LINE>promise.onProcessed(<MASK><NEW_LINE>}<NEW_LINE>final BooleanSupplier condition = () -> {<NEW_LINE>if (promise.isCancelled())<NEW_LINE>return false;<NEW_LINE>if (myExpiration != null && myExpiration.isExpired())<NEW_LINE>return false;<NEW_LINE>if (myCancellationCondition != null && myCancellationCondition.getAsBoolean()) {<NEW_LINE>promise.cancel();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>};<NEW_LINE>myExecutionScheduler.scheduleWithinConstraints(() -> {<NEW_LINE>try {<NEW_LINE>final T result = task.call();<NEW_LINE>promise.setResult(result);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>promise.setError(e);<NEW_LINE>}<NEW_LINE>}, condition);<NEW_LINE>return promise;<NEW_LINE>}
value -> expirationHandle.unregisterHandler());
1,556,352
public void draw(Graphics2D graphics) {<NEW_LINE>if (spectrum != null) {<NEW_LINE>graphics.setColor(color);<NEW_LINE>int prevFreqInCents = 0;<NEW_LINE>int prevMagnitude = 0;<NEW_LINE>for (int i = 1; i < spectrum.length; i++) {<NEW_LINE>float hertzValue = (i * sampleRate) / (float) fftSize;<NEW_LINE>int frequencyInCents = (int) Math.round(PitchConverter.hertzToAbsoluteCent(hertzValue));<NEW_LINE>int magintude = Math.round(spectrum[i] * multiplier);<NEW_LINE>if (cs.getMin(Axis.X) < frequencyInCents && frequencyInCents < cs.getMax(Axis.X)) {<NEW_LINE>graphics.drawLine(<MASK><NEW_LINE>prevFreqInCents = frequencyInCents;<NEW_LINE>prevMagnitude = magintude;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int markerWidth = Math.round(LayerUtilities.pixelsToUnits(graphics, 7, true));<NEW_LINE>int markerheight = Math.round(LayerUtilities.pixelsToUnits(graphics, 7, false));<NEW_LINE>graphics.setColor(Color.blue);<NEW_LINE>for (int i = 0; i < peaksInBins.size(); i++) {<NEW_LINE>int bin = peaksInBins.get(i);<NEW_LINE>float hertzValue = (bin * sampleRate) / (float) fftSize;<NEW_LINE>int frequencyInCents = (int) Math.round(PitchConverter.hertzToAbsoluteCent(hertzValue) - markerWidth / 2.0f);<NEW_LINE>if (cs.getMin(Axis.X) < frequencyInCents && frequencyInCents < cs.getMax(Axis.X)) {<NEW_LINE>int magintude = Math.round(spectrum[bin] * multiplier - markerheight / 2.0f);<NEW_LINE>graphics.drawOval(Math.round(frequencyInCents), magintude, markerWidth, markerheight);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
prevFreqInCents, prevMagnitude, frequencyInCents, magintude);
1,613,816
static void registerBlockColorHandlers(ColorHandlerEvent.Block event) {<NEW_LINE>BlockColors blockColors = event.getBlockColors();<NEW_LINE>// slime plants - blocks<NEW_LINE>for (SlimeType type : SlimeType.values()) {<NEW_LINE>blockColors.register((state, reader, pos, index) -> getSlimeColorByPos(pos, type, null), TinkerWorld.vanillaSlimeGrass.get(type), TinkerWorld.earthSlimeGrass.get(type), TinkerWorld.skySlimeGrass.get(type), TinkerWorld.enderSlimeGrass.get(type), TinkerWorld.ichorSlimeGrass.get(type));<NEW_LINE>blockColors.register((state, reader, pos, index) -> getSlimeColorByPos(pos, type, SlimeColorizer.LOOP_OFFSET), TinkerWorld<MASK><NEW_LINE>blockColors.register((state, reader, pos, index) -> getSlimeColorByPos(pos, type, null), TinkerWorld.slimeFern.get(type), TinkerWorld.slimeTallGrass.get(type));<NEW_LINE>}<NEW_LINE>// vines<NEW_LINE>blockColors.register((state, reader, pos, index) -> getSlimeColorByPos(pos, SlimeType.SKY, SlimeColorizer.LOOP_OFFSET), TinkerWorld.skySlimeVine.get());<NEW_LINE>blockColors.register((state, reader, pos, index) -> getSlimeColorByPos(pos, SlimeType.ENDER, SlimeColorizer.LOOP_OFFSET), TinkerWorld.enderSlimeVine.get());<NEW_LINE>}
.slimeLeaves.get(type));
760,383
// Runs in EDT<NEW_LINE>public void runPostStartupActivities(UIAccess uiAccess) {<NEW_LINE>if (postStartupActivityPassed()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Application app = myApplication;<NEW_LINE>if (!app.isHeadlessEnvironment()) {<NEW_LINE>checkFsSanity();<NEW_LINE>checkProjectRoots();<NEW_LINE>}<NEW_LINE>runActivities(<MASK><NEW_LINE>DumbService dumbService = DumbService.getInstance(myProject);<NEW_LINE>dumbService.runWhenSmart(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>app.assertIsDispatchThread();<NEW_LINE>// myDumbAwarePostStartupActivities might be non-empty if new activities were registered during dumb mode<NEW_LINE>runActivities(uiAccess, myDumbAwarePostStartupActivities, Phases.PROJECT_DUMB_POST_STARTUP);<NEW_LINE>while (true) {<NEW_LINE>List<StartupActivity> dumbUnaware = takeDumbUnawareStartupActivities();<NEW_LINE>if (dumbUnaware.isEmpty()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// queue each activity in smart mode separately so that if one of them starts the dumb mode, the next ones just wait for it to finish<NEW_LINE>for (StartupActivity activity : dumbUnaware) {<NEW_LINE>dumbService.runWhenSmart(() -> runActivity(uiAccess, activity));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (dumbService.isDumb()) {<NEW_LINE>// return here later to process newly submitted activities (if any) and set myPostStartupActivitiesPassed<NEW_LINE>dumbService.runWhenSmart(this);<NEW_LINE>} else {<NEW_LINE>// noinspection SynchronizeOnThis<NEW_LINE>synchronized (this) {<NEW_LINE>myPostStartupActivitiesPassed = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
uiAccess, myDumbAwarePostStartupActivities, Phases.PROJECT_DUMB_POST_STARTUP);
1,599,073
public static RandomDotDefinition loadRandomDotYaml(Reader reader) {<NEW_LINE>Yaml yaml = createYmlObject();<NEW_LINE>Map<String, Object> data = yaml.load(reader);<NEW_LINE>var def = new RandomDotDefinition();<NEW_LINE>if (data.containsKey("random_seed"))<NEW_LINE>// YAML only library only supports ints?<NEW_LINE>def.randomSeed = ((Number) data.get("random_seed")).longValue();<NEW_LINE>if (data.containsKey("dot_diameter"))<NEW_LINE>def.dotDiameter = (double) data.get("dot_diameter");<NEW_LINE>if (data.containsKey("num_dots"))<NEW_LINE>def.maxDotsPerMarker = (int) data.get("num_dots");<NEW_LINE>if (data.containsKey("marker_width"))<NEW_LINE>def.markerWidth = (double) data.get("marker_width");<NEW_LINE>if (data.containsKey("marker_height"))<NEW_LINE>def.markerHeight = (double) data.get("marker_height");<NEW_LINE>if (data.containsKey("units"))<NEW_LINE>def.units = (String) data.get("units");<NEW_LINE>// assume it's square if height is not specified<NEW_LINE>if (def.markerHeight <= 0)<NEW_LINE>def.markerHeight = def.markerWidth;<NEW_LINE>List<List<List<Double>>> listMarkers = (List<List<List<Double>>>) Objects.requireNonNull(data.get("markers"));<NEW_LINE>for (int markerIdx = 0; markerIdx < listMarkers.size(); markerIdx++) {<NEW_LINE>List<List<Double>> listYaml = listMarkers.get(markerIdx);<NEW_LINE>List<Point2D_F64> marker = new ArrayList<>(listYaml.size());<NEW_LINE>for (List<Double> coordinates : listYaml) {<NEW_LINE>var p = new Point2D_F64(coordinates.get(0)<MASK><NEW_LINE>marker.add(p);<NEW_LINE>}<NEW_LINE>def.markers.add(marker);<NEW_LINE>}<NEW_LINE>return def;<NEW_LINE>}
, coordinates.get(1));
1,273,385
private double[] calculateTruePositiveFalsePositive(double thresh) {<NEW_LINE>int tp = 0;<NEW_LINE>int fp = 0;<NEW_LINE>int tn = 0;<NEW_LINE>int fn = 0;<NEW_LINE>for (BasicData item : this.training) {<NEW_LINE>double x = this.network.computeRegression(item.getInput())[0];<NEW_LINE>double y = <MASK><NEW_LINE>if (x > thresh) {<NEW_LINE>if (y > 0.5) {<NEW_LINE>tp++;<NEW_LINE>} else {<NEW_LINE>fp++;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (y < 0.5) {<NEW_LINE>tn++;<NEW_LINE>} else {<NEW_LINE>fn++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>double tpr = ((double) tp) / (tp + fn);<NEW_LINE>double fpr = ((double) fp) / (fp + tn);<NEW_LINE>double[] result = new double[2];<NEW_LINE>result[0] = fpr;<NEW_LINE>result[1] = tpr;<NEW_LINE>return result;<NEW_LINE>}
item.getIdeal()[0];
947,305
private Object xfer(Object e, int mode, long nanos) {<NEW_LINE>boolean isData = e != null;<NEW_LINE>QNode s = null;<NEW_LINE>final PaddedAtomicReference<QNode> head = this.head;<NEW_LINE>final PaddedAtomicReference<QNode> tail = this.tail;<NEW_LINE>for (; ; ) {<NEW_LINE>QNode t = tail.get();<NEW_LINE><MASK><NEW_LINE>if (t != null && (t == h || t.isData == isData)) {<NEW_LINE>if (s == null) {<NEW_LINE>s = new QNode(e, isData);<NEW_LINE>}<NEW_LINE>QNode last = t.next;<NEW_LINE>if (last != null) {<NEW_LINE>if (t == tail.get()) {<NEW_LINE>tail.compareAndSet(t, last);<NEW_LINE>}<NEW_LINE>} else if (t.casNext(null, s)) {<NEW_LINE>tail.compareAndSet(t, s);<NEW_LINE>return awaitFulfill(t, s, e, mode, nanos);<NEW_LINE>}<NEW_LINE>} else if (h != null) {<NEW_LINE>QNode first = h.next;<NEW_LINE>if (t == tail.get() && first != null && advanceHead(h, first)) {<NEW_LINE>Object x = first.get();<NEW_LINE>if (x != first && first.compareAndSet(x, e)) {<NEW_LINE>LockSupport.unpark(first.waiter);<NEW_LINE>return isData ? e : x;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
QNode h = head.get();
1,175,406
private STNode parseMemberRhsInStmtStartWithBrace(STNode identifier, STNode colon, STNode secondIdentifier, STNode secondNameRef) {<NEW_LINE>STNode typedBPOrExpr = parseTypedBindingPatternOrMemberAccess(secondNameRef, false, true, ParserRuleContext.AMBIGUOUS_STMT);<NEW_LINE>if (isExpression(typedBPOrExpr.kind)) {<NEW_LINE>return parseMemberWithExprInRhs(identifier, colon, secondIdentifier, typedBPOrExpr);<NEW_LINE>}<NEW_LINE>switchContext(ParserRuleContext.BLOCK_STMT);<NEW_LINE>startContext(ParserRuleContext.VAR_DECL_STMT);<NEW_LINE>List<STNode> varDeclQualifiers = new ArrayList<>();<NEW_LINE>STNode annots = STNodeFactory.createEmptyNodeList();<NEW_LINE>// We reach here for something like: "{ foo:bar[". But we started parsing the rhs component<NEW_LINE>// starting with "bar". Hence if its a typed-binding-pattern, then merge the "foo:" with<NEW_LINE>// the rest of the type-desc.<NEW_LINE>STTypedBindingPatternNode typedBP = (STTypedBindingPatternNode) typedBPOrExpr;<NEW_LINE>STNode qualifiedNameRef = createQualifiedNameReferenceNode(identifier, colon, secondIdentifier);<NEW_LINE>STNode newTypeDesc = mergeQualifiedNameWithTypeDesc(qualifiedNameRef, typedBP.typeDescriptor);<NEW_LINE>STNode newTypeBP = STNodeFactory.createTypedBindingPatternNode(newTypeDesc, typedBP.bindingPattern);<NEW_LINE>STNode publicQualifier = STNodeFactory.createEmptyNode();<NEW_LINE>return parseVarDeclRhs(annots, <MASK><NEW_LINE>}
publicQualifier, varDeclQualifiers, newTypeBP, false);
1,736,716
public List<FundingRecord> history(Currency currency, int limit) {<NEW_LINE>List<Map> history = bitbayAuthenticated.history(apiKey, sign, exchange.getNonceFactory(), <MASK><NEW_LINE>SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");<NEW_LINE>dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));<NEW_LINE>List<FundingRecord> res = new ArrayList<>();<NEW_LINE>for (Map map : history) {<NEW_LINE>try {<NEW_LINE>FundingRecord.Type type;<NEW_LINE>if (map.get("operation_type").toString().equals("+outside_income"))<NEW_LINE>type = FundingRecord.Type.DEPOSIT;<NEW_LINE>else if (map.get("operation_type").toString().equals("-transfer"))<NEW_LINE>type = FundingRecord.Type.WITHDRAWAL;<NEW_LINE>else<NEW_LINE>continue;<NEW_LINE>res.add(new FundingRecord(null, dateFormat.parse(map.get("time").toString()), Currency.getInstance(map.get("currency").toString()), new BigDecimal(map.get("amount").toString()), map.get("id").toString(), null, type, FundingRecord.Status.COMPLETE, null, null, map.get("comment").toString()));<NEW_LINE>} catch (ParseException e) {<NEW_LINE>throw new IllegalStateException("Should not happen", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return res;<NEW_LINE>}
currency.getCurrencyCode(), limit);
103,156
public static DescribeClusterDetailResponse unmarshall(DescribeClusterDetailResponse describeClusterDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeClusterDetailResponse.setResource_group_id(_ctx.stringValue("DescribeClusterDetailResponse.resource_group_id"));<NEW_LINE>describeClusterDetailResponse.setVpc_id(_ctx.stringValue("DescribeClusterDetailResponse.vpc_id"));<NEW_LINE>describeClusterDetailResponse.setDeletion_protection(_ctx.booleanValue("DescribeClusterDetailResponse.deletion_protection"));<NEW_LINE>describeClusterDetailResponse.setCreated(_ctx.stringValue("DescribeClusterDetailResponse.created"));<NEW_LINE>describeClusterDetailResponse.setNetwork_mode(_ctx.stringValue("DescribeClusterDetailResponse.network_mode"));<NEW_LINE>describeClusterDetailResponse.setRegion_id(_ctx.stringValue("DescribeClusterDetailResponse.region_id"));<NEW_LINE>describeClusterDetailResponse.setSecurity_group_id(_ctx.stringValue("DescribeClusterDetailResponse.security_group_id"));<NEW_LINE>describeClusterDetailResponse.setCurrent_version(_ctx.stringValue("DescribeClusterDetailResponse.current_version"));<NEW_LINE>describeClusterDetailResponse.setCluster_type(_ctx.stringValue("DescribeClusterDetailResponse.cluster_type"));<NEW_LINE>describeClusterDetailResponse.setDocker_version(_ctx.stringValue("DescribeClusterDetailResponse.docker_version"));<NEW_LINE>describeClusterDetailResponse.setVswitch_cidr(_ctx.stringValue("DescribeClusterDetailResponse.vswitch_cidr"));<NEW_LINE>describeClusterDetailResponse.setZone_id(_ctx.stringValue("DescribeClusterDetailResponse.zone_id"));<NEW_LINE>describeClusterDetailResponse.setCluster_id(_ctx.stringValue("DescribeClusterDetailResponse.cluster_id"));<NEW_LINE>describeClusterDetailResponse.setSize(_ctx.integerValue("DescribeClusterDetailResponse.size"));<NEW_LINE>describeClusterDetailResponse.setExternal_loadbalancer_id(_ctx.stringValue("DescribeClusterDetailResponse.external_loadbalancer_id"));<NEW_LINE>describeClusterDetailResponse.setVswitch_id(_ctx.stringValue("DescribeClusterDetailResponse.vswitch_id"));<NEW_LINE>describeClusterDetailResponse.setName(_ctx.stringValue("DescribeClusterDetailResponse.name"));<NEW_LINE>describeClusterDetailResponse.setMeta_data(_ctx.stringValue("DescribeClusterDetailResponse.meta_data"));<NEW_LINE>describeClusterDetailResponse.setState(_ctx.stringValue("DescribeClusterDetailResponse.state"));<NEW_LINE>describeClusterDetailResponse.setUpdated(_ctx.stringValue("DescribeClusterDetailResponse.updated"));<NEW_LINE>describeClusterDetailResponse.setInstance_type<MASK><NEW_LINE>List<TagsItem> tags = new ArrayList<TagsItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeClusterDetailResponse.tags.Length"); i++) {<NEW_LINE>TagsItem tagsItem = new TagsItem();<NEW_LINE>tagsItem.setValue(_ctx.stringValue("DescribeClusterDetailResponse.tags[" + i + "].value"));<NEW_LINE>tagsItem.setKey(_ctx.stringValue("DescribeClusterDetailResponse.tags[" + i + "].key"));<NEW_LINE>tags.add(tagsItem);<NEW_LINE>}<NEW_LINE>describeClusterDetailResponse.setTags(tags);<NEW_LINE>return describeClusterDetailResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeClusterDetailResponse.instance_type"));
1,563,209
@ExceptionMetered<NEW_LINE>@POST<NEW_LINE>@Consumes(APPLICATION_JSON)<NEW_LINE>public Response partialUpdateSecret(@Auth User user, @PathParam("name") String secretName, @Valid PartialUpdateSecretRequestV2 request) {<NEW_LINE>logger.info("User '{}' partialUpdate secret '{}'.", user, secretName);<NEW_LINE>long id = secretDAOReadWrite.partialUpdateSecret(secretName, user.getName(), request);<NEW_LINE>URI uri = UriBuilder.fromResource(SecretsResource.class).path(secretName).path("partialupdate").build();<NEW_LINE>Response response = Response.created(uri).entity(secretDetailResponseFromId(id)).build();<NEW_LINE>if (response.getStatus() == HttpStatus.SC_CREATED) {<NEW_LINE>Map<String, String> extraInfo = new HashMap<>();<NEW_LINE>if (request.descriptionPresent()) {<NEW_LINE>extraInfo.put("description", request.description());<NEW_LINE>}<NEW_LINE>if (request.metadataPresent()) {<NEW_LINE>extraInfo.put("metadata", request.<MASK><NEW_LINE>}<NEW_LINE>if (request.expiryPresent()) {<NEW_LINE>extraInfo.put("expiry", Long.toString(request.expiry()));<NEW_LINE>}<NEW_LINE>auditLog.recordEvent(new Event(Instant.now(), EventTag.SECRET_UPDATE, user.getName(), secretName, extraInfo));<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
metadata().toString());
1,344,312
private void onIntentProcessed() {<NEW_LINE>List<ShareInfo> infos = filePreparedInfos;<NEW_LINE>if (getIntent() != null && getIntent().getAction() != ACTION_PROCESSED) {<NEW_LINE>getIntent().setAction(ACTION_PROCESSED);<NEW_LINE>}<NEW_LINE>if (statusDialog != null) {<NEW_LINE>try {<NEW_LINE>statusDialog.dismiss();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>logDebug("intent processed!");<NEW_LINE>if (folderSelected) {<NEW_LINE>if (infos == null) {<NEW_LINE>showSnackbar(getString(R.string.upload_can_not_open));<NEW_LINE>} else {<NEW_LINE>if (app.getStorageState() == STORAGE_STATE_PAYWALL) {<NEW_LINE>showOverDiskQuotaPaywallWarning();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long parentHandle;<NEW_LINE>if (cDriveExplorer != null) {<NEW_LINE>parentHandle = cDriveExplorer.getParentHandle();<NEW_LINE>} else {<NEW_LINE>parentHandle = parentHandleCloud;<NEW_LINE>}<NEW_LINE>MegaNode parentNode = megaApi.getNodeByHandle(parentHandle);<NEW_LINE>if (parentNode == null) {<NEW_LINE>parentNode = megaApi.getRootNode();<NEW_LINE>}<NEW_LINE>backToCloud(parentNode.getHandle(<MASK><NEW_LINE>for (ShareInfo info : infos) {<NEW_LINE>Intent intent = new Intent(this, UploadService.class);<NEW_LINE>intent.putExtra(UploadService.EXTRA_FILEPATH, info.getFileAbsolutePath());<NEW_LINE>intent.putExtra(UploadService.EXTRA_NAME, info.getTitle());<NEW_LINE>if (nameFiles != null && nameFiles.get(info.getTitle()) != null && !nameFiles.get(info.getTitle()).equals(info.getTitle())) {<NEW_LINE>intent.putExtra(UploadService.EXTRA_NAME_EDITED, nameFiles.get(info.getTitle()));<NEW_LINE>}<NEW_LINE>intent.putExtra(UploadService.EXTRA_PARENT_HASH, parentNode.getHandle());<NEW_LINE>intent.putExtra(UploadService.EXTRA_SIZE, info.getSize());<NEW_LINE>startService(intent);<NEW_LINE>}<NEW_LINE>filePreparedInfos = null;<NEW_LINE>logDebug("finish!!!");<NEW_LINE>finishActivity();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
), infos.size());
623,951
private static boolean dontUseHostName(String nonProxyHosts, String host) {<NEW_LINE>if (host == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean dontUseProxy = false;<NEW_LINE>StringTokenizer st = new StringTokenizer(nonProxyHosts, "|", false);<NEW_LINE>while (st.hasMoreTokens() && !dontUseProxy) {<NEW_LINE>String token = st<MASK><NEW_LINE>int star = token.indexOf("*");<NEW_LINE>if (star == -1) {<NEW_LINE>dontUseProxy = token.equals(host);<NEW_LINE>if (dontUseProxy) {<NEW_LINE>LOG.log(Level.FINEST, "NbProxySelector[Type: {0}]. Host {1} found in nonProxyHosts: {2}", new Object[] { ProxySettings.getProxyType(), host, nonProxyHosts });<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String start = token.substring(0, star - 1 < 0 ? 0 : star - 1);<NEW_LINE>String end = token.substring(star + 1 > token.length() ? token.length() : star + 1);<NEW_LINE>// Compare left of * if and only if * is not first character in token<NEW_LINE>// not first character<NEW_LINE>boolean compareStart = star > 0;<NEW_LINE>// Compare right of * if and only if * is not the last character in token<NEW_LINE>// not last character<NEW_LINE>boolean compareEnd = star < (token.length() - 1);<NEW_LINE>dontUseProxy = (compareStart && host.startsWith(start)) || (compareEnd && host.endsWith(end));<NEW_LINE>if (dontUseProxy) {<NEW_LINE>LOG.log(Level.FINEST, "NbProxySelector[Type: {0}]. Host {1} found in nonProxyHosts: {2}", new Object[] { ProxySettings.getProxyType(), host, nonProxyHosts });<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return dontUseProxy;<NEW_LINE>}
.nextToken().trim();
378,953
private Q addConstraint(String type, JanusGraphPredicate rel, Object value) {<NEW_LINE>Preconditions.checkArgument(StringUtils.isNotBlank(type));<NEW_LINE>Preconditions.checkNotNull(rel);<NEW_LINE>// Treat special cases<NEW_LINE>if (type.equals(ImplicitKey.ADJACENT_ID.name())) {<NEW_LINE>Preconditions.checkArgument(rel == Cmp.EQUAL, "Only equality constraints are supported for %s", type);<NEW_LINE>long vertexId = ElementUtils.getVertexId(value);<NEW_LINE>Preconditions.checkArgument(<MASK><NEW_LINE>return adjacent(getVertex(vertexId));<NEW_LINE>} else if (type.equals(ImplicitKey.ID.name())) {<NEW_LINE>RelationIdentifier rid = ElementUtils.getEdgeId(value);<NEW_LINE>Preconditions.checkNotNull(rid, "Expected valid relation id: %s", value);<NEW_LINE>return addConstraint(ImplicitKey.JANUSGRAPHID.name(), rel, rid.getRelationId());<NEW_LINE>} else {<NEW_LINE>Preconditions.checkArgument(rel.isValidCondition(value), "Invalid condition provided: %s", value);<NEW_LINE>}<NEW_LINE>if (constraints == NO_CONSTRAINTS)<NEW_LINE>constraints = new ArrayList<>(5);<NEW_LINE>constraints.add(new PredicateCondition<>(type, rel, value));<NEW_LINE>return getThis();<NEW_LINE>}
vertexId > 0, "Expected valid vertex id: %s", value);
593,779
private void createGetElementPointerExpression(RecordBuffer buffer) {<NEW_LINE>int opCode = buffer.getId();<NEW_LINE>if (opCode == CONSTANT_CE_GEP_WITH_INRANGE_INDEX || buffer.size() % 2 != 0) {<NEW_LINE>// type of pointee<NEW_LINE>buffer.skip();<NEW_LINE>}<NEW_LINE>boolean isInbounds;<NEW_LINE>if (opCode == CONSTANT_CE_GEP_WITH_INRANGE_INDEX) {<NEW_LINE>long op = buffer.read();<NEW_LINE>isInbounds = (op & 0x1) != 0;<NEW_LINE>} else {<NEW_LINE>isInbounds = opCode == CONSTANT_CE_INBOUNDS_GEP;<NEW_LINE>}<NEW_LINE>// type of pointer<NEW_LINE>buffer.skip();<NEW_LINE>int pointer = buffer.readInt();<NEW_LINE>final int[] indices = new int[buffer.remaining() >> 1];<NEW_LINE>for (int j = 0; j < indices.length; j++) {<NEW_LINE>// index type<NEW_LINE>buffer.skip();<NEW_LINE>indices[<MASK><NEW_LINE>}<NEW_LINE>scope.addSymbol(GetElementPointerConstant.fromSymbols(scope.getSymbols(), type, pointer, indices, isInbounds), type);<NEW_LINE>}
j] = buffer.readInt();
396,699
private void fillParameters(final Container[] containers) {<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>boolean autoscalePref = NbPreferences.forModule(ReportPanel.class).getBoolean(PREF_AUTOSCALE, containers[0].getUnloader().isAutoScale());<NEW_LINE>boolean selfLoopPref = NbPreferences.forModule(ReportPanel.class).getBoolean(PREF_SELF_LOOP, containers[0].getUnloader().allowSelfLoop());<NEW_LINE>boolean createMissingNodesPref = NbPreferences.forModule(ReportPanel.class).getBoolean(PREF_CREATE_MISSING_NODES, containers[0].<MASK><NEW_LINE>EdgeMergeStrategy strategyPref = containers[0].getUnloader().getEdgesMergeStrategy();<NEW_LINE>try {<NEW_LINE>strategyPref = EdgeMergeStrategy.valueOf(NbPreferences.forModule(ReportPanel.class).get(PREF_EDGE_MERGE_STRATEGY, strategyPref.name()));<NEW_LINE>} catch (Exception e) {<NEW_LINE>// NOOP<NEW_LINE>}<NEW_LINE>// Create Missing Nodes Checkbox should be disabled if no missing nodes found<NEW_LINE>createMissingNodesCheckbox.setEnabled(containers[0].getUnloader().containsAutoNodes());<NEW_LINE>// Self-Loop Checkbox should be disabled if no self loops found<NEW_LINE>selfLoopCheckBox.setEnabled(containers[0].hasSelfLoops());<NEW_LINE>autoscaleCheckbox.setSelected(autoscalePref);<NEW_LINE>selfLoopCheckBox.setSelected(selfLoopPref);<NEW_LINE>createMissingNodesCheckbox.setSelected(createMissingNodesPref);<NEW_LINE>edgesMergeStrategyCombo.setSelectedItem(new EdgesMergeStrategyWrapper(strategyPref));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getUnloader().allowAutoNode());
1,214,991
protected Control createDialogArea(Composite parent) {<NEW_LINE>Composite composite = (Composite) super.createDialogArea(parent);<NEW_LINE>Label label = new Label(composite, SWT.WRAP);<NEW_LINE>label.setText(Messages.AddRemoteDialog_AddRemoteDialog_Message);<NEW_LINE>GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);<NEW_LINE>data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);<NEW_LINE>label.setLayoutData(data);<NEW_LINE>label.setFont(parent.getFont());<NEW_LINE>originNameText = new Text(composite, SWT.SINGLE | SWT.BORDER);<NEW_LINE>originNameText.setLayoutData(new GridData(GridData<MASK><NEW_LINE>originNameText.addModifyListener(new ModifyListener() {<NEW_LINE><NEW_LINE>public void modifyText(ModifyEvent e) {<NEW_LINE>validateInput();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>label = new Label(composite, SWT.NONE);<NEW_LINE>label.setText(Messages.AddRemoteDialog_RemoteURILabel);<NEW_LINE>remoteURIText = new Text(composite, SWT.SINGLE | SWT.BORDER);<NEW_LINE>remoteURIText.setText(remoteURI);<NEW_LINE>remoteURIText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));<NEW_LINE>// Add an option to track! Default to "on" for remote of "origin"<NEW_LINE>trackButton = new Button(composite, SWT.CHECK);<NEW_LINE>trackButton.setText(Messages.AddRemoteDialog_TrackButtonLabel);<NEW_LINE>trackButton.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>super.widgetSelected(e);<NEW_LINE>track = trackButton.getSelection();<NEW_LINE>dontAutoChangeTrack = true;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return composite;<NEW_LINE>}
.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
1,817,479
public static AlterTableBuilder createGsiAddColumnsBuilder(String schemaName, String logicalTableName, String sql, List<String> columns, ExecutionContext executionContext) {<NEW_LINE>SqlIdentifier logicalTableNameNode = new <MASK><NEW_LINE>Map<SqlAlterTable.ColumnOpt, List<String>> columnOpts = new HashMap<>();<NEW_LINE>columnOpts.put(SqlAlterTable.ColumnOpt.ADD, columns);<NEW_LINE>SqlAlterTable sqlAlterTable = SqlDdlNodes.alterTable(logicalTableNameNode, columnOpts, sql, null, new ArrayList<>(), SqlParserPos.ZERO);<NEW_LINE>final RelOptCluster cluster = SqlConverter.getInstance(executionContext).createRelOptCluster(null);<NEW_LINE>AlterTable alterTable = AlterTable.create(cluster, sqlAlterTable, logicalTableNameNode, null);<NEW_LINE>LogicalAlterTable logicalAlterTable = LogicalAlterTable.create(alterTable);<NEW_LINE>logicalAlterTable.setSchemaName(schemaName);<NEW_LINE>logicalAlterTable.prepareData();<NEW_LINE>logicalAlterTable.getAlterTablePreparedData().setBackfillColumns(columns);<NEW_LINE>if (DbInfoManager.getInstance().isNewPartitionDb(schemaName)) {<NEW_LINE>return new AlterPartitionTableBuilder(alterTable, logicalAlterTable.getAlterTablePreparedData(), logicalAlterTable, executionContext);<NEW_LINE>}<NEW_LINE>return new AlterTableBuilder(alterTable, logicalAlterTable.getAlterTablePreparedData(), logicalAlterTable, executionContext);<NEW_LINE>}
SqlIdentifier(logicalTableName, SqlParserPos.ZERO);
322,941
public void marshall(Address address, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (address == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(address.getAddressId(), ADDRESSID_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getCompany(), COMPANY_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getStreet1(), STREET1_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getStreet2(), STREET2_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getStreet3(), STREET3_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getCity(), CITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getStateOrProvince(), STATEORPROVINCE_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getPrefectureOrDistrict(), PREFECTUREORDISTRICT_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getLandmark(), LANDMARK_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getCountry(), COUNTRY_BINDING);<NEW_LINE>protocolMarshaller.marshall(address.getPostalCode(), POSTALCODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(address.getIsRestricted(), ISRESTRICTED_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
address.getPhoneNumber(), PHONENUMBER_BINDING);
61,907
private void loadApplication() {<NEW_LINE>ApplicationRegistry appRegistry = habitat.getService(ApplicationRegistry.class);<NEW_LINE>ApplicationInfo <MASK><NEW_LINE>if (appInfo != null && appInfo.isLoaded()) {<NEW_LINE>LOGGER.log(Level.FINE, "Rest Monitoring Application already loaded.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Application config = null;<NEW_LINE>if (dynamicStart) {<NEW_LINE>config = restMonitoringAdapter.getSystemApplicationConfig(contextRoot);<NEW_LINE>} else {<NEW_LINE>config = restMonitoringAdapter.getSystemApplicationConfig();<NEW_LINE>}<NEW_LINE>if (config == null) {<NEW_LINE>throw new IllegalStateException("The Rest Monitoring application has no system app entry!");<NEW_LINE>}<NEW_LINE>// Load the Rest Monitoring Application<NEW_LINE>String instanceName = serverEnv.getInstanceName();<NEW_LINE>ApplicationRef ref = domain.getApplicationRefInServer(instanceName, applicationName);<NEW_LINE>Deployment lifecycle = habitat.getService(Deployment.class);<NEW_LINE>for (Deployment.ApplicationDeployment depl : habitat.getService(ApplicationLoaderService.class).processApplication(config, ref)) {<NEW_LINE>lifecycle.initialize(depl.appInfo, depl.appInfo.getSniffers(), depl.context);<NEW_LINE>}<NEW_LINE>// Mark as registered<NEW_LINE>restMonitoringAdapter.setAppRegistered(true);<NEW_LINE>LOGGER.log(Level.FINE, "Rest Monitoring Application Loaded.");<NEW_LINE>}
appInfo = appRegistry.get(applicationName);
222,611
public MdiEntry createMDiEntry(MultipleDocumentInterface mdi, String id, Object datasource, Map params) {<NEW_LINE>ChatInstance chat = null;<NEW_LINE>if (datasource instanceof ChatInstance) {<NEW_LINE>chat = (ChatInstance) datasource;<NEW_LINE>try {<NEW_LINE>chat = chat.getClone();<NEW_LINE>} catch (Throwable e) {<NEW_LINE>chat = null;<NEW_LINE>Debug.out(e);<NEW_LINE>}<NEW_LINE>} else if (id.length() > 7) {<NEW_LINE><MASK><NEW_LINE>if (beta != null) {<NEW_LINE>try {<NEW_LINE>String[] bits = id.substring(5).split(":");<NEW_LINE>String network = AENetworkClassifier.internalise(bits[0]);<NEW_LINE>String key = new String(Base32.decode(bits[1]), "UTF-8");<NEW_LINE>chat = beta.getChat(network, key);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>Debug.out(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (chat != null) {<NEW_LINE>chat.setAutoNotify(true);<NEW_LINE>return (createChatMdiEntry(ui_manager, chat));<NEW_LINE>}<NEW_LINE>return (null);<NEW_LINE>}
BuddyPluginBeta beta = BuddyPluginUtils.getBetaPlugin();
8,826
private Mono<Response<DedicatedHostGroupInner>> updateWithResponseAsync(String resourceGroupName, String hostGroupName, DedicatedHostGroupUpdate parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (hostGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter hostGroupName 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 (parameters == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>parameters.validate();<NEW_LINE>}<NEW_LINE>final String apiVersion = "2021-11-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.update(this.client.getEndpoint(), resourceGroupName, hostGroupName, apiVersion, this.client.getSubscriptionId(<MASK><NEW_LINE>}
), parameters, accept, context);
1,798,198
public static void main(String[] args) throws IOException {<NEW_LINE>Path browserProtocol = Paths.get(args[0]);<NEW_LINE>Path jsProtocol = Paths.get(args[1]);<NEW_LINE>String version = args[2];<NEW_LINE>Path target = Files.createTempDirectory("devtools");<NEW_LINE>String devtoolsDir = "org/openqa/selenium/devtools/" + version + "/";<NEW_LINE>Model model = new Model("org.openqa.selenium.devtools." + version);<NEW_LINE>Stream.of(browserProtocol, jsProtocol).forEach(protoFile -> {<NEW_LINE>try {<NEW_LINE>String text = String.join("\n", Files.readAllLines(protoFile));<NEW_LINE>Map<String, Object> json = new Json().toType(text, Json.MAP_TYPE);<NEW_LINE>model.parse(json);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new UncheckedIOException(e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>model.dumpTo(target);<NEW_LINE>Path outputJar = Paths.get(args[3]).toAbsolutePath();<NEW_LINE>Files.createDirectories(outputJar.getParent());<NEW_LINE>try (OutputStream os = Files.newOutputStream(outputJar);<NEW_LINE>JarOutputStream jos = new JarOutputStream(os)) {<NEW_LINE>Files.walkFileTree(target, new SimpleFileVisitor<Path>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {<NEW_LINE>String relative = target.relativize(dir).toString().replace('\\', '/');<NEW_LINE>JarEntry entry = new JarEntry(devtoolsDir + relative + "/");<NEW_LINE>jos.putNextEntry(entry);<NEW_LINE>jos.closeEntry();<NEW_LINE>return CONTINUE;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {<NEW_LINE>String relative = target.relativize(file).toString(<MASK><NEW_LINE>JarEntry entry = new JarEntry(devtoolsDir + relative);<NEW_LINE>jos.putNextEntry(entry);<NEW_LINE>try (InputStream is = Files.newInputStream(file)) {<NEW_LINE>ByteStreams.copy(is, jos);<NEW_LINE>}<NEW_LINE>jos.closeEntry();<NEW_LINE>return CONTINUE;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
).replace('\\', '/');
461,000
public void executeMojo() throws MojoExecutionException {<NEW_LINE>List<Migration> pendingMigrations;<NEW_LINE>try {<NEW_LINE>String path = toAbsolutePath(getMigrationsPath());<NEW_LINE>getLog().info("Checking " + getUrl() + " using migrations from " + path);<NEW_LINE>openConnection();<NEW_LINE>MigrationManager manager = new MigrationManager(getProject(), path, getUrl());<NEW_LINE>pendingMigrations = manager.getPendingMigrations();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new MojoExecutionException("Failed to check " + getUrl(), e);<NEW_LINE>} finally {<NEW_LINE>Base.close();<NEW_LINE>}<NEW_LINE>if (pendingMigrations.isEmpty())<NEW_LINE>return;<NEW_LINE><MASK><NEW_LINE>for (Migration migration : pendingMigrations) getLog().warn("Migration: " + migration.getName());<NEW_LINE>getLog().warn("Run db-migrator:migrate to apply pending migrations.");<NEW_LINE>throw new MojoExecutionException("Pending migration(s) exist, migrate your db and try again.");<NEW_LINE>}
getLog().warn("Pending migration(s): ");
656,761
private static ByteSizeValue parse(final String initialInput, final String normalized, final String suffix, ByteSizeUnit unit, final String settingName) {<NEW_LINE>final String s = normalized.substring(0, normalized.length() - suffix.length()).trim();<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>return new ByteSizeValue(Long.parseLong(s), unit);<NEW_LINE>} catch (final NumberFormatException e) {<NEW_LINE>try {<NEW_LINE>final double doubleValue = Double.parseDouble(s);<NEW_LINE>DeprecationLoggerHolder.deprecationLogger.deprecate("fractional_byte_values", "Fractional bytes values are deprecated. Use non-fractional bytes values instead: [{}] found for setting [{}]", initialInput, settingName);<NEW_LINE>return new ByteSizeValue((long) (doubleValue * <MASK><NEW_LINE>} catch (final NumberFormatException ignored) {<NEW_LINE>throw new OpenSearchParseException("failed to parse [{}]", e, initialInput);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new OpenSearchParseException("failed to parse setting [{}] with value [{}] as a size in bytes", e, settingName, initialInput);<NEW_LINE>}<NEW_LINE>}
unit.toBytes(1)));
1,287,234
protected void lowerLoadFieldNode(LoadFieldNode loadField, LoweringTool tool) {<NEW_LINE>assert loadField.getStackKind() != JavaKind.Illegal;<NEW_LINE>StructuredGraph graph = loadField.graph();<NEW_LINE>ResolvedJavaField field = loadField.field();<NEW_LINE>ValueNode object = loadField.isStatic() ? staticFieldBase(graph, field) : loadField.object();<NEW_LINE>object = createNullCheckedValue(object, loadField, tool);<NEW_LINE>Stamp loadStamp = loadStamp(loadField.stamp(NodeView.DEFAULT), getStorageKind(field));<NEW_LINE>AddressNode address = createFieldAddress(graph, object, field);<NEW_LINE>assert address != null : "Field that is loaded must not be eliminated: " + field.getDeclaringClass().toJavaName(true) + "." + field.getName();<NEW_LINE>ReadNode memoryRead;<NEW_LINE>BarrierType barrierType = barrierSet.fieldLoadBarrierType(field, getStorageKind(field));<NEW_LINE>if (loadField.ordersMemoryAccesses()) {<NEW_LINE>memoryRead = graph.add(new OrderedReadNode(address, loadStamp, barrierType, loadField.getMemoryOrder()));<NEW_LINE>} else {<NEW_LINE>memoryRead = graph.add(new ReadNode(address, fieldLocationIdentity(field), loadStamp, barrierType));<NEW_LINE>}<NEW_LINE>ValueNode readValue = implicitLoadConvert(graph<MASK><NEW_LINE>loadField.replaceAtUsages(readValue);<NEW_LINE>graph.replaceFixed(loadField, memoryRead);<NEW_LINE>}
, getStorageKind(field), memoryRead);
1,282,645
public boolean initOnce() {<NEW_LINE>for (Method m : Initiator._QbossADImmersionBannerManager().getDeclaredMethods()) {<NEW_LINE>Class<?>[] argt = m.getParameterTypes();<NEW_LINE>if (m.getReturnType() == View.class && argt.length == 0 && !Modifier.isStatic(m.getModifiers())) {<NEW_LINE>HookUtils.hookBeforeIfEnabled(this, m, param -> param.setResult(null));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>XposedBridge.hookAllMethods(Initiator.load("com.tencent.mobileqq.activity.recent.bannerprocessor.VasADBannerProcessor"), "handleMessage", new XC_MethodReplacement() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Object replaceHookedMethod(MethodHookParam param) {<NEW_LINE>try {<NEW_LINE>return XposedBridge.invokeOriginalMethod(param.method, <MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>traceError(e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
param.thisObject, param.args);
1,138,061
public Object calculate(Context ctx) {<NEW_LINE>if (param == null || param.isLeaf() || param.getSubSize() < 5) {<NEW_LINE><MASK><NEW_LINE>throw new RQException("Fyield:" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>Object[] result = new Object[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>IParam sub = param.getSub(i);<NEW_LINE>if (sub != null) {<NEW_LINE>result[i] = sub.getLeafExpression().calculate(ctx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (option == null || (option.indexOf('d') == -1 && option.indexOf('m') == -1)) {<NEW_LINE>return yield(result);<NEW_LINE>} else if (option.indexOf('d') >= 0) {<NEW_LINE>return yielddisc(result);<NEW_LINE>} else {<NEW_LINE>return yieldMAT(result);<NEW_LINE>}<NEW_LINE>}
MessageManager mm = EngineMessage.get();
1,561,280
public void onCreateDBEntryNikki(String arg0) {<NEW_LINE>svLogger.info("onCreateDBEntryNikki: " + arg0);<NEW_LINE>try {<NEW_LINE>InitialContext ic = new InitialContext();<NEW_LINE>String jndiName = "java:comp/env/XMLInjectionInterceptor3/jms/WSTestQCF";<NEW_LINE>Object obj = ic.lookup(jndiName);<NEW_LINE>assertNotNull("MessageDriveInjectionBean.onCreateDBEntryNikki jms/WSTestQCF lookup in java:comp success", obj);<NEW_LINE>obj = ic.lookup("java:comp/env/XMLInjectionInterceptor3/jms/RequestQueue");<NEW_LINE>assertNotNull("MessageDriveInjectionBean.onCreateDBEntryNikki jms/RequestQueue lookup in java:comp success", obj);<NEW_LINE>setResults("Passed : onCreateDBEntryNikki");<NEW_LINE>} catch (NamingException ex) {<NEW_LINE>ex.printStackTrace(System.out);<NEW_LINE>svLogger.info("onCreateDBEntryNikki : lookup failed : " + ex.getClass().getName() + " : " + ex.getMessage());<NEW_LINE>setResults("Failed : onCreateDBEntryNikki : " + ex.getClass().getName() + ":" + ex.getMessage());<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
svLogger.info("onCreateDBEntryNikki results: " + svResults);
1,371,181
public boolean isEveryoneGranted(String resourceName, Collection<String> requiredRoles) {<NEW_LINE>validateInput(resourceName, requiredRoles);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {<NEW_LINE>Tr.event(tc, "Determining if Everyone is authorized to access resource " + resourceName + ". Specified required roles are " + requiredRoles + ".");<NEW_LINE>}<NEW_LINE>if (requiredRoles.isEmpty()) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {<NEW_LINE>Tr.event(<MASK><NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Collection<String> roles = getRolesForSpecialSubject(resourceName, AuthorizationTableService.EVERYONE);<NEW_LINE>AccessDecisionService accessDecisionService = accessDecisionServiceRef.getService();<NEW_LINE>boolean granted = accessDecisionService.isGranted(resourceName, requiredRoles, roles, null);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {<NEW_LINE>if (granted) {<NEW_LINE>Tr.event(tc, "Everyone is granted access to resource " + resourceName + ".");<NEW_LINE>} else {<NEW_LINE>Tr.event(tc, "Everyone is NOT granted access to resource " + resourceName + ".");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return granted;<NEW_LINE>}
tc, "Everyone is granted access to resource " + resourceName + " as there are no required roles.");
1,315,630
private void executeHealth(final ClusterHealthRequest request, final ClusterState currentState, final ActionListener<ClusterHealthResponse> listener, final int waitCount, final Consumer<ClusterState> onNewClusterStateAfterDelay) {<NEW_LINE>if (request.timeout().millis() == 0) {<NEW_LINE>listener.onResponse(getResponse(request, currentState, waitCount, TimeoutState.ZERO_TIMEOUT));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Predicate<ClusterState> validationPredicate = newState -> <MASK><NEW_LINE>if (validationPredicate.test(currentState)) {<NEW_LINE>listener.onResponse(getResponse(request, currentState, waitCount, TimeoutState.OK));<NEW_LINE>} else {<NEW_LINE>final ClusterStateObserver observer = new ClusterStateObserver(currentState, clusterService, null, logger, threadPool.getThreadContext());<NEW_LINE>final ClusterStateObserver.Listener stateListener = new ClusterStateObserver.Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onNewClusterState(ClusterState newState) {<NEW_LINE>onNewClusterStateAfterDelay.accept(newState);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClusterServiceClose() {<NEW_LINE>listener.onFailure(new NodeClosedException(clusterService.localNode()));<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onTimeout(TimeValue timeout) {<NEW_LINE>listener.onResponse(getResponse(request, observer.setAndGetObservedState(), waitCount, TimeoutState.TIMED_OUT));<NEW_LINE>}<NEW_LINE>};<NEW_LINE>observer.waitForNextChange(stateListener, validationPredicate, request.timeout());<NEW_LINE>}<NEW_LINE>}
validateRequest(request, newState, waitCount);
1,068,284
public void write(String bareAddress, StructuredName name) {<NEW_LINE>synchronized (writeLock) {<NEW_LINE>if (writeStatement == null) {<NEW_LINE>SQLiteDatabase db = databaseManager.getWritableDatabase();<NEW_LINE>writeStatement = db.compileStatement("INSERT OR REPLACE INTO " + NAME + " (" + Fields.USER + ", " + Fields.NICK_NAME + ", " + Fields.FORMATTED_NAME + ", " + Fields.FIRST_NAME + ", " + Fields.MIDDLE_NAME + ", " + Fields.LAST_NAME + ") VALUES (?, ?, ?, ?, ?, ?);");<NEW_LINE>}<NEW_LINE>writeStatement.bindString(1, bareAddress);<NEW_LINE>writeStatement.bindString(2, name.getNickName());<NEW_LINE>writeStatement.bindString(<MASK><NEW_LINE>writeStatement.bindString(4, name.getFirstName());<NEW_LINE>writeStatement.bindString(5, name.getMiddleName());<NEW_LINE>writeStatement.bindString(6, name.getLastName());<NEW_LINE>writeStatement.execute();<NEW_LINE>}<NEW_LINE>}
3, name.getFormattedName());
1,588,289
private JComponent createDragger() {<NEW_LINE>// NOI18N<NEW_LINE>String className = UIManager.getString("Nb.MainWindow.Toolbar.Dragger");<NEW_LINE>if (null != className) {<NEW_LINE>try {<NEW_LINE>Class klzz = Lookup.getDefault().lookup(ClassLoader<MASK><NEW_LINE>Object inst = klzz.newInstance();<NEW_LINE>if (inst instanceof JComponent) {<NEW_LINE>JComponent dragarea = (JComponent) inst;<NEW_LINE>dragarea.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));<NEW_LINE>dragarea.putClientProperty(PROP_DRAGGER, Boolean.TRUE);<NEW_LINE>return dragarea;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.getLogger(ToolbarContainer.class.getName()).log(Level.INFO, null, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String lfID = UIManager.getLookAndFeel().getID();<NEW_LINE>JPanel dragarea = null;<NEW_LINE>// #98888: recognize JGoodies L&F properly<NEW_LINE>if (lfID.endsWith("Windows")) {<NEW_LINE>// NOI18N<NEW_LINE>if (isXPTheme()) {<NEW_LINE>dragarea = (JPanel) new ToolbarXP();<NEW_LINE>} else {<NEW_LINE>dragarea = (JPanel) new ToolbarGrip();<NEW_LINE>}<NEW_LINE>} else if (lfID.equals("Aqua")) {<NEW_LINE>// NOI18N<NEW_LINE>dragarea = (JPanel) new ToolbarAqua();<NEW_LINE>} else if (lfID.equals("GTK")) {<NEW_LINE>// NOI18N<NEW_LINE>dragarea = (JPanel) new ToolbarGtk();<NEW_LINE>// setFloatable(true);<NEW_LINE>} else {<NEW_LINE>// Default for Metal and uknown L&F<NEW_LINE>dragarea = (JPanel) new ToolbarBump();<NEW_LINE>}<NEW_LINE>dragarea.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));<NEW_LINE>dragarea.putClientProperty(PROP_DRAGGER, Boolean.TRUE);<NEW_LINE>return dragarea;<NEW_LINE>}
.class).loadClass(className);
66,094
final TerminateJobResult executeTerminateJob(TerminateJobRequest terminateJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(terminateJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TerminateJobRequest> request = null;<NEW_LINE>Response<TerminateJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new TerminateJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(terminateJobRequest));<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, "Batch");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TerminateJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<TerminateJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TerminateJobResultJsonUnmarshaller());<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,542,341
private void initializeTask(AbstractRepositoryConnector repositoryConnector, TaskData taskData, AbstractTask task, TaskRepository taskRepository) throws CoreException {<NEW_LINE>ITaskMapping mapping = repositoryConnector.getTaskMapping(taskData);<NEW_LINE><MASK><NEW_LINE>if (taskKind != null && taskKind.length() > 0) {<NEW_LINE>task.setTaskKind(taskKind);<NEW_LINE>}<NEW_LINE>ITaskDataWorkingCopy workingCopy = taskDataManager.createWorkingCopy(task, taskData);<NEW_LINE>workingCopy.save(null, null);<NEW_LINE>repositoryConnector.updateNewTaskFromTaskData(taskRepository, task, taskData);<NEW_LINE>String summary = mapping.getSummary();<NEW_LINE>if (summary != null && summary.length() > 0) {<NEW_LINE>task.setSummary(summary);<NEW_LINE>}<NEW_LINE>if (taskRepository == localTaskRepository) {<NEW_LINE>taskList.addTask(task);<NEW_LINE>} else {<NEW_LINE>taskList.addTask(task, taskList.getUnsubmittedContainer(task.getAttribute(ITasksCoreConstants.ATTRIBUTE_OUTGOING_NEW_REPOSITORY_URL)));<NEW_LINE>}<NEW_LINE>task.setAttribute(AbstractNbTaskWrapper.ATTR_NEW_UNREAD, Boolean.TRUE.toString());<NEW_LINE>}
String taskKind = mapping.getTaskKind();
24,828
private void loadNode408() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupFolderType_DefaultHttpsGroup_TrustList_OpenWithMasks_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.Argument, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultHttpsGroup_TrustList_OpenWithMasks_InputArguments, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultHttpsGroup_TrustList_OpenWithMasks_InputArguments, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultHttpsGroup_TrustList_OpenWithMasks_InputArguments, Identifiers.HasProperty, Identifiers.CertificateGroupFolderType_DefaultHttpsGroup_TrustList_OpenWithMasks.expanded(), false));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=297</Identifier> </TypeId><Body><Argument><Name>Masks</Name><DataType><Identifier>i=7</Identifier> </DataType><ValueRank>-1</ValueRank><ArrayDimensions/> </Argument> </Body> </ExtensionObject> </ListOfExtensionObject>");<NEW_LINE>String xml = sb.toString();<NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));<NEW_LINE>Object o = decoder.readVariantValue();<NEW_LINE>DataValue value = new DataValue(new Variant(o));<NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
(1), 0.0, false);
1,069,602
static void sendDecodingFailures(ChannelHandlerContext ctx, ConnectionObserver listener, boolean secure, Throwable t, Object msg) {<NEW_LINE>Connection conn = Connection.from(ctx.channel());<NEW_LINE>Throwable cause = t.getCause() != null ? t.getCause() : t;<NEW_LINE>if (log.isWarnEnabled()) {<NEW_LINE>log.warn(format(ctx.channel(), "Decoding failed: " + msg + " : "), cause);<NEW_LINE>}<NEW_LINE>ReferenceCountUtil.release(msg);<NEW_LINE>HttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_0, cause instanceof TooLongFrameException ? <MASK><NEW_LINE>response.headers().setInt(HttpHeaderNames.CONTENT_LENGTH, 0).set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE);<NEW_LINE>ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);<NEW_LINE>HttpRequest request = null;<NEW_LINE>if (msg instanceof HttpRequest) {<NEW_LINE>request = (HttpRequest) msg;<NEW_LINE>} else {<NEW_LINE>ChannelOperations<?, ?> ops = ChannelOperations.get(ctx.channel());<NEW_LINE>if (ops instanceof HttpServerOperations) {<NEW_LINE>request = ((HttpServerOperations) ops).nettyRequest;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>listener.onStateChange(new FailedHttpServerRequest(conn, listener, request, response, secure), REQUEST_DECODING_FAILED);<NEW_LINE>}
HttpResponseStatus.REQUEST_ENTITY_TOO_LARGE : HttpResponseStatus.BAD_REQUEST);
1,350,818
final PutActionRevisionResult executePutActionRevision(PutActionRevisionRequest putActionRevisionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putActionRevisionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutActionRevisionRequest> request = null;<NEW_LINE>Response<PutActionRevisionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutActionRevisionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putActionRevisionRequest));<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, "CodePipeline");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutActionRevision");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutActionRevisionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutActionRevisionResultJsonUnmarshaller());<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);