idx
int32 46
1.86M
| input
stringlengths 321
6.6k
| target
stringlengths 9
1.24k
|
|---|---|---|
282,573
|
protected void jbInit() throws Exception {<NEW_LINE>// this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);<NEW_LINE>mainPanel.setLayout(new java.awt.BorderLayout());<NEW_LINE>setLayout(new java.awt.BorderLayout());<NEW_LINE>southPanel.setLayout(southLayout);<NEW_LINE>southPanel.add(confirmPanel, BorderLayout.CENTER);<NEW_LINE>southPanel.add(statusBar, BorderLayout.SOUTH);<NEW_LINE>mainPanel.add(southPanel, BorderLayout.SOUTH);<NEW_LINE>mainPanel.add(parameterPanel, BorderLayout.NORTH);<NEW_LINE>mainPanel.add(scrollPane, BorderLayout.CENTER);<NEW_LINE>scrollPane.getViewport().add(p_table, null);<NEW_LINE>//<NEW_LINE>confirmPanel.setActionListener(this);<NEW_LINE>confirmPanel.getResetButton().setVisible(hasReset());<NEW_LINE>confirmPanel.getCustomizeButton().setVisible(hasCustomize());<NEW_LINE>confirmPanel.getHistoryButton(<MASK><NEW_LINE>confirmPanel.getZoomButton().setVisible(hasZoom());<NEW_LINE>//<NEW_LINE>popup.add(calcMenu);<NEW_LINE>calcMenu.setText(Msg.getMsg(Env.getCtx(), "Calculator"));<NEW_LINE>calcMenu.setIcon(Images.getImageIcon2("Calculator16"));<NEW_LINE>calcMenu.addActionListener(this);<NEW_LINE>//<NEW_LINE>p_table.getSelectionModel().addListSelectionListener(this);<NEW_LINE>enableButtons();<NEW_LINE>}
|
).setVisible(hasHistory());
|
706,055
|
protected void internalReceiveCommand(String itemName, Command command) {<NEW_LINE>logger.trace("Received command (item='{}', command='{}')", itemName, command.toString());<NEW_LINE>final Map<String, AnelCommandType> map = getCommandTypeForItemName(itemName);<NEW_LINE>if (map == null || map.isEmpty()) {<NEW_LINE>logger.debug("Invalid command for item name: '" + itemName + "'");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String deviceId = map.keySet().iterator().next();<NEW_LINE>final AnelConnectorThread connectorThread = connectorThreads.get(deviceId);<NEW_LINE>if (connectorThread == null) {<NEW_LINE>logger.<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final AnelCommandType cmd = map.get(deviceId);<NEW_LINE>// check for switchable command<NEW_LINE>final boolean isSwitch = AnelCommandType.SWITCHES.contains(cmd);<NEW_LINE>final boolean isIO = AnelCommandType.IOS.contains(cmd);<NEW_LINE>if (isIO || isSwitch) {<NEW_LINE>if (command instanceof OnOffType) {<NEW_LINE>final boolean newStateBoolean = OnOffType.ON.equals(command);<NEW_LINE>if (isSwitch) {<NEW_LINE>final int switchNr = Integer.parseInt(cmd.name().substring(1));<NEW_LINE>connectorThread.sendSwitch(switchNr, newStateBoolean);<NEW_LINE>} else if (isIO) {<NEW_LINE>final int ioNr = Integer.parseInt(cmd.name().substring(2));<NEW_LINE>connectorThread.sendIO(ioNr, newStateBoolean);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.warn("Invalid state for '" + cmd.name() + "' (expected: ON/OFF): " + command);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.warn("Cannot switch '" + cmd.name() + "', supported switches: F1 - F8, IO1 - IO8");<NEW_LINE>}<NEW_LINE>}
|
debug("Could not find device '" + deviceId + "', missing configuration or not yet initialized.");
|
1,219,204
|
public ProjectHook addHook(Object projectIdOrPath, String url, ProjectHook enabledHooks, boolean enableSslVerification, String secretToken) throws GitLabApiException {<NEW_LINE>GitLabApiForm formData = new GitLabApiForm().withParam("url", url, true).withParam("push_events", enabledHooks.getPushEvents(), false).withParam("push_events_branch_filter", enabledHooks.getPushEventsBranchFilter(), false).withParam("issues_events", enabledHooks.getIssuesEvents(), false).withParam("confidential_issues_events", enabledHooks.getConfidentialIssuesEvents(), false).withParam("merge_requests_events", enabledHooks.getMergeRequestsEvents(), false).withParam("tag_push_events", enabledHooks.getTagPushEvents(), false).withParam("note_events", enabledHooks.getNoteEvents(), false).withParam("confidential_note_events", enabledHooks.getConfidentialNoteEvents(), false).withParam("job_events", enabledHooks.getJobEvents(), false).withParam("pipeline_events", enabledHooks.getPipelineEvents(), false).withParam("wiki_page_events", enabledHooks.getWikiPageEvents(), false).withParam("enable_ssl_verification", enableSslVerification, false).withParam("repository_update_events", enabledHooks.getRepositoryUpdateEvents(), false).withParam("deployment_events", enabledHooks.getDeploymentEvents(), false).withParam("releases_events", enabledHooks.getReleasesEvents(), false).withParam("deployment_events", enabledHooks.getDeploymentEvents(), false).withParam("token", secretToken, false);<NEW_LINE>Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "hooks");<NEW_LINE>return (response<MASK><NEW_LINE>}
|
.readEntity(ProjectHook.class));
|
746,669
|
public void cleanupRun() {<NEW_LINE>String path = joinPathParts(testClassName, runId);<NEW_LINE>LOG.info("Cleaning up everything under '{}' under bucket '{}'", path, bucket);<NEW_LINE>Page<Blob> firstPage = getFirstPage(path);<NEW_LINE>consumePages(firstPage, blobs -> {<NEW_LINE>// For testability, use the Iterable<BlobId> overload<NEW_LINE>List<BlobId> blobIds = new ArrayList<>();<NEW_LINE>for (Blob blob : blobs) {<NEW_LINE>blobIds.add(blob.getBlobId());<NEW_LINE>}<NEW_LINE>if (blobIds.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Boolean> <MASK><NEW_LINE>for (int i = 0; i < deleted.size(); ++i) {<NEW_LINE>if (!deleted.get(i)) {<NEW_LINE>LOG.warn("Blob '{}' not deleted", blobIds.get(i).getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
|
deleted = client.delete(blobIds);
|
883,231
|
private Nonce generateNewUniqueNonceForDevice() {<NEW_LINE>byte[] nonceBytes = generateNonceBytes();<NEW_LINE>boolean unique = false;<NEW_LINE>while (!unique) {<NEW_LINE>// Collision, try again<NEW_LINE>nonceBytes = generateNonceBytes();<NEW_LINE>// Make sure the id is unique for all nonces in storage<NEW_LINE>// Can't have duplicate 1st bytes since that is the nonce ID<NEW_LINE>unique = ourNonceTable.getNonceById(nonceBytes[0]) == null && !usedNonceIdList.contains(nonceBytes[0]) && !expiredNonceIdList.contains(nonceBytes[0]);<NEW_LINE>}<NEW_LINE>Nonce nonce = new Nonce(nonceBytes, new NonceTimer(NonceTimerType.GENERATED, node));<NEW_LINE>logger.debug(String.format("NODE %s: Generated new nonce for device: %s", node.getNodeId(), SerialMessage.bb2hex(nonce.getNonceBytes())));<NEW_LINE>table.put(<MASK><NEW_LINE>return nonce;<NEW_LINE>}
|
nonce.getNonceId(), nonce);
|
1,429,357
|
protected ThingHandler createHandler(Thing thing) {<NEW_LINE>ThingTypeUID thingTypeUID = thing.getThingTypeUID();<NEW_LINE>if (thingTypeUID.equals(DSCAlarmBindingConstants.ENVISALINKBRIDGE_THING_TYPE)) {<NEW_LINE>EnvisalinkBridgeHandler handler = new EnvisalinkBridgeHandler((Bridge) thing);<NEW_LINE>registerDSCAlarmDiscoveryService(handler);<NEW_LINE>logger.debug("createHandler(): ENVISALINKBRIDGE_THING: ThingHandler created for {}", thingTypeUID);<NEW_LINE>return handler;<NEW_LINE>} else if (thingTypeUID.equals(DSCAlarmBindingConstants.IT100BRIDGE_THING_TYPE)) {<NEW_LINE>IT100BridgeHandler handler = new IT100BridgeHandler((Bridge) thing, serialPortManager);<NEW_LINE>registerDSCAlarmDiscoveryService(handler);<NEW_LINE>logger.debug("createHandler(): IT100BRIDGE_THING: ThingHandler created for {}", thingTypeUID);<NEW_LINE>return handler;<NEW_LINE>} else if (thingTypeUID.equals(DSCAlarmBindingConstants.TCPSERVERBRIDGE_THING_TYPE)) {<NEW_LINE>TCPServerBridgeHandler handler = <MASK><NEW_LINE>registerDSCAlarmDiscoveryService(handler);<NEW_LINE>logger.debug("createHandler(): TCPSERVERBRIDGE_THING: ThingHandler created for {}", thingTypeUID);<NEW_LINE>return handler;<NEW_LINE>} else if (thingTypeUID.equals(DSCAlarmBindingConstants.PANEL_THING_TYPE)) {<NEW_LINE>logger.debug("createHandler(): PANEL_THING: ThingHandler created for {}", thingTypeUID);<NEW_LINE>return new PanelThingHandler(thing);<NEW_LINE>} else if (thingTypeUID.equals(DSCAlarmBindingConstants.PARTITION_THING_TYPE)) {<NEW_LINE>logger.debug("createHandler(): PARTITION_THING: ThingHandler created for {}", thingTypeUID);<NEW_LINE>return new PartitionThingHandler(thing);<NEW_LINE>} else if (thingTypeUID.equals(DSCAlarmBindingConstants.ZONE_THING_TYPE)) {<NEW_LINE>logger.debug("createHandler(): ZONE_THING: ThingHandler created for {}", thingTypeUID);<NEW_LINE>return new ZoneThingHandler(thing);<NEW_LINE>} else if (thingTypeUID.equals(DSCAlarmBindingConstants.KEYPAD_THING_TYPE)) {<NEW_LINE>logger.debug("createHandler(): KEYPAD_THING: ThingHandler created for {}", thingTypeUID);<NEW_LINE>return new KeypadThingHandler(thing);<NEW_LINE>} else {<NEW_LINE>logger.debug("createHandler(): ThingHandler not found for {}", thingTypeUID);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
|
new TCPServerBridgeHandler((Bridge) thing);
|
2,001
|
public static <T> T[] realloc(Class<T> klass, T[] src, int size, boolean ended) {<NEW_LINE>T[] dest;<NEW_LINE>if (size > src.length) {<NEW_LINE>dest = (T[]) <MASK><NEW_LINE>if (ended) {<NEW_LINE>System.arraycopy(src, 0, dest, 0, src.length);<NEW_LINE>} else {<NEW_LINE>System.arraycopy(src, 0, dest, size - src.length, src.length);<NEW_LINE>}<NEW_LINE>} else if (size < src.length) {<NEW_LINE>dest = (T[]) Array.newInstance(klass, size);<NEW_LINE>if (ended) {<NEW_LINE>System.arraycopy(src, src.length - size, dest, 0, size);<NEW_LINE>} else {<NEW_LINE>System.arraycopy(src, 0, dest, 0, size);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>dest = src;<NEW_LINE>}<NEW_LINE>return dest;<NEW_LINE>}
|
Array.newInstance(klass, size);
|
1,359,765
|
protected void handleClassFileName(URI container, Object module, String fileName, char fileSystemSeparatorChar) {<NEW_LINE>String strippedClassFileName = strippedClassFileName(fileName);<NEW_LINE>if (strippedClassFileName.equals("module-info")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String className = strippedClassFileName.replace(fileSystemSeparatorChar, '.');<NEW_LINE>synchronized (classes) {<NEW_LINE>EconomicSet<String> classNames = classes.get(container);<NEW_LINE>if (classNames == null) {<NEW_LINE>classNames = EconomicSet.create();<NEW_LINE>classes.put(container, classNames);<NEW_LINE>}<NEW_LINE>classNames.add(className);<NEW_LINE>}<NEW_LINE>int packageSep = className.lastIndexOf('.');<NEW_LINE>String packageName = packageSep > 0 ? className.substring(0, packageSep) : "";<NEW_LINE>synchronized (packages) {<NEW_LINE>EconomicSet<String> <MASK><NEW_LINE>if (packageNames == null) {<NEW_LINE>packageNames = EconomicSet.create();<NEW_LINE>packages.put(container, packageNames);<NEW_LINE>}<NEW_LINE>packageNames.add(packageName);<NEW_LINE>}<NEW_LINE>Class<?> clazz = null;<NEW_LINE>try {<NEW_LINE>clazz = imageClassLoader.forName(className, module);<NEW_LINE>} catch (AssertionError error) {<NEW_LINE>VMError.shouldNotReachHere(error);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>ImageClassLoader.handleClassLoadingError(t);<NEW_LINE>}<NEW_LINE>if (clazz != null) {<NEW_LINE>imageClassLoader.handleClass(clazz);<NEW_LINE>}<NEW_LINE>}
|
packageNames = packages.get(container);
|
1,308,812
|
private Agent lookupAgent(Task task) {<NEW_LINE>// FIXME: superuser security context<NEW_LINE>Class taskClass = task.getClass();<NEW_LINE>Agent agent = null;<NEW_LINE>Class agentClass = agentClassCache.get(taskClass.getName());<NEW_LINE>// cache miss<NEW_LINE>if (agentClass == null) {<NEW_LINE>Map<String, Class<? extends Agent>> agentClassesMap = getAgents();<NEW_LINE>if (agentClassesMap != null) {<NEW_LINE>for (Entry<String, Class<? extends Agent>> classEntry : agentClassesMap.entrySet()) {<NEW_LINE>Class<? extends Agent> supportedAgentClass = agentClassesMap.get(classEntry.getKey());<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>Class supportedTaskClass = supportedAgent.getSupportedTaskType();<NEW_LINE>if (supportedTaskClass.equals(taskClass)) {<NEW_LINE>agentClass = supportedAgentClass;<NEW_LINE>}<NEW_LINE>agentClassCache.put(supportedTaskClass.getName(), supportedAgentClass);<NEW_LINE>} catch (Throwable ignore) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (agentClass != null) {<NEW_LINE>try {<NEW_LINE>agent = (Agent) agentClass.newInstance();<NEW_LINE>} catch (Throwable ignore) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return (agent);<NEW_LINE>}
|
Agent supportedAgent = supportedAgentClass.newInstance();
|
483,809
|
// delete.<NEW_LINE>@Override<NEW_LINE>@WrapInTransaction<NEW_LINE>public void archive(final Host site, final User user, final boolean respectFrontendRoles) throws DotDataException, DotSecurityException, DotContentletStateException {<NEW_LINE>final Contentlet siteAsContentlet = APILocator.getContentletAPI().find(site.getInode(), user, respectFrontendRoles);<NEW_LINE>// Retrieve all Sites that have the specified site as tag storage site<NEW_LINE>final List<Host> siteList = retrieveHostsPerTagStorage(site.getIdentifier(), user);<NEW_LINE>for (final Host siteItem : siteList) {<NEW_LINE>if (siteItem.getIdentifier() != null && !siteItem.getIdentifier().equals(site.getIdentifier())) {<NEW_LINE>// prevents changing tag storage for archived site.<NEW_LINE>// the tag storage will change for all hosts which tag storage is archived site<NEW_LINE>// Apparently this code updates all other hosts setting their own self as tag storage<NEW_LINE>siteItem.setTagStorage(siteItem.getIdentifier());<NEW_LINE>// So In order to avoid an exception updating a site that could be archived we're gonna tell the API to skip validation.<NEW_LINE>siteItem.getMap().<MASK><NEW_LINE>save(siteItem, user, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>siteAsContentlet.setIndexPolicy(IndexPolicyProvider.getInstance().forSingleContent());<NEW_LINE>APILocator.getContentletAPI().archive(siteAsContentlet, user, respectFrontendRoles);<NEW_LINE>site.setModDate(new Date());<NEW_LINE>this.flushAllCaches(site);<NEW_LINE>HibernateUtil.addCommitListener(() -> this.sendArchiveSiteSystemEvent(siteAsContentlet), 1000);<NEW_LINE>}
|
put(Contentlet.DONT_VALIDATE_ME, true);
|
221,495
|
private static void runAssertionPartitionAddRemoveListener(RegressionEnvironment env, String eplContext, String contextName) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@name('ctx') @public " + eplContext, path);<NEW_LINE>env.compileDeploy("@name('s0') context " + contextName + " select count(*) from SupportBean", path);<NEW_LINE>EPContextPartitionService api = env.runtime().getContextPartitionService();<NEW_LINE>String depIdCtx = env.deploymentId("ctx");<NEW_LINE>SupportContextListener[] listeners = new SupportContextListener[3];<NEW_LINE>for (int i = 0; i < listeners.length; i++) {<NEW_LINE>listeners[i] = new SupportContextListener(env);<NEW_LINE>env.runtime().getContextPartitionService().addContextPartitionStateListener(depIdCtx, contextName, listeners[i]);<NEW_LINE>}<NEW_LINE>env.sendEventBean(new SupportBean_S0(1));<NEW_LINE>for (int i = 0; i < listeners.length; i++) {<NEW_LINE>listeners[i].assertAndReset(SupportContextListenUtil.eventPartitionInitTerm(depIdCtx, contextName, ContextStateEventContextPartitionAllocated.class));<NEW_LINE>}<NEW_LINE>api.removeContextPartitionStateListener(depIdCtx, contextName, listeners[0]);<NEW_LINE>env.sendEventBean(new SupportBean_S1(1));<NEW_LINE>listeners[0].assertNotInvoked();<NEW_LINE>listeners[1].assertAndReset(SupportContextListenUtil.eventPartitionInitTerm(depIdCtx<MASK><NEW_LINE>listeners[2].assertAndReset(SupportContextListenUtil.eventPartitionInitTerm(depIdCtx, contextName, ContextStateEventContextPartitionDeallocated.class));<NEW_LINE>Iterator<ContextPartitionStateListener> it = api.getContextPartitionStateListeners(depIdCtx, contextName);<NEW_LINE>assertSame(listeners[1], it.next());<NEW_LINE>assertSame(listeners[2], it.next());<NEW_LINE>assertFalse(it.hasNext());<NEW_LINE>api.removeContextPartitionStateListeners(depIdCtx, contextName);<NEW_LINE>assertFalse(api.getContextPartitionStateListeners(depIdCtx, contextName).hasNext());<NEW_LINE>env.sendEventBean(new SupportBean_S0(2));<NEW_LINE>env.sendEventBean(new SupportBean_S1(2));<NEW_LINE>for (int i = 0; i < listeners.length; i++) {<NEW_LINE>listeners[i].assertNotInvoked();<NEW_LINE>}<NEW_LINE>env.undeployAll();<NEW_LINE>}
|
, contextName, ContextStateEventContextPartitionDeallocated.class));
|
409,859
|
public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Set<PermanentIdPredicate> permsToReturn = new HashSet<>();<NEW_LINE>for (UUID opponentId : game.getOpponents(player.getId())) {<NEW_LINE>Player opponent = game.getPlayer(opponentId);<NEW_LINE>if (opponent == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int highestCMC = 0;<NEW_LINE>for (Permanent permanent : game.getBattlefield().getAllActivePermanents(opponentId)) {<NEW_LINE>if (permanent != null) {<NEW_LINE>highestCMC = Math.max(highestCMC, permanent.getManaValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>FilterPermanent filter = new FilterNonlandPermanent("permanent you control with mana value " + highestCMC);<NEW_LINE>filter.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, highestCMC));<NEW_LINE>filter.add(new ControllerIdPredicate(opponentId));<NEW_LINE>Target target = new TargetPermanent(<MASK><NEW_LINE>if (opponent.choose(outcome, target, source, game)) {<NEW_LINE>if (target.getFirstTarget() == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>permsToReturn.add(new PermanentIdPredicate(target.getFirstTarget()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>FilterPermanent filter = new FilterPermanent();<NEW_LINE>filter.add(Predicates.or(permsToReturn));<NEW_LINE>new ReturnToHandFromBattlefieldAllEffect(filter).apply(game, source);<NEW_LINE>new DiscardEachPlayerEffect(StaticValue.get(1), false, TargetController.OPPONENT).apply(game, source);<NEW_LINE>return true;<NEW_LINE>}
|
1, 1, filter, true);
|
673,557
|
private int writeInternal(String path, Pointer buf, @size_t long size, @off_t long offset, FuseFileInfo fi) {<NEW_LINE>if (size > Integer.MAX_VALUE) {<NEW_LINE>LOG.error("Cannot write more than Integer.MAX_VALUE");<NEW_LINE>return ErrorCodes.EIO();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>final long fd = fi.fh.get();<NEW_LINE>OpenFileEntry oe = mOpenFiles.getFirstByField(ID_INDEX, fd);<NEW_LINE>if (oe == null) {<NEW_LINE>LOG.error("Cannot find fd for {} in table", path);<NEW_LINE>return -ErrorCodes.EBADFD();<NEW_LINE>}<NEW_LINE>if (oe.getOut() == null) {<NEW_LINE>LOG.error("{} already exists in Alluxio and cannot be overwritten." + " Please delete this file first.", path);<NEW_LINE>return -ErrorCodes.EEXIST();<NEW_LINE>}<NEW_LINE>if (offset < oe.getWriteOffset()) {<NEW_LINE>// no op<NEW_LINE>return sz;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final byte[] dest = new byte[sz];<NEW_LINE>buf.get(0, dest, 0, sz);<NEW_LINE>oe.getOut().write(dest);<NEW_LINE>oe.setWriteOffset(offset + size);<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.error("IOException while writing to {}.", path, e);<NEW_LINE>return -ErrorCodes.EIO();<NEW_LINE>}<NEW_LINE>return sz;<NEW_LINE>}
|
final int sz = (int) size;
|
1,687,112
|
protected <RESULT extends WebConfig> RESULT createEntity(Map<String, Object> source, Class<? extends RESULT> entityType) {<NEW_LINE>try {<NEW_LINE>final RESULT result = entityType.newInstance();<NEW_LINE>result.setAvailable(DfTypeUtil.toBoolean(source.get("available")));<NEW_LINE>result.setBoost(DfTypeUtil.toFloat(source.get("boost")));<NEW_LINE>result.setConfigParameter(DfTypeUtil.toString(source.get("configParameter")));<NEW_LINE>result.setCreatedBy(DfTypeUtil.toString(source.get("createdBy")));<NEW_LINE>result.setCreatedTime(DfTypeUtil.toLong(source.get("createdTime")));<NEW_LINE>result.setDepth(DfTypeUtil.toInteger(source.get("depth")));<NEW_LINE>result.setDescription(DfTypeUtil.toString(source.get("description")));<NEW_LINE>result.setExcludedDocUrls(DfTypeUtil.toString(source.get("excludedDocUrls")));<NEW_LINE>result.setExcludedUrls(DfTypeUtil.toString(source.get("excludedUrls")));<NEW_LINE>result.setIncludedDocUrls(DfTypeUtil.toString(source.get("includedDocUrls")));<NEW_LINE>result.setIncludedUrls(DfTypeUtil.toString(source.get("includedUrls")));<NEW_LINE>result.setIntervalTime(DfTypeUtil.toInteger(source.get("intervalTime")));<NEW_LINE>result.setMaxAccessCount(DfTypeUtil.toLong(source.get("maxAccessCount")));<NEW_LINE>result.setName(DfTypeUtil.toString(source.get("name")));<NEW_LINE>result.setNumOfThread(DfTypeUtil.toInteger(source.get("numOfThread")));<NEW_LINE>result.setPermissions(toStringArray(source.get("permissions")));<NEW_LINE>result.setSortOrder(DfTypeUtil.toInteger(source.get("sortOrder")));<NEW_LINE>result.setTimeToLive(DfTypeUtil.toInteger(source.get("timeToLive")));<NEW_LINE>result.setUpdatedBy(DfTypeUtil.toString(source.get("updatedBy")));<NEW_LINE>result.setUpdatedTime(DfTypeUtil.toLong(source.get("updatedTime")));<NEW_LINE>result.setUrls(DfTypeUtil.toString(source.get("urls")));<NEW_LINE>result.setUserAgent(DfTypeUtil.toString(source.get("userAgent")));<NEW_LINE>result.setVirtualHosts(toStringArray(<MASK><NEW_LINE>return updateEntity(source, result);<NEW_LINE>} catch (InstantiationException | IllegalAccessException e) {<NEW_LINE>final String msg = "Cannot create a new instance: " + entityType.getName();<NEW_LINE>throw new IllegalBehaviorStateException(msg, e);<NEW_LINE>}<NEW_LINE>}
|
source.get("virtualHosts")));
|
171,183
|
public static DateTime deserializeDateTime(final JsonReader reader) throws IOException {<NEW_LINE>final char[] tmp = reader.readSimpleQuote();<NEW_LINE>final int len = reader.getCurrentIndex() - reader.getTokenStart() - 1;<NEW_LINE>// TODO: non utc<NEW_LINE>if (len > 18 && len < 25 && tmp[len - 1] == 'Z' && tmp[4] == '-' && tmp[7] == '-' && (tmp[10] == 'T' || tmp[10] == 't' || tmp[10] == ' ') && tmp[13] == ':' && tmp[16] == ':') {<NEW_LINE>final int year = NumberConverter.read4(tmp, 0);<NEW_LINE>final int month = NumberConverter.read2(tmp, 5);<NEW_LINE>final int day = NumberConverter.read2(tmp, 8);<NEW_LINE>final int hour = NumberConverter.read2(tmp, 11);<NEW_LINE>final int min = NumberConverter.read2(tmp, 14);<NEW_LINE>final int sec = NumberConverter.read2(tmp, 17);<NEW_LINE>if (tmp[19] == '.') {<NEW_LINE>final int milis;<NEW_LINE>switch(len) {<NEW_LINE>case 22:<NEW_LINE>milis = 100 * (tmp[20] - 48);<NEW_LINE>break;<NEW_LINE>case 23:<NEW_LINE>milis = 100 * (tmp[20] - 48) + 10 * (tmp[21] - 48);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>milis = 100 * (tmp[20] - 48) + 10 * (tmp[21] - 48) + tmp[22] - 48;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>return new DateTime(year, month, day, hour, min, sec, milis, utcZone);<NEW_LINE>}<NEW_LINE>return new DateTime(year, month, day, hour, min, sec, 0, utcZone);<NEW_LINE>} else {<NEW_LINE>return dateTimeParser.parseDateTime(new String<MASK><NEW_LINE>}<NEW_LINE>}
|
(tmp, 0, len));
|
625,011
|
private void validateParams() {<NEW_LINE>if (_tableName == null || _tableName.isEmpty()) {<NEW_LINE>LOGGER.error("Table name is required and can not be empty");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>if (TableNameBuilder.isRealtimeTableResource(_tableName)) {<NEW_LINE><MASK><NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>_tableName = TableNameBuilder.OFFLINE.tableNameWithType(_tableName);<NEW_LINE>if (_zkHost.isEmpty() || _zkPath.isEmpty()) {<NEW_LINE>LOGGER.error("zkHost or zkPath should not be empty");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>if (_zkPath.startsWith("/")) {<NEW_LINE>_zkPath = _zkPath.substring(1);<NEW_LINE>}<NEW_LINE>String[] hostSplits = _zkHost.split("/");<NEW_LINE>String[] pathSplits = _zkPath.split("/");<NEW_LINE>if (hostSplits.length == 1 || (hostSplits.length == 2 && hostSplits[1].isEmpty())) {<NEW_LINE>_zkHost = hostSplits[0] + "/" + pathSplits[0];<NEW_LINE>_zkPath = Joiner.on("/").join(Arrays.copyOfRange(pathSplits, 1, pathSplits.length));<NEW_LINE>}<NEW_LINE>LOGGER.info("Using zkHost: {}, zkPath: {}", _zkHost, _zkPath);<NEW_LINE>}
|
LOGGER.error("This operation is not supported for realtime table. table: {}", _tableName);
|
1,412,334
|
protected void checkGroovyConstructorMap(final Expression receiver, final ClassNode receiverType, final MapExpression mapExpression) {<NEW_LINE>// workaround for map-style checks putting setter info on wrong AST nodes<NEW_LINE>typeCheckingContext.pushEnclosingBinaryExpression(null);<NEW_LINE>for (MapEntryExpression entryExpression : mapExpression.getMapEntryExpressions()) {<NEW_LINE>Expression keyExpression = entryExpression.getKeyExpression();<NEW_LINE>if (!(keyExpression instanceof ConstantExpression)) {<NEW_LINE>addStaticTypeError("Dynamic keys in map-style constructors are unsupported in static type checking", keyExpression);<NEW_LINE>} else {<NEW_LINE>String pName = keyExpression.getText();<NEW_LINE>AtomicReference<ClassNode> <MASK><NEW_LINE>if (!existsProperty(new PropertyExpression(varX("_", receiverType), pName), false, new PropertyLookupVisitor(pType))) {<NEW_LINE>addStaticTypeError("No such property: " + pName + " for class: " + receiverType.getText(), receiver);<NEW_LINE>} else {<NEW_LINE>MethodNode setter = receiverType.getSetterMethod("set" + MetaClassHelper.capitalize(pName), false);<NEW_LINE>ClassNode targetType = setter != null ? setter.getParameters()[0].getType() : pType.get();<NEW_LINE>Expression valueExpression = entryExpression.getValueExpression();<NEW_LINE>ClassNode valueType = getType(valueExpression);<NEW_LINE>ClassNode resultType = getResultType(targetType, ASSIGN, valueType, assignX(keyExpression, valueExpression, entryExpression));<NEW_LINE>if (!checkCompatibleAssignmentTypes(targetType, resultType, valueExpression) && !extension.handleIncompatibleAssignment(targetType, valueType, entryExpression)) {<NEW_LINE>addAssignmentError(targetType, valueType, entryExpression);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>typeCheckingContext.popEnclosingBinaryExpression();<NEW_LINE>}
|
pType = new AtomicReference<>();
|
489,282
|
public static DescribeScdnCcTopIpResponse unmarshall(DescribeScdnCcTopIpResponse describeScdnCcTopIpResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeScdnCcTopIpResponse.setRequestId(_ctx.stringValue("DescribeScdnCcTopIpResponse.RequestId"));<NEW_LINE>describeScdnCcTopIpResponse.setTotal(_ctx.stringValue("DescribeScdnCcTopIpResponse.Total"));<NEW_LINE>describeScdnCcTopIpResponse.setDomainName<MASK><NEW_LINE>List<AttackIpDatas> attackIpDataList = new ArrayList<AttackIpDatas>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeScdnCcTopIpResponse.AttackIpDataList.Length"); i++) {<NEW_LINE>AttackIpDatas attackIpDatas = new AttackIpDatas();<NEW_LINE>attackIpDatas.setIp(_ctx.stringValue("DescribeScdnCcTopIpResponse.AttackIpDataList[" + i + "].Ip"));<NEW_LINE>attackIpDatas.setAttackCount(_ctx.stringValue("DescribeScdnCcTopIpResponse.AttackIpDataList[" + i + "].AttackCount"));<NEW_LINE>attackIpDataList.add(attackIpDatas);<NEW_LINE>}<NEW_LINE>describeScdnCcTopIpResponse.setAttackIpDataList(attackIpDataList);<NEW_LINE>return describeScdnCcTopIpResponse;<NEW_LINE>}
|
(_ctx.stringValue("DescribeScdnCcTopIpResponse.DomainName"));
|
1,300,968
|
public Object decodeNumber(KrollDict args) {<NEW_LINE>if (!args.containsKey(TiC.PROPERTY_SOURCE)) {<NEW_LINE>throw new IllegalArgumentException("source was not specified for decodeNumber");<NEW_LINE>}<NEW_LINE>if (!args.containsKey(TiC.PROPERTY_TYPE)) {<NEW_LINE>throw new IllegalArgumentException("type was not specified for decodeNumber");<NEW_LINE>}<NEW_LINE>BufferProxy buffer = (BufferProxy) args.get(TiC.PROPERTY_SOURCE);<NEW_LINE>String type = (String) args.get(TiC.PROPERTY_TYPE);<NEW_LINE>int byteOrder = getByteOrder(args<MASK><NEW_LINE>int position = 0;<NEW_LINE>if (args.containsKey(TiC.PROPERTY_POSITION)) {<NEW_LINE>position = TiConvert.toInt(args, TiC.PROPERTY_POSITION);<NEW_LINE>}<NEW_LINE>byte[] src = buffer.getBuffer();<NEW_LINE>if (type.equals(TYPE_BYTE)) {<NEW_LINE>return src[position];<NEW_LINE>} else if (type.equals(TYPE_SHORT)) {<NEW_LINE>short s1 = (short) (src[position] & 0xFF);<NEW_LINE>short s2 = (short) (src[position + 1] & 0xFF);<NEW_LINE>switch(byteOrder) {<NEW_LINE>case BIG_ENDIAN:<NEW_LINE>return ((s1 << 8) + s2);<NEW_LINE>case LITTLE_ENDIAN:<NEW_LINE>return ((s2 << 8) + s1);<NEW_LINE>}<NEW_LINE>} else if (type.equals(TYPE_INT) || type.equals(TYPE_FLOAT)) {<NEW_LINE>int bits = 0;<NEW_LINE>int shiftBits = byteOrder == BIG_ENDIAN ? 24 : 0;<NEW_LINE>int step = byteOrder == BIG_ENDIAN ? -8 : 8;<NEW_LINE>for (int i = 0; i < 4; i++, shiftBits += step) {<NEW_LINE>int part = (int) (src[position + i] & 0xFF);<NEW_LINE>bits += (part << shiftBits);<NEW_LINE>}<NEW_LINE>if (type.equals(TYPE_FLOAT)) {<NEW_LINE>return Float.intBitsToFloat(bits);<NEW_LINE>}<NEW_LINE>return bits;<NEW_LINE>} else if (type.equals(TYPE_LONG) || type.equals(TYPE_DOUBLE)) {<NEW_LINE>long bits = 0;<NEW_LINE>int shiftBits = byteOrder == BIG_ENDIAN ? 56 : 0;<NEW_LINE>int step = byteOrder == BIG_ENDIAN ? -8 : 8;<NEW_LINE>for (int i = 0; i < 8; i++, shiftBits += step) {<NEW_LINE>long part = (long) (src[position + i] & 0xFF);<NEW_LINE>bits += (part << shiftBits);<NEW_LINE>}<NEW_LINE>if (type.equals(TYPE_DOUBLE)) {<NEW_LINE>return Double.longBitsToDouble(bits);<NEW_LINE>}<NEW_LINE>return bits;<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
|
.get(TiC.PROPERTY_BYTE_ORDER));
|
661,114
|
final StartCopyJobResult executeStartCopyJob(StartCopyJobRequest startCopyJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startCopyJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartCopyJobRequest> request = null;<NEW_LINE>Response<StartCopyJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartCopyJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startCopyJobRequest));<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, "Backup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartCopyJob");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartCopyJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartCopyJobResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
|
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
|
1,553,020
|
public static void reschedulePersistentAlarms(Context context) {<NEW_LINE>synchronized (persistentAlarmsLock) {<NEW_LINE>SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFERENCES_KEY, 0);<NEW_LINE>Set<String> persistentAlarms = prefs.getStringSet(PERSISTENT_ALARMS_SET_KEY, null);<NEW_LINE>// No alarms to reschedule.<NEW_LINE>if (persistentAlarms == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (String persistentAlarm : persistentAlarms) {<NEW_LINE>int requestCode = Integer.parseInt(persistentAlarm);<NEW_LINE>String key = getPersistentAlarmKey(requestCode);<NEW_LINE>String json = prefs.getString(key, null);<NEW_LINE>if (json == null) {<NEW_LINE>Log.e(<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>JSONObject alarm = new JSONObject(json);<NEW_LINE>boolean alarmClock = alarm.getBoolean("alarmClock");<NEW_LINE>boolean allowWhileIdle = alarm.getBoolean("allowWhileIdle");<NEW_LINE>boolean repeating = alarm.getBoolean("repeating");<NEW_LINE>boolean exact = alarm.getBoolean("exact");<NEW_LINE>boolean wakeup = alarm.getBoolean("wakeup");<NEW_LINE>long startMillis = alarm.getLong("startMillis");<NEW_LINE>long intervalMillis = alarm.getLong("intervalMillis");<NEW_LINE>long callbackHandle = alarm.getLong("callbackHandle");<NEW_LINE>scheduleAlarm(context, requestCode, alarmClock, allowWhileIdle, repeating, exact, wakeup, startMillis, intervalMillis, false, callbackHandle);<NEW_LINE>} catch (JSONException e) {<NEW_LINE>Log.e(TAG, "Data for alarm request code " + requestCode + " is invalid: " + json);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
TAG, "Data for alarm request code " + requestCode + " is invalid.");
|
1,785,484
|
public boolean saveDirtyEditor(final ExecutionEvent event) {<NEW_LINE>activeEditor = UIHelper.getActiveEditor();<NEW_LINE>if (activeEditor.isDirty()) {<NEW_LINE>getPrefs().setDefault(this.getClass() + ".dontBother", false);<NEW_LINE>if (getPrefs().getBoolean(this.getClass() + ".dontBother")) {<NEW_LINE>// TODO decouple from ui thread<NEW_LINE>// Use NullProgressMonitor instead of newly created monitor. The<NEW_LINE>// parent ProgressMonitorDialog would need to be properly<NEW_LINE>// initialized first.<NEW_LINE>// @see Bug #256 in general/bugzilla/index.html<NEW_LINE>//<NEW_LINE>// Generally though, saving a resource involves I/O which should be<NEW_LINE>// decoupled from the UI thread in the first place. Properly doing<NEW_LINE>// this, would be from inside a Job which provides a ProgressMonitor<NEW_LINE>activeEditor<MASK><NEW_LINE>} else {<NEW_LINE>final Shell shell = HandlerUtil.getActiveShell(event);<NEW_LINE>final MessageDialog dialog = new SaveMessageDialog(shell, getDialogTitle(), getDialogMessage());<NEW_LINE>int res = dialog.open();<NEW_LINE>if (res == 2) {<NEW_LINE>// 2 is index of button in string[] below<NEW_LINE>// User doesn't want to be warned about a dirty editor any longer.<NEW_LINE>// Remember it for this handler (this.getClass).<NEW_LINE>getPrefs().setValue(this.getClass() + ".dontBother", true);<NEW_LINE>res = MessageDialog.OK;<NEW_LINE>}<NEW_LINE>if (res == MessageDialog.OK || res == MessageDialog.CONFIRM) {<NEW_LINE>// TODO decouple from ui thread<NEW_LINE>// Use NullProgressMonitor instead of newly created monitor. The<NEW_LINE>// parent ProgressMonitorDialog would need to be properly<NEW_LINE>// initialized first.<NEW_LINE>// @see Bug #256 in general/bugzilla/index.html<NEW_LINE>//<NEW_LINE>// Generally though, saving a resource involves I/O which should be<NEW_LINE>// decoupled from the UI thread in the first place. Properly doing<NEW_LINE>// this, would be from inside a Job which provides a ProgressMonitor<NEW_LINE>activeEditor.doSave(new NullProgressMonitor());<NEW_LINE>} else {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
|
.doSave(new NullProgressMonitor());
|
332,934
|
/* GRECLIPSE edit<NEW_LINE>private static final Map<String, Set<String>> DEFAULT_IMPORT_CLASS_AND_PACKAGES_CACHE = new UnlimitedConcurrentCache<>();<NEW_LINE>static {<NEW_LINE>DEFAULT_IMPORT_CLASS_AND_PACKAGES_CACHE.putAll(VMPluginFactory.getPlugin().getDefaultImportClasses(DEFAULT_IMPORTS));<NEW_LINE>}<NEW_LINE>*/<NEW_LINE>protected boolean resolveFromDefaultImports(final ClassNode type, final String[] packagePrefixes) {<NEW_LINE>String typeName = type.getName();<NEW_LINE>for (String packagePrefix : packagePrefixes) {<NEW_LINE>// We limit the inner class lookups here by using ConstructedClassWithPackage.<NEW_LINE>// This way only the name will change, the packagePrefix will<NEW_LINE>// not be included in the lookup. The case where the<NEW_LINE>// packagePrefix is really a class is handled elsewhere.<NEW_LINE>// WARNING: This code does not expect a class that has a static<NEW_LINE>// inner class in DEFAULT_IMPORTS<NEW_LINE>ConstructedClassWithPackage tmp <MASK><NEW_LINE>// GRECLIPSE add<NEW_LINE>if (!resolutionFailed.contains(tmp.getName())) {<NEW_LINE>// GRECLIPSE end<NEW_LINE>if (resolve(tmp, false, false, false)) {<NEW_LINE>type.setRedirect(tmp.redirect());<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// GRECLIPSE add<NEW_LINE>resolutionFailed.add(tmp.getName());<NEW_LINE>}<NEW_LINE>// GRECLIPSE end<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
|
= new ConstructedClassWithPackage(packagePrefix, typeName);
|
1,637,044
|
public static GetProductDefineResponse unmarshall(GetProductDefineResponse getProductDefineResponse, UnmarshallerContext context) {<NEW_LINE>getProductDefineResponse.setRequestId(context.stringValue("GetProductDefineResponse.RequestId"));<NEW_LINE>getProductDefineResponse.setProductName(context.stringValue("GetProductDefineResponse.ProductName"));<NEW_LINE>getProductDefineResponse.setDataType(context.stringValue("GetProductDefineResponse.DataType"));<NEW_LINE>getProductDefineResponse.setSiteBid(context.stringValue("GetProductDefineResponse.siteBid"));<NEW_LINE>List<Product> productList = new ArrayList<Product>();<NEW_LINE>for (int i = 0; i < context.lengthValue("GetProductDefineResponse.ProductList.Length"); i++) {<NEW_LINE>Product product = new Product();<NEW_LINE>product.setProductName(context.stringValue("GetProductDefineResponse.ProductList[" + i + "].ProductName"));<NEW_LINE>List<Type> typeList <MASK><NEW_LINE>for (int j = 0; j < context.lengthValue("GetProductDefineResponse.ProductList[" + i + "].TypeList.Length"); j++) {<NEW_LINE>Type type = new Type();<NEW_LINE>type.setDataType(context.stringValue("GetProductDefineResponse.ProductList[" + i + "].TypeList[" + j + "].DataType"));<NEW_LINE>List<String> fields = new ArrayList<String>();<NEW_LINE>for (int k = 0; k < context.lengthValue("GetProductDefineResponse.ProductList[" + i + "].TypeList[" + j + "].Fields.Length"); k++) {<NEW_LINE>fields.add(context.stringValue("GetProductDefineResponse.ProductList[" + i + "].TypeList[" + j + "].Fields[" + k + "]"));<NEW_LINE>}<NEW_LINE>type.setFields(fields);<NEW_LINE>typeList.add(type);<NEW_LINE>}<NEW_LINE>product.setTypeList(typeList);<NEW_LINE>productList.add(product);<NEW_LINE>}<NEW_LINE>getProductDefineResponse.setProductList(productList);<NEW_LINE>return getProductDefineResponse;<NEW_LINE>}
|
= new ArrayList<Type>();
|
1,782,803
|
public static int levenshteinDistance(String o1, String o2, int prefix, int postfix) {<NEW_LINE>final int l1 = o1.length(), l2 = o2.length();<NEW_LINE>// Buffer, interleaved. Even and odd values are our rows.<NEW_LINE>int[] buf = new int[(l2 + 1 - (prefix + postfix)) << 1];<NEW_LINE>// Initial "row", on even positions<NEW_LINE>for (int j = 0; j < buf.length; j += 2) {<NEW_LINE>buf[j] = j >> 1;<NEW_LINE>}<NEW_LINE>// Interleaving offset<NEW_LINE>int inter = 1;<NEW_LINE>for (int i = prefix, e1 = l1 - postfix; i < e1; i++, inter ^= 1) {<NEW_LINE>final char chr = o1.charAt(i);<NEW_LINE>// First entry<NEW_LINE>buf[inter] = i + 1 - prefix;<NEW_LINE>for (int c = 2 + inter, p = 3 - inter, j = prefix; c < buf.length; c += 2, p += 2) {<NEW_LINE>buf[c] = min(buf[p] + 1, buf[c - 2] + 1, buf[p - 2] + ((chr == o2.charAt(j++)) ? 0 : 1));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return buf[buf.length - <MASK><NEW_LINE>}
|
2 + (inter ^ 1)];
|
596,781
|
public static Partition partition(int[] input, int begin, int end) {<NEW_LINE><MASK><NEW_LINE>int leftEqualKeysCount = 0, rightEqualKeysCount = 0;<NEW_LINE>int partitioningValue = input[end];<NEW_LINE>while (true) {<NEW_LINE>while (input[left] < partitioningValue) left++;<NEW_LINE>while (input[right] > partitioningValue) {<NEW_LINE>if (right == begin)<NEW_LINE>break;<NEW_LINE>right--;<NEW_LINE>}<NEW_LINE>if (left == right && input[left] == partitioningValue) {<NEW_LINE>swap(input, begin + leftEqualKeysCount, left);<NEW_LINE>leftEqualKeysCount++;<NEW_LINE>left++;<NEW_LINE>}<NEW_LINE>if (left >= right) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>swap(input, left, right);<NEW_LINE>if (input[left] == partitioningValue) {<NEW_LINE>swap(input, begin + leftEqualKeysCount, left);<NEW_LINE>leftEqualKeysCount++;<NEW_LINE>}<NEW_LINE>if (input[right] == partitioningValue) {<NEW_LINE>swap(input, right, end - rightEqualKeysCount);<NEW_LINE>rightEqualKeysCount++;<NEW_LINE>}<NEW_LINE>left++;<NEW_LINE>right--;<NEW_LINE>}<NEW_LINE>right = left - 1;<NEW_LINE>for (int k = begin; k < begin + leftEqualKeysCount; k++, right--) {<NEW_LINE>if (right >= begin + leftEqualKeysCount)<NEW_LINE>swap(input, k, right);<NEW_LINE>}<NEW_LINE>for (int k = end; k > end - rightEqualKeysCount; k--, left++) {<NEW_LINE>if (left <= end - rightEqualKeysCount)<NEW_LINE>swap(input, left, k);<NEW_LINE>}<NEW_LINE>return new Partition(right + 1, left - 1);<NEW_LINE>}
|
int left = begin, right = end;
|
1,276,651
|
public void printCXFSettings() {<NEW_LINE>String thisMethod = "printCXFSettings";<NEW_LINE>String indent = " ";<NEW_LINE>Log.info(thisClass, thisMethod, "CXF Test Settings: ");<NEW_LINE>Log.info(thisClass, thisMethod, indent + "testMethod: " + testMethod);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "clientType: " + clientType);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "portNumber: " + portNumber);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "securePort: " + securePort);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "id: " + id);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "pw: " + pw);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "serviceName: " + serviceName);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "servicePort: " + servicePort);<NEW_LINE>Log.info(thisClass, <MASK><NEW_LINE>Log.info(thisClass, thisMethod, indent + "replayTest: " + replayTest);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "managedClient: " + managedClient);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "clientWSDLFile: " + clientWSDLFile);<NEW_LINE>Log.info(thisClass, thisMethod, indent + "titleToCheck: " + titleToCheck);<NEW_LINE>}
|
thisMethod, indent + "sendMsg: " + sendMsg);
|
1,002,253
|
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see javax.websocket.Endpoint#onOpen(javax.websocket.Session, javax.websocket.EndpointConfig)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void onOpen(Session session, EndpointConfig config) {<NEW_LINE>if (onOpen != null) {<NEW_LINE>try {<NEW_LINE>Object[] args = new Object[onOpen.getMethod().getParameterTypes().length];<NEW_LINE>MethodData methodData = onOpen.getMethodData();<NEW_LINE>// check if method has optional Session parameter<NEW_LINE>int sessionIndex = methodData.getSessionIndex();<NEW_LINE>if (sessionIndex >= 0) {<NEW_LINE>args[sessionIndex] = session;<NEW_LINE>}<NEW_LINE>int configIndex = methodData.getEndpointConfigIndex();<NEW_LINE>if (configIndex >= 0) {<NEW_LINE>args[configIndex] = config;<NEW_LINE>}<NEW_LINE>if (shouldProcessPath) {<NEW_LINE>try {<NEW_LINE>// substitute values for @PathParam variables for this method.<NEW_LINE><MASK><NEW_LINE>} catch (DecodeException e) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>onOpen.getMethod().invoke(appInstance, args);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>// allow instrumented FFDC to be used here<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>// allow instrumented FFDC to be used here<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>// allow instrumented FFDC to be used here<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
onOpen.processPathParameters(this, args);
|
572,504
|
private void loadNode392() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks_OutputArguments, new QualifiedName(0, "OutputArguments"), new LocalizedText("en", "OutputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.Argument, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks_OutputArguments, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks_OutputArguments, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks_OutputArguments, Identifiers.HasProperty, Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks.expanded(), false));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=297</Identifier> </TypeId><Body><Argument><Name>FileHandle</Name><DataType><Identifier>i=7</Identifier> </DataType><ValueRank>-1</ValueRank><ArrayDimensions/> </Argument> </Body> </ExtensionObject> </ListOfExtensionObject>");<NEW_LINE><MASK><NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));<NEW_LINE>Object o = decoder.readVariantValue();<NEW_LINE>DataValue value = new DataValue(new Variant(o));<NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
|
String xml = sb.toString();
|
1,202,083
|
public AdminDisableUserResult adminDisableUser(AdminDisableUserRequest adminDisableUserRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(adminDisableUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AdminDisableUserRequest> request = null;<NEW_LINE>Response<AdminDisableUserResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AdminDisableUserRequestMarshaller().marshall(adminDisableUserRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<AdminDisableUserResult, JsonUnmarshallerContext> unmarshaller = new AdminDisableUserResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<AdminDisableUserResult> responseHandler = new JsonResponseHandler<AdminDisableUserResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
|
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
|
518,874
|
public static void unifyCharacterSets(Attributes... attrsList) {<NEW_LINE>if (attrsList.length == 0)<NEW_LINE>return;<NEW_LINE>SpecificCharacterSet utf8 = SpecificCharacterSet.valueOf("ISO_IR 192");<NEW_LINE>SpecificCharacterSet commonCS = <MASK><NEW_LINE>if (!commonCS.equals(utf8)) {<NEW_LINE>for (int i = 1; i < attrsList.length; i++) {<NEW_LINE>SpecificCharacterSet cs = attrsList[i].getSpecificCharacterSet();<NEW_LINE>if (!(cs.equals(commonCS) || cs.isASCII() && commonCS.containsASCII())) {<NEW_LINE>if (commonCS.isASCII() && cs.containsASCII())<NEW_LINE>commonCS = cs;<NEW_LINE>else {<NEW_LINE>commonCS = utf8;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Attributes attrs : attrsList) {<NEW_LINE>SpecificCharacterSet cs = attrs.getSpecificCharacterSet();<NEW_LINE>if (!(cs.equals(commonCS))) {<NEW_LINE>if (!cs.isASCII() || !commonCS.containsASCII())<NEW_LINE>attrs.decodeStringValuesUsingSpecificCharacterSet();<NEW_LINE>attrs.setString(Tag.SpecificCharacterSet, VR.CS, commonCS.toCodes());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
attrsList[0].getSpecificCharacterSet();
|
1,413,921
|
public static VariableMap fromBytes(byte[] bytes) throws ParseException {<NEW_LINE>String string = new String(bytes, UTF_8);<NEW_LINE>ImmutableMap.Builder<String, String> map = ImmutableMap.builder();<NEW_LINE>int startOfLine = 0;<NEW_LINE>while (startOfLine < string.length()) {<NEW_LINE>int newLine = <MASK><NEW_LINE>if (newLine == -1) {<NEW_LINE>newLine = string.length();<NEW_LINE>}<NEW_LINE>int endOfLine = newLine;<NEW_LINE>if (string.charAt(newLine - 1) == '\r') {<NEW_LINE>newLine--;<NEW_LINE>}<NEW_LINE>String line = string.substring(startOfLine, newLine);<NEW_LINE>// update index for next iteration<NEW_LINE>startOfLine = endOfLine + 1;<NEW_LINE>if (line.isEmpty()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int pos = findIndexOfUnescapedChar(line, SEPARATOR);<NEW_LINE>if (pos <= 0) {<NEW_LINE>throw new ParseException("Bad line: " + line, 0);<NEW_LINE>}<NEW_LINE>map.put(unescape(line.substring(0, pos)), pos == line.length() - 1 ? "" : unescape(line.substring(pos + 1)));<NEW_LINE>}<NEW_LINE>return new VariableMap(map.buildOrThrow());<NEW_LINE>}
|
string.indexOf('\n', startOfLine);
|
1,476,911
|
private void showBackupCompletedStatusDialog(final Folder backupDir, final Boolean settingsResult, final Boolean databaseResult, final boolean autobackup) {<NEW_LINE>String msg;<NEW_LINE>final String title;<NEW_LINE>if (settingsResult && databaseResult) {<NEW_LINE>title = activityContext.getString(R.string.init_backup_finished);<NEW_LINE>msg = activityContext.getString(R.string.backup_saved) + "\n" + backupDir.toUserDisplayableString();<NEW_LINE>} else {<NEW_LINE>title = activityContext.getString(R.string.init_backup_backup_failed);<NEW_LINE>if (databaseResult != null) {<NEW_LINE>msg = activityContext.getString(R.string.init_backup_success) + "\n" + backupDir.toUserDisplayableString() + "/" + DataStore.DB_FILE_NAME_BACKUP;<NEW_LINE>} else {<NEW_LINE>msg = activityContext.getString(R.string.init_backup_failed);<NEW_LINE>}<NEW_LINE>msg += "\n\n";<NEW_LINE>if (settingsResult != null) {<NEW_LINE>msg += activityContext.getString(R.string.settings_saved) + "\n" + backupDir.toUserDisplayableString() + "/" + SETTINGS_FILENAME;<NEW_LINE>} else {<NEW_LINE>msg += activityContext.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>final ArrayList<Uri> files = new ArrayList<>();<NEW_LINE>for (ContentStorage.FileInformation fi : ContentStorage.get().list(backupDir)) {<NEW_LINE>files.add(fi.uri);<NEW_LINE>}<NEW_LINE>if (autobackup) {<NEW_LINE>ActivityMixin.showShortToast(activityContext, msg);<NEW_LINE>} else {<NEW_LINE>SimpleDialog.of(activityContext).setTitle(TextParam.text(title)).setMessage(TextParam.text(msg)).setButtons(0, 0, R.string.cache_share_field).show(SimpleDialog.DO_NOTHING, null, (dialog, which) -> ShareUtils.shareMultipleFiles(activityContext, files, R.string.init_backup_backup));<NEW_LINE>}<NEW_LINE>}
|
getString(R.string.settings_savingerror);
|
530,872
|
public Pair<Boolean, byte[]> execute(byte[] data) {<NEW_LINE>byte[] h = new byte[32];<NEW_LINE>byte[] v = new byte[32];<NEW_LINE>byte[] r = new byte[32];<NEW_LINE>byte[] s = new byte[32];<NEW_LINE>DataWord out = null;<NEW_LINE>try {<NEW_LINE>System.arraycopy(data, 0, h, 0, 32);<NEW_LINE>System.arraycopy(data, 32, v, 0, 32);<NEW_LINE>System.arraycopy(data, 64, r, 0, 32);<NEW_LINE>int sLength = data.length < 128 ? data.length - 96 : 32;<NEW_LINE>System.arraycopy(data, 96, s, 0, sLength);<NEW_LINE>ECKey.ECDSASignature signature = ECKey.ECDSASignature.fromComponents(r, s, v[31]);<NEW_LINE>if (validateV(v) && signature.validateComponents()) {<NEW_LINE>out = DataWord.of(ECKey<MASK><NEW_LINE>}<NEW_LINE>} catch (Throwable any) {<NEW_LINE>}<NEW_LINE>if (out == null) {<NEW_LINE>return Pair.of(true, EMPTY_BYTE_ARRAY);<NEW_LINE>} else {<NEW_LINE>return Pair.of(true, out.getData());<NEW_LINE>}<NEW_LINE>}
|
.signatureToAddress(h, signature));
|
210,166
|
public static Set<Path> collectBinaries(IPath projectDir, Set<String> include, Set<String> exclude, IProgressMonitor monitor) throws CoreException {<NEW_LINE>Set<Path> binaries = new LinkedHashSet<>();<NEW_LINE>Map<IPath, Set<String>> includeByPrefix = groupGlobsByPrefix(projectDir, include);<NEW_LINE>Set<IPath> excludeResolved = exclude.stream().map(glob -> resolveGlobPath(projectDir, glob)).collect(Collectors.toSet());<NEW_LINE>for (IPath baseDir : includeByPrefix.keySet()) {<NEW_LINE>Path base = baseDir.toFile().toPath();<NEW_LINE>if (monitor.isCanceled()) {<NEW_LINE>return binaries;<NEW_LINE>}<NEW_LINE>if (Files.isRegularFile(base)) {<NEW_LINE>if (isBinary(base)) {<NEW_LINE>binaries.add(base);<NEW_LINE>}<NEW_LINE>// base is a regular file path<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (!Files.isDirectory(base)) {<NEW_LINE>// base does not exist<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Set<String> subInclude = includeByPrefix.get(baseDir);<NEW_LINE>Set<String> subExclude = excludeResolved.stream().map(glob -> glob.makeRelativeTo(baseDir).toOSString()).collect(Collectors.toSet());<NEW_LINE>DirectoryScanner scanner = new DirectoryScanner();<NEW_LINE>try {<NEW_LINE>scanner.setIncludes(subInclude.toArray(new String[subInclude.size()]));<NEW_LINE>scanner.setExcludes(subExclude.toArray(new String[subExclude.size()]));<NEW_LINE>scanner.addDefaultExcludes();<NEW_LINE>scanner.setBasedir(base.toFile());<NEW_LINE>scanner.scan();<NEW_LINE>} catch (IllegalStateException e) {<NEW_LINE>throw new CoreException(StatusFactory.newErrorStatus("Unable to collect binaries", e));<NEW_LINE>}<NEW_LINE>for (String result : scanner.getIncludedFiles()) {<NEW_LINE>Path <MASK><NEW_LINE>if (isBinary(file)) {<NEW_LINE>binaries.add(file);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return binaries;<NEW_LINE>}
|
file = base.resolve(result);
|
311,218
|
final CreateSessionResult executeCreateSession(CreateSessionRequest createSessionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateSessionRequest> request = null;<NEW_LINE>Response<CreateSessionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateSessionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createSessionRequest));<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, "Wisdom");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateSessionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateSessionResultJsonUnmarshaller());<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.OPERATION_NAME, "CreateSession");
|
421,040
|
ResourceStatisticsImpl build() {<NEW_LINE>ResourceStatisticsImpl cachedReference = cached;<NEW_LINE>if (cachedReference != null) {<NEW_LINE>return cachedReference;<NEW_LINE>}<NEW_LINE>final Map<ResourceMethod, ResourceMethodStatistics> <MASK><NEW_LINE>for (final ResourceMethodStatisticsImpl.Builder builder : methodsBuilders.keySet()) {<NEW_LINE>final ResourceMethodStatisticsImpl stats = builder.build();<NEW_LINE>resourceMethods.put(stats.getResourceMethod(), stats);<NEW_LINE>}<NEW_LINE>final ExecutionStatistics resourceStats = resourceExecutionStatisticsBuilder.get() == null ? ExecutionStatisticsImpl.EMPTY : resourceExecutionStatisticsBuilder.get().build();<NEW_LINE>final ExecutionStatistics requestStats = requestExecutionStatisticsBuilder.get() == null ? ExecutionStatisticsImpl.EMPTY : requestExecutionStatisticsBuilder.get().build();<NEW_LINE>final ResourceStatisticsImpl stats = new ResourceStatisticsImpl(resourceMethods, resourceStats, requestStats);<NEW_LINE>if (MonitoringUtils.isCacheable(requestStats)) {<NEW_LINE>cached = stats;<NEW_LINE>}<NEW_LINE>return stats;<NEW_LINE>}
|
resourceMethods = new HashMap<>();
|
635,508
|
public void read(org.apache.thrift.protocol.TProtocol prot, halt_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(3);<NEW_LINE>if (incoming.get(0)) {<NEW_LINE>struct.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo();<NEW_LINE>struct.tinfo.read(iprot);<NEW_LINE>struct.setTinfoIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(1)) {<NEW_LINE>struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();<NEW_LINE>struct.credentials.read(iprot);<NEW_LINE>struct.setCredentialsIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(2)) {<NEW_LINE>struct<MASK><NEW_LINE>struct.setLockIsSet(true);<NEW_LINE>}<NEW_LINE>}
|
.lock = iprot.readString();
|
522,076
|
public TemplateVersionsResponse unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TemplateVersionsResponse templateVersionsResponse = new TemplateVersionsResponse();<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 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("Item", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>templateVersionsResponse.setItem(new ListUnmarshaller<TemplateVersionResponse>(TemplateVersionResponseJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Message", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>templateVersionsResponse.setMessage(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>templateVersionsResponse.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("RequestID", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>templateVersionsResponse.setRequestID(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 templateVersionsResponse;<NEW_LINE>}
|
String currentParentElement = context.getCurrentParentElement();
|
285,983
|
ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {<NEW_LINE>logger.<MASK><NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>HotPictureInfoService hotPictureInfoService = new HotPictureInfoService();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW_LINE>if (wi.getTitle() == null || wi.getTitle().isEmpty()) {<NEW_LINE>throw new InfoTitleEmptyException();<NEW_LINE>}<NEW_LINE>if (wi.getUrl() == null || wi.getUrl().isEmpty()) {<NEW_LINE>throw new InfoUrlEmptyException();<NEW_LINE>}<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>HotPictureInfo hotPictureInfo = null;<NEW_LINE>if (StringUtils.isNotBlank(wi.getId())) {<NEW_LINE>hotPictureInfo = emc.find(wi.getId(), HotPictureInfo.class);<NEW_LINE>if (hotPictureInfo == null) {<NEW_LINE>hotPictureInfo = hotPictureInfoService.getByApplicationInfoId(emc, wi.getApplication(), wi.getInfoId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>emc.beginTransaction(HotPictureInfo.class);<NEW_LINE>if (hotPictureInfo != null) {<NEW_LINE>hotPictureInfo.setPicId(wi.getPicId());<NEW_LINE>hotPictureInfo.setSummary(wi.getSummary());<NEW_LINE>hotPictureInfo.setTitle(wi.getTitle());<NEW_LINE>hotPictureInfo.setUrl(wi.getUrl());<NEW_LINE>emc.check(hotPictureInfo, CheckPersistType.all);<NEW_LINE>} else {<NEW_LINE>hotPictureInfo = new HotPictureInfo();<NEW_LINE>hotPictureInfo.setInfoId(wi.getInfoId());<NEW_LINE>hotPictureInfo.setApplication(wi.getApplication());<NEW_LINE>hotPictureInfo.setCreator(wi.getCreator());<NEW_LINE>hotPictureInfo.setPicId(wi.getPicId());<NEW_LINE>hotPictureInfo.setSummary(wi.getSummary());<NEW_LINE>hotPictureInfo.setTitle(wi.getTitle());<NEW_LINE>hotPictureInfo.setUrl(wi.getUrl());<NEW_LINE>emc.persist(hotPictureInfo, CheckPersistType.all);<NEW_LINE>}<NEW_LINE>emc.commit();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>wo.setId(hotPictureInfo.getId());<NEW_LINE>result.setData(wo);<NEW_LINE>CacheManager.notify(HotPictureInfo.class);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
|
debug(effectivePerson.getDistinguishedName());
|
192,511
|
public void afterDelIpAddress(String vmNicUUid, String usedIpUuid) {<NEW_LINE>VmNicVO nic = Q.New(VmNicVO.class).eq(VmNicVO_.uuid, vmNicUUid).find();<NEW_LINE>if (nic.getUsedIpUuid() != null && !nic.getUsedIpUuid().equals(usedIpUuid)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>UsedIpVO temp = null;<NEW_LINE>List<UsedIpVO> refs = Q.New(UsedIpVO.class).eq(UsedIpVO_.ipVersion, IPv6Constants.IPv4).eq(UsedIpVO_.vmNicUuid, vmNicUUid).orderBy(UsedIpVO_.createDate, SimpleQuery.Od.ASC).list();<NEW_LINE>if (refs != null && !refs.isEmpty()) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>refs = Q.New(UsedIpVO.class).eq(UsedIpVO_.ipVersion, IPv6Constants.IPv6).eq(UsedIpVO_.vmNicUuid, vmNicUUid).orderBy(UsedIpVO_.createDate, SimpleQuery.Od.ASC).list();<NEW_LINE>if (refs != null && !refs.isEmpty()) {<NEW_LINE>temp = refs.get(0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (temp != null) {<NEW_LINE>SQL.New(VmNicVO.class).eq(VmNicVO_.uuid, vmNicUUid).set(VmNicVO_.ip, temp.getIp()).set(VmNicVO_.netmask, temp.getNetmask()).set(VmNicVO_.gateway, temp.getGateway()).set(VmNicVO_.usedIpUuid, temp.getUuid()).set(VmNicVO_.ipVersion, temp.getIpVersion()).set(VmNicVO_.l3NetworkUuid, temp.getL3NetworkUuid()).update();<NEW_LINE>}<NEW_LINE>}
|
temp = refs.get(0);
|
1,358,173
|
public static ActionRequestValidationException validateGeneratedSnapshotName(String snapshotPrefix, String snapshotName) {<NEW_LINE>ActionRequestValidationException err = new ActionRequestValidationException();<NEW_LINE>if (Strings.hasText(snapshotPrefix) == false) {<NEW_LINE>err.addValidationError("invalid snapshot name [" + snapshotPrefix + "]: cannot be empty");<NEW_LINE>}<NEW_LINE>if (snapshotName.contains("#")) {<NEW_LINE>err.addValidationError("invalid snapshot name [" + snapshotPrefix + "]: must not contain '#'");<NEW_LINE>}<NEW_LINE>if (snapshotName.charAt(0) == '_') {<NEW_LINE>err.addValidationError("invalid snapshot name [" + snapshotPrefix + "]: must not start with '_'");<NEW_LINE>}<NEW_LINE>if (snapshotName.toLowerCase(Locale.ROOT).equals(snapshotName) == false) {<NEW_LINE>err.addValidationError("invalid snapshot name [" + snapshotPrefix + "]: must be lowercase");<NEW_LINE>}<NEW_LINE>if (Strings.validFileName(snapshotName) == false) {<NEW_LINE>err.addValidationError("invalid snapshot name [" + <MASK><NEW_LINE>}<NEW_LINE>if (err.validationErrors().size() > 0) {<NEW_LINE>return err;<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
|
snapshotPrefix + "]: must not contain contain the following characters " + Strings.INVALID_FILENAME_CHARS);
|
493,249
|
private FxNode handleFxInclude(Attributes atts, String localName) {<NEW_LINE>String include = null;<NEW_LINE>String id = null;<NEW_LINE>for (int i = 0; i < atts.getLength(); i++) {<NEW_LINE>String uri = atts.getURI(i);<NEW_LINE>String attName = atts.getLocalName(i);<NEW_LINE>if (FX_ATTR_REFERENCE_SOURCE.equals(attName)) {<NEW_LINE>include = atts.getValue(i);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (isFxmlNamespaceUri(uri)) {<NEW_LINE>if (FX_ID.equals(attName)) {<NEW_LINE>id = atts.getValue(i);<NEW_LINE>} else {<NEW_LINE>String qName = atts.getQName(i);<NEW_LINE>addAttributeError(qName, "unexpected-include-attribute", ERR_unexpectedIncludeAttribute(qName), qName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (include == null) {<NEW_LINE>// must be some text, otherwise = error<NEW_LINE>addAttributeError(ContentLocator.<MASK><NEW_LINE>FxNode n = accessor.createErrorElement(localName);<NEW_LINE>initElement(n);<NEW_LINE>addError("invalid-fx-element", ERR_invalidFxElement(localName), localName);<NEW_LINE>return n;<NEW_LINE>}<NEW_LINE>// guide: fnames starting with slash are treated relative to the classpath<NEW_LINE>FxInclude fxInclude = accessor.createInclude(include, id);<NEW_LINE>return fxInclude;<NEW_LINE>}
|
ATTRIBUTE_TARGET, "missing-included-name", ERR_missingIncludeName());
|
1,220,745
|
public static GetMetaTableThemeLevelResponse unmarshall(GetMetaTableThemeLevelResponse getMetaTableThemeLevelResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMetaTableThemeLevelResponse.setRequestId(_ctx.stringValue("GetMetaTableThemeLevelResponse.RequestId"));<NEW_LINE>getMetaTableThemeLevelResponse.setErrorCode(_ctx.stringValue("GetMetaTableThemeLevelResponse.ErrorCode"));<NEW_LINE>getMetaTableThemeLevelResponse.setErrorMessage(_ctx.stringValue("GetMetaTableThemeLevelResponse.ErrorMessage"));<NEW_LINE>getMetaTableThemeLevelResponse.setHttpStatusCode(_ctx.integerValue("GetMetaTableThemeLevelResponse.HttpStatusCode"));<NEW_LINE>getMetaTableThemeLevelResponse.setSuccess(_ctx.booleanValue("GetMetaTableThemeLevelResponse.Success"));<NEW_LINE>Entity entity = new Entity();<NEW_LINE>List<ThemeItem> theme = new ArrayList<ThemeItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetMetaTableThemeLevelResponse.Entity.Theme.Length"); i++) {<NEW_LINE>ThemeItem themeItem = new ThemeItem();<NEW_LINE>themeItem.setThemeId(_ctx.longValue("GetMetaTableThemeLevelResponse.Entity.Theme[" + i + "].ThemeId"));<NEW_LINE>themeItem.setName(_ctx.stringValue<MASK><NEW_LINE>themeItem.setLevel(_ctx.integerValue("GetMetaTableThemeLevelResponse.Entity.Theme[" + i + "].Level"));<NEW_LINE>themeItem.setParentId(_ctx.longValue("GetMetaTableThemeLevelResponse.Entity.Theme[" + i + "].ParentId"));<NEW_LINE>theme.add(themeItem);<NEW_LINE>}<NEW_LINE>entity.setTheme(theme);<NEW_LINE>List<LevelItem> level = new ArrayList<LevelItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetMetaTableThemeLevelResponse.Entity.Level.Length"); i++) {<NEW_LINE>LevelItem levelItem = new LevelItem();<NEW_LINE>levelItem.setLevelId(_ctx.longValue("GetMetaTableThemeLevelResponse.Entity.Level[" + i + "].LevelId"));<NEW_LINE>levelItem.setName(_ctx.stringValue("GetMetaTableThemeLevelResponse.Entity.Level[" + i + "].Name"));<NEW_LINE>levelItem.setType(_ctx.integerValue("GetMetaTableThemeLevelResponse.Entity.Level[" + i + "].Type"));<NEW_LINE>levelItem.setDescription(_ctx.stringValue("GetMetaTableThemeLevelResponse.Entity.Level[" + i + "].Description"));<NEW_LINE>level.add(levelItem);<NEW_LINE>}<NEW_LINE>entity.setLevel(level);<NEW_LINE>getMetaTableThemeLevelResponse.setEntity(entity);<NEW_LINE>return getMetaTableThemeLevelResponse;<NEW_LINE>}
|
("GetMetaTableThemeLevelResponse.Entity.Theme[" + i + "].Name"));
|
1,328,523
|
private IProject createNewProject() {<NEW_LINE>if (newProject != null) {<NEW_LINE>return newProject;<NEW_LINE>}<NEW_LINE>// get a project handle<NEW_LINE>final <MASK><NEW_LINE>// get a project descriptor<NEW_LINE>URI location = null;<NEW_LINE>if (!mainPage.useDefaults()) {<NEW_LINE>location = mainPage.getLocationURI();<NEW_LINE>}<NEW_LINE>IProjectDescription description = ResourceUtil.getProjectDescription(mainPage.getLocationPath(), sample.getNatures(), ArrayUtil.NO_STRINGS);<NEW_LINE>description.setName(newProjectHandle.getName());<NEW_LINE>description.setLocationURI(location);<NEW_LINE>try {<NEW_LINE>if (sample.isRemote()) {<NEW_LINE>cloneFromGit(sample.getLocation(), newProjectHandle, description);<NEW_LINE>} else {<NEW_LINE>ProjectData projectData = mainPage.getProjectData();<NEW_LINE>// Initialize the basic project data<NEW_LINE>projectData.project = newProjectHandle;<NEW_LINE>projectData.directory = mainPage.getLocationURI().getRawPath();<NEW_LINE>// TODO: not used here. //$NON-NLS-1$<NEW_LINE>projectData.appURL = "http://";<NEW_LINE>doBasicCreateProject(newProjectHandle, description, sample, projectData);<NEW_LINE>doPostProjectCreation(newProjectHandle);<NEW_LINE>}<NEW_LINE>} catch (CoreException e) {<NEW_LINE>IdeLog.logError(SamplesUIPlugin.getDefault(), e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>newProject = newProjectHandle;<NEW_LINE>return newProject;<NEW_LINE>}
|
IProject newProjectHandle = mainPage.getProjectHandle();
|
1,061,422
|
// used by readAuthenticationHolders<NEW_LINE>private OAuth2Request readAuthorizationRequest(JsonReader reader) throws IOException {<NEW_LINE>Set<String> scope = new LinkedHashSet<>();<NEW_LINE>Set<String> <MASK><NEW_LINE>boolean approved = false;<NEW_LINE>Collection<GrantedAuthority> authorities = new HashSet<>();<NEW_LINE>Map<String, String> authorizationParameters = new HashMap<>();<NEW_LINE>Set<String> responseTypes = new HashSet<>();<NEW_LINE>String redirectUri = null;<NEW_LINE>String clientId = null;<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>switch(reader.peek()) {<NEW_LINE>case END_OBJECT:<NEW_LINE>continue;<NEW_LINE>case NAME:<NEW_LINE>String name = reader.nextName();<NEW_LINE>if (reader.peek() == JsonToken.NULL) {<NEW_LINE>reader.skipValue();<NEW_LINE>} else if (name.equals("authorizationParameters")) {<NEW_LINE>authorizationParameters = readMap(reader);<NEW_LINE>} else if (name.equals("approvalParameters")) {<NEW_LINE>reader.skipValue();<NEW_LINE>} else if (name.equals("clientId")) {<NEW_LINE>clientId = reader.nextString();<NEW_LINE>} else if (name.equals("scope")) {<NEW_LINE>scope = readSet(reader);<NEW_LINE>} else if (name.equals("resourceIds")) {<NEW_LINE>resourceIds = readSet(reader);<NEW_LINE>} else if (name.equals("authorities")) {<NEW_LINE>Set<String> authorityStrs = readSet(reader);<NEW_LINE>authorities = new HashSet<>();<NEW_LINE>for (String s : authorityStrs) {<NEW_LINE>GrantedAuthority ga = new SimpleGrantedAuthority(s);<NEW_LINE>authorities.add(ga);<NEW_LINE>}<NEW_LINE>} else if (name.equals("approved")) {<NEW_LINE>approved = reader.nextBoolean();<NEW_LINE>} else if (name.equals("denied")) {<NEW_LINE>if (approved == false) {<NEW_LINE>approved = !reader.nextBoolean();<NEW_LINE>}<NEW_LINE>} else if (name.equals("redirectUri")) {<NEW_LINE>redirectUri = reader.nextString();<NEW_LINE>} else if (name.equals("responseTypes")) {<NEW_LINE>responseTypes = readSet(reader);<NEW_LINE>} else {<NEW_LINE>reader.skipValue();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>logger.debug("Found unexpected entry");<NEW_LINE>reader.skipValue();<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>return new OAuth2Request(authorizationParameters, clientId, authorities, approved, scope, resourceIds, redirectUri, responseTypes, null);<NEW_LINE>}
|
resourceIds = new HashSet<>();
|
716,231
|
void updateDataFields(int why) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "updateDataFields");<NEW_LINE>super.updateDataFields(why);<NEW_LINE>if (jmsSystemPropertyMap != null && jmsSystemPropertyMap.isChanged()) {<NEW_LINE>getApi().setField(JsApiAccess.<MASK><NEW_LINE>getApi().setField(JsApiAccess.SYSTEMPROPERTY_VALUE, jmsSystemPropertyMap.getValueList());<NEW_LINE>// d317373.1<NEW_LINE>jmsSystemPropertyMap.setUnChanged();<NEW_LINE>}<NEW_LINE>if (jmsUserPropertyMap != null && jmsUserPropertyMap.isChanged()) {<NEW_LINE>getApi().setField(JsApiAccess.JMSPROPERTY_NAME, jmsUserPropertyMap.getKeyList());<NEW_LINE>getApi().setField(JsApiAccess.JMSPROPERTY_VALUE, jmsUserPropertyMap.getValueList());<NEW_LINE>// d317373.1<NEW_LINE>jmsUserPropertyMap.setUnChanged();<NEW_LINE>}<NEW_LINE>if (otherUserPropertyMap != null && otherUserPropertyMap.isChanged()) {<NEW_LINE>getApi().setField(JsApiAccess.OTHERPROPERTY_NAME, otherUserPropertyMap.getKeyList());<NEW_LINE>getApi().setField(JsApiAccess.OTHERPROPERTY_VALUE, otherUserPropertyMap.getValueList());<NEW_LINE>// d317373.1<NEW_LINE>otherUserPropertyMap.setUnChanged();<NEW_LINE>}<NEW_LINE>if (systemContextMap != null && systemContextMap.isChanged()) {<NEW_LINE>getApi().setField(JsApiAccess.SYSTEMCONTEXT_NAME, systemContextMap.getKeyList());<NEW_LINE>getApi().setField(JsApiAccess.SYSTEMCONTEXT_VALUE, systemContextMap.getValueList());<NEW_LINE>// d317373.1<NEW_LINE>systemContextMap.setUnChanged();<NEW_LINE>}<NEW_LINE>// Slightly different, as we need to set the variant back to empty if these properties have been cleared<NEW_LINE>if (mqMdSetPropertiesMap != null && mqMdSetPropertiesMap.isChanged()) {<NEW_LINE>if (mqMdSetPropertiesMap.size() > 0) {<NEW_LINE>getHdr2().setField(JsHdr2Access.MQMDPROPERTIES_MAP_NAME, mqMdSetPropertiesMap.getKeyList());<NEW_LINE>getHdr2().setField(JsHdr2Access.MQMDPROPERTIES_MAP_VALUE, mqMdSetPropertiesMap.getValueList());<NEW_LINE>} else {<NEW_LINE>getHdr2().setChoiceField(JsHdr2Access.MQMDPROPERTIES, JsHdr2Access.IS_MQMDPROPERTIES_EMPTY);<NEW_LINE>}<NEW_LINE>mqMdSetPropertiesMap.setUnChanged();<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(this, tc, "updateDataFields");<NEW_LINE>}
|
SYSTEMPROPERTY_NAME, jmsSystemPropertyMap.getKeyList());
|
1,346,226
|
protected UpdateStreamingDistributionResult updateStreamingDistribution(final Path container, final Distribution distribution) throws BackgroundException {<NEW_LINE>final URI origin = this.getOrigin(<MASK><NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug(String.format("Update %s distribution with origin %s", distribution, origin));<NEW_LINE>}<NEW_LINE>final AmazonCloudFront client = this.client(container);<NEW_LINE>final GetStreamingDistributionConfigResult response = client.getStreamingDistributionConfig(new GetStreamingDistributionConfigRequest(distribution.getId()));<NEW_LINE>final StreamingDistributionConfig config = response.getStreamingDistributionConfig().withEnabled(distribution.isEnabled()).withS3Origin(new S3Origin(origin.getHost(), StringUtils.EMPTY)).withAliases(new Aliases().withItems(distribution.getCNAMEs()).withQuantity(distribution.getCNAMEs().length));<NEW_LINE>if (distribution.isLogging()) {<NEW_LINE>// Make bucket name fully qualified<NEW_LINE>final String loggingTarget = ServiceUtils.generateS3HostnameForBucket(distribution.getLoggingContainer(), false, new S3Protocol().getDefaultHostname());<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug(String.format("Set logging target for %s to %s", distribution, loggingTarget));<NEW_LINE>}<NEW_LINE>config.setLogging(new StreamingLoggingConfig().withEnabled(distribution.isLogging()).withBucket(loggingTarget).withPrefix(new HostPreferences(session.getHost()).getProperty("cloudfront.logging.prefix")));<NEW_LINE>}<NEW_LINE>return client.updateStreamingDistribution(new UpdateStreamingDistributionRequest(config, distribution.getId(), response.getETag()));<NEW_LINE>}
|
container, distribution.getMethod());
|
1,070,297
|
public RexNode expand(RexCall call) {<NEW_LINE>assert call.getOperator() == SqlStdOperatorTable.FLOOR;<NEW_LINE>RexNode decValue = call.operands.get(0);<NEW_LINE>int scale = decValue.getType().getScale();<NEW_LINE>RexNode value = decodeValue(decValue);<NEW_LINE>final RelDataTypeSystem typeSystem = builder.getTypeFactory().getTypeSystem();<NEW_LINE>RexNode rewrite;<NEW_LINE>if (scale == 0) {<NEW_LINE>rewrite = decValue;<NEW_LINE>} else if (scale == typeSystem.getMaxNumericPrecision()) {<NEW_LINE>rewrite = makeCase(makeIsNegative(value), makeExactLiteral(-<MASK><NEW_LINE>} else {<NEW_LINE>RexNode round = makeExactLiteral(1 - powerOfTen(scale));<NEW_LINE>RexNode scaleFactor = makeScaleFactor(scale);<NEW_LINE>rewrite = makeCase(makeIsNegative(value), makeDivide(makePlus(value, round), scaleFactor), makeDivide(value, scaleFactor));<NEW_LINE>}<NEW_LINE>return encodeValue(rewrite, call.getType());<NEW_LINE>}
|
1), makeExactLiteral(0));
|
1,377,085
|
public FieldBinding addSyntheticFieldForEnumValues() {<NEW_LINE>if (!isPrototype())<NEW_LINE>throw new IllegalStateException();<NEW_LINE>if (this.synthetics == null)<NEW_LINE>this.synthetics = new HashMap[MAX_SYNTHETICS];<NEW_LINE>if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)<NEW_LINE>this.synthetics[SourceTypeBinding.FIELD_EMUL] = new HashMap(5);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>FieldBinding synthField = (FieldBinding) this.synthetics[SourceTypeBinding<MASK><NEW_LINE>if (synthField == null) {<NEW_LINE>synthField = new SyntheticFieldBinding(TypeConstants.SYNTHETIC_ENUM_VALUES, this.scope.createArrayType(this, 1), ClassFileConstants.AccPrivate | ClassFileConstants.AccStatic | ClassFileConstants.AccSynthetic | ClassFileConstants.AccFinal, this, Constant.NotAConstant, this.synthetics[SourceTypeBinding.FIELD_EMUL].size());<NEW_LINE>// $NON-NLS-1$<NEW_LINE>this.synthetics[SourceTypeBinding.FIELD_EMUL].put("enumConstantValues", synthField);<NEW_LINE>}<NEW_LINE>// ensure there is not already such a field defined by the user<NEW_LINE>// ensure there is not already such a field defined by the user<NEW_LINE>boolean needRecheck;<NEW_LINE>int index = 0;<NEW_LINE>do {<NEW_LINE>needRecheck = false;<NEW_LINE>FieldBinding existingField;<NEW_LINE>if ((existingField = getField(synthField.name, true)) != null) {<NEW_LINE>TypeDeclaration typeDecl = this.scope.referenceContext;<NEW_LINE>FieldDeclaration[] fieldDeclarations = typeDecl.fields;<NEW_LINE>int max = fieldDeclarations == null ? 0 : fieldDeclarations.length;<NEW_LINE>for (int i = 0; i < max; i++) {<NEW_LINE>FieldDeclaration fieldDecl = fieldDeclarations[i];<NEW_LINE>if (fieldDecl.binding == existingField) {<NEW_LINE>synthField.name = // $NON-NLS-1$<NEW_LINE>CharOperation.// $NON-NLS-1$<NEW_LINE>concat(// $NON-NLS-1$<NEW_LINE>TypeConstants.SYNTHETIC_ENUM_VALUES, ("_" + String.valueOf(index++)).toCharArray());<NEW_LINE>needRecheck = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} while (needRecheck);<NEW_LINE>return synthField;<NEW_LINE>}
|
.FIELD_EMUL].get("enumConstantValues");
|
1,592,647
|
protected List<HistoryJobEntity> createJobsWithHistoricalData(CommandContext commandContext, JobServiceConfiguration jobServiceConfiguration, List<ObjectNode> historyObjectNodes) {<NEW_LINE>AsyncHistorySession asyncHistorySession = commandContext.getSession(AsyncHistorySession.class);<NEW_LINE>if (jobServiceConfiguration.isAsyncHistoryJsonGroupingEnabled() && historyObjectNodes.size() >= jobServiceConfiguration.getAsyncHistoryJsonGroupingThreshold()) {<NEW_LINE>String jobType = getJobType(jobServiceConfiguration, true);<NEW_LINE>HistoryJobEntity jobEntity = createJob(commandContext, asyncHistorySession, jobServiceConfiguration, jobType);<NEW_LINE>ArrayNode arrayNode = jobServiceConfiguration.getObjectMapper().createArrayNode();<NEW_LINE>for (ObjectNode historyJsonNode : historyObjectNodes) {<NEW_LINE>arrayNode.add(historyJsonNode);<NEW_LINE>}<NEW_LINE>addJsonToJob(commandContext, jobServiceConfiguration, jobEntity, arrayNode, jobServiceConfiguration.isAsyncHistoryJsonGzipCompressionEnabled());<NEW_LINE>return Collections.singletonList(jobEntity);<NEW_LINE>} else {<NEW_LINE>List<HistoryJobEntity> historyJobEntities = new ArrayList<>(historyObjectNodes.size());<NEW_LINE>String jobType = getJobType(jobServiceConfiguration, false);<NEW_LINE>for (ObjectNode historyJsonNode : historyObjectNodes) {<NEW_LINE>HistoryJobEntity jobEntity = createJob(commandContext, asyncHistorySession, jobServiceConfiguration, jobType);<NEW_LINE>addJsonToJob(commandContext, <MASK><NEW_LINE>historyJobEntities.add(jobEntity);<NEW_LINE>}<NEW_LINE>return historyJobEntities;<NEW_LINE>}<NEW_LINE>}
|
jobServiceConfiguration, jobEntity, historyJsonNode, false);
|
1,825,810
|
public CreateSessionResponse decode(SerializationContext context, UaDecoder decoder) {<NEW_LINE>ResponseHeader responseHeader = (ResponseHeader) decoder.readStruct("ResponseHeader", ResponseHeader.TYPE_ID);<NEW_LINE>NodeId sessionId = decoder.readNodeId("SessionId");<NEW_LINE>NodeId authenticationToken = decoder.readNodeId("AuthenticationToken");<NEW_LINE>Double revisedSessionTimeout = decoder.readDouble("RevisedSessionTimeout");<NEW_LINE>ByteString serverNonce = decoder.readByteString("ServerNonce");<NEW_LINE>ByteString serverCertificate = decoder.readByteString("ServerCertificate");<NEW_LINE>EndpointDescription[] serverEndpoints = (EndpointDescription[]) decoder.readStructArray("ServerEndpoints", EndpointDescription.TYPE_ID);<NEW_LINE>SignedSoftwareCertificate[] serverSoftwareCertificates = (SignedSoftwareCertificate[]) decoder.readStructArray("ServerSoftwareCertificates", SignedSoftwareCertificate.TYPE_ID);<NEW_LINE>SignatureData serverSignature = (SignatureData) decoder.readStruct("ServerSignature", SignatureData.TYPE_ID);<NEW_LINE>UInteger <MASK><NEW_LINE>return new CreateSessionResponse(responseHeader, sessionId, authenticationToken, revisedSessionTimeout, serverNonce, serverCertificate, serverEndpoints, serverSoftwareCertificates, serverSignature, maxRequestMessageSize);<NEW_LINE>}
|
maxRequestMessageSize = decoder.readUInt32("MaxRequestMessageSize");
|
451,443
|
public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException {<NEW_LINE>logger.entering(getClass().getName(), "createOutput", new Object[] { namespaceUri, suggestedFileName });<NEW_LINE>Result r = <MASK><NEW_LINE>if (r != null) {<NEW_LINE>String sysId = r.getSystemId();<NEW_LINE>logger.finer("system ID = " + sysId);<NEW_LINE>if (sysId != null) {<NEW_LINE>// TODO: make sure that the system Id is absolute<NEW_LINE>// don't use java.net.URI, because it doesn't allow some characters (like SP)<NEW_LINE>// which can legally used as file names.<NEW_LINE>// but don't use java.net.URL either, because it doesn't allow a made-up URI<NEW_LINE>// like kohsuke://foo/bar/zot<NEW_LINE>} else<NEW_LINE>throw new AssertionError("system ID cannot be null");<NEW_LINE>}<NEW_LINE>logger.exiting(getClass().getName(), "createOutput", r);<NEW_LINE>return r;<NEW_LINE>}
|
resolver.createOutput(namespaceUri, suggestedFileName);
|
1,322,397
|
protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand2 = instruction.getOperands().get(1).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand3 = instruction.getOperands().get(2).getRootNode().getChildren().get(0);<NEW_LINE>final String targetRegister = (registerOperand1.getValue());<NEW_LINE>final String sourceRegister1 = (registerOperand2.getValue());<NEW_LINE>final String sourceRegister2 = (registerOperand3.getValue());<NEW_LINE>final OperandSize wd = OperandSize.WORD;<NEW_LINE>final OperandSize dw = OperandSize.DWORD;<NEW_LINE>final OperandSize qw = OperandSize.QWORD;<NEW_LINE>long baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>final String operand2 = environment.getNextVariableString();<NEW_LINE>final String tmpVar1 = environment.getNextVariableString();<NEW_LINE>final <MASK><NEW_LINE>final String trueTmpResult = environment.getNextVariableString();<NEW_LINE>final String tmpResult = environment.getNextVariableString();<NEW_LINE>if (instruction.getMnemonic().contains("B")) {<NEW_LINE>Helpers.signExtend(baseOffset, environment, instruction, instructions, dw, sourceRegister2, dw, operand2, 16);<NEW_LINE>} else {<NEW_LINE>instructions.add(ReilHelpers.createBsh(baseOffset++, dw, sourceRegister2, wd, String.valueOf(-16L), dw, tmpVar1));<NEW_LINE>Helpers.signExtend(baseOffset, environment, instruction, instructions, dw, tmpVar1, dw, operand2, 16);<NEW_LINE>}<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>Helpers.signedMul(baseOffset, environment, instruction, instructions, dw, sourceRegister1, dw, operand2, qw, tmpResult);<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>instructions.add(ReilHelpers.createBsh(baseOffset++, qw, trueTmpResult, wd, String.valueOf(-16L), qw, tmpVar2));<NEW_LINE>instructions.add(ReilHelpers.createAnd(baseOffset++, qw, tmpVar2, dw, String.valueOf(0xFFFFFFFFL), dw, targetRegister));<NEW_LINE>}
|
String tmpVar2 = environment.getNextVariableString();
|
588,175
|
public Node configureRoom(ConfigRoomRequest body, Long roomId, String xSdsDateFormat, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// verify the required parameter 'roomId' is set<NEW_LINE>if (roomId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'roomId' when calling configureRoom");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/nodes/rooms/{room_id}/config".replaceAll("\\{" + "room_id" + "\\}", apiClient.escapeString(roomId.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>if (xSdsDateFormat != null)<NEW_LINE>localVarHeaderParams.put("X-Sds-Date-Format", apiClient.parameterToString(xSdsDateFormat));<NEW_LINE>if (xSdsAuthToken != null)<NEW_LINE>localVarHeaderParams.put("X-Sds-Auth-Token", apiClient.parameterToString(xSdsAuthToken));<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<Node> localVarReturnType = new GenericType<Node>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
|
throw new ApiException(400, "Missing the required parameter 'body' when calling configureRoom");
|
653,047
|
private void checkChimaeraWingTeleport() {<NEW_LINE>Player player = mcMMOPlayer.getPlayer();<NEW_LINE>Location previousLocation = mcMMOPlayer.getTeleportCommenceLocation();<NEW_LINE>if (player.getLocation().distanceSquared(previousLocation) > 1.0 || !player.getInventory().containsAtLeast(ChimaeraWing.getChimaeraWing(0), 1)) {<NEW_LINE>player.sendMessage(LocaleLoader.getString("Teleport.Cancelled"));<NEW_LINE>mcMMOPlayer.setTeleportCommenceLocation(null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ItemStack inHand = player.getInventory().getItemInMainHand();<NEW_LINE>if (!ItemUtils.isChimaeraWing(inHand) || inHand.getAmount() < mcMMO.p.getGeneralConfig().getChimaeraUseCost()) {<NEW_LINE>player.sendMessage(LocaleLoader.getString("Skills.NeedMore", LocaleLoader.getString("Item.ChimaeraWing.Name")));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long recentlyHurt = mcMMOPlayer.getRecentlyHurt();<NEW_LINE>int hurtCooldown = mcMMO.p.getGeneralConfig().getChimaeraRecentlyHurtCooldown();<NEW_LINE>if (hurtCooldown > 0) {<NEW_LINE>int timeRemaining = SkillUtils.calculateTimeLeft(recentlyHurt * <MASK><NEW_LINE>if (timeRemaining > 0) {<NEW_LINE>player.sendMessage(LocaleLoader.getString("Item.Injured.Wait", timeRemaining));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ChimaeraWing.chimaeraExecuteTeleport();<NEW_LINE>}
|
Misc.TIME_CONVERSION_FACTOR, hurtCooldown, player);
|
511,201
|
public void shouldFailWhenConfigUpdateCannotBeMergedWithLatestRevision() throws Exception {<NEW_LINE>final String originalMd5 = goConfigDao.load().getMd5();<NEW_LINE>goConfigDao.updateConfig(configHelper.addPipelineCommand(originalMd5, "p1", "stage1", "build1"));<NEW_LINE>final String md5WhenPipelineIsAdded = goConfigDao<MASK><NEW_LINE>goConfigDao.updateConfig(configHelper.changeJobNameCommand(md5WhenPipelineIsAdded, "p1", "stage1", "build1", "new_build"));<NEW_LINE>try {<NEW_LINE>goConfigDao.updateConfig(new NoOverwriteUpdateConfigCommand() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String unmodifiedMd5() {<NEW_LINE>return md5WhenPipelineIsAdded;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public CruiseConfig update(CruiseConfig cruiseConfig) throws Exception {<NEW_LINE>deletePipeline(cruiseConfig);<NEW_LINE>return cruiseConfig;<NEW_LINE>}<NEW_LINE><NEW_LINE>private void deletePipeline(CruiseConfig cruiseConfig) {<NEW_LINE>cruiseConfig.getGroups().get(0).remove(0);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>fail("should not have allowed no-overwrite stale update");<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>assertThat(e.getMessage(), is(ConfigFileHasChangedException.CONFIG_CHANGED_PLEASE_REFRESH));<NEW_LINE>}<NEW_LINE>}
|
.load().getMd5();
|
800,550
|
protected Expression transformDeclarationExpression(final DeclarationExpression de) {<NEW_LINE>visitAnnotations(de);<NEW_LINE>Expression oldLeft = de.getLeftExpression();<NEW_LINE>checkingVariableTypeInDeclaration = true;<NEW_LINE>Expression left = transform(oldLeft);<NEW_LINE>checkingVariableTypeInDeclaration = false;<NEW_LINE>if (left instanceof ClassExpression) {<NEW_LINE>ClassExpression ce = (ClassExpression) left;<NEW_LINE>addError("you tried to assign a value to the class " + ce.getType(<MASK><NEW_LINE>return de;<NEW_LINE>}<NEW_LINE>Expression right = transform(de.getRightExpression());<NEW_LINE>if (right == de.getRightExpression()) {<NEW_LINE>fixDeclaringClass(de);<NEW_LINE>return de;<NEW_LINE>}<NEW_LINE>DeclarationExpression newDeclExpr = new DeclarationExpression(left, de.getOperation(), right);<NEW_LINE>newDeclExpr.setDeclaringClass(de.getDeclaringClass());<NEW_LINE>newDeclExpr.addAnnotations(de.getAnnotations());<NEW_LINE>newDeclExpr.copyNodeMetaData(de);<NEW_LINE>fixDeclaringClass(newDeclExpr);<NEW_LINE>return newDeclExpr;<NEW_LINE>}
|
).getName(), oldLeft);
|
1,321,810
|
public static LanguageVersionException check(Language language, int languageVersion, int languageMinorVersion) throws LanguageNotFoundException {<NEW_LINE><MASK><NEW_LINE>if (language.getVersion() > languageVersion) {<NEW_LINE>Language newLanguage = language;<NEW_LINE>Language oldLanguage = OldLanguageFactory.getOldLanguageFactory().getOldLanguage(languageID, languageVersion);<NEW_LINE>if (oldLanguage == null) {<NEW_LINE>// Assume minor version behavior - old language does not exist for current major version<NEW_LINE>Msg.error(LanguageVersionException.class, "Old language specification not found: " + languageID + " (Version " + languageVersion + ")");<NEW_LINE>return new LanguageVersionException();<NEW_LINE>}<NEW_LINE>// Ensure that we can upgrade the language<NEW_LINE>LanguageTranslator languageUpgradeTranslator = LanguageTranslatorFactory.getLanguageTranslatorFactory().getLanguageTranslator(oldLanguage, newLanguage);<NEW_LINE>if (languageUpgradeTranslator == null) {<NEW_LINE>// TODO: This is a bad situation!! Most language revisions should be supportable, if not we have no choice but to throw<NEW_LINE>// a LanguageNotFoundException until we figure out how to deal with nasty translations which require<NEW_LINE>// a complete redisassembly and possibly auto analysis.<NEW_LINE>throw new LanguageNotFoundException(language.getLanguageID(), "(Ver " + languageVersion + "." + languageMinorVersion + " -> " + newLanguage.getVersion() + "." + newLanguage.getMinorVersion() + ") language version translation not supported");<NEW_LINE>}<NEW_LINE>language = oldLanguage;<NEW_LINE>return new LanguageVersionException(oldLanguage, languageUpgradeTranslator);<NEW_LINE>} else if (language.getVersion() == languageVersion && languageMinorVersion < 0) {<NEW_LINE>// Minor version ignored - considered as match if major number matches<NEW_LINE>return null;<NEW_LINE>} else if (language.getVersion() == languageVersion && language.getMinorVersion() > languageMinorVersion) {<NEW_LINE>// Minor version change - translator not needed (languageUpgradeTranslator is null)<NEW_LINE>return new LanguageVersionException();<NEW_LINE>} else if (language.getMinorVersion() != languageMinorVersion || language.getVersion() != languageVersion) {<NEW_LINE>throw new LanguageNotFoundException(language.getLanguageID(), languageVersion, languageMinorVersion);<NEW_LINE>}<NEW_LINE>// language matches<NEW_LINE>return null;<NEW_LINE>}
|
LanguageID languageID = language.getLanguageID();
|
670,087
|
Object reconfigure(VirtualFrame frame, PTextIO self, Object encodingObj, Object errorsObj, Object newlineObj, Object lineBufferingObj, Object writeThroughObj, @Cached IONodes.ToStringNode toStringNode, @Cached PyObjectCallMethodObjArgs callMethod, @Cached PyObjectIsTrueNode isTrueNode, @Cached TextIOWrapperNodes.ChangeEncodingNode changeEncodingNode) {<NEW_LINE>String newline = null;<NEW_LINE>if (!isPNone(newlineObj)) {<NEW_LINE><MASK><NEW_LINE>validateNewline(newline, getRaiseNode());<NEW_LINE>}<NEW_LINE>boolean lineBuffering, writeThrough;<NEW_LINE>if (isPNone(lineBufferingObj)) {<NEW_LINE>lineBuffering = self.isLineBuffering();<NEW_LINE>} else {<NEW_LINE>lineBuffering = isTrueNode.execute(frame, lineBufferingObj);<NEW_LINE>}<NEW_LINE>if (isPNone(writeThroughObj)) {<NEW_LINE>writeThrough = self.isWriteThrough();<NEW_LINE>} else {<NEW_LINE>writeThrough = isTrueNode.execute(frame, writeThroughObj);<NEW_LINE>}<NEW_LINE>callMethod.execute(frame, self, FLUSH);<NEW_LINE>self.setB2cratio(0);<NEW_LINE>if (!isNoValue(newlineObj)) {<NEW_LINE>setNewline(self, newline);<NEW_LINE>}<NEW_LINE>changeEncodingNode.execute(frame, self, encodingObj, errorsObj, !isNoValue(newlineObj));<NEW_LINE>self.setLineBuffering(lineBuffering);<NEW_LINE>self.setWriteThrough(writeThrough);<NEW_LINE>return PNone.NONE;<NEW_LINE>}
|
newline = toStringNode.execute(newlineObj);
|
994,005
|
final DeleteSnapshotResult executeDeleteSnapshot(DeleteSnapshotRequest deleteSnapshotRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteSnapshotRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteSnapshotRequest> request = null;<NEW_LINE>Response<DeleteSnapshotResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteSnapshotRequest));<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, "FSx");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSnapshot");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteSnapshotResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteSnapshotResultJsonUnmarshaller());<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);
|
429,319
|
private MetaDataRegisterDTO buildMetaDataDTO(final ServiceFactoryBean serviceBean, final ShenyuSofaClient shenyuSofaClient, final Method method, final String superPath) {<NEW_LINE>String appName = this.appName;<NEW_LINE>String path = pathJoin(contextPath, <MASK><NEW_LINE>String desc = shenyuSofaClient.desc();<NEW_LINE>String serviceName = serviceBean.getInterfaceClass().getName();<NEW_LINE>String host = IpUtils.isCompleteHost(this.host) ? this.host : IpUtils.getHost(this.host);<NEW_LINE>int port = StringUtils.isBlank(this.port) ? -1 : Integer.parseInt(this.port);<NEW_LINE>String configRuleName = shenyuSofaClient.ruleName();<NEW_LINE>String ruleName = ("".equals(configRuleName)) ? path : configRuleName;<NEW_LINE>String methodName = method.getName();<NEW_LINE>String parameterTypes = Arrays.stream(method.getParameters()).map(parameter -> {<NEW_LINE>StringBuilder result = new StringBuilder(parameter.getType().getName());<NEW_LINE>final Type type = parameter.getParameterizedType();<NEW_LINE>if (type instanceof ParameterizedType) {<NEW_LINE>final Type[] actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();<NEW_LINE>for (Type actualTypeArgument : actualTypeArguments) {<NEW_LINE>result.append("#").append(actualTypeArgument.getTypeName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result.toString();<NEW_LINE>}).collect(Collectors.joining(","));<NEW_LINE>return MetaDataRegisterDTO.builder().appName(appName).serviceName(serviceName).methodName(methodName).contextPath(contextPath).host(host).port(port).path(path).ruleName(ruleName).pathDesc(desc).parameterTypes(parameterTypes).rpcType(RpcTypeEnum.SOFA.getName()).rpcExt(buildRpcExt(shenyuSofaClient)).enabled(shenyuSofaClient.enabled()).build();<NEW_LINE>}
|
superPath, shenyuSofaClient.path());
|
1,227,443
|
protected ValidationResult validateOperation(final Transform operation, final Schema schema) {<NEW_LINE><MASK><NEW_LINE>final Map<String, ?> entities = null != operation.getEntities() ? operation.getEntities() : new HashMap<>();<NEW_LINE>final Map<String, ?> edges = null != operation.getEdges() ? operation.getEdges() : new HashMap<>();<NEW_LINE>for (final Map.Entry<String, ?> entry : edges.entrySet()) {<NEW_LINE>result.add(validateEdge(entry, schema));<NEW_LINE>result.add(validateElementTransformer((ElementTransformer) entry.getValue()));<NEW_LINE>result.add(validateTransformPropertyClasses(schema.getEdge(entry.getKey()), (ElementTransformer) entry.getValue()));<NEW_LINE>}<NEW_LINE>for (final Map.Entry<String, ?> entry : entities.entrySet()) {<NEW_LINE>result.add(validateEntity(entry, schema));<NEW_LINE>result.add(validateElementTransformer((ElementTransformer) entry.getValue()));<NEW_LINE>result.add(validateTransformPropertyClasses(schema.getEntity(entry.getKey()), (ElementTransformer) entry.getValue()));<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
|
final ValidationResult result = new ValidationResult();
|
7,620
|
public List<TrainingJobInfo> list(TrainingJobType jobType, Boolean allNamespaces) throws ArenaException, IOException {<NEW_LINE>List<String> cmds = this.generateCommands("list");<NEW_LINE>if (!jobType.equals(TrainingJobType.AllTrainingJob) && !jobType.equals(TrainingJobType.UnknownTrainingJob)) {<NEW_LINE>cmds.add("--type=" + jobType.alias());<NEW_LINE>}<NEW_LINE>if (allNamespaces != null && allNamespaces) {<NEW_LINE>cmds.add("-A");<NEW_LINE>}<NEW_LINE>cmds.add("-o");<NEW_LINE>cmds.add("json");<NEW_LINE>String[] arenaCommand = cmds.toArray(new String[cmds.size()]);<NEW_LINE>try {<NEW_LINE>String <MASK><NEW_LINE>return JSONObject.parseArray(output, TrainingJobInfo.class);<NEW_LINE>} catch (ExitCodeException e) {<NEW_LINE>throw new ArenaException(ArenaErrorEnum.TRAINING_LIST, e.getMessage());<NEW_LINE>}<NEW_LINE>}
|
output = Command.execCommand(arenaCommand);
|
481,570
|
public // added by Gary - ghuang@cs.umass.edu<NEW_LINE>InstanceList sampleWithWeights(java.util.Random r, double[] weights) {<NEW_LINE>if (weights.length != size())<NEW_LINE>throw new IllegalArgumentException("length of weight vector must equal number of instances");<NEW_LINE>if (size() == 0)<NEW_LINE>return cloneEmpty();<NEW_LINE>@Var<NEW_LINE>double sumOfWeights = 0;<NEW_LINE>for (int i = 0; i < size(); i++) {<NEW_LINE>if (weights[i] < 0)<NEW_LINE>throw new IllegalArgumentException("weight vector must be non-negative");<NEW_LINE>sumOfWeights += weights[i];<NEW_LINE>}<NEW_LINE>if (sumOfWeights <= 0)<NEW_LINE>throw new IllegalArgumentException("weights must sum to positive value");<NEW_LINE>InstanceList newList = new InstanceList(getPipe(), size());<NEW_LINE>double[] probabilities = new double[size()];<NEW_LINE>@Var<NEW_LINE>double sumProbs = 0;<NEW_LINE>for (int i = 0; i < size(); i++) {<NEW_LINE>sumProbs += r.nextDouble();<NEW_LINE>probabilities[i] = sumProbs;<NEW_LINE>}<NEW_LINE>MatrixOps.timesEquals(probabilities, sumOfWeights / sumProbs);<NEW_LINE>// make sure rounding didn't mess things up<NEW_LINE>probabilities[size() - 1] = sumOfWeights;<NEW_LINE>// do sampling<NEW_LINE>@Var<NEW_LINE>int a = 0;<NEW_LINE>@Var<NEW_LINE>int b = 0;<NEW_LINE>sumProbs = 0;<NEW_LINE>while (a < size() && b < size()) {<NEW_LINE>sumProbs += weights[b];<NEW_LINE>while (a < size() && probabilities[a] <= sumProbs) {<NEW_LINE>newList.add(get(b));<NEW_LINE><MASK><NEW_LINE>a++;<NEW_LINE>}<NEW_LINE>b++;<NEW_LINE>}<NEW_LINE>return newList;<NEW_LINE>}
|
newList.setInstanceWeight(a, 1);
|
1,325,329
|
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>final Activity activity = getActivity();<NEW_LINE>ContextThemeWrapper context = ThemeChanger.getDialogThemeWrapper(activity);<NEW_LINE>ProgressDialog dialog = new ProgressDialog(context);<NEW_LINE>dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);<NEW_LINE>// We never use the builtin cancel method<NEW_LINE>dialog.setCancelable(false);<NEW_LINE>dialog.setCanceledOnTouchOutside(false);<NEW_LINE>String message = getArguments().getString(ARG_MESSAGE);<NEW_LINE>int style = getArguments().getInt(ARG_STYLE);<NEW_LINE>mCanCancel = getArguments().getBoolean(ARG_CANCELABLE);<NEW_LINE>dialog.setMessage(message);<NEW_LINE>dialog.setProgressStyle(style);<NEW_LINE>// If this is supposed to be cancelable, add our (custom) cancel mechanic<NEW_LINE>if (mCanCancel) {<NEW_LINE>// Just show the button, take care of the onClickListener afterwards (in onStart)<NEW_LINE>dialog.setButton(DialogInterface.BUTTON_NEGATIVE, activity.getString(R.string.progress_cancel)<MASK><NEW_LINE>}<NEW_LINE>// Disable the back button regardless<NEW_LINE>OnKeyListener keyListener = new OnKeyListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {<NEW_LINE>if (keyCode == KeyEvent.KEYCODE_BACK) {<NEW_LINE>if (mCanCancel) {<NEW_LINE>((ProgressDialog) dialog).getButton(DialogInterface.BUTTON_NEGATIVE).performClick();<NEW_LINE>}<NEW_LINE>// return true, indicating we handled this<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>dialog.setOnKeyListener(keyListener);<NEW_LINE>return dialog;<NEW_LINE>}
|
, (DialogInterface.OnClickListener) null);
|
455,329
|
private void commit() throws SolrServerException {<NEW_LINE>List<SolrInputDocument> clone;<NEW_LINE>synchronized (bufferLock) {<NEW_LINE>// Make a clone and release the lock, so that we don't<NEW_LINE>// hold other ingest threads<NEW_LINE>clone = buffer.stream().collect(toList());<NEW_LINE>buffer.clear();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>sendBufferedDocs(clone);<NEW_LINE>} catch (KeywordSearchModuleException ex) {<NEW_LINE>throw new SolrServerException(NbBundle.getMessage(this.getClass(), "Server.commit.exception.msg"), ex);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// commit and block<NEW_LINE>indexingClient.commit(true, true);<NEW_LINE>} catch (Exception e) {<NEW_LINE>// intentional "catch all" as Solr is known to throw all kinds of Runtime exceptions<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.WARNING, "Could not commit index. ", e);<NEW_LINE>throw new SolrServerException(NbBundle.getMessage(this.getClass<MASK><NEW_LINE>}<NEW_LINE>}
|
(), "Server.commit.exception.msg"), e);
|
219,017
|
final GetImagePipelineResult executeGetImagePipeline(GetImagePipelineRequest getImagePipelineRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getImagePipelineRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetImagePipelineRequest> request = null;<NEW_LINE>Response<GetImagePipelineResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetImagePipelineRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getImagePipelineRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "imagebuilder");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetImagePipeline");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetImagePipelineResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetImagePipelineResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
|
HandlerContextKey.SIGNING_REGION, getSigningRegion());
|
53,240
|
public TopicSubscriptionBuilder topicFilter(@NotNull final String topicFilter) {<NEW_LINE>Preconditions.checkNotNull(topicFilter, "Topic filter must never be null");<NEW_LINE>Preconditions.checkArgument(topicFilter.length() <= restrictionsConfig.maxTopicLength(), "Topic filter length must not exceed '" + restrictionsConfig.maxTopicLength() + "' characters, but has '" + topicFilter.length() + "' characters");<NEW_LINE>Preconditions.checkArgument(!(!mqttConfig.wildcardSubscriptionsEnabled() && Topics.<MASK><NEW_LINE>shared = Topics.isSharedSubscriptionTopic(topicFilter);<NEW_LINE>if (shared) {<NEW_LINE>Preconditions.checkArgument(mqttConfig.sharedSubscriptionsEnabled(), "Shared subscriptions not allowed");<NEW_LINE>final SharedSubscription sharedSubscription = Topics.checkForSharedSubscription(topicFilter);<NEW_LINE>if (sharedSubscription != null) {<NEW_LINE>Preconditions.checkArgument(!sharedSubscription.getTopicFilter().isEmpty(), "Shared subscription topic must not be empty");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!Topics.isValidToSubscribe(topicFilter)) {<NEW_LINE>throw new IllegalArgumentException("The topic filter (" + topicFilter + ") is invalid for subscriptions");<NEW_LINE>}<NEW_LINE>if (!PluginBuilderUtil.isValidUtf8String(topicFilter, securityConfigurationService.validateUTF8())) {<NEW_LINE>throw new IllegalArgumentException("The topic filter (" + topicFilter + ") is UTF-8 malformed");<NEW_LINE>}<NEW_LINE>this.topicFilter = topicFilter;<NEW_LINE>return this;<NEW_LINE>}
|
containsWildcard(topicFilter)), "Wildcard characters '+' or '#' are not allowed");
|
1,310,104
|
static Accessor accessorFor(Class<?> type, String accessorName, InheritingConfiguration configuration) {<NEW_LINE>PropertyInfoKey key = new PropertyInfoKey(type, accessorName, configuration);<NEW_LINE>if (!ACCESSOR_CACHE.containsKey(key) && !FIELD_CACHE.containsKey(key)) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Class<Object> uncheckedType = (Class<Object>) type;<NEW_LINE>for (Entry<String, Accessor> entry : TypeInfoRegistry.typeInfoFor(uncheckedType, configuration).getAccessors().entrySet()) {<NEW_LINE>if (entry.getValue().getMember() instanceof Method)<NEW_LINE>accessorFor(type, (Method) entry.getValue().getMember(), <MASK><NEW_LINE>else if (entry.getValue().getMember() instanceof Field)<NEW_LINE>fieldPropertyFor(type, (Field) entry.getValue().getMember(), configuration, entry.getKey());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (ACCESSOR_CACHE.containsKey(key))<NEW_LINE>return ACCESSOR_CACHE.get(key);<NEW_LINE>return FIELD_CACHE.get(key);<NEW_LINE>}
|
configuration, entry.getKey());
|
108,406
|
private void finishStorageMigration(long backendId, TFinishTaskRequest request) {<NEW_LINE>// check if task success<NEW_LINE>if (request.getTask_status().getStatus_code() != TStatusCode.OK) {<NEW_LINE>LOG.warn("tablet migrate failed. signature: {}, error msg: {}", request.getSignature(), request.getTask_status().error_msgs);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// check tablet info is set<NEW_LINE>if (!request.isSetFinish_tablet_infos() || request.getFinish_tablet_infos().isEmpty()) {<NEW_LINE>LOG.warn("migration finish tablet infos not set. signature: {}", request.getSignature());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TTabletInfo reportedTablet = request.getFinish_tablet_infos().get(0);<NEW_LINE>long tabletId = reportedTablet.getTablet_id();<NEW_LINE>TabletMeta tabletMeta = Catalog.getCurrentInvertedIndex().getTabletMeta(tabletId);<NEW_LINE>if (tabletMeta == null) {<NEW_LINE>LOG.warn("tablet meta does not exist. tablet id: {}", tabletId);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>Database db = Catalog.getCurrentCatalog().getDb(dbId);<NEW_LINE>if (db == null) {<NEW_LINE>LOG.warn("db does not exist. db id: {}", dbId);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>db.writeLock();<NEW_LINE>try {<NEW_LINE>// local migration just set path hash<NEW_LINE>Replica replica = Catalog.getCurrentInvertedIndex().getReplica(tabletId, backendId);<NEW_LINE>Preconditions.checkArgument(reportedTablet.isSetPath_hash());<NEW_LINE>replica.setPathHash(reportedTablet.getPath_hash());<NEW_LINE>} finally {<NEW_LINE>db.writeUnlock();<NEW_LINE>}<NEW_LINE>}
|
long dbId = tabletMeta.getDbId();
|
337,419
|
private TypeDefPatch updateSupportedDiscoveryRelationship() {<NEW_LINE>final String typeName = "SupportedDiscoveryService";<NEW_LINE>TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName);<NEW_LINE>typeDefPatch.setUpdatedBy(originatorName);<NEW_LINE>typeDefPatch.setUpdateTime(creationDate);<NEW_LINE>List<TypeDefAttribute> <MASK><NEW_LINE>TypeDefAttribute property;<NEW_LINE>final String attribute1Name = "assetTypes";<NEW_LINE>final String attribute1Description = "Deprecated property.";<NEW_LINE>final String attribute1DescriptionGUID = null;<NEW_LINE>final String attribute2Name = "discoveryRequestTypes";<NEW_LINE>final String attribute2Description = "Types of discovery request that links to the discovery service.";<NEW_LINE>final String attribute2DescriptionGUID = null;<NEW_LINE>final String attribute3Name = "defaultAnalysisParameters";<NEW_LINE>final String attribute3Description = "Map of parameter name to value that is passed to the discovery service by default.";<NEW_LINE>final String attribute3DescriptionGUID = null;<NEW_LINE>property = archiveHelper.getArrayStringTypeDefAttribute(attribute1Name, attribute1Description, attribute1DescriptionGUID);<NEW_LINE>property.setReplacedByAttribute(attribute2Name);<NEW_LINE>property.setAttributeStatus(TypeDefAttributeStatus.DEPRECATED_ATTRIBUTE);<NEW_LINE>properties.add(property);<NEW_LINE>property = archiveHelper.getArrayStringTypeDefAttribute(attribute2Name, attribute2Description, attribute2DescriptionGUID);<NEW_LINE>properties.add(property);<NEW_LINE>property = archiveHelper.getMapStringStringTypeDefAttribute(attribute3Name, attribute3Description, attribute3DescriptionGUID);<NEW_LINE>properties.add(property);<NEW_LINE>typeDefPatch.setPropertyDefinitions(properties);<NEW_LINE>return typeDefPatch;<NEW_LINE>}
|
properties = new ArrayList<>();
|
123,949
|
public static Template<?> createTemplate(Context context, MethodTree decl) {<NEW_LINE>MethodSymbol declSym = ASTHelpers.getSymbol(decl);<NEW_LINE>ImmutableClassToInstanceMap<Annotation> annotations = UTemplater.annotationMap(declSym);<NEW_LINE>ImmutableMap<String, VarSymbol> freeExpressionVars = freeExpressionVariables(decl);<NEW_LINE>Context subContext = new SubContext(context);<NEW_LINE>UTemplater templater = new UTemplater(freeExpressionVars, subContext);<NEW_LINE>ImmutableMap<String, UType> expressionVarTypes = ImmutableMap.copyOf(Maps.transformValues(freeExpressionVars, (VarSymbol sym) -> templater.template(sym.type)));<NEW_LINE>UType genericType = templater.template(declSym.type);<NEW_LINE>ImmutableList<UTypeVar> typeParameters;<NEW_LINE>UMethodType methodType;<NEW_LINE>if (genericType instanceof UForAll) {<NEW_LINE>UForAll forAllType = (UForAll) genericType;<NEW_LINE>typeParameters = forAllType.getTypeVars();<NEW_LINE>methodType = (UMethodType) forAllType.getQuantifiedType();<NEW_LINE>} else if (genericType instanceof UMethodType) {<NEW_LINE>typeParameters = ImmutableList.of();<NEW_LINE>methodType = (UMethodType) genericType;<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Expected genericType to be either a ForAll or a UMethodType, but was " + genericType);<NEW_LINE>}<NEW_LINE>List<? extends StatementTree> bodyStatements = decl<MASK><NEW_LINE>if (bodyStatements.size() == 1 && Iterables.getOnlyElement(bodyStatements).getKind() == Kind.RETURN && context.get(REQUIRE_BLOCK_KEY) == null) {<NEW_LINE>ExpressionTree expression = ((ReturnTree) Iterables.getOnlyElement(bodyStatements)).getExpression();<NEW_LINE>return ExpressionTemplate.create(annotations, typeParameters, expressionVarTypes, templater.template(expression), methodType.getReturnType());<NEW_LINE>} else {<NEW_LINE>List<UStatement> templateStatements = new ArrayList<>();<NEW_LINE>for (StatementTree statement : bodyStatements) {<NEW_LINE>templateStatements.add(templater.template(statement));<NEW_LINE>}<NEW_LINE>return BlockTemplate.create(annotations, typeParameters, expressionVarTypes, templateStatements);<NEW_LINE>}<NEW_LINE>}
|
.getBody().getStatements();
|
1,638,469
|
public void openTorrent(String fileName, String save_path) {<NEW_LINE>String uc_filename = fileName.toUpperCase(Locale.US);<NEW_LINE>boolean is_remote = uc_filename.startsWith("HTTP://") || uc_filename.startsWith("HTTPS://") || uc_filename.startsWith("MAGNET:");<NEW_LINE>if (console != null) {<NEW_LINE>// System.out.println("NOT NULL CONSOLE. CAN PASS STRAIGHT TO IT!");<NEW_LINE>if (is_remote) {<NEW_LINE>console.out.println("Downloading torrent from url: " + fileName);<NEW_LINE>if (save_path == null) {<NEW_LINE>console.downloadRemoteTorrent(fileName);<NEW_LINE>} else {<NEW_LINE>console.downloadRemoteTorrent(fileName, save_path);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>console.out.println("Open Torrent " + fileName);<NEW_LINE>if (save_path == null) {<NEW_LINE>console.downloadTorrent(fileName);<NEW_LINE>} else {<NEW_LINE>console.downloadTorrent(fileName, save_path);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>// System.out.println("NULL CONSOLE");<NEW_LINE>}<NEW_LINE>if (is_remote) {<NEW_LINE>if (console != null) {<NEW_LINE>console.out.println("Downloading torrent from url: " + fileName);<NEW_LINE>}<NEW_LINE>if (save_path == null) {<NEW_LINE>TorrentDownloaderFactory.downloadManaged(fileName);<NEW_LINE>} else {<NEW_LINE>TorrentDownloaderFactory.downloadToLocationManaged(fileName, save_path);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (!TorrentUtils.isTorrentFile(fileName)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>System.err.println(fileName + " doesn't seem to be a torrent file. Not added.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.err.println("Something is wrong with " + fileName + ". Not added. (Reason: " + <MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (core.getGlobalManager() != null) {<NEW_LINE>try {<NEW_LINE>String downloadDir = save_path != null ? save_path : COConfigurationManager.getDirectoryParameter("Default save path");<NEW_LINE>if (console != null) {<NEW_LINE>console.out.println("Adding torrent: " + fileName + " and saving to " + downloadDir);<NEW_LINE>}<NEW_LINE>core.getGlobalManager().addDownloadManager(fileName, downloadDir);<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.err.println("The torrent " + fileName + " could not be added. " + e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
e.getMessage() + ")");
|
1,592,433
|
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Script script = emc.find(id, Script.class);<NEW_LINE>if (null == script) {<NEW_LINE>throw new ScriptNotExistedException(id);<NEW_LINE>}<NEW_LINE>Portal portal = emc.find(script.getPortal(), Portal.class);<NEW_LINE>if (null == portal) {<NEW_LINE>throw new PortalNotExistedException(script.getPortal());<NEW_LINE>}<NEW_LINE>if (!business.editable(effectivePerson, portal)) {<NEW_LINE>throw new InsufficientPermissionException(effectivePerson.getDistinguishedName());<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>this.checkDepended(business, script);<NEW_LINE>emc.remove(script, CheckRemoveType.all);<NEW_LINE>emc.commit();<NEW_LINE>CacheManager.notify(Script.class);<NEW_LINE>Wo wo = new Wo();<NEW_LINE>wo.setValue(true);<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
|
emc.beginTransaction(Script.class);
|
1,281,325
|
static Imported parseSettings(InputStream inputStream, boolean globalSettings, List<String> accountUuids, boolean overview) throws SettingsImportExportException {<NEW_LINE>if (!overview && accountUuids == null) {<NEW_LINE>throw new IllegalArgumentException("Argument 'accountUuids' must not be null.");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>// factory.setNamespaceAware(true);<NEW_LINE>XmlPullParser xpp = factory.newPullParser();<NEW_LINE>InputStreamReader reader = new InputStreamReader(inputStream);<NEW_LINE>xpp.setInput(reader);<NEW_LINE>Imported imported = null;<NEW_LINE>int eventType = xpp.getEventType();<NEW_LINE>while (eventType != XmlPullParser.END_DOCUMENT) {<NEW_LINE>if (eventType == XmlPullParser.START_TAG) {<NEW_LINE>if (SettingsExporter.ROOT_ELEMENT.equals(xpp.getName())) {<NEW_LINE>imported = parseRoot(xpp, globalSettings, accountUuids, overview);<NEW_LINE>} else {<NEW_LINE>Timber.w("Unexpected start tag: %s", xpp.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>eventType = xpp.next();<NEW_LINE>}<NEW_LINE>if (imported == null || (overview && imported.globalSettings == null && imported.accounts == null)) {<NEW_LINE>throw new SettingsImportExportException("Invalid import data");<NEW_LINE>}<NEW_LINE>return imported;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SettingsImportExportException(e);<NEW_LINE>}<NEW_LINE>}
|
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
|
199,140
|
public void generateData(T data, JsonObject jsonObject) {<NEW_LINE>String caption = getItemCaptionGenerator().apply(data);<NEW_LINE>if (caption != null) {<NEW_LINE>jsonObject.put(ListingJsonConstants.JSONKEY_ITEM_VALUE, caption);<NEW_LINE>} else {<NEW_LINE>jsonObject.put(ListingJsonConstants.JSONKEY_ITEM_VALUE, "");<NEW_LINE>}<NEW_LINE>String description = getItemDescriptionGenerator().apply(data);<NEW_LINE>if (description != null) {<NEW_LINE>jsonObject.put(ListingJsonConstants.JSONKEY_ITEM_DESCRIPTION, description);<NEW_LINE>}<NEW_LINE>Resource icon = <MASK><NEW_LINE>if (icon != null) {<NEW_LINE>String iconUrl = ResourceReference.create(icon, RadioButtonGroup.this, null).getURL();<NEW_LINE>jsonObject.put(ListingJsonConstants.JSONKEY_ITEM_ICON, iconUrl);<NEW_LINE>}<NEW_LINE>if (!itemEnabledProvider.test(data)) {<NEW_LINE>jsonObject.put(ListingJsonConstants.JSONKEY_ITEM_DISABLED, true);<NEW_LINE>}<NEW_LINE>if (isSelected(data)) {<NEW_LINE>jsonObject.put(ListingJsonConstants.JSONKEY_ITEM_SELECTED, true);<NEW_LINE>}<NEW_LINE>}
|
getItemIconGenerator().apply(data);
|
615,693
|
public static <T extends ImageGray<T>> void average(Planar<T> input, T output, int startBand, int lastBand) {<NEW_LINE>if (GrayU8.class == input.getBandType()) {<NEW_LINE>ImageBandMath.average((Planar<GrayU8>) input, (GrayU8) output, startBand, lastBand);<NEW_LINE>} else if (GrayU16.class == input.getBandType()) {<NEW_LINE>ImageBandMath.average((Planar<GrayU16>) input, (GrayU16) output, startBand, lastBand);<NEW_LINE>} else if (GrayS16.class == input.getBandType()) {<NEW_LINE>ImageBandMath.average((Planar<GrayS16>) input, (GrayS16) output, startBand, lastBand);<NEW_LINE>} else if (GrayS32.class == input.getBandType()) {<NEW_LINE>ImageBandMath.average((Planar<GrayS32>) input, (GrayS32) output, startBand, lastBand);<NEW_LINE>} else if (GrayS64.class == input.getBandType()) {<NEW_LINE>ImageBandMath.average((Planar<GrayS64>) input, (GrayS64) output, startBand, lastBand);<NEW_LINE>} else if (GrayF32.class == input.getBandType()) {<NEW_LINE>ImageBandMath.average((Planar<GrayF32>) input, (<MASK><NEW_LINE>} else if (GrayF64.class == input.getBandType()) {<NEW_LINE>ImageBandMath.average((Planar<GrayF64>) input, (GrayF64) output, startBand, lastBand);<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Unknown image Type: " + input.getBandType().getSimpleName());<NEW_LINE>}<NEW_LINE>}
|
GrayF32) output, startBand, lastBand);
|
1,708,219
|
public List<RelRoleMember> updateMembers(Long id, List<Long> memberIds, User user) throws ServerException, UnAuthorizedException, NotFoundException {<NEW_LINE><MASK><NEW_LINE>List<User> users = userMapper.getByIds(memberIds);<NEW_LINE>if (CollectionUtils.isEmpty(users)) {<NEW_LINE>throw new ServerException("Members are not found");<NEW_LINE>}<NEW_LINE>List<Long> userIds = users.stream().map(u -> u.getId()).collect(Collectors.toList());<NEW_LINE>List<Long> members = relRoleUserMapper.getUserIdsByRoleId(id);<NEW_LINE>List<Long> deleteIds = members.stream().filter(mId -> !userIds.contains(mId)).collect(Collectors.toList());<NEW_LINE>List<RelRoleUser> collect = userIds.stream().map(uId -> new RelRoleUser(uId, id)).collect(Collectors.toList());<NEW_LINE>if (!CollectionUtils.isEmpty(deleteIds)) {<NEW_LINE>relRoleUserMapper.deleteByRoleIdAndMemberIds(id, deleteIds);<NEW_LINE>}<NEW_LINE>relRoleUserMapper.insertBatch(collect);<NEW_LINE>optLogger.info("Replace role({}) member by user({})", id, user.getId());<NEW_LINE>return relRoleUserMapper.getMembersByRoleId(id);<NEW_LINE>}
|
getRole(id, user, true);
|
121,685
|
public void browseButtonPressed() {<NEW_LINE>Text textControl = getHandler().getJavaTextControl();<NEW_LINE>String pattern = textControl != null && !textControl.isDisposed() ? textControl.getText() : null;<NEW_LINE>Shell shell = getHandler().getShell();<NEW_LINE>int javaSearchType = adaptToJavaSearchType(<MASK><NEW_LINE>if (javaSearchType == -1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>IJavaElement[] elements = new IJavaElement[] { getJavaProject() };<NEW_LINE>IJavaSearchScope scope = SearchEngine.createJavaSearchScope(elements);<NEW_LINE>FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(shell, false, null, scope, javaSearchType);<NEW_LINE>dialog.setTitle(getJavaParameterDescriptor().getName());<NEW_LINE>dialog.setMessage(TITLE);<NEW_LINE>dialog.setInitialPattern(pattern);<NEW_LINE>if (dialog.open() == Window.OK) {<NEW_LINE>IType type = (IType) dialog.getFirstResult();<NEW_LINE>if (type != null) {<NEW_LINE>String qualifiedName = type.getFullyQualifiedName();<NEW_LINE>setValue(qualifiedName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
getJavaParameterDescriptor().getJavaElementType());
|
387,880
|
public boolean onItemClick(EasyRecyclerView parent, View view, int position, long id) {<NEW_LINE>if (null == mHelper || null == mRecyclerView) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>GalleryInfo gi = mHelper.getDataAtEx(position);<NEW_LINE>if (gi == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Bundle args = new Bundle();<NEW_LINE>args.putString(GalleryDetailScene.KEY_ACTION, GalleryDetailScene.ACTION_GALLERY_INFO);<NEW_LINE>args.putParcelable(GalleryDetailScene.KEY_GALLERY_INFO, gi);<NEW_LINE>Announcer announcer = new Announcer(GalleryDetailScene<MASK><NEW_LINE>View thumb;<NEW_LINE>if (null != (thumb = view.findViewById(R.id.thumb))) {<NEW_LINE>announcer.setTranHelper(new EnterGalleryDetailTransaction(thumb));<NEW_LINE>}<NEW_LINE>startScene(announcer);<NEW_LINE>return true;<NEW_LINE>}
|
.class).setArgs(args);
|
1,301,154
|
public // }<NEW_LINE>JsonNode toJson(Object object) throws IOException {<NEW_LINE>if (object instanceof SBase) {<NEW_LINE>SBase base = (SBase) object;<NEW_LINE><MASK><NEW_LINE>jsonObject.put("__type", base.getSClass().getSimpleName());<NEW_LINE>for (SField field : base.getSClass().getAllFields()) {<NEW_LINE>jsonObject.set(field.getName(), toJson(base.sGet(field)));<NEW_LINE>}<NEW_LINE>return jsonObject;<NEW_LINE>} else if (object instanceof Collection) {<NEW_LINE>Collection<?> collection = (Collection<?>) object;<NEW_LINE>ArrayNode jsonArray = OBJECT_MAPPER.createArrayNode();<NEW_LINE>for (Object value : collection) {<NEW_LINE>jsonArray.add(toJson(value));<NEW_LINE>}<NEW_LINE>return jsonArray;<NEW_LINE>} else if (object instanceof Date) {<NEW_LINE>return new LongNode(((Date) object).getTime());<NEW_LINE>} else if (object instanceof DataHandler) {<NEW_LINE>DataHandler dataHandler = (DataHandler) object;<NEW_LINE>InputStream inputStream = dataHandler.getInputStream();<NEW_LINE>ByteArrayOutputStream out = new ByteArrayOutputStream();<NEW_LINE>IOUtils.copy(inputStream, out);<NEW_LINE>return new TextNode(new String(Base64.encodeBase64(out.toByteArray()), Charsets.UTF_8));<NEW_LINE>} else if (object instanceof Boolean) {<NEW_LINE>return BooleanNode.valueOf((Boolean) object);<NEW_LINE>} else if (object instanceof String) {<NEW_LINE>return new TextNode((String) object);<NEW_LINE>} else if (object instanceof Long) {<NEW_LINE>return new LongNode((Long) object);<NEW_LINE>} else if (object instanceof UUID) {<NEW_LINE>return new TextNode(((UUID) object).toString());<NEW_LINE>} else if (object instanceof Integer) {<NEW_LINE>return new IntNode((Integer) object);<NEW_LINE>} else if (object instanceof Double) {<NEW_LINE>return new DoubleNode((Double) object);<NEW_LINE>} else if (object instanceof Float) {<NEW_LINE>return new FloatNode((Float) object);<NEW_LINE>} else if (object instanceof Enum) {<NEW_LINE>return new TextNode(object.toString());<NEW_LINE>} else if (object == null) {<NEW_LINE>return NullNode.getInstance();<NEW_LINE>} else if (object instanceof byte[]) {<NEW_LINE>byte[] data = (byte[]) object;<NEW_LINE>return new TextNode(new String(Base64.encodeBase64(data), Charsets.UTF_8));<NEW_LINE>}<NEW_LINE>throw new UnsupportedOperationException(object.getClass().getName());<NEW_LINE>}
|
ObjectNode jsonObject = OBJECT_MAPPER.createObjectNode();
|
543,337
|
final AssociateWebsiteAuthorizationProviderResult executeAssociateWebsiteAuthorizationProvider(AssociateWebsiteAuthorizationProviderRequest associateWebsiteAuthorizationProviderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateWebsiteAuthorizationProviderRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AssociateWebsiteAuthorizationProviderRequest> request = null;<NEW_LINE>Response<AssociateWebsiteAuthorizationProviderResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AssociateWebsiteAuthorizationProviderRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(associateWebsiteAuthorizationProviderRequest));<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, "WorkLink");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateWebsiteAuthorizationProvider");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AssociateWebsiteAuthorizationProviderResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AssociateWebsiteAuthorizationProviderResultJsonUnmarshaller());<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();
|
64,123
|
private void writeObject(ObjectOutputStream out) throws IOException {<NEW_LINE>final boolean trace = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.entry(this, tc, "writeObject", new Object[] { "caller/invocation subjects:", callerSubject, invocationSubject, "jaasLoginContextEntry:", jaasLoginContextEntry });<NEW_LINE>PutField fields = out.putFields();<NEW_LINE>if (callerSubject != null && !subjectHelper.isUnauthenticated(callerSubject)) {<NEW_LINE>fields.put(CALLER_PRINCIPAL, getWSPrincipal(callerSubject));<NEW_LINE>}<NEW_LINE>subjectsAreEqual = areSubjectsEqual(callerSubject, invocationSubject);<NEW_LINE>fields.put(SUBJECTS_ARE_EQUAL, subjectsAreEqual);<NEW_LINE>// only serialize invocation principal if it's different from the caller<NEW_LINE>if (!subjectsAreEqual) {<NEW_LINE>if (invocationSubject != null && !subjectHelper.isUnauthenticated(invocationSubject)) {<NEW_LINE>fields.put(INVOCATION_PRINCIPAL, getWSPrincipal(invocationSubject));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (jaasLoginContextEntry != null) {<NEW_LINE>fields.put(JAAS_LOGIN_CONTEXT, jaasLoginContextEntry);<NEW_LINE>}<NEW_LINE>// Serialize Subject Cache key<NEW_LINE>try {<NEW_LINE>serializeSubjectCacheKey(fields);<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, "Unable to serialize Subject Cache Key: " + e.getMessage());<NEW_LINE>if (tc.isWarningEnabled())<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>out.writeFields();<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.exit(this, tc, "writeObject", new Object[] { "subjects are equal: ", subjectsAreEqual });<NEW_LINE>}
|
Tr.warning(tc, SEC_CONTEXT_UNABLE_TO_SERIALIZE);
|
3,582
|
private static void bindRequestParameters(UriComponentsBuilder builder, HandlerMethodParameter parameter, Object[] arguments, FormatterFactory factory) {<NEW_LINE>Object value = parameter.getVerifiedValue(arguments);<NEW_LINE>if (value == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Class<?> parameterType = parameter.parameter.getParameterType();<NEW_LINE>if (value instanceof MultiValueMap) {<NEW_LINE>Map<String, List<?>> requestParams = (Map<String, List<?>>) parameter.prepareValue(value, factory);<NEW_LINE>for (Entry<String, List<?>> entry : requestParams.entrySet()) {<NEW_LINE>for (Object element : entry.getValue()) {<NEW_LINE>TemplateVariable variable = TemplateVariable.pathVariable(entry.getKey());<NEW_LINE>builder.queryParam(entry.getKey(), variable.prepareAndEncode(element));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (value instanceof Map) {<NEW_LINE>Map<String, ?> requestParams = (Map<String, ?>) parameter.prepareValue(value, factory);<NEW_LINE>for (Entry<String, ?> entry : requestParams.entrySet()) {<NEW_LINE>String key = entry.getKey();<NEW_LINE>TemplateVariable variable = TemplateVariable.requestParameter(key);<NEW_LINE>builder.queryParam(key, variable.prepareAndEncode(entry.getValue()));<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (Map.class.isAssignableFrom(parameterType) && SKIP_VALUE.equals(value)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String key = parameter.getVariableName();<NEW_LINE>TemplateVariable variable = TemplateVariable.requestParameter(key);<NEW_LINE>if (value instanceof Collection) {<NEW_LINE>Collection<?> collection = (Collection<?>) <MASK><NEW_LINE>if (parameter.isNonComposite()) {<NEW_LINE>builder.queryParam(key, variable.prepareAndEncode(collection));<NEW_LINE>} else {<NEW_LINE>for (Object element : (Collection<?>) collection) {<NEW_LINE>if (key != null) {<NEW_LINE>builder.queryParam(key, variable.prepareAndEncode(element));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (SKIP_VALUE.equals(value)) {<NEW_LINE>if (parameter.isRequired()) {<NEW_LINE>if (key != null) {<NEW_LINE>builder.queryParam(key, String.format("{%s}", key));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (key != null) {<NEW_LINE>builder.queryParam(key, variable.prepareAndEncode(parameter.prepareValue(value, factory)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
parameter.prepareValue(value, factory);
|
1,028,633
|
private DataTableType createDataTableType(Method method) {<NEW_LINE>Type returnType = requireValidReturnType(method);<NEW_LINE>Type parameterType = requireValidParameterType(method);<NEW_LINE>if (DataTable.class.equals(parameterType)) {<NEW_LINE>return new DataTableType(returnType, (DataTable table) -> invokeMethod(replaceEmptyPatternsWithEmptyString(table)));<NEW_LINE>}<NEW_LINE>if (List.class.equals(parameterType)) {<NEW_LINE>return new DataTableType(returnType, (List<String> row) -> <MASK><NEW_LINE>}<NEW_LINE>if (Map.class.equals(parameterType)) {<NEW_LINE>return new DataTableType(returnType, (Map<String, String> entry) -> invokeMethod(replaceEmptyPatternsWithEmptyString(entry)));<NEW_LINE>}<NEW_LINE>if (String.class.equals(parameterType)) {<NEW_LINE>return new DataTableType(returnType, (String cell) -> invokeMethod(replaceEmptyPatternsWithEmptyString(cell)));<NEW_LINE>}<NEW_LINE>throw createInvalidSignatureException(method);<NEW_LINE>}
|
invokeMethod(replaceEmptyPatternsWithEmptyString(row)));
|
965,299
|
private void writeXmlFrom(XmlElement element) throws IOException {<NEW_LINE>ANGLE_OPEN.writeTo(out);<NEW_LINE>if (!element.getNamespaceUriBytes().isEmpty()) {<NEW_LINE>findNamespacePrefix(element.getNamespaceUriBytes()).writeTo(out);<NEW_LINE>COLON.writeTo(out);<NEW_LINE>}<NEW_LINE>final ByteString name = element.getNameBytes();<NEW_LINE>name.writeTo(out);<NEW_LINE>final Map<ByteString, ByteString> namespaces = new LinkedHashMap<>();<NEW_LINE>for (XmlNamespace namespace : element.getNamespaceDeclarationList()) {<NEW_LINE>final ByteString prefix = namespace.getPrefixBytes();<NEW_LINE>SPACE.writeTo(out);<NEW_LINE>XMLNS.writeTo(out);<NEW_LINE>prefix.writeTo(out);<NEW_LINE>EQUALS.writeTo(out);<NEW_LINE>quote(namespace.getUriBytes());<NEW_LINE>namespaces.put(<MASK><NEW_LINE>}<NEW_LINE>namespaceStack.push(namespaces);<NEW_LINE>for (XmlAttribute attribute : element.getAttributeList()) {<NEW_LINE>SPACE.writeTo(out);<NEW_LINE>if (!attribute.getNamespaceUriBytes().isEmpty()) {<NEW_LINE>findNamespacePrefix(attribute.getNamespaceUriBytes()).writeTo(out);<NEW_LINE>COLON.writeTo(out);<NEW_LINE>}<NEW_LINE>attribute.getNameBytes().writeTo(out);<NEW_LINE>EQUALS.writeTo(out);<NEW_LINE>quote(attribute.getValueBytes());<NEW_LINE>}<NEW_LINE>if (element.getChildList().isEmpty()) {<NEW_LINE>FORWARD_SLASH.writeTo(out);<NEW_LINE>ANGLE_CLOSE.writeTo(out);<NEW_LINE>} else {<NEW_LINE>ANGLE_CLOSE.writeTo(out);<NEW_LINE>for (XmlNode child : element.getChildList()) {<NEW_LINE>writeXmlFrom(child);<NEW_LINE>}<NEW_LINE>ANGLE_OPEN.writeTo(out);<NEW_LINE>FORWARD_SLASH.writeTo(out);<NEW_LINE>if (!element.getNamespaceUriBytes().isEmpty()) {<NEW_LINE>findNamespacePrefix(element.getNamespaceUriBytes()).writeTo(out);<NEW_LINE>COLON.writeTo(out);<NEW_LINE>}<NEW_LINE>name.writeTo(out);<NEW_LINE>ANGLE_CLOSE.writeTo(out);<NEW_LINE>}<NEW_LINE>namespaceStack.pop();<NEW_LINE>}
|
namespace.getUriBytes(), prefix);
|
1,631,061
|
public void marshall(ListModelQualityJobDefinitionsRequest listModelQualityJobDefinitionsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listModelQualityJobDefinitionsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listModelQualityJobDefinitionsRequest.getEndpointName(), ENDPOINTNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(listModelQualityJobDefinitionsRequest.getSortBy(), SORTBY_BINDING);<NEW_LINE>protocolMarshaller.marshall(listModelQualityJobDefinitionsRequest.getSortOrder(), SORTORDER_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(listModelQualityJobDefinitionsRequest.getMaxResults(), MAXRESULTS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listModelQualityJobDefinitionsRequest.getNameContains(), NAMECONTAINS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listModelQualityJobDefinitionsRequest.getCreationTimeBefore(), CREATIONTIMEBEFORE_BINDING);<NEW_LINE>protocolMarshaller.marshall(listModelQualityJobDefinitionsRequest.getCreationTimeAfter(), CREATIONTIMEAFTER_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
|
listModelQualityJobDefinitionsRequest.getNextToken(), NEXTTOKEN_BINDING);
|
1,391,545
|
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Process process = emc.find(id, Process.class);<NEW_LINE>if (null == process) {<NEW_LINE>throw new ExceptionProcessNotExisted(id);<NEW_LINE>}<NEW_LINE>Application application = emc.find(process.getApplication(), Application.class);<NEW_LINE>if (null == application) {<NEW_LINE>throw new ExceptionApplicationNotExist(process.getApplication());<NEW_LINE>}<NEW_LINE>if (!business.editable(effectivePerson, application)) {<NEW_LINE>throw new ExceptionApplicationAccessDenied(effectivePerson.getDistinguishedName(), application.getName(), application.getId());<NEW_LINE>}<NEW_LINE>emc.beginTransaction(Process.class);<NEW_LINE>if (StringUtils.isEmpty(process.getEdition())) {<NEW_LINE>process.setLastUpdateTime(new Date());<NEW_LINE>process.setEdition(process.getId());<NEW_LINE>process.setEditionEnable(true);<NEW_LINE>process.setEditionNumber(1.0);<NEW_LINE>process.setEditionName(process.getName() + "_V" + process.getEditionNumber());<NEW_LINE>this.<MASK><NEW_LINE>} else {<NEW_LINE>if (!BooleanUtils.isTrue(process.getEditionEnable())) {<NEW_LINE>process.setLastUpdateTime(new Date());<NEW_LINE>process.setEditionEnable(true);<NEW_LINE>this.updateCreatePersonLastUpdatePerson(effectivePerson, business, process);<NEW_LINE>}<NEW_LINE>for (Process p : business.entityManagerContainer().listEqualAndEqual(Process.class, Process.application_FIELDNAME, process.getApplication(), Process.edition_FIELDNAME, process.getEdition())) {<NEW_LINE>if (!process.getId().equals(p.getId()) && BooleanUtils.isTrue(p.getEditionEnable())) {<NEW_LINE>p.setLastUpdateTime(new Date());<NEW_LINE>p.setEditionEnable(false);<NEW_LINE>this.updateCreatePersonLastUpdatePerson(effectivePerson, business, p);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>emc.commit();<NEW_LINE>cacheNotify();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>wo.setValue(true);<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
|
updateCreatePersonLastUpdatePerson(effectivePerson, business, process);
|
547,973
|
public List<Type> union(List<Type> cl1, List<Type> cl2) {<NEW_LINE>if (cl1.isEmpty()) {<NEW_LINE>return cl2;<NEW_LINE>} else if (cl2.isEmpty()) {<NEW_LINE>return cl1;<NEW_LINE>} else if (cl1.head.tsym == cl2.head.tsym) {<NEW_LINE>return union(cl1.tail, cl2.tail).prepend(cl1.head);<NEW_LINE>} else if (cl1.head.tsym.precedes(cl2.head.tsym, this)) {<NEW_LINE>return union(cl1.tail, cl2<MASK><NEW_LINE>} else if (cl2.head.tsym.precedes(cl1.head.tsym, this)) {<NEW_LINE>return union(cl1, cl2.tail).prepend(cl2.head);<NEW_LINE>} else {<NEW_LINE>// unrelated types<NEW_LINE>return union(cl1.tail, cl2).prepend(cl1.head);<NEW_LINE>}<NEW_LINE>}
|
).prepend(cl1.head);
|
932,077
|
public static ListCdtTrafficTiersResponse unmarshall(ListCdtTrafficTiersResponse listCdtTrafficTiersResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCdtTrafficTiersResponse.setRequestId(_ctx.stringValue("ListCdtTrafficTiersResponse.RequestId"));<NEW_LINE>List<TrafficTiersItem> trafficTiers <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListCdtTrafficTiersResponse.TrafficTiers.Length"); i++) {<NEW_LINE>TrafficTiersItem trafficTiersItem = new TrafficTiersItem();<NEW_LINE>trafficTiersItem.setLowestTraffic(_ctx.longValue("ListCdtTrafficTiersResponse.TrafficTiers[" + i + "].LowestTraffic"));<NEW_LINE>trafficTiersItem.setHighestTraffic(_ctx.longValue("ListCdtTrafficTiersResponse.TrafficTiers[" + i + "].HighestTraffic"));<NEW_LINE>trafficTiersItem.setTier(_ctx.longValue("ListCdtTrafficTiersResponse.TrafficTiers[" + i + "].Tier"));<NEW_LINE>trafficTiers.add(trafficTiersItem);<NEW_LINE>}<NEW_LINE>listCdtTrafficTiersResponse.setTrafficTiers(trafficTiers);<NEW_LINE>return listCdtTrafficTiersResponse;<NEW_LINE>}
|
= new ArrayList<TrafficTiersItem>();
|
759,178
|
public static void assertEquals(Object expected, Object actual) {<NEW_LINE>if (expected == null) {<NEW_LINE>assertTrue("Expected null but saw \"" + actual + "\" instead", actual == null);<NEW_LINE>} else if (expected instanceof String && actual instanceof String) {<NEW_LINE>assertEquals((String) expected, (String) actual);<NEW_LINE>} else if (expected instanceof String && actual instanceof String[]) {<NEW_LINE>assertEquals((String) expected, (String[]) actual);<NEW_LINE>} else if (expected instanceof String && actual instanceof Number) {<NEW_LINE>assertEquals((String) expected, actual.toString());<NEW_LINE>} else if (expected instanceof Number && actual instanceof String) {<NEW_LINE>assertEquals(expected.toString(), (String) actual);<NEW_LINE>} else if (expected instanceof String[] && actual instanceof String[]) {<NEW_LINE>assertEquals((String[]) expected<MASK><NEW_LINE>} else {<NEW_LINE>assertTrue("Expected \"" + expected + "\" but saw \"" + actual + "\" instead", expected.equals(actual));<NEW_LINE>}<NEW_LINE>}
|
, (String[]) actual);
|
1,303,486
|
public Object eval(SQLEvalVisitor visitor, SQLMethodInvokeExpr x) {<NEW_LINE>if (x.getArguments().size() == 0) {<NEW_LINE>return SQLEvalVisitor.EVAL_ERROR;<NEW_LINE>}<NEW_LINE>SQLExpr param = x.getArguments().get(0);<NEW_LINE>param.accept(visitor);<NEW_LINE>Object paramValue = param.getAttributes().get(EVAL_VALUE);<NEW_LINE>if (paramValue == null) {<NEW_LINE>return SQLEvalVisitor.EVAL_ERROR;<NEW_LINE>}<NEW_LINE>if (paramValue == EVAL_VALUE_NULL) {<NEW_LINE>return EVAL_VALUE_NULL;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if ("md5".equalsIgnoreCase(method)) {<NEW_LINE>String text = paramValue.toString();<NEW_LINE>return Utils.md5(text);<NEW_LINE>}<NEW_LINE>if ("bit_count".equalsIgnoreCase(method)) {<NEW_LINE>if (paramValue instanceof BigInteger) {<NEW_LINE>return ((BigInteger) paramValue).bitCount();<NEW_LINE>}<NEW_LINE>if (paramValue instanceof BigDecimal) {<NEW_LINE>BigDecimal decimal = (BigDecimal) paramValue;<NEW_LINE>BigInteger bigInt = decimal.setScale(0, BigDecimal.ROUND_HALF_UP).toBigInteger();<NEW_LINE>return bigInt.bitCount();<NEW_LINE>}<NEW_LINE>Long val = SQLEvalVisitorUtils.castToLong(paramValue);<NEW_LINE>return Long.bitCount(val);<NEW_LINE>}<NEW_LINE>if ("soundex".equalsIgnoreCase(method)) {<NEW_LINE>String text = paramValue.toString();<NEW_LINE>return soundex(text);<NEW_LINE>}<NEW_LINE>if ("space".equalsIgnoreCase(method)) {<NEW_LINE>int intVal = SQLEvalVisitorUtils.castToInteger(paramValue);<NEW_LINE>char[] chars = new char[intVal];<NEW_LINE>for (int i = 0; i < chars.length; ++i) {<NEW_LINE>chars[i] = ' ';<NEW_LINE>}<NEW_LINE>return new String(chars);<NEW_LINE>}<NEW_LINE>throw new UnsupportedOperationException(method);<NEW_LINE>}
|
String method = x.getMethodName();
|
48,775
|
public void selectBlockers(Ability source, Game game, UUID defendingPlayerId) {<NEW_LINE>logger.debug("selectBlockers");<NEW_LINE>if (combat != null && !combat.getGroups().isEmpty()) {<NEW_LINE>List<CombatGroup> groups = game.getCombat().getGroups();<NEW_LINE>for (int i = 0; i < groups.size(); i++) {<NEW_LINE>if (i < combat.getGroups().size()) {<NEW_LINE>for (UUID blockerId : combat.getGroups().get(i).getBlockers()) {<NEW_LINE>this.declareBlocker(defendingPlayerId, blockerId, groups.get(i).getAttackers()<MASK><NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>Permanent blocker = game.getPermanent(blockerId);<NEW_LINE>if (blocker != null)<NEW_LINE>logger.debug("blocking with:" + blocker.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
.get(0), game);
|
1,326,544
|
protected void encodeMarkup(FacesContext context, AbstractMenu abstractMenu) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>MegaMenu menu = (MegaMenu) abstractMenu;<NEW_LINE>boolean vertical = menu.getOrientation().equals("vertical");<NEW_LINE>String clientId = menu.getClientId(context);<NEW_LINE>String style = menu.getStyle();<NEW_LINE>String styleClass = menu.getStyleClass();<NEW_LINE>styleClass = styleClass == null ? MegaMenu.CONTAINER_CLASS <MASK><NEW_LINE>if (vertical) {<NEW_LINE>styleClass = styleClass + " " + MegaMenu.VERTICAL_CLASS;<NEW_LINE>}<NEW_LINE>writer.startElement("div", menu);<NEW_LINE>writer.writeAttribute("id", clientId, "id");<NEW_LINE>writer.writeAttribute("class", styleClass, "styleClass");<NEW_LINE>if (style != null) {<NEW_LINE>writer.writeAttribute("style", style, "style");<NEW_LINE>}<NEW_LINE>encodeKeyboardTarget(context, menu);<NEW_LINE>writer.startElement("ul", null);<NEW_LINE>writer.writeAttribute(HTML.ARIA_ROLE, HTML.ARIA_ROLE_MENUBAR, null);<NEW_LINE>writer.writeAttribute("class", Menu.LIST_CLASS, null);<NEW_LINE>if (menu.getElementsCount() > 0) {<NEW_LINE>encodeRootItems(context, menu);<NEW_LINE>}<NEW_LINE>UIComponent optionsFacet = menu.getFacet("options");<NEW_LINE>if (ComponentUtils.shouldRenderFacet(optionsFacet)) {<NEW_LINE>writer.startElement("li", null);<NEW_LINE>writer.writeAttribute("class", Menu.OPTIONS_CLASS, null);<NEW_LINE>writer.writeAttribute(HTML.ARIA_ROLE, HTML.ARIA_ROLE_NONE, null);<NEW_LINE>optionsFacet.encodeAll(context);<NEW_LINE>writer.endElement("li");<NEW_LINE>}<NEW_LINE>writer.endElement("ul");<NEW_LINE>writer.endElement("div");<NEW_LINE>}
|
: MegaMenu.CONTAINER_CLASS + " " + styleClass;
|
1,822,375
|
private static boolean openPreferenceNode(final String propertyPageId, final IPreferenceNode targetNode, final String title, Object element, Map<String, Object> data) {<NEW_LINE>PreferenceManager manager = new PreferenceManager();<NEW_LINE>manager.addToRoot(targetNode);<NEW_LINE>final PropertyDialog dialog = new PropertyDialog(UiPlugin.getActiveWorkbenchShell(), manager, new StructuredSelection(element));<NEW_LINE>if (propertyPageId != null) {<NEW_LINE>dialog.setSelectedNode(propertyPageId);<NEW_LINE>}<NEW_LINE>if (data != null) {<NEW_LINE>dialog.setPageData(data);<NEW_LINE>}<NEW_LINE>final boolean[] result <MASK><NEW_LINE>BusyIndicator.showWhile(getStandardDisplay(), new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>dialog.create();<NEW_LINE>dialog.setMessage(targetNode.getLabelText());<NEW_LINE>dialog.getShell().setText(title);<NEW_LINE>result[0] = (dialog.open() == Window.OK);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return result[0];<NEW_LINE>}
|
= new boolean[] { false };
|
864,167
|
public void readEntryComplete(int rc, long lid, long eid, ByteBuf buffer, Object ctx) {<NEW_LINE>BookieSocketAddress bookieAddress = (BookieSocketAddress) ctx;<NEW_LINE>ReadResult<ByteBuf> rr;<NEW_LINE>if (BKException.Code.OK != rc) {<NEW_LINE>rr = new ReadResult<>(eid, rc, null, bookieAddress.getSocketAddress());<NEW_LINE>} else {<NEW_LINE>ByteBuf content;<NEW_LINE>try {<NEW_LINE>content = lh.macManager.verifyDigestAndReturnData(eid, buffer);<NEW_LINE>ByteBuf <MASK><NEW_LINE>rr = new ReadResult<>(eid, BKException.Code.OK, toRet, bookieAddress.getSocketAddress());<NEW_LINE>} catch (BKException.BKDigestMatchException e) {<NEW_LINE>rr = new ReadResult<>(eid, BKException.Code.DigestMatchException, null, bookieAddress.getSocketAddress());<NEW_LINE>} finally {<NEW_LINE>buffer.release();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>readResults.add(rr);<NEW_LINE>if (numBookies.decrementAndGet() == 0) {<NEW_LINE>callback.operationComplete(BKException.Code.OK, readResults);<NEW_LINE>}<NEW_LINE>}
|
toRet = Unpooled.copiedBuffer(content);
|
1,738,391
|
public void calculateRequestBodyInfo(Components components, MethodAttributes methodAttributes, ParameterInfo parameterInfo, RequestBodyInfo requestBodyInfo) {<NEW_LINE>RequestBody requestBody = requestBodyInfo.getRequestBody();<NEW_LINE>MethodParameter methodParameter = parameterInfo.getMethodParameter();<NEW_LINE>// Get it from parameter level, if not present<NEW_LINE>if (requestBody == null) {<NEW_LINE>io.swagger.v3.oas.annotations.parameters.RequestBody requestBodyDoc = methodParameter.getParameterAnnotation(io.swagger.v3.oas.annotations.parameters.RequestBody.class);<NEW_LINE>requestBody = this.buildRequestBodyFromDoc(requestBodyDoc, methodAttributes, components).orElse(null);<NEW_LINE>}<NEW_LINE>RequestPart requestPart = <MASK><NEW_LINE>String paramName = null;<NEW_LINE>if (requestPart != null) {<NEW_LINE>paramName = StringUtils.defaultIfEmpty(requestPart.value(), requestPart.name());<NEW_LINE>parameterInfo.setRequired(requestPart.required());<NEW_LINE>parameterInfo.setRequestPart(true);<NEW_LINE>}<NEW_LINE>paramName = StringUtils.defaultIfEmpty(paramName, parameterInfo.getpName());<NEW_LINE>parameterInfo.setpName(paramName);<NEW_LINE>requestBody = buildRequestBody(requestBody, components, methodAttributes, parameterInfo, requestBodyInfo);<NEW_LINE>requestBodyInfo.setRequestBody(requestBody);<NEW_LINE>}
|
methodParameter.getParameterAnnotation(RequestPart.class);
|
869,700
|
default Member forMember(String descriptor, ClassLoader... loaders) throws ReflectionsException {<NEW_LINE>int p0 = descriptor.lastIndexOf('(');<NEW_LINE>String memberKey = p0 != -1 ? descriptor.substring(0, p0) : descriptor;<NEW_LINE>String methodParameters = p0 != -1 ? descriptor.substring(p0 + 1, descriptor.lastIndexOf(')')) : "";<NEW_LINE>int p1 = Math.max(memberKey.lastIndexOf('.'), memberKey.lastIndexOf("$"));<NEW_LINE>String className = memberKey.substring(0, p1);<NEW_LINE>String memberName = memberKey.substring(p1 + 1);<NEW_LINE>Class<?>[] parameterTypes = null;<NEW_LINE>if (!methodParameters.isEmpty()) {<NEW_LINE>String[] parameterNames = methodParameters.split(",");<NEW_LINE>parameterTypes = Arrays.stream(parameterNames).map(name -> forClass(name.trim(), loaders)).toArray(Class<MASK><NEW_LINE>}<NEW_LINE>Class<?> aClass;<NEW_LINE>try {<NEW_LINE>aClass = forClass(className, loaders);<NEW_LINE>} catch (Exception e) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (aClass != null) {<NEW_LINE>try {<NEW_LINE>if (!descriptor.contains("(")) {<NEW_LINE>return aClass.isInterface() ? aClass.getField(memberName) : aClass.getDeclaredField(memberName);<NEW_LINE>} else if (descriptor.contains("init>")) {<NEW_LINE>return aClass.isInterface() ? aClass.getConstructor(parameterTypes) : aClass.getDeclaredConstructor(parameterTypes);<NEW_LINE>} else {<NEW_LINE>return aClass.isInterface() ? aClass.getMethod(memberName, parameterTypes) : aClass.getDeclaredMethod(memberName, parameterTypes);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>aClass = aClass.getSuperclass();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
|
<?>[]::new);
|
67,976
|
final CreateApplicationResult executeCreateApplication(CreateApplicationRequest createApplicationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createApplicationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateApplicationRequest> request = null;<NEW_LINE>Response<CreateApplicationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createApplicationRequest));<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, "AppConfig");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateApplicationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateApplicationResultJsonUnmarshaller());<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.OPERATION_NAME, "CreateApplication");
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.