idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,367,204
public List<String> suggestionList(final String query) throws IOException, ExtractionException {<NEW_LINE>final Downloader dl = NewPipe.getDownloader();<NEW_LINE>final List<String> suggestions = new ArrayList<>();<NEW_LINE>final String url = // "firefox" for JSON, 'toolbar' for xml<NEW_LINE>"https://suggestqueries.google.com/complete/search" + "?client=" + "youtube" + "&jsonp=" + "JP" + "&ds=" + "yt" + "&gl=" + URLEncoder.encode(getExtractorContentCountry().getCountryCode(), UTF_8) + "&q=" + URLEncoder.encode(query, UTF_8);<NEW_LINE>final Map<String, List<String>> headers = new HashMap<>();<NEW_LINE>addCookieHeader(headers);<NEW_LINE>String response = dl.get(url, headers, getExtractorLocalization()).responseBody();<NEW_LINE>// trim JSONP part "JP(...)"<NEW_LINE>response = response.substring(3, response.length() - 1);<NEW_LINE>try {<NEW_LINE>final JsonArray collection = JsonParser.array().from(response).getArray(1);<NEW_LINE>for (final Object suggestion : collection) {<NEW_LINE>if (!(suggestion instanceof JsonArray)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final String suggestionStr = ((JsonArray<MASK><NEW_LINE>if (suggestionStr == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>suggestions.add(suggestionStr);<NEW_LINE>}<NEW_LINE>return suggestions;<NEW_LINE>} catch (final JsonParserException e) {<NEW_LINE>throw new ParsingException("Could not parse json response", e);<NEW_LINE>}<NEW_LINE>}
) suggestion).getString(0);
1,295,993
public void testCriteriaQuery_double(TestExecutionContext testExecCtx, TestExecutionResources testExecResources, Object managedComponentObject) throws Throwable {<NEW_LINE>final String testName = getTestName();<NEW_LINE>// Verify parameters<NEW_LINE>if (testExecCtx == null || testExecResources == null) {<NEW_LINE>Assert.fail(testName + ": Missing context and/or resources. Cannot execute the test.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final JPAResource jpaResource = testExecResources.getJpaResourceMap().get("test-jpa-resource");<NEW_LINE>if (jpaResource == null) {<NEW_LINE>Assert.fail("Missing JPAResource 'test-jpa-resource'). Cannot execute the test.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Process Test Properties<NEW_LINE>final Map<String, Serializable> testProps = testExecCtx.getProperties();<NEW_LINE>if (testProps != null) {<NEW_LINE>for (String key : testProps.keySet()) {<NEW_LINE>System.out.println("Test Property: " + key + " = " + testProps.get(key));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>EntityManager em = jpaResource.getEm();<NEW_LINE>TransactionJacket tx = jpaResource.getTj();<NEW_LINE>// Execute Test Case<NEW_LINE>try {<NEW_LINE>tx.beginTransaction();<NEW_LINE>if (jpaResource.getPcCtxInfo().getPcType() == PersistenceContextType.APPLICATION_MANAGED_JTA)<NEW_LINE>em.joinTransaction();<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Entity0006> cq = cb.createQuery(Entity0006.class);<NEW_LINE>Root<Entity0006> root = cq.from(Entity0006.class);<NEW_LINE>cq.select(root);<NEW_LINE>TypedQuery<Entity0006> tq = em.createQuery(cq);<NEW_LINE>Entity0006 findEntity = tq.getSingleResult();<NEW_LINE>System.out.println("Object returned by query: " + findEntity);<NEW_LINE>assertNotNull("Did not find entity in criteria query", findEntity);<NEW_LINE>assertTrue("Entity returned by find was not contained in the persistence context.", em.contains(findEntity));<NEW_LINE>assertEquals(06.06D, findEntity.getEntity0006_id(), 0.01);<NEW_LINE>assertEquals("Entity0006_STRING01", findEntity.getEntity0006_string01());<NEW_LINE>assertEquals("Entity0006_STRING02", findEntity.getEntity0006_string02());<NEW_LINE>assertEquals(<MASK><NEW_LINE>tx.commitTransaction();<NEW_LINE>} finally {<NEW_LINE>System.out.println(testName + ": End");<NEW_LINE>}<NEW_LINE>}
"Entity0006_STRING03", findEntity.getEntity0006_string03());
423,332
public Composite createTab(Composite parent) {<NEW_LINE>Composite container = new Composite(parent, SWT.NONE);<NEW_LINE>TableColumnLayout layout = new TableColumnLayout();<NEW_LINE>container.setLayout(layout);<NEW_LINE>bookmarks = new TableViewer(container, SWT.FULL_SELECTION | SWT.MULTI);<NEW_LINE>ColumnEditingSupport.prepare(bookmarks);<NEW_LINE>CopyPasteSupport.enableFor(bookmarks);<NEW_LINE>ShowHideColumnHelper support = new // $NON-NLS-1$<NEW_LINE>// $NON-NLS-1$<NEW_LINE>ShowHideColumnHelper(BookmarksListTab.class.getSimpleName() + "@bottom", preferences, bookmarks, layout);<NEW_LINE>// Create Column for Bookmark<NEW_LINE>Column column = new Column(Messages.BookmarksListView_bookmark, SWT.None, 150);<NEW_LINE>column.setLabelProvider(new ColumnLabelProvider() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String getText(Object element) {<NEW_LINE>return ((Bookmark) element).getLabel();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Image getImage(Object element) {<NEW_LINE>return Images.BOOKMARK.image();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// $NON-NLS-1$<NEW_LINE>new StringEditingSupport(Bookmark.class, "label").addListener(this).attachTo(column);<NEW_LINE>support.addColumn(column);<NEW_LINE>// Create Column for URL<NEW_LINE>column = new Column(Messages.BookmarksListView_url, SWT.None, 500);<NEW_LINE>column.setLabelProvider(new ColumnLabelProvider() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String getText(Object element) {<NEW_LINE>return ((Bookmark) element).getPattern();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// $NON-NLS-1$<NEW_LINE>new StringEditingSupport(Bookmark.class, "pattern").addListener(this).attachTo(column);<NEW_LINE>support.addColumn(column);<NEW_LINE>support.createColumns();<NEW_LINE>bookmarks.getTable().setHeaderVisible(true);<NEW_LINE>bookmarks.getTable().setLinesVisible(true);<NEW_LINE>bookmarks.setContentProvider(ArrayContentProvider.getInstance());<NEW_LINE>bookmarks.setInput(client.<MASK><NEW_LINE>bookmarks.refresh();<NEW_LINE>bookmarks.addSelectionChangedListener(e -> view.setInformationPaneInput(e.getStructuredSelection().getFirstElement()));<NEW_LINE>new ContextMenu(bookmarks.getTable(), this::fillContextMenu).hook();<NEW_LINE>return container;<NEW_LINE>}
getSettings().getBookmarks());
170,413
public static void main(String[] args) {<NEW_LINE>List<Integer> app0 = new ArrayList<Integer>();<NEW_LINE>app0.add(10);<NEW_LINE>app0.add(11);<NEW_LINE>app0.add(13);<NEW_LINE>List<Integer> app1 <MASK><NEW_LINE>app1.add(10);<NEW_LINE>List<Integer> app2 = new ArrayList<Integer>();<NEW_LINE>app2.add(12);<NEW_LINE>List<Integer> app3 = new ArrayList<Integer>();<NEW_LINE>app3.add(12);<NEW_LINE>app3.add(10);<NEW_LINE>app3.add(11);<NEW_LINE>Map<Integer, List<Integer>> jobApplications = new HashMap<Integer, List<Integer>>();<NEW_LINE>jobApplications.put(0, app0);<NEW_LINE>jobApplications.put(1, app1);<NEW_LINE>jobApplications.put(2, app2);<NEW_LINE>jobApplications.put(3, app3);<NEW_LINE>MaximumBiparteMatching mbm = new MaximumBiparteMatching();<NEW_LINE>List<Integer> allJobs = new ArrayList<Integer>();<NEW_LINE>allJobs.add(10);<NEW_LINE>allJobs.add(11);<NEW_LINE>allJobs.add(12);<NEW_LINE>allJobs.add(13);<NEW_LINE>System.out.print(mbm.findMaxMatching(jobApplications, allJobs));<NEW_LINE>}
= new ArrayList<Integer>();
935,830
private Sequence fetch(Sequence src, Expression[] exps, IndexTable it, Expression[] newExps, String[] newNames, Context ctx) {<NEW_LINE>int pkCount = exps.length;<NEW_LINE>int newCount = newExps.length;<NEW_LINE>Object[] pkValues = new Object[pkCount];<NEW_LINE>DataStruct ds = new DataStruct(newNames);<NEW_LINE>int len = src.length();<NEW_LINE>Sequence result = new Sequence(len);<NEW_LINE><MASK><NEW_LINE>Sequence.Current current = src.new Current();<NEW_LINE>stack.push(current);<NEW_LINE>try {<NEW_LINE>for (int i = 1; i <= len; ++i) {<NEW_LINE>current.setCurrent(i);<NEW_LINE>for (int f = 0; f < pkCount; ++f) {<NEW_LINE>pkValues[f] = exps[f].calculate(ctx);<NEW_LINE>}<NEW_LINE>Record r = (Record) it.find(pkValues);<NEW_LINE>if (r != null) {<NEW_LINE>stack.push(r);<NEW_LINE>Record nr = new Record(ds);<NEW_LINE>result.add(nr);<NEW_LINE>try {<NEW_LINE>for (int f = 0; f < newCount; ++f) {<NEW_LINE>nr.setNormalFieldValue(f, newExps[f].calculate(ctx));<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>stack.pop();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>result.add(null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>stack.pop();<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
ComputeStack stack = ctx.getComputeStack();
405,298
protected Long readCountAllActiveSkusInternal(Date currentDate) {<NEW_LINE>// Set up the criteria query that specifies we want to return a Long<NEW_LINE>CriteriaBuilder builder = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Long> criteria = builder.createQuery(Long.class);<NEW_LINE>// The root of our search is sku<NEW_LINE>Root<SkuImpl> sku = criteria.from(SkuImpl.class);<NEW_LINE>// We want the count of products<NEW_LINE>criteria.select(builder.count(sku));<NEW_LINE>// Ensure the sku is currently active<NEW_LINE>List<Predicate> restrictions = new ArrayList<Predicate>();<NEW_LINE>// Add the active start/end date restrictions<NEW_LINE>restrictions.add(builder.lessThan(sku.get("activeStartDate").as(Date.class), currentDate));<NEW_LINE>restrictions.add(builder.or(builder.isNull(sku.get("activeEndDate")), builder.greaterThan(sku.get("activeEndDate").as(Date<MASK><NEW_LINE>// Add the restrictions to the criteria query<NEW_LINE>criteria.where(restrictions.toArray(new Predicate[restrictions.size()]));<NEW_LINE>TypedQuery<Long> query = em.createQuery(criteria);<NEW_LINE>query.setHint(QueryHints.HINT_CACHEABLE, true);<NEW_LINE>query.setHint(QueryHints.HINT_CACHE_REGION, "query.Catalog");<NEW_LINE>return query.getSingleResult();<NEW_LINE>}
.class), currentDate)));
393,311
public void updateConfiguration(Configuration config) {<NEW_LINE>// re-map filesystem schemes to match Amazon Elastic MapReduce<NEW_LINE>config.set("fs.s3.impl", PrestoS3FileSystem.class.getName());<NEW_LINE>config.set("fs.s3a.impl", PrestoS3FileSystem.class.getName());<NEW_LINE>config.set("fs.s3n.impl", PrestoS3FileSystem.class.getName());<NEW_LINE>if (awsAccessKey != null) {<NEW_LINE>config.set(S3_ACCESS_KEY, awsAccessKey);<NEW_LINE>}<NEW_LINE>if (awsSecretKey != null) {<NEW_LINE>config.set(S3_SECRET_KEY, awsSecretKey);<NEW_LINE>}<NEW_LINE>if (endpoint != null) {<NEW_LINE>config.set(S3_ENDPOINT, endpoint);<NEW_LINE>}<NEW_LINE>config.set(<MASK><NEW_LINE>if (signerType != null) {<NEW_LINE>config.set(S3_SIGNER_TYPE, signerType.name());<NEW_LINE>}<NEW_LINE>config.setBoolean(S3_PATH_STYLE_ACCESS, pathStyleAccess);<NEW_LINE>config.setBoolean(S3_USE_INSTANCE_CREDENTIALS, useInstanceCredentials);<NEW_LINE>if (s3IamRole != null) {<NEW_LINE>config.set(S3_IAM_ROLE, s3IamRole);<NEW_LINE>}<NEW_LINE>config.setBoolean(S3_SSL_ENABLED, sslEnabled);<NEW_LINE>config.setBoolean(S3_SSE_ENABLED, sseEnabled);<NEW_LINE>config.set(S3_SSE_TYPE, sseType.name());<NEW_LINE>if (encryptionMaterialsProvider != null) {<NEW_LINE>config.set(S3_ENCRYPTION_MATERIALS_PROVIDER, encryptionMaterialsProvider);<NEW_LINE>}<NEW_LINE>if (kmsKeyId != null) {<NEW_LINE>config.set(S3_KMS_KEY_ID, kmsKeyId);<NEW_LINE>}<NEW_LINE>if (sseKmsKeyId != null) {<NEW_LINE>config.set(S3_SSE_KMS_KEY_ID, sseKmsKeyId);<NEW_LINE>}<NEW_LINE>config.setInt(S3_MAX_CLIENT_RETRIES, maxClientRetries);<NEW_LINE>config.setInt(S3_MAX_ERROR_RETRIES, maxErrorRetries);<NEW_LINE>config.set(S3_MAX_BACKOFF_TIME, maxBackoffTime.toString());<NEW_LINE>config.set(S3_MAX_RETRY_TIME, maxRetryTime.toString());<NEW_LINE>config.set(S3_CONNECT_TIMEOUT, connectTimeout.toString());<NEW_LINE>config.set(S3_SOCKET_TIMEOUT, socketTimeout.toString());<NEW_LINE>config.set(S3_STAGING_DIRECTORY, stagingDirectory.toString());<NEW_LINE>config.setInt(S3_MAX_CONNECTIONS, maxConnections);<NEW_LINE>config.setLong(S3_MULTIPART_MIN_FILE_SIZE, multipartMinFileSize.toBytes());<NEW_LINE>config.setLong(S3_MULTIPART_MIN_PART_SIZE, multipartMinPartSize.toBytes());<NEW_LINE>config.setBoolean(S3_PIN_CLIENT_TO_CURRENT_REGION, pinClientToCurrentRegion);<NEW_LINE>config.set(S3_USER_AGENT_PREFIX, userAgentPrefix);<NEW_LINE>config.set(S3_ACL_TYPE, aclType.name());<NEW_LINE>config.setBoolean(S3_SKIP_GLACIER_OBJECTS, skipGlacierObjects);<NEW_LINE>}
S3_STORAGE_CLASS, s3StorageClass.name());
939,150
public static PlayerData createUnloadedPlayerData(final AVManagerInterface avModule, final Context context, final ReadableArguments source, final Bundle status) {<NEW_LINE>final String <MASK><NEW_LINE>Map requestHeaders = null;<NEW_LINE>if (source.containsKey(STATUS_HEADERS_KEY_PATH)) {<NEW_LINE>requestHeaders = source.getMap(STATUS_HEADERS_KEY_PATH);<NEW_LINE>}<NEW_LINE>final String uriOverridingExtension = source.containsKey(STATUS_OVERRIDING_EXTENSION_KEY_PATH) ? source.getString(STATUS_OVERRIDING_EXTENSION_KEY_PATH) : null;<NEW_LINE>// uriString is guaranteed not to be null (both VideoView.setSource and Sound.loadAsync handle that case)<NEW_LINE>final Uri uri = Uri.parse(uriString);<NEW_LINE>if (status.containsKey(STATUS_ANDROID_IMPLEMENTATION_KEY_PATH) && status.getString(STATUS_ANDROID_IMPLEMENTATION_KEY_PATH).equals(MediaPlayerData.IMPLEMENTATION_NAME)) {<NEW_LINE>return new MediaPlayerData(avModule, context, uri, requestHeaders);<NEW_LINE>} else {<NEW_LINE>return new SimpleExoPlayerData(avModule, context, uri, uriOverridingExtension, requestHeaders);<NEW_LINE>}<NEW_LINE>}
uriString = source.getString(STATUS_URI_KEY_PATH);
326,248
private String transformSingleDescriptor(String desc, boolean isObject) {<NEW_LINE>IActivity descriptorActivity = this.activities.begin("desc=%s", desc);<NEW_LINE>boolean isArray = false;<NEW_LINE>String type = desc;<NEW_LINE>while (type.startsWith("[") || type.startsWith("L")) {<NEW_LINE>if (type.startsWith("[")) {<NEW_LINE>type = type.substring(1);<NEW_LINE>isArray = true;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>type = type.substring(1, type.indexOf(";"));<NEW_LINE>isObject = true;<NEW_LINE>}<NEW_LINE>// Primitive types don't need to be transformed<NEW_LINE>if (!isObject) {<NEW_LINE>descriptorActivity.end();<NEW_LINE>return desc;<NEW_LINE>}<NEW_LINE>// Primitive arrays are basically Object and don't need to be transformed either<NEW_LINE>if (isArray && type.length() == 1) {<NEW_LINE>Type parsedType = Type.getType(type);<NEW_LINE>if (parsedType.getSort() <= Type.DOUBLE) {<NEW_LINE>descriptorActivity.end();<NEW_LINE>return desc;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String innerClassName = this.innerClasses.get(type);<NEW_LINE>if (innerClassName != null) {<NEW_LINE>descriptorActivity.end();<NEW_LINE>return desc.replace(type, innerClassName);<NEW_LINE>}<NEW_LINE>if (this.innerClasses.inverse().containsKey(type)) {<NEW_LINE>descriptorActivity.end();<NEW_LINE>return desc;<NEW_LINE>}<NEW_LINE>ClassInfo <MASK><NEW_LINE>if (typeInfo == null) {<NEW_LINE>throw new ClassMetadataNotFoundException(type.replace('/', '.'));<NEW_LINE>}<NEW_LINE>if (!typeInfo.isMixin() || typeInfo.isLoadable()) {<NEW_LINE>descriptorActivity.end();<NEW_LINE>return desc;<NEW_LINE>}<NEW_LINE>String realDesc = desc.replace(type, this.findRealType(typeInfo).toString());<NEW_LINE>descriptorActivity.end();<NEW_LINE>return realDesc;<NEW_LINE>}
typeInfo = ClassInfo.forName(type);
276,350
static PTuple codecsInfo(PythonModule self, String encoding, PythonContext context, PythonObjectFactory factory) {<NEW_LINE>PythonModule codecsModule = (PythonModule) AbstractImportNode.importModule("codecs");<NEW_LINE>CodecsTruffleModuleBuiltins codecsTruffleBuiltins = (CodecsTruffleModuleBuiltins) self.getBuiltins();<NEW_LINE>if (self.getAttribute(TRUFFLE_CODEC) instanceof PNone) {<NEW_LINE>initCodecClasses(self, codecsModule, context, factory);<NEW_LINE>}<NEW_LINE>// encode/decode methods for codecs.CodecInfo<NEW_LINE>PythonObject truffleCodec = factory.createPythonObject(codecsTruffleBuiltins.truffleCodecClass);<NEW_LINE>truffleCodec.setAttribute(ATTR_ENCODING, encoding);<NEW_LINE>Object encodeMethod = PyObjectGetAttr.getUncached().execute(null, truffleCodec, ENCODE);<NEW_LINE>Object decodeMethod = PyObjectGetAttr.getUncached().execute(null, truffleCodec, DECODE);<NEW_LINE>// incrementalencoder factory function for codecs.CodecInfo<NEW_LINE>PythonObject tie = factory.createPythonObject(codecsTruffleBuiltins.applyEncodingClass);<NEW_LINE>tie.setAttribute(ATTR_FN, codecsTruffleBuiltins.truffleIncrementalEncoderClass);<NEW_LINE>tie.setAttribute(ATTR_ENCODING, encoding);<NEW_LINE>// incrementaldecoder factory function for codecs.CodecInfo<NEW_LINE>PythonObject tid = factory.createPythonObject(codecsTruffleBuiltins.applyEncodingClass);<NEW_LINE>tid.setAttribute(ATTR_FN, codecsTruffleBuiltins.truffleIncrementalDecoderClass);<NEW_LINE>tid.setAttribute(ATTR_ENCODING, encoding);<NEW_LINE>// streamwriter factory function for codecs.CodecInfo<NEW_LINE>PythonObject sr = <MASK><NEW_LINE>sr.setAttribute(ATTR_FN, codecsTruffleBuiltins.truffleStreamReaderClass);<NEW_LINE>sr.setAttribute(ATTR_ENCODING, encoding);<NEW_LINE>// streamreader factory function for codecs.CodecInfo<NEW_LINE>PythonObject sw = factory.createPythonObject(codecsTruffleBuiltins.applyEncodingClass);<NEW_LINE>sw.setAttribute(ATTR_FN, codecsTruffleBuiltins.truffleStreamWriterClass);<NEW_LINE>sw.setAttribute(ATTR_ENCODING, encoding);<NEW_LINE>// codecs.CodecInfo<NEW_LINE>PythonAbstractClass codecInfoClass = (PythonAbstractClass) codecsModule.getAttribute(CODEC_INFO_NAME);<NEW_LINE>return (PTuple) CallVarargsMethodNode.getUncached().execute(null, codecInfoClass, new Object[] {}, createCodecInfoArgs(encoding, encodeMethod, decodeMethod, tie, tid, sr, sw));<NEW_LINE>}
factory.createPythonObject(codecsTruffleBuiltins.applyEncodingClass);
337,355
public synchronized void createDirectMessage(DirectMessage status, int account) {<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>long time = status.getCreatedAt().getTime();<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_ACCOUNT, account);<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_TEXT, TweetLinkUtils.getLinksInStatus(status)[0]);<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_TWEET_ID, status.getId());<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_NAME, status.getSender().getName());<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_PRO_PIC, status.getSender().getOriginalProfileImageURL());<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_SCREEN_NAME, status.getSender().getScreenName());<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_TIME, time);<NEW_LINE>values.put(DMSQLiteHelper.<MASK><NEW_LINE>values.put(DMSQLiteHelper.COLUMN_EXTRA_ONE, status.getRecipient().getOriginalProfileImageURL());<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_EXTRA_TWO, status.getRecipient().getName());<NEW_LINE>values.put(HomeSQLiteHelper.COLUMN_PIC_URL, TweetLinkUtils.getLinksInStatus(status)[1]);<NEW_LINE>MediaEntity[] entities = status.getMediaEntities();<NEW_LINE>if (entities.length > 0) {<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_PIC_URL, entities[0].getMediaURL());<NEW_LINE>}<NEW_LINE>URLEntity[] urls = status.getURLEntities();<NEW_LINE>for (URLEntity url : urls) {<NEW_LINE>Log.v("inserting_dm", "url here: " + url.getExpandedURL());<NEW_LINE>values.put(DMSQLiteHelper.COLUMN_URL, url.getExpandedURL());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>database.insert(DMSQLiteHelper.TABLE_DM, null, values);<NEW_LINE>} catch (Exception e) {<NEW_LINE>open();<NEW_LINE>database.insert(DMSQLiteHelper.TABLE_DM, null, values);<NEW_LINE>}<NEW_LINE>}
COLUMN_RETWEETER, status.getRecipientScreenName());
724,094
protected QueryIterator execute(BasicPattern pattern, ReorderTransformation reorder, QueryIterator input, ExecutionContext execCxt) {<NEW_LINE>Explain.explain(pattern, execCxt.getContext());<NEW_LINE>if (!input.hasNext())<NEW_LINE>return input;<NEW_LINE>if (reorder != null && pattern.size() >= 2) {<NEW_LINE>// If pattern size is 0 or 1, nothing to do.<NEW_LINE>BasicPattern bgp2 = pattern;<NEW_LINE>// Try to ground the pattern<NEW_LINE>if (!input.isJoinIdentity()) {<NEW_LINE>QueryIterPeek peek = QueryIterPeek.create(input, execCxt);<NEW_LINE>// And now use this one<NEW_LINE>input = peek;<NEW_LINE>Binding b = peek.peek();<NEW_LINE>bgp2 = Substitute.substitute(pattern, b);<NEW_LINE>}<NEW_LINE>ReorderProc <MASK><NEW_LINE>pattern = reorderProc.reorder(pattern);<NEW_LINE>}<NEW_LINE>Explain.explain("Reorder/generic", pattern, execCxt.getContext());<NEW_LINE>return PatternMatchData.execute(execCxt.getActiveGraph(), pattern, input, null, execCxt);<NEW_LINE>}
reorderProc = reorder.reorderIndexes(bgp2);
1,744,790
public static Request parseRequest(String modelId, boolean deferDefinitionValidation, XContentParser parser) {<NEW_LINE>TrainedModelConfig.Builder builder = TrainedModelConfig.STRICT_PARSER.apply(parser, null);<NEW_LINE>if (builder.getModelId() == null) {<NEW_LINE>builder.<MASK><NEW_LINE>} else if (Strings.isNullOrEmpty(modelId) == false && modelId.equals(builder.getModelId()) == false) {<NEW_LINE>// If we have model_id in both URI and body, they must be identical<NEW_LINE>throw new IllegalArgumentException(Messages.getMessage(Messages.INCONSISTENT_ID, TrainedModelConfig.MODEL_ID.getPreferredName(), builder.getModelId(), modelId));<NEW_LINE>}<NEW_LINE>// Validations are done against the builder so we can build the full config object.<NEW_LINE>// This allows us to not worry about serializing a builder class between nodes.<NEW_LINE>return new Request(builder.validate(true).build(), deferDefinitionValidation);<NEW_LINE>}
setModelId(modelId).build();
1,062,268
final void onExecuteWrite(@NonNull final BluetoothGattServer server, @NonNull final BluetoothDevice device, final int requestId, final boolean execute) {<NEW_LINE>log(Log.DEBUG, () -> "[Server callback] Execute write request (requestId=" + <MASK><NEW_LINE>if (execute) {<NEW_LINE>final Deque<Pair<Object, byte[]>> values = preparedValues;<NEW_LINE>log(Log.INFO, () -> "[Server] Execute write request received");<NEW_LINE>preparedValues = null;<NEW_LINE>if (prepareError != 0) {<NEW_LINE>sendResponse(server, device, prepareError, requestId, 0, null);<NEW_LINE>prepareError = 0;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>sendResponse(server, device, BluetoothGatt.GATT_SUCCESS, requestId, 0, null);<NEW_LINE>if (values == null || values.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean startNextRequest = false;<NEW_LINE>for (final Pair<Object, byte[]> value : values) {<NEW_LINE>if (value.first instanceof BluetoothGattCharacteristic) {<NEW_LINE>final BluetoothGattCharacteristic characteristic = (BluetoothGattCharacteristic) value.first;<NEW_LINE>startNextRequest = assignAndNotify(device, characteristic, value.second) || startNextRequest;<NEW_LINE>} else if (value.first instanceof BluetoothGattDescriptor) {<NEW_LINE>final BluetoothGattDescriptor descriptor = (BluetoothGattDescriptor) value.first;<NEW_LINE>startNextRequest = assignAndNotify(device, descriptor, value.second) || startNextRequest;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (checkCondition() || startNextRequest) {<NEW_LINE>nextRequest(true);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>log(Log.INFO, () -> "[Server] Cancel write request received");<NEW_LINE>preparedValues = null;<NEW_LINE>sendResponse(server, device, BluetoothGatt.GATT_SUCCESS, requestId, 0, null);<NEW_LINE>}<NEW_LINE>}
requestId + ", execute=" + execute + ")");
731,749
private Forwardable<ThingVertex, Order.Asc> createIterator(int pos) {<NEW_LINE>StructureEdge<?, ?> edge = edges.get(pos);<NEW_LINE>ThingVertex player = answer.get(edge.to().id().asVariable().<MASK><NEW_LINE>return SortedIterators.Forwardable.merge(iterate(edge.asNative().asRolePlayer().types()).map(roleLabel -> {<NEW_LINE>TypeVertex roleVertex = graphMgr.schema().getType(roleLabel);<NEW_LINE>return player.ins().edge(ROLEPLAYER, roleVertex).fromAndOptimised().filter(relRole -> relationTypes.contains(relRole.key().type().properLabel()));<NEW_LINE>}), ASC).filter(relRole -> !scoped.contains(relRole.value())).mapSorted(relRole -> {<NEW_LINE>scoped.record(pos, relRole.value());<NEW_LINE>return relRole.key();<NEW_LINE>}, relation -> new KeyValue<>(relation, null), ASC);<NEW_LINE>}
asRetrievable()).asThing();
608,491
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "value".split(",");<NEW_LINE>String text = "@name('s0') select * from SupportRecogBean#length(10) " + "match_recognize (" + " partition by value" + " measures E1.value as value" + " pattern (E1 E2 | E2 E1 ) " + " define " + " E1 as E1.theString = 'A', " + " E2 as E2.theString = 'B' " + ")";<NEW_LINE>env.compileDeploy(text).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportRecogBean("A", 1));<NEW_LINE>env.milestone(0);<NEW_LINE>env.sendEventBean(new SupportRecogBean("B", 1));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 1 });<NEW_LINE>env.milestone(1);<NEW_LINE>env.sendEventBean(new SupportRecogBean("B", 2));<NEW_LINE>env.milestone(2);<NEW_LINE>env.sendEventBean(new SupportRecogBean("A", 2));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 2 });<NEW_LINE>env.milestone(3);<NEW_LINE>env.sendEventBean(new SupportRecogBean("B", 3));<NEW_LINE>env.sendEventBean(new SupportRecogBean("A", 4));<NEW_LINE>env.sendEventBean(new SupportRecogBean("A", 3));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 3 });<NEW_LINE>env.milestone(4);<NEW_LINE>env.sendEventBean(new SupportRecogBean("B", 4));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 4 });<NEW_LINE>env.milestone(5);<NEW_LINE>env.sendEventBean(new SupportRecogBean("A", 6));<NEW_LINE>env.sendEventBean(<MASK><NEW_LINE>env.sendEventBean(new SupportRecogBean("B", 8));<NEW_LINE>env.sendEventBean(new SupportRecogBean("A", 7));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 7 });<NEW_LINE>for (int i = 0; i < 10000; i++) {<NEW_LINE>env.sendEventBean(new SupportRecogBean("A", i));<NEW_LINE>// System.out.println(i);<NEW_LINE>// env.sendEventBean(new SupportRecogBean("B", i));<NEW_LINE>// env.assertPropsListenerNew("s0", fields, new Object[] {i});<NEW_LINE>}<NEW_LINE>env.undeployAll();<NEW_LINE>}
new SupportRecogBean("B", 7));
189,655
protected void addFormDefinitionToCollection(List<FormDefinition> formDefinitions, String formKey, CaseDefinition caseDefinition) {<NEW_LINE>FormDefinitionQuery formDefinitionQuery = formRepositoryService.createFormDefinitionQuery().formDefinitionKey(formKey);<NEW_LINE>CmmnDeployment deployment = CommandContextUtil.getCmmnDeploymentEntityManager().<MASK><NEW_LINE>if (deployment.getParentDeploymentId() != null) {<NEW_LINE>List<FormDeployment> formDeployments = formRepositoryService.createDeploymentQuery().parentDeploymentId(deployment.getParentDeploymentId()).list();<NEW_LINE>if (formDeployments != null && formDeployments.size() > 0) {<NEW_LINE>formDefinitionQuery.deploymentId(formDeployments.get(0).getId());<NEW_LINE>} else {<NEW_LINE>formDefinitionQuery.latestVersion();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>formDefinitionQuery.latestVersion();<NEW_LINE>}<NEW_LINE>FormDefinition formDefinition = formDefinitionQuery.singleResult();<NEW_LINE>if (formDefinition != null) {<NEW_LINE>formDefinitions.add(formDefinition);<NEW_LINE>}<NEW_LINE>}
findById(caseDefinition.getDeploymentId());
1,470,738
public void unparse(final SqlWriter writer, final SqlCall call, final int leftPrec, final int rightPrec) {<NEW_LINE>final SqlWriter.Frame frame = writer.startFunCall(this.getName());<NEW_LINE>if (call.operandCount() == 1) {<NEW_LINE>writer.endFunCall(frame);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (int i = 1; i < call.operandCount(); i++) {<NEW_LINE>writer.sep(",");<NEW_LINE>call.operand(i).unparse(writer, leftPrec, rightPrec);<NEW_LINE>}<NEW_LINE>final SqlJsonConstructorNullClause nullClause = (SqlJsonConstructorNullClause) ((SqlLiteral) call.operand<MASK><NEW_LINE>switch(nullClause) {<NEW_LINE>case ABSENT_ON_NULL:<NEW_LINE>writer.keyword("ABSENT ON NULL");<NEW_LINE>break;<NEW_LINE>case NULL_ON_NULL:<NEW_LINE>writer.keyword("NULL ON NULL");<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw QueryException.error("Unknown SqlJsonConstructorNullClause constant: " + nullClause);<NEW_LINE>}<NEW_LINE>writer.endFunCall(frame);<NEW_LINE>}
(0)).getValue();
422,531
protected static ClasspathImportServiceCompileTime makeClasspathImportService(Configuration configuration) {<NEW_LINE>TimeAbacus timeAbacus = TimeAbacusFactory.make(configuration.getCommon().getTimeSource().getTimeUnit());<NEW_LINE>ConfigurationCompilerExpression expression = configuration.getCompiler().getExpression();<NEW_LINE>ClasspathImportServiceCompileTimeImpl classpathImportService = new ClasspathImportServiceCompileTimeImpl(configuration.getCommon().getTransientConfiguration(), timeAbacus, configuration.getCommon().getEventTypeAutoNamePackages(), expression.getMathContext(), expression.isExtendedAggregation(), configuration.getCompiler().getLanguage().isSortUsingCollator());<NEW_LINE>// Add auto-imports<NEW_LINE>try {<NEW_LINE>for (String importName : configuration.getCommon().getImports()) {<NEW_LINE>classpathImportService.addImport(importName);<NEW_LINE>}<NEW_LINE>for (String importName : configuration.getCommon().getAnnotationImports()) {<NEW_LINE>classpathImportService.addAnnotationImport(importName);<NEW_LINE>}<NEW_LINE>for (ConfigurationCompilerPlugInAggregationFunction config : configuration.getCompiler().getPlugInAggregationFunctions()) {<NEW_LINE>classpathImportService.addAggregation(config.getName(), config);<NEW_LINE>}<NEW_LINE>for (ConfigurationCompilerPlugInAggregationMultiFunction config : configuration.getCompiler().getPlugInAggregationMultiFunctions()) {<NEW_LINE>classpathImportService.addAggregationMultiFunction(config);<NEW_LINE>}<NEW_LINE>for (ConfigurationCompilerPlugInSingleRowFunction config : configuration.getCompiler().getPlugInSingleRowFunctions()) {<NEW_LINE>classpathImportService.addSingleRow(config.getName(), config.getFunctionClassName(), config.getFunctionMethodName(), config.getValueCache(), config.getFilterOptimizable(), config.isRethrowExceptions(), config.getEventTypeName());<NEW_LINE>}<NEW_LINE>for (ConfigurationCompilerPlugInDateTimeMethod config : configuration.getCompiler().getPlugInDateTimeMethods()) {<NEW_LINE>classpathImportService.addPlugInDateTimeMethod(config.getName(), config);<NEW_LINE>}<NEW_LINE>for (ConfigurationCompilerPlugInEnumMethod config : configuration.getCompiler().getPlugInEnumMethods()) {<NEW_LINE>classpathImportService.addPlugInEnumMethod(config.getName(), config);<NEW_LINE>}<NEW_LINE>} catch (ClasspathImportException ex) {<NEW_LINE>throw new ConfigurationException("Error configuring compiler: " + <MASK><NEW_LINE>}<NEW_LINE>return classpathImportService;<NEW_LINE>}
ex.getMessage(), ex);
1,456,651
public void onSurfaceCreated(GL10 unused, EGLConfig config) {<NEW_LINE>program = GlUtil.compileProgram(VERTEX_SHADER, FRAGMENT_SHADER);<NEW_LINE>GLES20.glUseProgram(program);<NEW_LINE>int posLocation = GLES20.glGetAttribLocation(program, "in_pos");<NEW_LINE>GLES20.glEnableVertexAttribArray(posLocation);<NEW_LINE>GLES20.glVertexAttribPointer(posLocation, 2, GLES20.GL_FLOAT, false, 0, TEXTURE_VERTICES);<NEW_LINE>texLocations[0] = GLES20.glGetAttribLocation(program, "in_tc_y");<NEW_LINE>GLES20.glEnableVertexAttribArray(texLocations[0]);<NEW_LINE>texLocations[1] = GLES20.glGetAttribLocation(program, "in_tc_u");<NEW_LINE>GLES20.glEnableVertexAttribArray(texLocations[1]);<NEW_LINE>texLocations[2] = GLES20.glGetAttribLocation(program, "in_tc_v");<NEW_LINE>GLES20.glEnableVertexAttribArray(texLocations[2]);<NEW_LINE>GlUtil.checkGlError();<NEW_LINE>colorMatrixLocation = <MASK><NEW_LINE>GlUtil.checkGlError();<NEW_LINE>setupTextures();<NEW_LINE>GlUtil.checkGlError();<NEW_LINE>}
GLES20.glGetUniformLocation(program, "mColorConversion");
267,680
protected void saveState() {<NEW_LINE>super.saveState();<NEW_LINE>Context context = parent.getContext();<NEW_LINE>if (context == null || bitmap == null || parent.getSurface().getComponent().isService())<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>// Saving current width and height to avoid restoring the screen after a screen rotation<NEW_LINE>restoreWidth = pixelWidth;<NEW_LINE>restoreHeight = pixelHeight;<NEW_LINE>int size = bitmap.getHeight() * bitmap.getRowBytes();<NEW_LINE>ByteBuffer restoreBitmap = ByteBuffer.allocate(size);<NEW_LINE>bitmap.copyPixelsToBuffer(restoreBitmap);<NEW_LINE>// Tries to use external but if not mounted, falls back on internal storage, as shown in<NEW_LINE>// https://developer.android.com/topic/performance/graphics/cache-bitmap#java<NEW_LINE>File cacheDir = Environment.MEDIA_MOUNTED == Environment.getExternalStorageState() || !isExternalStorageRemovable() ? context.getExternalCacheDir() : context.getCacheDir();<NEW_LINE>File cacheFile = new File(cacheDir + File.separator + "restore_pixels");<NEW_LINE>restoreFilename = cacheFile.getAbsolutePath();<NEW_LINE><MASK><NEW_LINE>ObjectOutputStream dout = new ObjectOutputStream(stream);<NEW_LINE>byte[] array = new byte[size];<NEW_LINE>restoreBitmap.rewind();<NEW_LINE>restoreBitmap.get(array);<NEW_LINE>dout.writeObject(array);<NEW_LINE>dout.flush();<NEW_LINE>stream.getFD().sync();<NEW_LINE>stream.close();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>PGraphics.showWarning("Could not save screen contents to cache");<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>}
FileOutputStream stream = new FileOutputStream(cacheFile);
1,438,668
protected void checkGroovyConstructorMap(final Expression receiver, final ClassNode receiverType, final MapExpression mapExpression) {<NEW_LINE>// workaround for map-style checks putting setter info on wrong AST nodes<NEW_LINE>typeCheckingContext.pushEnclosingBinaryExpression(null);<NEW_LINE>for (MapEntryExpression entryExpression : mapExpression.getMapEntryExpressions()) {<NEW_LINE>Expression keyExpression = entryExpression.getKeyExpression();<NEW_LINE>if (!(keyExpression instanceof ConstantExpression)) {<NEW_LINE>addStaticTypeError("Dynamic keys in map-style constructors are unsupported in static type checking", keyExpression);<NEW_LINE>} else {<NEW_LINE>String pName = keyExpression.getText();<NEW_LINE>AtomicReference<ClassNode> pType = new AtomicReference<>();<NEW_LINE>if (!existsProperty(propX(varX("_", receiverType), pName), false, new PropertyLookupVisitor(pType))) {<NEW_LINE>addStaticTypeError("No such property: " + pName + " for class: " + <MASK><NEW_LINE>} else {<NEW_LINE>ClassNode targetType = Optional.ofNullable(receiverType.getSetterMethod(getSetterName(pName), false)).map(setter -> setter.getParameters()[0].getType()).orElseGet(pType::get);<NEW_LINE>Expression valueExpression = entryExpression.getValueExpression();<NEW_LINE>ClassNode valueType = getType(valueExpression);<NEW_LINE>ClassNode resultType = getResultType(targetType, ASSIGN, valueType, assignX(keyExpression, valueExpression, entryExpression));<NEW_LINE>if (!checkCompatibleAssignmentTypes(targetType, resultType, valueExpression) && !extension.handleIncompatibleAssignment(targetType, valueType, entryExpression)) {<NEW_LINE>addAssignmentError(targetType, valueType, entryExpression);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>typeCheckingContext.popEnclosingBinaryExpression();<NEW_LINE>}
receiverType.getText(), receiver);
578,240
static ProcessorsInfo parseCpuInfo(String cpuInfoString) {<NEW_LINE>ProcessorsInfo pi = new ProcessorsInfo();<NEW_LINE>for (String cpu : cpuInfoString.split("\n\n")) {<NEW_LINE>int cpuId = -1;<NEW_LINE>int coreId = -1;<NEW_LINE>for (String line : cpu.split("\n")) {<NEW_LINE>String[] parts = line.split(":", 2);<NEW_LINE>String key = StringUtils.trim(parts[0]);<NEW_LINE>String value = StringUtils.trim(parts[1]);<NEW_LINE>if (key.equals("core id")) {<NEW_LINE>coreId = Integer.parseInt(value);<NEW_LINE>} else if (key.equals("processor")) {<NEW_LINE>cpuId = Integer.parseInt(value);<NEW_LINE>} else {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>}<NEW_LINE>com.google.common.base.Preconditions.checkArgument(cpuId >= 0);<NEW_LINE>com.google.common.base.<MASK><NEW_LINE>pi.cpus.put(cpuId, coreId);<NEW_LINE>}<NEW_LINE>return pi;<NEW_LINE>}
Preconditions.checkArgument(coreId >= 0);
617,550
final UpdateDashboardResult executeUpdateDashboard(UpdateDashboardRequest updateDashboardRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDashboardRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateDashboardRequest> request = null;<NEW_LINE>Response<UpdateDashboardResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateDashboardRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateDashboardRequest));<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, "IoTSiteWise");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDashboard");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI endpointTraitHost = null;<NEW_LINE>if (!clientConfiguration.isDisableHostPrefixInjection()) {<NEW_LINE>String hostPrefix = "monitor.";<NEW_LINE>String <MASK><NEW_LINE>endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateDashboardResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateDashboardResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
resolvedHostPrefix = String.format("monitor.");
894,690
public void callback(JSONObject handler, String result, JasonViewActivity context) {<NEW_LINE>try {<NEW_LINE>String classname = handler.getString("class");<NEW_LINE>classname = "com.jasonette.seed.Action." + classname;<NEW_LINE>String methodname = handler.getString("method");<NEW_LINE>Object module;<NEW_LINE>if (context.modules.containsKey(classname)) {<NEW_LINE>module = context.modules.get(classname);<NEW_LINE>} else {<NEW_LINE>Class<?> classObject = Class.forName(classname);<NEW_LINE>Constructor<?> constructor = classObject.getConstructor();<NEW_LINE>module = constructor.newInstance();<NEW_LINE>context.<MASK><NEW_LINE>}<NEW_LINE>Method method = module.getClass().getMethod(methodname, JSONObject.class, String.class);<NEW_LINE>// JSONObject options = handler.getJSONObject("options");<NEW_LINE>method.invoke(module, handler, result);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.d("Warning", e.getStackTrace()[0].getMethodName() + " : " + e.toString());<NEW_LINE>}<NEW_LINE>}
modules.put(classname, module);
1,773,546
public List<PartitionsInfo> list(String clusterAlias, Map<String, Object> params) {<NEW_LINE>List<PartitionsInfo> topicRecords = <MASK><NEW_LINE>for (PartitionsInfo partitionInfo : topicRecords) {<NEW_LINE>Map<String, Object> spread = new HashMap<>();<NEW_LINE>spread.put("cluster", clusterAlias);<NEW_LINE>spread.put("topic", partitionInfo.getTopic());<NEW_LINE>spread.put("tkey", Topic.BROKER_SPREAD);<NEW_LINE>partitionInfo.setBrokersSpread(topicDao.readBrokerPerformance(spread) == null ? 0 : topicDao.readBrokerPerformance(spread).getTvalue());<NEW_LINE>spread.put("tkey", Topic.BROKER_SKEWED);<NEW_LINE>partitionInfo.setBrokersSkewed(topicDao.readBrokerPerformance(spread) == null ? 0 : topicDao.readBrokerPerformance(spread).getTvalue());<NEW_LINE>spread.put("tkey", Topic.BROKER_LEADER_SKEWED);<NEW_LINE>partitionInfo.setBrokersLeaderSkewed(topicDao.readBrokerPerformance(spread) == null ? 0 : topicDao.readBrokerPerformance(spread).getTvalue());<NEW_LINE>}<NEW_LINE>return topicRecords;<NEW_LINE>}
brokerService.topicRecords(clusterAlias, params);
440,477
public static <T extends ImageGray<T>> PyramidFloat<T> scaleSpacePyramid(double[] scaleSpace, Class<T> imageType) {<NEW_LINE>double[] sigmas = new double[scaleSpace.length];<NEW_LINE>sigmas[0] = scaleSpace[0];<NEW_LINE>for (int i = 1; i < scaleSpace.length; i++) {<NEW_LINE>// the desired amount of blur<NEW_LINE>double c = scaleSpace[i];<NEW_LINE>// the effective amount of blur applied to the last level<NEW_LINE>double b = scaleSpace[i - 1];<NEW_LINE>// the amount of additional blur which is needed<NEW_LINE>sigmas[i] = Math.sqrt(c * c - b * b);<NEW_LINE>// take in account the change in image scale<NEW_LINE>sigmas[i<MASK><NEW_LINE>}<NEW_LINE>return floatGaussian(scaleSpace, sigmas, imageType);<NEW_LINE>}
] /= scaleSpace[i - 1];
1,531,986
private void loadNode458() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_LastUpdateTime, new QualifiedName(0, "LastUpdateTime"), new LocalizedText("en", "LastUpdateTime"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.UtcTime, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_LastUpdateTime, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_LastUpdateTime, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_LastUpdateTime, Identifiers.HasProperty, Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
(1), 0.0, false);
1,754,151
public static Haplotype createReferenceHaplotype(final AssemblyRegion activeRegion, final byte[] refBases, final SimpleInterval paddedReferenceLoc) {<NEW_LINE>Utils.nonNull(activeRegion, "null region");<NEW_LINE>Utils.nonNull(refBases, "null refBases");<NEW_LINE>Utils.nonNull(paddedReferenceLoc, "null paddedReferenceLoc");<NEW_LINE>final int alignmentStart = activeRegion.getPaddedSpan().getStart<MASK><NEW_LINE>if (alignmentStart < 0) {<NEW_LINE>throw new IllegalStateException("Bad alignment start in createReferenceHaplotype " + alignmentStart);<NEW_LINE>}<NEW_LINE>final Haplotype refHaplotype = new Haplotype(refBases, true);<NEW_LINE>refHaplotype.setAlignmentStartHapwrtRef(alignmentStart);<NEW_LINE>final Cigar c = new Cigar();<NEW_LINE>c.add(new CigarElement(refHaplotype.getBases().length, CigarOperator.M));<NEW_LINE>refHaplotype.setCigar(c);<NEW_LINE>return refHaplotype;<NEW_LINE>}
() - paddedReferenceLoc.getStart();
945,774
public static void vertical7(Kernel1D_S32 kernel, GrayU8 input, GrayI8 output, int skip, int divisor) {<NEW_LINE>final byte[] dataSrc = input.data;<NEW_LINE>final byte[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kernel.data[3];<NEW_LINE>final int k5 = kernel.data[4];<NEW_LINE>final int k6 = kernel.data[5];<NEW_LINE>final int <MASK><NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int width = input.width;<NEW_LINE>final int heightEnd = UtilDownConvolve.computeMaxSide(input.height, skip, radius);<NEW_LINE>int halfDivisor = divisor / 2;<NEW_LINE>final int offsetY = UtilDownConvolve.computeOffset(skip, radius);<NEW_LINE>for (int y = offsetY; y <= heightEnd; y += skip) {<NEW_LINE>int indexDst = output.startIndex + (y / skip) * output.stride;<NEW_LINE>int i = input.startIndex + (y - radius) * input.stride;<NEW_LINE>final int iEnd = i + width;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>int total = (dataSrc[indexSrc] & 0xFF) * k1;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k2;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k3;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k4;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k5;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k6;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k7;<NEW_LINE>dataDst[indexDst++] = (byte) ((total + halfDivisor) / divisor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
k7 = kernel.data[6];
1,831,842
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateZoneName, String ifMatch, 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.<MASK><NEW_LINE>}<NEW_LINE>if (privateZoneName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter privateZoneName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), resourceGroupName, privateZoneName, ifMatch, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
640,783
public void run() {<NEW_LINE>task.log("launching cmd '" + cmdString(cmd) + "' in dir '" + dir + "'");<NEW_LINE>if (msg != null) {<NEW_LINE>task.log("waiting for launch completion msg '" + msg + "'...");<NEW_LINE>} else {<NEW_LINE>task.log("not waiting for a launch completion msg.");<NEW_LINE>}<NEW_LINE>ProcessBuilder processBuilder = new ProcessBuilder(cmd).redirectErrorStream(true).directory(dir);<NEW_LINE>InputStream consoleStream = null;<NEW_LINE>try {<NEW_LINE>Process process = processBuilder.start();<NEW_LINE>consoleStream = process.getInputStream();<NEW_LINE>BufferedReader consoleReader = new <MASK><NEW_LINE>String consoleLine = "";<NEW_LINE>while ((consoleLine != null) && (msg == null || consoleLine.indexOf(msg) == -1)) {<NEW_LINE>consoleLine = consoleReader.readLine();<NEW_LINE>if (consoleLine != null) {<NEW_LINE>task.log(" " + consoleLine);<NEW_LINE>} else {<NEW_LINE>task.log("launched process completed");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new BuildException("couldn't launch " + cmdString(cmd), e);<NEW_LINE>} finally {<NEW_LINE>IoUtil.closeSilently(consoleStream);<NEW_LINE>}<NEW_LINE>}
BufferedReader(new InputStreamReader(consoleStream));
835,314
public static GetPatentPlanInfoListResponse unmarshall(GetPatentPlanInfoListResponse getPatentPlanInfoListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getPatentPlanInfoListResponse.setRequestId(_ctx.stringValue("GetPatentPlanInfoListResponse.RequestId"));<NEW_LINE>getPatentPlanInfoListResponse.setPageNum(_ctx.integerValue("GetPatentPlanInfoListResponse.PageNum"));<NEW_LINE>getPatentPlanInfoListResponse.setSuccess(_ctx.booleanValue("GetPatentPlanInfoListResponse.Success"));<NEW_LINE>getPatentPlanInfoListResponse.setTotalItemNum(_ctx.integerValue("GetPatentPlanInfoListResponse.TotalItemNum"));<NEW_LINE>getPatentPlanInfoListResponse.setPageSize<MASK><NEW_LINE>getPatentPlanInfoListResponse.setTotalPageNum(_ctx.integerValue("GetPatentPlanInfoListResponse.TotalPageNum"));<NEW_LINE>List<Produces> data = new ArrayList<Produces>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetPatentPlanInfoListResponse.Data.Length"); i++) {<NEW_LINE>Produces produces = new Produces();<NEW_LINE>produces.setOwner(_ctx.stringValue("GetPatentPlanInfoListResponse.Data[" + i + "].Owner"));<NEW_LINE>produces.setPlanId(_ctx.longValue("GetPatentPlanInfoListResponse.Data[" + i + "].PlanId"));<NEW_LINE>produces.setName(_ctx.stringValue("GetPatentPlanInfoListResponse.Data[" + i + "].Name"));<NEW_LINE>produces.setContact(_ctx.stringValue("GetPatentPlanInfoListResponse.Data[" + i + "].Contact"));<NEW_LINE>produces.setWarnDays(_ctx.integerValue("GetPatentPlanInfoListResponse.Data[" + i + "].WarnDays"));<NEW_LINE>data.add(produces);<NEW_LINE>}<NEW_LINE>getPatentPlanInfoListResponse.setData(data);<NEW_LINE>return getPatentPlanInfoListResponse;<NEW_LINE>}
(_ctx.integerValue("GetPatentPlanInfoListResponse.PageSize"));
1,094,764
final DescribeReservedCacheNodesResult executeDescribeReservedCacheNodes(DescribeReservedCacheNodesRequest describeReservedCacheNodesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReservedCacheNodesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeReservedCacheNodesRequest> request = null;<NEW_LINE>Response<DescribeReservedCacheNodesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeReservedCacheNodesRequestMarshaller().marshall(super.beforeMarshalling(describeReservedCacheNodesRequest));<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, "ElastiCache");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeReservedCacheNodes");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeReservedCacheNodesResult> responseHandler = new StaxResponseHandler<DescribeReservedCacheNodesResult>(new DescribeReservedCacheNodesResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
927,388
public static void main(final String[] args) {<NEW_LINE>final String bootstrapServers = args.length > 0 ? args[0] : "localhost:9092";<NEW_LINE>// Kafka Streams configuration<NEW_LINE>final Properties streamsConfiguration = new Properties();<NEW_LINE>// Give the Streams application a unique name. The name must be unique in the Kafka cluster<NEW_LINE>// against which the application is run.<NEW_LINE>streamsConfiguration.put(StreamsConfig.APPLICATION_ID_CONFIG, "application-reset-demo");<NEW_LINE>streamsConfiguration.put(StreamsConfig.CLIENT_ID_CONFIG, "application-reset-demo-client");<NEW_LINE>// Where to find Kafka broker(s).<NEW_LINE>streamsConfiguration.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);<NEW_LINE>// Specify default (de)serializers for record keys and for record values.<NEW_LINE>streamsConfiguration.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.<MASK><NEW_LINE>streamsConfiguration.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass());<NEW_LINE>// Read the topic from the very beginning if no previous consumer offsets are found for this app.<NEW_LINE>// Resetting an app will set any existing consumer offsets to zero,<NEW_LINE>// so setting this config combined with resetting will cause the application to re-process all the input data in the topic.<NEW_LINE>streamsConfiguration.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");<NEW_LINE>final boolean doReset = args.length > 1 && args[1].equals("--reset");<NEW_LINE>final KafkaStreams streams = buildKafkaStreams(streamsConfiguration);<NEW_LINE>// Add shutdown hook to respond to SIGTERM and gracefully close Kafka Streams<NEW_LINE>Runtime.getRuntime().addShutdownHook(new Thread(streams::close));<NEW_LINE>// Delete the application's local state on reset<NEW_LINE>if (doReset) {<NEW_LINE>streams.cleanUp();<NEW_LINE>}<NEW_LINE>startKafkaStreamsSynchronously(streams);<NEW_LINE>}
String().getClass());
820,199
public IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId, Boolean displayIp, String ipaddress) throws ResourceAllocationException, InsufficientAddressCapacityException, ConcurrentOperationException {<NEW_LINE>Account caller = CallContext.current().getCallingAccount();<NEW_LINE>long callerUserId = CallContext.current().getCallingUserId();<NEW_LINE>DataCenter zone = _entityMgr.findById(DataCenter.class, zoneId);<NEW_LINE>if (networkId != null) {<NEW_LINE>Network network = _networksDao.findById(networkId);<NEW_LINE>if (network == null) {<NEW_LINE>throw new InvalidParameterValueException("Invalid network id is given");<NEW_LINE>}<NEW_LINE>if (network.getGuestType() == Network.GuestType.Shared) {<NEW_LINE>if (zone == null) {<NEW_LINE>throw new InvalidParameterValueException("Invalid zone Id is given");<NEW_LINE>}<NEW_LINE>// if shared network in the advanced zone, then check the caller against the network for 'AccessType.UseNetwork'<NEW_LINE>if (zone.getNetworkType() == NetworkType.Advanced) {<NEW_LINE>if (isSharedNetworkOfferingWithServices(network.getNetworkOfferingId())) {<NEW_LINE>_accountMgr.checkAccess(caller, AccessType.UseEntry, false, network);<NEW_LINE>if (s_logger.isDebugEnabled()) {<NEW_LINE>s_logger.debug("Associate IP address called by the user " + callerUserId + <MASK><NEW_LINE>}<NEW_LINE>return _ipAddrMgr.allocateIp(ipOwner, false, caller, callerUserId, zone, displayIp, ipaddress);<NEW_LINE>} else {<NEW_LINE>throw new InvalidParameterValueException("Associate IP address can only be called on the shared networks in the advanced zone" + " with Firewall/Source Nat/Static Nat/Port Forwarding/Load balancing services enabled");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>_accountMgr.checkAccess(caller, null, false, ipOwner);<NEW_LINE>}<NEW_LINE>return _ipAddrMgr.allocateIp(ipOwner, false, caller, callerUserId, zone, displayIp, ipaddress);<NEW_LINE>}
" account " + ipOwner.getId());
846,456
private static InscriberRecipe makeNamePressRecipe(ItemStack input, ItemStack plateA, ItemStack plateB) {<NEW_LINE>String name = "";<NEW_LINE>if (!plateA.isEmpty()) {<NEW_LINE>final <MASK><NEW_LINE>name += tag.getString(NamePressItem.TAG_INSCRIBE_NAME);<NEW_LINE>}<NEW_LINE>if (!plateB.isEmpty()) {<NEW_LINE>final CompoundTag tag = plateB.getOrCreateTag();<NEW_LINE>name += " " + tag.getString(NamePressItem.TAG_INSCRIBE_NAME);<NEW_LINE>}<NEW_LINE>final Ingredient startingItem = Ingredient.of(input.copy());<NEW_LINE>final ItemStack renamedItem = input.copy();<NEW_LINE>if (!name.isEmpty()) {<NEW_LINE>renamedItem.setHoverName(new TextComponent(name));<NEW_LINE>} else {<NEW_LINE>renamedItem.setHoverName(null);<NEW_LINE>}<NEW_LINE>final InscriberProcessType type = InscriberProcessType.INSCRIBE;<NEW_LINE>return new InscriberRecipe(NAMEPLATE_RECIPE_ID, startingItem, renamedItem, plateA.isEmpty() ? Ingredient.EMPTY : Ingredient.of(plateA), plateB.isEmpty() ? Ingredient.EMPTY : Ingredient.of(plateB), type);<NEW_LINE>}
CompoundTag tag = plateA.getOrCreateTag();
994,392
public FieldInitializers build() throws AttrLookupException {<NEW_LINE>Map<ResourceType, Collection<FieldInitializer>> initializers = new EnumMap<>(ResourceType.class);<NEW_LINE>Map<ResourceType, Integer> typeIdMap = chooseTypeIds();<NEW_LINE>Map<String, Integer> attrAssignments = assignAttrIds(typeIdMap.get(ResourceType.ATTR));<NEW_LINE>for (Map.Entry<ResourceType, SortedMap<String, ResourceLinkageInfo>> fieldEntries : innerClasses.entrySet()) {<NEW_LINE>ResourceType type = fieldEntries.getKey();<NEW_LINE>SortedMap<String, ResourceLinkageInfo> sortedFields = fieldEntries.getValue();<NEW_LINE>ImmutableList<FieldInitializer> fields;<NEW_LINE>if (type == ResourceType.STYLEABLE) {<NEW_LINE>fields = getStyleableInitializers(attrAssignments, sortedFields);<NEW_LINE>} else if (type == ResourceType.ATTR) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>int typeId = typeIdMap.get(type);<NEW_LINE>fields = getResourceInitializers(typeId, sortedFields);<NEW_LINE>}<NEW_LINE>// The maximum number of Java fields is 2^16.<NEW_LINE>// See the JVM reference "4.11. Limitations of the Java Virtual Machine."<NEW_LINE>Preconditions.checkArgument(fields.size() < (1 << 16));<NEW_LINE>initializers.put(type, fields);<NEW_LINE>}<NEW_LINE>return FieldInitializers.copyOf(initializers);<NEW_LINE>}
fields = getAttrInitializers(attrAssignments, sortedFields);
874,886
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {<NEW_LINE>if (owner.equals("com/sun/btrace/BTraceRuntime")) {<NEW_LINE>if (name.equals("enter")) {<NEW_LINE>if (desc.equals("(Lcom/sun/btrace/BTraceRuntime;)Z")) {<NEW_LINE>visitMethodInsn(INVOKESTATIC, Constants.BTRACERTACCESS_INTERNAL, name, "(" + Constants.BTRACERTACCESS_DESC + ")Z", itf);<NEW_LINE>} else {<NEW_LINE>visitFieldInsn(GETSTATIC, cName, "runtime", Constants.BTRACERTACCESS_DESC);<NEW_LINE>visitMethodInsn(INVOKEVIRTUAL, Constants.<MASK><NEW_LINE>}<NEW_LINE>} else if (name.equals("forClass")) {<NEW_LINE>desc = desc.replace("com/sun/btrace/shared/", "org/openjdk/btrace/core/handlers/");<NEW_LINE>desc = desc.replace(")Lcom/sun/btrace/BTraceRuntime;", ")" + Constants.BTRACERTACCESS_DESC);<NEW_LINE>super.visitMethodInsn(opcode, Constants.BTRACERTACCESS_INTERNAL, name, desc, itf);<NEW_LINE>} else {<NEW_LINE>super.visitMethodInsn(INVOKESTATIC, Constants.BTRACERT_INTERNAL, name, desc, itf);<NEW_LINE>}<NEW_LINE>} else if (owner.startsWith("com/sun/btrace/BTraceUtils")) {<NEW_LINE>super.visitMethodInsn(INVOKESTATIC, Constants.BTRACE_UTILS, name, desc, itf);<NEW_LINE>} else if (owner.startsWith("com/sun/btrace/services/")) {<NEW_LINE>owner = owner.replace("com/sun/btrace/services/", "org/openjdk/btrace/services/");<NEW_LINE>desc = desc.replace("com/sun/btrace/BTraceRuntime", "org/openjdk/btrace/runtime/BTraceRuntimeAccess");<NEW_LINE>super.visitMethodInsn(opcode, owner, name, desc, itf);<NEW_LINE>} else {<NEW_LINE>owner = owner.replace("com/sun/btrace/shared/", "org/openjdk/btrace/core/handlers/");<NEW_LINE>super.visitMethodInsn(opcode, owner, name, desc, itf);<NEW_LINE>}<NEW_LINE>}
BTRACERTACCESS_INTERNAL, name, "()Z", itf);
1,422,902
public static BakedQuad createBakedQuad(VertexFormat format, Vec3[] vertices, Direction facing, TextureAtlasSprite sprite, double[] uvs, float[] colour, boolean invert, float[] alpha, boolean smartLighting, BlockPos basePos) {<NEW_LINE>BakedQuadBuilder builder = new BakedQuadBuilder(sprite);<NEW_LINE>builder.setQuadOrientation(facing);<NEW_LINE>builder.setApplyDiffuseLighting(true);<NEW_LINE>Vec3i normalInt = facing.getNormal();<NEW_LINE>Vec3 faceNormal = new Vec3(normalInt.getX(), normalInt.getY(), normalInt.getZ());<NEW_LINE>int vId = invert ? 3 : 0;<NEW_LINE>int u = vId > 1 ? 2 : 0;<NEW_LINE>putVertexData(format, builder, vertices[vId], faceNormal, uvs[u], uvs[1], sprite<MASK><NEW_LINE>vId = invert ? 2 : 1;<NEW_LINE>u = vId > 1 ? 2 : 0;<NEW_LINE>putVertexData(format, builder, vertices[vId], faceNormal, uvs[u], uvs[3], sprite, colour, alpha[vId]);<NEW_LINE>vId = invert ? 1 : 2;<NEW_LINE>u = vId > 1 ? 2 : 0;<NEW_LINE>putVertexData(format, builder, vertices[vId], faceNormal, uvs[u], uvs[3], sprite, colour, alpha[vId]);<NEW_LINE>vId = invert ? 0 : 3;<NEW_LINE>u = vId > 1 ? 2 : 0;<NEW_LINE>putVertexData(format, builder, vertices[vId], faceNormal, uvs[u], uvs[1], sprite, colour, alpha[vId]);<NEW_LINE>BakedQuad tmp = builder.build();<NEW_LINE>return smartLighting ? new SmartLightingQuad(tmp.getVertices(), -1, facing, sprite, basePos) : tmp;<NEW_LINE>}
, colour, alpha[vId]);
1,223,359
protected ISerializationConverter<Point.Builder> createExternalConverter(LogicalType type) {<NEW_LINE>switch(type.getTypeRoot()) {<NEW_LINE>case VARCHAR:<NEW_LINE>return (val, index, builder) -> {<NEW_LINE>builder.addField(fieldNameList.get(index), val.getString<MASK><NEW_LINE>};<NEW_LINE>case FLOAT:<NEW_LINE>return (val, index, builder) -> {<NEW_LINE>builder.addField(fieldNameList.get(index), val.getDouble(index));<NEW_LINE>};<NEW_LINE>case INTEGER:<NEW_LINE>return (val, index, builder) -> {<NEW_LINE>builder.addField(fieldNameList.get(index), val.getLong(index));<NEW_LINE>};<NEW_LINE>case BOOLEAN:<NEW_LINE>return (val, index, builder) -> {<NEW_LINE>builder.addField(fieldNameList.get(index), val.getBoolean(index));<NEW_LINE>};<NEW_LINE>case BIGINT:<NEW_LINE>return (val, index, builder) -> {<NEW_LINE>// Only timstamp support be bigint,however it is processed in specicalField<NEW_LINE>};<NEW_LINE>default:<NEW_LINE>throw new UnsupportedOperationException("Unsupported type:" + type);<NEW_LINE>}<NEW_LINE>}
(index).toString());
1,625,002
private static void decodeValues(Inspector values, Tensor.Builder builder) {<NEW_LINE>if (!(builder instanceof IndexedTensor.BoundBuilder))<NEW_LINE>throw new IllegalArgumentException("The 'values' field can only be used with dense tensors. " + "Use 'cells' or 'blocks' instead");<NEW_LINE>IndexedTensor.BoundBuilder indexedBuilder = (IndexedTensor.BoundBuilder) builder;<NEW_LINE>if (values.type() == Type.STRING) {<NEW_LINE>double[] decoded = decodeHexString(values.asString(), builder.type().valueType());<NEW_LINE>if (decoded.length == 0)<NEW_LINE>throw new IllegalArgumentException("The 'values' string does not contain any values");<NEW_LINE>for (int i = 0; i < decoded.length; i++) {<NEW_LINE>indexedBuilder.cellByDirectIndex<MASK><NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (values.type() != Type.ARRAY)<NEW_LINE>throw new IllegalArgumentException("Excepted 'values' to contain an array, not " + values.type());<NEW_LINE>if (values.entries() == 0)<NEW_LINE>throw new IllegalArgumentException("The 'values' array does not contain any values");<NEW_LINE>MutableInteger index = new MutableInteger(0);<NEW_LINE>values.traverse((ArrayTraverser) (__, value) -> {<NEW_LINE>if (value.type() != Type.LONG && value.type() != Type.DOUBLE) {<NEW_LINE>throw new IllegalArgumentException("Excepted the values array to contain numbers, not " + value.type());<NEW_LINE>}<NEW_LINE>indexedBuilder.cellByDirectIndex(index.next(), value.asDouble());<NEW_LINE>});<NEW_LINE>}
(i, decoded[i]);
1,068,836
public void load(Project project) {<NEW_LINE>PropertiesComponent p = PropertiesComponent.getInstance(project);<NEW_LINE>cores = p.getInt(CORES_EVOSUITE_PARAM, 1);<NEW_LINE>memory = p.getInt(MEMORY_EVOSUITE_PARAM, 2000);<NEW_LINE>time = p.getInt(TIME_EVOSUITE_PARAM, 3);<NEW_LINE>folder = p.getValue(TARGET_FOLDER_EVOSUITE_PARAM, "src/evo");<NEW_LINE>String envJavaHome = System.getenv("JAVA_HOME");<NEW_LINE>javaHome = p.getValue(JAVA_HOME, <MASK><NEW_LINE>mvnLocation = p.getValue(MVN_LOCATION, "");<NEW_LINE>evosuiteJarLocation = p.getValue(EVOSUITE_JAR_LOCATION, "");<NEW_LINE>executionMode = p.getValue(EXECUTION_MODE, EXECUTION_MODE_MVN);<NEW_LINE>guiWidth = p.getInt(GUI_DIALOG_WIDTH, 570);<NEW_LINE>guiHeight = p.getInt(GUI_DIALOG_HEIGHT, 300);<NEW_LINE>}
envJavaHome != null ? envJavaHome : "");
1,217,665
public Entry<E, P> pop() {<NEW_LINE>Node<E, P<MASK><NEW_LINE>Entry<E, P> result;<NEW_LINE>if (node == null) {<NEW_LINE>// Queue is empty<NEW_LINE>return null;<NEW_LINE>} else if (node.head.next == null) {<NEW_LINE>// There are no more entries attached to this key<NEW_LINE>// Poll from queue and remove from map.<NEW_LINE>node = queue.poll();<NEW_LINE>map.remove(keyFunction.convert(node.head.entity));<NEW_LINE>result = new Entry<>(node);<NEW_LINE>} else {<NEW_LINE>result = new Entry<>(node);<NEW_LINE>node.head = node.head.next;<NEW_LINE>if (order.compare(result.priority, node.head.priority) != 0) {<NEW_LINE>// node needs to be reinserted into queue<NEW_LINE>reinsert(node);<NEW_LINE>}<NEW_LINE>// Otherwise we can leave at front of queue as priority is the same<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
> node = queue.peek();
1,274,682
private ExecutionResults runJDKUninstallerWindows(Progress progress, File location) throws UninstallationException {<NEW_LINE>ExecutionResults results = null;<NEW_LINE>try {<NEW_LINE>String id = getInstallationID(location);<NEW_LINE>if (id != null) {<NEW_LINE>LogManager.log("... uninstall ID : " + id);<NEW_LINE>final File logFile = getLog("jdk_uninstall");<NEW_LINE>final String[] commands;<NEW_LINE>if (logFile != null) {<NEW_LINE>commands = new String[] { "msiexec.exe", "/qn", "/x", id, "/log", logFile.getAbsolutePath() };<NEW_LINE>} else {<NEW_LINE>commands = new String[] { "msiexec.exe", "/qn", "/x", id };<NEW_LINE>}<NEW_LINE>progress.setDetail(PROGRESS_DETAIL_RUNNING_JDK_UNINSTALLER);<NEW_LINE>ProgressThread progressThread = new ProgressThread(progress, new File[] { location }, -1 * FileUtils.getSize(location));<NEW_LINE>try {<NEW_LINE>progressThread.start();<NEW_LINE>return SystemUtils.executeCommand(commands);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new UninstallationException(ResourceUtils.getString(ConfigurationLogic<MASK><NEW_LINE>} finally {<NEW_LINE>progressThread.finish();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LogManager.log("... cannot fing JDK in the uninstall section");<NEW_LINE>}<NEW_LINE>} catch (NativeException e) {<NEW_LINE>throw new UninstallationException(ERROR_UNINSTALL_JDK_ERROR_KEY, e);<NEW_LINE>} finally {<NEW_LINE>progress.setPercentage(progress.COMPLETE);<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
.class, ERROR_UNINSTALL_JDK_ERROR_KEY), e);
276,448
private void updateVisibility() {<NEW_LINE>if (mBanners == null)<NEW_LINE>throw new AssertionError("Banners must be non-null at this point!");<NEW_LINE>UiUtils.hideIf(hasErrorOccurred() || mCurrentAd == null, mContainerView);<NEW_LINE>if (mCurrentAd == null)<NEW_LINE>throw new AssertionError("Banners must be non-null at this point!");<NEW_LINE>UiUtils.showIf(mCurrentAd.getType().showAdChoiceIcon(), mAdChoices);<NEW_LINE>PurchaseController<?> purchaseController = mAdsRemovalProvider.getAdsRemovalPurchaseController();<NEW_LINE>boolean showRemovalButtons = purchaseController != null && purchaseController.isPurchaseSupported();<NEW_LINE>UiUtils.showIf(showRemovalButtons, mAdsRemovalIcon, mAdsRemovalButton);<NEW_LINE>UiUtils.show(mIcon, mTitle, mMessage, mActionSmall, mActionContainer, mActionLarge, mAdsRemovalButton, mAdChoicesLabel);<NEW_LINE>if (isDetailsState(mState))<NEW_LINE>UiUtils.hide(mActionSmall);<NEW_LINE>else<NEW_LINE>UiUtils.hide(<MASK><NEW_LINE>UiUtils.show(mBannerView);<NEW_LINE>}
mActionContainer, mActionLarge, mAdsRemovalButton, mIcon);
686,741
public void updateAllProviders(List<ProviderGroup> providerGroups) {<NEW_LINE>List<ProviderGroup> oldProviderGroups = new ArrayList<ProviderGroup>(addressHolder.getProviderGroups());<NEW_LINE>int count = 0;<NEW_LINE>if (providerGroups != null) {<NEW_LINE>for (ProviderGroup providerGroup : providerGroups) {<NEW_LINE>checkProviderInfo(providerGroup);<NEW_LINE>count += providerGroup.size();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (count == 0) {<NEW_LINE>Collection<ProviderInfo> currentProviderList = currentProviderList();<NEW_LINE>addressHolder.updateAllProviders(providerGroups);<NEW_LINE>if (CommonUtils.isNotEmpty(currentProviderList)) {<NEW_LINE>if (LOGGER.isWarnEnabled(consumerConfig.getAppName())) {<NEW_LINE>LOGGER.warnWithApp(consumerConfig.getAppName(), "Provider list is emptied, may be all " + "providers has been closed, or this consumer has been add to blacklist");<NEW_LINE>closeTransports();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>addressHolder.updateAllProviders(providerGroups);<NEW_LINE>connectionHolder.updateAllProviders(providerGroups);<NEW_LINE>}<NEW_LINE>if (EventBus.isEnable(ProviderInfoUpdateAllEvent.class)) {<NEW_LINE>ProviderInfoUpdateAllEvent event = new <MASK><NEW_LINE>EventBus.post(event);<NEW_LINE>}<NEW_LINE>}
ProviderInfoUpdateAllEvent(consumerConfig, oldProviderGroups, providerGroups);
905,186
public static void toJSON(OutputWriter outputWriter, Routes.FindUrlBuilder<Long> urlBuilder, AccessToken token) {<NEW_LINE>outputWriter.addLinks(linksWriter -> {<NEW_LINE>if (token.persisted()) {<NEW_LINE>linksWriter.addLink("self", urlBuilder.find(token.getId()));<NEW_LINE>}<NEW_LINE>linksWriter.addAbsoluteLink("doc", urlBuilder.doc()).addLink("find", urlBuilder.find());<NEW_LINE>});<NEW_LINE>if (token.persisted()) {<NEW_LINE>outputWriter.add("id", token.getId());<NEW_LINE>}<NEW_LINE>outputWriter.add("description", token.getDescription()).add("username", token.getUsername()).add("revoked", token.isRevoked()).add("revoke_cause", token.getRevokeCause()).add("revoked_by", token.getRevokedBy()).add("revoked_at", token.getRevokedAt()).add("created_at", token.getCreatedAt()).add("last_used_at", token.getLastUsed());<NEW_LINE>if (urlBuilder instanceof Routes.AdminUserAccessToken) {<NEW_LINE>outputWriter.add("revoked_because_user_deleted", token.isDeletedBecauseUserDeleted());<NEW_LINE>}<NEW_LINE>if (token instanceof AccessToken.AccessTokenWithDisplayValue && token.persisted()) {<NEW_LINE>outputWriter.addIfNotNull("token", ((AccessToken.AccessTokenWithDisplayValue<MASK><NEW_LINE>}<NEW_LINE>if (!token.errors().isEmpty()) {<NEW_LINE>outputWriter.addChild("errors", errorWriter -> new ErrorGetter(Collections.emptyMap()).toJSON(errorWriter, token));<NEW_LINE>}<NEW_LINE>}
) token).getDisplayValue());
1,166,613
protected void encodeInput(FacesContext context, SelectOneMenu menu, String clientId, List<SelectItem> selectItems, Object values, Object submittedValues, Converter converter) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String focusId = clientId + "_focus";<NEW_LINE>// input for accessibility<NEW_LINE><MASK><NEW_LINE>writer.writeAttribute("class", "ui-helper-hidden-accessible", null);<NEW_LINE>writer.startElement("input", null);<NEW_LINE>writer.writeAttribute("id", focusId, null);<NEW_LINE>writer.writeAttribute("name", focusId, null);<NEW_LINE>writer.writeAttribute("type", "text", null);<NEW_LINE>writer.writeAttribute("autocomplete", "off", null);<NEW_LINE>// for keyboard accessibility and ScreenReader<NEW_LINE>renderAccessibilityAttributes(context, menu);<NEW_LINE>renderPassThruAttributes(context, menu, HTML.TAB_INDEX);<NEW_LINE>renderDomEvents(context, menu, HTML.BLUR_FOCUS_EVENTS);<NEW_LINE>writer.endElement("input");<NEW_LINE>writer.endElement("div");<NEW_LINE>// hidden select<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.writeAttribute("class", "ui-helper-hidden-accessible", null);<NEW_LINE>encodeHiddenSelect(context, menu, clientId, selectItems, values, submittedValues, converter);<NEW_LINE>writer.endElement("div");<NEW_LINE>}
writer.startElement("div", null);
1,292,323
public void visit(ListItemNode node) {<NEW_LINE>if (node instanceof TaskListNode) {<NEW_LINE>// vsch: #185 handle GitHub style task list items, these are a bit messy because the <input> checkbox needs to be<NEW_LINE>// included inside the optional <p></p> first grand-child of the list item, first child is always RootNode<NEW_LINE>// because the list item text is recursively parsed.<NEW_LINE>Node firstChild = node.getChildren().get(0).getChildren().get(0);<NEW_LINE>boolean firstIsPara = firstChild instanceof ParaNode;<NEW_LINE>int indent = node.getChildren().size() > 1 ? 2 : 0;<NEW_LINE>boolean startWasNewLine = printer.endsWithNewLine();<NEW_LINE>printer.println().print("<li class=\"task-list-item\">").indent(indent);<NEW_LINE>if (firstIsPara) {<NEW_LINE>printer.println().print("<p>");<NEW_LINE>printer.print("<input type=\"checkbox\" class=\"task-list-item-checkbox\"" + (((TaskListNode) node).isDone() ? " checked=\"checked\"" : "") + " disabled=\"disabled\"></input>");<NEW_LINE>visitChildren((SuperNode) firstChild);<NEW_LINE>// render the other children, the p tag is taken care of here<NEW_LINE>visitChildrenSkipFirst(node);<NEW_LINE>printer.print("</p>");<NEW_LINE>} else {<NEW_LINE>printer.print("<input type=\"checkbox\" class=\"task-list-item-checkbox\"" + (((TaskListNode) node).isDone() ? " checked=\"checked\"" : "") + " disabled=\"disabled\"></input>");<NEW_LINE>visitChildren(node);<NEW_LINE>}<NEW_LINE>printer.indent(-indent).printchkln(indent != 0).print<MASK><NEW_LINE>} else {<NEW_LINE>printConditionallyIndentedTag(node, "li");<NEW_LINE>}<NEW_LINE>}
("</li>").printchkln(startWasNewLine);
647,790
protected final ObjectMetadata updateMetadataWithContentCryptoMaterial(ObjectMetadata metadata, File file, ContentCryptoMaterial contentCryptoMaterial) {<NEW_LINE>if (metadata == null)<NEW_LINE>metadata = new ObjectMetadata();<NEW_LINE>if (file != null) {<NEW_LINE>Mimetypes mimetypes = Mimetypes.getInstance();<NEW_LINE>metadata.setContentType(mimetypes.getMimetype(file));<NEW_LINE>}<NEW_LINE>// Put the encrypted content encrypt key into the object meatadata<NEW_LINE>byte[] encryptedCEK = contentCryptoMaterial.getEncryptedCEK();<NEW_LINE>metadata.addUserMetadata(CryptoHeaders.CRYPTO_KEY, BinaryUtil.toBase64String(encryptedCEK));<NEW_LINE>// Put the iv into the object metadata<NEW_LINE>byte[<MASK><NEW_LINE>metadata.addUserMetadata(CryptoHeaders.CRYPTO_IV, BinaryUtil.toBase64String(encryptedIV));<NEW_LINE>// Put the content encrypt key algorithm into the object metadata<NEW_LINE>String contentCryptoAlgo = contentCryptoMaterial.getContentCryptoAlgorithm();<NEW_LINE>metadata.addUserMetadata(CryptoHeaders.CRYPTO_CEK_ALG, contentCryptoAlgo);<NEW_LINE>// Put the key wrap algorithm into the object metadata<NEW_LINE>String keyWrapAlgo = contentCryptoMaterial.getKeyWrapAlgorithm();<NEW_LINE>metadata.addUserMetadata(CryptoHeaders.CRYPTO_WRAP_ALG, keyWrapAlgo);<NEW_LINE>// Put the crypto description into the object metadata<NEW_LINE>Map<String, String> materialDesc = contentCryptoMaterial.getMaterialsDescription();<NEW_LINE>if (materialDesc != null && materialDesc.size() > 0) {<NEW_LINE>JSONObject descJson = new JSONObject(materialDesc);<NEW_LINE>String descStr = descJson.toString();<NEW_LINE>metadata.addUserMetadata(CryptoHeaders.CRYPTO_MATDESC, descStr);<NEW_LINE>}<NEW_LINE>return metadata;<NEW_LINE>}
] encryptedIV = contentCryptoMaterial.getEncryptedIV();
446,986
public void visitLdcInsn(Class value) {<NEW_LINE>Type type = Type.getType(ASMUtils.desc(value));<NEW_LINE>lastBytecodeOffset = code.length;<NEW_LINE>// Add the instruction to the bytecode of the method.<NEW_LINE>Symbol constantSymbol;<NEW_LINE>int typeSort = type.getSort();<NEW_LINE>if (typeSort == Type.OBJECT) {<NEW_LINE>constantSymbol = symbolTable.addConstantClass(type.getInternalName());<NEW_LINE>} else {<NEW_LINE>// type is a primitive or array type.<NEW_LINE>constantSymbol = symbolTable.addConstantClass(type.getDescriptor());<NEW_LINE>}<NEW_LINE>int constantIndex = constantSymbol.index;<NEW_LINE>if (constantIndex >= 256) {<NEW_LINE>code.put12(Constants.LDC_W, constantIndex);<NEW_LINE>} else {<NEW_LINE>code.<MASK><NEW_LINE>}<NEW_LINE>// If needed, update the maximum stack size and number of locals, and stack map frames.<NEW_LINE>if (currentBasicBlock != null) {<NEW_LINE>currentBasicBlock.frame.execute(Opcodes.LDC, 0, constantSymbol, symbolTable);<NEW_LINE>}<NEW_LINE>}
put11(Opcodes.LDC, constantIndex);
258,185
public ListJournalS3ExportsForLedgerResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListJournalS3ExportsForLedgerResult listJournalS3ExportsForLedgerResult = new ListJournalS3ExportsForLedgerResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return listJournalS3ExportsForLedgerResult;<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("JournalS3Exports", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listJournalS3ExportsForLedgerResult.setJournalS3Exports(new ListUnmarshaller<JournalS3ExportDescription>(JournalS3ExportDescriptionJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listJournalS3ExportsForLedgerResult.setNextToken(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listJournalS3ExportsForLedgerResult;<NEW_LINE>}
class).unmarshall(context));
75,489
public static void openBundleWiringError(Throwable t) {<NEW_LINE>List<Status> childStatuses = new ArrayList<>(t.getStackTrace().length);<NEW_LINE>for (StackTraceElement stackTrace : t.getStackTrace()) {<NEW_LINE>Status status = new Status(IStatus.ERROR, BootDashActivator.<MASK><NEW_LINE>childStatuses.add(status);<NEW_LINE>}<NEW_LINE>MultiStatus status = new MultiStatus(BootDashActivator.PLUGIN_ID, IStatus.ERROR, childStatuses.toArray(new Status[] {}), t.toString(), t);<NEW_LINE>Display display = Display.getCurrent();<NEW_LINE>if (display != null && !display.isDisposed()) {<NEW_LINE>ErrorDialog.openError(display.getActiveShell(), "Error Wiring Bundles", MESSAGE_WIRING_ERROR, status);<NEW_LINE>} else {<NEW_LINE>display = PlatformUI.getWorkbench().getDisplay();<NEW_LINE>if (display != null && !display.isDisposed()) {<NEW_LINE>display.asyncExec(() -> ErrorDialog.openError(Display.getCurrent().getActiveShell(), "Error Wiring Bundles", MESSAGE_WIRING_ERROR, status));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
PLUGIN_ID, stackTrace.toString());
1,531,192
default Map<String, ? extends Object> asMap() {<NEW_LINE>final Builder<String, Object> result = ImmutableMap.<String, Object>builder();<NEW_LINE>if (getCheck_NetAmtToInvoice() != null) {<NEW_LINE>// during enqueuing this result might be overwritten by a specific value<NEW_LINE>result.put(InvoicingParams.PARA_Check_NetAmtToInvoice, getCheck_NetAmtToInvoice());<NEW_LINE>}<NEW_LINE>if (getDateAcct() != null) {<NEW_LINE>result.put(InvoicingParams.PARA_DateAcct, getDateAcct());<NEW_LINE>}<NEW_LINE>if (getDateInvoiced() != null) {<NEW_LINE>result.put(InvoicingParams.PARA_DateInvoiced, getDateInvoiced());<NEW_LINE>}<NEW_LINE>if (getPOReference() != null) {<NEW_LINE>result.put(InvoicingParams.PARA_POReference, getPOReference());<NEW_LINE>}<NEW_LINE>result.put(InvoicingParams.PARA_IgnoreInvoiceSchedule, isIgnoreInvoiceSchedule());<NEW_LINE>result.put(InvoicingParams.PARA_IsConsolidateApprovedICs, isConsolidateApprovedICs());<NEW_LINE>result.put(InvoicingParams.PARA_IsUpdateLocationAndContactForInvoice, isUpdateLocationAndContactForInvoice());<NEW_LINE>result.put(<MASK><NEW_LINE>result.put(InvoicingParams.PARA_SupplementMissingPaymentTermIds, isSupplementMissingPaymentTermIds());<NEW_LINE>return result.build();<NEW_LINE>}
InvoicingParams.PARA_OnlyApprovedForInvoicing, isOnlyApprovedForInvoicing());
544,017
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Application app = emc.find(id, Application.class);<NEW_LINE>if (null == app) {<NEW_LINE>throw new ExceptionEntityNotExist(id, Application.class);<NEW_LINE>}<NEW_LINE>Wo wo = Wo.copier.copy(app);<NEW_LINE>wo.setAttList(emc.listEqual(Attachment.class, Attachment.application_FIELDNAME, wo.getId()));<NEW_LINE>InstallLog installLog = emc.find(id, InstallLog.class);<NEW_LINE>if (installLog != null && CommonStatus.VALID.getValue().equals(installLog.getStatus())) {<NEW_LINE>wo.<MASK><NEW_LINE>} else {<NEW_LINE>wo.setInstalledVersion("");<NEW_LINE>}<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
setInstalledVersion(installLog.getVersion());
1,777,907
public void executeUpgrade() throws DotDataException, DotRuntimeException {<NEW_LINE>DotConnect dc = new DotConnect();<NEW_LINE>String createTable = "Create table template_containers" + "(id varchar(36) NOT NULL primary key," + "template_id varchar(36) NOT NULL," + "container_id varchar(36) NOT NULL)";<NEW_LINE>if (DbConnectionFactory.isOracle())<NEW_LINE>createTable = createTable.replaceAll("varchar\\(", "varchar2\\(");<NEW_LINE>String createIndex = "create index idx_template_id on template_containers(template_id)";<NEW_LINE>String addTemplateFK = "alter table template_containers add constraint FK_template_id foreign key (template_id) references identifier(id)";<NEW_LINE>String addContainerFK = "alter table template_containers add constraint FK_container_id foreign key (container_id) references identifier(id)";<NEW_LINE>String template_container_relations = "Select child,template.identifier from tree,inode,template " + "where parent = template.inode and template.inode = inode.inode and " + "parent in(select inode from inode where type='template') and " + "child in(select id from identifier where asset_type='containers')";<NEW_LINE>String delete_template_containers = "Delete from tree where child in(select id from identifier where asset_type='containers') " + "and parent in(select inode from inode where type='template')";<NEW_LINE>HibernateUtil.startTransaction();<NEW_LINE>try {<NEW_LINE>if (DbConnectionFactory.isMsSql())<NEW_LINE>dc.executeStatement("SET TRANSACTION ISOLATION LEVEL READ COMMITTED");<NEW_LINE>dc.executeStatement(createTable);<NEW_LINE>dc.executeStatement(addTemplateFK);<NEW_LINE>dc.executeStatement(addContainerFK);<NEW_LINE>dc.executeStatement(createIndex);<NEW_LINE>dc.setSQL(template_container_relations);<NEW_LINE>List<Map<String, String><MASK><NEW_LINE>for (Map<String, String> relation : relations) {<NEW_LINE>String containerId = relation.get("child");<NEW_LINE>String templateId = relation.get("identifier");<NEW_LINE>String uuid = UUIDGenerator.generateUuid();<NEW_LINE>dc.setSQL("insert into template_containers(id,template_id,container_id) values(?,?,?)");<NEW_LINE>dc.addParam(uuid);<NEW_LINE>dc.addParam(templateId);<NEW_LINE>dc.addParam(containerId);<NEW_LINE>dc.loadResult();<NEW_LINE>}<NEW_LINE>dc.executeStatement(delete_template_containers);<NEW_LINE>} catch (Exception e) {<NEW_LINE>HibernateUtil.rollbackTransaction();<NEW_LINE>Logger.error(this, e.getMessage(), e);<NEW_LINE>}<NEW_LINE>HibernateUtil.closeAndCommitTransaction();<NEW_LINE>}
> relations = dc.loadResults();
1,836,162
public void run() {<NEW_LINE>if (configurable != myQueuedConfigurable)<NEW_LINE>return;<NEW_LINE>if (configurable == null) {<NEW_LINE>myTree.getSelectionModel().clearSelection();<NEW_LINE>myContext.fireSelected(null, OptionsTree.this);<NEW_LINE>} else {<NEW_LINE>myBuilder.getReady(this).doWhenDone(() -> {<NEW_LINE>if (configurable != myQueuedConfigurable)<NEW_LINE>return;<NEW_LINE>final ConfigurableNode <MASK><NEW_LINE>FilteringTreeStructure.FilteringNode editorUiNode = myBuilder.getVisibleNodeFor(configurableNode);<NEW_LINE>if (editorUiNode == null)<NEW_LINE>return;<NEW_LINE>if (!myBuilder.getSelectedElements().contains(editorUiNode)) {<NEW_LINE>myBuilder.select(editorUiNode, () -> fireSelected(configurable, callback));<NEW_LINE>} else {<NEW_LINE>myBuilder.scrollSelectionToVisible(() -> fireSelected(configurable, callback), false);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
configurableNode = myConfigurable2Node.get(configurable);
1,465,916
public static ListDelegatedAdministratorsResponse unmarshall(ListDelegatedAdministratorsResponse listDelegatedAdministratorsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDelegatedAdministratorsResponse.setRequestId(_ctx.stringValue("ListDelegatedAdministratorsResponse.RequestId"));<NEW_LINE>listDelegatedAdministratorsResponse.setTotalCount<MASK><NEW_LINE>listDelegatedAdministratorsResponse.setPageSize(_ctx.longValue("ListDelegatedAdministratorsResponse.PageSize"));<NEW_LINE>listDelegatedAdministratorsResponse.setPageNumber(_ctx.longValue("ListDelegatedAdministratorsResponse.PageNumber"));<NEW_LINE>List<Account> accounts = new ArrayList<Account>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListDelegatedAdministratorsResponse.Accounts.Length"); i++) {<NEW_LINE>Account account = new Account();<NEW_LINE>account.setAccountId(_ctx.stringValue("ListDelegatedAdministratorsResponse.Accounts[" + i + "].AccountId"));<NEW_LINE>account.setDisplayName(_ctx.stringValue("ListDelegatedAdministratorsResponse.Accounts[" + i + "].DisplayName"));<NEW_LINE>account.setJoinMethod(_ctx.stringValue("ListDelegatedAdministratorsResponse.Accounts[" + i + "].JoinMethod"));<NEW_LINE>account.setServicePrincipal(_ctx.stringValue("ListDelegatedAdministratorsResponse.Accounts[" + i + "].ServicePrincipal"));<NEW_LINE>account.setDelegationEnabledTime(_ctx.stringValue("ListDelegatedAdministratorsResponse.Accounts[" + i + "].DelegationEnabledTime"));<NEW_LINE>accounts.add(account);<NEW_LINE>}<NEW_LINE>listDelegatedAdministratorsResponse.setAccounts(accounts);<NEW_LINE>return listDelegatedAdministratorsResponse;<NEW_LINE>}
(_ctx.longValue("ListDelegatedAdministratorsResponse.TotalCount"));
926,139
public void onClick(final DialogInterface dialog, final int which) {<NEW_LINE>int i = 0;<NEW_LINE>if (!ExtUtils.isImageOrEpub(file)) {<NEW_LINE>if (which == i++) {<NEW_LINE>showsItemsDialog(a, chooseTitle, AppState.CONVERTERS.get("EPUB"));<NEW_LINE>}<NEW_LINE>if (which == i++) {<NEW_LINE>showsItemsDialog(a, chooseTitle, AppState.CONVERTERS.get("PDF"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (which == i++) {<NEW_LINE>ExtUtils.openWith(a, file);<NEW_LINE>} else if (which == i++) {<NEW_LINE><MASK><NEW_LINE>} else if (canDelete && which == i++) {<NEW_LINE>FileInformationDialog.dialogDelete(a, file, onDeleteAction);<NEW_LINE>} else if (isShowInfo && which == i++) {<NEW_LINE>FileInformationDialog.showFileInfoDialog(a, file, onDeleteAction);<NEW_LINE>}<NEW_LINE>}
ExtUtils.sendFileTo(a, file);
640,311
public static AddBulkPhoneNumbersResponse unmarshall(AddBulkPhoneNumbersResponse addBulkPhoneNumbersResponse, UnmarshallerContext context) {<NEW_LINE>addBulkPhoneNumbersResponse.setRequestId(context.stringValue("AddBulkPhoneNumbersResponse.RequestId"));<NEW_LINE>addBulkPhoneNumbersResponse.setSuccess(context.booleanValue("AddBulkPhoneNumbersResponse.Success"));<NEW_LINE>addBulkPhoneNumbersResponse.setCode(context.stringValue("AddBulkPhoneNumbersResponse.Code"));<NEW_LINE>addBulkPhoneNumbersResponse.setMessage(context.stringValue("AddBulkPhoneNumbersResponse.Message"));<NEW_LINE>addBulkPhoneNumbersResponse.setHttpStatusCode(context.integerValue("AddBulkPhoneNumbersResponse.HttpStatusCode"));<NEW_LINE>List<String> arrearagePhoneNumbers = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < context.lengthValue("AddBulkPhoneNumbersResponse.ArrearagePhoneNumbers.Length"); i++) {<NEW_LINE>arrearagePhoneNumbers.add(context.stringValue("AddBulkPhoneNumbersResponse.ArrearagePhoneNumbers[" + i + "]"));<NEW_LINE>}<NEW_LINE>addBulkPhoneNumbersResponse.setArrearagePhoneNumbers(arrearagePhoneNumbers);<NEW_LINE>List<String> failedPhoneNumbers = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < context.lengthValue("AddBulkPhoneNumbersResponse.FailedPhoneNumbers.Length"); i++) {<NEW_LINE>failedPhoneNumbers.add(context.stringValue("AddBulkPhoneNumbersResponse.FailedPhoneNumbers[" + i + "]"));<NEW_LINE>}<NEW_LINE>addBulkPhoneNumbersResponse.setFailedPhoneNumbers(failedPhoneNumbers);<NEW_LINE>List<String> userdPhoneNumbers = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < context.lengthValue("AddBulkPhoneNumbersResponse.UserdPhoneNumbers.Length"); i++) {<NEW_LINE>userdPhoneNumbers.add(context.stringValue("AddBulkPhoneNumbersResponse.UserdPhoneNumbers[" + i + "]"));<NEW_LINE>}<NEW_LINE>addBulkPhoneNumbersResponse.setUserdPhoneNumbers(userdPhoneNumbers);<NEW_LINE>List<PhoneNumber> phoneNumbers = new ArrayList<PhoneNumber>();<NEW_LINE>for (int i = 0; i < context.lengthValue("AddBulkPhoneNumbersResponse.PhoneNumbers.Length"); i++) {<NEW_LINE>PhoneNumber phoneNumber = new PhoneNumber();<NEW_LINE>phoneNumber.setPhoneNumberId(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].PhoneNumberId"));<NEW_LINE>phoneNumber.setInstanceId(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].InstanceId"));<NEW_LINE>phoneNumber.setNumber(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].Number"));<NEW_LINE>phoneNumber.setPhoneNumberDescription(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].PhoneNumberDescription"));<NEW_LINE>phoneNumber.setTestOnly(context.booleanValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].TestOnly"));<NEW_LINE>phoneNumber.setRemainingTime(context.integerValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].RemainingTime"));<NEW_LINE>phoneNumber.setAllowOutbound(context.booleanValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].AllowOutbound"));<NEW_LINE>phoneNumber.setUsage(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].Usage"));<NEW_LINE>phoneNumber.setTrunks(context.integerValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].Trunks"));<NEW_LINE>ContactFlow contactFlow = new ContactFlow();<NEW_LINE>contactFlow.setContactFlowId(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.ContactFlowId"));<NEW_LINE>contactFlow.setInstanceId(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.InstanceId"));<NEW_LINE>contactFlow.setContactFlowName(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.ContactFlowName"));<NEW_LINE>contactFlow.setContactFlowDescription(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.ContactFlowDescription"));<NEW_LINE>contactFlow.setType(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].ContactFlow.Type"));<NEW_LINE>phoneNumber.setContactFlow(contactFlow);<NEW_LINE>List<SkillGroup> skillGroups = new ArrayList<SkillGroup>();<NEW_LINE>for (int j = 0; j < context.lengthValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].SkillGroups.Length"); j++) {<NEW_LINE>SkillGroup skillGroup = new SkillGroup();<NEW_LINE>skillGroup.setSkillGroupId(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i <MASK><NEW_LINE>skillGroup.setSkillGroupName(context.stringValue("AddBulkPhoneNumbersResponse.PhoneNumbers[" + i + "].SkillGroups[" + j + "].SkillGroupName"));<NEW_LINE>skillGroups.add(skillGroup);<NEW_LINE>}<NEW_LINE>phoneNumber.setSkillGroups(skillGroups);<NEW_LINE>phoneNumbers.add(phoneNumber);<NEW_LINE>}<NEW_LINE>addBulkPhoneNumbersResponse.setPhoneNumbers(phoneNumbers);<NEW_LINE>return addBulkPhoneNumbersResponse;<NEW_LINE>}
+ "].SkillGroups[" + j + "].SkillGroupId"));
1,157,947
void fillEdgesCH(AStarEntry currEdge, PriorityQueue<AStarEntry> prioQueue, IntObjectMap<AStarEntry> bestWeightMap, EdgeExplorer explorer, boolean reverse) {<NEW_LINE>EdgeIterator iter = explorer.setBaseNode(currEdge.adjNode);<NEW_LINE>while (iter.next()) {<NEW_LINE>if (!accept(iter, currEdge.edge))<NEW_LINE>continue;<NEW_LINE><MASK><NEW_LINE>// Modification by Maxim Rylov: use originalEdge as the previousEdgeId<NEW_LINE>double tmpWeight = weighting.calcWeight(iter, reverse, currEdge.originalEdge) + currEdge.weight;<NEW_LINE>if (Double.isInfinite(tmpWeight))<NEW_LINE>continue;<NEW_LINE>AStarEntry aStarEntry = bestWeightMap.get(traversalId);<NEW_LINE>if (aStarEntry == null) {<NEW_LINE>aStarEntry = new AStarEntry(iter.getEdge(), iter.getAdjNode(), tmpWeight, tmpWeight);<NEW_LINE>// Modification by Maxim Rylov: Assign the original edge id.<NEW_LINE>aStarEntry.originalEdge = EdgeIteratorStateHelper.getOriginalEdge(iter);<NEW_LINE>bestWeightMap.put(traversalId, aStarEntry);<NEW_LINE>} else if (aStarEntry.weight > tmpWeight) {<NEW_LINE>prioQueue.remove(aStarEntry);<NEW_LINE>aStarEntry.edge = iter.getEdge();<NEW_LINE>aStarEntry.weight = tmpWeight;<NEW_LINE>aStarEntry.weightOfVisitedPath = tmpWeight;<NEW_LINE>} else<NEW_LINE>continue;<NEW_LINE>aStarEntry.parent = currEdge;<NEW_LINE>aStarEntry.time = calcTime(iter, currEdge, reverse);<NEW_LINE>prioQueue.add(aStarEntry);<NEW_LINE>updateBestPathCH(aStarEntry, traversalId, reverse);<NEW_LINE>}<NEW_LINE>}
int traversalId = iter.getAdjNode();
1,625,180
public void visitMethodCall(@NonNull JavaContext context, @NonNull UCallExpression node, @NonNull PsiMethod method) {<NEW_LINE>super.<MASK><NEW_LINE>JavaEvaluator evaluator = context.getEvaluator();<NEW_LINE>// if we have arguments, we're not writing to stdout, so it's an OK call<NEW_LINE>boolean hasArguments = node.getValueArgumentCount() != 0;<NEW_LINE>if (hasArguments || !evaluator.isMemberInSubClassOf(method, "java.lang.Throwable", false)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LintFix fix = // We don't need a semicolon here<NEW_LINE>LintFix.create().replace().select(node.asSourceString()).with("Timber.w(" + node.getReceiver().asSourceString() + ")").autoFix().build();<NEW_LINE>context.report(ISSUE, context.getCallLocation(node, true, true), DESCRIPTION, fix);<NEW_LINE>}
visitMethodCall(context, node, method);
1,064,727
public void configureEDIRoute(final DataFormat jaxb, final DecimalFormat decimalFormat) {<NEW_LINE>final String charset = Util.resolveProperty(getContext(), AbstractEDIRoute.EDI_STEPCOM_CHARSET_NAME);<NEW_LINE>final JaxbDataFormat dataFormat = new JaxbDataFormat(JAXB_INVOIC_CONTEXTPATH);<NEW_LINE>dataFormat.setCamelContext(getContext());<NEW_LINE>dataFormat.setEncoding(charset);<NEW_LINE>// FRESH-360: provide our own converter, so we don't anymore need to rely on the system's default charset when writing the EDI data to file.<NEW_LINE>final ReaderTypeConverter readerTypeConverter = new ReaderTypeConverter();<NEW_LINE>getContext().getTypeConverterRegistry().addTypeConverters(readerTypeConverter);<NEW_LINE>final String senderGln = Util.resolveProperty(getContext(), EDI_INVOICE_SENDER_GLN);<NEW_LINE>final String ownerId = Util.resolveProperty(getContext(), EDI_XML_OWNER_ID);<NEW_LINE>final String defaultEDIMessageDatePattern = Util.resolveProperty(getContext(), AbstractEDIRoute.EDI_ORDER_EDIMessageDatePattern);<NEW_LINE>final String feedbackMessageRoutingKey = Util.resolveProperty(getContext(), Constants.EP_AMQP_TO_MF_DURABLE_ROUTING_KEY);<NEW_LINE>final String remoteEndpoint = Util.resolveProperty(getContext(), OUTPUT_INVOIC_REMOTE, "");<NEW_LINE>final String[] endPointURIs;<NEW_LINE>if (// if we send everything to the remote-EP, then log what we send to file only on "TRACE" log level<NEW_LINE>Util.isEmpty(remoteEndpoint)) {<NEW_LINE>endPointURIs = new String[] { OUTPUT_INVOIC_LOCAL };<NEW_LINE>} else {<NEW_LINE>endPointURIs = new String[] { OUTPUT_INVOIC_LOCAL, remoteEndpoint };<NEW_LINE>}<NEW_LINE>from(EP_EDI_STEPCOM_XML_INVOICE_CONSUMER).routeId(ROUTE_ID).streamCaching().log(LoggingLevel.INFO, "Setting defaults as exchange properties...").setProperty(EDI_INVOICE_SENDER_GLN).constant(senderGln).setProperty(EDI_XML_OWNER_ID).constant(ownerId).setProperty(AbstractEDIRoute.EDI_ORDER_EDIMessageDatePattern).constant(defaultEDIMessageDatePattern).log(LoggingLevel.INFO, "Setting EDI feedback headers...").process(exchange -> {<NEW_LINE>// i'm sure that there are better ways, but we want the EDIFeedbackRoute to identify that the error is coming from *this* route.<NEW_LINE>exchange.getIn().setHeader(EDIXmlFeedbackHelper.HEADER_ROUTE_ID, ROUTE_ID);<NEW_LINE>final EDICctopInvoicVType xmlCctopInvoice = exchange.getIn().getBody(EDICctopInvoicVType.class);<NEW_LINE>exchange.getIn().setHeader(EDIXmlFeedbackHelper.<MASK><NEW_LINE>exchange.getIn().setHeader(EDIXmlFeedbackHelper.HEADER_RecordID, xmlCctopInvoice.getCInvoiceID().longValue());<NEW_LINE>}).log(LoggingLevel.INFO, "Converting XML Java Object -> EDI XML Java Object...").bean(StepComXMLInvoicBean.class, StepComXMLInvoicBean.METHOD_createXMLEDIData).log(LoggingLevel.INFO, "Marshalling EDI XML Java Object to XML...").marshal(dataFormat).log(LoggingLevel.INFO, "Output filename=${in.headers." + Exchange.FILE_NAME + "}; endpointUri=" + Arrays.toString(endPointURIs)).log(LoggingLevel.INFO, "Sending STEPcom-XML to the endpoint(s):\r\n" + body()).multicast().stopOnException().parallelProcessing(false).to(endPointURIs).end().log(LoggingLevel.INFO, "Creating ecosio feedback XML Java Object...").process(new EDIXmlSuccessFeedbackProcessor<>(EDIInvoiceFeedbackType.class, EDIInvoiceFeedback_QNAME, METHOD_setCInvoiceID)).log(LoggingLevel.INFO, "Marshalling XML Java Object feedback -> XML document...").marshal(jaxb).log(LoggingLevel.INFO, "Sending success response to metasfresh...").setHeader(// https://github.com/apache/camel/blob/master/components/camel-rabbitmq/src/main/docs/rabbitmq-component.adoc<NEW_LINE>RabbitMQConstants.ROUTING_KEY).// https://github.com/apache/camel/blob/master/components/camel-rabbitmq/src/main/docs/rabbitmq-component.adoc<NEW_LINE>simple(feedbackMessageRoutingKey).setHeader(RabbitMQConstants.CONTENT_ENCODING).simple(StandardCharsets.UTF_8.name()).to("{{" + Constants.EP_AMQP_TO_MF + "}}");<NEW_LINE>}
HEADER_ADClientValueAttr, xmlCctopInvoice.getADClientValueAttr());
323,378
public synchronized Future<Void> upgradeMetadata(ServerContext context, EventCoordinator eventCoordinator) {<NEW_LINE>if (status == UpgradeStatus.COMPLETE)<NEW_LINE>return CompletableFuture.completedFuture(null);<NEW_LINE>Preconditions.checkState(status == UpgradeStatus.UPGRADED_ZOOKEEPER, "Not currently in a suitable state to do metadata upgrade %s", status);<NEW_LINE>if (currentVersion < AccumuloDataVersion.get()) {<NEW_LINE>return ThreadPools.getServerThreadPools().createThreadPool(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, "UpgradeMetadataThreads", new SynchronousQueue<>(), false).submit(() -> {<NEW_LINE>try {<NEW_LINE>for (int v = currentVersion; v < AccumuloDataVersion.get(); v++) {<NEW_LINE>log.info("Upgrading Root from data version {}", v);<NEW_LINE>upgraders.get(v).upgradeRoot(context);<NEW_LINE>}<NEW_LINE>setStatus(UpgradeStatus.UPGRADED_ROOT, eventCoordinator);<NEW_LINE>for (int v = currentVersion; v < AccumuloDataVersion.get(); v++) {<NEW_LINE>log.info("Upgrading Metadata from data version {}", v);<NEW_LINE>upgraders.get<MASK><NEW_LINE>}<NEW_LINE>log.info("Updating persistent data version.");<NEW_LINE>updateAccumuloVersion(context.getServerDirs(), context.getVolumeManager(), currentVersion);<NEW_LINE>log.info("Upgrade complete");<NEW_LINE>setStatus(UpgradeStatus.COMPLETE, eventCoordinator);<NEW_LINE>} catch (Exception e) {<NEW_LINE>handleFailure(e);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>return CompletableFuture.completedFuture(null);<NEW_LINE>}<NEW_LINE>}
(v).upgradeMetadata(context);
799,324
public void testServletSubmitsManagedTaskThatLooksUpBMTBean(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>PrintWriter out = response.getWriter();<NEW_LINE>Future<?> future = executor.submit(new Callable<Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void call() throws Exception {<NEW_LINE>Runnable ejbRunnable = (Runnable) new <MASK><NEW_LINE>ejbRunnable.run();<NEW_LINE>ConcurrentBMT ejb = (ConcurrentBMT) new InitialContext().lookup("java:global/concurrent/ConcurrentBMTBean!ejb.ConcurrentBMT");<NEW_LINE>tran.begin();<NEW_LINE>try {<NEW_LINE>Object txKeyBefore = tranSyncRegistry.getTransactionKey();<NEW_LINE>Object ejbTxKey = ejb.getTransactionKey();<NEW_LINE>if (ejbTxKey != null)<NEW_LINE>throw new Exception("Transaction " + ejbTxKey + " found when invoking BMT bean method. Transaction on invoking thread was " + txKeyBefore);<NEW_LINE>ejbRunnable.run();<NEW_LINE>Object txKeyAfter = tranSyncRegistry.getTransactionKey();<NEW_LINE>if (!txKeyBefore.equals(txKeyAfter))<NEW_LINE>throw new Exception("Original transaction " + txKeyBefore + " not resumed on thread. Instead " + txKeyAfter);<NEW_LINE>} finally {<NEW_LINE>tran.commit();<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>try {<NEW_LINE>future.get();<NEW_LINE>} finally {<NEW_LINE>future.cancel(true);<NEW_LINE>}<NEW_LINE>}
InitialContext().lookup("java:global/concurrent/ConcurrentBMTBean!java.lang.Runnable");
961,286
public static boolean cast(ZoneChangeInfo info, Game game, Ability source) {<NEW_LINE>if (maybeRemoveFromSourceZone(info, game, source)) {<NEW_LINE><MASK><NEW_LINE>// create a group zone change event if a card is moved to stack for casting (it's always only one card, but some effects check for group events (one or more xxx))<NEW_LINE>Set<Card> cards = new HashSet<>();<NEW_LINE>Set<PermanentToken> tokens = new HashSet<>();<NEW_LINE>Card targetCard = getTargetCard(game, info.event.getTargetId());<NEW_LINE>if (targetCard instanceof PermanentToken) {<NEW_LINE>tokens.add((PermanentToken) targetCard);<NEW_LINE>} else {<NEW_LINE>cards.add(targetCard);<NEW_LINE>}<NEW_LINE>game.fireEvent(new ZoneChangeGroupEvent(cards, tokens, info.event.getSourceId(), info.event.getSource(), info.event.getPlayerId(), info.event.getFromZone(), info.event.getToZone()));<NEW_LINE>// normal movement<NEW_LINE>game.fireEvent(info.event);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
placeInDestinationZone(info, game, 0);
1,564,764
public void read(org.apache.thrift.protocol.TProtocol iprot, getTaskAndStreamMetrics_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>switch(schemeField.id) {<NEW_LINE>case // SUCCESS<NEW_LINE>0:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {<NEW_LINE>{<NEW_LINE>org.apache.thrift.protocol.<MASK><NEW_LINE>struct.success = new ArrayList<MetricInfo>(_list288.size);<NEW_LINE>MetricInfo _elem289;<NEW_LINE>for (int _i290 = 0; _i290 < _list288.size; ++_i290) {<NEW_LINE>_elem289 = new MetricInfo();<NEW_LINE>_elem289.read(iprot);<NEW_LINE>struct.success.add(_elem289);<NEW_LINE>}<NEW_LINE>iprot.readListEnd();<NEW_LINE>}<NEW_LINE>struct.set_success_isSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>iprot.readFieldEnd();<NEW_LINE>}<NEW_LINE>iprot.readStructEnd();<NEW_LINE>struct.validate();<NEW_LINE>}
TList _list288 = iprot.readListBegin();
906,830
public void implement() throws Exception {<NEW_LINE>Configuration conf = Configuration.get(snapshot.getSource().getFileObject());<NEW_LINE>if (elementContextName != null) {<NEW_LINE>// attr in context<NEW_LINE>Tag <MASK><NEW_LINE>if (tag == null) {<NEW_LINE>// no custom element found => may be html element => just create attribute as global + specify context<NEW_LINE>// contextfree attribute<NEW_LINE>for (String aName : attributeNames) {<NEW_LINE>Attribute attribute = new Attribute(aName);<NEW_LINE>attribute.addContext(elementContextName);<NEW_LINE>conf.add(attribute);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// in custom element<NEW_LINE>for (String aName : attributeNames) {<NEW_LINE>tag.add(new Attribute(aName));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// contextfree attribute<NEW_LINE>for (String aName : attributeNames) {<NEW_LINE>conf.add(new Attribute(aName));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>conf.store();<NEW_LINE>LexerUtils.rebuildTokenHierarchy(snapshot.getSource().getDocument(true));<NEW_LINE>}
tag = conf.getTag(elementContextName);
9,690
public void drawFigure(Graphics graphics) {<NEW_LINE>graphics.pushState();<NEW_LINE>Rectangle bounds = getBounds();<NEW_LINE>bounds.width--;<NEW_LINE>bounds.height--;<NEW_LINE>// Set line width here so that the whole figure is constrained, otherwise SVG graphics will have overspill<NEW_LINE>setLineWidth(graphics, 1, bounds);<NEW_LINE><MASK><NEW_LINE>if (!isEnabled()) {<NEW_LINE>setDisabledState(graphics);<NEW_LINE>}<NEW_LINE>// Main Fill<NEW_LINE>graphics.setBackgroundColor(getFillColor());<NEW_LINE>Pattern gradient = applyGradientPattern(graphics, bounds);<NEW_LINE>graphics.fillRectangle(bounds);<NEW_LINE>disposeGradientPattern(graphics, gradient);<NEW_LINE>// Outline<NEW_LINE>graphics.setForegroundColor(getLineColor());<NEW_LINE>graphics.setAlpha(getLineAlpha());<NEW_LINE>graphics.drawLine(bounds.x, bounds.y + TOP_MARGIN, bounds.x + bounds.width, bounds.y + TOP_MARGIN);<NEW_LINE>graphics.drawRectangle(bounds);<NEW_LINE>// Icon<NEW_LINE>// getOwner().drawIconImage(graphics, bounds);<NEW_LINE>getOwner().drawIconImage(graphics, bounds, TOP_MARGIN, 0, 0, 0);<NEW_LINE>graphics.popState();<NEW_LINE>}
graphics.setAlpha(getAlpha());
847,297
private void handleTransaction(PeerConnection peer, TransactionMessage trx) {<NEW_LINE>if (peer.isDisconnect()) {<NEW_LINE>logger.warn("Drop trx {} from {}, peer is disconnect.", trx.getMessageId(), peer.getInetAddress());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (advService.getMessage(new Item(trx.getMessageId(), InventoryType.TRX)) != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>tronNetDelegate.pushTransaction(trx.getTransactionCapsule());<NEW_LINE>advService.broadcast(trx);<NEW_LINE>} catch (P2pException e) {<NEW_LINE>logger.warn("Trx {} from peer {} process failed. type: {}, reason: {}", trx.getMessageId(), peer.getInetAddress(), e.getType(), e.getMessage());<NEW_LINE>if (e.getType().equals(TypeEnum.BAD_TRX)) {<NEW_LINE>peer.disconnect(ReasonCode.BAD_TX);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("Trx {} from peer {} process failed.", trx.getMessageId(), <MASK><NEW_LINE>}<NEW_LINE>}
peer.getInetAddress(), e);
375,484
// IntDoubleVector<NEW_LINE>private static void serializeIntDoubleVector(ByteBuf out, IntDoubleVector vector) {<NEW_LINE>IntDoubleVectorStorage storage = vector.getStorage();<NEW_LINE>if (storage.isDense()) {<NEW_LINE>serializeInt(out, DENSE_STORAGE_TYPE);<NEW_LINE>serializeDoubles(out, storage.getValues());<NEW_LINE>} else if (storage.isSparse()) {<NEW_LINE>serializeInt(out, SPARSE_STORAGE_TYPE);<NEW_LINE>serializeInt(out, storage.size());<NEW_LINE>ObjectIterator<Entry> iter = storage.entryIterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Entry e = iter.next();<NEW_LINE>serializeInt(out, e.getIntKey());<NEW_LINE>serializeDouble(out, e.getDoubleValue());<NEW_LINE>}<NEW_LINE>} else if (storage.isSorted()) {<NEW_LINE>serializeInt(out, SORTED_STORAGE_TYPE);<NEW_LINE>int[] indices = vector.getStorage().getIndices();<NEW_LINE>double[] values = vector.getStorage().getValues();<NEW_LINE>serializeInts(out, indices);<NEW_LINE>serializeDoubles(out, values);<NEW_LINE>} else {<NEW_LINE>throw new UnsupportedOperationException("Unsupport storage type " + vector.<MASK><NEW_LINE>}<NEW_LINE>}
getStorage().getClass());
1,049,261
protected Action process() throws Exception {<NEW_LINE>// Only return if EOF has previously been read and thus<NEW_LINE>// a write done with EOF=true<NEW_LINE>if (_eof) {<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("EOF of {}", this);<NEW_LINE>if (!_closed) {<NEW_LINE>_closed = true;<NEW_LINE>_channel.getByteBufferPool().release(_buffer);<NEW_LINE>IO.close(_in);<NEW_LINE>}<NEW_LINE>return Action.SUCCEEDED;<NEW_LINE>}<NEW_LINE>// Read until buffer full or EOF<NEW_LINE>int len = 0;<NEW_LINE>while (len < _buffer.capacity() && !_eof) {<NEW_LINE>int r = _in.read(_buffer.array(), _buffer.arrayOffset() + len, <MASK><NEW_LINE>if (r < 0)<NEW_LINE>_eof = true;<NEW_LINE>else<NEW_LINE>len += r;<NEW_LINE>}<NEW_LINE>// write what we have<NEW_LINE>_buffer.position(0);<NEW_LINE>_buffer.limit(len);<NEW_LINE>_written += len;<NEW_LINE>channelWrite(_buffer, _eof, this);<NEW_LINE>return Action.SCHEDULED;<NEW_LINE>}
_buffer.capacity() - len);
842,765
public RoutingProfileQueueConfigSummary unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE><MASK><NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>RoutingProfileQueueConfigSummary routingProfileQueueConfigSummary = new RoutingProfileQueueConfigSummary();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();<NEW_LINE>if (name.equals("QueueId")) {<NEW_LINE>routingProfileQueueConfigSummary.setQueueId(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("QueueArn")) {<NEW_LINE>routingProfileQueueConfigSummary.setQueueArn(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("QueueName")) {<NEW_LINE>routingProfileQueueConfigSummary.setQueueName(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("Priority")) {<NEW_LINE>routingProfileQueueConfigSummary.setPriority(IntegerJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("Delay")) {<NEW_LINE>routingProfileQueueConfigSummary.setDelay(IntegerJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("Channel")) {<NEW_LINE>routingProfileQueueConfigSummary.setChannel(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else {<NEW_LINE>reader.skipValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>return routingProfileQueueConfigSummary;<NEW_LINE>}
AwsJsonReader reader = context.getReader();
1,410,551
void frameMessage(final MessageData message, final ByteBuf buf) {<NEW_LINE>final int frameSize = message.getSize() + LENGTH_MESSAGE_ID;<NEW_LINE>final int pad = padding16(frameSize);<NEW_LINE>final byte id = (byte) message.getCode();<NEW_LINE>// Generate the header data.<NEW_LINE>final byte[] h = new byte[LENGTH_HEADER_DATA];<NEW_LINE>h[0] = (byte) ((frameSize >> 16) & 0xff);<NEW_LINE>h[1] = (byte) ((frameSize >> 8) & 0xff);<NEW_LINE>h[2] = (byte) (frameSize & 0xff);<NEW_LINE>System.arraycopy(PROTOCOL_HEADER, 0, h, LENGTH_FRAME_SIZE, PROTOCOL_HEADER.length);<NEW_LINE>Arrays.fill(h, LENGTH_FRAME_SIZE + PROTOCOL_HEADER.length, h.length - 1, (byte) 0x00);<NEW_LINE>encryptor.processBytes(h, 0, LENGTH_HEADER_DATA, h, 0);<NEW_LINE>// Generate the header MAC.<NEW_LINE>byte[] hMac = Arrays.copyOf(secrets.getEgressMac(), LENGTH_MAC);<NEW_LINE>macEncryptor.processBlock(<MASK><NEW_LINE>hMac = secrets.updateEgress(xor(h, hMac)).getEgressMac();<NEW_LINE>hMac = Arrays.copyOf(hMac, LENGTH_MAC);<NEW_LINE>buf.writeBytes(h).writeBytes(hMac);<NEW_LINE>// Encrypt payload.<NEW_LINE>final MutableBytes f = MutableBytes.create(frameSize + pad);<NEW_LINE>final Bytes bv = id == 0 ? RLP.NULL : RLP.encodeOne(Bytes.of(id));<NEW_LINE>assert bv.size() == 1;<NEW_LINE>f.set(0, bv.get(0));<NEW_LINE>// Zero-padded to 16-byte boundary.<NEW_LINE>message.getData().copyTo(f, 1);<NEW_LINE>encryptor.processBytes(f.toArrayUnsafe(), 0, f.size(), f.toArrayUnsafe(), 0);<NEW_LINE>// Calculate the frame MAC.<NEW_LINE>final byte[] fMacSeed = Arrays.copyOf(secrets.updateEgress(f.toArrayUnsafe()).getEgressMac(), LENGTH_MAC);<NEW_LINE>byte[] fMac = new byte[16];<NEW_LINE>macEncryptor.processBlock(fMacSeed, 0, fMac, 0);<NEW_LINE>fMac = Arrays.copyOf(secrets.updateEgress(xor(fMac, fMacSeed)).getEgressMac(), LENGTH_MAC);<NEW_LINE>buf.writeBytes(f.toArrayUnsafe()).writeBytes(fMac);<NEW_LINE>}
hMac, 0, hMac, 0);
922,583
public void start(Stage primaryStage) {<NEW_LINE>primaryStage.setTitle("Tabs");<NEW_LINE>JFXTabPane tabPane = new JFXTabPane();<NEW_LINE>Tab tab = new Tab();<NEW_LINE>tab.setText(msg);<NEW_LINE>tab.setContent(new Label(TAB_0));<NEW_LINE>tabPane.getTabs().add(tab);<NEW_LINE>tabPane.setPrefSize(300, 200);<NEW_LINE>Tab tab1 = new Tab();<NEW_LINE>tab1.setText(TAB_01);<NEW_LINE>tab1.setContent(new Label(TAB_01));<NEW_LINE>tabPane.getTabs().add(tab1);<NEW_LINE>SingleSelectionModel<Tab> selectionModel = tabPane.getSelectionModel();<NEW_LINE>selectionModel.select(1);<NEW_LINE>JFXButton button = new JFXButton("New Tab");<NEW_LINE>button.setOnMouseClicked((o) -> {<NEW_LINE>Tab temp = new Tab();<NEW_LINE>int count = tabPane.getTabs().size();<NEW_LINE>temp.setText(msg + count);<NEW_LINE>temp.setContent(new Label(TAB_0 + count));<NEW_LINE>tabPane.<MASK><NEW_LINE>});<NEW_LINE>tabPane.setMaxWidth(500);<NEW_LINE>HBox hbox = new HBox();<NEW_LINE>hbox.getChildren().addAll(button, tabPane);<NEW_LINE>hbox.setSpacing(50);<NEW_LINE>hbox.setAlignment(Pos.CENTER);<NEW_LINE>hbox.setStyle("-fx-padding:20");<NEW_LINE>Group root = new Group();<NEW_LINE>Scene scene = new Scene(root, 700, 250);<NEW_LINE>root.getChildren().addAll(hbox);<NEW_LINE>scene.getStylesheets().add(TabsDemo.class.getResource("/css/jfoenix-components.css").toExternalForm());<NEW_LINE>primaryStage.setTitle("JFX Tabs Demo");<NEW_LINE>primaryStage.setScene(scene);<NEW_LINE>primaryStage.show();<NEW_LINE>}
getTabs().add(temp);
1,404,981
protected Shape createImage(int width, int height) {<NEW_LINE>GeneralPath path = new GeneralPath();<NEW_LINE>int arrowWidth = height / 3;<NEW_LINE>float x1 = isInput ? 0 : width;<NEW_LINE>float x2 = isInput ? 3 * width / 4f : width / 4f;<NEW_LINE>float gap = (width - arrowWidth) / 2f;<NEW_LINE>path.moveTo(x1, gap);<NEW_LINE>path.lineTo(width / 2f, gap);<NEW_LINE>path.lineTo(width / 2f, height / 2f - arrowWidth);<NEW_LINE>path.lineTo(x2, height / 2);<NEW_LINE>path.lineTo(width / 2f, height / 2f + arrowWidth);<NEW_LINE>path.lineTo(width / 2f, gap + arrowWidth);<NEW_LINE>path.lineTo(x1, gap + arrowWidth);<NEW_LINE>path.closePath();<NEW_LINE>path.moveTo(width / 2f, height / 8f - 1);<NEW_LINE>path.lineTo(width - x1, height / 8f - 1);<NEW_LINE>path.moveTo(width / 2f, 7 * height / 8f + 1);<NEW_LINE>path.lineTo(width - x1, <MASK><NEW_LINE>path.moveTo(x2, height / 4f);<NEW_LINE>path.lineTo(width - x1, height / 4f);<NEW_LINE>path.moveTo(x2, 3 * height / 4f);<NEW_LINE>path.lineTo(width - x1, 3 * height / 4f);<NEW_LINE>path.moveTo(isInput ? 7 * width / 8f : width / 8f, height / 2f);<NEW_LINE>path.lineTo(width - x1, height / 2f);<NEW_LINE>return path;<NEW_LINE>}
7 * height / 8f + 1);
511,497
public static MutationReport testMutation(WebDriver driver, String fileName, String[] includedTags, String[] excludedTags, MutationOptions mutationOptions) throws IOException {<NEW_LINE>TestSession session = TestSession.current();<NEW_LINE>if (session == null) {<NEW_LINE>throw new UnregisteredTestSession("Cannot test mutation as there was no TestSession created");<NEW_LINE>}<NEW_LINE>if (fileName == null) {<NEW_LINE>throw new IOException("Spec file name is not defined");<NEW_LINE>}<NEW_LINE>List<String> includedTagsList = toList(includedTags);<NEW_LINE>TestReport report = session.getReport();<NEW_LINE>MutationReport mutationReport = GalenMutate.checkAllMutations(new SeleniumBrowser(driver), fileName, includedTagsList, toList(excludedTags), mutationOptions, new Properties(), session.getListener());<NEW_LINE>if (mutationReport.getInitialLayoutReport() != null) {<NEW_LINE>GalenUtils.attachLayoutReport(mutationReport.getInitialLayoutReport(<MASK><NEW_LINE>}<NEW_LINE>GalenUtils.attachMutationReport(mutationReport, report, fileName, includedTagsList);<NEW_LINE>return mutationReport;<NEW_LINE>}
), report, fileName, includedTagsList);
1,141,046
private void buildDestinationItem(@NonNull View view, final TargetPoint destination, int[] startTime, final TransportRouteResultSegment segment, double walkSpeed) {<NEW_LINE>OsmandApplication app = requireMyApplication();<NEW_LINE>Typeface typeface = FontCache.getRobotoMedium(app);<NEW_LINE>FrameLayout baseItemView = new <MASK><NEW_LINE>LinearLayout imagesContainer = (LinearLayout) createImagesContainer(view.getContext());<NEW_LINE>baseItemView.addView(imagesContainer);<NEW_LINE>LinearLayout infoContainer = (LinearLayout) createInfoContainer(view.getContext());<NEW_LINE>baseItemView.addView(infoContainer);<NEW_LINE>buildRowDivider(infoContainer, true);<NEW_LINE>double walkDist = (long) getWalkDistance(segment, null, segment.walkDist);<NEW_LINE>int walkTime = (int) getWalkTime(segment, null, walkDist, walkSpeed);<NEW_LINE>if (walkTime < 60) {<NEW_LINE>walkTime = 60;<NEW_LINE>}<NEW_LINE>SpannableStringBuilder spannable = new SpannableStringBuilder(getString(R.string.shared_string_walk)).append(" ");<NEW_LINE>spannable.setSpan(new ForegroundColorSpan(getSecondaryColor()), 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);<NEW_LINE>int startIndex = spannable.length();<NEW_LINE>spannable.append("~").append(OsmAndFormatter.getFormattedDuration(walkTime, app));<NEW_LINE>spannable.setSpan(new CustomTypefaceSpan(typeface), startIndex, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);<NEW_LINE>startIndex = spannable.length();<NEW_LINE>spannable.append(", ").append(OsmAndFormatter.getFormattedDistance((float) walkDist, app));<NEW_LINE>spannable.setSpan(new ForegroundColorSpan(getSecondaryColor()), startIndex, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);<NEW_LINE>buildWalkRow(infoContainer, spannable, imagesContainer, new OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>showWalkingRouteOnMap(segment, null);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>buildRowDivider(infoContainer, true);<NEW_LINE>addWalkRouteIcon(imagesContainer);<NEW_LINE>String timeStr = OsmAndFormatter.getFormattedDurationShortMinutes(startTime[0] + walkTime);<NEW_LINE>String name = getRoutePointDescription(destination.point, destination.getOnlyName());<NEW_LINE>SpannableString title = new SpannableString(name);<NEW_LINE>title.setSpan(new CustomTypefaceSpan(typeface), 0, title.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);<NEW_LINE>title.setSpan(new ForegroundColorSpan(getActiveColor()), 0, title.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);<NEW_LINE>SpannableString secondaryText = new SpannableString(getString(R.string.route_descr_destination));<NEW_LINE>secondaryText.setSpan(new CustomTypefaceSpan(typeface), 0, secondaryText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);<NEW_LINE>secondaryText.setSpan(new ForegroundColorSpan(getMainFontColor()), 0, secondaryText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);<NEW_LINE>buildDestinationRow(infoContainer, timeStr, title, secondaryText, destination.point, imagesContainer, new OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>showLocationOnMap(destination.point);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>((ViewGroup) view).addView(baseItemView);<NEW_LINE>}
FrameLayout(view.getContext());
727,349
public void handle(AtmosphereFramework framework, Class<WebSocketHandler> annotatedClass) {<NEW_LINE>try {<NEW_LINE>WebSocketHandlerService m = annotatedClass.getAnnotation(WebSocketHandlerService.class);<NEW_LINE>atmosphereConfig(m.atmosphereConfig(), framework);<NEW_LINE>framework.addAtmosphereHandler(m.path(), AtmosphereFramework.REFLECTOR_ATMOSPHEREHANDLER).initWebSocket();<NEW_LINE>framework.setDefaultBroadcasterClassName(m.broadcaster().getName());<NEW_LINE>filters(m.broadcastFilters(), framework);<NEW_LINE>final LinkedList<AtmosphereInterceptor> l = new LinkedList<>();<NEW_LINE>AtmosphereInterceptor aa = listeners(m.listeners(), framework);<NEW_LINE>if (aa != null) {<NEW_LINE>l.add(aa);<NEW_LINE>}<NEW_LINE>AnnotationUtil.interceptorsForHandler(framework, Arrays.asList(m.interceptors()), l);<NEW_LINE>framework.setBroadcasterCacheClassName(m.broadcasterCache().getName());<NEW_LINE>WebSocketProcessor p = WebSocketProcessorFactory.<MASK><NEW_LINE>framework.addAtmosphereHandler(m.path(), REFLECTOR_ATMOSPHEREHANDLER, l);<NEW_LINE>p.registerWebSocketHandler(m.path(), new WebSocketProcessor.WebSocketHandlerProxy(broadcasterClass(framework, m.broadcaster()), framework.newClassInstance(WebSocketHandler.class, annotatedClass)));<NEW_LINE>} catch (Throwable e) {<NEW_LINE>logger.warn("", e);<NEW_LINE>}<NEW_LINE>}
getDefault().getWebSocketProcessor(framework);
325,330
protected Status doProcess() {<NEW_LINE>List<Event> events = new ArrayList<>();<NEW_LINE>Map<MessageQueue, Long> offsets = new HashMap<>();<NEW_LINE>Event event;<NEW_LINE>Map<String, String> headers;<NEW_LINE>try {<NEW_LINE>List<MessageExt> messageExts = consumer.poll();<NEW_LINE>for (MessageExt msg : messageExts) {<NEW_LINE>byte[] body = msg.getBody();<NEW_LINE>headers = new HashMap<>();<NEW_LINE>headers.put(HEADER_TOPIC_NAME, topic);<NEW_LINE>headers.put(HEADER_TAG_NAME, tag);<NEW_LINE>log.debug("Processing message,body={}", new String(body, "UTF-8"));<NEW_LINE>event = EventBuilder.withBody(body, headers);<NEW_LINE>events.add(event);<NEW_LINE>}<NEW_LINE>if (events.size() > 0) {<NEW_LINE>sourceCounter.incrementAppendBatchReceivedCount();<NEW_LINE>sourceCounter.addToEventReceivedCount(events.size());<NEW_LINE>getChannelProcessor().processEventBatch(events);<NEW_LINE>sourceCounter.incrementAppendBatchAcceptedCount();<NEW_LINE>sourceCounter.<MASK><NEW_LINE>events.clear();<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Failed to consumer message", e);<NEW_LINE>return Status.BACKOFF;<NEW_LINE>}<NEW_LINE>return Status.READY;<NEW_LINE>}
addToEventAcceptedCount(events.size());
514,488
public GetAlternateContactResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetAlternateContactResult getAlternateContactResult = new GetAlternateContactResult();<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 getAlternateContactResult;<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("AlternateContact", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getAlternateContactResult.setAlternateContact(AlternateContactJsonUnmarshaller.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 getAlternateContactResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
211,843
public void marshall(StartTopicsDetectionJobRequest startTopicsDetectionJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (startTopicsDetectionJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(startTopicsDetectionJobRequest.getOutputDataConfig(), OUTPUTDATACONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(startTopicsDetectionJobRequest.getDataAccessRoleArn(), DATAACCESSROLEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(startTopicsDetectionJobRequest.getJobName(), JOBNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(startTopicsDetectionJobRequest.getNumberOfTopics(), NUMBEROFTOPICS_BINDING);<NEW_LINE>protocolMarshaller.marshall(startTopicsDetectionJobRequest.getClientRequestToken(), CLIENTREQUESTTOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(startTopicsDetectionJobRequest.getVolumeKmsKeyId(), VOLUMEKMSKEYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(startTopicsDetectionJobRequest.getVpcConfig(), VPCCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(startTopicsDetectionJobRequest.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>}
startTopicsDetectionJobRequest.getInputDataConfig(), INPUTDATACONFIG_BINDING);
813,311
public void precomputeDenominatorForEvaluation() {<NEW_LINE>// if the contribution of this Gaussian is zero, then don't bother<NEW_LINE>if (pMixtureLog10 == Double.NEGATIVE_INFINITY) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>precomputeInverse();<NEW_LINE>cachedDenomLog10 = Math.log10(Math.pow(2.0 * Math.PI, -1.0 * ((double) mu.length) / 2.0)) + Math.log10(Math.pow(sigma.<MASK><NEW_LINE>if (Double.isNaN(cachedDenomLog10) || sigma.det() < EPSILON) {<NEW_LINE>throw new GATKException("Denominator for gaussian evaluation cannot be computed. Covariance determinant is " + sigma.det() + ". One or more annotations (usually MQ) may have insufficient variance.");<NEW_LINE>}<NEW_LINE>}
det(), -0.5));
1,184,923
public J visitBinary(J.Binary binary, ExecutionContext ctx) {<NEW_LINE>if (binary.getOperator() == J.Binary.Type.Equal || binary.getOperator() == J.Binary.Type.NotEqual) {<NEW_LINE>if (COLLECTION_SIZE.matches(binary.getLeft()) || COLLECTION_SIZE.matches(binary.getRight())) {<NEW_LINE>if (isZero(binary.getLeft()) || isZero(binary.getRight())) {<NEW_LINE>J.MethodInvocation sizeCall = (J.MethodInvocation) (COLLECTION_SIZE.matches(binary.getLeft()) ? binary.getLeft(<MASK><NEW_LINE>return sizeCall.withTemplate(isEmpty, sizeCall.getCoordinates().replace(), binary.getOperator() == J.Binary.Type.Equal ? "" : "!", sizeCall.getSelect()).withPrefix(binary.getPrefix());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super.visitBinary(binary, ctx);<NEW_LINE>}
) : binary.getRight());
1,702,801
private boolean renameObject(LakeFSFileStatus srcStatus, Path dst) throws IOException {<NEW_LINE>ObjectLocation srcObjectLoc = pathToObjectLocation(srcStatus.getPath());<NEW_LINE>ObjectLocation dstObjectLoc = pathToObjectLocation(dst);<NEW_LINE>if (srcStatus.isEmptyDirectory()) {<NEW_LINE>srcObjectLoc = srcObjectLoc.toDirectory();<NEW_LINE>dstObjectLoc = dstObjectLoc.toDirectory();<NEW_LINE>}<NEW_LINE>ObjectsApi objects = lfsClient.getObjects();<NEW_LINE>// TODO (Tals): Can we add metadata? we currently don't have an API to get the metadata of an object.<NEW_LINE>ObjectStageCreation creationReq = new ObjectStageCreation().checksum(srcStatus.getChecksum()).sizeBytes(srcStatus.getLen()).physicalAddress(srcStatus.getPhysicalAddress());<NEW_LINE>try {<NEW_LINE>objects.stageObject(dstObjectLoc.getRepository(), dstObjectLoc.getRef(), dstObjectLoc.getPath(), creationReq);<NEW_LINE>} catch (ApiException e) {<NEW_LINE>throw translateException("renameObject: src:" + srcStatus.getPath() + ", dst: " + dst + ", failed to stage object", e);<NEW_LINE>}<NEW_LINE>// delete src path<NEW_LINE>try {<NEW_LINE>objects.deleteObject(srcObjectLoc.getRepository(), srcObjectLoc.getRef(<MASK><NEW_LINE>} catch (ApiException e) {<NEW_LINE>throw translateException("renameObject: src:" + srcStatus.getPath() + ", dst: " + dst + ", failed to delete src", e);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
), srcObjectLoc.getPath());
1,424,790
protected JsonNode createPostRequest(GHMRequest ghRequest, Collection<String> outArraysList) {<NEW_LINE>ObjectNode requestJson = objectMapper.createObjectNode();<NEW_LINE>if (ghRequest.identicalLists) {<NEW_LINE>putPoints(requestJson, "points", ghRequest.getFromPoints());<NEW_LINE>putStrings(requestJson, "point_hints", ghRequest.getFromPointHints());<NEW_LINE>putStrings(requestJson, "curbsides", ghRequest.getFromCurbsides());<NEW_LINE>} else {<NEW_LINE>putPoints(requestJson, "from_points", ghRequest.getFromPoints());<NEW_LINE>putStrings(requestJson, <MASK><NEW_LINE>putPoints(requestJson, "to_points", ghRequest.getToPoints());<NEW_LINE>putStrings(requestJson, "to_point_hints", ghRequest.getToPointHints());<NEW_LINE>putStrings(requestJson, "from_curbsides", ghRequest.getFromCurbsides());<NEW_LINE>putStrings(requestJson, "to_curbsides", ghRequest.getToCurbsides());<NEW_LINE>}<NEW_LINE>putStrings(requestJson, "snap_preventions", ghRequest.getSnapPreventions());<NEW_LINE>putStrings(requestJson, "out_arrays", outArraysList);<NEW_LINE>// requestJson.put("elevation", ghRequest.getHints().getBool("elevation", false));<NEW_LINE>requestJson.put("fail_fast", ghRequest.getFailFast());<NEW_LINE>Map<String, Object> hintsMap = ghRequest.getHints().toMap();<NEW_LINE>for (String hintKey : hintsMap.keySet()) {<NEW_LINE>if (ignoreSet.contains(hintKey))<NEW_LINE>continue;<NEW_LINE>Object hint = hintsMap.get(hintKey);<NEW_LINE>if (hint instanceof String)<NEW_LINE>requestJson.put(hintKey, (String) hint);<NEW_LINE>else<NEW_LINE>requestJson.putPOJO(hintKey, hint);<NEW_LINE>}<NEW_LINE>return requestJson;<NEW_LINE>}
"from_point_hints", ghRequest.getFromPointHints());
1,322,823
protected AbstractBeanDefinition doParse(Element element, ParserContext parserContext, String channelName) {<NEW_LINE>BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(RedisQueueMessageDrivenEndpoint.class);<NEW_LINE>builder.addConstructorArgValue(element.getAttribute("queue"));<NEW_LINE>String connectionFactory = element.getAttribute("connection-factory");<NEW_LINE>if (!StringUtils.hasText(connectionFactory)) {<NEW_LINE>connectionFactory = "redisConnectionFactory";<NEW_LINE>}<NEW_LINE>builder.addConstructorArgReference(connectionFactory);<NEW_LINE>IntegrationNamespaceUtils.setReferenceIfAttributeDefined(<MASK><NEW_LINE>IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "task-executor");<NEW_LINE>IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "error-channel");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "expect-message");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "receive-timeout");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "recovery-interval");<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "right-pop");<NEW_LINE>builder.addPropertyReference("outputChannel", channelName);<NEW_LINE>return builder.getBeanDefinition();<NEW_LINE>}
builder, element, "serializer", true);
1,154,661
public void run() {<NEW_LINE>if (task.codeGenerators.size() > 0) {<NEW_LINE>int altHeight = -1;<NEW_LINE>Point where = null;<NEW_LINE>try {<NEW_LINE>Rectangle carretRectangle = target.modelToView(target.getCaretPosition());<NEW_LINE>altHeight = carretRectangle.height;<NEW_LINE>where = new Point(carretRectangle.x, carretRectangle.y + carretRectangle.height);<NEW_LINE>SwingUtilities.convertPointToScreen(where, target);<NEW_LINE>} catch (BadLocationException ble) {<NEW_LINE>}<NEW_LINE>if (where == null) {<NEW_LINE>where = new <MASK><NEW_LINE>}<NEW_LINE>PopupUtil.showPopup(new GenerateCodePanel(target, task.codeGenerators), (Frame) SwingUtilities.getAncestorOfClass(Frame.class, target), where.x, where.y, true, altHeight);<NEW_LINE>} else {<NEW_LINE>target.getToolkit().beep();<NEW_LINE>}<NEW_LINE>}
Point(-1, -1);
583,299
public Set<FileObject> instantiate() throws IOException {<NEW_LINE>FileObject dir = Templates.getTargetFolder(descriptor);<NEW_LINE>FileObject template = Templates.getTemplate(descriptor);<NEW_LINE>DataFolder <MASK><NEW_LINE>DataObject dataTemplate = DataObject.find(template);<NEW_LINE>Map<String, String> map = new HashMap<String, String>();<NEW_LINE>if (jasmineWizardPanel != null && jasmineWizardPanel.installJasmine()) {<NEW_LINE>// NOI18N<NEW_LINE>map.put("jasmine", "true");<NEW_LINE>}<NEW_LINE>DataObject createdFile = dataTemplate.createFromTemplate(dataFolder, Templates.getTargetName(descriptor), map);<NEW_LINE>// create folder for unit tests and libraries if they do not exist yet:<NEW_LINE>Project project = Templates.getProject(descriptor);<NEW_LINE>SourceGroup[] groups = getTestGroups(project);<NEW_LINE>FileObject libs = null;<NEW_LINE>if (groups != null && groups.length > 0) {<NEW_LINE>// NOI18N<NEW_LINE>FileUtil.createFolder(groups[0].getRootFolder(), "unit");<NEW_LINE>// NOI18N<NEW_LINE>libs = FileUtil.createFolder(groups[0].getRootFolder(), "lib");<NEW_LINE>}<NEW_LINE>if (jasmineWizardPanel != null && jasmineWizardPanel.installJasmine() && libs != null) {<NEW_LINE>jasmineWizardPanel.downloadJasmine(libs);<NEW_LINE>}<NEW_LINE>return Collections.singleton(createdFile.getPrimaryFile());<NEW_LINE>}
dataFolder = DataFolder.findFolder(dir);
445,653
private void verifyResult(PrintWriter pw, String testName, long executionId, String expectedStatus) throws TestFailureException {<NEW_LINE>JobOperator jobOperator = BatchRuntime.getJobOperator();<NEW_LINE>if (testName.startsWith("recoverLocalJobs")) {<NEW_LINE>try {<NEW_LINE>JobExecution executionInst = jobOperator.getJobExecution(executionId);<NEW_LINE><MASK><NEW_LINE>String batchStatus = executionInst.getBatchStatus().name();<NEW_LINE>logger.info("verifyResult for " + testName + ", executionId=" + executionId + ",status from DB=" + batchStatus);<NEW_LINE>assertEquals(expectedStatus, batchStatus);<NEW_LINE>if (testName.equals("recoverLocalJobsInStartedWithExitStatusSetTest")) {<NEW_LINE>assertEquals(APP_SET_EXIT_STATUS, exitStatus);<NEW_LINE>} else {<NEW_LINE>assertEquals(expectedStatus, exitStatus);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>String msg = "ERROR: " + e.getMessage();<NEW_LINE>throw new TestFailureException(msg);<NEW_LINE>}<NEW_LINE>} else if (testName.startsWith("recoverStepExecution")) {<NEW_LINE>try {<NEW_LINE>List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);<NEW_LINE>assertEquals("Didn't find exactly one StepExecution for jobExec = " + executionId, 1, stepExecutions.size());<NEW_LINE>for (StepExecution stepExe : stepExecutions) {<NEW_LINE>String exitStatus = stepExe.getExitStatus();<NEW_LINE>String batchStatus = stepExe.getBatchStatus().name();<NEW_LINE>assertEquals(expectedStatus, batchStatus);<NEW_LINE>if (testName.equals("recoverStepExecutionInStartedWithExitStatusSetTest")) {<NEW_LINE>assertEquals(APP_SET_EXIT_STATUS, exitStatus);<NEW_LINE>} else {<NEW_LINE>assertEquals(expectedStatus, exitStatus);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>String msg = "ERROR: " + e.getMessage();<NEW_LINE>throw new TestFailureException(msg);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String exitStatus = executionInst.getExitStatus();
1,210,566
private Menu createMenu() {<NEW_LINE>if (!isMenuEnabled()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Menu menu = new Menu(shell, SWT.POP_UP);<NEW_LINE>cTable.addListener(SWT.MenuDetect, new Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleEvent(Event event) {<NEW_LINE>Composite cHeaderArea = header == null ? null : header.getHeaderArea();<NEW_LINE>if (event.widget == cHeaderArea) {<NEW_LINE>menu.setData(MENUKEY_IN_BLANK_AREA, false);<NEW_LINE>menu.setData(MENUKEY_IS_HEADER, true);<NEW_LINE>} else {<NEW_LINE>boolean noRow;<NEW_LINE>if (event.detail == SWT.MENU_KEYBOARD) {<NEW_LINE>noRow = getFocusedRow() == null;<NEW_LINE>} else {<NEW_LINE>TableRowCore row = getTableRowWithCursor();<NEW_LINE>noRow = row == null;<NEW_LINE>// If shell is not active, right clicking on a row will<NEW_LINE>// result in a MenuDetect, but not a MouseDown or MouseUp<NEW_LINE>if (!isSelected(row)) {<NEW_LINE>setSelectedRows(new TableRowCore[] { row });<NEW_LINE>}<NEW_LINE>}<NEW_LINE>menu.setData(MENUKEY_IN_BLANK_AREA, noRow);<NEW_LINE>menu.setData(MENUKEY_IS_HEADER, false);<NEW_LINE>}<NEW_LINE>Point pt = cHeaderArea.toControl(event.x, event.y);<NEW_LINE>menu.setData(MENUKEY_COLUMN, getTableColumnByOffset(pt.x));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (header != null) {<NEW_LINE>header.createMenu(menu);<NEW_LINE>}<NEW_LINE>MenuBuildUtils.addMaintenanceListenerForMenu(menu, new MenuBuildUtils.MenuBuilder() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void buildMenu(Menu menu, MenuEvent menuEvent) {<NEW_LINE>Object oIsHeader = menu.getData(MENUKEY_IS_HEADER);<NEW_LINE>boolean isHeader = (oIsHeader instanceof Boolean) ? ((Boolean) oIsHeader).booleanValue() : false;<NEW_LINE>Object oInBlankArea = menu.getData(MENUKEY_IN_BLANK_AREA);<NEW_LINE>boolean inBlankArea = (oInBlankArea instanceof Boolean) ? ((Boolean) oInBlankArea).booleanValue() : false;<NEW_LINE>TableColumnCore column = (TableColumnCore) menu.getData(MENUKEY_COLUMN);<NEW_LINE>if (isHeader) {<NEW_LINE>tvSWTCommon.<MASK><NEW_LINE>} else if (inBlankArea) {<NEW_LINE>tvSWTCommon.fillColumnMenu(menu, column, true);<NEW_LINE>} else {<NEW_LINE>tvSWTCommon.fillMenu(menu, column);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return menu;<NEW_LINE>}
fillColumnMenu(menu, column, false);
1,667,345
public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>query_cfg_result result = new query_cfg_result();<NEW_LINE>if (e instanceof org.apache.thrift.transport.TTransportException) {<NEW_LINE>_LOGGER.error("TTransportException inside handler", e);<NEW_LINE>fb.close();<NEW_LINE>return;<NEW_LINE>} else if (e instanceof org.apache.thrift.TApplicationException) {<NEW_LINE>_LOGGER.error("TApplicationException inside handler", e);<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = (org<MASK><NEW_LINE>} else {<NEW_LINE>_LOGGER.error("Exception inside handler", e);<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>fcall.sendResponse(fb, msg, msgType, seqid);<NEW_LINE>} catch (java.lang.Exception ex) {<NEW_LINE>_LOGGER.error("Exception writing to internal frame buffer", ex);<NEW_LINE>fb.close();<NEW_LINE>}<NEW_LINE>}
.apache.thrift.TApplicationException) e;
391,622
public static String strtr(@Nullable String string, @Nullable String from, @Nullable String to) {<NEW_LINE>if (string == null || string.isEmpty()) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>if ((from == null || from.isEmpty()) || (to == null || to.isEmpty())) {<NEW_LINE>return string;<NEW_LINE>}<NEW_LINE>char[<MASK><NEW_LINE>boolean replaced = false;<NEW_LINE>// If from and to have different lengths, the extra characters in the longer of the two are ignored.<NEW_LINE>for (int i = 0, idx = 0, length = Math.min(from.length(), to.length()); i < length; i++) {<NEW_LINE>while ((idx = string.indexOf(from.charAt(i), idx)) > -1) {<NEW_LINE>replaced = true;<NEW_LINE>chars[idx++] = to.charAt(i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return replaced ? String.valueOf(chars) : string;<NEW_LINE>}
] chars = string.toCharArray();
712,875
public static double digamma(double x) {<NEW_LINE>if (x > 0 && x <= 1.0e-5) {<NEW_LINE>// small value shortcut<NEW_LINE>return -0.5772156649 - 1.0 / x;<NEW_LINE>}<NEW_LINE>double result = 0;<NEW_LINE>double y = x;<NEW_LINE>while (y < 8.5) {<NEW_LINE>// iterate for medium or very negative values<NEW_LINE>result -= 1.0 / y;<NEW_LINE>y += 1.0;<NEW_LINE>}<NEW_LINE>// and compute the final approximation for large values<NEW_LINE>double r = 1.0 / y;<NEW_LINE>// REVIEW What if y is zero?<NEW_LINE>result += Math.log(y) - 0.5 * r;<NEW_LINE>r = r * r;<NEW_LINE>result -= r * (8.3333333333e-2 - r * <MASK><NEW_LINE>return result;<NEW_LINE>}
(8.3333333333e-3 - r * 3.968253968e-3));
739,041
public Optional<ModelSpecification> modelSpecificationsFor(ModelContext modelContext) {<NEW_LINE>ResolvedType propertiesHost = modelContext.alternateEvaluatedType();<NEW_LINE>if (isContainerType(propertiesHost) || isMapType(propertiesHost) || enumTypeDeterminer.isEnum(propertiesHost.getErasedType()) || ScalarTypes.builtInScalarType(propertiesHost).isPresent() || modelContext.hasSeenBefore(propertiesHost)) {<NEW_LINE>LOG.debug("Skipping model of type {} as its either a container type, map, enum or base type, or its already " + "been handled", resolvedTypeSignature(<MASK><NEW_LINE>return empty();<NEW_LINE>}<NEW_LINE>Optional<ModelSpecification> syntheticModel = schemaPluginsManager.syntheticModelSpecification(modelContext);<NEW_LINE>if (syntheticModel.isPresent()) {<NEW_LINE>return of(schemaPluginsManager.modelSpecification(modelContext));<NEW_LINE>}<NEW_LINE>return reflectionBasedModel(modelContext, propertiesHost);<NEW_LINE>}
propertiesHost).orElse("<null>"));
637,747
public boolean verify(PublicKey pubKey, String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException {<NEW_LINE>Signature sig;<NEW_LINE>try {<NEW_LINE>if (provider == null) {<NEW_LINE>sig = Signature.getInstance(getSignatureName(sigAlgId));<NEW_LINE>} else {<NEW_LINE>sig = Signature.getInstance(getSignatureName(sigAlgId), provider);<NEW_LINE>}<NEW_LINE>} catch (NoSuchAlgorithmException e) {<NEW_LINE>//<NEW_LINE>// try an alternate<NEW_LINE>//<NEW_LINE>if (oids.get(sigAlgId.getAlgorithm()) != null) {<NEW_LINE>String signatureAlgorithm = (String) oids.get(sigAlgId.getAlgorithm());<NEW_LINE>if (provider == null) {<NEW_LINE>sig = Signature.getInstance(signatureAlgorithm);<NEW_LINE>} else {<NEW_LINE>sig = Signature.getInstance(signatureAlgorithm, provider);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setSignatureParameters(sig, sigAlgId.getParameters());<NEW_LINE>sig.initVerify(pubKey);<NEW_LINE>try {<NEW_LINE>sig.update(reqInfo<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SignatureException("exception encoding TBS cert request - " + e);<NEW_LINE>}<NEW_LINE>return sig.verify(sigBits.getOctets());<NEW_LINE>}
.getEncoded(ASN1Encoding.DER));
1,133,558
public void evaluate() throws Throwable {<NEW_LINE>PactVerifications pactVerifications = <MASK><NEW_LINE>if (pactVerifications != null) {<NEW_LINE>evaluatePactVerifications(pactVerifications, base);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PactVerification pactDef = description.getAnnotation(PactVerification.class);<NEW_LINE>// no pactVerification? execute the test normally<NEW_LINE>if (pactDef == null) {<NEW_LINE>base.evaluate();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, BasePact> pacts = getPacts(pactDef.fragment());<NEW_LINE>Optional<BasePact> pact;<NEW_LINE>if (pactDef.value().length == 1 && StringUtils.isEmpty(pactDef.value()[0])) {<NEW_LINE>pact = pacts.values().stream().findFirst();<NEW_LINE>} else {<NEW_LINE>pact = Arrays.stream(pactDef.value()).map(pacts::get).filter(Objects::nonNull).findFirst();<NEW_LINE>}<NEW_LINE>if (pact.isEmpty()) {<NEW_LINE>base.evaluate();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (config.getPactVersion() == PactSpecVersion.V4) {<NEW_LINE>pact.get().asV4Pact().component1().getInteractions().forEach(i -> i.getComments().put("testname", Json.toJson(description.getDisplayName())));<NEW_LINE>}<NEW_LINE>PactFolder pactFolder = target.getClass().getAnnotation(PactFolder.class);<NEW_LINE>PactDirectory pactDirectory = target.getClass().getAnnotation(PactDirectory.class);<NEW_LINE>BasePact basePact = pact.get();<NEW_LINE>Metrics.INSTANCE.sendMetrics(new MetricEvent.ConsumerTestRun(basePact.getInteractions().size(), "junit"));<NEW_LINE>PactVerificationResult result = runPactTest(base, basePact, pactFolder, pactDirectory);<NEW_LINE>validateResult(result, pactDef);<NEW_LINE>}
description.getAnnotation(PactVerifications.class);
1,314,642
Object fromfile(VirtualFrame frame, PArray self, Object file, int n, @Cached PyObjectCallMethodObjArgs callMethod, @Cached PyObjectSizeNode sizeNode, @Cached ConditionProfile nNegativeProfile, @Cached BranchProfile notBytesProfile, @Cached BranchProfile notEnoughBytesProfile, @Cached FromBytesNode fromBytesNode) {<NEW_LINE>if (nNegativeProfile.profile(n < 0)) {<NEW_LINE>throw raise(ValueError, "negative count");<NEW_LINE>}<NEW_LINE>int itemsize = self.getFormat().bytesize;<NEW_LINE>int nbytes = n * itemsize;<NEW_LINE>Object readResult = callMethod.execute(<MASK><NEW_LINE>if (readResult instanceof PBytes) {<NEW_LINE>int readLength = sizeNode.execute(frame, readResult);<NEW_LINE>fromBytesNode.executeWithoutClinic(frame, self, readResult);<NEW_LINE>// It would make more sense to check this before the frombytes call, but CPython<NEW_LINE>// does it this way<NEW_LINE>if (readLength != nbytes) {<NEW_LINE>notEnoughBytesProfile.enter();<NEW_LINE>throw raise(EOFError, "read() didn't return enough bytes");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>notBytesProfile.enter();<NEW_LINE>throw raise(TypeError, "read() didn't return bytes");<NEW_LINE>}<NEW_LINE>return PNone.NONE;<NEW_LINE>}
frame, file, "read", nbytes);
1,432,879
// for #149: Nitrogen support<NEW_LINE>private static void processRecordFields(@NotNull ErlangMacros macros, @NotNull List<ErlangQAtom> atoms) {<NEW_LINE>PsiReference psiReference = macros.getReference();<NEW_LINE>PsiElement macrosDefinition = psiReference != null ? psiReference.resolve() : null;<NEW_LINE>if (macrosDefinition instanceof ErlangMacrosDefinition) {<NEW_LINE>ErlangMacrosBody macrosBody = ((ErlangMacrosDefinition) macrosDefinition).getMacrosBody();<NEW_LINE>List<ErlangExpression> expressionList = macrosBody != null ? macrosBody.getExpressionList() : ContainerUtil.emptyList();<NEW_LINE>for (ErlangExpression ee : expressionList) {<NEW_LINE>if (ee instanceof ErlangMaxExpression) {<NEW_LINE>ErlangQAtom qAtom = ((ErlangMaxExpression) ee).getQAtom();<NEW_LINE>ContainerUtil.addIfNotNull(atoms, qAtom);<NEW_LINE>} else if (ee instanceof ErlangAssignmentExpression) {<NEW_LINE>ErlangExpression left = ((ErlangAssignmentExpression) ee).getLeft();<NEW_LINE>if (left instanceof ErlangMaxExpression) {<NEW_LINE>ErlangQAtom qAtom = ((ErlangMaxExpression) left).getQAtom();<NEW_LINE>ContainerUtil.addIfNotNull(atoms, qAtom);<NEW_LINE>}<NEW_LINE>} else if (ee instanceof ErlangFunctionCallExpression) {<NEW_LINE>ErlangMacros m = ((ErlangFunctionCallExpression) ee)<MASK><NEW_LINE>if (m != null) {<NEW_LINE>processRecordFields(m, atoms);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getQAtom().getMacros();