idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
413,433
public S3Destination unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>S3Destination s3Destination = new S3Destination();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("bucketName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>s3Destination.setBucketName(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("keyPrefix", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>s3Destination.setKeyPrefix(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("kmsKeyArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>s3Destination.setKmsKeyArn(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 s3Destination;<NEW_LINE>}
class).unmarshall(context));
1,017,264
public Object visit(Object context1, FunctionCallExpression expr, boolean strict) {<NEW_LINE>ExecutionContext context = (ExecutionContext) context1;<NEW_LINE>Object ref = expr.getMemberExpression().accept(context, this, strict);<NEW_LINE>Object function = getValue(context, ref);<NEW_LINE>List<Expression> argExprs = expr.getArgumentExpressions();<NEW_LINE>Object[] args = new <MASK><NEW_LINE>int i = 0;<NEW_LINE>for (Expression each : argExprs) {<NEW_LINE>args[i] = getValue(context, each.accept(context, this, strict));<NEW_LINE>++i;<NEW_LINE>}<NEW_LINE>if (!(function instanceof JSFunction)) {<NEW_LINE>throw new ThrowException(context, context.createTypeError(expr.getMemberExpression() + " is not calllable"));<NEW_LINE>}<NEW_LINE>Object thisValue = null;<NEW_LINE>if (ref instanceof Reference) {<NEW_LINE>if (((Reference) ref).isPropertyReference()) {<NEW_LINE>thisValue = ((Reference) ref).getBase();<NEW_LINE>} else {<NEW_LINE>thisValue = ((EnvironmentRecord) ((Reference) ref).getBase()).implicitThisValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return (context.call(ref, (JSFunction) function, thisValue, args));<NEW_LINE>}
Object[argExprs.size()];
628,989
public int compare(CapabilityStatementRestResourceComponent theO1, CapabilityStatementRestResourceComponent theO2) {<NEW_LINE>DecimalType count1 = new DecimalType();<NEW_LINE>List<Extension> count1exts = theO1.getExtensionsByUrl(RESOURCE_COUNT_EXT_URL);<NEW_LINE>if (count1exts != null && count1exts.size() > 0) {<NEW_LINE>count1 = (DecimalType) count1exts.get(0).getValue();<NEW_LINE>}<NEW_LINE>DecimalType count2 = new DecimalType();<NEW_LINE>List<Extension> count2exts = theO2.getExtensionsByUrl(RESOURCE_COUNT_EXT_URL);<NEW_LINE>if (count2exts != null && count2exts.size() > 0) {<NEW_LINE>count2 = (DecimalType) count2exts.get(0).getValue();<NEW_LINE>}<NEW_LINE>int retVal = count2.compareTo(count1);<NEW_LINE>if (retVal == 0) {<NEW_LINE>retVal = theO1.getTypeElement().getValue().compareTo(theO2.<MASK><NEW_LINE>}<NEW_LINE>return retVal;<NEW_LINE>}
getTypeElement().getValue());
644,496
public static void validateJsonObject(JsonObject jsonObj) throws IOException {<NEW_LINE>if (jsonObj == null) {<NEW_LINE>if (Category.openapiRequiredFields.isEmpty()) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>// has required fields<NEW_LINE>throw new IllegalArgumentException(String.format("The required field(s) %s in Category is not found in the empty JSON string", Category.openapiRequiredFields.toString()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<Entry<String, JsonElement><MASK><NEW_LINE>// check to see if the JSON string contains additional fields<NEW_LINE>for (Entry<String, JsonElement> entry : entries) {<NEW_LINE>if (!Category.openapiFields.contains(entry.getKey())) {<NEW_LINE>throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Category` properties. JSON: %s", entry.getKey(), jsonObj.toString()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// check to make sure all required properties/fields are present in the JSON string<NEW_LINE>for (String requiredField : Category.openapiRequiredFields) {<NEW_LINE>if (jsonObj.get(requiredField) == null) {<NEW_LINE>throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> entries = jsonObj.entrySet();
1,063,449
public static List<Header> createRequestHeaders(Metadata headers, String defaultPath, String authority, String userAgent, boolean useGet, boolean usePlaintext) {<NEW_LINE>Preconditions.checkNotNull(headers, "headers");<NEW_LINE>Preconditions.checkNotNull(defaultPath, "defaultPath");<NEW_LINE>Preconditions.checkNotNull(authority, "authority");<NEW_LINE>// Discard any application supplied duplicates of the reserved headers<NEW_LINE>headers.discardAll(GrpcUtil.CONTENT_TYPE_KEY);<NEW_LINE>headers.discardAll(GrpcUtil.TE_HEADER);<NEW_LINE>headers.discardAll(GrpcUtil.USER_AGENT_KEY);<NEW_LINE>// 7 is the number of explicit add calls below.<NEW_LINE>List<Header> okhttpHeaders = new ArrayList<>(7 + InternalMetadata.headerCount(headers));<NEW_LINE>// Set GRPC-specific headers.<NEW_LINE>if (usePlaintext) {<NEW_LINE>okhttpHeaders.add(HTTP_SCHEME_HEADER);<NEW_LINE>} else {<NEW_LINE>okhttpHeaders.add(HTTPS_SCHEME_HEADER);<NEW_LINE>}<NEW_LINE>if (useGet) {<NEW_LINE>okhttpHeaders.add(METHOD_GET_HEADER);<NEW_LINE>} else {<NEW_LINE>okhttpHeaders.add(METHOD_HEADER);<NEW_LINE>}<NEW_LINE>okhttpHeaders.add(new Header(Header.TARGET_AUTHORITY, authority));<NEW_LINE>String path = defaultPath;<NEW_LINE>okhttpHeaders.add(new Header(Header.TARGET_PATH, path));<NEW_LINE>okhttpHeaders.add(new Header(GrpcUtil.USER_AGENT_KEY.name(), userAgent));<NEW_LINE>// All non-pseudo headers must come after pseudo headers.<NEW_LINE>okhttpHeaders.add(CONTENT_TYPE_HEADER);<NEW_LINE>okhttpHeaders.add(TE_HEADER);<NEW_LINE>// Now add any application-provided headers.<NEW_LINE>byte[][] serializedHeaders = TransportFrameUtil.toHttp2Headers(headers);<NEW_LINE>for (int i = 0; i < serializedHeaders.length; i += 2) {<NEW_LINE>ByteString key = ByteString.of(serializedHeaders[i]);<NEW_LINE>String keyString = key.utf8();<NEW_LINE>if (isApplicationHeader(keyString)) {<NEW_LINE>ByteString value = ByteString.of(serializedHeaders[i + 1]);<NEW_LINE>okhttpHeaders.add(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return okhttpHeaders;<NEW_LINE>}
new Header(key, value));
1,263,459
private void drawTransportStops() {<NEW_LINE>GeometryAnchorWayStyle anchorWayStyle = new GeometryAnchorWayStyle(getContext());<NEW_LINE>for (Map.Entry<Integer, GeometryWayStyle<?>> entry : styleMap.entrySet()) {<NEW_LINE>GeometryWayStyle<?> style = entry.getValue();<NEW_LINE>boolean transportStyle = style instanceof GeometryTransportWayStyle;<NEW_LINE>if (style != null && transportStyle) {<NEW_LINE>GeometryTransportWayStyle wayStyle = (GeometryTransportWayStyle) style;<NEW_LINE>List<TransportStop> transportStops = wayStyle.getRoute().getForwardStops();<NEW_LINE>TransportRouteResultSegment segment = wayStyle.getSegment();<NEW_LINE>int start = segment.start;<NEW_LINE>int end = segment.end;<NEW_LINE>for (int i = start; i <= end; i++) {<NEW_LINE>TransportStop stop = transportStops.get(i);<NEW_LINE>int x = MapUtils.get31TileNumberX(stop.getLocation().getLongitude());<NEW_LINE>int y = MapUtils.get31TileNumberY(stop.getLocation().getLatitude());<NEW_LINE>Bitmap icon = (i == start || i == end) ? anchorWayStyle.getPointBitmap<MASK><NEW_LINE>MapMarkerBuilder transportMarkerBuilder = new MapMarkerBuilder();<NEW_LINE>transportMarkerBuilder.setIsAccuracyCircleSupported(false).setBaseOrder(baseOrder - 15).setIsHidden(false).setPinIconHorisontalAlignment(MapMarker.PinIconHorisontalAlignment.CenterHorizontal).setPinIconVerticalAlignment(MapMarker.PinIconVerticalAlignment.CenterVertical).setPinIcon(NativeUtilities.createSkImageFromBitmap(icon));<NEW_LINE>if (transportRouteMarkers == null) {<NEW_LINE>transportRouteMarkers = new MapMarkersCollection();<NEW_LINE>}<NEW_LINE>MapMarker marker = transportMarkerBuilder.buildAndAddToCollection(transportRouteMarkers);<NEW_LINE>marker.setPosition(new PointI(x, y));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (transportRouteMarkers != null) {<NEW_LINE>mapRendererView.addSymbolsProvider(transportRouteMarkers);<NEW_LINE>}<NEW_LINE>}
() : wayStyle.getStopBitmap();
120,725
public List<StatementBase> parseSQL(String originStr) {<NEW_LINE>List<LogicalPlan> logicalPlans = parseMultiple(originStr);<NEW_LINE>List<StatementBase> <MASK><NEW_LINE>for (LogicalPlan logicalPlan : logicalPlans) {<NEW_LINE>// TODO: this is a trick to support explain. Since we do not support any other command in a short time.<NEW_LINE>// It is acceptable. In the future, we need to refactor this.<NEW_LINE>if (logicalPlan instanceof ExplainCommand) {<NEW_LINE>ExplainCommand explainCommand = (ExplainCommand) logicalPlan;<NEW_LINE>LogicalPlan innerPlan = explainCommand.getLogicalPlan();<NEW_LINE>LogicalPlanAdapter logicalPlanAdapter = new LogicalPlanAdapter(innerPlan);<NEW_LINE>logicalPlanAdapter.setIsExplain(new ExplainOptions(explainCommand.getLevel() == ExplainLevel.VERBOSE, explainCommand.getLevel() == ExplainLevel.GRAPH));<NEW_LINE>statementBases.add(logicalPlanAdapter);<NEW_LINE>} else {<NEW_LINE>statementBases.add(new LogicalPlanAdapter(logicalPlan));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return statementBases;<NEW_LINE>}
statementBases = new ArrayList<>();
1,818,805
public void saveStash(final File repository, final File[] roots) {<NEW_LINE>final File[] modifications = Git.getInstance().getFileStatusCache().listFiles(new File[] { repository }, FileInformation.STATUS_LOCAL_CHANGES);<NEW_LINE>if (modifications.length == 0) {<NEW_LINE>NotifyDescriptor nd = new NotifyDescriptor(Bundle.MSG_SaveStashAction_noModifications(), Bundle.LBL_SaveStashAction_noModifications(), NotifyDescriptor.DEFAULT_OPTION, NotifyDescriptor.INFORMATION_MESSAGE, new Object[] { NotifyDescriptor.OK_OPTION }, NotifyDescriptor.OK_OPTION);<NEW_LINE>DialogDisplayer.<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Mutex.EVENT.readAccess(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>SaveStash saveStash = new SaveStash(repository, roots, RepositoryInfo.getInstance(repository).getActiveBranch());<NEW_LINE>if (saveStash.show()) {<NEW_LINE>start(repository, modifications, saveStash);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getDefault().notifyLater(nd);
1,748,131
private void prepareStyles() {<NEW_LINE>StyledDocument doc = textPane.getStyledDocument();<NEW_LINE>Map<String, Color> keyWordColorMap = owlEditorKit.getWorkspace().getKeyWordColorMap();<NEW_LINE>for (String keyWord : keyWordColorMap.keySet()) {<NEW_LINE>Style s = doc.addStyle(keyWord, null);<NEW_LINE>Color color = keyWordColorMap.get(keyWord);<NEW_LINE>StyleConstants.setForeground(s, color);<NEW_LINE>StyleConstants.setBold(s, true);<NEW_LINE>}<NEW_LINE>plainStyle = doc.addStyle("PLAIN_STYLE", null);<NEW_LINE>StyleConstants.setItalic(plainStyle, false);<NEW_LINE>StyleConstants.setSpaceAbove(plainStyle, 0);<NEW_LINE>boldStyle = doc.addStyle("BOLD_STYLE", null);<NEW_LINE>StyleConstants.setBold(boldStyle, true);<NEW_LINE>nonBoldStyle = doc.addStyle("NON_BOLD_STYLE", null);<NEW_LINE>StyleConstants.setBold(nonBoldStyle, false);<NEW_LINE>selectionForeground = doc.addStyle("SEL_FG_STYPE", null);<NEW_LINE>// we know that it is possible for SELECTION_FOREGROUND to be null<NEW_LINE>// and an exception here means that Protege doesn't start<NEW_LINE>if (selectionForeground != null && SELECTION_FOREGROUND != null) {<NEW_LINE>StyleConstants.setForeground(selectionForeground, SELECTION_FOREGROUND);<NEW_LINE>}<NEW_LINE>foreground = doc.addStyle("FG_STYLE", null);<NEW_LINE>if (foreground != null && FOREGROUND != null) {<NEW_LINE>StyleConstants.setForeground(foreground, FOREGROUND);<NEW_LINE>}<NEW_LINE>linkStyle = doc.addStyle("LINK_STYLE", null);<NEW_LINE>StyleConstants.setForeground(linkStyle, Color.BLUE);<NEW_LINE>StyleConstants.setUnderline(linkStyle, true);<NEW_LINE>inconsistentClassStyle = doc.addStyle("INCONSISTENT_CLASS_STYLE", null);<NEW_LINE>StyleConstants.setForeground(inconsistentClassStyle, Color.RED);<NEW_LINE>focusedEntityStyle = doc.addStyle("FOCUSED_ENTITY_STYLE", null);<NEW_LINE>StyleConstants.setForeground(focusedEntityStyle, Color.BLACK);<NEW_LINE>StyleConstants.setBackground(focusedEntityStyle, new Color(220, 220, 250));<NEW_LINE>ontologyURIStyle = doc.addStyle("ONTOLOGY_URI_STYLE", null);<NEW_LINE>StyleConstants.setForeground(ontologyURIStyle, Color.GRAY);<NEW_LINE>commentedOutStyle = doc.addStyle("COMMENTED_OUT_STYLE", null);<NEW_LINE>StyleConstants.setForeground(commentedOutStyle, Color.GRAY);<NEW_LINE>StyleConstants.setItalic(commentedOutStyle, true);<NEW_LINE>feintStyle = <MASK><NEW_LINE>StyleConstants.setForeground(feintStyle, Color.GRAY);<NEW_LINE>strikeOutStyle = doc.addStyle("STRIKE_OUT", null);<NEW_LINE>StyleConstants.setStrikeThrough(strikeOutStyle, true);<NEW_LINE>StyleConstants.setBold(strikeOutStyle, false);<NEW_LINE>fontSizeStyle = doc.addStyle("FONT_SIZE", null);<NEW_LINE>StyleConstants.setFontSize(fontSizeStyle, 40);<NEW_LINE>}
doc.addStyle("FEINT_STYLE", null);
1,760,043
public static ConnectionProfile buildDefaultConnectionProfile(Settings settings) {<NEW_LINE>int connectionsPerNodeRecovery = TransportSettings.CONNECTIONS_PER_NODE_RECOVERY.get(settings);<NEW_LINE>int connectionsPerNodeBulk = TransportSettings.CONNECTIONS_PER_NODE_BULK.get(settings);<NEW_LINE>int connectionsPerNodeReg = TransportSettings.CONNECTIONS_PER_NODE_REG.get(settings);<NEW_LINE>int connectionsPerNodeState = TransportSettings.CONNECTIONS_PER_NODE_STATE.get(settings);<NEW_LINE>int connectionsPerNodePing = TransportSettings.CONNECTIONS_PER_NODE_PING.get(settings);<NEW_LINE>Builder builder = new Builder();<NEW_LINE>builder.setConnectTimeout(TransportSettings.CONNECT_TIMEOUT.get(settings));<NEW_LINE>builder.setHandshakeTimeout(TransportSettings.CONNECT_TIMEOUT.get(settings));<NEW_LINE>builder.setPingInterval(TransportSettings.PING_SCHEDULE.get(settings));<NEW_LINE>builder.setCompressionEnabled(TransportSettings.TRANSPORT_COMPRESS.get(settings));<NEW_LINE>builder.addConnections(connectionsPerNodeBulk, TransportRequestOptions.Type.BULK);<NEW_LINE>builder.addConnections(<MASK><NEW_LINE>// if we are not master eligible we don't need a dedicated channel to publish the state<NEW_LINE>builder.addConnections(DiscoveryNode.isMasterNode(settings) ? connectionsPerNodeState : 0, TransportRequestOptions.Type.STATE);<NEW_LINE>// if we are not a data-node we don't need any dedicated channels for recovery<NEW_LINE>builder.addConnections(DiscoveryNode.isDataNode(settings) ? connectionsPerNodeRecovery : 0, TransportRequestOptions.Type.RECOVERY);<NEW_LINE>builder.addConnections(connectionsPerNodeReg, TransportRequestOptions.Type.REG);<NEW_LINE>return builder.build();<NEW_LINE>}
connectionsPerNodePing, TransportRequestOptions.Type.PING);
1,512,969
public R apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) throws Exception {<NEW_LINE>if (t1 == null) {<NEW_LINE>throw new NullPointerException("t1 is null, tag = " + tag);<NEW_LINE>}<NEW_LINE>if (t2 == null) {<NEW_LINE>throw new NullPointerException("t2 is null, tag = " + tag);<NEW_LINE>}<NEW_LINE>if (t3 == null) {<NEW_LINE>throw new NullPointerException("t3 is null, tag = " + tag);<NEW_LINE>}<NEW_LINE>if (t4 == null) {<NEW_LINE>throw new NullPointerException("t4 is null, tag = " + tag);<NEW_LINE>}<NEW_LINE>if (t5 == null) {<NEW_LINE>throw new NullPointerException("t5 is null, tag = " + tag);<NEW_LINE>}<NEW_LINE>if (t6 == null) {<NEW_LINE>throw new NullPointerException("t6 is null, tag = " + tag);<NEW_LINE>}<NEW_LINE>if (t7 == null) {<NEW_LINE>throw new NullPointerException("t7 is null, tag = " + tag);<NEW_LINE>}<NEW_LINE>R v;<NEW_LINE>try {<NEW_LINE>v = actual.apply(t1, t2, t3, t4, t5, t6, t7);<NEW_LINE>} catch (Throwable ex) {<NEW_LINE>throw FunctionTagging.<Exception>justThrow(new FunctionTaggingException(<MASK><NEW_LINE>}<NEW_LINE>if (v == null) {<NEW_LINE>throw new NullPointerException("The BiFunction returned null, tag = " + tag);<NEW_LINE>}<NEW_LINE>return v;<NEW_LINE>}
tag).appendLast(ex));
863,866
protected boolean fireCloseTab(MouseEvent event, int tabIndexToClose) {<NEW_LINE>boolean closeit = true;<NEW_LINE>// Guaranteed to return a non-null array<NEW_LINE>Object[<MASK><NEW_LINE>for (Object listener : listeners) {<NEW_LINE>if (listener instanceof CloseableTabbedPaneListener) {<NEW_LINE>boolean tabCanBeClosed = ((CloseableTabbedPaneListener) listener).closeTab(tabIndexToClose);<NEW_LINE>if (!tabCanBeClosed) {<NEW_LINE>closeit = false;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (closeit) {<NEW_LINE>if (tabIndexToClose > 0) {<NEW_LINE>Rectangle rec = getUI().getTabBounds(this, tabIndexToClose);<NEW_LINE>MouseEvent newEvent = new MouseEvent((Component) event.getSource(), event.getID() + 1, System.currentTimeMillis(), event.getModifiers(), rec.x, rec.y, event.getClickCount(), false, event.getButton());<NEW_LINE>dispatchEvent(newEvent);<NEW_LINE>}<NEW_LINE>remove(tabIndexToClose);<NEW_LINE>SikulixIDE.showAgain();<NEW_LINE>}<NEW_LINE>return closeit;<NEW_LINE>}
] listeners = listenerList.getListenerList();
116,496
private static boolean isSameSymbolTable(SymbolTable newTable, SymbolTable curTable) {<NEW_LINE>if (newTable == null && curTable == null) {<NEW_LINE>return true;<NEW_LINE>} else if (newTable != null && curTable == null) {<NEW_LINE>return false;<NEW_LINE>} else if (newTable == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (newTable.isLocalTable() && newTable.getImportedTables().length == 0) {<NEW_LINE>return true;<NEW_LINE>} else if (newTable.isSystemTable() && curTable.isSystemTable()) {<NEW_LINE>return newTable.getVersion() == curTable.getVersion();<NEW_LINE>} else if (newTable.isSharedTable() && curTable.isSharedTable()) {<NEW_LINE>return (newTable.getName().equals(curTable.getName())) & (newTable.getVersion(<MASK><NEW_LINE>} else if (newTable.isLocalTable() && curTable.isLocalTable()) {<NEW_LINE>SymbolTable[] xTable = newTable.getImportedTables();<NEW_LINE>SymbolTable[] yTable = curTable.getImportedTables();<NEW_LINE>// compare imports<NEW_LINE>if (xTable.length == yTable.length) {<NEW_LINE>for (int i = 0; i < xTable.length; i++) {<NEW_LINE>if (!isSameSymbolTable(xTable[i], yTable[i]))<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
) == curTable.getVersion());
894,054
private static RangeHighlighter createOrReuseLineMarker(@Nonnull LineMarkerInfo<?> info, @Nonnull MarkupModelEx markupModel, @Nullable HighlightersRecycler toReuse) {<NEW_LINE>LineMarkerInfo.LineMarkerGutterIconRenderer<?> newRenderer = (LineMarkerInfo.LineMarkerGutterIconRenderer<?>) info.createGutterRenderer();<NEW_LINE>RangeHighlighter highlighter = toReuse == null ? null : toReuse.pickupHighlighterFromGarbageBin(info.startOffset, info.endOffset, HighlighterLayer.ADDITIONAL_SYNTAX);<NEW_LINE>boolean newHighlighter = false;<NEW_LINE>if (highlighter == null) {<NEW_LINE>newHighlighter = true;<NEW_LINE>highlighter = markupModel.addRangeHighlighterAndChangeAttributes(info.startOffset, info.endOffset, HighlighterLayer.ADDITIONAL_SYNTAX, null, HighlighterTargetArea.LINES_IN_RANGE, false, markerEx -> {<NEW_LINE>markerEx.setGutterIconRenderer(newRenderer);<NEW_LINE>markerEx.setLineSeparatorColor(TargetAWT.to(info.separatorColor));<NEW_LINE>markerEx.setLineSeparatorPlacement(info.separatorPlacement);<NEW_LINE>markerEx.putUserData(LINE_MARKER_INFO, info);<NEW_LINE>});<NEW_LINE>MarkupEditorFilter editorFilter = info.getEditorFilter();<NEW_LINE>if (editorFilter != MarkupEditorFilter.EMPTY) {<NEW_LINE>highlighter.setEditorFilter(editorFilter);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!newHighlighter) {<NEW_LINE><MASK><NEW_LINE>LineMarkerInfo.LineMarkerGutterIconRenderer<?> oldRenderer = highlighter.getGutterIconRenderer() instanceof LineMarkerInfo.LineMarkerGutterIconRenderer ? (LineMarkerInfo.LineMarkerGutterIconRenderer<?>) highlighter.getGutterIconRenderer() : null;<NEW_LINE>boolean rendererChanged = newRenderer == null || !newRenderer.equals(oldRenderer);<NEW_LINE>boolean lineSeparatorColorChanged = !Comparing.equal(highlighter.getLineSeparatorColor(), info.separatorColor);<NEW_LINE>boolean lineSeparatorPlacementChanged = !Comparing.equal(highlighter.getLineSeparatorPlacement(), info.separatorPlacement);<NEW_LINE>if (rendererChanged || lineSeparatorColorChanged || lineSeparatorPlacementChanged) {<NEW_LINE>markupModel.changeAttributesInBatch((RangeHighlighterEx) highlighter, markerEx -> {<NEW_LINE>if (rendererChanged) {<NEW_LINE>markerEx.setGutterIconRenderer(newRenderer);<NEW_LINE>}<NEW_LINE>if (lineSeparatorColorChanged) {<NEW_LINE>markerEx.setLineSeparatorColor(TargetAWT.to(info.separatorColor));<NEW_LINE>}<NEW_LINE>if (lineSeparatorPlacementChanged) {<NEW_LINE>markerEx.setLineSeparatorPlacement(info.separatorPlacement);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>info.highlighter = highlighter;<NEW_LINE>return highlighter;<NEW_LINE>}
highlighter.putUserData(LINE_MARKER_INFO, info);
573,459
public void marshall(CreateCompilationJobRequest createCompilationJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createCompilationJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createCompilationJobRequest.getCompilationJobName(), COMPILATIONJOBNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCompilationJobRequest.getRoleArn(), ROLEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createCompilationJobRequest.getInputConfig(), INPUTCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCompilationJobRequest.getOutputConfig(), OUTPUTCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCompilationJobRequest.getVpcConfig(), VPCCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCompilationJobRequest.getStoppingCondition(), STOPPINGCONDITION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createCompilationJobRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createCompilationJobRequest.getModelPackageVersionArn(), MODELPACKAGEVERSIONARN_BINDING);
118,164
private void mkXPLine(ProbeMode mode, EioBox eiobox, TOPData data) {<NEW_LINE>if (data.hasXP) {<NEW_LINE>if (mode != ProbeMode.NORMAL || TopConfig.showXPByDefault.get()) {<NEW_LINE>// We need to put the number of levels in as "current" value for it to be displayed as text. To make the progress bar scale to the partial level, we set<NEW_LINE>// the "max" value in a way that is in the same ratio to the number of levels as the xp needed for the next level is to the current xp. If the bar<NEW_LINE>// should be empty but we do have at least one level in, there will be a small error, as (levels/Integer.MAX_VALUE) > 0.<NEW_LINE>int scalemax = data.xpBarScaled > 0 ? data.experienceLevel * 100 / data.xpBarScaled : Integer.MAX_VALUE;<NEW_LINE>eiobox.get().horizontal(eiobox.center()).item(new ItemStack(Items.EXPERIENCE_BOTTLE)).progress(data.experienceLevel, scalemax, eiobox.getProbeinfo().defaultProgressStyle().suffix(EnderIO.lang.localize("top.suffix.levels")).filledColor(0xff00FF0F).alternateFilledColor(<MASK><NEW_LINE>} else {<NEW_LINE>eiobox.addMore();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
0xff00AA0A).borderColor(0xff00AA0A));
200,148
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0,c1,c2,c3,c4,c5".split(",");<NEW_LINE>SupportEvalBuilder builder = new SupportEvalBuilder("SupportBean_ST0_Container");<NEW_LINE>builder.expression(fields[0], "contained.mostFrequent(x => p00)");<NEW_LINE>builder.expression(fields[1], "contained.leastFrequent(x => p00)");<NEW_LINE>builder.expression(fields[2], "contained.mostFrequent( (x, i) => p00 + i*2)");<NEW_LINE>builder.expression(fields[3], "contained.leastFrequent( (x, i) => p00 + i*2)");<NEW_LINE>builder.expression(fields[4], "contained.mostFrequent( (x, i, s) => p00 + i*2 + s*4)");<NEW_LINE>builder.expression(fields[5], "contained.leastFrequent( (x, i, s) => p00 + i*2 + s*4)");<NEW_LINE>builder.statementConsumer(stmt -> assertTypesAllSame(stmt.getEventType(), fields, EPTypePremade.INTEGERBOXED.getEPType()));<NEW_LINE>SupportBean_ST0_Container bean = SupportBean_ST0_Container.make2Value("E1,12", "E2,11", "E2,2", "E3,12");<NEW_LINE>builder.assertion(bean).expect(fields, 12, 11, <MASK><NEW_LINE>bean = SupportBean_ST0_Container.make2Value("E1,12");<NEW_LINE>builder.assertion(bean).expect(fields, 12, 12, 12, 12, 16, 16);<NEW_LINE>bean = SupportBean_ST0_Container.make2Value("E1,12", "E2,11", "E2,2", "E3,12", "E1,12", "E2,11", "E3,11");<NEW_LINE>builder.assertion(bean).expect(fields, 12, 2, 12, 12, 40, 40);<NEW_LINE>bean = SupportBean_ST0_Container.make2Value("E2,11", "E1,12", "E2,15", "E3,12", "E1,12", "E2,11", "E3,11");<NEW_LINE>builder.assertion(bean).expect(fields, 11, 15, 11, 11, 39, 39);<NEW_LINE>builder.assertion(SupportBean_ST0_Container.make2ValueNull()).expect(fields, null, null, null, null, null, null);<NEW_LINE>builder.assertion(SupportBean_ST0_Container.make2Value()).expect(fields, null, null, null, null, null, null);<NEW_LINE>builder.run(env);<NEW_LINE>}
12, 12, 28, 28);
809,265
public void queryWithResponse() {<NEW_LINE>// BEGIN: com.azure.storage.blob.specialized.BlobClientBase.queryWithResponse#BlobQueryOptions-Duration-Context<NEW_LINE>ByteArrayOutputStream queryData = new ByteArrayOutputStream();<NEW_LINE>String expression = "SELECT * from BlobStorage";<NEW_LINE>BlobQueryJsonSerialization input = new BlobQueryJsonSerialization().setRecordSeparator('\n');<NEW_LINE>BlobQueryDelimitedSerialization output = new BlobQueryDelimitedSerialization().setEscapeChar('\0').setColumnSeparator(',').setRecordSeparator('\n').setFieldQuote('\'').setHeadersPresent(true);<NEW_LINE>BlobRequestConditions requestConditions = new BlobRequestConditions().setLeaseId(leaseId);<NEW_LINE>Consumer<BlobQueryError> errorConsumer = System.out::println;<NEW_LINE>Consumer<BlobQueryProgress> progressConsumer = progress -> System.out.println("total blob bytes read: " + progress.getBytesScanned());<NEW_LINE>BlobQueryOptions queryOptions = new BlobQueryOptions(expression, queryData).setInputSerialization(input).setOutputSerialization(output).setRequestConditions(requestConditions).setErrorConsumer<MASK><NEW_LINE>System.out.printf("Query completed with status %d%n", client.queryWithResponse(queryOptions, timeout, new Context(key1, value1)).getStatusCode());<NEW_LINE>// END: com.azure.storage.blob.specialized.BlobClientBase.queryWithResponse#BlobQueryOptions-Duration-Context<NEW_LINE>}
(errorConsumer).setProgressConsumer(progressConsumer);
880,838
final ListGraphqlApisResult executeListGraphqlApis(ListGraphqlApisRequest listGraphqlApisRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listGraphqlApisRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListGraphqlApisRequest> request = null;<NEW_LINE>Response<ListGraphqlApisResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListGraphqlApisRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listGraphqlApisRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "AppSync");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListGraphqlApis");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListGraphqlApisResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListGraphqlApisResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
187,937
private void onFinishHelper(EVCacheEvent e, Throwable t) {<NEW_LINE>Object clientSpanObj = e.getAttribute(CLIENT_SPAN_ATTRIBUTE_KEY);<NEW_LINE>// Return if the previously saved Client Span is null<NEW_LINE>if (clientSpanObj == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Span clientSpan = (Span) clientSpanObj;<NEW_LINE>try {<NEW_LINE>if (t != null) {<NEW_LINE>this.safeTag(clientSpan, EVCacheTracingTags.ERROR, t.toString());<NEW_LINE>}<NEW_LINE>String status = e.getStatus();<NEW_LINE>this.safeTag(clientSpan, EVCacheTracingTags.STATUS, status);<NEW_LINE>long latency = this.getDurationInMicroseconds(e.getDurationInMillis());<NEW_LINE>clientSpan.tag(EVCacheTracingTags.LATENCY, String.valueOf(latency));<NEW_LINE>int ttl = e.getTTL();<NEW_LINE>clientSpan.tag(EVCacheTracingTags.DATA_TTL, String.valueOf(ttl));<NEW_LINE><MASK><NEW_LINE>if (cachedData != null) {<NEW_LINE>int cachedDataSize = cachedData.getData().length;<NEW_LINE>clientSpan.tag(EVCacheTracingTags.DATA_SIZE, String.valueOf(cachedDataSize));<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>clientSpan.finish();<NEW_LINE>}<NEW_LINE>}
CachedData cachedData = e.getCachedData();
1,544,435
private void add(final NamedOperationDetail namedOperation, final boolean overwrite, final User user, final String adminAuth) throws CacheOperationFailedException {<NEW_LINE>String name;<NEW_LINE>try {<NEW_LINE>name = namedOperation.getOperationName();<NEW_LINE>} catch (final NullPointerException e) {<NEW_LINE>throw new CacheOperationFailedException("NamedOperation cannot be null", e);<NEW_LINE>}<NEW_LINE>if (null == name) {<NEW_LINE>throw new CacheOperationFailedException("NamedOperation name cannot be null");<NEW_LINE>}<NEW_LINE>if (!overwrite) {<NEW_LINE>addToCache(name, namedOperation, false);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>NamedOperationDetail existing;<NEW_LINE>try {<NEW_LINE>existing = getFromCache(name);<NEW_LINE>} catch (final CacheOperationFailedException e) {<NEW_LINE>// if there is no existing named Operation add one<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (existing.hasWriteAccess(user, adminAuth)) {<NEW_LINE>addToCache(name, namedOperation, true);<NEW_LINE>} else {<NEW_LINE>throw new CacheOperationFailedException("User " + user.getUserId() + " does not have permission to overwrite");<NEW_LINE>}<NEW_LINE>}
addToCache(name, namedOperation, false);
876,329
public static UpdateHookConfigurationResponse unmarshall(UpdateHookConfigurationResponse updateHookConfigurationResponse, UnmarshallerContext _ctx) {<NEW_LINE>updateHookConfigurationResponse.setRequestId(_ctx.stringValue("UpdateHookConfigurationResponse.RequestId"));<NEW_LINE>updateHookConfigurationResponse.setCode(_ctx.integerValue("UpdateHookConfigurationResponse.Code"));<NEW_LINE>updateHookConfigurationResponse.setMessage(_ctx.stringValue("UpdateHookConfigurationResponse.Message"));<NEW_LINE>List<Configuration> hooksConfiguration = new ArrayList<Configuration>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("UpdateHookConfigurationResponse.HooksConfiguration.Length"); i++) {<NEW_LINE>Configuration configuration = new Configuration();<NEW_LINE>configuration.setName(_ctx.stringValue<MASK><NEW_LINE>configuration.setScript(_ctx.stringValue("UpdateHookConfigurationResponse.HooksConfiguration[" + i + "].Script"));<NEW_LINE>configuration.setIgnoreFail(_ctx.booleanValue("UpdateHookConfigurationResponse.HooksConfiguration[" + i + "].IgnoreFail"));<NEW_LINE>hooksConfiguration.add(configuration);<NEW_LINE>}<NEW_LINE>updateHookConfigurationResponse.setHooksConfiguration(hooksConfiguration);<NEW_LINE>return updateHookConfigurationResponse;<NEW_LINE>}
("UpdateHookConfigurationResponse.HooksConfiguration[" + i + "].Name"));
1,696,030
public KuduSink genStreamSink(AbstractTargetTableInfo targetTableInfo) {<NEW_LINE>KuduTableInfo kuduTableInfo = (KuduTableInfo) targetTableInfo;<NEW_LINE>this.kuduMasters = kuduTableInfo.getKuduMasters();<NEW_LINE>this.tableName = kuduTableInfo.getTableName();<NEW_LINE>this.defaultOperationTimeoutMs = kuduTableInfo.getDefaultOperationTimeoutMs();<NEW_LINE>this.workerCount = kuduTableInfo.getWorkerCount();<NEW_LINE>this.writeMode = kuduTableInfo.getWriteMode();<NEW_LINE>this.principal = kuduTableInfo.getPrincipal();<NEW_LINE>this.keytab = kuduTableInfo.getKeytab();<NEW_LINE>this.krb5conf = kuduTableInfo.getKrb5conf();<NEW_LINE>this<MASK><NEW_LINE>this.parallelism = Objects.isNull(kuduTableInfo.getParallelism()) ? parallelism : kuduTableInfo.getParallelism();<NEW_LINE>this.batchSize = kuduTableInfo.getBatchSize();<NEW_LINE>this.batchWaitInterval = kuduTableInfo.getBatchWaitInterval();<NEW_LINE>this.flushMode = kuduTableInfo.getFlushMode();<NEW_LINE>this.mutationBufferMaxOps = Objects.isNull(kuduTableInfo.getMutationBufferMaxOps()) ? Integer.parseInt(String.valueOf(Math.round(batchSize * 1.2))) : kuduTableInfo.getMutationBufferMaxOps();<NEW_LINE>return this;<NEW_LINE>}
.enableKrb = kuduTableInfo.isEnableKrb();
147,657
public static NewTopic toNewTopic(Topic topic, Map<Integer, List<Integer>> assignment) {<NEW_LINE>NewTopic newTopic;<NEW_LINE>if (assignment != null) {<NEW_LINE>if (topic.getNumPartitions() != assignment.size()) {<NEW_LINE>throw new IllegalArgumentException(format("Topic %s has %d partitions supplied, but the number of partitions " + "configured in KafkaTopic %s is %d", topic.getTopicName(), assignment.size(), topic.getResourceName(), topic.getNumPartitions()));<NEW_LINE>}<NEW_LINE>for (int partition = 0; partition < assignment.size(); partition++) {<NEW_LINE>final List<Integer> value = assignment.get(partition);<NEW_LINE>if (topic.getNumReplicas() != value.size()) {<NEW_LINE>throw new IllegalArgumentException(format("Partition %d of topic %s has %d assigned replicas, " + "but the number of replicas configured in KafkaTopic %s for the topic is %d", partition, topic.getTopicName(), value.size(), topic.getResourceName(), topic.getNumReplicas()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>newTopic = new NewTopic(topic.getTopicName().toString(), assignment);<NEW_LINE>} else {<NEW_LINE>Optional<Integer> numPartitions = topic.getNumPartitions() == -1 ? Optional.empty() : Optional.of(topic.getNumPartitions());<NEW_LINE>Optional<Short> numReplicas = topic.getNumReplicas() == -1 ? Optional.empty() : Optional.<MASK><NEW_LINE>newTopic = new NewTopic(topic.getTopicName().toString(), numPartitions, numReplicas);<NEW_LINE>}<NEW_LINE>newTopic.configs(topic.getConfig());<NEW_LINE>return newTopic;<NEW_LINE>}
of(topic.getNumReplicas());
1,388,409
public static boolean isWordEnd(@Nonnull CharSequence text, int offset, boolean isCamel) {<NEW_LINE>char prev = offset > 0 ? text.charAt(offset - 1) : 0;<NEW_LINE>char current = text.charAt(offset);<NEW_LINE>char next = offset + 1 < text.length() ? text.charAt(offset + 1) : 0;<NEW_LINE>final boolean firstIsIdentifierPart = Character.isJavaIdentifierPart(prev);<NEW_LINE>final boolean secondIsIdentifierPart = Character.isJavaIdentifierPart(current);<NEW_LINE>if (firstIsIdentifierPart && !secondIsIdentifierPart) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (isCamel) {<NEW_LINE>if (firstIsIdentifierPart && (Character.isLowerCase(prev) && Character.isUpperCase(current) || prev != '_' && current == '_' || Character.isUpperCase(prev) && Character.isUpperCase(current) && Character.isLowerCase(next))) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return !Character.isWhitespace(prev) && !firstIsIdentifierPart && (Character<MASK><NEW_LINE>}
.isWhitespace(current) || secondIsIdentifierPart);
1,733,262
public String create(PipelineOptions options) {<NEW_LINE>GcsOptions gcsOptions = options.as(GcsOptions.class);<NEW_LINE>LOG.info("No stagingLocation provided, falling back to gcpTempLocation");<NEW_LINE>String gcpTempLocation;<NEW_LINE>try {<NEW_LINE>gcpTempLocation = gcsOptions.getGcpTempLocation();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IllegalArgumentException(<MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>gcsOptions.getPathValidator().validateOutputFilePrefixSupported(gcpTempLocation);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IllegalArgumentException(String.format("Error constructing default value for stagingLocation: gcpTempLocation is not" + " a valid GCS path, %s. ", gcpTempLocation), e);<NEW_LINE>}<NEW_LINE>return FileSystems.matchNewResource(gcpTempLocation, true).resolve("staging", StandardResolveOptions.RESOLVE_DIRECTORY).toString();<NEW_LINE>}
"Error constructing default value for stagingLocation: failed to retrieve gcpTempLocation. " + "Either stagingLocation must be set explicitly or a valid value must be provided" + "for gcpTempLocation.", e);
1,808,901
public final RestResourceContext restResource() throws RecognitionException {<NEW_LINE>RestResourceContext _localctx = new <MASK><NEW_LINE>enterRule(_localctx, 6, RULE_restResource);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(43);<NEW_LINE>match(Name);<NEW_LINE>setState(48);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>while (_la == T__3) {<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(44);<NEW_LINE>match(T__3);<NEW_LINE>setState(45);<NEW_LINE>match(Name);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(50);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>setState(55);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>while (_la == T__4) {<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(51);<NEW_LINE>match(T__4);<NEW_LINE>setState(52);<NEW_LINE>match(Name);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(57);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
RestResourceContext(_ctx, getState());
1,348,665
protected void performRewrite(TransformationContext ctx) throws Exception {<NEW_LINE>WorkingCopy wc = ctx.getWorkingCopy();<NEW_LINE>wc.toPhase(JavaSource.Phase.RESOLVED);<NEW_LINE>TreeMaker make = wc.getTreeMaker();<NEW_LINE>// rewrite annotations in case of ManagedBean<NEW_LINE>if (MANAGED_BEAN.equals(annotation.getAnnotationType().toString())) {<NEW_LINE>ModifiersTree modifiers = ((ClassTree) wc.getTrees().getTree(element)).getModifiers();<NEW_LINE>AnnotationTree annotationTree = (AnnotationTree) wc.getTrees().getTree(element, annotation);<NEW_LINE>List<ExpressionTree> arguments = new ArrayList<>();<NEW_LINE>for (ExpressionTree expressionTree : annotationTree.getArguments()) {<NEW_LINE>if (expressionTree.getKind() == Tree.Kind.ASSIGNMENT) {<NEW_LINE>AssignmentTree at = (AssignmentTree) expressionTree;<NEW_LINE>String varName = ((IdentifierTree) at.getVariable()).getName().toString();<NEW_LINE>if (varName.equals("name")) {<NEW_LINE>// NOI18N<NEW_LINE>ExpressionTree valueTree = make.Identifier(at.getExpression().toString());<NEW_LINE>arguments.add(valueTree);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ModifiersTree newModifiersTree = make.removeModifiersAnnotation(modifiers, (AnnotationTree) wc.getTrees().getTree(element, annotation));<NEW_LINE>AnnotationTree newTree = GenerationUtils.newInstance(wc).createAnnotation(replacingClass, arguments);<NEW_LINE>newModifiersTree = make.addModifiersAnnotation(newModifiersTree, newTree);<NEW_LINE>wc.rewrite(modifiers, newModifiersTree);<NEW_LINE>}<NEW_LINE>// rewrite imports<NEW_LINE>List<? extends ImportTree> imports = wc<MASK><NEW_LINE>ImportTree newImportTree = make.Import(make.QualIdent(replacingClass), false);<NEW_LINE>for (ImportTree importTree : imports) {<NEW_LINE>if (deprecatedClass.equals(importTree.getQualifiedIdentifier().toString())) {<NEW_LINE>wc.rewrite(importTree, newImportTree);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getCompilationUnit().getImports();
745,474
public void onIEBlockPlacedBy(BlockPlaceContext context, BlockState state) {<NEW_LINE>Level world = context.getLevel();<NEW_LINE>BlockPos pos = context.getClickedPos();<NEW_LINE>BlockEntity tile = world.getBlockEntity(pos);<NEW_LINE>Player placer = context.getPlayer();<NEW_LINE>Direction side = context.getClickedFace();<NEW_LINE>float hitX = (float) context.getClickLocation().x - pos.getX();<NEW_LINE>float hitY = (float) context.getClickLocation().y - pos.getY();<NEW_LINE>float hitZ = (float) context.getClickLocation().z - pos.getZ();<NEW_LINE>ItemStack stack = context.getItemInHand();<NEW_LINE>if (tile instanceof IDirectionalTile) {<NEW_LINE>Direction f = ((IDirectionalTile) tile).getFacingForPlacement(placer, pos, side, hitX, hitY, hitZ);<NEW_LINE>((IDirectionalTile<MASK><NEW_LINE>if (tile instanceof IAdvancedDirectionalTile)<NEW_LINE>((IAdvancedDirectionalTile) tile).onDirectionalPlacement(side, hitX, hitY, hitZ, placer);<NEW_LINE>}<NEW_LINE>if (tile instanceof IReadOnPlacement)<NEW_LINE>((IReadOnPlacement) tile).readOnPlacement(placer, stack);<NEW_LINE>if (tile instanceof IHasDummyBlocks)<NEW_LINE>((IHasDummyBlocks) tile).placeDummies(context, state);<NEW_LINE>if (tile instanceof IPlacementInteraction)<NEW_LINE>((IPlacementInteraction) tile).onTilePlaced(world, pos, state, side, hitX, hitY, hitZ, placer, stack);<NEW_LINE>}
) tile).setFacing(f);
811,969
public void updateIndices(SegmentDirectory.Writer segmentWriter, IndexCreatorProvider indexCreatorProvider) throws Exception {<NEW_LINE>// Remove indices not set in table config any more<NEW_LINE>String segmentName = _segmentMetadata.getName();<NEW_LINE>Set<String> existingColumns = segmentWriter.toSegmentDirectory().getColumnsWithIndex(ColumnIndexType.TEXT_INDEX);<NEW_LINE>for (String column : existingColumns) {<NEW_LINE>if (!_columnsToAddIdx.remove(column)) {<NEW_LINE>LOGGER.info("Removing existing text index from segment: {}, column: {}", segmentName, column);<NEW_LINE>segmentWriter.removeIndex(column, ColumnIndexType.TEXT_INDEX);<NEW_LINE>LOGGER.info("Removed existing text index from segment: {}, column: {}", segmentName, column);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (String column : _columnsToAddIdx) {<NEW_LINE>ColumnMetadata <MASK><NEW_LINE>if (shouldCreateTextIndex(columnMetadata)) {<NEW_LINE>createTextIndexForColumn(segmentWriter, columnMetadata, indexCreatorProvider);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
columnMetadata = _segmentMetadata.getColumnMetadataFor(column);
1,467,652
public DescribeInstancesResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeInstancesResult describeInstancesResult = new DescribeInstancesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.nextEvent();<NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return describeInstancesResult;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("reservationSet", targetDepth)) {<NEW_LINE>describeInstancesResult.withReservations(new ArrayList<Reservation>());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("reservationSet/item", targetDepth)) {<NEW_LINE>describeInstancesResult.withReservations(ReservationStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("nextToken", targetDepth)) {<NEW_LINE>describeInstancesResult.setNextToken(StringStaxUnmarshaller.getInstance<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return describeInstancesResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
().unmarshall(context));
1,495,598
static String injectSecurityWhereClauses(@Nullable final String sql, @Nullable final String securityWhereClause) {<NEW_LINE>if (sql == null) {<NEW_LINE>logger.debug("injectSecurityWhereClauses - sql=null; -> return null");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (securityWhereClause == null) {<NEW_LINE>logger.debug("injectSecurityWhereClauses - securityWhereClause=null; -> return sql={}", sql);<NEW_LINE>return sql;<NEW_LINE>}<NEW_LINE>logger.debug("injectSecurityWhereClauses - sql={}", sql);<NEW_LINE>logger.debug("injectSecurityWhereClauses - securityWhereClause={}", securityWhereClause);<NEW_LINE><MASK><NEW_LINE>// Cut off last ORDER BY clause<NEW_LINE>final String orderBy;<NEW_LINE>final int idxOrderBy = sql.lastIndexOf("ORDER BY ");<NEW_LINE>final int lastIdxOfSemicolon = sql.lastIndexOf(";");<NEW_LINE>final int idxSemicolon = lastIdxOfSemicolon > -1 ? lastIdxOfSemicolon : sql.length();<NEW_LINE>if (idxOrderBy != -1) {<NEW_LINE>logger.debug("injectSecurityWhereClauses - found a 'ORDER BY' at idx={}; -> later append it to the end", idxSemicolon);<NEW_LINE>orderBy = sql.substring(idxOrderBy, idxSemicolon);<NEW_LINE>sqlCustomized.append(sql, 0, idxOrderBy);<NEW_LINE>} else if (idxSemicolon != -1) {<NEW_LINE>logger.debug("injectSecurityWhereClauses - found a semicolon at idx={}; -> will omit it", idxSemicolon);<NEW_LINE>orderBy = null;<NEW_LINE>sqlCustomized.append(sql, 0, idxSemicolon);<NEW_LINE>} else {<NEW_LINE>orderBy = null;<NEW_LINE>sqlCustomized.append(sql);<NEW_LINE>}<NEW_LINE>// Do we have to add WHERE or AND<NEW_LINE>if (!sql.contains(" WHERE ")) {<NEW_LINE>logger.debug("injectSecurityWhereClauses - found no ' WHERE '; -> will add the securityWhereClause with a WHERE");<NEW_LINE>sqlCustomized.append("\nWHERE ");<NEW_LINE>} else {<NEW_LINE>logger.debug("injectSecurityWhereClauses - found a ' WHERE '; -> will add the securityWhereClause with an AND");<NEW_LINE>sqlCustomized.append("\nAND ");<NEW_LINE>}<NEW_LINE>sqlCustomized.append(securityWhereClause).append(" /*JasperJdbcConnection.securityWhereClause*/");<NEW_LINE>if (orderBy != null) {<NEW_LINE>sqlCustomized.append("\n").append(orderBy);<NEW_LINE>}<NEW_LINE>sqlCustomized.append(";");<NEW_LINE>return sqlCustomized.toString();<NEW_LINE>}
final StringBuilder sqlCustomized = new StringBuilder();
1,828,414
private float computeMipLevel(float roughness, int numSamples, float size, float voH) {<NEW_LINE>// H[2] is NoH in local space<NEW_LINE>// adds 1.e-5 to avoid ggx / 0.0<NEW_LINE>float NoH = voH + 1E-5f;<NEW_LINE>// Probability Distribution Function<NEW_LINE>float Pdf = ggx(NoH, roughness) * NoH / (4.0f * voH);<NEW_LINE>// Solid angle represented by this sample<NEW_LINE>float omegaS = 1.0f / (numSamples * Pdf);<NEW_LINE>// Solid angle covered by 1 pixel with 6 faces that are EnvMapSize X EnvMapSize<NEW_LINE>float omegaP = 4.0f * FastMath.PI / (6.0f * size * size);<NEW_LINE>// Original paper suggest biasing the mip to improve the results<NEW_LINE>// I tested that the result is better with bias 1<NEW_LINE>float mipBias = 1.0f;<NEW_LINE>double maxLod = Math.log(size<MASK><NEW_LINE>double log2 = Math.log(omegaS / omegaP) / Math.log(2);<NEW_LINE>return Math.min(Math.max(0.5f * (float) log2 + mipBias, 0.0f), (float) maxLod);<NEW_LINE>}
) / Math.log(2f);
1,154,701
public boolean shouldRenderGroup(ItemStack stack, String group) {<NEW_LINE>if ("body".equals(group))<NEW_LINE>return true;<NEW_LINE>if ("blade".equals(group))<NEW_LINE>return !this.getHead(stack).isEmpty();<NEW_LINE>CompoundTag upgrades = this.getUpgrades(stack);<NEW_LINE>if ("upgrade_lube".equals(group))<NEW_LINE>return upgrades.getBoolean("oiled");<NEW_LINE>if ("upgrade_launcher".equals(group))<NEW_LINE>return upgrades.getBoolean("launcher");<NEW_LINE>if ("upgrade_blades0".equals(group))<NEW_LINE>return hasQuiverUpgrade(stack);<NEW_LINE>if ("upgrade_blades1".equals(group))<NEW_LINE>return hasQuiverUpgrade(stack) && !this.getSawblade(<MASK><NEW_LINE>if ("upgrade_blades2".equals(group))<NEW_LINE>return hasQuiverUpgrade(stack) && !this.getSawblade(stack, 2).isEmpty();<NEW_LINE>return true;<NEW_LINE>}
stack, 1).isEmpty();
1,674,552
public void serializeNativeObject(OIndexRIDContainer object, byte[] stream, int offset, Object... hints) {<NEW_LINE>LONG_SERIALIZER.serializeNative(object.getFileId(), stream, offset + FILE_ID_OFFSET);<NEW_LINE>final boolean embedded = object.isEmbedded();<NEW_LINE>final boolean durable = object.isDurableNonTxMode();<NEW_LINE>BOOLEAN_SERIALIZER.serializeNative(embedded, stream, offset + EMBEDDED_OFFSET);<NEW_LINE>BOOLEAN_SERIALIZER.serializeNative(durable, stream, offset + DURABLE_OFFSET);<NEW_LINE>if (embedded) {<NEW_LINE>INT_SERIALIZER.serializeNative(object.size(<MASK><NEW_LINE>int p = offset + EMBEDDED_VALUES_OFFSET;<NEW_LINE>for (OIdentifiable ids : object) {<NEW_LINE>LINK_SERIALIZER.serializeNativeObject(ids, stream, p);<NEW_LINE>p += RID_SIZE;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>final OIndexRIDContainerSBTree underlying = (OIndexRIDContainerSBTree) object.getUnderlying();<NEW_LINE>final OBonsaiBucketPointer rootPointer = underlying.getRootPointer();<NEW_LINE>LONG_SERIALIZER.serializeNative(rootPointer.getPageIndex(), stream, offset + SBTREE_ROOTINDEX_OFFSET);<NEW_LINE>INT_SERIALIZER.serializeNative(rootPointer.getPageOffset(), stream, offset + SBTREE_ROOTOFFSET_OFFSET);<NEW_LINE>}<NEW_LINE>}
), stream, offset + EMBEDDED_SIZE_OFFSET);
1,129,234
public JMeterTreeNode addComponent(TestElement component, JMeterTreeNode node) throws IllegalUserActionException {<NEW_LINE>if (node.getUserObject() instanceof AbstractConfigGui) {<NEW_LINE>throw new IllegalUserActionException("This node cannot hold sub-elements");<NEW_LINE>}<NEW_LINE>GuiPackage guiPackage = GuiPackage.getInstance();<NEW_LINE>if (guiPackage != null) {<NEW_LINE>// The node can be added in non GUI mode at startup<NEW_LINE>guiPackage.updateCurrentNode();<NEW_LINE>JMeterGUIComponent guicomp = guiPackage.getGui(component);<NEW_LINE>guicomp.clearGui();<NEW_LINE>guicomp.configure(component);<NEW_LINE>guicomp.modifyTestElement(component);<NEW_LINE>// put the gui object back<NEW_LINE>guiPackage.getCurrentGui();<NEW_LINE>// to the way it was.<NEW_LINE>}<NEW_LINE>JMeterTreeNode newNode = new JMeterTreeNode(component, this);<NEW_LINE>// This check the state of the TestElement and if returns false it<NEW_LINE>// disable the loaded node<NEW_LINE>try {<NEW_LINE>newNode.setEnabled(component.isEnabled());<NEW_LINE>} catch (Exception e) {<NEW_LINE>// TODO - can this ever happen?<NEW_LINE>newNode.setEnabled(true);<NEW_LINE>}<NEW_LINE>this.insertNodeInto(newNode, <MASK><NEW_LINE>return newNode;<NEW_LINE>}
node, node.getChildCount());
130,493
protected void initPointBuffers() {<NEW_LINE>boolean createBuffer = bufPointVertex == null;<NEW_LINE>if (createBuffer)<NEW_LINE>bufPointVertex = new VertexBuffer(pg, PGL.ARRAY_BUFFER, 4, PGL.SIZEOF_FLOAT, PGL.bufferUsageRetained);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPointVertex.glId);<NEW_LINE>tessGeo.initPointVerticesBuffer(!createBuffer, true, PGL.bufferUsageRetained);<NEW_LINE>createBuffer = bufPointColor == null;<NEW_LINE>if (createBuffer)<NEW_LINE>bufPointColor = new VertexBuffer(pg, PGL.ARRAY_BUFFER, 1, PGL.SIZEOF_INT, PGL.bufferUsageRetained);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPointColor.glId);<NEW_LINE>tessGeo.initPointColorsBuffer(!<MASK><NEW_LINE>createBuffer = bufPointAttrib == null;<NEW_LINE>if (createBuffer)<NEW_LINE>bufPointAttrib = new VertexBuffer(pg, PGL.ARRAY_BUFFER, 2, PGL.SIZEOF_FLOAT, PGL.bufferUsageRetained);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPointAttrib.glId);<NEW_LINE>tessGeo.initPointOffsetsBuffer(!createBuffer, true, PGL.bufferUsageRetained);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, 0);<NEW_LINE>createBuffer = bufPointIndex == null;<NEW_LINE>if (createBuffer)<NEW_LINE>bufPointIndex = new VertexBuffer(pg, PGL.ELEMENT_ARRAY_BUFFER, 1, PGL.SIZEOF_INDEX, PGL.bufferUsageRetained, true);<NEW_LINE>pgl.bindBuffer(PGL.ELEMENT_ARRAY_BUFFER, bufPointIndex.glId);<NEW_LINE>tessGeo.initPointIndicesBuffer(!createBuffer, true, PGL.bufferUsageRetained);<NEW_LINE>pgl.bindBuffer(PGL.ELEMENT_ARRAY_BUFFER, 0);<NEW_LINE>}
createBuffer, true, PGL.bufferUsageRetained);
712,236
public SIfcHeader convertToSObject(IfcHeader input) {<NEW_LINE>if (input == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SIfcHeader result = new SIfcHeader();<NEW_LINE>result.setOid(input.getOid());<NEW_LINE>result.setUuid(input.getUuid());<NEW_LINE>result.setRid(input.getRid());<NEW_LINE>result.getDescription().<MASK><NEW_LINE>result.setImplementationLevel(input.getImplementationLevel());<NEW_LINE>result.setFilename(input.getFilename());<NEW_LINE>result.setTimeStamp(input.getTimeStamp());<NEW_LINE>result.getAuthor().addAll(input.getAuthor());<NEW_LINE>result.getOrganization().addAll(input.getOrganization());<NEW_LINE>result.setPreProcessorVersion(input.getPreProcessorVersion());<NEW_LINE>result.setOriginatingSystem(input.getOriginatingSystem());<NEW_LINE>result.setIfcSchemaVersion(input.getIfcSchemaVersion());<NEW_LINE>result.setAuthorization(input.getAuthorization());<NEW_LINE>return result;<NEW_LINE>}
addAll(input.getDescription());
1,652,987
public void marshall(CreateBrokerRequest createBrokerRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createBrokerRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getAuthenticationStrategy(), AUTHENTICATIONSTRATEGY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getAutoMinorVersionUpgrade(), AUTOMINORVERSIONUPGRADE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getBrokerName(), BROKERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getConfiguration(), CONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getCreatorRequestId(), CREATORREQUESTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getDeploymentMode(), DEPLOYMENTMODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getEncryptionOptions(), ENCRYPTIONOPTIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getEngineType(), ENGINETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getEngineVersion(), ENGINEVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getHostInstanceType(), HOSTINSTANCETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getLdapServerMetadata(), LDAPSERVERMETADATA_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getLogs(), LOGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getMaintenanceWindowStartTime(), MAINTENANCEWINDOWSTARTTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getPubliclyAccessible(), PUBLICLYACCESSIBLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getSecurityGroups(), SECURITYGROUPS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getStorageType(), STORAGETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createBrokerRequest.getUsers(), USERS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createBrokerRequest.getSubnetIds(), SUBNETIDS_BINDING);
271,365
public static Map<IdUrlPair, List<AppResult>> groupJobs(List<AppResult> results, GroupBy groupBy) {<NEW_LINE>Map<String, List<AppResult>> groupMap = new LinkedHashMap<String, List<AppResult>>();<NEW_LINE>Map<String, String> idUrlMap = new HashMap<String, String>();<NEW_LINE>for (AppResult result : results) {<NEW_LINE>String idField = null;<NEW_LINE>String urlField = null;<NEW_LINE>switch(groupBy) {<NEW_LINE>case JOB_EXECUTION_ID:<NEW_LINE>idField = result.jobExecId;<NEW_LINE>urlField = result.jobExecUrl;<NEW_LINE>break;<NEW_LINE>case JOB_DEFINITION_ID:<NEW_LINE>idField = result.jobDefId;<NEW_LINE>urlField = result.jobDefUrl;<NEW_LINE>break;<NEW_LINE>case FLOW_EXECUTION_ID:<NEW_LINE>idField = result.flowExecId;<NEW_LINE>urlField = result.flowExecUrl;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (!idUrlMap.containsKey(idField)) {<NEW_LINE>idUrlMap.put(idField, urlField);<NEW_LINE>}<NEW_LINE>if (groupMap.containsKey(idField)) {<NEW_LINE>groupMap.get(idField).add(result);<NEW_LINE>} else {<NEW_LINE>List<AppResult> list = new ArrayList<AppResult>();<NEW_LINE>list.add(result);<NEW_LINE>groupMap.put(idField, list);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Construct the final result map with the key as a (id, url) pair.<NEW_LINE>Map<IdUrlPair, List<AppResult>> resultMap = new LinkedHashMap<IdUrlPair, List<AppResult>>();<NEW_LINE>for (Map.Entry<String, List<AppResult>> entry : groupMap.entrySet()) {<NEW_LINE><MASK><NEW_LINE>List<AppResult> value = entry.getValue();<NEW_LINE>resultMap.put(new IdUrlPair(key, idUrlMap.get(key)), value);<NEW_LINE>}<NEW_LINE>return resultMap;<NEW_LINE>}
String key = entry.getKey();
1,178,130
public OutputEncryptor build() throws CMSException {<NEW_LINE>if (algorithmParameters != null) {<NEW_LINE>if (helper.isAuthEnveloped(encryptionOID)) {<NEW_LINE>return new CMSAuthOutputEncryptor(encryptionOID, keySize, algorithmParameters, random);<NEW_LINE>}<NEW_LINE>return new CMSOutputEncryptor(encryptionOID, keySize, algorithmParameters, random);<NEW_LINE>}<NEW_LINE>if (algorithmIdentifier != null) {<NEW_LINE>ASN1Encodable params = algorithmIdentifier.getParameters();<NEW_LINE>if (params != null && !params.equals(DERNull.INSTANCE)) {<NEW_LINE>try {<NEW_LINE>algorithmParameters = helper.createAlgorithmParameters(algorithmIdentifier.getAlgorithm());<NEW_LINE>algorithmParameters.init(params.toASN1Primitive().getEncoded());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new CMSException("unable to process provided algorithmIdentifier: " + e.toString(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (helper.isAuthEnveloped(encryptionOID)) {<NEW_LINE>return new CMSAuthOutputEncryptor(encryptionOID, keySize, algorithmParameters, random);<NEW_LINE>}<NEW_LINE>return new CMSOutputEncryptor(<MASK><NEW_LINE>}
encryptionOID, keySize, algorithmParameters, random);
541,957
final GetSigningProfileResult executeGetSigningProfile(GetSigningProfileRequest getSigningProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSigningProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetSigningProfileRequest> request = null;<NEW_LINE>Response<GetSigningProfileResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetSigningProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getSigningProfileRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "signer");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetSigningProfile");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetSigningProfileResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetSigningProfileResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,144,921
private Mono<Response<PolicyAssignmentInner>> updateWithResponseAsync(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (scope == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (policyAssignmentName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (parameters == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>parameters.validate();<NEW_LINE>}<NEW_LINE>final String apiVersion = "2021-06-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.update(this.client.getEndpoint(), scope, policyAssignmentName, apiVersion, parameters, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
1,436,712
public void run() {<NEW_LINE>try {<NEW_LINE>if (replies.size() > 0) {<NEW_LINE>ArrayList<twitter4j.Status> reversed = new ArrayList<twitter4j.Status>();<NEW_LINE>for (int i = replies.size() - 1; i >= 0; i--) {<NEW_LINE>reversed.add(replies.get(i));<NEW_LINE>}<NEW_LINE>replies = reversed;<NEW_LINE>adapter = new TimelineArrayAdapter(context, replies);<NEW_LINE>listView.setAdapter(adapter);<NEW_LINE><MASK><NEW_LINE>progressSpinner.setVisibility(View.GONE);<NEW_LINE>} else {<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>// none and it got the null object<NEW_LINE>}<NEW_LINE>if (status != null) {<NEW_LINE>// everything here worked, so get the discussion on the tweet<NEW_LINE>getDiscussion(listView, tweetId, progressSpinner, none, status);<NEW_LINE>}<NEW_LINE>}
listView.setVisibility(View.VISIBLE);
666,957
public List<StockKnowledgesEntity> doAddPointByKnowledgeStock(int offset) {<NEW_LINE>List<StockKnowledgesEntity> list;<NEW_LINE>list = StockKnowledgesDao.get().selectAllWidthPager(<MASK><NEW_LINE>for (StockKnowledgesEntity item : list) {<NEW_LINE>KnowledgesEntity knowledge = KnowledgesDao.get().selectOnKey(item.getKnowledgeId());<NEW_LINE>if (knowledge == null) {<NEW_LINE>LOG.debug(" knowledge [" + item.getKnowledgeId() + "] is not found. so skip add point by knowledge stock.");<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>LoginedUser user = new LoginedUser();<NEW_LINE>UsersEntity account = UsersDao.get().selectOnKey(item.getInsertUser());<NEW_LINE>if (account == null) {<NEW_LINE>LOG.debug(" event user [" + item.getInsertUser() + "] is not found. so skip add point by knowledge stock.");<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>user.setLoginUser(account);<NEW_LINE>LOG.debug(" knowledge [" + knowledge.getKnowledgeId() + "] ");<NEW_LINE>ActivityLogic.get().processActivity(Activity.KNOWLEDGE_STOCK, user, item.getInsertDatetime(), knowledge);<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>}
limit, offset, Order.ASC);
38,364
synchronized public void writeMetadata(@NonNull BackupFiles.BackupFile backupFile) throws IOException {<NEW_LINE>if (metadata == null) {<NEW_LINE>throw new RuntimeException(<MASK><NEW_LINE>}<NEW_LINE>Path metadataFile = backupFile.getMetadataFile();<NEW_LINE>try (OutputStream outputStream = metadataFile.openOutputStream()) {<NEW_LINE>JSONObject rootObject = new JSONObject();<NEW_LINE>rootObject.put("label", metadata.label);<NEW_LINE>rootObject.put("package_name", metadata.packageName);<NEW_LINE>rootObject.put("version_name", metadata.versionName);<NEW_LINE>rootObject.put("version_code", metadata.versionCode);<NEW_LINE>rootObject.put("data_dirs", JSONUtils.getJSONArray(metadata.dataDirs));<NEW_LINE>rootObject.put("is_system", metadata.isSystem);<NEW_LINE>rootObject.put("is_split_apk", metadata.isSplitApk);<NEW_LINE>rootObject.put("split_configs", JSONUtils.getJSONArray(metadata.splitConfigs));<NEW_LINE>rootObject.put("has_rules", metadata.hasRules);<NEW_LINE>rootObject.put("backup_time", metadata.backupTime);<NEW_LINE>rootObject.put("checksum_algo", metadata.checksumAlgo);<NEW_LINE>rootObject.put("crypto", metadata.crypto);<NEW_LINE>rootObject.put("key_ids", metadata.keyIds);<NEW_LINE>rootObject.put("iv", metadata.iv == null ? null : HexEncoding.encodeToString(metadata.iv));<NEW_LINE>rootObject.put("aes", metadata.aes == null ? null : HexEncoding.encodeToString(metadata.aes));<NEW_LINE>rootObject.put("version", metadata.version);<NEW_LINE>rootObject.put("apk_name", metadata.apkName);<NEW_LINE>rootObject.put("instruction_set", metadata.instructionSet);<NEW_LINE>rootObject.put("flags", metadata.flags.getFlags());<NEW_LINE>rootObject.put("user_handle", metadata.userHandle);<NEW_LINE>rootObject.put("tar_type", metadata.tarType);<NEW_LINE>rootObject.put("key_store", metadata.keyStore);<NEW_LINE>rootObject.put("installer", metadata.installer);<NEW_LINE>outputStream.write(rootObject.toString(4).getBytes());<NEW_LINE>} catch (JSONException e) {<NEW_LINE>throw new IOException(e.getMessage() + " for path " + backupFile.getBackupPath());<NEW_LINE>}<NEW_LINE>}
"Metadata not set for path " + backupFile.getBackupPath());
1,567,122
protected DepositResult doAddMetadata(SwordContext swordContext, Item item, Deposit deposit, AuthCredentials authCredentials, SwordConfigurationDSpace swordConfig, DepositResult result) throws DSpaceSwordException, SwordError, SwordAuthException, SwordServerException {<NEW_LINE>if (result == null) {<NEW_LINE>result = new DepositResult();<NEW_LINE>}<NEW_LINE>// get the things out of the service that we need<NEW_LINE>Context context = swordContext.getContext();<NEW_LINE>// Obtain the relevant ingester from the factory<NEW_LINE>SwordEntryIngester si = SwordIngesterFactory.getEntryInstance(context, deposit, null);<NEW_LINE>this.verboseDescription.append("Loaded ingester: " + si.getClass().getName());<NEW_LINE>// do the deposit<NEW_LINE>result = si.ingest(context, deposit, item, <MASK><NEW_LINE>this.verboseDescription.append("Replace completed successfully");<NEW_LINE>// store the originals (this code deals with the possibility that that's not required)<NEW_LINE>this.storeOriginals(swordConfig, context, this.verboseDescription, deposit, result);<NEW_LINE>return result;<NEW_LINE>}
this.verboseDescription, result, false);
1,420,850
private void drawLayout(Graphics2D g, Color color, int x, int y, boolean fill, JSONObject layout) {<NEW_LINE>JSONObject <MASK><NEW_LINE>int l = bounds.getInt("left");<NEW_LINE>int t = bounds.getInt("top");<NEW_LINE>int r = bounds.getInt("right");<NEW_LINE>int b = bounds.getInt("bottom");<NEW_LINE>boolean isSelected = layout == mSelectedView;<NEW_LINE>if (isSelected) {<NEW_LINE>color = Color.BLUE;<NEW_LINE>}<NEW_LINE>if (layout.getString("class").equals("Guideline")) {<NEW_LINE>drawGuideline(g, x, y, bounds, color);<NEW_LINE>}<NEW_LINE>drawRect(g, x, y, bounds, fill, color);<NEW_LINE>int lx = l + x;<NEW_LINE>int ly = t + y;<NEW_LINE>if (layout.has("children")) {<NEW_LINE>JSONArray children = layout.getJSONArray("children");<NEW_LINE>for (int i = 0; i < children.length(); i++) {<NEW_LINE>JSONObject child = children.getJSONObject(i);<NEW_LINE>drawLayout(g, color, lx, ly, false, child);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
bounds = layout.getJSONObject("bounds");
1,764,608
public void addControllers(List<HippyAPIProvider> hippyPackages) {<NEW_LINE>if (hippyPackages == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (HippyAPIProvider hippyPackage : hippyPackages) {<NEW_LINE>List<Class<? extends HippyViewController>> components = hippyPackage.getControllers();<NEW_LINE>if (components != null) {<NEW_LINE>for (Class hippyComponent : components) {<NEW_LINE>HippyController hippyNativeModule = (HippyController) hippyComponent.getAnnotation(HippyController.class);<NEW_LINE>assert hippyNativeModule != null;<NEW_LINE>String name = hippyNativeModule.name();<NEW_LINE>String[] names = hippyNativeModule.names();<NEW_LINE>boolean lazy = hippyNativeModule.isLazyLoad();<NEW_LINE>try {<NEW_LINE>ControllerHolder holder = new ControllerHolder((HippyViewController) <MASK><NEW_LINE>mControllerRegistry.addControllerHolder(name, holder);<NEW_LINE>if (names.length > 0) {<NEW_LINE>for (String s : names) {<NEW_LINE>mControllerRegistry.addControllerHolder(s, holder);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
hippyComponent.newInstance(), lazy);
1,240,696
public void applyShipmentScheduleChanges(@NonNull final ApplyShipmentScheduleChangesRequest request) {<NEW_LINE>if (request.isEmptyRequest()) {<NEW_LINE>// nothing to do<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final I_M_ShipmentSchedule shipmentSchedule = getById(request.getShipmentScheduleId());<NEW_LINE>if (request.getBPartnerLocationIdOverride() != null) {<NEW_LINE>ShipmentScheduleDocumentLocationAdapterFactory.overrideLocationAdapter(shipmentSchedule).setFrom(DocumentLocation.ofBPartnerLocationId(request.getBPartnerLocationIdOverride()));<NEW_LINE>}<NEW_LINE>if (request.getQtyToDeliverStockingUOM() != null) {<NEW_LINE>shipmentSchedule.<MASK><NEW_LINE>}<NEW_LINE>if (request.getDeliveryDate() != null) {<NEW_LINE>shipmentSchedule.setDeliveryDate_Override(TimeUtil.asTimestamp(request.getDeliveryDate()));<NEW_LINE>}<NEW_LINE>if (request.getDeliveryRule() != null) {<NEW_LINE>shipmentSchedule.setDeliveryRule_Override(request.getDeliveryRule().getCode());<NEW_LINE>}<NEW_LINE>if (!Check.isEmpty(request.getAttributes())) {<NEW_LINE>addAttributes(shipmentSchedule, request.getAttributes());<NEW_LINE>}<NEW_LINE>if (request.getShipperId() != null) {<NEW_LINE>shipmentSchedule.setM_Shipper_ID(request.getShipperId().getRepoId());<NEW_LINE>}<NEW_LINE>if (request.isDoNotInvalidateOnChange()) {<NEW_LINE>try (final IAutoCloseable ignored = doNotInvalidateOnChange(shipmentSchedule)) {<NEW_LINE>saveRecord(shipmentSchedule);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>saveRecord(shipmentSchedule);<NEW_LINE>}<NEW_LINE>}
setQtyToDeliver_Override(request.getQtyToDeliverStockingUOM());
1,465,326
protected void process(final FessConfig fessConfig, final ThumbnailQueue entity) {<NEW_LINE>ComponentUtil.getSystemHelper().calibrateCpuLoad();<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Processing thumbnail: {}", entity);<NEW_LINE>}<NEW_LINE>final String generatorName = entity.getGenerator();<NEW_LINE>try {<NEW_LINE>final File outputFile = new File(baseDir, entity.getPath());<NEW_LINE>final File noImageFile = new File(outputFile.getAbsolutePath() + NOIMAGE_FILE_SUFFIX);<NEW_LINE>if (!noImageFile.isFile() || System.currentTimeMillis() - noImageFile.lastModified() > noImageExpired) {<NEW_LINE>if (noImageFile.isFile() && !noImageFile.delete()) {<NEW_LINE>logger.warn("Failed to delete {}", noImageFile.getAbsolutePath());<NEW_LINE>}<NEW_LINE>final ThumbnailGenerator generator = ComponentUtil.getComponent(generatorName);<NEW_LINE>if (generator.isAvailable()) {<NEW_LINE>if (!generator.generate(entity.getThumbnailId(), outputFile)) {<NEW_LINE>new File(outputFile.getAbsolutePath() + NOIMAGE_FILE_SUFFIX).<MASK><NEW_LINE>} else {<NEW_LINE>final long interval = fessConfig.getThumbnailGeneratorIntervalAsInteger().longValue();<NEW_LINE>if (interval > 0) {<NEW_LINE>ThreadUtil.sleep(interval);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.warn("{} is not available.", generatorName);<NEW_LINE>}<NEW_LINE>} else if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("No image file exists: {}", noImageFile.getAbsolutePath());<NEW_LINE>}<NEW_LINE>} catch (final Exception e) {<NEW_LINE>logger.warn("Failed to create thumbnail for {}", entity, e);<NEW_LINE>}<NEW_LINE>}
setLastModified(System.currentTimeMillis());
1,023,967
protected void grantPermission(AuthorizationProvider authorizationProvider, Set<Permission> permissions, ResourcePermission permission, Collection<Scope> grantedScopes, ResourceServer resourceServer, AuthorizationRequest request, Result result) {<NEW_LINE>Set<String> scopeNames = grantedScopes.stream().map(Scope::getName).collect(Collectors.toSet());<NEW_LINE>Resource resource = permission.getResource();<NEW_LINE>if (resource != null) {<NEW_LINE>permissions.add(createPermission(resource, scopeNames, permission.getClaims(), request));<NEW_LINE>} else if (!grantedScopes.isEmpty()) {<NEW_LINE>ResourceStore resourceStore = authorizationProvider.getStoreFactory().getResourceStore();<NEW_LINE>resourceStore.findByScopes(resourceServer, new HashSet<>(grantedScopes), resource1 -> permissions.add(createPermission(resource, scopeNames, permission.<MASK><NEW_LINE>permissions.add(createPermission(null, scopeNames, permission.getClaims(), request));<NEW_LINE>}<NEW_LINE>}
getClaims(), request)));
1,067,267
public boolean visit(SQLAlterTableConvertCharSet x) {<NEW_LINE>final SQLExpr charset = x.getCharset();<NEW_LINE>final SQLExpr collate = x.getCollate();<NEW_LINE>final String charsetName;<NEW_LINE>final String collateName;<NEW_LINE>if (charset != null) {<NEW_LINE>if (charset instanceof SQLIdentifierExpr) {<NEW_LINE>charsetName = ((SQLIdentifierExpr) charset).getName();<NEW_LINE>} else {<NEW_LINE>throw new FastSqlParserException(FastSqlParserException.ExceptionType.NOT_SUPPORT, "Unknown character set name.");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new FastSqlParserException(FastSqlParserException.ExceptionType.NOT_SUPPORT, "Unknown character set name.");<NEW_LINE>}<NEW_LINE>if (collate != null) {<NEW_LINE>if (collate instanceof SQLIdentifierExpr) {<NEW_LINE>collateName = ((SQLIdentifierExpr) collate).getName();<NEW_LINE>} else {<NEW_LINE>throw new FastSqlParserException(<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>collateName = null;<NEW_LINE>}<NEW_LINE>this.sqlNode = new SqlConvertToCharacterSet(charsetName, collateName, SqlParserPos.ZERO);<NEW_LINE>return false;<NEW_LINE>}
FastSqlParserException.ExceptionType.NOT_SUPPORT, "Unknown collate name.");
249,929
private ObservableTransformer<RxBleInternalScanResult, RxBleInternalScanResult> repeatedWindowTransformer(@IntRange(from = 0, to = 4999) final int windowInMillis) {<NEW_LINE>final long repeatCycleTimeInMillis = TimeUnit.SECONDS.toMillis(5);<NEW_LINE>// to be sure that it won't be negative<NEW_LINE>final long delayToNextWindow = Math.max(repeatCycleTimeInMillis - windowInMillis, 0);<NEW_LINE>return new ObservableTransformer<RxBleInternalScanResult, RxBleInternalScanResult>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Observable<RxBleInternalScanResult> apply(final Observable<RxBleInternalScanResult> rxBleInternalScanResultObservable) {<NEW_LINE>return rxBleInternalScanResultObservable.take(windowInMillis, TimeUnit.MILLISECONDS, scheduler).repeatWhen(new Function<Observable<Object>, ObservableSource<?>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ObservableSource<?> apply(Observable<Object> observable) {<NEW_LINE>return observable.delay(<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
delayToNextWindow, TimeUnit.MILLISECONDS, scheduler);
221,528
public Void visit(SqlCall call) {<NEW_LINE>// ignore window aggregates and ranking functions (associated with OVER<NEW_LINE>// operator)<NEW_LINE>if (call.getOperator().getKind() == SqlKind.OVER) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (call.getOperator().getKind() == SqlKind.FILTER) {<NEW_LINE>// the WHERE in a FILTER must be tracked too so we can call replaceSubQueries on<NEW_LINE>// it.<NEW_LINE>// see https://issues.apache.org/jira/browse/CALCITE-1910<NEW_LINE>final SqlNode aggCall = call.getOperandList().get(0);<NEW_LINE>final SqlNode whereCall = call.<MASK><NEW_LINE>list.add(aggCall);<NEW_LINE>filterList.add(whereCall);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (call.getOperator().getKind() == SqlKind.WITHIN_GROUP) {<NEW_LINE>// the WHERE in a WITHIN_GROUP must be tracked too so we can call<NEW_LINE>// replaceSubQueries on it.<NEW_LINE>// see https://issues.apache.org/jira/browse/CALCITE-1910<NEW_LINE>final SqlNode aggCall = call.getOperandList().get(0);<NEW_LINE>final SqlNodeList orderList = (SqlNodeList) call.getOperandList().get(1);<NEW_LINE>list.add(aggCall);<NEW_LINE>orderList.getList().forEach(this.orderList::add);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (call.getOperator().isAggregator()) {<NEW_LINE>list.add(call);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Don't traverse into sub-queries, even if they contain aggregate<NEW_LINE>// functions.<NEW_LINE>if (call instanceof SqlSelect) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return call.getOperator().acceptCall(this, call);<NEW_LINE>}
getOperandList().get(1);
695,498
private void beforeReactivate(@NonNull final I_C_Flatrate_DataEntry dataEntry) {<NEW_LINE>final String trxName = InterfaceWrapperHelper.getTrxName(dataEntry);<NEW_LINE>// We need this assumption, because we are going to delete a C_Invoice_Candidate and that needs to happen in the<NEW_LINE>// same trx in which we set dataEntry's C_Invoice_Candidate_ID to 0<NEW_LINE>// (otherwise the DB's FK constraints wouldn't allow it).<NEW_LINE>Check.assume(trxName != null, dataEntry + " has a trxName!=null");<NEW_LINE>checkInvoiceCandidate(dataEntry);<NEW_LINE>final I_C_Flatrate_Term flatrateTerm = dataEntry.getC_Flatrate_Term();<NEW_LINE>if (X_C_Flatrate_DataEntry.TYPE_Invoicing_PeriodBased.equals(dataEntry.getType()) && flatrateTerm.isClosingWithCorrectionSum()) {<NEW_LINE>final Timestamp dataEntryStartDate = dataEntry.getC_Period().getStartDate();<NEW_LINE>final IFlatrateDAO flatrateDB = Services.get(IFlatrateDAO.class);<NEW_LINE>final List<I_C_Flatrate_DataEntry> existingCorrectionEntries = flatrateDB.retrieveDataEntries(flatrateTerm, X_C_Flatrate_DataEntry.TYPE_Correction_PeriodBased, UomId.ofRepoIdOrNull<MASK><NEW_LINE>for (final I_C_Flatrate_DataEntry corrEntry : existingCorrectionEntries) {<NEW_LINE>final Timestamp corrEntryStartDate = corrEntry.getC_Period().getStartDate();<NEW_LINE>if (corrEntryStartDate.equals(dataEntryStartDate) || corrEntryStartDate.after(dataEntryStartDate)) {<NEW_LINE>throw new AdempiereException("@" + MSG_DATA_ENTRY_EXISTING_CORRECTION_ENTRY_0P + "@");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>deleteInvoiceCandidate(dataEntry);<NEW_LINE>deleteInvoiceCandidateCorr(dataEntry);<NEW_LINE>}
(dataEntry.getC_UOM_ID()));
35,193
public EvaluationResult evaluate(Security security, CalculationFunctions functions, String firstToken, List<String> remainingTokens) {<NEW_LINE>MetaBean metaBean = MetaBean.of(security.getClass());<NEW_LINE>// security<NEW_LINE>Optional<String> securityPropertyName = metaBean.metaPropertyMap().keySet().stream().filter(p -> p.equalsIgnoreCase(firstToken)).findFirst();<NEW_LINE>if (securityPropertyName.isPresent()) {<NEW_LINE>Object propertyValue = metaBean.metaProperty(securityPropertyName.get()).get((Bean) security);<NEW_LINE>return propertyValue != null ? EvaluationResult.success(propertyValue, remainingTokens) : <MASK><NEW_LINE>}<NEW_LINE>// security info<NEW_LINE>Optional<String> securityInfoPropertyName = security.getInfo().propertyNames().stream().filter(p -> p.equalsIgnoreCase(firstToken)).findFirst();<NEW_LINE>if (securityInfoPropertyName.isPresent()) {<NEW_LINE>Object propertyValue = security.getInfo().property(securityInfoPropertyName.get()).get();<NEW_LINE>return propertyValue != null ? EvaluationResult.success(propertyValue, remainingTokens) : EvaluationResult.failure("Property '{}' not set", firstToken);<NEW_LINE>}<NEW_LINE>// security price info<NEW_LINE>Optional<String> securityPriceInfoPropertyName = security.getInfo().getPriceInfo().propertyNames().stream().filter(p -> p.equalsIgnoreCase(firstToken)).findFirst();<NEW_LINE>if (securityPriceInfoPropertyName.isPresent()) {<NEW_LINE>Object propertyValue = security.getInfo().getPriceInfo().property(securityPriceInfoPropertyName.get()).get();<NEW_LINE>return propertyValue != null ? EvaluationResult.success(propertyValue, remainingTokens) : EvaluationResult.failure("Property '{}' not set", firstToken);<NEW_LINE>}<NEW_LINE>// not found<NEW_LINE>return invalidTokenFailure(security, firstToken);<NEW_LINE>}
EvaluationResult.failure("Property '{}' not set", firstToken);
1,677,850
public void write(FieldBase field, Document doc) {<NEW_LINE><MASK><NEW_LINE>// save the position of the length in the buffer<NEW_LINE>int lenPos = buf.position();<NEW_LINE>// Temporary length, fill in after serialization is done.<NEW_LINE>buf.putInt(0);<NEW_LINE>doc.getId().serialize(this);<NEW_LINE>boolean hasHead = (doc.getFieldCount() != 0);<NEW_LINE>// Indicating we have document type which we always have<NEW_LINE>byte contents = 0x01;<NEW_LINE>if (hasHead) {<NEW_LINE>// Indicate we have header<NEW_LINE>contents |= 0x2;<NEW_LINE>}<NEW_LINE>buf.put(contents);<NEW_LINE>doc.getDataType().serialize(this);<NEW_LINE>if (hasHead) {<NEW_LINE>StructuredFieldValue asStructured = doc;<NEW_LINE>write(null, asStructured);<NEW_LINE>}<NEW_LINE>int finalPos = buf.position();<NEW_LINE>buf.position(lenPos);<NEW_LINE>// Don't include the length itself or the version<NEW_LINE>buf.putInt(finalPos - lenPos - 4);<NEW_LINE>buf.position(finalPos);<NEW_LINE>}
buf.putShort(Document.SERIALIZED_VERSION);
751,859
public boolean notInCache(URL url, File file) {<NEW_LINE>try {<NEW_LINE>// valid for up to four hours.<NEW_LINE>final long validEpoch = Instant.now().toEpochMilli() - 14400000;<NEW_LINE>final File tmp = new File(url.getPath());<NEW_LINE>final String filename = tmp.getName();<NEW_LINE>final File cache = new File(settings.getDataDirectory(), "nvdcache");<NEW_LINE>if (!cache.isDirectory()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>final File nvdFile <MASK><NEW_LINE>if (nvdFile.isFile() && nvdFile.lastModified() > validEpoch) {<NEW_LINE>LOGGER.debug("Copying {} from cache", url.toString());<NEW_LINE>FileUtils.copyFile(nvdFile, file);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} catch (IOException ex) {<NEW_LINE>LOGGER.debug("Error checking for nvd file in cache", ex);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}
= new File(cache, filename);
1,076,944
private static Color parseARGBColorComponents(String[] maybeNumbers) {<NEW_LINE>if (maybeNumbers.length < 4) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final int[] argb = new int[4];<NEW_LINE>for (int i = 0; i < 4; ++i) {<NEW_LINE>final String maybeNumber = maybeNumbers[i].trim();<NEW_LINE>try {<NEW_LINE>if (maybeNumber.startsWith("0x")) {<NEW_LINE>argb[i] = Integer.parseUnsignedInt(maybeNumber<MASK><NEW_LINE>} else {<NEW_LINE>argb[i] = Integer.parseUnsignedInt(maybeNumber);<NEW_LINE>}<NEW_LINE>} catch (NumberFormatException ignored) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// noinspection UseJBColor<NEW_LINE>return new Color(argb[1], argb[2], argb[3], argb[0]);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
.substring(2), 16);
740,071
private void tryDescribePreparedStatementByJDBC(final PostgreSQLPreparedStatement preparedStatement) throws SQLException {<NEW_LINE>if (!(connectionSession.getBackendConnection() instanceof JDBCBackendConnection)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MetaDataContexts metaDataContexts = ProxyContext.getInstance().getContextManager().getMetaDataContexts();<NEW_LINE>String schemaName = connectionSession.getSchemaName();<NEW_LINE>SQLStatementContext<?> sqlStatementContext = SQLStatementContextFactory.newInstance(metaDataContexts.getMetaDataMap(), preparedStatement.getSqlStatement(), schemaName);<NEW_LINE>LogicSQL logicSQL = new LogicSQL(sqlStatementContext, preparedStatement.getSql(<MASK><NEW_LINE>ShardingSphereMetaData metaData = ProxyContext.getInstance().getMetaData(schemaName);<NEW_LINE>ExecutionContext executionContext = new KernelProcessor().generateExecutionContext(logicSQL, metaData, metaDataContexts.getProps());<NEW_LINE>ExecutionUnit executionUnitSample = executionContext.getExecutionUnits().iterator().next();<NEW_LINE>JDBCBackendConnection backendConnection = (JDBCBackendConnection) connectionSession.getBackendConnection();<NEW_LINE>Connection connection = backendConnection.getConnections(executionUnitSample.getDataSourceName(), 1, ConnectionMode.CONNECTION_STRICTLY).iterator().next();<NEW_LINE>try (PreparedStatement ps = connection.prepareStatement(executionUnitSample.getSqlUnit().getSql())) {<NEW_LINE>populateParameterTypes(preparedStatement, ps);<NEW_LINE>populateColumnTypes(preparedStatement, ps);<NEW_LINE>}<NEW_LINE>}
), Collections.emptyList());
909,005
public RunState startTracking(IProgressMonitor monitor) throws Exception, OperationCanceledException {<NEW_LINE>// fetch an updated Cloud Application that reflects changes that<NEW_LINE>// were<NEW_LINE>// performed on it. Make sure the element element reference is updated<NEW_LINE>// as<NEW_LINE>// run state of the element depends on the element being up to date.<NEW_LINE>// Wait for application to be started<NEW_LINE>RunState runState = RunState.UNKNOWN;<NEW_LINE>long currentTime = System.currentTimeMillis();<NEW_LINE>long roughEstimateFetchStatsms = 5000;<NEW_LINE>long totalTime = currentTime + timeout;<NEW_LINE>String checkingMessage = "Checking if the application is running";<NEW_LINE>int estimatedAttempts = (int) (<MASK><NEW_LINE>monitor.beginTask(checkingMessage, estimatedAttempts);<NEW_LINE>model.getElementConsoleManager().writeToConsole(element, checkingMessage + ". Please wait...", LogType.STDOUT);<NEW_LINE>CFApplicationDetail app = requests.getApplication(appName);<NEW_LINE>if (app == null) {<NEW_LINE>throw new OperationCanceledException();<NEW_LINE>}<NEW_LINE>// Get the guid, as it is more efficient for lookup<NEW_LINE>// UUID appGuid = element.getGuid();<NEW_LINE>while (runState != RunState.RUNNING && runState != RunState.FLAPPING && runState != RunState.CRASHED && currentTime < totalTime) {<NEW_LINE>int timeLeft = (int) ((totalTime - currentTime) / 1000);<NEW_LINE>// Don't log this. Only update the monitor<NEW_LINE>monitor.setTaskName(checkingMessage + ". Time left before timeout: " + timeLeft + 's');<NEW_LINE>checkTerminate(monitor);<NEW_LINE>monitor.worked(1);<NEW_LINE>runState = getRunState(app.getInstanceDetails());<NEW_LINE>try {<NEW_LINE>Thread.sleep(WAIT_TIME);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>}<NEW_LINE>app = requests.getApplication(app.getName());<NEW_LINE>// App no longer exists<NEW_LINE>if (app == null) {<NEW_LINE>throw new OperationCanceledException();<NEW_LINE>}<NEW_LINE>currentTime = System.currentTimeMillis();<NEW_LINE>}<NEW_LINE>if (runState != RunState.RUNNING) {<NEW_LINE>String warning = "Timed out waiting for application - " + appName + " to start. Please wait and manually refresh the target, or check if the application logs show any errors.";<NEW_LINE>model.getElementConsoleManager().writeToConsole(this.element, warning, LogType.STDERROR);<NEW_LINE>throw ExceptionUtil.coreException(warning);<NEW_LINE>} else {<NEW_LINE>model.getElementConsoleManager().writeToConsole(this.element, "Application appears to have started - " + appName, LogType.STDOUT);<NEW_LINE>}<NEW_LINE>return runState;<NEW_LINE>}
timeout / (WAIT_TIME + roughEstimateFetchStatsms));
1,038,948
private void parseHeader(ByteBuf frame, Packet packet, PacketType innerType) {<NEW_LINE>int endIndex = frame.bytesBefore((byte) '[');<NEW_LINE>if (endIndex <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int attachmentsDividerIndex = frame.bytesBefore(endIndex, (byte) '-');<NEW_LINE>boolean hasAttachments = attachmentsDividerIndex != -1;<NEW_LINE>if (hasAttachments && (PacketType.BINARY_EVENT.equals(innerType) || PacketType.BINARY_ACK.equals(innerType))) {<NEW_LINE>int attachments = (int) readLong(frame, attachmentsDividerIndex);<NEW_LINE>packet.initAttachments(attachments);<NEW_LINE>frame.readerIndex(frame.readerIndex() + 1);<NEW_LINE>endIndex -= attachmentsDividerIndex + 1;<NEW_LINE>}<NEW_LINE>if (endIndex == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO optimize<NEW_LINE>boolean hasNsp = frame.bytesBefore(endIndex, (byte) ',') != -1;<NEW_LINE>if (hasNsp) {<NEW_LINE>String <MASK><NEW_LINE>String[] parts = nspAckId.split(",");<NEW_LINE>String nsp = parts[0];<NEW_LINE>packet.setNsp(nsp);<NEW_LINE>if (parts.length > 1) {<NEW_LINE>String ackId = parts[1];<NEW_LINE>packet.setAckId(Long.valueOf(ackId));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>long ackId = readLong(frame, endIndex);<NEW_LINE>packet.setAckId(ackId);<NEW_LINE>}<NEW_LINE>}
nspAckId = readString(frame, endIndex);
449,816
private Registry<ConnectionSocketFactory> createConnectionSocketFactoryRegistry(SSLConfig sslConfig, URI dockerHost) {<NEW_LINE>RegistryBuilder<ConnectionSocketFactory> socketFactoryRegistryBuilder = RegistryBuilder.create();<NEW_LINE>if (sslConfig != null) {<NEW_LINE>try {<NEW_LINE>SSLContext sslContext = sslConfig.getSSLContext();<NEW_LINE>if (sslContext != null) {<NEW_LINE>socketFactoryRegistryBuilder.register("https", new SSLConnectionSocketFactory(sslContext));<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return socketFactoryRegistryBuilder.register("tcp", PlainConnectionSocketFactory.INSTANCE).register("http", PlainConnectionSocketFactory.INSTANCE).register("unix", new PlainConnectionSocketFactory() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Socket createSocket(HttpContext context) throws IOException {<NEW_LINE>return UnixSocket.<MASK><NEW_LINE>}<NEW_LINE>}).register("npipe", new PlainConnectionSocketFactory() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Socket createSocket(HttpContext context) {<NEW_LINE>return new NamedPipeSocket(dockerHost.getPath());<NEW_LINE>}<NEW_LINE>}).build();<NEW_LINE>}
get(dockerHost.getPath());
1,743,204
private void manageToolbarSizes() {<NEW_LINE>// sometimes width is passed in as 0 (not sure why)<NEW_LINE>int width = getOffsetWidth();<NEW_LINE>if (width == 0)<NEW_LINE>return;<NEW_LINE>if (editor_.getFileType().isMarkdown()) {<NEW_LINE>toggleDocOutlineButton_.setText((!isVisualMode() || width >= 675) ? commands_.toggleDocumentOutline().getButtonLabel() : ToolbarButton.NoText);<NEW_LINE>toggleVisualModeOutlineButton_.setText(width > 675 ? commands_.toggleDocumentOutline().getButtonLabel() : ToolbarButton.NoText);<NEW_LINE>} else {<NEW_LINE>toggleDocOutlineButton_.setText(ToolbarButton.NoText);<NEW_LINE>toggleVisualModeOutlineButton_.setText(ToolbarButton.NoText);<NEW_LINE>}<NEW_LINE>texToolbarButton_.setText(width >= 520, constants_.format());<NEW_LINE>runButton_.setText(((width >= 480) && !isShinyFile()), constants_.run());<NEW_LINE>compilePdfButton_.setText(width >= 450, constants_.compilePdf());<NEW_LINE>previewHTMLButton_.setText(width >= 450, previewCommandText_);<NEW_LINE>knitDocumentButton_.<MASK><NEW_LINE>quartoRenderButton_.setText(width >= 450, quartoCommandText_);<NEW_LINE>String action = getSourceOnSaveAction();<NEW_LINE>srcOnSaveLabel_.setText(width < 450 ? action : constants_.actionOnSave(action));<NEW_LINE>sourceButton_.setText(width >= 400, sourceCommandText_);<NEW_LINE>goToNextButton_.setVisible(commands_.goToNextChunk().isVisible() && width >= 650);<NEW_LINE>goToPrevButton_.setVisible(commands_.goToPrevChunk().isVisible() && width >= 650);<NEW_LINE>toolbar_.invalidateSeparators();<NEW_LINE>}
setText(width >= 450, knitCommandText_);
1,804,233
public static int readColorInt(ConfigurationNode node) throws NumberFormatException {<NEW_LINE>Object value = node.raw();<NEW_LINE>if (value == null)<NEW_LINE>throw new NumberFormatException("No value!");<NEW_LINE>if (value instanceof Number) {<NEW_LINE>return ((Number) value).intValue();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (val.charAt(0) == '#') {<NEW_LINE>val = val.substring(1);<NEW_LINE>if (val.length() == 3)<NEW_LINE>val = "f" + val;<NEW_LINE>if (val.length() == 4)<NEW_LINE>val = "" + val.charAt(0) + val.charAt(0) + val.charAt(1) + val.charAt(1) + val.charAt(2) + val.charAt(2) + val.charAt(3) + val.charAt(3);<NEW_LINE>if (val.length() == 6)<NEW_LINE>val = "ff" + val;<NEW_LINE>return Integer.parseUnsignedInt(val, 16);<NEW_LINE>}<NEW_LINE>return Integer.parseInt(val);<NEW_LINE>}
String val = value.toString();
642,222
public void verifyNoTasksRunning(PrintWriter out) throws Exception {<NEW_LINE>List<TaskStatus<?>> results = new LinkedList<TaskStatus<?>>();<NEW_LINE>for (TaskStatus<?> status : scheduler.findTaskStatus("%", null, TaskState.SCHEDULED, true, null, null)) if (status.getNextExecutionTime().getTime() - System.currentTimeMillis() < 5 * 60 * 1000)<NEW_LINE>results.add(status);<NEW_LINE>if (!results.isEmpty()) {<NEW_LINE>// Allow some extra time and then validate each again<NEW_LINE>Thread.sleep(TimeUnit.NANOSECONDS.toMillis(TIMEOUT_NS));<NEW_LINE>StringBuilder runningTaskInfo = new StringBuilder();<NEW_LINE>for (TaskStatus<?> status : results) {<NEW_LINE>status = scheduler.getStatus(status.getTaskId());<NEW_LINE><MASK><NEW_LINE>if (nextExecTime != null && nextExecTime.getTime() - System.currentTimeMillis() < 5 * 60 * 1000)<NEW_LINE>runningTaskInfo.append("\r\n").append(status);<NEW_LINE>}<NEW_LINE>if (runningTaskInfo.length() > 0)<NEW_LINE>throw new Exception("Found tasks that are still running. Ignore this error if any other tests failed." + runningTaskInfo);<NEW_LINE>}<NEW_LINE>}
Date nextExecTime = status.getNextExecutionTime();
1,369,783
public boolean deleteChunks(Filter<?> filter, SelectionData selection) {<NEW_LINE>boolean deleted = false;<NEW_LINE>Point2i regionChunk = location.regionToChunk();<NEW_LINE>for (int i = 0; i < 1024; i++) {<NEW_LINE>RegionChunk region = this.region.getChunk(i);<NEW_LINE>EntitiesChunk entities = this.entities == null ? null : this.entities.getChunk(i);<NEW_LINE>PoiChunk poi = this.poi == null ? null : <MASK><NEW_LINE>if (region == null || region.isEmpty() || selection != null && !selection.isRegionSelected(region.getAbsoluteLocation())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>ChunkData filterData = new ChunkData(region, poi, entities);<NEW_LINE>Point2i chunk = new Point2i(i & 31, i >> 5).add(regionChunk);<NEW_LINE>if ((selection == null || selection.isChunkSelected(chunk)) && filter.matches(filterData)) {<NEW_LINE>deleteChunkIndex(i);<NEW_LINE>deleted = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return deleted;<NEW_LINE>}
this.poi.getChunk(i);
849,724
public static void main(String[] args) throws IOException, InterruptedException {<NEW_LINE>int port = 50051;<NEW_LINE>String hostname = null;<NEW_LINE>if (args.length >= 1) {<NEW_LINE>try {<NEW_LINE>port = Integer.parseInt(args[0]);<NEW_LINE>} catch (NumberFormatException ex) {<NEW_LINE>System.err.println("Usage: [port [hostname]]");<NEW_LINE>System.err.println("");<NEW_LINE>System.err.println(" port The listen port. Defaults to " + port);<NEW_LINE><MASK><NEW_LINE>System.err.println(" Defaults to the machine's hostname");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (args.length >= 2) {<NEW_LINE>hostname = args[1];<NEW_LINE>}<NEW_LINE>HealthStatusManager health = new HealthStatusManager();<NEW_LINE>final Server server = ServerBuilder.forPort(port).addService(new HostnameGreeter(hostname)).addService(ProtoReflectionService.newInstance()).addService(health.getHealthService()).build().start();<NEW_LINE>System.out.println("Listening on port " + port);<NEW_LINE>Runtime.getRuntime().addShutdownHook(new Thread() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>// Start graceful shutdown<NEW_LINE>server.shutdown();<NEW_LINE>try {<NEW_LINE>// Wait for RPCs to complete processing<NEW_LINE>if (!server.awaitTermination(30, TimeUnit.SECONDS)) {<NEW_LINE>// That was plenty of time. Let's cancel the remaining RPCs<NEW_LINE>server.shutdownNow();<NEW_LINE>// shutdownNow isn't instantaneous, so give a bit of time to clean resources up<NEW_LINE>// gracefully. Normally this will be well under a second.<NEW_LINE>server.awaitTermination(5, TimeUnit.SECONDS);<NEW_LINE>}<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>server.shutdownNow();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// This would normally be tied to the service's dependencies. For example, if HostnameGreeter<NEW_LINE>// used a Channel to contact a required service, then when 'channel.getState() ==<NEW_LINE>// TRANSIENT_FAILURE' we'd want to set NOT_SERVING. But HostnameGreeter has no dependencies, so<NEW_LINE>// hard-coding SERVING is appropriate.<NEW_LINE>health.setStatus("", ServingStatus.SERVING);<NEW_LINE>server.awaitTermination();<NEW_LINE>}
System.err.println(" hostname The name clients will see in greet responses. ");
291,182
public static DescribeDnsGtmInstancesResponse unmarshall(DescribeDnsGtmInstancesResponse describeDnsGtmInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDnsGtmInstancesResponse.setRequestId(_ctx.stringValue("DescribeDnsGtmInstancesResponse.RequestId"));<NEW_LINE>describeDnsGtmInstancesResponse.setPageSize(_ctx.integerValue("DescribeDnsGtmInstancesResponse.PageSize"));<NEW_LINE>describeDnsGtmInstancesResponse.setPageNumber(_ctx.integerValue("DescribeDnsGtmInstancesResponse.PageNumber"));<NEW_LINE>describeDnsGtmInstancesResponse.setTotalPages(_ctx.integerValue("DescribeDnsGtmInstancesResponse.TotalPages"));<NEW_LINE>describeDnsGtmInstancesResponse.setTotalItems(_ctx.integerValue("DescribeDnsGtmInstancesResponse.TotalItems"));<NEW_LINE>List<GtmInstance> gtmInstances = new ArrayList<GtmInstance>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDnsGtmInstancesResponse.GtmInstances.Length"); i++) {<NEW_LINE>GtmInstance gtmInstance = new GtmInstance();<NEW_LINE>gtmInstance.setPaymentType(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].PaymentType"));<NEW_LINE>gtmInstance.setExpireTime(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].ExpireTime"));<NEW_LINE>gtmInstance.setCreateTime(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].CreateTime"));<NEW_LINE>gtmInstance.setSmsQuota(_ctx.integerValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].SmsQuota"));<NEW_LINE>gtmInstance.setInstanceId(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].InstanceId"));<NEW_LINE>gtmInstance.setExpireTimestamp(_ctx.longValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].ExpireTimestamp"));<NEW_LINE>gtmInstance.setResourceGroupId(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].ResourceGroupId"));<NEW_LINE>gtmInstance.setVersionCode(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].VersionCode"));<NEW_LINE>gtmInstance.setTaskQuota(_ctx.integerValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].TaskQuota"));<NEW_LINE>gtmInstance.setCreateTimestamp(_ctx.longValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].CreateTimestamp"));<NEW_LINE>Config config = new Config();<NEW_LINE>config.setTtl(_ctx.integerValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.Ttl"));<NEW_LINE>config.setAlertGroup(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.AlertGroup"));<NEW_LINE>config.setPublicZoneName(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.PublicZoneName"));<NEW_LINE>config.setCnameType(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.CnameType"));<NEW_LINE>config.setStrategyMode(_ctx.stringValue<MASK><NEW_LINE>config.setInstanceName(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.InstanceName"));<NEW_LINE>config.setPublicCnameMode(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.PublicCnameMode"));<NEW_LINE>config.setPublicUserDomainName(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.PublicUserDomainName"));<NEW_LINE>config.setPublicRr(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.PublicRr"));<NEW_LINE>List<AlertConfigItem> alertConfig = new ArrayList<AlertConfigItem>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.AlertConfig.Length"); j++) {<NEW_LINE>AlertConfigItem alertConfigItem = new AlertConfigItem();<NEW_LINE>alertConfigItem.setSmsNotice(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.AlertConfig[" + j + "].SmsNotice"));<NEW_LINE>alertConfigItem.setNoticeType(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.AlertConfig[" + j + "].NoticeType"));<NEW_LINE>alertConfigItem.setEmailNotice(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.AlertConfig[" + j + "].EmailNotice"));<NEW_LINE>alertConfigItem.setDingtalkNotice(_ctx.stringValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.AlertConfig[" + j + "].DingtalkNotice"));<NEW_LINE>alertConfig.add(alertConfigItem);<NEW_LINE>}<NEW_LINE>config.setAlertConfig(alertConfig);<NEW_LINE>gtmInstance.setConfig(config);<NEW_LINE>UsedQuota usedQuota = new UsedQuota();<NEW_LINE>usedQuota.setEmailUsedCount(_ctx.integerValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].UsedQuota.EmailUsedCount"));<NEW_LINE>usedQuota.setTaskUsedCount(_ctx.integerValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].UsedQuota.TaskUsedCount"));<NEW_LINE>usedQuota.setSmsUsedCount(_ctx.integerValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].UsedQuota.SmsUsedCount"));<NEW_LINE>usedQuota.setDingtalkUsedCount(_ctx.integerValue("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].UsedQuota.DingtalkUsedCount"));<NEW_LINE>gtmInstance.setUsedQuota(usedQuota);<NEW_LINE>gtmInstances.add(gtmInstance);<NEW_LINE>}<NEW_LINE>describeDnsGtmInstancesResponse.setGtmInstances(gtmInstances);<NEW_LINE>return describeDnsGtmInstancesResponse;<NEW_LINE>}
("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.StrategyMode"));
870,884
private JSONObject findProperty(final JSONObject parent, final String name) {<NEW_LINE>JSONArray properties = getJSONArrayProperty(parent, PROPERTIES);<NEW_LINE>if (properties != null) {<NEW_LINE>for (Object propertyTmp : properties) {<NEW_LINE>JSONObject property = (JSONObject) propertyTmp;<NEW_LINE>String propertyName = getJSONStringProperty(property, NAME);<NEW_LINE>if (propertyName != null && propertyName.equals(name)) {<NEW_LINE>return property;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>properties = getJSONArrayProperty(parent, METHODS);<NEW_LINE>if (properties != null) {<NEW_LINE>for (Object propertyTmp : properties) {<NEW_LINE>JSONObject property = (JSONObject) propertyTmp;<NEW_LINE>String propertyName = getJSONStringProperty(property, NAME);<NEW_LINE>if (propertyName != null && propertyName.equals(name)) {<NEW_LINE>return property;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>properties = getJSONArrayProperty(parent, CLASSES);<NEW_LINE>if (properties != null) {<NEW_LINE>String className = getJSONStringProperty(parent, NAME) + '.' + name;<NEW_LINE>for (Object propertyTmp : properties) {<NEW_LINE>JSONObject property = (JSONObject) propertyTmp;<NEW_LINE>String <MASK><NEW_LINE>if (propertyName != null && (propertyName.equals(className) || propertyName.equals(name))) {<NEW_LINE>return property;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
propertyName = getJSONStringProperty(property, NAME);
389,437
private static void checkPrint(@NotNull ProblemsHolder holder, @NotNull GoCallExpr callExpr, @NotNull GoFunctionOrMethodDeclaration declaration) {<NEW_LINE>List<GoExpression> arguments = callExpr.getArgumentList().getExpressionList();<NEW_LINE>GoExpression <MASK><NEW_LINE>if (firstArg == null)<NEW_LINE>return;<NEW_LINE>if (GoTypeUtil.isString(firstArg.getGoType(null))) {<NEW_LINE>String firstArgText = resolve(firstArg);<NEW_LINE>if (GoPlaceholderChecker.hasPlaceholder(firstArgText)) {<NEW_LINE>String message = "Possible formatting directive in <code>#ref</code> #loc";<NEW_LINE>holder.registerProblem(firstArg, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// TODO florin: Check first argument for os.Std* output<NEW_LINE>// Ref code: https://github.com/golang/go/blob/79f7ccf2c3931745aeb97c5c985b6ac7b44befb4/src/cmd/vet/print.go#L617<NEW_LINE>String declarationName = declaration.getName();<NEW_LINE>boolean isLn = declarationName != null && declarationName.endsWith("ln");<NEW_LINE>for (GoExpression argument : arguments) {<NEW_LINE>GoType goType = argument.getGoType(null);<NEW_LINE>if (isLn && GoTypeUtil.isString(goType)) {<NEW_LINE>String argText = resolve(argument);<NEW_LINE>if (argText != null && argText.endsWith("\\n")) {<NEW_LINE>String message = "Function already ends with new line #loc";<NEW_LINE>TextRange range = TextRange.from(argText.length() - 1, 2);<NEW_LINE>// TODO florin: add quickfix to remove trailing \n<NEW_LINE>// TODO florin: add quickfix to convert \n to a separate argument<NEW_LINE>holder.registerProblem(argument, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, range);<NEW_LINE>}<NEW_LINE>} else if (GoTypeUtil.isFunction(goType)) {<NEW_LINE>String message = argument instanceof GoCallExpr ? "Final return type of <code>#ref</code> is a function not a function call #loc" : "Argument <code>#ref</code> is not a function call #loc";<NEW_LINE>// TODO florin: add quickfix to convert to function call if possible<NEW_LINE>holder.registerProblem(argument, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
firstArg = ContainerUtil.getFirstItem(arguments);
1,249,977
private void writeRun() throws IOException {<NEW_LINE>if (count > allowableBlockSize) {<NEW_LINE>endBlock();<NEW_LINE>initBlock();<NEW_LINE>}<NEW_LINE>inUse[currentByte] = true;<NEW_LINE>for (int i = 0; i < runLength; i++) {<NEW_LINE>mCrc.updateCRC(currentByte);<NEW_LINE>}<NEW_LINE>switch(runLength) {<NEW_LINE>case 1:<NEW_LINE>blockBytes[++count] = (byte) currentByte;<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>blockBytes[++count] = (byte) currentByte;<NEW_LINE>blockBytes[++count] = (byte) currentByte;<NEW_LINE>break;<NEW_LINE>case 3:<NEW_LINE>blockBytes[++count] = (byte) currentByte;<NEW_LINE>blockBytes[++count] = (byte) currentByte;<NEW_LINE>blockBytes[++count] = (byte) currentByte;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>inUse[runLength - 4] = true;<NEW_LINE>blockBytes[<MASK><NEW_LINE>blockBytes[++count] = (byte) currentByte;<NEW_LINE>blockBytes[++count] = (byte) currentByte;<NEW_LINE>blockBytes[++count] = (byte) currentByte;<NEW_LINE>blockBytes[++count] = (byte) (runLength - 4);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
++count] = (byte) currentByte;
925,796
public static GetMediaDNAResultResponse unmarshall(GetMediaDNAResultResponse getMediaDNAResultResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMediaDNAResultResponse.setRequestId(_ctx.stringValue("GetMediaDNAResultResponse.RequestId"));<NEW_LINE>DNAResult dNAResult = new DNAResult();<NEW_LINE>List<VideoDNAItem> videoDNA = new ArrayList<VideoDNAItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetMediaDNAResultResponse.DNAResult.VideoDNA.Length"); i++) {<NEW_LINE>VideoDNAItem videoDNAItem = new VideoDNAItem();<NEW_LINE>videoDNAItem.setPrimaryKey(_ctx.stringValue("GetMediaDNAResultResponse.DNAResult.VideoDNA[" + i + "].PrimaryKey"));<NEW_LINE>videoDNAItem.setSimilarity(_ctx.stringValue("GetMediaDNAResultResponse.DNAResult.VideoDNA[" + i + "].Similarity"));<NEW_LINE>List<DetailItem> detail = new ArrayList<DetailItem>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("GetMediaDNAResultResponse.DNAResult.VideoDNA[" + i + "].Detail.Length"); j++) {<NEW_LINE>DetailItem detailItem = new DetailItem();<NEW_LINE>Input input = new Input();<NEW_LINE>input.setStart(_ctx.stringValue("GetMediaDNAResultResponse.DNAResult.VideoDNA[" + i + "].Detail[" + j + "].Input.Start"));<NEW_LINE>input.setDuration(_ctx.stringValue("GetMediaDNAResultResponse.DNAResult.VideoDNA[" + i + "].Detail[" + j + "].Input.Duration"));<NEW_LINE>detailItem.setInput(input);<NEW_LINE>Duplication duplication = new Duplication();<NEW_LINE>duplication.setStart(_ctx.stringValue("GetMediaDNAResultResponse.DNAResult.VideoDNA[" + i + "].Detail[" + j + "].Duplication.Start"));<NEW_LINE>duplication.setDuration(_ctx.stringValue("GetMediaDNAResultResponse.DNAResult.VideoDNA[" + i <MASK><NEW_LINE>detailItem.setDuplication(duplication);<NEW_LINE>detail.add(detailItem);<NEW_LINE>}<NEW_LINE>videoDNAItem.setDetail(detail);<NEW_LINE>videoDNA.add(videoDNAItem);<NEW_LINE>}<NEW_LINE>dNAResult.setVideoDNA(videoDNA);<NEW_LINE>getMediaDNAResultResponse.setDNAResult(dNAResult);<NEW_LINE>return getMediaDNAResultResponse;<NEW_LINE>}
+ "].Detail[" + j + "].Duplication.Duration"));
898,633
public static DataSet<WeightedLeastSquaresModel> train(DataSet<Row> data, int numFeature, FamilyLink familyLink, double regParam, boolean fitIntercept, int numIter, double epsilon) {<NEW_LINE>FamilyFunction family = familyLink.getFamily();<NEW_LINE>LinkFunction link = familyLink.getLink();<NEW_LINE>DataSet<WeightedLeastSquaresModel> finalModel = null;<NEW_LINE>if (family.name().equals(new Gaussian().name()) && link.name().equals(new Identity().name())) {<NEW_LINE>finalModel = data.map(new GaussianDataProc(numFeature)).mapPartition(new LocalWeightStat(numFeature)).name("init LocalWeightStat").reduce(new GlobalWeightStat()).name("init GlobalWeightStat").mapPartition(new WeightedLeastSquares(fitIntercept, regParam, true, true)).setParallelism(1).name("init WeightedLeastSquares");<NEW_LINE>} else {<NEW_LINE>DataSet<WeightedLeastSquaresModel> initModel = data.map(new InitData(familyLink, numFeature)).mapPartition(new LocalWeightStat(numFeature)).name("init LocalWeightStat").reduce(new GlobalWeightStat()).name("init GlobalWeightStat").mapPartition(new WeightedLeastSquares(fitIntercept, regParam, true, true)).setParallelism(1).name("init WeightedLeastSquares");<NEW_LINE>IterativeDataSet<WeightedLeastSquaresModel> loop = initModel.iterate(numIter).name("loop");<NEW_LINE>DataSet<WeightedLeastSquaresModel> updateIrlsModel = data.map(new UpdateData(familyLink, numFeature + 3)).name("UpdateData").withBroadcastSet(loop, "model").mapPartition(new LocalWeightStat(numFeature)).name("localWeightStat").reduce(new GlobalWeightStat()).name("GlobalWeightStat").mapPartition(new WeightedLeastSquares(fitIntercept, regParam, false, false)).setParallelism<MASK><NEW_LINE>// converge<NEW_LINE>DataSet<Tuple2<WeightedLeastSquaresModel, WeightedLeastSquaresModel>> join = loop.map(new ModelAddId()).join(updateIrlsModel.map(new ModelAddId())).where(0).equalTo(0).projectFirst(1).projectSecond(1);<NEW_LINE>FilterFunction<Tuple2<WeightedLeastSquaresModel, WeightedLeastSquaresModel>> filterCriterion = new IterCriterion(epsilon);<NEW_LINE>DataSet<Tuple2<WeightedLeastSquaresModel, WeightedLeastSquaresModel>> criterion = join.filter(filterCriterion);<NEW_LINE>finalModel = loop.closeWith(updateIrlsModel, criterion);<NEW_LINE>}<NEW_LINE>return finalModel;<NEW_LINE>}
(1).name("WLS");
907,477
public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {<NEW_LINE>com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(this.getUnknownFields());<NEW_LINE>while (true) {<NEW_LINE>int tag = input.readTag();<NEW_LINE>switch(tag) {<NEW_LINE>case 0:<NEW_LINE>this.setUnknownFields(unknownFields.build());<NEW_LINE>return this;<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {<NEW_LINE>this.setUnknownFields(unknownFields.build());<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case 8:<NEW_LINE>{<NEW_LINE>addFailedNodes(input.readInt32());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case 10:<NEW_LINE>{<NEW_LINE><MASK><NEW_LINE>int limit = input.pushLimit(length);<NEW_LINE>while (input.getBytesUntilLimit() > 0) {<NEW_LINE>addFailedNodes(input.readInt32());<NEW_LINE>}<NEW_LINE>input.popLimit(limit);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case 18:<NEW_LINE>{<NEW_LINE>setStoreName(input.readString());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case 24:<NEW_LINE>{<NEW_LINE>setPushVersion(input.readInt64());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case 34:<NEW_LINE>{<NEW_LINE>setInfo(input.readString());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
int length = input.readRawVarint32();
51,243
public void run(RegressionEnvironment env) {<NEW_LINE>sendTimer(env, 0);<NEW_LINE>String selectStmt = "@name('s0') select symbol, min(price) as minprice from SupportMarketDataBean" + "#time(10 seconds) group by symbol output snapshot every 1 seconds order by symbol asc";<NEW_LINE>env.compileDeploy(selectStmt).addListener("s0");<NEW_LINE>sendMDEvent(env, "ABC", 20);<NEW_LINE>sendTimer(env, 500);<NEW_LINE>sendMDEvent(env, "IBM", 16);<NEW_LINE>sendMDEvent(env, "ABC", 14);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendTimer(env, 1000);<NEW_LINE>String[] fields = new <MASK><NEW_LINE>env.assertPropsPerRowLastNew("s0", fields, new Object[][] { { "ABC", 14d }, { "IBM", 16d } });<NEW_LINE>sendTimer(env, 1500);<NEW_LINE>sendMDEvent(env, "IBM", 18);<NEW_LINE>sendMDEvent(env, "MSFT", 30);<NEW_LINE>sendTimer(env, 10000);<NEW_LINE>env.assertPropsPerRowLastNew("s0", fields, new Object[][] { { "ABC", 14d }, { "IBM", 16d }, { "MSFT", 30d } });<NEW_LINE>sendTimer(env, 11000);<NEW_LINE>env.assertPropsPerRowLastNew("s0", fields, new Object[][] { { "IBM", 18d }, { "MSFT", 30d } });<NEW_LINE>sendTimer(env, 12000);<NEW_LINE>env.assertPropsPerRowLastNew("s0", fields, null);<NEW_LINE>env.undeployAll();<NEW_LINE>}
String[] { "symbol", "minprice" };
1,770,065
protected boolean handleProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) throws LayerGenerationException {<NEW_LINE>for (Element e : roundEnv.getElementsAnnotatedWith(ConstrainedBinaryIndexer.Registration.class)) {<NEW_LINE>assert e<MASK><NEW_LINE>final ConstrainedBinaryIndexer.Registration reg = e.getAnnotation(ConstrainedBinaryIndexer.Registration.class);<NEW_LINE>final Elements elements = processingEnv.getElementUtils();<NEW_LINE>final Types types = processingEnv.getTypeUtils();<NEW_LINE>final TypeElement binIndexerType = elements.getTypeElement(ConstrainedBinaryIndexer.class.getName());<NEW_LINE>if (types.isSubtype(((TypeElement) e).asType(), binIndexerType.asType())) {<NEW_LINE>final String indexerName = reg.indexerName();<NEW_LINE>if (indexerName == null) {<NEW_LINE>// NOI18N<NEW_LINE>throw new LayerGenerationException("Indexer name has to be given.", e);<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>final File f = layer(e).instanceFile("Editors", null, null);<NEW_LINE>// NOI18N<NEW_LINE>f.stringvalue("instanceClass", BinaryIndexerFactory.class.getName());<NEW_LINE>// NOI18N<NEW_LINE>f.methodvalue("instanceCreate", ConstrainedBinaryIndexer.class.getName(), "create");<NEW_LINE>f.instanceAttribute("delegate", ConstrainedBinaryIndexer.class);<NEW_LINE>if (reg.requiredResource().length > 0) {<NEW_LINE>// NOI18N<NEW_LINE>f.stringvalue("requiredResource", list(reg.requiredResource(), e));<NEW_LINE>}<NEW_LINE>if (reg.mimeType().length > 0) {<NEW_LINE>// NOI18N<NEW_LINE>f.stringvalue("mimeType", list(reg.mimeType(), e));<NEW_LINE>}<NEW_LINE>if (reg.namePattern().length() > 0) {<NEW_LINE>// NOI18N<NEW_LINE>f.stringvalue("namePattern", reg.namePattern());<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>f.stringvalue("name", indexerName);<NEW_LINE>// NOI18N<NEW_LINE>f.intvalue("version", reg.indexVersion());<NEW_LINE>f.write();<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>throw new LayerGenerationException("Annoated element is not a subclass of BinaryIndexer.", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
.getKind().isClass();
566,379
public void onBackupCollectFinished(boolean succeed, boolean empty, @NonNull List<SettingsItem> items, @NonNull List<RemoteFile> remoteFiles) {<NEW_LINE>FragmentActivity activity = getActivity();<NEW_LINE>if (AndroidUtils.isActivityNotDestroyed(activity)) {<NEW_LINE>toolbarLayout.setTitle(getString(R.string.restore_from_osmand_cloud));<NEW_LINE>description.setText(R.string.choose_what_to_restore);<NEW_LINE>buttonsContainer.setVisibility(View.VISIBLE);<NEW_LINE>progressBar.setVisibility(View.GONE);<NEW_LINE>if (succeed) {<NEW_LINE>PrepareBackupResult backup = app<MASK><NEW_LINE>BackupInfo info = backup.getBackupInfo();<NEW_LINE>Set<SettingsItem> itemsForRestore = new HashSet<>();<NEW_LINE>if (info != null) {<NEW_LINE>for (RemoteFile remoteFile : info.filesToDownload) {<NEW_LINE>SettingsItem restoreItem = getRestoreItem(items, remoteFile);<NEW_LINE>if (restoreItem != null) {<NEW_LINE>itemsForRestore.add(restoreItem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setSettingsItems(new ArrayList<>(itemsForRestore));<NEW_LINE>dataList = SettingsHelper.getSettingsToOperateByCategory(settingsItems, false, false);<NEW_LINE>adapter.updateSettingsItems(dataList, selectedItemsMap);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getBackupHelper().getBackup();
884,728
public void update() {<NEW_LINE>super.update();<NEW_LINE>laser.iterateTexture();<NEW_LINE>if (worldObj.isRemote) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// If a gate disabled us, remove laser and do nothing.<NEW_LINE>if (mode == IControllable.Mode.Off) {<NEW_LINE>removeLaser();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Check for any available tables at a regular basis<NEW_LINE>if (canFindTable()) {<NEW_LINE>findTable();<NEW_LINE>}<NEW_LINE>// If we still don't have a valid table or the existing has<NEW_LINE>// become invalid, we disable the laser and do nothing.<NEW_LINE>if (!isValidTable()) {<NEW_LINE>removeLaser();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Disable the laser and do nothing if no energy is available.<NEW_LINE>if (getBattery().getEnergyStored() == 0) {<NEW_LINE>removeLaser();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// We have a laser<NEW_LINE>if (laser != null) {<NEW_LINE>// We have a table and can work, so we create a laser if<NEW_LINE>// necessary.<NEW_LINE>laser.isVisible = true;<NEW_LINE>// We may update laser<NEW_LINE>if (canUpdateLaser()) {<NEW_LINE>updateLaser();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Consume power and transfer it to the table.<NEW_LINE>int localPower = getBattery().useEnergy(<MASK><NEW_LINE>laserTarget.receiveLaserPower(localPower);<NEW_LINE>if (laser != null) {<NEW_LINE>pushPower(localPower);<NEW_LINE>}<NEW_LINE>onPowerSent(localPower);<NEW_LINE>sendNetworkUpdate();<NEW_LINE>}
0, getMaxPowerSent(), false);
1,716,305
public void run() {<NEW_LINE>checkParams();<NEW_LINE>int numIters = 0;<NEW_LINE>int userWaitTimeMs = taskParams().waitTimeMs != 0 ? taskParams().waitTimeMs : UpgradeParams.DEFAULT_SLEEP_AFTER_RESTART_MS;<NEW_LINE>HostAndPort hp = getHostPort();<NEW_LINE>boolean isTserverTask = taskParams().serverType == ServerType.TSERVER;<NEW_LINE>IsServerReadyResponse response = null;<NEW_LINE>YBClient client = getClient();<NEW_LINE>try {<NEW_LINE>while (true) {<NEW_LINE>numIters++;<NEW_LINE>response = client.isServerReady(hp, isTserverTask);<NEW_LINE>if (response.hasError()) {<NEW_LINE>log.info("Response has error {} after iters={}.", response.errorMessage(), numIters);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (response.getNumNotRunningTablets() == 0) {<NEW_LINE>log.info("{} on node {} ready after iters={}.", taskParams().serverType, taskParams().nodeName, numIters);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (numIters > (MAX_TOTAL_WAIT_MS / WAIT_EACH_ATTEMPT_MS)) {<NEW_LINE>log.info("Timing out after iters={}. {} tablets not running, out of {}.", numIters, response.getNumNotRunningTablets(), response.getTotalTablets());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (numIters % LOG_EVERY_NUM_ITERS == 0) {<NEW_LINE>log.info("{} on node {} not ready after iters={}, {} tablets not running out of {}.", taskParams().serverType, taskParams().nodeName, numIters, response.getNumNotRunningTablets(), response.getTotalTablets());<NEW_LINE>}<NEW_LINE>sleepFor(WAIT_EACH_ATTEMPT_MS);<NEW_LINE>}<NEW_LINE>} catch (CancellationException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE>// There is no generic mechanism from proto/rpc to check if an older server does not have<NEW_LINE>// this rpc implemented. So, we just sleep for remaining time on any such error.<NEW_LINE>log.info("{} hit exception '{}' after {} iters.", getName(), <MASK><NEW_LINE>} finally {<NEW_LINE>closeClient(client);<NEW_LINE>}<NEW_LINE>// Sleep for the remaining portion of user specified time, if any.<NEW_LINE>sleepRemaining(userWaitTimeMs, numIters);<NEW_LINE>}
e.getMessage(), numIters);
840,696
final DescribeContactFlowModuleResult executeDescribeContactFlowModule(DescribeContactFlowModuleRequest describeContactFlowModuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeContactFlowModuleRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeContactFlowModuleRequest> request = null;<NEW_LINE>Response<DescribeContactFlowModuleResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeContactFlowModuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeContactFlowModuleRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Connect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeContactFlowModule");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeContactFlowModuleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeContactFlowModuleResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
597,483
public RateLimitResponse isAllowByServer(String path) {<NEW_LINE>long currentTimeWindow = Instant<MASK><NEW_LINE>if (!serverTimeMap.containsKey(path)) {<NEW_LINE>synchronized (this) {<NEW_LINE>serverTimeMap.put(path, new ConcurrentHashMap<>());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LimitQuota limitQuota;<NEW_LINE>if (!config.getServer().containsKey(path)) {<NEW_LINE>limitQuota = this.config.getRateLimit().get(0);<NEW_LINE>} else {<NEW_LINE>limitQuota = this.config.getServer().get(path);<NEW_LINE>}<NEW_LINE>Map<Long, AtomicLong> timeMap = serverTimeMap.get(path);<NEW_LINE>synchronized (this) {<NEW_LINE>if (timeMap.isEmpty()) {<NEW_LINE>timeMap.put(currentTimeWindow, new AtomicLong(1L));<NEW_LINE>} else {<NEW_LINE>Long countInOverallTime = removeOldEntriesForUser(currentTimeWindow, timeMap, limitQuota.unit);<NEW_LINE>if (countInOverallTime < limitQuota.value) {<NEW_LINE>// Handle new time windows<NEW_LINE>Long newCount = timeMap.getOrDefault(currentTimeWindow, new AtomicLong(0)).longValue() + 1;<NEW_LINE>timeMap.put(currentTimeWindow, new AtomicLong(newCount));<NEW_LINE>logger.debug("CurrentTimeWindow:" + currentTimeWindow + " Result:true " + " Count:" + countInOverallTime);<NEW_LINE>return new RateLimitResponse(true, null);<NEW_LINE>} else {<NEW_LINE>String reset = getRateLimitReset(currentTimeWindow, timeMap, limitQuota);<NEW_LINE>return new RateLimitResponse(false, buildHeaders(countInOverallTime, limitQuota, reset));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new RateLimitResponse(true, null);<NEW_LINE>}
.now().getEpochSecond();
1,761,869
protected boolean checkSelector(@NotNull final SvgIcon icon, @NotNull final SVGElement element) {<NEW_LINE>final boolean match;<NEW_LINE>if (TextUtils.isEmpty(this.element) || this.element.equals("*")) {<NEW_LINE>match = true;<NEW_LINE>} else if (this.element.startsWith("#")) {<NEW_LINE>final String id = this.element.substring(1);<NEW_LINE>final StyleAttribute attribute = icon.getAttribute(element, SvgElements.ID);<NEW_LINE>match = attribute != null && Objects.equals(id, attribute.getStringValue());<NEW_LINE>} else if (this.element.startsWith(".")) {<NEW_LINE>final String style = <MASK><NEW_LINE>final StyleAttribute attribute = icon.getAttribute(element, SvgElements.CLASS);<NEW_LINE>match = attribute != null && Objects.equals(style, attribute.getStringValue());<NEW_LINE>} else {<NEW_LINE>match = element.getClass() == SvgElements.CLASSES.get(this.element);<NEW_LINE>}<NEW_LINE>return match;<NEW_LINE>}
this.element.substring(1);
1,170,494
public void performAction(Map<String, Object> objMap, Map<String, Object> resultMap, Collection<RuleActionValue> actionValues) {<NEW_LINE>// need to make sure that the result is true.<NEW_LINE>boolean result = (Boolean) resultMap.get(RuleConstants.RESULT);<NEW_LINE>if (result) {<NEW_LINE>String roles = null;<NEW_LINE>for (Map.Entry<String, Object> entry : resultMap.entrySet()) {<NEW_LINE>if (logger.isDebugEnabled())<NEW_LINE>logger.debug("key = " + entry.getKey() + " value = " + entry.getValue());<NEW_LINE>if ((Boolean) entry.getValue() && !entry.getKey().equals(RuleConstants.RESULT)) {<NEW_LINE>if (roles == null) {<NEW_LINE>roles = entry.getKey();<NEW_LINE>} else {<NEW_LINE>roles = roles + " " + entry.getKey();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// put this into the input map for the next rule to work with roles instead of groups.<NEW_LINE>Map auditInfo = (Map) objMap.get("auditInfo");<NEW_LINE>JwtClaims claims = (<MASK><NEW_LINE>claims.setClaim("roles", roles);<NEW_LINE>}<NEW_LINE>}
JwtClaims) auditInfo.get("subject_claims");
1,452,897
public ShaderNodeDefinition findDefinition(Statement statement) throws IOException {<NEW_LINE>final String[] defLine = statement.getLine().split(":");<NEW_LINE>if (defLine.length != 3) {<NEW_LINE>throw new MatParseException("Can't find shader node definition for: ", statement);<NEW_LINE>}<NEW_LINE>final Map<String, ShaderNodeDefinition> nodeDefinitions = getNodeDefinitions();<NEW_LINE>final String definitionName = defLine[1].trim();<NEW_LINE>final String definitionPath = defLine[2].trim();<NEW_LINE>final String fullName = definitionName + ":" + definitionPath;<NEW_LINE>ShaderNodeDefinition def = nodeDefinitions.get(fullName);<NEW_LINE>if (def != null) {<NEW_LINE>return def;<NEW_LINE>}<NEW_LINE>List<ShaderNodeDefinition> defs;<NEW_LINE>try {<NEW_LINE>defs = assetManager.<MASK><NEW_LINE>} catch (final AssetNotFoundException e) {<NEW_LINE>throw new MatParseException("Couldn't find " + definitionPath, statement, e);<NEW_LINE>}<NEW_LINE>for (final ShaderNodeDefinition definition : defs) {<NEW_LINE>if (definitionName.equals(definition.getName())) {<NEW_LINE>def = definition;<NEW_LINE>}<NEW_LINE>final String key = definition.getName() + ":" + definitionPath;<NEW_LINE>if (!(nodeDefinitions.containsKey(key))) {<NEW_LINE>nodeDefinitions.put(key, definition);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (def == null) {<NEW_LINE>throw new MatParseException(definitionName + " is not a declared as Shader Node Definition", statement);<NEW_LINE>}<NEW_LINE>return def;<NEW_LINE>}
loadAsset(new ShaderNodeDefinitionKey(definitionPath));
446,610
public Request<DescribeStackResourceDriftsRequest> marshall(DescribeStackResourceDriftsRequest describeStackResourceDriftsRequest) {<NEW_LINE>if (describeStackResourceDriftsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeStackResourceDriftsRequest> request = new DefaultRequest<DescribeStackResourceDriftsRequest>(describeStackResourceDriftsRequest, "AmazonCloudFormation");<NEW_LINE><MASK><NEW_LINE>request.addParameter("Version", "2010-05-15");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>if (describeStackResourceDriftsRequest.getStackName() != null) {<NEW_LINE>request.addParameter("StackName", StringUtils.fromString(describeStackResourceDriftsRequest.getStackName()));<NEW_LINE>}<NEW_LINE>if (describeStackResourceDriftsRequest.getStackResourceDriftStatusFilters().isEmpty() && !((com.amazonaws.internal.SdkInternalList<String>) describeStackResourceDriftsRequest.getStackResourceDriftStatusFilters()).isAutoConstruct()) {<NEW_LINE>request.addParameter("StackResourceDriftStatusFilters", "");<NEW_LINE>}<NEW_LINE>if (!describeStackResourceDriftsRequest.getStackResourceDriftStatusFilters().isEmpty() || !((com.amazonaws.internal.SdkInternalList<String>) describeStackResourceDriftsRequest.getStackResourceDriftStatusFilters()).isAutoConstruct()) {<NEW_LINE>com.amazonaws.internal.SdkInternalList<String> stackResourceDriftStatusFiltersList = (com.amazonaws.internal.SdkInternalList<String>) describeStackResourceDriftsRequest.getStackResourceDriftStatusFilters();<NEW_LINE>int stackResourceDriftStatusFiltersListIndex = 1;<NEW_LINE>for (String stackResourceDriftStatusFiltersListValue : stackResourceDriftStatusFiltersList) {<NEW_LINE>if (stackResourceDriftStatusFiltersListValue != null) {<NEW_LINE>request.addParameter("StackResourceDriftStatusFilters.member." + stackResourceDriftStatusFiltersListIndex, StringUtils.fromString(stackResourceDriftStatusFiltersListValue));<NEW_LINE>}<NEW_LINE>stackResourceDriftStatusFiltersListIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (describeStackResourceDriftsRequest.getNextToken() != null) {<NEW_LINE>request.addParameter("NextToken", StringUtils.fromString(describeStackResourceDriftsRequest.getNextToken()));<NEW_LINE>}<NEW_LINE>if (describeStackResourceDriftsRequest.getMaxResults() != null) {<NEW_LINE>request.addParameter("MaxResults", StringUtils.fromInteger(describeStackResourceDriftsRequest.getMaxResults()));<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addParameter("Action", "DescribeStackResourceDrifts");
922,097
public SabrFormulaData effectiveSabrBeforeStart(SabrFormulaData parameters, double tau0, double tau1) {<NEW_LINE>double alpha = parameters.getAlpha();<NEW_LINE>double beta = parameters.getBeta();<NEW_LINE>double rho = parameters.getRho();<NEW_LINE>double nu = parameters.getNu();<NEW_LINE>double tau = 2 * q * tau0 + tau1;<NEW_LINE>double tauP2 = tau * tau;<NEW_LINE>double tauP3 = tauP2 * tau;<NEW_LINE>double tau0P2 = tau0 * tau0;<NEW_LINE>double tau0P3 = tau0P2 * tau0;<NEW_LINE>double tau1P2 = tau1 * tau1;<NEW_LINE>double tau1P3 = tau1P2 * tau1;<NEW_LINE>double gamma1 = tau * (2 * tauP3 + tau1P3 + q * (4 * q - 2) * tau0P3 + 6 * q * tau0P2 * tau1) / ((4 * q + 3) * (2 * q + 1));<NEW_LINE>double gamma2 = 3 * q * rho * rho * (tau1 - tau0) * (tau1 - tau0) * (3 * tauP2 - tau1P2 + 5 * q * tau0P2 + 4 * tau0 * tau1) / ((4 * q + 3) * (3 * q + 2) * (3 * q + 2));<NEW_LINE>double gamma = gamma1 + gamma2;<NEW_LINE>double rhoHat = rho * (3 * tauP2 + 2 * q * tau0P2 + tau1P2) / (Math.sqrt(gamma) * <MASK><NEW_LINE>double nuHatP2 = nu * nu * gamma * (2 * q + 1) / (tauP3 * tau1);<NEW_LINE>double nuHat = Math.sqrt(nuHatP2);<NEW_LINE>double h = nu * nu * (tauP2 + 2 * q * tau0P2 + tau1P2) / (2 * tau1 * tau * (q + 1)) - nuHatP2;<NEW_LINE>double alphaHatP2 = alpha * alpha / (2 * q + 1) * tau / tau1 * Math.exp(0.5 * h * tau1);<NEW_LINE>double alphaHat = Math.sqrt(alphaHatP2);<NEW_LINE>return SabrFormulaData.of(alphaHat, beta, rhoHat, nuHat);<NEW_LINE>}
(6 * q + 4));
908,136
protected void introspectAll(FFDCLogger info) {<NEW_LINE>info.append(this.toString());<NEW_LINE>// Allow any wrapper specific info to be inserted first.<NEW_LINE>introspectWrapperSpecificInfo(info);<NEW_LINE>// Display generic information.<NEW_LINE>info.append(<MASK><NEW_LINE>info.append("Parent wrapper:", parentWrapper);<NEW_LINE>info.append("Child wrapper:");<NEW_LINE>info.indent(childWrapper);<NEW_LINE>if (childWrappers != null) {<NEW_LINE>try {<NEW_LINE>info.append("# of Child Wrappers " + childWrappers.size());<NEW_LINE>info.append("Child wrappers:");<NEW_LINE>for (int i = 0; i < childWrappers.size(); i++) {<NEW_LINE>info.indent(childWrappers.get(i));<NEW_LINE>}<NEW_LINE>} catch (Throwable th) {<NEW_LINE>// No FFDC code needed; closed on another thread; ignore.<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// end if<NEW_LINE>info.eoln();<NEW_LINE>}
"Wrapper State: ", state.name());
291,596
public void marshall(CloudFormationStackRecord cloudFormationStackRecord, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (cloudFormationStackRecord == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(cloudFormationStackRecord.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(cloudFormationStackRecord.getCreatedAt(), CREATEDAT_BINDING);<NEW_LINE>protocolMarshaller.marshall(cloudFormationStackRecord.getLocation(), LOCATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(cloudFormationStackRecord.getResourceType(), RESOURCETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(cloudFormationStackRecord.getState(), STATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(cloudFormationStackRecord.getSourceInfo(), SOURCEINFO_BINDING);<NEW_LINE>protocolMarshaller.marshall(cloudFormationStackRecord.getDestinationInfo(), DESTINATIONINFO_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
cloudFormationStackRecord.getArn(), ARN_BINDING);
904,074
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>User user = securityService.getCurrentUser(request);<NEW_LINE><MASK><NEW_LINE>UserSettings userSettings = settingsService.getUserSettings(username);<NEW_LINE>List<MusicFolder> musicFolders = mediaFolderService.getMusicFoldersForUser(username);<NEW_LINE>List<MediaFile> artists = mediaFileDao.getStarredDirectories(0, Integer.MAX_VALUE, username, musicFolders);<NEW_LINE>List<MediaFile> albums = mediaFileDao.getStarredAlbums(0, Integer.MAX_VALUE, username, musicFolders);<NEW_LINE>List<MediaFile> files = mediaFileDao.getStarredFiles(0, Integer.MAX_VALUE, username, musicFolders);<NEW_LINE>mediaFileService.populateStarredDate(artists, username);<NEW_LINE>mediaFileService.populateStarredDate(albums, username);<NEW_LINE>mediaFileService.populateStarredDate(files, username);<NEW_LINE>List<MediaFile> songs = new ArrayList<>();<NEW_LINE>List<MediaFile> videos = new ArrayList<>();<NEW_LINE>for (MediaFile file : files) {<NEW_LINE>(file.isVideo() ? videos : songs).add(file);<NEW_LINE>}<NEW_LINE>map.put("user", user);<NEW_LINE>map.put("partyModeEnabled", userSettings.getPartyModeEnabled());<NEW_LINE>map.put("player", playerService.getPlayer(request, response));<NEW_LINE>map.put("coverArtSize", CoverArtScheme.MEDIUM.getSize());<NEW_LINE>map.put("artists", artists);<NEW_LINE>map.put("albums", albums);<NEW_LINE>map.put("songs", songs);<NEW_LINE>map.put("videos", videos);<NEW_LINE>return new ModelAndView("starred", "model", map);<NEW_LINE>}
String username = user.getUsername();
423,963
public RubyHash rehash(ThreadContext context) {<NEW_LINE>if (iteratorCount > 0) {<NEW_LINE>throw context.runtime.newRuntimeError("rehash during iteration");<NEW_LINE>}<NEW_LINE>modify();<NEW_LINE>final RubyHashEntry[] oldTable = table;<NEW_LINE>final RubyHashEntry[] newTable = new RubyHashEntry[oldTable.length];<NEW_LINE>for (int j = 0; j < oldTable.length; j++) {<NEW_LINE>RubyHashEntry entry = oldTable[j];<NEW_LINE>oldTable[j] = null;<NEW_LINE>while (entry != null) {<NEW_LINE>RubyHashEntry next = entry.next;<NEW_LINE>int oldHash = entry.hash;<NEW_LINE>IRubyObject key = entry.key;<NEW_LINE>int newHash = hashValue(key);<NEW_LINE>int i = <MASK><NEW_LINE>RubyHashEntry newEntry = newTable[i];<NEW_LINE>if (newEntry != null && internalKeyExist(newEntry.hash, newEntry.key, newHash, key)) {<NEW_LINE>RubyHashEntry tmpNext = entry.nextAdded;<NEW_LINE>RubyHashEntry tmpPrev = entry.prevAdded;<NEW_LINE>tmpPrev.nextAdded = tmpNext;<NEW_LINE>tmpPrev.prevAdded = tmpPrev;<NEW_LINE>size--;<NEW_LINE>} else {<NEW_LINE>// replace entry if hash changed<NEW_LINE>if (oldHash != newHash) {<NEW_LINE>entry = new RubyHashEntry(entry, newHash);<NEW_LINE>}<NEW_LINE>entry.next = newEntry;<NEW_LINE>newTable[i] = entry;<NEW_LINE>}<NEW_LINE>entry = next;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>table = newTable;<NEW_LINE>return this;<NEW_LINE>}
bucketIndex(newHash, newTable.length);
1,733,090
public Object createResultObject(List<Object> fields) throws CodingException {<NEW_LINE>if (fields.size() != count()) {<NEW_LINE>throw new CodingException("Invalid field number for create object " + ". Needs " + count() + " fields, while having " + fields.size() + " fields.");<NEW_LINE>}<NEW_LINE>switch(objectType) {<NEW_LINE>case ARRAY:<NEW_LINE>Object[] o = new Object[count()];<NEW_LINE>for (int i = 0; i < count(); i++) {<NEW_LINE>o[i] = fields.get(i);<NEW_LINE>}<NEW_LINE>return o;<NEW_LINE>case TUPLE:<NEW_LINE>try {<NEW_LINE>Tuple tuple = Tuple.getTupleClass(count()).newInstance();<NEW_LINE>for (int i = 0; i < count(); i++) {<NEW_LINE>tuple.setField(fields<MASK><NEW_LINE>}<NEW_LINE>return tuple;<NEW_LINE>} catch (IllegalAccessException | InstantiationException e) {<NEW_LINE>throw new CodingException("Failed to create Tuple object for type ", e);<NEW_LINE>}<NEW_LINE>case CASE_CLASS:<NEW_LINE>case POJO:<NEW_LINE>try {<NEW_LINE>Object object = objectClass.newInstance();<NEW_LINE>for (int i = 0; i < count(); i++) {<NEW_LINE>objectClass.getField(names.get(i)).set(object, fields.get(i));<NEW_LINE>}<NEW_LINE>} catch (InstantiationException | IllegalAccessException | NoSuchFieldException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>throw new CodingException(e.getMessage());<NEW_LINE>}<NEW_LINE>case ROW:<NEW_LINE>Row row = new Row(count());<NEW_LINE>for (int i = 0; i < count(); i++) {<NEW_LINE>row.setField(i, fields.get(i));<NEW_LINE>}<NEW_LINE>return row;<NEW_LINE>}<NEW_LINE>throw new CodingException("unsupport object type:" + objectType);<NEW_LINE>}
.get(i), i);
1,065,599
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE><MASK><NEW_LINE>// noinspection ConstantConditions<NEW_LINE>mRecyclerView = getView().findViewById(R.id.recycler_view);<NEW_LINE>mLayoutManager = new LinearLayoutManager(requireContext());<NEW_LINE>final Parcelable eimSavedState = (savedInstanceState != null) ? savedInstanceState.getParcelable(SAVED_STATE_EXPANDABLE_ITEM_MANAGER) : null;<NEW_LINE>mRecyclerViewExpandableItemManager = new RecyclerViewExpandableItemManager(eimSavedState);<NEW_LINE>mRecyclerViewExpandableItemManager.setOnGroupExpandListener(this);<NEW_LINE>mRecyclerViewExpandableItemManager.setOnGroupCollapseListener(this);<NEW_LINE>// adapter<NEW_LINE>final AddRemoveExpandableExampleAdapter myItemAdapter = new AddRemoveExpandableExampleAdapter(mRecyclerViewExpandableItemManager, getDataProvider());<NEW_LINE>mAdapter = myItemAdapter;<NEW_LINE>// wrap for expanding<NEW_LINE>mWrappedAdapter = mRecyclerViewExpandableItemManager.createWrappedAdapter(myItemAdapter);<NEW_LINE>final GeneralItemAnimator animator = new RefactoredDefaultItemAnimator();<NEW_LINE>// Change animations are enabled by default since support-v7-recyclerview v22.<NEW_LINE>// Need to disable them when using animation indicator.<NEW_LINE>animator.setSupportsChangeAnimations(false);<NEW_LINE>mRecyclerView.setLayoutManager(mLayoutManager);<NEW_LINE>// requires *wrapped* adapter<NEW_LINE>mRecyclerView.setAdapter(mWrappedAdapter);<NEW_LINE>mRecyclerView.setItemAnimator(animator);<NEW_LINE>mRecyclerView.setHasFixedSize(false);<NEW_LINE>// additional decorations<NEW_LINE>// noinspection StatementWithEmptyBody<NEW_LINE>if (supportsViewElevation()) {<NEW_LINE>// Lollipop or later has native drop shadow feature. ItemShadowDecorator is not required.<NEW_LINE>} else {<NEW_LINE>mRecyclerView.addItemDecoration(new ItemShadowDecorator((NinePatchDrawable) ContextCompat.getDrawable(requireContext(), R.drawable.material_shadow_z1)));<NEW_LINE>}<NEW_LINE>mRecyclerView.addItemDecoration(new SimpleListDividerDecorator(ContextCompat.getDrawable(requireContext(), R.drawable.list_divider_h), true));<NEW_LINE>mRecyclerViewExpandableItemManager.attachRecyclerView(mRecyclerView);<NEW_LINE>}
super.onViewCreated(view, savedInstanceState);
504,324
private static StringBuilder filterTableProperties(final String properties) {<NEW_LINE>// splitting the string at = and blanks<NEW_LINE>final String[] values = properties.replaceAll("&quot;", EMPTY).split("[= ]");<NEW_LINE>final StringBuilder stringBuilder = new StringBuilder(properties.length());<NEW_LINE>String key, value;<NEW_LINE>String[] posVals;<NEW_LINE>final int numberOfValues = values.length;<NEW_LINE>for (int i = 0; i < numberOfValues; i++) {<NEW_LINE>key = <MASK><NEW_LINE>if ("nowrap".equals(key)) {<NEW_LINE>appendKeyValuePair("nowrap", "nowrap", stringBuilder);<NEW_LINE>} else if (i + 1 < numberOfValues) {<NEW_LINE>value = values[++i].trim();<NEW_LINE>if (("summary".equals(key)) || ("bgcolor".equals(key) && value.matches("#{0,1}[0-9a-fA-F]{1,6}|[a-zA-Z]{3,}")) || (("width".equals(key) || "height".equals(key)) && value.matches("\\d+%{0,1}")) || ((posVals = PROPERTY_VALUES.get(key)) != null && Arrays.binarySearch(posVals, value) >= 0) || (Arrays.binarySearch(TABLE_PROPERTIES, key) >= 0 && value.matches("\\d+"))) {<NEW_LINE>appendKeyValuePair(key, value, stringBuilder);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return stringBuilder;<NEW_LINE>}
values[i].trim();
1,166,012
public void onResume() {<NEW_LINE>super.onResume();<NEW_LINE>// TODO [alex] LargeScreenSupport -- Remove these lines.<NEW_LINE><MASK><NEW_LINE>WindowUtil.setLightStatusBarFromTheme(requireActivity());<NEW_LINE>EventBus.getDefault().register(this);<NEW_LINE>initializeIdentityRecords();<NEW_LINE>composeText.setTransport(sendButton.getSelectedTransport());<NEW_LINE>Recipient recipientSnapshot = recipient.get();<NEW_LINE>titleView.setTitle(glideRequests, recipientSnapshot);<NEW_LINE>setBlockedUserState(recipientSnapshot, isSecureText, isDefaultSms);<NEW_LINE>calculateCharactersRemaining();<NEW_LINE>if (recipientSnapshot.getGroupId().isPresent() && recipientSnapshot.getGroupId().get().isV2() && !recipientSnapshot.isBlocked()) {<NEW_LINE>GroupId.V2 groupId = recipientSnapshot.getGroupId().get().requireV2();<NEW_LINE>ApplicationDependencies.getJobManager().startChain(new RequestGroupV2InfoJob(groupId)).then(GroupV2UpdateSelfProfileKeyJob.withoutLimits(groupId)).enqueue();<NEW_LINE>if (viewModel.getArgs().isFirstTimeInSelfCreatedGroup()) {<NEW_LINE>groupViewModel.inviteFriendsOneTimeIfJustSelfInGroup(getChildFragmentManager(), groupId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (groupCallViewModel != null) {<NEW_LINE>groupCallViewModel.peekGroupCall();<NEW_LINE>}<NEW_LINE>setVisibleThread(threadId);<NEW_LINE>ConversationUtil.refreshRecipientShortcuts();<NEW_LINE>if (SignalStore.rateLimit().needsRecaptcha()) {<NEW_LINE>RecaptchaProofBottomSheetFragment.show(getChildFragmentManager());<NEW_LINE>}<NEW_LINE>}
WindowUtil.setLightNavigationBarFromTheme(requireActivity());
164,235
private static void patchWithGitApply(Path rootDir, byte[] diffContents, ImmutableList<String> excludedPaths, int stripSlashes, boolean verbose, boolean reverse, Map<String, String> environment, @Nullable Path gitDir) throws IOException, InsideGitDirException {<NEW_LINE>GitEnvironment gitEnv = new GitEnvironment(environment);<NEW_LINE>if (gitDir == null) {<NEW_LINE>checkNotInsideGitRepo(rootDir, verbose, gitEnv);<NEW_LINE>}<NEW_LINE>ImmutableList.Builder<String> params = ImmutableList.builder();<NEW_LINE>// Show verbose output unconditionally since it is helpful for debugging issues with patches.<NEW_LINE>params.add(gitEnv.resolveGitBinary());<NEW_LINE>if (gitDir != null) {<NEW_LINE>params.add("--git-dir=" + gitDir.normalize().toAbsolutePath());<NEW_LINE>}<NEW_LINE>params.add("apply", "-v", "--stat", "--apply", "-p" + stripSlashes);<NEW_LINE>if (gitDir != null) {<NEW_LINE>params.add("--3way");<NEW_LINE>}<NEW_LINE>for (String excludedPath : excludedPaths) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (reverse) {<NEW_LINE>params.add("-R");<NEW_LINE>}<NEW_LINE>params.add("-");<NEW_LINE>Command cmd = new Command(params.build().toArray(new String[0]), environment, rootDir.toFile());<NEW_LINE>try {<NEW_LINE>new CommandRunner(cmd).withVerbose(verbose).withInput(diffContents).execute();<NEW_LINE>} catch (BadExitStatusWithOutputException e) {<NEW_LINE>throw new IOException(String.format("Error executing 'git apply': %s. Stderr: \n%s", e.getMessage(), e.getOutput().getStderr()), e);<NEW_LINE>} catch (CommandException e) {<NEW_LINE>throw new IOException("Error executing 'git apply'", e);<NEW_LINE>}<NEW_LINE>}
params.add("--exclude", excludedPath);
1,496,646
public static void main(String[] args) {<NEW_LINE>try {<NEW_LINE>TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());<NEW_LINE>KeyStore trustStore = KeyStore.getInstance(JKS);<NEW_LINE>char[] ksPwd = new char[] { 0x63, 0x6C, 0x69, 0x65, 0x6E, 0x74, 0x5F, 0x6B, 0x73, 0x5F, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6F, 0x72, 0x64 };<NEW_LINE>trustStore.load(ResourceUtils.getInputStream(MqttSslClient.class.getClassLoader(), KEY_STORE_FILE), ksPwd);<NEW_LINE>tmf.init(trustStore);<NEW_LINE>KeyStore ks = KeyStore.getInstance(JKS);<NEW_LINE>ks.load(ResourceUtils.getInputStream(MqttSslClient.class.getClassLoader(), KEY_STORE_FILE), ksPwd);<NEW_LINE>KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());<NEW_LINE>char[] clientPwd = new char[] { 0x63, 0x6C, 0x69, 0x65, 0x6E, 0x74, 0x5F, 0x6B, 0x65, 0x79, 0x5F, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6F, 0x72, 0x64 };<NEW_LINE>kmf.init(ks, clientPwd);<NEW_LINE>KeyManager[] km = kmf.getKeyManagers();<NEW_LINE>TrustManager[] tm = tmf.getTrustManagers();<NEW_LINE>SSLContext sslContext = SSLContext.getInstance(TLS);<NEW_LINE>sslContext.<MASK><NEW_LINE>MqttConnectOptions options = new MqttConnectOptions();<NEW_LINE>options.setSocketFactory(sslContext.getSocketFactory());<NEW_LINE>MqttAsyncClient client = new MqttAsyncClient(MQTT_URL, CLIENT_ID, new MemoryPersistence());<NEW_LINE>client.connect(options);<NEW_LINE>Thread.sleep(3000);<NEW_LINE>MqttMessage message = new MqttMessage();<NEW_LINE>message.setPayload("{\"key1\":\"value1\", \"key2\":true, \"key3\": 3.0, \"key4\": 4}".getBytes());<NEW_LINE>client.publish("v1/devices/me/telemetry", message);<NEW_LINE>client.disconnect();<NEW_LINE>log.info("Disconnected");<NEW_LINE>System.exit(0);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Unexpected exception occurred in MqttSslClient", e);<NEW_LINE>}<NEW_LINE>}
init(km, tm, null);
1,063,812
private LimitQueryDeterminismAnalysis analyzeInternal() {<NEW_LINE>if (!enabled) {<NEW_LINE>return NOT_RUN;<NEW_LINE>}<NEW_LINE>Query query;<NEW_LINE>// A query is rewritten to either an Insert or a CreateTableAsSelect<NEW_LINE>if (statement instanceof Insert) {<NEW_LINE>query = ((<MASK><NEW_LINE>} else if (statement instanceof CreateTableAsSelect) {<NEW_LINE>query = ((CreateTableAsSelect) statement).getQuery();<NEW_LINE>} else {<NEW_LINE>return NOT_RUN;<NEW_LINE>}<NEW_LINE>// Flatten TableSubquery<NEW_LINE>if (query.getQueryBody() instanceof TableSubquery) {<NEW_LINE>Optional<With> with = query.getWith();<NEW_LINE>while (query.getQueryBody() instanceof TableSubquery) {<NEW_LINE>// ORDER BY and LIMIT must be empty according to syntax<NEW_LINE>if (query.getOrderBy().isPresent() || query.getLimit().isPresent()) {<NEW_LINE>return NOT_RUN;<NEW_LINE>}<NEW_LINE>query = ((TableSubquery) query.getQueryBody()).getQuery();<NEW_LINE>// WITH must be empty according to syntax<NEW_LINE>if (query.getWith().isPresent()) {<NEW_LINE>return NOT_RUN;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>query = new Query(with, query.getQueryBody(), query.getOrderBy(), query.getOffset(), query.getLimit());<NEW_LINE>}<NEW_LINE>if (query.getQueryBody() instanceof QuerySpecification) {<NEW_LINE>return analyzeQuerySpecification(query.getWith(), (QuerySpecification) query.getQueryBody());<NEW_LINE>}<NEW_LINE>return analyzeQuery(query);<NEW_LINE>}
Insert) statement).getQuery();
1,221,456
private void initializeView(AttributeSet attrs, int defStyleAttr) {<NEW_LINE>if (attrs != null && !isInEditMode()) {<NEW_LINE>final TypedArray attributes = mContext.getTheme().obtainStyledAttributes(attrs, R.styleable.PinCodeView, defStyleAttr, 0);<NEW_LINE>mEmptyDotDrawableId = attributes.getDrawable(R.styleable.PinCodeView_lp_empty_pin_dot);<NEW_LINE>if (mEmptyDotDrawableId == null) {<NEW_LINE>mEmptyDotDrawableId = getResources().getDrawable(R.drawable.pin_code_round_empty);<NEW_LINE>}<NEW_LINE>mFullDotDrawableId = attributes.getDrawable(R.styleable.PinCodeView_lp_full_pin_dot);<NEW_LINE>if (mFullDotDrawableId == null) {<NEW_LINE>mFullDotDrawableId = getResources().getDrawable(R.drawable.pin_code_round_full);<NEW_LINE>}<NEW_LINE>attributes.recycle();<NEW_LINE>LayoutInflater inflater = (LayoutInflater) <MASK><NEW_LINE>PinCodeRoundView view = (PinCodeRoundView) inflater.inflate(R.layout.view_round_pin_code, this);<NEW_LINE>mRoundContainer = (ViewGroup) view.findViewById(R.id.round_container);<NEW_LINE>mRoundViews = new ArrayList<>();<NEW_LINE>}<NEW_LINE>}
mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);