idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,201,929
public static QueryUserGroupListByParentIdResponse unmarshall(QueryUserGroupListByParentIdResponse queryUserGroupListByParentIdResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryUserGroupListByParentIdResponse.setRequestId(_ctx.stringValue("QueryUserGroupListByParentIdResponse.RequestId"));<NEW_LINE>queryUserGroupListByParentIdResponse.setSuccess(_ctx.booleanValue("QueryUserGroupListByParentIdResponse.Success"));<NEW_LINE>List<Data> result = new ArrayList<Data>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryUserGroupListByParentIdResponse.Result.Length"); i++) {<NEW_LINE>Data data = new Data();<NEW_LINE>data.setIdentifiedPath(_ctx.stringValue("QueryUserGroupListByParentIdResponse.Result[" + i + "].IdentifiedPath"));<NEW_LINE>data.setModifiedTime(_ctx.stringValue("QueryUserGroupListByParentIdResponse.Result[" + i + "].ModifiedTime"));<NEW_LINE>data.setCreateUser(_ctx.stringValue("QueryUserGroupListByParentIdResponse.Result[" + i + "].CreateUser"));<NEW_LINE>data.setCreateTime(_ctx.stringValue("QueryUserGroupListByParentIdResponse.Result[" + i + "].CreateTime"));<NEW_LINE>data.setUserGroupId(_ctx.stringValue("QueryUserGroupListByParentIdResponse.Result[" + i + "].UserGroupId"));<NEW_LINE>data.setUserGroupName(_ctx.stringValue("QueryUserGroupListByParentIdResponse.Result[" + i + "].UserGroupName"));<NEW_LINE>data.setModifyUser(_ctx.stringValue("QueryUserGroupListByParentIdResponse.Result[" + i + "].ModifyUser"));<NEW_LINE>data.setParentUserGroupId(_ctx.stringValue<MASK><NEW_LINE>data.setUserGroupDescription(_ctx.stringValue("QueryUserGroupListByParentIdResponse.Result[" + i + "].UserGroupDescription"));<NEW_LINE>result.add(data);<NEW_LINE>}<NEW_LINE>queryUserGroupListByParentIdResponse.setResult(result);<NEW_LINE>return queryUserGroupListByParentIdResponse;<NEW_LINE>}
("QueryUserGroupListByParentIdResponse.Result[" + i + "].ParentUserGroupId"));
1,553,574
public void fetchOffset(SqlNode fetch, SqlNode offset) {<NEW_LINE>if (fetch == null && offset == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (dialect.supportsOffsetFetch()) {<NEW_LINE>if (offset != null) {<NEW_LINE>this.newlineAndIndent();<NEW_LINE>final Frame offsetFrame = this.startList(FrameTypeEnum.OFFSET);<NEW_LINE>this.keyword("OFFSET");<NEW_LINE>offset.unparse(this, -1, -1);<NEW_LINE>this.keyword("ROWS");<NEW_LINE>this.endList(offsetFrame);<NEW_LINE>}<NEW_LINE>if (fetch != null) {<NEW_LINE>this.newlineAndIndent();<NEW_LINE>final Frame fetchFrame = this.startList(FrameTypeEnum.FETCH);<NEW_LINE>this.keyword("FETCH");<NEW_LINE>this.keyword("NEXT");<NEW_LINE>fetch.unparse(this, -1, -1);<NEW_LINE>this.keyword("ROWS");<NEW_LINE>this.keyword("ONLY");<NEW_LINE>this.endList(fetchFrame);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Dialect does not support OFFSET/FETCH clause.<NEW_LINE>// Assume it uses LIMIT/OFFSET.<NEW_LINE>if (fetch != null) {<NEW_LINE>this.newlineAndIndent();<NEW_LINE>final Frame fetchFrame = this.startList(FrameTypeEnum.FETCH);<NEW_LINE>this.keyword("LIMIT");<NEW_LINE>fetch.unparse(this, -1, -1);<NEW_LINE>this.endList(fetchFrame);<NEW_LINE>}<NEW_LINE>if (offset != null) {<NEW_LINE>this.newlineAndIndent();<NEW_LINE>final Frame offsetFrame = <MASK><NEW_LINE>this.keyword("OFFSET");<NEW_LINE>offset.unparse(this, -1, -1);<NEW_LINE>this.endList(offsetFrame);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
this.startList(FrameTypeEnum.OFFSET);
694,918
public Accordion.Tab addTab(String name, Component childComponent) {<NEW_LINE>if (childComponent.getParent() != null && childComponent.getParent() != this) {<NEW_LINE>throw new IllegalStateException("Component already has parent");<NEW_LINE>}<NEW_LINE>Tab tab = new Tab(name, childComponent);<NEW_LINE>this.tabs.put(name, tab);<NEW_LINE>com.vaadin.ui.Component tabComponent = childComponent.unwrapComposition(com.vaadin.ui.Component.class);<NEW_LINE>tabComponent.setSizeFull();<NEW_LINE>tabMapping.put(tabComponent, new ComponentDescriptor(name, childComponent));<NEW_LINE>com.vaadin.ui.Accordion.Tab tabControl = this.component.addTab(tabComponent);<NEW_LINE>if (getDebugId() != null) {<NEW_LINE>this.component.setTestId(tabControl, AppUI.getCurrent().getTestIdManager().getTestId(getDebugId<MASK><NEW_LINE>}<NEW_LINE>if (AppUI.getCurrent().isTestMode()) {<NEW_LINE>this.component.setCubaId(tabControl, name);<NEW_LINE>}<NEW_LINE>if (frame != null) {<NEW_LINE>if (childComponent instanceof BelongToFrame && ((BelongToFrame) childComponent).getFrame() == null) {<NEW_LINE>((BelongToFrame) childComponent).setFrame(frame);<NEW_LINE>} else {<NEW_LINE>((FrameImplementation) frame).registerComponent(childComponent);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>childComponent.setParent(this);<NEW_LINE>return tab;<NEW_LINE>}
() + "." + name));
1,685,265
public String combine(String pattern1, String pattern2) {<NEW_LINE>if (StrUtil.isEmpty(pattern1) && StrUtil.isEmpty(pattern2)) {<NEW_LINE>return StrUtil.EMPTY;<NEW_LINE>}<NEW_LINE>if (StrUtil.isEmpty(pattern1)) {<NEW_LINE>return pattern2;<NEW_LINE>}<NEW_LINE>if (StrUtil.isEmpty(pattern2)) {<NEW_LINE>return pattern1;<NEW_LINE>}<NEW_LINE>boolean pattern1ContainsUriVar = (pattern1.indexOf('{') != -1);<NEW_LINE>if (!pattern1.equals(pattern2) && !pattern1ContainsUriVar && match(pattern1, pattern2)) {<NEW_LINE>// /* + /hotel -> /hotel ; "/*.*" + "/*.html" -> /*.html<NEW_LINE>// However /user + /user -> /usr/user ; /{foo} + /bar -> /{foo}/bar<NEW_LINE>return pattern2;<NEW_LINE>}<NEW_LINE>// /hotels/* + /booking -> /hotels/booking<NEW_LINE>// /hotels/* + booking -> /hotels/booking<NEW_LINE>if (pattern1.endsWith(this.pathSeparatorPatternCache.getEndsOnWildCard())) {<NEW_LINE>return concat(pattern1.substring(0, pattern1.length() - 2), pattern2);<NEW_LINE>}<NEW_LINE>// /hotels/** + /booking -> /hotels/**/booking<NEW_LINE>// /hotels/** + booking -> /hotels/**/booking<NEW_LINE>if (pattern1.endsWith(this.pathSeparatorPatternCache.getEndsOnDoubleWildCard())) {<NEW_LINE>return concat(pattern1, pattern2);<NEW_LINE>}<NEW_LINE>int starDotPos1 = pattern1.indexOf("*.");<NEW_LINE>if (pattern1ContainsUriVar || starDotPos1 == -1 || this.pathSeparator.equals(".")) {<NEW_LINE>// simply concatenate the two patterns<NEW_LINE>return concat(pattern1, pattern2);<NEW_LINE>}<NEW_LINE>String ext1 = pattern1.substring(starDotPos1 + 1);<NEW_LINE>int dotPos2 = pattern2.indexOf('.');<NEW_LINE>String file2 = (dotPos2 == -1 ? pattern2 : pattern2.substring(0, dotPos2));<NEW_LINE>String ext2 = (dotPos2 == -1 ? "" : pattern2.substring(dotPos2));<NEW_LINE>boolean ext1All = (ext1.equals(".*"<MASK><NEW_LINE>boolean ext2All = (ext2.equals(".*") || ext2.isEmpty());<NEW_LINE>if (!ext1All && !ext2All) {<NEW_LINE>throw new IllegalArgumentException("Cannot combine patterns: " + pattern1 + " vs " + pattern2);<NEW_LINE>}<NEW_LINE>String ext = (ext1All ? ext2 : ext1);<NEW_LINE>return file2 + ext;<NEW_LINE>}
) || ext1.isEmpty());
1,369,055
private boolean suspectMemberIfNotHeartBeating(long now, Member member) {<NEW_LINE>if (clusterService.getMembershipManager().isMemberSuspected((MemberImpl) member)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>long lastHeartbeat = heartbeatFailureDetector.lastHeartbeat(member);<NEW_LINE>if (!heartbeatFailureDetector.isAlive(member, now)) {<NEW_LINE>double suspicionLevel = heartbeatFailureDetector.suspicionLevel(member, now);<NEW_LINE>String reason = format("Suspecting %s because it has not sent any heartbeats since %s." + " Now: %s, heartbeat timeout: %d ms, suspicion level: %.2f", member, timeToString(lastHeartbeat), timeToString<MASK><NEW_LINE>logger.warning(reason);<NEW_LINE>clusterService.suspectMember(member, reason, true);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (logger.isFineEnabled() && (now - lastHeartbeat) > heartbeatIntervalMillis * HEART_BEAT_INTERVAL_FACTOR) {<NEW_LINE>double suspicionLevel = heartbeatFailureDetector.suspicionLevel(member, now);<NEW_LINE>logger.fine(format("Not receiving any heartbeats from %s since %s, suspicion level: %.2f", member, timeToString(lastHeartbeat), suspicionLevel));<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
(now), maxNoHeartbeatMillis, suspicionLevel);
1,651,864
private static AttributeInfo loadBody(short attributeNameIndex, ClassFile classFile, DataInputStream dis) throws IOException {<NEW_LINE>// max_stack<NEW_LINE>final short maxStack = dis.readShort();<NEW_LINE>// max_locals<NEW_LINE>final <MASK><NEW_LINE>// code_length, code<NEW_LINE>final byte[] code = ClassFile.readLengthAndBytes(dis);<NEW_LINE>// exception_table_length<NEW_LINE>ExceptionTableEntry[] etes = new ExceptionTableEntry[dis.readUnsignedShort()];<NEW_LINE>for (int i = 0; i < etes.length; ++i) {<NEW_LINE>// exception_table<NEW_LINE>etes[i] = new // startPC<NEW_LINE>ExceptionTableEntry(// endPC<NEW_LINE>dis.readShort(), // handlerPC<NEW_LINE>dis.readShort(), // catchType<NEW_LINE>dis.readShort(), dis.readShort());<NEW_LINE>}<NEW_LINE>// attributes_count<NEW_LINE>AttributeInfo[] attributes = new AttributeInfo[dis.readUnsignedShort()];<NEW_LINE>for (int i = 0; i < attributes.length; ++i) {<NEW_LINE>// attributes<NEW_LINE>attributes[i] = classFile.loadAttribute(dis);<NEW_LINE>}<NEW_LINE>return new // attributeNameIndex<NEW_LINE>CodeAttribute(// maxStack<NEW_LINE>attributeNameIndex, // maxLocals<NEW_LINE>maxStack, // code<NEW_LINE>maxLocals, // exceptionTableEntries<NEW_LINE>code, // attributes<NEW_LINE>etes, attributes);<NEW_LINE>}
short maxLocals = dis.readShort();
983,451
public void write(org.apache.thrift.protocol.TProtocol prot, conditionalUpdate_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetTinfo()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (struct.isSetSessID()) {<NEW_LINE>optionals.set(1);<NEW_LINE>}<NEW_LINE>if (struct.isSetMutations()) {<NEW_LINE>optionals.set(2);<NEW_LINE>}<NEW_LINE>if (struct.isSetSymbols()) {<NEW_LINE>optionals.set(3);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (struct.isSetTinfo()) {<NEW_LINE>struct.tinfo.write(oprot);<NEW_LINE>}<NEW_LINE>if (struct.isSetSessID()) {<NEW_LINE>oprot.writeI64(struct.sessID);<NEW_LINE>}<NEW_LINE>if (struct.isSetMutations()) {<NEW_LINE>{<NEW_LINE>oprot.writeI32(struct.mutations.size());<NEW_LINE>for (java.util.Map.Entry<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TConditionalMutation>> _iter289 : struct.mutations.entrySet()) {<NEW_LINE>_iter289.getKey().write(oprot);<NEW_LINE>{<NEW_LINE>oprot.writeI32(_iter289.getValue().size());<NEW_LINE>for (org.apache.accumulo.core.dataImpl.thrift.TConditionalMutation _iter290 : _iter289.getValue()) {<NEW_LINE>_iter290.write(oprot);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (struct.isSetSymbols()) {<NEW_LINE>{<NEW_LINE>oprot.writeI32(struct.symbols.size());<NEW_LINE>for (java.lang.String _iter291 : struct.symbols) {<NEW_LINE>oprot.writeString(_iter291);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
oprot.writeBitSet(optionals, 4);
1,509,599
public RemoveAttributesActivity unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RemoveAttributesActivity removeAttributesActivity = new RemoveAttributesActivity();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>removeAttributesActivity.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("attributes", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>removeAttributesActivity.setAttributes(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("next", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>removeAttributesActivity.setNext(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 removeAttributesActivity;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,455,228
public <T> ISignalWriteStream putBinary(final String cacheKey, final T jsonObject, final long timeToLive) throws IOException {<NEW_LINE>final CacheEntry entry = new CacheEntry();<NEW_LINE>entry.setExpiresOn(System.currentTimeMillis() + (timeToLive * 1000));<NEW_LINE>entry.setHead(JSON_MAPPER.writeValueAsString(jsonObject));<NEW_LINE>final IApimanBuffer data = bufferFactory.createBuffer();<NEW_LINE>return new ISignalWriteStream() {<NEW_LINE><NEW_LINE>boolean finished = false;<NEW_LINE><NEW_LINE>boolean aborted = false;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void abort(Throwable t) {<NEW_LINE>finished = true;<NEW_LINE>aborted = false;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean isFinished() {<NEW_LINE>return finished;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void write(IApimanBuffer chunk) {<NEW_LINE>data.append(chunk);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void end() {<NEW_LINE>if (!aborted) {<NEW_LINE>entry.setData(Base64.encodeBase64String(data.getBytes()));<NEW_LINE>try {<NEW_LINE>getStore().<MASK><NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOGGER.error("Error writing binary cache entry with key: {}", cacheKey, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>finished = true;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
put(cacheKey, entry, timeToLive);
169,951
public String solutionToString(int fractionDigits) {<NEW_LINE>if (!isSolvable()) {<NEW_LINE>throw new IllegalStateException("System is not solvable!");<NEW_LINE>}<NEW_LINE>DecimalFormat nf = new DecimalFormat();<NEW_LINE>nf.setMinimumFractionDigits(fractionDigits);<NEW_LINE>nf.setMaximumFractionDigits(fractionDigits);<NEW_LINE>nf.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US));<NEW_LINE>nf.setNegativePrefix("");<NEW_LINE>nf.setPositivePrefix("");<NEW_LINE>int row = coeff[0].length >> 1;<NEW_LINE>int paramsDigits = integerDigits(u.length);<NEW_LINE>int x0Digits = maxIntegerDigits(x_0);<NEW_LINE>int[] uDigits = maxIntegerDigits(u);<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < x_0.length; i++) {<NEW_LINE>format(nf, buffer, x_0[i], x0Digits);<NEW_LINE>for (int j = 0; j < u[0].length; j++) {<NEW_LINE>if (i == row) {<NEW_LINE>buffer.append(" + a_").append(j).append(" * ");<NEW_LINE>} else {<NEW_LINE>FormatUtil.appendSpace(buffer, paramsDigits + 10);<NEW_LINE>}<NEW_LINE>format(nf, buffer, u[i][j], uDigits[j]);<NEW_LINE>}<NEW_LINE>buffer.append('\n');<NEW_LINE>}<NEW_LINE>return buffer.toString();<NEW_LINE>}
StringBuilder buffer = new StringBuilder(1000);
1,583,069
public Map<GdbRegister, BigInteger> complete(GdbPendingCommand<?> pending) {<NEW_LINE>GdbCommandDoneEvent done = pending.checkCompletion(GdbCommandDoneEvent.class);<NEW_LINE>if (regs.isEmpty()) {<NEW_LINE>return Collections.emptyMap();<NEW_LINE>}<NEW_LINE>Map<Integer, GdbRegister> regsByNumber = regs.stream().collect(Collectors.toMap(GdbRegister::getNumber, r -> r));<NEW_LINE>List<GdbMiFieldList> valueList = done.assumeRegisterValueList();<NEW_LINE>Map<GdbRegister, BigInteger> result = new LinkedHashMap<>();<NEW_LINE>for (GdbMiFieldList fields : valueList) {<NEW_LINE>int number = Integer.parseInt(fields.getString("number"));<NEW_LINE>String value = fields.getString("value");<NEW_LINE>GdbRegister r = regsByNumber.get(number);<NEW_LINE>if (r == null) {<NEW_LINE>Msg.error(this, "GDB gave value for non-requested register: " + number);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>result.put(r, parseAndFindInteger(value<MASK><NEW_LINE>} catch (GdbParseError | AssertionError e) {<NEW_LINE>Msg.warn(this, "Could not figure register value for [" + number + "] = " + value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
, r.getSize()));
1,665,628
private void ajaxFetchFlowInfo(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final String projectName, final String flowId) throws ServletException {<NEW_LINE>final Project project = getProjectAjaxByPermission(ret, projectName, user, Type.READ);<NEW_LINE>if (project == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Flow flow = project.getFlow(flowId);<NEW_LINE>if (flow == null) {<NEW_LINE>ret.put("error", <MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ret.put("successEmails", flow.getSuccessEmails());<NEW_LINE>ret.put("failureEmails", flow.getFailureEmails());<NEW_LINE>Schedule sflow = null;<NEW_LINE>try {<NEW_LINE>for (final Schedule sched : this.scheduleManager.getSchedules()) {<NEW_LINE>if (sched.getProjectId() == project.getId() && sched.getFlowName().equals(flowId)) {<NEW_LINE>sflow = sched;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (final ScheduleManagerException e) {<NEW_LINE>// TODO Auto-generated catch block<NEW_LINE>throw new ServletException(e);<NEW_LINE>}<NEW_LINE>if (sflow != null) {<NEW_LINE>ret.put("scheduled", sflow.getNextExecTime());<NEW_LINE>}<NEW_LINE>}
"Error loading flow. Flow " + flowId + " doesn't exist in " + projectName);
868,360
private void handleDetermineSize(boolean detected) {<NEW_LINE>String message = "Determine Scale: Hold target in view and center";<NEW_LINE>if (detected) {<NEW_LINE>double stationaryTime = actions.getStationaryTime();<NEW_LINE>CalibrationObservation points;<NEW_LINE>synchronized (detectorLock) {<NEW_LINE>points = detector.getDetectedPoints();<NEW_LINE>points.sort();<NEW_LINE>view.getQuadFocus(points, focusQuad);<NEW_LINE>}<NEW_LINE>double top = focusQuad.get(0).distance(focusQuad.get(1));<NEW_LINE>double right = focusQuad.get(1).distance(focusQuad.get(2));<NEW_LINE>double bottom = focusQuad.get(2).distance(focusQuad.get(3));<NEW_LINE>double left = focusQuad.get(3).distance(focusQuad.get(0));<NEW_LINE>double ratioHorizontal = Math.min(top, bottom) / Math.max(top, bottom);<NEW_LINE>double ratioVertical = Math.min(left, right) / Math.max(left, right);<NEW_LINE>boolean skewed = false;<NEW_LINE>if (ratioHorizontal <= CENTER_SKEW || ratioVertical <= CENTER_SKEW) {<NEW_LINE>actions.resetStationary();<NEW_LINE>skewed = true;<NEW_LINE>ratioHorizontal *= 100.0;<NEW_LINE>ratioVertical *= 100.0;<NEW_LINE>message = String.format("Straighten out. H %3d V %3d", (int) ratioHorizontal, (int) ratioVertical);<NEW_LINE>} else {<NEW_LINE>if (stationaryTime > STILL_THRESHOLD) {<NEW_LINE>actions.resetStationary();<NEW_LINE>saver.setTemplate(input, focusQuad);<NEW_LINE>gui.getInfoPanel().updateTemplate(saver.getTemplate());<NEW_LINE>actions.resetStationary();<NEW_LINE>state = State.REMOVE_DOTS;<NEW_LINE>canonicalWidth = Math.max(top, bottom);<NEW_LINE>padding = (int) (view.getBufferWidth(canonicalWidth) * 1.1);<NEW_LINE>selectMagnetLocations();<NEW_LINE>}<NEW_LINE>if (stationaryTime > DISPLAY_TIME) {<NEW_LINE>message = String.format("Hold still: %6.1f", stationaryTime);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int r = 6;<NEW_LINE>int w = 2 * r + 1;<NEW_LINE>if (skewed) {<NEW_LINE>g2.setColor(Color.BLUE);<NEW_LINE>for (int i = 0; i < points.size(); i++) {<NEW_LINE>Point2D_F64 p = points.points.get(i).p;<NEW_LINE>ellipse.setFrame(p.x - r, p.y - r, w, w);<NEW_LINE>g2.draw(ellipse);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>gui.setMessage(message);<NEW_LINE>}
renderCalibrationPoints(stationaryTime, points.points);
259,021
public // false -> UDP<NEW_LINE>void // false -> UDP<NEW_LINE>addPortMapping(boolean tcp, int port, String description) throws UPnPException {<NEW_LINE>UPnPAction act = service.getAction("AddPortMapping");<NEW_LINE>if (act == null) {<NEW_LINE>log("Action 'AddPortMapping' not supported, binding not established");<NEW_LINE>} else {<NEW_LINE>UPnPActionInvocation add_inv = act.getInvocation();<NEW_LINE>// "" = wildcard for hosts, 0 = wildcard for ports<NEW_LINE>add_inv.addArgument("NewRemoteHost", "");<NEW_LINE>add_inv.addArgument("NewExternalPort", "" + port);<NEW_LINE>add_inv.addArgument("NewProtocol", tcp ? "TCP" : "UDP");<NEW_LINE>add_inv.addArgument("NewInternalPort", "" + port);<NEW_LINE>add_inv.addArgument("NewInternalClient", service.getDevice().getRootDevice().getLocalAddress().getHostAddress());<NEW_LINE>add_inv.addArgument("NewEnabled", "1");<NEW_LINE>add_inv.addArgument("NewPortMappingDescription", description);<NEW_LINE>// 0 -> infinite (?)<NEW_LINE><MASK><NEW_LINE>boolean ok = false;<NEW_LINE>try {<NEW_LINE>add_inv.invoke();<NEW_LINE>ok = true;<NEW_LINE>} catch (UPnPException original_error) {<NEW_LINE>// some routers won't add properly if the mapping's already there<NEW_LINE>try {<NEW_LINE>log("Problem when adding port mapping - will try to see if an existing mapping is in the way");<NEW_LINE>deletePortMapping(tcp, port);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>throw (original_error);<NEW_LINE>}<NEW_LINE>add_inv.invoke();<NEW_LINE>ok = true;<NEW_LINE>} finally {<NEW_LINE>((UPnPRootDeviceImpl) service.getDevice().getRootDevice()).portMappingResult(ok);<NEW_LINE>for (int i = 0; i < listeners.size(); i++) {<NEW_LINE>UPnPWANConnectionListener listener = (UPnPWANConnectionListener) listeners.get(i);<NEW_LINE>try {<NEW_LINE>listener.mappingResult(this, ok);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>Debug.printStackTrace(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>class_mon.enter();<NEW_LINE>Iterator it = mappings.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>portMapping m = (portMapping) it.next();<NEW_LINE>if (m.getExternalPort() == port && m.isTCP() == tcp) {<NEW_LINE>it.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mappings.add(new portMapping(port, tcp, "", description));<NEW_LINE>} finally {<NEW_LINE>class_mon.exit();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
add_inv.addArgument("NewLeaseDuration", "0");
934,008
private JPanel expertSettings() {<NEW_LINE>JPanel panel = new JPanel(<MASK><NEW_LINE>panel.setOpaque(false);<NEW_LINE>JPanel header = new JPanel(new FlowLayout(FlowLayout.LEADING));<NEW_LINE>header.setOpaque(false);<NEW_LINE>header.add(new JLabel(MessageUtils.getLocalizedMessage("openindex.label.expert")));<NEW_LINE>panel.add(header);<NEW_LINE>JPanel dirImpl = new JPanel(new FlowLayout(FlowLayout.LEADING));<NEW_LINE>dirImpl.setOpaque(false);<NEW_LINE>dirImpl.add(new JLabel(MessageUtils.getLocalizedMessage("openindex.label.dir_impl")));<NEW_LINE>dirImpl.add(dirImplCombo);<NEW_LINE>panel.add(dirImpl);<NEW_LINE>JPanel noReader = new JPanel(new FlowLayout(FlowLayout.LEADING));<NEW_LINE>noReader.setOpaque(false);<NEW_LINE>noReader.add(noReaderCB);<NEW_LINE>JLabel noReaderIcon = new JLabel(FontUtils.elegantIconHtml("&#xe077;"));<NEW_LINE>noReader.add(noReaderIcon);<NEW_LINE>panel.add(noReader);<NEW_LINE>JPanel iwConfig = new JPanel(new FlowLayout(FlowLayout.LEADING));<NEW_LINE>iwConfig.setOpaque(false);<NEW_LINE>iwConfig.add(new JLabel(MessageUtils.getLocalizedMessage("openindex.label.iw_config")));<NEW_LINE>panel.add(iwConfig);<NEW_LINE>JPanel compound = new JPanel(new FlowLayout(FlowLayout.LEADING));<NEW_LINE>compound.setOpaque(false);<NEW_LINE>compound.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));<NEW_LINE>compound.add(useCompoundCB);<NEW_LINE>panel.add(compound);<NEW_LINE>JPanel keepCommits = new JPanel(new FlowLayout(FlowLayout.LEADING));<NEW_LINE>keepCommits.setOpaque(false);<NEW_LINE>keepCommits.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));<NEW_LINE>keepCommits.add(keepLastCommitRB);<NEW_LINE>keepCommits.add(keepAllCommitsRB);<NEW_LINE>ButtonGroup group = new ButtonGroup();<NEW_LINE>group.add(keepLastCommitRB);<NEW_LINE>group.add(keepAllCommitsRB);<NEW_LINE>panel.add(keepCommits);<NEW_LINE>return panel;<NEW_LINE>}
new GridLayout(6, 1));
1,267,909
private MessageType buildParquetSchema(final String group) throws SerialisationException {<NEW_LINE>SchemaElementDefinition groupGafferSchema;<NEW_LINE>final boolean isEntity = gafferSchema.getEntityGroups().contains(group);<NEW_LINE>final StringBuilder schemaString = new StringBuilder("message Element {\n");<NEW_LINE>Serialiser serialiser = gafferSchema.getVertexSerialiser();<NEW_LINE>// Check that the vertex does not get stored as nested data<NEW_LINE>if (serialiser instanceof ParquetSerialiser && ((ParquetSerialiser) serialiser).getParquetSchema("test").contains(" group ")) {<NEW_LINE>throw new SerialisationException("Can not have a vertex that is serialised as nested data as it can not be indexed");<NEW_LINE>}<NEW_LINE>if (isEntity) {<NEW_LINE>groupGafferSchema = gafferSchema.getEntity(group);<NEW_LINE>schemaString.append(convertColumnSerialiserToParquetColumns(serialiser, ParquetStore.VERTEX)).append("\n");<NEW_LINE>addGroupColumnToSerialiser(group, ParquetStore.VERTEX, serialiser);<NEW_LINE>} else {<NEW_LINE>groupGafferSchema = gafferSchema.getEdge(group);<NEW_LINE>schemaString.append(convertColumnSerialiserToParquetColumns(serialiser, ParquetStore.SOURCE)).append("\n");<NEW_LINE>addGroupColumnToSerialiser(group, ParquetStore.SOURCE, serialiser);<NEW_LINE>schemaString.append(convertColumnSerialiserToParquetColumns(serialiser, ParquetStore.<MASK><NEW_LINE>addGroupColumnToSerialiser(group, ParquetStore.DESTINATION, serialiser);<NEW_LINE>addGroupColumnToSerialiser(group, ParquetStore.DIRECTED, BooleanParquetSerialiser.class.getCanonicalName());<NEW_LINE>schemaString.append(convertColumnSerialiserToParquetColumns(getSerialiser(BooleanParquetSerialiser.class.getCanonicalName()), ParquetStore.DIRECTED)).append("\n");<NEW_LINE>}<NEW_LINE>Map<String, String> propertyMap = groupGafferSchema.getPropertyMap();<NEW_LINE>for (final Map.Entry<String, String> entry : propertyMap.entrySet()) {<NEW_LINE>if (entry.getKey().contains("_") || entry.getKey().contains(".")) {<NEW_LINE>throw new SchemaException("The ParquetStore does not support properties which contain the characters '_' or '.'");<NEW_LINE>}<NEW_LINE>final TypeDefinition type = gafferSchema.getType(entry.getValue());<NEW_LINE>addGroupColumnToSerialiser(group, entry.getKey(), type.getSerialiserClass());<NEW_LINE>schemaString.append(convertColumnSerialiserToParquetColumns(getSerialiser(type.getSerialiserClass()), entry.getKey())).append("\n");<NEW_LINE>}<NEW_LINE>schemaString.append("}");<NEW_LINE>String parquetSchemaString = schemaString.toString();<NEW_LINE>final MessageType parquetSchema = MessageTypeParser.parseMessageType(parquetSchemaString);<NEW_LINE>LOGGER.debug("Generated Parquet schema: " + parquetSchemaString);<NEW_LINE>return parquetSchema;<NEW_LINE>}
DESTINATION)).append("\n");
999,893
private int formatResultAndCountRows(String[] columns, Iterator<Record> records, LinePrinter output) {<NEW_LINE>List<Record> topRecords = take(records, numSampleRows);<NEW_LINE>int[] columnSizes = calculateColumnSizes(columns, <MASK><NEW_LINE>int totalWidth = 1;<NEW_LINE>for (int columnSize : columnSizes) {<NEW_LINE>totalWidth += columnSize + 3;<NEW_LINE>}<NEW_LINE>StringBuilder builder = new StringBuilder(totalWidth);<NEW_LINE>String headerLine = formatRow(builder, columnSizes, columns, new boolean[columnSizes.length]);<NEW_LINE>int lineWidth = totalWidth - 2;<NEW_LINE>String dashes = "+" + String.valueOf(repeat('-', lineWidth)) + "+";<NEW_LINE>output.printOut(dashes);<NEW_LINE>output.printOut(headerLine);<NEW_LINE>output.printOut(dashes);<NEW_LINE>int numberOfRows = 0;<NEW_LINE>for (Record record : topRecords) {<NEW_LINE>output.printOut(formatRecord(builder, columnSizes, record));<NEW_LINE>numberOfRows++;<NEW_LINE>}<NEW_LINE>while (records.hasNext()) {<NEW_LINE>output.printOut(formatRecord(builder, columnSizes, records.next()));<NEW_LINE>numberOfRows++;<NEW_LINE>}<NEW_LINE>output.printOut(String.format("%s%n", dashes));<NEW_LINE>return numberOfRows;<NEW_LINE>}
topRecords, records.hasNext());
1,100,742
private static void queryLineMarkersForInjected(@Nonnull PsiElement element, @Nonnull final PsiFile containingFile, @Nonnull Set<? super PsiFile> visitedInjectedFiles, @Nonnull final PairConsumer<? super PsiElement, ? super LineMarkerInfo<PsiElement>> consumer) {<NEW_LINE>final InjectedLanguageManager manager = InjectedLanguageManager.getInstance(containingFile.getProject());<NEW_LINE>if (manager.isInjectedFragment(containingFile))<NEW_LINE>return;<NEW_LINE>InjectedLanguageManager.getInstance(containingFile.getProject()).enumerateEx(element, containingFile, false, (injectedPsi, places) -> {<NEW_LINE>// there may be several concatenated literals making the one injected file<NEW_LINE>if (!visitedInjectedFiles.add(injectedPsi))<NEW_LINE>return;<NEW_LINE>final Project project = injectedPsi.getProject();<NEW_LINE>Document document = PsiDocumentManager.getInstance(project).getCachedDocument(injectedPsi);<NEW_LINE>if (!(document instanceof DocumentWindow))<NEW_LINE>return;<NEW_LINE>List<PsiElement> injElements = CollectHighlightsUtil.getElementsInRange(injectedPsi, 0, injectedPsi.getTextLength());<NEW_LINE>final List<LineMarkerProvider> providers = getMarkerProviders(injectedPsi.getLanguage(), project);<NEW_LINE>queryProviders(injElements, injectedPsi, providers, (injectedElement, injectedMarker) -> {<NEW_LINE>GutterIconRenderer gutterRenderer = injectedMarker.createGutterRenderer();<NEW_LINE>TextRange injectedRange = new TextRange(injectedMarker.startOffset, injectedMarker.endOffset);<NEW_LINE>List<TextRange> editables = manager.intersectWithAllEditableFragments(injectedPsi, injectedRange);<NEW_LINE>for (TextRange editable : editables) {<NEW_LINE>TextRange hostRange = manager.injectedToHost(injectedPsi, editable);<NEW_LINE>Image icon = gutterRenderer == null <MASK><NEW_LINE>GutterIconNavigationHandler<PsiElement> navigationHandler = injectedMarker.getNavigationHandler();<NEW_LINE>LineMarkerInfo<PsiElement> converted = new LineMarkerInfo<>(injectedElement, hostRange, icon, injectedMarker.updatePass, e -> injectedMarker.getLineMarkerTooltip(), navigationHandler, GutterIconRenderer.Alignment.RIGHT);<NEW_LINE>consumer.consume(injectedElement, converted);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
? null : gutterRenderer.getIcon();
1,526,526
public void notifyOfPartitionDeletion(final MetacatDeleteTablePartitionPostEvent event) {<NEW_LINE>log.debug("Received DeleteTablePartition event {}", event);<NEW_LINE>final String name = event.getName().toString();<NEW_LINE>final long timestamp = event.getRequestContext().getTimestamp();<NEW_LINE>final String requestId = event.getRequestContext().getId();<NEW_LINE>final TablePartitionsUpdatePayload partitionsUpdatePayload;<NEW_LINE>partitionsUpdatePayload = new TablePartitionsUpdatePayload(null, 0, event.getPartitions().size(), SNSNotificationPartitionAddMsg.PARTITION_KEY_UNABLED.name(), SNSNotificationServiceUtil.getPartitionNameListFromDtos<MASK><NEW_LINE>final UpdateTablePartitionsMessage tableMessage = new UpdateTablePartitionsMessage(UUID.randomUUID().toString(), timestamp, requestId, name, partitionsUpdatePayload);<NEW_LINE>this.publishNotification(this.tableTopicArn, this.config.getFallbackSnsTopicTableArn(), tableMessage, event.getName(), "Unable to publish table partition delete notification", Metrics.CounterSNSNotificationTablePartitionDelete.getMetricName());<NEW_LINE>DeletePartitionMessage message = null;<NEW_LINE>if (config.isSnsNotificationTopicPartitionEnabled()) {<NEW_LINE>for (final String partitionId : event.getPartitionIds()) {<NEW_LINE>message = new DeletePartitionMessage(UUID.randomUUID().toString(), timestamp, requestId, name, partitionId);<NEW_LINE>this.publishNotification(this.partitionTopicArn, this.config.getFallbackSnsTopicPartitionArn(), message, event.getName(), "Unable to publish partition deletion notification", Metrics.CounterSNSNotificationPartitionDelete.getMetricName());<NEW_LINE>log.debug("Published delete partition message {} on {}", message, this.partitionTopicArn);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(event.getPartitions()));
791,588
public HttpConfirmIq parse(XmlPullParser parser, int initialDepth) throws Exception {<NEW_LINE>HttpConfirmIq httpConfirmIq = new HttpConfirmIq();<NEW_LINE>outerloop: while (true) {<NEW_LINE>int eventType = parser.getEventType();<NEW_LINE>switch(eventType) {<NEW_LINE>case XmlPullParser.START_TAG:<NEW_LINE>if (parser.getEventType() == XmlPullParser.START_TAG && HttpConfirmIq.ELEMENT.equals(parser.getName()) && HttpConfirmIq.NAMESPACE.equals(parser.getNamespace())) {<NEW_LINE>try {<NEW_LINE>httpConfirmIq.setUrl(parser.getAttributeValue("", HttpConfirmIq.PROP_URL));<NEW_LINE>httpConfirmIq.setId(parser.getAttributeValue("", HttpConfirmIq.PROP_ID));<NEW_LINE>httpConfirmIq.setMethod(parser.getAttributeValue<MASK><NEW_LINE>break outerloop;<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.d("HttpConfirmIqProvider", "error in parsing: " + e.toString());<NEW_LINE>break outerloop;<NEW_LINE>}<NEW_LINE>} else<NEW_LINE>parser.next();<NEW_LINE>break;<NEW_LINE>case XmlPullParser.END_TAG:<NEW_LINE>if (parser.getDepth() == initialDepth) {<NEW_LINE>break outerloop;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>parser.next();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return httpConfirmIq;<NEW_LINE>}
("", HttpConfirmIq.PROP_METHOD));
1,583,420
private User jsonToUser(JSONObject user) throws JSONException {<NEW_LINE>Uri picture = Uri.parse(user.getJSONObject("picture").getJSONObject("data").getString("url"));<NEW_LINE>String <MASK><NEW_LINE>String id = user.getString("id");<NEW_LINE>String email = null;<NEW_LINE>if (user.has("email")) {<NEW_LINE>email = user.getString("email");<NEW_LINE>}<NEW_LINE>// Build permissions display string<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>JSONArray perms = user.getJSONObject("permissions").getJSONArray("data");<NEW_LINE>builder.append("Permissions:\n");<NEW_LINE>for (int i = 0; i < perms.length(); i++) {<NEW_LINE>builder.append(perms.getJSONObject(i).get("permission")).append(": ").append(perms.getJSONObject(i).get("status")).append("\n");<NEW_LINE>}<NEW_LINE>String permissions = builder.toString();<NEW_LINE>return new User(picture, name, id, email, permissions);<NEW_LINE>}
name = user.getString("name");
126,675
private Composite parseComposite() throws IOException {<NEW_LINE>Composite composite = new Composite();<NEW_LINE>String partData = readLine();<NEW_LINE>StringTokenizer tokenizer = new StringTokenizer(partData, " ;");<NEW_LINE>String cc = tokenizer.nextToken();<NEW_LINE>if (!cc.equals(CC)) {<NEW_LINE>throw new IOException("Expected '" + CC + "' actual='" + cc + "'");<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>composite.setName(name);<NEW_LINE>int partCount;<NEW_LINE>try {<NEW_LINE>partCount = Integer.parseInt(tokenizer.nextToken());<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>throw new IOException("Error parsing AFM document:" + e);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < partCount; i++) {<NEW_LINE>CompositePart part = new CompositePart();<NEW_LINE>String pcc = tokenizer.nextToken();<NEW_LINE>if (!pcc.equals(PCC)) {<NEW_LINE>throw new IOException("Expected '" + PCC + "' actual='" + pcc + "'");<NEW_LINE>}<NEW_LINE>String partName = tokenizer.nextToken();<NEW_LINE>try {<NEW_LINE>int x = Integer.parseInt(tokenizer.nextToken());<NEW_LINE>int y = Integer.parseInt(tokenizer.nextToken());<NEW_LINE>part.setName(partName);<NEW_LINE>part.setXDisplacement(x);<NEW_LINE>part.setYDisplacement(y);<NEW_LINE>composite.addPart(part);<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>throw new IOException("Error parsing AFM document:" + e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return composite;<NEW_LINE>}
String name = tokenizer.nextToken();
889,391
final CreateOutboundConnectionResult executeCreateOutboundConnection(CreateOutboundConnectionRequest createOutboundConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createOutboundConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateOutboundConnectionRequest> request = null;<NEW_LINE>Response<CreateOutboundConnectionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateOutboundConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createOutboundConnectionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "OpenSearch");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateOutboundConnection");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateOutboundConnectionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateOutboundConnectionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,205,396
public int compareTo(ClusterJoinResponseMessage other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetHeader(), other.isSetHeader());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetHeader()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.header, other.header);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetNewNodeId(), other.isSetNewNodeId());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetNewNodeId()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newNodeId, other.newNodeId);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetNodeStore(<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetNodeStore()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeStore, other.nodeStore);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
), other.isSetNodeStore());
560,914
public void maxLength(HippyTextInput view, int maxLength) {<NEW_LINE>InputFilter[] currentFilters = view.getFilters();<NEW_LINE>InputFilter[] newFilters = EMPTY_FILTERS;<NEW_LINE>if (maxLength == -1) {<NEW_LINE>if (currentFilters.length > 0) {<NEW_LINE>LinkedList<InputFilter> list = new LinkedList<>();<NEW_LINE>for (InputFilter currentFilter : currentFilters) {<NEW_LINE>if (!(currentFilter instanceof InputFilter.LengthFilter)) {<NEW_LINE>list.add(currentFilter);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!list.isEmpty()) {<NEW_LINE>// noinspection ToArrayCallWithZeroLengthArrayArgument<NEW_LINE>newFilters = list.toArray(new InputFilter[list.size()]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (currentFilters.length > 0) {<NEW_LINE>newFilters = currentFilters;<NEW_LINE>boolean replaced = false;<NEW_LINE>for (int i = 0; i < currentFilters.length; i++) {<NEW_LINE>if (currentFilters[i] instanceof InputFilter.LengthFilter) {<NEW_LINE>currentFilters[i] <MASK><NEW_LINE>replaced = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!replaced) {<NEW_LINE>newFilters = new InputFilter[currentFilters.length + 1];<NEW_LINE>System.arraycopy(currentFilters, 0, newFilters, 0, currentFilters.length);<NEW_LINE>newFilters[currentFilters.length] = new InputFilter.LengthFilter(maxLength);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>newFilters = new InputFilter[1];<NEW_LINE>newFilters[0] = new InputFilter.LengthFilter(maxLength);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>view.setFilters(newFilters);<NEW_LINE>}
= new InputFilter.LengthFilter(maxLength);
873,499
private JSModuleRecord tryLoadingAsCommonjsModule(TruffleString specifier) {<NEW_LINE>JSModuleRecord existingModule = moduleMap.get(specifier);<NEW_LINE>if (existingModule != null) {<NEW_LINE>log("IMPORT resolve built-in from cache ", specifier);<NEW_LINE>return existingModule;<NEW_LINE>}<NEW_LINE>JSFunctionObject require = (JSFunctionObject) realm.getCommonJSRequireFunctionObject();<NEW_LINE>// Any exception thrown during module loading will be propagated<NEW_LINE>Object maybeModule = JSFunction.call(JSArguments.create(Undefined.instance, require, specifier));<NEW_LINE>if (maybeModule == Undefined.instance || !JSDynamicObject.isJSDynamicObject(maybeModule)) {<NEW_LINE>throw fail(Strings.fromJavaString("Failed to load built-in ES module: " + specifier));<NEW_LINE>}<NEW_LINE>JSDynamicObject module = (JSDynamicObject) maybeModule;<NEW_LINE>// Wrap any exported symbol in an ES module.<NEW_LINE>List<TruffleString> exportedValues = JSObject.enumerableOwnNames(module);<NEW_LINE>TruffleStringBuilder moduleBody = Strings.builderCreate();<NEW_LINE>Strings.builderAppend(moduleBody, "const builtinModule = require('");<NEW_LINE>Strings.builderAppend(moduleBody, specifier);<NEW_LINE>Strings.builderAppend(moduleBody, "');\n");<NEW_LINE>for (TruffleString s : exportedValues) {<NEW_LINE><MASK><NEW_LINE>Strings.builderAppend(moduleBody, s);<NEW_LINE>Strings.builderAppend(moduleBody, " = builtinModule.");<NEW_LINE>Strings.builderAppend(moduleBody, s);<NEW_LINE>Strings.builderAppend(moduleBody, ";\n");<NEW_LINE>}<NEW_LINE>Strings.builderAppend(moduleBody, "export default builtinModule;");<NEW_LINE>Source src = Source.newBuilder(ID, Strings.builderToJavaString(moduleBody), specifier + "-internal.mjs").build();<NEW_LINE>JSModuleData parsedModule = realm.getContext().getEvaluator().envParseModule(realm, src);<NEW_LINE>JSModuleRecord record = new JSModuleRecord(parsedModule, this);<NEW_LINE>moduleMap.put(specifier, record);<NEW_LINE>return record;<NEW_LINE>}
Strings.builderAppend(moduleBody, "export const ");
470,342
public static Element svgCircleSegment(SVGPlot svgp, double centerx, double centery, double angleStart, double angleDelta, double innerRadius, double outerRadius) {<NEW_LINE>// To return cosine<NEW_LINE>final DoubleWrapper tmp = new DoubleWrapper();<NEW_LINE>double sin1st = FastMath.sinAndCos(angleStart, tmp);<NEW_LINE>double cos1st = tmp.value;<NEW_LINE>double sin2nd = FastMath.sinAndCos(angleStart + angleDelta, tmp);<NEW_LINE>// Note: tmp is modified!<NEW_LINE>double cos2nd = tmp.value;<NEW_LINE>double inner1stx = centerx + (innerRadius * sin1st);<NEW_LINE>double inner1sty = centery - (innerRadius * cos1st);<NEW_LINE>double outer1stx = centerx + (outerRadius * sin1st);<NEW_LINE>double outer1sty = centery - (outerRadius * cos1st);<NEW_LINE>double inner2ndx = centerx + (innerRadius * sin2nd);<NEW_LINE>double inner2ndy = centery - (innerRadius * cos2nd);<NEW_LINE>double outer2ndx = centerx + (outerRadius * sin2nd);<NEW_LINE>double outer2ndy = centery - (outerRadius * cos2nd);<NEW_LINE>double largeArc = angleDelta <MASK><NEW_LINE>//<NEW_LINE>SVGPath //<NEW_LINE>path = //<NEW_LINE>new SVGPath(inner1stx, inner1sty).lineTo(outer1stx, outer1sty).//<NEW_LINE>ellipticalArc(//<NEW_LINE>outerRadius, //<NEW_LINE>outerRadius, //<NEW_LINE>0, //<NEW_LINE>largeArc, //<NEW_LINE>1, //<NEW_LINE>outer2ndx, outer2ndy).lineTo(inner2ndx, inner2ndy);<NEW_LINE>if (innerRadius > 0) {<NEW_LINE>path.ellipticalArc(innerRadius, innerRadius, 0, largeArc, 0, inner1stx, inner1sty);<NEW_LINE>}<NEW_LINE>return path.makeElement(svgp);<NEW_LINE>}
>= Math.PI ? 1 : 0;
857,469
public com.amazonaws.services.logs.model.ResourceNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.logs.model.ResourceNotFoundException resourceNotFoundException = new com.amazonaws.services.logs.model.ResourceNotFoundException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 resourceNotFoundException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
61,130
private Mono<Response<CheckNameAvailabilityResultInner>> checkNameAvailabilityWithResponseAsync(CheckNameAvailability parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (parameters == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>parameters.validate();<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(<MASK><NEW_LINE>}
), parameters, accept, context);
197,238
public <T> T onServiceCreate(Class<T> interfaceClass, JbootrpcReferenceConfig config) {<NEW_LINE>ReferenceConfig<T> <MASK><NEW_LINE>reference.setInterface(interfaceClass);<NEW_LINE>String directUrl = rpcConfig.getUrl(interfaceClass.getName());<NEW_LINE>if (StrUtil.isNotBlank(directUrl)) {<NEW_LINE>if (URL.valueOf(directUrl).getProtocol() == null) {<NEW_LINE>directUrl = "dubbo://" + directUrl;<NEW_LINE>}<NEW_LINE>reference.setUrl(directUrl);<NEW_LINE>}<NEW_LINE>String consumer = rpcConfig.getConsumer(interfaceClass.getName());<NEW_LINE>if (consumer != null) {<NEW_LINE>reference.setConsumer(DubboUtil.getConsumer(consumer));<NEW_LINE>}<NEW_LINE>// copy consumer config to Refercence<NEW_LINE>RPCUtil.copyNotNullFields(reference.getConsumer(), reference, false);<NEW_LINE>if (reference.getGroup() == null) {<NEW_LINE>reference.setGroup(rpcConfig.getGroup(interfaceClass.getName()));<NEW_LINE>}<NEW_LINE>if (reference.getVersion() == null) {<NEW_LINE>reference.setVersion(rpcConfig.getVersion(interfaceClass.getName()));<NEW_LINE>}<NEW_LINE>return reference.get();<NEW_LINE>}
reference = DubboUtil.toReferenceConfig(config);
1,693,361
public void bindView(View v, Context c, final Cursor cur) {<NEW_LINE>String listName = cur.getString(listNameColumn);<NEW_LINE>CheckableItem item = (CheckableItem) v.getTag();<NEW_LINE>String accountName = cur.getString(accountNameColumn);<NEW_LINE>String accountType = cur.getString(accountTypeColumn);<NEW_LINE>Model model = mSources.getModel(accountType);<NEW_LINE>if (model.hasEditActivity()) {<NEW_LINE>item.btnSettings.setVisibility(View.VISIBLE);<NEW_LINE>item.btnSettings.setTag(cur.getPosition());<NEW_LINE>item.btnSettings.setOnClickListener(this);<NEW_LINE>} else {<NEW_LINE>item.<MASK><NEW_LINE>item.btnSettings.setOnClickListener(null);<NEW_LINE>}<NEW_LINE>item.text1.setText(listName);<NEW_LINE>item.text2.setText(accountName);<NEW_LINE>int listColor = cur.getInt(listColorColumn);<NEW_LINE>item.coloredCheckBox.setColor(listColor);<NEW_LINE>if (!cur.isNull(compareColumn)) {<NEW_LINE>long id = cur.getLong(0);<NEW_LINE>boolean checkValue;<NEW_LINE>if (savedPositions.containsKey(id)) {<NEW_LINE>checkValue = savedPositions.get(id);<NEW_LINE>} else {<NEW_LINE>checkValue = cur.getInt(compareColumn) == 1;<NEW_LINE>}<NEW_LINE>item.coloredCheckBox.setChecked(checkValue);<NEW_LINE>}<NEW_LINE>}
btnSettings.setVisibility(View.GONE);
1,353,607
public List<char[]> listFieldsToBeGenerated(SingularData data, EclipseNode builderType) {<NEW_LINE>if (useGuavaInstead(builderType)) {<NEW_LINE>return guavaMapSingularizer.listFieldsToBeGenerated(data, builderType);<NEW_LINE>}<NEW_LINE>char[] p = data.getPluralName();<NEW_LINE>int len = p.length;<NEW_LINE>char[] k = new char[len + 4];<NEW_LINE>char[] v = new char[len + 6];<NEW_LINE>System.arraycopy(p, 0, k, 0, len);<NEW_LINE>System.arraycopy(p, 0, v, 0, len);<NEW_LINE>k[len] = '$';<NEW_LINE>k[len + 1] = 'k';<NEW_LINE>k[len + 2] = 'e';<NEW_LINE>k[len + 3] = 'y';<NEW_LINE>v[len] = '$';<NEW_LINE><MASK><NEW_LINE>v[len + 2] = 'a';<NEW_LINE>v[len + 3] = 'l';<NEW_LINE>v[len + 4] = 'u';<NEW_LINE>v[len + 5] = 'e';<NEW_LINE>return Arrays.asList(k, v);<NEW_LINE>}
v[len + 1] = 'v';
531,813
public void testCustomContextIsPropagatedWhenConfigured() throws Exception {<NEW_LINE>ManagedExecutor executor = ManagedExecutor.builder().cleared(ThreadContext.SECURITY, ThreadContext.TRANSACTION).propagated(ThreadContext.ALL_REMAINING).build();<NEW_LINE>try {<NEW_LINE>CompletableFuture<String> initialStage = executor.newIncompleteFuture();<NEW_LINE>CompletableFuture<String> executorThreadPriorities;<NEW_LINE>int defaultPriority = Thread.currentThread().getPriority();<NEW_LINE>Thread.currentThread().setPriority(defaultPriority - 1);<NEW_LINE>try {<NEW_LINE>executorThreadPriorities = initialStage.thenApplyAsync(s -> s + Thread.currentThread().getPriority());<NEW_LINE>Thread.currentThread().setPriority(defaultPriority - 2);<NEW_LINE>executorThreadPriorities = executorThreadPriorities.thenApply(s -> s + ' ' + Thread.currentThread().getPriority());<NEW_LINE>} finally {<NEW_LINE>Thread.currentThread().setPriority(defaultPriority);<NEW_LINE>}<NEW_LINE>initialStage.complete("");<NEW_LINE>String expected = (defaultPriority - 1) <MASK><NEW_LINE>assertEquals(expected, executorThreadPriorities.get(TIMEOUT_NS, TimeUnit.NANOSECONDS));<NEW_LINE>} finally {<NEW_LINE>executor.shutdown();<NEW_LINE>}<NEW_LINE>}
+ " " + (defaultPriority - 2);
1,258,176
void writeHashPassword(String algorithm, String password) throws IOException {<NEW_LINE>writeln("<h1>Hash a password for the authorized-users parameter</h1>");<NEW_LINE>if (algorithm != null && password != null) {<NEW_LINE>write("<label for='hash'>Hash:</label> ");<NEW_LINE>final String hash = encodePassword(algorithm, password);<NEW_LINE>writeln("<input type='text' id='hash' value='" + hash + "' size='80' />");<NEW_LINE>writeln("<button class='copyHash'>Copy</button>");<NEW_LINE>writeln("<br/><br/>");<NEW_LINE>}<NEW_LINE>writeln("<form class='hash' action='' method='post'>");<NEW_LINE>writeln("<label for='algorithm'>Algorithm:</label>");<NEW_LINE>writeln("<select name='" + HttpParameter.ALGORITHM.getName() + "' id='algorithm' required>");<NEW_LINE>for (final String algo : getSortedAlgorithms()) {<NEW_LINE>if (algorithm != null && algo.equals(algorithm) || algorithm == null && "SHA-256".equals(algo)) {<NEW_LINE>writeln("<option selected>" + algo + "</option>");<NEW_LINE>} else {<NEW_LINE>writeln("<option>" + algo + "</option>");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>writeln("</select>");<NEW_LINE>writeln("<br/><br/>");<NEW_LINE>writeln("<label for='password'>Password:</label>");<NEW_LINE>writeln("<input type='password' name='" + HttpParameter.<MASK><NEW_LINE>writeln("<br/><br/>");<NEW_LINE>writeln("<input type='submit'/>");<NEW_LINE>writeln("</form>");<NEW_LINE>writeln("<br/>Note that you can also hash a password using the command line: <code>java -cp javamelody-core-" + Parameters.JAVAMELODY_VERSION + ".jar net.bull.javamelody.internal.common.MessageDigestPasswordEncoder passwordToHash</code>");<NEW_LINE>}
REQUEST.getName() + "' id='password' required />");
1,339,648
// GEN-LAST:event_bnTestMessageServiceActionPerformed<NEW_LINE>private void bnTestSolr8ActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_bnTestSolr8ActionPerformed<NEW_LINE>lbTestSolr8.setIcon(null);<NEW_LINE>lbTestSolr8.paintImmediately(lbTestSolr8.getVisibleRect());<NEW_LINE>lbWarning.setText("");<NEW_LINE>lbWarning.paintImmediately(lbWarning.getVisibleRect());<NEW_LINE>setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));<NEW_LINE>KeywordSearchService kwsService = Lookup.getDefault().lookup(KeywordSearchService.class);<NEW_LINE>try {<NEW_LINE>if (kwsService != null) {<NEW_LINE>// test Solr 8 connectivity<NEW_LINE>if (tbSolr8Port.getText().trim().isEmpty() || tbSolr8Hostname.getText().trim().isEmpty()) {<NEW_LINE>lbTestSolr8.setIcon(badIcon);<NEW_LINE>lbWarning.setText(NbBundle.getMessage<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int port = Integer.parseInt(tbSolr8Port.getText().trim());<NEW_LINE>kwsService.tryConnect(tbSolr8Hostname.getText().trim(), port);<NEW_LINE>lbTestSolr8.setIcon(goodIcon);<NEW_LINE>lbWarning.setText("");<NEW_LINE>} else {<NEW_LINE>lbTestSolr8.setIcon(badIcon);<NEW_LINE>lbWarning.setText(NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.KeywordSearchNull"));<NEW_LINE>}<NEW_LINE>} catch (NumberFormatException ex) {<NEW_LINE>lbTestSolr8.setIcon(badIcon);<NEW_LINE>lbWarning.setText(NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.InvalidPortNumber"));<NEW_LINE>} catch (KeywordSearchServiceException ex) {<NEW_LINE>lbTestSolr8.setIcon(badIcon);<NEW_LINE>lbWarning.setText(ex.getMessage());<NEW_LINE>} finally {<NEW_LINE>setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));<NEW_LINE>}<NEW_LINE>}
(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.Solr8ConnectionInfoMissing.error"));
1,601,301
void awaitFinish() throws OperationCanceledException {<NEW_LINE>try {<NEW_LINE>// remove markers<NEW_LINE>try {<NEW_LINE>if (inFile.exists()) {<NEW_LINE>inFile.deleteMarkers(PROBLEM_MARKER_TYPE, false, IResource.DEPTH_INFINITE);<NEW_LINE>}<NEW_LINE>} catch (CoreException e1) {<NEW_LINE>throw new RuntimeException(e1);<NEW_LINE>}<NEW_LINE>// wait for task to complete<NEW_LINE>byte[] bb = future.get();<NEW_LINE>// write result<NEW_LINE>if (bb != null) {<NEW_LINE>try {<NEW_LINE>if (outFile.exists()) {<NEW_LINE>outFile.setContents(new ByteArrayInputStream(bb), false, true, null);<NEW_LINE>} else {<NEW_LINE>outFile.create(new ByteArrayInputStream(bb), true, null);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>} catch (CoreException e) {<NEW_LINE>throw new ExecutionException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>if (e.getCause() instanceof OperationCanceledException) {<NEW_LINE>throw (OperationCanceledException) e.getCause();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (inFile.exists()) {<NEW_LINE>IMarker marker = inFile.createMarker(PROBLEM_MARKER_TYPE);<NEW_LINE>marker.setAttribute(IMarker.MESSAGE, "Error while exporting Umlet diagram: " + e.getCause().getMessage());<NEW_LINE>marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);<NEW_LINE>}<NEW_LINE>} catch (CoreException e1) {<NEW_LINE>throw new RuntimeException(e1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
outFile.setDerived(true, null);
186,183
public static String formatTime(long millis, int precision) {<NEW_LINE>long[] la = new long[5];<NEW_LINE>// days<NEW_LINE>la[0] = (millis / 86400000);<NEW_LINE>// hours<NEW_LINE>la[1] = (millis / 3600000) % 24;<NEW_LINE>// minutes<NEW_LINE>la[2] = (millis / 60000) % 60;<NEW_LINE>// seconds<NEW_LINE>la[3] = (millis / 1000) % 60;<NEW_LINE>// ms<NEW_LINE>la[<MASK><NEW_LINE>int index = 0;<NEW_LINE>for (int i = 0; i < la.length; i++) {<NEW_LINE>if (la[i] != 0) {<NEW_LINE>index = i;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>StringBuilder buf = new StringBuilder();<NEW_LINE>int validLength = la.length - index;<NEW_LINE>for (int i = 0; (i < validLength && i < precision); i++) {<NEW_LINE>buf.append(la[index]).append(TIME_FORMAT[index]);<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>return buf.toString();<NEW_LINE>}
4] = (millis % 1000);
1,320,688
final GetServiceQuotaIncreaseRequestFromTemplateResult executeGetServiceQuotaIncreaseRequestFromTemplate(GetServiceQuotaIncreaseRequestFromTemplateRequest getServiceQuotaIncreaseRequestFromTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getServiceQuotaIncreaseRequestFromTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetServiceQuotaIncreaseRequestFromTemplateRequest> request = null;<NEW_LINE>Response<GetServiceQuotaIncreaseRequestFromTemplateResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetServiceQuotaIncreaseRequestFromTemplateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getServiceQuotaIncreaseRequestFromTemplateRequest));<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, "Service Quotas");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetServiceQuotaIncreaseRequestFromTemplate");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetServiceQuotaIncreaseRequestFromTemplateResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetServiceQuotaIncreaseRequestFromTemplateResultJsonUnmarshaller());<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,526,153
private static LiteralRegexExecNode createLiteralNode(RegexLanguage language, RegexAST ast) {<NEW_LINE>PreCalcResultVisitor preCalcResultVisitor = PreCalcResultVisitor.run(ast, true);<NEW_LINE>boolean caret = ast.getRoot().startsWithCaret();<NEW_LINE>boolean dollar = ast.getRoot().endsWithDollar();<NEW_LINE>if (ast.getRoot().getMinPath() == 0) {<NEW_LINE>if (caret) {<NEW_LINE>if (dollar) {<NEW_LINE>return LiteralRegexExecNode.create(language, ast, new EmptyEquals(preCalcResultVisitor, ast.getOptions().isMustAdvance()));<NEW_LINE>}<NEW_LINE>return LiteralRegexExecNode.create(language, ast, new EmptyStartsWith(preCalcResultVisitor, ast.getOptions().isMustAdvance()));<NEW_LINE>}<NEW_LINE>if (dollar) {<NEW_LINE>return LiteralRegexExecNode.create(language, ast, new EmptyEndsWith(preCalcResultVisitor, ast.getFlags().isSticky(), ast.getOptions().isMustAdvance()));<NEW_LINE>}<NEW_LINE>return LiteralRegexExecNode.create(language, ast, new EmptyIndexOf(preCalcResultVisitor, ast.getOptions().isMustAdvance()));<NEW_LINE>}<NEW_LINE>if (caret) {<NEW_LINE>if (dollar) {<NEW_LINE>return LiteralRegexExecNode.create(language, ast, new Equals(preCalcResultVisitor));<NEW_LINE>}<NEW_LINE>return LiteralRegexExecNode.create(language, ast, new StartsWith(preCalcResultVisitor));<NEW_LINE>}<NEW_LINE>if (dollar) {<NEW_LINE>return LiteralRegexExecNode.create(language, ast, new EndsWith(preCalcResultVisitor, ast.getFlags().isSticky()));<NEW_LINE>}<NEW_LINE>if (ast.getFlags().isSticky()) {<NEW_LINE>return LiteralRegexExecNode.create(language, <MASK><NEW_LINE>}<NEW_LINE>if (preCalcResultVisitor.getLiteral().encodedLength() <= 64) {<NEW_LINE>return LiteralRegexExecNode.create(language, ast, new IndexOfString(preCalcResultVisitor));<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
ast, new RegionMatches(preCalcResultVisitor));
1,040,620
ASTNode clone0(AST target) {<NEW_LINE>MethodDeclaration result = new MethodDeclaration(target);<NEW_LINE>result.setSourceRange(getStartPosition(), getLength());<NEW_LINE>result.setJavadoc((Javadoc) ASTNode.copySubtree(target, getJavadoc()));<NEW_LINE>if (this.ast.apiLevel == AST.JLS2_INTERNAL) {<NEW_LINE>result.internalSetModifiers(getModifiers());<NEW_LINE>result.setReturnType((Type) ASTNode.copySubtree<MASK><NEW_LINE>}<NEW_LINE>if (this.ast.apiLevel >= AST.JLS3_INTERNAL) {<NEW_LINE>result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers()));<NEW_LINE>result.typeParameters().addAll(ASTNode.copySubtrees(target, typeParameters()));<NEW_LINE>result.setReturnType2((Type) ASTNode.copySubtree(target, getReturnType2()));<NEW_LINE>}<NEW_LINE>result.setConstructor(isConstructor());<NEW_LINE>result.setName((SimpleName) getName().clone(target));<NEW_LINE>if (this.ast.apiLevel >= AST.JLS8_INTERNAL) {<NEW_LINE>result.setReceiverType((Type) ASTNode.copySubtree(target, getReceiverType()));<NEW_LINE>result.setReceiverQualifier((SimpleName) ASTNode.copySubtree(target, getReceiverQualifier()));<NEW_LINE>}<NEW_LINE>result.parameters().addAll(ASTNode.copySubtrees(target, parameters()));<NEW_LINE>if (this.ast.apiLevel >= AST.JLS8_INTERNAL) {<NEW_LINE>result.extraDimensions().addAll(ASTNode.copySubtrees(target, extraDimensions()));<NEW_LINE>} else {<NEW_LINE>result.setExtraDimensions(getExtraDimensions());<NEW_LINE>}<NEW_LINE>if (this.ast.apiLevel() >= AST.JLS8_INTERNAL) {<NEW_LINE>result.thrownExceptionTypes().addAll(ASTNode.copySubtrees(target, thrownExceptionTypes()));<NEW_LINE>} else {<NEW_LINE>result.thrownExceptions().addAll(ASTNode.copySubtrees(target, thrownExceptions()));<NEW_LINE>}<NEW_LINE>result.setBody((Block) ASTNode.copySubtree(target, getBody()));<NEW_LINE>return result;<NEW_LINE>}
(target, getReturnType()));
958,719
public void enterCip_transform_set(Cip_transform_setContext ctx) {<NEW_LINE>if (_currentIpsecTransformSet != null) {<NEW_LINE>throw new BatfishException("IpsecTransformSet should be null!");<NEW_LINE>}<NEW_LINE>_currentIpsecTransformSet = new IpsecTransformSet(ctx.name.getText());<NEW_LINE>_configuration.defineStructure(IPSEC_TRANSFORM_SET, ctx.name.getText(), ctx);<NEW_LINE>if (ctx.ipsec_encryption() != null) {<NEW_LINE>_currentIpsecTransformSet.setEncryptionAlgorithm(toEncryptionAlgorithm<MASK><NEW_LINE>}<NEW_LINE>// If any encryption algorithm was set then ESP protocol is used<NEW_LINE>if (_currentIpsecTransformSet.getEncryptionAlgorithm() != null) {<NEW_LINE>_currentIpsecTransformSet.getProtocols().add(IpsecProtocol.ESP);<NEW_LINE>}<NEW_LINE>if (ctx.ipsec_authentication() != null) {<NEW_LINE>_currentIpsecTransformSet.setAuthenticationAlgorithm(toIpsecAuthenticationAlgorithm(ctx.ipsec_authentication()));<NEW_LINE>_currentIpsecTransformSet.getProtocols().add(toProtocol(ctx.ipsec_authentication()));<NEW_LINE>}<NEW_LINE>}
(ctx.ipsec_encryption()));
1,820,402
final UpdateMemberResult executeUpdateMember(UpdateMemberRequest updateMemberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateMemberRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateMemberRequest> request = null;<NEW_LINE>Response<UpdateMemberResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateMemberRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateMemberRequest));<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, "ManagedBlockchain");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateMember");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateMemberResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateMemberResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
377,259
protected HandlerMethod handleNoMatch(Set<RequestMappingInfo> infos, ServerWebExchange exchange) throws Exception {<NEW_LINE>PartialMatchHelper helper = new PartialMatchHelper(infos, exchange);<NEW_LINE>if (helper.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ServerHttpRequest request = exchange.getRequest();<NEW_LINE>if (helper.hasMethodsMismatch()) {<NEW_LINE>HttpMethod httpMethod = request.getMethod();<NEW_LINE>Set<HttpMethod> methods = helper.getAllowedMethods();<NEW_LINE>if (HttpMethod.OPTIONS.equals(httpMethod)) {<NEW_LINE>Set<MediaType> mediaTypes = helper.getConsumablePatchMediaTypes();<NEW_LINE>HttpOptionsHandler handler = new HttpOptionsHandler(methods, mediaTypes);<NEW_LINE>return new HandlerMethod(handler, HTTP_OPTIONS_HANDLE_METHOD);<NEW_LINE>}<NEW_LINE>throw new MethodNotAllowedException(httpMethod, methods);<NEW_LINE>}<NEW_LINE>if (helper.hasConsumesMismatch()) {<NEW_LINE>Set<MediaType<MASK><NEW_LINE>MediaType contentType;<NEW_LINE>try {<NEW_LINE>contentType = request.getHeaders().getContentType();<NEW_LINE>} catch (InvalidMediaTypeException ex) {<NEW_LINE>throw new UnsupportedMediaTypeStatusException(ex.getMessage());<NEW_LINE>}<NEW_LINE>throw new UnsupportedMediaTypeStatusException(contentType, new ArrayList<>(mediaTypes), exchange.getRequest().getMethod());<NEW_LINE>}<NEW_LINE>if (helper.hasProducesMismatch()) {<NEW_LINE>Set<MediaType> mediaTypes = helper.getProducibleMediaTypes();<NEW_LINE>throw new NotAcceptableStatusException(new ArrayList<>(mediaTypes));<NEW_LINE>}<NEW_LINE>if (helper.hasParamsMismatch()) {<NEW_LINE>throw new ServerWebInputException("Expected parameters: " + helper.getParamConditions() + ", actual query parameters: " + request.getQueryParams());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
> mediaTypes = helper.getConsumableMediaTypes();
1,177,304
public okhttp3.Call deleteAPIProductCall(String apiProductId, String ifMatch, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api-products/{apiProductId}".replaceAll("\\{" + "apiProductId" + "\\}", localVarApiClient.escapeString(apiProductId.toString()));<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>if (ifMatch != null) {<NEW_LINE>localVarHeaderParams.put("If-Match", localVarApiClient.parameterToString(ifMatch));<NEW_LINE>}<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>String[] localVarAuthNames = new String[] { "OAuth2Security" };<NEW_LINE>return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
final String[] localVarContentTypes = {};
1,106,727
// logger ////////////////////////////////////////////////////////////////////////////<NEW_LINE>protected void logRegistration(Set<String> deploymentIds, ProcessApplicationReference reference) {<NEW_LINE>if (!LOG.isInfoEnabled()) {<NEW_LINE>// building the log message is expensive (db queries) so we avoid it if we can<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append("ProcessApplication '");<NEW_LINE>builder.append(reference.getName());<NEW_LINE>builder.append("' registered for DB deployments ");<NEW_LINE>builder.append(deploymentIds);<NEW_LINE>builder.append(". ");<NEW_LINE>List<ProcessDefinition> processDefinitions = new ArrayList<ProcessDefinition>();<NEW_LINE>List<CaseDefinition> caseDefinitions = new ArrayList<CaseDefinition>();<NEW_LINE>CommandContext commandContext = Context.getCommandContext();<NEW_LINE>ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();<NEW_LINE><MASK><NEW_LINE>for (String deploymentId : deploymentIds) {<NEW_LINE>DeploymentEntity deployment = commandContext.getDbEntityManager().selectById(DeploymentEntity.class, deploymentId);<NEW_LINE>if (deployment != null) {<NEW_LINE>processDefinitions.addAll(getDeployedProcessDefinitionArtifacts(deployment));<NEW_LINE>if (cmmnEnabled) {<NEW_LINE>caseDefinitions.addAll(getDeployedCaseDefinitionArtifacts(deployment));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>logProcessDefinitionRegistrations(builder, processDefinitions);<NEW_LINE>if (cmmnEnabled) {<NEW_LINE>logCaseDefinitionRegistrations(builder, caseDefinitions);<NEW_LINE>}<NEW_LINE>LOG.registrationSummary(builder.toString());<NEW_LINE>} catch (Throwable e) {<NEW_LINE>LOG.exceptionWhileLoggingRegistrationSummary(e);<NEW_LINE>}<NEW_LINE>}
boolean cmmnEnabled = processEngineConfiguration.isCmmnEnabled();
958,693
public int filterRGB(int x, int y, int rgb) {<NEW_LINE>// use NTSC conversion formula<NEW_LINE>int gray = (int) (0.30 * (rgb >> 16 & 0xff) + 0.59 * (rgb >> 8 & 0xff) + 0.11 * (rgb & 0xff));<NEW_LINE>if (brightness >= 0)<NEW_LINE>gray = (int) ((gray + brightness * 255) / (1 + brightness));<NEW_LINE>else<NEW_LINE>gray = (int) (<MASK><NEW_LINE>if (contrast >= 0) {<NEW_LINE>if (gray >= 127)<NEW_LINE>gray = (int) (gray + (255 - gray) * contrast);<NEW_LINE>else<NEW_LINE>gray = (int) (gray - gray * contrast);<NEW_LINE>} else<NEW_LINE>gray = (int) (127 + (gray - 127) * (contrast + 1));<NEW_LINE>int a = (alpha != 100) ? (((rgb >> 24) & 0xff) * alpha / 100) << 24 : (rgb & 0xff000000);<NEW_LINE>return a | (gray << 16) | (gray << 8) | gray;<NEW_LINE>}
gray / (1 - brightness));
428,524
public static HashMap<String, Object> convertV2TIMFriendInfoToMap(V2TIMFriendInfo info) {<NEW_LINE>HashMap<String, Object> rinfo = new HashMap<String, Object>();<NEW_LINE>List<String> ulists = info.getFriendGroups();<NEW_LINE>rinfo.put("friendGroups", ulists);<NEW_LINE>rinfo.put(<MASK><NEW_LINE>rinfo.put("userID", info.getUserID());<NEW_LINE>rinfo.put("userProfile", CommonUtil.convertV2TIMUserFullInfoToMap(info.getUserProfile()));<NEW_LINE>HashMap<String, byte[]> customInfo = info.getFriendCustomInfo();<NEW_LINE>HashMap<String, String> customInfoTypeString = new HashMap<String, String>();<NEW_LINE>Iterator it = customInfo.entrySet().iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>Map.Entry entry = (Map.Entry) it.next();<NEW_LINE>String key = (String) entry.getKey();<NEW_LINE>String value = (byte[]) entry.getValue() == null ? "" : new String((byte[]) entry.getValue());<NEW_LINE>customInfoTypeString.put(key, value);<NEW_LINE>}<NEW_LINE>rinfo.put("friendCustomInfo", customInfoTypeString);<NEW_LINE>return rinfo;<NEW_LINE>}
"friendRemark", info.getFriendRemark());
1,125,714
public com.amazonaws.services.workdocs.model.TooManySubscriptionsException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.workdocs.model.TooManySubscriptionsException tooManySubscriptionsException = new com.amazonaws.services.<MASK><NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 tooManySubscriptionsException;<NEW_LINE>}
workdocs.model.TooManySubscriptionsException(null);
955,135
private static void submitTopologyToFile(TopologyAPI.Topology fTopology, Map<String, String> heronCmdOptions) {<NEW_LINE>String dirName = heronCmdOptions.get(CMD_TOPOLOGY_DEFN_TEMPDIR);<NEW_LINE>if (dirName == null || dirName.isEmpty()) {<NEW_LINE>throw new TopologySubmissionException("Topology definition temp directory not specified. " + "Please set cmdline option: " + CMD_TOPOLOGY_DEFN_TEMPDIR);<NEW_LINE>}<NEW_LINE>String fileName = Paths.get(dirName, fTopology.getName() + TOPOLOGY_DEFINITION_SUFFIX).toString();<NEW_LINE>try (FileOutputStream fos = new FileOutputStream(new File(fileName));<NEW_LINE>BufferedOutputStream bos = new BufferedOutputStream(fos)) {<NEW_LINE>byte[] topEncoding = fTopology.toByteArray();<NEW_LINE>bos.write(topEncoding);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>}
TopologySubmissionException("Error writing topology definition to temp directory: " + dirName, e);
207,656
public static String printErrorMessage(String format, String errorMessage, int startIndex, int endIndex, InputBuffer inputBuffer) {<NEW_LINE>checkArgNotNull(inputBuffer, "inputBuffer");<NEW_LINE>checkArgument(startIndex <= endIndex);<NEW_LINE>Position pos = inputBuffer.getPosition(startIndex);<NEW_LINE>StringBuilder sb = new StringBuilder(String.format(format, errorMessage, pos<MASK><NEW_LINE>sb.append('\n');<NEW_LINE>String line = inputBuffer.extractLine(pos.line);<NEW_LINE>sb.append(line);<NEW_LINE>sb.append('\n');<NEW_LINE>int charCount = Math.max(Math.min(endIndex - startIndex, StringUtils.length(line) - pos.column + 2), 1);<NEW_LINE>for (int i = 0; i < pos.column - 1; i++) sb.append(' ');<NEW_LINE>for (int i = 0; i < charCount; i++) sb.append('^');<NEW_LINE>sb.append("\n");<NEW_LINE>return sb.toString();<NEW_LINE>}
.line, pos.column));
354,082
public void testMultipleObtrude() throws Exception {<NEW_LINE>BlockableIncrementFunction increment = new BlockableIncrementFunction("testMultipleObtrude", null, null);<NEW_LINE>CompletableFuture<Integer> cf1 = defaultManagedExecutor.supplyAsync(() -> 80);<NEW_LINE>cf1.obtrudeValue(90);<NEW_LINE>CompletableFuture<Integer> cf2 = cf1.thenApplyAsync(increment);<NEW_LINE>assertEquals(Integer.valueOf(91), cf2.get(TIMEOUT_NS, TimeUnit.NANOSECONDS));<NEW_LINE>assertTrue(cf1.isDone());<NEW_LINE>assertTrue(cf2.isDone());<NEW_LINE>assertFalse(cf1.isCompletedExceptionally());<NEW_LINE>assertFalse(cf2.isCompletedExceptionally());<NEW_LINE>assertFalse(cf1.isCancelled());<NEW_LINE>assertFalse(cf2.isCancelled());<NEW_LINE>cf1.obtrudeValue(100);<NEW_LINE>CompletableFuture<Integer> cf3 = cf1.thenApplyAsync(increment);<NEW_LINE>assertEquals(Integer.valueOf(101), cf3.get(TIMEOUT_NS, TimeUnit.NANOSECONDS));<NEW_LINE>assertTrue(cf1.isDone());<NEW_LINE>assertTrue(cf3.isDone());<NEW_LINE>assertFalse(cf1.isCompletedExceptionally());<NEW_LINE>assertFalse(cf3.isCompletedExceptionally());<NEW_LINE>assertFalse(cf1.isCancelled());<NEW_LINE>assertFalse(cf3.isCancelled());<NEW_LINE>cf1.obtrudeException(new IllegalAccessException("Intentionally raising exception for test."));<NEW_LINE>CompletableFuture<Integer> cf4 = cf1.thenApplyAsync(increment);<NEW_LINE>try {<NEW_LINE>Integer i = cf4.get(TIMEOUT_NS, TimeUnit.NANOSECONDS);<NEW_LINE>throw new Exception("Should fail after result obtruded with an exception. Instead: " + i);<NEW_LINE>} catch (ExecutionException x) {<NEW_LINE>if (!(x.getCause() instanceof IllegalAccessException) || !"Intentionally raising exception for test.".equals(x.getCause().getMessage()))<NEW_LINE>throw x;<NEW_LINE>}<NEW_LINE>assertTrue(cf1.isDone());<NEW_LINE>assertTrue(cf4.isDone());<NEW_LINE>assertTrue(cf1.isCompletedExceptionally());<NEW_LINE>assertFalse(cf3.isCompletedExceptionally());<NEW_LINE>assertTrue(cf4.isCompletedExceptionally());<NEW_LINE>assertFalse(cf1.isCancelled());<NEW_LINE>assertFalse(cf4.isCancelled());<NEW_LINE>cf3.obtrudeValue(110);<NEW_LINE>CompletableFuture<Integer> cf5 = cf3.thenApplyAsync(increment);<NEW_LINE>assertEquals(Integer.valueOf(111), cf5.get(TIMEOUT_NS, TimeUnit.NANOSECONDS));<NEW_LINE>cf4.obtrudeException(new CancellationException());<NEW_LINE><MASK><NEW_LINE>cf4.obtrudeValue(120);<NEW_LINE>assertEquals(Integer.valueOf(120), cf4.getNow(121));<NEW_LINE>}
assertTrue(cf4.isCancelled());
432,489
final DescribeMaintenanceWindowExecutionTaskInvocationsResult executeDescribeMaintenanceWindowExecutionTaskInvocations(DescribeMaintenanceWindowExecutionTaskInvocationsRequest describeMaintenanceWindowExecutionTaskInvocationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeMaintenanceWindowExecutionTaskInvocationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeMaintenanceWindowExecutionTaskInvocationsRequest> request = null;<NEW_LINE>Response<DescribeMaintenanceWindowExecutionTaskInvocationsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeMaintenanceWindowExecutionTaskInvocationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeMaintenanceWindowExecutionTaskInvocationsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SSM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeMaintenanceWindowExecutionTaskInvocations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeMaintenanceWindowExecutionTaskInvocationsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new DescribeMaintenanceWindowExecutionTaskInvocationsResultJsonUnmarshaller());
312,803
private ChannelBuffer header090() {<NEW_LINE>final byte[] buf = new byte[4 + 1 + 4 + 2 + 29 + 2 + 48 + 2 + 47];<NEW_LINE>final ChannelBuffer header = commonHeader(buf, HRPC3);<NEW_LINE>// Serialized UserGroupInformation to say who we are.<NEW_LINE>// We're not nice so we're not gonna say who we are and we'll just send<NEW_LINE>// `null' (hadoop.io.ObjectWritable$NullInstance).<NEW_LINE>// First, we need the size of the whole damn UserGroupInformation thing.<NEW_LINE>// We skip 4 bytes now and will set it to the actual size at the end.<NEW_LINE>// 4<NEW_LINE>header.writerIndex(<MASK><NEW_LINE>// Write the class name of the object.<NEW_LINE>// See hadoop.io.ObjectWritable#writeObject<NEW_LINE>// See hadoop.io.UTF8#writeString<NEW_LINE>// String length as a short followed by UTF-8 string.<NEW_LINE>String klass = "org.apache.hadoop.io.Writable";<NEW_LINE>// 2<NEW_LINE>header.writeShort(klass.length());<NEW_LINE>// 29<NEW_LINE>header.writeBytes(Bytes.ISO88591(klass));<NEW_LINE>klass = "org.apache.hadoop.io.ObjectWritable$NullInstance";<NEW_LINE>// 2<NEW_LINE>header.writeShort(klass.length());<NEW_LINE>// 48<NEW_LINE>header.writeBytes(Bytes.ISO88591(klass));<NEW_LINE>klass = "org.apache.hadoop.security.UserGroupInformation";<NEW_LINE>// 2<NEW_LINE>header.writeShort(klass.length());<NEW_LINE>// 47<NEW_LINE>header.writeBytes(Bytes.ISO88591(klass));<NEW_LINE>// Now set the length of the whole damn thing.<NEW_LINE>// -4 because the length itself isn't part of the payload.<NEW_LINE>// -5 because the "hrpc" + version isn't part of the payload.<NEW_LINE>header.setInt(5, header.writerIndex() - 4 - 5);<NEW_LINE>return header;<NEW_LINE>}
header.writerIndex() + 4);
1,539,160
public ItemStack extract(IStackFilter filter, int min, int max, boolean simulate) {<NEW_LINE>if (min < 1)<NEW_LINE>min = 1;<NEW_LINE>if (min > max)<NEW_LINE>return StackUtil.EMPTY;<NEW_LINE>if (max < 0)<NEW_LINE>return StackUtil.EMPTY;<NEW_LINE>if (filter == null) {<NEW_LINE>filter = StackFilter.ALL;<NEW_LINE>}<NEW_LINE>int slots = getSlots();<NEW_LINE>TIntArrayList valids = new TIntArrayList();<NEW_LINE>int totalSize = 0;<NEW_LINE>ItemStack toExtract = StackUtil.EMPTY;<NEW_LINE>for (int slot = 0; slot < slots; slot++) {<NEW_LINE>ItemStack possible = extract(slot, filter, 1, max - totalSize, true);<NEW_LINE>if (!possible.isEmpty()) {<NEW_LINE>if (toExtract.isEmpty()) {<NEW_LINE>toExtract = possible.copy();<NEW_LINE>}<NEW_LINE>if (StackUtil.canMerge(toExtract, possible)) {<NEW_LINE>totalSize += possible.getCount();<NEW_LINE>valids.add(slot);<NEW_LINE>if (totalSize >= max) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ItemStack total = StackUtil.EMPTY;<NEW_LINE>if (min <= totalSize) {<NEW_LINE>for (int slot : valids.toArray()) {<NEW_LINE>ItemStack extracted = extract(slot, filter, 1, max - <MASK><NEW_LINE>if (total.isEmpty()) {<NEW_LINE>total = extracted.copy();<NEW_LINE>} else {<NEW_LINE>total.grow(extracted.getCount());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return total;<NEW_LINE>}
total.getCount(), simulate);
1,209,898
public Xid[] recover(int flag) throws XAException {<NEW_LINE>svLogger.entering(CLASSNAME, "recover", new Object[] { this, ivMC, AdapterUtil.getXAResourceRecoverFlagString(flag) });<NEW_LINE>Xid[] xids = null;<NEW_LINE>try {<NEW_LINE>// LIDB1181.8.1<NEW_LINE>xids = ivXaRes.recover(flag);<NEW_LINE>if (xids.length == 0) {<NEW_LINE>// d1270780<NEW_LINE>svLogger.info("No oustanding transactions to recover. Transaction state does not change.");<NEW_LINE>} else {<NEW_LINE>ivStateManager.setState(StateManager.XA_RECOVER);<NEW_LINE>svLogger.info("Outstanding transactions to recover. Transaction state is changing to " + ivMC.getTransactionStateAsString());<NEW_LINE>}<NEW_LINE>} catch (ResourceException te) {<NEW_LINE>svLogger.info("DSA_INTERNAL_WARNING - Exception setting the transaction state to StateManager.XA_RECOVER from " + ivMC.getTransactionStateAsString());<NEW_LINE>// should never happen so just eat it<NEW_LINE>} catch (XAException xae) {<NEW_LINE>traceXAException(xae, currClass);<NEW_LINE>svLogger.<MASK><NEW_LINE>throw xae;<NEW_LINE>}<NEW_LINE>svLogger.exiting(CLASSNAME, "recover", xids);<NEW_LINE>return xids;<NEW_LINE>}
exiting(CLASSNAME, "recover", "Exception");
1,641,407
public boolean onCreateOptionsMenu(final Menu menu) {<NEW_LINE>try (ContextLogger ignore = new ContextLogger(Log.LogLevel.DEBUG, "MainActivity.onCreateOptionsMenu")) {<NEW_LINE>getMenuInflater().inflate(R.menu.main_activity_options, menu);<NEW_LINE>MenuCompat.setGroupDividerEnabled(menu, true);<NEW_LINE>final SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);<NEW_LINE>searchItem = menu.findItem(R.id.menu_gosearch);<NEW_LINE>searchView = (SearchView) searchItem.getActionView();<NEW_LINE>searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));<NEW_LINE>searchView.setSuggestionsAdapter(new GeocacheSuggestionsAdapter(this));<NEW_LINE>// initialize menu items<NEW_LINE>menu.findItem(R.id.menu_wizard).setVisible(!InstallWizardActivity.isConfigurationOk(this));<NEW_LINE>menu.findItem(R.id.menu_update_routingdata).setEnabled(Settings.useInternalRouting());<NEW_LINE>final boolean isPremiumActive = Settings.isGCConnectorActive() && Settings.isGCPremiumMember();<NEW_LINE>menu.findItem(R.id.menu_pocket_queries).setVisible(isPremiumActive);<NEW_LINE>menu.findItem(R.id.menu_bookmarklists).setVisible(isPremiumActive);<NEW_LINE>SearchUtils.hideKeyboardOnSearchClick(searchView, searchItem);<NEW_LINE>SearchUtils.hideActionIconsWhenSearchIsActive(this, menu, searchItem);<NEW_LINE>SearchUtils.handleDropDownVisibility(this, searchView, searchItem);<NEW_LINE>}<NEW_LINE>if (Log.isEnabled(Log.LogLevel.DEBUG)) {<NEW_LINE>binding.getRoot().post(() <MASK><NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
-> Log.d("Post after MainActivity.onCreateOptionsMenu"));
1,384,072
private void uninstallPlugins(Set<CordovaPlugin> pluginsToUninstall) {<NEW_LINE>for (CordovaPlugin plugin : pluginsToUninstall) {<NEW_LINE>log(getCordovaCommand() + " -d plugin remove " + plugin.getId());<NEW_LINE>ExecTask exec = (ExecTask) <MASK><NEW_LINE>final Environment.Variable variable = new Environment.Variable();<NEW_LINE>variable.setKey(getProject().getProperty("cordova.path.key"));<NEW_LINE>variable.setValue(getProject().getProperty("cordova.path.value"));<NEW_LINE>exec.addEnv(variable);<NEW_LINE>exec.setResolveExecutable(true);<NEW_LINE>exec.setSearchPath(true);<NEW_LINE>exec.setExecutable(getCordovaCommand());<NEW_LINE>exec.createArg().setValue("-d");<NEW_LINE>exec.createArg().setValue("plugin");<NEW_LINE>exec.createArg().setValue("remove");<NEW_LINE>exec.createArg().setValue(plugin.getId());<NEW_LINE>exec.execute();<NEW_LINE>}<NEW_LINE>}
getProject().createTask("exec");
89,639
public void updateFromFieldAssignment(Node lhs, Node rhs) {<NEW_LINE>Element element;<NEW_LINE>String fieldName;<NEW_LINE>if (lhs instanceof FieldAccessNode) {<NEW_LINE>element = ((FieldAccessNode) lhs).getElement();<NEW_LINE>fieldName = ((FieldAccessNode) lhs).getFieldName();<NEW_LINE>} else if (lhs instanceof LocalVariableNode) {<NEW_LINE>element = ((LocalVariableNode) lhs).getElement();<NEW_LINE>fieldName = ((LocalVariableNode) lhs).getName();<NEW_LINE>} else {<NEW_LINE>throw new BugInCF("updateFromFieldAssignment received an unexpected node type: " + lhs.getClass());<NEW_LINE>}<NEW_LINE>// TODO: For a primitive such as long, this is yielding just @GuardedBy rather than<NEW_LINE>// @GuardedBy({}).<NEW_LINE>AnnotatedTypeMirror rhsATM = atypeFactory.getAnnotatedType(rhs.getTree());<NEW_LINE>atypeFactory.wpiAdjustForUpdateField(lhs.getTree(<MASK><NEW_LINE>updateFieldFromType(lhs.getTree(), element, fieldName, rhsATM);<NEW_LINE>}
), element, fieldName, rhsATM);
953,837
public boolean onSingleTapConfirmed(MotionEvent e, MapView mapView) {<NEW_LINE>final Projection pj = mapView.getProjection();<NEW_LINE>final Rect screenRect = pj.getIntrinsicScreenRect();<NEW_LINE>final int size = this.size();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>final Item item = getItem(i);<NEW_LINE>pj.toPixels(<MASK><NEW_LINE>final int state = (mDrawFocusedItem && (mFocusedItem == item) ? OverlayItem.ITEM_STATE_FOCUSED_MASK : 0);<NEW_LINE>final Drawable marker = (item.getMarker(state) == null) ? getDefaultMarker(state) : item.getMarker(state);<NEW_LINE>boundToHotspot(marker, item.getMarkerHotspot());<NEW_LINE>if (hitTest(item, marker, -mCurScreenCoords.x + screenRect.left + (int) e.getX(), -mCurScreenCoords.y + screenRect.top + (int) e.getY())) {<NEW_LINE>// We have a hit, do we get a response from onTap?<NEW_LINE>if (onTap(i)) {<NEW_LINE>// We got a response so consume the event<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super.onSingleTapConfirmed(e, mapView);<NEW_LINE>}
item.getPoint(), mCurScreenCoords);
256,346
// </editor-fold>//GEN-END:initComponents<NEW_LINE>private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_removeButtonActionPerformed<NEW_LINE>int[] selectedRows = selectedRolesTable.getSelectedRows();<NEW_LINE>DefaultTableModel allRolesTableModel = (DefaultTableModel) allRolesTable.getModel();<NEW_LINE>DefaultTableModel selectedRolesTableModel = (DefaultTableModel) selectedRolesTable.getModel();<NEW_LINE>// Get the list of selected role names<NEW_LINE>for (int i = 0; i < selectedRows.length; i++) {<NEW_LINE>String roleName = (String) selectedRolesTableModel.getValueAt<MASK><NEW_LINE>allRolesTableModel.addRow(new Object[] { roleName });<NEW_LINE>}<NEW_LINE>// Now remove the selected rows from the allRolesTable<NEW_LINE>for (int i = selectedRows.length - 1; i >= 0; i--) {<NEW_LINE>selectedRolesTableModel.removeRow(selectedRows[i]);<NEW_LINE>}<NEW_LINE>}
(selectedRows[i], 0);
1,559,727
public static SettingsController create(Context context, String googleAppId, IdManager idManager, HttpRequestFactory httpRequestFactory, String versionCode, String versionName, FileStore fileStore, DataCollectionArbiter dataCollectionArbiter) {<NEW_LINE>final String installerPackageName = idManager.getInstallerPackageName();<NEW_LINE>final CurrentTimeProvider currentTimeProvider = new SystemCurrentTimeProvider();<NEW_LINE>final SettingsJsonParser settingsJsonParser = new SettingsJsonParser(currentTimeProvider);<NEW_LINE>final CachedSettingsIo cachedSettingsIo = new CachedSettingsIo(fileStore);<NEW_LINE>final String settingsUrl = String.format(Locale.US, SETTINGS_URL_FORMAT, googleAppId);<NEW_LINE>final SettingsSpiCall settingsSpiCall = new DefaultSettingsSpiCall(settingsUrl, httpRequestFactory);<NEW_LINE>final String deviceModel = idManager.getModelName();<NEW_LINE>final String osBuildVersion = idManager.getOsBuildVersionString();<NEW_LINE>final String osDisplayVersion = idManager.getOsDisplayVersionString();<NEW_LINE>final String instanceId = CommonUtils.createInstanceIdFrom(CommonUtils.getMappingFileId(context), googleAppId, versionName, versionCode);<NEW_LINE>final int deliveryMechanismId = DeliveryMechanism.<MASK><NEW_LINE>final SettingsRequest settingsRequest = new SettingsRequest(googleAppId, deviceModel, osBuildVersion, osDisplayVersion, idManager, instanceId, versionName, versionCode, deliveryMechanismId);<NEW_LINE>return new SettingsController(context, settingsRequest, currentTimeProvider, settingsJsonParser, cachedSettingsIo, settingsSpiCall, dataCollectionArbiter);<NEW_LINE>}
determineFrom(installerPackageName).getId();
723,371
ArrayList<Object> new138() /* reduce AAdynamicinvokeexpr3InvokeExpr */<NEW_LINE>{<NEW_LINE>@SuppressWarnings("hiding")<NEW_LINE>ArrayList<Object> nodeList = new ArrayList<Object>();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList9 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList8 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList7 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList6 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList5 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList4 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList3 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList2 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList1 = pop();<NEW_LINE>PInvokeExpr pinvokeexprNode1;<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>TDynamicinvoke tdynamicinvokeNode2;<NEW_LINE>TStringConstant tstringconstantNode3;<NEW_LINE>PUnnamedMethodSignature punnamedmethodsignatureNode4;<NEW_LINE>TLParen tlparenNode5;<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>Object nullNode6 = null;<NEW_LINE>TRParen trparenNode7;<NEW_LINE>PMethodSignature pmethodsignatureNode8;<NEW_LINE>TLParen tlparenNode9;<NEW_LINE>PArgList parglistNode10;<NEW_LINE>TRParen trparenNode11;<NEW_LINE>tdynamicinvokeNode2 = (TDynamicinvoke) nodeArrayList1.get(0);<NEW_LINE>tstringconstantNode3 = (TStringConstant) nodeArrayList2.get(0);<NEW_LINE>punnamedmethodsignatureNode4 = (PUnnamedMethodSignature) nodeArrayList3.get(0);<NEW_LINE>tlparenNode5 = (TLParen) nodeArrayList4.get(0);<NEW_LINE>trparenNode7 = (<MASK><NEW_LINE>pmethodsignatureNode8 = (PMethodSignature) nodeArrayList6.get(0);<NEW_LINE>tlparenNode9 = (TLParen) nodeArrayList7.get(0);<NEW_LINE>parglistNode10 = (PArgList) nodeArrayList8.get(0);<NEW_LINE>trparenNode11 = (TRParen) nodeArrayList9.get(0);<NEW_LINE>pinvokeexprNode1 = new ADynamicInvokeExpr(tdynamicinvokeNode2, tstringconstantNode3, punnamedmethodsignatureNode4, tlparenNode5, null, trparenNode7, pmethodsignatureNode8, tlparenNode9, parglistNode10, trparenNode11);<NEW_LINE>}<NEW_LINE>nodeList.add(pinvokeexprNode1);<NEW_LINE>return nodeList;<NEW_LINE>}
TRParen) nodeArrayList5.get(0);
1,050,121
protected Future<Boolean> doConnect() {<NEW_LINE>if (oAuthGrant != null) {<NEW_LINE>LOG.fine("Retrieving OAuth access token: " + getClientUri());<NEW_LINE>ResteasyClient client = createClient(executorService, 1, CONNECTION_TIMEOUT_MILLISECONDS, null);<NEW_LINE>try {<NEW_LINE>OAuthFilter oAuthFilter = new OAuthFilter(client, oAuthGrant);<NEW_LINE>authHeaderValue = oAuthFilter.getAuthHeader();<NEW_LINE>if (TextUtil.isNullOrEmpty(authHeaderValue)) {<NEW_LINE>throw new RuntimeException("Returned access token is null");<NEW_LINE>}<NEW_LINE>LOG.fine("Retrieved access token via OAuth: " + getClientUri());<NEW_LINE>} catch (SocketException | ProcessingException e) {<NEW_LINE>LOG.log(Level.SEVERE, <MASK><NEW_LINE>return CompletableFuture.completedFuture(false);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.log(Level.SEVERE, "Failed to retrieve OAuth access token: " + getClientUri());<NEW_LINE>return CompletableFuture.completedFuture(false);<NEW_LINE>} finally {<NEW_LINE>if (client != null) {<NEW_LINE>client.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super.doConnect();<NEW_LINE>}
"Failed to retrieve OAuth access token for '" + getClientUri() + "': Connection error");
1,697,161
private Optional<CommissionPoints> extractForecastCommissionPoints(@NonNull final I_C_Invoice_Candidate icRecord) {<NEW_LINE>final Quantity forecastQtyStockUOM = invoiceCandBL.getQtyOrderedStockUOM(icRecord).subtract(invoiceCandBL.getQtyToInvoiceStockUOM(icRecord)).subtract<MASK><NEW_LINE>final ProductPrice priceActual = invoiceCandBL.getPriceActual(icRecord);<NEW_LINE>final Optional<Quantity> forecastQtyInPriceUOM = uomConversionBL.convertQtyTo(forecastQtyStockUOM, priceActual.getUomId());<NEW_LINE>if (!forecastQtyInPriceUOM.isPresent()) {<NEW_LINE>logger.debug("C_Invoice_Candidate {}: couldn't convert forecastQty to priceUom; PriceActual: {}, forecastQtyStockUOM: {} -> return empty", icRecord.getC_Invoice_Candidate_ID(), priceActual, forecastQtyStockUOM);<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>final Money forecastAmount = moneyService.multiply(forecastQtyInPriceUOM.get(), priceActual);<NEW_LINE>return Optional.of(deductTaxAmount(CommissionPoints.of(forecastAmount.toBigDecimal()), icRecord));<NEW_LINE>}
(invoiceCandBL.getQtyInvoicedStockUOM(icRecord));
1,606,251
public void startAnim() {<NEW_LINE>ObjectAnimator xAnim = ObjectAnimator.ofFloat(targetView, "x", fromViewInfo.getX(), toViewInfo.getX());<NEW_LINE>ObjectAnimator yAnim = ObjectAnimator.ofFloat(targetView, "y", fromViewInfo.getY(), toViewInfo.getY());<NEW_LINE>ValueAnimator widthAnim = ValueAnimator.ofInt(fromViewInfo.getWidth(), toViewInfo.getWidth());<NEW_LINE>ValueAnimator heightAnim = ValueAnimator.ofInt(fromViewInfo.getHeight(), toViewInfo.getHeight());<NEW_LINE>widthAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationUpdate(ValueAnimator valueAnimator) {<NEW_LINE>ViewGroup.<MASK><NEW_LINE>param.width = (int) valueAnimator.getAnimatedValue();<NEW_LINE>targetView.setLayoutParams(param);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>heightAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationUpdate(ValueAnimator valueAnimator) {<NEW_LINE>ViewGroup.LayoutParams param = targetView.getLayoutParams();<NEW_LINE>param.height = (int) valueAnimator.getAnimatedValue();<NEW_LINE>targetView.setLayoutParams(param);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>AnimatorSet animation = new AnimatorSet();<NEW_LINE>animation.playTogether(xAnim, yAnim, widthAnim, heightAnim);<NEW_LINE>animation.setDuration(duration);<NEW_LINE>animation.setInterpolator(new DecelerateInterpolator());<NEW_LINE>animation.start();<NEW_LINE>}
LayoutParams param = targetView.getLayoutParams();
1,016,703
/* XXX: extends AggregateBuilder ? */<NEW_LINE>public static AnalysisEngineDescription createEngineDescription() throws ResourceInitializationException {<NEW_LINE>AggregateBuilder builder = new AggregateBuilder();<NEW_LINE>AnalysisEngineDescription primarySearch = AnalysisEngineFactory.createEngineDescription(SolrDocPrimarySearch.class);<NEW_LINE>builder.add(primarySearch);<NEW_LINE>builder.add(// more takes a lot of RAM and is sloow, StanfordParser is O(N^2)<NEW_LINE>AnalysisEngineFactory.// more takes a lot of RAM and is sloow, StanfordParser is O(N^2)<NEW_LINE>createEngineDescription(// more takes a lot of RAM and is sloow, StanfordParser is O(N^2)<NEW_LINE>StanfordParser.class, // more takes a lot of RAM and is sloow, StanfordParser is O(N^2)<NEW_LINE>StanfordParser.PARAM_MAX_TOKENS, 50, StanfordParser.PARAM_WRITE_POS, true), CAS.NAME_DEFAULT_SOFA, "Answer");<NEW_LINE>builder.add(OpenNlpNamedEntities.createEngineDescription(), CAS.NAME_DEFAULT_SOFA, "Answer");<NEW_LINE>builder.setFlowControllerDescription(FlowControllerFactory.createFlowControllerDescription(FixedFlowController.class<MASK><NEW_LINE>AnalysisEngineDescription aed = builder.createAggregateDescription();<NEW_LINE>aed.getAnalysisEngineMetaData().getOperationalProperties().setOutputsNewCASes(true);<NEW_LINE>aed.getAnalysisEngineMetaData().setName("cz.brmlab.yodaqa.pipeline.solrdoc.SolrDocAnswerProducer");<NEW_LINE>return aed;<NEW_LINE>}
, FixedFlowController.PARAM_ACTION_AFTER_CAS_MULTIPLIER, "drop"));
1,452,512
static DataType fromString(String typeName) {<NEW_LINE>if (typeName.equals("BOOL")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_BOOL, 1);<NEW_LINE>} else if (typeName.equals("CHAR")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_CHAR, 1);<NEW_LINE>} else if (typeName.equals("UCHAR")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_UCHAR, 1);<NEW_LINE>} else if (typeName.equals("SHORT")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_SHORT, 2);<NEW_LINE>} else if (typeName.equals("USHORT")) {<NEW_LINE>return new <MASK><NEW_LINE>} else if (typeName.equals("INT")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_INT, 4);<NEW_LINE>} else if (typeName.equals("UINT")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_UINT, 4);<NEW_LINE>} else if (typeName.equals("LONG")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_LONG, 8);<NEW_LINE>} else if (typeName.equals("ULONG")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_ULONG, 8);<NEW_LINE>} else if (typeName.equals("FLOAT")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_FLOAT, 4);<NEW_LINE>} else if (typeName.equals("DOUBLE")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_DOUBLE, 8);<NEW_LINE>} else if (typeName.startsWith("STRING")) {<NEW_LINE>return new DataType(rpc_data_type.RPC_STRING, Integer.parseInt(typeName.split("\\D+")[1]));<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Unknown data type: " + typeName);<NEW_LINE>}<NEW_LINE>}
DataType(rpc_data_type.RPC_USHORT, 2);
279,087
public okhttp3.Call connectHeadNamespacedServiceProxyCall(String name, String namespace, String path, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api/v1/namespaces/{namespace}/services/{name}/proxy".replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())).replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString()));<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>if (path != null) {<NEW_LINE>localVarQueryParams.addAll(localVarApiClient.parameterToPair("path", path));<NEW_LINE>}<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "*/*" };<NEW_LINE>final String <MASK><NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>String[] localVarAuthNames = new String[] { "BearerToken" };<NEW_LINE>return localVarApiClient.buildCall(localVarPath, "HEAD", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
1,088,469
private static void registerTimeTypeValue() {<NEW_LINE>BINLOG_PROTOCOL_VALUES.put(MySQLBinaryColumnType.MYSQL_TYPE_YEAR, new MySQLYearBinlogProtocolValue());<NEW_LINE>BINLOG_PROTOCOL_VALUES.put(MySQLBinaryColumnType.MYSQL_TYPE_DATE, new MySQLDateBinlogProtocolValue());<NEW_LINE>BINLOG_PROTOCOL_VALUES.put(MySQLBinaryColumnType.MYSQL_TYPE_TIME, new MySQLTimeBinlogProtocolValue());<NEW_LINE>BINLOG_PROTOCOL_VALUES.put(MySQLBinaryColumnType.MYSQL_TYPE_TIME2, new MySQLTime2BinlogProtocolValue());<NEW_LINE>BINLOG_PROTOCOL_VALUES.put(MySQLBinaryColumnType.MYSQL_TYPE_TIMESTAMP, new MySQLTimestampBinlogProtocolValue());<NEW_LINE>BINLOG_PROTOCOL_VALUES.put(MySQLBinaryColumnType.MYSQL_TYPE_TIMESTAMP2, new MySQLTimestamp2BinlogProtocolValue());<NEW_LINE>BINLOG_PROTOCOL_VALUES.put(MySQLBinaryColumnType<MASK><NEW_LINE>BINLOG_PROTOCOL_VALUES.put(MySQLBinaryColumnType.MYSQL_TYPE_DATETIME2, new MySQLDatetime2BinlogProtocolValue());<NEW_LINE>}
.MYSQL_TYPE_DATETIME, new MySQLDatetimeBinlogProtocolValue());
1,195,572
public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {<NEW_LINE>renderBackground(matrixStack);<NEW_LINE>listGui.render(matrixStack, mouseX, mouseY, partialTicks);<NEW_LINE>Matrix4f matrix = matrixStack.peek().getPositionMatrix();<NEW_LINE>BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();<NEW_LINE>RenderSystem.setShader(GameRenderer::getPositionShader);<NEW_LINE>// skin preview<NEW_LINE>if (listGui.getSelectedSlot() != -1 && listGui.getSelectedSlot() < altManager.getList().size()) {<NEW_LINE>Alt alt = listGui.getSelectedAlt();<NEW_LINE>if (alt == null)<NEW_LINE>return;<NEW_LINE>AltRenderer.drawAltBack(matrixStack, alt.getName(), (width / 2 - 125) / 2 - 32, height / 2 - 64 - 9, 64, 128);<NEW_LINE>AltRenderer.drawAltBody(matrixStack, alt.getName(), width - (width / 2 - 140) / 2 - 32, height / 2 - 64 - 9, 64, 128);<NEW_LINE>}<NEW_LINE>// title text<NEW_LINE>drawCenteredText(matrixStack, textRenderer, "Alt Manager", width / 2, 4, 16777215);<NEW_LINE>drawCenteredText(matrixStack, textRenderer, "Alts: " + altManager.getList().size(), width / 2, 14, 10526880);<NEW_LINE>drawCenteredText(matrixStack, textRenderer, "premium: " + altManager.getNumPremium() + ", cracked: " + altManager.getNumCracked(), width / 2, 24, 10526880);<NEW_LINE>// red flash for errors<NEW_LINE>if (errorTimer > 0) {<NEW_LINE>RenderSystem.setShader(GameRenderer::getPositionShader);<NEW_LINE>GL11.glDisable(GL11.GL_CULL_FACE);<NEW_LINE>GL11.glEnable(GL11.GL_BLEND);<NEW_LINE>RenderSystem.setShaderColor(1, 0, 0, errorTimer / 16F);<NEW_LINE>bufferBuilder.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION);<NEW_LINE>bufferBuilder.vertex(matrix, 0, <MASK><NEW_LINE>bufferBuilder.vertex(matrix, width, 0, 0).next();<NEW_LINE>bufferBuilder.vertex(matrix, width, height, 0).next();<NEW_LINE>bufferBuilder.vertex(matrix, 0, height, 0).next();<NEW_LINE>bufferBuilder.end();<NEW_LINE>BufferRenderer.draw(bufferBuilder);<NEW_LINE>GL11.glEnable(GL11.GL_CULL_FACE);<NEW_LINE>GL11.glDisable(GL11.GL_BLEND);<NEW_LINE>errorTimer--;<NEW_LINE>}<NEW_LINE>super.render(matrixStack, mouseX, mouseY, partialTicks);<NEW_LINE>renderButtonTooltip(matrixStack, mouseX, mouseY);<NEW_LINE>renderAltTooltip(matrixStack, mouseX, mouseY);<NEW_LINE>}
0, 0).next();
1,111,914
public Tile tileFor(BoundingBox bbox) {<NEW_LINE><MASK><NEW_LINE>Coord ne = bbox.getNorthEast();<NEW_LINE>Coord c = projection().toWGS84(new Coord(ne.getLatitude() - bbox.latitudeDifference() / 2, ne.getLongitude() - bbox.longitudeDifference() / 2, true));<NEW_LINE>sb.append("center=");<NEW_LINE>sb.append(c.getLatitude());<NEW_LINE>sb.append(",");<NEW_LINE>sb.append(c.getLongitude());<NEW_LINE>sb.append("&format=png");<NEW_LINE>sb.append("&zoom=" + _zoomLevel);<NEW_LINE>sb.append("&size=");<NEW_LINE>sb.append(tileSize);<NEW_LINE>sb.append("x");<NEW_LINE>sb.append(tileSize);<NEW_LINE>sb.append("&sensor=");<NEW_LINE>sb.append(sensor);<NEW_LINE>if (language != null) {<NEW_LINE>sb.append("&language=");<NEW_LINE>sb.append(language);<NEW_LINE>}<NEW_LINE>if (type == SATELLITE) {<NEW_LINE>sb.append("&maptype=satellite");<NEW_LINE>} else if (type == HYBRID) {<NEW_LINE>sb.append("&maptype=hybrid");<NEW_LINE>}<NEW_LINE>sb.append("&key=" + apiKey);<NEW_LINE>return new ProxyHttpTile(tileSize(), bbox, sb.toString());<NEW_LINE>}
StringBuilder sb = new StringBuilder(_url);
64,224
protected synchronized void updateData() {<NEW_LINE>logger.debug("Periodic update for '{}' ({})", getThing().getUID().toString(), getThing().getThingTypeUID());<NEW_LINE>final MiIoAsyncCommunication miioCom = getConnection();<NEW_LINE>try {<NEW_LINE>if (!hasConnection() || skipUpdate() || miioCom == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>checkChannelStructure();<NEW_LINE>if (!isIdentified) {<NEW_LINE>sendCommand(MiIoCommand.MIIO_INFO);<NEW_LINE>}<NEW_LINE>final MiIoBasicDevice midevice = miioDevice;<NEW_LINE>if (midevice != null) {<NEW_LINE>deviceVariables.put(TIMESTAMP, Instant.now().getEpochSecond());<NEW_LINE>refreshProperties(midevice, "");<NEW_LINE>refreshCustomProperties(midevice, false);<NEW_LINE>refreshNetwork();<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.debug("Error while updating '{}': ", getThing().getUID(<MASK><NEW_LINE>}<NEW_LINE>}
).toString(), e);
1,470,481
private boolean checkClassInstanceCreation() {<NEW_LINE>if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BETWEEN_NEW_AND_LEFT_BRACKET) {<NEW_LINE>int length = this.identifierLengthStack[this.identifierLengthPtr];<NEW_LINE>int numberOfIdentifiers = this.genericsIdentifiersLengthStack[this.genericsIdentifiersLengthPtr];<NEW_LINE>if (length != numberOfIdentifiers || this.genericsLengthStack[this.genericsLengthPtr] != 0) {<NEW_LINE>// no class instance creation with a parameterized type<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// completion on type inside an allocation expression<NEW_LINE>TypeReference type;<NEW_LINE>if (this.invocationType == ALLOCATION) {<NEW_LINE>// non qualified allocation expression<NEW_LINE>AllocationExpression allocExpr = new AllocationExpression();<NEW_LINE>if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER, 1) == K_INSIDE_THROW_STATEMENT && topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER, 1) == this.bracketDepth) {<NEW_LINE>pushOnElementStack(K_NEXT_TYPEREF_IS_EXCEPTION);<NEW_LINE>type = getTypeReference(0);<NEW_LINE>popElement(K_NEXT_TYPEREF_IS_EXCEPTION);<NEW_LINE>} else {<NEW_LINE>type = getTypeReference(0);<NEW_LINE>}<NEW_LINE>if (type instanceof CompletionOnSingleTypeReference) {<NEW_LINE>((CompletionOnSingleTypeReference) type).isConstructorType = true;<NEW_LINE>} else if (type instanceof CompletionOnQualifiedTypeReference) {<NEW_LINE>((CompletionOnQualifiedTypeReference) type).isConstructorType = true;<NEW_LINE>}<NEW_LINE>allocExpr.type = type;<NEW_LINE>allocExpr.sourceStart = type.sourceStart;<NEW_LINE>allocExpr.sourceEnd = type.sourceEnd;<NEW_LINE>pushOnExpressionStack(allocExpr);<NEW_LINE>this.isOrphanCompletionNode = false;<NEW_LINE>} else {<NEW_LINE>// qualified allocation expression<NEW_LINE>QualifiedAllocationExpression allocExpr = new QualifiedAllocationExpression();<NEW_LINE>pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);<NEW_LINE>pushOnGenericsLengthStack(0);<NEW_LINE>if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER, 1) == K_INSIDE_THROW_STATEMENT && topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER, 1) == this.bracketDepth) {<NEW_LINE>pushOnElementStack(K_NEXT_TYPEREF_IS_EXCEPTION);<NEW_LINE>type = getTypeReference(0);<NEW_LINE>popElement(K_NEXT_TYPEREF_IS_EXCEPTION);<NEW_LINE>} else {<NEW_LINE>type = getTypeReference(0);<NEW_LINE>}<NEW_LINE>if (type instanceof CompletionOnSingleTypeReference) {<NEW_LINE>((CompletionOnSingleTypeReference) type).isConstructorType = true;<NEW_LINE>}<NEW_LINE>allocExpr.type = type;<NEW_LINE>allocExpr.enclosingInstance = this.expressionStack[this.qualifier];<NEW_LINE>allocExpr.sourceStart = this.intStack[this.intPtr--];<NEW_LINE>allocExpr.sourceEnd = type.sourceEnd;<NEW_LINE>// attach it now (it replaces the qualifier expression)<NEW_LINE>this.expressionStack[this.qualifier] = allocExpr;<NEW_LINE>this.isOrphanCompletionNode = false;<NEW_LINE>}<NEW_LINE>this.assistNode = type;<NEW_LINE>this<MASK><NEW_LINE>popElement(K_BETWEEN_NEW_AND_LEFT_BRACKET);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.lastCheckPoint = type.sourceEnd + 1;
596,777
public CellAppearanceEx forSdk(@Nullable final Sdk jdk, final boolean isInComboBox, final boolean selected, final boolean showVersion) {<NEW_LINE>if (jdk == null) {<NEW_LINE>return SimpleTextCellAppearance.invalid(ProjectBundle.message("unknown.sdk"), AllIcons.Actions.Help);<NEW_LINE>}<NEW_LINE>String name = jdk.getName();<NEW_LINE>CompositeAppearance appearance = new CompositeAppearance();<NEW_LINE>SdkType sdkType = (SdkType) jdk.getSdkType();<NEW_LINE>appearance.setIcon(SdkUtil.getIcon(jdk));<NEW_LINE>SimpleTextAttributes attributes = getTextAttributes(sdkType.sdkHasValidPath(jdk), selected);<NEW_LINE>CompositeAppearance.DequeEnd ending = appearance.getEnding();<NEW_LINE>ending.addText(name, attributes);<NEW_LINE>if (showVersion) {<NEW_LINE>String versionString = jdk.getVersionString();<NEW_LINE>if (versionString != null && !versionString.equals(name)) {<NEW_LINE>SimpleTextAttributes textAttributes = isInComboBox && !selected ? SimpleTextAttributes.SYNTHETIC_ATTRIBUTES : SystemInfo.isMac && selected ? new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, Color.WHITE) : SimpleTextAttributes.GRAY_ATTRIBUTES;<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ending.getAppearance();<NEW_LINE>}
ending.addComment(versionString, textAttributes);
1,370,336
public LoggingConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LoggingConfig loggingConfig = new LoggingConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("recordAllRosTopics", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>loggingConfig.setRecordAllRosTopics(context.getUnmarshaller(Boolean.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return loggingConfig;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
43,603
public static PsiElement findCommonParent(final PsiElement root, final int startOffset, final int endOffset) {<NEW_LINE>if (startOffset == endOffset)<NEW_LINE>return null;<NEW_LINE>final PsiElement left = findElementAtInRoot(root, startOffset);<NEW_LINE>PsiElement right = <MASK><NEW_LINE>if (left == null || right == null)<NEW_LINE>return null;<NEW_LINE>PsiElement commonParent = PsiTreeUtil.findCommonParent(left, right);<NEW_LINE>if (commonParent == null) {<NEW_LINE>LOG.error("No common parent for " + left + " and " + right + "; root: " + root + "; startOffset: " + startOffset + "; endOffset: " + endOffset);<NEW_LINE>}<NEW_LINE>LOG.assertTrue(commonParent.getTextRange() != null, commonParent);<NEW_LINE>PsiElement parent = commonParent.getParent();<NEW_LINE>while (parent != null && commonParent.getTextRange().equals(parent.getTextRange())) {<NEW_LINE>commonParent = parent;<NEW_LINE>parent = parent.getParent();<NEW_LINE>}<NEW_LINE>return commonParent;<NEW_LINE>}
findElementAtInRoot(root, endOffset - 1);
157,108
private void initUserComponents(SectionNodeView sectionNodeView) {<NEW_LINE>showAS90Fields(as90FeaturesVisible);<NEW_LINE>// if(theBean.getJ2EEModuleVersion().compareTo(ServletVersion.SERVLET_2_4) >= 0) {<NEW_LINE>// showWebServiceEndpointInformation();<NEW_LINE>// } else {<NEW_LINE>hideWebServiceEndpointInformation();<NEW_LINE>// }<NEW_LINE>SunDescriptorDataObject dataObject = (SunDescriptorDataObject) sectionNodeView.getDataObject();<NEW_LINE>XmlMultiViewDataSynchronizer synchronizer = dataObject.getModelSynchronizer();<NEW_LINE>addRefreshable(new ItemEditorHelper(jTxtName, new ServletTextFieldEditorModel(synchronizer, Servlet.SERVLET_NAME)));<NEW_LINE>addRefreshable(new ItemEditorHelper(jTxtPrincipalName, new ServletTextFieldEditorModel(synchronizer, Servlet.PRINCIPAL_NAME)));<NEW_LINE>if (as90FeaturesVisible) {<NEW_LINE>addRefreshable(new ItemEditorHelper(jTxtClassName, new ServletTextFieldEditorModel(synchronizer, <MASK><NEW_LINE>}<NEW_LINE>jTxtName.setEditable(!servletNode.getBinding().isBound());<NEW_LINE>handleRoleFields(servletNode.getBinding());<NEW_LINE>}
Servlet.PRINCIPAL_NAME, ATTR_CLASSNAME)));
86,827
public static DescribeSslVpnServersResponse unmarshall(DescribeSslVpnServersResponse describeSslVpnServersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSslVpnServersResponse.setRequestId(_ctx.stringValue("DescribeSslVpnServersResponse.RequestId"));<NEW_LINE>describeSslVpnServersResponse.setPageSize(_ctx.integerValue("DescribeSslVpnServersResponse.PageSize"));<NEW_LINE>describeSslVpnServersResponse.setPageNumber(_ctx.integerValue("DescribeSslVpnServersResponse.PageNumber"));<NEW_LINE>describeSslVpnServersResponse.setTotalCount(_ctx.integerValue("DescribeSslVpnServersResponse.TotalCount"));<NEW_LINE>List<SslVpnServer> sslVpnServers = new ArrayList<SslVpnServer>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSslVpnServersResponse.SslVpnServers.Length"); i++) {<NEW_LINE>SslVpnServer sslVpnServer = new SslVpnServer();<NEW_LINE>sslVpnServer.setInternetIp(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].InternetIp"));<NEW_LINE>sslVpnServer.setIDaaSInstanceId(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].IDaaSInstanceId"));<NEW_LINE>sslVpnServer.setCreateTime(_ctx.longValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].CreateTime"));<NEW_LINE>sslVpnServer.setVpnGatewayId(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].VpnGatewayId"));<NEW_LINE>sslVpnServer.setIDaaSRegionId(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].IDaaSRegionId"));<NEW_LINE>sslVpnServer.setCompress(_ctx.booleanValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].Compress"));<NEW_LINE>sslVpnServer.setPort(_ctx.integerValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].Port"));<NEW_LINE>sslVpnServer.setLocalSubnet(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].LocalSubnet"));<NEW_LINE>sslVpnServer.setRegionId(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].RegionId"));<NEW_LINE>sslVpnServer.setCipher(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].Cipher"));<NEW_LINE>sslVpnServer.setConnections(_ctx.integerValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].Connections"));<NEW_LINE>sslVpnServer.setSslVpnServerId(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].SslVpnServerId"));<NEW_LINE>sslVpnServer.setMaxConnections(_ctx.integerValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].MaxConnections"));<NEW_LINE>sslVpnServer.setName(_ctx.stringValue<MASK><NEW_LINE>sslVpnServer.setEnableMultiFactorAuth(_ctx.booleanValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].EnableMultiFactorAuth"));<NEW_LINE>sslVpnServer.setClientIpPool(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].ClientIpPool"));<NEW_LINE>sslVpnServer.setProto(_ctx.stringValue("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].Proto"));<NEW_LINE>sslVpnServers.add(sslVpnServer);<NEW_LINE>}<NEW_LINE>describeSslVpnServersResponse.setSslVpnServers(sslVpnServers);<NEW_LINE>return describeSslVpnServersResponse;<NEW_LINE>}
("DescribeSslVpnServersResponse.SslVpnServers[" + i + "].Name"));
1,493,800
private static Pair<List<ErlangNamedElement>, List<ErlangNamedElement>> analyze(@NotNull List<? extends PsiElement> elements) {<NEW_LINE>PsiElement first = elements.get(0);<NEW_LINE>PsiElement scope = PsiTreeUtil.getTopmostParentOfType(first, ErlangFunction.class);<NEW_LINE>PsiElement lastElement = elements.get(elements.size() - 1);<NEW_LINE>final int lastElementEndOffset = lastElement.getTextOffset() + lastElement.getTextLength();<NEW_LINE>final int firstElementStartOffset = first.getTextOffset();<NEW_LINE>// find out params<NEW_LINE>assert scope != null;<NEW_LINE>final <MASK><NEW_LINE>List<ErlangNamedElement> outDeclarations = ContainerUtil.filter(getSimpleDeclarations(elements), componentName -> {<NEW_LINE>for (PsiReference usage : ReferencesSearch.search(componentName, localSearchScope, false).findAll()) {<NEW_LINE>if (usage.getElement().getTextOffset() > lastElementEndOffset) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>});<NEW_LINE>// find params<NEW_LINE>RefVisitor visitor = new RefVisitor();<NEW_LINE>for (PsiElement element : elements) {<NEW_LINE>element.accept(visitor);<NEW_LINE>}<NEW_LINE>Collection<ErlangNamedElement> names = visitor.getComponentNames();<NEW_LINE>List<ErlangNamedElement> inComponentNames = ContainerUtil.filter(names, componentName -> {<NEW_LINE>int offset = componentName.getTextOffset();<NEW_LINE>return offset >= lastElementEndOffset || offset < firstElementStartOffset;<NEW_LINE>});<NEW_LINE>return Pair.create(inComponentNames, outDeclarations);<NEW_LINE>}
LocalSearchScope localSearchScope = new LocalSearchScope(scope);
978,982
public boolean upgrade(Request request, HttpFields.Mutable responseFields) {<NEW_LINE>if (HttpMethod.PRI.is(request.getMethod())) {<NEW_LINE>getParser().directUpgrade();<NEW_LINE>} else {<NEW_LINE>HttpField settingsField = request.getFields().getField(HttpHeader.HTTP2_SETTINGS);<NEW_LINE>if (settingsField == null)<NEW_LINE>throw new BadMessageException("Missing " + HttpHeader.HTTP2_SETTINGS + " header");<NEW_LINE>String value = settingsField.getValue();<NEW_LINE>final byte[] settings = Base64.getUrlDecoder().decode(value == null ? "" : value);<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("{} {}: {}", this, HttpHeader.HTTP2_SETTINGS, TypeUtil.toHexString(settings));<NEW_LINE>SettingsFrame settingsFrame = SettingsBodyParser.parseBody(BufferUtil.toBuffer(settings));<NEW_LINE>if (settingsFrame == null) {<NEW_LINE>LOG.warn("Invalid {} header value: {}", HttpHeader.HTTP2_SETTINGS, value);<NEW_LINE>throw new BadMessageException();<NEW_LINE>}<NEW_LINE>responseFields.put(HttpHeader.UPGRADE, "h2c");<NEW_LINE>responseFields.<MASK><NEW_LINE>getParser().standardUpgrade();<NEW_LINE>// We fake that we received a client preface, so that we can send the<NEW_LINE>// server preface as the first HTTP/2 frame as required by the spec.<NEW_LINE>// When the client sends the real preface, the parser won't notify it.<NEW_LINE>upgradeFrames.add(new PrefaceFrame());<NEW_LINE>// This is the settings from the HTTP2-Settings header.<NEW_LINE>upgradeFrames.add(settingsFrame);<NEW_LINE>// Remember the request to send a response.<NEW_LINE>upgradeFrames.add(new HeadersFrame(1, request, null, true));<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
put(HttpHeader.CONNECTION, "Upgrade");
121,938
public okhttp3.Call readNamespacedResourceQuotaStatusCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status".replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())).replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString()));<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>if (pretty != null) {<NEW_LINE>localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));<NEW_LINE>}<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };<NEW_LINE>final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>String[] localVarAuthNames = new String[] { "BearerToken" };<NEW_LINE>return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, <MASK><NEW_LINE>}
localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
47,393
private void drawOn(JPanel panel, String value) {<NEW_LINE>List<Image> images = new ArrayList<>();<NEW_LINE>value = value.toUpperCase(Locale.ENGLISH);<NEW_LINE>for (int i = 0; i < value.length(); i++) {<NEW_LINE>char <MASK><NEW_LINE>Image image = ManaSymbols.getSizedManaSymbol(String.valueOf(symbol));<NEW_LINE>if (image != null) {<NEW_LINE>images.add(image);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (images.size() == value.length()) {<NEW_LINE>int dx = 0;<NEW_LINE>for (Image image : images) {<NEW_LINE>ImageIcon icon = new ImageIcon(image);<NEW_LINE>JLabel imageLabel = new JLabel();<NEW_LINE>imageLabel.setSize(11, 11);<NEW_LINE>imageLabel.setLocation(dx, 0);<NEW_LINE>imageLabel.setIcon(icon);<NEW_LINE>panel.add(imageLabel);<NEW_LINE>dx += 13;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String s = value.replace("B", "{B}").replace("R", "{R}").replace("G", "{G}").replace("W", "{W}").replace("U", "{U}").replace("X", "{X}");<NEW_LINE>panel.add(new JLabel(s));<NEW_LINE>}<NEW_LINE>}
symbol = value.charAt(i);
1,368,031
public void forget(Xid xid) throws XAException {<NEW_LINE>System.out.println("forget(" + _key + ", " + xid + ")");<NEW_LINE>_XAEvents.add(new XAEvent(XAEventCode.FORGET, _key));<NEW_LINE>final int forgetAction = self().getForgetAction();<NEW_LINE>if (forgetAction != XAResource.XA_OK) {<NEW_LINE>final int repeatCount <MASK><NEW_LINE>self().setForgetRepeatCount(repeatCount - 1);<NEW_LINE>if (repeatCount >= 0) {<NEW_LINE>switch(forgetAction) {<NEW_LINE>case RUNTIME_EXCEPTION:<NEW_LINE>throw new RuntimeException();<NEW_LINE>case DIE:<NEW_LINE>killDoomedServers(false);<NEW_LINE>default:<NEW_LINE>throw new XAException(forgetAction);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(FORGOTTEN);<NEW_LINE>self().setForgetCount(self().getForgetCount() + 1);<NEW_LINE>}
= self().getForgetRepeatCount();
97,771
public static MapMarker fromFavourite(@NonNull OsmandApplication app, @NonNull FavouritePoint point, @Nullable MapMarkersGroup group) {<NEW_LINE>int colorIndex = MapMarker.getColorIndex(app, point.getColor());<NEW_LINE>LatLon latLon = new LatLon(point.getLatitude(<MASK><NEW_LINE>PointDescription name = new PointDescription(PointDescription.POINT_TYPE_MAP_MARKER, point.getName());<NEW_LINE>MapMarker marker = new MapMarker(latLon, name, colorIndex);<NEW_LINE>marker.id = getMarkerId(app, marker, group);<NEW_LINE>marker.favouritePoint = point;<NEW_LINE>marker.creationDate = point.getCreationDate();<NEW_LINE>marker.visitedDate = point.getVisitedDate();<NEW_LINE>marker.history = marker.visitedDate != 0;<NEW_LINE>if (group != null) {<NEW_LINE>marker.groupKey = group.getId();<NEW_LINE>marker.groupName = group.getName();<NEW_LINE>}<NEW_LINE>return marker;<NEW_LINE>}
), point.getLongitude());
970,965
public boolean containsValue(@CheckForNull Object value) {<NEW_LINE>// does not impact recency ordering<NEW_LINE>if (value == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// This implementation is patterned after ConcurrentHashMap, but without the locking. The only<NEW_LINE>// way for it to return a false negative would be for the target value to jump around in the map<NEW_LINE>// such that none of the subsequent iterations observed it, despite the fact that at every point<NEW_LINE>// in time it was present somewhere int the map. This becomes increasingly unlikely as<NEW_LINE>// CONTAINS_VALUE_RETRIES increases, though without locking it is theoretically possible.<NEW_LINE><MASK><NEW_LINE>final Segment<K, V>[] segments = this.segments;<NEW_LINE>long last = -1L;<NEW_LINE>for (int i = 0; i < CONTAINS_VALUE_RETRIES; i++) {<NEW_LINE>long sum = 0L;<NEW_LINE>for (Segment<K, V> segment : segments) {<NEW_LINE>// ensure visibility of most recent completed write<NEW_LINE>// read-volatile<NEW_LINE>int unused = segment.count;<NEW_LINE>AtomicReferenceArray<ReferenceEntry<K, V>> table = segment.table;<NEW_LINE>for (int j = 0; j < table.length(); j++) {<NEW_LINE>for (ReferenceEntry<K, V> e = table.get(j); e != null; e = e.getNext()) {<NEW_LINE>V v = segment.getLiveValue(e, now);<NEW_LINE>if (v != null && valueEquivalence.equivalent(value, v)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sum += segment.modCount;<NEW_LINE>}<NEW_LINE>if (sum == last) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>last = sum;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
long now = ticker.read();
237,307
private int createComplementDataCommand(Date scheduleDate) {<NEW_LINE>Command command = new Command();<NEW_LINE>command.setScheduleTime(scheduleDate);<NEW_LINE>command.setCommandType(CommandType.COMPLEMENT_DATA);<NEW_LINE>command.setProcessDefinitionCode(processInstance.getProcessDefinitionCode());<NEW_LINE>Map<String, String> cmdParam = JSONUtils.toMap(processInstance.getCommandParam());<NEW_LINE>if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) {<NEW_LINE>cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING);<NEW_LINE>}<NEW_LINE>cmdParam.replace(CMDPARAM_COMPLEMENT_DATA_START_DATE, DateUtils.format(scheduleDate, "yyyy-MM-dd HH:mm:ss", null));<NEW_LINE>command.setCommandParam(JSONUtils.toJsonString(cmdParam));<NEW_LINE>command.setTaskDependType(processInstance.getTaskDependType());<NEW_LINE>command.setFailureStrategy(processInstance.getFailureStrategy());<NEW_LINE>command.setWarningType(processInstance.getWarningType());<NEW_LINE>command.setWarningGroupId(processInstance.getWarningGroupId());<NEW_LINE>command.setStartTime(new Date());<NEW_LINE>command.setExecutorId(processInstance.getExecutorId());<NEW_LINE>command.setUpdateTime(new Date());<NEW_LINE>command.<MASK><NEW_LINE>command.setWorkerGroup(processInstance.getWorkerGroup());<NEW_LINE>command.setEnvironmentCode(processInstance.getEnvironmentCode());<NEW_LINE>command.setDryRun(processInstance.getDryRun());<NEW_LINE>command.setProcessInstanceId(0);<NEW_LINE>command.setProcessDefinitionVersion(processInstance.getProcessDefinitionVersion());<NEW_LINE>return processService.createCommand(command);<NEW_LINE>}
setProcessInstancePriority(processInstance.getProcessInstancePriority());
1,768,613
private void addInitializersToConstructors(ASTRewrite rewrite) throws CoreException {<NEW_LINE>Assert.isTrue(!isDeclaredInAnonymousClass());<NEW_LINE>final AbstractTypeDeclaration declaration = (AbstractTypeDeclaration) getMethodDeclaration().getParent();<NEW_LINE>final MethodDeclaration[] constructors = getAllConstructors(declaration);<NEW_LINE>if (constructors.length == 0) {<NEW_LINE>AST ast = rewrite.getAST();<NEW_LINE><MASK><NEW_LINE>newConstructor.setConstructor(true);<NEW_LINE>newConstructor.modifiers().addAll(ast.newModifiers(declaration.getModifiers() & ModifierRewrite.VISIBILITY_MODIFIERS));<NEW_LINE>newConstructor.setName(ast.newSimpleName(declaration.getName().getIdentifier()));<NEW_LINE>newConstructor.setBody(ast.newBlock());<NEW_LINE>addFieldInitializationToConstructor(rewrite, newConstructor);<NEW_LINE>int insertionIndex = computeInsertIndexForNewConstructor(declaration);<NEW_LINE>rewrite.getListRewrite(declaration, declaration.getBodyDeclarationsProperty()).insertAt(newConstructor, insertionIndex, null);<NEW_LINE>} else {<NEW_LINE>for (int index = 0; index < constructors.length; index++) {<NEW_LINE>if (shouldInsertTempInitialization(constructors[index])) {<NEW_LINE>addFieldInitializationToConstructor(rewrite, constructors[index]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
MethodDeclaration newConstructor = ast.newMethodDeclaration();
411,806
public void spew(final ResolveOptions resOpt, final StringSpewCatcher to, final String indent, final boolean nameSort) throws IOException {<NEW_LINE>to.spewLine(indent + "=====ENTITY=====");<NEW_LINE>to.spewLine(indent + getResolvedName());<NEW_LINE>to.spewLine(indent + "================");<NEW_LINE>to.spewLine(indent + "properties:");<NEW_LINE><MASK><NEW_LINE>to.spewLine(indent + "traits:");<NEW_LINE>if (resolvedTraits != null) {<NEW_LINE>resolvedTraits.spew(resOpt, to, indent + " ", nameSort);<NEW_LINE>}<NEW_LINE>to.spewLine("attributes:");<NEW_LINE>if (resolvedAttributes != null) {<NEW_LINE>resolvedAttributes.spew(resOpt, to, indent + " ", nameSort);<NEW_LINE>}<NEW_LINE>to.spewLine("relationships:");<NEW_LINE>if (resolvedEntityReferences != null) {<NEW_LINE>resolvedEntityReferences.spew(resOpt, to, indent + " ", nameSort);<NEW_LINE>}<NEW_LINE>}
spewProperties(to, indent + " ");
121,121
public Builder mergeFrom(emu.grasscutter.net.proto.WorldPlayerInfoNotifyOuterClass.WorldPlayerInfoNotify other) {<NEW_LINE>if (other == emu.grasscutter.net.proto.WorldPlayerInfoNotifyOuterClass.WorldPlayerInfoNotify.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (playerInfoListBuilder_ == null) {<NEW_LINE>if (!other.playerInfoList_.isEmpty()) {<NEW_LINE>if (playerInfoList_.isEmpty()) {<NEW_LINE>playerInfoList_ = other.playerInfoList_;<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>ensurePlayerInfoListIsMutable();<NEW_LINE>playerInfoList_.addAll(other.playerInfoList_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.playerInfoList_.isEmpty()) {<NEW_LINE>if (playerInfoListBuilder_.isEmpty()) {<NEW_LINE>playerInfoListBuilder_.dispose();<NEW_LINE>playerInfoListBuilder_ = null;<NEW_LINE>playerInfoList_ = other.playerInfoList_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>playerInfoListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPlayerInfoListFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>playerInfoListBuilder_.addAllMessages(other.playerInfoList_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!other.playerUidList_.isEmpty()) {<NEW_LINE>if (playerUidList_.isEmpty()) {<NEW_LINE>playerUidList_ = other.playerUidList_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>} else {<NEW_LINE>ensurePlayerUidListIsMutable();<NEW_LINE>playerUidList_.addAll(other.playerUidList_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000001);
193,092
private Map<String, Object> tableOrUserTypeToAvro(FieldInfo fieldInfo, UserTypeInfo typeInfo, boolean asSchema) {<NEW_LINE>Map<String, Object> field = new HashMap<String, Object>();<NEW_LINE>// Field name<NEW_LINE>String name = SchemaUtils.toCamelCase(fieldInfo.getFieldName());<NEW_LINE>field.put("name", name);<NEW_LINE>// Field type<NEW_LINE>Map<String, Object> realType = new HashMap<String, Object>();<NEW_LINE>// check if we are a "top-level" record or not<NEW_LINE>Map<String, Object> fieldsDest = asSchema ? field : realType;<NEW_LINE>if (asSchema) {<NEW_LINE>// asSchema is true only for the very topmost level of the schema (type = record; should never be null)<NEW_LINE>// and for the "items" descriptor in collectionTypeToAvro() (aggregate descriptor of sub-fields; latter<NEW_LINE>// may be null individually, but descriptor presumably never can be). Ergo, "default":null makes sense<NEW_LINE>// only in the other half of this conditional.<NEW_LINE>field.put("type", "record");<NEW_LINE>} else {<NEW_LINE>// inner, curly-brace level ("real" structure)<NEW_LINE>realType.put("type", "record");<NEW_LINE>realType.put("name", typeInfo.getName());<NEW_LINE>// outer, square-brackets level (solely for nullability)<NEW_LINE>List<Object> nullableType = new ArrayList<Object>();<NEW_LINE>nullableType.add("null");<NEW_LINE>nullableType.add(realType);<NEW_LINE>field.put("type", nullableType);<NEW_LINE>// field default value: only for this level?<NEW_LINE>field.put("default", null);<NEW_LINE>}<NEW_LINE>// Child fields<NEW_LINE>List<Map<String, Object>> fields = new ArrayList<Map<String, Object>>();<NEW_LINE>for (FieldInfo childField : typeInfo.getFields()) {<NEW_LINE>Map<String, Object> childFieldMap = fieldToAvro(childField, false);<NEW_LINE>fields.add(childFieldMap);<NEW_LINE>}<NEW_LINE>fieldsDest.put("fields", fields);<NEW_LINE>// Field metadata<NEW_LINE>String dbFieldName = fieldInfo.getFieldName();<NEW_LINE>int dbFieldPosition = fieldInfo.getFieldPosition();<NEW_LINE>String dbFieldType = fieldInfo<MASK><NEW_LINE>// null unless TableTypeInfo (== top-level table)<NEW_LINE>String pk = typeInfo.getPrimaryKey();<NEW_LINE>String meta = buildMetaString(dbFieldName, dbFieldPosition, dbFieldType, pk);<NEW_LINE>field.put("meta", meta);<NEW_LINE>// Return the Map for this field<NEW_LINE>return field;<NEW_LINE>}
.getFieldTypeInfo().getName();
657,921
public boolean connectPhysicalDisksViaVmSpec(VirtualMachineTO vmSpec) {<NEW_LINE>boolean result = false;<NEW_LINE>final String vmName = vmSpec.getName();<NEW_LINE>List<DiskTO> disks = Arrays.asList(vmSpec.getDisks());<NEW_LINE>for (DiskTO disk : disks) {<NEW_LINE>if (disk.getType() == Volume.Type.ISO) {<NEW_LINE>result = true;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>VolumeObjectTO vol = (VolumeObjectTO) disk.getData();<NEW_LINE>PrimaryDataStoreTO store = (PrimaryDataStoreTO) vol.getDataStore();<NEW_LINE>if (!store.isManaged() && VirtualMachine.State.Migrating.equals(vmSpec.getState())) {<NEW_LINE>result = true;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>KVMStoragePool pool = getStoragePool(store.getPoolType(), store.getUuid());<NEW_LINE>StorageAdaptor adaptor = <MASK><NEW_LINE>result = adaptor.connectPhysicalDisk(vol.getPath(), pool, disk.getDetails());<NEW_LINE>if (!result) {<NEW_LINE>s_logger.error("Failed to connect disks via vm spec for vm: " + vmName + " volume:" + vol.toString());<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
getStorageAdaptor(pool.getType());
1,853,649
public void handle(PacketWrapper wrapper) throws Exception {<NEW_LINE>Position position = wrapper.<MASK><NEW_LINE>short action = wrapper.get(Type.UNSIGNED_BYTE, 0);<NEW_LINE>CompoundTag tag = wrapper.get(Type.NBT, 0);<NEW_LINE>BlockEntityProvider provider = Via.getManager().getProviders().get(BlockEntityProvider.class);<NEW_LINE>int newId = provider.transform(wrapper.user(), position, tag, true);<NEW_LINE>if (newId != -1) {<NEW_LINE>BlockStorage storage = wrapper.user().get(BlockStorage.class);<NEW_LINE>BlockStorage.ReplacementData replacementData = storage.get(position);<NEW_LINE>if (replacementData != null) {<NEW_LINE>replacementData.setReplacement(newId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (action == 5) {<NEW_LINE>// Set type of flower in flower pot<NEW_LINE>// Removed<NEW_LINE>wrapper.cancel();<NEW_LINE>}<NEW_LINE>}
get(Type.POSITION, 0);
824,743
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ftp_dir" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>int size = 0;<NEW_LINE>FtpClientImpl client = null;<NEW_LINE>SFtpClientImpl sclient = null;<NEW_LINE>if (param.isLeaf()) {<NEW_LINE>Object o = param.getLeafExpression().calculate(ctx);<NEW_LINE>if (o instanceof FtpClientImpl)<NEW_LINE>client = (FtpClientImpl) o;<NEW_LINE>else if (o instanceof SFtpClientImpl)<NEW_LINE>sclient = (SFtpClientImpl) o;<NEW_LINE>else<NEW_LINE>throw new RQException("first parameter is not ftp_client");<NEW_LINE>} else {<NEW_LINE>size = param.getSubSize();<NEW_LINE>if (size < 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ftp_dir" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String path = null;<NEW_LINE>boolean onlyDir = option != null && option.indexOf("d") >= 0;<NEW_LINE>boolean fullPath = option != null && option.indexOf("p") >= 0;<NEW_LINE>boolean mkdir = option != null && option.indexOf("m") >= 0;<NEW_LINE>boolean deldir = option != null && option.indexOf("r") >= 0;<NEW_LINE>ArrayList<String> patterns = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>if (param.getSub(i) == null) {<NEW_LINE><MASK><NEW_LINE>throw new RQException("ftp_get" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>if (i == 0) {<NEW_LINE>Object o = param.getSub(i).getLeafExpression().calculate(ctx);<NEW_LINE>if (o instanceof FtpClientImpl)<NEW_LINE>client = (FtpClientImpl) o;<NEW_LINE>else if (o instanceof SFtpClientImpl)<NEW_LINE>sclient = (SFtpClientImpl) o;<NEW_LINE>else<NEW_LINE>throw new RQException("first parameter is not ftp_client");<NEW_LINE>} else {<NEW_LINE>patterns.add((String) param.getSub(i).getLeafExpression().calculate(ctx));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (path == null) {<NEW_LINE>if (client != null)<NEW_LINE>path = client.getCurrentDir();<NEW_LINE>else<NEW_LINE>path = sclient.getCurrentDir();<NEW_LINE>}<NEW_LINE>Sequence s = null;<NEW_LINE>try {<NEW_LINE>if (client != null) {<NEW_LINE>if (mkdir)<NEW_LINE>s = client.mkdir(patterns);<NEW_LINE>else if (deldir)<NEW_LINE>s = client.deldir(patterns);<NEW_LINE>else<NEW_LINE>s = client.dirList(path, patterns, onlyDir, fullPath);<NEW_LINE>} else {<NEW_LINE>if (mkdir)<NEW_LINE>s = sclient.mkdir(patterns);<NEW_LINE>else if (deldir)<NEW_LINE>s = sclient.deldir(patterns);<NEW_LINE>else<NEW_LINE>s = sclient.dirList(path, patterns, onlyDir, fullPath);<NEW_LINE>// s = sclient.dirList(path, patterns,onlyDir,fullPath);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>throw new RQException("ftp_dir : " + e.getMessage());<NEW_LINE>}<NEW_LINE>return s;<NEW_LINE>}
MessageManager mm = EngineMessage.get();
1,666,419
private void registerActions(final JComponent view) {<NEW_LINE>InputMap inputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);<NEW_LINE>ActionMap actionMap = getActionMap();<NEW_LINE>final String filterKey = org.netbeans.lib.profiler<MASK><NEW_LINE>Action filterAction = new AbstractAction() {<NEW_LINE><NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>Action action = view.getActionMap().get(filterKey);<NEW_LINE>if (action != null && action.isEnabled())<NEW_LINE>action.actionPerformed(e);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>ActionsSupport.registerAction(filterKey, filterAction, actionMap, inputMap);<NEW_LINE>final String findKey = SearchUtils.FIND_ACTION_KEY;<NEW_LINE>Action findAction = new AbstractAction() {<NEW_LINE><NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>Action action = view.getActionMap().get(findKey);<NEW_LINE>if (action != null && action.isEnabled())<NEW_LINE>action.actionPerformed(e);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>ActionsSupport.registerAction(findKey, findAction, actionMap, inputMap);<NEW_LINE>}
.ui.swing.FilterUtils.FILTER_ACTION_KEY;
313,643
private void putMediaWithSender(final Consumer<OutputStream> sender) {<NEW_LINE>final ParallelSimpleHttpClient.Builder clientBuilder = ParallelSimpleHttpClient.builder().uri(mBuilder.mUri).method(POST).log(log).header(STREAM_NAME_HEADER, mBuilder.mStreamName).header(TRANSFER_ENCODING, CHUNKED).header(CONNECTION, KEEP_ALIVE).header(<MASK><NEW_LINE>clientBuilder.setReceiverCallback(mBuilder.mAcksReceiver);<NEW_LINE>clientBuilder.header(PRODUCER_START_TIMESTAMP_HEADER, String.format(Locale.US, "%.3f", mBuilder.mTimestamp / MILLI_TO_SEC));<NEW_LINE>clientBuilder.header(FRAGMENT_TIME_CODE_TYPE_HEADER, mBuilder.mFragmentTimecodeType);<NEW_LINE>clientBuilder.completionCallback(mBuilder.mCompletion);<NEW_LINE>clientBuilder.setSenderCallback(sender);<NEW_LINE>// Timeout if no response is received from the server for put(i.e., acks)<NEW_LINE>// Socket will/should be closed by the consumer by throwing the SocketTimeoutException<NEW_LINE>clientBuilder.setTimeout(mBuilder.mReceiveTimeout);<NEW_LINE>httpClient = clientBuilder.build();<NEW_LINE>sign(httpClient);<NEW_LINE>// add additional unsigned headers<NEW_LINE>if (mBuilder.unsignedHeaders != null) {<NEW_LINE>for (final String headerName : mBuilder.unsignedHeaders.keySet()) {<NEW_LINE>clientBuilder.header(headerName, mBuilder.unsignedHeaders.get(headerName));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>httpClient.connectAndProcessInBackground();<NEW_LINE>}
USER_AGENT, VersionUtil.getUserAgent());
1,657,960
private boolean suggest(ApplicationId applicationId, ClusterSpec.Id clusterId, NodeList clusterNodes) {<NEW_LINE>Application application = applications().get(applicationId).orElse(Application.empty(applicationId));<NEW_LINE>Optional<Cluster> cluster = application.cluster(clusterId);<NEW_LINE>if (cluster.isEmpty())<NEW_LINE>return true;<NEW_LINE>var suggestion = autoscaler.suggest(application, cluster.get(), clusterNodes);<NEW_LINE>if (suggestion.isEmpty())<NEW_LINE>return true;<NEW_LINE>// Wait only a short time for the lock to avoid interfering with change deployments<NEW_LINE>try (Mutex lock = nodeRepository().nodes().lock(applicationId, Duration.ofSeconds(1))) {<NEW_LINE>// empty suggested resources == keep the current allocation, so we record that<NEW_LINE>var suggestedResources = suggestion.target().orElse(clusterNodes.not().<MASK><NEW_LINE>applications().get(applicationId).ifPresent(a -> updateSuggestion(suggestedResources, clusterId, a, lock));<NEW_LINE>return true;<NEW_LINE>} catch (ApplicationLockException e) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
retired().toResources());
670,651
final DeleteTransitGatewayConnectResult executeDeleteTransitGatewayConnect(DeleteTransitGatewayConnectRequest deleteTransitGatewayConnectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTransitGatewayConnectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteTransitGatewayConnectRequest> request = null;<NEW_LINE>Response<DeleteTransitGatewayConnectResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new DeleteTransitGatewayConnectRequestMarshaller().marshall(super.beforeMarshalling(deleteTransitGatewayConnectRequest));<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, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTransitGatewayConnect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DeleteTransitGatewayConnectResult> responseHandler = new StaxResponseHandler<DeleteTransitGatewayConnectResult>(new DeleteTransitGatewayConnectResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
811,174
public int compareTo(getCompactionQueueInfo_args other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTinfo(<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetTinfo()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetCredentials()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
), other.isSetTinfo());
101,388
static void buildRecursiveScp(final SCPInterface scp, final INodeEntry nodeentry, final Project project, final String remotePath, final File sourceFolder, final SSHConnectionInfo sshConnectionInfo, final int loglevel, final PluginLogger logger) throws BuilderException {<NEW_LINE>if (null == sourceFolder) {<NEW_LINE>throw new BuilderException("sourceFolder was not set");<NEW_LINE>}<NEW_LINE>final String username = sshConnectionInfo.getUsername();<NEW_LINE>if (null == username) {<NEW_LINE>throw new BuilderException("username was not set");<NEW_LINE>}<NEW_LINE>configureSSHBase(nodeentry, project, sshConnectionInfo, scp, loglevel, logger);<NEW_LINE>scp.setTimeout(sshConnectionInfo.getTimeout());<NEW_LINE>scp.setCommandTimeout(sshConnectionInfo.getCommandTimeout());<NEW_LINE>scp.setConnectTimeout(sshConnectionInfo.getConnectTimeout());<NEW_LINE>// Set the local and remote file paths<NEW_LINE>// scp.setLocalFile(sourceFolder.getAbsolutePath());<NEW_LINE>FileSet set = new FileSet();<NEW_LINE>set.setDir(sourceFolder);<NEW_LINE>scp.addFileset(set);<NEW_LINE>final String sshUriPrefix = username + "@" + nodeentry.extractHostname() + ":";<NEW_LINE><MASK><NEW_LINE>}
scp.setTodir(sshUriPrefix + remotePath);
353,057
final DeleteBusinessReportScheduleResult executeDeleteBusinessReportSchedule(DeleteBusinessReportScheduleRequest deleteBusinessReportScheduleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteBusinessReportScheduleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteBusinessReportScheduleRequest> request = null;<NEW_LINE>Response<DeleteBusinessReportScheduleResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteBusinessReportScheduleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBusinessReportScheduleRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Alexa For Business");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBusinessReportSchedule");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteBusinessReportScheduleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBusinessReportScheduleResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());