idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
852,812
public static void main(String[] args) throws IOException {<NEW_LINE>Set<String> alreadyZipped = new HashSet<>();<NEW_LINE>try (WebfilesWriter writer = new WebfilesWriter(Files.newByteChannel(Paths.get(args[0]), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING), Deflater.BEST_SPEED)) {<NEW_LINE>for (int i = 1; i < args.length; i++) {<NEW_LINE>Webfiles manifest = loadWebfilesPbtxt(Paths.<MASK><NEW_LINE>for (WebfilesSource src : manifest.getSrcList()) {<NEW_LINE>if (!alreadyZipped.add(src.getWebpath())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try (InputStream input = Files.newInputStream(Paths.get(src.getPath()))) {<NEW_LINE>writer.writeWebfile(WebfileInfo.newBuilder().setWebpath(src.getWebpath()).build(), input);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
get(args[i]));
1,538,499
public void actionPerformed(ActionEvent e) {<NEW_LINE>SoapUI.getThreadPool().execute(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>SubmitContext context <MASK><NEW_LINE>statusBar.setIndeterminate(true);<NEW_LINE>amfRequestTestStep.initAmfRequest(context);<NEW_LINE>if (context.getProperty(AMFRequest.AMF_SCRIPT_ERROR) != null) {<NEW_LINE>UISupport.showInfoMessage(((Throwable) context.getProperty(AMFRequest.AMF_SCRIPT_ERROR)).getMessage());<NEW_LINE>} else {<NEW_LINE>UISupport.showInfoMessage(scriptInfo(context));<NEW_LINE>}<NEW_LINE>statusBar.setIndeterminate(false);<NEW_LINE>amfRequestTestStep.getAMFRequest().clearArguments();<NEW_LINE>}<NEW_LINE><NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>private String scriptInfo(SubmitContext context) {<NEW_LINE>HashMap<String, Object> parameters = (HashMap<String, Object>) context.getProperty(AMFRequest.AMF_SCRIPT_PARAMETERS);<NEW_LINE>HashMap<String, Object> amfHeaders = (HashMap<String, Object>) context.getProperty(AMFRequest.AMF_SCRIPT_HEADERS);<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("parameters " + (parameters != null ? parameters.toString() : ""));<NEW_LINE>sb.append("\n");<NEW_LINE>sb.append("amfHeaders " + (amfHeaders != null ? amfHeaders.toString() : ""));<NEW_LINE>return sb.toString();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
= new WsdlTestRunContext(getModelItem());
791,129
private synchronized void loadSubscriptions(Context context) {<NEW_LINE>if (enabledExtensions != null && subscriptions != null && tokens != null) {<NEW_LINE>// already loaded subscriptions<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Timber.i("Loading extension subscriptions");<NEW_LINE>enabledExtensions = new ArrayList<>();<NEW_LINE>subscriptions = new HashMap<>();<NEW_LINE>tokens = new HashMap<>();<NEW_LINE>String serializedSubscriptions = preferences(context).getString(PREF_SUBSCRIPTIONS, null);<NEW_LINE>if (serializedSubscriptions == null) {<NEW_LINE>setDefaultEnabledExtensions(context);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>JSONArray jsonArray;<NEW_LINE>try {<NEW_LINE>jsonArray = new JSONArray(serializedSubscriptions);<NEW_LINE>} catch (JSONException e) {<NEW_LINE>Timber.e(e, "Deserializing subscriptions failed");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < jsonArray.length(); i++) {<NEW_LINE>String subscription = jsonArray.optString(i, null);<NEW_LINE>if (subscription == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String[] arr = subscription.split("\\|", 2);<NEW_LINE>ComponentName extension = ComponentName.unflattenFromString(arr[0]);<NEW_LINE>if (extension == null) {<NEW_LINE><MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String token = arr[1];<NEW_LINE>enabledExtensions.add(extension);<NEW_LINE>subscriptions.put(extension, token);<NEW_LINE>tokens.put(token, extension);<NEW_LINE>Timber.d("Restored subscription: %s token: %s", extension, token);<NEW_LINE>}<NEW_LINE>}
Timber.e("Failed to restore subscription: %s", subscription);
557,318
private void updateSelectionToolbar() {<NEW_LINE>TimelineSupport support = model.getTimelineSupport();<NEW_LINE>selectAllButton.setEnabled(!support.isSelectAll());<NEW_LINE>clearTimestampSelectionButton.setEnabled(support.isTimestampSelection(false));<NEW_LINE>int startIndex = support.getStartIndex();<NEW_LINE>int endIndex = support.getEndIndex();<NEW_LINE>String selection = " " + Bundle.LBL_Selection() + " ";<NEW_LINE>if (startIndex == -1) {<NEW_LINE>selection += Bundle.LBL_None();<NEW_LINE>} else if (startIndex == endIndex) {<NEW_LINE>// NOI18N<NEW_LINE>selection += df.format(support.getTimestamp(startIndex)) + ", " + Bundle.LBL_SingleSample(startIndex);<NEW_LINE>} else {<NEW_LINE>long <MASK><NEW_LINE>long endTime = support.getTimestamp(endIndex);<NEW_LINE>selection += Bundle.LBL_TwoTimes(df.format(startTime), df.format(endTime));<NEW_LINE>selection += " (" + (endTime - startTime) + " ms)";<NEW_LINE>selection += ", " + Bundle.LBL_TwoSamples(startIndex, endIndex);<NEW_LINE>}<NEW_LINE>if (support.isSelectAll())<NEW_LINE>selection += ", " + Bundle.LBL_EntireSnapshot();<NEW_LINE>selectionLabel.setText(selection);<NEW_LINE>}
startTime = support.getTimestamp(startIndex);
1,601,047
public Document mongoSerialise() {<NEW_LINE><MASK><NEW_LINE>dbObject.put("direction", getDirection().ordinal());<NEW_LINE>dbObject.put("hp", hp);<NEW_LINE>dbObject.put("shield", shield);<NEW_LINE>dbObject.put("action", lastAction.ordinal());<NEW_LINE>if (parent != null) {<NEW_LINE>// Only used client-side for now<NEW_LINE>dbObject.put("parent", parent.getUsername());<NEW_LINE>}<NEW_LINE>List<Document> hardwareList = new ArrayList<>();<NEW_LINE>for (Integer address : hardwareAddresses.keySet()) {<NEW_LINE>HardwareModule hardware = hardwareAddresses.get(address);<NEW_LINE>Document serialisedHw = hardware.mongoSerialise();<NEW_LINE>serialisedHw.put("address", address);<NEW_LINE>hardwareList.add(serialisedHw);<NEW_LINE>}<NEW_LINE>dbObject.put("hardware", hardwareList);<NEW_LINE>dbObject.put("cpu", cpu.mongoSerialise());<NEW_LINE>return dbObject;<NEW_LINE>}
Document dbObject = super.mongoSerialise();
1,704,597
// implement SqlValidator<NEW_LINE>public void declareCursor(SqlSelect select, SqlValidatorScope parentScope) {<NEW_LINE>cursorSet.add(select);<NEW_LINE>// add the cursor to a map that maps the cursor to its select based on<NEW_LINE>// the position of the cursor relative to other cursors in that call<NEW_LINE>FunctionParamInfo funcParamInfo = functionCallStack.peek();<NEW_LINE>Map<Integer, SqlSelect> cursorMap = funcParamInfo.cursorPosToSelectMap;<NEW_LINE><MASK><NEW_LINE>cursorMap.put(numCursors, select);<NEW_LINE>// create a namespace associated with the result of the select<NEW_LINE>// that is the argument to the cursor constructor; register it<NEW_LINE>// with a scope corresponding to the cursor<NEW_LINE>SelectScope cursorScope = new SelectScope(parentScope, null, select);<NEW_LINE>clauseScopes.put(IdPair.of(select, Clause.CURSOR), cursorScope);<NEW_LINE>final SelectNamespace selectNs = createSelectNamespace(select, select);<NEW_LINE>String alias = deriveAlias(select, nextGeneratedId++);<NEW_LINE>registerNamespace(cursorScope, alias, selectNs, false);<NEW_LINE>}
int numCursors = cursorMap.size();
530,373
public String modelChange(PO po, int type) throws Exception {<NEW_LINE>log.info(po.get_TableName() + " Type: " + type);<NEW_LINE>if (po.get_TableName().equals(MOrder.Table_Name) && (type == ModelValidator.TYPE_AFTER_NEW || type == ModelValidator.TYPE_AFTER_CHANGE)) {<NEW_LINE>if (po == null)<NEW_LINE>return null;<NEW_LINE>MOrder order = (MOrder) po;<NEW_LINE>syncOpportunity(order);<NEW_LINE>}<NEW_LINE>if (po.get_TableName().equals(MOrderLine.Table_Name) && (type == ModelValidator.TYPE_AFTER_NEW || type == ModelValidator.TYPE_AFTER_CHANGE)) {<NEW_LINE>if (po == null)<NEW_LINE>return null;<NEW_LINE>MOrderLine line = (MOrderLine) po;<NEW_LINE>MOrder order = <MASK><NEW_LINE>syncOpportunity(order);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
(MOrder) line.getC_Order();
134,568
private SourceViewer createSourcePanel(Composite parent, Source source) {<NEW_LINE>Group group = createGroup(parent, source.label);<NEW_LINE>SourceViewer viewer = new SourceViewer(group, null, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);<NEW_LINE>StyledText textWidget = viewer.getTextWidget();<NEW_LINE>viewer.setEditable(type.isEditable());<NEW_LINE>textWidget.setFont(theme.monoSpaceFont());<NEW_LINE>textWidget.setKeyBinding(ST.SELECT_ALL, ST.SELECT_ALL);<NEW_LINE>viewer.configure(new GlslSourceConfiguration(theme));<NEW_LINE>viewer.setDocument(GlslSourceConfiguration.createDocument(source.source));<NEW_LINE>textWidget.addListener(SWT.KeyDown, e -> {<NEW_LINE>if (isKey(e, SWT.MOD1, 'z') && !isKey(e, SWT.MOD1 | SWT.SHIFT, 'z')) {<NEW_LINE>viewer.doOperation(ITextOperationTarget.UNDO);<NEW_LINE>} else if (isKey(e, SWT.MOD1, 'y') || isKey(e, SWT.MOD1 | SWT.SHIFT, 'z')) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>return viewer;<NEW_LINE>}
viewer.doOperation(ITextOperationTarget.REDO);
790,172
void storeLibraries(Project project, Library.Version[] libraries) throws IOException {<NEW_LINE>Arrays.sort(libraries, new LibraryVersionComparator());<NEW_LINE>DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();<NEW_LINE>try {<NEW_LINE>DocumentBuilder builder = factory.newDocumentBuilder();<NEW_LINE>Document document = builder.newDocument();<NEW_LINE>Element librariesElement = document.createElementNS(NAMESPACE_URI, ELEMENT_LIBRARIES);<NEW_LINE>for (Library.Version library : libraries) {<NEW_LINE>Element libraryElement = document.createElementNS(NAMESPACE_URI, ELEMENT_LIBRARY);<NEW_LINE>String libraryName = library.getLibrary().getName();<NEW_LINE>libraryElement.setAttribute(ATTR_LIBRARY_NAME, libraryName);<NEW_LINE>String versionName = library.getName();<NEW_LINE><MASK><NEW_LINE>String[] files = library.getFiles();<NEW_LINE>String[] localFiles = library.getLocalFiles();<NEW_LINE>for (int i = 0; i < files.length; i++) {<NEW_LINE>Element fileElement = document.createElementNS(NAMESPACE_URI, ELEMENT_FILE);<NEW_LINE>String path = files[i];<NEW_LINE>String localPath = localFiles[i];<NEW_LINE>fileElement.setAttribute(ATTR_FILE_PATH, path);<NEW_LINE>fileElement.setAttribute(ATTR_FILE_LOCAL_PATH, localPath);<NEW_LINE>libraryElement.appendChild(fileElement);<NEW_LINE>}<NEW_LINE>librariesElement.appendChild(libraryElement);<NEW_LINE>}<NEW_LINE>AuxiliaryConfiguration config = ProjectUtils.getAuxiliaryConfiguration(project);<NEW_LINE>config.putConfigurationFragment(librariesElement, true);<NEW_LINE>ProjectManager.getDefault().saveProject(project);<NEW_LINE>logLibraryUsage(libraries);<NEW_LINE>// fire event<NEW_LINE>libraryListenerSupport.fireLibrariesChanged(project);<NEW_LINE>} catch (ParserConfigurationException pcex) {<NEW_LINE>// NOI18N<NEW_LINE>Logger.getLogger(LibraryPersistence.class.getName()).// NOI18N<NEW_LINE>log(// NOI18N<NEW_LINE>Level.SEVERE, // NOI18N<NEW_LINE>"Unable to store library information!", pcex);<NEW_LINE>}<NEW_LINE>}
libraryElement.setAttribute(ATTR_VERSION_NAME, versionName);
1,631,936
private String doExecRequest(String anItem, String lightId) {<NEW_LINE>log.debug("Executing request: " + anItem);<NEW_LINE>String responseString = null;<NEW_LINE>if (anItem != null && !anItem.equalsIgnoreCase("")) {<NEW_LINE>try {<NEW_LINE>Process p = Runtime.getRuntime().exec(anItem);<NEW_LINE>log.debug("Process running: " + p.isAlive());<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.warn("Could not execute request: " + anItem + " with message: " + e.getMessage());<NEW_LINE>responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId + "\",\"description\": \"Error on calling out to device\", \"parameter\": \"/lights/" + lightId + "/state\"}}]";<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>log.warn("Could not execute request. Request is empty.");<NEW_LINE>responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" <MASK><NEW_LINE>}<NEW_LINE>return responseString;<NEW_LINE>}
+ lightId + "\",\"description\": \"Error on calling out to device\", \"parameter\": \"/lights/" + lightId + "/state\"}}]";
1,238,439
private static Set<String> loadRevisionSet() {<NEW_LINE>ImmutableSet.Builder<String> revisions = ImmutableSet.builder();<NEW_LINE>InputStream input = <MASK><NEW_LINE>if (input != null) {<NEW_LINE>try (Reader reader = new InputStreamReader(input, Charsets.UTF_8);<NEW_LINE>BufferedReader lines = new BufferedReader(reader)) {<NEW_LINE>String line;<NEW_LINE>while ((line = lines.readLine()) != null) {<NEW_LINE>revisions.add(StringUtils.trim(line));<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>logger.warn("Could not read Git revision list", e);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>input.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>logger.error("error closing git-commit list", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.warn("cannot find LensKit revision list");<NEW_LINE>}<NEW_LINE>Set<String> revset = revisions.build();<NEW_LINE>logger.debug("have {} active revisions", revset.size());<NEW_LINE>return revset;<NEW_LINE>}
LenskitInfo.class.getResourceAsStream("/META-INF/lenskit/git-commits.lst");
849,364
public void buildSearchJs(List<RpcApiDoc> apiDocList, ApiConfig config, JavaProjectBuilder javaProjectBuilder, String template, String outPutFileName) {<NEW_LINE>List<ApiErrorCode> errorCodeList = DocUtil.errorCodeDictToList(config);<NEW_LINE>Template tpl = BeetlTemplateUtil.getByName(template);<NEW_LINE>// directory tree<NEW_LINE>List<RpcApiDoc> apiDocs = new ArrayList<>();<NEW_LINE>RpcApiDoc apiDoc = new RpcApiDoc();<NEW_LINE>apiDoc.setAlias(DEPENDENCY_TITLE);<NEW_LINE>apiDoc.setOrder(1);<NEW_LINE>apiDoc.setDesc(DEPENDENCY_TITLE);<NEW_LINE>apiDoc.setList(new ArrayList<>(0));<NEW_LINE>apiDocs.add(apiDoc);<NEW_LINE>List<RpcApiDoc> apiDocs1 = apiDocList;<NEW_LINE>for (RpcApiDoc apiDoc1 : apiDocs1) {<NEW_LINE>apiDoc1.setOrder(<MASK><NEW_LINE>apiDocs.add(apiDoc1);<NEW_LINE>}<NEW_LINE>Map<String, String> titleMap = setDirectoryLanguageVariable(config, tpl);<NEW_LINE>if (CollectionUtil.isNotEmpty(errorCodeList)) {<NEW_LINE>RpcApiDoc apiDoc1 = new RpcApiDoc();<NEW_LINE>apiDoc1.setOrder(apiDocs.size() + 1);<NEW_LINE>apiDoc1.setDesc(titleMap.get(TemplateVariable.ERROR_LIST_TITLE.getVariable()));<NEW_LINE>apiDoc1.setList(new ArrayList<>(0));<NEW_LINE>apiDocs.add(apiDoc1);<NEW_LINE>}<NEW_LINE>// set dict list<NEW_LINE>List<ApiDocDict> apiDocDictList = DocUtil.buildDictionary(config, javaProjectBuilder);<NEW_LINE>tpl.binding(TemplateVariable.DICT_LIST.getVariable(), apiDocDictList);<NEW_LINE>tpl.binding(TemplateVariable.DIRECTORY_TREE.getVariable(), apiDocs);<NEW_LINE>FileUtil.nioWriteFile(tpl.render(), config.getOutPath() + FILE_SEPARATOR + outPutFileName);<NEW_LINE>}
apiDocs.size() + 1);
637,461
public static ListVehicleTopResponse unmarshall(ListVehicleTopResponse listVehicleTopResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVehicleTopResponse.setRequestId(_ctx.stringValue("ListVehicleTopResponse.RequestId"));<NEW_LINE>listVehicleTopResponse.setCode(_ctx.stringValue("ListVehicleTopResponse.Code"));<NEW_LINE>listVehicleTopResponse.setMessage(_ctx.stringValue("ListVehicleTopResponse.Message"));<NEW_LINE>listVehicleTopResponse.setPageNumber(_ctx.longValue("ListVehicleTopResponse.PageNumber"));<NEW_LINE>listVehicleTopResponse.setPageSize(_ctx.longValue("ListVehicleTopResponse.PageSize"));<NEW_LINE>listVehicleTopResponse.setTotalCount(_ctx.longValue("ListVehicleTopResponse.TotalCount"));<NEW_LINE>List<Datas> data = new ArrayList<Datas>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListVehicleTopResponse.Data.Length"); i++) {<NEW_LINE>Datas datas = new Datas();<NEW_LINE>datas.setCorpId(_ctx.stringValue("ListVehicleTopResponse.Data[" + i + "].CorpId"));<NEW_LINE>datas.setVehicleId(_ctx.stringValue("ListVehicleTopResponse.Data[" + i + "].VehicleId"));<NEW_LINE>datas.setPoiId(_ctx.stringValue("ListVehicleTopResponse.Data[" + i + "].PoiId"));<NEW_LINE>datas.setPoiName(_ctx.stringValue("ListVehicleTopResponse.Data[" + i + "].PoiName"));<NEW_LINE>datas.setPassHour(_ctx.stringValue("ListVehicleTopResponse.Data[" + i + "].PassHour"));<NEW_LINE>datas.setFrequency(_ctx.stringValue<MASK><NEW_LINE>data.add(datas);<NEW_LINE>}<NEW_LINE>listVehicleTopResponse.setData(data);<NEW_LINE>return listVehicleTopResponse;<NEW_LINE>}
("ListVehicleTopResponse.Data[" + i + "].Frequency"));
1,824,892
public void startPinot() throws Exception {<NEW_LINE>System.out.println("Using table name " + TABLE_NAME);<NEW_LINE>System.out.println("Using data directory " + DATA_DIRECTORY);<NEW_LINE>System.out.println("Starting pinot");<NEW_LINE>PerfBenchmarkDriverConf conf = new PerfBenchmarkDriverConf();<NEW_LINE>conf.setStartBroker(true);<NEW_LINE>conf.setStartController(true);<NEW_LINE>conf.setStartServer(true);<NEW_LINE>conf.setStartZookeeper(true);<NEW_LINE>conf.setRunQueries(false);<NEW_LINE>conf.setServerInstanceSegmentTarDir(null);<NEW_LINE>conf.setServerInstanceDataDir(DATA_DIRECTORY);<NEW_LINE>conf.setConfigureResources(false);<NEW_LINE>_perfBenchmarkDriver = new PerfBenchmarkDriver(conf);<NEW_LINE>_perfBenchmarkDriver.run();<NEW_LINE>File[] segments = new File(DATA_DIRECTORY, TABLE_NAME).listFiles();<NEW_LINE>for (File segmentDir : segments) {<NEW_LINE>SegmentMetadataImpl segmentMetadata = new SegmentMetadataImpl(segmentDir);<NEW_LINE>_perfBenchmarkDriver.configureTable(TABLE_NAME);<NEW_LINE>System.out.println("Adding segment " + segmentDir.getAbsolutePath());<NEW_LINE>_perfBenchmarkDriver.addSegment(TABLE_NAME, segmentMetadata);<NEW_LINE>}<NEW_LINE>ZkClient client = new ZkClient("localhost:2191", 10000, 10000, new ZNRecordSerializer());<NEW_LINE>ZNRecord record = client.readData("/PinotPerfTestCluster/EXTERNALVIEW/" + TABLE_NAME);<NEW_LINE>while (true) {<NEW_LINE>System.out.println("record = " + record);<NEW_LINE>Uninterruptibles.<MASK><NEW_LINE>int onlineSegmentCount = 0;<NEW_LINE>for (Map<String, String> instancesAndStates : record.getMapFields().values()) {<NEW_LINE>for (String state : instancesAndStates.values()) {<NEW_LINE>if (state.equals("ONLINE")) {<NEW_LINE>onlineSegmentCount++;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println(onlineSegmentCount + " segments online out of " + segments.length);<NEW_LINE>if (onlineSegmentCount == segments.length) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>record = client.readData("/PinotPerfTestCluster/EXTERNALVIEW/" + TABLE_NAME);<NEW_LINE>}<NEW_LINE>_ranOnce = false;<NEW_LINE>System.out.println(_perfBenchmarkDriver.postQuery(QUERY_PATTERNS[_queryPattern]).toString());<NEW_LINE>}
sleepUninterruptibly(10, TimeUnit.SECONDS);
284,948
public void run() throws IOException {<NEW_LINE>SignalHandler prevWinchHandler = terminal.handle(Signal.WINCH, this::resize);<NEW_LINE>SignalHandler prevIntHandler = terminal.handle(Signal.INT, this::interrupt);<NEW_LINE>SignalHandler prevSuspHandler = terminal.handle(Signal.TSTP, this::suspend);<NEW_LINE>Attributes attributes = terminal.enterRawMode();<NEW_LINE>terminal.puts(Capability.enter_ca_mode);<NEW_LINE>terminal.puts(Capability.keypad_xmit);<NEW_LINE>terminal.trackMouse(Terminal.MouseTracking.Any);<NEW_LINE>terminal.flush();<NEW_LINE>executor = Executors.newSingleThreadScheduledExecutor();<NEW_LINE>try {<NEW_LINE>// Create first pane<NEW_LINE>size.copy(terminal.getSize());<NEW_LINE>windows.add(new Window(this));<NEW_LINE>activeWindow = 0;<NEW_LINE>runner.accept(<MASK><NEW_LINE>// Start input loop<NEW_LINE>new Thread(this::inputLoop, "Mux input loop").start();<NEW_LINE>// Redraw loop<NEW_LINE>redrawLoop();<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>throw e;<NEW_LINE>} finally {<NEW_LINE>executor.shutdown();<NEW_LINE>terminal.trackMouse(Terminal.MouseTracking.Off);<NEW_LINE>terminal.puts(Capability.keypad_local);<NEW_LINE>terminal.puts(Capability.exit_ca_mode);<NEW_LINE>terminal.flush();<NEW_LINE>terminal.setAttributes(attributes);<NEW_LINE>terminal.handle(Signal.WINCH, prevWinchHandler);<NEW_LINE>terminal.handle(Signal.INT, prevIntHandler);<NEW_LINE>terminal.handle(Signal.TSTP, prevSuspHandler);<NEW_LINE>}<NEW_LINE>}
active().getConsole());
1,666,663
public void closeElement(String element, HashMap<String, String> attributes, String content, WarningSet warnings) throws SAXException {<NEW_LINE>content = content.trim();<NEW_LINE>if (element.equals("type")) {<NEW_LINE>// Motor type<NEW_LINE>type = null;<NEW_LINE>for (Motor.Type t : Motor.Type.values()) {<NEW_LINE>if (t.name().toLowerCase(Locale.ENGLISH).equals(content.trim())) {<NEW_LINE>type = t;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (type == null) {<NEW_LINE>warnings.add(Warning.fromString("Unknown motor type '" + content + "', ignoring."));<NEW_LINE>}<NEW_LINE>} else if (element.equals("manufacturer")) {<NEW_LINE>// Manufacturer<NEW_LINE>manufacturer = content.trim();<NEW_LINE>} else if (element.equals("designation")) {<NEW_LINE>// Designation<NEW_LINE>designation = content.trim();<NEW_LINE>} else if (element.equals("digest")) {<NEW_LINE>// Digest is used only for file versions saved using the same digest algorithm<NEW_LINE>if (context.getFileVersion() >= MOTOR_DIGEST_VERSION) {<NEW_LINE>digest = content.trim();<NEW_LINE>}<NEW_LINE>} else if (element.equals("diameter")) {<NEW_LINE>// Diameter<NEW_LINE>diameter = Double.NaN;<NEW_LINE>try {<NEW_LINE>diameter = Double.parseDouble(content.trim());<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>// Ignore<NEW_LINE>}<NEW_LINE>if (Double.isNaN(diameter)) {<NEW_LINE>warnings.add(Warning.fromString("Illegal motor diameter specified, ignoring."));<NEW_LINE>}<NEW_LINE>} else if (element.equals("length")) {<NEW_LINE>// Length<NEW_LINE>length = Double.NaN;<NEW_LINE>try {<NEW_LINE>length = Double.parseDouble(content.trim());<NEW_LINE>} catch (NumberFormatException ignore) {<NEW_LINE>}<NEW_LINE>if (Double.isNaN(length)) {<NEW_LINE>warnings.add(Warning.fromString("Illegal motor diameter specified, ignoring."));<NEW_LINE>}<NEW_LINE>} else if (element.equals("delay")) {<NEW_LINE>// Delay<NEW_LINE>delay = Double.NaN;<NEW_LINE>if (content.equals("none")) {<NEW_LINE>delay = Motor.PLUGGED_DELAY;<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>delay = Double.parseDouble(content.trim());<NEW_LINE>} catch (NumberFormatException ignore) {<NEW_LINE>}<NEW_LINE>if (Double.isNaN(delay)) {<NEW_LINE>warnings.add(Warning.fromString("Illegal motor delay specified, ignoring."));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>super.closeElement(<MASK><NEW_LINE>}<NEW_LINE>}
element, attributes, content, warnings);
270,745
public void relocate(MachoRelocation relocation) throws MemoryAccessException, NotFoundException {<NEW_LINE>if (!relocation.requiresRelocation()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RelocationInfo relocationInfo = relocation.getRelocationInfo();<NEW_LINE>Address targetAddr = relocation.getTargetAddress();<NEW_LINE>long orig = read(relocation);<NEW_LINE>switch(relocationInfo.getType()) {<NEW_LINE>case ARM_RELOC_VANILLA:<NEW_LINE>if (!relocationInfo.isPcRelocated()) {<NEW_LINE>write(relocation, targetAddr.getOffset());<NEW_LINE>} else {<NEW_LINE>throw new NotFoundException("Unimplemented relocation");<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case ARM_THUMB_RELOC_BR22:<NEW_LINE>{<NEW_LINE>// BL and BLX<NEW_LINE>boolean blx = (orig & 0xd000f800) == 0xc000f000;<NEW_LINE>long s = (orig >> 10) & 0x1;<NEW_LINE>long j1 = (orig >> 29) & 0x1;<NEW_LINE>long j2 = (orig >> 27) & 0x1;<NEW_LINE>long i1 = ~(j1 ^ s) & 0x1;<NEW_LINE>long i2 = ~(j2 ^ s) & 0x1;<NEW_LINE>long imm10 = orig & 0x3ff;<NEW_LINE>long imm11 = (orig >> 16) & 0x7ff;<NEW_LINE>long addend = (s << 24) | (i1 << 23) | (i2 << 22) | (imm10 << 12) | (imm11 << 1);<NEW_LINE>// sign extend<NEW_LINE>addend |= s == 1 ? 0xfe000000 : 0;<NEW_LINE>// 4-byte align BLX<NEW_LINE>addend &= blx ? ~0x3 : ~0;<NEW_LINE>long value = targetAddr.getOffset() + addend;<NEW_LINE>s = (value >> 24) & 0x1;<NEW_LINE>i1 = (value >> 23) & 0x1;<NEW_LINE>i2 = (value >> 22) & 0x1;<NEW_LINE>j1 = ~(i1 ^ s) & 0x1;<NEW_LINE>j2 = ~(i2 ^ s) & 0x1;<NEW_LINE>imm10 = <MASK><NEW_LINE>imm11 = (value >> 1) & 0x7ff;<NEW_LINE>long instr = orig & (blx ? 0xc000f800 : 0xd000f800);<NEW_LINE>instr |= (j1 << 29) | (j2 << 27) | (imm11 << 16) | (s << 10) | imm10;<NEW_LINE>write(relocation, instr);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// should never see on its own here<NEW_LINE>case ARM_RELOC_PAIR:<NEW_LINE>// relocation not required (scattered)<NEW_LINE>case ARM_RELOC_SECTDIFF:<NEW_LINE>// relocation not required (scattered)<NEW_LINE>case ARM_RELOC_LOCAL_SECTDIFF:<NEW_LINE>// not seen yet<NEW_LINE>case ARM_RELOC_PB_LA_PTR:<NEW_LINE>// not seen yet<NEW_LINE>case ARM_RELOC_BR24:<NEW_LINE>// not seen yet<NEW_LINE>case ARM_THUMB_32BIT_BRANCH:<NEW_LINE>// relocation not required (scattered)<NEW_LINE>case ARM_RELOC_HALF:<NEW_LINE>// relocation not required (scattered)<NEW_LINE>case ARM_RELOC_HALF_SECTDIFF:<NEW_LINE>default:<NEW_LINE>throw new NotFoundException("Unimplemented relocation");<NEW_LINE>}<NEW_LINE>}
(value >> 12) & 0x3ff;
1,477,848
// -- Writer --------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public void write(ByteBuffer byteBuffer, CompletionHandler<ByteBuffer> handler) {<NEW_LINE>// No queueing if there is no subscriber<NEW_LINE>if (subscriber == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Nothing requested yet, just queue buffer<NEW_LINE>if (requested.get() <= 0) {<NEW_LINE>queue.add(new QueuedBuffer(byteBuffer, handler));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Write queued buffers first<NEW_LINE>while (!queue.isEmpty() && requested.get() > 0) {<NEW_LINE>QueuedBuffer queuedBuffer = queue.remove();<NEW_LINE>writeNext(queuedBuffer.byteBuffer(), queuedBuffer.completionHandler());<NEW_LINE>decrement(requested);<NEW_LINE>}<NEW_LINE>// Process current buffer<NEW_LINE>if (requested.get() > 0) {<NEW_LINE>writeNext(byteBuffer, handler);<NEW_LINE>decrement(requested);<NEW_LINE>} else {<NEW_LINE>queue.add(<MASK><NEW_LINE>}<NEW_LINE>}
new QueuedBuffer(byteBuffer, handler));
1,202,692
public void run() {<NEW_LINE>ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();<NEW_LINE>OutputStream outputStream = byteArrayOutputStream;<NEW_LINE>// TODO: intelligent size<NEW_LINE>// a multiple of 4 and of 6, to support 16- and 24-bit stereo as well<NEW_LINE>byte[<MASK><NEW_LINE>AudioFormat format = m_line.getFormat();<NEW_LINE>int nFrameSize = format.getFrameSize();<NEW_LINE>long totalBytesToRead = (long) (millis * format.getFrameRate() * nFrameSize / 1000);<NEW_LINE>if (totalBytesToRead % nFrameSize != 0) {<NEW_LINE>totalBytesToRead += nFrameSize - totalBytesToRead % nFrameSize;<NEW_LINE>}<NEW_LINE>long totalBytes = 0;<NEW_LINE>m_bRecording = true;<NEW_LINE>while (m_bRecording) {<NEW_LINE>int bytesToRead = abBuffer.length;<NEW_LINE>if (totalBytesToRead > 0 && totalBytes + abBuffer.length > totalBytesToRead) {<NEW_LINE>bytesToRead = (int) (totalBytesToRead - totalBytes);<NEW_LINE>}<NEW_LINE>if (sm_bDebug) {<NEW_LINE>out("BufferingRecorder.run(): trying to read: " + bytesToRead);<NEW_LINE>}<NEW_LINE>int nBytesRead = m_line.read(abBuffer, 0, bytesToRead);<NEW_LINE>totalBytes += nBytesRead;<NEW_LINE>if (totalBytesToRead > 0 && totalBytes >= totalBytesToRead) {<NEW_LINE>// read all we needed<NEW_LINE>m_bRecording = false;<NEW_LINE>}<NEW_LINE>if (sm_bDebug) {<NEW_LINE>out("BufferingRecorder.run(): read: " + nBytesRead);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>outputStream.write(abBuffer, 0, nBytesRead);<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>byteArrayOutputStream.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>byte[] abData = byteArrayOutputStream.toByteArray();<NEW_LINE>ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(abData);<NEW_LINE>AudioInputStream audioInputStream = new AudioInputStream(byteArrayInputStream, format, abData.length / format.getFrameSize());<NEW_LINE>if (audioProcessor != null) {<NEW_LINE>audioInputStream = audioProcessor.apply(audioInputStream);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>AudioSystem.write(audioInputStream, m_targetType, m_file);<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
] abBuffer = new byte[65532];
1,066,575
public void marshall(StreamInfo streamInfo, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (streamInfo == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(streamInfo.getDeviceName(), DEVICENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(streamInfo.getStreamName(), STREAMNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(streamInfo.getStreamARN(), STREAMARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(streamInfo.getMediaType(), MEDIATYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(streamInfo.getKmsKeyId(), KMSKEYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(streamInfo.getVersion(), VERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(streamInfo.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(streamInfo.getCreationTime(), CREATIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(streamInfo.getDataRetentionInHours(), DATARETENTIONINHOURS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
810,497
// TODO(kstanger): Figure out if this can replace TypeUtil.getSignatureName().<NEW_LINE>private void genTypeSignature(TypeMirror type, StringBuilder sb) {<NEW_LINE>switch(type.getKind()) {<NEW_LINE>case BOOLEAN:<NEW_LINE>case BYTE:<NEW_LINE>case CHAR:<NEW_LINE>case DOUBLE:<NEW_LINE>case FLOAT:<NEW_LINE>case INT:<NEW_LINE>case LONG:<NEW_LINE>case SHORT:<NEW_LINE>case VOID:<NEW_LINE>sb.append(TypeUtil.getBinaryName(type));<NEW_LINE>break;<NEW_LINE>case ARRAY:<NEW_LINE>// ArrayTypeSignature ::= "[" TypSignature.<NEW_LINE>sb.append('[');<NEW_LINE>genTypeSignature(((ArrayType) type).getComponentType(), sb);<NEW_LINE>break;<NEW_LINE>case DECLARED:<NEW_LINE>String typeName = elementUtil.getBinaryName(TypeUtil.asTypeElement(type));<NEW_LINE>if (!TypeUtil.isStubType(typeName)) {<NEW_LINE>// ClassTypeSignature ::= "L" {Ident "/"} Ident<NEW_LINE>// OptTypeArguments {"." Ident OptTypeArguments} ";".<NEW_LINE>sb.append('L');<NEW_LINE>sb.append(typeName<MASK><NEW_LINE>genOptTypeArguments(((DeclaredType) type).getTypeArguments(), sb);<NEW_LINE>sb.append(';');<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case TYPEVAR:<NEW_LINE>// TypeVariableSignature ::= "T" Ident ";".<NEW_LINE>sb.append('T');<NEW_LINE>sb.append(ElementUtil.getName(((TypeVariable) type).asElement()));<NEW_LINE>sb.append(';');<NEW_LINE>break;<NEW_LINE>case WILDCARD:<NEW_LINE>// TypeArgument ::= (["+" | "-"] FieldTypeSignature) | "*".<NEW_LINE>TypeMirror upperBound = ((WildcardType) type).getExtendsBound();<NEW_LINE>TypeMirror lowerBound = ((WildcardType) type).getSuperBound();<NEW_LINE>if (upperBound != null) {<NEW_LINE>sb.append('+');<NEW_LINE>genTypeSignature(upperBound, sb);<NEW_LINE>} else if (lowerBound != null) {<NEW_LINE>sb.append('-');<NEW_LINE>genTypeSignature(lowerBound, sb);<NEW_LINE>} else {<NEW_LINE>sb.append('*');<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new AssertionError("Unexpected type kind: " + type.getKind());<NEW_LINE>}<NEW_LINE>}
.replace('.', '/'));
1,672,226
private void resolveAdmin(MethodRabbitListenerEndpoint endpoint, RabbitListener rabbitListener, Object adminTarget) {<NEW_LINE>Object resolved = resolveExpression(rabbitListener.admin());<NEW_LINE>if (resolved instanceof AmqpAdmin) {<NEW_LINE>endpoint.setAdmin((AmqpAdmin) resolved);<NEW_LINE>} else {<NEW_LINE>String rabbitAdmin = resolveExpressionAsString(<MASK><NEW_LINE>if (StringUtils.hasText(rabbitAdmin)) {<NEW_LINE>Assert.state(this.beanFactory != null, "BeanFactory must be set to resolve RabbitAdmin by bean name");<NEW_LINE>try {<NEW_LINE>endpoint.setAdmin(this.beanFactory.getBean(rabbitAdmin, RabbitAdmin.class));<NEW_LINE>} catch (NoSuchBeanDefinitionException ex) {<NEW_LINE>throw new BeanInitializationException("Could not register rabbit listener endpoint on [" + adminTarget + "], no " + RabbitAdmin.class.getSimpleName() + " with id '" + rabbitAdmin + "' was found in the application context", ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
rabbitListener.admin(), "admin");
137,849
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.impetus.kundera.client.Client#findIdsByColumn(java.lang.String,<NEW_LINE>* java.lang.String, java.lang.String, java.lang.Object, java.lang.Class)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public Object[] findIdsByColumn(String schemaName, String tableName, String pKeyName, String columnName, Object columnValue, Class entityClazz) {<NEW_LINE>CompareOp operator = HBaseUtils.getOperator("=", <MASK><NEW_LINE>EntityMetadata m = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClazz);<NEW_LINE>byte[] valueInBytes = HBaseUtils.getBytes(columnValue);<NEW_LINE>Filter f = new SingleColumnValueFilter(Bytes.toBytes(tableName), Bytes.toBytes(columnName), operator, valueInBytes);<NEW_LINE>KeyOnlyFilter keyFilter = new KeyOnlyFilter();<NEW_LINE>FilterList filterList = new FilterList(f, keyFilter);<NEW_LINE>try {<NEW_LINE>return handler.scanRowyKeys(filterList, schemaName, tableName, columnName + "_" + columnValue, m.getIdAttribute().getBindableJavaType());<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.error("Error while executing findIdsByColumn(), Caused by: .", e);<NEW_LINE>throw new KunderaException(e);<NEW_LINE>}<NEW_LINE>}
false, false).getOperator();
1,484,218
final ExportConfigurationsResult executeExportConfigurations(ExportConfigurationsRequest exportConfigurationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(exportConfigurationsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ExportConfigurationsRequest> request = null;<NEW_LINE>Response<ExportConfigurationsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ExportConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(exportConfigurationsRequest));<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, "Application Discovery Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ExportConfigurations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ExportConfigurationsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ExportConfigurationsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
201,166
private void syncCommonConfig() {<NEW_LINE>PowerUnits.TR.conversionRatio = COMMON.powerRatioTechReborn.get();<NEW_LINE>PowerMultiplier.CONFIG.multiplier = COMMON.powerUsageMultiplier.get();<NEW_LINE>CondenserOutput.MATTER_BALLS.requiredPower = COMMON.condenserMatterBallsPower.get();<NEW_LINE>CondenserOutput.SINGULARITY.requiredPower = COMMON.condenserSingularityPower.get();<NEW_LINE>this.wirelessBaseCost = COMMON.wirelessBaseCost.get();<NEW_LINE>this.wirelessCostMultiplier = COMMON.wirelessCostMultiplier.get();<NEW_LINE>this.wirelessBaseRange = COMMON.wirelessBaseRange.get();<NEW_LINE>this.wirelessBoosterRangeMultiplier = COMMON.wirelessBoosterRangeMultiplier.get();<NEW_LINE>this.wirelessBoosterExp = COMMON.wirelessBoosterExp.get();<NEW_LINE>this.wirelessHighWirelessCount = COMMON.wirelessHighWirelessCount.get();<NEW_LINE>this.wirelessTerminalDrainMultiplier = COMMON.wirelessTerminalDrainMultiplier.get();<NEW_LINE>this.formationPlaneEntityLimit = COMMON.formationPlaneEntityLimit.get();<NEW_LINE>this.wirelessTerminalBattery = COMMON.wirelessTerminalBattery.get();<NEW_LINE>this.chargedStaffBattery <MASK><NEW_LINE>this.entropyManipulatorBattery = COMMON.entropyManipulatorBattery.get();<NEW_LINE>this.portableCellBattery = COMMON.portableCellBattery.get();<NEW_LINE>this.colorApplicatorBattery = COMMON.colorApplicatorBattery.get();<NEW_LINE>this.matterCannonBattery = COMMON.matterCannonBattery.get();<NEW_LINE>for (TickRates tr : TickRates.values()) {<NEW_LINE>tr.setMin(COMMON.tickRateMin.get(tr).get());<NEW_LINE>tr.setMax(COMMON.tickRateMax.get(tr).get());<NEW_LINE>}<NEW_LINE>this.spatialPowerMultiplier = COMMON.spatialPowerMultiplier.get();<NEW_LINE>this.spatialPowerExponent = COMMON.spatialPowerExponent.get();<NEW_LINE>this.craftingCalculationTimePerTick = COMMON.craftingCalculationTimePerTick.get();<NEW_LINE>AEWorldGenInternal.setConfigBlacklists(COMMON.quartzOresBiomeBlacklist.get().stream().map(ResourceLocation::new).collect(Collectors.toList()));<NEW_LINE>AELog.setCraftingLogEnabled(COMMON.craftingLog.get());<NEW_LINE>AELog.setDebugLogEnabled(COMMON.debugLog.get());<NEW_LINE>}
= COMMON.chargedStaffBattery.get();
1,366,846
private void sendRaidLayoutMessage() {<NEW_LINE>final String layout = getRaid().getLayout().toCodeString();<NEW_LINE>final String rooms = getRaid().toRoomString();<NEW_LINE>final String raidData = "[" + layout + "]: " + rooms;<NEW_LINE>final String layoutMessage = new ChatMessageBuilder().append(ChatColorType.HIGHLIGHT).append("Layout: ").append(ChatColorType.NORMAL).append(raidData).build();<NEW_LINE>final PartyMember localMember = party.getLocalMember();<NEW_LINE>if (party.getMembers().isEmpty() || localMember == null) {<NEW_LINE>chatMessageManager.queue(QueuedMessage.builder().type(ChatMessageType.FRIENDSCHATNOTIFICATION).runeLiteFormattedMessage<MASK><NEW_LINE>} else {<NEW_LINE>final PartyChatMessage message = new PartyChatMessage(layoutMessage);<NEW_LINE>message.setMemberId(localMember.getMemberId());<NEW_LINE>ws.send(message);<NEW_LINE>}<NEW_LINE>}
(layoutMessage).build());
1,556,564
private ProducerInfo buildProducerInfo(Method method) {<NEW_LINE>Class<?>[] parameterTypes = method.getParameterTypes();<NEW_LINE>if (parameterTypes.length == 0 || parameterTypes.length > 2) {<NEW_LINE>throw new IllegalStateException("Producer method must have at least one and at most two parameters: " + Consumer.class.getName() + "<" + Message.class.getName() + "> (required), " + MessageContext.class.getName() + " (optional)");<NEW_LINE>}<NEW_LINE>Optional<Type> argumentType = unwrapSingleTypeParameter(method.getGenericParameterTypes()[0]);<NEW_LINE>if (!Consumer.class.isAssignableFrom(parameterTypes[0]) || !argumentType.isPresent() || !Message.class.equals(argumentType.get())) {<NEW_LINE>throw new IllegalStateException("Producer method must have " + Consumer.class.getName() + "<" + Message.class.getName() + "> as the first parameter");<NEW_LINE>}<NEW_LINE>if (parameterTypes.length == 2) {<NEW_LINE>if (!MessageContext.class.equals(parameterTypes[1])) {<NEW_LINE>throw new IllegalStateException("Producer method must have " + MessageContext.class.getName() + " as the second parameter");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MethodHandle handle;<NEW_LINE>try {<NEW_LINE>handle = MethodHandles.publicLookup().unreflect(method);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>throw new RuntimeException("Failed to create method handle: " + <MASK><NEW_LINE>}<NEW_LINE>ProducerInfo producerInfo = new ProducerInfo();<NEW_LINE>producerInfo.setHandle(handle);<NEW_LINE>return producerInfo;<NEW_LINE>}
method.getName(), e);
306,515
public static void emit(org.xml.sax.ContentHandler contentHandler, nu.validator.servlet.VerifierServletTransaction t) throws org.xml.sax.SAXException {<NEW_LINE>org.xml.sax.helpers.AttributesImpl __attrs__ = new org.xml.sax.helpers.AttributesImpl();<NEW_LINE>contentHandler.startPrefixMapping("", "http://www.w3.org/1999/xhtml");<NEW_LINE>__attrs__.clear();<NEW_LINE>__attrs__.addAttribute("", "class", "class", "CDATA", "stats");<NEW_LINE>contentHandler.startElement(<MASK><NEW_LINE>contentHandler.characters(__chars__, 0, 21);<NEW_LINE>t.emitTotalDuration();<NEW_LINE>contentHandler.characters(__chars__, 21, 14);<NEW_LINE>contentHandler.endElement("http://www.w3.org/1999/xhtml", "p", "p");<NEW_LINE>contentHandler.endPrefixMapping("");<NEW_LINE>}
"http://www.w3.org/1999/xhtml", "p", "p", __attrs__);
1,075,282
public Void visitAsPathMatchExprReference(AsPathMatchExprReference asPathMatchExprReference, AsPathStructuresVerifierContext arg) {<NEW_LINE><MASK><NEW_LINE>if (arg._verifiedAsPathMatchExprReferences.contains(name)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (arg._asPathMatchExprReferenceStack.contains(name)) {<NEW_LINE>// circular reference<NEW_LINE>throw new VendorConversionException(String.format("Circular reference to AsPathMatchExpr: '%s'", name));<NEW_LINE>}<NEW_LINE>arg._asPathMatchExprReferenceStack.add(name);<NEW_LINE>AsPathMatchExpr resolved = arg._asPathMatchExprs.get(name);<NEW_LINE>if (resolved == null) {<NEW_LINE>// undefined reference<NEW_LINE>throw new VendorConversionException(String.format("Undefined reference to AsPathMatchExpr: '%s'", name));<NEW_LINE>}<NEW_LINE>resolved.accept(AS_PATH_MATCH_EXPR_VERIFIER, arg);<NEW_LINE>arg._verifiedAsPathMatchExprReferences.add(name);<NEW_LINE>arg._asPathMatchExprReferenceStack.remove(name);<NEW_LINE>return null;<NEW_LINE>}
String name = asPathMatchExprReference.getName();
160,052
public ColumnVector upperBound(Table valueTable, OrderByArg... args) {<NEW_LINE>boolean[] areNullsSmallest = new boolean[args.length];<NEW_LINE>boolean[] descFlags = new boolean[args.length];<NEW_LINE>ColumnVector[] inputColumns = new ColumnVector[args.length];<NEW_LINE>ColumnVector[] searchColumns = new ColumnVector[args.length];<NEW_LINE>for (int i = 0; i < args.length; i++) {<NEW_LINE>areNullsSmallest[i] = args[i].isNullSmallest;<NEW_LINE>descFlags[i<MASK><NEW_LINE>inputColumns[i] = columns[args[i].index];<NEW_LINE>searchColumns[i] = valueTable.columns[args[i].index];<NEW_LINE>}<NEW_LINE>try (Table input = new Table(inputColumns);<NEW_LINE>Table search = new Table(searchColumns)) {<NEW_LINE>return input.upperBound(areNullsSmallest, search, descFlags);<NEW_LINE>}<NEW_LINE>}
] = args[i].isDescending;
1,775,159
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>group = new javax.swing.ButtonGroup();<NEW_LINE>sourceButton = new javax.swing.JRadioButton();<NEW_LINE>targetButton = new javax.swing.JRadioButton();<NEW_LINE>anyButton = new javax.swing.JRadioButton();<NEW_LINE>bothButton = new javax.swing.JRadioButton();<NEW_LINE>setLayout(new java.awt.GridBagLayout());<NEW_LINE>group.add(sourceButton);<NEW_LINE>// NOI18N<NEW_LINE>sourceButton.// NOI18N<NEW_LINE>setText(org.openide.util.NbBundle.getMessage(MASKEdgePanel.class, "MASKEdgePanel.sourceButton.text"));<NEW_LINE>gridBagConstraints = <MASK><NEW_LINE>gridBagConstraints.gridx = 1;<NEW_LINE>gridBagConstraints.gridy = 0;<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;<NEW_LINE>add(sourceButton, gridBagConstraints);<NEW_LINE>group.add(targetButton);<NEW_LINE>// NOI18N<NEW_LINE>targetButton.// NOI18N<NEW_LINE>setText(org.openide.util.NbBundle.getMessage(MASKEdgePanel.class, "MASKEdgePanel.targetButton.text"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 1;<NEW_LINE>gridBagConstraints.gridy = 1;<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;<NEW_LINE>add(targetButton, gridBagConstraints);<NEW_LINE>group.add(anyButton);<NEW_LINE>anyButton.setSelected(true);<NEW_LINE>// NOI18N<NEW_LINE>anyButton.// NOI18N<NEW_LINE>setText(org.openide.util.NbBundle.getMessage(MASKEdgePanel.class, "MASKEdgePanel.anyButton.text"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 0;<NEW_LINE>gridBagConstraints.gridy = 0;<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(0, 20, 0, 0);<NEW_LINE>add(anyButton, gridBagConstraints);<NEW_LINE>group.add(bothButton);<NEW_LINE>// NOI18N<NEW_LINE>bothButton.// NOI18N<NEW_LINE>setText(org.openide.util.NbBundle.getMessage(MASKEdgePanel.class, "MASKEdgePanel.bothButton.text"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 0;<NEW_LINE>gridBagConstraints.gridy = 1;<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(0, 20, 0, 0);<NEW_LINE>add(bothButton, gridBagConstraints);<NEW_LINE>}
new java.awt.GridBagConstraints();
993,443
final RunTaskResult executeRunTask(RunTaskRequest runTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(runTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RunTaskRequest> request = null;<NEW_LINE>Response<RunTaskResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new RunTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(runTaskRequest));<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, "ECS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RunTask");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<RunTaskResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RunTaskResultJsonUnmarshaller());<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);
752,841
public void marshall(MonitoringScheduleSummary monitoringScheduleSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (monitoringScheduleSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(monitoringScheduleSummary.getMonitoringScheduleName(), MONITORINGSCHEDULENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(monitoringScheduleSummary.getMonitoringScheduleArn(), MONITORINGSCHEDULEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(monitoringScheduleSummary.getCreationTime(), CREATIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(monitoringScheduleSummary.getLastModifiedTime(), LASTMODIFIEDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(monitoringScheduleSummary.getMonitoringScheduleStatus(), MONITORINGSCHEDULESTATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(monitoringScheduleSummary.getEndpointName(), ENDPOINTNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(monitoringScheduleSummary.getMonitoringJobDefinitionName(), MONITORINGJOBDEFINITIONNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
monitoringScheduleSummary.getMonitoringType(), MONITORINGTYPE_BINDING);
78,150
public int compare(City lhs, City rhs) {<NEW_LINE>final String part = getFilter().toString();<NEW_LINE>int <MASK><NEW_LINE>if (compare != 0) {<NEW_LINE>return compare;<NEW_LINE>}<NEW_LINE>boolean st1 = CollatorStringMatcher.cmatches(cs, lhs.getName(lang, transliterate), part, startsWith);<NEW_LINE>boolean st2 = CollatorStringMatcher.cmatches(cs, rhs.getName(lang, transliterate), part, startsWith);<NEW_LINE>if (st1 != st2) {<NEW_LINE>return st1 ? 1 : -1;<NEW_LINE>}<NEW_LINE>compare = cs.compare(getText(lhs), getText(rhs));<NEW_LINE>if (compare != 0) {<NEW_LINE>return compare;<NEW_LINE>}<NEW_LINE>if (locationToSearch != null) {<NEW_LINE>double d1 = MapUtils.getDistance(locationToSearch, lhs.getLocation());<NEW_LINE>double d2 = MapUtils.getDistance(locationToSearch, rhs.getLocation());<NEW_LINE>return -Double.compare(d1, d2);<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
compare = compareCityType(lhs, rhs);
781,464
public static GetChatappTemplateDetailResponse unmarshall(GetChatappTemplateDetailResponse getChatappTemplateDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>getChatappTemplateDetailResponse.setRequestId(_ctx.stringValue("GetChatappTemplateDetailResponse.RequestId"));<NEW_LINE>getChatappTemplateDetailResponse.setCode(_ctx.stringValue("GetChatappTemplateDetailResponse.Code"));<NEW_LINE>getChatappTemplateDetailResponse.setMessage(_ctx.stringValue("GetChatappTemplateDetailResponse.Message"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setCategory(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Category"));<NEW_LINE>data.setTemplateCode(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.TemplateCode"));<NEW_LINE>data.setName<MASK><NEW_LINE>data.setLanguage(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Language"));<NEW_LINE>data.setExample(_ctx.mapValue("GetChatappTemplateDetailResponse.Data.Example"));<NEW_LINE>data.setAuditStatus(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.AuditStatus"));<NEW_LINE>List<Component> components = new ArrayList<Component>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetChatappTemplateDetailResponse.Data.Components.Length"); i++) {<NEW_LINE>Component component = new Component();<NEW_LINE>component.setType(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Components[" + i + "].Type"));<NEW_LINE>component.setUrl(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Components[" + i + "].Url"));<NEW_LINE>component.setText(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Components[" + i + "].Text"));<NEW_LINE>List<Button> buttons = new ArrayList<Button>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("GetChatappTemplateDetailResponse.Data.Components[" + i + "].Buttons.Length"); j++) {<NEW_LINE>Button button = new Button();<NEW_LINE>button.setType(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Components[" + i + "].Buttons[" + j + "].Type"));<NEW_LINE>button.setText(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Components[" + i + "].Buttons[" + j + "].Text"));<NEW_LINE>button.setPhoneNumber(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Components[" + i + "].Buttons[" + j + "].PhoneNumber"));<NEW_LINE>button.setUrl(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Components[" + i + "].Buttons[" + j + "].Url"));<NEW_LINE>button.setUrlType(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Components[" + i + "].Buttons[" + j + "].UrlType"));<NEW_LINE>buttons.add(button);<NEW_LINE>}<NEW_LINE>component.setButtons(buttons);<NEW_LINE>components.add(component);<NEW_LINE>}<NEW_LINE>data.setComponents(components);<NEW_LINE>getChatappTemplateDetailResponse.setData(data);<NEW_LINE>return getChatappTemplateDetailResponse;<NEW_LINE>}
(_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Name"));
800,129
private void reinitFonts() {<NEW_LINE>EditorColorsScheme delegate = getDelegate();<NEW_LINE>String editorFontName = getEditorFontName();<NEW_LINE>int editorFontSize = getEditorFontSize();<NEW_LINE>updatePreferences(myFontPreferences, editorFontName, editorFontSize, delegate == null ? null : delegate.getFontPreferences());<NEW_LINE>String consoleFontName = getConsoleFontName();<NEW_LINE>int consoleFontSize = getConsoleFontSize();<NEW_LINE>updatePreferences(myConsoleFontPreferences, consoleFontName, consoleFontSize, delegate == null ? null : delegate.getConsoleFontPreferences());<NEW_LINE>myFontsMap = new EnumMap<>(EditorFontType.class);<NEW_LINE>myFontsMap.put(EditorFontType.PLAIN, new Font(editorFontName, Font.PLAIN, editorFontSize));<NEW_LINE>myFontsMap.put(EditorFontType.BOLD, new Font(editorFontName, Font.BOLD, editorFontSize));<NEW_LINE>myFontsMap.put(EditorFontType.ITALIC, new Font(editorFontName, Font.ITALIC, editorFontSize));<NEW_LINE>myFontsMap.put(EditorFontType.BOLD_ITALIC, new Font(editorFontName, Font.BOLD | Font.ITALIC, editorFontSize));<NEW_LINE>myFontsMap.put(EditorFontType.CONSOLE_PLAIN, new Font(consoleFontName, Font.PLAIN, consoleFontSize));<NEW_LINE>myFontsMap.put(EditorFontType.CONSOLE_BOLD, new Font(consoleFontName<MASK><NEW_LINE>myFontsMap.put(EditorFontType.CONSOLE_ITALIC, new Font(consoleFontName, Font.ITALIC, consoleFontSize));<NEW_LINE>myFontsMap.put(EditorFontType.CONSOLE_BOLD_ITALIC, new Font(consoleFontName, Font.BOLD | Font.ITALIC, consoleFontSize));<NEW_LINE>}
, Font.BOLD, consoleFontSize));
1,216,430
public static String toTimecode(long duration, TimeUnit units) {<NEW_LINE>// FIXME Negative durations are also supported.<NEW_LINE>// https://www.ffmpeg.org/ffmpeg-utils.html#Time-duration<NEW_LINE>checkArgument(duration >= 0, "duration must be positive");<NEW_LINE>// TODO This will clip at Long.MAX_VALUE<NEW_LINE>long nanoseconds = units.toNanos(duration);<NEW_LINE>long seconds = units.toSeconds(duration);<NEW_LINE>long ns = <MASK><NEW_LINE>long minutes = SECONDS.toMinutes(seconds);<NEW_LINE>seconds -= MINUTES.toSeconds(minutes);<NEW_LINE>long hours = MINUTES.toHours(minutes);<NEW_LINE>minutes -= HOURS.toMinutes(hours);<NEW_LINE>if (ns == 0) {<NEW_LINE>return String.format("%02d:%02d:%02d", hours, minutes, seconds);<NEW_LINE>}<NEW_LINE>return ZERO.trimTrailingFrom(String.format("%02d:%02d:%02d.%09d", hours, minutes, seconds, ns));<NEW_LINE>}
nanoseconds - SECONDS.toNanos(seconds);
1,298,732
private synchronized static void initGlobalSecuritySettings() {<NEW_LINE>globalSensitiveInformationExposureTokens = new SettingsTestPropertyHolder(SoapUI.getSettings(<MASK><NEW_LINE>String propFile = System.getProperty("soapui.security.exposure.tokens");<NEW_LINE>if (StringUtils.hasContent(propFile)) {<NEW_LINE>globalSensitiveInformationExposureTokens.addPropertiesFromFile(propFile);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>SearchPatternsDocumentConfig doc = SearchPatternsDocumentConfig.Factory.parse(SoapUI.class.getResourceAsStream("/com/eviware/soapui/resources/security/SensitiveInfo.xml"));<NEW_LINE>for (RegexConfig regex : doc.getSearchPatterns().getRegexList()) {<NEW_LINE>String description = regex.getDescription();<NEW_LINE>for (String pattern : regex.getPatternList()) {<NEW_LINE>globalSensitiveInformationExposureTokens.setPropertyValue("~(?s).*" + pattern + ".*", "[" + regex.getName() + "] " + description);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>SoapUI.logError(e);<NEW_LINE>}<NEW_LINE>}
), null, GlobalPropertySettings.SECURITY_CHECKS_PROPERTIES);
804,448
private Request.Builder prepareRequest() {<NEW_LINE>final Request.Builder builder = new Request.Builder();<NEW_LINE>// Uri<NEW_LINE>final String finalUri = uriBase == null ? uri : uriBase + uri;<NEW_LINE>final HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(finalUri)).newBuilder();<NEW_LINE>if (!uriParams.isEmpty()) {<NEW_LINE>urlBuilder.<MASK><NEW_LINE>}<NEW_LINE>builder.url(urlBuilder.build());<NEW_LINE>// method and body<NEW_LINE>final Method m = (method != null ? method : (requestBodySupplier == null ? Method.GET : Method.POST));<NEW_LINE>final Supplier<RequestBody> rbs = requestBodySupplier != null ? requestBodySupplier : () -> new FormBody.Builder().build();<NEW_LINE>switch(m) {<NEW_LINE>case POST:<NEW_LINE>builder.post(rbs.get());<NEW_LINE>break;<NEW_LINE>case PATCH:<NEW_LINE>builder.patch(rbs.get());<NEW_LINE>break;<NEW_LINE>case GET:<NEW_LINE>default:<NEW_LINE>builder.get();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// header<NEW_LINE>for (final ImmutablePair<String, String> header : headers) {<NEW_LINE>builder.header(header.left, header.right);<NEW_LINE>}<NEW_LINE>return builder;<NEW_LINE>}
encodedQuery(uriParams.toString());
541,075
private void printWeighted() {<NEW_LINE><MASK><NEW_LINE>out.print("\t@Override\n" + "\tprotected double computeWeightedScore(int c_x, int c_y)\n" + "\t{\n" + "\t\tfloat sumX=0,sumY=0;\n" + "\t\t\n" + "\t\tfor( int y = rect.y0; y < rect.y1; y++ ) {\n" + "\t\t\tint indexX = derivX.startIndex + derivX.stride*y + rect.x0;\n" + "\t\t\tint indexY = derivY.startIndex + derivY.stride*y + rect.x0;\n" + "\t\t\tint indexW = (y-c_y+radiusScale)*weights.width + rect.x0-c_x+radiusScale;\n" + "\n" + "\t\t\tfor( int x = rect.x0; x < rect.x1; x++ , indexX++ , indexY++ , indexW++ ) {\n" + "\t\t\t\tfloat w = weights.data[indexW];\n" + "\n" + "\t\t\t\tsumX += w * derivX.data[indexX]" + bitWise + ";\n" + "\t\t\t\tsumY += w * derivY.data[indexY]" + bitWise + ";\n" + "\t\t\t}\n" + "\t\t}\n" + "\t\treturn Math.atan2(sumY,sumX);\n" + "\t}\n\n");<NEW_LINE>}
String bitWise = imageType.getBitWise();
933,830
public void marshall(Mpeg2Settings mpeg2Settings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (mpeg2Settings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getAdaptiveQuantization(), ADAPTIVEQUANTIZATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getAfdSignaling(), AFDSIGNALING_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getColorMetadata(), COLORMETADATA_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getColorSpace(), COLORSPACE_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getDisplayAspectRatio(), DISPLAYASPECTRATIO_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getFilterSettings(), FILTERSETTINGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getFixedAfd(), FIXEDAFD_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getFramerateDenominator(), FRAMERATEDENOMINATOR_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getFramerateNumerator(), FRAMERATENUMERATOR_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getGopClosedCadence(), GOPCLOSEDCADENCE_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getGopNumBFrames(), GOPNUMBFRAMES_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getGopSize(), GOPSIZE_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getGopSizeUnits(), GOPSIZEUNITS_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getSubgopLength(), SUBGOPLENGTH_BINDING);<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getTimecodeInsertion(), TIMECODEINSERTION_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
mpeg2Settings.getScanType(), SCANTYPE_BINDING);
1,207,758
private void createTimer() {<NEW_LINE>final Icon[<MASK><NEW_LINE>// NOI18N<NEW_LINE>for (int i = 0; i < busyIcons.length; i++) busyIcons[i] = new ImageIcon(getClass().getResource("/org/graalvm/visualvm/core/ui/resources/busy-icon" + i + ".png"));<NEW_LINE>busyIconTimer = new Timer(ANIMATION_RATE, new ActionListener() {<NEW_LINE><NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>if (!ANIMATE) {<NEW_LINE>// Stop animation<NEW_LINE>if (busyIconTimer != null)<NEW_LINE>busyIconTimer.stop();<NEW_LINE>// NOI18N<NEW_LINE>presenter1.setIcon(new ImageIcon(getClass().getResource("/org/graalvm/visualvm/core/ui/resources/busy-icon4.png")));<NEW_LINE>} else {<NEW_LINE>busyIconIndex = (busyIconIndex + 1) % busyIcons.length;<NEW_LINE>if (!DataSourceCaption.this.isShowing())<NEW_LINE>return;<NEW_LINE>presenter1.setIcon(busyIcons[busyIconIndex]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
] busyIcons = new Icon[15];
1,403,669
protected void executeActivityBehavior(ActivityBehavior activityBehavior, FlowNode flowNode) {<NEW_LINE>LOGGER.debug("Executing activityBehavior {} on activity '{}' with execution {}", activityBehavior.getClass(), flowNode.getId(), execution.getId());<NEW_LINE>ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration();<NEW_LINE>FlowableEventDispatcher eventDispatcher = null;<NEW_LINE>if (processEngineConfiguration != null) {<NEW_LINE>eventDispatcher = processEngineConfiguration.getEventDispatcher();<NEW_LINE>}<NEW_LINE>if (eventDispatcher != null && eventDispatcher.isEnabled()) {<NEW_LINE>if (flowNode instanceof Activity && ((Activity) flowNode).hasMultiInstanceLoopCharacteristics()) {<NEW_LINE>processEngineConfiguration.getEventDispatcher().dispatchEvent(FlowableEventBuilder.createMultiInstanceActivityEvent(FlowableEngineEventType.MULTI_INSTANCE_ACTIVITY_STARTED, flowNode.getId(), flowNode.getName(), execution.getId(), execution.getProcessInstanceId(), execution.getProcessDefinitionId(), flowNode), processEngineConfiguration.getEngineCfgKey());<NEW_LINE>} else {<NEW_LINE>processEngineConfiguration.getEventDispatcher().dispatchEvent(FlowableEventBuilder.createActivityEvent(FlowableEngineEventType.ACTIVITY_STARTED, flowNode.getId(), flowNode.getName(), execution.getId(), execution.getProcessInstanceId(), execution.getProcessDefinitionId(), flowNode), processEngineConfiguration.getEngineCfgKey());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (processEngineConfiguration.isLoggingSessionEnabled()) {<NEW_LINE>BpmnLoggingSessionUtil.addExecuteActivityBehaviorLoggingData(LoggingSessionConstants.TYPE_ACTIVITY_BEHAVIOR_EXECUTE, activityBehavior, flowNode, execution);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (migrationContext != null && activityBehavior instanceof ActivityWithMigrationContextBehavior) {<NEW_LINE>ActivityWithMigrationContextBehavior activityWithMigrationContextBehavior = (ActivityWithMigrationContextBehavior) activityBehavior;<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>activityBehavior.execute(execution);<NEW_LINE>}<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>if (LogMDC.isMDCEnabled()) {<NEW_LINE>LogMDC.putMDCExecution(execution);<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
activityWithMigrationContextBehavior.execute(execution, migrationContext);
1,413,289
public void mergeRange(Range old, Range range) {<NEW_LINE>long totalCountSum = old.getCount() + range.getCount();<NEW_LINE>if (totalCountSum > 0) {<NEW_LINE>double line50Values = old.getLine50Value() * old.getCount() + range.getLine50Value() * range.getCount();<NEW_LINE>double line90Values = old.getLine90Value() * old.getCount() + range.getLine90Value() * range.getCount();<NEW_LINE>double line95Values = old.getLine95Value() * old.getCount() + range.getLine95Value() * range.getCount();<NEW_LINE>double line99Values = old.getLine99Value() * old.getCount() + range.getLine99Value() * range.getCount();<NEW_LINE>double line999Values = old.getLine999Value() * old.getCount() + range.getLine999Value() * range.getCount();<NEW_LINE>double line9999Values = old.getLine9999Value() * old.getCount() + range.getLine9999Value() * range.getCount();<NEW_LINE>old.setLine50Value(line50Values / totalCountSum);<NEW_LINE>old.setLine90Value(line90Values / totalCountSum);<NEW_LINE><MASK><NEW_LINE>old.setLine99Value(line99Values / totalCountSum);<NEW_LINE>old.setLine999Value(line999Values / totalCountSum);<NEW_LINE>old.setLine9999Value(line9999Values / totalCountSum);<NEW_LINE>}<NEW_LINE>old.setCount(old.getCount() + range.getCount());<NEW_LINE>old.setFails(old.getFails() + range.getFails());<NEW_LINE>old.setSum(old.getSum() + range.getSum());<NEW_LINE>if (old.getCount() > 0) {<NEW_LINE>old.setAvg(old.getSum() / old.getCount());<NEW_LINE>}<NEW_LINE>if (range.getMin() < old.getMin()) {<NEW_LINE>old.setMin(range.getMin());<NEW_LINE>}<NEW_LINE>if (range.getMax() > old.getMax()) {<NEW_LINE>old.setMax(range.getMax());<NEW_LINE>}<NEW_LINE>}
old.setLine95Value(line95Values / totalCountSum);
1,599,562
public Optional<ForgottenPasswordStage> nextStage(final ForgottenPasswordStateMachine stateMachine) throws PwmUnrecoverableException {<NEW_LINE>final ForgottenPasswordBean forgottenPasswordBean = stateMachine.getForgottenPasswordBean();<NEW_LINE>final PwmRequestContext pwmRequestContext = stateMachine.getRequestContext();<NEW_LINE>final PwmDomain pwmDomain = pwmRequestContext.getPwmDomain();<NEW_LINE>final <MASK><NEW_LINE>final DomainConfig config = pwmDomain.getConfig();<NEW_LINE>final ForgottenPasswordBean.RecoveryFlags recoveryFlags = forgottenPasswordBean.getRecoveryFlags();<NEW_LINE>final ForgottenPasswordBean.Progress progress = forgottenPasswordBean.getProgress();<NEW_LINE>if (forgottenPasswordBean.isBogusUser()) {<NEW_LINE>return Optional.of(ForgottenPasswordStage.VERIFICATION);<NEW_LINE>}<NEW_LINE>final ForgottenPasswordProfile forgottenPasswordProfile = ForgottenPasswordUtil.forgottenPasswordProfile(pwmDomain, forgottenPasswordBean);<NEW_LINE>{<NEW_LINE>final Map<String, ForgottenPasswordProfile> profileIDList = config.getForgottenPasswordProfiles();<NEW_LINE>final String profileDebugMsg = forgottenPasswordProfile != null && profileIDList != null && profileIDList.size() > 1 ? " profile=" + forgottenPasswordProfile.getIdentifier() + ", " : "";<NEW_LINE>LOGGER.trace(sessionLabel, () -> "entering forgotten password progress engine: " + profileDebugMsg + "flags=" + JsonFactory.get().serialize(recoveryFlags) + ", " + "progress=" + JsonFactory.get().serialize(progress));<NEW_LINE>}<NEW_LINE>if (forgottenPasswordProfile == null) {<NEW_LINE>throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_NO_PROFILE_ASSIGNED));<NEW_LINE>}<NEW_LINE>// dispatch required auth methods.<NEW_LINE>for (final IdentityVerificationMethod method : recoveryFlags.getRequiredAuthMethods()) {<NEW_LINE>if (!progress.getSatisfiedMethods().contains(method)) {<NEW_LINE>return Optional.of(ForgottenPasswordStage.VERIFICATION);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Optional.empty();<NEW_LINE>}
SessionLabel sessionLabel = pwmRequestContext.getSessionLabel();
325,611
public void marshall(CreateProjectRequest createProjectRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createProjectRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getSource(), SOURCE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getSecondarySources(), SECONDARYSOURCES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getSourceVersion(), SOURCEVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getSecondarySourceVersions(), SECONDARYSOURCEVERSIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getArtifacts(), ARTIFACTS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getSecondaryArtifacts(), SECONDARYARTIFACTS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getCache(), CACHE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getEnvironment(), ENVIRONMENT_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getServiceRole(), SERVICEROLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getTimeoutInMinutes(), TIMEOUTINMINUTES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getQueuedTimeoutInMinutes(), QUEUEDTIMEOUTINMINUTES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getEncryptionKey(), ENCRYPTIONKEY_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getVpcConfig(), VPCCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getBadgeEnabled(), BADGEENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getLogsConfig(), LOGSCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getFileSystemLocations(), FILESYSTEMLOCATIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getBuildBatchConfig(), BUILDBATCHCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.getConcurrentBuildLimit(), CONCURRENTBUILDLIMIT_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createProjectRequest.getTags(), TAGS_BINDING);
1,580,406
final DescribeConfigRuleEvaluationStatusResult executeDescribeConfigRuleEvaluationStatus(DescribeConfigRuleEvaluationStatusRequest describeConfigRuleEvaluationStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeConfigRuleEvaluationStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeConfigRuleEvaluationStatusRequest> request = null;<NEW_LINE>Response<DescribeConfigRuleEvaluationStatusResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeConfigRuleEvaluationStatusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeConfigRuleEvaluationStatusRequest));<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, "Config Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConfigRuleEvaluationStatus");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeConfigRuleEvaluationStatusResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new DescribeConfigRuleEvaluationStatusResultJsonUnmarshaller());
1,986
public GetBlueprintRunsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetBlueprintRunsResult getBlueprintRunsResult = new GetBlueprintRunsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return getBlueprintRunsResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("BlueprintRuns", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getBlueprintRunsResult.setBlueprintRuns(new ListUnmarshaller<BlueprintRun>(BlueprintRunJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getBlueprintRunsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return getBlueprintRunsResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,805,763
protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException {<NEW_LINE>super.performLiquibaseTask(liquibase);<NEW_LINE>switch(type) {<NEW_LINE>case COUNT:<NEW_LINE>{<NEW_LINE>liquibase.rollback(rollbackCount, rollbackScript, new Contexts(contexts), new LabelExpression(labels));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case DATE:<NEW_LINE>{<NEW_LINE>try {<NEW_LINE>liquibase.rollback(parseDate(rollbackDate), rollbackScript, new Contexts(contexts), new LabelExpression(labels));<NEW_LINE>} catch (ParseException e) {<NEW_LINE>String message = "Error parsing rollbackDate: " + e.getMessage();<NEW_LINE>throw new LiquibaseException(message, e);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case TAG:<NEW_LINE>{<NEW_LINE>liquibase.rollback(rollbackTag, rollbackScript, new Contexts(contexts), new LabelExpression(labels));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
throw new IllegalStateException("Unexpected rollback type, " + type);
1,292,012
public boolean isSameRM(final XAResource other) throws XAException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && XA_RESOURCE_TRACE.isEntryEnabled()) {<NEW_LINE>SibTr.entry(this, XA_RESOURCE_TRACE, "isSameRM", other);<NEW_LINE>}<NEW_LINE>final boolean sameRm;<NEW_LINE>// Unwrap the other XAResource if is one of ours<NEW_LINE>if (other instanceof SibRaXaResource) {<NEW_LINE><MASK><NEW_LINE>sameRm = _delegateXaResource.isSameRM(otherSibRaXaResource._delegateXaResource);<NEW_LINE>} else {<NEW_LINE>sameRm = _delegateXaResource.isSameRM(other);<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && XA_RESOURCE_TRACE.isEntryEnabled()) {<NEW_LINE>SibTr.exit(this, XA_RESOURCE_TRACE, "isSameRM", Boolean.valueOf(sameRm));<NEW_LINE>}<NEW_LINE>return sameRm;<NEW_LINE>}
final SibRaXaResource otherSibRaXaResource = (SibRaXaResource) other;
1,131,699
final UpdateDataSourceResult executeUpdateDataSource(UpdateDataSourceRequest updateDataSourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDataSourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateDataSourceRequest> request = null;<NEW_LINE>Response<UpdateDataSourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateDataSourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateDataSourceRequest));<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, "AppSync");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDataSource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateDataSourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateDataSourceResultJsonUnmarshaller());<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());
782,817
private Supplier<LogPosition> closePositionSupplier() throws IOException {<NEW_LINE>if (lastClosedPositionSupplier != null) {<NEW_LINE>return lastClosedPositionSupplier;<NEW_LINE>}<NEW_LINE>if (transactionIdStore != null) {<NEW_LINE>return () -> transactionIdStore.getLastClosedTransaction().getLogPosition();<NEW_LINE>}<NEW_LINE>if (fileBasedOperationsOnly) {<NEW_LINE>return () -> {<NEW_LINE>throw new UnsupportedOperationException("Current version of log files can't perform any " + "operation that require availability of transaction id store. Please build full version of log files " + "to be able to use them.");<NEW_LINE>};<NEW_LINE>}<NEW_LINE>if (readOnly) {<NEW_LINE><MASK><NEW_LINE>requireNonNull(databaseLayout, "Store directory is required.");<NEW_LINE>TransactionIdStore transactionIdStore = readOnlyTransactionIdStore();<NEW_LINE>return () -> transactionIdStore.getLastClosedTransaction().getLogPosition();<NEW_LINE>} else {<NEW_LINE>requireNonNull(dependencies, TransactionIdStore.class.getSimpleName() + " is required. " + "Please provide an instance or a dependencies where it can be found.");<NEW_LINE>return () -> resolveDependency(TransactionIdStore.class).getLastClosedTransaction().getLogPosition();<NEW_LINE>}<NEW_LINE>}
requireNonNull(pageCache, "Read only log files require page cache to be able to read committed " + "transaction info from store store.");
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<MASK><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.add(pathToSign.toString());<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>}
(codeSignIdentitySupplier.get()));
467,629
private void handleStart(Intent intent) {<NEW_LINE>NotificationManager notificationManager = (NotificationManager) this.getApplicationContext().getSystemService(NOTIFICATION_SERVICE);<NEW_LINE>int id = intent.getIntExtra(ConstantStrings.SESSION, 0);<NEW_LINE>String session_date;<NEW_LINE>Session session = realmRepo.getSessionSync(id);<NEW_LINE>Intent intent1 = new Intent(this.getApplicationContext(), SessionDetailActivity.class);<NEW_LINE>intent1.putExtra(ConstantStrings.SESSION, session.getTitle());<NEW_LINE>intent1.putExtra(ConstantStrings.ID, session.getId());<NEW_LINE>intent1.putExtra(ConstantStrings.TRACK, session.getTrack().getName());<NEW_LINE>PendingIntent pendingNotificationIntent = PendingIntent.getActivity(this.getApplicationContext(), 0, intent1, PendingIntent.FLAG_UPDATE_CURRENT);<NEW_LINE>Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);<NEW_LINE>int smallIcon = R.drawable.ic_bookmark_white_24dp;<NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)<NEW_LINE>smallIcon = R.drawable.ic_noti_bookmark;<NEW_LINE>String session_timings = String.format("%s - %s", DateConverter.formatDateWithDefault(DateConverter.FORMAT_12H, session.getStartsAt()), DateConverter.formatDateWithDefault(DateConverter.FORMAT_12H<MASK><NEW_LINE>session_date = DateConverter.formatDateWithDefault(DateConverter.FORMAT_DATE_COMPLETE, session.getStartsAt());<NEW_LINE>NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this).setSmallIcon(smallIcon).setLargeIcon(largeIcon).setContentTitle(session.getTitle()).setContentText(session_date + "\n" + session_timings).setAutoCancel(true).setStyle(new NotificationCompat.BigTextStyle().bigText(session_date + "\n" + session_timings)).setContentIntent(pendingNotificationIntent);<NEW_LINE>intent1.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);<NEW_LINE>notificationBuilder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));<NEW_LINE>if (notificationManager != null) {<NEW_LINE>notificationManager.notify(session.getId(), notificationBuilder.build());<NEW_LINE>}<NEW_LINE>}
, session.getEndsAt()));
1,592,955
public void init(Configuration conf, ParameterServerId[] psIds) {<NEW_LINE>int serverNum = conf.getInt(AngelConf.ANGEL_PS_NUMBER, AngelConf.DEFAULT_ANGEL_PS_NUMBER);<NEW_LINE>maxInflightRPCNumPerServer.set(conf.getInt(AngelConf<MASK><NEW_LINE>for (int i = 0; i < psIds.length; i++) {<NEW_LINE>serverInflightRPCCounters.put(psIds[i], new AtomicInteger(0));<NEW_LINE>}<NEW_LINE>int maxReqNumInFlight = conf.getInt(AngelConf.ANGEL_MATRIXTRANSFER_MAX_REQUESTNUM, AngelConf.DEFAULT_ANGEL_MATRIXTRANSFER_MAX);<NEW_LINE>if (maxReqNumInFlight > serverNum * maxInflightRPCNumPerServer.get()) {<NEW_LINE>maxReqNumInFlight = serverNum * maxInflightRPCNumPerServer.get();<NEW_LINE>}<NEW_LINE>LOG.info("maxInflightRPCNum = " + maxInflightRPCNum.get());<NEW_LINE>LOG.info("maxInflightRPCNumPerServer = " + maxInflightRPCNumPerServer.get());<NEW_LINE>this.maxInflightRPCNum.set(maxReqNumInFlight);<NEW_LINE>}
.ANGEL_MATRIXTRANSFER_MAX_REQUESTNUM_PERSERVER, AngelConf.DEFAULT_ANGEL_MATRIXTRANSFER_MAX_REQUESTNUM_PERSERVER));
1,013,891
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));<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, "API Gateway");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,018,625
public final void allGatherv(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) throws MPIException {<NEW_LINE>MPI.check();<NEW_LINE>int sendoff = 0, recvoff = 0;<NEW_LINE>boolean sdb = false, rdb = false;<NEW_LINE>if (sendbuf instanceof Buffer && !(sdb = ((Buffer) sendbuf).isDirect())) {<NEW_LINE><MASK><NEW_LINE>sendbuf = ((Buffer) sendbuf).array();<NEW_LINE>}<NEW_LINE>if (recvbuf instanceof Buffer && !(rdb = ((Buffer) recvbuf).isDirect())) {<NEW_LINE>recvoff = recvtype.getOffset(recvbuf);<NEW_LINE>recvbuf = ((Buffer) recvbuf).array();<NEW_LINE>}<NEW_LINE>allGatherv(handle, sendbuf, sdb, sendoff, sendcount, sendtype.handle, sendtype.baseType, recvbuf, rdb, recvoff, recvcount, displs, recvtype.handle, recvtype.baseType);<NEW_LINE>}
sendoff = sendtype.getOffset(sendbuf);
1,802,819
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.impetus.kundera.client.Client#findAll(java.lang.Class,<NEW_LINE>* java.lang.Object[])<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public <E> List<E> findAll(Class<E> entityClass, String[] columnsToSelect, Object... keys) {<NEW_LINE>Object connection = getConnection();<NEW_LINE>List results = new ArrayList();<NEW_LINE>try {<NEW_LINE>for (Object key : keys) {<NEW_LINE>Object result = fetch(<MASK><NEW_LINE>if (result != null) {<NEW_LINE>results.add(result);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (InstantiationException e) {<NEW_LINE>logger.error("Error during find by key:", e);<NEW_LINE>throw new PersistenceException(e);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>logger.error("Error during find by key:", e);<NEW_LINE>throw new PersistenceException(e);<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
entityClass, key, connection, null);
849,894
public void textureStitchPost(TextureStitchEvent.Post event) {<NEW_LINE>flowingRenderCache.clear();<NEW_LINE>stillRenderCache.clear();<NEW_LINE>frozenRenderCache.clear();<NEW_LINE>TextureMap map = event.getMap();<NEW_LINE>missingIcon = map.getMissingSprite();<NEW_LINE>textureMap.clear();<NEW_LINE>for (FluidType type : FluidType.values()) {<NEW_LINE>textureMap.put(type, new HashMap<MASK><NEW_LINE>}<NEW_LINE>for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) {<NEW_LINE>// TextureAtlasSprite toUse = null;<NEW_LINE>if (fluid.getFlowing() != null) {<NEW_LINE>String flow = fluid.getFlowing().toString();<NEW_LINE>TextureAtlasSprite sprite;<NEW_LINE>if (map.getTextureExtry(flow) != null) {<NEW_LINE>sprite = map.getTextureExtry(flow);<NEW_LINE>} else {<NEW_LINE>sprite = map.registerSprite(fluid.getFlowing());<NEW_LINE>}<NEW_LINE>// toUse = sprite;<NEW_LINE>textureMap.get(FluidType.FLOWING).put(fluid, sprite);<NEW_LINE>}<NEW_LINE>if (fluid.getStill() != null) {<NEW_LINE>String still = fluid.getStill().toString();<NEW_LINE>TextureAtlasSprite sprite;<NEW_LINE>if (map.getTextureExtry(still) != null) {<NEW_LINE>sprite = map.getTextureExtry(still);<NEW_LINE>} else {<NEW_LINE>sprite = map.registerSprite(fluid.getStill());<NEW_LINE>}<NEW_LINE>// toUse = sprite;<NEW_LINE>textureMap.get(FluidType.STILL).put(fluid, sprite);<NEW_LINE>}<NEW_LINE>// if (toUse != null) {<NEW_LINE>// textureMap.get(FluidType.FROZEN).put(fluid, toUse);<NEW_LINE>// }<NEW_LINE>}<NEW_LINE>}
<Fluid, TextureAtlasSprite>());
503,406
protected static void fromHistoricVariableUpdate(HistoricVariableUpdateDto dto, HistoricVariableUpdate historicVariableUpdate) {<NEW_LINE>dto.revision = historicVariableUpdate.getRevision();<NEW_LINE>dto.variableName = historicVariableUpdate.getVariableName();<NEW_LINE>dto.variableInstanceId = historicVariableUpdate.getVariableInstanceId();<NEW_LINE>dto.initial = historicVariableUpdate.isInitial();<NEW_LINE>if (historicVariableUpdate.getErrorMessage() == null) {<NEW_LINE>try {<NEW_LINE>VariableValueDto variableValueDto = VariableValueDto.fromTypedValue(historicVariableUpdate.getTypedValue());<NEW_LINE>dto.value = variableValueDto.getValue();<NEW_LINE>dto.variableType = variableValueDto.getType();<NEW_LINE>dto.valueInfo = variableValueDto.getValueInfo();<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>dto.errorMessage = e.getMessage();<NEW_LINE>dto.variableType = VariableValueDto.toRestApiTypeName(historicVariableUpdate.getTypeName());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>dto.errorMessage = historicVariableUpdate.getErrorMessage();<NEW_LINE>dto.variableType = VariableValueDto.<MASK><NEW_LINE>}<NEW_LINE>}
toRestApiTypeName(historicVariableUpdate.getTypeName());
460,535
public static void updateHeadingsInMarkdownFile(File inputFile, File outputFile, String extensionRepositoryName, String latestDocumentationVersion, List<NamespaceMetaData> namespaceMetaDataList, String groupId, String siddhiVersion) throws MojoFailureException {<NEW_LINE>// Retrieving the content of the README.md file<NEW_LINE>List<String> inputFileLines = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>inputFileLines = Files.readLines(inputFile, Constants.DEFAULT_CHARSET);<NEW_LINE>} catch (IOException ignored) {<NEW_LINE>}<NEW_LINE>// Generating data model<NEW_LINE>Map<String, Object> rootDataModel = new HashMap<>();<NEW_LINE>rootDataModel.put("inputFileLines", inputFileLines);<NEW_LINE>rootDataModel.put("extensionRepositoryName", extensionRepositoryName);<NEW_LINE>rootDataModel.put("latestDocumentationVersion", latestDocumentationVersion);<NEW_LINE>rootDataModel.put("metaData", namespaceMetaDataList);<NEW_LINE>rootDataModel.put("formatDescription", new FormatDescriptionMethod());<NEW_LINE>rootDataModel.put("siddhiDocVersion", findSiddhiDocVersion(siddhiVersion, latestDocumentationVersion));<NEW_LINE>rootDataModel.put("repositoryOwner", findRepositoryOwner(groupId));<NEW_LINE>generateFileFromTemplate(Constants.MARKDOWN_HEADINGS_UPDATE_TEMPLATE + Constants.MARKDOWN_FILE_EXTENSION + Constants.FREEMARKER_TEMPLATE_FILE_EXTENSION, rootDataModel, outputFile.getParent(<MASK><NEW_LINE>}
), outputFile.getName());
844,949
public static void calcLinePointConfined(float x, float y, float x2, float y2, float left, float right, float top, float bottom, float[] out) {<NEW_LINE>float w <MASK><NEW_LINE>float h = y2 < y ? top : bottom;<NEW_LINE>float k = (float) Math.atan2(h, w);<NEW_LINE>float sigx = Math.signum(x2 - x);<NEW_LINE>float sigy = Math.signum(y2 - y);<NEW_LINE>float absRad = (float) Math.atan2(Math.abs(y2 - y), Math.abs(x2 - x));<NEW_LINE>if (absRad > k) {<NEW_LINE>out[0] = (float) (x + sigx * h / Math.tan(absRad));<NEW_LINE>out[1] = y + sigy * h;<NEW_LINE>} else {<NEW_LINE>out[0] = x + sigx * w;<NEW_LINE>out[1] = (float) (y + sigy * w * Math.tan(absRad));<NEW_LINE>}<NEW_LINE>}
= x2 > x ? right : left;
1,490,707
public InteractionResult useOn(UseOnContext context) {<NEW_LINE>Level world = context.getLevel();<NEW_LINE><MASK><NEW_LINE>BlockEntity tileEntity = world.getBlockEntity(pos);<NEW_LINE>TargetingInfo target = new TargetingInfo(context.getClickedFace(), (float) context.getClickLocation().x, (float) context.getClickLocation().y, (float) context.getClickLocation().z);<NEW_LINE>ItemStack stack = context.getItemInHand();<NEW_LINE>Player player = context.getPlayer();<NEW_LINE>if (player != null && tileEntity instanceof IImmersiveConnectable) {<NEW_LINE>BlockPos masterPos = ((IImmersiveConnectable) tileEntity).getConnectionMaster(null, target);<NEW_LINE>tileEntity = world.getBlockEntity(masterPos);<NEW_LINE>if (!(tileEntity instanceof IImmersiveConnectable))<NEW_LINE>return InteractionResult.PASS;<NEW_LINE>if (!world.isClientSide) {<NEW_LINE>IImmersiveConnectable nodeHere = (IImmersiveConnectable) tileEntity;<NEW_LINE>GlobalWireNetwork net = GlobalWireNetwork.getNetwork(world);<NEW_LINE>AtomicBoolean cut = new AtomicBoolean(false);<NEW_LINE>net.removeAllConnectionsAt(nodeHere, conn -> {<NEW_LINE>ItemStack coil = conn.type.getWireCoil(conn);<NEW_LINE>world.addFreshEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), coil));<NEW_LINE>cut.set(true);<NEW_LINE>});<NEW_LINE>if (cut.get())<NEW_LINE>damageStack(stack, player, context.getHand());<NEW_LINE>}<NEW_LINE>} else if (player != null) {<NEW_LINE>return use(world, player, context.getHand()).getResult();<NEW_LINE>}<NEW_LINE>return InteractionResult.SUCCESS;<NEW_LINE>}
BlockPos pos = context.getClickedPos();
912,634
/*<NEW_LINE>* get all records for duplicate records<NEW_LINE>*/<NEW_LINE>private String concatFields(Class<?> modelClass, Set<String> fieldSet) throws AxelorException {<NEW_LINE>StringBuilder fields = new StringBuilder("LOWER(concat(");<NEW_LINE>Mapper <MASK><NEW_LINE>int count = 0;<NEW_LINE>for (String field : fieldSet) {<NEW_LINE>Property property = mapper.getProperty(field);<NEW_LINE>if (property == null) {<NEW_LINE>throw new AxelorException(TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.GENERAL_8), field, modelClass.getSimpleName());<NEW_LINE>}<NEW_LINE>if (property.isCollection()) {<NEW_LINE>throw new AxelorException(TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.GENERAL_9), field);<NEW_LINE>}<NEW_LINE>if (count != 0) {<NEW_LINE>fields.append(",");<NEW_LINE>}<NEW_LINE>count++;<NEW_LINE>fields.append("cast(self" + "." + field);<NEW_LINE>if (property.getTarget() != null) {<NEW_LINE>fields.append(".id");<NEW_LINE>}<NEW_LINE>fields.append(" as string)");<NEW_LINE>}<NEW_LINE>fields.append("))");<NEW_LINE>return fields.toString();<NEW_LINE>}
mapper = Mapper.of(modelClass);
540,958
public void handle(final HttpRequest callbackRequest) {<NEW_LINE>if (MockServerLogger.isEnabled(TRACE)) {<NEW_LINE>mockServerLogger.logEvent(new LogEntry().setLogLevel(TRACE).setHttpRequest(request).setMessageFormat("received request over websocket{}from client " + clientId + " for correlationId " + webSocketCorrelationId).setArguments(callbackRequest));<NEW_LINE>}<NEW_LINE>final HttpForwardActionResult responseFuture = sendRequest(callbackRequest.removeHeader(WEB_SOCKET_CORRELATION_ID_HEADER_NAME), null, null);<NEW_LINE>if (MockServerLogger.isEnabled(TRACE)) {<NEW_LINE>mockServerLogger.logEvent(new LogEntry().setLogLevel(TRACE).setHttpRequest(request).setMessageFormat("received response for request{}from client " + clientId).setArguments(callbackRequest));<NEW_LINE>}<NEW_LINE>webSocketClientRegistry.unregisterForwardCallbackHandler(webSocketCorrelationId);<NEW_LINE>if (expectationPostProcessor != null && isFalse(httpObjectCallback.getResponseCallback())) {<NEW_LINE>expectationPostProcessor.run();<NEW_LINE>}<NEW_LINE>if (isTrue(httpObjectCallback.getResponseCallback())) {<NEW_LINE>handleResponseViaWebSocket(callbackRequest, responseFuture, actionHandler, webSocketCorrelationId, clientId, expectationPostProcessor, responseWriter, httpObjectCallback, synchronous);<NEW_LINE>} else {<NEW_LINE>actionHandler.writeForwardActionResponse(responseFuture, <MASK><NEW_LINE>}<NEW_LINE>}
responseWriter, callbackRequest, httpObjectCallback, synchronous);
1,630,413
private void updateDisplay(CleanupPreset preset) {<NEW_LINE>cleanUpDOI.setSelected(preset.isActive(CleanupPreset.CleanupStep.CLEAN_UP_DOI));<NEW_LINE>cleanUpEprint.setSelected(preset.isActive(CleanupPreset.CleanupStep.CLEANUP_EPRINT));<NEW_LINE>if (!cleanUpMovePDF.isDisabled()) {<NEW_LINE>cleanUpMovePDF.setSelected(preset.isActive(CleanupPreset.CleanupStep.MOVE_PDF));<NEW_LINE>}<NEW_LINE>cleanUpMakePathsRelative.setSelected(preset.isActive(CleanupPreset.CleanupStep.MAKE_PATHS_RELATIVE));<NEW_LINE>cleanUpRenamePDF.<MASK><NEW_LINE>cleanUpRenamePDFonlyRelativePaths.setSelected(preset.isActive(CleanupPreset.CleanupStep.RENAME_PDF_ONLY_RELATIVE_PATHS));<NEW_LINE>cleanUpUpgradeExternalLinks.setSelected(preset.isActive(CleanupPreset.CleanupStep.CLEAN_UP_UPGRADE_EXTERNAL_LINKS));<NEW_LINE>cleanUpBiblatex.setSelected(preset.isActive(CleanupPreset.CleanupStep.CONVERT_TO_BIBLATEX));<NEW_LINE>cleanUpBibtex.setSelected(preset.isActive(CleanupPreset.CleanupStep.CONVERT_TO_BIBTEX));<NEW_LINE>cleanUpTimestampToCreationDate.setSelected(preset.isActive(CleanupPreset.CleanupStep.CONVERT_TIMESTAMP_TO_CREATIONDATE));<NEW_LINE>cleanUpTimestampToModificationDate.setSelected(preset.isActive(CleanupPreset.CleanupStep.CONVERT_TIMESTAMP_TO_MODIFICATIONDATE));<NEW_LINE>cleanUpTimestampToModificationDate.setSelected(preset.isActive(CleanupPreset.CleanupStep.DO_NOT_CONVERT_TIMESTAMP));<NEW_LINE>cleanUpISSN.setSelected(preset.isActive(CleanupPreset.CleanupStep.CLEAN_UP_ISSN));<NEW_LINE>formatterCleanupsPanel.cleanupsDisableProperty().setValue(!preset.getFormatterCleanups().isEnabled());<NEW_LINE>formatterCleanupsPanel.cleanupsProperty().setValue(FXCollections.observableArrayList(preset.getFormatterCleanups().getConfiguredActions()));<NEW_LINE>}
setSelected(preset.isRenamePDFActive());
434,875
private // end of commit().<NEW_LINE>void validateTree(Map<Object, ElementInfo> elementToInfoMap) {<NEW_LINE>// We need a tree, not a forest.<NEW_LINE>HashSet<Object> rootElements = new HashSet<>();<NEW_LINE>for (Map.Entry<Object, ElementInfo> entry : elementToInfoMap.entrySet()) {<NEW_LINE>final Object element = entry.getKey();<NEW_LINE>final ElementInfo elementInfo = entry.getValue();<NEW_LINE>if (element != elementInfo.element) {<NEW_LINE>// should not be possible<NEW_LINE>throw new IllegalStateException("element != elementInfo.element");<NEW_LINE>}<NEW_LINE>// Verify children<NEW_LINE>for (int i = 0, N = elementInfo.children.size(); i < N; ++i) {<NEW_LINE>final Object childElement = elementInfo.children.get(i);<NEW_LINE>final ElementInfo <MASK><NEW_LINE>if (childElementInfo == null) {<NEW_LINE>throw new IllegalStateException(String.format("elementInfo.get(elementInfo.children.get(%s)) == null", i));<NEW_LINE>}<NEW_LINE>if (childElementInfo.parentElement != element) {<NEW_LINE>throw new IllegalStateException("childElementInfo.parentElement != element");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Verify parent<NEW_LINE>if (elementInfo.parentElement == null) {<NEW_LINE>rootElements.add(element);<NEW_LINE>} else {<NEW_LINE>final ElementInfo parentElementInfo = elementToInfoMap.get(elementInfo.parentElement);<NEW_LINE>if (parentElementInfo == null) {<NEW_LINE>throw new IllegalStateException("elementToInfoMap.get(elementInfo.parentElementInfo) == NULL");<NEW_LINE>}<NEW_LINE>if (elementInfo.parentElement != parentElementInfo.element) {<NEW_LINE>// should not be possible<NEW_LINE>throw new IllegalStateException("elementInfo.parentElementInfo != parentElementInfo.parent");<NEW_LINE>}<NEW_LINE>if (!parentElementInfo.children.contains(element)) {<NEW_LINE>throw new IllegalStateException("parentElementInfo.children.contains(element) == FALSE");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (rootElements.size() != 1) {<NEW_LINE>throw new IllegalStateException("elementToInfoMap is a forest, not a tree. rootElements.size() != 1");<NEW_LINE>}<NEW_LINE>}
childElementInfo = elementToInfoMap.get(childElement);
1,598,804
private void createValidationEntry(Business business, Model model, WorkCompleted workCompleted, InBag inBag, OutBag outBag, TreeSet<String> inValues, TreeSet<String> outValues) throws Exception {<NEW_LINE>Entry entry = new Entry();<NEW_LINE>entry.setType(Entry.TYPE_VALIDATION);<NEW_LINE>entry.setInValueLabelList(new ArrayList<Integer>());<NEW_LINE>entry.setOutValueLabelList(new ArrayList<Integer>());<NEW_LINE>entry.setBundle(workCompleted.getId());<NEW_LINE>entry.setModel(model.getId());<NEW_LINE>entry.setTitle(workCompleted.getTitle());<NEW_LINE>entry.<MASK><NEW_LINE>entry.setOutValueCount(outValues.size());<NEW_LINE>for (String s : inValues) {<NEW_LINE>Integer idx = inBag.test(s);<NEW_LINE>if (idx > -1) {<NEW_LINE>entry.getInValueLabelList().add(idx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (String s : outValues) {<NEW_LINE>Integer idx = outBag.test(s);<NEW_LINE>if (idx > -1) {<NEW_LINE>entry.getOutValueLabelList().add(idx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>business.entityManagerContainer().beginTransaction(Entry.class);<NEW_LINE>business.entityManagerContainer().persist(entry);<NEW_LINE>business.entityManagerContainer().commit();<NEW_LINE>}
setInValueCount(inValues.size());
1,307,829
public static InstalledCode compileAndInstallMethod(StructuredGraph graph) {<NEW_LINE>ResolvedJavaMethod method = graph.method();<NEW_LINE>GraalJVMCICompiler graalCompiler = (GraalJVMCICompiler) JVMCI.getRuntime().getCompiler();<NEW_LINE>RuntimeProvider capability = graalCompiler.getGraalRuntime().getCapability(RuntimeProvider.class);<NEW_LINE>Backend backend = capability.getHostBackend();<NEW_LINE>Providers providers = backend.getProviders();<NEW_LINE>CompilationIdentifier compilationID = backend.getCompilationIdentifier(method);<NEW_LINE>EconomicMap<OptionKey<?>, Object> opts = OptionValues.newOptionMap();<NEW_LINE>opts.putAll(HotSpotGraalOptionValues.defaultOptions().getMap());<NEW_LINE>OptionValues options = new OptionValues(opts);<NEW_LINE>try (DebugContext.Scope ignored = getDebugContext().scope("compileMethodAndInstall", new DebugDumpScope(String.valueOf(compilationID), true))) {<NEW_LINE>PhaseSuite<HighTierContext> graphBuilderPhase = backend<MASK><NEW_LINE>Suites suites = backend.getSuites().getDefaultSuites(options);<NEW_LINE>LIRSuites lirSuites = backend.getSuites().getDefaultLIRSuites(options);<NEW_LINE>OptimisticOptimizations optimizationsOpts = OptimisticOptimizations.ALL;<NEW_LINE>ProfilingInfo profilerInfo = graph.getProfilingInfo(method);<NEW_LINE>CompilationResult compilationResult = new CompilationResult(method.getSignature().toMethodDescriptor());<NEW_LINE>CompilationResultBuilderFactory factory = CompilationResultBuilderFactory.Default;<NEW_LINE>GraalCompiler.compileGraph(graph, method, providers, backend, graphBuilderPhase, optimizationsOpts, profilerInfo, suites, lirSuites, compilationResult, factory, false);<NEW_LINE>return backend.addInstalledCode(getDebugContext(), method, CompilationRequestIdentifier.asCompilationRequest(compilationID), compilationResult);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>throw getDebugContext().handle(e);<NEW_LINE>}<NEW_LINE>}
.getSuites().getDefaultGraphBuilderSuite();
481,976
protected Element generateLinkElement(final Link link) {<NEW_LINE>final Namespace namespace = getFeedNamespace();<NEW_LINE>final Element linkElement = new Element("link", namespace);<NEW_LINE>final String rel = link.getRel();<NEW_LINE>if (rel != null) {<NEW_LINE>final Attribute relAttribute = new Attribute("rel", rel);<NEW_LINE>linkElement.setAttribute(relAttribute);<NEW_LINE>}<NEW_LINE>final String type = link.getType();<NEW_LINE>if (type != null) {<NEW_LINE>final Attribute typeAttribute <MASK><NEW_LINE>linkElement.setAttribute(typeAttribute);<NEW_LINE>}<NEW_LINE>final String href = link.getHref();<NEW_LINE>if (href != null) {<NEW_LINE>final Attribute hrefAttribute = new Attribute("href", href);<NEW_LINE>linkElement.setAttribute(hrefAttribute);<NEW_LINE>}<NEW_LINE>final String hreflang = link.getHreflang();<NEW_LINE>if (hreflang != null) {<NEW_LINE>final Attribute hreflangAttribute = new Attribute("hreflang", hreflang);<NEW_LINE>linkElement.setAttribute(hreflangAttribute);<NEW_LINE>}<NEW_LINE>final String linkTitle = link.getTitle();<NEW_LINE>if (linkTitle != null) {<NEW_LINE>final Attribute title = new Attribute("title", linkTitle);<NEW_LINE>linkElement.setAttribute(title);<NEW_LINE>}<NEW_LINE>if (link.getLength() != 0) {<NEW_LINE>final Attribute lenght = new Attribute("length", Long.toString(link.getLength()));<NEW_LINE>linkElement.setAttribute(lenght);<NEW_LINE>}<NEW_LINE>return linkElement;<NEW_LINE>}
= new Attribute("type", type);
763,116
public void marshall(BaiduChannelResponse baiduChannelResponse, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (baiduChannelResponse == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getApplicationId(), APPLICATIONID_BINDING);<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getCreationDate(), CREATIONDATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getCredential(), CREDENTIAL_BINDING);<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getEnabled(), ENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getId(), ID_BINDING);<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getIsArchived(), ISARCHIVED_BINDING);<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getLastModifiedBy(), LASTMODIFIEDBY_BINDING);<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getLastModifiedDate(), LASTMODIFIEDDATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getPlatform(), PLATFORM_BINDING);<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.getVersion(), VERSION_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
baiduChannelResponse.getHasCredential(), HASCREDENTIAL_BINDING);
475,432
DemangledObject build() {<NEW_LINE>//<NEW_LINE>// An example to follow along with:<NEW_LINE>//<NEW_LINE>// 'overloaded operator' syntax is:<NEW_LINE>// [return_type] operator<operator_chars>[templates](parameters)<NEW_LINE>//<NEW_LINE>// Namespace::Class::operator Namespace::Type()<NEW_LINE>//<NEW_LINE>// NS1::operator<(NS1::Coordinate const &,NS1::Coordinate const &)<NEW_LINE>//<NEW_LINE>String operatorChars = matcher.group(2);<NEW_LINE>// operator chars start<NEW_LINE>int start = matcher.start(2);<NEW_LINE>// operator chars start<NEW_LINE>int end = matcher.end(2);<NEW_LINE>//<NEW_LINE>// The 'operator' functions have symbols that confuse our default function parsing.<NEW_LINE>// Specifically, operators that use shift symbols (<, <<, >, >>) will cause our<NEW_LINE>// template parsing to fail. To defeat the failure, we will install a temporary<NEW_LINE>// function name here and then restore it after parsing is finished.<NEW_LINE>//<NEW_LINE>String templates = getTemplates(end);<NEW_LINE>end = end + templates.length();<NEW_LINE>// a string to replace operator chars; this value will be overwritten the name is set<NEW_LINE>String placeholder = "TEMPNAMEPLACEHOLDERVALUE";<NEW_LINE>String baseOperator = OPERATOR + demangled.substring(start, end);<NEW_LINE>String fixedFunction = demangled.replace(baseOperator, placeholder);<NEW_LINE>DemangledFunction function <MASK><NEW_LINE>function.setOverloadedOperator(true);<NEW_LINE>String simpleName = OPERATOR + operatorChars;<NEW_LINE>if (StringUtils.isBlank(templates)) {<NEW_LINE>function.setName(simpleName);<NEW_LINE>} else {<NEW_LINE>String escapedTemplates = removeBadSpaces(templates);<NEW_LINE>DemangledTemplate demangledTemplate = parseTemplate(escapedTemplates);<NEW_LINE>function.setTemplate(demangledTemplate);<NEW_LINE>function.setName(simpleName);<NEW_LINE>}<NEW_LINE>return function;<NEW_LINE>}
= (DemangledFunction) parseFunctionOrVariable(fixedFunction);
1,488,377
public BoundingBox extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints, int minZoomLevel) {<NEW_LINE>final BoundingBox bb = BoundingBox.fromGeoPoints(geoPoints);<NEW_LINE>final int right = MapView.getTileSystem().getTileXFromLongitude(bb.getLonEast(), minZoomLevel);<NEW_LINE>final int bottom = MapView.getTileSystem().getTileYFromLatitude(bb.getLatSouth(), minZoomLevel);<NEW_LINE>final int left = MapView.getTileSystem().getTileXFromLongitude(bb.getLonWest(), minZoomLevel);<NEW_LINE>final int top = MapView.getTileSystem().getTileYFromLatitude(<MASK><NEW_LINE>return new BoundingBox(MapView.getTileSystem().getLatitudeFromTileY(top - 1, minZoomLevel), MapView.getTileSystem().getLongitudeFromTileX(right + 1, minZoomLevel), MapView.getTileSystem().getLatitudeFromTileY(bottom + 1, minZoomLevel), MapView.getTileSystem().getLongitudeFromTileX(left - 1, minZoomLevel));<NEW_LINE>}
bb.getLatNorth(), minZoomLevel);
1,019,621
public void onReceive(FlipperObject params, FlipperResponder responder) {<NEW_LINE>GetTableStructureRequest getTableStructureRequest = ObjectMapper.flipperObjectToGetTableStructureRequest(params);<NEW_LINE>if (getTableStructureRequest == null) {<NEW_LINE>responder.error(ObjectMapper.toErrorFlipperObject(DatabasesErrorCodes<MASK><NEW_LINE>} else {<NEW_LINE>DatabaseDescriptorHolder databaseDescriptorHolder = mDatabaseDescriptorHolderSparseArray.get(getTableStructureRequest.databaseId);<NEW_LINE>if (databaseDescriptorHolder == null) {<NEW_LINE>responder.error(ObjectMapper.toErrorFlipperObject(DatabasesErrorCodes.ERROR_DATABASE_INVALID, DatabasesErrorCodes.ERROR_DATABASE_INVALID_MESSAGE));<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>DatabaseGetTableStructureResponse databaseGetTableStructureResponse = databaseDescriptorHolder.databaseDriver.getTableStructure(databaseDescriptorHolder.databaseDescriptor, getTableStructureRequest.table);<NEW_LINE>responder.success(ObjectMapper.databaseGetTableStructureResponseToFlipperObject(databaseGetTableStructureResponse));<NEW_LINE>} catch (Exception e) {<NEW_LINE>responder.error(ObjectMapper.toErrorFlipperObject(DatabasesErrorCodes.ERROR_SQL_EXECUTION_EXCEPTION, e.getMessage()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.ERROR_INVALID_REQUEST, DatabasesErrorCodes.ERROR_INVALID_REQUEST_MESSAGE));
294,037
private int findOtherSubMessage(int partIndex) {<NEW_LINE>int count = msgPattern.countParts();<NEW_LINE>MessagePattern.Part part = msgPattern.getPart(partIndex);<NEW_LINE>if (part.getType().hasNumericValue()) {<NEW_LINE>++partIndex;<NEW_LINE>}<NEW_LINE>// Iterate over (ARG_SELECTOR [ARG_INT|ARG_DOUBLE] message) tuples<NEW_LINE>// until ARG_LIMIT or end of plural-only pattern.<NEW_LINE>do {<NEW_LINE>part = msgPattern.getPart(partIndex++);<NEW_LINE>MessagePattern.Part.Type type = part.getType();<NEW_LINE>if (type == MessagePattern.Part.Type.ARG_LIMIT) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>assert type <MASK><NEW_LINE>// part is an ARG_SELECTOR followed by an optional explicit value, and then a message<NEW_LINE>if (msgPattern.partSubstringMatches(part, "other")) {<NEW_LINE>return partIndex;<NEW_LINE>}<NEW_LINE>if (msgPattern.getPartType(partIndex).hasNumericValue()) {<NEW_LINE>// skip the numeric-value part of "=1" etc.<NEW_LINE>++partIndex;<NEW_LINE>}<NEW_LINE>partIndex = msgPattern.getLimitPartIndex(partIndex);<NEW_LINE>} while (++partIndex < count);<NEW_LINE>return 0;<NEW_LINE>}
== MessagePattern.Part.Type.ARG_SELECTOR;
1,300,476
private void writeToMappingAndBodyFile(Request request, Response response, RequestPattern requestPattern) {<NEW_LINE>String fileId = idGenerator.generate();<NEW_LINE>byte[] body = bodyDecompressedIfRequired(response);<NEW_LINE>String mappingFileName = UniqueFilenameGenerator.generate(request.getUrl(), "mapping", fileId);<NEW_LINE>String bodyFileName = UniqueFilenameGenerator.generate(request.getUrl(), "body", fileId, ContentTypes.determineFileExtension(request.getUrl(), response.getHeaders()<MASK><NEW_LINE>ResponseDefinitionBuilder responseDefinitionBuilder = responseDefinition().withStatus(response.getStatus()).withBodyFile(bodyFileName);<NEW_LINE>if (response.getHeaders().size() > 0) {<NEW_LINE>responseDefinitionBuilder.withHeaders(withoutContentEncodingAndContentLength(response.getHeaders()));<NEW_LINE>}<NEW_LINE>ResponseDefinition responseToWrite = responseDefinitionBuilder.build();<NEW_LINE>StubMapping mapping = new StubMapping(requestPattern, responseToWrite);<NEW_LINE>mapping.setUuid(UUID.nameUUIDFromBytes(fileId.getBytes()));<NEW_LINE>filesFileSource.writeBinaryFile(bodyFileName, body);<NEW_LINE>mappingsFileSource.writeTextFile(mappingFileName, write(mapping));<NEW_LINE>}
.getContentTypeHeader(), body));
521,472
public ModelAndView process(ModelMap map, HttpServletRequest request, @Valid final String id) {<NEW_LINE>AgentServiceSummary summary = serviceSummaryRes.findByIdAndOrgi(id, super.getOrgi(request));<NEW_LINE><MASK><NEW_LINE>map.put("summaryTags", tagRes.findByOrgiAndTagtype(super.getOrgi(request), MainContext.ModelType.SUMMARY.toString()));<NEW_LINE>if (summary != null && !StringUtils.isBlank(summary.getAgentserviceid())) {<NEW_LINE>AgentService service = agentServiceRes.findByIdAndOrgi(summary.getAgentserviceid(), super.getOrgi(request));<NEW_LINE>map.addAttribute("service", service);<NEW_LINE>if (!StringUtils.isBlank(summary.getContactsid())) {<NEW_LINE>Contacts contacts = contactsRes.findOne(summary.getContactsid());<NEW_LINE>map.addAttribute("contacts", contacts);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return request(super.createView("/apps/service/summary/process"));<NEW_LINE>}
map.addAttribute("summary", summary);
358,550
// The ECMQV Primitive as described in SEC-1, 3.4<NEW_LINE>private ECPoint calculateMqvAgreement(ECDomainParameters parameters, ECPrivateKeyParameters d1U, ECPrivateKeyParameters d2U, ECPublicKeyParameters Q2U, ECPublicKeyParameters Q1V, ECPublicKeyParameters Q2V) {<NEW_LINE>BigInteger n = parameters.getN();<NEW_LINE>int e = (n.bitLength() + 1) / 2;<NEW_LINE>BigInteger powE = ECConstants.ONE.shiftLeft(e);<NEW_LINE>ECCurve curve = parameters.getCurve();<NEW_LINE>// The Q2U public key is optional - but will be calculated for us if it wasn't present<NEW_LINE>ECPoint q2u = ECAlgorithms.cleanPoint(curve, Q2U.getQ());<NEW_LINE>ECPoint q1v = ECAlgorithms.cleanPoint(curve, Q1V.getQ());<NEW_LINE>ECPoint q2v = ECAlgorithms.cleanPoint(curve, Q2V.getQ());<NEW_LINE>BigInteger x = q2u.getAffineXCoord().toBigInteger();<NEW_LINE>BigInteger xBar = x.mod(powE);<NEW_LINE>BigInteger Q2UBar = xBar.setBit(e);<NEW_LINE>BigInteger s = d1U.getD().multiply(Q2UBar).add(d2U.getD<MASK><NEW_LINE>BigInteger xPrime = q2v.getAffineXCoord().toBigInteger();<NEW_LINE>BigInteger xPrimeBar = xPrime.mod(powE);<NEW_LINE>BigInteger Q2VBar = xPrimeBar.setBit(e);<NEW_LINE>BigInteger hs = parameters.getH().multiply(s).mod(n);<NEW_LINE>return ECAlgorithms.sumOfTwoMultiplies(q1v, Q2VBar.multiply(hs).mod(n), q2v, hs);<NEW_LINE>}
()).mod(n);
1,621,927
private final void debugCheckItemsValid() {<NEW_LINE>if (!DEBUG) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final PT parentModel = getParentModel();<NEW_LINE>final IContextAware ctx = createPlainContextAware(parentModel);<NEW_LINE>final boolean instancesTrackerEnabled = POJOLookupMapInstancesTracker.ENABLED;<NEW_LINE>POJOLookupMapInstancesTracker.ENABLED = false;<NEW_LINE>try {<NEW_LINE>//<NEW_LINE>// Retrieve fresh items<NEW_LINE>final List<T> itemsRetrievedNow = retrieveItems(ctx, parentModel);<NEW_LINE>if (itemsComparator != null) {<NEW_LINE>Collections.sort(itemsRetrievedNow, itemsComparator);<NEW_LINE>}<NEW_LINE>if (!Objects.equals(this.items, itemsRetrievedNow)) {<NEW_LINE>final int itemsCount = this.items == null ? 0 : this.items.size();<NEW_LINE>final <MASK><NEW_LINE>throw new AdempiereException(//<NEW_LINE>"Loaded items and cached items does not match." + "\n Parent: " + parentModelRef.get() + "\n Cached items(" + itemsCount + "): " + this.items + "\n Fresh items(" + itemsRetrievedNowCount + "): " + itemsRetrievedNow + "\n debugEmptyNotStaledSet=" + debugEmptyNotStaledSet);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>POJOLookupMapInstancesTracker.ENABLED = instancesTrackerEnabled;<NEW_LINE>}<NEW_LINE>}
int itemsRetrievedNowCount = itemsRetrievedNow.size();
223,950
private boolean estimateMotion() {<NEW_LINE>CameraModel leftCM = cameraModels.get(CAMERA_LEFT);<NEW_LINE>CameraModel rightCM = cameraModels.get(CAMERA_RIGHT);<NEW_LINE>// Perform motion estimation relative to the most recent key frame<NEW_LINE>previousLeft.frame_to_world.invert(world_to_prev);<NEW_LINE>// Put observation and prior knowledge into a format the model matcher will understand<NEW_LINE>listStereo2D3D.reserve(candidates.size());<NEW_LINE>listStereo2D3D.reset();<NEW_LINE>for (int candidateIdx = 0; candidateIdx < candidates.size(); candidateIdx++) {<NEW_LINE>PointTrack l = candidates.get(candidateIdx);<NEW_LINE><MASK><NEW_LINE>// Get the track location<NEW_LINE>TrackInfo bt = l.getCookie();<NEW_LINE>PointTrack r = bt.visualRight;<NEW_LINE>// Get the 3D coordinate of the point in the 'previous' frame<NEW_LINE>SePointOps_F64.transform(world_to_prev, bt.worldLoc, prevLoc4);<NEW_LINE>PerspectiveOps.homogenousTo3dPositiveZ(prevLoc4, 1e8, 1e-8, stereo.location);<NEW_LINE>// compute normalized image coordinate for track in left and right image<NEW_LINE>leftCM.pixelToNorm.compute(l.pixel.x, l.pixel.y, stereo.leftObs);<NEW_LINE>rightCM.pixelToNorm.compute(r.pixel.x, r.pixel.y, stereo.rightObs);<NEW_LINE>// TODO Could this transform be done just once?<NEW_LINE>}<NEW_LINE>// Robustly estimate left camera motion<NEW_LINE>if (!matcher.process(listStereo2D3D.toList()))<NEW_LINE>return false;<NEW_LINE>if (modelRefiner != null) {<NEW_LINE>modelRefiner.fitModel(matcher.getMatchSet(), matcher.getModelParameters(), previous_to_current);<NEW_LINE>} else {<NEW_LINE>previous_to_current.setTo(matcher.getModelParameters());<NEW_LINE>}<NEW_LINE>// Convert the found transforms back to world<NEW_LINE>previous_to_current.invert(current_to_previous);<NEW_LINE>current_to_previous.concat(previousLeft.frame_to_world, currentLeft.frame_to_world);<NEW_LINE>right_to_left.concat(currentLeft.frame_to_world, currentRight.frame_to_world);<NEW_LINE>return true;<NEW_LINE>}
Stereo2D3D stereo = listStereo2D3D.grow();
776,839
private ClassTemplateSpec processSchema(DataSchema schema, ClassTemplateSpec enclosingClass, String memberName) {<NEW_LINE>final CustomInfoSpec customInfo = getImmediateCustomInfo(schema);<NEW_LINE>ClassTemplateSpec result = null;<NEW_LINE>TyperefDataSchema originalTyperefSchema = null;<NEW_LINE>while (schema.getType() == DataSchema.Type.TYPEREF) {<NEW_LINE>final TyperefDataSchema typerefSchema = (TyperefDataSchema) schema;<NEW_LINE>if (originalTyperefSchema == null) {<NEW_LINE>originalTyperefSchema = typerefSchema;<NEW_LINE>}<NEW_LINE>final ClassTemplateSpec found = _schemaToClassMap.get(schema);<NEW_LINE>schema = typerefSchema.getRef();<NEW_LINE>if (schema.getType() == DataSchema.Type.UNION) {<NEW_LINE>result = (found != null) ? found : generateUnion((UnionDataSchema) schema, typerefSchema);<NEW_LINE>break;<NEW_LINE>} else if (found == null) {<NEW_LINE>generateTyperef(typerefSchema, originalTyperefSchema);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (result == null) {<NEW_LINE>assert schema == schema.getDereferencedDataSchema();<NEW_LINE>if (schema instanceof ComplexDataSchema) {<NEW_LINE>final ClassTemplateSpec found = _schemaToClassMap.get(schema);<NEW_LINE>if (found == null) {<NEW_LINE>if (schema instanceof NamedDataSchema) {<NEW_LINE>result = generateNamedSchema((NamedDataSchema) schema);<NEW_LINE>} else {<NEW_LINE>result = generateUnnamedComplexSchema(schema, enclosingClass, memberName);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>result = found;<NEW_LINE>}<NEW_LINE>if (customInfo != null) {<NEW_LINE>result = customInfo.getCustomClass();<NEW_LINE>}<NEW_LINE>} else if (schema instanceof PrimitiveDataSchema) {<NEW_LINE>result = (customInfo != null) ? customInfo.getCustomClass() : getPrimitiveClassForSchema((PrimitiveDataSchema) schema, enclosingClass, memberName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (result == null) {<NEW_LINE>throw <MASK><NEW_LINE>}<NEW_LINE>result.setOriginalTyperefSchema(originalTyperefSchema);<NEW_LINE>return result;<NEW_LINE>}
unrecognizedSchemaType(enclosingClass, memberName, schema);
1,804,308
private void pullRequest() throws Exception {<NEW_LINE>// Pull LauncherRequest<NEW_LINE>LOGGER.logDebug("Pulling LauncherRequest");<NEW_LINE><MASK><NEW_LINE>LOGGER.logDebug("Pulled LauncherRequest");<NEW_LINE>// newLauncherRequest is always not null<NEW_LINE>updateLauncherRequest(newLauncherRequest);<NEW_LINE>// Pull AggregatedFrameworkRequest<NEW_LINE>AggregatedFrameworkRequest newAggFrameworkRequest;<NEW_LINE>try {<NEW_LINE>LOGGER.logDebug("Pulling AggregatedFrameworkRequest");<NEW_LINE>newAggFrameworkRequest = zkStore.getAggregatedFrameworkRequest(conf.getFrameworkName());<NEW_LINE>LOGGER.logDebug("Pulled AggregatedFrameworkRequest");<NEW_LINE>} catch (NoNodeException e) {<NEW_LINE>existsLocalVersionFrameworkRequest = false;<NEW_LINE>throw new NonTransientException("Failed to getAggregatedFrameworkRequest, FrameworkRequest is already deleted on ZK", e);<NEW_LINE>}<NEW_LINE>// newFrameworkDescriptor is always not null<NEW_LINE>FrameworkDescriptor newFrameworkDescriptor = newAggFrameworkRequest.getFrameworkRequest().getFrameworkDescriptor();<NEW_LINE>updateFrameworkDescriptor(newFrameworkDescriptor);<NEW_LINE>updateOverrideApplicationProgressRequest(newAggFrameworkRequest.getOverrideApplicationProgressRequest());<NEW_LINE>updateMigrateTaskRequests(newAggFrameworkRequest.getMigrateTaskRequests());<NEW_LINE>aggFrameworkRequest = newAggFrameworkRequest;<NEW_LINE>}
LauncherRequest newLauncherRequest = zkStore.getLauncherRequest();
1,182,745
private static Map<PsiClass, List<PsiElement>> collectAndAddToCache(PsiJavaFile psiFile, VirtualFile virtualFile, Document document, Project project, Map<String, String> eventMetadata) {<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>eventMetadata.put(EventLogger.KEY_FILE, psiFile.getPackageName() + "." + psiFile.getName());<NEW_LINE>final Map<String, List<PsiElement>> redSymbolToExpressions = <MASK><NEW_LINE>final long collectedTime = System.currentTimeMillis();<NEW_LINE>final long collectDelta = collectedTime - startTime;<NEW_LINE>eventMetadata.put(EventLogger.KEY_TIME_COLLECT_RED_SYMBOLS, String.valueOf(collectDelta));<NEW_LINE>eventMetadata.put(EventLogger.KEY_RED_SYMBOLS_ALL, redSymbolToExpressions.keySet().toString());<NEW_LINE>LOG.debug("Collected in " + collectDelta + ", " + redSymbolToExpressions.keySet());<NEW_LINE>final GlobalSearchScope symbolsScope = moduleWithDependenciesAndLibrariesScope(virtualFile, project);<NEW_LINE>final Map<String, PsiClass> redSymbolToCls = addToCache(redSymbolToExpressions.keySet(), project, symbolsScope, eventMetadata);<NEW_LINE>final long updatedTime = System.currentTimeMillis();<NEW_LINE>final long updatedDelta = updatedTime - collectedTime;<NEW_LINE>eventMetadata.put(EventLogger.KEY_TIME_RESOLVE_RED_SYMBOLS, String.valueOf(updatedDelta));<NEW_LINE>eventMetadata.put(EventLogger.KEY_RED_SYMBOLS_RESOLVED, redSymbolToCls.keySet().toString());<NEW_LINE>LOG.debug("Symbols are updated in " + updatedDelta + ", " + redSymbolToCls.keySet());<NEW_LINE>if (!redSymbolToCls.isEmpty()) {<NEW_LINE>LithoPluginUtils.showInfo(getMessage(virtualFile.getNameWithoutExtension(), redSymbolToCls.keySet()), project);<NEW_LINE>}<NEW_LINE>return combine(redSymbolToCls, redSymbolToExpressions);<NEW_LINE>}
collectRedSymbols(psiFile, document, project);
767,766
public ResourceHandle acquireResources(ActionExecutionMetadata owner, ResourceSet resources, ResourcePriority priority) throws InterruptedException {<NEW_LINE>Preconditions.checkNotNull(resources, "acquireResources called with resources == NULL during %s", owner);<NEW_LINE>Preconditions.checkState(!threadHasResources(), "acquireResources with existing resource lock during %s", owner);<NEW_LINE>AutoProfiler p = profiled("Acquiring resources for: " + owner.<MASK><NEW_LINE>CountDownLatch latch = null;<NEW_LINE>try {<NEW_LINE>latch = acquire(resources, priority);<NEW_LINE>if (latch != null) {<NEW_LINE>latch.await();<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>// Synchronize on this to avoid any racing with #processWaitingThreads<NEW_LINE>synchronized (this) {<NEW_LINE>if (latch.getCount() == 0) {<NEW_LINE>// Resources already acquired by other side. Release them, but not inside this<NEW_LINE>// synchronized block to avoid deadlock.<NEW_LINE>release(resources);<NEW_LINE>} else {<NEW_LINE>// Inform other side that resources shouldn't be acquired.<NEW_LINE>latch.countDown();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>threadLocked.set(true);<NEW_LINE>// Profile acquisition only if it waited for resource to become available.<NEW_LINE>if (latch != null) {<NEW_LINE>p.complete();<NEW_LINE>}<NEW_LINE>return new ResourceHandle(this, owner, resources);<NEW_LINE>}
describe(), ProfilerTask.ACTION_LOCK);
341,849
public void attachApplication(IShizukuApplication application, String requestPackageName) {<NEW_LINE>if (application == null || requestPackageName == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>int callingUid = Binder.getCallingUid();<NEW_LINE>boolean isManager;<NEW_LINE>ClientRecord clientRecord = null;<NEW_LINE>List<String> packages = PackageManagerApis.getPackagesForUidNoThrow(callingUid);<NEW_LINE>if (!packages.contains(requestPackageName)) {<NEW_LINE>LOGGER.w("Request package " + requestPackageName + "does not belong to uid " + callingUid);<NEW_LINE>throw new SecurityException("Request package " + requestPackageName + "does not belong to uid " + callingUid);<NEW_LINE>}<NEW_LINE>isManager = MANAGER_APPLICATION_ID.equals(requestPackageName);<NEW_LINE>if (!isManager && clientManager.findClient(callingUid, callingPid) == null) {<NEW_LINE>synchronized (this) {<NEW_LINE>clientRecord = clientManager.addClient(callingUid, callingPid, application, requestPackageName);<NEW_LINE>}<NEW_LINE>if (clientRecord == null) {<NEW_LINE>LOGGER.w("Add client failed");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOGGER.d("attachApplication: %s %d %d", requestPackageName, callingUid, callingPid);<NEW_LINE>Bundle reply = new Bundle();<NEW_LINE>reply.putInt(ATTACH_REPLY_SERVER_UID, OsUtils.getUid());<NEW_LINE>reply.putInt(ATTACH_REPLY_SERVER_VERSION, ShizukuApiConstants.SERVER_VERSION);<NEW_LINE>reply.putString(ATTACH_REPLY_SERVER_SECONTEXT, OsUtils.getSELinuxContext());<NEW_LINE>if (!isManager) {<NEW_LINE>reply.putBoolean(ATTACH_REPLY_PERMISSION_GRANTED, clientRecord.allowed);<NEW_LINE>reply.putBoolean(ATTACH_REPLY_SHOULD_SHOW_REQUEST_PERMISSION_RATIONALE, false);<NEW_LINE>} else {<NEW_LINE>reply.putInt(ATTACH_REPLY_SERVER_PATCH_VERSION, ServerConstants.PATCH_VERSION);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>application.bindApplication(reply);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOGGER.w(e, "attachApplication");<NEW_LINE>}<NEW_LINE>}
int callingPid = Binder.getCallingPid();
1,447,572
public static void decompressOverMemory(Program program, List<ArtBlock> blocks, TaskMonitor monitor) throws Exception {<NEW_LINE>for (ArtBlock block : blocks) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>Address sourceAddress = program.getMinAddress().add(block.getDataOffset());<NEW_LINE>byte[] compressedBytes = new byte[block.getDataSize()];<NEW_LINE>program.getMemory().getBytes(sourceAddress, compressedBytes);<NEW_LINE>byte[] decompressedBytes = Decompressor.decompress(block.getStorageMode(), compressedBytes, <MASK><NEW_LINE>Address destinationAddress = program.getMinAddress().add(block.getImageOffset());<NEW_LINE>// make sure block exists for bytes...<NEW_LINE>AddressSet destinationSet = new AddressSet(destinationAddress, destinationAddress.add(decompressedBytes.length));<NEW_LINE>AddressSet uncreatedSet = destinationSet.subtract(program.getMemory());<NEW_LINE>for (AddressRange range : uncreatedSet) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>program.getMemory().createInitializedBlock(toBlockName(range), range.getMinAddress(), range.getLength(), (byte) 0x00, monitor, false);<NEW_LINE>}<NEW_LINE>program.getMemory().setBytes(destinationAddress, decompressedBytes);<NEW_LINE>}<NEW_LINE>}
block.getImageSize(), monitor);
721,747
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.layout_main);<NEW_LINE>expandableListView = findViewById(R.id.expandablelist);<NEW_LINE>stickyLayout = <MASK><NEW_LINE>slidingMenu = findViewById(R.id.slidingmenu);<NEW_LINE>caseSummaryFragment = new UseCaseSummaryFragment();<NEW_LINE>FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();<NEW_LINE>fragmentTransaction.add(R.id.fragment_container, caseSummaryFragment, "CaseSummaryFragment");<NEW_LINE>fragmentTransaction.commitAllowingStateLoss();<NEW_LINE>categoryList = UseCaseManager.useCases;<NEW_LINE>expandStatus = new SparseBooleanArray();<NEW_LINE>adapter = new ExpandableListAdapter(this);<NEW_LINE>expandableListView.setAdapter(adapter);<NEW_LINE>expandableListView.setOnHeaderUpdateListener(this);<NEW_LINE>expandableListView.setOnChildClickListener(this);<NEW_LINE>expandableListView.setOnGroupClickListener(this);<NEW_LINE>stickyLayout.setOnGiveUpTouchEventListener(this);<NEW_LINE>slidingMenu.showMenu();<NEW_LINE>}
findViewById(R.id.sticky_layout);
587,239
final DeleteAssessmentReportResult executeDeleteAssessmentReport(DeleteAssessmentReportRequest deleteAssessmentReportRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAssessmentReportRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteAssessmentReportRequest> request = null;<NEW_LINE>Response<DeleteAssessmentReportResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteAssessmentReportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAssessmentReportRequest));<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, "AuditManager");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAssessmentReport");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteAssessmentReportResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAssessmentReportResultJsonUnmarshaller());<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,410,842
public HTTPHeader unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>HTTPHeader hTTPHeader = new HTTPHeader();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>hTTPHeader.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Value", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>hTTPHeader.setValue(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return hTTPHeader;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,490,113
private void reconcileResults(Subscription subs) {<NEW_LINE>synchronized (this) {<NEW_LINE>if (subs != ds || ds == null || subs == null || tv_subs_results == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>tv_subs_results.processDataSourceQueueSync();<NEW_LINE>Collection<SubscriptionResultFilterable> existing_results = tv_subs_results.getDataSources(true);<NEW_LINE>Map<String, SubscriptionResultFilterable> existing_map = new HashMap<>();<NEW_LINE>for (SubscriptionResultFilterable result : existing_results) {<NEW_LINE>existing_map.put(result.getID(), result);<NEW_LINE>}<NEW_LINE>SubscriptionResult[] current_results = ds.getResults(false);<NEW_LINE>List<SubscriptionResultFilterable> new_results = new ArrayList<>(current_results.length);<NEW_LINE>for (SubscriptionResult result : current_results) {<NEW_LINE>SubscriptionResultFilterable existing = existing_map.remove(result.getID());<NEW_LINE>if (existing == null) {<NEW_LINE>new_results.add(new SubscriptionResultFilterable(ds, result));<NEW_LINE>} else {<NEW_LINE>existing.updateFrom(result);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (new_results.size() > 0) {<NEW_LINE>tv_subs_results.addDataSources(new_results.toArray(new SubscriptionResultFilterable[new_results.size()]));<NEW_LINE>}<NEW_LINE>if (existing_map.size() > 0) {<NEW_LINE>Collection<SubscriptionResultFilterable> to_remove = existing_map.values();<NEW_LINE>tv_subs_results.removeDataSources(to_remove.toArray(new SubscriptionResultFilterable[<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
to_remove.size()]));
887,140
private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String automationAccountName, String hybridRunbookWorkerGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><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 (automationAccountName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter automationAccountName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (hybridRunbookWorkerGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter hybridRunbookWorkerGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2019-06-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, this.client.getSubscriptionId(), apiVersion, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
1,189,941
final GetLayerVersionByArnResult executeGetLayerVersionByArn(GetLayerVersionByArnRequest getLayerVersionByArnRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getLayerVersionByArnRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetLayerVersionByArnRequest> request = null;<NEW_LINE>Response<GetLayerVersionByArnResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetLayerVersionByArnRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getLayerVersionByArnRequest));<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, "Lambda");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLayerVersionByArn");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetLayerVersionByArnResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLayerVersionByArnResultJsonUnmarshaller());<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());
421,206
public void dump(StringPool strings, ResTablePackage resPackage, PrintStream out) {<NEW_LINE>out.format(" config (unknown):\n");<NEW_LINE>for (int entryIdx = 0; entryIdx < entryCount; entryIdx++) {<NEW_LINE>int offset = getEntryValueOffset(entryIdx);<NEW_LINE>if (offset != -1) {<NEW_LINE>int size = entryData.getShort(offset);<NEW_LINE>int flags = entryData.getShort(offset + 2);<NEW_LINE>int refId = entryData.getInt(offset + 4);<NEW_LINE>Preconditions.checkState(size > 0);<NEW_LINE>// Some of the formatting of this line is shared between maps/non-maps.<NEW_LINE>out.format(" resource 0x7f%02x%04x %s:%s/%s:", getResourceType(), entryIdx, resPackage.getPackageName(), getTypeName(resPackage), resPackage.getKeys().getString(refId));<NEW_LINE>if ((flags & FLAG_COMPLEX) != 0) {<NEW_LINE>out.format(" <bag>\n");<NEW_LINE>int parent = entryData.getInt(offset + 8);<NEW_LINE>int count = entryData.getInt(offset + 12);<NEW_LINE>out.format(" Parent=0x%08x(Resolved=0x%08x), Count=%d\n", parent, parent == 0 ? 0x7F000000 : parent, count);<NEW_LINE>int entryOffset = offset;<NEW_LINE>for (int attrIdx = 0; attrIdx < count; attrIdx++) {<NEW_LINE>int name = entryData.getInt(entryOffset + 16);<NEW_LINE>int vsize = entryData.getShort(entryOffset + 20);<NEW_LINE>int type = <MASK><NEW_LINE>int data = entryData.getInt(entryOffset + 24);<NEW_LINE>String dataString = formatTypeForDump(strings, type, data);<NEW_LINE>out.format(" #%d (Key=0x%08x): %s\n", attrIdx, name, dataString);<NEW_LINE>entryOffset += 4 + vsize;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int vsize = entryData.getShort(offset + 8);<NEW_LINE>// empty(offset + 10)<NEW_LINE>int type = entryData.get(offset + 11);<NEW_LINE>int data = entryData.getInt(offset + 12);<NEW_LINE>out.format(" t=0x%02x d=0x%08x (s=0x%04x r=0x00)\n", type, data, vsize);<NEW_LINE>String dataString = formatTypeForDump(strings, type, data);<NEW_LINE>out.format(" %s\n", dataString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
entryData.get(entryOffset + 23);
1,788,613
private JoinContext moveClauses(QueryModel parent, JoinContext from, JoinContext to, IntList positions) {<NEW_LINE>int p = 0;<NEW_LINE>int m = positions.size();<NEW_LINE>JoinContext result = contextPool.next();<NEW_LINE>result.slaveIndex = from.slaveIndex;<NEW_LINE>for (int i = 0, n = from.aIndexes.size(); i < n; i++) {<NEW_LINE>// logically those clauses we move away from "from" context<NEW_LINE>// should not longer exist in "from", but instead of implementing<NEW_LINE>// "delete" function, which would be manipulating underlying array<NEW_LINE>// on every invocation, we copy retained clauses to new context,<NEW_LINE>// which is "result".<NEW_LINE>// hence whenever exists in "positions" we copy clause to "to"<NEW_LINE>// otherwise copy to "result"<NEW_LINE>JoinContext t = p < m && i == positions.getQuick(p) ? to : result;<NEW_LINE>int ai = from.aIndexes.getQuick(i);<NEW_LINE>int bi = from.bIndexes.getQuick(i);<NEW_LINE>t.aIndexes.add(ai);<NEW_LINE>t.aNames.add(from.aNames.getQuick(i));<NEW_LINE>t.aNodes.add(from.aNodes.getQuick(i));<NEW_LINE>t.bIndexes.add(bi);<NEW_LINE>t.bNames.add(from.bNames.getQuick(i));<NEW_LINE>t.bNodes.add(from.bNodes.getQuick(i));<NEW_LINE>// either ai or bi is definitely belongs to this context<NEW_LINE>if (ai != t.slaveIndex) {<NEW_LINE><MASK><NEW_LINE>linkDependencies(parent, ai, bi);<NEW_LINE>} else {<NEW_LINE>t.parents.add(bi);<NEW_LINE>linkDependencies(parent, bi, ai);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
t.parents.add(ai);
668,218
protected void updateContent() {<NEW_LINE>TextView titleView = (TextView) view.findViewById(R.id.title);<NEW_LINE>String text = app.<MASK><NEW_LINE>String formattedDuration = OsmAndFormatter.getFormattedDuration(approxPedestrianTime, app);<NEW_LINE>int start = text.indexOf("%1$s");<NEW_LINE>int end = start + formattedDuration.length();<NEW_LINE>text = text.replace("%1$s", formattedDuration);<NEW_LINE>SpannableString spannable = new SpannableString(text);<NEW_LINE>spannable.setSpan(new StyleSpan(Typeface.BOLD), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);<NEW_LINE>titleView.setText(spannable);<NEW_LINE>FrameLayout button = view.findViewById(R.id.button);<NEW_LINE>View buttonDescr = view.findViewById(R.id.button_descr);<NEW_LINE>button.setOnClickListener(v -> notifyButtonPressed(0));<NEW_LINE>AndroidUtils.setBackground(app, button, nightMode, R.drawable.btn_border_light, R.drawable.btn_border_dark);<NEW_LINE>AndroidUtils.setBackground(app, buttonDescr, nightMode, R.drawable.ripple_light, R.drawable.ripple_dark);<NEW_LINE>Drawable icPedestrian = app.getUIUtilities().getIcon(R.drawable.ic_action_pedestrian_dark, R.color.description_font_and_bottom_sheet_icons);<NEW_LINE>((ImageView) view.findViewById(R.id.image)).setImageDrawable(AndroidUtils.getDrawableForDirection(app, icPedestrian));<NEW_LINE>view.findViewById(R.id.card_divider).setVisibility(View.VISIBLE);<NEW_LINE>view.findViewById(R.id.top_divider).setVisibility(View.GONE);<NEW_LINE>}
getString(R.string.public_transport_ped_route_title);
344,154
// Configure SaxpyBlock<NEW_LINE>protected JobConf configSaxpy(Path py, Path px, Path saxpy_output, double a) throws Exception {<NEW_LINE>final JobConf conf = new JobConf(getConf(), SaxpyBlock.class);<NEW_LINE>conf.set("y_path", py.getName());<NEW_LINE>conf.set("x_path", px.getName());<NEW_LINE>conf.set("a", "" + a);<NEW_LINE>conf.set("block_width", "" + block_width);<NEW_LINE>conf.setJobName("Lanczos.SaxpyBlock");<NEW_LINE><MASK><NEW_LINE>conf.setReducerClass(RedStage1.class);<NEW_LINE>FileInputFormat.setInputPaths(conf, py, px);<NEW_LINE>FileOutputFormat.setOutputPath(conf, saxpy_output);<NEW_LINE>conf.setNumReduceTasks(nreducers);<NEW_LINE>conf.setOutputKeyClass(IntWritable.class);<NEW_LINE>conf.setOutputValueClass(Text.class);<NEW_LINE>return conf;<NEW_LINE>}
conf.setMapperClass(MapStage1.class);
785,337
protected Configuration createConfiguration(RoundEnvironment roundEnv) {<NEW_LINE>Class<? extends Annotation> entities = QueryEntities.class;<NEW_LINE>Class<? extends Annotation> entity = Entity.class;<NEW_LINE>Class<? extends Annotation> superType = QuerySupertype.class;<NEW_LINE>Class<? <MASK><NEW_LINE>Class<? extends Annotation> skip = Transient.class;<NEW_LINE>DefaultConfiguration conf = new DefaultConfiguration(processingEnv, roundEnv, Collections.<String>emptySet(), entities, entity, superType, null, embedded, skip);<NEW_LINE>try {<NEW_LINE>// Point is an Expression<Double[]><NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Class<? extends Expression<Double[]>> cl = (Class<? extends Expression<Double[]>>) Class.forName("com.querydsl.mongodb.Point");<NEW_LINE>conf.addCustomType(Double[].class, cl);<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>throw new IllegalStateException(e);<NEW_LINE>}<NEW_LINE>return conf;<NEW_LINE>}
extends Annotation> embedded = Embedded.class;
1,544,256
public int minDistance(String word1, String word2) {<NEW_LINE>int m = word1.length();<NEW_LINE>int n = word2.length();<NEW_LINE>if (m == 0) {<NEW_LINE>return n;<NEW_LINE>}<NEW_LINE>if (n == 0) {<NEW_LINE>return m;<NEW_LINE>}<NEW_LINE>char[] str1 = word1.toCharArray();<NEW_LINE>char[] str2 = word2.toCharArray();<NEW_LINE>int[][] table = new int[m + 1][n + 1];<NEW_LINE>for (int i = 0; i < m + 1; i++) {<NEW_LINE>table[i][0] = i;<NEW_LINE>}<NEW_LINE>for (int j = 0; j < n + 1; j++) {<NEW_LINE>table[0][j] = j;<NEW_LINE>}<NEW_LINE>for (int i = 1; i < m + 1; i++) {<NEW_LINE>for (int j = 1; j < n + 1; j++) {<NEW_LINE>int cost = 0;<NEW_LINE>if (str1[i - 1] != str2[j - 1]) {<NEW_LINE>cost = 1;<NEW_LINE>}<NEW_LINE>table[i][j] = Math.min(Math.min(table[i - 1][j] + 1, table[i][j - 1] + 1), table[i - 1]<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return table[m][n];<NEW_LINE>}
[j - 1] + cost);
1,088,282
public static LinkedList<Diff> reformat(CompilationInfo info, TreePath path, CodeStyle cs, int startOffset, int endOffset, boolean templateEdit, int firstLineIndent) {<NEW_LINE>Pretty pretty = new Pretty(info, path, cs, startOffset, endOffset, templateEdit);<NEW_LINE>if (pretty.indent >= 0) {<NEW_LINE>if (firstLineIndent >= 0)<NEW_LINE>pretty.indent = pretty.lastIndent = firstLineIndent;<NEW_LINE>pretty.scan(path, null);<NEW_LINE>}<NEW_LINE>if (path.getLeaf().getKind() == Tree.Kind.COMPILATION_UNIT) {<NEW_LINE>CompilationUnitTree cut = (CompilationUnitTree) path.getLeaf();<NEW_LINE>List<? extends Tree> typeDecls = cut.getTypeDecls();<NEW_LINE>int size = typeDecls.size();<NEW_LINE>int cnt = size > 0 && org.netbeans.api.java.source.TreeUtilities.CLASS_TREE_KINDS.contains(typeDecls.get(size - 1).getKind()) <MASK><NEW_LINE>if (cnt < 1)<NEW_LINE>cnt = 1;<NEW_LINE>String s = pretty.getNewlines(cnt);<NEW_LINE>pretty.tokens.moveEnd();<NEW_LINE>pretty.tokens.movePrevious();<NEW_LINE>if (pretty.tokens.token().id() != WHITESPACE) {<NEW_LINE>if (!pretty.tokens.token().text().toString().endsWith(s)) {<NEW_LINE>String text = info.getText();<NEW_LINE>pretty.diffs.addFirst(new Diff(text.length(), text.length(), s));<NEW_LINE>}<NEW_LINE>} else if (!s.contentEquals(pretty.tokens.token().text())) {<NEW_LINE>pretty.diffs.addFirst(new Diff(pretty.tokens.offset(), pretty.tokens.offset() + pretty.tokens.token().length(), s));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return pretty.diffs;<NEW_LINE>}
? cs.getBlankLinesAfterClass() : 1;
265,263
public State state() {<NEW_LINE>long failingMillis = clock.getAsLong() - failingSinceMillis.get();<NEW_LINE>if (failingMillis > graceMillis && halfOpen.compareAndSet(false, true))<NEW_LINE>log.log(INFO, "Circuit breaker is now half-open, as no requests have succeeded for the " + "last " + failingMillis + "ms. The server will be pinged to see if it recovers" + (doomMillis >= 0 ? ", but this client will give up if no successes are observed within " + doomMillis + "ms" : "") + ". First failure was '" + <MASK><NEW_LINE>if (doomMillis >= 0 && failingMillis > doomMillis && open.compareAndSet(false, true))<NEW_LINE>log.log(WARNING, "Circuit breaker is now open, after " + doomMillis + "ms of failing request, " + "and this client will give up and abort its remaining feed operations.");<NEW_LINE>return open.get() ? State.OPEN : halfOpen.get() ? State.HALF_OPEN : State.CLOSED;<NEW_LINE>}
detail.get() + "'.");