idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
309,337
private Function<Node, Node> createOperationTransformForGrpcPortNodes(final Network<Node, Edge> network, final FnDataService beamFnDataService, final OperationContext context) {<NEW_LINE>return new TypeSafeNodeFunction<RemoteGrpcPortNode>(RemoteGrpcPortNode.class) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Node typedApply(RemoteGrpcPortNode input) {<NEW_LINE>RegisterAndProcessBundleOperation registerFnOperation = (RegisterAndProcessBundleOperation) Iterables.getOnlyElement(Iterables.filter(network.adjacentNodes(input), OperationNode.class)).getOperation();<NEW_LINE>// The coder comes from the one and only adjacent output node<NEW_LINE>Coder<?> coder = Iterables.getOnlyElement(Iterables.filter(network.adjacentNodes(input), OutputReceiverNode.class)).getCoder();<NEW_LINE>// We figure out whether we are outputting some where if the output node is a<NEW_LINE>// successor.<NEW_LINE>Iterable<OutputReceiverNode> outputReceiverNodes = Iterables.filter(network.successors(input), OutputReceiverNode.class);<NEW_LINE>Operation operation;<NEW_LINE>if (outputReceiverNodes.iterator().hasNext()) {<NEW_LINE>OutputReceiver[] outputReceivers = new OutputReceiver[] { Iterables.getOnlyElement(outputReceiverNodes).getOutputReceiver() };<NEW_LINE>operation = new RemoteGrpcPortReadOperation<>(beamFnDataService, input.getPrimitiveTransformId(), registerFnOperation::getProcessBundleInstructionId, (<MASK><NEW_LINE>} else {<NEW_LINE>operation = new RemoteGrpcPortWriteOperation<>(beamFnDataService, input.getPrimitiveTransformId(), registerFnOperation::getProcessBundleInstructionId, (Coder) coder, context);<NEW_LINE>}<NEW_LINE>return OperationNode.create(operation);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
Coder) coder, outputReceivers, context);
1,527,708
void writeJavascriptHandlers() throws IOException {<NEW_LINE>if (cspState.getEventHandlers() == null || cspState.getEventHandlers().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (sb == null) {<NEW_LINE>sb = new StringBuilder(cspState.getEventHandlers().size() * 25);<NEW_LINE>} else {<NEW_LINE>sb.setLength(0);<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, Map<String, String>> elements : cspState.getEventHandlers().entrySet()) {<NEW_LINE>String id = elements.getKey();<NEW_LINE>for (Map.Entry<String, String> events : elements.getValue().entrySet()) {<NEW_LINE>String event = events.getKey();<NEW_LINE>String javascript = events.getValue();<NEW_LINE>sb.append("PrimeFaces.csp.register('");<NEW_LINE>sb.append(EscapeUtils.forJavaScript(id));<NEW_LINE>sb.append("','");<NEW_LINE>sb.append(event);<NEW_LINE>sb.append("',function(event){");<NEW_LINE>sb.append(javascript);<NEW_LINE>sb.append("});");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>requestContext.getScriptsToExecute().add(sb.toString());<NEW_LINE>cspState<MASK><NEW_LINE>}
.getEventHandlers().clear();
179,383
protected boolean executeGroovyScript(ScriptResource file) {<NEW_LINE>try {<NEW_LINE>ClassLoader classLoader = getClass().getClassLoader();<NEW_LINE>CompilerConfiguration cc = new CompilerConfiguration();<NEW_LINE>cc.setRecompileGroovySource(true);<NEW_LINE>Binding bind = new Binding();<NEW_LINE>bind.setProperty("ds", getDataSource());<NEW_LINE>bind.setProperty("log", LoggerFactory.getLogger(String.format("%s$%s", DbUpdaterEngine.class.getName(), StringUtils.removeEndIgnoreCase(file.getName(), ".groovy"))));<NEW_LINE>if (!StringUtils.endsWithIgnoreCase(file.getName(), "." + UPGRADE_GROOVY_EXTENSION)) {<NEW_LINE>bind.setProperty("postUpdate", new PostUpdateScripts() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void add(Closure closure) {<NEW_LINE>super.add(closure);<NEW_LINE>log.warn<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>GroovyShell shell = new GroovyShell(classLoader, bind, cc);<NEW_LINE>Script script = shell.parse(file.getContent());<NEW_LINE>script.run();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(String.format("%sError executing Groovy script %s\n%s", ERROR, file.name, e.getMessage()), e);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
("Added post update action will be ignored for data store [{}]", storeNameToString(storeName));
525,295
public Map<String, Object> networkPlayersTableJSON() {<NEW_LINE>Integer xMostRecentPlayers = config.get(DisplaySettings.PLAYERS_PER_PLAYERS_PAGE);<NEW_LINE>Long playtimeThreshold = config.get(TimeSettings.ACTIVE_PLAY_THRESHOLD);<NEW_LINE>boolean openPlayerLinksInNewTab = <MASK><NEW_LINE>Database database = dbSystem.getDatabase();<NEW_LINE>ServerUUID mainServerUUID = database.query(ServerQueries.fetchProxyServerInformation()).map(Server::getUuid).orElse(serverInfo.getServerUUID());<NEW_LINE>Map<UUID, ExtensionTabData> pluginData = database.query(new ExtensionServerTableDataQuery(mainServerUUID, xMostRecentPlayers));<NEW_LINE>return new // players page<NEW_LINE>PlayersTableJSONCreator(// players page<NEW_LINE>database.query(new NetworkTablePlayersQuery(System.currentTimeMillis(), playtimeThreshold, xMostRecentPlayers)), // players page<NEW_LINE>pluginData, // players page<NEW_LINE>openPlayerLinksInNewTab, // players page<NEW_LINE>formatters, // players page<NEW_LINE>locale, true).toJSONMap();<NEW_LINE>}
config.isTrue(DisplaySettings.OPEN_PLAYER_LINKS_IN_NEW_TAB);
1,159,407
public void onRender(MatrixStack matrixStack, float partialTicks) {<NEW_LINE>if (currentBlock == null)<NEW_LINE>return;<NEW_LINE>// GL settings<NEW_LINE>GL11.glEnable(GL11.GL_BLEND);<NEW_LINE>GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>GL11.glEnable(GL11.GL_LINE_SMOOTH);<NEW_LINE>GL11.glEnable(GL11.GL_CULL_FACE);<NEW_LINE>GL11.glDisable(GL11.GL_DEPTH_TEST);<NEW_LINE>matrixStack.push();<NEW_LINE>RenderUtils.applyRegionalRenderOffset(matrixStack);<NEW_LINE>BlockPos camPos = RenderUtils.getCameraBlockPos();<NEW_LINE>int regionX = (camPos.getX() >> 9) * 512;<NEW_LINE>int regionZ = (camPos.getZ() >> 9) * 512;<NEW_LINE>// set position<NEW_LINE>matrixStack.translate(currentBlock.getX() - regionX, currentBlock.getY(), currentBlock.getZ() - regionZ);<NEW_LINE>// get progress<NEW_LINE>float progress;<NEW_LINE>if (BlockUtils.getHardness(currentBlock) < 1)<NEW_LINE>progress = IMC.getInteractionManager().getCurrentBreakingProgress();<NEW_LINE>else<NEW_LINE>progress = 1;<NEW_LINE>// set size<NEW_LINE>if (progress < 1) {<NEW_LINE>matrixStack.translate(0.5, 0.5, 0.5);<NEW_LINE>matrixStack.scale(progress, progress, progress);<NEW_LINE>matrixStack.translate(-0.5, -0.5, -0.5);<NEW_LINE>}<NEW_LINE>// get color<NEW_LINE>float red = progress * 2F;<NEW_LINE>float green = 2 - red;<NEW_LINE>// draw box<NEW_LINE>RenderSystem.setShader(GameRenderer::getPositionShader);<NEW_LINE>RenderSystem.setShaderColor(red, green, 0, 0.25F);<NEW_LINE>RenderUtils.drawSolidBox(matrixStack);<NEW_LINE>RenderSystem.setShaderColor(red, green, 0, 0.5F);<NEW_LINE>RenderUtils.drawOutlinedBox(matrixStack);<NEW_LINE>matrixStack.pop();<NEW_LINE>// GL resets<NEW_LINE>RenderSystem.setShaderColor(1, 1, 1, 1);<NEW_LINE>GL11.glEnable(GL11.GL_DEPTH_TEST);<NEW_LINE>GL11.glDisable(GL11.GL_BLEND);<NEW_LINE><MASK><NEW_LINE>}
GL11.glDisable(GL11.GL_LINE_SMOOTH);
1,297,906
private void decompose(int c, int norm16, ReorderingBuffer buffer) {<NEW_LINE>// get the decomposition and the lead and trail cc's<NEW_LINE>if (norm16 >= limitNoNo) {<NEW_LINE>if (isMaybeOrNonZeroCC(norm16)) {<NEW_LINE>buffer.append(c, getCCFromYesOrMaybe(norm16));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Maps to an isCompYesAndZeroCC.<NEW_LINE>c = mapAlgorithmic(c, norm16);<NEW_LINE>norm16 = getNorm16(c);<NEW_LINE>}<NEW_LINE>if (norm16 < minYesNo) {<NEW_LINE>// c does not decompose<NEW_LINE>buffer.append(c, 0);<NEW_LINE>} else if (isHangulLV(norm16) || isHangulLVT(norm16)) {<NEW_LINE>// Hangul syllable: decompose algorithmically<NEW_LINE>Hangul.decompose(c, buffer);<NEW_LINE>} else {<NEW_LINE>// c decomposes, get everything from the variable-length extra data<NEW_LINE>int mapping = norm16 >> OFFSET_SHIFT;<NEW_LINE>int <MASK><NEW_LINE>int length = firstUnit & MAPPING_LENGTH_MASK;<NEW_LINE>int leadCC, trailCC;<NEW_LINE>trailCC = firstUnit >> 8;<NEW_LINE>if ((firstUnit & MAPPING_HAS_CCC_LCCC_WORD) != 0) {<NEW_LINE>leadCC = extraData.charAt(mapping - 1) >> 8;<NEW_LINE>} else {<NEW_LINE>leadCC = 0;<NEW_LINE>}<NEW_LINE>// skip over the firstUnit<NEW_LINE>++mapping;<NEW_LINE>buffer.append(extraData, mapping, mapping + length, leadCC, trailCC);<NEW_LINE>}<NEW_LINE>}
firstUnit = extraData.charAt(mapping);
517,764
public int compare(BugInstance lhs, BugInstance rhs) {<NEW_LINE>int cmp;<NEW_LINE>// Bug abbrevs must match<NEW_LINE>BugPattern lhsPattern = lhs.getBugPattern();<NEW_LINE>BugPattern rhsPattern = rhs.getBugPattern();<NEW_LINE>String lhsAbbrev, rhsAbbrev;<NEW_LINE>lhsAbbrev = lhsPattern.getAbbrev();<NEW_LINE>rhsAbbrev = rhsPattern.getAbbrev();<NEW_LINE>cmp = lhsAbbrev.compareTo(rhsAbbrev);<NEW_LINE>if (cmp != 0) {<NEW_LINE>if (DEBUG) {<NEW_LINE>System.err.println("bug abbrevs do not match");<NEW_LINE>}<NEW_LINE>return cmp;<NEW_LINE>}<NEW_LINE>// Primary class must match<NEW_LINE>cmp = compareClassesAllowingNull(lhs.getPrimaryClass(), rhs.getPrimaryClass());<NEW_LINE>if (cmp != 0) {<NEW_LINE>return cmp;<NEW_LINE>}<NEW_LINE>boolean havePrimaryMethods = lhs.getPrimaryMethod() != null && rhs.getPrimaryMethod() != null;<NEW_LINE>// Primary method must match (if any)<NEW_LINE>cmp = compareMethodsAllowingNull(lhs.getPrimaryMethod(), rhs.getPrimaryMethod());<NEW_LINE>if (cmp != 0) {<NEW_LINE>if (DEBUG) {<NEW_LINE>System.err.println("primary methods do not match");<NEW_LINE>}<NEW_LINE>return cmp;<NEW_LINE>}<NEW_LINE>if (!havePrimaryMethods) {<NEW_LINE>// Primary field must match (if any)<NEW_LINE>cmp = compareFieldsAllowingNull(lhs.getPrimaryField(<MASK><NEW_LINE>if (cmp != 0) {<NEW_LINE>if (DEBUG) {<NEW_LINE>System.err.println("primary fields do not match");<NEW_LINE>}<NEW_LINE>return cmp;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Assume they're the same<NEW_LINE>return 0;<NEW_LINE>}
), rhs.getPrimaryField());
473,445
public void registerXMLSet(String filename) throws FileNotFoundException, XMLException {<NEW_LINE>if (!filename.startsWith(File.separator) && !filename.startsWith(":", 1)) {<NEW_LINE>StringBuffer buffer = new StringBuffer(baseDir);<NEW_LINE>// buffer.append(File.separator);<NEW_LINE>buffer.append(srcRoot);<NEW_LINE>// buffer.append(File.separator);<NEW_LINE>buffer.append(filename);<NEW_LINE>filename = buffer.toString();<NEW_LINE>}<NEW_LINE>ConfigXMLHandler xmlHandler = new ConfigXMLHandler(filename);<NEW_LINE>xmlHandler.setBaseDir(baseDir);<NEW_LINE>xmlHandler.setSourceRoot(srcRoot);<NEW_LINE>xmlHandler.parseInput();<NEW_LINE>// Gets the automated tests variables<NEW_LINE>testsProject = xmlHandler.getTestsProject();<NEW_LINE>testsClassPaths.addAll(xmlHandler.getTestsClassPaths());<NEW_LINE>testsSources.addAll(xmlHandler.getTestsSources());<NEW_LINE>setConfigVersion(xmlHandler.getConfigVersion());<NEW_LINE>List<ConfigObject> tempLocalConfigs = xmlHandler.getLocalConfigs();<NEW_LINE>List<ConfigObject> tempConfigs = xmlHandler.getAllConfigs();<NEW_LINE>for (ConfigObject currentConfig : tempConfigs) {<NEW_LINE>boolean failed = false;<NEW_LINE>if (currentConfig.isSet() || (currentConfig.getSourceCount() > 0 && currentConfig.getOutputPath() != null)) {<NEW_LINE>if (getConfiguration(currentConfig.getName()) != null) {<NEW_LINE>// Note that overriding is being done<NEW_LINE>StringBuffer buffer = new StringBuffer("Warning: Multiple definitions of ");<NEW_LINE>buffer.append(currentConfig.getName());<NEW_LINE>buffer.append(" possible errors in dependencies");<NEW_LINE>System.err.println(buffer.toString());<NEW_LINE>failed = !overrideConfiguration(currentConfig, tempLocalConfigs.contains(currentConfig));<NEW_LINE>} else {<NEW_LINE>failed = !registerConfiguration(currentConfig, tempLocalConfigs.contains(currentConfig));<NEW_LINE>}<NEW_LINE>if (failed) {<NEW_LINE>StringBuffer buffer = new StringBuffer("Warning dependencies could not be resolved: ");<NEW_LINE>buffer.append(currentConfig.getName());<NEW_LINE>System.err.<MASK><NEW_LINE>// unresolvedDependencies.add(currentConfig.getName());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>StringBuffer buffer = new StringBuffer();<NEW_LINE>if (currentConfig.getSourceCount() == 0) {<NEW_LINE>buffer.append("Warning ");<NEW_LINE>buffer.append(currentConfig.getName());<NEW_LINE>buffer.append(" does not have sources");<NEW_LINE>}<NEW_LINE>if (currentConfig.getSourceCount() == 0 && currentConfig.getOutputPath() == null) {<NEW_LINE>buffer.append("\n");<NEW_LINE>}<NEW_LINE>if (currentConfig.getOutputPath() == null) {<NEW_LINE>buffer.append("Warning ");<NEW_LINE>buffer.append(currentConfig.getName());<NEW_LINE>buffer.append(" does not have an output path");<NEW_LINE>}<NEW_LINE>System.err.println(buffer.toString());<NEW_LINE>incompleteConfigs.put(currentConfig.getName(), buffer.toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
println(buffer.toString());
1,339,352
public Request<GetChannelMessageRequest> marshall(GetChannelMessageRequest getChannelMessageRequest) {<NEW_LINE>if (getChannelMessageRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetChannelMessageRequest)");<NEW_LINE>}<NEW_LINE>Request<GetChannelMessageRequest> request = new DefaultRequest<GetChannelMessageRequest>(getChannelMessageRequest, "AmazonChimeSDKMessaging");<NEW_LINE>request.setHttpMethod(HttpMethodName.GET);<NEW_LINE>if (getChannelMessageRequest.getChimeBearer() != null) {<NEW_LINE>request.addHeader("x-amz-chime-bearer", StringUtils.fromString(getChannelMessageRequest.getChimeBearer()));<NEW_LINE>}<NEW_LINE>String uriResourcePath = "/channels/{channelArn}/messages/{messageId}";<NEW_LINE>uriResourcePath = uriResourcePath.replace("{channelArn}", (getChannelMessageRequest.getChannelArn() == null) ? "" : StringUtils.fromString(getChannelMessageRequest.getChannelArn()));<NEW_LINE>uriResourcePath = uriResourcePath.replace("{messageId}", (getChannelMessageRequest.getMessageId() == null) ? "" : StringUtils.fromString(getChannelMessageRequest.getMessageId()));<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>String encodedUriResourcePath = "/channels/{channelArn}/messages/{messageId}";<NEW_LINE>encodedUriResourcePath = encodedUriResourcePath.replace("{channelArn}", (getChannelMessageRequest.getChannelArn() == null) ? "" : Uri.encode(StringUtils.fromString(getChannelMessageRequest.getChannelArn())));<NEW_LINE>encodedUriResourcePath = encodedUriResourcePath.replace("{messageId}", (getChannelMessageRequest.getMessageId() == null) ? "" : Uri.encode(StringUtils.fromString(getChannelMessageRequest.getMessageId())));<NEW_LINE>request.setEncodedResourcePath(encodedUriResourcePath);<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addHeader("Content-Type", "application/x-amz-json-1.0");
192,079
protected List<Class<? extends C>> parseValue(Object obj) throws ParameterException {<NEW_LINE>if (obj == null) {<NEW_LINE>throw new UnspecifiedParameterException(this);<NEW_LINE>}<NEW_LINE>if (List.class.isInstance(obj)) {<NEW_LINE>List<?> l = (List<?>) obj;<NEW_LINE>ArrayList<C> inst = new ArrayList<>(l.size());<NEW_LINE>ArrayList<Class<? extends C>> classes = new ArrayList<>(l.size());<NEW_LINE>for (Object o : l) {<NEW_LINE>// does the given objects class fit?<NEW_LINE>if (restrictionClass.isInstance(o)) {<NEW_LINE>inst.add((C) o);<NEW_LINE>classes.add((Class<? extends C>) o.getClass());<NEW_LINE>} else if (o instanceof Class) {<NEW_LINE>if (restrictionClass.isAssignableFrom((Class<?>) o)) {<NEW_LINE>inst.add(null);<NEW_LINE>classes.add((Class<? extends C>) o);<NEW_LINE>} else {<NEW_LINE>throw new WrongParameterValueException(this, ((Class<?>) o).getName(), <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new WrongParameterValueException(this, o.getClass().getName(), "Given instance not an implementation of " + restrictionClass.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.instances = inst;<NEW_LINE>return super.parseValue(classes);<NEW_LINE>}<NEW_LINE>// Did we get a single instance?<NEW_LINE>try {<NEW_LINE>C inst = restrictionClass.cast(obj);<NEW_LINE>this.instances = Arrays.asList(inst);<NEW_LINE>return super.parseValue(inst.getClass());<NEW_LINE>} catch (ClassCastException e) {<NEW_LINE>// Continue<NEW_LINE>}<NEW_LINE>return super.parseValue(obj);<NEW_LINE>}
"Given class not a subclass / implementation of " + restrictionClass.getName());
1,691,254
public static DescribeVsStreamsOnlineListResponse unmarshall(DescribeVsStreamsOnlineListResponse describeVsStreamsOnlineListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVsStreamsOnlineListResponse.setRequestId(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.RequestId"));<NEW_LINE>describeVsStreamsOnlineListResponse.setPageNum<MASK><NEW_LINE>describeVsStreamsOnlineListResponse.setPageSize(_ctx.integerValue("DescribeVsStreamsOnlineListResponse.PageSize"));<NEW_LINE>describeVsStreamsOnlineListResponse.setTotalNum(_ctx.integerValue("DescribeVsStreamsOnlineListResponse.TotalNum"));<NEW_LINE>describeVsStreamsOnlineListResponse.setTotalPage(_ctx.integerValue("DescribeVsStreamsOnlineListResponse.TotalPage"));<NEW_LINE>List<LiveStreamOnlineInfo> onlineInfo = new ArrayList<LiveStreamOnlineInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeVsStreamsOnlineListResponse.OnlineInfo.Length"); i++) {<NEW_LINE>LiveStreamOnlineInfo liveStreamOnlineInfo = new LiveStreamOnlineInfo();<NEW_LINE>liveStreamOnlineInfo.setDomainName(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].DomainName"));<NEW_LINE>liveStreamOnlineInfo.setAppName(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].AppName"));<NEW_LINE>liveStreamOnlineInfo.setStreamName(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].StreamName"));<NEW_LINE>liveStreamOnlineInfo.setPublishTime(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].PublishTime"));<NEW_LINE>liveStreamOnlineInfo.setPublishUrl(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].PublishUrl"));<NEW_LINE>liveStreamOnlineInfo.setPublishDomain(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].PublishDomain"));<NEW_LINE>liveStreamOnlineInfo.setPublishType(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].PublishType"));<NEW_LINE>liveStreamOnlineInfo.setTranscoded(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].Transcoded"));<NEW_LINE>liveStreamOnlineInfo.setTranscodeId(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].TranscodeId"));<NEW_LINE>onlineInfo.add(liveStreamOnlineInfo);<NEW_LINE>}<NEW_LINE>describeVsStreamsOnlineListResponse.setOnlineInfo(onlineInfo);<NEW_LINE>return describeVsStreamsOnlineListResponse;<NEW_LINE>}
(_ctx.integerValue("DescribeVsStreamsOnlineListResponse.PageNum"));
143,105
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "create table MyTable(sortcol sorted(intPrimitive) @type('SupportBean'));\n" + "into table MyTable select sorted(*) as sortcol from SupportBean;\n" + "@name('s0') select " + "MyTable.sortcol.navigableMapReference() as nmr" + " from SupportBean_S0";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>assertType(env, new EPTypeClassParameterized(NavigableMap.class, new EPTypeClass[] { EPTypeClassParameterized.from(Collection.class, EventBean.class) }), "nmr");<NEW_LINE>TreeMap<Integer, List<SupportBean>> <MASK><NEW_LINE>// 1, 1, 4, 6, 6, 8, 9<NEW_LINE>prepareTestData(env, treemap);<NEW_LINE>env.milestone(0);<NEW_LINE>env.sendEventBean(new SupportBean_S0(-1));<NEW_LINE>env.assertEventNew("s0", event -> assertNavigableMap(treemap, (NavigableMap<Object, Collection<EventBean>>) event.get("nmr")));<NEW_LINE>env.undeployAll();<NEW_LINE>}
treemap = new TreeMap<>();
566,881
private static void parseRange(CharSequence seq, int lo, int p, int lim, int position, short operation, LongList out) throws SqlException {<NEW_LINE>char type = seq.charAt(lim - 1);<NEW_LINE>int period;<NEW_LINE>try {<NEW_LINE>period = Numbers.parseInt(seq, p + 1, lim - 1);<NEW_LINE>} catch (NumericException e) {<NEW_LINE>throw SqlException.$(position, "Range not a number");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>int index = out.size();<NEW_LINE>parseInterval(seq, lo, p, operation, out);<NEW_LINE>long low = getEncodedPeriodLo(out, index);<NEW_LINE>long hi = getEncodedPeriodHi(out, index);<NEW_LINE>hi = Timestamps.addPeriod(hi, type, period);<NEW_LINE>if (hi < low) {<NEW_LINE>throw SqlException.invalidDate(position);<NEW_LINE>}<NEW_LINE>replaceHiLoInterval(low, hi, operation, out);<NEW_LINE>return;<NEW_LINE>} catch (NumericException ignore) {<NEW_LINE>// try date instead<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>long loMillis = TimestampFormatUtils.<MASK><NEW_LINE>long hiMillis = Timestamps.addPeriod(loMillis, type, period);<NEW_LINE>if (hiMillis < loMillis) {<NEW_LINE>throw SqlException.invalidDate(position);<NEW_LINE>}<NEW_LINE>addHiLoInterval(loMillis, hiMillis, operation, out);<NEW_LINE>} catch (NumericException e) {<NEW_LINE>throw SqlException.invalidDate(position);<NEW_LINE>}<NEW_LINE>}
tryParse(seq, lo, p);
1,374,676
private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class);<NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, NativeType.SSHORT);<NEW_LINE>m.put(TypeAlias.u_int16_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.int32_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.u_int32_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.int64_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.intptr_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.uintptr_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.caddr_t, NativeType.ADDRESS);<NEW_LINE>m.put(TypeAlias.dev_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.blkcnt_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.blksize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.gid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_addr_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_port_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.ino_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.key_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.mode_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.nlink_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.id_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.pid_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.off_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.swblk_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.clock_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.size_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.ssize_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.time_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.fsblkcnt_t, NativeType.ULONGLONG);<NEW_LINE>m.put(<MASK><NEW_LINE>m.put(TypeAlias.sa_family_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.socklen_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.cc_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.speed_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.tcflag_t, NativeType.UINT);<NEW_LINE>return m;<NEW_LINE>}
TypeAlias.fsfilcnt_t, NativeType.ULONGLONG);
1,611,525
public boolean visit(J9ObjectPointer object, VoidPointer address) {<NEW_LINE>try {<NEW_LINE>GCHeapRegionDescriptor objectRegion = heapRegionManager.regionDescriptorForAddress(object);<NEW_LINE>MM_HeapRegionDescriptorVLHGCPointer vlhgcObjectRegion = MM_HeapRegionDescriptorVLHGCPointer.cast(objectRegion.getHeapRegionDescriptorPointer());<NEW_LINE>MM_AllocationContextTarokPointer objectAllocationContext = vlhgcObjectRegion._allocateData()._owningContext();<NEW_LINE>if (!objectAllocationContext.eq(allocationContext)) {<NEW_LINE>GCObjectIterator fieldIterator = GCObjectIterator.fromJ9Object(object, false);<NEW_LINE>while (fieldIterator.hasNext()) {<NEW_LINE><MASK><NEW_LINE>if (field.notNull()) {<NEW_LINE>checkField(object, field);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (J9ObjectHelper.getClassName(object).equals("java/lang/Class")) {<NEW_LINE>J9ClassPointer clazz = ConstantPoolHelpers.J9VM_J9CLASS_FROM_HEAPCLASS(object);<NEW_LINE>// Iterate the Object slots<NEW_LINE>GCClassIterator classIterator = GCClassIterator.fromJ9Class(clazz);<NEW_LINE>while (classIterator.hasNext()) {<NEW_LINE>J9ObjectPointer slot = classIterator.next();<NEW_LINE>if (slot.notNull()) {<NEW_LINE>checkField(object, slot);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Iterate the Class slots<NEW_LINE>GCClassIteratorClassSlots classSlotIterator = GCClassIteratorClassSlots.fromJ9Class(clazz);<NEW_LINE>while (classSlotIterator.hasNext()) {<NEW_LINE>J9ClassPointer slot = classSlotIterator.next();<NEW_LINE>J9ObjectPointer classObject = ConstantPoolHelpers.J9VM_J9CLASS_TO_HEAPCLASS(slot);<NEW_LINE>if (classObject.notNull()) {<NEW_LINE>checkField(object, classObject);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (CorruptDataException e) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
J9ObjectPointer field = fieldIterator.next();
568,609
protected void importForms(ConverterContext converterContext) {<NEW_LINE>Map<String, String> formMap = converterContext.getFormKeyToJsonStringMap();<NEW_LINE>Map<String, byte[]> thumbnailMap = converterContext.getModelKeyToThumbnailMap();<NEW_LINE>for (String formKey : formMap.keySet()) {<NEW_LINE>Model formModel = createModelObject(formMap.get(formKey), Model.MODEL_TYPE_FORM);<NEW_LINE>Model existingModel = converterContext.<MASK><NEW_LINE>Model updatedFormModel = null;<NEW_LINE>if (existingModel != null) {<NEW_LINE>byte[] imageBytes = null;<NEW_LINE>if (thumbnailMap.containsKey(formKey)) {<NEW_LINE>imageBytes = thumbnailMap.get(formKey);<NEW_LINE>}<NEW_LINE>updatedFormModel = modelService.saveModel(existingModel, formModel.getModelEditorJson(), imageBytes, true, "App definition import", SecurityUtils.getCurrentUserId());<NEW_LINE>} else {<NEW_LINE>formModel.setId(null);<NEW_LINE>updatedFormModel = modelService.createModel(formModel, SecurityUtils.getCurrentUserId());<NEW_LINE>if (thumbnailMap.containsKey(formKey)) {<NEW_LINE>updatedFormModel.setThumbnail(thumbnailMap.get(formKey));<NEW_LINE>modelRepository.save(updatedFormModel);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>converterContext.addFormModel(updatedFormModel, formModel.getId());<NEW_LINE>}<NEW_LINE>}
getFormModelByKey(formModel.getKey());
541,751
protected List findByUserId(String userId) throws SystemException {<NEW_LINE>Session session = null;<NEW_LINE>try {<NEW_LINE>session = openSession();<NEW_LINE>StringBuffer query = new StringBuffer();<NEW_LINE>query.append("FROM PasswordTracker IN CLASS com.liferay.portal.ejb.PasswordTrackerHBM WHERE ");<NEW_LINE>query.append("userId = ?");<NEW_LINE>query.append(" ");<NEW_LINE>query.append("ORDER BY ");<NEW_LINE>query.append<MASK><NEW_LINE>query.append("createDate DESC");<NEW_LINE>Query q = session.createQuery(query.toString());<NEW_LINE>int queryPos = 0;<NEW_LINE>q.setString(queryPos++, userId);<NEW_LINE>Iterator itr = q.list().iterator();<NEW_LINE>List list = new ArrayList();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>PasswordTrackerHBM passwordTrackerHBM = (PasswordTrackerHBM) itr.next();<NEW_LINE>list.add(PasswordTrackerHBMUtil.model(passwordTrackerHBM));<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>} catch (HibernateException he) {<NEW_LINE>throw new SystemException(he);<NEW_LINE>} finally {<NEW_LINE>HibernateUtil.closeSession(session);<NEW_LINE>}<NEW_LINE>}
("userId DESC").append(", ");
1,067,184
private void generateEJB21Xml() throws IOException {<NEW_LINE>org.netbeans.modules.j2ee.api.ejbjar.EjbJar ejbModule = org.netbeans.modules.j2ee.api.ejbjar.EjbJar.getEjbJar(pkg);<NEW_LINE>FileObject ddFO = ejbModule.getDeploymentDescriptor();<NEW_LINE>if (ddFO == null && ejbModule.getMetaInf() != null) {<NEW_LINE>// NOI18N<NEW_LINE>String resource = "org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-2.1.xml";<NEW_LINE>// NOI18N<NEW_LINE>ddFO = FileUtil.copyFile(FileUtil.getConfigFile(resource), ejbModule.getMetaInf(), "ejb-jar");<NEW_LINE>}<NEW_LINE>// EJB 2.1<NEW_LINE>org.netbeans.modules.j2ee.dd.api.ejb.EjbJar ejbJar = DDProvider.getDefault().getDDRoot(ddFO);<NEW_LINE>if (ejbJar == null) {<NEW_LINE>String fileName = ddFO == null ? null : FileUtil.getFileDisplayName(ddFO);<NEW_LINE>// NOI18N<NEW_LINE>Logger.getLogger(SessionGenerator.class.getName()).warning("EjbJar not found for " + fileName);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>EnterpriseBeans beans = ejbJar.getEnterpriseBeans();<NEW_LINE>Session session = null;<NEW_LINE>if (beans == null) {<NEW_LINE>beans = ejbJar.newEnterpriseBeans();<NEW_LINE>ejbJar.setEnterpriseBeans(beans);<NEW_LINE>}<NEW_LINE>session = beans.newSession();<NEW_LINE>session.setEjbName(ejbName);<NEW_LINE>session.setDisplayName(displayName);<NEW_LINE>session.setEjbClass(packageNameWithDot + ejbClassName);<NEW_LINE>if (hasRemote) {<NEW_LINE>session.setRemote(packageNameWithDot + remoteName);<NEW_LINE>session.setHome(packageNameWithDot + remoteHomeName);<NEW_LINE>}<NEW_LINE>if (hasLocal) {<NEW_LINE>session.setLocal(packageNameWithDot + localName);<NEW_LINE>session.setLocalHome(packageNameWithDot + localHomeName);<NEW_LINE>}<NEW_LINE>session.setSessionType(sessionType);<NEW_LINE>// NOI18N<NEW_LINE>session.setTransactionType("Container");<NEW_LINE>beans.addSession(session);<NEW_LINE>// add transaction requirements<NEW_LINE><MASK><NEW_LINE>if (assemblyDescriptor == null) {<NEW_LINE>assemblyDescriptor = ejbJar.newAssemblyDescriptor();<NEW_LINE>ejbJar.setAssemblyDescriptor(assemblyDescriptor);<NEW_LINE>}<NEW_LINE>ContainerTransaction containerTransaction = assemblyDescriptor.newContainerTransaction();<NEW_LINE>// NOI18N<NEW_LINE>containerTransaction.setTransAttribute("Required");<NEW_LINE>org.netbeans.modules.j2ee.dd.api.ejb.Method method = containerTransaction.newMethod();<NEW_LINE>method.setEjbName(ejbName);<NEW_LINE>// NOI18N<NEW_LINE>method.setMethodName("*");<NEW_LINE>containerTransaction.addMethod(method);<NEW_LINE>assemblyDescriptor.addContainerTransaction(containerTransaction);<NEW_LINE>ejbJar.write(ejbModule.getDeploymentDescriptor());<NEW_LINE>}
AssemblyDescriptor assemblyDescriptor = ejbJar.getSingleAssemblyDescriptor();
423,460
public void doCapture(String captureId, CaptureContext context, CapturePhase capPhase) {<NEW_LINE>if (captureId == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// step 1: see if it is a valid captureId<NEW_LINE>MonitorElement[] elems = mr.getElementByCapId(captureId);<NEW_LINE>for (MonitorElement elem : elems) {<NEW_LINE>// if the monitor element is not enabled, just skip it<NEW_LINE>if (elem.isEnabled() == false)<NEW_LINE>continue;<NEW_LINE>// step 2: get capture class<NEW_LINE><MASK><NEW_LINE>// step 3: check if there is one handler exists, if not new one<NEW_LINE>MonitorElemCapHandler caphandler = selectHandler(capClassName);<NEW_LINE>// step 4: invoke handler<NEW_LINE>if (caphandler != null) {<NEW_LINE>try {<NEW_LINE>invokeCaphandler(context, capPhase, elem, caphandler);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("captureHandler[" + capClassName + "] execution [" + capPhase + "] fails ", e);<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String capClassName = elem.getCapClass();
75,957
public void stateChanged(ChangeEvent e) {<NEW_LINE>if (progressSlider.getValueIsAdjusting() && gstPlayBin != null) {<NEW_LINE>long duration = <MASK><NEW_LINE>double relativePosition = progressSlider.getValue() * 1.0 / PROGRESS_SLIDER_SIZE;<NEW_LINE>long newStartTime = (long) (relativePosition * duration);<NEW_LINE>double playBackRate = getPlayBackRate();<NEW_LINE>// FLUSH - flushes the pipeline<NEW_LINE>gstPlayBin.// FLUSH - flushes the pipeline<NEW_LINE>seek(// FLUSH - flushes the pipeline<NEW_LINE>playBackRate, // FLUSH - flushes the pipeline<NEW_LINE>Format.TIME, // ACCURATE - video will seek exactly to the position requested<NEW_LINE>// Set the start position to newTime<NEW_LINE>EnumSet.of(SeekFlags.FLUSH, SeekFlags.ACCURATE), // Do nothing for the end position<NEW_LINE>SeekType.SET, // Do nothing for the end position<NEW_LINE>newStartTime, SeekType.NONE, -1);<NEW_LINE>// Keep constantly updating the time label so users have a sense of<NEW_LINE>// where the slider they are dragging is in relation to the video time<NEW_LINE>updateTimeLabel(newStartTime, duration);<NEW_LINE>}<NEW_LINE>}
gstPlayBin.queryDuration(TimeUnit.NANOSECONDS);
473,983
public static Bitmap generateDefaultCover(Context context, int width, int height) {<NEW_LINE>int size = Math.min(width, height);<NEW_LINE>int[] colors = ThemeHelper.getDefaultCoverColors(context);<NEW_LINE>int rgb_background = colors[0];<NEW_LINE>int rgb_note_inner = colors[1];<NEW_LINE>final int line_thickness = size / 10;<NEW_LINE>final int line_vertical = line_thickness * 5;<NEW_LINE>final int line_horizontal = line_thickness * 3;<NEW_LINE>final int circle_radius = line_thickness * 2;<NEW_LINE>// total length of x axis<NEW_LINE>final int total_len_x = circle_radius * 2 + line_horizontal - line_thickness;<NEW_LINE>// total length of y axis<NEW_LINE>final int total_len_y = circle_radius + line_vertical + (line_thickness / 2);<NEW_LINE>// 'center offset' of x<NEW_LINE>final int xoff = circle_radius + (size - total_len_x) / 2;<NEW_LINE>// 'center offset' of y<NEW_LINE>final int yoff = size - circle_radius - (size - total_len_y) / 2;<NEW_LINE>Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);<NEW_LINE>bitmap.eraseColor(rgb_background);<NEW_LINE>Paint paint = new Paint();<NEW_LINE>paint.setAntiAlias(true);<NEW_LINE>paint.setColor(rgb_note_inner);<NEW_LINE><MASK><NEW_LINE>// main circle<NEW_LINE>canvas.drawCircle(xoff, yoff, circle_radius, paint);<NEW_LINE>// vertical line<NEW_LINE>// lpos + thickness will touch the outer right edge of the circle<NEW_LINE>int lpos = xoff + circle_radius - line_thickness;<NEW_LINE>// tpos + vertical will be the center of the circle<NEW_LINE>int tpos = yoff - line_vertical;<NEW_LINE>canvas.drawRoundRect(new RectF(lpos, tpos, lpos + line_thickness, yoff), 0, 0, paint);<NEW_LINE>// horizontal line<NEW_LINE>// shift this up by half of the thickness to have the circle radius touch the top of the vertical line<NEW_LINE>int hdiff = tpos - (line_thickness / 2);<NEW_LINE>canvas.drawRoundRect(new RectF(lpos, hdiff, lpos + line_horizontal, hdiff + line_thickness), line_thickness, line_thickness, paint);<NEW_LINE>return bitmap;<NEW_LINE>}
Canvas canvas = new Canvas(bitmap);
1,543,882
public ModelAndView dicitemsave(HttpServletRequest request, @Valid SysDic dic, @Valid String p) {<NEW_LINE>List<SysDic> sysDicList = sysDicRes.findByDicidAndName(dic.getDicid(), dic.getName());<NEW_LINE>String msg = null;<NEW_LINE>String <MASK><NEW_LINE>if (sysDicList.size() == 0) {<NEW_LINE>dic.setHaschild(true);<NEW_LINE>dic.setOrgi(orgi);<NEW_LINE>dic.setCreater(super.getUser(request).getId());<NEW_LINE>dic.setCreatetime(new Date());<NEW_LINE>sysDicRes.save(dic);<NEW_LINE>reloadSysDicItem(dic, orgi);<NEW_LINE>} else {<NEW_LINE>msg = "exist";<NEW_LINE>}<NEW_LINE>return request(super.createView("redirect:/admin/sysdic/dicitem.html?id=" + dic.getParentid() + (msg != null ? "&p=" + p + "&msg=" + msg : "")));<NEW_LINE>}
orgi = super.getOrgi(request);
1,562,091
public void onSuccess(TSGeofence geofence) {<NEW_LINE>try {<NEW_LINE>WritableMap data = new WritableNativeMap();<NEW_LINE>data.putString("identifier", geofence.getIdentifier());<NEW_LINE>data.putDouble("latitude", geofence.getLatitude());<NEW_LINE>data.putDouble("longitude", geofence.getLongitude());<NEW_LINE>data.putDouble("radius", geofence.getRadius());<NEW_LINE>data.putBoolean(<MASK><NEW_LINE>data.putBoolean("notifyOnExit", geofence.getNotifyOnExit());<NEW_LINE>data.putBoolean("notifyOnDwell", geofence.getNotifyOnDwell());<NEW_LINE>data.putInt("loiteringDelay", geofence.getLoiteringDelay());<NEW_LINE>if (geofence.getExtras() != null) {<NEW_LINE>data.putMap("extras", jsonToMap(geofence.getExtras()));<NEW_LINE>}<NEW_LINE>success.invoke(data);<NEW_LINE>} catch (JSONException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>failure.invoke(e.getMessage());<NEW_LINE>}<NEW_LINE>}
"notifyOnEntry", geofence.getNotifyOnEntry());
1,539,867
private void printHistogram(Histogram histogram) {<NEW_LINE>printIfEnabled(MetricAttribute.COUNT, String.format(locale, " count = %d", histogram.getCount()));<NEW_LINE><MASK><NEW_LINE>printIfEnabled(MetricAttribute.MIN, String.format(locale, " min = %d", snapshot.getMin()));<NEW_LINE>printIfEnabled(MetricAttribute.MAX, String.format(locale, " max = %d", snapshot.getMax()));<NEW_LINE>printIfEnabled(MetricAttribute.MEAN, String.format(locale, " mean = %2.2f", snapshot.getMean()));<NEW_LINE>printIfEnabled(MetricAttribute.STDDEV, String.format(locale, " stddev = %2.2f", snapshot.getStdDev()));<NEW_LINE>printIfEnabled(MetricAttribute.P50, String.format(locale, " median = %2.2f", snapshot.getMedian()));<NEW_LINE>printIfEnabled(MetricAttribute.P75, String.format(locale, " 75%% <= %2.2f", snapshot.get75thPercentile()));<NEW_LINE>printIfEnabled(MetricAttribute.P95, String.format(locale, " 95%% <= %2.2f", snapshot.get95thPercentile()));<NEW_LINE>printIfEnabled(MetricAttribute.P98, String.format(locale, " 98%% <= %2.2f", snapshot.get98thPercentile()));<NEW_LINE>printIfEnabled(MetricAttribute.P99, String.format(locale, " 99%% <= %2.2f", snapshot.get99thPercentile()));<NEW_LINE>printIfEnabled(MetricAttribute.P999, String.format(locale, " 99.9%% <= %2.2f", snapshot.get999thPercentile()));<NEW_LINE>}
Snapshot snapshot = histogram.getSnapshot();
1,216,936
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall<MASK><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, "finspace");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(untagResourceRequest));
1,208,143
private void createMoveOnEventGrouping(String enable_section_label, String move_when_done_setting, String move_path_setting, String move_torrent_setting, String move_torrent_dir_setting, String move_when_in_save_dir_setting, String move_partial_downloads_setting) {<NEW_LINE>BooleanParameterImpl moveCompleted = new BooleanParameterImpl(move_when_done_setting, enable_section_label);<NEW_LINE>add(moveCompleted);<NEW_LINE>List<Parameter> listGroup = new ArrayList<>();<NEW_LINE>// move folder<NEW_LINE>DirectoryParameterImpl movePath = new DirectoryParameterImpl(move_path_setting, "ConfigView.label.directory");<NEW_LINE>add(movePath, listGroup);<NEW_LINE>movePath.setDialogTitleKey("ConfigView.dialog.choosemovepath");<NEW_LINE>// move torrent when done<NEW_LINE>BooleanParameterImpl moveTorrent = new BooleanParameterImpl(move_torrent_setting, "ConfigView.label.movetorrent");<NEW_LINE>add(moveTorrent, listGroup);<NEW_LINE>// move torrent folder<NEW_LINE>DirectoryParameterImpl moveTorrentPath = new DirectoryParameterImpl(move_torrent_dir_setting, "ConfigView.label.directory.if.different");<NEW_LINE>add(moveTorrentPath, listGroup);<NEW_LINE>moveTorrentPath.setIndent(1, true);<NEW_LINE>moveTorrentPath.setDialogTitleKey("ConfigView.dialog.choosemovepath");<NEW_LINE>moveTorrent.addEnabledOnSelection(moveTorrentPath);<NEW_LINE>// only in default<NEW_LINE>BooleanParameterImpl moveOnly = new BooleanParameterImpl(move_when_in_save_dir_setting, "ConfigView.label.moveonlyusingdefaultsave");<NEW_LINE>add(moveOnly, listGroup);<NEW_LINE>// move if partially finished.<NEW_LINE>if (move_partial_downloads_setting != null) {<NEW_LINE>BooleanParameterImpl movePartial = new BooleanParameterImpl(move_partial_downloads_setting, "ConfigView.label.movepartialdownloads");<NEW_LINE>add(movePartial, listGroup);<NEW_LINE>}<NEW_LINE>ParameterGroupImpl pgMoveComplete = new ParameterGroupImpl(null, listGroup);<NEW_LINE>add("pg" + enable_section_label, pgMoveComplete);<NEW_LINE><MASK><NEW_LINE>moveCompleted.addEnabledOnSelection(pgMoveComplete);<NEW_LINE>}
pgMoveComplete.setIndent(1, false);
122,142
public void analyze(Analyzer analyzer) throws UserException {<NEW_LINE>super.analyze(analyzer);<NEW_LINE>// analyze where clause<NEW_LINE>boolean isValid;<NEW_LINE>if (whereClause instanceof CompoundPredicate) {<NEW_LINE>CompoundPredicate cp = (CompoundPredicate) whereClause;<NEW_LINE>if (cp.getOp() != org.apache.doris.analysis.CompoundPredicate.Operator.AND) {<NEW_LINE>throw new AnalysisException("Only allow compound predicate with operator AND");<NEW_LINE>}<NEW_LINE>isValid = isWhereClauseValid(cp.getChild(0)) && isWhereClauseValid(cp.getChild(1));<NEW_LINE>} else {<NEW_LINE>isValid = isWhereClauseValid(whereClause);<NEW_LINE>}<NEW_LINE>if (!isValid) {<NEW_LINE>throw new AnalysisException("Where clause should looks like: NAME = \"your_resource_name\"," + " or NAME LIKE \"matcher\", " + " or RESOURCETYPE = \"resource_type\", " + " or compound predicate with operator AND");<NEW_LINE>}<NEW_LINE>// order by<NEW_LINE>if (orderByElements != null && !orderByElements.isEmpty()) {<NEW_LINE>orderByPairs = new ArrayList<OrderByPair>();<NEW_LINE>for (OrderByElement orderByElement : orderByElements) {<NEW_LINE>if (!(orderByElement.getExpr() instanceof SlotRef)) {<NEW_LINE>throw new AnalysisException("Should order by column");<NEW_LINE>}<NEW_LINE>SlotRef slotRef = (SlotRef) orderByElement.getExpr();<NEW_LINE>int index = ResourceMgr.analyzeColumn(slotRef.getColumnName());<NEW_LINE>OrderByPair orderByPair = new OrderByPair(index<MASK><NEW_LINE>orderByPairs.add(orderByPair);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, !orderByElement.getIsAsc());
590,017
public static SelectInContext createContext(AnActionEvent event) {<NEW_LINE>DataContext dataContext = event.getDataContext();<NEW_LINE>SelectInContext result = createEditorContext(dataContext);<NEW_LINE>if (result != null) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>JComponent sourceComponent = getEventComponent(event);<NEW_LINE>if (sourceComponent == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SelectInContext selectInContext = dataContext.getData(SelectInContext.DATA_KEY);<NEW_LINE>if (selectInContext == null) {<NEW_LINE>selectInContext = createPsiContext(event);<NEW_LINE>}<NEW_LINE>if (selectInContext == null) {<NEW_LINE>Navigatable descriptor = dataContext.getData(PlatformDataKeys.NAVIGATABLE);<NEW_LINE>if (descriptor instanceof OpenFileDescriptor) {<NEW_LINE>final VirtualFile file = ((OpenFileDescriptor) descriptor).getFile();<NEW_LINE>if (file.isValid()) {<NEW_LINE>Project project = dataContext.getData(CommonDataKeys.PROJECT);<NEW_LINE>selectInContext = <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (selectInContext == null) {<NEW_LINE>VirtualFile virtualFile = dataContext.getData(PlatformDataKeys.VIRTUAL_FILE);<NEW_LINE>Project project = dataContext.getData(CommonDataKeys.PROJECT);<NEW_LINE>if (virtualFile != null && project != null) {<NEW_LINE>return new VirtualFileSelectInContext(project, virtualFile);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return selectInContext;<NEW_LINE>}
OpenFileDescriptorContext.create(project, file);
1,603,263
public void execute() throws CheckedAnalysisException, IOException, InterruptedException {<NEW_LINE>File dir = new File(rootSourceDirectory);<NEW_LINE>if (!dir.isDirectory()) {<NEW_LINE>throw new IOException("Path " + rootSourceDirectory + " is not a directory");<NEW_LINE>}<NEW_LINE>// Find all directories underneath the root source directory<NEW_LINE>progress.startRecursiveDirectorySearch();<NEW_LINE>RecursiveFileSearch rfs = new RecursiveFileSearch(rootSourceDirectory, pathname -> pathname.isDirectory());<NEW_LINE>rfs.search();<NEW_LINE>progress.doneRecursiveDirectorySearch();<NEW_LINE>List<String> candidateSourceDirList = rfs.getDirectoriesScanned();<NEW_LINE>// Build the classpath<NEW_LINE>IClassFactory factory = ClassFactory.instance();<NEW_LINE>IClassPathBuilder <MASK><NEW_LINE>try (IClassPath classPath = buildClassPath(builder, factory)) {<NEW_LINE>// From the application classes, find the full list of<NEW_LINE>// fully-qualified source file names.<NEW_LINE>List<String> fullyQualifiedSourceFileNameList = findFullyQualifiedSourceFileNames(builder, classPath);<NEW_LINE>// Attempt to find source directories for all source files,<NEW_LINE>// and add them to the discoveredSourceDirectoryList<NEW_LINE>if (DEBUG) {<NEW_LINE>System.out.println("looking for " + fullyQualifiedSourceFileNameList.size() + " files");<NEW_LINE>}<NEW_LINE>findSourceDirectoriesForAllSourceFiles(fullyQualifiedSourceFileNameList, candidateSourceDirList);<NEW_LINE>}<NEW_LINE>}
builder = factory.createClassPathBuilder(errorLogger);
1,148,691
public NodeValue exec(NodeValue v1, NodeValue v2, NodeValue v3, NodeValue v4, NodeValue v5) {<NEW_LINE>try {<NEW_LINE>if (!v1.isNumber()) {<NEW_LINE>throw new ExprEvalException("Not a Number: " + FmtUtils.stringForNode(v1.asNode()));<NEW_LINE>}<NEW_LINE>if (!v2.isNumber()) {<NEW_LINE>throw new ExprEvalException("Not a Number: " + FmtUtils.stringForNode(v2.asNode()));<NEW_LINE>}<NEW_LINE>if (!v3.isNumber()) {<NEW_LINE>throw new ExprEvalException("Not a Number: " + FmtUtils.stringForNode(v3.asNode()));<NEW_LINE>}<NEW_LINE>if (!v4.isNumber()) {<NEW_LINE>throw new ExprEvalException("Not a Number: " + FmtUtils.stringForNode(v4.asNode()));<NEW_LINE>}<NEW_LINE>if (!(v5.isIRI() || v5.isString())) {<NEW_LINE>throw new ExprEvalException("Not an IRI or String: " + FmtUtils.stringForNode(v5.asNode()));<NEW_LINE>}<NEW_LINE>double lat1 = v1.getDouble();<NEW_LINE>double lon1 = v2.getDouble();<NEW_LINE>double lat2 = v3.getDouble();<NEW_LINE>double lon2 = v4.getDouble();<NEW_LINE>String unitsURI;<NEW_LINE>if (v5.isIRI()) {<NEW_LINE>unitsURI = v5<MASK><NEW_LINE>} else {<NEW_LINE>unitsURI = v5.asString();<NEW_LINE>}<NEW_LINE>double distanceMetres = GreatCircleDistance.haversineFormula(lat1, lon1, lat2, lon2);<NEW_LINE>// Convert the Great Circle distance from metres into the requested units.<NEW_LINE>if (!UnitsRegistry.isLinearUnits(unitsURI)) {<NEW_LINE>throw new ExprEvalException("Great Circle distance units are metres and only linear conversion supported.");<NEW_LINE>}<NEW_LINE>double distance = UnitsOfMeasure.conversion(distanceMetres, Unit_URI.METRE_URL, unitsURI);<NEW_LINE>return NodeValue.makeDouble(distance);<NEW_LINE>} catch (DatatypeFormatException | UnitsConversionException ex) {<NEW_LINE>throw new ExprEvalException(ex.getMessage(), ex);<NEW_LINE>}<NEW_LINE>}
.asNode().getURI();
1,152,844
public void run() {<NEW_LINE>try {<NEW_LINE>ZipInputStream zipIn = new ZipInputStream(new FileInputStream(this.archive));<NEW_LINE>ZipEntry entry;<NEW_LINE>while (null != (entry = zipIn.getNextEntry())) {<NEW_LINE>ZipEntry finalEntry = entry;<NEW_LINE>handler.post(() -> dialog.setMessage(getString(R.string.unzip_item, finalEntry.getName())));<NEW_LINE>if (finalEntry.isDirectory()) {<NEW_LINE>if (!new File(outputDir, finalEntry.getName()).mkdirs())<NEW_LINE>throw new RuntimeException(getString(R.string.mkdir_failed, finalEntry.getName()));<NEW_LINE>} else {<NEW_LINE>FileOutputStream fileOut = new FileOutputStream(new File(outputDir<MASK><NEW_LINE>byte[] buffer = new byte[8192];<NEW_LINE>int len;<NEW_LINE>while ((len = zipIn.read(buffer)) != -1) fileOut.write(buffer, 0, len);<NEW_LINE>fileOut.close();<NEW_LINE>zipIn.closeEntry();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>zipIn.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>dialog.dismiss();<NEW_LINE>this.archive.delete();<NEW_LINE>}<NEW_LINE>}
, finalEntry.getName()));
728,883
public Object run() {<NEW_LINE>Class<?> injectedSecurityFrameClass;<NEW_LINE>VMLangAccess vma = Lookup.getVMLangAccess();<NEW_LINE>ClassLoader <MASK><NEW_LINE>injectedSecurityFrameClass = probeLoaderToSecurityFrameMap(rawLoader);<NEW_LINE>if (injectedSecurityFrameClass == null) {<NEW_LINE>synchronized (loaderLock) {<NEW_LINE>injectedSecurityFrameClass = probeLoaderToSecurityFrameMap(rawLoader);<NEW_LINE>if (injectedSecurityFrameClass == null) {<NEW_LINE>injectedSecurityFrameClass = injectSecurityFrameIntoLoader(rawLoader, context.getProtectionDomain());<NEW_LINE>LoaderToSecurityFrameClassMap.put(rawLoader, new WeakReference<Class<?>>(injectedSecurityFrameClass));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Constructor<?> constructor = injectedSecurityFrameClass.getConstructor(MethodHandle.class, Class.class);<NEW_LINE>constructor.setAccessible(true);<NEW_LINE>return constructor.newInstance(tempFinalHandle, context);<NEW_LINE>} catch (SecurityException | ReflectiveOperationException e) {<NEW_LINE>throw new Error(e);<NEW_LINE>}<NEW_LINE>}
rawLoader = vma.getClassloader(context);
459,928
public void run(FlowTrigger trigger, Map data) {<NEW_LINE>final VmInstanceSpec spec = (VmInstanceSpec) data.get(VmInstanceConstant.Params.VmInstanceSpec.toString());<NEW_LINE>if (spec.getVmInventory().getRootVolumeUuid() == null) {<NEW_LINE>// the vm is in an intermediate state that has no root volume<NEW_LINE>trigger.next();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// http://dev.zstack.io/browse/ZSTAC-2640 if root volume deleted skip<NEW_LINE>if (!Q.New(VolumeVO.class).eq(VolumeVO_.uuid, spec.getVmInventory().getRootVolumeUuid()).isExists()) {<NEW_LINE>trigger.next();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>new VmExpungeRootVolumeValidator().validate(spec.getVmInventory().getUuid(), spec.<MASK><NEW_LINE>ExpungeVolumeMsg msg = new ExpungeVolumeMsg();<NEW_LINE>msg.setVolumeUuid(spec.getVmInventory().getRootVolumeUuid());<NEW_LINE>bus.makeTargetServiceIdByResourceUuid(msg, VolumeConstant.SERVICE_ID, msg.getVolumeUuid());<NEW_LINE>bus.send(msg, new CloudBusCallBack(trigger) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(MessageReply reply) {<NEW_LINE>if (!reply.isSuccess()) {<NEW_LINE>logger.warn(String.format("failed to expunge the root volume[uuid:%s] of the vm[uuid:%s, name:%s], %s", spec.getVmInventory().getRootVolumeUuid(), spec.getVmInventory().getUuid(), spec.getVmInventory().getName(), reply.getError()));<NEW_LINE>trigger.fail(reply.getError());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>trigger.next();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getVmInventory().getRootVolumeUuid());
1,328,409
protected void scanJVMTIObjectTagTables() throws CorruptDataException {<NEW_LINE>if (!J9BuildFlags.opt_jvmti)<NEW_LINE>return;<NEW_LINE>setReachability(Reachability.WEAK);<NEW_LINE>J9JVMTIDataPointer jvmtiData = J9JVMTIDataPointer.cast(_vm.jvmtiData());<NEW_LINE>if (jvmtiData.notNull()) {<NEW_LINE>GCJVMTIObjectTagTableListIterator objectTagTableList = GCJVMTIObjectTagTableListIterator.fromJ9JVMTIData(jvmtiData);<NEW_LINE>while (objectTagTableList.hasNext()) {<NEW_LINE>J9JVMTIEnvPointer list = objectTagTableList.next();<NEW_LINE>GCJVMTIObjectTagTableIterator objectTagTableIterator = GCJVMTIObjectTagTableIterator.fromJ9JVMTIEnv(list);<NEW_LINE>GCJVMTIObjectTagTableIterator <MASK><NEW_LINE>while (objectTagTableIterator.hasNext()) {<NEW_LINE>doJVMTIObjectTagSlot(objectTagTableIterator.next(), addressIterator.nextAddress());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addressIterator = GCJVMTIObjectTagTableIterator.fromJ9JVMTIEnv(list);
452,588
protected WebRtcServiceState handleLocalRinging(@NonNull WebRtcServiceState currentState, @NonNull RemotePeer remotePeer) {<NEW_LINE>Log.i(TAG, "handleLocalRinging(): call_id: " + remotePeer.getCallId());<NEW_LINE>RemotePeer activePeer = currentState.getCallInfoState().requireActivePeer();<NEW_LINE>Recipient recipient = remotePeer.getRecipient();<NEW_LINE>activePeer.localRinging();<NEW_LINE>webRtcInteractor.updatePhoneState(LockManager.PhoneState.INTERACTIVE);<NEW_LINE>boolean shouldDisturbUserWithCall = DoNotDisturbUtil.shouldDisturbUserWithCall(context.getApplicationContext(), recipient);<NEW_LINE>if (shouldDisturbUserWithCall) {<NEW_LINE>boolean started = webRtcInteractor.startWebRtcCallActivityIfPossible();<NEW_LINE>if (!started) {<NEW_LINE>Log.i(TAG, "Unable to start call activity due to OS version or not being in the foreground");<NEW_LINE>ApplicationDependencies.getAppForegroundObserver().addListener(webRtcInteractor.getForegroundListener());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (shouldDisturbUserWithCall && SignalStore.settings().isCallNotificationsEnabled()) {<NEW_LINE>Uri ringtone = recipient.resolve().getCallRingtone();<NEW_LINE>RecipientDatabase.VibrateState vibrateState = recipient.resolve().getCallVibrate();<NEW_LINE>if (ringtone == null) {<NEW_LINE>ringtone = SignalStore.settings().getCallRingtone();<NEW_LINE>}<NEW_LINE>webRtcInteractor.startIncomingRinger(ringtone, vibrateState == RecipientDatabase.VibrateState.ENABLED || (vibrateState == RecipientDatabase.VibrateState.DEFAULT && SignalStore.settings().isCallVibrateEnabled()));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>webRtcInteractor.registerPowerButtonReceiver();<NEW_LINE>return currentState.builder().changeCallInfoState().callState(WebRtcViewModel.State.CALL_INCOMING).build();<NEW_LINE>}
webRtcInteractor.setCallInProgressNotification(TYPE_INCOMING_RINGING, activePeer);
859,764
public final void printGraph(final PrintStream graphWriter, final boolean writeHeader, final int pruneFactor) {<NEW_LINE>if (writeHeader) {<NEW_LINE>graphWriter.println("digraph assemblyGraphs {");<NEW_LINE>}<NEW_LINE>for (final E edge : edgeSet()) {<NEW_LINE>final String edgeString = String.format("\t%s -> %s ", getEdgeSource(edge).toString(), getEdgeTarget(edge).toString());<NEW_LINE>final String edgeLabelString;<NEW_LINE>if (edge.getMultiplicity() > 0 && edge.getMultiplicity() < pruneFactor) {<NEW_LINE>edgeLabelString = String.format("[style=dotted,color=grey,label=\"%s\"];", edge.getDotLabel());<NEW_LINE>} else {<NEW_LINE>edgeLabelString = String.format(<MASK><NEW_LINE>}<NEW_LINE>graphWriter.print(edgeString);<NEW_LINE>graphWriter.print(edgeLabelString);<NEW_LINE>if (edge.isRef()) {<NEW_LINE>graphWriter.println(edgeString + " [color=red];");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (final V v : vertexSet()) {<NEW_LINE>graphWriter.println(String.format("\t%s [label=\"%s\",shape=box]", v.toString(), new String(getAdditionalSequence(v)) + v.getAdditionalInfo()));<NEW_LINE>}<NEW_LINE>getExtraGraphFileLines().forEach(graphWriter::println);<NEW_LINE>if (writeHeader) {<NEW_LINE>graphWriter.println("}");<NEW_LINE>}<NEW_LINE>}
"[label=\"%s\"];", edge.getDotLabel());
472,591
protected void buildHosts(String hosts, String portAsString, List<Host> hostsList) {<NEW_LINE>String[] hostVals = hosts.split(",");<NEW_LINE>List<OracleNoSQLHost> oracleNoSqlHosts = new CopyOnWriteArrayList<OracleNoSQLHost>();<NEW_LINE>for (int x = 0; x < hostVals.length; x++) {<NEW_LINE>String host = hostVals[x].trim();<NEW_LINE>portAsString = portAsString.trim();<NEW_LINE>onValidation(host, portAsString);<NEW_LINE>int port = Integer.parseInt(portAsString);<NEW_LINE>OracleNoSQLHost oracleNoSQLHost = port == OracleNoSQLHost.DEFAULT_PORT ? new OracleNoSQLHost(host) <MASK><NEW_LINE>setConfig(oracleNoSQLHost, persistenceUnitMetadata.getProperties(), externalProperties);<NEW_LINE>oracleNoSqlHosts.add(oracleNoSQLHost);<NEW_LINE>hostsList.add(oracleNoSQLHost);<NEW_LINE>}<NEW_LINE>}
: new OracleNoSQLHost(host, port);
1,039,091
private static Object executeQuery(ObjectTemplate template, Object holder, Object[] arguments) {<NEW_LINE>Object key = arguments[3];<NEW_LINE>JSDynamicObject proxy = (JSDynamicObject) holder;<NEW_LINE>PropertyHandler indexedHandler = template.getIndexedPropertyHandler();<NEW_LINE>if (JSRuntime.isArrayIndex(key)) {<NEW_LINE>if (indexedHandler != null) {<NEW_LINE>Object[] nativeCallArgs = JSArguments.create(proxy, arguments[1], arguments[2], arguments[3]);<NEW_LINE>if (indexedHandler.getQuery() != 0) {<NEW_LINE>return (NativeAccess.executePropertyHandlerQuery(indexedHandler.getQuery(), holder, nativeCallArgs, indexedHandler.getData(), false) != null);<NEW_LINE>} else if (indexedHandler.getDescriptor() != 0) {<NEW_LINE>Object result = NativeAccess.executePropertyHandlerDescriptor(indexedHandler.getDescriptor(), holder, nativeCallArgs, indexedHandler.getData(), false);<NEW_LINE>if (result != null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (!template.getStringKeysOnly() || key instanceof TruffleString) {<NEW_LINE>PropertyHandler namedHandler = template.getNamedPropertyHandler();<NEW_LINE>if (namedHandler != null) {<NEW_LINE>Object[] nativeCallArgs = JSArguments.create(proxy, arguments[1], arguments[2], arguments[3]);<NEW_LINE>if (namedHandler.getQuery() != 0) {<NEW_LINE>return (NativeAccess.executePropertyHandlerQuery(namedHandler.getQuery(), holder, nativeCallArgs, namedHandler.getData(), true) != null);<NEW_LINE>} else if (namedHandler.getDescriptor() != 0) {<NEW_LINE>Object result = NativeAccess.executePropertyHandlerDescriptor(namedHandler.getDescriptor(), holder, nativeCallArgs, namedHandler.getData(), true);<NEW_LINE>if (result != null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>JSDynamicObject target <MASK><NEW_LINE>return JSObject.hasProperty(target, key);<NEW_LINE>}
= (JSDynamicObject) arguments[2];
569,109
private static String inferFindBugsHome() {<NEW_LINE>Pattern[] findbugsJarNames = { Pattern.compile("findbugs\\.jar$") };<NEW_LINE>for (Pattern jarNamePattern : findbugsJarNames) {<NEW_LINE>String findbugsJarCodeBase = ClassPathUtil.findCodeBaseInClassPath(jarNamePattern, SystemProperties.getProperty("java.class.path"));<NEW_LINE>if (findbugsJarCodeBase != null) {<NEW_LINE>File findbugsJar = new File(findbugsJarCodeBase);<NEW_LINE>File libDir = findbugsJar.getParentFile();<NEW_LINE>if ("lib".equals(libDir.getName())) {<NEW_LINE><MASK><NEW_LINE>FindBugs.setHome(fbHome);<NEW_LINE>return fbHome;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String classFilePath = FindBugs.class.getName().replaceAll("\\.", "/") + ".class";<NEW_LINE>URL resource = FindBugs.class.getClassLoader().getResource(classFilePath);<NEW_LINE>if (resource != null && "file".equals(resource.getProtocol())) {<NEW_LINE>try {<NEW_LINE>String classfile = URLDecoder.decode(resource.getPath(), Charset.defaultCharset().name());<NEW_LINE>Matcher m = Pattern.compile("(.*)/.*?/edu/umd.*").matcher(classfile);<NEW_LINE>if (m.matches()) {<NEW_LINE>String home = m.group(1);<NEW_LINE>if (new File(home + "/etc/findbugs.xml").exists()) {<NEW_LINE>FindBugs.setHome(home);<NEW_LINE>return home;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (UnsupportedEncodingException e) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
String fbHome = libDir.getParent();
1,123,540
private AuthnRequest createAuthnRequest(Saml2AuthenticationRequestContext context) {<NEW_LINE>String issuer = context.getIssuer();<NEW_LINE>String destination = context.getDestination();<NEW_LINE>String assertionConsumerServiceUrl = context.getAssertionConsumerServiceUrl();<NEW_LINE>Saml2MessageBinding protocolBinding = this.protocolBindingResolver.convert(context);<NEW_LINE>AuthnRequest auth = this.authnRequestBuilder.buildObject();<NEW_LINE>if (auth.getID() == null) {<NEW_LINE>auth.setID("ARQ" + UUID.randomUUID().toString().substring(1));<NEW_LINE>}<NEW_LINE>if (auth.getIssueInstant() == null) {<NEW_LINE>auth.setIssueInstant(new DateTime(this.clock.millis()));<NEW_LINE>}<NEW_LINE>if (auth.isForceAuthn() == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (auth.isPassive() == null) {<NEW_LINE>auth.setIsPassive(Boolean.FALSE);<NEW_LINE>}<NEW_LINE>if (auth.getProtocolBinding() == null) {<NEW_LINE>auth.setProtocolBinding(protocolBinding.getUrn());<NEW_LINE>}<NEW_LINE>Issuer iss = this.issuerBuilder.buildObject();<NEW_LINE>iss.setValue(issuer);<NEW_LINE>auth.setIssuer(iss);<NEW_LINE>auth.setDestination(destination);<NEW_LINE>auth.setAssertionConsumerServiceURL(assertionConsumerServiceUrl);<NEW_LINE>return auth;<NEW_LINE>}
auth.setForceAuthn(Boolean.FALSE);
1,421,144
final DisableAlarmActionsResult executeDisableAlarmActions(DisableAlarmActionsRequest disableAlarmActionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disableAlarmActionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DisableAlarmActionsRequest> request = null;<NEW_LINE>Response<DisableAlarmActionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DisableAlarmActionsRequestMarshaller().marshall(super.beforeMarshalling(disableAlarmActionsRequest));<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, "CloudWatch");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisableAlarmActions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DisableAlarmActionsResult> responseHandler = new StaxResponseHandler<<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
DisableAlarmActionsResult>(new DisableAlarmActionsResultStaxUnmarshaller());
595,645
public OpenIdIdpConfig requestOpenIdIdpConfig(Integer idpId, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'idpId' is set<NEW_LINE>if (idpId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'idpId' when calling requestOpenIdIdpConfig");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/system/config/auth/openid/idps/{idp_id}".replaceAll("\\{" + "idp_id" + "\\}", apiClient.escapeString(idpId.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>if (xSdsAuthToken != null)<NEW_LINE>localVarHeaderParams.put("X-Sds-Auth-Token", apiClient.parameterToString(xSdsAuthToken));<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String <MASK><NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<OpenIdIdpConfig> localVarReturnType = new GenericType<OpenIdIdpConfig>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
937,321
// TODO: copied from org.netbeans.editor.ActionFactory:<NEW_LINE>static void reformat(Reformat formatter, Document doc, int startPos, int endPos, AtomicBoolean canceled) throws BadLocationException {<NEW_LINE>final GuardedDocument gdoc = (doc instanceof GuardedDocument) ? (GuardedDocument) doc : null;<NEW_LINE>int pos = startPos;<NEW_LINE>if (gdoc != null) {<NEW_LINE>pos = gdoc.<MASK><NEW_LINE>}<NEW_LINE>LinkedList<PositionRegion> regions = new LinkedList<PositionRegion>();<NEW_LINE>while (pos < endPos) {<NEW_LINE>int stopPos = endPos;<NEW_LINE>if (gdoc != null) {<NEW_LINE>// adjust to start of the next guarded block<NEW_LINE>stopPos = gdoc.getGuardedBlockChain().adjustToNextBlockStart(pos);<NEW_LINE>if (stopPos == -1 || stopPos > endPos) {<NEW_LINE>stopPos = endPos;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (pos < stopPos) {<NEW_LINE>regions.addFirst(new PositionRegion(doc, pos, stopPos));<NEW_LINE>pos = stopPos;<NEW_LINE>} else {<NEW_LINE>// ensure to make progress<NEW_LINE>pos++;<NEW_LINE>}<NEW_LINE>if (gdoc != null) {<NEW_LINE>// adjust to end of current block<NEW_LINE>pos = gdoc.getGuardedBlockChain().adjustToBlockEnd(pos);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (canceled.get())<NEW_LINE>return;<NEW_LINE>// Once we start formatting, the task can't be canceled<NEW_LINE>for (PositionRegion region : regions) {<NEW_LINE>formatter.reformat(region.getStartOffset(), region.getEndOffset());<NEW_LINE>}<NEW_LINE>}
getGuardedBlockChain().adjustToBlockEnd(pos);
482,961
private String parseTextMessage(StreamDefinition streamDefinition, String template) {<NEW_LINE>// note: currently we do not support arbitrary data to be mapped with dynamic options<NEW_LINE>List<String> attributes = Arrays.asList(streamDefinition.getAttributeNameArray());<NEW_LINE>StringBuffer result = new StringBuffer();<NEW_LINE>Matcher m = DYNAMIC_PATTERN.matcher(template);<NEW_LINE>while (m.find()) {<NEW_LINE>if (m.group(1) != null) {<NEW_LINE>int attrIndex = attributes.indexOf(m.group(1).replaceAll("\\p{Ps}", "")<MASK><NEW_LINE>if (attrIndex >= 0) {<NEW_LINE>m.appendReplacement(result, String.format("{.{%s}.}", attrIndex));<NEW_LINE>} else {<NEW_LINE>throw new NoSuchAttributeException(String.format("Attribute : %s does not exist in %s.", m.group(1), streamDefinition));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>m.appendReplacement(result, m.group() + "");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>m.appendTail(result);<NEW_LINE>return result.toString();<NEW_LINE>}
.replaceAll("\\p{Pe}", ""));
1,047,267
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {<NEW_LINE>PsiElement element = descriptor.getPsiElement();<NEW_LINE>ErlangRecordExpression recordExpression = PsiTreeUtil.getParentOfType(element, ErlangRecordExpression.class);<NEW_LINE>if (recordExpression != null) {<NEW_LINE>PsiReference reference = recordExpression.getReferenceInternal();<NEW_LINE>PsiElement resolve = reference != null ? reference.resolve() : null;<NEW_LINE>if (resolve != null) {<NEW_LINE>ErlangTypedRecordFields fields = ((ErlangRecordDefinition) resolve).getTypedRecordFields();<NEW_LINE>if (fields != null) {<NEW_LINE>String replace = fields.getText().replaceFirst("\\{", "").replace("}", "");<NEW_LINE>boolean empty = StringUtil.isEmptyOrSpaces(replace);<NEW_LINE>String newFields = replace + (empty ? "" : " ,") + element.getText();<NEW_LINE>PsiElement recordFieldsFromText = <MASK><NEW_LINE>fields.replace(recordFieldsFromText);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ErlangElementFactory.createRecordFieldsFromText(project, newFields);
1,612,591
private void init() {<NEW_LINE>initFile(PhpUnitPreferences.isBootstrapEnabled(phpModule), PhpUnitPreferences.getBootstrapPath(phpModule), bootstrapCheckBox, bootstrapTextField);<NEW_LINE>bootstrapForCreateTestsCheckBox.setSelected(PhpUnitPreferences.isBootstrapForCreateTests(phpModule));<NEW_LINE>initFile(PhpUnitPreferences.isConfigurationEnabled(phpModule), PhpUnitPreferences.getConfigurationPath(phpModule), configurationCheckBox, configurationTextField);<NEW_LINE>initFile(PhpUnitPreferences.isCustomSuiteEnabled(phpModule), PhpUnitPreferences.getCustomSuitePath(phpModule), suiteCheckBox, suiteTextField);<NEW_LINE>initFile(PhpUnitPreferences.isPhpUnitEnabled(phpModule), PhpUnitPreferences.getPhpUnitPath(phpModule), scriptCheckBox, scriptTextField);<NEW_LINE>runPhpUnitOnlyCheckBox.setSelected(PhpUnitPreferences.getRunPhpUnitOnly(phpModule));<NEW_LINE>runTestUsingUnitCheckBox.setSelected<MASK><NEW_LINE>askForTestGroupsCheckBox.setSelected(PhpUnitPreferences.getAskForTestGroups(phpModule));<NEW_LINE>enableFile(bootstrapCheckBox.isSelected(), bootstrapLabel, bootstrapTextField, bootstrapGenerateButton, bootstrapBrowseButton, bootstrapForCreateTestsCheckBox);<NEW_LINE>enableFile(configurationCheckBox.isSelected(), configurationLabel, configurationTextField, configurationGenerateButton, configurationBrowseButton);<NEW_LINE>enableFile(suiteCheckBox.isSelected(), suiteLabel, suiteTextField, suiteBrowseButton, suiteInfoLabel);<NEW_LINE>enableFile(scriptCheckBox.isSelected(), scriptLabel, scriptTextField, scriptBrowseButton);<NEW_LINE>addListeners();<NEW_LINE>validateData();<NEW_LINE>category.setStoreListener(new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>storeData();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(PhpUnitPreferences.getRunAllTestFiles(phpModule));
534,273
public void drawU(UGraphic ug) {<NEW_LINE>final double thickness = ug.getParam().getStroke().getThickness();<NEW_LINE>final double radius = 4 + thickness - 1;<NEW_LINE>final double lineHeight = 4 + thickness - 1;<NEW_LINE>final int xWing = 4;<NEW_LINE>final AffineTransform rotate = AffineTransform.getRotateInstance(this.angle);<NEW_LINE>Point2D middle = new Point2D.Double(0, 0);<NEW_LINE>Point2D base = new Point2D.Double(-xWing - radius - 3, 0);<NEW_LINE>Point2D circleBase = new Point2D.Double(-xWing - radius - 3, 0);<NEW_LINE>Point2D lineTop = new Point2D.Double(-xWing, -lineHeight);<NEW_LINE>Point2D lineBottom = new Point2D.Double(-xWing, lineHeight);<NEW_LINE>rotate.transform(lineTop, lineTop);<NEW_LINE>rotate.transform(lineBottom, lineBottom);<NEW_LINE>rotate.transform(base, base);<NEW_LINE>rotate.transform(circleBase, circleBase);<NEW_LINE>drawLine(ug, contact.getX(), contact.getY(), base, middle);<NEW_LINE>final <MASK><NEW_LINE>ug.apply(new UTranslate(contact.getX() + circleBase.getX() - radius, contact.getY() + circleBase.getY() - radius)).apply(stroke).draw(new UEllipse(2 * radius, 2 * radius));<NEW_LINE>drawLine(ug.apply(stroke), contact.getX(), contact.getY(), lineTop, lineBottom);<NEW_LINE>}
UStroke stroke = new UStroke(thickness);
1,744,473
public boolean calc(ComContext context) {<NEW_LINE>int numSamplesOnNode0 = ((List<Tuple3<Double, Double, Vector>>) context.getObj(OptimVariable.fmTrainData)).size();<NEW_LINE>int numBatches = (batchSize == -1 || batchSize > numSamplesOnNode0) ? maxIter : (numSamplesOnNode0 / batchSize + 1) * maxIter;<NEW_LINE>double[] lossCurve = context.getObj(OptimVariable.convergenceInfo);<NEW_LINE>if (lossCurve == null) {<NEW_LINE>lossCurve = new double[numBatches * 3];<NEW_LINE>context.<MASK><NEW_LINE>}<NEW_LINE>int step = context.getStepNo() - 1;<NEW_LINE>double[] loss = context.getObj(OptimVariable.lossAucAllReduce);<NEW_LINE>lossCurve[3 * step] = loss[0] / loss[1];<NEW_LINE>lossCurve[3 * step + 2] = loss[3] / loss[1];<NEW_LINE>if (task.equals(Task.BINARY_CLASSIFICATION)) {<NEW_LINE>lossCurve[3 * step + 1] = loss[2] / context.getNumTask();<NEW_LINE>if (AlinkGlobalConfiguration.isPrintProcessInfo()) {<NEW_LINE>System.out.println("step : " + step + " loss : " + loss[0] / loss[1] + " auc : " + loss[2] / context.getNumTask() + " accuracy : " + loss[3] / loss[1] + " time : " + (System.currentTimeMillis() - oldTime));<NEW_LINE>oldTime = System.currentTimeMillis();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>lossCurve[3 * step + 1] = loss[2] / loss[1];<NEW_LINE>if (AlinkGlobalConfiguration.isPrintProcessInfo()) {<NEW_LINE>System.out.println("step : " + step + " loss : " + loss[0] / loss[1] + " mae : " + loss[2] / loss[1] + " mse : " + loss[3] / loss[1] + " time : " + (System.currentTimeMillis() - oldTime));<NEW_LINE>oldTime = System.currentTimeMillis();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (context.getStepNo() == numBatches) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (Math.abs(oldLoss - loss[0] / loss[1]) / oldLoss < epsilon) {<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>oldLoss = loss[0] / loss[1];<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
putObj(OptimVariable.convergenceInfo, lossCurve);
766,901
public void createUser(String principal, AuthenticationToken token) throws AccumuloSecurityException {<NEW_LINE>try {<NEW_LINE>if (!(token instanceof PasswordToken))<NEW_LINE>throw new AccumuloSecurityException(principal, SecurityErrorCode.INVALID_TOKEN);<NEW_LINE>PasswordToken pt = (PasswordToken) token;<NEW_LINE>constructUser(principal, ZKSecurityTool.createPass(pt.getPassword()));<NEW_LINE>} catch (KeeperException e) {<NEW_LINE>if (e.code().equals(KeeperException.Code.NODEEXISTS))<NEW_LINE>throw new AccumuloSecurityException(principal, SecurityErrorCode.USER_EXISTS, e);<NEW_LINE>throw new AccumuloSecurityException(<MASK><NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>log.error("{}", e.getMessage(), e);<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>} catch (AccumuloException e) {<NEW_LINE>log.error("{}", e.getMessage(), e);<NEW_LINE>throw new AccumuloSecurityException(principal, SecurityErrorCode.DEFAULT_SECURITY_ERROR, e);<NEW_LINE>}<NEW_LINE>}
principal, SecurityErrorCode.CONNECTION_ERROR, e);
89,270
private void demoPlsqlProcedureNoParams(Connection conn) throws SQLException {<NEW_LINE>// Create a PLSQL stored procedure that takes no arguments.<NEW_LINE>final String PROC_NAME = "ProcNoParams";<NEW_LINE>String sql = "CREATE OR REPLACE PROCEDURE " + PROC_NAME + " IS " + "BEGIN " + "INSERT INTO " + TABLE_NAME + " VALUES (5, 'FIVE', '" + PROC_NAME + "'); " + "INSERT INTO " + TABLE_NAME + " VALUES (6, 'SIX', '" + PROC_NAME + "'); " + "INSERT INTO " + TABLE_NAME + " VALUES (7, 'SEVEN', '" + PROC_NAME + "'); " + "INSERT INTO " + TABLE_NAME + " VALUES (8, 'EIGHT', '" + PROC_NAME + "'); " + "END; ";<NEW_LINE>Util.show(sql);<NEW_LINE>Util.doSql(conn, sql);<NEW_LINE>// Invoke the stored procedure.<NEW_LINE>sql = "CALL " + PROC_NAME + "()";<NEW_LINE>try (CallableStatement callStmt = conn.prepareCall(sql)) {<NEW_LINE>callStmt.execute();<NEW_LINE>// Display rows inserted by the above stored procedure call.<NEW_LINE>Util.show("Rows inserted by the stored procedure '" + PROC_NAME + "' are: ");<NEW_LINE>displayRows(conn, PROC_NAME);<NEW_LINE>} catch (SQLException sqlEx) {<NEW_LINE><MASK><NEW_LINE>} finally {<NEW_LINE>// Drop the procedure when done with it.<NEW_LINE>Util.doSql(conn, "DROP PROCEDURE " + PROC_NAME);<NEW_LINE>}<NEW_LINE>}
Util.showError("demoPlsqlProcedureNoArgs", sqlEx);
1,788,907
private TreeNode convertMethodDeclaration(ExecutableElement element, AbstractTypeDeclaration node) {<NEW_LINE>MethodDeclaration methodDecl = new MethodDeclaration(element);<NEW_LINE>convertBodyDeclaration(methodDecl, element);<NEW_LINE>HashMap<String, VariableElement> localVariableTable = new HashMap<>();<NEW_LINE>List<SingleVariableDeclaration> parameters = methodDecl.getParameters();<NEW_LINE>String name = element.getSimpleName().toString();<NEW_LINE>String descriptor = getMethodDescriptor(element);<NEW_LINE>if (element.getParameters().size() > 0) {<NEW_LINE>Iterator<ParameterDeclaration> paramsIterator = methodDecl.isConstructor() ? classFile.getConstructor(descriptor).getParameters().iterator() : classFile.getMethod(name, descriptor).getParameters().iterator();<NEW_LINE>// If classfile was compiled with -parameters flag; use the MethodNode<NEW_LINE>// to work around potential javac8 bug iterating over parameter names.<NEW_LINE>for (VariableElement param : element.getParameters()) {<NEW_LINE>SingleVariableDeclaration varDecl = (SingleVariableDeclaration) convert(param, methodDecl);<NEW_LINE>String nameDef = paramsIterator.next().getName();<NEW_LINE>// If element's name doesn't match the ParameterNode's name, use the latter.<NEW_LINE>if (!nameDef.equals(param.getSimpleName().toString())) {<NEW_LINE>param = GeneratedVariableElement.newParameter(nameDef, param.asType(), param.getEnclosingElement());<NEW_LINE>varDecl.setVariableElement(param);<NEW_LINE>}<NEW_LINE>parameters.add(varDecl);<NEW_LINE>localVariableTable.put(param.getSimpleName().toString(), param);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (element.isVarArgs()) {<NEW_LINE>SingleVariableDeclaration lastParam = parameters.get(<MASK><NEW_LINE>TypeMirror paramType = lastParam.getType().getTypeMirror();<NEW_LINE>assert paramType.getKind() == TypeKind.ARRAY;<NEW_LINE>TypeMirror varArgType = ((ArrayType) paramType).getComponentType();<NEW_LINE>lastParam.setType(Type.newType(varArgType));<NEW_LINE>lastParam.setIsVarargs(true);<NEW_LINE>}<NEW_LINE>if (!ElementUtil.isAbstract(element)) {<NEW_LINE>EntityDeclaration decl = methodDecl.isConstructor() ? classFile.getConstructor(descriptor) : classFile.getMethod(name, descriptor);<NEW_LINE>MethodTranslator translator = new MethodTranslator(parserEnv, translationEnv, element, node, localVariableTable);<NEW_LINE>methodDecl.setBody((Block) decl.acceptVisitor(translator, null));<NEW_LINE>}<NEW_LINE>return methodDecl;<NEW_LINE>}
parameters.size() - 1);
1,243,989
/* Sample generated code:<NEW_LINE>*<NEW_LINE>* @com.ibm.j9ddr.GeneratedFieldAccessor(offsetFieldName="_hostClassOffset_", declaredType="J9Class*")<NEW_LINE>* public J9ClassPointer hostClass() throws CorruptDataException {<NEW_LINE>* return J9ClassPointer.cast(getPointerAtOffset(J9Class._hostClassOffset_));<NEW_LINE>* }<NEW_LINE>*/<NEW_LINE>private void doStructurePointerMethod(FieldDescriptor field) {<NEW_LINE>String returnType = getTargetType(removeTypeTags(field.getType()));<NEW_LINE>String qualifiedReturnType = qualifyPointerType(returnType);<NEW_LINE>Type objectType = Type.getObjectType(qualifiedReturnType);<NEW_LINE>String returnDesc = Type.getMethodDescriptor(objectType);<NEW_LINE>String castDesc = Type.getMethodDescriptor(objectType, Type.LONG_TYPE);<NEW_LINE>MethodVisitor method = beginAnnotatedMethod(field, field.getName(), returnDesc);<NEW_LINE>method.visitCode();<NEW_LINE>if (checkPresent(field, method)) {<NEW_LINE>method.visitVarInsn(ALOAD, 0);<NEW_LINE>loadLong(method, field.getOffset());<NEW_LINE>method.visitMethodInsn(INVOKEVIRTUAL, className, "getPointerAtOffset", longFromLong, false);<NEW_LINE>method.visitMethodInsn(INVOKESTATIC, <MASK><NEW_LINE>method.visitInsn(ARETURN);<NEW_LINE>}<NEW_LINE>method.visitMaxs(3, 1);<NEW_LINE>method.visitEnd();<NEW_LINE>doEAMethod("Pointer", field);<NEW_LINE>}
qualifiedReturnType, "cast", castDesc, false);
1,019,742
private void replaceCell(String readerId) {<NEW_LINE>synchronized (lock) {<NEW_LINE>Preconditions.checkState(this.isRunning(), this.state().name());<NEW_LINE>// add a replacement reader and then shutdown existing reader<NEW_LINE>log.info("Found overloaded reader: {}", readerId);<NEW_LINE>String newReaderId;<NEW_LINE>try {<NEW_LINE>List<<MASK><NEW_LINE>assert newReaders.size() == 1;<NEW_LINE>newReaderId = newReaders.get(0);<NEW_LINE>eventProcessorMap.get(newReaderId).startAsync();<NEW_LINE>} catch (CheckpointStoreException e) {<NEW_LINE>log.warn("Unable to create a new event processor cell", e.getMessage());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>EventProcessorCell<T> cell = eventProcessorMap.get(readerId);<NEW_LINE>log.info("Stopping event processor cell: {}", cell);<NEW_LINE>try {<NEW_LINE>cell.stopAsync();<NEW_LINE>cell.awaitTerminated();<NEW_LINE>checkpointStore.removeReader(cell.getProcess(), readerGroup.getGroupName(), readerId);<NEW_LINE>eventProcessorMap.remove(readerId);<NEW_LINE>log.info("Termination of event processor cell: {} completed successfully.", cell);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.warn("Failed terminating event processor cell {}.", cell, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String> newReaders = createEventProcessors(1);
1,260,626
private static void fillTable() {<NEW_LINE>hotKeys.clear();<NEW_LINE>hotKeys.add(makeTitle("Graph"));<NEW_LINE>loadKeys(HotKeys.graphHotKeys);<NEW_LINE>hotKeys.add(makeTitle("Graph Misc"));<NEW_LINE>hotKeys.add(new Object[] { "Alt-Right Click", "Opens instruction comments dialog when clicking on an instruction" });<NEW_LINE>hotKeys.add(new Object[] { "Shift+Alt-Right Click", "Opens instruction comments dialog when clicking on an instruction" });<NEW_LINE>hotKeys.add(new Object[] { "Ctrl+Alt-Right Click", "Highlights instruction when clicking on an instruction." });<NEW_LINE>hotKeys.add(makeTitle("Graph toolbar"));<NEW_LINE>loadKeys(HotKeys.graphToolbarHotKeys);<NEW_LINE>hotKeys.add(makeTitle("Graph mouse interaction"));<NEW_LINE>hotKeys.add(new Object[] { "Mouse wheel", "Zoom to mouse cursor" });<NEW_LINE>hotKeys.add(new Object[] { "Shift-Mouse wheel", "Zoom to selection" });<NEW_LINE>hotKeys.add(new Object<MASK><NEW_LINE>hotKeys.add(new Object[] { "Ctrl-Alt-Mouse wheel", "Scroll horizontally" });<NEW_LINE>hotKeys.add(new Object[] { "Ctrl-Mouse wheel", "Resize the magnifying glass" });<NEW_LINE>hotKeys.add(new Object[] { "CTRL-DOUBLE-LEFTCLICK", "Opens function when clicking on function nodes" });<NEW_LINE>hotKeys.add(new Object[] { "CTRL-DOUBLE-LEFTCLICK", "Opens function when clicking on function calls in code nodes" });<NEW_LINE>hotKeys.add(new Object[] { "MOUSEWHEEL-Click", "Sets the focus into a node" });<NEW_LINE>hotKeys.add(new Object[] { "ALT-LEFTCLICK", "Sets the focus into a node" });<NEW_LINE>hotKeys.add(new Object[] { "SHIFT-ARROWKEYS", "Select the content of a node once the node has the focus" });<NEW_LINE>hotKeys.add(makeTitle("Generic"));<NEW_LINE>loadKeys(HotKeys.genericHotKeys);<NEW_LINE>hotKeys.add(makeTitle("Debugger"));<NEW_LINE>loadKeys(HotKeys.debuggerHotKeys);<NEW_LINE>hotKeys.add(makeTitle("Database dialog"));<NEW_LINE>loadKeys(HotKeys.dbHotKeys);<NEW_LINE>hotKeys.add(makeTitle("Main window"));<NEW_LINE>loadKeys(HotKeys.mainWindowHotKeys);<NEW_LINE>}
[] { "Ctrl-Mouse wheel", "Scroll vertically" });
1,684,497
// ////////////// Channel Block monitoring //////////////////////////////////<NEW_LINE>private ProposalResponse sendProposalSerially(TransactionRequest proposalRequest, Collection<Peer> peers) throws ProposalException {<NEW_LINE>ProposalException lastException = new ProposalException("ProposalRequest failed.");<NEW_LINE>for (Peer peer : peers) {<NEW_LINE>try {<NEW_LINE>Collection<ProposalResponse> proposalResponses = sendProposal(proposalRequest<MASK><NEW_LINE>if (proposalResponses.isEmpty()) {<NEW_LINE>logger.warn(format("Proposal request to peer %s failed", peer));<NEW_LINE>}<NEW_LINE>ProposalResponse proposalResponse = proposalResponses.iterator().next();<NEW_LINE>ChaincodeResponse.Status status = proposalResponse.getStatus();<NEW_LINE>if (status.getStatus() < 400) {<NEW_LINE>return proposalResponse;<NEW_LINE>} else if (status.getStatus() > 499) {<NEW_LINE>// server error may work on other peer.<NEW_LINE>lastException = new ProposalException(format("Channel %s got exception on peer %s %d. %s ", name, peer, status.getStatus(), proposalResponse.getMessage()));<NEW_LINE>} else {<NEW_LINE>// 400 to 499<NEW_LINE>throw new ProposalException(format("Channel %s got exception on peer %s %d. %s ", name, peer, status.getStatus(), proposalResponse.getMessage()));<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>lastException = new ProposalException(format("Channel %s failed proposal on peer %s %s", name, peer.getName(), e.getMessage()), e);<NEW_LINE>logger.warn(lastException.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw lastException;<NEW_LINE>}
, Collections.singletonList(peer));
1,811,305
public CancelReplayResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CancelReplayResult cancelReplayResult = new CancelReplayResult();<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 cancelReplayResult;<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("ReplayArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>cancelReplayResult.setReplayArn(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("State", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>cancelReplayResult.setState(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("StateReason", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>cancelReplayResult.setStateReason(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 cancelReplayResult;<NEW_LINE>}
class).unmarshall(context));
192,318
public void loadAdditinalData(long stime, long etime, final boolean reverse) {<NEW_LINE>viewPainter.setViewIsInAdditionalDataLoading(true);<NEW_LINE>collectObj();<NEW_LINE>Iterator<Integer> serverIds = serverObjMap.keySet().iterator();<NEW_LINE>final TreeSet<XLogData> tempSet = new TreeSet<<MASK><NEW_LINE>int limit = PManager.getInstance().getInt(PreferenceConstants.P_XLOG_IGNORE_TIME);<NEW_LINE>final int max = getMaxCount();<NEW_LINE>twdata.setMax(max);<NEW_LINE>while (serverIds.hasNext()) {<NEW_LINE>final int serverId = serverIds.next();<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put("date", DateUtil.yyyymmdd(stime));<NEW_LINE>param.put("stime", stime);<NEW_LINE>param.put("etime", etime);<NEW_LINE>param.put("objHash", serverObjMap.get(serverId));<NEW_LINE>param.put("reverse", new BooleanValue(reverse));<NEW_LINE>if (limit > 0) {<NEW_LINE>param.put("limit", limit);<NEW_LINE>}<NEW_LINE>if (max > 0) {<NEW_LINE>param.put("max", max);<NEW_LINE>}<NEW_LINE>tcp.process(RequestCmd.TRANX_LOAD_TIME_GROUP, param, new INetReader() {<NEW_LINE><NEW_LINE>public void process(DataInputX in) throws IOException {<NEW_LINE>Pack p = in.readPack();<NEW_LINE>XLogPack x = XLogUtil.toXLogPack(p);<NEW_LINE>if (tempSet.size() < max) {<NEW_LINE>tempSet.add(new XLogData(x, serverId));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Throwable t) {<NEW_LINE>ConsoleProxy.errorSafe(t.toString());<NEW_LINE>} finally {<NEW_LINE>viewPainter.setViewIsInAdditionalDataLoading(false);<NEW_LINE>TcpProxy.putTcpProxy(tcp);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (reverse) {<NEW_LINE>Iterator<XLogData> itr = tempSet.descendingIterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>XLogData d = itr.next();<NEW_LINE>twdata.putFirst(d.p.txid, d);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Iterator<XLogData> itr = tempSet.iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>XLogData d = itr.next();<NEW_LINE>twdata.putLast(d.p.txid, d);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
XLogData>(new XLogDataComparator());
878,105
private static void detectAuthorizationLoop(String conduitName, Message message, URI currentURL, String realm) throws IOException {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Set<String> authURLs = (Set<String>) message.get(KEY_AUTH_URLS);<NEW_LINE>if (authURLs == null) {<NEW_LINE>authURLs = new HashSet<>();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// If we have been here (URL & Realm) before for this particular message<NEW_LINE>// retransmit, it means we have already supplied information<NEW_LINE>// which must have been wrong, or we wouldn't be here again.<NEW_LINE>// Otherwise, the server may be 401 looping us around the realms.<NEW_LINE>if (!authURLs.add(currentURL.toString() + realm)) {<NEW_LINE>String logMessage = "Authorization loop detected on Conduit \"" + conduitName + "\" on URL \"" + currentURL + "\" with realm \"" + realm + "\"";<NEW_LINE>if (LOG.isLoggable(Level.INFO)) {<NEW_LINE>LOG.log(Level.INFO, logMessage);<NEW_LINE>}<NEW_LINE>throw new IOException(logMessage);<NEW_LINE>}<NEW_LINE>}
message.put(KEY_AUTH_URLS, authURLs);
341,807
final GetTrafficPolicyInstanceCountResult executeGetTrafficPolicyInstanceCount(GetTrafficPolicyInstanceCountRequest getTrafficPolicyInstanceCountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTrafficPolicyInstanceCountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetTrafficPolicyInstanceCountRequest> request = null;<NEW_LINE>Response<GetTrafficPolicyInstanceCountResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetTrafficPolicyInstanceCountRequestMarshaller().marshall(super.beforeMarshalling(getTrafficPolicyInstanceCountRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTrafficPolicyInstanceCount");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<GetTrafficPolicyInstanceCountResult> responseHandler = new StaxResponseHandler<GetTrafficPolicyInstanceCountResult>(new GetTrafficPolicyInstanceCountResultStaxUnmarshaller());<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.SERVICE_ID, "Route 53");
1,331,645
public PlanFragment visitPhysicalEsScan(OptExpression optExpression, ExecPlan context) {<NEW_LINE>PhysicalEsScanOperator node = (PhysicalEsScanOperator) optExpression.getOp();<NEW_LINE>context.getDescTbl().addReferencedTable(node.getTable());<NEW_LINE>TupleDescriptor tupleDescriptor = context.getDescTbl().createTupleDescriptor();<NEW_LINE>tupleDescriptor.setTable(node.getTable());<NEW_LINE>for (Map.Entry<ColumnRefOperator, Column> entry : node.getColRefToColumnMetaMap().entrySet()) {<NEW_LINE>SlotDescriptor slotDescriptor = context.getDescTbl().addSlotDescriptor(tupleDescriptor, new SlotId(entry.getKey().getId()));<NEW_LINE>slotDescriptor.setColumn(entry.getValue());<NEW_LINE>slotDescriptor.setIsNullable(entry.getValue().isAllowNull());<NEW_LINE>slotDescriptor.setIsMaterialized(true);<NEW_LINE>context.getColRefToExpr().put(entry.getKey(), new SlotRef(entry.getKey().toString(), slotDescriptor));<NEW_LINE>}<NEW_LINE>tupleDescriptor.computeMemLayout();<NEW_LINE>EsScanNode scanNode = new EsScanNode(context.getNextNodeId(), tupleDescriptor, "EsScanNode");<NEW_LINE>// set predicate<NEW_LINE>List<ScalarOperator> predicates = Utils.extractConjuncts(node.getPredicate());<NEW_LINE>ScalarOperatorToExpr.FormatterContext formatterContext = new ScalarOperatorToExpr.FormatterContext(context.getColRefToExpr());<NEW_LINE>for (ScalarOperator predicate : predicates) {<NEW_LINE>scanNode.getConjuncts().add(ScalarOperatorToExpr.buildExecExpression(predicate, formatterContext));<NEW_LINE>}<NEW_LINE>scanNode.setLimit(node.getLimit());<NEW_LINE>scanNode.computeStatistics(optExpression.getStatistics());<NEW_LINE>try {<NEW_LINE>scanNode.assignBackends();<NEW_LINE>} catch (UserException e) {<NEW_LINE>throw new StarRocksPlannerException(e.getMessage(), INTERNAL_ERROR);<NEW_LINE>}<NEW_LINE>scanNode.setShardScanRanges(scanNode.computeShardLocations(node.getSelectedIndex()));<NEW_LINE>context.getScanNodes().add(scanNode);<NEW_LINE>PlanFragment fragment = new PlanFragment(context.getNextFragmentId(), scanNode, DataPartition.RANDOM);<NEW_LINE>context.<MASK><NEW_LINE>return fragment;<NEW_LINE>}
getFragments().add(fragment);
1,371,208
private ReceiptSchedule ofRecord(@NonNull final I_M_ReceiptSchedule record) {<NEW_LINE>final OrgId orgId = OrgId.ofRepoId(record.getAD_Org_ID());<NEW_LINE>final ReceiptScheduleId receiptScheduleId = ReceiptScheduleId.<MASK><NEW_LINE>final ReceiptSchedule.ReceiptScheduleBuilder receiptScheduleBuilder = ReceiptSchedule.builder().id(receiptScheduleId).orgId(orgId).vendorId(receiptScheduleBL.getBPartnerEffectiveId(record)).orderId(OrderId.ofRepoIdOrNull(record.getC_Order_ID())).productId(ProductId.ofRepoId(record.getM_Product_ID())).attributeSetInstanceId(AttributeSetInstanceId.ofRepoIdOrNone(record.getM_AttributeSetInstance_ID())).quantityToDeliver(receiptScheduleBL.getQtyToMove(record).getStockQty()).exportStatus(APIExportStatus.ofCode(record.getExportStatus())).numberOfItemsWithSameOrderId(record.getFilteredItemsWithSameC_Order_ID());<NEW_LINE>if (record.getDateOrdered() != null) {<NEW_LINE>receiptScheduleBuilder.dateOrdered(record.getDateOrdered().toLocalDateTime());<NEW_LINE>}<NEW_LINE>return receiptScheduleBuilder.build();<NEW_LINE>}
ofRepoId(record.getM_ReceiptSchedule_ID());
1,686,935
private static void tryAssertion(RegressionEnvironment env, int days) {<NEW_LINE>sendEvent(env, "S1", 0);<NEW_LINE>// now scheduled for output<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>env.assertRuntime(runtime -> assertEquals(0, env.runtime().getVariableService().getVariableValue(null, "myvar")));<NEW_LINE>env.assertSubscriber("s0", subscriber -> assertFalse(subscriber.isInvoked()));<NEW_LINE>sendTimeEvent(env, days, 8, 0, 1, 0);<NEW_LINE>env.assertSubscriber("s0", subscriber -> EPAssertionUtil.assertEqualsExactOrder(new Object[] { "S1" }<MASK><NEW_LINE>env.assertRuntime(runtime -> {<NEW_LINE>assertEquals(0, runtime.getVariableService().getVariableValue(null, "myvar"));<NEW_LINE>assertEquals(1, runtime.getVariableService().getVariableValue(null, "count_insert_var"));<NEW_LINE>});<NEW_LINE>sendEvent(env, "S2", 0);<NEW_LINE>sendEvent(env, "S3", 0);<NEW_LINE>sendTimeEvent(env, days, 8, 0, 2, 0);<NEW_LINE>sendTimeEvent(env, days, 8, 0, 3, 0);<NEW_LINE>env.sendEventBean(new SupportBean("E2", 1));<NEW_LINE>env.assertRuntime(runtime -> {<NEW_LINE>assertEquals(0, runtime.getVariableService().getVariableValue(null, "myvar"));<NEW_LINE>assertEquals(2, runtime.getVariableService().getVariableValue(null, "count_insert_var"));<NEW_LINE>});<NEW_LINE>env.assertSubscriber("s0", subscriber -> assertFalse(subscriber.isInvoked()));<NEW_LINE>sendTimeEvent(env, days, 8, 0, 4, 0);<NEW_LINE>env.assertSubscriber("s0", subscriber -> EPAssertionUtil.assertEqualsExactOrder(new Object[] { "S2", "S3" }, subscriber.getAndResetLastNewData()));<NEW_LINE>env.assertRuntime(runtime -> assertEquals(0, runtime.getVariableService().getVariableValue(null, "myvar")));<NEW_LINE>sendTimeEvent(env, days, 8, 0, 5, 0);<NEW_LINE>env.assertSubscriber("s0", subscriber -> assertFalse(subscriber.isInvoked()));<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>env.assertRuntime(runtime -> assertEquals(0, runtime.getVariableService().getVariableValue(null, "myvar")));<NEW_LINE>env.assertSubscriber("s0", subscriber -> assertFalse(subscriber.isInvoked()));<NEW_LINE>env.undeployAll();<NEW_LINE>}
, subscriber.getAndResetLastNewData()));
1,224,716
public static LLVMExpressionNode createSignedCast(LLVMExpressionNode fromNode, Type targetType) {<NEW_LINE>// does a signed cast (either sign extend or truncate) from (int or FP) to (int or FP). for<NEW_LINE>// vectors, the number of elements in source and target must match.<NEW_LINE>//<NEW_LINE>// @formatter:off<NEW_LINE>// source: ([vector] int, | ([vector] FP, | ([vector] sint, | ([vector] FP, | (ptr,<NEW_LINE>// target: [vector] int) | [vector] sint) | [vector] FP) | [vector] FP) | int)<NEW_LINE>// @formatter:on<NEW_LINE>if (targetType instanceof PrimitiveType) {<NEW_LINE>return createSignedCast(fromNode, ((PrimitiveType) targetType).getPrimitiveKind());<NEW_LINE>} else if (targetType instanceof VariableBitWidthType) {<NEW_LINE>return LLVMSignedCastToIVarNodeGen.create(fromNode, ((VariableBitWidthType) targetType).getBitSizeInt());<NEW_LINE>} else if (targetType instanceof VectorType) {<NEW_LINE>VectorType vectorType = (VectorType) targetType;<NEW_LINE>Type elemType = vectorType.getElementType();<NEW_LINE>int vectorLength = vectorType.getNumberOfElementsInt();<NEW_LINE>if (elemType instanceof PrimitiveType) {<NEW_LINE>switch(((PrimitiveType) ((VectorType) targetType).getElementType()).getPrimitiveKind()) {<NEW_LINE>case I1:<NEW_LINE>return LLVMSignedCastToI1VectorNodeGen.create(fromNode, vectorLength);<NEW_LINE>case I8:<NEW_LINE>return LLVMSignedCastToI8VectorNodeGen.create(fromNode, vectorLength);<NEW_LINE>case I16:<NEW_LINE>return <MASK><NEW_LINE>case I32:<NEW_LINE>return LLVMSignedCastToI32VectorNodeGen.create(fromNode, vectorLength);<NEW_LINE>case I64:<NEW_LINE>return LLVMSignedCastToI64VectorNodeGen.create(fromNode, vectorLength);<NEW_LINE>case FLOAT:<NEW_LINE>return LLVMSignedCastToFloatVectorNodeGen.create(fromNode, vectorLength);<NEW_LINE>case DOUBLE:<NEW_LINE>return LLVMSignedCastToDoubleVectorNodeGen.create(fromNode, vectorLength);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw unsupportedCast(targetType);<NEW_LINE>}
LLVMSignedCastToI16VectorNodeGen.create(fromNode, vectorLength);
1,489,559
private List<GridElement> gridElementCopyInOtherDiagram(List<GridElement> originals, int diffY) {<NEW_LINE>int verticalScrollbarDiff = otherDrawFocusPanel.scrollPanel.getVerticalScrollPosition() - scrollPanel.getVerticalScrollPosition();<NEW_LINE>int horizontalScrollbarDiff = otherDrawFocusPanel.scrollPanel.getHorizontalScrollPosition() - scrollPanel.getHorizontalScrollPosition();<NEW_LINE>List<GridElement> <MASK><NEW_LINE>double factor = getGridSize() * 1.0d / otherDrawFocusPanel.getGridSize();<NEW_LINE>// Calculating vertical paste position for other diagram<NEW_LINE>int pastePos = (int) ((diffY + paletteChooser.getOffsetHeight() + verticalScrollbarDiff) * factor);<NEW_LINE>for (GridElement original : originals) {<NEW_LINE>GridElement copy = ElementFactoryGwt.create(original, otherDrawFocusPanel.getDiagram());<NEW_LINE>copies.add(copy);<NEW_LINE>Rectangle copyRect = copy.getRectangle();<NEW_LINE>int newX = (int) (copyRect.getX() + (otherDrawFocusPanel.getVisibleBounds().width + horizontalScrollbarDiff) * factor);<NEW_LINE>int newY = pastePos + copy.getRectangle().y - lastDraggedGridElement.getRectangle().y - lastDraggedGridElement.getRectangle().getHeight() / 2;<NEW_LINE>copy.setLocation(newX, newY);<NEW_LINE>}<NEW_LINE>return copies;<NEW_LINE>}
copies = new ArrayList<>();
1,421,963
static ZipFileData read(InputStream in, ZipFileData file) throws IOException {<NEW_LINE>if (file == null) {<NEW_LINE>throw new NullPointerException();<NEW_LINE>}<NEW_LINE>byte[] fixedSizeData = new byte[FIXED_DATA_SIZE];<NEW_LINE>if (ZipUtil.readFully(in, fixedSizeData) != FIXED_DATA_SIZE) {<NEW_LINE>throw new ZipException("Unexpected end of file while reading End of Central Directory Record.");<NEW_LINE>}<NEW_LINE>if (!ZipUtil.arrayStartsWith(fixedSizeData, ZipUtil.intToLittleEndian(SIGNATURE))) {<NEW_LINE>throw new ZipException(String.format("Malformed End of Central Directory Record; does not start with %08x", SIGNATURE));<NEW_LINE>}<NEW_LINE>byte[] comment = new byte[ZipUtil<MASK><NEW_LINE>if (comment.length > 0 && ZipUtil.readFully(in, comment) != comment.length) {<NEW_LINE>throw new ZipException("Unexpected end of file while reading End of Central Directory Record.");<NEW_LINE>}<NEW_LINE>short diskNumber = ZipUtil.get16(fixedSizeData, DISK_NUMBER_OFFSET);<NEW_LINE>short centralDirectoryDisk = ZipUtil.get16(fixedSizeData, CD_DISK_OFFSET);<NEW_LINE>short entriesOnDisk = ZipUtil.get16(fixedSizeData, DISK_ENTRIES_OFFSET);<NEW_LINE>short totalEntries = ZipUtil.get16(fixedSizeData, TOTAL_ENTRIES_OFFSET);<NEW_LINE>int centralDirectorySize = ZipUtil.get32(fixedSizeData, CD_SIZE_OFFSET);<NEW_LINE>int centralDirectoryOffset = ZipUtil.get32(fixedSizeData, CD_OFFSET_OFFSET);<NEW_LINE>if (diskNumber == -1 || centralDirectoryDisk == -1 || entriesOnDisk == -1 || totalEntries == -1 || centralDirectorySize == -1 || centralDirectoryOffset == -1) {<NEW_LINE>file.setMaybeZip64(true);<NEW_LINE>}<NEW_LINE>file.setComment(comment);<NEW_LINE>file.setCentralDirectorySize(ZipUtil.getUnsignedInt(fixedSizeData, CD_SIZE_OFFSET));<NEW_LINE>file.setCentralDirectoryOffset(ZipUtil.getUnsignedInt(fixedSizeData, CD_OFFSET_OFFSET));<NEW_LINE>file.setExpectedEntries(ZipUtil.getUnsignedShort(fixedSizeData, TOTAL_ENTRIES_OFFSET));<NEW_LINE>return file;<NEW_LINE>}
.getUnsignedShort(fixedSizeData, COMMENT_LENGTH_OFFSET)];
350,532
public static SipMessageByteBuffer fromMessage(Message msg, HeaderForm headerForm) throws SipException {<NEW_LINE>if (!(msg instanceof MessageImpl)) {<NEW_LINE>throw new SipException("attempt to serialize message from a different JAIN implementation");<NEW_LINE>}<NEW_LINE>MessageImpl msgImpl = (MessageImpl) msg;<NEW_LINE>// 1. allocate buffer<NEW_LINE>SipMessageByteBuffer buf = fromPool();<NEW_LINE>if (buf.m_markedBytesNumber != 0) {<NEW_LINE>throw new SipException("attempt to use pre-allocated byte buffer");<NEW_LINE>}<NEW_LINE>// 2. the body part is easy - it's already serialized<NEW_LINE>byte[] bodyPart = msg.getBodyAsBytes();<NEW_LINE>// 3. start line and headers<NEW_LINE>CharsBuffer headerPartBuffer = CharsBuffersPool.getBuffer();<NEW_LINE>msgImpl.writeHeadersToBuffer(headerPartBuffer, headerForm, true);<NEW_LINE>byte[<MASK><NEW_LINE>int headerPartLength = headerPartBuffer.getBytesSize();<NEW_LINE>// 4. dump headers and body into buffer<NEW_LINE>buf.put(headerPart, 0, headerPartLength);<NEW_LINE>if (bodyPart != null) {<NEW_LINE>buf.put(bodyPart, 0, bodyPart.length);<NEW_LINE>}<NEW_LINE>CharsBuffersPool.putBufferBack(headerPartBuffer);<NEW_LINE>return buf;<NEW_LINE>}
] headerPart = headerPartBuffer.getBytes();
620,276
public ExternalTaskExecutionInfo produce() {<NEW_LINE>TreePath[] selectionPaths = getSelectionPaths();<NEW_LINE>if (selectionPaths == null || selectionPaths.length == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Map<String, ExternalTaskExecutionInfo> map = ContainerUtil.newHashMap();<NEW_LINE>for (TreePath selectionPath : selectionPaths) {<NEW_LINE>Object component = selectionPath.getLastPathComponent();<NEW_LINE>if (!(component instanceof ExternalSystemNode)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Object element = ((ExternalSystemNode) component).getDescriptor().getElement();<NEW_LINE>if (element instanceof ExternalTaskExecutionInfo) {<NEW_LINE>ExternalTaskExecutionInfo taskExecutionInfo = (ExternalTaskExecutionInfo) element;<NEW_LINE>ExternalSystemTaskExecutionSettings executionSettings = taskExecutionInfo.getSettings();<NEW_LINE>String key = executionSettings.getExternalSystemIdString() + executionSettings.getExternalProjectPath() + executionSettings.getVmOptions();<NEW_LINE>ExternalTaskExecutionInfo executionInfo = map.get(key);<NEW_LINE>if (executionInfo == null) {<NEW_LINE>ExternalSystemTaskExecutionSettings taskExecutionSettings = new ExternalSystemTaskExecutionSettings();<NEW_LINE>taskExecutionSettings.setExternalProjectPath(executionSettings.getExternalProjectPath());<NEW_LINE>taskExecutionSettings.setExternalSystemIdString(executionSettings.getExternalSystemIdString());<NEW_LINE>taskExecutionSettings.setVmOptions(executionSettings.getVmOptions());<NEW_LINE>executionInfo = new ExternalTaskExecutionInfo(<MASK><NEW_LINE>map.put(key, executionInfo);<NEW_LINE>}<NEW_LINE>executionInfo.getSettings().getTaskNames().addAll(executionSettings.getTaskNames());<NEW_LINE>executionInfo.getSettings().getTaskDescriptions().addAll(executionSettings.getTaskDescriptions());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Disable tasks execution if it comes from different projects<NEW_LINE>if (map.values().size() != 1)<NEW_LINE>return null;<NEW_LINE>return map.values().iterator().next();<NEW_LINE>}
taskExecutionSettings, taskExecutionInfo.getExecutorId());
1,246,568
public CompletableFuture<Void> removeEntries(String tableName, Collection<String> keys, long requestId) {<NEW_LINE>log.trace(requestId, "remove entry called for : {} keys : {}", tableName, keys);<NEW_LINE>List<TableSegmentKey> listOfKeys = keys.stream().map(x -> TableSegmentKey.unversioned(x.getBytes(Charsets.UTF_8))).<MASK><NEW_LINE>return expectingDataNotFound(withRetries(() -> segmentHelper.removeTableKeys(tableName, listOfKeys, authToken.get(), requestId), () -> String.format("remove entries: keys: %s table: %s", keys.toString(), tableName), requestId), null).thenAcceptAsync(v -> {<NEW_LINE>keys.forEach(key -> invalidateCache(tableName, key));<NEW_LINE>log.trace(requestId, "entry for keys {} removed from table {}", keys, tableName);<NEW_LINE>}, executor).whenComplete((r, ex) -> releaseKeys(listOfKeys));<NEW_LINE>}
collect(Collectors.toList());
896,765
void callableShouldBeObserved() throws Exception {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>ObservationHandler<Observation.Context> <MASK><NEW_LINE>when(handler.supportsContext(isA(Observation.Context.class))).thenReturn(true);<NEW_LINE>registry.observationConfig().observationHandler(handler);<NEW_LINE>Observation observation = Observation.createNotStarted("myObservation", registry);<NEW_LINE>Callable<String> callable = () -> {<NEW_LINE>assertThat(registry.getCurrentObservation()).isSameAs(observation);<NEW_LINE>return "test";<NEW_LINE>};<NEW_LINE>String result = observation.observeChecked(callable);<NEW_LINE>assertThat(result).isEqualTo("test");<NEW_LINE>assertThat(registry.getCurrentObservation()).isNull();<NEW_LINE>InOrder inOrder = inOrder(handler);<NEW_LINE>inOrder.verify(handler).supportsContext(isA(Observation.Context.class));<NEW_LINE>inOrder.verify(handler).onStart(isA(Observation.Context.class));<NEW_LINE>inOrder.verify(handler).onScopeOpened(isA(Observation.Context.class));<NEW_LINE>inOrder.verify(handler).onScopeClosed(isA(Observation.Context.class));<NEW_LINE>inOrder.verify(handler, times(0)).onError(isA(Observation.Context.class));<NEW_LINE>inOrder.verify(handler).onStop(isA(Observation.Context.class));<NEW_LINE>}
handler = mock(ObservationHandler.class);
448,276
public static RecoveryAuthnCodesCredentialModel createFromCredentialModel(CredentialModel credentialModel) {<NEW_LINE>RecoveryAuthnCodesCredentialData credentialData;<NEW_LINE>RecoveryAuthnCodesSecretData secretData = null;<NEW_LINE>RecoveryAuthnCodesCredentialModel newModel;<NEW_LINE>try {<NEW_LINE>credentialData = JsonSerialization.readValue(credentialModel.getCredentialData(), RecoveryAuthnCodesCredentialData.class);<NEW_LINE>secretData = JsonSerialization.readValue(credentialModel.getSecretData(), RecoveryAuthnCodesSecretData.class);<NEW_LINE>newModel = new RecoveryAuthnCodesCredentialModel(credentialData, secretData);<NEW_LINE>newModel.setUserLabel(credentialModel.getUserLabel());<NEW_LINE>newModel.setCreatedDate(credentialModel.getCreatedDate());<NEW_LINE>newModel.setType(TYPE);<NEW_LINE>newModel.<MASK><NEW_LINE>newModel.setSecretData(credentialModel.getSecretData());<NEW_LINE>newModel.setCredentialData(credentialModel.getCredentialData());<NEW_LINE>return newModel;<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
setId(credentialModel.getId());
502,826
public void takePicture() {<NEW_LINE>logDebug("takePicture");<NEW_LINE>Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);<NEW_LINE>if (intent.resolveActivity(getPackageManager()) != null) {<NEW_LINE>File photoFile = createImageFile();<NEW_LINE>Uri photoURI;<NEW_LINE>if (photoFile != null) {<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {<NEW_LINE>photoURI = FileProvider.getUriForFile(this, "mega.privacy.android.app.providers.fileprovider", photoFile);<NEW_LINE>} else {<NEW_LINE>photoURI = Uri.fromFile(photoFile);<NEW_LINE>}<NEW_LINE>mOutputFilePath = photoFile.getAbsolutePath();<NEW_LINE>if (mOutputFilePath != null) {<NEW_LINE><MASK><NEW_LINE>intent.setFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);<NEW_LINE>intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);<NEW_LINE>startActivityForResult(intent, TAKE_PHOTO_CODE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
585,483
public int scoreMethod(MethodScore score, Method funcType, List<Class> argTypes, Class returnType) {<NEW_LINE>Class[] paramTypes = funcType.getParameterTypes();<NEW_LINE>int iScore = 0;<NEW_LINE>for (int i = 0; i < argTypes.size(); i++) {<NEW_LINE>if (paramTypes.length <= i) {<NEW_LINE>// Extra argument +Max+1<NEW_LINE>iScore += Byte.MAX_VALUE + 1;<NEW_LINE>score.setErrant(true);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Class argType = argTypes.get(i);<NEW_LINE>// Argument +(0..Max)<NEW_LINE>// function params are covariant wrt assignability from a call site<NEW_LINE>int paramScore = addToScoreForTypes<MASK><NEW_LINE>iScore += paramScore;<NEW_LINE>if (paramScore >= Byte.MAX_VALUE - 1) {<NEW_LINE>score.setErrant(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = argTypes.size(); i < paramTypes.length; i++) {<NEW_LINE>// Missing argument +Max<NEW_LINE>iScore += Byte.MAX_VALUE;<NEW_LINE>score.setErrant(true);<NEW_LINE>}<NEW_LINE>if (funcType.isVarArgs()) {<NEW_LINE>// Disambiguate Java varargs methods<NEW_LINE>iScore += 1;<NEW_LINE>}<NEW_LINE>if (funcType.getReturnType() != void.class) {<NEW_LINE>// Return type +(0..Max)<NEW_LINE>// function return type is contravariant wrt assignability from a call site<NEW_LINE>int returnScore = addToScoreForTypes(returnType, funcType.getReturnType());<NEW_LINE>iScore += returnScore;<NEW_LINE>if (returnScore >= Byte.MAX_VALUE - 1) {<NEW_LINE>score.setErrant(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return iScore;<NEW_LINE>}
(paramTypes[i], argType);
1,294,577
final ListImageRecipesResult executeListImageRecipes(ListImageRecipesRequest listImageRecipesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listImageRecipesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListImageRecipesRequest> request = null;<NEW_LINE>Response<ListImageRecipesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListImageRecipesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listImageRecipesRequest));<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, "imagebuilder");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListImageRecipes");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListImageRecipesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListImageRecipesResultJsonUnmarshaller());<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,274,724
private void logResults() {<NEW_LINE>LOG.info("Key Values Processed: " + kvs_processed.get());<NEW_LINE>LOG.info("Rows Processed: " + rows_processed.get());<NEW_LINE>LOG.info("Valid Datapoints: " + valid_datapoints.get());<NEW_LINE>LOG.info("Annotations: " + annotations.get());<NEW_LINE>LOG.info("Invalid Row Keys Found: " + bad_key.get());<NEW_LINE>LOG.info("Invalid Rows Deleted: " + bad_key_fixed.get());<NEW_LINE>LOG.info("Duplicate Datapoints: " + duplicates.get());<NEW_LINE>LOG.info("Duplicate Datapoints Resolved: " + duplicates_fixed.get());<NEW_LINE>LOG.info("Orphaned UID Rows: " + orphans.get());<NEW_LINE>LOG.info("Orphaned UID Rows Deleted: " + orphans_fixed.get());<NEW_LINE>LOG.info("Possible Future Objects: " + future.get());<NEW_LINE>LOG.info("Unknown Objects: " + unknown.get());<NEW_LINE>LOG.info("Unknown Objects Deleted: " + unknown_fixed.get());<NEW_LINE>LOG.info("Unparseable Datapoint Values: " + bad_values.get());<NEW_LINE>LOG.info("Unparseable Datapoint Values Deleted: " + bad_values_deleted.get());<NEW_LINE>LOG.info("Improperly Encoded Floating Point Values: " + value_encoding.get());<NEW_LINE>LOG.info("Improperly Encoded Floating Point Values Fixed: " + value_encoding_fixed.get());<NEW_LINE>LOG.info("Unparseable Compacted Columns: " + bad_compacted_columns.get());<NEW_LINE>LOG.info(<MASK><NEW_LINE>LOG.info("Datapoints Qualified for VLE : " + vle.get());<NEW_LINE>LOG.info("Datapoints Compressed with VLE: " + vle_fixed.get());<NEW_LINE>LOG.info("Bytes Saved with VLE: " + vle_bytes.get());<NEW_LINE>LOG.info("Total Errors: " + totalErrors());<NEW_LINE>LOG.info("Total Correctable Errors: " + correctable());<NEW_LINE>LOG.info("Total Errors Fixed: " + totalFixed());<NEW_LINE>}
"Unparseable Compacted Columns Deleted: " + bad_compacted_columns_deleted.get());
712,026
public static void main(String[] args) {<NEW_LINE>JFrame view = new JFrame("nonegative");<NEW_LINE>view.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<NEW_LINE>view.setLayout(new FlowLayout());<NEW_LINE>Transaction.runVoid(() -> {<NEW_LINE>CellLoop<Integer> value = new CellLoop<>();<NEW_LINE>SLabel lblValue = new SLabel(value.map(i -> Integer.toString(i)));<NEW_LINE>SButton plus = new SButton("+");<NEW_LINE>SButton minus = new SButton("-");<NEW_LINE>view.add(lblValue);<NEW_LINE>view.add(plus);<NEW_LINE>view.add(minus);<NEW_LINE>Stream<Integer> sPlusDelta = plus.sClicked.map(u -> 1);<NEW_LINE>Stream<Integer> sMinusDelta = minus.sClicked.map(u -> -1);<NEW_LINE>Stream<Integer> sDelta = sPlusDelta.orElse(sMinusDelta);<NEW_LINE>Stream<Integer> sUpdate = sDelta.snapshot(value, (delta, value_) -> delta + value_).filter(n -> n >= 0);<NEW_LINE>value.loop<MASK><NEW_LINE>});<NEW_LINE>view.setSize(400, 160);<NEW_LINE>view.setVisible(true);<NEW_LINE>}
(sUpdate.hold(0));
990,843
public MFMBatch reverseIt(boolean isAccrual) {<NEW_LINE>Timestamp currentDate = new Timestamp(System.currentTimeMillis());<NEW_LINE>Optional<Timestamp> loginDateOptional = Optional.of(Env.getContextAsDate(getCtx(), "#Date"));<NEW_LINE>Timestamp reversalDate = isAccrual ? loginDateOptional.orElse(currentDate) : getDateDoc();<NEW_LINE>MPeriod.testPeriodOpen(getCtx(), reversalDate, getC_DocType_ID(), getAD_Org_ID());<NEW_LINE>MFMBatch reversal = copyFrom(this, getDateDoc(), getC_DocType_ID());<NEW_LINE>if (reversal == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>reversal.setProcessing(false);<NEW_LINE>reversal.setDocStatus(DOCSTATUS_Reversed);<NEW_LINE>reversal.setDocAction(DOCACTION_None);<NEW_LINE>// Update Header<NEW_LINE>reversal.updateHeader();<NEW_LINE>reversal.setProcessed(true);<NEW_LINE>reversal.setProcessing(false);<NEW_LINE>reversal.setPosted(false);<NEW_LINE>reversal.saveEx(get_TrxName());<NEW_LINE>setReversal_ID(reversal.getFM_Batch_ID());<NEW_LINE>// may come from void<NEW_LINE>setDocStatus(DOCSTATUS_Reversed);<NEW_LINE>setDocAction(DOCACTION_None);<NEW_LINE>setProcessed(true);<NEW_LINE>setDocAction(DOCACTION_None);<NEW_LINE>saveEx();<NEW_LINE>// Fact<NEW_LINE>// reversal.processIt(ACTION_Post);<NEW_LINE>return reversal;<NEW_LINE>}
reversal.setReversal_ID(getFM_Batch_ID());
1,788,711
private void applyValidatorMethodExpressionTarget(FacesContext context, FaceletCompositionContext mctx, ELContext elContext, UIComponent topLevelComponent, UIComponent innerComponent, String attributeName, String targetAttributeName, String attributeExpressionString, ValueExpression attributeNameValueExpression, boolean ccAttrMeRedirection) {<NEW_LINE>// First try to remove any prevous target if any<NEW_LINE>Validator o = (Validator) mctx.removeMethodExpressionTargeted(innerComponent, targetAttributeName);<NEW_LINE>if (o != null) {<NEW_LINE>((EditableValueHolder) innerComponent).removeValidator(o);<NEW_LINE>}<NEW_LINE>// target is EditableValueHolder<NEW_LINE>Validator validator = null;<NEW_LINE>// If it is a redirection, a wrapper is used to locate the right instance and call it properly.<NEW_LINE>if (ccAttrMeRedirection) {<NEW_LINE>validator = new RedirectMethodExpressionValueExpressionValidator(attributeNameValueExpression);<NEW_LINE>} else {<NEW_LINE>MethodExpression methodExpression = reWrapMethodExpression(context.getApplication().getExpressionFactory().createMethodExpression(elContext, attributeExpressionString, Void.TYPE, VALIDATOR_SIGNATURE), attributeNameValueExpression);<NEW_LINE>if (mctx.isUsingPSSOnThisView()) {<NEW_LINE>validator = new PartialMethodExpressionValidator(methodExpression);<NEW_LINE>} else {<NEW_LINE>validator = new MethodExpressionValidator(methodExpression);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>((EditableValueHolder<MASK><NEW_LINE>mctx.addMethodExpressionTargeted(innerComponent, targetAttributeName, validator);<NEW_LINE>}
) innerComponent).addValidator(validator);
1,548,590
protected EnumDefinition buildEnumDefinitionWithJavaEnumsExtension(String nodeName, JsonNode enumNode, JsonNode enums, JsonNode javaEnums, JType type) {<NEW_LINE>ArrayList<EnumValueDefinition> enumValues = new ArrayList<>();<NEW_LINE>Collection<String> existingConstantNames = new ArrayList<>();<NEW_LINE>for (int i = 0; i < enums.size(); i++) {<NEW_LINE>JsonNode <MASK><NEW_LINE>if (!value.isNull()) {<NEW_LINE>JsonNode javaEnumNode = javaEnums.path(i);<NEW_LINE>if (javaEnumNode.isMissingNode()) {<NEW_LINE>ruleFactory.getLogger().error("javaEnum entry for " + value.asText() + " was not found.");<NEW_LINE>}<NEW_LINE>String constantName = getConstantName(value.asText(), javaEnumNode.path("name").asText());<NEW_LINE>constantName = makeUnique(constantName, existingConstantNames);<NEW_LINE>existingConstantNames.add(constantName);<NEW_LINE>JsonNode titleNode = javaEnumNode.path("title");<NEW_LINE>JsonNode descriptionNode = javaEnumNode.path("description");<NEW_LINE>enumValues.add(new EnumValueDefinition(constantName, value.asText(), javaEnumNode, titleNode, descriptionNode));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new EnumDefinition(nodeName, enumNode, type, enumValues, EnumDefinitionExtensionType.JAVA_ENUMS);<NEW_LINE>}
value = enums.path(i);
1,174,069
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_streamer_info);<NEW_LINE>// Get the various handles of view and layouts that is part of this view<NEW_LINE>streamerImage = findViewById(R.id.profileImageView);<NEW_LINE>TextView streamerInfoName = findViewById(R.id.twitch_name);<NEW_LINE>TextView streamerViewers = findViewById(R.id.txt_viewers);<NEW_LINE>TextView streamerFollowers = findViewById(R.id.txt_followers);<NEW_LINE>toolbar = findViewById(R.id.StreamerInfo_Toolbar);<NEW_LINE>additionalToolbar = findViewById(R.id.additional_toolbar);<NEW_LINE>mViewPager2 = findViewById(R.id.streamer_info_viewPager2);<NEW_LINE>mTabLayout = findViewById(R.id.streamer_info_tabLayout);<NEW_LINE>mAppBar = findViewById(R.id.appbar);<NEW_LINE>mFab = findViewById(R.id.fab);<NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>if (getSupportActionBar() != null) {<NEW_LINE>getSupportActionBar().setDisplayHomeAsUpEnabled(true);<NEW_LINE>}<NEW_LINE>// Get the StreamerInfo object sent with the intent to open this activity<NEW_LINE>Intent intent = getIntent();<NEW_LINE>info = intent.getParcelableExtra(getResources().getString<MASK><NEW_LINE>assert info != null;<NEW_LINE>streamerInfoName.setText(info.getDisplayName());<NEW_LINE>info.getFollowers(getApplicationContext(), followers -> streamerFollowers.setText(getReadableInt(followers.or(0))));<NEW_LINE>streamerViewers.setText(getReadableInt(info.getViews()));<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {<NEW_LINE>streamerImage.setTransitionName(getString(R.string.streamerInfo_transition));<NEW_LINE>}<NEW_LINE>setUpTabs();<NEW_LINE>initStreamerImageAndColors();<NEW_LINE>initiateFAB();<NEW_LINE>}
(R.string.channel_info_intent_object));
480,454
public boolean interact(Direction side, Player player, InteractionHand hand, ItemStack heldItem, float hitX, float hitY, float hitZ) {<NEW_LINE>SawmillTileEntity master = master();<NEW_LINE>if (master != null) {<NEW_LINE>if (player.isShiftKeyDown() && !master.sawblade.isEmpty()) {<NEW_LINE>if (heldItem.isEmpty())<NEW_LINE>player.setItemInHand(hand, master.sawblade.copy());<NEW_LINE>else if (!level.isClientSide)<NEW_LINE>player.spawnAtLocation(master.sawblade.copy(), 0);<NEW_LINE>master.sawblade = ItemStack.EMPTY;<NEW_LINE>this.updateMasterBlock(null, true);<NEW_LINE>return true;<NEW_LINE>} else if (IETags.sawblades.contains(heldItem.getItem())) {<NEW_LINE>ItemStack tempBlade = !master.sawblade.isEmpty() ? master.sawblade.copy() : ItemStack.EMPTY;<NEW_LINE>master.sawblade = ItemHandlerHelper.copyStackWithSize(heldItem, 1);<NEW_LINE>heldItem.shrink(1);<NEW_LINE>if (heldItem.getCount() <= 0)<NEW_LINE>heldItem = ItemStack.EMPTY;<NEW_LINE>else<NEW_LINE><MASK><NEW_LINE>if (!tempBlade.isEmpty()) {<NEW_LINE>if (heldItem.isEmpty())<NEW_LINE>player.setItemInHand(hand, tempBlade);<NEW_LINE>else if (!level.isClientSide)<NEW_LINE>player.spawnAtLocation(tempBlade, 0);<NEW_LINE>}<NEW_LINE>this.updateMasterBlock(null, true);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
player.setItemInHand(hand, heldItem);
438,653
private <T> T valueAs(SqlNode node, Class<T> clazz) {<NEW_LINE>final SqlLiteral literal;<NEW_LINE>switch(node.getKind()) {<NEW_LINE>case ARRAY_VALUE_CONSTRUCTOR:<NEW_LINE>final List<Object> list = new ArrayList<>();<NEW_LINE>for (SqlNode o : ((SqlCall) node).getOperandList()) {<NEW_LINE>list.add(valueAs(o, Object.class));<NEW_LINE>}<NEW_LINE>return clazz.cast<MASK><NEW_LINE>case MAP_VALUE_CONSTRUCTOR:<NEW_LINE>final ImmutableMap.Builder<Object, Object> builder2 = ImmutableMap.builder();<NEW_LINE>final List<SqlNode> operands = ((SqlCall) node).getOperandList();<NEW_LINE>for (int i = 0; i < operands.size(); i += 2) {<NEW_LINE>final SqlNode key = operands.get(i);<NEW_LINE>final SqlNode value = operands.get(i + 1);<NEW_LINE>builder2.put(requireNonNull(valueAs(key, Object.class), "key"), requireNonNull(valueAs(value, Object.class), "value"));<NEW_LINE>}<NEW_LINE>return clazz.cast(builder2.build());<NEW_LINE>case CAST:<NEW_LINE>return valueAs(((SqlCall) node).operand(0), clazz);<NEW_LINE>case LITERAL:<NEW_LINE>literal = (SqlLiteral) node;<NEW_LINE>if (literal.getTypeName() == SqlTypeName.NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return literal.getValueAs(clazz);<NEW_LINE>case LITERAL_CHAIN:<NEW_LINE>literal = SqlLiteralChainOperator.concatenateOperands((SqlCall) node);<NEW_LINE>return literal.getValueAs(clazz);<NEW_LINE>case INTERVAL_QUALIFIER:<NEW_LINE>final SqlIntervalQualifier q = (SqlIntervalQualifier) node;<NEW_LINE>final SqlIntervalLiteral.IntervalValue intervalValue = new SqlIntervalLiteral.IntervalValue(q, 1, q.toString());<NEW_LINE>literal = new SqlLiteral(intervalValue, q.typeName(), q.pos);<NEW_LINE>return literal.getValueAs(clazz);<NEW_LINE>case DEFAULT:<NEW_LINE>// currently NULL is the only default value<NEW_LINE>return null;<NEW_LINE>default:<NEW_LINE>if (SqlUtil.isNullLiteral(node, true)) {<NEW_LINE>// NULL literal<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// not a literal<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
(ImmutableNullableList.copyOf(list));
1,533,822
private Map<String, Object> prepareModelForBillingDocument(PurchaseContext purchaseContext, TicketReservation reservation, OrderSummary summary, BillingDocument.Type type) {<NEW_LINE>Organization organization = organizationRepository.getById(purchaseContext.getOrganizationId());<NEW_LINE>String creditNoteNumber = null;<NEW_LINE>if (type == CREDIT_NOTE) {<NEW_LINE>// override credit note number<NEW_LINE>creditNoteNumber = generateCreditNoteNumber(purchaseContext, reservation);<NEW_LINE>}<NEW_LINE>var bankingInfo = configurationManager.getFor(Set.of(VAT_NR, INVOICE_ADDRESS, BANK_ACCOUNT_NR, BANK_ACCOUNT_OWNER), purchaseContext.getConfigurationLevel());<NEW_LINE>Optional<String> invoiceAddress = bankingInfo.get(INVOICE_ADDRESS).getValue();<NEW_LINE>Optional<String> bankAccountNr = bankingInfo.get(BANK_ACCOUNT_NR).getValue();<NEW_LINE>Optional<String> bankAccountOwner = bankingInfo.get(BANK_ACCOUNT_OWNER).getValue();<NEW_LINE>Optional<String> vat = bankingInfo.get(VAT_NR).getValue();<NEW_LINE>Map<Integer, List<Ticket>> ticketsByCategory = ticketRepository.findTicketsInReservation(reservation.getId()).stream().collect<MASK><NEW_LINE>final List<TicketWithCategory> ticketsWithCategory;<NEW_LINE>if (!ticketsByCategory.isEmpty()) {<NEW_LINE>ticketsWithCategory = ticketCategoryRepository.findByIds(ticketsByCategory.keySet()).stream().flatMap(tc -> ticketsByCategory.get(tc.getId()).stream().map(t -> new TicketWithCategory(t, tc))).collect(toList());<NEW_LINE>} else {<NEW_LINE>ticketsWithCategory = Collections.emptyList();<NEW_LINE>}<NEW_LINE>var reservationShortId = configurationManager.getShortReservationID(purchaseContext, reservation);<NEW_LINE>Map<String, Object> model = TemplateResource.prepareModelForConfirmationEmail(organization, purchaseContext, reservation, vat, ticketsWithCategory, summary, "", "", reservationShortId, invoiceAddress, bankAccountNr, bankAccountOwner, Map.of());<NEW_LINE>boolean euBusiness = StringUtils.isNotBlank(reservation.getVatCountryCode()) && StringUtils.isNotBlank(reservation.getVatNr()) && configurationManager.getForSystem(ConfigurationKeys.EU_COUNTRIES_LIST).getRequiredValue().contains(reservation.getVatCountryCode()) && PriceContainer.VatStatus.isVatExempt(reservation.getVatStatus());<NEW_LINE>model.put("isEvent", purchaseContext.ofType(PurchaseContextType.event));<NEW_LINE>model.put("euBusiness", euBusiness);<NEW_LINE>model.put("publicId", configurationManager.getPublicReservationID(purchaseContext, reservation));<NEW_LINE>var additionalInfo = ticketReservationRepository.getAdditionalInfo(reservation.getId());<NEW_LINE>model.put("invoicingAdditionalInfo", additionalInfo.getInvoicingAdditionalInfo());<NEW_LINE>model.put("billingDetails", additionalInfo.getBillingDetails());<NEW_LINE>if (type == CREDIT_NOTE) {<NEW_LINE>model.put(CREDIT_NOTE_NUMBER, creditNoteNumber);<NEW_LINE>}<NEW_LINE>return model;<NEW_LINE>}
(groupingBy(Ticket::getCategoryId));
1,238,631
protected void updateValuesFromCurrentColor() {<NEW_LINE>int[] hsv = ColorUtils.RGBtoHSV(color);<NEW_LINE>int ch = hsv[0];<NEW_LINE>int cs = hsv[1];<NEW_LINE>int cv = hsv[2];<NEW_LINE>int cr = MathUtils.<MASK><NEW_LINE>int cg = MathUtils.round(color.g * 255.0f);<NEW_LINE>int cb = MathUtils.round(color.b * 255.0f);<NEW_LINE>int ca = MathUtils.round(color.a * 255.0f);<NEW_LINE>hBar.setValue(ch);<NEW_LINE>sBar.setValue(cs);<NEW_LINE>vBar.setValue(cv);<NEW_LINE>rBar.setValue(cr);<NEW_LINE>gBar.setValue(cg);<NEW_LINE>bBar.setValue(cb);<NEW_LINE>aBar.setValue(ca);<NEW_LINE>verticalBar.setValue(hBar.getValue());<NEW_LINE>palette.setValue(sBar.getValue(), vBar.getValue());<NEW_LINE>}
round(color.r * 255.0f);
917,310
public static Matrix St(double[][] x, double[] mean, int k, double tol) {<NEW_LINE>int n = x.length;<NEW_LINE>int p = x[0].length;<NEW_LINE>Matrix St = new Matrix(p, p);<NEW_LINE>St.uplo(UPLO.LOWER);<NEW_LINE>for (double[] xi : x) {<NEW_LINE>for (int j = 0; j < p; j++) {<NEW_LINE>for (int l = 0; l <= j; l++) {<NEW_LINE>St.add(j, l, (xi[j] - mean[j]) * (xi[l] - mean[l]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tol = tol * tol;<NEW_LINE>for (int j = 0; j < p; j++) {<NEW_LINE>for (int l = 0; l <= j; l++) {<NEW_LINE>St.div(j, l, (n - k));<NEW_LINE>St.set(l, j, St<MASK><NEW_LINE>}<NEW_LINE>if (St.get(j, j) < tol) {<NEW_LINE>throw new IllegalArgumentException(String.format("Covariance matrix (column %d) is close to singular.", j));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return St;<NEW_LINE>}
.get(j, l));
1,850,277
public static JPDADebugger attach(String hostName, int portNumber, Object[] services) throws DebuggerStartException {<NEW_LINE>Object[] s = new Object[services.length + 1];<NEW_LINE>System.arraycopy(services, 0, s, 1, services.length);<NEW_LINE>s[0] = <MASK><NEW_LINE>DebuggerEngine[] es = DebuggerManager.getDebuggerManager().startDebugging(DebuggerInfo.create(AttachingDICookie.ID, s));<NEW_LINE>int i, k = es.length;<NEW_LINE>for (i = 0; i < k; i++) {<NEW_LINE>JPDADebugger d = es[i].lookupFirst(null, JPDADebugger.class);<NEW_LINE>if (d == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>d.waitRunning();<NEW_LINE>return d;<NEW_LINE>}<NEW_LINE>throw new DebuggerStartException(NbBundle.getMessage(JPDADebugger.class, "MSG_NO_DEBUGGER"));<NEW_LINE>}
AttachingDICookie.create(hostName, portNumber);
1,433,612
protected boolean showHint(final JComponent component) {<NEW_LINE>myInsideShow = true;<NEW_LINE>if (myCurrentHint != null) {<NEW_LINE>myCurrentHint.hide();<NEW_LINE>}<NEW_LINE>myCurrentHint = new LightweightHint(component) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected boolean canAutoHideOn(TooltipEvent event) {<NEW_LINE>InputEvent inputEvent = event.getInputEvent();<NEW_LINE>if (inputEvent instanceof MouseEvent) {<NEW_LINE>Component comp = inputEvent.getComponent();<NEW_LINE>if (comp instanceof EditorComponentImpl) {<NEW_LINE>Editor editor = ((EditorComponentImpl) comp).getEditor();<NEW_LINE>return !isInsideCurrentRange(editor, ((MouseEvent) inputEvent).getPoint());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>myCurrentHint.addHintListener(new HintListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void hintHidden(EventObject event) {<NEW_LINE>if (myHideRunnable != null && !myInsideShow) {<NEW_LINE>myHideRunnable.run();<NEW_LINE>}<NEW_LINE>onHintHidden();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// editor may be disposed before later invokator process this action<NEW_LINE>if (myEditor.isDisposed() || myEditor.getComponent().getRootPane() == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Point p = HintManagerImpl.getHintPosition(myCurrentHint, myEditor, myEditor.xyToLogicalPosition(myPoint), HintManager.UNDER);<NEW_LINE>HintHint hint = HintManagerImpl.createHintHint(myEditor, p, <MASK><NEW_LINE>hint.setShowImmediately(true);<NEW_LINE>HintManagerImpl.getInstanceImpl().showEditorHint(myCurrentHint, myEditor, p, HintManager.HIDE_BY_ANY_KEY | HintManager.HIDE_BY_TEXT_CHANGE | HintManager.HIDE_BY_SCROLLING, 0, false, hint);<NEW_LINE>myInsideShow = false;<NEW_LINE>return true;<NEW_LINE>}
myCurrentHint, HintManager.UNDER, true);
860,450
protected void _fillDirectByteBuffer(ByteBuffer bb) {<NEW_LINE>// Taken from MacPixels<NEW_LINE>if (this.bytes != null) {<NEW_LINE>this.bytes.rewind();<NEW_LINE>if (this.bytes.isDirect()) {<NEW_LINE>_copyPixels(bb, this.bytes, getWidth() * getHeight());<NEW_LINE>} else {<NEW_LINE>bb.put(this.bytes);<NEW_LINE>}<NEW_LINE>this.bytes.rewind();<NEW_LINE>} else {<NEW_LINE>this.ints.rewind();<NEW_LINE>if (this.ints.isDirect()) {<NEW_LINE>_copyPixels(bb, this.ints, getWidth() * getHeight());<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i < this.ints.capacity(); i++) {<NEW_LINE>int data = this.ints.get();<NEW_LINE>bb.put((byte) ((data) & 0xff));<NEW_LINE>bb.put((byte) ((data >> 8) & 0xff));<NEW_LINE>bb.put((byte) ((data >> 16) & 0xff));<NEW_LINE>bb.put((byte) ((data <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.ints.rewind();<NEW_LINE>}<NEW_LINE>}
>> 24) & 0xff));
682,516
private JavaRDD<Rating> parsedToRatingRDD(JavaRDD<String[]> parsedRDD, Broadcast<? extends Map<String, Integer>> bUserIDToIndex, Broadcast<? extends Map<String, Integer>> bItemIDToIndex) {<NEW_LINE>JavaPairRDD<Long, Rating> timestampRatingRDD = parsedRDD.mapToPair(tokens -> {<NEW_LINE>try {<NEW_LINE>return new Tuple2<>(Long.valueOf(tokens[3]), new // Empty value means 'delete'; propagate as NaN<NEW_LINE>Rating(// Empty value means 'delete'; propagate as NaN<NEW_LINE>bUserIDToIndex.value().get(tokens[0]), // Empty value means 'delete'; propagate as NaN<NEW_LINE>bItemIDToIndex.value().get(tokens[1]), tokens[2].isEmpty() ? Double.NaN : Double.parseDouble(tokens[2])));<NEW_LINE>} catch (NumberFormatException | ArrayIndexOutOfBoundsException e) {<NEW_LINE>log.warn("Bad input: {}", Arrays.toString(tokens));<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (decayFactor < 1.0) {<NEW_LINE>double factor = decayFactor;<NEW_LINE><MASK><NEW_LINE>timestampRatingRDD = timestampRatingRDD.mapToPair(timestampRating -> {<NEW_LINE>long timestamp = timestampRating._1();<NEW_LINE>return new Tuple2<>(timestamp, decayRating(timestampRating._2(), timestamp, now, factor));<NEW_LINE>});<NEW_LINE>}<NEW_LINE>if (decayZeroThreshold > 0.0) {<NEW_LINE>double theThreshold = decayZeroThreshold;<NEW_LINE>timestampRatingRDD = timestampRatingRDD.filter(timestampRating -> timestampRating._2().rating() > theThreshold);<NEW_LINE>}<NEW_LINE>return timestampRatingRDD.sortByKey().values();<NEW_LINE>}
long now = System.currentTimeMillis();
1,642,427
public String sendCmd(final String cmd) {<NEW_LINE>try (final Socket clientSocket = new Socket(hostName, port);<NEW_LINE>final BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream(), ICmd.SICS_CMD_CHARSET));<NEW_LINE>final OutputStream out = clientSocket.getOutputStream()) {<NEW_LINE>clientSocket.setSoTimeout(readTimeoutMillis);<NEW_LINE>logger.debug("Writing cmd to the socket: {}", cmd);<NEW_LINE>out.write(cmd.getBytes(ICmd.SICS_CMD_CHARSET));<NEW_LINE>out.flush();<NEW_LINE>String result = null;<NEW_LINE>String lastReadLine = in.readLine();<NEW_LINE>if (returnLastLine) {<NEW_LINE>while (lastReadLine != null) {<NEW_LINE>result = lastReadLine;<NEW_LINE>lastReadLine = readWithTimeout(in);<NEW_LINE>}<NEW_LINE>logger.debug("Result (last line) as read from the socket: {}", result);<NEW_LINE>} else {<NEW_LINE>result = lastReadLine;<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>} catch (final UnknownHostException e) {<NEW_LINE>throw new EndPointException("Caught UnknownHostException: " + e.getLocalizedMessage(), e);<NEW_LINE>} catch (final IOException e) {<NEW_LINE>throw new EndPointException("Caught IOException: " + e.getLocalizedMessage(), e);<NEW_LINE>}<NEW_LINE>}
logger.debug("Result (first line) as read from the socket: {}", result);
1,505,583
public static QueryMediaWorkflowListResponse unmarshall(QueryMediaWorkflowListResponse queryMediaWorkflowListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryMediaWorkflowListResponse.setRequestId(_ctx.stringValue("QueryMediaWorkflowListResponse.RequestId"));<NEW_LINE>List<String> nonExistMediaWorkflowIds = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryMediaWorkflowListResponse.NonExistMediaWorkflowIds.Length"); i++) {<NEW_LINE>nonExistMediaWorkflowIds.add(_ctx.stringValue<MASK><NEW_LINE>}<NEW_LINE>queryMediaWorkflowListResponse.setNonExistMediaWorkflowIds(nonExistMediaWorkflowIds);<NEW_LINE>List<MediaWorkflow> mediaWorkflowList = new ArrayList<MediaWorkflow>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryMediaWorkflowListResponse.MediaWorkflowList.Length"); i++) {<NEW_LINE>MediaWorkflow mediaWorkflow = new MediaWorkflow();<NEW_LINE>mediaWorkflow.setCreationTime(_ctx.stringValue("QueryMediaWorkflowListResponse.MediaWorkflowList[" + i + "].CreationTime"));<NEW_LINE>mediaWorkflow.setMediaWorkflowId(_ctx.stringValue("QueryMediaWorkflowListResponse.MediaWorkflowList[" + i + "].MediaWorkflowId"));<NEW_LINE>mediaWorkflow.setState(_ctx.stringValue("QueryMediaWorkflowListResponse.MediaWorkflowList[" + i + "].State"));<NEW_LINE>mediaWorkflow.setTriggerMode(_ctx.stringValue("QueryMediaWorkflowListResponse.MediaWorkflowList[" + i + "].TriggerMode"));<NEW_LINE>mediaWorkflow.setName(_ctx.stringValue("QueryMediaWorkflowListResponse.MediaWorkflowList[" + i + "].Name"));<NEW_LINE>mediaWorkflow.setTopology(_ctx.stringValue("QueryMediaWorkflowListResponse.MediaWorkflowList[" + i + "].Topology"));<NEW_LINE>mediaWorkflowList.add(mediaWorkflow);<NEW_LINE>}<NEW_LINE>queryMediaWorkflowListResponse.setMediaWorkflowList(mediaWorkflowList);<NEW_LINE>return queryMediaWorkflowListResponse;<NEW_LINE>}
("QueryMediaWorkflowListResponse.NonExistMediaWorkflowIds[" + i + "]"));
261,149
public void establishCsAccessSourceSet() {<NEW_LINE>final SourceSetContainer sourceSets = (SourceSetContainer) project.getProperties().get("sourceSets");<NEW_LINE>final SourceSet mainSourceSet = sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME);<NEW_LINE>// Create the 'csaccess' source set<NEW_LINE>final SourceSet csaccessSourceSet = sourceSets.create(CSACCESS_SOURCESET_NAME);<NEW_LINE>csaccessSourceSet.setCompileClasspath(csaccessSourceSet.getCompileClasspath().plus(mainSourceSet.getOutput()));<NEW_LINE>csaccessSourceSet.setRuntimeClasspath(csaccessSourceSet.getRuntimeClasspath().plus(mainSourceSet.getOutput()));<NEW_LINE>// Derive all its configurations from 'main', so 'csaccess' code can see 'main' code<NEW_LINE>final ConfigurationContainer configurations = project.getConfigurations();<NEW_LINE>configurations.getByName(csaccessSourceSet.getImplementationConfigurationName()).extendsFrom(configurations.getByName(mainSourceSet.getImplementationConfigurationName()));<NEW_LINE>configurations.getByName(csaccessSourceSet.getCompileOnlyConfigurationName()).extendsFrom(configurations.getByName(mainSourceSet.getCompileOnlyConfigurationName()));<NEW_LINE>configurations.getByName(csaccessSourceSet.getCompileClasspathConfigurationName()).extendsFrom(configurations.getByName(mainSourceSet.getCompileClasspathConfigurationName()));<NEW_LINE>configurations.getByName(csaccessSourceSet.getRuntimeOnlyConfigurationName()).extendsFrom(configurations.getByName(mainSourceSet.getRuntimeOnlyConfigurationName()));<NEW_LINE>// Wire task dependencies to match the classpath dependencies (arrow means "depends on"):<NEW_LINE>// - compileTestJava -> compileCsaccessJava<NEW_LINE>// - testClasses -> csaccessClasses<NEW_LINE>// - jar -> csaccessClasses<NEW_LINE>final <MASK><NEW_LINE>tasks.getByName(JavaPlugin.COMPILE_TEST_JAVA_TASK_NAME).dependsOn(tasks.getByName(csaccessSourceSet.getCompileJavaTaskName()));<NEW_LINE>tasks.getByName(JavaPlugin.TEST_CLASSES_TASK_NAME).dependsOn(tasks.getByName(csaccessSourceSet.getClassesTaskName()));<NEW_LINE>tasks.getByName(JavaPlugin.JAR_TASK_NAME).dependsOn(tasks.getByName(csaccessSourceSet.getClassesTaskName()));<NEW_LINE>}
TaskContainer tasks = project.getTasks();
1,778,378
public UpdateScriptResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateScriptResult updateScriptResult = new UpdateScriptResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return updateScriptResult;<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("Script", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>updateScriptResult.setScript(ScriptJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return updateScriptResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,416,639
public UOWToken suspend() throws SystemException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "suspend");<NEW_LINE>Transaction transaction = null;<NEW_LINE>LocalTransactionCoordinator localTranCoord = null;<NEW_LINE>// All of the currently active UOWs must be suspended<NEW_LINE>// and a UOWToken created which will allow them to be<NEW_LINE>// resumed.<NEW_LINE>try {<NEW_LINE>transaction = EmbeddableTransactionManagerFactory.getTransactionManager().suspend();<NEW_LINE>} catch (Exception e) {<NEW_LINE>FFDCFilter.processException(e, "com.ibm.ws.uow.UOWManagerImpl.suspend", "109", this);<NEW_LINE>if (tc.isEventEnabled())<NEW_LINE>Tr.event(tc, "Exception caught suspending transaction", e);<NEW_LINE>final SystemException se = new SystemException(e);<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.exit(tc, "suspend", se);<NEW_LINE>throw se;<NEW_LINE>}<NEW_LINE>// An LTC and a global transaction cannot exist on the same<NEW_LINE>// thread concurrently so only attempt an LTC suspend if<NEW_LINE>// a global transaction wasn't suspended above.<NEW_LINE>if (transaction == null) {<NEW_LINE>localTranCoord = EmbeddableTransactionManagerFactory.getLocalTransactionCurrent().suspend();<NEW_LINE>}<NEW_LINE>UOWToken uowToken = null;<NEW_LINE>if (transaction != null || localTranCoord != null) {<NEW_LINE>uowToken <MASK><NEW_LINE>}<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.exit(tc, "suspend", uowToken);<NEW_LINE>return uowToken;<NEW_LINE>}
= new EmbeddableUOWTokenImpl(transaction, localTranCoord);
257,368
final ListDomainNamesResult executeListDomainNames(ListDomainNamesRequest listDomainNamesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDomainNamesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListDomainNamesRequest> request = null;<NEW_LINE>Response<ListDomainNamesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListDomainNamesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDomainNamesRequest));<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, "OpenSearch");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDomainNames");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListDomainNamesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDomainNamesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
350,981
public void unparse(SqlWriter writer, int leftPrec, int rightPrec) {<NEW_LINE>writer.<MASK><NEW_LINE>writer.sep("REPLACE");<NEW_LINE>for (SqlNode keyword : keywords) {<NEW_LINE>keyword.unparse(writer, 0, 0);<NEW_LINE>}<NEW_LINE>writer.sep("INTO");<NEW_LINE>final int opLeft = getOperator().getLeftPrec();<NEW_LINE>final int opRight = getOperator().getRightPrec();<NEW_LINE>targetTable.unparse(writer, opLeft, opRight);<NEW_LINE>if (columnList != null) {<NEW_LINE>columnList.unparse(writer, opLeft, opRight);<NEW_LINE>}<NEW_LINE>writer.newlineAndIndent();<NEW_LINE>if (source.getKind() == SqlKind.UNION) {<NEW_LINE>// if it's a union, don't add brackets.<NEW_LINE>writer.getDialect().unparseCall(writer, (SqlCall) source, 0, 0);<NEW_LINE>} else {<NEW_LINE>source.unparse(writer, 0, 0);<NEW_LINE>}<NEW_LINE>}
startList(SqlWriter.FrameTypeEnum.SELECT);
1,545,457
public Response removeMember(@FormParam("selection") @DefaultValue("MEMBER") String selectionType, @PathParam("queryname") String queryName, @PathParam("axis") String axisName, @PathParam("dimension") String dimensionName, @PathParam("member") String uniqueMemberName) {<NEW_LINE>try {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("TRACK\t" + "\t/query/" + queryName + "/axis/" + axisName + "/dimension/" + dimensionName + "/member/" + uniqueMemberName + "\tDELETE");<NEW_LINE>}<NEW_LINE>boolean ret = olapQueryService.removeMember(queryName, dimensionName, uniqueMemberName, selectionType);<NEW_LINE>if (ret) {<NEW_LINE>SaikuDimensionSelection dimsels = olapQueryService.getAxisDimensionSelections(queryName, axisName, dimensionName);<NEW_LINE>if (dimsels != null && dimsels.getSelections().size() == 0) {<NEW_LINE>olapQueryService.moveDimension(queryName, "UNUSED", dimensionName, -1);<NEW_LINE>}<NEW_LINE>return Response<MASK><NEW_LINE>} else {<NEW_LINE>throw new Exception("Cannot remove member " + dimensionName + " for query (" + queryName + ")");<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Cannot remove member " + dimensionName + " for query (" + queryName + ")", e);<NEW_LINE>return Response.serverError().entity(e.getMessage()).status(Status.INTERNAL_SERVER_ERROR).build();<NEW_LINE>}<NEW_LINE>}
.ok().build();
369,998
public void runApplication() {<NEW_LINE>Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "ReactRootView.runApplication");<NEW_LINE>try {<NEW_LINE>if (mReactInstanceManager == null || !mIsAttachedToInstance) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (reactContext == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CatalystInstance catalystInstance = reactContext.getCatalystInstance();<NEW_LINE>String jsAppModuleName = getJSModuleName();<NEW_LINE>if (mWasMeasured) {<NEW_LINE>updateRootLayoutSpecs(true, mWidthMeasureSpec, mHeightMeasureSpec);<NEW_LINE>}<NEW_LINE>WritableNativeMap appParams = new WritableNativeMap();<NEW_LINE>appParams.putDouble("rootTag", getRootViewTag());<NEW_LINE>@Nullable<NEW_LINE>Bundle appProperties = getAppProperties();<NEW_LINE>if (appProperties != null) {<NEW_LINE>appParams.putMap("initialProps", Arguments.fromBundle(appProperties));<NEW_LINE>}<NEW_LINE>mShouldLogContentAppeared = true;<NEW_LINE>catalystInstance.getJSModule(AppRegistry.class).runApplication(jsAppModuleName, appParams);<NEW_LINE>} finally {<NEW_LINE>Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);<NEW_LINE>}<NEW_LINE>}
ReactContext reactContext = mReactInstanceManager.getCurrentReactContext();
1,206,611
public Metric deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {<NEW_LINE>JsonObject jsonObject = jsonElement.getAsJsonObject();<NEW_LINE>String name = null;<NEW_LINE>if (jsonObject.get("name") != null)<NEW_LINE>name = jsonObject.get("name").getAsString();<NEW_LINE>boolean exclude_tags = false;<NEW_LINE>if (jsonObject.get("exclude_tags") != null)<NEW_LINE>exclude_tags = jsonObject.get("exclude_tags").getAsBoolean();<NEW_LINE>TreeMultimap<String, String> tags = TreeMultimap.create();<NEW_LINE>JsonElement jeTags = jsonObject.get("tags");<NEW_LINE>if (jeTags != null) {<NEW_LINE>JsonObject joTags = jeTags.getAsJsonObject();<NEW_LINE>int count = 0;<NEW_LINE>for (Map.Entry<String, JsonElement> tagEntry : joTags.entrySet()) {<NEW_LINE>String context = "tags[" + count + "]";<NEW_LINE>if (tagEntry.getKey().isEmpty())<NEW_LINE>throw new ContextualJsonSyntaxException(context, "name must not be empty");<NEW_LINE>if (tagEntry.getValue().isJsonArray()) {<NEW_LINE>for (JsonElement element : tagEntry.getValue().getAsJsonArray()) {<NEW_LINE>if (element.isJsonNull() || element.getAsString().isEmpty())<NEW_LINE>throw new ContextualJsonSyntaxException(context + "." + tagEntry.getKey(), "value must not be null or empty");<NEW_LINE>tags.put(tagEntry.getKey(), element.getAsString());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (tagEntry.getValue().isJsonNull() || tagEntry.getValue().getAsString().isEmpty())<NEW_LINE>throw new ContextualJsonSyntaxException(context + "." + tagEntry.getKey(), "value must not be null or empty");<NEW_LINE>tags.put(tagEntry.getKey(), tagEntry.<MASK><NEW_LINE>}<NEW_LINE>count++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Metric ret = new Metric(name, exclude_tags, tags);<NEW_LINE>JsonElement limit = jsonObject.get("limit");<NEW_LINE>if (limit != null)<NEW_LINE>ret.setLimit(limit.getAsInt());<NEW_LINE>return (ret);<NEW_LINE>}
getValue().getAsString());
779,258
private void handleActiveAndJoined(JoinMessage joinMessage) {<NEW_LINE>if (!(joinMessage instanceof JoinRequest)) {<NEW_LINE>logDroppedMessage(joinMessage);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ClusterServiceImpl clusterService = node.getClusterService();<NEW_LINE>Address masterAddress = clusterService.getMasterAddress();<NEW_LINE>if (clusterService.isMaster()) {<NEW_LINE>JoinMessage response = new JoinMessage(Packet.VERSION, node.getBuildInfo().getBuildNumber(), node.getVersion(), node.getThisAddress(), node.getThisUuid(), node.isLiteMember(), node.createConfigCheck());<NEW_LINE>node.multicastService.send(response);<NEW_LINE>} else if (joinMessage.getAddress().equals(masterAddress)) {<NEW_LINE>MemberImpl master = node.getClusterService().getMember(masterAddress);<NEW_LINE>if (master != null) {<NEW_LINE>UUID uuidFromMaster = master.getUuid();<NEW_LINE>UUID uuidInJoinRequest = joinMessage.getUuid();<NEW_LINE>if (!uuidFromMaster.equals(uuidInJoinRequest)) {<NEW_LINE>String message = "New join request has been received from current master address. " + "The UUID in the join request (" + uuidInJoinRequest + ") is different from the " + "known master one (" + uuidFromMaster + "). Suspecting the master address: " + masterAddress;<NEW_LINE>logger.warning(message);<NEW_LINE>// I just make a local suspicion. Probably other nodes will eventually suspect as well.<NEW_LINE>clusterService.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
suspectMember(master, message, false);
1,402,282
public ListThingsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListThingsResult listThingsResult = new ListThingsResult();<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 listThingsResult;<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("things", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listThingsResult.setThings(new ListUnmarshaller<ThingAttribute>(ThingAttributeJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("nextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listThingsResult.setNextToken(context.getUnmarshaller(String.<MASK><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 listThingsResult;<NEW_LINE>}
class).unmarshall(context));