idx
int32 46
1.86M
| input
stringlengths 321
6.6k
| target
stringlengths 9
1.24k
|
|---|---|---|
597,222
|
private void updateBreakpointWarningBar() {<NEW_LINE>// check to see if there are any inactive breakpoints in this file<NEW_LINE>boolean hasInactiveBreakpoints = false;<NEW_LINE>boolean hasDebugPendingBreakpoints = false;<NEW_LINE>boolean hasPackagePendingBreakpoints = false;<NEW_LINE>String pendingPackageName = "";<NEW_LINE>ArrayList<Breakpoint> breakpoints = breakpointManager_.getBreakpointsInFile(getPath());<NEW_LINE>for (Breakpoint breakpoint : breakpoints) {<NEW_LINE>if (breakpoint.getState() == Breakpoint.STATE_INACTIVE) {<NEW_LINE>if (breakpoint.isPendingDebugCompletion()) {<NEW_LINE>hasDebugPendingBreakpoints = true;<NEW_LINE>} else if (breakpoint.isPackageBreakpoint()) {<NEW_LINE>hasPackagePendingBreakpoints = true;<NEW_LINE>pendingPackageName = breakpoint.getPackageName();<NEW_LINE>} else {<NEW_LINE>hasInactiveBreakpoints = true;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (showWarning && !isBreakpointWarningVisible_) {<NEW_LINE>String message = "";<NEW_LINE>if (hasDebugPendingBreakpoints) {<NEW_LINE>message = constants_.updateBreakpointWarningBarFunctionMessage();<NEW_LINE>} else if (isPackageFile()) {<NEW_LINE>message = constants_.updateBreakpointWarningBarPackageLoadMessage();<NEW_LINE>} else if (hasPackagePendingBreakpoints) {<NEW_LINE>message = constants_.updateBreakpointWarningBarPackageMessage(pendingPackageName);<NEW_LINE>} else {<NEW_LINE>message = constants_.updateBreakpointWarningBarSourcedMessage();<NEW_LINE>}<NEW_LINE>view_.showWarningBar(message);<NEW_LINE>isBreakpointWarningVisible_ = true;<NEW_LINE>} else if (!showWarning && isBreakpointWarningVisible_) {<NEW_LINE>hideBreakpointWarningBar();<NEW_LINE>}<NEW_LINE>}
|
boolean showWarning = hasDebugPendingBreakpoints || hasInactiveBreakpoints || hasPackagePendingBreakpoints;
|
135,951
|
private void addPreferenceFromJSON(JSONObject obj) {<NEW_LINE>String type = obj.optString("type", null);<NEW_LINE>String key = obj.optString("key", null);<NEW_LINE>String title = obj.optString("title", null);<NEW_LINE>if (type == null || key == null || title == null)<NEW_LINE>return;<NEW_LINE>Preference pref = null;<NEW_LINE>if ("bool".equals(type)) {<NEW_LINE>// We can add other types we want to support and handle the preference construction here<NEW_LINE>pref = new CheckBoxPreference(this);<NEW_LINE>pref.setKey(key);<NEW_LINE>pref.setTitle(title);<NEW_LINE>pref.setDefaultValue(Preferences.getBoolean(key, false));<NEW_LINE>}<NEW_LINE>if (pref == null)<NEW_LINE>return;<NEW_LINE>if (obj.optBoolean("restart")) {<NEW_LINE>pref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean onPreferenceChange(Preference preference, Object newValue) {<NEW_LINE>setResult(RESULT_OK);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
|
getPreferenceScreen().addPreference(pref);
|
1,299,804
|
private <T extends PsiModifierListOwner & PsiNamedElement> PsiMethod generateDelegateMethod(@NotNull PsiClass psiClass, @NotNull T psiElement, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiMethod psiMethod, @NotNull PsiSubstitutor psiSubstitutor) {<NEW_LINE>final PsiType returnType = psiSubstitutor.substitute(psiMethod.getReturnType());<NEW_LINE>final LombokLightMethodBuilder methodBuilder = // Have to go to original method, or some refactoring action will not work (like extract parameter oder change signature)<NEW_LINE>new LombokLightMethodBuilder(psiClass.getManager(), psiMethod.getName()).withModifier(PsiModifier.PUBLIC).withMethodReturnType(returnType).withContainingClass(psiClass).withNavigationElement(psiMethod);<NEW_LINE>for (PsiTypeParameter typeParameter : psiMethod.getTypeParameters()) {<NEW_LINE>methodBuilder.withTypeParameter(typeParameter);<NEW_LINE>}<NEW_LINE>final PsiReferenceList throwsList = psiMethod.getThrowsList();<NEW_LINE>for (PsiClassType psiClassType : throwsList.getReferencedTypes()) {<NEW_LINE>methodBuilder.withException(psiClassType);<NEW_LINE>}<NEW_LINE>final PsiParameterList parameterList = psiMethod.getParameterList();<NEW_LINE>final PsiParameter[] psiParameters = parameterList.getParameters();<NEW_LINE>for (int parameterIndex = 0; parameterIndex < psiParameters.length; parameterIndex++) {<NEW_LINE>final PsiParameter psiParameter = psiParameters[parameterIndex];<NEW_LINE>final PsiType psiParameterType = psiSubstitutor.substitute(psiParameter.getType());<NEW_LINE>final String generatedParameterName = StringUtils.defaultIfEmpty(psiParameter.getName(), "p" + parameterIndex);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>final String codeBlockText = createCodeBlockText(psiElement, psiMethod, returnType, psiParameters);<NEW_LINE>methodBuilder.withBody(PsiMethodUtil.createCodeBlockFromText(codeBlockText, methodBuilder));<NEW_LINE>return methodBuilder;<NEW_LINE>}
|
methodBuilder.withParameter(generatedParameterName, psiParameterType);
|
1,129,297
|
public static void drawPolygon(Polygon2D_F64 polygon, Graphics2D g2, double scale) {<NEW_LINE>g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);<NEW_LINE>g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);<NEW_LINE>Line2D.Double l = new Line2D.Double();<NEW_LINE>for (int i = 0; i < polygon.size() - 1; i++) {<NEW_LINE>Point2D_F64 p0 = polygon.get(i);<NEW_LINE>Point2D_F64 p1 = <MASK><NEW_LINE>drawLine(g2, l, p0.x * scale, p0.y * scale, p1.x * scale, p1.y * scale);<NEW_LINE>}<NEW_LINE>if (polygon.size() > 0) {<NEW_LINE>Point2D_F64 p0 = polygon.get(0);<NEW_LINE>Point2D_F64 p1 = polygon.get(polygon.size() - 1);<NEW_LINE>drawLine(g2, l, p0.x * scale, p0.y * scale, p1.x * scale, p1.y * scale);<NEW_LINE>}<NEW_LINE>}
|
polygon.get(i + 1);
|
1,218,257
|
protected // the current container to a bitset<NEW_LINE>void naivelazyor(final ImmutableRoaringBitmap x2) {<NEW_LINE>int pos1 = 0, pos2 = 0;<NEW_LINE>int length1 = highLowContainer.size();<NEW_LINE>final int length2 = x2.highLowContainer.size();<NEW_LINE>main: if (pos1 < length1 && pos2 < length2) {<NEW_LINE>char s1 = highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>char s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>while (true) {<NEW_LINE>if (s1 == s2) {<NEW_LINE>MappeableBitmapContainer c1 = highLowContainer.getContainerAtIndex(pos1).toBitmapContainer();<NEW_LINE>getMappeableRoaringArray().setContainerAtIndex(pos1, c1.lazyIOR(x2.highLowContainer.getContainerAtIndex(pos2)));<NEW_LINE>pos1++;<NEW_LINE>pos2++;<NEW_LINE>if ((pos1 == length1) || (pos2 == length2)) {<NEW_LINE>break main;<NEW_LINE>}<NEW_LINE>s1 = highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>} else if (s1 < s2) {<NEW_LINE>pos1++;<NEW_LINE>if (pos1 == length1) {<NEW_LINE>break main;<NEW_LINE>}<NEW_LINE>s1 = highLowContainer.getKeyAtIndex(pos1);<NEW_LINE>} else {<NEW_LINE>// s1 > s2<NEW_LINE>getMappeableRoaringArray().insertNewKeyValueAt(pos1, s2, x2.highLowContainer.getContainerAtIndex(pos2).clone());<NEW_LINE>pos1++;<NEW_LINE>length1++;<NEW_LINE>pos2++;<NEW_LINE>if (pos2 == length2) {<NEW_LINE>break main;<NEW_LINE>}<NEW_LINE>s2 = x2.highLowContainer.getKeyAtIndex(pos2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (pos1 == length1) {<NEW_LINE>getMappeableRoaringArray().appendCopy(<MASK><NEW_LINE>}<NEW_LINE>}
|
x2.highLowContainer, pos2, length2);
|
457,823
|
private static void create_via_rule(Collection<String> p_use_via, app.freerouting.rules.NetClass p_net_class, app.freerouting.board.BasicBoard p_board, boolean p_attach_allowed) {<NEW_LINE>app.freerouting.rules.ViaRule new_via_rule = new app.freerouting.rules.<MASK><NEW_LINE>int default_via_cl_class = p_net_class.default_item_clearance_classes.get(app.freerouting.rules.DefaultItemClearanceClasses.ItemClass.VIA);<NEW_LINE>for (String curr_via_name : p_use_via) {<NEW_LINE>for (int i = 0; i < p_board.rules.via_infos.count(); ++i) {<NEW_LINE>app.freerouting.rules.ViaInfo curr_via_info = p_board.rules.via_infos.get(i);<NEW_LINE>if (curr_via_info.get_clearance_class() == default_via_cl_class) {<NEW_LINE>if (curr_via_info.get_padstack().name.equals(curr_via_name)) {<NEW_LINE>new_via_rule.append_via(curr_via_info);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>p_board.rules.via_rules.add(new_via_rule);<NEW_LINE>p_net_class.set_via_rule(new_via_rule);<NEW_LINE>}
|
ViaRule(p_net_class.get_name());
|
1,113,777
|
public static ListClassesResponse unmarshall(ListClassesResponse listClassesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listClassesResponse.setRequestId(_ctx.stringValue("ListClassesResponse.RequestId"));<NEW_LINE>listClassesResponse.setRegionId(_ctx.stringValue("ListClassesResponse.RegionId"));<NEW_LINE>List<ClassList> items <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListClassesResponse.Items.Length"); i++) {<NEW_LINE>ClassList classList = new ClassList();<NEW_LINE>classList.setClassCode(_ctx.stringValue("ListClassesResponse.Items[" + i + "].ClassCode"));<NEW_LINE>classList.setClassGroup(_ctx.stringValue("ListClassesResponse.Items[" + i + "].ClassGroup"));<NEW_LINE>classList.setCpu(_ctx.stringValue("ListClassesResponse.Items[" + i + "].Cpu"));<NEW_LINE>classList.setMaxConnections(_ctx.stringValue("ListClassesResponse.Items[" + i + "].MaxConnections"));<NEW_LINE>classList.setMaxIOMBPS(_ctx.stringValue("ListClassesResponse.Items[" + i + "].MaxIOMBPS"));<NEW_LINE>classList.setMaxIOPS(_ctx.stringValue("ListClassesResponse.Items[" + i + "].MaxIOPS"));<NEW_LINE>classList.setMemoryClass(_ctx.stringValue("ListClassesResponse.Items[" + i + "].MemoryClass"));<NEW_LINE>classList.setReferencePrice(_ctx.stringValue("ListClassesResponse.Items[" + i + "].ReferencePrice"));<NEW_LINE>items.add(classList);<NEW_LINE>}<NEW_LINE>listClassesResponse.setItems(items);<NEW_LINE>return listClassesResponse;<NEW_LINE>}
|
= new ArrayList<ClassList>();
|
1,759,917
|
public void init(Properties properties) {<NEW_LINE>RabbitMQProducerConfig rabbitMQProperties = new RabbitMQProducerConfig();<NEW_LINE>this.mqProperties = rabbitMQProperties;<NEW_LINE>super.init(properties);<NEW_LINE>loadRabbitMQProperties(properties);<NEW_LINE>ConnectionFactory factory = new ConnectionFactory();<NEW_LINE>String servers = rabbitMQProperties.getHost();<NEW_LINE>if (servers.contains(":")) {<NEW_LINE>String[] serverHostAndPort = servers.split(":");<NEW_LINE>factory.setHost(serverHostAndPort[0]);<NEW_LINE>factory.setPort(Integer.parseInt(serverHostAndPort[1]));<NEW_LINE>} else {<NEW_LINE>factory.setHost(servers);<NEW_LINE>}<NEW_LINE>if (mqProperties.getAliyunAccessKey().length() > 0 && mqProperties.getAliyunSecretKey().length() > 0 && mqProperties.getAliyunUid() > 0) {<NEW_LINE>factory.setCredentialsProvider(new AliyunCredentialsProvider(mqProperties.getAliyunAccessKey(), mqProperties.getAliyunSecretKey(), mqProperties.getAliyunUid()));<NEW_LINE>} else {<NEW_LINE>factory.setUsername(rabbitMQProperties.getUsername());<NEW_LINE>factory.setPassword(rabbitMQProperties.getPassword());<NEW_LINE>}<NEW_LINE>factory.setVirtualHost(rabbitMQProperties.getVirtualHost());<NEW_LINE>try {<NEW_LINE>connect = factory.newConnection();<NEW_LINE>channel = connect.createChannel();<NEW_LINE>// channel.exchangeDeclare(mqProperties.getExchange(), "topic");<NEW_LINE>} catch (IOException | TimeoutException ex) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
|
throw new CanalException("Start RabbitMQ producer error", ex);
|
595,209
|
private TaskProvider<ResolveMainClassName> configureResolveMainClassNameTask(Project project) {<NEW_LINE>return project.getTasks().register(SpringBootPlugin.RESOLVE_MAIN_CLASS_NAME_TASK_NAME, ResolveMainClassName.class, (resolveMainClassName) -> {<NEW_LINE>ExtensionContainer extensions = project.getExtensions();<NEW_LINE>resolveMainClassName.setDescription("Resolves the name of the application's main class.");<NEW_LINE>resolveMainClassName.setGroup(BasePlugin.BUILD_GROUP);<NEW_LINE>Callable<FileCollection> classpath = () -> project.getExtensions().getByType(SourceSetContainer.class).getByName(SourceSet.MAIN_SOURCE_SET_NAME).getOutput();<NEW_LINE>resolveMainClassName.setClasspath(classpath);<NEW_LINE>resolveMainClassName.getConfiguredMainClassName().convention(project.provider(() -> {<NEW_LINE>String javaApplicationMainClass = getJavaApplicationMainClass(extensions);<NEW_LINE>if (javaApplicationMainClass != null) {<NEW_LINE>return javaApplicationMainClass;<NEW_LINE>}<NEW_LINE>SpringBootExtension springBootExtension = project.getExtensions(<MASK><NEW_LINE>return springBootExtension.getMainClass().getOrNull();<NEW_LINE>}));<NEW_LINE>resolveMainClassName.getOutputFile().set(project.getLayout().getBuildDirectory().file("resolvedMainClassName"));<NEW_LINE>});<NEW_LINE>}
|
).findByType(SpringBootExtension.class);
|
1,753,584
|
public boolean format() throws Exception {<NEW_LINE>// Clear underreplicated ledgers<NEW_LINE>try {<NEW_LINE>ZKUtil.deleteRecursive(zk, ZkLedgerUnderreplicationManager.getBasePath<MASK><NEW_LINE>} catch (KeeperException.NoNodeException e) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("underreplicated ledgers root path node not exists in zookeeper to delete");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Clear underreplicatedledger locks<NEW_LINE>try {<NEW_LINE>ZKUtil.deleteRecursive(zk, ZkLedgerUnderreplicationManager.getBasePath(ledgersRootPath) + '/' + BookKeeperConstants.UNDER_REPLICATION_LOCK);<NEW_LINE>} catch (KeeperException.NoNodeException e) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("underreplicatedledger locks node not exists in zookeeper to delete");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Clear the cookies<NEW_LINE>try {<NEW_LINE>ZKUtil.deleteRecursive(zk, cookiePath);<NEW_LINE>} catch (KeeperException.NoNodeException e) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("cookies node not exists in zookeeper to delete");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Clear the INSTANCEID<NEW_LINE>try {<NEW_LINE>zk.delete(ledgersRootPath + "/" + BookKeeperConstants.INSTANCEID, -1);<NEW_LINE>} catch (KeeperException.NoNodeException e) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("INSTANCEID not exists in zookeeper to delete");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// create INSTANCEID<NEW_LINE>String instanceId = UUID.randomUUID().toString();<NEW_LINE>zk.create(ledgersRootPath + "/" + BookKeeperConstants.INSTANCEID, instanceId.getBytes(StandardCharsets.UTF_8), zkAcls, CreateMode.PERSISTENT);<NEW_LINE>log.info("Successfully formatted BookKeeper metadata");<NEW_LINE>return true;<NEW_LINE>}
|
(ledgersRootPath) + BookKeeperConstants.DEFAULT_ZK_LEDGERS_ROOT_PATH);
|
66,667
|
private void drawFace(GL2 gl, float faceSize, float[] color, float[] border, String text) {<NEW_LINE>float halfFaceSize = faceSize / 2;<NEW_LINE>float borderSize = halfFaceSize * 0.8f;<NEW_LINE>float layer2 = halfFaceSize + 0.001f;<NEW_LINE>// Face is centered around the local coordinate system's z axis,<NEW_LINE>// at a z depth of faceSize / 2<NEW_LINE>gl.glColor3f(border[0], border[1], border[2]);<NEW_LINE>gl.glBegin(GL_QUADS);<NEW_LINE>gl.glVertex3f(-halfFaceSize, -halfFaceSize, halfFaceSize);<NEW_LINE>gl.glVertex3f(halfFaceSize, -halfFaceSize, halfFaceSize);<NEW_LINE>gl.<MASK><NEW_LINE>gl.glVertex3f(-halfFaceSize, halfFaceSize, halfFaceSize);<NEW_LINE>gl.glEnd();<NEW_LINE>gl.glColor3f(color[0], color[1], color[2]);<NEW_LINE>gl.glBegin(GL_QUADS);<NEW_LINE>gl.glVertex3f(-borderSize, -borderSize, layer2);<NEW_LINE>gl.glVertex3f(borderSize, -borderSize, layer2);<NEW_LINE>gl.glVertex3f(borderSize, borderSize, layer2);<NEW_LINE>gl.glVertex3f(-borderSize, borderSize, layer2);<NEW_LINE>gl.glEnd();<NEW_LINE>// Now draw the overlaid text. In this setting, we don't want the<NEW_LINE>// text on the backward-facing faces to be visible, so we enable<NEW_LINE>// back-face culling; and since we're drawing the text over other<NEW_LINE>// geometry, to avoid z-fighting we disable the depth test. We<NEW_LINE>// could plausibly also use glPolygonOffset but this is simpler.<NEW_LINE>// Note that because the TextRenderer pushes the enable state<NEW_LINE>// internally we don't have to reset the depth test or cull face<NEW_LINE>// bits after we're done.<NEW_LINE>renderer.begin3DRendering();<NEW_LINE>gl.glDisable(GL_DEPTH_TEST);<NEW_LINE>gl.glEnable(GL_CULL_FACE);<NEW_LINE>// Note that the defaults for glCullFace and glFrontFace are<NEW_LINE>// GL_BACK and GL_CCW, which match the TextRenderer's definition<NEW_LINE>// of front-facing text.<NEW_LINE>Rectangle2D bounds = renderer.getBounds(text);<NEW_LINE>float w = (float) bounds.getWidth();<NEW_LINE>float h = (float) bounds.getHeight();<NEW_LINE>renderer.draw3D(text, w / -2.0f * textScaleFactor, h / -2.0f * textScaleFactor, layer2, textScaleFactor);<NEW_LINE>renderer.end3DRendering();<NEW_LINE>gl.glDisable(GL_CULL_FACE);<NEW_LINE>gl.glEnable(GL_DEPTH_TEST);<NEW_LINE>}
|
glVertex3f(halfFaceSize, halfFaceSize, halfFaceSize);
|
1,346,125
|
protected Element generateQueryElement(final OSQuery query) {<NEW_LINE>final Element qElement = new Element("Query", OS_NS);<NEW_LINE>if (query.getRole() != null) {<NEW_LINE>final Attribute roleAttribute = new Attribute("role", query.getRole());<NEW_LINE>qElement.setAttribute(roleAttribute);<NEW_LINE>} else {<NEW_LINE>throw new RequiredAttributeMissingException("If declaring a Query element, the field 'role' must be be specified");<NEW_LINE>}<NEW_LINE>if (query.getOsd() != null) {<NEW_LINE>final Attribute osd = new Attribute("osd", query.getOsd());<NEW_LINE>qElement.setAttribute(osd);<NEW_LINE>}<NEW_LINE>if (query.getSearchTerms() != null) {<NEW_LINE>final Attribute searchTerms = new Attribute("searchTerms", query.getSearchTerms());<NEW_LINE>qElement.setAttribute(searchTerms);<NEW_LINE>}<NEW_LINE>if (query.getStartPage() > -1) {<NEW_LINE>final int startPage = query.getStartPage() != 0 ? query.getStartPage() : 1;<NEW_LINE>final Attribute sp = new Attribute("startPage", Integer.toString(startPage));<NEW_LINE>qElement.setAttribute(sp);<NEW_LINE>}<NEW_LINE>if (query.getTitle() != null) {<NEW_LINE>qElement.setAttribute(new Attribute("title"<MASK><NEW_LINE>}<NEW_LINE>if (query.getTotalResults() > -1) {<NEW_LINE>qElement.setAttribute(new Attribute("totalResults", Integer.toString(query.getTotalResults())));<NEW_LINE>}<NEW_LINE>return qElement;<NEW_LINE>}
|
, query.getTitle()));
|
1,748,824
|
private String readString() throws IOException {<NEW_LINE>int marker = readInt();<NEW_LINE>if (marker == 0 || marker == 1) {<NEW_LINE>int length = readInt();<NEW_LINE>if (charBuffer.length < length) {<NEW_LINE>int len = charBuffer.length;<NEW_LINE>while (len < length) {<NEW_LINE>len *= 2;<NEW_LINE>}<NEW_LINE>charBuffer = new char[len];<NEW_LINE>}<NEW_LINE>char[] chars = charBuffer;<NEW_LINE>if (marker == 0) {<NEW_LINE>// new simple string<NEW_LINE>// one byte per character<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>chars[i] = (char) stream.readUnsignedByte();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>assert marker == 1;<NEW_LINE>// new complex string<NEW_LINE>// read actual char values<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>chars[i] = stream.readChar();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String result = new <MASK><NEW_LINE>stringTable.add(result);<NEW_LINE>return result;<NEW_LINE>} else {<NEW_LINE>// existing string<NEW_LINE>return stringTable.get(marker - 2);<NEW_LINE>}<NEW_LINE>}
|
String(chars, 0, length);
|
1,646,672
|
public com.amazonaws.services.iottwinmaker.model.ConflictException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.iottwinmaker.model.ConflictException conflictException = new com.amazonaws.services.iottwinmaker.model.ConflictException(null);<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 conflictException;<NEW_LINE>}
|
int originalDepth = context.getCurrentDepth();
|
775,198
|
protected void initMetaClass(Entity entity) {<NEW_LINE>if (entity == null) {<NEW_LINE>category = null;<NEW_LINE>valid();<NEW_LINE>initializedBefore = true;<NEW_LINE>fireItemChanged(null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!(entity instanceof BaseGenericIdEntity)) {<NEW_LINE>throw new IllegalStateException("This datasource can contain only entity with subclass of BaseGenericIdEntity");<NEW_LINE>}<NEW_LINE>BaseGenericIdEntity baseGenericIdEntity = (BaseGenericIdEntity) entity;<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Map<String, CategoryAttributeValue> dynamicAttributes = baseGenericIdEntity.getDynamicAttributes();<NEW_LINE>checkNotNullArgument(dynamicAttributes, "Dynamic attributes should be loaded explicitly");<NEW_LINE>if (PersistenceHelper.isNew(baseGenericIdEntity) && baseGenericIdEntity.getDynamicAttributes() == null) {<NEW_LINE>baseGenericIdEntity.setDynamicAttributes<MASK><NEW_LINE>}<NEW_LINE>if (baseGenericIdEntity instanceof Categorized) {<NEW_LINE>category = ((Categorized) baseGenericIdEntity).getCategory();<NEW_LINE>}<NEW_LINE>if (!initializedBefore && category == null) {<NEW_LINE>category = getDefaultCategory();<NEW_LINE>if (baseGenericIdEntity.getMetaClass().getProperty("category") != null) {<NEW_LINE>baseGenericIdEntity.setValue("category", category);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>item = new DynamicAttributesEntity(baseGenericIdEntity, attributes);<NEW_LINE>if (PersistenceHelper.isNew(entity) || categoryChanged) {<NEW_LINE>dynamicAttributesGuiTools.initDefaultAttributeValues(baseGenericIdEntity, resolveCategorizedEntityClass());<NEW_LINE>}<NEW_LINE>view = new View(DynamicAttributesEntity.class, false);<NEW_LINE>Collection<MetaProperty> properties = metaClass.getProperties();<NEW_LINE>for (MetaProperty property : properties) {<NEW_LINE>view.addProperty(property.getName());<NEW_LINE>}<NEW_LINE>valid();<NEW_LINE>initializedBefore = true;<NEW_LINE>fireItemChanged(null);<NEW_LINE>}
|
(new HashMap<>());
|
1,746,376
|
public Boolean propagateAgentEvent(final long agentId, final Event event) throws AgentUnavailableException {<NEW_LINE>final String msPeer = getPeerName(agentId);<NEW_LINE>if (msPeer == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (s_logger.isDebugEnabled()) {<NEW_LINE>s_logger.debug("Propagating agent change request event:" + event.toString() + " to agent:" + agentId);<NEW_LINE>}<NEW_LINE>final Command[] cmds = new Command[1];<NEW_LINE>cmds[0] = new ChangeAgentCommand(agentId, event);<NEW_LINE>final String ansStr = _clusterMgr.execute(msPeer, agentId, _gson<MASK><NEW_LINE>if (ansStr == null) {<NEW_LINE>throw new AgentUnavailableException(agentId);<NEW_LINE>}<NEW_LINE>final Answer[] answers = _gson.fromJson(ansStr, Answer[].class);<NEW_LINE>if (s_logger.isDebugEnabled()) {<NEW_LINE>s_logger.debug("Result for agent change is " + answers[0].getResult());<NEW_LINE>}<NEW_LINE>return answers[0].getResult();<NEW_LINE>}
|
.toJson(cmds), true);
|
1,639,635
|
public BackendEntry writeEdgeProperty(HugeEdgeProperty<?> prop) {<NEW_LINE>HugeEdge edge = prop.element();<NEW_LINE>EdgeId id = edge.idWithDirection();<NEW_LINE>TableBackendEntry.Row row = new TableBackendEntry.Row(edge.type(), id);<NEW_LINE>if (edge.hasTtl()) {<NEW_LINE>row.ttl(edge.ttl());<NEW_LINE>row.column(HugeKeys.EXPIRED_TIME, edge.expiredTime());<NEW_LINE>}<NEW_LINE>// Id: ownerVertex + direction + edge-label + sortValues + otherVertex<NEW_LINE>row.column(HugeKeys.OWNER_VERTEX, this.writeId(id.ownerVertexId()));<NEW_LINE>row.column(HugeKeys.DIRECTION, id.directionCode());<NEW_LINE>row.column(HugeKeys.LABEL, id.edgeLabelId().asLong());<NEW_LINE>row.column(HugeKeys.SORT_VALUES, id.sortValues());<NEW_LINE>row.column(HugeKeys.OTHER_VERTEX, this.writeId(id.otherVertexId()));<NEW_LINE>// Format edge property<NEW_LINE>this.formatProperty(prop, row);<NEW_LINE>TableBackendEntry entry = newBackendEntry(row);<NEW_LINE>entry.subId(IdGenerator.of<MASK><NEW_LINE>return entry;<NEW_LINE>}
|
(prop.key()));
|
43,731
|
public void validate(Body body, List<ValidationException> exceptions) {<NEW_LINE>final SootMethod method = body.getMethod();<NEW_LINE>// Checks that this Body actually contains a throw or return statement, and<NEW_LINE>// that the return statement is of the appropriate type (i.e. void/non-void)<NEW_LINE>for (Unit u : body.getUnits()) {<NEW_LINE>if (u instanceof ThrowStmt || u instanceof ThrowInst) {<NEW_LINE>return;<NEW_LINE>} else if (u instanceof ReturnStmt || u instanceof ReturnInst) {<NEW_LINE>if (!(method.getReturnType() instanceof VoidType)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else if (u instanceof ReturnVoidStmt || u instanceof ReturnVoidInst) {<NEW_LINE>if (method.getReturnType() instanceof VoidType) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// A method can have an infinite loop and no return statement:<NEW_LINE>// public static void main(String[] args) {<NEW_LINE>// int i = 0; while (true) {i += 1;}<NEW_LINE>// }<NEW_LINE>//<NEW_LINE>// Only check that the execution cannot fall off the code.<NEW_LINE>Unit last = body<MASK><NEW_LINE>if (last instanceof GotoStmt || last instanceof GotoInst || last instanceof ThrowStmt || last instanceof ThrowInst) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>exceptions.add(new ValidationException(method, "The method does not contain a return statement, or the return statement is not of the appropriate type", "Body of method " + method.getSignature() + " does not contain a return statement, or the return statement is not of the appropriate type"));<NEW_LINE>}
|
.getUnits().getLast();
|
854,364
|
public static void main(String[] args) {<NEW_LINE>SplayTree<Integer> splayTree = new SplayTree<>();<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>int[] data = { 2, 29, 26, -1, 10, 0, 2, 11 };<NEW_LINE>int c = 0;<NEW_LINE>for (int i : data) {<NEW_LINE>splayTree.insert(i);<NEW_LINE>}<NEW_LINE>while (c != 7) {<NEW_LINE>System.out.println("1. Insert 2. Delete 3. Search 4.FindMin 5.FindMax 6. PrintTree 7. Exit");<NEW_LINE>c = sc.nextInt();<NEW_LINE>switch(c) {<NEW_LINE>case 1:<NEW_LINE>System.out.println("Enter Data :");<NEW_LINE>splayTree.insert(sc.nextInt());<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>System.out.println("Enter Element to be Deleted:");<NEW_LINE>splayTree.delete(sc.nextInt());<NEW_LINE>break;<NEW_LINE>case 3:<NEW_LINE>System.out.println("Enter Element to be Searched and Splayed:");<NEW_LINE>splayTree.<MASK><NEW_LINE>break;<NEW_LINE>case 4:<NEW_LINE>System.out.println("Min: " + splayTree.findMin());<NEW_LINE>break;<NEW_LINE>case 5:<NEW_LINE>System.out.println("Max: " + splayTree.findMax());<NEW_LINE>break;<NEW_LINE>case 6:<NEW_LINE>System.out.println(splayTree);<NEW_LINE>break;<NEW_LINE>case 7:<NEW_LINE>sc.close();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
search(sc.nextInt());
|
309,813
|
public final Object read(final InputStream is) {<NEW_LINE>int states = 0;<NEW_LINE>int[] items;<NEW_LINE>double[] pi = null;<NEW_LINE>Matrix transitionProbability = null;<NEW_LINE>Map<String, String> properties = null;<NEW_LINE>List<StateDistribution> distributions = new ArrayList<StateDistribution>();<NEW_LINE>final EncogReadHelper in = new EncogReadHelper(is);<NEW_LINE>EncogFileSection section;<NEW_LINE>while ((section = in.readNextSection()) != null) {<NEW_LINE>if (section.getSectionName().equals("HMM") && section.getSubSectionName().equals("PARAMS")) {<NEW_LINE>properties = section.parseParams();<NEW_LINE>}<NEW_LINE>if (section.getSectionName().equals("HMM") && section.getSubSectionName().equals("CONFIG")) {<NEW_LINE>final Map<String, String<MASK><NEW_LINE>states = EncogFileSection.parseInt(params, HiddenMarkovModel.TAG_STATES);<NEW_LINE>if (params.containsKey(HiddenMarkovModel.TAG_ITEMS)) {<NEW_LINE>items = EncogFileSection.parseIntArray(params, HiddenMarkovModel.TAG_ITEMS);<NEW_LINE>}<NEW_LINE>pi = section.parseDoubleArray(params, HiddenMarkovModel.TAG_PI);<NEW_LINE>transitionProbability = section.parseMatrix(params, HiddenMarkovModel.TAG_TRANSITION);<NEW_LINE>} else if (section.getSectionName().equals("HMM") && section.getSubSectionName().startsWith("DISTRIBUTION-")) {<NEW_LINE>final Map<String, String> params = section.parseParams();<NEW_LINE>String t = params.get(HiddenMarkovModel.TAG_DIST_TYPE);<NEW_LINE>if ("ContinousDistribution".equals(t)) {<NEW_LINE>double[] mean = section.parseDoubleArray(params, HiddenMarkovModel.TAG_MEAN);<NEW_LINE>Matrix cova = section.parseMatrix(params, HiddenMarkovModel.TAG_COVARIANCE);<NEW_LINE>ContinousDistribution dist = new ContinousDistribution(mean, cova.getData());<NEW_LINE>distributions.add(dist);<NEW_LINE>} else if ("DiscreteDistribution".equals(t)) {<NEW_LINE>Matrix prob = section.parseMatrix(params, HiddenMarkovModel.TAG_PROBABILITIES);<NEW_LINE>DiscreteDistribution dist = new DiscreteDistribution(prob.getData());<NEW_LINE>distributions.add(dist);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final HiddenMarkovModel result = new HiddenMarkovModel(states);<NEW_LINE>result.getProperties().putAll(properties);<NEW_LINE>result.setTransitionProbability(transitionProbability.getData());<NEW_LINE>result.setPi(pi);<NEW_LINE>int index = 0;<NEW_LINE>for (StateDistribution dist : distributions) {<NEW_LINE>result.setStateDistribution(index++, dist);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
|
> params = section.parseParams();
|
94,427
|
// ============================================================<NEW_LINE>// Main entry point<NEW_LINE>// ============================================================<NEW_LINE>@Override<NEW_LINE>public void infer() {<NEW_LINE>LogInfo.begin_track_printAll("FloatingParser.infer()");<NEW_LINE>ruleTime = new HashMap<>();<NEW_LINE>buildDerivations();<NEW_LINE>if (FloatingParser.opts.summarizeRuleTime)<NEW_LINE>summarizeRuleTime();<NEW_LINE>// Collect final predicted derivations<NEW_LINE>addToDerivations(anchoredCell(Rule.rootCat, 0, numTokens), predDerivations);<NEW_LINE>for (int depth = 0; depth <= FloatingParser.opts.maxDepth; depth++) addToDerivations(floatingCell(Rule.rootCat, depth), predDerivations);<NEW_LINE>// Compute gradient with respect to the predicted derivations<NEW_LINE>ensureExecuted();<NEW_LINE>if (computeExpectedCounts) {<NEW_LINE>expectedCounts = new HashMap<>();<NEW_LINE>ParserState.computeExpectedCounts(predDerivations, expectedCounts);<NEW_LINE>}<NEW_LINE>// Example summary<NEW_LINE>if (Parser.opts.verbose >= 2) {<NEW_LINE>LogInfo.begin_track_printAll("Summary of Example %s", ex.getUtterance());<NEW_LINE>for (Derivation deriv : predDerivations) LogInfo.logs("Generated: canonicalUtterance=%s, value=%s", deriv.canonicalUtterance, deriv.value);<NEW_LINE>LogInfo.end_track();<NEW_LINE>}<NEW_LINE>if (FloatingParser.opts.printPredictedUtterances) {<NEW_LINE>PrintWriter writer = IOUtils.openOutAppendEasy<MASK><NEW_LINE>PrintWriter fWriter = IOUtils.openOutAppendEasy(Execution.getFile("utterances_formula.tsv"));<NEW_LINE>Derivation.sortByScore(predDerivations);<NEW_LINE>for (Derivation deriv : predDerivations) {<NEW_LINE>if (deriv.score > -10) {<NEW_LINE>writer.println(String.format("%s\t%s", deriv.canonicalUtterance, deriv.score));<NEW_LINE>fWriter.println(String.format("%s\t%s", deriv.canonicalUtterance, deriv.formula.toString()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>writer.close();<NEW_LINE>fWriter.close();<NEW_LINE>}<NEW_LINE>LogInfo.end_track();<NEW_LINE>}
|
(Execution.getFile("canonical_utterances"));
|
808,304
|
public static ListAppsResponse unmarshall(ListAppsResponse listAppsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAppsResponse.setRequestId(_ctx.stringValue("ListAppsResponse.RequestId"));<NEW_LINE>listAppsResponse.setTotal(_ctx.integerValue("ListAppsResponse.Total"));<NEW_LINE>listAppsResponse.setUbsmsStatus<MASK><NEW_LINE>List<AppInfo> appInfos = new ArrayList<AppInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListAppsResponse.AppInfos.Length"); i++) {<NEW_LINE>AppInfo appInfo = new AppInfo();<NEW_LINE>appInfo.setAppKey(_ctx.stringValue("ListAppsResponse.AppInfos[" + i + "].AppKey"));<NEW_LINE>appInfo.setName(_ctx.stringValue("ListAppsResponse.AppInfos[" + i + "].Name"));<NEW_LINE>appInfo.setType(_ctx.integerValue("ListAppsResponse.AppInfos[" + i + "].Type"));<NEW_LINE>appInfo.setReadonly(_ctx.booleanValue("ListAppsResponse.AppInfos[" + i + "].Readonly"));<NEW_LINE>appInfo.setBundleId(_ctx.stringValue("ListAppsResponse.AppInfos[" + i + "].BundleId"));<NEW_LINE>appInfo.setPackageName(_ctx.stringValue("ListAppsResponse.AppInfos[" + i + "].PackageName"));<NEW_LINE>appInfos.add(appInfo);<NEW_LINE>}<NEW_LINE>listAppsResponse.setAppInfos(appInfos);<NEW_LINE>return listAppsResponse;<NEW_LINE>}
|
(_ctx.stringValue("ListAppsResponse.UbsmsStatus"));
|
144,384
|
public boolean execute(Object object) throws ContractExeException {<NEW_LINE>TransactionResultCapsule ret = (TransactionResultCapsule) object;<NEW_LINE>if (Objects.isNull(ret)) {<NEW_LINE>throw new RuntimeException(ActuatorConstant.TX_RESULT_NULL);<NEW_LINE>}<NEW_LINE>long fee = calcFee();<NEW_LINE>AccountStore accountStore = chainBaseManager.getAccountStore();<NEW_LINE>DynamicPropertiesStore dynamicStore = chainBaseManager.getDynamicPropertiesStore();<NEW_LINE><MASK><NEW_LINE>ExchangeV2Store exchangeV2Store = chainBaseManager.getExchangeV2Store();<NEW_LINE>AssetIssueStore assetIssueStore = chainBaseManager.getAssetIssueStore();<NEW_LINE>try {<NEW_LINE>final ExchangeTransactionContract exchangeTransactionContract = this.any.unpack(ExchangeTransactionContract.class);<NEW_LINE>AccountCapsule accountCapsule = accountStore.get(exchangeTransactionContract.getOwnerAddress().toByteArray());<NEW_LINE>ExchangeCapsule exchangeCapsule = Commons.getExchangeStoreFinal(dynamicStore, exchangeStore, exchangeV2Store).get(ByteArray.fromLong(exchangeTransactionContract.getExchangeId()));<NEW_LINE>byte[] firstTokenID = exchangeCapsule.getFirstTokenId();<NEW_LINE>byte[] secondTokenID = exchangeCapsule.getSecondTokenId();<NEW_LINE>byte[] tokenID = exchangeTransactionContract.getTokenId().toByteArray();<NEW_LINE>long tokenQuant = exchangeTransactionContract.getQuant();<NEW_LINE>byte[] anotherTokenID;<NEW_LINE>long anotherTokenQuant = exchangeCapsule.transaction(tokenID, tokenQuant);<NEW_LINE>if (Arrays.equals(tokenID, firstTokenID)) {<NEW_LINE>anotherTokenID = secondTokenID;<NEW_LINE>} else {<NEW_LINE>anotherTokenID = firstTokenID;<NEW_LINE>}<NEW_LINE>long newBalance = accountCapsule.getBalance() - calcFee();<NEW_LINE>accountCapsule.setBalance(newBalance);<NEW_LINE>if (Arrays.equals(tokenID, TRX_SYMBOL_BYTES)) {<NEW_LINE>accountCapsule.setBalance(newBalance - tokenQuant);<NEW_LINE>} else {<NEW_LINE>accountCapsule.reduceAssetAmountV2(tokenID, tokenQuant, dynamicStore, assetIssueStore);<NEW_LINE>}<NEW_LINE>if (Arrays.equals(anotherTokenID, TRX_SYMBOL_BYTES)) {<NEW_LINE>accountCapsule.setBalance(newBalance + anotherTokenQuant);<NEW_LINE>} else {<NEW_LINE>accountCapsule.addAssetAmountV2(anotherTokenID, anotherTokenQuant, dynamicStore, assetIssueStore);<NEW_LINE>}<NEW_LINE>accountStore.put(accountCapsule.createDbKey(), accountCapsule);<NEW_LINE>Commons.putExchangeCapsule(exchangeCapsule, dynamicStore, exchangeStore, exchangeV2Store, assetIssueStore);<NEW_LINE>ret.setExchangeReceivedAmount(anotherTokenQuant);<NEW_LINE>ret.setStatus(fee, code.SUCESS);<NEW_LINE>} catch (ItemNotFoundException | InvalidProtocolBufferException e) {<NEW_LINE>logger.debug(e.getMessage(), e);<NEW_LINE>ret.setStatus(fee, code.FAILED);<NEW_LINE>throw new ContractExeException(e.getMessage());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
|
ExchangeStore exchangeStore = chainBaseManager.getExchangeStore();
|
1,362,346
|
protected void copyToDestination(IJavaElement element, CompilationUnitRewrite targetRewriter, CompilationUnit sourceCuNode, CompilationUnit targetCuNode) throws CoreException {<NEW_LINE>final ASTRewrite rewrite = targetRewriter.getASTRewrite();<NEW_LINE>switch(element.getElementType()) {<NEW_LINE>case IJavaElement.FIELD:<NEW_LINE>copyMemberToDestination((IMember) element, targetRewriter, sourceCuNode, targetCuNode, createNewFieldDeclarationNode(((IField) element), rewrite, sourceCuNode));<NEW_LINE>break;<NEW_LINE>case IJavaElement.IMPORT_CONTAINER:<NEW_LINE>copyImportsToDestination((IImportContainer) element, rewrite, sourceCuNode, targetCuNode);<NEW_LINE>break;<NEW_LINE>case IJavaElement.IMPORT_DECLARATION:<NEW_LINE>copyImportToDestination((IImportDeclaration) <MASK><NEW_LINE>break;<NEW_LINE>case IJavaElement.INITIALIZER:<NEW_LINE>copyInitializerToDestination((IInitializer) element, targetRewriter, sourceCuNode, targetCuNode);<NEW_LINE>break;<NEW_LINE>case IJavaElement.METHOD:<NEW_LINE>copyMethodToDestination((IMethod) element, targetRewriter, sourceCuNode, targetCuNode);<NEW_LINE>break;<NEW_LINE>case IJavaElement.PACKAGE_DECLARATION:<NEW_LINE>copyPackageDeclarationToDestination((IPackageDeclaration) element, rewrite, sourceCuNode, targetCuNode);<NEW_LINE>break;<NEW_LINE>case IJavaElement.TYPE:<NEW_LINE>copyTypeToDestination((IType) element, targetRewriter, sourceCuNode, targetCuNode);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>Assert.isTrue(false);<NEW_LINE>}<NEW_LINE>}
|
element, rewrite, sourceCuNode, targetCuNode);
|
544,634
|
public static String qualifyType(VisitorState state, SuggestedFix.Builder fix, Symbol sym) {<NEW_LINE>if (sym.getKind() == ElementKind.TYPE_PARAMETER) {<NEW_LINE>return sym.getSimpleName().toString();<NEW_LINE>}<NEW_LINE>if (sym.getKind() == ElementKind.CLASS) {<NEW_LINE>if (ASTHelpers.isLocal(sym)) {<NEW_LINE>if (!sym.isAnonymous()) {<NEW_LINE>return sym<MASK><NEW_LINE>}<NEW_LINE>sym = ((ClassSymbol) sym).getSuperclass().tsym;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (variableClashInScope(state, sym)) {<NEW_LINE>return qualifyType(state, fix, sym.owner) + "." + sym.getSimpleName();<NEW_LINE>}<NEW_LINE>Deque<String> names = new ArrayDeque<>();<NEW_LINE>for (Symbol curr = sym; curr != null; curr = curr.owner) {<NEW_LINE>names.addFirst(curr.getSimpleName().toString());<NEW_LINE>Symbol found = FindIdentifiers.findIdent(curr.getSimpleName().toString(), state, KindSelector.VAL_TYP);<NEW_LINE>if (found == curr) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (curr.owner != null && curr.owner.getKind() == ElementKind.PACKAGE) {<NEW_LINE>// If the owner of curr is a package, we can't do anything except import or fully-qualify<NEW_LINE>// the type name.<NEW_LINE>if (found != null) {<NEW_LINE>names.addFirst(curr.owner.getQualifiedName().toString());<NEW_LINE>} else {<NEW_LINE>fix.addImport(curr.getQualifiedName().toString());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Joiner.on('.').join(names);<NEW_LINE>}
|
.getSimpleName().toString();
|
1,496,682
|
private void tick(Level level, BlockPos pos, BlockState state) {<NEW_LINE>if (!isFormed()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>switch(tick) {<NEW_LINE>// tick 0: find fuel<NEW_LINE>case 0 -><NEW_LINE>{<NEW_LINE>alloyTank.setTemperature(fuelModule.findFuel(false));<NEW_LINE>if (!fuelModule.hasFuel() && alloyingModule.canAlloy()) {<NEW_LINE>fuelModule.findFuel(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// tick 2: alloy alloys and consume fuel<NEW_LINE>case 2 -><NEW_LINE>{<NEW_LINE>boolean hasFuel = fuelModule.hasFuel();<NEW_LINE>// update state for new fuel state<NEW_LINE>if (state.getValue(ControllerBlock.ACTIVE) != hasFuel) {<NEW_LINE>level.setBlockAndUpdate(pos, state.setValue(ControllerBlock.ACTIVE, hasFuel));<NEW_LINE>// update the heater below<NEW_LINE><MASK><NEW_LINE>BlockState downState = level.getBlockState(down);<NEW_LINE>if (TinkerTags.Blocks.FUEL_TANKS.contains(downState.getBlock()) && downState.hasProperty(ControllerBlock.ACTIVE) && downState.getValue(ControllerBlock.ACTIVE) != hasFuel) {<NEW_LINE>level.setBlockAndUpdate(down, downState.setValue(ControllerBlock.ACTIVE, hasFuel));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// actual alloying<NEW_LINE>if (hasFuel) {<NEW_LINE>alloyTank.setTemperature(fuelModule.getTemperature());<NEW_LINE>alloyingModule.doAlloy();<NEW_LINE>fuelModule.decreaseFuel(1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tick = (tick + 1) % 4;<NEW_LINE>}
|
BlockPos down = pos.below();
|
1,066,436
|
protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>monitor.beginTask("Find " + Hexa32.toString32(gxid), IProgressMonitor.UNKNOWN);<NEW_LINE>final LongKeyLinkedMap<Object> xlogMap = new LongKeyLinkedMap<Object>();<NEW_LINE>Iterator<Integer> itr = ServerManager.getInstance().getOpenServerList().iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>final int serverId = itr.next();<NEW_LINE>monitor.subTask(ServerManager.getInstance().getServer(serverId).getName());<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put("date", date);<NEW_LINE>param.put("gxid", gxid);<NEW_LINE>tcp.process(RequestCmd.XLOG_READ_BY_GXID, param, new INetReader() {<NEW_LINE><NEW_LINE>public void process(DataInputX in) throws IOException {<NEW_LINE>Pack p = in.readPack();<NEW_LINE>XLogPack xlog = XLogUtil.toXLogPack(p);<NEW_LINE>XLogData d = new XLogData(xlog, serverId);<NEW_LINE>d.objName = TextProxy.object.getLoadText(date, d.p.objHash, d.serverId);<NEW_LINE>xlogMap.<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Throwable th) {<NEW_LINE>ConsoleProxy.errorSafe(th.toString());<NEW_LINE>} finally {<NEW_LINE>TcpProxy.putTcpProxy(tcp);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ExUtil.exec(viewer.getGraphControl(), new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>viewer.setInput(xlogMap);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}
|
putFirst(xlog.txid, d);
|
14,959
|
final RegisterTransitGatewayMulticastGroupMembersResult executeRegisterTransitGatewayMulticastGroupMembers(RegisterTransitGatewayMulticastGroupMembersRequest registerTransitGatewayMulticastGroupMembersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(registerTransitGatewayMulticastGroupMembersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RegisterTransitGatewayMulticastGroupMembersRequest> request = null;<NEW_LINE>Response<RegisterTransitGatewayMulticastGroupMembersResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RegisterTransitGatewayMulticastGroupMembersRequestMarshaller().marshall(super.beforeMarshalling(registerTransitGatewayMulticastGroupMembersRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<RegisterTransitGatewayMulticastGroupMembersResult> responseHandler = new StaxResponseHandler<RegisterTransitGatewayMulticastGroupMembersResult>(new RegisterTransitGatewayMulticastGroupMembersResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
|
addHandlerContext(HandlerContextKey.OPERATION_NAME, "RegisterTransitGatewayMulticastGroupMembers");
|
1,064,899
|
private void append4Update(ESMapping mapping, Object pkVal, Map<String, Object> esFieldData) {<NEW_LINE>if (mapping.get_id() != null) {<NEW_LINE>String parentVal = (<MASK><NEW_LINE>if (mapping.isUpsert()) {<NEW_LINE>ESUpdateRequest esUpdateRequest = this.esConnection.new ES7xUpdateRequest(mapping.get_index(), pkVal.toString()).setDoc(esFieldData).setDocAsUpsert(true);<NEW_LINE>if (StringUtils.isNotEmpty(parentVal)) {<NEW_LINE>esUpdateRequest.setRouting(parentVal);<NEW_LINE>}<NEW_LINE>getBulk().add(esUpdateRequest);<NEW_LINE>} else {<NEW_LINE>ESUpdateRequest esUpdateRequest = this.esConnection.new ES7xUpdateRequest(mapping.get_index(), pkVal.toString()).setDoc(esFieldData);<NEW_LINE>if (StringUtils.isNotEmpty(parentVal)) {<NEW_LINE>esUpdateRequest.setRouting(parentVal);<NEW_LINE>}<NEW_LINE>getBulk().add(esUpdateRequest);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>ESSearchRequest esSearchRequest = this.esConnection.new ESSearchRequest(mapping.get_index()).setQuery(QueryBuilders.termQuery(mapping.getPk(), pkVal)).size(10000);<NEW_LINE>SearchResponse response = esSearchRequest.getResponse();<NEW_LINE>for (SearchHit hit : response.getHits()) {<NEW_LINE>ESUpdateRequest esUpdateRequest = this.esConnection.new ES7xUpdateRequest(mapping.get_index(), hit.getId()).setDoc(esFieldData);<NEW_LINE>getBulk().add(esUpdateRequest);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
String) esFieldData.remove("$parent_routing");
|
9,037
|
public static TypeReference typeReference(Class<?> type) {<NEW_LINE>if (type == void.class) {<NEW_LINE>return VOID;<NEW_LINE>}<NEW_LINE>if (type == Object.class) {<NEW_LINE>return OBJECT;<NEW_LINE>}<NEW_LINE>Class<?> innerType = type;<NEW_LINE>int arrayDepth = 0;<NEW_LINE>while (innerType.isArray()) {<NEW_LINE>innerType = innerType.getComponentType();<NEW_LINE>arrayDepth++;<NEW_LINE>}<NEW_LINE>if (innerType.isPrimitive()) {<NEW_LINE>return arrayDepth > 0 ? primitiveArray(innerType, arrayDepth) : primitiveType(innerType);<NEW_LINE>} else {<NEW_LINE>String packageName = "";<NEW_LINE>String name;<NEW_LINE>TypeReference declaringTypeReference = null;<NEW_LINE>Package typePackage = innerType.getPackage();<NEW_LINE>if (typePackage != null) {<NEW_LINE>packageName = typePackage.getName();<NEW_LINE>}<NEW_LINE>Class<?<MASK><NEW_LINE>if (declaringClass != null) {<NEW_LINE>declaringTypeReference = typeReference(declaringClass);<NEW_LINE>}<NEW_LINE>name = innerType.getSimpleName();<NEW_LINE>return new TypeReference(packageName, name, arrayDepth, false, declaringTypeReference, type.getModifiers());<NEW_LINE>}<NEW_LINE>}
|
> declaringClass = innerType.getDeclaringClass();
|
146,484
|
private MethodTree createHashCodeMethod(WorkingCopy wc, DeclaredType type) {<NEW_LINE>TreeMaker make = wc.getTreeMaker();<NEW_LINE>Set<Modifier> mods = EnumSet.of(Modifier.PUBLIC);<NEW_LINE>// Used in test code<NEW_LINE>Integer number = refactoring.getContext().lookup(Integer.class);<NEW_LINE>int startNumber;<NEW_LINE>int multiplyNumber;<NEW_LINE>if (number != null) {<NEW_LINE>startNumber = number.intValue();<NEW_LINE>multiplyNumber = number.intValue();<NEW_LINE>} else {<NEW_LINE>startNumber = generatePrimeNumber(2, 10);<NEW_LINE>multiplyNumber = generatePrimeNumber(10, 100);<NEW_LINE>}<NEW_LINE>List<StatementTree> statements = new ArrayList<>();<NEW_LINE>// int hash = <startNumber>;<NEW_LINE>// NOI18N<NEW_LINE>statements.add(make.Variable(make.Modifiers(EnumSet.noneOf(Modifier.class)), "hash", make.PrimitiveType(TypeKind.INT), make.Literal(startNumber)));<NEW_LINE>TypeMirror tm = type;<NEW_LINE>// NOI18N<NEW_LINE>ExpressionTree variableRead = prepareExpression(wc, HASH_CODE_PATTERNS, tm, "delegate");<NEW_LINE>// NOI18N<NEW_LINE>statements.add(make.ExpressionStatement(make.Assignment(make.Identifier("hash"), make.Binary(Tree.Kind.PLUS, make.Binary(Tree.Kind.MULTIPLY, make.Literal(multiplyNumber), make.Identifier("hash")), variableRead))));<NEW_LINE>// NOI18N<NEW_LINE>statements.add(make.Return(make.Identifier("hash")));<NEW_LINE>BlockTree body = make.Block(statements, false);<NEW_LINE>ModifiersTree modifiers = prepareModifiers(<MASK><NEW_LINE>// NOI18N<NEW_LINE>return make.Method(modifiers, "hashCode", make.PrimitiveType(TypeKind.INT), Collections.<TypeParameterTree>emptyList(), Collections.<VariableTree>emptyList(), Collections.<ExpressionTree>emptyList(), body, null);<NEW_LINE>}
|
wc, mods, make, true);
|
395,636
|
protected void commonAssignmentCheck(AnnotatedTypeMirror varType, AnnotatedTypeMirror valueType, Tree valueTree, @CompilerMessageKey String errorKey, Object... extraArgs) {<NEW_LINE>commonAssignmentCheckStartDiagnostic(varType, valueType, valueTree);<NEW_LINE>AnnotatedTypeMirror widenedValueType = atypeFactory.getWidenedType(valueType, varType);<NEW_LINE>boolean success = atypeFactory.getTypeHierarchy(<MASK><NEW_LINE>// TODO: integrate with subtype test.<NEW_LINE>if (success) {<NEW_LINE>for (Class<? extends Annotation> mono : atypeFactory.getSupportedMonotonicTypeQualifiers()) {<NEW_LINE>if (valueType.hasAnnotation(mono) && varType.hasAnnotation(mono)) {<NEW_LINE>checker.reportError(valueTree, "monotonic", mono.getSimpleName(), mono.getSimpleName(), valueType.toString());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>commonAssignmentCheckEndDiagnostic(success, null, varType, valueType, valueTree);<NEW_LINE>// Use an error key only if it's overridden by a checker.<NEW_LINE>if (!success) {<NEW_LINE>FoundRequired pair = FoundRequired.of(valueType, varType);<NEW_LINE>String valueTypeString = pair.found;<NEW_LINE>String varTypeString = pair.required;<NEW_LINE>checker.reportError(valueTree, errorKey, ArraysPlume.concatenate(extraArgs, valueTypeString, varTypeString));<NEW_LINE>}<NEW_LINE>}
|
).isSubtype(widenedValueType, varType);
|
1,315,510
|
public void readFieldValue(JSONReader jsonReader, T object) {<NEW_LINE>ObjectReader objectReader;<NEW_LINE>if (this.fieldObjectReader != null) {<NEW_LINE>objectReader = this.fieldObjectReader;<NEW_LINE>} else {<NEW_LINE>ObjectReader formattedObjectReader = FieldReaderObject.createFormattedObjectReader(<MASK><NEW_LINE>if (formattedObjectReader != null) {<NEW_LINE>objectReader = this.fieldObjectReader = formattedObjectReader;<NEW_LINE>} else {<NEW_LINE>objectReader = this.fieldObjectReader = jsonReader.getContext().getObjectReader(fieldType);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (jsonReader.isReference()) {<NEW_LINE>String reference = jsonReader.readReference();<NEW_LINE>if ("..".equals(reference)) {<NEW_LINE>accept(object, object);<NEW_LINE>} else {<NEW_LINE>addResolveTask(jsonReader, object, reference);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object value;<NEW_LINE>try {<NEW_LINE>if (jsonReader.isJSONB()) {<NEW_LINE>ObjectReader autoTypeReader = checkObjectAutoType(jsonReader);<NEW_LINE>if (autoTypeReader != null) {<NEW_LINE>value = autoTypeReader.readJSONBObject(jsonReader, fieldType, fieldName, features);<NEW_LINE>} else {<NEW_LINE>value = objectReader.readJSONBObject(jsonReader, fieldType, fieldName, features);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>value = objectReader.readObject(jsonReader, fieldType, fieldName, features);<NEW_LINE>}<NEW_LINE>} catch (JSONException ex) {<NEW_LINE>throw new JSONException(jsonReader.info("read field error : " + fieldName), ex);<NEW_LINE>}<NEW_LINE>accept(object, value);<NEW_LINE>}
|
fieldType, fieldClass, format, locale);
|
991,131
|
private PaymentAllocationId saveCandidate_InboundPaymentToOutboundPayment(AllocationLineCandidate candidate) {<NEW_LINE>final Money payAmt = candidate.getAmounts().getPayAmt();<NEW_LINE>Check.assumeEquals(candidate.getAmounts(), AllocationAmounts.builder().payAmt<MASK><NEW_LINE>final C_AllocationHdr_Builder allocationBuilder = //<NEW_LINE>newC_AllocationHdr_Builder(candidate).// Outgoing payment line<NEW_LINE>addLine().skipIfAllAmountsAreZero().orgId(candidate.getOrgId()).bpartnerId(candidate.getBpartnerId()).paymentId(//<NEW_LINE>extractPaymentId(candidate.getPayableDocumentRef())).amount(payAmt.toBigDecimal()).overUnderAmt(candidate.getPayableOverUnderAmt().toBigDecimal()).//<NEW_LINE>lineDone().// Incoming payment line<NEW_LINE>addLine().skipIfAllAmountsAreZero().orgId(candidate.getOrgId()).bpartnerId(candidate.getBpartnerId()).paymentId(//<NEW_LINE>extractPaymentId(candidate.getPaymentDocumentRef())).amount(payAmt.negate().toBigDecimal()).overUnderAmt(candidate.getPaymentOverUnderAmt().toBigDecimal()).lineDone();<NEW_LINE>return createAndComplete(allocationBuilder);<NEW_LINE>}
|
(payAmt).build());
|
1,141,973
|
private <T> CommandResult<T> tryConsumeLocally(RemoteCommand<T> command) {<NEW_LINE>long currentTimeNanos = timeMeter.currentTimeNanos();<NEW_LINE>if (isNeedToExecuteRemoteImmediately(command, currentTimeNanos)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>long predictedConsumptionSinceLastSync = sampling.predictedConsumptionByOthersSinceLastSync(currentTimeNanos);<NEW_LINE>if (predictedConsumptionSinceLastSync == Long.MAX_VALUE) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>long predictedConsumptionByOthersSinceLastLocalCall = predictedConsumptionSinceLastSync - speculativelyConsumedByPredictionTokens;<NEW_LINE>if (predictedConsumptionByOthersSinceLastLocalCall < 0) {<NEW_LINE>predictedConsumptionByOthersSinceLastLocalCall = 0;<NEW_LINE>}<NEW_LINE>// prepare local command<NEW_LINE>ConsumeAsMuchAsPossibleCommand consumeByPredictionCommand = new ConsumeAsMuchAsPossibleCommand(predictedConsumptionByOthersSinceLastLocalCall);<NEW_LINE>List<RemoteCommand<?>> commands = <MASK><NEW_LINE>MultiCommand multiCommand = new MultiCommand(commands);<NEW_LINE>// execute local command<NEW_LINE>BucketEntryWrapper entry = new BucketEntryWrapper(state.copy());<NEW_LINE>MultiResult multiResult = multiCommand.execute(entry, currentTimeNanos).getData();<NEW_LINE>if (multiCommand.getConsumedTokens(multiResult) == Long.MAX_VALUE) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>long locallyConsumedTokens = command.getConsumedTokens((T) multiResult.getResults().get(ORIGINAL_COMMAND_INDEX).getData());<NEW_LINE>if (!isLocalExecutionResultSatisfiesThreshold(locallyConsumedTokens)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>postponedToConsumeTokens += locallyConsumedTokens;<NEW_LINE>speculativelyConsumedByPredictionTokens += predictedConsumptionByOthersSinceLastLocalCall;<NEW_LINE>if (entry.isStateModified()) {<NEW_LINE>state = entry.get();<NEW_LINE>}<NEW_LINE>return (CommandResult<T>) multiResult.getResults().get(ORIGINAL_COMMAND_INDEX);<NEW_LINE>}
|
Arrays.asList(consumeByPredictionCommand, command);
|
1,691,254
|
public static DescribeVsStreamsOnlineListResponse unmarshall(DescribeVsStreamsOnlineListResponse describeVsStreamsOnlineListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVsStreamsOnlineListResponse.setRequestId(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.RequestId"));<NEW_LINE>describeVsStreamsOnlineListResponse.setPageNum(_ctx.integerValue("DescribeVsStreamsOnlineListResponse.PageNum"));<NEW_LINE>describeVsStreamsOnlineListResponse.setPageSize<MASK><NEW_LINE>describeVsStreamsOnlineListResponse.setTotalNum(_ctx.integerValue("DescribeVsStreamsOnlineListResponse.TotalNum"));<NEW_LINE>describeVsStreamsOnlineListResponse.setTotalPage(_ctx.integerValue("DescribeVsStreamsOnlineListResponse.TotalPage"));<NEW_LINE>List<LiveStreamOnlineInfo> onlineInfo = new ArrayList<LiveStreamOnlineInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeVsStreamsOnlineListResponse.OnlineInfo.Length"); i++) {<NEW_LINE>LiveStreamOnlineInfo liveStreamOnlineInfo = new LiveStreamOnlineInfo();<NEW_LINE>liveStreamOnlineInfo.setDomainName(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].DomainName"));<NEW_LINE>liveStreamOnlineInfo.setAppName(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].AppName"));<NEW_LINE>liveStreamOnlineInfo.setStreamName(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].StreamName"));<NEW_LINE>liveStreamOnlineInfo.setPublishTime(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].PublishTime"));<NEW_LINE>liveStreamOnlineInfo.setPublishUrl(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].PublishUrl"));<NEW_LINE>liveStreamOnlineInfo.setPublishDomain(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].PublishDomain"));<NEW_LINE>liveStreamOnlineInfo.setPublishType(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].PublishType"));<NEW_LINE>liveStreamOnlineInfo.setTranscoded(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].Transcoded"));<NEW_LINE>liveStreamOnlineInfo.setTranscodeId(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.OnlineInfo[" + i + "].TranscodeId"));<NEW_LINE>onlineInfo.add(liveStreamOnlineInfo);<NEW_LINE>}<NEW_LINE>describeVsStreamsOnlineListResponse.setOnlineInfo(onlineInfo);<NEW_LINE>return describeVsStreamsOnlineListResponse;<NEW_LINE>}
|
(_ctx.integerValue("DescribeVsStreamsOnlineListResponse.PageSize"));
|
191,086
|
private void validate(APIUpdateAccountMsg msg) {<NEW_LINE>AccountVO a = dbf.findByUuid(msg.getSession().getAccountUuid(), AccountVO.class);<NEW_LINE>if (msg.getName() != null) {<NEW_LINE>SimpleQuery<AccountVO> q = dbf.createQuery(AccountVO.class);<NEW_LINE>q.add(AccountVO_.name, Op.EQ, msg.getName());<NEW_LINE>if (q.isExists()) {<NEW_LINE>throw new ApiMessageInterceptionException(argerr("unable to update name. An account already called %s", msg.getName()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (msg.getUuid() == null) {<NEW_LINE>msg.setUuid(msg.getSession().getAccountUuid());<NEW_LINE>}<NEW_LINE>AccountVO account = dbf.findByUuid(msg.getUuid(), AccountVO.class);<NEW_LINE>if (msg.getOldPassword() != null && !msg.getOldPassword().equals(account.getPassword())) {<NEW_LINE>throw new OperationFailureException(operr("old password is not equal to the original password, cannot update the password of account[uuid: %s]", msg.getUuid()));<NEW_LINE>}<NEW_LINE>if (a.getType() == AccountType.SystemAdmin) {<NEW_LINE>if (msg.getName() != null && (msg.getUuid() == null || msg.getUuid().equals(AccountConstant.INITIAL_SYSTEM_ADMIN_UUID))) {<NEW_LINE>throw <MASK><NEW_LINE>}<NEW_LINE>if (msg.getPassword() != null && (!AccountConstant.isAdminPermission(msg.getSession()))) {<NEW_LINE>throw new OperationFailureException(operr("only admin account can update it's password"));<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!account.getUuid().equals(a.getUuid())) {<NEW_LINE>throw new OperationFailureException(operr("account[uuid: %s, name: %s] is a normal account, it cannot reset the password of another account[uuid: %s]", account.getUuid(), account.getName(), msg.getUuid()));<NEW_LINE>}<NEW_LINE>}
|
new OperationFailureException(operr("the name of admin account cannot be updated"));
|
750,539
|
private static FusekiServer buildServer(FusekiServer.Builder builder, ServerConfig serverConfig) {<NEW_LINE>if (serverConfig.jettyConfigFile != null)<NEW_LINE>builder.jettyServerConfig(serverConfig.jettyConfigFile);<NEW_LINE>builder.port(serverConfig.port);<NEW_LINE>builder.loopback(serverConfig.loopback);<NEW_LINE>builder.verbose(serverConfig.verboseLogging);<NEW_LINE>if (serverConfig.addGeneral != null)<NEW_LINE>// Add SPARQL_QueryGeneral as a general servlet, not reached by the service router.<NEW_LINE>builder.addServlet(serverConfig.addGeneral, new SPARQL_QueryGeneral());<NEW_LINE>if (serverConfig.validators) {<NEW_LINE>// Validators.<NEW_LINE>builder.addServlet("/$/validate/query", new QueryValidator());<NEW_LINE>builder.addServlet("/$/validate/update", new UpdateValidator());<NEW_LINE>builder.addServlet("/$/validate/iri", new IRIValidator());<NEW_LINE>builder.addServlet("/$/validate/data", new DataValidator());<NEW_LINE>}<NEW_LINE>if (!serverConfig.empty) {<NEW_LINE>if (serverConfig.serverConfig != null)<NEW_LINE>// Config file.<NEW_LINE>builder.parseConfigFile(serverConfig.serverConfig);<NEW_LINE>else<NEW_LINE>// One dataset.<NEW_LINE>builder.add(serverConfig.datasetPath, serverConfig.dsg, serverConfig.allowUpdate);<NEW_LINE>}<NEW_LINE>if (serverConfig.contentDirectory != null)<NEW_LINE><MASK><NEW_LINE>if (serverConfig.passwdFile != null)<NEW_LINE>builder.passwordFile(serverConfig.passwdFile);<NEW_LINE>if (serverConfig.realm != null)<NEW_LINE>builder.realm(serverConfig.realm);<NEW_LINE>if (serverConfig.httpsKeysDetails != null)<NEW_LINE>builder.https(serverConfig.httpsPort, serverConfig.httpsKeysDetails);<NEW_LINE>if (serverConfig.authScheme != null)<NEW_LINE>builder.auth(serverConfig.authScheme);<NEW_LINE>if (serverConfig.withCORS)<NEW_LINE>builder.enableCors(true);<NEW_LINE>if (serverConfig.withPing)<NEW_LINE>builder.enablePing(true);<NEW_LINE>if (serverConfig.withStats)<NEW_LINE>builder.enableStats(true);<NEW_LINE>if (serverConfig.withMetrics)<NEW_LINE>builder.enableMetrics(true);<NEW_LINE>if (serverConfig.withCompact)<NEW_LINE>builder.enableCompact(true);<NEW_LINE>return builder.build();<NEW_LINE>}
|
builder.staticFileBase(serverConfig.contentDirectory);
|
698,868
|
public String update(HttpServletRequest request) throws Exception {<NEW_LINE>String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID);<NEW_LINE>String serviceName = WebUtils.<MASK><NEW_LINE>String clusterName = WebUtils.optional(request, CommonParams.CLUSTER_NAME, UtilsAndCommons.DEFAULT_CLUSTER_NAME);<NEW_LINE>String ip = WebUtils.required(request, "ip");<NEW_LINE>int port = Integer.parseInt(WebUtils.required(request, "port"));<NEW_LINE>boolean valid = false;<NEW_LINE>String healthyString = WebUtils.optional(request, "healthy", StringUtils.EMPTY);<NEW_LINE>if (StringUtils.isBlank(healthyString)) {<NEW_LINE>healthyString = WebUtils.optional(request, "valid", StringUtils.EMPTY);<NEW_LINE>}<NEW_LINE>if (StringUtils.isBlank(healthyString)) {<NEW_LINE>throw new IllegalArgumentException("Param 'healthy' is required.");<NEW_LINE>}<NEW_LINE>valid = BooleanUtils.toBoolean(healthyString);<NEW_LINE>Service service = serviceManager.getService(namespaceId, serviceName);<NEW_LINE>// Only health check "none" need update health status with api<NEW_LINE>if (HealthCheckType.NONE.name().equals(service.getClusterMap().get(clusterName).getHealthChecker().getType())) {<NEW_LINE>for (Instance instance : service.allIPs(Lists.newArrayList(clusterName))) {<NEW_LINE>if (instance.getIp().equals(ip) && instance.getPort() == port) {<NEW_LINE>instance.setHealthy(valid);<NEW_LINE>Loggers.EVT_LOG.info((valid ? "[IP-ENABLED]" : "[IP-DISABLED]") + " ips: " + instance.getIp() + ":" + instance.getPort() + "@" + instance.getClusterName() + ", service: " + serviceName + ", msg: update thought HealthController api");<NEW_LINE>pushService.serviceChanged(service);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("health check is still working, service: " + serviceName);<NEW_LINE>}<NEW_LINE>return "ok";<NEW_LINE>}
|
required(request, CommonParams.SERVICE_NAME);
|
636,383
|
public static boolean isWildFlyServlet(File serverPath) {<NEW_LINE>// NOI18N<NEW_LINE>assert serverPath != null : "Can't determine version with null server path";<NEW_LINE>String productConf = getProductConf(serverPath);<NEW_LINE>if (productConf != null) {<NEW_LINE>File productConfFile = new File(productConf);<NEW_LINE>if (productConfFile.exists() && productConfFile.canRead()) {<NEW_LINE>try (FileReader reader = new FileReader(productConf)) {<NEW_LINE>Properties props = new Properties();<NEW_LINE>props.load(reader);<NEW_LINE>String slot = props.getProperty("slot");<NEW_LINE>if (slot != null) {<NEW_LINE>File manifestFile = new File(serverPath, getModulesBase(serverPath.getAbsolutePath()) + "org.jboss.as.product".replace('.', separatorChar) + separatorChar + slot + separatorChar + "dir" + separatorChar + "META-INF" + separatorChar + "MANIFEST.MF");<NEW_LINE>InputStream stream = new FileInputStream(manifestFile);<NEW_LINE>Manifest manifest = new Manifest(stream);<NEW_LINE>String productName = manifest.getMainAttributes().getValue("JBoss-Product-Release-Name");<NEW_LINE>if (productName == null || productName.isEmpty()) {<NEW_LINE>productName = manifest.getMainAttributes().getValue("JBoss-Project-Release-Name");<NEW_LINE>}<NEW_LINE>return productName != null && (productName.contains("WildFly Web Lite") <MASK><NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>// NOI18N<NEW_LINE>LOGGER.log(Level.INFO, "Can't determine version", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
|
|| productName.contains("WildFly Servlet"));
|
1,305,247
|
public boolean read_scope(ReadScopeParameter p_par) {<NEW_LINE>boolean flip_style_rotate_first = false;<NEW_LINE>Object next_token = null;<NEW_LINE>for (; ; ) {<NEW_LINE>Object prev_token = next_token;<NEW_LINE>try {<NEW_LINE>next_token = p_par.scanner.next_token();<NEW_LINE>} catch (java.io.IOException e) {<NEW_LINE>FRLogger.error("PlaceControl.read_scope: IO error scanning file", e);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (next_token == null) {<NEW_LINE>FRLogger.warn("PlaceControl.read_scope: unexpected end of file");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (next_token == CLOSED_BRACKET) {<NEW_LINE>// end of scope<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (prev_token == OPEN_BRACKET) {<NEW_LINE>if (next_token == FLIP_STYLE) {<NEW_LINE>flip_style_rotate_first = read_flip_style_rotate_first(p_par.scanner);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (flip_style_rotate_first) {<NEW_LINE>p_par.board_handling.get_routing_board(<MASK><NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
|
).components.set_flip_style_rotate_first(true);
|
86,782
|
public void process(JCas jcas) throws AnalysisEngineProcessException {<NEW_LINE>JCas questionView, resultView, passagesView;<NEW_LINE>try {<NEW_LINE>questionView = jcas.getView("Question");<NEW_LINE>resultView = jcas.getView("Result");<NEW_LINE>passagesView = jcas.getView("Passages");<NEW_LINE>} catch (CASException e) {<NEW_LINE>throw new AnalysisEngineProcessException(e);<NEW_LINE>}<NEW_LINE>AnswerFV afv = new AnswerFV();<NEW_LINE>afv.setFeature(AF.OriginPsg, 1.0);<NEW_LINE>afv.setFeature(AF.OriginPsgFirst, 1.0);<NEW_LINE>Sentence s2 = (Sentence) copier.copyFs(sentence);<NEW_LINE>s2.addToIndexes();<NEW_LINE>for (Annotation a : JCasUtil.selectCovered(Annotation.class, sentence)) {<NEW_LINE>if (copier.alreadyCopied(a))<NEW_LINE>continue;<NEW_LINE>Annotation a2 = (<MASK><NEW_LINE>a2.addToIndexes();<NEW_LINE>}<NEW_LINE>}
|
Annotation) copier.copyFs(a);
|
974,442
|
public <S, D> D map(MappingContext<S, D> context) {<NEW_LINE>MappingContextImpl<S, D> contextImpl = (MappingContextImpl<S, D>) context;<NEW_LINE>Class<D> destinationType = context.getDestinationType();<NEW_LINE>// Resolve some circular dependencies<NEW_LINE>if (!Iterables.isIterable(destinationType)) {<NEW_LINE>D circularDest = contextImpl.destinationForSource();<NEW_LINE>if (circularDest != null && circularDest.getClass().isAssignableFrom(contextImpl.getDestinationType()))<NEW_LINE>return circularDest;<NEW_LINE>}<NEW_LINE>D destination = null;<NEW_LINE>TypeMap<S, D> typeMap = typeMapStore.get(context.getSourceType(), context.getDestinationType(), context.getTypeMapName());<NEW_LINE>if (typeMap != null) {<NEW_LINE>destination = typeMap(contextImpl, typeMap);<NEW_LINE>} else {<NEW_LINE>Converter<S, D> converter = converterFor(context);<NEW_LINE>if (converter != null && (context.getDestination() == null || context.getParent() != null))<NEW_LINE>destination = convert(context, converter);<NEW_LINE>else if (!Primitives.isPrimitive(context.getSourceType()) && !Primitives.isPrimitive(context.getDestinationType())) {<NEW_LINE>// Call getOrCreate in case TypeMap was created concurrently<NEW_LINE>typeMap = typeMapStore.getOrCreate(context.getSource(), context.getSourceType(), context.getDestinationType(), <MASK><NEW_LINE>destination = typeMap(contextImpl, typeMap);<NEW_LINE>} else if (context.getDestinationType().isAssignableFrom(context.getSourceType()))<NEW_LINE>destination = (D) context.getSource();<NEW_LINE>}<NEW_LINE>contextImpl.setDestination(destination, true);<NEW_LINE>return destination;<NEW_LINE>}
|
context.getTypeMapName(), this);
|
409,155
|
public void process(Element element, HasKeyEventCallbackMethods holder) throws Exception {<NEW_LINE>String methodName = element<MASK><NEW_LINE>ExecutableElement executableElement = (ExecutableElement) element;<NEW_LINE>TypeMirror returnType = executableElement.getReturnType();<NEW_LINE>boolean returnMethodResult = returnType.getKind() != TypeKind.VOID;<NEW_LINE>JSwitch switchBody = getSwitchBody(holder);<NEW_LINE>int[] keyCodes = annotationHelper.extractKeyCode(element);<NEW_LINE>for (int keyCode : keyCodes) {<NEW_LINE>String keyCodeFieldName = annotationHelper.getFieldNameForKeyCode(keyCode);<NEW_LINE>JBlock switchCaseBody = switchBody._case(getClasses().KEY_EVENT.staticRef(keyCodeFieldName)).body();<NEW_LINE>JInvocation methodCall = invoke(methodName);<NEW_LINE>if (returnMethodResult) {<NEW_LINE>switchCaseBody._return(methodCall);<NEW_LINE>} else {<NEW_LINE>switchCaseBody.add(methodCall);<NEW_LINE>switchCaseBody._return(TRUE);<NEW_LINE>}<NEW_LINE>passParametersToMethodCall(element, holder, methodCall);<NEW_LINE>}<NEW_LINE>}
|
.getSimpleName().toString();
|
1,263,743
|
public void testAssumptionFailure(TestIdentifier testIdentifier, String trace) {<NEW_LINE>if (takeScreenshotOnFailure) {<NEW_LINE>String suffix = "_failure";<NEW_LINE>String filepath = testIdentifier.getTestName() + suffix + SCREENSHOT_SUFFIX;<NEW_LINE>executeOnAdbShell("screencap -p " + screenshotsPathOnDevice + "/" + filepath);<NEW_LINE>getLog().info(deviceLogLinePrefix + <MASK><NEW_LINE>}<NEW_LINE>++testFailureCount;<NEW_LINE>getLog().info(deviceLogLinePrefix + INDENT + INDENT + testIdentifier.toString());<NEW_LINE>getLog().info(deviceLogLinePrefix + INDENT + INDENT + trace);<NEW_LINE>if (createReport) {<NEW_LINE>final Testsuite.Testcase.Failure failure = new Testsuite.Testcase.Failure();<NEW_LINE>failure.setValue(trace);<NEW_LINE>failure.setMessage(parseForMessage(trace));<NEW_LINE>failure.setType(parseForException(trace));<NEW_LINE>currentTestCase.getFailure().add(failure);<NEW_LINE>}<NEW_LINE>}
|
INDENT + INDENT + filepath + " saved.");
|
666,367
|
public static void tackle(long a, long b) {<NEW_LINE>if (a == 0) {<NEW_LINE>System.out.print(0);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean isMinus = a > 0 ? false : true;<NEW_LINE>if (isMinus) {<NEW_LINE>System.out.print("(-");<NEW_LINE>a = -a;<NEW_LINE>}<NEW_LINE>long gcd = getGcd(a, b);<NEW_LINE>a = a / gcd;<NEW_LINE>b = b / gcd;<NEW_LINE>if (a % b == 0) {<NEW_LINE>System.out.print(a / b);<NEW_LINE>} else if (Math.abs(a) > b) {<NEW_LINE>System.out.print(a / b + " " + (a % b) % b + "/" + b);<NEW_LINE>} else if (a == b) {<NEW_LINE>System.out.print(1);<NEW_LINE>} else {<NEW_LINE>System.out.print(a + "/" + b);<NEW_LINE>}<NEW_LINE>if (isMinus) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
|
System.out.print(")");
|
1,790,360
|
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart part, @Named(IServiceConstants.ACTIVE_SHELL) Shell shell) throws IOException {<NEW_LINE>FileDialog fileDialog = new FileDialog(shell, SWT.OPEN | SWT.SINGLE);<NEW_LINE>fileDialog.setText(Messages.PDFImportDebugTextExtraction);<NEW_LINE>fileDialog.setFilterNames(new String[] { Messages.PDFImportFilterName });<NEW_LINE>// $NON-NLS-1$<NEW_LINE>fileDialog.setFilterExtensions(new String[] { "*.pdf" });<NEW_LINE>fileDialog.open();<NEW_LINE>String fileName = fileDialog.getFileName();<NEW_LINE>if (fileName == null || fileName.isEmpty())<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>File file = new File(fileDialog.getFilterPath(), fileName);<NEW_LINE><MASK><NEW_LINE>inputFile.convertPDFtoText();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String text = "PDFBox Version: " + inputFile.getPDFBoxVersion().toString();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>text += "\n-----------------------------------------\n";<NEW_LINE>// CRLF to spac; //$NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>text += inputFile.getText().replace("\r", "");<NEW_LINE>new DisplayTextDialog(shell, file, text).open();<NEW_LINE>} catch (IOException e) {<NEW_LINE>PortfolioPlugin.log(e);<NEW_LINE>MessageDialog.openError(shell, Messages.LabelError, e.getMessage());<NEW_LINE>}<NEW_LINE>}
|
PDFInputFile inputFile = new PDFInputFile(file);
|
992,058
|
public void marshall(CreateTableRequest createTableRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createTableRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createTableRequest.getKeyspaceName(), KEYSPACENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createTableRequest.getTableName(), TABLENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createTableRequest.getSchemaDefinition(), SCHEMADEFINITION_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createTableRequest.getCapacitySpecification(), CAPACITYSPECIFICATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createTableRequest.getEncryptionSpecification(), ENCRYPTIONSPECIFICATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createTableRequest.getPointInTimeRecovery(), POINTINTIMERECOVERY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createTableRequest.getTtl(), TTL_BINDING);<NEW_LINE>protocolMarshaller.marshall(createTableRequest.getDefaultTimeToLive(), DEFAULTTIMETOLIVE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createTableRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
|
createTableRequest.getComment(), COMMENT_BINDING);
|
438,330
|
private static Vector combineServerLongFloatRowSplits(List<ServerRow> rowSplits, MatrixMeta matrixMeta, int rowIndex) {<NEW_LINE>long colNum = matrixMeta.getColNum();<NEW_LINE>int elemNum = 0;<NEW_LINE>int size = rowSplits.size();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>elemNum += rowSplits.<MASK><NEW_LINE>}<NEW_LINE>LongFloatVector row = VFactory.sparseLongKeyFloatVector(colNum, elemNum);<NEW_LINE>row.setMatrixId(matrixMeta.getId());<NEW_LINE>row.setRowId(rowIndex);<NEW_LINE>Collections.sort(rowSplits, serverRowComp);<NEW_LINE>int clock = Integer.MAX_VALUE;<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>if (rowSplits.get(i) == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (rowSplits.get(i).getClock() < clock) {<NEW_LINE>clock = rowSplits.get(i).getClock();<NEW_LINE>}<NEW_LINE>((ServerLongFloatRow) rowSplits.get(i)).mergeTo(row);<NEW_LINE>}<NEW_LINE>row.setClock(clock);<NEW_LINE>return row;<NEW_LINE>}
|
get(i).size();
|
1,068,621
|
final ListWorkteamsResult executeListWorkteams(ListWorkteamsRequest listWorkteamsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listWorkteamsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListWorkteamsRequest> request = null;<NEW_LINE>Response<ListWorkteamsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListWorkteamsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listWorkteamsRequest));<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, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListWorkteams");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListWorkteamsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListWorkteamsResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
|
invoke(request, responseHandler, executionContext);
|
1,680,707
|
public void renderSummaryTo(ClassDoc classDoc, Element parent) {<NEW_LINE>Document document = parent.getOwnerDocument();<NEW_LINE>Element summarySection = document.createElement("section");<NEW_LINE>parent.appendChild(summarySection);<NEW_LINE>Element title = document.createElement("title");<NEW_LINE>summarySection.appendChild(title);<NEW_LINE>title.appendChild<MASK><NEW_LINE>Collection<MethodDoc> classMethods = classDoc.getClassMethods();<NEW_LINE>if (!classMethods.isEmpty()) {<NEW_LINE>Element table = document.createElement("table");<NEW_LINE>summarySection.appendChild(table);<NEW_LINE>title = document.createElement("title");<NEW_LINE>table.appendChild(title);<NEW_LINE>title.appendChild(document.createTextNode("Methods - " + classDoc.getSimpleName()));<NEW_LINE>methodTableRenderer.renderTo(classMethods, table);<NEW_LINE>}<NEW_LINE>for (ClassExtensionDoc extensionDoc : classDoc.getClassExtensions()) {<NEW_LINE>extensionMethodsSummaryRenderer.renderTo(extensionDoc, summarySection);<NEW_LINE>}<NEW_LINE>if (!hasMethods(classDoc)) {<NEW_LINE>Element para = document.createElement("para");<NEW_LINE>summarySection.appendChild(para);<NEW_LINE>para.appendChild(document.createTextNode("No methods"));<NEW_LINE>}<NEW_LINE>}
|
(document.createTextNode("Methods"));
|
1,747,138
|
private List<Compatibility<springfox.documentation.service.Parameter, RequestParameter>> readParameters(OperationContext context) {<NEW_LINE>List<ResolvedMethodParameter> methodParameters = context.getParameters();<NEW_LINE>List<Compatibility<springfox.documentation.service.Parameter, RequestParameter>> parameters = new ArrayList<>();<NEW_LINE>LOGGER.debug("Reading parameters for method {} at path {}", context.getName(), context.requestMappingPattern());<NEW_LINE>int index = 0;<NEW_LINE>for (ResolvedMethodParameter methodParameter : methodParameters) {<NEW_LINE>LOGGER.debug("Processing parameter {}", methodParameter.defaultName().orElse("<unknown>"));<NEW_LINE>ResolvedType alternate = context.alternateFor(methodParameter.getParameterType());<NEW_LINE>if (!shouldIgnore(methodParameter, alternate, context.getIgnorableParameterTypes())) {<NEW_LINE>ParameterContext parameterContext = new ParameterContext(methodParameter, context.getDocumentationContext(), context.getGenericsNamingStrategy(), context, index++);<NEW_LINE>if (shouldExpand(methodParameter, alternate)) {<NEW_LINE>parameters.addAll(expander.expand(new ExpansionContext("", alternate, context)));<NEW_LINE>} else {<NEW_LINE>parameters.add<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return parameters.stream().filter(hiddenParameter().negate()).collect(toList());<NEW_LINE>}
|
(pluginsManager.parameter(parameterContext));
|
1,489,792
|
private I_MSV3_VerfuegbarkeitsanfrageEinzelne_Artikel createVerfuegbarkeitsanfrageEinzelne_Artikel(@NonNull final StockAvailabilityQueryItem singleArticle, @NonNull final ImmutableMap<StockAvailabilityQueryItem, MSV3ArtikelContextInfo> immutableMap) {<NEW_LINE>final I_MSV3_VerfuegbarkeitsanfrageEinzelne_Artikel articleRecord = newInstance(I_MSV3_VerfuegbarkeitsanfrageEinzelne_Artikel.class);<NEW_LINE>articleRecord.<MASK><NEW_LINE>articleRecord.setMSV3_Bedarf(singleArticle.getRequirementType().getCode());<NEW_LINE>articleRecord.setMSV3_Menge(singleArticle.getQtyRequired().getValueAsInt());<NEW_LINE>articleRecord.setMSV3_Pzn(singleArticle.getPzn().getValueAsString());<NEW_LINE>final MSV3ArtikelContextInfo availabilityRequestItem = immutableMap.get(singleArticle);<NEW_LINE>if (availabilityRequestItem != null) {<NEW_LINE>articleRecord.setC_OrderLineSO_ID(availabilityRequestItem.getSalesOrderLineId());<NEW_LINE>articleRecord.setC_PurchaseCandidate_ID(availabilityRequestItem.getPurchaseCandidateId());<NEW_LINE>}<NEW_LINE>return articleRecord;<NEW_LINE>}
|
setAD_Org_ID(orgId.getRepoId());
|
335,047
|
private void handle(String key) throws Exception {<NEW_LINE>String table = key.substring(0, key.indexOf(KEY_MIN_NAME));<NEW_LINE>InterProcessSemaphoreMutex interProcessSemaphoreMutex = interProcessSemaphoreMutexThreadLocal.get();<NEW_LINE>if (interProcessSemaphoreMutex == null) {<NEW_LINE>interProcessSemaphoreMutex = new InterProcessSemaphoreMutex(client, PATH + table + SEQ + LOCK);<NEW_LINE>interProcessSemaphoreMutexThreadLocal.set(interProcessSemaphoreMutex);<NEW_LINE>}<NEW_LINE>Map<String, Map<String, String>> tableParaValMap = tableParaValMapThreadLocal.get();<NEW_LINE>if (tableParaValMap == null) {<NEW_LINE>tableParaValMap = new HashMap<>();<NEW_LINE>tableParaValMapThreadLocal.set(tableParaValMap);<NEW_LINE>}<NEW_LINE>Map<String, String> paraValMap = tableParaValMap.get(table);<NEW_LINE>if (paraValMap == null) {<NEW_LINE>paraValMap = new ConcurrentHashMap<>();<NEW_LINE>tableParaValMap.put(table, paraValMap);<NEW_LINE>String seqPath = PATH + table + SEQ;<NEW_LINE>Stat stat = this.client.checkExists().forPath(seqPath);<NEW_LINE>if (stat == null || (stat.getDataLength() == 0)) {<NEW_LINE>paraValMap.put(table + KEY_MIN_NAME, this.props.getProperty(key));<NEW_LINE>paraValMap.put(table + KEY_MAX_NAME, this.props.getProperty(table + KEY_MAX_NAME));<NEW_LINE>paraValMap.put(table + KEY_CUR_NAME, this.props.getProperty(table + KEY_CUR_NAME));<NEW_LINE>try {<NEW_LINE>String val = this.props.getProperty(table + KEY_MIN_NAME);<NEW_LINE>client.create().creatingParentsIfNeeded().withMode(CreateMode.PERSISTENT).forPath(PATH + table + <MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.debug("Node exists! Maybe other instance is initializing!");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>fetchNextPeriod(table);<NEW_LINE>}<NEW_LINE>}
|
SEQ, val.getBytes());
|
1,317,200
|
private static void redefineEdition(Instrumentation instrumentation, String targetClassName, Redefiner redefiner) throws ClassNotFoundException, UnmodifiableClassException {<NEW_LINE>instrumentation.addTransformer(new ClassFileTransformer() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] byteCode) {<NEW_LINE>String finalTargetClassName = targetClassName.replace(".", "/");<NEW_LINE>if (!className.equals(finalTargetClassName)) {<NEW_LINE>return byteCode;<NEW_LINE>}<NEW_LINE>LOGGER.debug("Transforming class " + targetClassName);<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>CtClass cc = cp.get(targetClassName);<NEW_LINE>redefiner.redefine(cc);<NEW_LINE>byteCode = cc.toBytecode();<NEW_LINE>cc.detach();<NEW_LINE>} catch (NotFoundException | CannotCompileException | IOException e) {<NEW_LINE>LOGGER.error(String.format("Could not transform class %s, will use default class definition", targetClassName), e);<NEW_LINE>}<NEW_LINE>return byteCode;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>instrumentation.retransformClasses(Class.forName(targetClassName));<NEW_LINE>}
|
ClassPool cp = ClassPool.getDefault();
|
329,856
|
public void print(String s) {<NEW_LINE>// If we just printed a newline, print an indent.<NEW_LINE>//<NEW_LINE>if (atStart) {<NEW_LINE>for (int j = 0; j < indent; ++j) {<NEW_LINE>writeString(" ");<NEW_LINE>}<NEW_LINE>if (inComment) {<NEW_LINE>writeString(" * ");<NEW_LINE>}<NEW_LINE>atStart = false;<NEW_LINE>}<NEW_LINE>// Now print up to the end of the string or the next newline.<NEW_LINE>//<NEW_LINE>String rest = null;<NEW_LINE>int i = s.indexOf("\n");<NEW_LINE>if (i > -1 && i < s.length() - 1) {<NEW_LINE>rest = s.substring(i + 1);<NEW_LINE>s = s.<MASK><NEW_LINE>}<NEW_LINE>writeString(s);<NEW_LINE>// If rest is non-null, then s ended with a newline and we recurse.<NEW_LINE>//<NEW_LINE>if (rest != null) {<NEW_LINE>atStart = true;<NEW_LINE>print(rest);<NEW_LINE>}<NEW_LINE>}
|
substring(0, i + 1);
|
812,944
|
private void checkMapToDownload(RotatedTileBox tileBox, List<BinaryMapDataObject> currentObjects) {<NEW_LINE><MASK><NEW_LINE>int cx = tileBox.getCenter31X();<NEW_LINE>int cy = tileBox.getCenter31Y();<NEW_LINE>if (lastCheckMapCx == cx && lastCheckMapCy == cy && lastCheckMapZoom == zoom) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>lastCheckMapCx = cx;<NEW_LINE>lastCheckMapCy = cy;<NEW_LINE>lastCheckMapZoom = zoom;<NEW_LINE>MapActivity mapActivity = getMapActivity();<NEW_LINE>if (app.getSettings().SHOW_DOWNLOAD_MAP_DIALOG.get() && mapActivity != null && mapActivity.getWidgetsVisibilityHelper().shouldShowDownloadMapWidget() && zoom >= ZOOM_MIN_TO_SHOW_DOWNLOAD_DIALOG && zoom <= ZOOM_MAX_TO_SHOW_DOWNLOAD_DIALOG && !view.isAnimatingMapMove() && currentObjects != null) {<NEW_LINE>DownloadIndexesThread downloadThread = app.getDownloadThread();<NEW_LINE>DownloadResources indexes = downloadThread.getIndexes();<NEW_LINE>if (!indexes.getExternalMapFileNamesAt(cx, cy, zoom, false).isEmpty()) {<NEW_LINE>hideDownloadMapToolbar();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<WorldRegion, BinaryMapDataObject> selectedObjects = new LinkedHashMap<>();<NEW_LINE>for (int i = 0; i < currentObjects.size(); i++) {<NEW_LINE>final BinaryMapDataObject o = currentObjects.get(i);<NEW_LINE>String fullName = osmandRegions.getFullName(o);<NEW_LINE>WorldRegion regionData = osmandRegions.getRegionData(fullName);<NEW_LINE>if (regionData != null && regionData.isRegionMapDownload()) {<NEW_LINE>String regionDownloadName = regionData.getRegionDownloadName();<NEW_LINE>if (regionDownloadName != null) {<NEW_LINE>if (rm.checkIfObjectDownloaded(regionDownloadName)) {<NEW_LINE>hideDownloadMapToolbar();<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>selectedObjects.put(regionData, o);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>IndexItem indexItem = null;<NEW_LINE>String name = null;<NEW_LINE>Map.Entry<WorldRegion, BinaryMapDataObject> res = app.getRegions().getSmallestBinaryMapDataObjectAt(selectedObjects);<NEW_LINE>if (res != null && res.getKey() != null) {<NEW_LINE>WorldRegion regionData = res.getKey();<NEW_LINE>List<IndexItem> indexItems = indexes.getIndexItems(regionData);<NEW_LINE>if (indexItems.size() == 0) {<NEW_LINE>if (!indexes.isDownloadedFromInternet && app.getSettings().isInternetConnectionAvailable()) {<NEW_LINE>downloadThread.runReloadIndexFilesSilent();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (IndexItem item : indexItems) {<NEW_LINE>if (item.getType() == DownloadActivityType.NORMAL_FILE && !(item.isDownloaded() || downloadThread.isDownloading(item))) {<NEW_LINE>indexItem = item;<NEW_LINE>name = regionData.getLocaleName();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (indexItem != null && !Algorithms.isEmpty(name)) {<NEW_LINE>showDownloadMapToolbar(indexItem, name);<NEW_LINE>} else {<NEW_LINE>hideDownloadMapToolbar();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>hideDownloadMapToolbar();<NEW_LINE>}<NEW_LINE>}
|
int zoom = tileBox.getZoom();
|
266,915
|
protected void discover(final Class clazz, final String property) {<NEW_LINE>try {<NEW_LINE>Object[] params = {};<NEW_LINE>StringBuilder sb = new StringBuilder("is");<NEW_LINE>sb.append(property);<NEW_LINE>setMethod(getIntrospector().getMethod(clazz, sb.toString(), params));<NEW_LINE>if (!isAlive()) {<NEW_LINE>char c = sb.charAt(2);<NEW_LINE>if (Character.isLowerCase(c)) {<NEW_LINE>sb.setCharAt(2<MASK><NEW_LINE>} else {<NEW_LINE>sb.setCharAt(2, Character.toLowerCase(c));<NEW_LINE>}<NEW_LINE>setMethod(getIntrospector().getMethod(clazz, sb.toString(), params));<NEW_LINE>}<NEW_LINE>if (isAlive()) {<NEW_LINE>if (getMethod().getReturnType() != Boolean.TYPE && getMethod().getReturnType() != Boolean.class) {<NEW_LINE>setMethod(null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE>String msg = "Exception while looking for boolean property getter for '" + property;<NEW_LINE>Logger.error(this, msg, e);<NEW_LINE>throw new VelocityException(msg, e);<NEW_LINE>}<NEW_LINE>}
|
, Character.toUpperCase(c));
|
336,474
|
private void oopsCodeBlobDo(AddressVisitor oopVisitor, RegisterMap regMap) {<NEW_LINE>CodeBlob cb = VM.getVM().getCodeCache().findBlob(getPC());<NEW_LINE>if (Assert.ASSERTS_ENABLED) {<NEW_LINE>Assert.that(cb != null, "sanity check");<NEW_LINE>}<NEW_LINE>if (cb.getOopMaps() != null) {<NEW_LINE>OopMapSet.oopsDo(this, cb, regMap, oopVisitor, VM.<MASK><NEW_LINE>// FIXME: add in traversal of argument oops (skipping this for<NEW_LINE>// now until we have the other stuff tested)<NEW_LINE>}<NEW_LINE>// FIXME: would add this in in non-debugging system<NEW_LINE>// If we see an activation belonging to a non_entrant nmethod, we mark it.<NEW_LINE>// if (cb->is_nmethod() && ((nmethod *)cb)->is_not_entrant()) {<NEW_LINE>// ((nmethod*)cb)->mark_as_seen_on_stack();<NEW_LINE>// }<NEW_LINE>}
|
getVM().isDebugging());
|
870,273
|
private boolean isResourceCachingEnabled() {<NEW_LINE>if (_resourceCacheEnabled == null) {<NEW_LINE>FacesContext facesContext = FacesContext.getCurrentInstance();<NEW_LINE>// first, check to make sure that ProjectStage is production, if not, skip caching<NEW_LINE>if (!facesContext.isProjectStage(ProjectStage.Production)) {<NEW_LINE>_resourceCacheEnabled = Boolean.FALSE;<NEW_LINE>return _resourceCacheEnabled;<NEW_LINE>}<NEW_LINE>ExternalContext externalContext = facesContext.getExternalContext();<NEW_LINE>if (externalContext == null) {<NEW_LINE>// don't cache right now, but don't disable it yet either<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// if in production, make sure that the cache is not explicitly disabled via context param<NEW_LINE>_resourceCacheEnabled = WebConfigParamUtils.getBooleanInitParameter(externalContext, <MASK><NEW_LINE>if (log.isLoggable(Level.FINE)) {<NEW_LINE>log.log(Level.FINE, "MyFaces Resource Caching Enabled=" + _resourceCacheEnabled);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return _resourceCacheEnabled;<NEW_LINE>}
|
ResourceHandlerCache.RESOURCE_HANDLER_CACHE_ENABLED_ATTRIBUTE, ResourceHandlerCache.RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT);
|
1,007,874
|
private Mono<Response<ClusterInner>> updateWithResponseAsync(String resourceGroupName, String clusterName, ClusterPatch 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 (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (clusterName == null) {<NEW_LINE>return Mono.<MASK><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.update(this.client.getEndpoint(), resourceGroupName, clusterName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context);<NEW_LINE>}
|
error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
|
803,304
|
private List<ManagedSeriesReader> initMultSeriesReader(QueryContext context) throws StorageEngineException, IOException, EmptyIntervalException, QueryProcessException {<NEW_LINE>Filter timeFilter = null;<NEW_LINE>if (queryPlan.getExpression() != null) {<NEW_LINE>timeFilter = ((GlobalTimeExpression) queryPlan.getExpression()).getFilter();<NEW_LINE>}<NEW_LINE>// make sure the partition table is new<NEW_LINE>try {<NEW_LINE>metaGroupMember.syncLeaderWithConsistencyCheck(false);<NEW_LINE>} catch (CheckConsistencyException e) {<NEW_LINE>throw new StorageEngineException(e);<NEW_LINE>}<NEW_LINE>List<ManagedSeriesReader<MASK><NEW_LINE>List<AbstractMultPointReader> multPointReaders = Lists.newArrayList();<NEW_LINE>multPointReaders = readerFactory.getMultSeriesReader(queryPlan.getDeduplicatedPaths(), queryPlan.getDeviceToMeasurements(), queryPlan.getDeduplicatedDataTypes(), timeFilter, null, context, queryPlan.isAscending());<NEW_LINE>// combine reader of different partition group of the same path<NEW_LINE>// into a MultManagedMergeReader<NEW_LINE>for (int i = 0; i < queryPlan.getDeduplicatedPaths().size(); i++) {<NEW_LINE>PartialPath partialPath = queryPlan.getDeduplicatedPaths().get(i);<NEW_LINE>TSDataType dataType = queryPlan.getDeduplicatedDataTypes().get(i);<NEW_LINE>String fullPath = partialPath.getFullPath();<NEW_LINE>AssignPathManagedMergeReader assignPathManagedMergeReader = new AssignPathManagedMergeReader(fullPath, dataType, queryPlan.isAscending());<NEW_LINE>for (AbstractMultPointReader multPointReader : multPointReaders) {<NEW_LINE>if (multPointReader.getAllPaths().contains(fullPath)) {<NEW_LINE>assignPathManagedMergeReader.addReader(multPointReader, 0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>readersOfSelectedSeries.add(assignPathManagedMergeReader);<NEW_LINE>}<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Initialized {} readers for {}", readersOfSelectedSeries.size(), queryPlan);<NEW_LINE>}<NEW_LINE>return readersOfSelectedSeries;<NEW_LINE>}
|
> readersOfSelectedSeries = Lists.newArrayList();
|
1,063,744
|
// ========================================= Model Elements ======================================<NEW_LINE>Element writeModelElements(Element rootElement) {<NEW_LINE>Element elementsElement = new Element(ELEMENT_ELEMENTS, ARCHIMATE3_NAMESPACE);<NEW_LINE>writeModelElementsFolder(fModel.getFolder(FolderType.STRATEGY), elementsElement);<NEW_LINE>writeModelElementsFolder(fModel.getFolder<MASK><NEW_LINE>writeModelElementsFolder(fModel.getFolder(FolderType.APPLICATION), elementsElement);<NEW_LINE>writeModelElementsFolder(fModel.getFolder(FolderType.TECHNOLOGY), elementsElement);<NEW_LINE>writeModelElementsFolder(fModel.getFolder(FolderType.MOTIVATION), elementsElement);<NEW_LINE>writeModelElementsFolder(fModel.getFolder(FolderType.IMPLEMENTATION_MIGRATION), elementsElement);<NEW_LINE>writeModelElementsFolder(fModel.getFolder(FolderType.OTHER), elementsElement);<NEW_LINE>// If there are elements<NEW_LINE>if (!elementsElement.getChildren().isEmpty()) {<NEW_LINE>rootElement.addContent(elementsElement);<NEW_LINE>return elementsElement;<NEW_LINE>}<NEW_LINE>// No children, so return null<NEW_LINE>return null;<NEW_LINE>}
|
(FolderType.BUSINESS), elementsElement);
|
1,494,556
|
private static StreamRDFCounting executeData(LoaderPlan loaderPlan, DatasetGraphTDB dsgtdb, Map<String, TupleIndex> indexMap, List<BulkStartFinish> dataProcess, MonitorOutput output) {<NEW_LINE>StoragePrefixesTDB dps = (StoragePrefixesTDB) dsgtdb.getStoragePrefixes();<NEW_LINE>PrefixHandlerBulk prefixHandler = new PrefixHandlerBulk(dps, output);<NEW_LINE>dataProcess.add(prefixHandler);<NEW_LINE>// -- Phase 2 block. Indexer and Destination (blocks of Tuple<NodeId>)<NEW_LINE>TupleIndex[] idx3 = PhasedOps.indexSetFromNames(loaderPlan.primaryLoad3(), indexMap);<NEW_LINE>Indexer indexer3 = new Indexer(output, idx3);<NEW_LINE>TupleIndex[] idx4 = PhasedOps.indexSetFromNames(<MASK><NEW_LINE>Indexer indexer4 = new Indexer(output, idx4);<NEW_LINE>dataProcess.add(indexer3);<NEW_LINE>dataProcess.add(indexer4);<NEW_LINE>Destination<Tuple<NodeId>> functionIndexer3 = indexer3.index();<NEW_LINE>Destination<Tuple<NodeId>> functionIndexer4 = indexer4.index();<NEW_LINE>// -- Phase 2 block.<NEW_LINE>// -- Phase 1.<NEW_LINE>// This is the other way round to AsyncParser.<NEW_LINE>// Here, we return a StreamRDF to pump data into and the rest of the<NEW_LINE>// processing is on other threads. AsyncParser has the processing on the caller thread<NEW_LINE>// and so the current thread continues when the processing from the parser is finished.<NEW_LINE>DataToTuples dtt = new DataToTuples(dsgtdb, functionIndexer3, functionIndexer4, output);<NEW_LINE>DataBatcher dataBatcher = new DataBatcher(dtt.data(), prefixHandler.handler(), output);<NEW_LINE>dataProcess.add(dtt);<NEW_LINE>dataProcess.add(dataBatcher);<NEW_LINE>return dataBatcher;<NEW_LINE>}
|
loaderPlan.primaryLoad4(), indexMap);
|
490,106
|
public CodegenExpression make(CodegenMethodScope parent, SAIFFInitializeSymbol symbols, CodegenClassScope classScope) {<NEW_LINE>CodegenMethod methodNode = parent.makeChild(SubordTableLookupStrategyFactory.EPTYPE, this.getClass(), classScope);<NEW_LINE>if (isStrictKeys) {<NEW_LINE>int[] keyStreamNums = IntArrayUtil.copy(keyStreamNumbers);<NEW_LINE>EventType[] keyStreamTypes = outerStreamTypesZeroIndexed;<NEW_LINE>if (isNWOnTrigger) {<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < keyStreamNums.length; i++) {<NEW_LINE>keyStreamNums[i] = keyStreamNums[i] + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ExprForge[] forges = ExprNodeUtilityQuery.forgesForProperties(keyStreamTypes, hashStrictKeys, keyStreamNums);<NEW_LINE>CodegenExpression eval = MultiKeyCodegen.codegenExprEvaluatorMayMultikey(forges, hashKeyCoercionTypes.getCoercionTypes(), hashMultikeyClasses, methodNode, classScope);<NEW_LINE>methodNode.getBlock().methodReturn(newInstance(SubordHashedTableLookupStrategyPropFactory.EPTYPE, constant(hashStrictKeys), constant(keyStreamNums), eval));<NEW_LINE>return localMethod(methodNode);<NEW_LINE>} else {<NEW_LINE>ExprForge[] forges = new ExprForge[hashKeys.size()];<NEW_LINE>for (int i = 0; i < hashKeys.size(); i++) {<NEW_LINE>forges[i] = hashKeys.get(i).getHashKey().getKeyExpr().getForge();<NEW_LINE>}<NEW_LINE>String[] expressions = ExprNodeUtilityPrint.toExpressionStringsMinPrecedence(forges);<NEW_LINE>CodegenExpression eval = MultiKeyCodegen.codegenExprEvaluatorMayMultikey(forges, hashKeyCoercionTypes.getCoercionTypes(), hashMultikeyClasses, methodNode, classScope);<NEW_LINE>methodNode.getBlock().methodReturn(newInstance(SubordHashedTableLookupStrategyExprFactory.EPTYPE, constant(expressions), eval, constant(isNWOnTrigger), constant(numStreamsOuter)));<NEW_LINE>return localMethod(methodNode);<NEW_LINE>}<NEW_LINE>}
|
keyStreamTypes = EventTypeUtility.shiftRight(outerStreamTypesZeroIndexed);
|
16,786
|
void checkAgainstNullAnnotation(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) {<NEW_LINE>int nullStatus = this.<MASK><NEW_LINE>long tagBits;<NEW_LINE>MethodBinding methodBinding = null;<NEW_LINE>boolean useTypeAnnotations = scope.environment().usesNullTypeAnnotations();<NEW_LINE>try {<NEW_LINE>methodBinding = scope.methodScope().referenceMethodBinding();<NEW_LINE>tagBits = (useTypeAnnotations) ? methodBinding.returnType.tagBits : methodBinding.tagBits;<NEW_LINE>} catch (NullPointerException npe) {<NEW_LINE>// chain of references in try-block has several potential nulls;<NEW_LINE>// any null means we cannot perform the following check<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (useTypeAnnotations) {<NEW_LINE>checkAgainstNullTypeAnnotation(scope, methodBinding.returnType, this.expression, flowContext, flowInfo);<NEW_LINE>} else if (nullStatus != FlowInfo.NON_NULL) {<NEW_LINE>// if we can't prove non-null check against declared null-ness of the enclosing method:<NEW_LINE>if ((tagBits & TagBits.AnnotationNonNull) != 0) {<NEW_LINE>flowContext.recordNullityMismatch(scope, this.expression, this.expression.resolvedType, methodBinding.returnType, flowInfo, nullStatus, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
|
expression.nullStatus(flowInfo, flowContext);
|
882,119
|
public static QueryTransferInListResponse unmarshall(QueryTransferInListResponse queryTransferInListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryTransferInListResponse.setRequestId(_ctx.stringValue("QueryTransferInListResponse.RequestId"));<NEW_LINE>queryTransferInListResponse.setTotalItemNum(_ctx.integerValue("QueryTransferInListResponse.TotalItemNum"));<NEW_LINE>queryTransferInListResponse.setCurrentPageNum(_ctx.integerValue("QueryTransferInListResponse.CurrentPageNum"));<NEW_LINE>queryTransferInListResponse.setTotalPageNum(_ctx.integerValue("QueryTransferInListResponse.TotalPageNum"));<NEW_LINE>queryTransferInListResponse.setPageSize(_ctx.integerValue("QueryTransferInListResponse.PageSize"));<NEW_LINE>queryTransferInListResponse.setPrePage<MASK><NEW_LINE>queryTransferInListResponse.setNextPage(_ctx.booleanValue("QueryTransferInListResponse.NextPage"));<NEW_LINE>List<TransferInInfo> data = new ArrayList<TransferInInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryTransferInListResponse.Data.Length"); i++) {<NEW_LINE>TransferInInfo transferInInfo = new TransferInInfo();<NEW_LINE>transferInInfo.setSubmissionDate(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].SubmissionDate"));<NEW_LINE>transferInInfo.setModificationDate(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].ModificationDate"));<NEW_LINE>transferInInfo.setUserId(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].UserId"));<NEW_LINE>transferInInfo.setInstanceId(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].InstanceId"));<NEW_LINE>transferInInfo.setDomainName(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].DomainName"));<NEW_LINE>transferInInfo.setStatus(_ctx.integerValue("QueryTransferInListResponse.Data[" + i + "].Status"));<NEW_LINE>transferInInfo.setSimpleTransferInStatus(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].SimpleTransferInStatus"));<NEW_LINE>transferInInfo.setResultCode(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].ResultCode"));<NEW_LINE>transferInInfo.setResultDate(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].ResultDate"));<NEW_LINE>transferInInfo.setResultMsg(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].ResultMsg"));<NEW_LINE>transferInInfo.setTransferAuthorizationCodeSubmissionDate(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].TransferAuthorizationCodeSubmissionDate"));<NEW_LINE>transferInInfo.setNeedMailCheck(_ctx.booleanValue("QueryTransferInListResponse.Data[" + i + "].NeedMailCheck"));<NEW_LINE>transferInInfo.setEmail(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].Email"));<NEW_LINE>transferInInfo.setWhoisMailStatus(_ctx.booleanValue("QueryTransferInListResponse.Data[" + i + "].WhoisMailStatus"));<NEW_LINE>transferInInfo.setExpirationDate(_ctx.stringValue("QueryTransferInListResponse.Data[" + i + "].ExpirationDate"));<NEW_LINE>transferInInfo.setProgressBarType(_ctx.integerValue("QueryTransferInListResponse.Data[" + i + "].ProgressBarType"));<NEW_LINE>transferInInfo.setSubmissionDateLong(_ctx.longValue("QueryTransferInListResponse.Data[" + i + "].SubmissionDateLong"));<NEW_LINE>transferInInfo.setModificationDateLong(_ctx.longValue("QueryTransferInListResponse.Data[" + i + "].ModificationDateLong"));<NEW_LINE>transferInInfo.setResultDateLong(_ctx.longValue("QueryTransferInListResponse.Data[" + i + "].ResultDateLong"));<NEW_LINE>transferInInfo.setExpirationDateLong(_ctx.longValue("QueryTransferInListResponse.Data[" + i + "].ExpirationDateLong"));<NEW_LINE>transferInInfo.setTransferAuthorizationCodeSubmissionDateLong(_ctx.longValue("QueryTransferInListResponse.Data[" + i + "].TransferAuthorizationCodeSubmissionDateLong"));<NEW_LINE>data.add(transferInInfo);<NEW_LINE>}<NEW_LINE>queryTransferInListResponse.setData(data);<NEW_LINE>return queryTransferInListResponse;<NEW_LINE>}
|
(_ctx.booleanValue("QueryTransferInListResponse.PrePage"));
|
259,100
|
private void loadNode1067() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.NamespacesType_AddressSpaceFile_Open_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.Argument, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.NamespacesType_AddressSpaceFile_Open_InputArguments, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.NamespacesType_AddressSpaceFile_Open_InputArguments, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.NamespacesType_AddressSpaceFile_Open_InputArguments, Identifiers.HasProperty, Identifiers.NamespacesType_AddressSpaceFile_Open.expanded(), false));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=297</Identifier> </TypeId><Body><Argument><Name>Mode</Name><DataType><Identifier>i=3</Identifier> </DataType><ValueRank>-1</ValueRank><ArrayDimensions/> </Argument> </Body> </ExtensionObject> </ListOfExtensionObject>");<NEW_LINE>String xml = sb.toString();<NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).<MASK><NEW_LINE>Object o = decoder.readVariantValue();<NEW_LINE>DataValue value = new DataValue(new Variant(o));<NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
|
setInput(new StringReader(xml));
|
1,167,720
|
public ApiResponse<MediaShare> mediaSharesGetByIdWithHttpInfo(String id) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'id' when calling mediaSharesGetById");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/mediashares/{id}".replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams <MASK><NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json", "text/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<MediaShare> localVarReturnType = new GenericType<MediaShare>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
|
= new ArrayList<Pair>();
|
1,461,030
|
protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>// Hack for STR Rx, =0xSOMEADDR<NEW_LINE>IOperandTreeNode registerOperand2 = null;<NEW_LINE>if ((instruction.getOperands().get(1).getRootNode().getChildren().get(0).getChildren().get(0).getType() == ExpressionType.IMMEDIATE_INTEGER) || (instruction.getOperands().get(1).getRootNode().getChildren().get(0).getChildren().get(0).getType() == ExpressionType.REGISTER)) {<NEW_LINE>registerOperand2 = instruction.getOperands().get(1).getRootNode().getChildren().get(0).getChildren().get(0);<NEW_LINE>} else {<NEW_LINE>registerOperand2 = instruction.getOperands().get(1).getRootNode().getChildren().get(0).getChildren().get(0).getChildren().get(0);<NEW_LINE>}<NEW_LINE>IOperandTreeNode variableOperand1 = null;<NEW_LINE>if (instruction.getOperands().get(1).getRootNode().getChildren().get(0).getChildren().get(0).getChildren().size() == 2) {<NEW_LINE>variableOperand1 = instruction.getOperands().get(1).getRootNode().getChildren().get(0).getChildren().get(0).getChildren().get(1);<NEW_LINE>}<NEW_LINE>final String targetRegister1 = (registerOperand1.getValue());<NEW_LINE>final String sourceRegister2 = (registerOperand2.getValue());<NEW_LINE>final String sourceVariable1 = variableOperand1 == null ? "0" <MASK><NEW_LINE>final OperandSize dw = OperandSize.DWORD;<NEW_LINE>final OperandSize wd = OperandSize.WORD;<NEW_LINE>long baseOffset = (instruction.getAddress().toLong() * 0x100) + instructions.size();<NEW_LINE>final String tmpAddress = environment.getNextVariableString();<NEW_LINE>instructions.add(ReilHelpers.createAdd(baseOffset++, dw, sourceRegister2, dw, sourceVariable1, dw, tmpAddress));<NEW_LINE>instructions.add(ReilHelpers.createLdm(baseOffset++, dw, tmpAddress, wd, targetRegister1));<NEW_LINE>}
|
: (variableOperand1.getValue());
|
1,711,693
|
protected Class<? extends T>[] expand(final Class<? extends T>[] actionWrappers) {<NEW_LINE>if (actionWrappers == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<Class<? extends T>> list = new ArrayList<>(actionWrappers.length);<NEW_LINE>list.addAll(Arrays.asList(actionWrappers));<NEW_LINE>int i = 0;<NEW_LINE>while (i < list.size()) {<NEW_LINE>Class<? extends T> wrapperClass = list.get(i);<NEW_LINE>if (wrapperClass == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (ClassUtil.isTypeOf(wrapperClass, BaseActionWrapperStack.class)) {<NEW_LINE>BaseActionWrapperStack stack = (BaseActionWrapperStack) resolve(wrapperClass);<NEW_LINE>list.remove(i);<NEW_LINE>Class<? extends T>[] stackWrappers = stack.getWrappers();<NEW_LINE>if (stackWrappers != null) {<NEW_LINE>list.addAll(i<MASK><NEW_LINE>}<NEW_LINE>i--;<NEW_LINE>// continue;<NEW_LINE>}<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>return list.toArray(new Class[0]);<NEW_LINE>}
|
, Arrays.asList(stackWrappers));
|
1,139,432
|
public void transformAttribute(@NotNull DBCSession session, @NotNull DBDAttributeBinding attribute, @NotNull List<Object[]> rows, @NotNull Map<String, Object> options) throws DBException {<NEW_LINE>int radix = 16;<NEW_LINE>int bits = 32;<NEW_LINE>boolean showPrefix = false;<NEW_LINE>boolean unsigned = false;<NEW_LINE>if (options.containsKey(PROP_RADIX)) {<NEW_LINE>radix = CommonUtils.toInt(options.get(PROP_RADIX), radix);<NEW_LINE>}<NEW_LINE>if (options.containsKey(PROP_BITS)) {<NEW_LINE>bits = CommonUtils.toInt(options<MASK><NEW_LINE>}<NEW_LINE>if (options.containsKey(PROP_PREFIX)) {<NEW_LINE>showPrefix = CommonUtils.getBoolean(options.get(PROP_PREFIX), showPrefix);<NEW_LINE>}<NEW_LINE>if (options.containsKey(PROP_UNSIGNED)) {<NEW_LINE>unsigned = CommonUtils.getBoolean(options.get(PROP_UNSIGNED), unsigned);<NEW_LINE>}<NEW_LINE>attribute.setTransformHandler(new RadixValueHandler(attribute.getValueHandler(), radix, bits, showPrefix, unsigned));<NEW_LINE>attribute.setPresentationAttribute(new TransformerPresentationAttribute(attribute, "StringNumber", -1, DBPDataKind.STRING));<NEW_LINE>}
|
.get(PROP_BITS), bits);
|
1,777,829
|
final CreateHsmResult executeCreateHsm(CreateHsmRequest createHsmRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createHsmRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateHsmRequest> request = null;<NEW_LINE>Response<CreateHsmResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateHsmRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createHsmRequest));<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, "CloudHSM V2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateHsm");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateHsmResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateHsmResultJsonUnmarshaller());<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());
|
212,665
|
GF256Poly[] divide(GF256Poly other) {<NEW_LINE>if (!field.equals(other.field)) {<NEW_LINE>throw new IllegalArgumentException("GF256Polys do not have same GF256 field");<NEW_LINE>}<NEW_LINE>if (other.isZero()) {<NEW_LINE>throw new IllegalArgumentException("Divide by 0");<NEW_LINE>}<NEW_LINE>GF256Poly quotient = field.getZero();<NEW_LINE>GF256Poly remainder = this;<NEW_LINE>int denominatorLeadingTerm = other.getCoefficient(other.getDegree());<NEW_LINE>int inverseDenominatorLeadingTerm = field.inverse(denominatorLeadingTerm);<NEW_LINE>while (remainder.getDegree() >= other.getDegree() && !remainder.isZero()) {<NEW_LINE>int degreeDifference = remainder.getDegree() - other.getDegree();<NEW_LINE>int scale = field.multiply(remainder.getCoefficient(remainder.getDegree()), inverseDenominatorLeadingTerm);<NEW_LINE>GF256Poly term = <MASK><NEW_LINE>GF256Poly iterationQuotient = field.buildMonomial(degreeDifference, scale);<NEW_LINE>quotient = quotient.addOrSubtract(iterationQuotient);<NEW_LINE>remainder = remainder.addOrSubtract(term);<NEW_LINE>}<NEW_LINE>return new GF256Poly[] { quotient, remainder };<NEW_LINE>}
|
other.multiplyByMonomial(degreeDifference, scale);
|
1,245,129
|
public Builder mergeFrom(io.kubernetes.client.proto.V1Policy.PodDisruptionBudgetStatus other) {<NEW_LINE>if (other == io.kubernetes.client.proto.V1Policy.PodDisruptionBudgetStatus.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasObservedGeneration()) {<NEW_LINE>setObservedGeneration(other.getObservedGeneration());<NEW_LINE>}<NEW_LINE>internalGetMutableDisruptedPods().mergeFrom(other.internalGetDisruptedPods());<NEW_LINE>if (other.hasDisruptionsAllowed()) {<NEW_LINE>setDisruptionsAllowed(other.getDisruptionsAllowed());<NEW_LINE>}<NEW_LINE>if (other.hasCurrentHealthy()) {<NEW_LINE>setCurrentHealthy(other.getCurrentHealthy());<NEW_LINE>}<NEW_LINE>if (other.hasDesiredHealthy()) {<NEW_LINE>setDesiredHealthy(other.getDesiredHealthy());<NEW_LINE>}<NEW_LINE>if (other.hasExpectedPods()) {<NEW_LINE>setExpectedPods(other.getExpectedPods());<NEW_LINE>}<NEW_LINE>if (conditionsBuilder_ == null) {<NEW_LINE>if (!other.conditions_.isEmpty()) {<NEW_LINE>if (conditions_.isEmpty()) {<NEW_LINE>conditions_ = other.conditions_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000040);<NEW_LINE>} else {<NEW_LINE>ensureConditionsIsMutable();<NEW_LINE>conditions_.addAll(other.conditions_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.conditions_.isEmpty()) {<NEW_LINE>if (conditionsBuilder_.isEmpty()) {<NEW_LINE>conditionsBuilder_.dispose();<NEW_LINE>conditionsBuilder_ = null;<NEW_LINE>conditions_ = other.conditions_;<NEW_LINE><MASK><NEW_LINE>conditionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConditionsFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>conditionsBuilder_.addAllMessages(other.conditions_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
|
bitField0_ = (bitField0_ & ~0x00000040);
|
1,595,683
|
private String CYPHER_MIN_CARDINALITY1_V_SUFF() {<NEW_LINE>return "NOT %s ( size((focus)-[:`%s`]->()) + size([] + coalesce(focus.`%s`, [])) ) RETURN " + (nodesAreUriIdentified() ? " focus.uri " : " id(focus) ") + " as nodeId, " + (shallIShorten() ? "n10s.rdf.fullUriFromShortForm('%s')" : " '%s' ") + " as nodeType, '%s' as shapeId, '" + SHACL.MIN_COUNT_CONSTRAINT_COMPONENT + "' as propertyShape, 'cardinality (' + (coalesce(size((focus)-[:`%s`]->()),0) + coalesce(size([] + focus.`%s`),0)) + ') too low' as message, " + (shallIShorten() ? <MASK><NEW_LINE>}
|
"n10s.rdf.fullUriFromShortForm('%s')" : " '%s' ") + " as propertyName, '%s' as severity, " + "null as offendingValue ";
|
922,070
|
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>jLabel1 = new javax.swing.JLabel();<NEW_LINE>beanClassTextField = new javax.swing.JTextField();<NEW_LINE>spacerLabel = new javax.swing.JLabel();<NEW_LINE>beanClassLinkButton = new javax.swing.JButton();<NEW_LINE>setLayout(new java.awt.GridBagLayout());<NEW_LINE>jLabel1.setLabelFor(beanClassTextField);<NEW_LINE>// NOI18N<NEW_LINE>jLabel1.setText(org.openide.util.NbBundle.getMessage(MdbImplementationForm.class, "LBL_BeanClass"));<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 0;<NEW_LINE>gridBagConstraints.gridy = 0;<NEW_LINE>gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;<NEW_LINE>gridBagConstraints.anchor <MASK><NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 12);<NEW_LINE>add(jLabel1, gridBagConstraints);<NEW_LINE>beanClassTextField.setColumns(35);<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 1;<NEW_LINE>gridBagConstraints.gridy = 0;<NEW_LINE>gridBagConstraints.gridwidth = 2;<NEW_LINE>gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;<NEW_LINE>gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;<NEW_LINE>gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 12);<NEW_LINE>add(beanClassTextField, gridBagConstraints);<NEW_LINE>// NOI18N<NEW_LINE>beanClassTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(MdbImplementationForm.class, "ACSD_Bean_Class"));<NEW_LINE>spacerLabel.setText(" ");<NEW_LINE>gridBagConstraints = new java.awt.GridBagConstraints();<NEW_LINE>gridBagConstraints.gridx = 4;<NEW_LINE>gridBagConstraints.gridy = 2;<NEW_LINE>gridBagConstraints.weightx = 1.0;<NEW_LINE>gridBagConstraints.weighty = 1.0;<NEW_LINE>add(spacerLabel, gridBagConstraints);<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(beanClassLinkButton, org.openide.util.NbBundle.getMessage(MdbImplementationForm.class, "LBL_GoToSource"));<NEW_LINE>beanClassLinkButton.setBorderPainted(false);<NEW_LINE>beanClassLinkButton.setContentAreaFilled(false);<NEW_LINE>beanClassLinkButton.setFocusPainted(false);<NEW_LINE>beanClassLinkButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);<NEW_LINE>add(beanClassLinkButton, new java.awt.GridBagConstraints());<NEW_LINE>// NOI18N<NEW_LINE>beanClassLinkButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(MdbImplementationForm.class, "ACSD_GoToSource"));<NEW_LINE>}
|
= java.awt.GridBagConstraints.WEST;
|
845,914
|
public static String checksum(Algorithm algorithm, byte[] data) throws IOException {<NEW_LINE>switch(algorithm) {<NEW_LINE>case MD2:<NEW_LINE>return DigestUtils.md2Hex(data);<NEW_LINE>case MD5:<NEW_LINE>return DigestUtils.md5Hex(data);<NEW_LINE>case RMD160:<NEW_LINE>RIPEMD160Digest digest = new RIPEMD160Digest();<NEW_LINE>byte[] output = new byte[digest.getDigestSize()];<NEW_LINE>digest.update(data, 0, data.length);<NEW_LINE><MASK><NEW_LINE>return Hex.encodeHexString(output);<NEW_LINE>case SHA_1:<NEW_LINE>return DigestUtils.sha1Hex(data);<NEW_LINE>case SHA_256:<NEW_LINE>return DigestUtils.sha256Hex(data);<NEW_LINE>case SHA_384:<NEW_LINE>return DigestUtils.sha384Hex(data);<NEW_LINE>case SHA_512:<NEW_LINE>return DigestUtils.sha512Hex(data);<NEW_LINE>case SHA3_224:<NEW_LINE>return DigestUtils.sha3_224Hex(data);<NEW_LINE>case SHA3_256:<NEW_LINE>return DigestUtils.sha3_256Hex(data);<NEW_LINE>case SHA3_384:<NEW_LINE>return DigestUtils.sha3_384Hex(data);<NEW_LINE>case SHA3_512:<NEW_LINE>return DigestUtils.sha3_512Hex(data);<NEW_LINE>default:<NEW_LINE>throw new IOException(RB.$("ERROR_unsupported_algorithm", algorithm.name()));<NEW_LINE>}<NEW_LINE>}
|
digest.doFinal(output, 0);
|
1,564,424
|
// Cleanup: private<NEW_LINE>public String postJsonToServer(String stringUrl, String data, String userId) throws Exception {<NEW_LINE>Utils.printLog(context, TAG, "Calling url (POST) with exception: " + stringUrl);<NEW_LINE>Utils.printLog(context, TAG, "(POST) Json: " + data);<NEW_LINE>Utils.printLog(<MASK><NEW_LINE>HttpURLConnection connection;<NEW_LINE>URL url = new URL(stringUrl);<NEW_LINE>connection = (HttpURLConnection) url.openConnection();<NEW_LINE>connection.setRequestMethod("POST");<NEW_LINE>connection.setRequestProperty("Content-Type", "application/json");<NEW_LINE>connection.setDoInput(true);<NEW_LINE>connection.setDoOutput(true);<NEW_LINE>addGlobalHeaders(connection, userId);<NEW_LINE>connection.connect();<NEW_LINE>byte[] dataBytes = data.getBytes("UTF-8");<NEW_LINE>DataOutputStream os = new DataOutputStream(connection.getOutputStream());<NEW_LINE>os.write(dataBytes);<NEW_LINE>os.flush();<NEW_LINE>os.close();<NEW_LINE>BufferedReader br = null;<NEW_LINE>if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {<NEW_LINE>InputStream inputStream = connection.getInputStream();<NEW_LINE>br = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));<NEW_LINE>} else {<NEW_LINE>Utils.printLog(context, TAG, "Response code for (POST) json is :" + connection.getResponseCode());<NEW_LINE>}<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>try {<NEW_LINE>String line;<NEW_LINE>if (br != null) {<NEW_LINE>while ((line = br.readLine()) != null) {<NEW_LINE>sb.append(line);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (Throwable e) {<NEW_LINE>} finally {<NEW_LINE>if (br != null) {<NEW_LINE>br.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Utils.printLog(context, TAG, "Response (POST): " + sb.toString());<NEW_LINE>return sb.toString();<NEW_LINE>}
|
context, TAG, "(POST) User Id: " + userId);
|
1,576,949
|
final GetCachePolicyResult executeGetCachePolicy(GetCachePolicyRequest getCachePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCachePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetCachePolicyRequest> request = null;<NEW_LINE>Response<GetCachePolicyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetCachePolicyRequestMarshaller().marshall(super.beforeMarshalling(getCachePolicyRequest));<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, "CloudFront");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<GetCachePolicyResult> responseHandler = new StaxResponseHandler<GetCachePolicyResult>(new GetCachePolicyResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
|
addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCachePolicy");
|
1,274,787
|
public static ClientMessage encodeRequest(long jobId, int terminateMode, @Nullable java.util.UUID lightJobCoordinator) {<NEW_LINE><MASK><NEW_LINE>clientMessage.setRetryable(false);<NEW_LINE>clientMessage.setOperationName("Jet.TerminateJob");<NEW_LINE>ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[REQUEST_INITIAL_FRAME_SIZE], UNFRAGMENTED_MESSAGE);<NEW_LINE>encodeInt(initialFrame.content, TYPE_FIELD_OFFSET, REQUEST_MESSAGE_TYPE);<NEW_LINE>encodeInt(initialFrame.content, PARTITION_ID_FIELD_OFFSET, -1);<NEW_LINE>encodeLong(initialFrame.content, REQUEST_JOB_ID_FIELD_OFFSET, jobId);<NEW_LINE>encodeInt(initialFrame.content, REQUEST_TERMINATE_MODE_FIELD_OFFSET, terminateMode);<NEW_LINE>encodeUUID(initialFrame.content, REQUEST_LIGHT_JOB_COORDINATOR_FIELD_OFFSET, lightJobCoordinator);<NEW_LINE>clientMessage.add(initialFrame);<NEW_LINE>return clientMessage;<NEW_LINE>}
|
ClientMessage clientMessage = ClientMessage.createForEncode();
|
947,080
|
public void writeTo(StreamOutput out) throws IOException {<NEW_LINE>out.writeOptionalString(docId);<NEW_LINE>out.writeString(name);<NEW_LINE>out.writeString(entityId);<NEW_LINE>out.writeString(acs);<NEW_LINE>out.writeBoolean(enabled);<NEW_LINE>out.writeInstant(created);<NEW_LINE>out.writeInstant(lastModified);<NEW_LINE>out.writeOptionalString(nameIdFormat);<NEW_LINE>out.writeOptionalVLong(authenticationExpiryMillis);<NEW_LINE>out.writeString(privileges.resource);<NEW_LINE>out.writeStringCollection(privileges.rolePatterns == null ? Set.of() : privileges.rolePatterns);<NEW_LINE>out.writeString(attributeNames.principal);<NEW_LINE>out.writeOptionalString(attributeNames.email);<NEW_LINE>out.writeOptionalString(attributeNames.name);<NEW_LINE><MASK><NEW_LINE>out.writeStringCollection(certificates.serviceProviderSigning);<NEW_LINE>out.writeStringCollection(certificates.identityProviderSigning);<NEW_LINE>out.writeStringCollection(certificates.identityProviderMetadataSigning);<NEW_LINE>}
|
out.writeOptionalString(attributeNames.roles);
|
103,887
|
protected RestChannelConsumer prepareRequest(RestRequest restRequest, NodeClient client) throws IOException {<NEW_LINE>String jobId = restRequest.param(Job.ID.getPreferredName());<NEW_LINE>String snapshotId = restRequest.param(SNAPSHOT_ID.getPreferredName());<NEW_LINE>RevertModelSnapshotAction.Request request;<NEW_LINE>if (restRequest.hasContentOrSourceParam()) {<NEW_LINE>XContentParser parser = restRequest.contentOrSourceParamParser();<NEW_LINE>request = RevertModelSnapshotAction.Request.parseRequest(jobId, snapshotId, parser);<NEW_LINE>} else {<NEW_LINE>request = new RevertModelSnapshotAction.Request(jobId, snapshotId);<NEW_LINE>request.setDeleteInterveningResults(restRequest.paramAsBoolean(RevertModelSnapshotAction.Request.DELETE_INTERVENING.getPreferredName(), DELETE_INTERVENING_DEFAULT));<NEW_LINE>}<NEW_LINE>request.timeout(restRequest.paramAsTime("timeout", request.timeout()));<NEW_LINE>request.masterNodeTimeout(restRequest.paramAsTime("master_timeout", request.masterNodeTimeout()));<NEW_LINE>return channel -> client.execute(RevertModelSnapshotAction.INSTANCE, request, <MASK><NEW_LINE>}
|
new RestStatusToXContentListener<>(channel));
|
581,273
|
public boolean exists() {<NEW_LINE>try {<NEW_LINE>final String protocol = url.getProtocol();<NEW_LINE>if (StringUtils.isNotEmpty(protocol) && ("file".equalsIgnoreCase(protocol) || protocol.startsWith("vfs"))) {<NEW_LINE>try {<NEW_LINE>return new File(url.toURI().getSchemeSpecificPart()).exists();<NEW_LINE>} catch (URISyntaxException ex) {<NEW_LINE>return new File(url.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>URLConnection con = url.openConnection();<NEW_LINE>con.setUseCaches(true);<NEW_LINE>final boolean isHttp = con instanceof HttpURLConnection;<NEW_LINE>if (isHttp) {<NEW_LINE>final HttpURLConnection httpURLConnection = (HttpURLConnection) con;<NEW_LINE>httpURLConnection.setRequestMethod("HEAD");<NEW_LINE>int code = httpURLConnection.getResponseCode();<NEW_LINE>if (code == HttpURLConnection.HTTP_OK) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (code == HttpURLConnection.HTTP_NOT_FOUND) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (con.getContentLengthLong() >= 0) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (isHttp) {<NEW_LINE>// No HTTP OK status, and no content-length header: give up<NEW_LINE>((HttpURLConnection) con).disconnect();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Fall back to stream existence: can we open the stream?<NEW_LINE>asInputStream().close();<NEW_LINE>return true;<NEW_LINE>} catch (IOException ex) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
|
getFile()).exists();
|
306,155
|
public okhttp3.Call connectGetNamespacedPodProxyCall(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}/pods/{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 <MASK><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, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
|
String[] localVarAccepts = { "*/*" };
|
1,568,409
|
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller != null) {<NEW_LINE>Target target1 = new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(), true);<NEW_LINE>Target target2 = new TargetOpponent(true);<NEW_LINE>if (target1.canChoose(controller.getId(), source, game)) {<NEW_LINE>while (!target1.isChosen() && target1.canChoose(controller.getId(), source, game) && controller.canRespond()) {<NEW_LINE>controller.chooseTarget(outcome, target1, source, game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (target2.canChoose(controller.getId(), source, game)) {<NEW_LINE>while (!target2.isChosen() && target2.canChoose(controller.getId(), source, game) && controller.canRespond()) {<NEW_LINE>controller.chooseTarget(outcome, target2, source, game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Permanent permanent = game.getPermanent(target1.getFirstTarget());<NEW_LINE>Player chosenOpponent = game.getPlayer(target2.getFirstTarget());<NEW_LINE>if (!controller.flipCoin(source, game, true)) {<NEW_LINE>if (permanent != null && chosenOpponent != null) {<NEW_LINE>ContinuousEffect effect = new RiskyMoveCreatureGainControlEffect(Duration.EndOfGame, chosenOpponent.getId());<NEW_LINE>effect.setTargetPointer(<MASK><NEW_LINE>game.addEffect(effect, source);<NEW_LINE>game.informPlayers(chosenOpponent.getLogName() + " has gained control of " + permanent.getLogName());<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
|
new FixedTarget(permanent, game));
|
1,164,388
|
IndexedDigest H_msg(byte[] prf, byte[] pkSeed, byte[] pkRoot, byte[] message) {<NEW_LINE>int forsMsgBytes = ((A <MASK><NEW_LINE>int leafBits = H / D;<NEW_LINE>int treeBits = H - leafBits;<NEW_LINE>int leafBytes = (leafBits + 7) / 8;<NEW_LINE>int treeBytes = (treeBits + 7) / 8;<NEW_LINE>int m = forsMsgBytes + leafBytes + treeBytes;<NEW_LINE>byte[] out = new byte[m];<NEW_LINE>byte[] dig = new byte[msgDigest.getDigestSize()];<NEW_LINE>msgDigest.update(prf, 0, prf.length);<NEW_LINE>msgDigest.update(pkSeed, 0, pkSeed.length);<NEW_LINE>msgDigest.update(pkRoot, 0, pkRoot.length);<NEW_LINE>msgDigest.update(message, 0, message.length);<NEW_LINE>msgDigest.doFinal(dig, 0);<NEW_LINE>out = bitmask(Arrays.concatenate(prf, pkSeed, dig), out);<NEW_LINE>// tree index<NEW_LINE>// currently, only indexes up to 64 bits are supported<NEW_LINE>byte[] treeIndexBuf = new byte[8];<NEW_LINE>System.arraycopy(out, forsMsgBytes, treeIndexBuf, 8 - treeBytes, treeBytes);<NEW_LINE>long treeIndex = Pack.bigEndianToLong(treeIndexBuf, 0);<NEW_LINE>treeIndex &= (~0L) >>> (64 - treeBits);<NEW_LINE>byte[] leafIndexBuf = new byte[4];<NEW_LINE>System.arraycopy(out, forsMsgBytes + treeBytes, leafIndexBuf, 4 - leafBytes, leafBytes);<NEW_LINE>int leafIndex = Pack.bigEndianToInt(leafIndexBuf, 0);<NEW_LINE>leafIndex &= (~0) >>> (32 - leafBits);<NEW_LINE>return new IndexedDigest(treeIndex, leafIndex, Arrays.copyOfRange(out, 0, forsMsgBytes));<NEW_LINE>}
|
* K) + 7) / 8;
|
1,186,140
|
static boolean performAction(ActionEvent e) {<NEW_LINE>ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID<MASK><NEW_LINE>GuiPackage guiPackage = GuiPackage.getInstance();<NEW_LINE>if (guiPackage.isDirty()) {<NEW_LINE>int response;<NEW_LINE>if ((response = // $NON-NLS-1$<NEW_LINE>JOptionPane.// $NON-NLS-1$<NEW_LINE>showConfirmDialog(// $NON-NLS-1$<NEW_LINE>GuiPackage.getInstance().getMainFrame(), // $NON-NLS-1$<NEW_LINE>JMeterUtils.getResString("cancel_new_to_save"), JMeterUtils.getResString("save?"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE)) == JOptionPane.YES_OPTION) {<NEW_LINE>ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.SAVE));<NEW_LINE>// the user might cancel the file chooser dialog<NEW_LINE>// in this case we should not close the test plan<NEW_LINE>if (guiPackage.isDirty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (response == JOptionPane.CLOSED_OPTION || response == JOptionPane.CANCEL_OPTION) {<NEW_LINE>// Don't clear the plan<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.STOP_THREAD));<NEW_LINE>closeProject(e);<NEW_LINE>return true;<NEW_LINE>}
|
(), ActionNames.CHECK_DIRTY));
|
1,528,264
|
private void handleStrimziOAuth(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {<NEW_LINE>if (!QuarkusClassLoader.isClassPresentAtRuntime("io.strimzi.kafka.oauth.client.JaasClientOauthLoginCallbackHandler")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>reflectiveClass.produce(new ReflectiveClassBuildItem(true<MASK><NEW_LINE>reflectiveClass.produce(new ReflectiveClassBuildItem(true, true, true, "org.keycloak.jose.jws.JWSHeader", "org.keycloak.representations.AccessToken", "org.keycloak.representations.AccessToken$Access", "org.keycloak.representations.AccessTokenResponse", "org.keycloak.representations.IDToken", "org.keycloak.representations.JsonWebToken", "org.keycloak.jose.jwk.JSONWebKeySet", "org.keycloak.jose.jwk.JWK", "org.keycloak.json.StringOrArrayDeserializer", "org.keycloak.json.StringListMapDeserializer"));<NEW_LINE>}
|
, true, true, "io.strimzi.kafka.oauth.client.JaasClientOauthLoginCallbackHandler"));
|
1,499,639
|
public void serialize(InfoflowResults results, String fileName) throws XMLStreamException, IOException {<NEW_LINE>this.startTime = System.currentTimeMillis();<NEW_LINE>try (OutputStream out = new FileOutputStream(fileName)) {<NEW_LINE>XMLOutputFactory factory = XMLOutputFactory.newInstance();<NEW_LINE>XMLStreamWriter writer = factory.createXMLStreamWriter(out, "UTF-8");<NEW_LINE>writer.writeStartDocument("UTF-8", "1.0");<NEW_LINE>writer.writeStartElement(XmlConstants.Tags.root);<NEW_LINE>writer.writeAttribute(XmlConstants.Attributes.fileFormatVersion, FILE_FORMAT_VERSION + "");<NEW_LINE>writer.writeAttribute(XmlConstants.Attributes.terminationState, terminationStateToString(results.getTerminationState()));<NEW_LINE>// Write out the data flow results<NEW_LINE>if (results != null && !results.isEmpty()) {<NEW_LINE>writer.writeStartElement(XmlConstants.Tags.results);<NEW_LINE>writeDataFlows(results, writer);<NEW_LINE>writer.writeEndElement();<NEW_LINE>}<NEW_LINE>// Write out performance data<NEW_LINE>InfoflowPerformanceData performanceData = results.getPerformanceData();<NEW_LINE>if (performanceData != null && !performanceData.isEmpty()) {<NEW_LINE>writer.<MASK><NEW_LINE>writePerformanceData(performanceData, writer);<NEW_LINE>writer.writeEndElement();<NEW_LINE>}<NEW_LINE>writer.writeEndDocument();<NEW_LINE>writer.close();<NEW_LINE>}<NEW_LINE>}
|
writeStartElement(XmlConstants.Tags.performanceData);
|
677,901
|
public boolean extractFrom(@Nonnull AdvancedGasConduit advancedGasConduit, @Nonnull EnumFacing dir, int maxExtractPerTick) {<NEW_LINE>if (tank.isFull()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>IGasHandler extTank = getTankContainer(advancedGasConduit, dir);<NEW_LINE>if (extTank != null) {<NEW_LINE>int maxExtract = Math.min(maxExtractPerTick, tank.getNeeded());<NEW_LINE>if (gasType == null || !tank.containsValidGas()) {<NEW_LINE>GasStack newGas = GasUtil.getGasStack(extTank, dir.getOpposite());<NEW_LINE>if (newGas == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>setGasType(newGas);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>couldDrain.amount = maxExtract;<NEW_LINE>GasStack drained = extTank.drawGas(dir, couldDrain.amount, true);<NEW_LINE>if (drained == null || drained.amount == 0) {<NEW_LINE>return false;<NEW_LINE>} else if (drained.isGasEqual(getGasType())) {<NEW_LINE>tank.addAmount(drained.amount);<NEW_LINE>} else {<NEW_LINE>extTank.receiveGas(dir, drained, true);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
|
GasStack couldDrain = gasType.copy();
|
1,421,014
|
public static DescribeLifecycleHooksResponse unmarshall(DescribeLifecycleHooksResponse describeLifecycleHooksResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeLifecycleHooksResponse.setRequestId<MASK><NEW_LINE>describeLifecycleHooksResponse.setTotalCount(_ctx.integerValue("DescribeLifecycleHooksResponse.TotalCount"));<NEW_LINE>describeLifecycleHooksResponse.setPageNumber(_ctx.integerValue("DescribeLifecycleHooksResponse.PageNumber"));<NEW_LINE>describeLifecycleHooksResponse.setPageSize(_ctx.integerValue("DescribeLifecycleHooksResponse.PageSize"));<NEW_LINE>List<LifecycleHook> lifecycleHooks = new ArrayList<LifecycleHook>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeLifecycleHooksResponse.LifecycleHooks.Length"); i++) {<NEW_LINE>LifecycleHook lifecycleHook = new LifecycleHook();<NEW_LINE>lifecycleHook.setScalingGroupId(_ctx.stringValue("DescribeLifecycleHooksResponse.LifecycleHooks[" + i + "].ScalingGroupId"));<NEW_LINE>lifecycleHook.setLifecycleHookId(_ctx.stringValue("DescribeLifecycleHooksResponse.LifecycleHooks[" + i + "].LifecycleHookId"));<NEW_LINE>lifecycleHook.setLifecycleHookName(_ctx.stringValue("DescribeLifecycleHooksResponse.LifecycleHooks[" + i + "].LifecycleHookName"));<NEW_LINE>lifecycleHook.setDefaultResult(_ctx.stringValue("DescribeLifecycleHooksResponse.LifecycleHooks[" + i + "].DefaultResult"));<NEW_LINE>lifecycleHook.setHeartbeatTimeout(_ctx.integerValue("DescribeLifecycleHooksResponse.LifecycleHooks[" + i + "].HeartbeatTimeout"));<NEW_LINE>lifecycleHook.setLifecycleTransition(_ctx.stringValue("DescribeLifecycleHooksResponse.LifecycleHooks[" + i + "].LifecycleTransition"));<NEW_LINE>lifecycleHook.setNotificationMetadata(_ctx.stringValue("DescribeLifecycleHooksResponse.LifecycleHooks[" + i + "].NotificationMetadata"));<NEW_LINE>lifecycleHook.setNotificationArn(_ctx.stringValue("DescribeLifecycleHooksResponse.LifecycleHooks[" + i + "].NotificationArn"));<NEW_LINE>lifecycleHooks.add(lifecycleHook);<NEW_LINE>}<NEW_LINE>describeLifecycleHooksResponse.setLifecycleHooks(lifecycleHooks);<NEW_LINE>return describeLifecycleHooksResponse;<NEW_LINE>}
|
(_ctx.stringValue("DescribeLifecycleHooksResponse.RequestId"));
|
845,303
|
public PutDestinationResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PutDestinationResult putDestinationResult = new PutDestinationResult();<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 putDestinationResult;<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("destination", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>putDestinationResult.setDestination(DestinationJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return putDestinationResult;<NEW_LINE>}
|
JsonToken token = context.getCurrentToken();
|
1,363,865
|
protected void onInit(JsObject value) {<NEW_LINE>if (value != null) {<NEW_LINE>BreakpointState state = value.cast();<NEW_LINE>// restore all of the breakpoints<NEW_LINE>JsArray<Breakpoint> breakpoints = state.getPersistedBreakpoints();<NEW_LINE>for (int idx = 0; idx < breakpoints.length(); idx++) {<NEW_LINE>Breakpoint breakpoint = breakpoints.get(idx);<NEW_LINE>// make sure the next breakpoint we create after a restore<NEW_LINE>// has a value larger than any existing breakpoint<NEW_LINE>currentBreakpointId_ = Math.max(currentBreakpointId_, breakpoint.getBreakpointId() + 1);<NEW_LINE>addBreakpoint(breakpoint);<NEW_LINE>}<NEW_LINE>// this initialization happens after the source windows are<NEW_LINE>// up, so fire an event to the editor to show all known<NEW_LINE>// breakpoints. as new source windows are opened, they will<NEW_LINE>// call getBreakpointsInFile to populate themselves.<NEW_LINE>events_.fireEvent(<MASK><NEW_LINE>}<NEW_LINE>}
|
new BreakpointsSavedEvent(breakpoints_, true));
|
36,728
|
public static void main(String[] args) throws InterruptedException {<NEW_LINE>PolicyUpdaterConfiguration configuration = null;<NEW_LINE>try {<NEW_LINE>configuration = new PolicyUpdaterConfiguration();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOG.error("Unable to create configuration object: {}", ex.getMessage());<NEW_LINE>System.exit(ZPUExitCode.CONFIG_CREATE_FAILURE.getCode());<NEW_LINE>}<NEW_LINE>Random randomGenerator = new Random();<NEW_LINE>if (configuration.getStartupDelayIntervalInSecs() > 0) {<NEW_LINE>int randomSleepInterval = randomGenerator.nextInt(configuration.getStartupDelayIntervalInSecs());<NEW_LINE>LOG.info("Launching zpe_policy_updater in {} seconds...", randomSleepInterval);<NEW_LINE>for (int i = 0; i < randomSleepInterval; i++) {<NEW_LINE>Thread.sleep(1000);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LOG.info("Launching zpe_policy_updater with no delay...");<NEW_LINE>}<NEW_LINE>ZPUExitCode exitCode = ZPUExitCode.SUCCESS;<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>configuration.init(null, null);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOG.error("Unable to initialize configuration object: {}", ex.getMessage());<NEW_LINE>exitCode = ZPUExitCode.CONFIG_INIT_FAILURE;<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>PolicyUpdater.policyUpdater(configuration, new ZTSClientFactoryImpl());<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOG.error("PolicyUpdater: Unable to update policy data: {}", ex.getMessage());<NEW_LINE>exitCode = ZPUExitCode.POLICY_UPDATE_FAILURE;<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>} catch (Exception exc) {<NEW_LINE>LOG.error(<MASK><NEW_LINE>} finally {<NEW_LINE>System.exit(exitCode.getCode());<NEW_LINE>}<NEW_LINE>}
|
"PolicyUpdater: Exiting upon error: {}", exc.getMessage());
|
1,558,033
|
// searches subdirectories under the given directory for plugin directories<NEW_LINE>private static Set<Bundle> findBundles(final Path directory, String type) throws IOException {<NEW_LINE>final Set<Bundle> bundles = new HashSet<>();<NEW_LINE>for (final Path plugin : findPluginDirs(directory)) {<NEW_LINE>final Bundle <MASK><NEW_LINE>if (bundles.add(bundle) == false) {<NEW_LINE>throw new IllegalStateException("duplicate " + type + ": " + bundle.plugin);<NEW_LINE>}<NEW_LINE>if (type.equals("module") && bundle.plugin.getName().startsWith("test-") && Build.CURRENT.isSnapshot() == false) {<NEW_LINE>throw new IllegalStateException("external test module [" + plugin.getFileName() + "] found in non-snapshot build");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>logger.trace(() -> "findBundles(" + type + ") returning: " + bundles.stream().map(b -> b.plugin.getName()).sorted().toList());<NEW_LINE>return bundles;<NEW_LINE>}
|
bundle = readPluginBundle(plugin, type);
|
794,137
|
public void build(ChartBuilder chartBuilder) throws JAXBException, AxelorException {<NEW_LINE>if (chartBuilder.getName().contains(" ")) {<NEW_LINE>throw new AxelorException(TraceBackRepository.CATEGORY_MISSING_FIELD, I18n.get(IExceptionMessage.CHART_BUILDER_1));<NEW_LINE>}<NEW_LINE>searchFields = new ArrayList<String>();<NEW_LINE>// onNewFields = new ArrayList<RecordField>();<NEW_LINE>joins = new ArrayList<String>();<NEW_LINE>categType = "text";<NEW_LINE>String[] queryString = prepareQuery(chartBuilder);<NEW_LINE>// setOnNewAction(chartBuilder);<NEW_LINE>String xml = createXml(chartBuilder, queryString);<NEW_LINE>log.debug("Chart xml: {}", xml);<NEW_LINE>ObjectViews <MASK><NEW_LINE>MetaView metaView = metaService.generateMetaView(chartView.getViews().get(0));<NEW_LINE>if (metaView != null) {<NEW_LINE>chartBuilder.setMetaViewGenerated(metaView);<NEW_LINE>}<NEW_LINE>}
|
chartView = XMLViews.fromXML(xml);
|
248,575
|
public void uploadProject(final Project project, final int version, final File localFile, final File startupDependencies, final User uploader, final String uploaderIPAddr) {<NEW_LINE>byte[] md5 = null;<NEW_LINE>if (!(this.storage instanceof DatabaseStorage)) {<NEW_LINE>md5 = computeHash(localFile);<NEW_LINE>}<NEW_LINE>final ProjectStorageMetadata metadata = new ProjectStorageMetadata(project.getId(), version, uploader.getUserId(), md5, uploaderIPAddr);<NEW_LINE>log.info(String.format("Adding archive to storage. Meta:%s File: %s[%d bytes]", metadata, localFile.getName(), localFile.length()));<NEW_LINE>// TODO spyne: remove hack. Database storage should go through the same flow<NEW_LINE>if (!(this.storage instanceof DatabaseStorage)) {<NEW_LINE>this.projectLoader.addProjectVersion(project.getId(), version, localFile, startupDependencies, uploader.getUserId(), requireNonNull(md5)<MASK><NEW_LINE>log.info(String.format("Added project metadata to DB. Meta:%s File: %s[%d bytes] URI: %s", metadata, localFile.getName(), localFile.length(), resourceId));<NEW_LINE>}<NEW_LINE>}
|
, requireNonNull(resourceId), uploaderIPAddr);
|
1,392,807
|
private void loadNode9() throws IOException, SAXException {<NEW_LINE>DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_BinarySchema_SemanticChangeStructureDataType, new QualifiedName(0, "SemanticChangeStructureDataType"), new LocalizedText("en", "SemanticChangeStructureDataType"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.String, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_SemanticChangeStructureDataType, Identifiers.HasTypeDefinition, Identifiers.DataTypeDescriptionType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_SemanticChangeStructureDataType, Identifiers.HasComponent, Identifiers.OpcUa_BinarySchema.expanded(), false));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<String xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">SemanticChangeStructureDataType</String>");<NEW_LINE>String xml = sb.toString();<NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));<NEW_LINE>Object o = decoder.readVariantValue();<NEW_LINE>DataValue value = new <MASK><NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
|
DataValue(new Variant(o));
|
984,975
|
protected Object singleByteOptimizable(Rope stringRope, Rope patternRope, int offset, @Cached @Shared("stringBytesNode") BytesNode stringBytesNode, @Cached @Shared("patternBytesNode") BytesNode patternBytesNode, @Cached LoopConditionProfile loopProfile) {<NEW_LINE>assert offset >= 0;<NEW_LINE>assert offset + patternRope.byteLength() <= stringRope.byteLength() : "already checked in the caller, String#index";<NEW_LINE>int p = offset;<NEW_LINE>final int e = stringRope.byteLength();<NEW_LINE>final int pe = patternRope.byteLength();<NEW_LINE>final int l = e - pe + 1;<NEW_LINE>final byte[] stringBytes = stringBytesNode.execute(stringRope);<NEW_LINE>final byte[] <MASK><NEW_LINE>try {<NEW_LINE>for (; loopProfile.inject(p < l); p++) {<NEW_LINE>if (ArrayUtils.regionEquals(stringBytes, p, patternBytes, 0, pe)) {<NEW_LINE>return p;<NEW_LINE>}<NEW_LINE>TruffleSafepoint.poll(this);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>profileAndReportLoopCount(loopProfile, p - offset);<NEW_LINE>}<NEW_LINE>return nil;<NEW_LINE>}
|
patternBytes = patternBytesNode.execute(patternRope);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.