idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
281,580
public static String condenseManaCostString(String rawCost) {<NEW_LINE>int total = 0;<NEW_LINE>int index = 0;<NEW_LINE>// Split the string in to an array of numbers and colored mana symbols<NEW_LINE>String[] splitCost = rawCost.replace("{", "").replace("}", " ").split(" ");<NEW_LINE>// Sort alphabetically which will push1 the numbers to the front before the colored mana symbols<NEW_LINE>Arrays.sort(splitCost);<NEW_LINE>for (String c : splitCost) {<NEW_LINE>// If the string is a representation of a number<NEW_LINE>if (c.matches("\\d+")) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>// First non-number we see we can finish as they are sorted<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>int splitCostLength = splitCost.length;<NEW_LINE>// No need to add {total} to the mana cost if total == 0<NEW_LINE>int shift = (total > 0) ? 1 : 0;<NEW_LINE>String[] finalCost = new String[shift + splitCostLength - index];<NEW_LINE>// Account for no colourless mana symbols seen<NEW_LINE>if (total > 0) {<NEW_LINE>finalCost[0] = String.valueOf(total);<NEW_LINE>}<NEW_LINE>System.arraycopy(splitCost, index, finalCost, shift, splitCostLength - index);<NEW_LINE>// Combine the cost back as a mana string<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (String s : finalCost) {<NEW_LINE>sb.append('{').append(s).append('}');<NEW_LINE>}<NEW_LINE>// Return the condensed string<NEW_LINE>return sb.toString();<NEW_LINE>}
total += Integer.parseInt(c);
1,023,408
public UpdateRecoveryPointLifecycleResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateRecoveryPointLifecycleResult updateRecoveryPointLifecycleResult = new UpdateRecoveryPointLifecycleResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return updateRecoveryPointLifecycleResult;<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("BackupVaultArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateRecoveryPointLifecycleResult.setBackupVaultArn(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("RecoveryPointArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateRecoveryPointLifecycleResult.setRecoveryPointArn(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("Lifecycle", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateRecoveryPointLifecycleResult.setLifecycle(LifecycleJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("CalculatedLifecycle", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateRecoveryPointLifecycleResult.setCalculatedLifecycle(CalculatedLifecycleJsonUnmarshaller.getInstance().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 updateRecoveryPointLifecycleResult;<NEW_LINE>}
class).unmarshall(context));
291,007
protected Object[] createItemArray(XYDataset dataset, int series, int item) {<NEW_LINE>Object[] result = new Object[8];<NEW_LINE>result[0] = dataset.<MASK><NEW_LINE>Number x = dataset.getX(series, item);<NEW_LINE>if (getXDateFormat() != null) {<NEW_LINE>result[1] = getXDateFormat().format(new Date(x.longValue()));<NEW_LINE>} else {<NEW_LINE>result[1] = getXFormat().format(x);<NEW_LINE>}<NEW_LINE>NumberFormat formatter = getYFormat();<NEW_LINE>if (dataset instanceof BoxAndWhiskerXYDataset) {<NEW_LINE>BoxAndWhiskerXYDataset d = (BoxAndWhiskerXYDataset) dataset;<NEW_LINE>result[2] = formatter.format(d.getMeanValue(series, item));<NEW_LINE>result[3] = formatter.format(d.getMedianValue(series, item));<NEW_LINE>result[4] = formatter.format(d.getMinRegularValue(series, item));<NEW_LINE>result[5] = formatter.format(d.getMaxRegularValue(series, item));<NEW_LINE>result[6] = formatter.format(d.getQ1Value(series, item));<NEW_LINE>result[7] = formatter.format(d.getQ3Value(series, item));<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
getSeriesKey(series).toString();
1,212,524
private void serializeResult(final JsonGenerator g, final List<ShardedResultGroup> result) throws IOException {<NEW_LINE>g.writeStartArray();<NEW_LINE>for (final ShardedResultGroup group : result) {<NEW_LINE>g.writeStartObject();<NEW_LINE>final MetricCollection collection = group.getMetrics();<NEW_LINE>final SeriesValues series = SeriesValues.fromSeries(group.getSeries().iterator());<NEW_LINE>g.writeStringField("type", collection.getType().identifier());<NEW_LINE>g.writeStringField("hash", Integer.toHexString(group.hashGroup()));<NEW_LINE>g.writeObjectField(<MASK><NEW_LINE>g.writeNumberField("cadence", group.getCadence());<NEW_LINE>g.writeObjectField("values", collection.data());<NEW_LINE>writeKey(g, series.getKeys());<NEW_LINE>writeTags(g, series.getTags());<NEW_LINE>writeTagCounts(g, series.getTags());<NEW_LINE>writeResource(g, series.getResource());<NEW_LINE>writeResourceCounts(g, series.getResource());<NEW_LINE>g.writeEndObject();<NEW_LINE>}<NEW_LINE>g.writeEndArray();<NEW_LINE>}
"shard", group.getShard());
1,399,519
public int readUnary() throws IOException {<NEW_LINE>if (ASSERTS)<NEW_LINE>assert fill < 32 : fill + " >= " + 32;<NEW_LINE>int x;<NEW_LINE>if (fill < 16)<NEW_LINE>refill();<NEW_LINE>if (fill != 0) {<NEW_LINE>// Clean up current and check whether it is nonzero<NEW_LINE>final int currentLeftAligned = current << 32 - fill;<NEW_LINE>if (currentLeftAligned != 0) {<NEW_LINE>// System.err.println( Integer.toBinaryString( currentLeftAligned ) + ", " + Integer.toHexString( currentLeftAligned ) );<NEW_LINE>if ((currentLeftAligned & 0xFF000000) != 0)<NEW_LINE>x = 8 - Fast.BYTEMSB[currentLeftAligned >>> 24];<NEW_LINE>else if ((currentLeftAligned & 0xFF0000) != 0)<NEW_LINE>x = 16 - Fast.BYTEMSB[currentLeftAligned >>> 16];<NEW_LINE>else if ((currentLeftAligned & 0xFF00) != 0)<NEW_LINE>x = 24 - Fast.BYTEMSB[currentLeftAligned >>> 8];<NEW_LINE>else<NEW_LINE>x = 32 - <MASK><NEW_LINE>readBits += x;<NEW_LINE>fill -= x;<NEW_LINE>return x - 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>x = fill;<NEW_LINE>while ((current = read()) == 0) x += 8;<NEW_LINE>x += 7 - (fill = Fast.BYTEMSB[current]);<NEW_LINE>readBits += x + 1;<NEW_LINE>return x;<NEW_LINE>}
Fast.BYTEMSB[currentLeftAligned & 0xFF];
952,036
public Map<String, Object> updateAclConfigFileVersion(String aclFileName, Map<String, Object> updateAclConfigMap) {<NEW_LINE>Object dataVersions = updateAclConfigMap.get(AclConstants.CONFIG_DATA_VERSION);<NEW_LINE>DataVersion dataVersion = new DataVersion();<NEW_LINE>if (dataVersions != null) {<NEW_LINE>List<Map<String, Object>> dataVersionList = (List<Map<String, Object>>) dataVersions;<NEW_LINE>if (dataVersionList.size() > 0) {<NEW_LINE>dataVersion.setTimestamp((long) dataVersionList.get(0).get("timestamp"));<NEW_LINE>dataVersion.setCounter(new AtomicLong(Long.parseLong(dataVersionList.get(0).get("counter").toString())));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>dataVersion.nextVersion();<NEW_LINE>List<Map<String, Object>> versionElement = new ArrayList<Map<String, Object>>();<NEW_LINE>Map<String, Object> accountsMap = new LinkedHashMap<String, Object>();<NEW_LINE>accountsMap.put(AclConstants.CONFIG_COUNTER, dataVersion.<MASK><NEW_LINE>accountsMap.put(AclConstants.CONFIG_TIME_STAMP, dataVersion.getTimestamp());<NEW_LINE>versionElement.add(accountsMap);<NEW_LINE>updateAclConfigMap.put(AclConstants.CONFIG_DATA_VERSION, versionElement);<NEW_LINE>dataVersionMap.put(aclFileName, dataVersion);<NEW_LINE>return updateAclConfigMap;<NEW_LINE>}
getCounter().longValue());
440,390
public Tls unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Tls tls = new Tls();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("certificateAuthorityArnList", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>tls.setCertificateAuthorityArnList(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("enabled", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>tls.setEnabled(context.getUnmarshaller(Boolean.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 tls;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
628,360
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "create window RectangleWindow#keepall as (id string, rx double, ry double, rw double, rh double);\n" + "create index MyIndex on RectangleWindow((rx,ry,rw,rh) mxcifquadtree(0,0,100,100));\n" + "insert into RectangleWindow select id, x as rx, y as ry, width as rw, height as rh from SupportSpatialEventRectangle;\n" + "@name('s0') on SupportSpatialAABB as aabb select pt.id as c0 from RectangleWindow as pt where rectangle(rx,ry,rw,rh).intersects(rectangle(x,y,width,height));\n";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>sendEventRectangle(env, "R0", 73.32704983331149, 23.46990952575032, 1, 1);<NEW_LINE>sendEventRectangle(env, "R1", <MASK><NEW_LINE>sendEventRectangle(env, "R2", 56.75757294858788, 25.508506696809608, 1, 1);<NEW_LINE>sendEventRectangle(env, "R3", 83.66639067675291, 76.53772974832937, 1, 1);<NEW_LINE>sendEventRectangle(env, "R4", 51.01654641861326, 43.49009281983866, 1, 1);<NEW_LINE>env.milestone(0);<NEW_LINE>double beginX = 50.45945198254618;<NEW_LINE>double endX = 88.31594559038719;<NEW_LINE>double beginY = 4.577595744501329;<NEW_LINE>double endY = 22.93393078279351;<NEW_LINE>env.sendEventBean(new SupportSpatialAABB("", beginX, beginY, endX - beginX, endY - beginY));<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>String received = sortJoinProperty(listener.getAndResetLastNewData(), "c0");<NEW_LINE>assertEquals("R1", received);<NEW_LINE>});<NEW_LINE>env.undeployAll();<NEW_LINE>}
53.09747562396894, 17.100976152185034, 1, 1);
564,246
public void run() {<NEW_LINE>Timer = new TimerTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>Animation animation;<NEW_LINE>animation = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.fade_in);<NEW_LINE>animation.setDuration(500);<NEW_LINE>title_header_beta.startAnimation(animation);<NEW_LINE>animation = null;<NEW_LINE>title_header_beta.setText("NEW FEATURES");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>_timer.schedule(Timer<MASK><NEW_LINE>Timer = new TimerTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>Animation animation;<NEW_LINE>animation = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.fade_in);<NEW_LINE>animation.setDuration(500);<NEW_LINE>title_header_beta.startAnimation(animation);<NEW_LINE>animation = null;<NEW_LINE>title_header_beta.setText("FREEDOM");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>_timer.schedule(Timer, (int) (6000));<NEW_LINE>Timer = new TimerTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>Animation animation;<NEW_LINE>animation = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.fade_in);<NEW_LINE>animation.setDuration(500);<NEW_LINE>title_header_beta.startAnimation(animation);<NEW_LINE>animation = null;<NEW_LINE>title_header_beta.setText("AD-FREE");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>_timer.schedule(Timer, (int) (9000));<NEW_LINE>}
, (int) (3000));
1,379,795
public Topology buildTopology() {<NEW_LINE>StreamsBuilder builder = new StreamsBuilder();<NEW_LINE>ObjectMapperSerde<WeatherStation> weatherStationSerde = new ObjectMapperSerde<>(WeatherStation.class);<NEW_LINE>ObjectMapperSerde<Aggregation> aggregationSerde = new <MASK><NEW_LINE>KeyValueBytesStoreSupplier storeSupplier = Stores.persistentKeyValueStore(WEATHER_STATIONS_STORE);<NEW_LINE>GlobalKTable<Integer, WeatherStation> stations = builder.globalTable(WEATHER_STATIONS_TOPIC, Consumed.with(Serdes.Integer(), weatherStationSerde));<NEW_LINE>builder.stream(TEMPERATURE_VALUES_TOPIC, Consumed.with(Serdes.Integer(), Serdes.String())).join(stations, (stationId, timestampAndValue) -> stationId, (timestampAndValue, station) -> {<NEW_LINE>String[] parts = timestampAndValue.split(";");<NEW_LINE>return new TemperatureMeasurement(station.id, station.name, Instant.parse(parts[0]), Double.valueOf(parts[1]));<NEW_LINE>}).groupByKey().aggregate(Aggregation::new, (stationId, value, aggregation) -> aggregation.updateFrom(value), Materialized.<Integer, Aggregation>as(storeSupplier).withKeySerde(Serdes.Integer()).withValueSerde(aggregationSerde)).toStream().to(TEMPERATURES_AGGREGATED_TOPIC, Produced.with(Serdes.Integer(), aggregationSerde));<NEW_LINE>return builder.build();<NEW_LINE>}
ObjectMapperSerde<>(Aggregation.class);
730,326
final DescribeInstanceInformationResult executeDescribeInstanceInformation(DescribeInstanceInformationRequest describeInstanceInformationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeInstanceInformationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeInstanceInformationRequest> request = null;<NEW_LINE>Response<DescribeInstanceInformationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeInstanceInformationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeInstanceInformationRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SSM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeInstanceInformation");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeInstanceInformationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new DescribeInstanceInformationResultJsonUnmarshaller());
1,823,839
private <T> T call(UfsCallable<T> callable) throws IOException {<NEW_LINE>String methodName = callable.methodName();<NEW_LINE>long startMs = System.currentTimeMillis();<NEW_LINE>long durationMs;<NEW_LINE>LOG.<MASK><NEW_LINE>try (Timer.Context ctx = MetricsSystem.timer(getQualifiedMetricName(methodName)).time()) {<NEW_LINE>T ret = callable.call();<NEW_LINE>durationMs = System.currentTimeMillis() - startMs;<NEW_LINE>LOG.debug("Exit (OK): {}({}) in {} ms", methodName, callable, durationMs);<NEW_LINE>if (durationMs >= mLoggingThreshold) {<NEW_LINE>LOG.warn("{}({}) returned OK in {} ms (>={} ms)", methodName, callable, durationMs, mLoggingThreshold);<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>} catch (IOException e) {<NEW_LINE>durationMs = System.currentTimeMillis() - startMs;<NEW_LINE>MetricsSystem.counter(getQualifiedFailureMetricName(methodName)).inc();<NEW_LINE>LOG.debug("Exit (Error): {}({}) in {} ms, Error={}", methodName, callable, durationMs, e.toString());<NEW_LINE>if (durationMs >= mLoggingThreshold) {<NEW_LINE>LOG.warn("{}({}) returned \"{}\" in {} ms (>={} ms)", methodName, callable, e.toString(), durationMs, mLoggingThreshold);<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
debug("Enter: {}({})", methodName, callable);
616,888
public void mergeGraph2(Graph2 to, Graph2 from) {<NEW_LINE>String toCount = to.getCount();<NEW_LINE>String fromCount = from.getCount();<NEW_LINE>long[] count = mergeLongValue(toCount, fromCount);<NEW_LINE>to.setCount(StringUtils.join(count, GraphTrendUtil.GRAPH_CHAR_SPLITTER));<NEW_LINE>String toSum = to.getSum();<NEW_LINE>String fromSum = from.getSum();<NEW_LINE>double[] sum = mergeDoubleValue(toSum, fromSum);<NEW_LINE>to.setSum(StringUtils.join(sum, GraphTrendUtil.GRAPH_CHAR_SPLITTER));<NEW_LINE>String toFails = to.getFails();<NEW_LINE><MASK><NEW_LINE>long[] fails = mergeLongValue(toFails, fromFails);<NEW_LINE>to.setFails(StringUtils.join(fails, GraphTrendUtil.GRAPH_CHAR_SPLITTER));<NEW_LINE>int length = count.length;<NEW_LINE>double[] avg = new double[length];<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>try {<NEW_LINE>if (count[i] > 0) {<NEW_LINE>avg[i] = sum[i] / count[i];<NEW_LINE>} else {<NEW_LINE>avg[i] = 0.0;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Cat.logError(e);<NEW_LINE>avg[i] = 0.0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>to.setAvg(StringUtils.join(avg, GraphTrendUtil.GRAPH_CHAR_SPLITTER));<NEW_LINE>}
String fromFails = from.getFails();
1,499,169
public static ClassHierarchy createHierarchy(Map<String, byte[]> classMap) {<NEW_LINE>ClassHierarchy hierarchy = new IncrementalClassHierarchy();<NEW_LINE>for (Map.Entry<String, byte[]> e : classMap.entrySet()) {<NEW_LINE>try {<NEW_LINE>ClassReader reader = new ClassReader(e.getValue());<NEW_LINE>String[] ifaceNames = reader.getInterfaces();<NEW_LINE>Type clazz = Type.getObjectType(reader.getClassName());<NEW_LINE>Type superclass = reader.getSuperName() == null ? Type.getObjectType("java/lang/Object") : Type.getObjectType(reader.getSuperName());<NEW_LINE>Type[] ifaces = new Type[ifaceNames.length];<NEW_LINE>for (int i = 0; i < ifaces.length; i++) ifaces[i] = Type<MASK><NEW_LINE>// Add type to hierarchy<NEW_LINE>boolean isInterface = (reader.getAccess() & Opcodes.ACC_INTERFACE) != 0;<NEW_LINE>if (isInterface) {<NEW_LINE>hierarchy.addInterface(clazz, ifaces);<NEW_LINE>} else {<NEW_LINE>hierarchy.addClass(clazz, superclass, ifaces);<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>Log.error("JPhantom: Hierarchy failure for: {}", e.getKey(), ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return hierarchy;<NEW_LINE>}
.getObjectType(ifaceNames[i]);
545,833
public static void initialize(Core core) {<NEW_LINE>ConfigurationManager config = ConfigurationManager.getInstance();<NEW_LINE>if ("az2".equalsIgnoreCase(config.getStringParameter("ui", "az3"))) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int <MASK><NEW_LINE>boolean startAdvanced = userMode > 1;<NEW_LINE>boolean configNeedsSave = false;<NEW_LINE>final ConfigurationDefaults defaults = ConfigurationDefaults.getInstance();<NEW_LINE>defaults.addParameter("ui", "az3");<NEW_LINE>defaults.addParameter("Auto Upload Speed Enabled", true);<NEW_LINE>defaults.addParameter(ConfigurationDefaults.CFG_TORRENTADD_OPENOPTIONS, startAdvanced ? ConfigurationDefaults.CFG_TORRENTADD_OPENOPTIONS_ALWAYS : ConfigurationDefaults.CFG_TORRENTADD_OPENOPTIONS_MANY);<NEW_LINE>// defaults.addParameter("Add URL Silently", true); not used 11/30/2015 - see "Activate Window On External Download"<NEW_LINE>// defaults.addParameter("add_torrents_silently", true); not used 11/30/2015<NEW_LINE>defaults.addParameter("Popup Download Finished", false);<NEW_LINE>defaults.addParameter("Popup Download Added", false);<NEW_LINE>defaults.addParameter("Status Area Show SR", false);<NEW_LINE>defaults.addParameter("Status Area Show NAT", false);<NEW_LINE>defaults.addParameter("Status Area Show IPF", false);<NEW_LINE>defaults.addParameter("Status Area Show RIP", true);<NEW_LINE>defaults.addParameter("Message Popup Autoclose in Seconds", 10);<NEW_LINE>defaults.addParameter("window.maximized", true);<NEW_LINE>defaults.addParameter("update.autodownload", true);<NEW_LINE>// defaults.addParameter("suppress_file_download_dialog", true);<NEW_LINE>defaults.addParameter("auto_remove_inactive_items", false);<NEW_LINE>defaults.addParameter("show_torrents_menu", false);<NEW_LINE>config.removeParameter("v3.home-tab.starttab");<NEW_LINE>defaults.addParameter("MyTorrentsView.table.style", 0);<NEW_LINE>defaults.addParameter("v3.Show Welcome", true);<NEW_LINE>defaults.addParameter("Library.viewmode", startAdvanced ? 1 : 0);<NEW_LINE>defaults.addParameter("LibraryDL.viewmode", startAdvanced ? 1 : 0);<NEW_LINE>defaults.addParameter("LibraryDL.UseDefaultIndicatorColor", false);<NEW_LINE>defaults.addParameter("LibraryUnopened.viewmode", startAdvanced ? 1 : 0);<NEW_LINE>defaults.addParameter("LibraryCD.viewmode", startAdvanced ? 1 : 0);<NEW_LINE>defaults.addParameter("Library.EnableSimpleView", 1);<NEW_LINE>defaults.addParameter("Library.CatInSideBar", startAdvanced ? 1 : 0);<NEW_LINE>defaults.addParameter("Library.TagInSideBar", 1);<NEW_LINE>defaults.addParameter("Library.TagGroupsInSideBar", true);<NEW_LINE>defaults.addParameter("Library.ShowTabsInTorrentView", 1);<NEW_LINE>defaults.addParameter("list.dm.dblclick", "0");<NEW_LINE>// === defaults used by MainWindow<NEW_LINE>defaults.addParameter("vista.adminquit", false);<NEW_LINE>defaults.addParameter("Start Minimized", false);<NEW_LINE>defaults.addParameter("Password enabled", false);<NEW_LINE>defaults.addParameter("ToolBar.showText", true);<NEW_LINE>defaults.addParameter("Table.extendedErase", !Constants.isWindowsXP);<NEW_LINE>defaults.addParameter("Table.useTree", true);<NEW_LINE>// by default, turn off some slidey warning<NEW_LINE>// Since they are plugin configs, we need to set the default after the<NEW_LINE>// plugin sets the default<NEW_LINE>core.addLifecycleListener(new CoreLifecycleAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void started(Core core) {<NEW_LINE>defaults.addParameter("Plugin.DHT.dht.warn.user", false);<NEW_LINE>defaults.addParameter("Plugin.UPnP.upnp.alertothermappings", false);<NEW_LINE>defaults.addParameter("Plugin.UPnP.upnp.alertdeviceproblems", false);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (configNeedsSave) {<NEW_LINE>config.save();<NEW_LINE>}<NEW_LINE>}
userMode = COConfigurationManager.getIntParameter("User Mode");
757,013
public void applyParameters(ConstraintSet.Constraint c) {<NEW_LINE>this.mVisibilityMode = c.propertySet.mVisibilityMode;<NEW_LINE>this.mVisibility = c.propertySet.visibility;<NEW_LINE>this.mAlpha = (c.propertySet.visibility != ConstraintSet.VISIBLE && mVisibilityMode == ConstraintSet.VISIBILITY_MODE_NORMAL) ? 0.0f : c.propertySet.alpha;<NEW_LINE>this.mApplyElevation = c.transform.applyElevation;<NEW_LINE>this.mElevation = c.transform.elevation;<NEW_LINE>this.mRotation = c.transform.rotation;<NEW_LINE>this<MASK><NEW_LINE>this.rotationY = c.transform.rotationY;<NEW_LINE>this.mScaleX = c.transform.scaleX;<NEW_LINE>this.mScaleY = c.transform.scaleY;<NEW_LINE>this.mPivotX = c.transform.transformPivotX;<NEW_LINE>this.mPivotY = c.transform.transformPivotY;<NEW_LINE>this.mTranslationX = c.transform.translationX;<NEW_LINE>this.mTranslationY = c.transform.translationY;<NEW_LINE>this.mTranslationZ = c.transform.translationZ;<NEW_LINE>this.mKeyFrameEasing = Easing.getInterpolator(c.motion.mTransitionEasing);<NEW_LINE>this.mPathRotate = c.motion.mPathRotate;<NEW_LINE>this.mDrawPath = c.motion.mDrawPath;<NEW_LINE>this.mAnimateRelativeTo = c.motion.mAnimateRelativeTo;<NEW_LINE>this.mProgress = c.propertySet.mProgress;<NEW_LINE>Set<String> at = c.mCustomConstraints.keySet();<NEW_LINE>for (String s : at) {<NEW_LINE>ConstraintAttribute attr = c.mCustomConstraints.get(s);<NEW_LINE>if (attr.isContinuous()) {<NEW_LINE>this.mAttributes.put(s, attr);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.mRotationX = c.transform.rotationX;
1,655,434
public JSDynamicObject propertyHandlerInstantiate(JSContext context, JSRealm realm, ObjectTemplate template, JSDynamicObject target, boolean global) {<NEW_LINE>JSDynamicObject handler = JSUncheckedProxyHandler.create(context, realm);<NEW_LINE>JSDynamicObject proxy = JSProxy.create(context, realm, target, handler);<NEW_LINE>ContextData engineCacheData = getContextEmbedderData(context);<NEW_LINE>JSDynamicObject getter = instantiateNativePropertyHandlerFunction(template, realm, GETTER, proxy);<NEW_LINE>JSObject.set(handler, JSProxy.GET, getter);<NEW_LINE>JSDynamicObject setter = instantiateNativePropertyHandlerFunction(template, realm, SETTER, proxy);<NEW_LINE>JSObject.set(handler, JSProxy.SET, setter);<NEW_LINE>JSDynamicObject query = instantiateNativePropertyHandlerFunction(template, realm, QUERY, proxy);<NEW_LINE>JSObject.set(handler, JSProxy.HAS, query);<NEW_LINE>JSDynamicObject deleter = instantiateNativePropertyHandlerFunction(template, realm, DELETER, proxy);<NEW_LINE>JSObject.set(handler, JSProxy.DELETE_PROPERTY, deleter);<NEW_LINE>JSDynamicObject ownKeys = instantiateNativePropertyHandlerFunction(template, realm, OWN_KEYS, proxy);<NEW_LINE>JSObject.set(handler, JSProxy.OWN_KEYS, ownKeys);<NEW_LINE>JSDynamicObject getOwnPropertyDescriptor = instantiateNativePropertyHandlerFunction(template, realm, GET_OWN_PROPERTY_DESCRIPTOR, proxy);<NEW_LINE>JSObject.set(handler, JSProxy.GET_OWN_PROPERTY_DESCRIPTOR, getOwnPropertyDescriptor);<NEW_LINE>JSDynamicObject defineProperty = instantiateNativePropertyHandlerFunction(template, realm, DEFINE_PROPERTY, proxy);<NEW_LINE>JSObject.set(handler, JSProxy.DEFINE_PROPERTY, defineProperty);<NEW_LINE>ContextData.FunctionKey nodeType = global ? PropertyHandlerPrototypeGlobal : PropertyHandlerPrototype;<NEW_LINE>JSFunctionData getPrototypeOfFunctionData = engineCacheData.getOrCreateFunctionData(nodeType, (c) -> {<NEW_LINE>JavaScriptRootNode rootNode = new PropertyHandlerPrototypeNode(global);<NEW_LINE>return JSFunctionData.createCallOnly(c, rootNode.getCallTarget(), 0, Strings.EMPTY_STRING);<NEW_LINE>});<NEW_LINE>JSDynamicObject getPrototypeOf = functionFromFunctionData(realm, getPrototypeOfFunctionData, null);<NEW_LINE>JSObject.set(handler, JSProxy.GET_PROTOTYPE_OF, getPrototypeOf);<NEW_LINE>for (Value value : template.getValues()) {<NEW_LINE>Object name = value.getName();<NEW_LINE>if (name instanceof HiddenKey) {<NEW_LINE>JSObjectUtil.putHiddenProperty(proxy, <MASK><NEW_LINE>}<NEW_LINE>// else set on target (in objectTemplateInstantiate) already<NEW_LINE>}<NEW_LINE>int internalFieldCount = template.getInternalFieldCount();<NEW_LINE>if (internalFieldCount > 0) {<NEW_LINE>JSObjectUtil.putHiddenProperty(proxy, INTERNAL_FIELD_COUNT_KEY, internalFieldCount);<NEW_LINE>}<NEW_LINE>return proxy;<NEW_LINE>}
name, value.getValue());
1,180,665
public void paintInstance(InstancePainter painter) {<NEW_LINE>final var g = painter.getGraphics();<NEW_LINE>painter.drawBounds();<NEW_LINE>g.setColor(Color.GRAY);<NEW_LINE>painter.drawPort(IN);<NEW_LINE>painter.drawPort(OUT, "-x", Direction.WEST);<NEW_LINE>painter.drawPort(ERR);<NEW_LINE>final var loc = painter.getLocation();<NEW_LINE>final <MASK><NEW_LINE>final var y = loc.getY();<NEW_LINE>GraphicsUtil.switchToWidth(g, 2);<NEW_LINE>g.setColor(Color.BLACK);<NEW_LINE>g.drawLine(x - 35, y - 15, x - 35, y + 5);<NEW_LINE>g.drawLine(x - 35, y - 15, x - 25, y - 15);<NEW_LINE>g.drawLine(x - 35, y - 5, x - 25, y - 5);<NEW_LINE>GraphicsUtil.switchToWidth(g, 1);<NEW_LINE>}
var x = loc.getX();
478,195
public static QueryCallResponse unmarshall(QueryCallResponse queryCallResponse, UnmarshallerContext context) {<NEW_LINE>queryCallResponse.setRequestId(context.stringValue("QueryCallResponse.RequestId"));<NEW_LINE>queryCallResponse.setSuccess(context.booleanValue("QueryCallResponse.Success"));<NEW_LINE>queryCallResponse.setCode<MASK><NEW_LINE>queryCallResponse.setMessage(context.stringValue("QueryCallResponse.Message"));<NEW_LINE>queryCallResponse.setHttpStatusCode(context.integerValue("QueryCallResponse.HttpStatusCode"));<NEW_LINE>List<CallStatus> callStatusList = new ArrayList<CallStatus>();<NEW_LINE>for (int i = 0; i < context.lengthValue("QueryCallResponse.callStatusList.Length"); i++) {<NEW_LINE>CallStatus callStatus = new CallStatus();<NEW_LINE>callStatus.setStatusCode(context.stringValue("QueryCallResponse.callStatusList[" + i + "].StatusCode"));<NEW_LINE>callStatus.setStatusDesc(context.stringValue("QueryCallResponse.callStatusList[" + i + "].StatusDesc"));<NEW_LINE>callStatus.setTaskId(context.stringValue("QueryCallResponse.callStatusList[" + i + "].TaskId"));<NEW_LINE>callStatus.setTaskState(context.stringValue("QueryCallResponse.callStatusList[" + i + "].TaskState"));<NEW_LINE>callStatus.setAcid(context.stringValue("QueryCallResponse.callStatusList[" + i + "].Acid"));<NEW_LINE>callStatus.setTaskCode(context.integerValue("QueryCallResponse.callStatusList[" + i + "].TaskCode"));<NEW_LINE>callStatus.setEndTime(context.stringValue("QueryCallResponse.callStatusList[" + i + "].EndTime"));<NEW_LINE>callStatusList.add(callStatus);<NEW_LINE>}<NEW_LINE>queryCallResponse.setCallStatusList(callStatusList);<NEW_LINE>return queryCallResponse;<NEW_LINE>}
(context.stringValue("QueryCallResponse.Code"));
1,792,861
private <K, V> int parseMapField(T message, byte[] data, int position, int limit, int bufferPosition, long fieldOffset, Registers registers) throws IOException {<NEW_LINE>final sun.misc.Unsafe unsafe = UNSAFE;<NEW_LINE>Object mapDefaultEntry = getMapFieldDefaultEntry(bufferPosition);<NEW_LINE>Object mapField = unsafe.getObject(message, fieldOffset);<NEW_LINE>if (mapFieldSchema.isImmutable(mapField)) {<NEW_LINE>Object oldMapField = mapField;<NEW_LINE>mapField = mapFieldSchema.newMapField(mapDefaultEntry);<NEW_LINE>mapFieldSchema.mergeFrom(mapField, oldMapField);<NEW_LINE>unsafe.putObject(message, fieldOffset, mapField);<NEW_LINE>}<NEW_LINE>return decodeMapEntry(data, position, limit, (Metadata<K, V>) mapFieldSchema.forMapMetadata(mapDefaultEntry), (Map<K, V>) mapFieldSchema<MASK><NEW_LINE>}
.forMutableMapData(mapField), registers);
1,689,764
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject sourceObject = source.getSourceObject(game);<NEW_LINE>Permanent attachedTo = (Permanent) getValue("attachedTo");<NEW_LINE>if (controller != null && sourceObject != null && attachedTo != null) {<NEW_LINE>Player owner = game.getPlayer(attachedTo.getOwnerId());<NEW_LINE>int amount = attachedTo.getPower().getValue();<NEW_LINE>if (owner != null && amount > 0) {<NEW_LINE>Set<Card> cards = owner.getLibrary(<MASK><NEW_LINE>if (!cards.isEmpty()) {<NEW_LINE>controller.moveCardsToExile(cards, source, game, true, source.getSourceId(), sourceObject.getName());<NEW_LINE>for (Card card : cards) {<NEW_LINE>if (!card.isLand(game)) {<NEW_LINE>ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.Custom);<NEW_LINE>effect.setTargetPointer(new FixedTarget(card, game));<NEW_LINE>game.addEffect(effect, source);<NEW_LINE>effect = new DeadMansChestSpendManaEffect();<NEW_LINE>effect.setTargetPointer(new FixedTarget(card, game));<NEW_LINE>game.addEffect(effect, source);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
).getTopCards(game, amount);
326,445
private synchronized void loadExtensions() {<NEW_LINE>if (contributors == null) {<NEW_LINE>IExtensionRegistry registry = Platform.getExtensionRegistry();<NEW_LINE>IConfigurationElement[] elements = registry.getConfigurationElementsFor(ProjectsPlugin.PLUGIN_ID, EXTENSION_POINT_NAME);<NEW_LINE>// Gather all the configuration elements and filter the same contributors based on their priority.<NEW_LINE>Map<String, IConfigurationElement> registryMap = new HashMap<String, IConfigurationElement>(elements.length);<NEW_LINE>for (IConfigurationElement element : elements) {<NEW_LINE>String id = element.getAttribute(ATTRIBUTE_ID);<NEW_LINE>if (registryMap.containsKey(id)) {<NEW_LINE>IConfigurationElement currentElement = registryMap.get(id);<NEW_LINE>int currentPrioirty = DEFAULT_PRIORITY, newPriority = DEFAULT_PRIORITY;<NEW_LINE>try {<NEW_LINE>currentPrioirty = Integer.parseInt<MASK><NEW_LINE>newPriority = Integer.parseInt(element.getAttribute(ATTRIBUTE_PRIORITY));<NEW_LINE>} catch (NumberFormatException nfe) {<NEW_LINE>IdeLog.logError(ProjectsPlugin.getDefault(), nfe);<NEW_LINE>}<NEW_LINE>if (newPriority < currentPrioirty) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>registryMap.put(id, element);<NEW_LINE>}<NEW_LINE>contributors = new ArrayList<IProjectWizardContributor>(registryMap.size());<NEW_LINE>for (IConfigurationElement element : registryMap.values()) {<NEW_LINE>try {<NEW_LINE>IProjectWizardContributor contributorObject = (IProjectWizardContributor) element.createExecutableExtension(ATTRIBUTE_CLASS);<NEW_LINE>if (contributorObject == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>contributors.add(contributorObject);<NEW_LINE>} catch (CoreException e) {<NEW_LINE>IdeLog.logError(ProjectsPlugin.getDefault(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(currentElement.getAttribute(ATTRIBUTE_PRIORITY));
1,073,735
public Request<CreateProvisioningClaimRequest> marshall(CreateProvisioningClaimRequest createProvisioningClaimRequest) {<NEW_LINE>if (createProvisioningClaimRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(CreateProvisioningClaimRequest)");<NEW_LINE>}<NEW_LINE>Request<CreateProvisioningClaimRequest> request = new DefaultRequest<CreateProvisioningClaimRequest>(createProvisioningClaimRequest, "AWSIot");<NEW_LINE><MASK><NEW_LINE>String uriResourcePath = "/provisioning-templates/{templateName}/provisioning-claim";<NEW_LINE>uriResourcePath = uriResourcePath.replace("{templateName}", (createProvisioningClaimRequest.getTemplateName() == null) ? "" : StringUtils.fromString(createProvisioningClaimRequest.getTemplateName()));<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>request.addHeader("Content-Length", "0");<NEW_LINE>request.setContent(new ByteArrayInputStream(new byte[0]));<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.0");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.setHttpMethod(HttpMethodName.POST);
224,709
// / Creates an event based on the current state.<NEW_LINE>private Map<String, Object> createPlaybackEvent() {<NEW_LINE>final Map<String, Object> event = new HashMap<String, Object>();<NEW_LINE>Long duration = getDuration() == C.TIME_UNSET ? null : (1000 * getDuration());<NEW_LINE>bufferedPosition = player != null ? player.getBufferedPosition() : 0L;<NEW_LINE>event.put("processingState", processingState.ordinal());<NEW_LINE>event.put("updatePosition", 1000 * updatePosition);<NEW_LINE>event.put("updateTime", updateTime);<NEW_LINE>event.put("bufferedPosition", 1000 * Math.max(updatePosition, bufferedPosition));<NEW_LINE>event.put("icyMetadata", collectIcyMetadata());<NEW_LINE>event.put("duration", duration);<NEW_LINE><MASK><NEW_LINE>event.put("androidAudioSessionId", audioSessionId);<NEW_LINE>return event;<NEW_LINE>}
event.put("currentIndex", currentIndex);
910,072
final UpdateClusterResult executeUpdateCluster(UpdateClusterRequest updateClusterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateClusterRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateClusterRequest> request = null;<NEW_LINE>Response<UpdateClusterResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new UpdateClusterRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateClusterRequest));<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, "MemoryDB");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCluster");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateClusterResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateClusterResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,196,752
public static DescribeFabricConsortiumsResponse unmarshall(DescribeFabricConsortiumsResponse describeFabricConsortiumsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeFabricConsortiumsResponse.setRequestId(_ctx.stringValue("DescribeFabricConsortiumsResponse.RequestId"));<NEW_LINE>describeFabricConsortiumsResponse.setErrorCode(_ctx.integerValue("DescribeFabricConsortiumsResponse.ErrorCode"));<NEW_LINE>describeFabricConsortiumsResponse.setSuccess(_ctx.booleanValue("DescribeFabricConsortiumsResponse.Success"));<NEW_LINE>List<ResultItem> result = new ArrayList<ResultItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeFabricConsortiumsResponse.Result.Length"); i++) {<NEW_LINE>ResultItem resultItem = new ResultItem();<NEW_LINE>resultItem.setChannelCount(_ctx.integerValue<MASK><NEW_LINE>resultItem.setDomain(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].Domain"));<NEW_LINE>resultItem.setState(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].State"));<NEW_LINE>resultItem.setCreateTime(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].CreateTime"));<NEW_LINE>resultItem.setSpecName(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].SpecName"));<NEW_LINE>resultItem.setSupportChannelConfig(_ctx.booleanValue("DescribeFabricConsortiumsResponse.Result[" + i + "].SupportChannelConfig"));<NEW_LINE>resultItem.setOwnerName(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].OwnerName"));<NEW_LINE>resultItem.setOwnerUid(_ctx.longValue("DescribeFabricConsortiumsResponse.Result[" + i + "].OwnerUid"));<NEW_LINE>resultItem.setOwnerBid(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].OwnerBid"));<NEW_LINE>resultItem.setCodeName(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].CodeName"));<NEW_LINE>resultItem.setRegionId(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].RegionId"));<NEW_LINE>resultItem.setChannelPolicy(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].ChannelPolicy"));<NEW_LINE>resultItem.setRequestId(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].RequestId"));<NEW_LINE>resultItem.setConsortiumId(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].ConsortiumId"));<NEW_LINE>resultItem.setExpiredTime(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].ExpiredTime"));<NEW_LINE>resultItem.setOrganizationCount(_ctx.integerValue("DescribeFabricConsortiumsResponse.Result[" + i + "].OrganizationCount"));<NEW_LINE>resultItem.setConsortiumName(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].ConsortiumName"));<NEW_LINE>List<TagsItem> tags = new ArrayList<TagsItem>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeFabricConsortiumsResponse.Result[" + i + "].Tags.Length"); j++) {<NEW_LINE>TagsItem tagsItem = new TagsItem();<NEW_LINE>tagsItem.setKey(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].Tags[" + j + "].Key"));<NEW_LINE>tagsItem.setValue(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result[" + i + "].Tags[" + j + "].Value"));<NEW_LINE>tags.add(tagsItem);<NEW_LINE>}<NEW_LINE>resultItem.setTags(tags);<NEW_LINE>result.add(resultItem);<NEW_LINE>}<NEW_LINE>describeFabricConsortiumsResponse.setResult(result);<NEW_LINE>return describeFabricConsortiumsResponse;<NEW_LINE>}
("DescribeFabricConsortiumsResponse.Result[" + i + "].ChannelCount"));
144,384
public boolean execute(Object object) throws ContractExeException {<NEW_LINE>TransactionResultCapsule ret = (TransactionResultCapsule) object;<NEW_LINE>if (Objects.isNull(ret)) {<NEW_LINE>throw new RuntimeException(ActuatorConstant.TX_RESULT_NULL);<NEW_LINE>}<NEW_LINE>long fee = calcFee();<NEW_LINE>AccountStore accountStore = chainBaseManager.getAccountStore();<NEW_LINE>DynamicPropertiesStore dynamicStore = chainBaseManager.getDynamicPropertiesStore();<NEW_LINE>ExchangeStore exchangeStore = chainBaseManager.getExchangeStore();<NEW_LINE>ExchangeV2Store exchangeV2Store = chainBaseManager.getExchangeV2Store();<NEW_LINE>AssetIssueStore assetIssueStore = chainBaseManager.getAssetIssueStore();<NEW_LINE>try {<NEW_LINE>final ExchangeTransactionContract exchangeTransactionContract = this.any.unpack(ExchangeTransactionContract.class);<NEW_LINE>AccountCapsule accountCapsule = accountStore.get(exchangeTransactionContract.getOwnerAddress().toByteArray());<NEW_LINE>ExchangeCapsule exchangeCapsule = Commons.getExchangeStoreFinal(dynamicStore, exchangeStore, exchangeV2Store).get(ByteArray.fromLong(exchangeTransactionContract.getExchangeId()));<NEW_LINE>byte[] firstTokenID = exchangeCapsule.getFirstTokenId();<NEW_LINE>byte[] secondTokenID = exchangeCapsule.getSecondTokenId();<NEW_LINE>byte[] tokenID = exchangeTransactionContract.getTokenId().toByteArray();<NEW_LINE>long tokenQuant = exchangeTransactionContract.getQuant();<NEW_LINE>byte[] anotherTokenID;<NEW_LINE>long anotherTokenQuant = exchangeCapsule.transaction(tokenID, tokenQuant);<NEW_LINE>if (Arrays.equals(tokenID, firstTokenID)) {<NEW_LINE>anotherTokenID = secondTokenID;<NEW_LINE>} else {<NEW_LINE>anotherTokenID = firstTokenID;<NEW_LINE>}<NEW_LINE>long newBalance = accountCapsule.getBalance() - calcFee();<NEW_LINE>accountCapsule.setBalance(newBalance);<NEW_LINE>if (Arrays.equals(tokenID, TRX_SYMBOL_BYTES)) {<NEW_LINE>accountCapsule.setBalance(newBalance - tokenQuant);<NEW_LINE>} else {<NEW_LINE>accountCapsule.reduceAssetAmountV2(tokenID, tokenQuant, dynamicStore, assetIssueStore);<NEW_LINE>}<NEW_LINE>if (Arrays.equals(anotherTokenID, TRX_SYMBOL_BYTES)) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>accountCapsule.addAssetAmountV2(anotherTokenID, anotherTokenQuant, dynamicStore, assetIssueStore);<NEW_LINE>}<NEW_LINE>accountStore.put(accountCapsule.createDbKey(), accountCapsule);<NEW_LINE>Commons.putExchangeCapsule(exchangeCapsule, dynamicStore, exchangeStore, exchangeV2Store, assetIssueStore);<NEW_LINE>ret.setExchangeReceivedAmount(anotherTokenQuant);<NEW_LINE>ret.setStatus(fee, code.SUCESS);<NEW_LINE>} catch (ItemNotFoundException | InvalidProtocolBufferException e) {<NEW_LINE>logger.debug(e.getMessage(), e);<NEW_LINE>ret.setStatus(fee, code.FAILED);<NEW_LINE>throw new ContractExeException(e.getMessage());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
accountCapsule.setBalance(newBalance + anotherTokenQuant);
846,265
public void listen() {<NEW_LINE>super.listen();<NEW_LINE>if (eventData != null) {<NEW_LINE>if (eventData.shortTime) {<NEW_LINE>job = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>changeSatisfiedState(true);<NEW_LINE>if (eventData.repeat)<NEW_LINE>handler.postDelayed(<MASK><NEW_LINE>}<NEW_LINE>};<NEW_LINE>handler.postDelayed(job, eventData.time * INTERVAL_SECOND);<NEW_LINE>// if (eventData.repeat) {<NEW_LINE>// countDownTimer = new RepeatedTimer();<NEW_LINE>// } else {<NEW_LINE>// countDownTimer = new CountDownTimer(eventData.time * INTERVAL_SECOND, eventData.time * INTERVAL_SECOND) {<NEW_LINE>// @Override<NEW_LINE>// public void onTick(long millisUntilFinished) {<NEW_LINE>// Logger.d("onTick");<NEW_LINE>// }<NEW_LINE>//<NEW_LINE>// @Override<NEW_LINE>// public void onFinish() {<NEW_LINE>// Logger.d("onFinish");<NEW_LINE>// changeSatisfiedState(true);<NEW_LINE>// }<NEW_LINE>// };<NEW_LINE>// }<NEW_LINE>// countDownTimer.start();<NEW_LINE>} else {<NEW_LINE>Calendar now = Calendar.getInstance();<NEW_LINE>if (eventData.exact) {<NEW_LINE>mAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP, now.getTimeInMillis() + INTERVAL_MINUTE * eventData.time, INTERVAL_MINUTE * eventData.time, notifySelfIntent_positive);<NEW_LINE>} else {<NEW_LINE>mAlarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, now.getTimeInMillis() + INTERVAL_MINUTE * eventData.time, INTERVAL_MINUTE * eventData.time, notifySelfIntent_positive);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
job, eventData.time * INTERVAL_SECOND);
1,834,806
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "RAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,018,655
public static String compare(double sum, int k, int n, int w) {<NEW_LINE>Dirichlet uniformDirichlet, dirichlet;<NEW_LINE>StringBuffer output = new StringBuffer();<NEW_LINE>output.append(sum + "\t" + k + "\t" + n + "\t" + w + "\t");<NEW_LINE>uniformDirichlet = new Dirichlet(k, sum / k);<NEW_LINE>dirichlet = new Dirichlet(<MASK><NEW_LINE>// System.out.println("real: " + distributionToString(dirichlet.magnitude,<NEW_LINE>// dirichlet.partition));<NEW_LINE>Object[] observations = dirichlet.drawObservations(n, w);<NEW_LINE>// System.out.println("Done drawing...");<NEW_LINE>@Var<NEW_LINE>long time;<NEW_LINE>@Var<NEW_LINE>Dirichlet estimatedDirichlet = new Dirichlet(k, sum / k);<NEW_LINE>time = estimatedDirichlet.learnParametersWithDigamma(observations);<NEW_LINE>output.append(time + "\t" + dirichlet.absoluteDifference(estimatedDirichlet) + "\t");<NEW_LINE>estimatedDirichlet = new Dirichlet(k, sum / k);<NEW_LINE>time = estimatedDirichlet.learnParametersWithHistogram(observations);<NEW_LINE>output.append(time + "\t" + dirichlet.absoluteDifference(estimatedDirichlet) + "\t");<NEW_LINE>estimatedDirichlet = new Dirichlet(k, sum / k);<NEW_LINE>time = estimatedDirichlet.learnParametersWithMoments(observations);<NEW_LINE>output.append(time + "\t" + dirichlet.absoluteDifference(estimatedDirichlet) + "\t");<NEW_LINE>// System.out.println("Moments: " + time + ", " +<NEW_LINE>// dirichlet.absoluteDifference(estimatedDirichlet));<NEW_LINE>estimatedDirichlet = new Dirichlet(k, sum / k);<NEW_LINE>time = estimatedDirichlet.learnParametersWithLeaveOneOut(observations);<NEW_LINE>output.append(time + "\t" + dirichlet.absoluteDifference(estimatedDirichlet) + "\t");<NEW_LINE>// System.out.println("Leave One Out: " + time + ", " +<NEW_LINE>// dirichlet.absoluteDifference(estimatedDirichlet));<NEW_LINE>return output.toString();<NEW_LINE>}
sum, uniformDirichlet.nextDistribution());
656,442
boolean checkSaveChanges(ImageData<BufferedImage> imageData) {<NEW_LINE>if (!imageData.isChanged() || isReadOnly())<NEW_LINE>return true;<NEW_LINE>ProjectImageEntry<BufferedImage> entry = getProjectImageEntry(imageData);<NEW_LINE>String name = entry == null ? ServerTools.getDisplayableImageName(imageData.getServer()) : entry.getImageName();<NEW_LINE>var response = Dialogs.showYesNoCancelDialog("Save changes", "Save changes to " + name + "?");<NEW_LINE>if (response == DialogButton.CANCEL)<NEW_LINE>return false;<NEW_LINE>if (response == DialogButton.NO)<NEW_LINE>return true;<NEW_LINE>try {<NEW_LINE>if (entry == null) {<NEW_LINE>String lastPath = imageData.getLastSavedPath();<NEW_LINE>File lastFile = lastPath == null ? null : new File(lastPath);<NEW_LINE>File dirBase = lastFile == null ? null : lastFile.getParentFile();<NEW_LINE>String defaultName = lastFile == null ? null : lastFile.getName();<NEW_LINE>File file = Dialogs.promptToSaveFile("Save data", dirBase, defaultName, <MASK><NEW_LINE>if (file == null)<NEW_LINE>return false;<NEW_LINE>PathIO.writeImageData(file, imageData);<NEW_LINE>} else {<NEW_LINE>entry.saveImageData(imageData);<NEW_LINE>var project = getProject();<NEW_LINE>if (project != null)<NEW_LINE>project.syncChanges();<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} catch (IOException e) {<NEW_LINE>Dialogs.showErrorMessage("Save ImageData", e);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
"QuPath data files", PathPrefs.getSerializationExtension());
304,858
public void write(org.apache.thrift.protocol.TProtocol prot, getDelegationToken_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetSuccess()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (struct.isSetSec()) {<NEW_LINE>optionals.set(1);<NEW_LINE>}<NEW_LINE>if (struct.isSetTnase()) {<NEW_LINE>optionals.set(2);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (struct.isSetSuccess()) {<NEW_LINE>struct.success.write(oprot);<NEW_LINE>}<NEW_LINE>if (struct.isSetSec()) {<NEW_LINE>struct.sec.write(oprot);<NEW_LINE>}<NEW_LINE>if (struct.isSetTnase()) {<NEW_LINE>struct.tnase.write(oprot);<NEW_LINE>}<NEW_LINE>}
oprot.writeBitSet(optionals, 3);
810,221
private AttributedGraph createGraph(List<RecoveredClass> recoveredClasses) throws CancelledException {<NEW_LINE>GraphType graphType = new GraphTypeBuilder("Class Hierarchy Graph").vertexType(NO_INHERITANCE).vertexType(SINGLE_INHERITANCE).vertexType(MULTIPLE_INHERITANCE).edgeType(NON_VIRTUAL_INHERITANCE).edgeType(VIRTUAL_INHERITANCE).build();<NEW_LINE>AttributedGraph g = new AttributedGraph("Recovered Classes Graph", graphType);<NEW_LINE>Iterator<RecoveredClass> recoveredClassIterator = recoveredClasses.iterator();<NEW_LINE>while (recoveredClassIterator.hasNext()) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>RecoveredClass recoveredClass = recoveredClassIterator.next();<NEW_LINE>AttributedVertex classVertex = g.addVertex(recoveredClass.getClassPath().getPath(), recoveredClass.getName());<NEW_LINE>Map<RecoveredClass, List<RecoveredClass>> classHierarchyMap = recoveredClass.getClassHierarchyMap();<NEW_LINE>// no parent = blue vertex<NEW_LINE>if (classHierarchyMap.isEmpty()) {<NEW_LINE>classVertex.setVertexType(NO_INHERITANCE);<NEW_LINE>classVertex.setDescription(recoveredClass.<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Set<RecoveredClass> parents = classHierarchyMap.keySet();<NEW_LINE>// single parent = green vertex<NEW_LINE>if (parents.size() == 1) {<NEW_LINE>classVertex.setVertexType(SINGLE_INHERITANCE);<NEW_LINE>} else // multiple parents = red vertex<NEW_LINE>{<NEW_LINE>classVertex.setVertexType(MULTIPLE_INHERITANCE);<NEW_LINE>}<NEW_LINE>classVertex.setDescription(recoveredClass.getClassPath().getPath());<NEW_LINE>Map<RecoveredClass, Boolean> parentToBaseTypeMap = recoveredClass.getParentToBaseTypeMap();<NEW_LINE>Iterator<RecoveredClass> parentIterator = parents.iterator();<NEW_LINE>while (parentIterator.hasNext()) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>RecoveredClass parent = parentIterator.next();<NEW_LINE>AttributedVertex parentVertex = g.addVertex(parent.getClassPath().getPath(), parent.getName());<NEW_LINE>parentVertex.setDescription(parent.getClassPath().getPath());<NEW_LINE>AttributedEdge edge = g.addEdge(parentVertex, classVertex);<NEW_LINE>Boolean isVirtualParent = parentToBaseTypeMap.get(parent);<NEW_LINE>if (isVirtualParent == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// edge between child and parent is orange if child inherits the parent virtually<NEW_LINE>if (isVirtualParent) {<NEW_LINE>edge.setEdgeType(VIRTUAL_INHERITANCE);<NEW_LINE>} else {<NEW_LINE>edge.setEdgeType(NON_VIRTUAL_INHERITANCE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return g;<NEW_LINE>}
getClassPath().getPath());
36,565
final GetTopicRuleResult executeGetTopicRule(GetTopicRuleRequest getTopicRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTopicRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetTopicRuleRequest> request = null;<NEW_LINE>Response<GetTopicRuleResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new GetTopicRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getTopicRuleRequest));<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, "IoT");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTopicRule");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetTopicRuleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTopicRuleResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,808,146
static void migrate(MigrationContext migrationContext) {<NEW_LINE>final FilesFacade ff = migrationContext.getFf();<NEW_LINE>final Path path = migrationContext.getTablePath();<NEW_LINE>final <MASK><NEW_LINE>try (MemoryMARW rwMemory = migrationContext.getRwMemory()) {<NEW_LINE>path2.concat(TXN_FILE_NAME).$();<NEW_LINE>openFileSafe(rwMemory, ff, path2, TX_OFFSET_STRUCT_VERSION);<NEW_LINE>// Copy structure version from txn to meta.<NEW_LINE>long structureVersion = rwMemory.getLong(TX_OFFSET_STRUCT_VERSION);<NEW_LINE>path.concat(META_FILE_NAME).$();<NEW_LINE>openFileSafe(rwMemory, ff, path, META_OFFSET_STRUCTURE_VERSION);<NEW_LINE>LOG.advisory().$("copying structure version [version=").$(structureVersion).$(", migration=614, metadata=").$(path).I$();<NEW_LINE>rwMemory.putLong(META_OFFSET_STRUCTURE_VERSION, structureVersion);<NEW_LINE>}<NEW_LINE>}
Path path2 = migrationContext.getTablePath2();
1,618,942
CompletableFuture<Void> completeJob(MasterContext masterContext, Throwable error, long completionTime) {<NEW_LINE>return submitToCoordinatorThread(() -> {<NEW_LINE>// the order of operations is important.<NEW_LINE>List<RawJobMetrics> jobMetrics = masterContext.jobConfig().isStoreMetricsAfterJobCompletion() ? masterContext.jobContext().jobMetrics() : null;<NEW_LINE>jobRepository.completeJob(masterContext, jobMetrics, error, completionTime);<NEW_LINE>if (removeMasterContext(masterContext)) {<NEW_LINE>completeObservables(masterContext.jobRecord().getOwnedObservables(), error);<NEW_LINE>logger.fine(masterContext.jobIdString() + " is completed");<NEW_LINE>(error == null ? jobCompletedSuccessfully : jobCompletedWithFailure).inc();<NEW_LINE>} else {<NEW_LINE>MasterContext existing = masterContexts.get(masterContext.jobId());<NEW_LINE>if (existing != null) {<NEW_LINE>logger.severe("Different master context found to complete " + masterContext.jobIdString() + ", master context execution " + idToString(existing.executionId()));<NEW_LINE>} else {<NEW_LINE>logger.severe("No master context found to complete " + masterContext.jobIdString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>});<NEW_LINE>}
unscheduleJobTimeout(masterContext.jobId());
1,113,387
// ~ Methods ----------------------------------------------------------------<NEW_LINE>public void onMatch(RelOptRuleCall call) {<NEW_LINE>final Aggregate topAggRel = call.rel(0);<NEW_LINE>final Union union = call.rel(1);<NEW_LINE>// If distincts haven't been removed yet, defer invoking this rule<NEW_LINE>if (!union.all) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// We want to apply this rule on the pattern where the LogicalAggregate<NEW_LINE>// is the second input into the Union first. Hence, that's why the<NEW_LINE>// rule pattern matches on generic RelNodes rather than explicit<NEW_LINE>// UnionRels. By doing so, and firing this rule in a bottom-up order,<NEW_LINE>// it allows us to only specify a single pattern for this rule.<NEW_LINE>final <MASK><NEW_LINE>final Aggregate bottomAggRel;<NEW_LINE>if (call.rel(3) instanceof Aggregate) {<NEW_LINE>bottomAggRel = call.rel(3);<NEW_LINE>relBuilder.push(call.rel(2)).push(call.rel(3).getInput(0));<NEW_LINE>} else if (call.rel(2) instanceof Aggregate) {<NEW_LINE>bottomAggRel = call.rel(2);<NEW_LINE>relBuilder.push(call.rel(2).getInput(0)).push(call.rel(3));<NEW_LINE>} else {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Only pull up aggregates if they are there just to remove distincts<NEW_LINE>if (!topAggRel.getAggCallList().isEmpty() || !bottomAggRel.getAggCallList().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>relBuilder.union(true);<NEW_LINE>relBuilder.aggregate(relBuilder.groupKey(topAggRel.getGroupSet(), null), topAggRel.getAggCallList());<NEW_LINE>call.transformTo(relBuilder.build());<NEW_LINE>}
RelBuilder relBuilder = call.builder();
682,680
public <T extends OAuthClientResponse> T execute(OAuthClientRequest request, Map<String, String> headers, String requestMethod, Class<T> responseClass) throws OAuthSystemException, OAuthProblemException {<NEW_LINE>RequestTemplate req = new RequestTemplate().append(request.getLocationUri()).method(requestMethod).body(request.getBody());<NEW_LINE>for (Entry<String, String> entry : headers.entrySet()) {<NEW_LINE>req.header(entry.getKey(<MASK><NEW_LINE>}<NEW_LINE>Response feignResponse;<NEW_LINE>String body = "";<NEW_LINE>try {<NEW_LINE>feignResponse = client.execute(req.request(), new Options());<NEW_LINE>body = Util.toString(feignResponse.body().asReader());<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new OAuthSystemException(e);<NEW_LINE>}<NEW_LINE>String contentType = null;<NEW_LINE>Collection<String> contentTypeHeader = feignResponse.headers().get("Content-Type");<NEW_LINE>if (contentTypeHeader != null) {<NEW_LINE>contentType = StringUtil.join(contentTypeHeader.toArray(new String[0]), ";");<NEW_LINE>}<NEW_LINE>return OAuthClientResponseFactory.createCustomResponse(body, contentType, feignResponse.status(), responseClass);<NEW_LINE>}
), entry.getValue());
360,203
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>runAssertion(env, true, BEAN_TYPENAME, FBEAN, new EPTypeClass(InfraNestedIndexedPropLvl1[].class), InfraNestedIndexedPropLvl1.class.getName(), path);<NEW_LINE>runAssertion(env, true, MAP_TYPENAME, FMAP, new EPTypeClassParameterized(Map[].class, new EPTypeClass[] { EPTypePremade.STRING.getEPType(), EPTypePremade.OBJECT.getEPType() }), MAP_TYPENAME + "_1", path);<NEW_LINE>runAssertion(env, true, OA_TYPENAME, FOA, EPTypePremade.OBJECTARRAY.getEPType(), OA_TYPENAME + "_1", path);<NEW_LINE>runAssertion(env, true, XML_TYPENAME, FXML, EPTypePremade.NODEARRAY.getEPType(), XML_TYPENAME + ".l1", path);<NEW_LINE>runAssertion(env, true, AVRO_TYPENAME, FAVRO, new EPTypeClassParameterized(Collection.class, new EPTypeClass[] { new EPTypeClass(GenericData.Record.class) }), AVRO_TYPENAME + "_1", path);<NEW_LINE>// Json<NEW_LINE>String eplJson = "create json schema " + JSON_TYPENAME + "_4(lvl4 int);\n" + "create json schema " + JSON_TYPENAME + "_3(lvl3 int, l4 " + JSON_TYPENAME + "_4[]);\n" + "create json schema " + JSON_TYPENAME + "_2(lvl2 int, l3 " + JSON_TYPENAME + "_3[]);\n" + "create json schema " + JSON_TYPENAME + "_1(lvl1 int, l2 " + JSON_TYPENAME + "_2[]);\n" + "@name('types') @public @buseventtype create json schema " <MASK><NEW_LINE>env.compileDeploy(eplJson, path);<NEW_LINE>runAssertion(env, false, JSON_TYPENAME, FJSON, EPTypePremade.OBJECTARRAY.getEPType(), JSON_TYPENAME + "_1", path);<NEW_LINE>env.undeployModuleContaining("types");<NEW_LINE>// Json-Class-Provided<NEW_LINE>String eplJsonProvided = "@JsonSchema(className='" + MyLocalJSONProvidedLvl4.class.getName() + "') create json schema " + JSONPROVIDED_TYPENAME + "_4();\n" + "@JsonSchema(className='" + MyLocalJSONProvidedLvl3.class.getName() + "') create json schema " + JSONPROVIDED_TYPENAME + "_3(lvl3 int, l4 " + JSONPROVIDED_TYPENAME + "_4[]);\n" + "@JsonSchema(className='" + MyLocalJSONProvidedLvl2.class.getName() + "') create json schema " + JSONPROVIDED_TYPENAME + "_2(lvl2 int, l3 " + JSONPROVIDED_TYPENAME + "_3[]);\n" + "@JsonSchema(className='" + MyLocalJSONProvidedLvl1.class.getName() + "') create json schema " + JSONPROVIDED_TYPENAME + "_1(lvl1 int, l2 " + JSONPROVIDED_TYPENAME + "_2[]);\n" + "@JsonSchema(className='" + MyLocalJSONProvidedTop.class.getName() + "') @name('types') @public @buseventtype create json schema " + JSONPROVIDED_TYPENAME + "(l1 " + JSONPROVIDED_TYPENAME + "_1[]);\n";<NEW_LINE>env.compileDeploy(eplJsonProvided, path);<NEW_LINE>runAssertion(env, false, JSONPROVIDED_TYPENAME, FJSON, new EPTypeClass(MyLocalJSONProvidedLvl1[].class), "EventInfraPropertyNestedIndexedJsonProvided_1", path);<NEW_LINE>env.undeployAll();<NEW_LINE>}
+ JSON_TYPENAME + "(l1 " + JSON_TYPENAME + "_1[]);\n";
940,818
public void securedHandler() throws Exception {<NEW_LINE>// tag::securedHandler[]<NEW_LINE>Server server = new Server();<NEW_LINE>// Configure the HttpConfiguration for the clear-text connector.<NEW_LINE>int securePort = 8443;<NEW_LINE>HttpConfiguration httpConfig = new HttpConfiguration();<NEW_LINE>httpConfig.setSecurePort(securePort);<NEW_LINE>// The clear-text connector.<NEW_LINE>ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory(httpConfig));<NEW_LINE>connector.setPort(8080);<NEW_LINE>server.addConnector(connector);<NEW_LINE>// Configure the HttpConfiguration for the encrypted connector.<NEW_LINE>HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);<NEW_LINE>// Add the SecureRequestCustomizer because we are using TLS.<NEW_LINE>httpConfig.addCustomizer(new SecureRequestCustomizer());<NEW_LINE>// The HttpConnectionFactory for the encrypted connector.<NEW_LINE>HttpConnectionFactory http11 = new HttpConnectionFactory(httpsConfig);<NEW_LINE>// Configure the SslContextFactory with the keyStore information.<NEW_LINE>SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();<NEW_LINE>sslContextFactory.setKeyStorePath("/path/to/keystore");<NEW_LINE>sslContextFactory.setKeyStorePassword("secret");<NEW_LINE>// The ConnectionFactory for TLS.<NEW_LINE>SslConnectionFactory tls = new SslConnectionFactory(<MASK><NEW_LINE>// The encrypted connector.<NEW_LINE>ServerConnector secureConnector = new ServerConnector(server, tls, http11);<NEW_LINE>secureConnector.setPort(8443);<NEW_LINE>server.addConnector(secureConnector);<NEW_LINE>SecuredRedirectHandler securedHandler = new SecuredRedirectHandler();<NEW_LINE>// Link the SecuredRedirectHandler to the Server.<NEW_LINE>server.setHandler(securedHandler);<NEW_LINE>// Create a ContextHandlerCollection to hold contexts.<NEW_LINE>ContextHandlerCollection contextCollection = new ContextHandlerCollection();<NEW_LINE>// Link the ContextHandlerCollection to the StatisticsHandler.<NEW_LINE>securedHandler.setHandler(contextCollection);<NEW_LINE>server.start();<NEW_LINE>// end::securedHandler[]<NEW_LINE>}
sslContextFactory, http11.getProtocol());
182,197
private boolean addFollowing(DebugInformation debugInfo, SourceLocation location, String script, Set<SourceLocation> visited, Set<JavaScriptLocation> successors) {<NEW_LINE>if (!visited.add(location)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>SourceLocation[] following = debugInfo.getFollowingLines(location);<NEW_LINE>boolean exits = false;<NEW_LINE>if (following != null) {<NEW_LINE>for (SourceLocation successor : following) {<NEW_LINE>if (successor == null) {<NEW_LINE>exits = true;<NEW_LINE>} else {<NEW_LINE>Collection<GeneratedLocation> <MASK><NEW_LINE>if (!genLocations.isEmpty()) {<NEW_LINE>for (GeneratedLocation loc : genLocations) {<NEW_LINE>loc = debugInfo.getStatementLocation(loc);<NEW_LINE>successors.add(new JavaScriptLocation(script, loc.getLine(), loc.getColumn()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>exits |= addFollowing(debugInfo, successor, script, visited, successors);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return exits;<NEW_LINE>}
genLocations = debugInfo.getGeneratedLocations(successor);
1,048,925
public void onClick(View view) {<NEW_LINE>if (hoveringMarker.getVisibility() == View.VISIBLE) {<NEW_LINE>// Use the map target's coordinates to make a reverse geocoding search<NEW_LINE>final LatLng mapTargetLatLng = mapboxMap.getCameraPosition().target;<NEW_LINE>// Hide the hovering red hovering ImageView marker<NEW_LINE>hoveringMarker.setVisibility(View.INVISIBLE);<NEW_LINE>// Transform the appearance of the button to become the cancel button<NEW_LINE>selectLocationButton.setBackgroundColor(ContextCompat.getColor(LocationPickerActivity.this, R.color.colorAccent));<NEW_LINE>selectLocationButton.setText(getString(R.string.location_picker_select_location_button_cancel));<NEW_LINE>// Show the SymbolLayer icon to represent the selected map location<NEW_LINE>if (style.getLayer(DROPPED_MARKER_LAYER_ID) != null) {<NEW_LINE>GeoJsonSource source = style.getSourceAs("dropped-marker-source-id");<NEW_LINE>if (source != null) {<NEW_LINE>source.setGeoJson(Point.fromLngLat(mapTargetLatLng.getLongitude(), mapTargetLatLng.getLatitude()));<NEW_LINE>}<NEW_LINE>droppedMarkerLayer = style.getLayer(DROPPED_MARKER_LAYER_ID);<NEW_LINE>if (droppedMarkerLayer != null) {<NEW_LINE>droppedMarkerLayer.setProperties(visibility(VISIBLE));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Use the map camera target's coordinates to make a reverse geocoding search<NEW_LINE>reverseGeocode(Point.fromLngLat(mapTargetLatLng.getLongitude(), mapTargetLatLng.getLatitude()));<NEW_LINE>} else {<NEW_LINE>// Switch the button appearance back to select a location.<NEW_LINE>selectLocationButton.setBackgroundColor(ContextCompat.getColor(LocationPickerActivity.this, R.color.colorPrimary));<NEW_LINE>selectLocationButton.setText(getString(R.string.location_picker_select_location_button_select));<NEW_LINE>// Show the red hovering ImageView marker<NEW_LINE><MASK><NEW_LINE>// Hide the selected location SymbolLayer<NEW_LINE>droppedMarkerLayer = style.getLayer(DROPPED_MARKER_LAYER_ID);<NEW_LINE>if (droppedMarkerLayer != null) {<NEW_LINE>droppedMarkerLayer.setProperties(visibility(NONE));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
hoveringMarker.setVisibility(View.VISIBLE);
1,475,052
public PartitionPlan mapPartitions() throws Exception {<NEW_LINE>int numRecords = ReaderData.outerLoop.length * ReaderData.innerLoop.length;<NEW_LINE>logger.fine("In mapper, # of records = " + numRecords);<NEW_LINE><MASK><NEW_LINE>logger.fine("In mapper, # of partitions = " + numPartitions);<NEW_LINE>PartitionPlanImpl plan = new PartitionPlanImpl();<NEW_LINE>plan.setPartitions(numPartitions);<NEW_LINE>List<Properties> partitionProperties = new ArrayList<Properties>(numPartitions);<NEW_LINE>// If the number of records is evenly divisible by the number of partitions, then<NEW_LINE>// all partitions are the same size (so 'extraRecords' = 0).<NEW_LINE>int minNumRecordsPerPartition = numRecords / numPartitions;<NEW_LINE>int extraRecords = numRecords % numPartitions;<NEW_LINE>logger.fine("In mapper, # each partition will have at least = " + minNumRecordsPerPartition + " # of records and " + extraRecords + " partitions will have " + minNumRecordsPerPartition + 1 + " records");<NEW_LINE>int i;<NEW_LINE>for (i = 0; i < numPartitions; i++) {<NEW_LINE>Properties p = new Properties();<NEW_LINE>p.setProperty("startAtIndex", Integer.toString(i));<NEW_LINE>p.setProperty("partitionSize", Integer.toString(ReaderData.innerLoop.length));<NEW_LINE>logger.fine("In mapper, partition # " + i + " will start at outer loop index of: " + i + " and contain " + ReaderData.innerLoop.length + " # of records.");<NEW_LINE>partitionProperties.add(p);<NEW_LINE>}<NEW_LINE>if (i != ReaderData.outerLoop.length) {<NEW_LINE>String errorMsg = "Messed up calculation in mapper. Outer loop size = " + ReaderData.outerLoop.length + " but only assigned partitions # = " + i;<NEW_LINE>throw new IllegalStateException(errorMsg);<NEW_LINE>}<NEW_LINE>plan.setPartitionProperties(partitionProperties.toArray(new Properties[0]));<NEW_LINE>return plan;<NEW_LINE>}
int numPartitions = ReaderData.outerLoop.length;
1,466,254
void checkThreadPoolLeak(ExecutorService e, Exception stackTraceEx) {<NEW_LINE>if (this.detectionLevel == ThreadLeakDetectionLevel.None) {<NEW_LINE>// Not doing anything in this case.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!e.isShutdown()) {<NEW_LINE>log.warn("THREAD POOL LEAK: {} (ShutDown={}, Terminated={}) finalized without being properly shut down.", e, e.isShutdown(), <MASK><NEW_LINE>if (this.detectionLevel == ThreadLeakDetectionLevel.Aggressive) {<NEW_LINE>// Not pretty, but outputting this stack trace on System.err helps with those unit tests that turned off<NEW_LINE>// logging.<NEW_LINE>stackTraceEx.printStackTrace(System.err);<NEW_LINE>log.error("THREAD POOL LEAK DETECTED WITH LEVEL SET TO {}. SHUTTING DOWN.", ThreadLeakDetectionLevel.Aggressive);<NEW_LINE>this.onLeakDetected.run();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
e.isTerminated(), stackTraceEx);
826,909
private static void fixRange(List<Object> paragraphs, String startElement, String endElement) throws Exception {<NEW_LINE>RangeFinder rt = new RangeFinder(startElement, endElement);<NEW_LINE>new TraversalUtil(paragraphs, rt);<NEW_LINE>for (CTBookmark bm : rt.getStarts()) {<NEW_LINE>try {<NEW_LINE>// Can't just remove the object from the parent,<NEW_LINE>// since in the parent, it may be wrapped in a JAXBElement<NEW_LINE>List<Object> theList = null;<NEW_LINE>if (bm.getParent() instanceof List) {<NEW_LINE>// eg body.getContent()<NEW_LINE>theList = (List) bm.getParent();<NEW_LINE>} else {<NEW_LINE>theList = ((ContentAccessor) (bm.getParent())).getContent();<NEW_LINE>}<NEW_LINE>Object deleteMe = null;<NEW_LINE>for (Object ox : theList) {<NEW_LINE>if (XmlUtils.unwrap(ox).equals(bm)) {<NEW_LINE>deleteMe = ox;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (deleteMe != null) {<NEW_LINE>theList.remove(deleteMe);<NEW_LINE>}<NEW_LINE>} catch (ClassCastException cce) {<NEW_LINE>log.error(cce.getMessage(), cce);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (CTMarkupRange mr : rt.getEnds()) {<NEW_LINE>try {<NEW_LINE>// Can't just remove the object from the parent,<NEW_LINE>// since in the parent, it may be wrapped in a JAXBElement<NEW_LINE>List<Object> theList = null;<NEW_LINE>if (mr.getParent() instanceof List) {<NEW_LINE>// eg body.getContent()<NEW_LINE>theList = <MASK><NEW_LINE>} else {<NEW_LINE>theList = ((ContentAccessor) (mr.getParent())).getContent();<NEW_LINE>}<NEW_LINE>Object deleteMe = null;<NEW_LINE>for (Object ox : theList) {<NEW_LINE>if (XmlUtils.unwrap(ox).equals(mr)) {<NEW_LINE>deleteMe = ox;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (deleteMe != null) {<NEW_LINE>theList.remove(deleteMe);<NEW_LINE>}<NEW_LINE>} catch (ClassCastException cce) {<NEW_LINE>log.info(mr.getParent().getClass().getName());<NEW_LINE>log.error(cce.getMessage(), cce);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NB: this leaves begin|separate|end behind!<NEW_LINE>// It would be better to delete the whole field, or just leave it,<NEW_LINE>// so this is commented out. Result in Word will be "bookmark undefined!"<NEW_LINE>// for (Text instrText : rt.refs) {<NEW_LINE>// try {<NEW_LINE>// List<Object> theList = ((ContentAccessor)(instrText.getParent())).getContent();<NEW_LINE>// Object deleteMe = null;<NEW_LINE>// for (Object ox : theList) {<NEW_LINE>// if (XmlUtils.unwrap(ox).equals(instrText)) {<NEW_LINE>// deleteMe = ox;<NEW_LINE>// break;<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>// if (deleteMe!=null) {<NEW_LINE>// theList.remove(deleteMe);<NEW_LINE>// }<NEW_LINE>// } catch (ClassCastException cce) {<NEW_LINE>// log.info(instrText.getParent().getClass().getName());<NEW_LINE>// log.error(cce);<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>}
(List) mr.getParent();
1,803,364
static private Diagnostic error2Diagnostic(ErrorDescription error, LineDocument lineDocument, int idx) {<NEW_LINE>int s = error.getRange().getBegin().getOffset();<NEW_LINE>int e = error.getRange().getEnd().getOffset();<NEW_LINE>Diagnostic.Builder diagBuilder = Diagnostic.Builder.create(() -> {<NEW_LINE>if (lineDocument != null) {<NEW_LINE>try {<NEW_LINE>return LineDocumentUtils.getLineFirstNonWhitespace(lineDocument, s);<NEW_LINE>} catch (BadLocationException ex) {<NEW_LINE>return s;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return s;<NEW_LINE>}, () -> {<NEW_LINE>if (lineDocument != null) {<NEW_LINE>try {<NEW_LINE>return LineDocumentUtils.getLineLastNonWhitespace(lineDocument, e);<NEW_LINE>} catch (BadLocationException ex) {<NEW_LINE>return e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return e;<NEW_LINE><MASK><NEW_LINE>switch(error.getSeverity()) {<NEW_LINE>case VERIFIER:<NEW_LINE>case ERROR:<NEW_LINE>diagBuilder.setSeverity(Diagnostic.Severity.Error);<NEW_LINE>break;<NEW_LINE>case WARNING:<NEW_LINE>diagBuilder.setSeverity(Diagnostic.Severity.Warning);<NEW_LINE>break;<NEW_LINE>case HINT:<NEW_LINE>diagBuilder.setSeverity(Diagnostic.Severity.Information);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>String id = "errors:" + idx + "-" + error.getId();<NEW_LINE>diagBuilder.setCode(id);<NEW_LINE>return diagBuilder.build();<NEW_LINE>}
}, error.getDescription());
1,670,417
public SchemaInfo parse(InputSource in) {<NEW_LINE>// NOI18N<NEW_LINE>Util.THIS.debug("SchemaParser started.");<NEW_LINE>try {<NEW_LINE>depth = 0;<NEW_LINE>XMLReader parser = XMLUtil.createXMLReader(false, true);<NEW_LINE>parser.setContentHandler(this);<NEW_LINE>parser.setErrorHandler(this);<NEW_LINE>UserCatalog catalog = UserCatalog.getDefault();<NEW_LINE>EntityResolver res = (catalog == null ? null : catalog.getEntityResolver());<NEW_LINE>if (res != null)<NEW_LINE>parser.setEntityResolver(res);<NEW_LINE>parser.parse(in);<NEW_LINE>return info;<NEW_LINE>} catch (SAXException ex) {<NEW_LINE>// NOI18N<NEW_LINE>Util.THIS.debug("Ignoring ex. thrown while looking for Schema roots:", ex);<NEW_LINE>if (ex.getException() instanceof RuntimeException) {<NEW_LINE>// NOI18N<NEW_LINE>Util.THIS.debug("Nested exception:", ex.getException());<NEW_LINE>}<NEW_LINE>// better partial result than nothing<NEW_LINE>return info;<NEW_LINE>} catch (IOException ex) {<NEW_LINE>// NOI18N<NEW_LINE>Util.THIS.debug("Ignoring ex. thrown while looking for Schema roots:", ex);<NEW_LINE>// better partial result than nothing<NEW_LINE>return info;<NEW_LINE>} finally {<NEW_LINE>// NOI18N<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
Util.THIS.debug("SchemaParser stopped.");
913,005
public ListModelsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListModelsResult listModelsResult = new ListModelsResult();<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 listModelsResult;<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("Models", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listModelsResult.setModels(new ListUnmarshaller<ModelMetadata>(ModelMetadataJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listModelsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listModelsResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
206,288
public Answer deleteVolume(final DeleteCommand cmd) {<NEW_LINE>final VolumeObjectTO vol = (VolumeObjectTO) cmd.getData();<NEW_LINE>final PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO) vol.getDataStore();<NEW_LINE>try {<NEW_LINE>final KVMStoragePool pool = storagePoolMgr.getStoragePool(primaryStore.getPoolType(), primaryStore.getUuid());<NEW_LINE>try {<NEW_LINE>pool.<MASK><NEW_LINE>} catch (final Exception e) {<NEW_LINE>s_logger.debug("can't find volume: " + vol.getPath() + ", return true");<NEW_LINE>return new Answer(null);<NEW_LINE>}<NEW_LINE>pool.deletePhysicalDisk(vol.getPath(), vol.getFormat());<NEW_LINE>return new Answer(null);<NEW_LINE>} catch (final CloudRuntimeException e) {<NEW_LINE>s_logger.debug("Failed to delete volume: ", e);<NEW_LINE>return new Answer(null, false, e.toString());<NEW_LINE>}<NEW_LINE>}
getPhysicalDisk(vol.getPath());
669,185
protected WebRtcServiceState handleDropCall(@NonNull WebRtcServiceState currentState, long callId) {<NEW_LINE>Log.i(tag, "handleDropCall(): call_id: " + callId);<NEW_LINE>CallId id = new CallId(callId);<NEW_LINE>RemotePeer callIdPeer = currentState.getCallInfoState().getPeerByCallId(id);<NEW_LINE>RemotePeer activePeer = currentState.getCallInfoState().getActivePeer();<NEW_LINE>boolean isActivePeer = activePeer != null && activePeer.getCallId().equals(id);<NEW_LINE>try {<NEW_LINE>if (callIdPeer != null && currentState.getCallInfoState().getCallState() == WebRtcViewModel.State.CALL_INCOMING) {<NEW_LINE>webRtcInteractor.insertMissedCall(callIdPeer, callIdPeer.getCallStartTimestamp(), currentState.getCallSetupState(id).isRemoteVideoOffer());<NEW_LINE>}<NEW_LINE>webRtcInteractor.getCallManager().hangup();<NEW_LINE>currentState = currentState.builder().changeCallInfoState().callState(WebRtcViewModel.State.CALL_DISCONNECTED).groupCallState(WebRtcViewModel.GroupCallState.DISCONNECTED).build();<NEW_LINE>webRtcInteractor.postStateUpdate(currentState);<NEW_LINE>return terminate(<MASK><NEW_LINE>} catch (CallException e) {<NEW_LINE>return callFailure(currentState, "hangup() failed: ", e);<NEW_LINE>}<NEW_LINE>}
currentState, isActivePeer ? activePeer : callIdPeer);
396,671
public static PipeItemModel create(ItemPipe item, int colorIndex) {<NEW_LINE>TextureAtlasSprite sprite = item.getSprite();<NEW_LINE>if (sprite == null) {<NEW_LINE>sprite = Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite();<NEW_LINE>}<NEW_LINE>Vec3d center = Utils.VEC_HALF;<NEW_LINE>Vec3d radius = new Vec3d(0.25, 0.5, 0.25);<NEW_LINE>EntityResizableCuboid cuboid = new EntityResizableCuboid(null);<NEW_LINE>cuboid.texture = sprite;<NEW_LINE>cuboid.setTextureOffset(new Vec3d(4, 0, 4));<NEW_LINE>cuboid.setPosition(center.subtract(radius));<NEW_LINE>cuboid.setSize(Utils.multiply(radius, 2));<NEW_LINE>List<MutableQuad> unprocessed = Lists.newArrayList();<NEW_LINE>List<BakedQuad> quads = Lists.newArrayList();<NEW_LINE>RenderResizableCuboid.bakeCube(unprocessed, cuboid, true, false);<NEW_LINE>for (MutableQuad quad : unprocessed) {<NEW_LINE>quad.normalf(0, 1, 0);<NEW_LINE>ModelUtil.appendBakeQuads(quads, DefaultVertexFormats.ITEM, quad);<NEW_LINE>}<NEW_LINE>unprocessed.clear();<NEW_LINE>// Set up the colour<NEW_LINE>if (colorIndex != 0) {<NEW_LINE>// Very sligthly smaller<NEW_LINE>radius = new Vec3d(0.249, 0.499, 0.249);<NEW_LINE>cuboid = new EntityResizableCuboid(null);<NEW_LINE>cuboid.setTextureOffset(new Vec3d(4, 0, 4));<NEW_LINE>cuboid.texture = PipeIconProvider.TYPE.PipeStainedOverlay.getIcon();<NEW_LINE>cuboid.setPosition(center.subtract(radius));<NEW_LINE>cuboid.setSize(Utils.multiply(radius, 2));<NEW_LINE>// Render it into a different list<NEW_LINE>RenderResizableCuboid.bakeCube(unprocessed, cuboid, true, false);<NEW_LINE>EnumDyeColor dye = EnumDyeColor.byDyeDamage(colorIndex - 1);<NEW_LINE>int quadColor = ColorUtils.getLightHex(dye);<NEW_LINE>// Add all of the quads we just rendered to the main list<NEW_LINE>for (MutableQuad quad : unprocessed) {<NEW_LINE>quad.<MASK><NEW_LINE>quad.setTint(quadColor);<NEW_LINE>ModelUtil.appendBakeQuads(quads, DefaultVertexFormats.ITEM, quad);<NEW_LINE>}<NEW_LINE>unprocessed.clear();<NEW_LINE>}<NEW_LINE>return new PipeItemModel(ImmutableList.copyOf(quads), sprite);<NEW_LINE>}
normalf(0, 1, 0);
1,457,285
public DescribeAuditSuppressionResult describeAuditSuppression(DescribeAuditSuppressionRequest describeAuditSuppressionRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAuditSuppressionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeAuditSuppressionRequest> request = null;<NEW_LINE>Response<DescribeAuditSuppressionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeAuditSuppressionRequestMarshaller().marshall(describeAuditSuppressionRequest);<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<DescribeAuditSuppressionResult, JsonUnmarshallerContext> unmarshaller = new DescribeAuditSuppressionResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<DescribeAuditSuppressionResult> responseHandler = new JsonResponseHandler<DescribeAuditSuppressionResult>(unmarshaller);<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
525,969
public static GetRegisterHistoryListResponse unmarshall(GetRegisterHistoryListResponse getRegisterHistoryListResponse, UnmarshallerContext context) {<NEW_LINE>getRegisterHistoryListResponse.setRequestId(context.stringValue("GetRegisterHistoryListResponse.RequestId"));<NEW_LINE>getRegisterHistoryListResponse.setErrorCode(context.integerValue("GetRegisterHistoryListResponse.ErrorCode"));<NEW_LINE>getRegisterHistoryListResponse.setErrorMsg(context.stringValue("GetRegisterHistoryListResponse.ErrorMsg"));<NEW_LINE>getRegisterHistoryListResponse.setSuccess(context.booleanValue("GetRegisterHistoryListResponse.Success"));<NEW_LINE>List<RegisterHistoryInfo> data = new ArrayList<RegisterHistoryInfo>();<NEW_LINE>for (int i = 0; i < context.lengthValue("GetRegisterHistoryListResponse.Data.Length"); i++) {<NEW_LINE>RegisterHistoryInfo registerHistoryInfo = new RegisterHistoryInfo();<NEW_LINE>registerHistoryInfo.setCreateTimeL(context.longValue("GetRegisterHistoryListResponse.Data[" + i + "].CreateTimeL"));<NEW_LINE>registerHistoryInfo.setDrIp(context.stringValue("GetRegisterHistoryListResponse.Data[" + i + "].DrIp"));<NEW_LINE>registerHistoryInfo.setDrMac(context.stringValue("GetRegisterHistoryListResponse.Data[" + i + "].DrMac"));<NEW_LINE>registerHistoryInfo.setDrName(context.stringValue("GetRegisterHistoryListResponse.Data[" + i + "].DrName"));<NEW_LINE>registerHistoryInfo.setEventinfo(context.stringValue("GetRegisterHistoryListResponse.Data[" + i + "].Eventinfo"));<NEW_LINE>registerHistoryInfo.setEventtype(context.integerValue("GetRegisterHistoryListResponse.Data[" + i + "].Eventtype"));<NEW_LINE>registerHistoryInfo.setEventtypeTxt(context.stringValue("GetRegisterHistoryListResponse.Data[" + i + "].EventtypeTxt"));<NEW_LINE>registerHistoryInfo.setMemo(context.stringValue<MASK><NEW_LINE>registerHistoryInfo.setScreencode(context.stringValue("GetRegisterHistoryListResponse.Data[" + i + "].Screencode"));<NEW_LINE>data.add(registerHistoryInfo);<NEW_LINE>}<NEW_LINE>getRegisterHistoryListResponse.setData(data);<NEW_LINE>List<ErrorMessage> errorList = new ArrayList<ErrorMessage>();<NEW_LINE>for (int i = 0; i < context.lengthValue("GetRegisterHistoryListResponse.ErrorList.Length"); i++) {<NEW_LINE>ErrorMessage errorMessage = new ErrorMessage();<NEW_LINE>errorMessage.setErrorMessage(context.stringValue("GetRegisterHistoryListResponse.ErrorList[" + i + "].ErrorMessage"));<NEW_LINE>errorList.add(errorMessage);<NEW_LINE>}<NEW_LINE>getRegisterHistoryListResponse.setErrorList(errorList);<NEW_LINE>return getRegisterHistoryListResponse;<NEW_LINE>}
("GetRegisterHistoryListResponse.Data[" + i + "].Memo"));
402,156
void colorB_actionPerformed(ActionEvent e) {<NEW_LINE>// Fix until Sun's JVM supports more locales...<NEW_LINE>UIManager.put("ColorChooser.swatchesNameText", Local.getString("Swatches"));<NEW_LINE>UIManager.put("ColorChooser.hsbNameText", Local.getString("HSB"));<NEW_LINE>UIManager.put("ColorChooser.rgbNameText", Local.getString("RGB"));<NEW_LINE>UIManager.put("ColorChooser.swatchesRecentText", Local.getString("Recent:"));<NEW_LINE>UIManager.put("ColorChooser.previewText", Local.getString("Preview"));<NEW_LINE>UIManager.put("ColorChooser.sampleText", Local.getString("Sample Text") + " " + Local.getString("Sample Text"));<NEW_LINE>UIManager.put("ColorChooser.okText", Local.getString("OK"));<NEW_LINE>UIManager.put("ColorChooser.cancelText", Local.getString("Cancel"));<NEW_LINE>UIManager.put("ColorChooser.resetText", Local.getString("Reset"));<NEW_LINE>UIManager.put("ColorChooser.hsbHueText", Local.getString("H"));<NEW_LINE>UIManager.put("ColorChooser.hsbSaturationText", Local.getString("S"));<NEW_LINE>UIManager.put("ColorChooser.hsbBrightnessText", Local.getString("B"));<NEW_LINE>UIManager.put("ColorChooser.hsbRedText", Local.getString("R"));<NEW_LINE>UIManager.put("ColorChooser.hsbGreenText", Local.getString("G"));<NEW_LINE>UIManager.put("ColorChooser.hsbBlueText"<MASK><NEW_LINE>UIManager.put("ColorChooser.rgbRedText", Local.getString("Red"));<NEW_LINE>UIManager.put("ColorChooser.rgbGreenText", Local.getString("Green"));<NEW_LINE>UIManager.put("ColorChooser.rgbBlueText", Local.getString("Blue"));<NEW_LINE>Color c = JColorChooser.showDialog(this, Local.getString("Font color"), Util.decodeColor(colorField.getText()));<NEW_LINE>if (c == null)<NEW_LINE>return;<NEW_LINE>colorField.setText(Util.encodeColor(c));<NEW_LINE>Util.setColorField(colorField);<NEW_LINE>sample.setForeground(c);<NEW_LINE>}
, Local.getString("B2"));
906,329
final protected void createUI() {<NEW_LINE>backgroundImage = Icons.getIcon("logo.wizard.png");<NEW_LINE>setLayout(new BorderLayout(7, 7));<NEW_LINE>marginPanel.setPreferredSize(new Dimension(150, 400));<NEW_LINE>add(marginPanel, BorderLayout.WEST);<NEW_LINE>marginPanel.setOpaque(false);<NEW_LINE>marginPanel.setEnabled(false);<NEW_LINE>marginPanel.<MASK><NEW_LINE>marginLabel.setBorder(BorderFactory.createEmptyBorder(30, 8, 0, 0));<NEW_LINE>instructionArea.setBorder(null);<NEW_LINE>instructionArea.setOpaque(false);<NEW_LINE>// instructionArea.setWrapStyleWord(true);<NEW_LINE>// instructionArea.setLineWrap(true);<NEW_LINE>// instructionArea.setEditable(false);<NEW_LINE>setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));<NEW_LINE>JPanel containerPanel = new JPanel(new BorderLayout(7, 7));<NEW_LINE>add(containerPanel);<NEW_LINE>containerPanel.setOpaque(false);<NEW_LINE>JLabel label = new JLabel(title);<NEW_LINE>label.setOpaque(false);<NEW_LINE>label.setFont(label.getFont().deriveFont(Font.BOLD, 14.0f));<NEW_LINE>containerPanel.add(label, BorderLayout.NORTH);<NEW_LINE>JPanel contentAndInstructionHolder = new HolderPanel();<NEW_LINE>contentAndInstructionHolder.add(instructionArea, BorderLayout.NORTH);<NEW_LINE>JPanel contentBorderPanel = new JPanel(new BorderLayout());<NEW_LINE>contentBorderPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 0));<NEW_LINE>contentBorderPanel.add(contentHolder);<NEW_LINE>contentBorderPanel.setOpaque(false);<NEW_LINE>contentHolder.setOpaque(false);<NEW_LINE>contentAndInstructionHolder.add(contentBorderPanel, BorderLayout.CENTER);<NEW_LINE>containerPanel.add(contentAndInstructionHolder);<NEW_LINE>createUI(contentHolder);<NEW_LINE>setComponentTransparency(contentHolder);<NEW_LINE>}
add(marginLabel, BorderLayout.NORTH);
68,775
public static void main(final String[] args) {<NEW_LINE>CommandSpec spec = CommandSpec.create();<NEW_LINE>spec.mixinStandardHelpOptions(true);<NEW_LINE>spec.addOption(OptionSpec.builder("-c", "--count").paramLabel("COUNT").type(int.class).description("number of times to execute").build());<NEW_LINE>spec.addPositional(PositionalParamSpec.builder().paramLabel("FILES").type(List.class).auxiliaryTypes(File.class).description("The files to process").build());<NEW_LINE>CommandLine commandLine = new CommandLine(spec);<NEW_LINE>class Handler implements IExecutionStrategy {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int execute(ParseResult pr) {<NEW_LINE>int count = pr.matchedOptionValue('c', 1);<NEW_LINE>List<File> files = pr.matchedPositionalValue(0, Collections.<File>emptyList());<NEW_LINE>for (File f : files) {<NEW_LINE>for (int i = 0; i < count; i++) {<NEW_LINE>System.out.println(i + " " + f.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>pr.commandSpec().commandLine().setExecutionResult(files.size());<NEW_LINE>return ExitCode.OK;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>commandLine.setExecutionStrategy(new Handler());<NEW_LINE>commandLine.execute(args);<NEW_LINE><MASK><NEW_LINE>}
int processed = commandLine.getExecutionResult();
367,254
void acquireClaimedStream(Promise<Channel> promise) {<NEW_LINE>doInEventLoop(connection.eventLoop(), () -> {<NEW_LINE>if (state != RecordState.OPEN) {<NEW_LINE>String message;<NEW_LINE>// GOAWAY<NEW_LINE>if (state == RecordState.CLOSED_TO_NEW) {<NEW_LINE>message = String.format("Connection %s received GOAWAY with Last Stream ID %d. Unable to open new " + "streams on this connection.", connection, lastStreamId);<NEW_LINE>} else {<NEW_LINE>message = String.format("Connection %s was closed while acquiring new stream.", connection);<NEW_LINE>}<NEW_LINE>log.warn(connection, () -> message);<NEW_LINE>promise.setFailure(new IOException(message));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Future<Http2StreamChannel> streamFuture = new <MASK><NEW_LINE>streamFuture.addListener((GenericFutureListener<Future<Http2StreamChannel>>) future -> {<NEW_LINE>warnIfNotInEventLoop(connection.eventLoop());<NEW_LINE>if (!future.isSuccess()) {<NEW_LINE>promise.setFailure(future.cause());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Http2StreamChannel channel = future.getNow();<NEW_LINE>channel.pipeline().addLast(UnusedChannelExceptionHandler.getInstance());<NEW_LINE>channel.attr(ChannelAttributeKey.HTTP2_FRAME_STREAM).set(channel.stream());<NEW_LINE>channel.attr(ChannelAttributeKey.CHANNEL_DIAGNOSTICS).set(new ChannelDiagnostics(channel));<NEW_LINE>childChannels.put(channel.id(), channel);<NEW_LINE>promise.setSuccess(channel);<NEW_LINE>if (closeIfIdleTask == null && allowedIdleConnectionTimeMillis != null) {<NEW_LINE>enableCloseIfIdleTask();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}, promise);<NEW_LINE>}
Http2StreamChannelBootstrap(connection).open();
958,136
final DeleteEventsConfigurationResult executeDeleteEventsConfiguration(DeleteEventsConfigurationRequest deleteEventsConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteEventsConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteEventsConfigurationRequest> request = null;<NEW_LINE>Response<DeleteEventsConfigurationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteEventsConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteEventsConfigurationRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Chime");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteEventsConfiguration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteEventsConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new DeleteEventsConfigurationResultJsonUnmarshaller());
1,797,640
public void apply(TunerConfiguration config) throws SourceException {<NEW_LINE>if (config != null && config instanceof E4KTunerConfiguration) {<NEW_LINE>E4KTunerConfiguration e4kConfig = (E4KTunerConfiguration) config;<NEW_LINE>try {<NEW_LINE>SampleRate sampleRate = e4kConfig.getSampleRate();<NEW_LINE>setSampleRate(sampleRate);<NEW_LINE>double correction = e4kConfig.getFrequencyCorrection();<NEW_LINE>setFrequencyCorrection(correction);<NEW_LINE><MASK><NEW_LINE>setGain(masterGain, true);<NEW_LINE>if (masterGain == E4KGain.MANUAL) {<NEW_LINE>E4KMixerGain mixerGain = e4kConfig.getMixerGain();<NEW_LINE>setMixerGain(mixerGain, true);<NEW_LINE>E4KLNAGain lnaGain = e4kConfig.getLNAGain();<NEW_LINE>setLNAGain(lnaGain, true);<NEW_LINE>E4KEnhanceGain enhanceGain = e4kConfig.getEnhanceGain();<NEW_LINE>setEnhanceGain(enhanceGain, true);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>setFrequency(e4kConfig.getFrequency());<NEW_LINE>} catch (SourceException se) {<NEW_LINE>// Do nothing, we couldn't set the frequency<NEW_LINE>}<NEW_LINE>} catch (UsbException e) {<NEW_LINE>throw new SourceException("E4KTunerController - usb error " + "while applying tuner config", e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("E4KTunerController - cannot " + "apply tuner configuration of type:[" + config.getClass() + "]");<NEW_LINE>}<NEW_LINE>}
E4KGain masterGain = e4kConfig.getMasterGain();
1,430,606
// return: read lines from URL, url strings<NEW_LINE>@NonNull<NEW_LINE>static Pair<LinkedHashSet<String>, Set<String>> readLinesFromExtensionFiles(/* input */<NEW_LINE>@NonNull Enumeration<URL> extensionFiles, /* input/output, map url string -> content lines */<NEW_LINE>@NonNull Map<String, LinkedHashSet<String>> redExtensionFilesHistory) {<NEW_LINE>final LinkedHashSet<String> mergedLines = new LinkedHashSet<String>();<NEW_LINE>final Set<String> stringUrls = new HashSet<String>();<NEW_LINE>while (extensionFiles.hasMoreElements()) {<NEW_LINE>final URL url = extensionFiles.nextElement();<NEW_LINE>final String urlString = url.toString();<NEW_LINE>stringUrls.add(urlString);<NEW_LINE>LinkedHashSet<String> lines;<NEW_LINE>if (redExtensionFilesHistory.containsKey(urlString)) {<NEW_LINE>lines = redExtensionFilesHistory.get(urlString);<NEW_LINE>} else {<NEW_LINE>lines = readLines(url);<NEW_LINE>redExtensionFilesHistory.put(urlString, lines);<NEW_LINE>}<NEW_LINE>mergedLines.addAll(lines);<NEW_LINE>}<NEW_LINE>return new Pair<LinkedHashSet<String>, Set<<MASK><NEW_LINE>}
String>>(mergedLines, stringUrls);
345,637
private void loadSessionsFromRemoteCache(final KeycloakSessionFactory sessionFactory, String cacheName, final int sessionsPerSegment, final int maxErrors) {<NEW_LINE>log.debugf("Check pre-loading sessions from remote cache '%s'", cacheName);<NEW_LINE>KeycloakModelUtils.runJobInTransaction(sessionFactory, new KeycloakSessionTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(KeycloakSession session) {<NEW_LINE>InfinispanConnectionProvider connections = session.getProvider(InfinispanConnectionProvider.class);<NEW_LINE>Cache<String, Serializable> workCache = connections.getCache(InfinispanConnectionProvider.WORK_CACHE_NAME);<NEW_LINE>InfinispanCacheInitializer initializer = new InfinispanCacheInitializer(sessionFactory, workCache, new RemoteCacheSessionsLoader(cacheName, sessionsPerSegment), "remoteCacheLoad::" + cacheName, sessionsPerSegment, maxErrors);<NEW_LINE>initializer.initCache();<NEW_LINE>initializer.loadSessions();<NEW_LINE>}<NEW_LINE>});<NEW_LINE><MASK><NEW_LINE>}
log.debugf("Pre-loading sessions from remote cache '%s' finished", cacheName);
203,025
public void actionPerformed(AnActionEvent e) {<NEW_LINE>final Project project = e.getData(CommonDataKeys.PROJECT);<NEW_LINE>final VirtualFile virtualFile = GraphQLPsiUtil.getPhysicalVirtualFile(e.getData(CommonDataKeys.VIRTUAL_FILE));<NEW_LINE>if (project == null || virtualFile == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final GraphQLConfigManager configManager = GraphQLConfigManager.getService(project);<NEW_LINE>final VirtualFile configFile = configManager.getClosestConfigFile(virtualFile);<NEW_LINE>if (configFile != null) {<NEW_LINE>final FileEditorManager fileEditorManager = FileEditorManager.getInstance(project);<NEW_LINE>fileEditorManager.openFile(configFile, true, true);<NEW_LINE>} else {<NEW_LINE>// no config associated, ask to create one<NEW_LINE>String message = "Searched current and parent directories.<br><a href=\"create\">Create .graphqlconfig file</a>";<NEW_LINE>Notifications.Bus.notify(new Notification(GraphQLNotificationUtil.NOTIFICATION_GROUP_ID, "No .graphqlconfig file found", message, NotificationType.INFORMATION, (notification, event) -> createConfig(project, virtualFile, <MASK><NEW_LINE>}<NEW_LINE>}
configManager, notification)), project);
1,685,717
public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) {<NEW_LINE>final ListCalc listCalc = compiler.compileList(call.getArg(0));<NEW_LINE>final IntegerCalc integerCalc = call.getArgCount() > 1 ? compiler.compileInteger(call.getArg(1)) : ConstantCalc.constantInteger(1);<NEW_LINE>if (head) {<NEW_LINE>return new AbstractListCalc(call, new Calc[] { listCalc, integerCalc }) {<NEW_LINE><NEW_LINE>public TupleList evaluateList(Evaluator evaluator) {<NEW_LINE>final int savepoint = evaluator.savepoint();<NEW_LINE>try {<NEW_LINE>evaluator.setNonEmpty(false);<NEW_LINE>TupleList list = listCalc.evaluateList(evaluator);<NEW_LINE>int count = integerCalc.evaluateInteger(evaluator);<NEW_LINE>return head(count, list);<NEW_LINE>} finally {<NEW_LINE>evaluator.restore(savepoint);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>} else {<NEW_LINE>return new AbstractListCalc(call, new Calc[] { listCalc, integerCalc }) {<NEW_LINE><NEW_LINE>public TupleList evaluateList(Evaluator evaluator) {<NEW_LINE>final <MASK><NEW_LINE>try {<NEW_LINE>evaluator.setNonEmpty(false);<NEW_LINE>TupleList list = listCalc.evaluateList(evaluator);<NEW_LINE>int count = integerCalc.evaluateInteger(evaluator);<NEW_LINE>return tail(count, list);<NEW_LINE>} finally {<NEW_LINE>evaluator.restore(savepoint);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}<NEW_LINE>}
int savepoint = evaluator.savepoint();
226,735
public void compileRoutes() {<NEW_LINE>if (routes != null) {<NEW_LINE>throw new IllegalStateException("Routes already compiled");<NEW_LINE>}<NEW_LINE>List<Route> routesLocal = new ArrayList<>();<NEW_LINE>allRouteBuilders.forEach(routeBuilder -> {<NEW_LINE>routesLocal.add(routeBuilder.buildRoute(injector));<NEW_LINE>});<NEW_LINE>this.routes = ImmutableList.copyOf(routesLocal);<NEW_LINE>// compile reverse routes for O(1) lookups<NEW_LINE>this.reverseRoutes = new HashMap<>(this.routes.size());<NEW_LINE>this.routes.forEach(route -> {<NEW_LINE>Class<?> methodClass = route.getControllerClass();<NEW_LINE>String methodName = route.getControllerMethod().getName();<NEW_LINE>MethodReference controllerMethodRef = new MethodReference(methodClass, methodName);<NEW_LINE>if (this.reverseRoutes.containsKey(controllerMethodRef)) {<NEW_LINE>// the first one wins with reverse routing so we ignore this route<NEW_LINE>} else {<NEW_LINE>this.reverseRoutes.put(controllerMethodRef, route);<NEW_LINE>}<NEW_LINE>if (route.isHttpMethodWebSocket()) {<NEW_LINE>if (this.webSockets == null) {<NEW_LINE>throw new IllegalStateException("WebSockets instance was null. Unable to configure route " + <MASK><NEW_LINE>}<NEW_LINE>if (!this.webSockets.isEnabled()) {<NEW_LINE>throw new IllegalStateException("WebSockets are not enabled. Unable to configure route " + route.getUri() + "." + " Using implementation " + this.webSockets.getClass().getCanonicalName());<NEW_LINE>}<NEW_LINE>webSockets.compileRoute(route);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>logRoutes();<NEW_LINE>}
route.getUri() + ".");
508,486
final ListAutomaticTapeCreationPoliciesResult executeListAutomaticTapeCreationPolicies(ListAutomaticTapeCreationPoliciesRequest listAutomaticTapeCreationPoliciesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAutomaticTapeCreationPoliciesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListAutomaticTapeCreationPoliciesRequest> request = null;<NEW_LINE>Response<ListAutomaticTapeCreationPoliciesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListAutomaticTapeCreationPoliciesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAutomaticTapeCreationPoliciesRequest));<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, "Storage Gateway");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAutomaticTapeCreationPolicies");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListAutomaticTapeCreationPoliciesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAutomaticTapeCreationPoliciesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,096,346
final public Node EmbSubject() throws ParseException {<NEW_LINE>Node o;<NEW_LINE>String iri;<NEW_LINE>switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) {<NEW_LINE>case IRIref:<NEW_LINE>case PNAME_NS:<NEW_LINE>case PNAME_LN:<NEW_LINE>{<NEW_LINE>iri = iri();<NEW_LINE>o = createURI(iri, <MASK><NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case ANON:<NEW_LINE>case BLANK_NODE_LABEL:<NEW_LINE>{<NEW_LINE>o = BlankNode();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case LT2:<NEW_LINE>{<NEW_LINE>o = EmbTriple();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>jj_la1[14] = jj_gen;<NEW_LINE>jj_consume_token(-1);<NEW_LINE>throw new ParseException();<NEW_LINE>}<NEW_LINE>{<NEW_LINE>if ("" != null)<NEW_LINE>return o;<NEW_LINE>}<NEW_LINE>throw new Error("Missing return statement in function");<NEW_LINE>}
token.beginLine, token.beginColumn);
323,236
protected ArrowTipView showEducationTipOnViewIfPossible(@Nullable View view) {<NEW_LINE>if (view == null || !ViewCompat.isLaidOut(view)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int[<MASK><NEW_LINE>view.getLocationOnScreen(coords);<NEW_LINE>ArrowTipView arrowTipView = new ArrowTipView(mActivityContext, /* isPointingUp= */<NEW_LINE>false).showAtLocation(getContext().getString(R.string.long_press_widget_to_add), /* arrowXCoord= */<NEW_LINE>coords[0] + view.getWidth() / 2, /* yCoord= */<NEW_LINE>coords[1]);<NEW_LINE>if (arrowTipView != null) {<NEW_LINE>mActivityContext.getSharedPrefs().edit().putBoolean(KEY_WIDGETS_EDUCATION_TIP_SEEN, true).apply();<NEW_LINE>}<NEW_LINE>return arrowTipView;<NEW_LINE>}
] coords = new int[2];
185,151
public boolean compile() {<NEW_LINE>JavaCompiler javac = ToolProvider.getSystemJavaCompiler();<NEW_LINE>if (javac == null)<NEW_LINE>throw new IllegalStateException("No Java compiler is installed. Please use a JDK context when running.");<NEW_LINE>// file manager, used so that the unit map can have their definitions updated<NEW_LINE>// after compilation.<NEW_LINE>DiagnosticListener<? super JavaFileObject> lll = (DiagnosticListener<? super JavaFileObject>) (Object) listener;<NEW_LINE>JavaFileManager fmFallback = javac.getStandardFileManager(lll, Locale.getDefault(), UTF_8);<NEW_LINE>JavaFileManager fm = new VirtualFileManager(fmFallback);<NEW_LINE>// Add options<NEW_LINE>List<String> args = new ArrayList<>();<NEW_LINE>args.addAll(Arrays.asList("-classpath", getClassPathText()));<NEW_LINE>if (VMUtil.getVmVersion() >= 9) {<NEW_LINE>// For Java 9 and later, use release instead of the source/target pair<NEW_LINE>args.addAll(Arrays.asList("--release", String.valueOf(this.options.getTarget().version())));<NEW_LINE>} else {<NEW_LINE>args.addAll(Arrays.asList("-source", this.options.getTarget().toString()));<NEW_LINE>args.addAll(Arrays.asList("-target", this.options.getTarget().toString()));<NEW_LINE>}<NEW_LINE>args.add(this.options.toOption());<NEW_LINE>// create task<NEW_LINE>try {<NEW_LINE>JavaCompiler.CompilationTask task = javac.getTask(null, fm, lll, args, <MASK><NEW_LINE>Boolean b = task.call();<NEW_LINE>return b != null && b;<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
null, unitMap.values());
622,046
static ServiceDefinition build(ProcessingEnvironment processingEnv, TypeElement type) {<NEW_LINE>ServiceDefinition serviceDefinition = new ServiceDefinition();<NEW_LINE>serviceDefinition.setCanonicalName(type.toString());<NEW_LINE>serviceDefinition.setCodeSource(getResourceName(type.toString()));<NEW_LINE>Map<String, TypeDefinition> types = new HashMap<>();<NEW_LINE>// Get all super types and interface excluding the specified type<NEW_LINE>// and then the result will be added into ServiceDefinition#getTypes()<NEW_LINE>getHierarchicalTypes(type.asType(), Object.class).forEach(t -> TypeDefinitionBuilder.build(processingEnv, t, types));<NEW_LINE>// Get all declared methods that will be added into ServiceDefinition#getMethods()<NEW_LINE>getPublicNonStaticMethods(type, Object.class).stream().map(method -> MethodDefinitionBuilder.build(processingEnv, method, types)).forEach(<MASK><NEW_LINE>serviceDefinition.setTypes(new ArrayList<>(types.values()));<NEW_LINE>return serviceDefinition;<NEW_LINE>}
serviceDefinition.getMethods()::add);
13,710
public RefactoringStatus checkFinalConditions(IProgressMonitor pm) throws CoreException {<NEW_LINE>try {<NEW_LINE>pm.beginTask(RefactoringCoreMessages.ExtractTempRefactoring_checking_preconditions, 4);<NEW_LINE>fCURewrite = new CompilationUnitRewrite(fCu, fCompilationUnitNode);<NEW_LINE>fCURewrite.setFormattingOptions(fFormatterOptions);<NEW_LINE>fCURewrite.getASTRewrite().setTargetSourceRangeComputer(new NoCommentSourceRangeComputer());<NEW_LINE>doCreateChange(new SubProgressMonitor(pm, 2));<NEW_LINE>fChange = fCURewrite.createChange(RefactoringCoreMessages.ExtractTempRefactoring_change_name, true, new SubProgressMonitor(pm, 1));<NEW_LINE>RefactoringStatus result = new RefactoringStatus();<NEW_LINE>if (Arrays.asList(getExcludedVariableNames()).contains(fTempName)) {<NEW_LINE>result.addWarning(Messages.format(RefactoringCoreMessages.ExtractTempRefactoring_another_variable, BasicElementLabels.getJavaElementName(fTempName)));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>fChange.setKeepPreviewEdits(true);<NEW_LINE>if (fCheckResultForCompileProblems) {<NEW_LINE>checkNewSource(new SubProgressMonitor(pm, 1), result);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>} finally {<NEW_LINE>pm.done();<NEW_LINE>}<NEW_LINE>}
result.merge(checkMatchingFragments());
1,127,234
private void draw() {<NEW_LINE>list = new JList(listModel);<NEW_LINE>list.addListSelectionListener(new javax.swing.event.ListSelectionListener() {<NEW_LINE><NEW_LINE>public void valueChanged(javax.swing.event.ListSelectionEvent evt) {<NEW_LINE>updateSaveButton();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// bugfix 37941, select first item in list<NEW_LINE>if (!listModel.isEmpty()) {<NEW_LINE>list.setSelectedIndex(0);<NEW_LINE>} else {<NEW_LINE>updateSaveButton();<NEW_LINE>}<NEW_LINE>JScrollPane scroll = new JScrollPane(list);<NEW_LINE>setBorder(BorderFactory.createEmptyBorder(12<MASK><NEW_LINE>add(scroll, java.awt.BorderLayout.CENTER);<NEW_LINE>list.setCellRenderer(new ExitDlgListCellRenderer());<NEW_LINE>list.getAccessibleContext().setAccessibleName((NbBundle.getBundle(ExitDialog.class)).getString("ACSN_ListOfChangedFiles"));<NEW_LINE>list.getAccessibleContext().setAccessibleDescription((NbBundle.getBundle(ExitDialog.class)).getString("ACSD_ListOfChangedFiles"));<NEW_LINE>this.getAccessibleContext().setAccessibleDescription((NbBundle.getBundle(ExitDialog.class)).getString("ACSD_ExitDialog"));<NEW_LINE>}
, 12, 11, 12));
1,804,592
public AnalyticsModelingOMASAPIResponse updateArtifact(String serverName, String userId, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact) {<NEW_LINE>String methodName = "updateArtifact";<NEW_LINE>AnalyticsModelingOMASAPIResponse ret;<NEW_LINE>RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName);<NEW_LINE>try {<NEW_LINE>validateUrlParameters(serverName, userId, null, null, null, null, methodName);<NEW_LINE>AssetsResponse response = new AssetsResponse();<NEW_LINE>AnalyticsArtifactHandler handler = getHandler().getAnalyticsArtifactHandler(serverName, userId, methodName);<NEW_LINE>ResponseContainerAssets assets = handler.updateAssets(userId, serverCapability, serverCapabilityGUID, artifact);<NEW_LINE>response.setAssetList(assets);<NEW_LINE>response.setMeta(handler.getMessages());<NEW_LINE>ret = response;<NEW_LINE>} catch (Exception e) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>restCallLogger.logRESTCallReturn(token, ret.toString());<NEW_LINE>return ret;<NEW_LINE>}
ret = handleErrorResponse(e, methodName);
245,469
private AbstractCacheNode specializeForeignCall(Object[] arguments, AbstractCacheNode head) {<NEW_LINE>AbstractCacheNode newNode = null;<NEW_LINE>int <MASK><NEW_LINE>Object thisObject = JSArguments.getThisObject(arguments);<NEW_LINE>if (isNew(flags) || isNewTarget(flags)) {<NEW_LINE>int skippedArgs = isNewTarget(flags) ? 1 : 0;<NEW_LINE>newNode = new ForeignInstantiateNode(skippedArgs, userArgumentCount - skippedArgs);<NEW_LINE>} else if (JSGuards.isForeignObject(thisObject)) {<NEW_LINE>Object propertyKey = getPropertyKey();<NEW_LINE>if (Strings.isTString(propertyKey)) {<NEW_LINE>newNode = new ForeignInvokeNode((TruffleString) propertyKey, userArgumentCount);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (newNode == null) {<NEW_LINE>newNode = new ForeignExecuteNode(userArgumentCount);<NEW_LINE>}<NEW_LINE>return insertAtFront(newNode, head);<NEW_LINE>}
userArgumentCount = JSArguments.getUserArgumentCount(arguments);
1,098,960
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {<NEW_LINE>resp.setHeader(CACHE_CONTROL, NO_CACHE);<NEW_LINE>resp.setContentType(CONTENT_TYPE);<NEW_LINE>Map<MaxwellDiagnostic, CompletableFuture<MaxwellDiagnosticResult.Check>> futureChecks = diagnosticContext.diagnostics.stream().collect(Collectors.toMap(diagnostic -> diagnostic, MaxwellDiagnostic::check));<NEW_LINE>List<MaxwellDiagnosticResult.Check> checks = futureChecks.entrySet().stream().map(future -> {<NEW_LINE>CompletableFuture<MaxwellDiagnosticResult.Check> futureCheck = future.getValue();<NEW_LINE>try {<NEW_LINE>return futureCheck.get(diagnosticContext.config.timeout, TimeUnit.MILLISECONDS);<NEW_LINE>} catch (InterruptedException | ExecutionException | TimeoutException e) {<NEW_LINE>futureCheck.cancel(true);<NEW_LINE>MaxwellDiagnostic diagnostic = future.getKey();<NEW_LINE>Map<String, String> info = new HashMap<>();<NEW_LINE>info.put("message", "check did not return after " + diagnosticContext.config.timeout + " ms");<NEW_LINE>return new MaxwellDiagnosticResult.Check(diagnostic, false, info);<NEW_LINE>}<NEW_LINE>}).collect(Collectors.toList());<NEW_LINE><MASK><NEW_LINE>if (result.isSuccess()) {<NEW_LINE>resp.setStatus(HttpServletResponse.SC_OK);<NEW_LINE>} else if (result.isMandatoryFailed()) {<NEW_LINE>resp.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);<NEW_LINE>} else {<NEW_LINE>resp.setStatus(299);<NEW_LINE>}<NEW_LINE>try (PrintWriter output = resp.getWriter()) {<NEW_LINE>mapper.writer().writeValue(output, result);<NEW_LINE>}<NEW_LINE>}
MaxwellDiagnosticResult result = new MaxwellDiagnosticResult(checks);
295,146
private void createP2() {<NEW_LINE>remove(prgCircle);<NEW_LINE>remove(lblSpeed);<NEW_LINE>remove(lblStat);<NEW_LINE>remove(segProgress);<NEW_LINE>remove(lblDet);<NEW_LINE>remove(lblETA);<NEW_LINE>remove(this.panel);<NEW_LINE>titlePanel.remove(closeBtn);<NEW_LINE>titlePanel.remove(minBtn);<NEW_LINE>JPanel p2 = new JPanel(null);<NEW_LINE>p2.setBounds(0, getScaledInt(60), getScaledInt(350), getScaledInt(190));<NEW_LINE>p2.setBackground(ColorResource.getDarkestBgColor());<NEW_LINE>// this.errMsg);<NEW_LINE>txtError = new JTextArea();<NEW_LINE>txtError.setFont(FontResource.getBigFont());<NEW_LINE>txtError.setEditable(false);<NEW_LINE>txtError.setCaretPosition(0);<NEW_LINE>txtError.setWrapStyleWord(true);<NEW_LINE>txtError.setLineWrap(true);<NEW_LINE>txtError.setBackground(ColorResource.getDarkestBgColor());<NEW_LINE>txtError.setForeground(Color.WHITE);<NEW_LINE>JScrollPane jsp = new JScrollPane(txtError);<NEW_LINE>jsp.setBounds(getScaledInt(25), getScaledInt(20), getScaledInt(300), getScaledInt(100));<NEW_LINE>jsp.setBorder(null);<NEW_LINE>CustomButton exitBtn = new CustomButton();<NEW_LINE>exitBtn.setText<MASK><NEW_LINE>applyStyle(exitBtn);<NEW_LINE>exitBtn.setBounds(0, 1, getScaledInt(350), getScaledInt(50));<NEW_LINE>exitBtn.setName("EXIT");<NEW_LINE>JPanel panel2 = new JPanel(null);<NEW_LINE>panel2.setBounds(0, getScaledInt(140), getScaledInt(350), getScaledInt(50));<NEW_LINE>panel2.setBackground(Color.DARK_GRAY);<NEW_LINE>panel2.add(exitBtn);<NEW_LINE>p2.add(jsp);<NEW_LINE>p2.add(panel2);<NEW_LINE>add(p2);<NEW_LINE>titleLbl.setText(StringResource.get("MSG_FAILED"));<NEW_LINE>invalidate();<NEW_LINE>repaint();<NEW_LINE>}
(StringResource.get("MSG_OK"));
674,240
private void createRecorder() {<NEW_LINE>@SuppressWarnings("rawtypes")<NEW_LINE>Class recorderClass = loadClientClass("simianarmy.client.recorder.class");<NEW_LINE>if (recorderClass != null && recorderClass.equals(RDSRecorder.class)) {<NEW_LINE>String dbDriver = configuration().getStr("simianarmy.recorder.db.driver");<NEW_LINE>String dbUser = <MASK><NEW_LINE>String dbPass = configuration().getStr("simianarmy.recorder.db.pass");<NEW_LINE>String dbUrl = configuration().getStr("simianarmy.recorder.db.url");<NEW_LINE>String dbTable = configuration().getStr("simianarmy.recorder.db.table");<NEW_LINE>RDSRecorder rdsRecorder = new RDSRecorder(dbDriver, dbUser, dbPass, dbUrl, dbTable, client.region());<NEW_LINE>rdsRecorder.init();<NEW_LINE>setRecorder(rdsRecorder);<NEW_LINE>} else if (recorderClass == null || recorderClass.equals(SimpleDBRecorder.class)) {<NEW_LINE>String domain = config.getStrOrElse("simianarmy.recorder.sdb.domain", "SIMIAN_ARMY");<NEW_LINE>if (client != null) {<NEW_LINE>SimpleDBRecorder simpleDbRecorder = new SimpleDBRecorder(client, domain);<NEW_LINE>simpleDbRecorder.init();<NEW_LINE>setRecorder(simpleDbRecorder);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>setRecorder((MonkeyRecorder) factory(recorderClass));<NEW_LINE>}<NEW_LINE>}
configuration().getStr("simianarmy.recorder.db.user");
1,811,542
public void run() {<NEW_LINE>// Record how long it takes to build the graph, purely for informational purposes.<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>// Check all graph builder inputs, and fail fast to avoid waiting until the build process<NEW_LINE>// advances.<NEW_LINE>for (GraphBuilderModule builder : graphBuilderModules) {<NEW_LINE>builder.checkInputs();<NEW_LINE>}<NEW_LINE>DataImportIssueStore issueStore = new DataImportIssueStore(true);<NEW_LINE>HashMap<Class<?>, Object> extra = new HashMap<>();<NEW_LINE>for (GraphBuilderModule load : graphBuilderModules) {<NEW_LINE>load.buildGraph(graph, extra, issueStore);<NEW_LINE>}<NEW_LINE>issueStore.summarize();<NEW_LINE><MASK><NEW_LINE>LOG.info(String.format("Graph building took %.1f minutes.", (endTime - startTime) / 1000 / 60.0));<NEW_LINE>LOG.info("Main graph size: |V|={} |E|={}", graph.countVertices(), graph.countEdges());<NEW_LINE>}
long endTime = System.currentTimeMillis();
683,863
public void ListProducts() {<NEW_LINE>PersistenceManagerFactory pmf = new JDOPersistenceManagerFactory(pumd, null);<NEW_LINE>PersistenceManager pm = pmf.getPersistenceManager();<NEW_LINE>Transaction tx = pm.currentTransaction();<NEW_LINE>try {<NEW_LINE>tx.begin();<NEW_LINE>Query q = pm.newQuery("SELECT FROM " + Product.class.getName() + " WHERE price > 10");<NEW_LINE>List<Product> products = (List<Product>) q.execute();<NEW_LINE>Iterator<Product> iter = products.iterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE><MASK><NEW_LINE>LOGGER.log(Level.WARNING, "Product name: {0} - Price: {1}", new Object[] { p.name, p.price });<NEW_LINE>}<NEW_LINE>LOGGER.log(Level.INFO, "--------------------------------------------------------------");<NEW_LINE>tx.commit();<NEW_LINE>} finally {<NEW_LINE>if (tx.isActive()) {<NEW_LINE>tx.rollback();<NEW_LINE>}<NEW_LINE>pm.close();<NEW_LINE>}<NEW_LINE>}
Product p = iter.next();
1,735,954
private Mono<Response<Flux<ByteBuffer>>> cancelWithResponseAsync(String resourceGroupName, String accountName, String pipelineJobName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (accountName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (pipelineJobName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, pipelineJobName, this.client.<MASK><NEW_LINE>}
getApiVersion(), accept, context);
978,875
private void visit(GraphQLSchemaElement n, Set<GraphQLSchemaElement> tempMarked, Set<GraphQLSchemaElement> permMarked, Set<GraphQLSchemaElement> notPermMarked, List<GraphQLSchemaElement> result, Map<GraphQLSchemaElement, List<GraphQLSchemaElement>> reverseDependencies) {<NEW_LINE>if (permMarked.contains(n)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (tempMarked.contains(n)) {<NEW_LINE>Assert.assertShouldNeverHappen("NOT A DAG: %s has temp mark", n);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>tempMarked.add(n);<NEW_LINE>if (reverseDependencies.containsKey(n)) {<NEW_LINE>for (GraphQLSchemaElement m : reverseDependencies.get(n)) {<NEW_LINE>visit(m, tempMarked, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>tempMarked.remove(n);<NEW_LINE>permMarked.add(n);<NEW_LINE>notPermMarked.remove(n);<NEW_LINE>result.add(n);<NEW_LINE>}
permMarked, notPermMarked, result, reverseDependencies);
135,071
protected Map<Integer, ParameterContext> buildInsertParams() {<NEW_LINE>Map<Integer, ParameterContext> params = new HashMap<>(15);<NEW_LINE>int index = 0;<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.tableSchema);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.tableName);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setLong, this.nonUnique);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.indexSchema);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.indexName);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setLong, this.seqInIndex);<NEW_LINE>MetaDbUtil.setParameter(++index, params, <MASK><NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.collation);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setLong, this.cardinality);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setLong, this.subPart);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.packed);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.nullable);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.indexType);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.comment);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.indexComment);<NEW_LINE>return params;<NEW_LINE>}
ParameterMethod.setString, this.columnName);
407,454
public void execute(Agent<?, ?> agent, Action action) {<NEW_LINE>if (action == ACTION_MOVE_RIGHT) {<NEW_LINE>envState.setAgentLocation(agent, LOCATION_B);<NEW_LINE>updatePerformanceMeasure(agent, -1);<NEW_LINE>} else if (action == ACTION_MOVE_LEFT) {<NEW_LINE>envState.setAgentLocation(agent, LOCATION_A);<NEW_LINE>updatePerformanceMeasure(agent, -1);<NEW_LINE>} else if (action == ACTION_SUCK) {<NEW_LINE>String <MASK><NEW_LINE>// case: square is dirty<NEW_LINE>if (envState.getLocationState(currLocation) == LocationState.Dirty) {<NEW_LINE>// always clean current square<NEW_LINE>envState.setLocationState(currLocation, LocationState.Clean);<NEW_LINE>// possibly clean adjacent square<NEW_LINE>if (Math.random() > 0.5)<NEW_LINE>envState.setLocationState(currLocation.equals("A") ? "B" : "A", LocationState.Clean);<NEW_LINE>} else // case: square is clean<NEW_LINE>if (envState.getLocationState(currLocation) == LocationState.Clean) {<NEW_LINE>// possibly dirty current square<NEW_LINE>if (Math.random() > 0.5)<NEW_LINE>envState.setLocationState(currLocation, LocationState.Dirty);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
currLocation = envState.getAgentLocation(agent);
4,444
public void menuShown(MenuEvent e) {<NEW_LINE>MenuItem sidebarMenuItem = MenuFactory.findMenuItem(viewMenu, PREFIX_V3 + ".view.sidebar");<NEW_LINE>if (sidebarMenuItem != null) {<NEW_LINE>MultipleDocumentInterface mdi = UIFunctionsManager.getUIFunctions().getMDI();<NEW_LINE>if (mdi != null) {<NEW_LINE>sidebarMenuItem.setSelection(mdi.isVisible());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (COConfigurationManager.getBooleanParameter("Library.EnableSimpleView")) {<NEW_LINE>MenuItem itemShowAsSimple = MenuFactory.findMenuItem(viewMenu, PREFIX_V3 + ".view.asSimpleList");<NEW_LINE>if (itemShowAsSimple != null) {<NEW_LINE>UIToolBarManager tb = UIToolBarManagerImpl.getInstance();<NEW_LINE>if (tb != null) {<NEW_LINE>UIToolBarItem item = tb.getToolBarItem("modeBig");<NEW_LINE>long state = item == null ? 0 : item.getState();<NEW_LINE>itemShowAsSimple.setEnabled((state & UIToolBarItem.STATE_ENABLED) > 0);<NEW_LINE>itemShowAsSimple.setSelection((state & UIToolBarItem.STATE_DOWN) > 0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MenuItem itemShowAsAdv = MenuFactory.findMenuItem(viewMenu, PREFIX_V3 + ".view.asAdvancedList");<NEW_LINE>if (itemShowAsAdv != null) {<NEW_LINE><MASK><NEW_LINE>if (tb != null) {<NEW_LINE>UIToolBarItem item = tb.getToolBarItem("modeSmall");<NEW_LINE>long state = item == null ? 0 : item.getState();<NEW_LINE>itemShowAsAdv.setEnabled((state & UIToolBarItem.STATE_ENABLED) > 0);<NEW_LINE>itemShowAsAdv.setSelection((state & UIToolBarItem.STATE_DOWN) > 0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>TableView<?> tv = SelectedContentManager.getCurrentlySelectedTableView();<NEW_LINE>MenuItem itemColumnSetup = MenuFactory.findMenuItem(viewMenu, PREFIX_V2 + ".view.columnsetup");<NEW_LINE>itemColumnSetup.setEnabled(tv != null);<NEW_LINE>}
UIToolBarManager tb = UIToolBarManagerImpl.getInstance();
1,238,105
protected RubyArray rbEncCodePointLen(Object string, RubyEncoding encoding, @CachedLibrary(limit = "LIBSTRING_CACHE") RubyStringLibrary strings, @Cached RopeNodes.BytesNode bytesNode, @Cached RopeNodes.CalculateCharacterLengthNode calculateCharacterLengthNode, @Cached RopeNodes.CodeRangeNode codeRangeNode, @Cached ConditionProfile sameEncodingProfile, @Cached BranchProfile errorProfile) {<NEW_LINE>final Rope rope = strings.getRope(string);<NEW_LINE>final byte[] bytes = bytesNode.execute(rope);<NEW_LINE>final CodeRange ropeCodeRange = codeRangeNode.execute(rope);<NEW_LINE>final Encoding enc = encoding.jcoding;<NEW_LINE>final CodeRange cr;<NEW_LINE>if (sameEncodingProfile.profile(enc == rope.getEncoding())) {<NEW_LINE>cr = ropeCodeRange;<NEW_LINE>} else {<NEW_LINE>cr = CodeRange.CR_UNKNOWN;<NEW_LINE>}<NEW_LINE>final int r = calculateCharacterLengthNode.characterLength(enc, <MASK><NEW_LINE>if (!StringSupport.MBCLEN_CHARFOUND_P(r)) {<NEW_LINE>errorProfile.enter();<NEW_LINE>throw new RaiseException(getContext(), coreExceptions().argumentError(Utils.concat("invalid byte sequence in ", enc), this));<NEW_LINE>}<NEW_LINE>final int len_p = StringSupport.MBCLEN_CHARFOUND_LEN(r);<NEW_LINE>final int codePoint = StringSupport.preciseCodePoint(enc, ropeCodeRange, bytes, 0, bytes.length);<NEW_LINE>return createArray(new Object[] { len_p, codePoint });<NEW_LINE>}
cr, new Bytes(bytes));
395,953
private void initColumnsData() {<NEW_LINE>// Width of the first column fits to width<NEW_LINE>columnWidths = new int[columnCount - 1];<NEW_LINE>columnNames = new String[columnCount];<NEW_LINE>columnToolTips = new String[columnCount];<NEW_LINE>columnRenderers = new javax.swing.table.TableCellRenderer[columnCount];<NEW_LINE>columnNames[0] = Bundle.ClassesListControllerUI_ClassNameColumnText();<NEW_LINE>columnToolTips[0] = Bundle.ClassesListControllerUI_ClassNameColumnDescr();<NEW_LINE>columnNames[1] = Bundle.ClassesListControllerUI_InstancesRelColumnText();<NEW_LINE>columnToolTips[1] = Bundle.ClassesListControllerUI_InstancesRelColumnDescr();<NEW_LINE>columnNames[2] = Bundle.ClassesListControllerUI_InstancesColumnText();<NEW_LINE>columnToolTips[2] = Bundle.ClassesListControllerUI_InstancesColumnDescr();<NEW_LINE>columnNames[3] = Bundle.ClassesListControllerUI_SizeColumnText();<NEW_LINE>columnToolTips[3] = Bundle.ClassesListControllerUI_SizeColumnDescr();<NEW_LINE>if (retainedSizeSupported) {<NEW_LINE>columnNames[4] = Bundle.ClassesListControllerUI_RetainedSizeColumnName();<NEW_LINE>columnToolTips[4] = Bundle.ClassesListControllerUI_RetainedSizeColumnDescr();<NEW_LINE>}<NEW_LINE>// NOI18N // initial width of data columns<NEW_LINE>int maxWidth = getFontMetrics(getFont()).charWidth('W') * 12;<NEW_LINE>ClassNameTableCellRenderer classNameCellRenderer = new ClassNameTableCellRenderer();<NEW_LINE>CustomBarCellRenderer customBarCellRenderer = new CustomBarCellRenderer(0, 100);<NEW_LINE>LabelBracketTableCellRenderer dataCellRenderer = new LabelBracketTableCellRenderer(JLabel.TRAILING);<NEW_LINE>// method / class / package name<NEW_LINE>columnRenderers[0] = classNameCellRenderer;<NEW_LINE>columnWidths[1 - 1] = maxWidth;<NEW_LINE>columnRenderers[1] = customBarCellRenderer;<NEW_LINE><MASK><NEW_LINE>columnRenderers[2] = dataCellRenderer;<NEW_LINE>columnWidths[3 - 1] = maxWidth;<NEW_LINE>columnRenderers[3] = dataCellRenderer;<NEW_LINE>if (retainedSizeSupported) {<NEW_LINE>columnWidths[4 - 1] = maxWidth;<NEW_LINE>columnRenderers[4] = dataCellRenderer;<NEW_LINE>}<NEW_LINE>}
columnWidths[2 - 1] = maxWidth;
942,590
ActionResult<List<NameValueCountPair>> execute(EffectivePerson effectivePerson, String applicationFlag) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<List<NameValueCountPair>> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>List<NameValueCountPair> wraps = new ArrayList<>();<NEW_LINE>Application application = business.application().pick(applicationFlag);<NEW_LINE>if (null != application) {<NEW_LINE>EntityManager em = emc.get(Task.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LINE>Root<Task> root = cq.from(Task.class);<NEW_LINE>Predicate p = cb.equal(root.get(Task_.person), effectivePerson.getDistinguishedName());<NEW_LINE>p = cb.and(p, cb.equal(root.get(Task_.application), application.getId()));<NEW_LINE>cq.select(root.get(Task_.process)).where(p);<NEW_LINE>List<String> list = em.createQuery(cq).getResultList().stream().distinct().collect(Collectors.toList());<NEW_LINE>for (String str : list) {<NEW_LINE>this.addNameValueCountPair(business, effectivePerson, str, wraps);<NEW_LINE>}<NEW_LINE>SortTools.<MASK><NEW_LINE>}<NEW_LINE>result.setData(wraps);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
asc(wraps, false, "name");
867,715
protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());<NEW_LINE>if (deviceSession == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>position.setDeviceId(deviceSession.getDeviceId());<NEW_LINE>position.set(Position.KEY_EVENT, parser.next());<NEW_LINE>position.set(Position.KEY_IGNITION, parser.next<MASK><NEW_LINE>position.set(Position.KEY_ODOMETER, parser.nextInt(0));<NEW_LINE>position.setSpeed(UnitsConverter.knotsFromKph(parser.nextInt(0)));<NEW_LINE>position.set(Position.KEY_SATELLITES, parser.nextInt(0));<NEW_LINE>position.setValid(parser.next().equals("A"));<NEW_LINE>position.setLatitude(parser.nextDouble(0));<NEW_LINE>position.setLongitude(parser.nextDouble(0));<NEW_LINE>position.setAltitude(parser.nextDouble(0));<NEW_LINE>position.setCourse(parser.nextInt(0));<NEW_LINE>position.setTime(parser.nextDateTime(Parser.DateTimeFormat.HMS_DMY, "IST"));<NEW_LINE>position.set(Position.KEY_BATTERY, parser.nextInt() * 0.001);<NEW_LINE>position.set(Position.PREFIX_ADC + 1, parser.nextInt() * 0.01);<NEW_LINE>position.set(Position.KEY_INPUT, parser.nextInt());<NEW_LINE>for (int i = 1; i <= 4; i++) {<NEW_LINE>int value = parser.nextInt();<NEW_LINE>if (value != 0) {<NEW_LINE>position.set(Position.PREFIX_IO + i, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>position.set(Position.KEY_VERSION_HW, parser.next());<NEW_LINE>position.set(Position.KEY_VERSION_FW, parser.next());<NEW_LINE>return position;<NEW_LINE>}
().equals("1"));
1,733,846
public List<Filter> createFilterList(Optional<String> argumentString, List<Filter> filters, String errorMessage, boolean exclusive) {<NEW_LINE>for (String filterString : Splitter.on(";").trimResults().omitEmptyStrings().split(argumentString.or(""))) {<NEW_LINE>try {<NEW_LINE>// filter based on annotations<NEW_LINE>if (filterString.startsWith("@")) {<NEW_LINE>filters.add(new AnnotationClassFilter(filterString));<NEW_LINE>filters.add(new AnnotationFieldFilter(filterString));<NEW_LINE>filters.add(new AnnotationBehaviorFilter(filterString));<NEW_LINE>}<NEW_LINE>if (filterString.contains("#")) {<NEW_LINE>if (filterString.contains("(")) {<NEW_LINE>JavadocLikeBehaviorFilter behaviorFilter = new JavadocLikeBehaviorFilter(filterString);<NEW_LINE>filters.add(behaviorFilter);<NEW_LINE>} else {<NEW_LINE>JavadocLikeFieldFilter fieldFilter = new JavadocLikeFieldFilter(filterString);<NEW_LINE>filters.add(fieldFilter);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>JavaDocLikeClassFilter classFilter = new JavaDocLikeClassFilter(filterString);<NEW_LINE>filters.add(classFilter);<NEW_LINE>JavadocLikePackageFilter packageFilter <MASK><NEW_LINE>filters.add(packageFilter);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new JApiCmpException(JApiCmpException.Reason.CliError, String.format(errorMessage, filterString, e.getMessage()), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return filters;<NEW_LINE>}
= new JavadocLikePackageFilter(filterString, exclusive);
689,258
@Override<NEW_LINE>public AuthenticationDetails login(Credentials credentials) throws LoginException {<NEW_LINE>if (!(credentials instanceof AnonymousUserCredentials)) {<NEW_LINE>throw new ClassCastException("Credentials cannot be cast to AnonymousUserCredentials");<NEW_LINE>}<NEW_LINE>AnonymousUserCredentials anonymousCredentials = (AnonymousUserCredentials) credentials;<NEW_LINE><MASK><NEW_LINE>Locale credentialsLocale = anonymousCredentials.getLocale();<NEW_LINE>if (credentialsLocale != null) {<NEW_LINE>anonymousSession.setLocale(credentialsLocale);<NEW_LINE>}<NEW_LINE>if (anonymousCredentials.getTimeZone() != null && Boolean.TRUE.equals(anonymousSession.getUser().getTimeZoneAuto())) {<NEW_LINE>anonymousSession.setTimeZone(anonymousCredentials.getTimeZone());<NEW_LINE>}<NEW_LINE>anonymousSession.setAddress(anonymousCredentials.getIpAddress());<NEW_LINE>anonymousSession.setClientInfo(anonymousCredentials.getClientInfo());<NEW_LINE>if (anonymousCredentials.getSessionAttributes() != null) {<NEW_LINE>for (Map.Entry<String, Serializable> attribute : anonymousCredentials.getSessionAttributes().entrySet()) {<NEW_LINE>anonymousSession.setAttribute(attribute.getKey(), attribute.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new SimpleAuthenticationDetails(anonymousSession);<NEW_LINE>}
UserSession anonymousSession = anonymousSessionHolder.getAnonymousSession();
1,446,611
public static DescribeVSwitchesResponse unmarshall(DescribeVSwitchesResponse describeVSwitchesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVSwitchesResponse.setRequestId(_ctx.stringValue("DescribeVSwitchesResponse.RequestId"));<NEW_LINE>describeVSwitchesResponse.setTotalCount(_ctx.longValue("DescribeVSwitchesResponse.TotalCount"));<NEW_LINE>describeVSwitchesResponse.setPageNumber(_ctx.longValue("DescribeVSwitchesResponse.PageNumber"));<NEW_LINE>describeVSwitchesResponse.setPageSize(_ctx.longValue("DescribeVSwitchesResponse.PageSize"));<NEW_LINE>List<VSwitch> vSwitchs = new ArrayList<VSwitch>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeVSwitchesResponse.VSwitchs.Length"); i++) {<NEW_LINE>VSwitch vSwitch = new VSwitch();<NEW_LINE>vSwitch.setAliUid(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].AliUid"));<NEW_LINE>vSwitch.setBid(_ctx.stringValue<MASK><NEW_LINE>vSwitch.setCidrBlock(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].CidrBlock"));<NEW_LINE>vSwitch.setDescription(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].Description"));<NEW_LINE>vSwitch.setGmtCreate(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].GmtCreate"));<NEW_LINE>vSwitch.setGmtModified(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].GmtModified"));<NEW_LINE>vSwitch.setIsDefault(_ctx.booleanValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].IsDefault"));<NEW_LINE>vSwitch.setIzNo(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].IzNo"));<NEW_LINE>vSwitch.setRegionNo(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].RegionNo"));<NEW_LINE>vSwitch.setStatus(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].Status"));<NEW_LINE>vSwitch.setVSwitchId(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].VSwitchId"));<NEW_LINE>vSwitch.setVSwitchName(_ctx.stringValue("DescribeVSwitchesResponse.VSwitchs[" + i + "].VSwitchName"));<NEW_LINE>vSwitchs.add(vSwitch);<NEW_LINE>}<NEW_LINE>describeVSwitchesResponse.setVSwitchs(vSwitchs);<NEW_LINE>return describeVSwitchesResponse;<NEW_LINE>}
("DescribeVSwitchesResponse.VSwitchs[" + i + "].Bid"));
1,020,886
public void saveSaleOrderPDFAsAttachment(SaleOrder saleOrder) throws AxelorException {<NEW_LINE>if (saleOrder.getPrintingSettings() == null) {<NEW_LINE>if (saleOrder.getCompany().getPrintingSettings() != null) {<NEW_LINE>saleOrder.setPrintingSettings(saleOrder.getCompany().getPrintingSettings());<NEW_LINE>} else {<NEW_LINE>throw new AxelorException(TraceBackRepository.CATEGORY_MISSING_FIELD, String.format(I18n.get(IExceptionMessage.SALE_ORDER_MISSING_PRINTING_SETTINGS), saleOrder.getSaleOrderSeq()), saleOrder);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ReportFactory.createReport(IReport.SALES_ORDER, this.getFileName(saleOrder) + "-${date}").addParam("Locale", ReportSettings.getPrintingLocale(saleOrder.getClientPartner())).addParam("Timezone", saleOrder.getCompany() != null ? saleOrder.getCompany().getTimezone() : null).addParam("SaleOrderId", saleOrder.getId()).addParam("HeaderHeight", saleOrder.getPrintingSettings().getPdfHeaderHeight()).addParam("FooterHeight", saleOrder.getPrintingSettings().getPdfFooterHeight()).toAttach(saleOrder)<MASK><NEW_LINE>// String relatedModel = generalService.getPersistentClass(saleOrder).getCanonicalName();<NEW_LINE>// required ?<NEW_LINE>}
.generate().getFileLink();
668,897
private List<NameValueCountPair> listActivityNamePair(Business business, Predicate p) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(ReadCompleted.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LINE>Root<ReadCompleted> root = cq.from(ReadCompleted.class);<NEW_LINE>cq.select(root.get(ReadCompleted_.activityName)).where(p);<NEW_LINE>List<String> os = em.createQuery(cq).getResultList().stream().distinct().collect(Collectors.toList());<NEW_LINE>List<NameValueCountPair> wos = new ArrayList<>();<NEW_LINE>for (String str : os) {<NEW_LINE>if (StringUtils.isNotEmpty(str)) {<NEW_LINE>NameValueCountPair o = new NameValueCountPair();<NEW_LINE>o.setValue(str);<NEW_LINE>o.setName(str);<NEW_LINE>wos.add(o);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>wos = wos.stream().sorted(Comparator.comparing(NameValueCountPair::getName, (s1, s2) -> {<NEW_LINE>return Objects.toString(s1, "").compareTo(Objects<MASK><NEW_LINE>})).collect(Collectors.toList());<NEW_LINE>return wos;<NEW_LINE>}
.toString(s2, ""));
1,218,740
private static ClassNode loadClassNode(String className) throws IOException {<NEW_LINE>InputStream classStream = ResourceList.getInstance(TestGenerationContext.getInstance().getClassLoaderForSUT()).getClassAsStream(className);<NEW_LINE>if (classStream == null) {<NEW_LINE>// This used to throw an IOException that leads to null being<NEW_LINE>// returned, so for now we're just returning null directly<NEW_LINE>// TODO: Proper treatment of missing classes (can also be<NEW_LINE>// invalid calls, e.g. [L/java/lang/Object;)<NEW_LINE><MASK><NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ClassNode cn = new ClassNode();<NEW_LINE>try {<NEW_LINE>ClassReader reader = new ClassReader(classStream);<NEW_LINE>// |<NEW_LINE>reader.accept(cn, ClassReader.SKIP_FRAMES);<NEW_LINE>// ClassReader.SKIP_DEBUG);<NEW_LINE>} finally {<NEW_LINE>// ASM does not close the stream<NEW_LINE>classStream.close();<NEW_LINE>}<NEW_LINE>return cn;<NEW_LINE>}
logger.info("Could not find class file: " + className);
1,512,916
protected HyperParameters samplingHyperParameters(HyperParameters hyperParameters, DenseMatrix factors, DenseVector normalMu0, double normalBeta0, DenseMatrix WishartScale0, double WishartNu0) throws LibrecException {<NEW_LINE>int numRows = factors.rowSize();<NEW_LINE>int numColumns = factors.columnSize();<NEW_LINE>DenseVector mean = new VectorBasedDenseVector(numFactors);<NEW_LINE>for (int i = 0; i < numColumns; i++) {<NEW_LINE>mean.set(i, factors.column(i).mean());<NEW_LINE>}<NEW_LINE>DenseMatrix populationVariance = factors.covariance();<NEW_LINE>double betaPost = normalBeta0 + numRows;<NEW_LINE>DenseVector muPost = normalMu0.times(normalBeta0).plus(mean.times(numRows)).times(1.0 / betaPost);<NEW_LINE>DenseMatrix WishartScalePost = WishartScale0.plus(populationVariance.times(numRows));<NEW_LINE>DenseVector muError = normalMu0.minus(mean);<NEW_LINE>WishartScalePost = WishartScalePost.plus(muError.outer(muError).times<MASK><NEW_LINE>WishartScalePost = WishartScalePost.inverse();<NEW_LINE>WishartScalePost = WishartScalePost.plus(WishartScalePost.transpose()).times(0.5);<NEW_LINE>DenseMatrix variance = Randoms.wishart(WishartScalePost, numRows + numColumns);<NEW_LINE>if (variance != null) {<NEW_LINE>hyperParameters.variance = variance;<NEW_LINE>}<NEW_LINE>DenseMatrix normalVariance = hyperParameters.variance.times(normalBeta0).inverse().cholesky();<NEW_LINE>if (normalVariance != null) {<NEW_LINE>normalVariance = normalVariance.transpose();<NEW_LINE>DenseVector normalRdn = new VectorBasedDenseVector(numColumns);<NEW_LINE>for (int f = 0; f < numFactors; f++) normalRdn.set(f, Randoms.gaussian(0, 1));<NEW_LINE>hyperParameters.mu = normalVariance.times(normalRdn).plus(muPost);<NEW_LINE>}<NEW_LINE>return hyperParameters;<NEW_LINE>}
(normalBeta0 * numRows / betaPost));
20,524
public NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly, Predicate<String> moduleNameFilter) {<NEW_LINE>if (this.fs == null) {<NEW_LINE>return super.findClass(binaryFileName, qualifiedPackageName, moduleName, qualifiedBinaryFileName, asBinaryOnly, moduleNameFilter);<NEW_LINE>}<NEW_LINE>if (!isPackage(qualifiedPackageName, moduleName)) {<NEW_LINE>// most common case<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<Path> releaseRoots = this.ctSym.releaseRoots(this.releaseCode);<NEW_LINE>try {<NEW_LINE>IBinaryType reader = null;<NEW_LINE>byte[] content = null;<NEW_LINE>String fileNameWithoutExtension = qualifiedBinaryFileName.substring(0, qualifiedBinaryFileName.length() - SuffixConstants.SUFFIX_CLASS.length);<NEW_LINE>if (!releaseRoots.isEmpty()) {<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>qualifiedBinaryFileName = qualifiedBinaryFileName.replace(".class", ".sig");<NEW_LINE>Path fullPath = this.ctSym.getFullPath(this.releaseCode, qualifiedBinaryFileName, moduleName);<NEW_LINE>// If file is known, read it from ct.sym<NEW_LINE>if (fullPath != null) {<NEW_LINE>content = this.ctSym.getFileBytes(fullPath);<NEW_LINE>if (content != null) {<NEW_LINE>reader = new ClassFileReader(content, qualifiedBinaryFileName.toCharArray());<NEW_LINE>if (moduleName != null) {<NEW_LINE>((ClassFileReader) reader).moduleName = moduleName.toCharArray();<NEW_LINE>} else {<NEW_LINE>if (this.ctSym.isJRE12Plus()) {<NEW_LINE>moduleName = this.ctSym.getModuleInJre12plus(this.releaseCode, qualifiedBinaryFileName);<NEW_LINE>if (moduleName != null) {<NEW_LINE>((ClassFileReader) reader)<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Read the file in a "classic" way from the JDK itself<NEW_LINE>reader = ClassFileReader.readFromModule(this.jrtFile, moduleName, qualifiedBinaryFileName, moduleNameFilter);<NEW_LINE>}<NEW_LINE>if (reader != null)<NEW_LINE>return createAnswer(fileNameWithoutExtension, reader, reader.getModule());<NEW_LINE>} catch (ClassFormatException | IOException e) {<NEW_LINE>// treat as if class file is missing<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
.moduleName = moduleName.toCharArray();
1,265,239
public void mouseClicked(MouseEvent e) {<NEW_LINE>ProductVar selectedVar = null;<NEW_LINE>if (relatedNode.getUserObject() instanceof ProductVar) {<NEW_LINE>selectedVar = <MASK><NEW_LINE>}<NEW_LINE>if (selectedVar != null) {<NEW_LINE>String selectedVarUnits = selectedVar.getUnits();<NEW_LINE>if (selectedVarUnits != null && !selectedVarUnits.trim().isEmpty()) {<NEW_LINE>List<String> unitList = UnitType.getAll(selectedVarUnits);<NEW_LINE>if (unitList != null && unitList.size() > 0) {<NEW_LINE>Object newUnits = UIUtils.showListInputDialog(unitsField, "Change " + selectedVarUnits + " to:", "Change Units ...", JOptionPane.QUESTION_MESSAGE, null, unitList.toArray(), selectedVarUnits);<NEW_LINE>if (newUnits != null) {<NEW_LINE>unitsField.setText(newUnits.toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(ProductVar) relatedNode.getUserObject();
349,499
final UpdateGroupResult executeUpdateGroup(UpdateGroupRequest updateGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateGroupRequest> request = null;<NEW_LINE>Response<UpdateGroupResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new UpdateGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateGroupRequest));<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, "Resource Groups");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateGroup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateGroupResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateGroupResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,850,305
private void renderClassMetadata(List<PreparedClass> classes) {<NEW_LINE>if (classes.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ClassMetadataRequirements metadataRequirements = new ClassMetadataRequirements(context.getDependencyInfo());<NEW_LINE>int start = writer.getOffset();<NEW_LINE>try {<NEW_LINE>writer.append("$rt_packages([");<NEW_LINE>ObjectIntMap<String> packageIndexes = generatePackageMetadata(classes, metadataRequirements);<NEW_LINE>writer.<MASK><NEW_LINE>for (int i = 0; i < classes.size(); i += 50) {<NEW_LINE>int j = Math.min(i + 50, classes.size());<NEW_LINE>renderClassMetadataPortion(classes.subList(i, j), packageIndexes, metadataRequirements);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RenderingException("IO error occurred", e);<NEW_LINE>}<NEW_LINE>metadataSize = writer.getOffset() - start;<NEW_LINE>}
append("]);").newLine();
335,416
private Point parsePoint() {<NEW_LINE>double x = data.getDouble();<NEW_LINE>double y = data.getDouble();<NEW_LINE>double z = Double.NaN;<NEW_LINE>double m = Double.NaN;<NEW_LINE>if (xyzmMode.hasZ()) {<NEW_LINE>z = data.getDouble();<NEW_LINE>}<NEW_LINE>if (xyzmMode.hasM()) {<NEW_LINE>m = data.getDouble();<NEW_LINE>}<NEW_LINE>CoordinateSequenceFactory csf = factory.getCoordinateSequenceFactory();<NEW_LINE>if (Double.isNaN(x)) {<NEW_LINE>CoordinateSequence cs = csf.create(0, dimension, xyzmMode.hasM() ? 1 : 0);<NEW_LINE>return factory.createPoint(cs);<NEW_LINE>}<NEW_LINE>CoordinateSequence cs = csf.create(1, dimension, xyzmMode.hasM() ? 1 : 0);<NEW_LINE>cs.getCoordinate(0).setX(x);<NEW_LINE>cs.getCoordinate(0).setY(y);<NEW_LINE>if (xyzmMode.hasZ()) {<NEW_LINE>cs.getCoordinate(0).setZ(z);<NEW_LINE>}<NEW_LINE>if (xyzmMode.hasM()) {<NEW_LINE>cs.getCoordinate<MASK><NEW_LINE>}<NEW_LINE>return factory.createPoint(cs);<NEW_LINE>}
(0).setM(m);
927,805
public static String signature(Properties props) {<NEW_LINE>StringBuilder os = new StringBuilder();<NEW_LINE>os.append(HybridCorefProperties.DEMONYM_PROP + ":" + props.getProperty(HybridCorefProperties.DEMONYM_PROP, DefaultPaths.DEFAULT_DCOREF_DEMONYM));<NEW_LINE>os.append(HybridCorefProperties.ANIMATE_PROP + ":" + props.getProperty(HybridCorefProperties<MASK><NEW_LINE>os.append(HybridCorefProperties.INANIMATE_PROP + ":" + props.getProperty(HybridCorefProperties.INANIMATE_PROP, DefaultPaths.DEFAULT_DCOREF_INANIMATE));<NEW_LINE>if (props.containsKey(HybridCorefProperties.MALE_PROP)) {<NEW_LINE>os.append(HybridCorefProperties.MALE_PROP + ":" + props.getProperty(HybridCorefProperties.MALE_PROP));<NEW_LINE>}<NEW_LINE>if (props.containsKey(HybridCorefProperties.NEUTRAL_PROP)) {<NEW_LINE>os.append(HybridCorefProperties.NEUTRAL_PROP + ":" + props.getProperty(HybridCorefProperties.NEUTRAL_PROP));<NEW_LINE>}<NEW_LINE>if (props.containsKey(HybridCorefProperties.FEMALE_PROP)) {<NEW_LINE>os.append(HybridCorefProperties.FEMALE_PROP + ":" + props.getProperty(HybridCorefProperties.FEMALE_PROP));<NEW_LINE>}<NEW_LINE>if (props.containsKey(HybridCorefProperties.PLURAL_PROP)) {<NEW_LINE>os.append(HybridCorefProperties.PLURAL_PROP + ":" + props.getProperty(HybridCorefProperties.PLURAL_PROP));<NEW_LINE>}<NEW_LINE>if (props.containsKey(HybridCorefProperties.SINGULAR_PROP)) {<NEW_LINE>os.append(HybridCorefProperties.SINGULAR_PROP + ":" + props.getProperty(HybridCorefProperties.SINGULAR_PROP));<NEW_LINE>}<NEW_LINE>os.append(HybridCorefProperties.STATES_PROP + ":" + props.getProperty(HybridCorefProperties.STATES_PROP, DefaultPaths.DEFAULT_DCOREF_STATES));<NEW_LINE>os.append(HybridCorefProperties.GENDER_NUMBER_PROP + ":" + props.getProperty(HybridCorefProperties.GENDER_NUMBER_PROP, DefaultPaths.DEFAULT_DCOREF_GENDER_NUMBER));<NEW_LINE>os.append(HybridCorefProperties.COUNTRIES_PROP + ":" + props.getProperty(HybridCorefProperties.COUNTRIES_PROP, DefaultPaths.DEFAULT_DCOREF_COUNTRIES));<NEW_LINE>os.append(HybridCorefProperties.STATES_PROVINCES_PROP + ":" + props.getProperty(HybridCorefProperties.STATES_PROVINCES_PROP, DefaultPaths.DEFAULT_DCOREF_STATES_AND_PROVINCES));<NEW_LINE>return os.toString();<NEW_LINE>}
.ANIMATE_PROP, DefaultPaths.DEFAULT_DCOREF_ANIMATE));