idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,646,678
public static ImageInfo parseImgur(final JsonObject object) {<NEW_LINE>final JsonObject image = object.getObject("image");<NEW_LINE>final JsonObject links = object.getObject("links");<NEW_LINE>String urlOriginal = null;<NEW_LINE>String urlBigSquare = null;<NEW_LINE>String title = null;<NEW_LINE>String caption = null;<NEW_LINE>String type = null;<NEW_LINE>boolean isAnimated = false;<NEW_LINE>Long width = null;<NEW_LINE>Long height = null;<NEW_LINE>Long size = null;<NEW_LINE>if (image != null) {<NEW_LINE>title = image.getString("title");<NEW_LINE>caption = image.getString("caption");<NEW_LINE>type = image.getString("type");<NEW_LINE>isAnimated = "true".equals(image.getString("animated"));<NEW_LINE><MASK><NEW_LINE>height = image.getLong("height");<NEW_LINE>size = image.getLong("size");<NEW_LINE>}<NEW_LINE>if (links != null) {<NEW_LINE>urlOriginal = links.getString("original");<NEW_LINE>if (urlOriginal != null && isAnimated) {<NEW_LINE>urlOriginal = urlOriginal.replace(".gif", ".mp4");<NEW_LINE>}<NEW_LINE>urlBigSquare = links.getString("big_square");<NEW_LINE>}<NEW_LINE>if (title != null) {<NEW_LINE>title = StringEscapeUtils.unescapeHtml4(title);<NEW_LINE>}<NEW_LINE>if (caption != null) {<NEW_LINE>caption = StringEscapeUtils.unescapeHtml4(caption);<NEW_LINE>}<NEW_LINE>return new ImageInfo(urlOriginal, urlBigSquare, title, caption, type, isAnimated, width, height, size, isAnimated ? MediaType.VIDEO : MediaType.IMAGE, isAnimated ? HasAudio.MAYBE_AUDIO : HasAudio.NO_AUDIO, null, null, null);<NEW_LINE>}
width = image.getLong("width");
1,308,514
private int load_lob_contents() throws IOException {<NEW_LINE>if (_lob_loaded == LOB_STATE.EMPTY) {<NEW_LINE>load_lob_save_point();<NEW_LINE>}<NEW_LINE>if (_lob_loaded == LOB_STATE.READ) {<NEW_LINE><MASK><NEW_LINE>if (raw_size < 0 || raw_size > Integer.MAX_VALUE) {<NEW_LINE>load_lob_length_overflow_error(raw_size);<NEW_LINE>}<NEW_LINE>_lob_bytes = new byte[(int) raw_size];<NEW_LINE>try {<NEW_LINE>assert (_current_value_save_point_loaded && _current_value_save_point.isDefined());<NEW_LINE>_scanner.save_point_activate(_current_value_save_point);<NEW_LINE>_lob_actual_len = readBytes(_lob_bytes, 0, (int) raw_size);<NEW_LINE>_scanner.save_point_deactivate(_current_value_save_point);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new IonException(e);<NEW_LINE>}<NEW_LINE>assert (_lob_actual_len <= raw_size);<NEW_LINE>_lob_loaded = LOB_STATE.FINISHED;<NEW_LINE>}<NEW_LINE>assert (_lob_loaded == LOB_STATE.FINISHED);<NEW_LINE>return _lob_actual_len;<NEW_LINE>}
long raw_size = _current_value_save_point.length();
487,121
final ListSolutionsResult executeListSolutions(ListSolutionsRequest listSolutionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSolutionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListSolutionsRequest> request = null;<NEW_LINE>Response<ListSolutionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListSolutionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listSolutionsRequest));<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, "Personalize");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListSolutions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListSolutionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListSolutionsResultJsonUnmarshaller());<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);
1,746,301
public Predicate generate(Map<String, EqualPredicate> prefixes, Map<String, RangePredicate> comparisons, AndPredicate andPredicate) {<NEW_LINE>if (!requiresGeneration) {<NEW_LINE>return andPredicate;<NEW_LINE>}<NEW_LINE>// If we are here, that means we were unable to perform any fast<NEW_LINE>// exits, so any further attempts to perform a fast exit here are<NEW_LINE>// useless.<NEW_LINE>int newSize = size() + prefixes.size() + (comparisons == null ? 0 : comparisons.size());<NEW_LINE>assert newSize > 0;<NEW_LINE>Predicate[<MASK><NEW_LINE>int index = 0;<NEW_LINE>for (Predicate predicate : this) {<NEW_LINE>predicates[index++] = predicate;<NEW_LINE>}<NEW_LINE>if (!prefixes.isEmpty()) {<NEW_LINE>for (Predicate predicate : prefixes.values()) {<NEW_LINE>predicates[index++] = predicate;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (comparisons != null && !comparisons.isEmpty()) {<NEW_LINE>for (Predicate predicate : comparisons.values()) {<NEW_LINE>predicates[index++] = predicate;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>assert index == newSize;<NEW_LINE>return new AndPredicate(predicates);<NEW_LINE>}
] predicates = new Predicate[newSize];
1,635,315
private void addReturnStep(OSelectExecutionPlan result, OCommandContext context, boolean profilingEnabled) {<NEW_LINE>if (returnElements) {<NEW_LINE>result.chain(new ReturnMatchElementsStep(context, profilingEnabled));<NEW_LINE>} else if (returnPaths) {<NEW_LINE>result.chain(new ReturnMatchPathsStep(context, profilingEnabled));<NEW_LINE>} else if (returnPatterns) {<NEW_LINE>result.chain(new ReturnMatchPatternsStep(context, profilingEnabled));<NEW_LINE>} else if (returnPathElements) {<NEW_LINE>result.chain(new ReturnMatchPathElementsStep(context, profilingEnabled));<NEW_LINE>} else {<NEW_LINE>OProjection projection = new OProjection(-1);<NEW_LINE>projection.setItems(new ArrayList<>());<NEW_LINE>for (int i = 0; i < returnAliases.size(); i++) {<NEW_LINE>OProjectionItem item = new OProjectionItem(-1);<NEW_LINE>item.setExpression(returnItems.get(i));<NEW_LINE>item.setAlias(returnAliases.get(i));<NEW_LINE>item.setNestedProjection(returnNestedProjections.get(i));<NEW_LINE>projection.<MASK><NEW_LINE>}<NEW_LINE>result.chain(new ProjectionCalculationStep(projection, context, profilingEnabled));<NEW_LINE>}<NEW_LINE>}
getItems().add(item);
1,342,684
private boolean processStructure(XmlTreeNode root, boolean firstPass) {<NEW_LINE>XmlElement element = root.getStartElement();<NEW_LINE>String name = element.getAttribute("NAME");<NEW_LINE>CategoryPath path = getCategoryPath(element);<NEW_LINE>Structure struct = null;<NEW_LINE>boolean isVariableLength = false;<NEW_LINE>if (element.hasAttribute("VARIABLE_LENGTH")) {<NEW_LINE>isVariableLength = XmlUtilities.parseBoolean(element.getAttribute("VARIABLE_LENGTH"));<NEW_LINE>}<NEW_LINE>if (firstPass) {<NEW_LINE>int size = DEFAULT_SIZE;<NEW_LINE>if (element.hasAttribute("SIZE")) {<NEW_LINE>size = XmlUtilities.parseInt<MASK><NEW_LINE>}<NEW_LINE>String comment = getRegularComment(root);<NEW_LINE>struct = new StructureDataType(path, name, size);<NEW_LINE>if (comment != null) {<NEW_LINE>struct.setDescription(comment);<NEW_LINE>}<NEW_LINE>struct = (Structure) dataManager.addDataType(struct, null);<NEW_LINE>if (!struct.getName().equals(name)) {<NEW_LINE>element.setAttribute("NAME", struct.getName());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>struct = (Structure) dataManager.getDataType(path, name);<NEW_LINE>}<NEW_LINE>return processStructMembers(root, struct, firstPass, isVariableLength);<NEW_LINE>}
(element.getAttribute("SIZE"));
874,767
public Column thirdQuartileNumberMerge(Table table, Column[] columnsToMerge, String newColumnTitle) {<NEW_LINE>checkTableAndColumnsAreNumberOrNumberList(table, columnsToMerge);<NEW_LINE>AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);<NEW_LINE>Column newColumn;<NEW_LINE>newColumn = // Create as BIGDECIMAL column by default. Then it can be duplicated to other type.<NEW_LINE>ac.// Create as BIGDECIMAL column by default. Then it can be duplicated to other type.<NEW_LINE>addAttributeColumn(// Create as BIGDECIMAL column by default. Then it can be duplicated to other type.<NEW_LINE>table, // Create as BIGDECIMAL column by default. Then it can be duplicated to other type.<NEW_LINE>newColumnTitle, BigDecimal.class);<NEW_LINE>if (newColumn == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>BigDecimal Q3;<NEW_LINE>for (Element row : ac.getTableAttributeRows(table)) {<NEW_LINE>Q3 = StatisticsUtils.quartile3(ac<MASK><NEW_LINE>row.setAttribute(newColumn, Q3);<NEW_LINE>}<NEW_LINE>return newColumn;<NEW_LINE>}
.getRowNumbers(row, columnsToMerge));
541,526
/*<NEW_LINE>* NOTE: We only ever see one native thread due to the way we create core dumps.<NEW_LINE>*/<NEW_LINE>private Object readThread(DataEntry entry, Builder builder, Object addressSpace) throws IOException {<NEW_LINE>_file.seek(entry.offset);<NEW_LINE>// signalNumber<NEW_LINE>int signalNumber = _file.readInt();<NEW_LINE>// Ignore code<NEW_LINE>_file.readInt();<NEW_LINE>// Ignore errno<NEW_LINE>_file.readInt();<NEW_LINE>// Ignore cursig<NEW_LINE>_file.readShort();<NEW_LINE>// Ignore dummy<NEW_LINE>_file.readShort();<NEW_LINE>// Ignore pending<NEW_LINE>_file.readElfWord();<NEW_LINE>// Ignore blocked<NEW_LINE>_file.readElfWord();<NEW_LINE>long pid = _file.readInt() & 0xffffffffL;<NEW_LINE>// Ignore ppid<NEW_LINE>_file.readInt();<NEW_LINE>// Ignore pgroup<NEW_LINE>_file.readInt();<NEW_LINE>// Ignore session<NEW_LINE>_file.readInt();<NEW_LINE>// utime_sec<NEW_LINE>long utimeSec = _file.readElfWord();<NEW_LINE>// utime_usec<NEW_LINE>long utimeUSec = _file.readElfWord();<NEW_LINE>// stime_sec<NEW_LINE>long stimeSec = _file.readElfWord();<NEW_LINE>// stime_usec<NEW_LINE>long stimeUSec = _file.readElfWord();<NEW_LINE>// Ignore cutime_sec<NEW_LINE>_file.readElfWord();<NEW_LINE>// Ignore cutime_usec<NEW_LINE>_file.readElfWord();<NEW_LINE>// Ignore cstime_sec<NEW_LINE>_file.readElfWord();<NEW_LINE>// Ignore cstime_usec<NEW_LINE>_file.readElfWord();<NEW_LINE>Map<String, Address> registers = _file.readRegisters(builder, addressSpace);<NEW_LINE>Properties properties = new Properties();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>properties.setProperty("Thread user time secs"<MASK><NEW_LINE>// $NON-NLS-1$<NEW_LINE>properties.setProperty("Thread user time usecs", Long.toString(utimeUSec));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>properties.setProperty("Thread sys time secs", Long.toString(stimeSec));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>properties.setProperty("Thread sys time usecs", Long.toString(stimeUSec));<NEW_LINE>return buildThread(builder, addressSpace, String.valueOf(pid), registers, properties, signalNumber);<NEW_LINE>}
, Long.toString(utimeSec));
550,294
public <MT extends IBaseMetaType> MT metaDeleteOperation(IIdType theResourceId, MT theMetaDel, RequestDetails theRequest) {<NEW_LINE>TransactionDetails transactionDetails = new TransactionDetails();<NEW_LINE>// Notify interceptors<NEW_LINE>if (theRequest != null) {<NEW_LINE>ActionRequestDetails requestDetails = new ActionRequestDetails(theRequest, getResourceName(), theResourceId);<NEW_LINE>notifyInterceptors(RestOperationTypeEnum.META_DELETE, requestDetails);<NEW_LINE>}<NEW_LINE>StopWatch w = new StopWatch();<NEW_LINE>BaseHasResource entity = readEntity(theResourceId, theRequest);<NEW_LINE>if (entity == null) {<NEW_LINE>throw new ResourceNotFoundException(Msg.code(1994) + theResourceId);<NEW_LINE>}<NEW_LINE>ResourceTable latestVersion = readEntityLatestVersion(theResourceId, theRequest, transactionDetails);<NEW_LINE>if (latestVersion.getVersion() != entity.getVersion()) {<NEW_LINE>doMetaDelete(theMetaDel, entity, theRequest, transactionDetails);<NEW_LINE>} else {<NEW_LINE>doMetaDelete(theMetaDel, latestVersion, theRequest, transactionDetails);<NEW_LINE>// Also update history entry<NEW_LINE>ResourceHistoryTable history = myResourceHistoryTableDao.findForIdAndVersionAndFetchProvenance(entity.getId(), entity.getVersion());<NEW_LINE>doMetaDelete(theMetaDel, history, theRequest, transactionDetails);<NEW_LINE>}<NEW_LINE>ourLog.debug("Processed metaDeleteOperation on {} in {}ms", theResourceId.getValue(<MASK><NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>MT retVal = (MT) metaGetOperation(theMetaDel.getClass(), theResourceId, theRequest);<NEW_LINE>return retVal;<NEW_LINE>}
), w.getMillisAndRestart());
681,677
public Cursor handle(RelNode logicalPlan, ExecutionContext executionContext) {<NEW_LINE>ArrayResultCursor result = new ArrayResultCursor("TRACE");<NEW_LINE>result.addColumn("ID", DataTypes.IntegerType);<NEW_LINE>result.addColumn("NODE_IP", DataTypes.StringType);<NEW_LINE>result.addColumn("TIMESTAMP", DataTypes.DoubleType);<NEW_LINE>result.addColumn("TYPE", DataTypes.StringType);<NEW_LINE>result.addColumn("GROUP_NAME", DataTypes.StringType);<NEW_LINE>result.addColumn("DBKEY_NAME", DataTypes.StringType);<NEW_LINE>// result.addColumn("THREAD", DataType.StringType);<NEW_LINE>result.addColumn("TIME_COST(ms)", DataTypes.StringType);<NEW_LINE>result.addColumn("CONNECTION_TIME_COST(ms)", DataTypes.StringType);<NEW_LINE>result.addColumn("TOTAL_TIME_COST(ms)", DataTypes.StringType);<NEW_LINE>result.addColumn("CLOSE_TIME_COST(ms)", DataTypes.StringType);<NEW_LINE>result.<MASK><NEW_LINE>result.addColumn("STATEMENT", DataTypes.StringType);<NEW_LINE>result.addColumn("PARAMS", DataTypes.StringType);<NEW_LINE>result.initMeta();<NEW_LINE>int index = 0;<NEW_LINE>java.text.DecimalFormat df = new java.text.DecimalFormat("0.00");<NEW_LINE>List<SQLOperation> ops = null;<NEW_LINE>Long startTimestamp = null;<NEW_LINE>if (executionContext.getTracer() != null) {<NEW_LINE>ops = ImmutableList.copyOf(executionContext.getTracer().getOperations());<NEW_LINE>String hostIp = AddressUtils.getHostIp();<NEW_LINE>for (SQLOperation op : ops) {<NEW_LINE>if (startTimestamp == null) {<NEW_LINE>startTimestamp = op.getTimestamp();<NEW_LINE>}<NEW_LINE>result.addRow(new Object[] { index++, hostIp, new DecimalFormat("0.000").format((op.getTimestamp() - startTimestamp) / (float) (1000 * 1000)), op.getOperationType(), op.getGroupName(), op.getDbKeyName(), op.getTimeCost(), df.format(op.getGetConnectionTimeCost()), op.getTotalTimeCost(), op.getPhysicalCloseCost(), op.getRowsCount(), op.getSqlOrResult(), op.getParamsStr() });<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
addColumn("ROWS", DataTypes.LongType);
1,434,100
static Header readHeader(Version version, int networkMessageSize, BytesReference bytesReference) throws IOException {<NEW_LINE>try (StreamInput streamInput = bytesReference.streamInput()) {<NEW_LINE>streamInput.skip(TcpHeader.BYTES_REQUIRED_FOR_MESSAGE_SIZE);<NEW_LINE><MASK><NEW_LINE>byte status = streamInput.readByte();<NEW_LINE>Version remoteVersion = Version.fromId(streamInput.readInt());<NEW_LINE>Header header = new Header(networkMessageSize, requestId, status, remoteVersion);<NEW_LINE>final IllegalStateException invalidVersion = ensureVersionCompatibility(remoteVersion, version, header.isHandshake());<NEW_LINE>if (invalidVersion != null) {<NEW_LINE>throw invalidVersion;<NEW_LINE>} else {<NEW_LINE>if (remoteVersion.onOrAfter(TcpHeader.VERSION_WITH_HEADER_SIZE)) {<NEW_LINE>// Skip since we already have ensured enough data available<NEW_LINE>streamInput.readInt();<NEW_LINE>header.finishParsingHeader(streamInput);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return header;<NEW_LINE>}<NEW_LINE>}
long requestId = streamInput.readLong();
638,624
protected boolean checkLoadLimiting(Indexer indexer) {<NEW_LINE>boolean preventedByLoadLimiting = indexer.getConfig().getLoadLimitOnRandom().isPresent() && random.nextInt(indexer.getConfig().getLoadLimitOnRandom().get()) + 1 != 1;<NEW_LINE>if (preventedByLoadLimiting) {<NEW_LINE>boolean loadLimitIgnored = configProvider.getBaseConfig().getSearching().isIgnoreLoadLimitingForInternalSearches() && searchRequest.getSource() == SearchSource.INTERNAL;<NEW_LINE>if (loadLimitIgnored) {<NEW_LINE>logger.debug("Ignoring load limiting for internal search");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>String message = String.format("Not using %s because load limiting prevented it. Chances of it being picked: 1/%d", indexer.getName(), indexer.getConfig().<MASK><NEW_LINE>return handleIndexerNotSelected(indexer, message, "Load limiting");<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getLoadLimitOnRandom().get());
1,754,406
public // =============<NEW_LINE>void functionScore(OperatorCall<PathMappingCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<PathMappingCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {<NEW_LINE>PathMappingCQ cq = new PathMappingCQ();<NEW_LINE>queryLambda.callback(cq);<NEW_LINE>final Collection<FilterFunctionBuilder> list = new ArrayList<>();<NEW_LINE>if (functionsLambda != null) {<NEW_LINE>functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {<NEW_LINE>PathMappingCQ cf = new PathMappingCQ();<NEW_LINE>cqLambda.callback(cf);<NEW_LINE>list.add(new FilterFunctionBuilder(cf.getQuery(), scoreFunctionBuilder));<NEW_LINE>});<NEW_LINE>}<NEW_LINE>final FunctionScoreQueryBuilder builder = regFunctionScoreQ(<MASK><NEW_LINE>if (opLambda != null) {<NEW_LINE>opLambda.callback(builder);<NEW_LINE>}<NEW_LINE>}
cq.getQuery(), list);
851,237
private void verifyInterleavedProperties() {<NEW_LINE>doWithInterleavedProperties((spannerPersistentProperty) -> {<NEW_LINE>// getting the inner type will throw an exception if the property isn't a<NEW_LINE>// collection.<NEW_LINE>Class childType = spannerPersistentProperty.getColumnInnerType();<NEW_LINE>SpannerPersistentEntityImpl<?> childEntity = (SpannerPersistentEntityImpl<?>) this.spannerMappingContext.getPersistentEntity(childType);<NEW_LINE>List<MASK><NEW_LINE>List<SpannerPersistentProperty> childKeyProperties = childEntity.getFlattenedPrimaryKeyProperties();<NEW_LINE>if (primaryKeyProperties.size() >= childKeyProperties.size()) {<NEW_LINE>throw new SpannerDataException("A child table (" + childEntity.getType().getSimpleName() + ")" + " must contain the primary key columns of its " + "parent (" + childEntity.getType().getSimpleName() + ")" + " in the same order starting the first " + "column with additional key columns after.");<NEW_LINE>}<NEW_LINE>for (int i = 0; i < primaryKeyProperties.size(); i++) {<NEW_LINE>SpannerPersistentProperty parentKey = primaryKeyProperties.get(i);<NEW_LINE>SpannerPersistentProperty childKey = childKeyProperties.get(i);<NEW_LINE>if (!parentKey.getColumnName().equals(childKey.getColumnName()) || !parentKey.getType().equals(childKey.getType())) {<NEW_LINE>throw new SpannerDataException("The child primary key column (" + childEntity.getType().getSimpleName() + "." + childKey.getColumnName() + ") at position " + (i + 1) + " does not match that of its parent (" + getType().getSimpleName() + "." + parentKey.getColumnName() + ").");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
<SpannerPersistentProperty> primaryKeyProperties = getFlattenedPrimaryKeyProperties();
1,052,603
public static File decompress(String tarZipSource, String targetDir) {<NEW_LINE>File unFile = null;<NEW_LINE>// tar compress format<NEW_LINE>ArchiveStreamFactory archiveStreamFactory = new ArchiveStreamFactory();<NEW_LINE>try (FileInputStream inputStream = new FileInputStream(tarZipSource);<NEW_LINE>BufferedInputStream bufInput = new BufferedInputStream(inputStream);<NEW_LINE>GZIPInputStream gzipInput = new GZIPInputStream(bufInput);<NEW_LINE>ArchiveInputStream archiveInput = archiveStreamFactory.createArchiveInputStream("tar", gzipInput)) {<NEW_LINE>TarArchiveEntry entry = (TarArchiveEntry) archiveInput.getNextEntry();<NEW_LINE>while (entry != null) {<NEW_LINE>String entryName = entry.getName();<NEW_LINE>if (entry.isDirectory()) {<NEW_LINE><MASK><NEW_LINE>if (unFile == null) {<NEW_LINE>unFile = new File(targetDir + entryName.replaceAll("/.*$", ""));<NEW_LINE>}<NEW_LINE>} else if (entry.isFile()) {<NEW_LINE>String fullFileName = createDir(targetDir, entryName, 2);<NEW_LINE>try (FileOutputStream outputStream = new FileOutputStream(fullFileName);<NEW_LINE>BufferedOutputStream bufOutput = new BufferedOutputStream(outputStream)) {<NEW_LINE>int b = -1;<NEW_LINE>while ((b = archiveInput.read()) != -1) {<NEW_LINE>bufOutput.write(b);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>entry = (TarArchiveEntry) archiveInput.getNextEntry();<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>return unFile;<NEW_LINE>}
createDir(targetDir, entryName, 1);
854,698
public void actionPerformed(ActionEvent e) {<NEW_LINE>final RepositoryRegisterUI rrui = new RepositoryRegisterUI(RepositoryNode.this.info);<NEW_LINE>rrui.getAccessibleContext().setAccessibleDescription(LBL_Edit_Repo());<NEW_LINE>DialogDescriptor dd = new DialogDescriptor(rrui, LBL_Edit_Repo());<NEW_LINE>dd.setClosingOptions(new Object[] { rrui.getButton(), DialogDescriptor.CANCEL_OPTION });<NEW_LINE>dd.setOptions(new Object[] { rrui.getButton(), DialogDescriptor.CANCEL_OPTION });<NEW_LINE>Object ret = DialogDisplayer.getDefault().notify(dd);<NEW_LINE>if (rrui.getButton() == ret) {<NEW_LINE>RepositoryInfo info;<NEW_LINE>try {<NEW_LINE>info = rrui.getRepositoryInfo();<NEW_LINE>} catch (URISyntaxException x) {<NEW_LINE>DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(x.getLocalizedMessage(), NotifyDescriptor.ERROR_MESSAGE));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RepositoryPreferences.<MASK><NEW_LINE>RepositoryNode.this.info = info;<NEW_LINE>setDisplayName(info.getName());<NEW_LINE>fireIconChange();<NEW_LINE>fireOpenedIconChange();<NEW_LINE>children.setInfo(info);<NEW_LINE>}<NEW_LINE>}
getInstance().addOrModifyRepositoryInfo(info);
505,090
public void marshall(DocumentClassifierProperties documentClassifierProperties, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (documentClassifierProperties == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getDocumentClassifierArn(), DOCUMENTCLASSIFIERARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getLanguageCode(), LANGUAGECODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getMessage(), MESSAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getSubmitTime(), SUBMITTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getEndTime(), ENDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getTrainingEndTime(), TRAININGENDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getInputDataConfig(), INPUTDATACONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getOutputDataConfig(), OUTPUTDATACONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getClassifierMetadata(), CLASSIFIERMETADATA_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getDataAccessRoleArn(), DATAACCESSROLEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getVolumeKmsKeyId(), VOLUMEKMSKEYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getVpcConfig(), VPCCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getMode(), MODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getModelKmsKeyId(), MODELKMSKEYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getVersionName(), VERSIONNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getSourceModelArn(), SOURCEMODELARN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
documentClassifierProperties.getTrainingStartTime(), TRAININGSTARTTIME_BINDING);
1,627,972
public UploadResult uploadBackup(Exhibitor exhibitor, BackupMetaData backup, File source, final Map<String, String> configValues) throws Exception {<NEW_LINE>List<BackupMetaData> <MASK><NEW_LINE>if (availableBackups.contains(backup)) {<NEW_LINE>return UploadResult.DUPLICATE;<NEW_LINE>}<NEW_LINE>RetryPolicy retryPolicy = makeRetryPolicy(configValues);<NEW_LINE>Throttle throttle = makeThrottle(configValues);<NEW_LINE>String key = toKey(backup, configValues);<NEW_LINE>if (source.length() < MIN_S3_PART_SIZE) {<NEW_LINE>byte[] bytes = Files.toByteArray(source);<NEW_LINE>S3Utils.simpleUploadFile(s3Client, bytes, configValues.get(CONFIG_BUCKET.getKey()), key);<NEW_LINE>} else {<NEW_LINE>multiPartUpload(source, configValues, retryPolicy, throttle, key);<NEW_LINE>}<NEW_LINE>UploadResult result = UploadResult.SUCCEEDED;<NEW_LINE>for (BackupMetaData existing : availableBackups) {<NEW_LINE>if (existing.getName().equals(backup.getName())) {<NEW_LINE>deleteBackup(exhibitor, existing, configValues);<NEW_LINE>result = UploadResult.REPLACED_OLD_VERSION;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
availableBackups = getAvailableBackups(exhibitor, configValues);
875,220
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_bit_idauthentication);<NEW_LINE>request = (BitIDSignRequest) getIntent().getSerializableExtra(REQUEST);<NEW_LINE>signInButton = (Button) findViewById(R.id.btSignUp);<NEW_LINE>errorView = (TextView) findViewById(R.id.tvBitidError);<NEW_LINE>question = (TextView) findViewById(R.id.tvBitIdWebsite);<NEW_LINE>question.setText(getString(R.string.bitid_question, request.getHost()));<NEW_LINE>TextView warning = (TextView) findViewById(R.id.tvInsecureWarning);<NEW_LINE>if (request.isSecure()) {<NEW_LINE>warning.setVisibility(View.GONE);<NEW_LINE>} else {<NEW_LINE>warning.setVisibility(View.VISIBLE);<NEW_LINE>}<NEW_LINE>progress = new ProgressDialog(this);<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>errorView.setText(savedInstanceState.getString(ERROR_TEXT));<NEW_LINE>question.setText(savedInstanceState.getString(QUESTION_TEXT));<NEW_LINE>if (savedInstanceState.getBoolean(SIGNBUTTON_VISIBLE)) {<NEW_LINE>signInButton.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (savedInstanceState.getBoolean(ERRORVIEW_VISIBLE)) {<NEW_LINE>errorView.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>errorView.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
signInButton.setVisibility(View.GONE);
917,290
private Node withIpAssigned(Node node) {<NEW_LINE>if (!node.type().isHost()) {<NEW_LINE>return node.with(node.ipConfig().withPrimary(nameResolver.resolveAll(node.hostname())));<NEW_LINE>}<NEW_LINE>int hostIndex = Integer.parseInt(node.hostname().replaceAll("^[a-z]+|-\\d+$", ""));<NEW_LINE>Set<String> addresses = Set.of("::" + hostIndex + ":0");<NEW_LINE>Set<String> ipAddressPool = new HashSet<>();<NEW_LINE>if (!behaviours.contains(Behaviour.failDnsUpdate)) {<NEW_LINE>nameResolver.addRecord(node.hostname(), addresses.<MASK><NEW_LINE>for (int i = 1; i <= 2; i++) {<NEW_LINE>String ip = "::" + hostIndex + ":" + i;<NEW_LINE>ipAddressPool.add(ip);<NEW_LINE>nameResolver.addRecord(node.hostname() + "-" + i, ip);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>IP.Pool pool = node.ipConfig().pool().withIpAddresses(ipAddressPool);<NEW_LINE>return node.with(node.ipConfig().withPrimary(addresses).withPool(pool));<NEW_LINE>}
iterator().next());
889,226
public void execute() throws Exception {<NEW_LINE>File quickstartTmpDir = new File(_dataDir, String.valueOf(System.currentTimeMillis()));<NEW_LINE>File baseDir <MASK><NEW_LINE>File dataDir = new File(quickstartTmpDir, "rawdata");<NEW_LINE>Preconditions.checkState(dataDir.mkdirs());<NEW_LINE>File schemaFile = new File(baseDir, "githubEvents_schema.json");<NEW_LINE>File tableConfigFile = new File(baseDir, "githubEvents_offline_table_config.json");<NEW_LINE>File ingestionJobSpecFile = new File(baseDir, "ingestionJobSpec.yaml");<NEW_LINE>ClassLoader classLoader = JsonIndexQuickStart.class.getClassLoader();<NEW_LINE>URL resource = classLoader.getResource("examples/batch/githubEvents/githubEvents_offline_table_config.json");<NEW_LINE>Preconditions.checkNotNull(resource);<NEW_LINE>FileUtils.copyURLToFile(resource, tableConfigFile);<NEW_LINE>resource = classLoader.getResource("examples/batch/githubEvents/githubEvents_schema.json");<NEW_LINE>Preconditions.checkNotNull(resource);<NEW_LINE>FileUtils.copyURLToFile(resource, schemaFile);<NEW_LINE>resource = classLoader.getResource("examples/batch/githubEvents/ingestionJobSpec.yaml");<NEW_LINE>Preconditions.checkNotNull(resource);<NEW_LINE>FileUtils.copyURLToFile(resource, ingestionJobSpecFile);<NEW_LINE>QuickstartTableRequest request = new QuickstartTableRequest(baseDir.getAbsolutePath());<NEW_LINE>final QuickstartRunner runner = new QuickstartRunner(Collections.singletonList(request), 1, 1, 1, 0, dataDir, getConfigOverrides());<NEW_LINE>printStatus(Color.CYAN, "***** Starting Zookeeper, controller, broker and server *****");<NEW_LINE>runner.startAll();<NEW_LINE>Runtime.getRuntime().addShutdownHook(new Thread(() -> {<NEW_LINE>try {<NEW_LINE>printStatus(Color.GREEN, "***** Shutting down offline quick start *****");<NEW_LINE>runner.stop();<NEW_LINE>FileUtils.deleteDirectory(quickstartTmpDir);<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}));<NEW_LINE>printStatus(Color.CYAN, "***** Bootstrap githubEvents table *****");<NEW_LINE>runner.bootstrapTable();<NEW_LINE>waitForBootstrapToComplete(null);<NEW_LINE>printStatus(Color.YELLOW, "***** Offline json-index quickstart setup complete *****");<NEW_LINE>String q1 = "select json_extract_scalar(repo, '$.name', 'STRING'), count(*) from githubEvents where json_match(actor, " + "'\"$.login\"=''LombiqBot''') group by 1 order by 2 desc limit 10";<NEW_LINE>printStatus(Color.YELLOW, "Most contributed repos by 'LombiqBot'");<NEW_LINE>printStatus(Color.CYAN, "Query : " + q1);<NEW_LINE>printStatus(Color.YELLOW, prettyPrintResponse(runner.runQuery(q1)));<NEW_LINE>printStatus(Color.GREEN, "***************************************************");<NEW_LINE>printStatus(Color.GREEN, "You can always go to http://localhost:9000 to play around in the query console");<NEW_LINE>}
= new File(quickstartTmpDir, "githubEvents");
1,538,784
private void attribute(MessageTextHandler messageTextHandler, Name attributeName, Name elementName, boolean atSentenceStart) throws SAXException {<NEW_LINE>String ns = attributeName.getNamespaceUri();<NEW_LINE>if (html || "".equals(ns)) {<NEW_LINE>messageTextString(messageTextHandler, ATTRIBUTE, atSentenceStart);<NEW_LINE>codeString(messageTextHandler, attributeName.getLocalName());<NEW_LINE>} else if ("http://www.w3.org/XML/1998/namespace".equals(ns)) {<NEW_LINE><MASK><NEW_LINE>codeString(messageTextHandler, "xml:" + attributeName.getLocalName());<NEW_LINE>} else {<NEW_LINE>char[] humanReadable = WELL_KNOWN_NAMESPACES.get(ns);<NEW_LINE>if (humanReadable == null) {<NEW_LINE>if (loggingOk) {<NEW_LINE>log4j.info(new StringBuilder().append("UNKNOWN_NS:\t").append(ns));<NEW_LINE>}<NEW_LINE>messageTextString(messageTextHandler, ATTRIBUTE, atSentenceStart);<NEW_LINE>codeString(messageTextHandler, attributeName.getLocalName());<NEW_LINE>messageTextString(messageTextHandler, FROM_NAMESPACE, false);<NEW_LINE>codeString(messageTextHandler, ns);<NEW_LINE>} else {<NEW_LINE>messageTextString(messageTextHandler, humanReadable, atSentenceStart);<NEW_LINE>messageTextString(messageTextHandler, SPACE, false);<NEW_LINE>messageTextString(messageTextHandler, ATTRIBUTE, false);<NEW_LINE>codeString(messageTextHandler, attributeName.getLocalName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
messageTextString(messageTextHandler, ATTRIBUTE, atSentenceStart);
233,986
protected Control createPreferenceContent(Composite parent) {<NEW_LINE>Composite composite = UIUtils.createPlaceholder(parent, 1, 5);<NEW_LINE>// Misc settings<NEW_LINE>{<NEW_LINE>Group timeoutsGroup = UIUtils.createControlGroup(composite, CoreMessages.pref_page_error_handle_group_timeouts_title, 2, GridData.VERTICAL_ALIGN_BEGINNING, 0);<NEW_LINE>connectionOpenTimeout = UIUtils.createLabelSpinner(timeoutsGroup, CoreMessages.pref_page_error_handle_connection_open_timeout_label + UIMessages.label_ms, CoreMessages.pref_page_error_handle_connection_open_timeout_label_tip, 0, 0, Integer.MAX_VALUE);<NEW_LINE>connectionCloseTimeout = UIUtils.createLabelSpinner(timeoutsGroup, CoreMessages.pref_page_error_handle_connection_close_timeout_label + UIMessages.label_ms, CoreMessages.pref_page_error_handle_connection_close_timeout_label_tip, 0, 0, Integer.MAX_VALUE);<NEW_LINE>connectionValidateTimeout = UIUtils.createLabelSpinner(timeoutsGroup, CoreMessages.pref_page_error_handle_connection_validate_timeout_label + UIMessages.label_ms, CoreMessages.pref_page_error_handle_connection_validate_timeout_label_tip, 0, 0, Integer.MAX_VALUE);<NEW_LINE>}<NEW_LINE>// Misc settings<NEW_LINE>{<NEW_LINE>Group errorGroup = UIUtils.createControlGroup(composite, CoreMessages.pref_page_error_handle_group_execute_title, 2, GridData.VERTICAL_ALIGN_BEGINNING, 0);<NEW_LINE>rollbackOnErrorCheck = UIUtils.createCheckbox(errorGroup, CoreMessages.pref_page_database_general_checkbox_rollback_on_error, null, false, 2);<NEW_LINE>connectionAutoRecoverEnabled = UIUtils.createCheckbox(errorGroup, CoreMessages.pref_page_error_handle_recover_enabled_label, <MASK><NEW_LINE>connectionAutoRecoverRetryCount = UIUtils.createLabelSpinner(errorGroup, CoreMessages.pref_page_error_handle_recover_retry_count_label, CoreMessages.pref_page_error_handle_recover_retry_count_tip, 0, 0, Integer.MAX_VALUE);<NEW_LINE>}<NEW_LINE>// Canceling<NEW_LINE>{<NEW_LINE>Group errorGroup = UIUtils.createControlGroup(composite, CoreMessages.pref_page_error_handle_group_cancel_title, 2, GridData.VERTICAL_ALIGN_BEGINNING, 0);<NEW_LINE>cancelCheckTimeout = UIUtils.createLabelSpinner(errorGroup, CoreMessages.pref_page_error_handle_cancel_check_timeout, CoreMessages.pref_page_error_handle_cancel_check_timeout_tip, 0, 0, Integer.MAX_VALUE);<NEW_LINE>}<NEW_LINE>return composite;<NEW_LINE>}
CoreMessages.pref_page_error_handle_recover_enabled_tip, false, 2);
104,033
private void addSubqueryJoinStatements(PostgresGlobalState globalState, List<PostgresJoin> joinStatements, PostgresTable fromTable) {<NEW_LINE>// JOIN with subquery<NEW_LINE>for (int i = 0; i < Randomly.smallNumber(); i++) {<NEW_LINE>PostgresTables subqueryTables = new PostgresTables(Randomly.nonEmptySubset(localTables));<NEW_LINE>List<PostgresColumn> columns = new ArrayList<>();<NEW_LINE>columns.addAll(subqueryTables.getColumns());<NEW_LINE>columns.addAll(fromTable.getColumns());<NEW_LINE>PostgresExpression subquery = createSubquery(globalState, String.format("sub%d", i), subqueryTables);<NEW_LINE>PostgresExpressionGenerator subqueryJoinGen = new PostgresExpressionGenerator<MASK><NEW_LINE>PostgresExpression joinClause = subqueryJoinGen.generateExpression(PostgresDataType.BOOLEAN);<NEW_LINE>PostgresJoinType options = PostgresJoinType.getRandom();<NEW_LINE>PostgresJoin j = new PostgresJoin(subquery, joinClause, options);<NEW_LINE>joinStatements.add(j);<NEW_LINE>}<NEW_LINE>}
(globalState).setColumns(columns);
1,153,510
private void refreshMappings(@Nullable WorkspaceFileValue newValue) {<NEW_LINE>if (newValue == null) {<NEW_LINE>dirToRepoMap = ImmutableSortedMap.of();<NEW_LINE>repoToDirMap = ImmutableSortedMap.of();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>dirToRepoMap = ImmutableSortedMap.copyOf(newValue.getManagedDirectories());<NEW_LINE>Map<RepositoryName, Set<PathFragment>> reposMap = Maps.newHashMap();<NEW_LINE>for (Map.Entry<PathFragment, RepositoryName> entry : dirToRepoMap.entrySet()) {<NEW_LINE>RepositoryName repositoryName = entry.getValue();<NEW_LINE>reposMap.computeIfAbsent(repositoryName, name -> Sets.newTreeSet()).<MASK><NEW_LINE>}<NEW_LINE>ImmutableSortedMap.Builder<RepositoryName, ImmutableSet<PathFragment>> reposMapBuilder = new ImmutableSortedMap.Builder<>(Comparator.comparing(RepositoryName::getName));<NEW_LINE>for (Map.Entry<RepositoryName, Set<PathFragment>> entry : reposMap.entrySet()) {<NEW_LINE>reposMapBuilder.put(entry.getKey(), ImmutableSet.copyOf(entry.getValue()));<NEW_LINE>}<NEW_LINE>repoToDirMap = reposMapBuilder.buildOrThrow();<NEW_LINE>}
add(entry.getKey());
466,441
// ----- private methods -----<NEW_LINE>private void init() {<NEW_LINE>factories.put(NotEmptyQuery.class, new NotEmptyQueryFactory(this));<NEW_LINE>factories.put(FulltextQuery.class, new KeywordQueryFactory(this));<NEW_LINE>factories.put(SpatialQuery.class, new SpatialQueryFactory(this));<NEW_LINE>factories.put(GroupQuery.class, new GroupQueryFactory(this));<NEW_LINE>factories.put(RangeQuery.class, new RangeQueryFactory(this));<NEW_LINE>factories.put(ExactQuery.class, new KeywordQueryFactory(this));<NEW_LINE>factories.put(ArrayQuery.<MASK><NEW_LINE>factories.put(EmptyQuery.class, new EmptyQueryFactory(this));<NEW_LINE>factories.put(TypeQuery.class, new TypeQueryFactory(this));<NEW_LINE>factories.put(UuidQuery.class, new UuidQueryFactory(this));<NEW_LINE>factories.put(RelationshipQuery.class, new RelationshipQueryFactory(this));<NEW_LINE>factories.put(ComparisonQuery.class, new ComparisonQueryFactory(this));<NEW_LINE>converters.put(Boolean.class, new BooleanTypeConverter());<NEW_LINE>converters.put(String.class, new StringTypeConverter());<NEW_LINE>converters.put(Date.class, new DateTypeConverter());<NEW_LINE>converters.put(Long.class, new LongTypeConverter());<NEW_LINE>converters.put(Short.class, new ShortTypeConverter());<NEW_LINE>converters.put(Integer.class, new IntTypeConverter());<NEW_LINE>converters.put(Float.class, new FloatTypeConverter());<NEW_LINE>converters.put(Double.class, new DoubleTypeConverter());<NEW_LINE>converters.put(byte.class, new ByteTypeConverter());<NEW_LINE>}
class, new ArrayQueryFactory(this));
782,921
public CompletableFuture<Void> addListener(CollectionEventListener<Map.Entry<K, Versioned<V>>> listener, Executor executor) {<NEW_LINE>AtomicMapEventListener<K, V> mapListener = event -> {<NEW_LINE>switch(event.type()) {<NEW_LINE>case INSERT:<NEW_LINE>listener.event(new CollectionEvent<>(CollectionEvent.Type.ADD, Maps.immutableEntry(event.key(), <MASK><NEW_LINE>break;<NEW_LINE>case UPDATE:<NEW_LINE>listener.event(new CollectionEvent<>(CollectionEvent.Type.REMOVE, Maps.immutableEntry(event.key(), event.oldValue())));<NEW_LINE>listener.event(new CollectionEvent<>(CollectionEvent.Type.ADD, Maps.immutableEntry(event.key(), event.newValue())));<NEW_LINE>break;<NEW_LINE>case REMOVE:<NEW_LINE>listener.event(new CollectionEvent<>(CollectionEvent.Type.REMOVE, Maps.immutableEntry(event.key(), event.oldValue())));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>if (listenerMap.putIfAbsent(listener, mapListener) == null) {<NEW_LINE>return CachedAsyncAtomicMap.this.addListener(mapListener, executor);<NEW_LINE>}<NEW_LINE>return CompletableFuture.completedFuture(null);<NEW_LINE>}
event.newValue())));
197,342
public ImageRecycleBinInfo unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>ImageRecycleBinInfo imageRecycleBinInfo = new ImageRecycleBinInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.nextEvent();<NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return imageRecycleBinInfo;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("imageId", targetDepth)) {<NEW_LINE>imageRecycleBinInfo.setImageId(StringStaxUnmarshaller.getInstance<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("name", targetDepth)) {<NEW_LINE>imageRecycleBinInfo.setName(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("description", targetDepth)) {<NEW_LINE>imageRecycleBinInfo.setDescription(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("recycleBinEnterTime", targetDepth)) {<NEW_LINE>imageRecycleBinInfo.setRecycleBinEnterTime(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("recycleBinExitTime", targetDepth)) {<NEW_LINE>imageRecycleBinInfo.setRecycleBinExitTime(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return imageRecycleBinInfo;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
().unmarshall(context));
794,057
public ArcFurnaceRecipe readFromJson(ResourceLocation recipeId, JsonObject json) {<NEW_LINE>JsonArray results = json.getAsJsonArray("results");<NEW_LINE>NonNullList<ItemStack> outputs = NonNullList.withSize(results.size(), ItemStack.EMPTY);<NEW_LINE>for (int i = 0; i < results.size(); i++) outputs.set(i, readOutput(results.get(i)));<NEW_LINE>IngredientWithSize input = IngredientWithSize.deserialize<MASK><NEW_LINE>JsonArray additives = json.getAsJsonArray("additives");<NEW_LINE>IngredientWithSize[] ingredients = new IngredientWithSize[additives.size()];<NEW_LINE>for (int i = 0; i < additives.size(); i++) ingredients[i] = IngredientWithSize.deserialize(additives.get(i));<NEW_LINE>ItemStack slag = ItemStack.EMPTY;<NEW_LINE>if (json.has("slag"))<NEW_LINE>slag = readOutput(json.get("slag"));<NEW_LINE>int time = GsonHelper.getAsInt(json, "time");<NEW_LINE>int energy = GsonHelper.getAsInt(json, "energy");<NEW_LINE>return IEServerConfig.MACHINES.arcFurnaceConfig.apply(new ArcFurnaceRecipe(recipeId, outputs, input, slag, time, energy, ingredients));<NEW_LINE>}
(json.get("input"));
880,771
public void actionPerformed(ActionEvent arg0) {<NEW_LINE>tableHosts.acceptText();<NEW_LINE>int r = tableHosts.getRowCount();<NEW_LINE>String defaultIP = UnitContext.getDefaultHost();<NEW_LINE>String ip = defaultIP;<NEW_LINE>if (isClusterEditing) {<NEW_LINE>ip = fixedIP;<NEW_LINE>} else {<NEW_LINE>if (r > 0) {<NEW_LINE>ip = (String) tableHosts.data.getValueAt(r - 1, COL_HOST);<NEW_LINE>ip = increaseIP(ip);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Host h = new Host(ip, 8281);<NEW_LINE><MASK><NEW_LINE>tableHosts.setValueAt(ip, row, COL_HOST);<NEW_LINE>tableHosts.setValueAt(8281, row, COL_PORT);<NEW_LINE>tableHosts.setValueAt(h.getMaxTaskNum(), row, COL_MAXTASKNUM);<NEW_LINE>boolean isLocal = AppUtil.isLocalIP(ip);<NEW_LINE>tableHosts.setValueAt(isLocal ? YES : NO, row, COL_ISLOCAL);<NEW_LINE>}
int row = tableHosts.addRow();
1,070,505
public void replaceFriends(Set<String> friends, Set<String> packagesToExpose) {<NEW_LINE>removePublicAndFriends();<NEW_LINE>Element _confData = getConfData();<NEW_LINE><MASK><NEW_LINE>Element friendPackages = createModuleElement(doc, ProjectXMLManager.FRIEND_PACKAGES);<NEW_LINE>insertPublicOrFriend(friendPackages);<NEW_LINE>for (String friend : friends) {<NEW_LINE>friendPackages.appendChild(createModuleElement(doc, ProjectXMLManager.FRIEND, friend));<NEW_LINE>}<NEW_LINE>for (String pkg : packagesToExpose) {<NEW_LINE>if (pkg.endsWith(".*")) {<NEW_LINE>friendPackages.appendChild(createModuleElement(doc, ProjectXMLManager.SUBPACKAGES, pkg.substring(0, pkg.length() - ".*".length())));<NEW_LINE>} else {<NEW_LINE>friendPackages.appendChild(createModuleElement(doc, ProjectXMLManager.PACKAGE, pkg));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>project.putPrimaryConfigurationData(_confData);<NEW_LINE>publicPackages = null;<NEW_LINE>}
Document doc = _confData.getOwnerDocument();
1,308,962
public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List<Component> tooltip, TooltipFlag flagIn) {<NEW_LINE>if (TooltipUtil.isDisplay(stack)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// add all traits to the info<NEW_LINE>MaterialVariantId materialVariant = this.getMaterial(stack);<NEW_LINE>MaterialId id = materialVariant.getId();<NEW_LINE>if (!materialVariant.equals(IMaterial.UNKNOWN_ID)) {<NEW_LINE>if (canUseMaterial(id)) {<NEW_LINE>for (ModifierEntry entry : MaterialRegistry.getInstance().getTraits(id, getStatType())) {<NEW_LINE>tooltip.add(entry.getModifier().getDisplayName(entry.getLevel()));<NEW_LINE>}<NEW_LINE>// add stats<NEW_LINE>if (Config.CLIENT.extraToolTips.get()) {<NEW_LINE>TooltipKey key = SafeClientAccess.getTooltipKey();<NEW_LINE>if (key == TooltipKey.SHIFT || key == TooltipKey.UNKNOWN) {<NEW_LINE>this.addStatInfoTooltip(id, tooltip);<NEW_LINE>} else {<NEW_LINE>// info tooltip for detailed and component info<NEW_LINE>tooltip.add(TextComponent.EMPTY);<NEW_LINE>tooltip.add(TooltipUtil.TOOLTIP_HOLD_SHIFT);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// is the material missing, or is it not valid for this stat type?<NEW_LINE>IMaterial <MASK><NEW_LINE>if (material == IMaterial.UNKNOWN) {<NEW_LINE>tooltip.add(new TranslatableComponent(MISSING_MATERIAL_KEY, id));<NEW_LINE>} else {<NEW_LINE>tooltip.add(new TranslatableComponent(MISSING_STATS_KEY, materialStatId).withStyle(ChatFormatting.GRAY));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// mod handled by getCreatorModId<NEW_LINE>}
material = MaterialRegistry.getMaterial(id);
594,736
public static void cleanupEmptyProfiles(Element rootElement, List<String> profilesParents) {<NEW_LINE>IteratorIterable<Element> filteredElements = rootElement.getDescendants(new ElementFilter(POM_ELEMENT_PROFILES));<NEW_LINE>List<Element> profiles = new ArrayList<>();<NEW_LINE>for (Element profilesElement : filteredElements) {<NEW_LINE>profiles.add(profilesElement);<NEW_LINE>}<NEW_LINE>for (Element profilesElement : profiles) {<NEW_LINE>if (!profilesParents.contains(profilesElement.getParentElement().getName())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>removeElementWithEmptyChildren(profilesElement, POM_ELEMENT_PROFILE, Arrays.asList(JDomCfg<MASK><NEW_LINE>if (!profilesElement.getDescendants(new ElementFilter(POM_ELEMENT_PROFILE)).hasNext()) {<NEW_LINE>JDomUtils.removeChildAndItsCommentFromContent(profilesElement.getParentElement(), profilesElement);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.POM_ELEMENT_ID, JDomCfg.POM_ELEMENT_ACTIVATION));
866,385
private void writeLinksToComparisons(HTMLFile htmlFile, String headerStr, String csvFile) {<NEW_LINE>// should be already sorted!<NEW_LINE>List<JPlagComparison> comparisons = result.getComparisons(options.getMaximumNumberOfComparisons());<NEW_LINE>// Country tag<NEW_LINE>htmlFile.// Country tag<NEW_LINE>println(headerStr + " (<a href=\"help-sim-" + "en" + ".html\"><small><font color=\"#000088\">" + msg.getString("Report.WhatIsThis") + "</font></small></a>):</H4>");<NEW_LINE>htmlFile.println("<p><a href=\"" + csvFile + "\">download csv</a></p>");<NEW_LINE>htmlFile.println("<TABLE CELLPADDING=3 CELLSPACING=2>");<NEW_LINE>for (JPlagComparison comparison : comparisons) {<NEW_LINE>String submissionNameA = comparison.getFirstSubmission().getName();<NEW_LINE>String submissionNameB = comparison.getSecondSubmission().getName();<NEW_LINE>htmlFile.print("<TR><TD BGCOLOR=" + color(comparison.similarityOfFirst(), 128, 192, 128, 192, 255, 255<MASK><NEW_LINE>htmlFile.print("</TD><TD BGCOLOR=" + color(comparison.similarityOfSecond(), 128, 192, 128, 192, 255, 255) + " ALIGN=center><A HREF=\"match" + getComparisonIndex(comparison) + ".html\">" + submissionNameB + "</A><BR><FONT COLOR=\"" + color(comparison.similarity(), 0, 255, 0, 0, 0, 0) + "\">(" + (((int) (comparison.similarity() * 10)) / (float) 10) + "%)</FONT>");<NEW_LINE>htmlFile.println("</TD></TR>");<NEW_LINE>}<NEW_LINE>htmlFile.println("</TABLE><P>\n");<NEW_LINE>htmlFile.println("<!---->");<NEW_LINE>}
) + ">" + submissionNameA + "</TD><TD><nobr>-&gt;</nobr>");
397,489
public static void updateErrorMessageForVerifyNoMoreInteractions(AssertionError errorToUpdate) {<NEW_LINE>String verifyNoMoreInteractionsInvocation = null;<NEW_LINE>StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();<NEW_LINE>for (int i = stackTrace.length - 1; i >= 0; i--) {<NEW_LINE>final StackTraceElement stackTraceElement = stackTrace[i];<NEW_LINE>if (stackTraceElement.getClassName().equals(POWER_MOCKITO_CLASS_NAME) && stackTraceElement.getMethodName().equals("verifyNoMoreInteractions")) {<NEW_LINE>final int invocationStackTraceIndex;<NEW_LINE>if (stackTrace[i + 1].getClassName().equals(POWER_MOCKITO_CLASS_NAME) && stackTrace[i + 1].getMethodName().equals("verifyZeroInteractions")) {<NEW_LINE>invocationStackTraceIndex = i + 2;<NEW_LINE>} else {<NEW_LINE>invocationStackTraceIndex = i + 1;<NEW_LINE>}<NEW_LINE>verifyNoMoreInteractionsInvocation = stackTrace[invocationStackTraceIndex].toString();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (verifyNoMoreInteractionsInvocation == null) {<NEW_LINE>// Something unexpected happened, just return<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String message = errorToUpdate.getMessage();<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append(message);<NEW_LINE>final int indexOfFirstAt = message.indexOf(AT);<NEW_LINE>final int startOfVerifyNoMoreInteractionsInvocation = indexOfFirstAt + AT.length() + 1;<NEW_LINE>final int endOfVerifyNoMoreInteractionsInvocation = message.indexOf('\n', indexOfFirstAt + AT.length());<NEW_LINE>builder.replace(startOfVerifyNoMoreInteractionsInvocation, endOfVerifyNoMoreInteractionsInvocation, verifyNoMoreInteractionsInvocation);<NEW_LINE>builder.delete(builder.indexOf("\n", endOfVerifyNoMoreInteractionsInvocation + 1), builder.lastIndexOf("\n"));<NEW_LINE>Whitebox.setInternalState(errorToUpdate, <MASK><NEW_LINE>}
"detailMessage", builder.toString());
128,882
private HttpClient createHttpClient() {<NEW_LINE>SslContextFactory sslContextFactory = null;<NEW_LINE>try {<NEW_LINE>sslContextFactory = new RestletSslContextFactory(org.restlet.engine.ssl.SslUtils.getSslContextFactory(this));<NEW_LINE>} catch (Exception e) {<NEW_LINE>getLogger().log(Level.WARNING, "Unable to create the SSL context factory.", e);<NEW_LINE>}<NEW_LINE>HttpClient httpClient = new HttpClient(sslContextFactory);<NEW_LINE>httpClient.setAddressResolutionTimeout(getAddressResolutionTimeout());<NEW_LINE>httpClient.setBindAddress(getBindAddress());<NEW_LINE>httpClient.setConnectTimeout(getConnectTimeout());<NEW_LINE>CookieStore cookieStore = getCookieStore();<NEW_LINE>if (cookieStore != null) {<NEW_LINE>httpClient.setCookieStore(cookieStore);<NEW_LINE>}<NEW_LINE>httpClient.setDispatchIO(isDispatchIO());<NEW_LINE>httpClient.setExecutor(getExecutor());<NEW_LINE>httpClient.setFollowRedirects(isFollowRedirects());<NEW_LINE>httpClient.setIdleTimeout(getIdleTimeout());<NEW_LINE>httpClient.setMaxConnectionsPerDestination(getMaxConnectionsPerDestination());<NEW_LINE>httpClient.setMaxRedirects(getMaxRedirects());<NEW_LINE>httpClient.setMaxRequestsQueuedPerDestination(getMaxRequestsQueuedPerDestination());<NEW_LINE>httpClient.setRequestBufferSize(getRequestBufferSize());<NEW_LINE><MASK><NEW_LINE>httpClient.setScheduler(getScheduler());<NEW_LINE>httpClient.setStopTimeout(getStopTimeout());<NEW_LINE>httpClient.setStrictEventOrdering(isStrictEventOrdering());<NEW_LINE>httpClient.setTCPNoDelay(isTcpNoDelay());<NEW_LINE>String userAgentField = getUserAgentField();<NEW_LINE>if (userAgentField != null) {<NEW_LINE>httpClient.setUserAgentField(new HttpField(HttpHeader.USER_AGENT, userAgentField));<NEW_LINE>}<NEW_LINE>return httpClient;<NEW_LINE>}
httpClient.setResponseBufferSize(getResponseBufferSize());
494,315
private ScimUser syncGroups(ScimUser user) {<NEW_LINE>if (user == null) {<NEW_LINE>return user;<NEW_LINE>}<NEW_LINE>Set<ScimGroup> directGroups = membershipManager.getGroupsWithMember(user.getId(), <MASK><NEW_LINE>Set<ScimGroup> indirectGroups = membershipManager.getGroupsWithMember(user.getId(), true, identityZoneManager.getCurrentIdentityZoneId());<NEW_LINE>indirectGroups.removeAll(directGroups);<NEW_LINE>Set<ScimUser.Group> groups = new HashSet<>();<NEW_LINE>for (ScimGroup group : directGroups) {<NEW_LINE>groups.add(new ScimUser.Group(group.getId(), group.getDisplayName(), ScimUser.Group.Type.DIRECT));<NEW_LINE>}<NEW_LINE>for (ScimGroup group : indirectGroups) {<NEW_LINE>groups.add(new ScimUser.Group(group.getId(), group.getDisplayName(), ScimUser.Group.Type.INDIRECT));<NEW_LINE>}<NEW_LINE>user.setGroups(groups);<NEW_LINE>return user;<NEW_LINE>}
false, identityZoneManager.getCurrentIdentityZoneId());
536,139
void calc(FastDistanceVectorData left, FastDistanceSparseData right, double[] res) {<NEW_LINE>Arrays.fill(res, 0.0);<NEW_LINE>int[][] rightIndices = right.getIndices();<NEW_LINE>double[][] rightValues = right.getValues();<NEW_LINE>if (left.vector instanceof DenseVector) {<NEW_LINE>double[] vector = ((DenseVector) left.vector).getData();<NEW_LINE>for (int i = 0; i < vector.length; i++) {<NEW_LINE>if (null != rightIndices[i]) {<NEW_LINE>for (int j = 0; j < rightIndices[i].length; j++) {<NEW_LINE>res[rightIndices[i][j]] -= rightValues[i][j] * vector[i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>SparseVector vector = (SparseVector) left.getVector();<NEW_LINE>int[] indices = vector.getIndices();<NEW_LINE>double[] values = vector.getValues();<NEW_LINE>for (int i = 0; i < indices.length; i++) {<NEW_LINE>if (null != rightIndices[indices[i]]) {<NEW_LINE>for (int j = 0; j < rightIndices[indices[i]].length; j++) {<NEW_LINE>res[rightIndices[indices[i]][j]] -= rightValues[indices[i]]<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>double vecLabel = left.label.get(0);<NEW_LINE>double[] normL2Square = right.getLabel().getData();<NEW_LINE>for (int i = 0; i < res.length; i++) {<NEW_LINE>res[i] = Math.sqrt(Math.abs(vecLabel + normL2Square[i] + 2 * res[i]));<NEW_LINE>}<NEW_LINE>}
[j] * values[i];
1,559,085
private void logEnv() {<NEW_LINE>try {<NEW_LINE>OperatingSystemMXBean osBean = ManagementFactory.getOperatingSystemMXBean();<NEW_LINE>MBeanServer mserver = ManagementFactory.getPlatformMBeanServer();<NEW_LINE>// w/o dependency on Sun's JDK<NEW_LINE>// long totalMem = ((com.sun.management.OperatingSystemMXBean)osBean).getTotalPhysicalMemorySize();<NEW_LINE>// NOI18N<NEW_LINE>long totalMem = (Long) mserver.getAttribute(osBean.getObjectName(), "TotalPhysicalMemorySize");<NEW_LINE>LOG.log(Level.INFO, "Total memory {0}", totalMem);<NEW_LINE>LogRecord lr = new LogRecord(Level.INFO, "MEMORY");<NEW_LINE>lr.setResourceBundle(NbBundle.getBundle(DiagnosticTask.class));<NEW_LINE>lr.setParameters(new Object[] { totalMem });<NEW_LINE>Logger.getLogger<MASK><NEW_LINE>} catch (SecurityException ex) {<NEW_LINE>LOG.log(Level.INFO, null, ex);<NEW_LINE>} catch (IllegalArgumentException ex) {<NEW_LINE>LOG.log(Level.INFO, null, ex);<NEW_LINE>} catch (MBeanException ex) {<NEW_LINE>LOG.log(Level.INFO, null, ex);<NEW_LINE>} catch (AttributeNotFoundException ex) {<NEW_LINE>LOG.log(Level.INFO, null, ex);<NEW_LINE>} catch (InstanceNotFoundException ex) {<NEW_LINE>LOG.log(Level.INFO, null, ex);<NEW_LINE>} catch (ReflectionException ex) {<NEW_LINE>LOG.log(Level.INFO, null, ex);<NEW_LINE>}<NEW_LINE>}
("org.netbeans.ui.performance").log(lr);
1,760,648
protected void postEvent(String t, ActiveConfiguration c, Exception e) {<NEW_LINE>Map<String, Object> eventProps = new HashMap<String, Object>(4);<NEW_LINE>if (c.activeHost != null) {<NEW_LINE>eventProps.put(GenericServiceConstants.ENDPOINT_ACTIVE_HOST, c.activeHost);<NEW_LINE>}<NEW_LINE>eventProps.put(GenericServiceConstants.ENDPOINT_ACTIVE_PORT, c.activePort);<NEW_LINE>eventProps.put(<MASK><NEW_LINE>eventProps.put(GenericServiceConstants.ENDPOINT_CONFIG_PORT, c.configPort);<NEW_LINE>setupEventProps(eventProps);<NEW_LINE>if (e != null) {<NEW_LINE>eventProps.put(GenericServiceConstants.ENDPOINT_EXCEPTION, e.toString());<NEW_LINE>}<NEW_LINE>EventAdmin engine = GenericEndpointImpl.getEventAdmin();<NEW_LINE>if (engine != null) {<NEW_LINE>Event event = new Event(t, eventProps);<NEW_LINE>engine.postEvent(event);<NEW_LINE>}<NEW_LINE>}
GenericServiceConstants.ENDPOINT_CONFIG_HOST, c.configHost);
401,514
public void visitAnnotations(AnnotatedNode node) {<NEW_LINE>List<AnnotationNode> annotations = node.getAnnotations();<NEW_LINE>if (annotations.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, AnnotationNode> tmpAnnotations = new HashMap<String, AnnotationNode>();<NEW_LINE>ClassNode annType;<NEW_LINE>for (AnnotationNode an : annotations) {<NEW_LINE>// skip built-in properties<NEW_LINE>if (an.isBuiltIn()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>annType = an.getClassNode();<NEW_LINE>resolveOrFail(annType, ", unable to find class for annotation", an);<NEW_LINE>for (Map.Entry<String, Expression> member : an.getMembers().entrySet()) {<NEW_LINE>Expression newValue = <MASK><NEW_LINE>newValue = transformInlineConstants(newValue);<NEW_LINE>member.setValue(newValue);<NEW_LINE>checkAnnotationMemberValue(newValue);<NEW_LINE>}<NEW_LINE>if (annType.isResolved()) {<NEW_LINE>Class<?> annTypeClass = annType.getTypeClass();<NEW_LINE>Retention retAnn = annTypeClass.getAnnotation(Retention.class);<NEW_LINE>if (retAnn != null && retAnn.value().equals(RetentionPolicy.RUNTIME)) {<NEW_LINE>AnnotationNode anyPrevAnnNode = tmpAnnotations.put(annTypeClass.getName(), an);<NEW_LINE>if (anyPrevAnnNode != null) {<NEW_LINE>addError("Cannot specify duplicate annotation on the same member : " + annType.getName(), an);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
transform(member.getValue());
1,607,122
private static void logMessageReceived(HttpExchange exchange, String content, RendererConfiguration renderer) {<NEW_LINE>StringBuilder header = new StringBuilder();<NEW_LINE>String soapAction = null;<NEW_LINE>header.append(exchange.getRequestMethod());<NEW_LINE>header.append(" ").append(exchange.getRequestURI());<NEW_LINE>if (header.length() > 0) {<NEW_LINE>header.append(" ");<NEW_LINE>}<NEW_LINE>header.append(exchange.getProtocol());<NEW_LINE>header.append("\n\n");<NEW_LINE>header.append("HEADER:\n");<NEW_LINE>for (Map.Entry<String, List<String>> headers : exchange.getRequestHeaders().entrySet()) {<NEW_LINE>String name = headers.getKey();<NEW_LINE>if (StringUtils.isNotBlank(name)) {<NEW_LINE>for (String value : headers.getValue()) {<NEW_LINE>header.append(" ").append(name).append(": ").append<MASK><NEW_LINE>if ("SOAPACTION".equalsIgnoreCase(name)) {<NEW_LINE>soapAction = value.toUpperCase(Locale.ROOT);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String formattedContent = null;<NEW_LINE>if (StringUtils.isNotBlank(content)) {<NEW_LINE>try {<NEW_LINE>formattedContent = StringUtil.prettifyXML(content, StandardCharsets.UTF_8, 2);<NEW_LINE>} catch (XPathExpressionException | SAXException | ParserConfigurationException | TransformerException e) {<NEW_LINE>LOGGER.trace("XML parsing failed with:\n{}", e);<NEW_LINE>formattedContent = " Content isn't valid XML, using text formatting: " + e.getMessage() + "\n";<NEW_LINE>formattedContent += " " + content.replaceAll("\n", "\n ") + "\n";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String requestType = "";<NEW_LINE>// Map known requests to request type<NEW_LINE>if (soapAction != null) {<NEW_LINE>if (soapAction.contains("CONTENTDIRECTORY:1#BROWSE")) {<NEW_LINE>requestType = "browse ";<NEW_LINE>} else if (soapAction.contains("CONTENTDIRECTORY:1#SEARCH")) {<NEW_LINE>requestType = "search ";<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>soapAction = "";<NEW_LINE>}<NEW_LINE>String rendererName = getRendererName(exchange, renderer);<NEW_LINE>formattedContent = StringUtils.isNotBlank(formattedContent) ? "\nCONTENT:\n" + formattedContent : "";<NEW_LINE>if (StringUtils.isNotBlank(requestType)) {<NEW_LINE>LOGGER.trace("Received a {}request from {}:\n\n{}{}", requestType, rendererName, header, formattedContent);<NEW_LINE>} else {<NEW_LINE>// Trace not supported request type<NEW_LINE>LOGGER.trace("Received a {}request from {}:\n\n{}{}\nRenderer UUID={}", soapAction, rendererName, header, formattedContent, renderer != null ? renderer.uuid : "null");<NEW_LINE>}<NEW_LINE>}
(value).append("\n");
575,812
public void updateTableStatistics(long startTS, long tableId, long delta, long count) throws SQLException {<NEW_LINE>try (Statement tidbStmt = connection.createStatement()) {<NEW_LINE>String sql;<NEW_LINE>if (delta < 0) {<NEW_LINE>sql = String.format("update mysql.stats_meta set version = %s, count = count - %s, modify_count = modify_count + %s where table_id = %s and count >= %s", startTS, -delta<MASK><NEW_LINE>} else {<NEW_LINE>sql = String.format("update mysql.stats_meta set version = %s, count = count + %s, modify_count = modify_count + %s where table_id = %s", startTS, delta, count, tableId);<NEW_LINE>}<NEW_LINE>logger.info("updateTableStatistics: " + sql);<NEW_LINE>tidbStmt.executeUpdate(sql);<NEW_LINE>}<NEW_LINE>}
, count, tableId, -delta);
1,139,155
public static SecretKey androidPBKDF2(char[] pwArray, byte[] salt, int rounds, boolean useUtf8) {<NEW_LINE>PBEParametersGenerator generator = new PKCS5S2ParametersGenerator();<NEW_LINE>// Android treats password bytes as ASCII, which is obviously<NEW_LINE>// not the case when an AES key is used as a 'password'.<NEW_LINE>// Use the same method for compatibility.<NEW_LINE>// Android 4.4 however uses all char bytes<NEW_LINE>// useUtf8 needs to be true for KitKat<NEW_LINE>byte[] pwBytes = useUtf8 ? PBEParametersGenerator.PKCS5PasswordToUTF8Bytes(pwArray) : PBEParametersGenerator.PKCS5PasswordToBytes(pwArray);<NEW_LINE>generator.init(pwBytes, salt, rounds);<NEW_LINE>KeyParameter params = (KeyParameter) generator.generateDerivedParameters(PBKDF2_KEY_SIZE);<NEW_LINE>return new SecretKeySpec(<MASK><NEW_LINE>}
params.getKey(), "AES");
187,957
private void addHaNodeContainer(Node group, int number) {<NEW_LINE>String portOffset = System.getProperty("app.server." + number + ".port.offset");<NEW_LINE>String managementPort = System.getProperty("app.server." + number + ".management.port");<NEW_LINE>Validate.notNullOrEmpty(<MASK><NEW_LINE>Validate.notNullOrEmpty(managementPort, "app.server." + number + ".management.port is not set.");<NEW_LINE>Node container = group.createChild("container");<NEW_LINE>container.attribute("mode", "manual");<NEW_LINE>container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName + "-ha-node-" + number);<NEW_LINE>configuration = container.createChild("configuration");<NEW_LINE>createChild("enabled", "true");<NEW_LINE>createChild("adapterImplClass", ManagedDeployableContainer.class.getName());<NEW_LINE>createChild("jbossHome", appServerHome);<NEW_LINE>createChild("javaHome", appServerJavaHome);<NEW_LINE>// cleanServerBaseDir cannot be used until WFARQ-44 is fixed<NEW_LINE>// createChild("cleanServerBaseDir", appServerHome + "/standalone-ha-node-" + number);<NEW_LINE>createChild("serverConfig", "standalone-ha.xml");<NEW_LINE>createChild("jbossArguments", "-Djboss.server.base.dir=" + appServerHome + "/standalone-ha-node-" + number + " " + "-Djboss.socket.binding.port-offset=" + portOffset + " " + "-Djboss.node.name=ha-node-" + number + " " + getCrossDCProperties(number, portOffset) + System.getProperty("adapter.test.props", " ") + System.getProperty("kie.maven.settings", " "));<NEW_LINE>createChild("javaVmArguments", System.getProperty("app.server." + number + ".jboss.jvm.debug.args") + " " + System.getProperty("app.server.memory.settings", "") + " " + "-Djava.net.preferIPv4Stack=true");<NEW_LINE>createChild("managementProtocol", managementProtocol);<NEW_LINE>createChild("managementPort", managementPort);<NEW_LINE>createChild("startupTimeoutInSeconds", startupTimeoutInSeconds);<NEW_LINE>}
portOffset, "app.server." + number + ".port.offset is not set.");
1,749,260
private Configuration toVendorIndependentConfiguration() {<NEW_LINE>_c = new Configuration(getHostname(), ConfigurationFormat.CUMULUS_NCLU);<NEW_LINE>_c.setDeviceModel(DeviceModel.CUMULUS_UNSPECIFIED);<NEW_LINE>_c.setDefaultCrossZoneAction(LineAction.PERMIT);<NEW_LINE>_c.setDefaultInboundAction(LineAction.PERMIT);<NEW_LINE>_c.setExportBgpFromBgpRib(true);<NEW_LINE>convertPhysicalInterfaces();<NEW_LINE>convertSubinterfaces();<NEW_LINE>convertVlanInterfaces();<NEW_LINE>convertLoopback();<NEW_LINE>convertBondInterfaces();<NEW_LINE>convertVrfLoopbackInterfaces();<NEW_LINE>convertVrfs();<NEW_LINE>convertDefaultVrf();<NEW_LINE>convertIpAsPathAccessLists(_c, _ipAsPathAccessLists);<NEW_LINE>convertIpPrefixLists(_c, _ipPrefixLists);<NEW_LINE>convertIpCommunityLists(_c, _ipCommunityLists);<NEW_LINE>convertRouteMaps(<MASK><NEW_LINE>convertDnsServers(_c, _ipv4Nameservers);<NEW_LINE>convertClags(_c, this, _w);<NEW_LINE>// Compute explicit VNI -> VRF mappings for L3 VNIs:<NEW_LINE>Map<Integer, String> vniToVrf = _vrfs.values().stream().filter(vrf -> vrf.getVni() != null).collect(ImmutableMap.toImmutableMap(Vrf::getVni, Vrf::getName));<NEW_LINE>convertVxlans(_c, this, vniToVrf, _loopback.getClagVxlanAnycastIp(), _loopback.getVxlanLocalTunnelip(), _w);<NEW_LINE>convertOspfProcess(_c, this, _w);<NEW_LINE>convertBgpProcess(_c, this, _w);<NEW_LINE>initVendorFamily();<NEW_LINE>markStructures();<NEW_LINE>warnDuplicateClagIds();<NEW_LINE>return _c;<NEW_LINE>}
_c, this, _routeMaps, _w);
92,276
private IndexTreePath<E> createNewRoot(final N oldRoot, final N newNode, DBID firstRoutingObjectID, DBID secondRoutingObjectID) {<NEW_LINE>N root = createNewDirectoryNode();<NEW_LINE>writeNode(root);<NEW_LINE>// switch the ids<NEW_LINE>oldRoot.setPageID(root.getPageID());<NEW_LINE>if (!oldRoot.isLeaf()) {<NEW_LINE>// FIXME: what is happening here?<NEW_LINE>for (int i = 0; i < oldRoot.getNumEntries(); i++) {<NEW_LINE>writeNode(getNode(oldRoot.getEntry(i)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>root.setPageID(getRootID());<NEW_LINE>root.addEntry(createNewDirectoryEntry(oldRoot, firstRoutingObjectID, 0.));<NEW_LINE>root.addEntry(createNewDirectoryEntry(newNode, secondRoutingObjectID, 0.));<NEW_LINE>writeNode(root);<NEW_LINE>writeNode(oldRoot);<NEW_LINE>writeNode(newNode);<NEW_LINE>if (getLogger().isDebugging()) {<NEW_LINE>getLogger().debugFine("Create new Root: ID=" + root.getPageID() + "\nchild1 " + oldRoot + "\nchild2 " + newNode);<NEW_LINE>}<NEW_LINE>return new IndexTreePath<>(null<MASK><NEW_LINE>}
, getRootEntry(), -1);
307,230
public void closeNow() {<NEW_LINE>if (!closed.compareAndSet(false, true)) {<NEW_LINE>log.debug("Appenderator already closed, skipping closeNow() call.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>log.debug("Shutting down immediately...");<NEW_LINE>for (Map.Entry<SegmentIdWithShardSpec, Sink> entry : sinks.entrySet()) {<NEW_LINE>try {<NEW_LINE>segmentAnnouncer.unannounceSegment(entry.getValue().getSegment());<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.makeAlert(e, "Failed to unannounce segment[%s]", schema.getDataSource()).addData("identifier", entry.getKey().toString()).emit();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>shutdownExecutors();<NEW_LINE>// We don't wait for pushExecutor to be terminated. See Javadoc for more details.<NEW_LINE>Preconditions.checkState(persistExecutor == null || persistExecutor.awaitTermination(365<MASK><NEW_LINE>Preconditions.checkState(intermediateTempExecutor == null || intermediateTempExecutor.awaitTermination(365, TimeUnit.DAYS), "intermediateTempExecutor not terminated");<NEW_LINE>persistExecutor = null;<NEW_LINE>intermediateTempExecutor = null;<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>throw new ISE("Failed to shutdown executors during close()");<NEW_LINE>}<NEW_LINE>}
, TimeUnit.DAYS), "persistExecutor not terminated");
1,523,197
private static DruidExpression literalToDruidExpression(final PlannerContext plannerContext, final RexNode rexNode) {<NEW_LINE>final SqlTypeName sqlTypeName = rexNode.getType().getSqlTypeName();<NEW_LINE>// Translate literal.<NEW_LINE>final ColumnType columnType = Calcites.getColumnTypeForRelDataType(rexNode.getType());<NEW_LINE>if (RexLiteral.isNullLiteral(rexNode)) {<NEW_LINE>return DruidExpression.ofLiteral(columnType, DruidExpression.nullLiteral());<NEW_LINE>} else if (SqlTypeName.NUMERIC_TYPES.contains(sqlTypeName)) {<NEW_LINE>return DruidExpression.ofLiteral(columnType, DruidExpression.numberLiteral((Number) RexLiteral.value(rexNode)));<NEW_LINE>} else if (SqlTypeFamily.INTERVAL_DAY_TIME == sqlTypeName.getFamily()) {<NEW_LINE>// Calcite represents DAY-TIME intervals in milliseconds.<NEW_LINE>final long milliseconds = ((Number) RexLiteral.value(rexNode)).longValue();<NEW_LINE>return DruidExpression.ofLiteral(columnType, DruidExpression.numberLiteral(milliseconds));<NEW_LINE>} else if (SqlTypeFamily.INTERVAL_YEAR_MONTH == sqlTypeName.getFamily()) {<NEW_LINE>// Calcite represents YEAR-MONTH intervals in months.<NEW_LINE>final long months = ((Number) RexLiteral.value(rexNode)).longValue();<NEW_LINE>return DruidExpression.ofLiteral(columnType, DruidExpression.numberLiteral(months));<NEW_LINE>} else if (SqlTypeName.STRING_TYPES.contains(sqlTypeName)) {<NEW_LINE>return DruidExpression.ofStringLiteral(RexLiteral.stringValue(rexNode));<NEW_LINE>} else if (SqlTypeName.TIMESTAMP == sqlTypeName || SqlTypeName.DATE == sqlTypeName) {<NEW_LINE>if (RexLiteral.isNullLiteral(rexNode)) {<NEW_LINE>return DruidExpression.ofLiteral(<MASK><NEW_LINE>} else {<NEW_LINE>return DruidExpression.ofLiteral(columnType, DruidExpression.numberLiteral(Calcites.calciteDateTimeLiteralToJoda(rexNode, plannerContext.getTimeZone()).getMillis()));<NEW_LINE>}<NEW_LINE>} else if (SqlTypeName.BOOLEAN == sqlTypeName) {<NEW_LINE>return DruidExpression.ofLiteral(columnType, DruidExpression.numberLiteral(RexLiteral.booleanValue(rexNode) ? 1 : 0));<NEW_LINE>} else {<NEW_LINE>// Can't translate other literals.<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
columnType, DruidExpression.nullLiteral());
1,748,134
Channel findOrCreate(InetSocketAddress address) {<NEW_LINE>Channel channel = find(address);<NEW_LINE>if (channel == null) {<NEW_LINE>LOG.debug("creating new channel for {}", address);<NEW_LINE>ChannelFuture channelFuture = bootstrap.connect(address);<NEW_LINE>channel = channelFuture.channel();<NEW_LINE>channels.put(getHostPortString(address), channel);<NEW_LINE>// Add listener to handle connection closed events, which could happen on exceptions.<NEW_LINE>channel.closeFuture().addListener(future -> {<NEW_LINE><MASK><NEW_LINE>channels.remove(getHostPortString(address));<NEW_LINE>liveConnections.set((double) channels.size());<NEW_LINE>});<NEW_LINE>// Add listener to handle the result of the connection event.<NEW_LINE>channelFuture.addListener(future -> {<NEW_LINE>if (future.isSuccess()) {<NEW_LINE>LOG.debug("connection success for {}", address);<NEW_LINE>connectionSuccess.increment();<NEW_LINE>liveConnections.set((double) channels.size());<NEW_LINE>} else {<NEW_LINE>LOG.debug("failed to connect to {}", address);<NEW_LINE>connectionFailure.increment();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>nettyChannelBufferSize.set(highWriteBufferWatermark - channel.bytesBeforeUnwritable());<NEW_LINE>return channel;<NEW_LINE>}
LOG.debug("closing channel for {}", address);
8,750
public static Publisher<?> invokeSuspendingFunction(Method method, Object target, Object... args) {<NEW_LINE>KFunction<?> function = Objects.requireNonNull(ReflectJvmMapping.getKotlinFunction(method));<NEW_LINE>if (method.isAccessible() && !KCallablesJvm.isAccessible(function)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>KClassifier classifier = function.getReturnType().getClassifier();<NEW_LINE>Mono<Object> mono = MonoKt.mono(Dispatchers.getUnconfined(), (scope, continuation) -> KCallables.callSuspend(function, getSuspendedFunctionArgs(target, args), continuation)).filter(result -> !Objects.equals(result, Unit.INSTANCE)).onErrorMap(InvocationTargetException.class, InvocationTargetException::getTargetException);<NEW_LINE>if (classifier != null && classifier.equals(JvmClassMappingKt.getKotlinClass(Flow.class))) {<NEW_LINE>return mono.flatMapMany(CoroutinesUtils::asFlux);<NEW_LINE>}<NEW_LINE>return mono;<NEW_LINE>}
KCallablesJvm.setAccessible(function, true);
1,347,143
public void initialize(WizardDescriptor wiz) {<NEW_LINE>this.wizardInfo = getWizardInfo();<NEW_LINE>this.helper = new ResourceConfigHelperHolder().getJMSHelper();<NEW_LINE>// this.wiz = wiz;<NEW_LINE>// NOI18N<NEW_LINE>wiz.putProperty("NewFileWizard_Title", NbBundle.getMessage<MASK><NEW_LINE>index = 0;<NEW_LINE>project = Templates.getProject(wiz);<NEW_LINE>panels = createPanels();<NEW_LINE>// Make sure list of steps is accurate.<NEW_LINE>steps = createSteps();<NEW_LINE>try {<NEW_LINE>FileObject pkgLocation = project.getProjectDirectory();<NEW_LINE>if (pkgLocation != null) {<NEW_LINE>this.helper.getData().setTargetFileObject(pkgLocation);<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < panels.length; i++) {<NEW_LINE>Component c = panels[i].getComponent();<NEW_LINE>if (c instanceof JComponent) {<NEW_LINE>// assume Swing components<NEW_LINE>JComponent jc = (JComponent) c;<NEW_LINE>// Step #.<NEW_LINE>// NOI18N<NEW_LINE>jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i);<NEW_LINE>// Step name (actually the whole list for reference).<NEW_LINE>// NOI18N<NEW_LINE>jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(JMSWizard.class, "Templates/SunResources/JMS_Resource"));
1,313,537
private void handleFins(FinSet theFinSet) {<NEW_LINE>Image img = null;<NEW_LINE>java.awt.Image awtImage = new PrintableFinSet(theFinSet).createImage();<NEW_LINE>try {<NEW_LINE>img = Image.<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Could not write image to document.", e);<NEW_LINE>}<NEW_LINE>grid.addCell(iconToImage(theFinSet));<NEW_LINE>grid.addCell(createNameCell(theFinSet.getName() + " (" + theFinSet.getFinCount() + ")", true));<NEW_LINE>grid.addCell(createMaterialCell(theFinSet.getMaterial()));<NEW_LINE>grid.addCell(ITextHelper.createCell(THICK + toLength(theFinSet.getThickness()), PdfPCell.BOTTOM));<NEW_LINE>final PdfPCell pCell = new PdfPCell();<NEW_LINE>pCell.setBorder(Rectangle.BOTTOM);<NEW_LINE>pCell.addElement(img);<NEW_LINE>grid.addCell(ITextHelper.createCell());<NEW_LINE>grid.addCell(createMassCell(theFinSet.getMass()));<NEW_LINE>List<RocketComponent> rc = theFinSet.getChildren();<NEW_LINE>goDeep(rc);<NEW_LINE>}
getInstance(writer, awtImage, 0.25f);
308,500
private BucketSearchResult splitBucket(final List<Long> path, final int keyIndex, final K keyToInsert, final OAtomicOperation atomicOperation) throws IOException {<NEW_LINE>final long pageIndex = path.get(path.size() - 1);<NEW_LINE>final OCacheEntry bucketEntry = loadPageForWrite(atomicOperation, fileId, pageIndex, false, true);<NEW_LINE>try {<NEW_LINE>final OSBTreeBucketV2<K, V> bucketToSplit = new OSBTreeBucketV2<>(bucketEntry);<NEW_LINE>final boolean splitLeaf = bucketToSplit.isLeaf();<NEW_LINE>final int bucketSize = bucketToSplit.size();<NEW_LINE>final int indexToSplit = bucketSize >>> 1;<NEW_LINE>final K separationKey = bucketToSplit.getKey(indexToSplit, keySerializer);<NEW_LINE>final List<byte[]> rightEntries <MASK><NEW_LINE>final int startRightIndex = splitLeaf ? indexToSplit : indexToSplit + 1;<NEW_LINE>for (int i = startRightIndex; i < bucketSize; i++) {<NEW_LINE>rightEntries.add(bucketToSplit.getRawEntry(i, keySerializer, valueSerializer));<NEW_LINE>}<NEW_LINE>if (pageIndex != ROOT_INDEX) {<NEW_LINE>return splitNonRootBucket(path, keyIndex, keyToInsert, pageIndex, bucketToSplit, splitLeaf, indexToSplit, separationKey, rightEntries, atomicOperation);<NEW_LINE>} else {<NEW_LINE>return splitRootBucket(path, keyIndex, keyToInsert, bucketEntry, bucketToSplit, splitLeaf, indexToSplit, separationKey, rightEntries, atomicOperation);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>releasePageFromWrite(atomicOperation, bucketEntry);<NEW_LINE>}<NEW_LINE>}
= new ArrayList<>(indexToSplit);
1,625,340
public static EnumMethodDesc fromName(String name, ClasspathImportServiceCompileTime classpathImportService) throws ExprValidationException {<NEW_LINE>for (EnumMethodBuiltin e : EnumMethodBuiltin.values()) {<NEW_LINE>if (e.getNameCamel().toLowerCase(Locale.ENGLISH).equals(name.toLowerCase(Locale.ENGLISH))) {<NEW_LINE>return e.getDescriptor();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Class factory = classpathImportService.resolveEnumMethod(name);<NEW_LINE>if (factory != null) {<NEW_LINE>EnumMethodForgeFactory forgeFactory = (EnumMethodForgeFactory) JavaClassHelper.instantiate(EnumMethodForgeFactory.class, factory);<NEW_LINE>EnumMethodDescriptor descriptor = forgeFactory.initialize(new EnumMethodInitializeContext());<NEW_LINE>ExprDotForgeEnumMethodFactoryPlugin plugin = new ExprDotForgeEnumMethodFactoryPlugin(forgeFactory);<NEW_LINE>return new EnumMethodDesc(name, EnumMethodEnum.PLUGIN, <MASK><NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new ExprValidationException("Failed to resolve date-time-method '" + name + "' :" + ex.getMessage(), ex);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
plugin, descriptor.getFootprints());
1,481,437
private void determineOuterWedges(RadialMenuEntry entry) {<NEW_LINE>int entriesQty = entry.getChildren().size();<NEW_LINE>wedgeQty2 = entriesQty;<NEW_LINE>// if only default profile<NEW_LINE>if (entriesQty == 0) {<NEW_LINE>wedgeQty2 = 1;<NEW_LINE>}<NEW_LINE>// Wedge 2<NEW_LINE>float degSlice2 = 360 / wedgeQty2;<NEW_LINE>float start_degSlice2 = 270 - (degSlice2 / 2);<NEW_LINE>// calculates where to put the images<NEW_LINE>double rSlice2 = (<MASK><NEW_LINE>double rStart2 = (2 * Math.PI) * (0.75) - (rSlice2 / 2);<NEW_LINE>this.Wedges2 = new Wedge[wedgeQty2];<NEW_LINE>this.iconRect2 = new Rect[wedgeQty2];<NEW_LINE>for (int i = 0; i < Wedges2.length; i++) {<NEW_LINE>this.Wedges2[i] = new Wedge(xPosition, yPosition, r2MinSize, r2MaxSize, (i * degSlice2) + start_degSlice2, degSlice2);<NEW_LINE>float xCenter = (float) (Math.cos(((rSlice2 * i) + (rSlice2 * 0.5)) + rStart2) * (r2MaxSize + r2MinSize) / 2) + xPosition;<NEW_LINE>float yCenter = (float) (Math.sin(((rSlice2 * i) + (rSlice2 * 0.5)) + rStart2) * (r2MaxSize + r2MinSize) / 2) + yPosition;<NEW_LINE>int h = MaxIconSize;<NEW_LINE>int w = MaxIconSize;<NEW_LINE>if (wedgeQty2 > 1) {<NEW_LINE>if (entry.getChildren().get(i).getIcon() != 0) {<NEW_LINE>Drawable drawable = getResources().getDrawable(entry.getChildren().get(i).getIcon());<NEW_LINE>h = getIconSize(drawable.getIntrinsicHeight(), MinIconSize, MaxIconSize);<NEW_LINE>w = getIconSize(drawable.getIntrinsicWidth(), MinIconSize, MaxIconSize);<NEW_LINE>this.iconRect2[i] = new Rect((int) xCenter - w / 2, (int) yCenter - h / 2, (int) xCenter + w / 2, (int) yCenter + h / 2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.wedge2Data = entry;<NEW_LINE>// re-draws the picture<NEW_LINE>invalidate();<NEW_LINE>}
2 * Math.PI) / wedgeQty2;
782,173
public Builder mergeFrom(org.mlflow.api.proto.Service.GetExperiment.Response other) {<NEW_LINE>if (other == org.mlflow.api.proto.Service.GetExperiment.Response.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasExperiment()) {<NEW_LINE>mergeExperiment(other.getExperiment());<NEW_LINE>}<NEW_LINE>if (runsBuilder_ == null) {<NEW_LINE>if (!other.runs_.isEmpty()) {<NEW_LINE>if (runs_.isEmpty()) {<NEW_LINE>runs_ = other.runs_;<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>ensureRunsIsMutable();<NEW_LINE>runs_.addAll(other.runs_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.runs_.isEmpty()) {<NEW_LINE>if (runsBuilder_.isEmpty()) {<NEW_LINE>runsBuilder_.dispose();<NEW_LINE>runsBuilder_ = null;<NEW_LINE>runs_ = other.runs_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>runsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRunsFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>runsBuilder_.addAllMessages(other.runs_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000002);
1,024,518
public Object invoke(CameraAnimationsPlugin cameraAnimationsPlugin) {<NEW_LINE>// animateCamera / easeCamera only allows positive duration<NEW_LINE>if (mDuration == 0 || mCameraMode == CameraMode.NONE) {<NEW_LINE>cameraAnimationsPlugin.flyTo(mCameraUpdate, optionsBuilder.duration<MASK><NEW_LINE>}<NEW_LINE>// On iOS a duration of -1 means default or dynamic duration (based on flight-path length)<NEW_LINE>// On Android we can fallback to Mapbox's default duration as there is no such API<NEW_LINE>if (mDuration > 0) {<NEW_LINE>optionsBuilder.duration(mDuration);<NEW_LINE>}<NEW_LINE>if (mCameraMode == CameraMode.FLIGHT) {<NEW_LINE>cameraAnimationsPlugin.flyTo(mCameraUpdate, optionsBuilder.build());<NEW_LINE>} else if (mCameraMode == CameraMode.LINEAR) {<NEW_LINE>cameraAnimationsPlugin.easeTo(mCameraUpdate, optionsBuilder.interpolator(new LinearInterpolator()).build());<NEW_LINE>} else if (mCameraMode == CameraMode.EASE) {<NEW_LINE>cameraAnimationsPlugin.easeTo(mCameraUpdate, optionsBuilder.interpolator(new AccelerateDecelerateInterpolator()).build());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
(0).build());
919,166
public void fillOval(int x, int y, int w, int h) {<NEW_LINE>int startX;<NEW_LINE>int endX;<NEW_LINE>int offset;<NEW_LINE>int colour;<NEW_LINE>float as;<NEW_LINE>float bs;<NEW_LINE>if (w <= 0 || h <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>as = (w / 2.0f) * (w / 2.0f);<NEW_LINE>bs = (h / 2.0f) * (h / 2.0f);<NEW_LINE>colour = foreground.getRGB();<NEW_LINE>for (int i = -h / 2; i <= h / 2; i++) {<NEW_LINE>offset = (int) Math.sqrt((1.0 - ((i * i) / bs)) * as);<NEW_LINE>startX = x - offset + w / 2;<NEW_LINE>endX <MASK><NEW_LINE>drawSpan(startX, y + i + h / 2, endX - startX + 1, colour);<NEW_LINE>}<NEW_LINE>}
= x + offset + w / 2;
369,709
private Object constructWithClassBody(Class<?> type, Object[] args, BSHBlock block, CallStack callstack, Interpreter interpreter) throws EvalError {<NEW_LINE>String anon = "anon" + (++innerClassCount);<NEW_LINE>String name = callstack.top().getName() + "$" + anon;<NEW_LINE>This.CONTEXT_ARGS.get().put(anon, args);<NEW_LINE>Modifiers modifiers = new Modifiers(Modifiers.CLASS);<NEW_LINE>Class<?> clas = ClassGenerator.getClassGenerator().generateClass(name, modifiers, null, /*interfaces*/<NEW_LINE>type, /*superClass*/<NEW_LINE>block, ClassGenerator.Type.CLASS, callstack, interpreter);<NEW_LINE>try {<NEW_LINE>return Reflect.constructObject(clas, args);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Throwable cause = e;<NEW_LINE>if (e instanceof InvocationTargetException)<NEW_LINE>cause = e.getCause();<NEW_LINE>throw new EvalError("Error constructing inner class instance: " + <MASK><NEW_LINE>}<NEW_LINE>}
e, this, callstack, cause);
269,460
private static long[] transform(long[] v, int logN, boolean inverse) {<NEW_LINE>int n = 1 << logN;<NEW_LINE>long[] w = new long[n];<NEW_LINE>for (int i = 0; i < v.length; i++) w[Integer.reverse(i) >>> 32 - logN] = v[i];<NEW_LINE>for (int i = 0; i < logN; i++) {<NEW_LINE>int jMax = 1 << i;<NEW_LINE>int kStep = 2 << i;<NEW_LINE>int index = 0;<NEW_LINE>int step <MASK><NEW_LINE>if (inverse) {<NEW_LINE>index = 1 << exp;<NEW_LINE>step = -step;<NEW_LINE>}<NEW_LINE>for (int j = 0; j < jMax; j++) {<NEW_LINE>long zeta = powers[index];<NEW_LINE>index += step;<NEW_LINE>for (int k = j; k < n; k += kStep) {<NEW_LINE>int kk = jMax | k;<NEW_LINE>long x = w[k];<NEW_LINE>long y = mult(zeta, w[kk]);<NEW_LINE>long z = x + y;<NEW_LINE>w[k] = z < p ? z : z - p;<NEW_LINE>z = x - y;<NEW_LINE>w[kk] = z < 0 ? z + p : z;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return w;<NEW_LINE>}
= 1 << exp - i - 1;
413,024
public static void main(final String[] args) {<NEW_LINE>LOG.fine(() -> "minion started");<NEW_LINE>enablePowerMockSupport();<NEW_LINE>final int port = Integer<MASK><NEW_LINE>Socket s = null;<NEW_LINE>try {<NEW_LINE>s = new Socket("localhost", port);<NEW_LINE>final SafeDataInputStream dis = new SafeDataInputStream(s.getInputStream());<NEW_LINE>final Reporter reporter = new DefaultReporter(s.getOutputStream());<NEW_LINE>addMemoryWatchDog(reporter);<NEW_LINE>final ClientPluginServices plugins = ClientPluginServices.makeForContextLoader();<NEW_LINE>final MinionSettings factory = new MinionSettings(plugins);<NEW_LINE>final MutationTestMinion instance = new MutationTestMinion(factory, dis, reporter);<NEW_LINE>instance.run();<NEW_LINE>} catch (final Throwable ex) {<NEW_LINE>ex.printStackTrace(System.out);<NEW_LINE>LOG.log(Level.WARNING, "Error during mutation test", ex);<NEW_LINE>} finally {<NEW_LINE>if (s != null) {<NEW_LINE>safelyCloseSocket(s);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.parseInt(args[0]);
266,837
// ------------------------------------------------------------------------------<NEW_LINE>// Method: NumericMatcher.handlePut<NEW_LINE>// ------------------------------------------------------------------------------<NEW_LINE>void handlePut(SimpleTest test, Conjunction selector, MatchTarget object, InternTable subExpr) throws MatchingException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>tc.entry(this, cclass, "handlePut", new Object[] { test, selector, object, subExpr });<NEW_LINE><MASK><NEW_LINE>if (value != null)<NEW_LINE>// equality test.<NEW_LINE>handleEqualityPut(new Wrapper(value), selector, object, subExpr);<NEW_LINE>else {<NEW_LINE>// Inequality or range, goes in CheapRangeTable<NEW_LINE>ContentMatcher next = (ContentMatcher) ranges.getExact(test);<NEW_LINE>// Create a new Matcher if called for<NEW_LINE>ContentMatcher newNext = nextMatcher(selector, next);<NEW_LINE>// Record the subscription<NEW_LINE>newNext.put(selector, object, subExpr);<NEW_LINE>// See if Matcher must be replaced, and, in that case, where.<NEW_LINE>if (newNext != next)<NEW_LINE>if (next == null)<NEW_LINE>ranges.insert(test, newNext);<NEW_LINE>else<NEW_LINE>ranges.replace(test, newNext);<NEW_LINE>}<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>tc.exit(this, cclass, "handlePut");<NEW_LINE>}
Object value = test.getValue();
700,146
public static ListVodTemplateResponse unmarshall(ListVodTemplateResponse listVodTemplateResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVodTemplateResponse.setRequestId(_ctx.stringValue("ListVodTemplateResponse.RequestId"));<NEW_LINE>List<VodTemplateInfo> vodTemplateInfoList = new ArrayList<VodTemplateInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListVodTemplateResponse.VodTemplateInfoList.Length"); i++) {<NEW_LINE>VodTemplateInfo vodTemplateInfo = new VodTemplateInfo();<NEW_LINE>vodTemplateInfo.setName(_ctx.stringValue("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].Name"));<NEW_LINE>vodTemplateInfo.setVodTemplateId(_ctx.stringValue("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].VodTemplateId"));<NEW_LINE>vodTemplateInfo.setTemplateType(_ctx.stringValue("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].TemplateType"));<NEW_LINE>vodTemplateInfo.setSubTemplateType(_ctx.stringValue("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].SubTemplateType"));<NEW_LINE>vodTemplateInfo.setSource(_ctx.stringValue("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].Source"));<NEW_LINE>vodTemplateInfo.setIsDefault(_ctx.stringValue("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].IsDefault"));<NEW_LINE>vodTemplateInfo.setTemplateConfig(_ctx.stringValue("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].TemplateConfig"));<NEW_LINE>vodTemplateInfo.setCreationTime(_ctx.stringValue("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].CreationTime"));<NEW_LINE>vodTemplateInfo.setModifyTime(_ctx.stringValue<MASK><NEW_LINE>vodTemplateInfo.setAppId(_ctx.stringValue("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].AppId"));<NEW_LINE>vodTemplateInfoList.add(vodTemplateInfo);<NEW_LINE>}<NEW_LINE>listVodTemplateResponse.setVodTemplateInfoList(vodTemplateInfoList);<NEW_LINE>return listVodTemplateResponse;<NEW_LINE>}
("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].ModifyTime"));
123,386
public static void main(String[] args) {<NEW_LINE>List<String> stringList = new ArrayList<>();<NEW_LINE>stringList.add("host1");<NEW_LINE>stringList.add("host2");<NEW_LINE>stringList.add("host3");<NEW_LINE>stringList.add("host4");<NEW_LINE>stringList.add("host5");<NEW_LINE>Shard<String> stringShard = new Shard<>(stringList);<NEW_LINE>for (int i = 0; i < 10; i++) {<NEW_LINE>System.out.println(i + ":" + stringShard.getShardInfo("" + i));<NEW_LINE>}<NEW_LINE>stringList = new ArrayList<>();<NEW_LINE>stringList.add("host1");<NEW_LINE>stringList.add("host2");<NEW_LINE>stringList.add("host3");<NEW_LINE>stringList.add("host4");<NEW_LINE>stringShard = new Shard<>(stringList);<NEW_LINE>for (int i = 0; i < 10; i++) {<NEW_LINE>System.out.println(i + ":" + stringShard<MASK><NEW_LINE>}<NEW_LINE>}
.getShardInfo("" + i));
1,415,541
public Set<byte[]> zRevRangeByScore(byte[] key, Range range, org.springframework.data.redis.connection.Limit limit) {<NEW_LINE>Assert.notNull(key, "Key must not be null!");<NEW_LINE><MASK><NEW_LINE>byte[] min = JedisConverters.boundaryToBytesForZRange(range.getMin(), JedisConverters.NEGATIVE_INFINITY_BYTES);<NEW_LINE>byte[] max = JedisConverters.boundaryToBytesForZRange(range.getMax(), JedisConverters.POSITIVE_INFINITY_BYTES);<NEW_LINE>try {<NEW_LINE>if (limit.isUnlimited()) {<NEW_LINE>return connection.getCluster().zrevrangeByScore(key, max, min);<NEW_LINE>}<NEW_LINE>return connection.getCluster().zrevrangeByScore(key, max, min, limit.getOffset(), limit.getCount());<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw convertJedisAccessException(ex);<NEW_LINE>}<NEW_LINE>}
Assert.notNull(range, "Range cannot be null for ZREVRANGEBYSCORE.");
972,120
private Object JSONToList(Object obj, String delim) throws ParserException {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (obj instanceof JSONObject) {<NEW_LINE>JSONObject jobj = (JSONObject) obj;<NEW_LINE>for (Object ob : jobj.keySet()) {<NEW_LINE>if (sb.length() > 0) {<NEW_LINE>sb.append(delim);<NEW_LINE>}<NEW_LINE>sb.append(ob);<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>} else if (obj instanceof JSONArray) {<NEW_LINE>JSONArray jarr = (JSONArray) obj;<NEW_LINE>for (Object o : jarr) {<NEW_LINE>if (sb.length() > 0) {<NEW_LINE>sb.append(delim);<NEW_LINE>}<NEW_LINE>sb.append(o);<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>} else if (obj instanceof String && ((String) obj).trim().length() == 0) {<NEW_LINE>return obj.toString();<NEW_LINE>} else {<NEW_LINE>throw new ParserException(I18N.getText("macro.function.json.unknownType", obj == null ? "NULL" : obj<MASK><NEW_LINE>}<NEW_LINE>}
.toString(), "json.toStrList"));
1,425,099
static <B extends ParsedBucket> B parseSignificantTermsBucketXContent(final XContentParser parser, final B bucket, final CheckedBiConsumer<XContentParser, B, IOException> keyConsumer) throws IOException {<NEW_LINE>final List<Aggregation> aggregations = new ArrayList<>();<NEW_LINE>XContentParser.Token token;<NEW_LINE>String currentFieldName = parser.currentName();<NEW_LINE>while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {<NEW_LINE>if (token == XContentParser.Token.FIELD_NAME) {<NEW_LINE>currentFieldName = parser.currentName();<NEW_LINE>} else if (token.isValue()) {<NEW_LINE>if (CommonFields.KEY_AS_STRING.getPreferredName().equals(currentFieldName)) {<NEW_LINE>bucket.<MASK><NEW_LINE>} else if (CommonFields.KEY.getPreferredName().equals(currentFieldName)) {<NEW_LINE>keyConsumer.accept(parser, bucket);<NEW_LINE>} else if (CommonFields.DOC_COUNT.getPreferredName().equals(currentFieldName)) {<NEW_LINE>long value = parser.longValue();<NEW_LINE>bucket.subsetDf = value;<NEW_LINE>bucket.setDocCount(value);<NEW_LINE>} else if (InternalSignificantTerms.SCORE.equals(currentFieldName)) {<NEW_LINE>bucket.score = parser.doubleValue();<NEW_LINE>} else if (InternalSignificantTerms.BG_COUNT.equals(currentFieldName)) {<NEW_LINE>bucket.supersetDf = parser.longValue();<NEW_LINE>}<NEW_LINE>} else if (token == XContentParser.Token.START_OBJECT) {<NEW_LINE>XContentParserUtils.parseTypedKeysObject(parser, Aggregation.TYPED_KEYS_DELIMITER, Aggregation.class, aggregations::add);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>bucket.setAggregations(new Aggregations(aggregations));<NEW_LINE>return bucket;<NEW_LINE>}
setKeyAsString(parser.text());
407,530
public void checkClasses(ABCAnalysis abcAnalysis) throws AxelorException {<NEW_LINE>List<ABCAnalysisClass> abcAnalysisClassList = abcAnalysis.getAbcAnalysisClassList();<NEW_LINE>BigDecimal classQty, classWorth;<NEW_LINE>BigDecimal totalQty = BigDecimal.ZERO, totalWorth = BigDecimal.ZERO;<NEW_LINE><MASK><NEW_LINE>for (ABCAnalysisClass abcAnalysisClass : abcAnalysisClassList) {<NEW_LINE>classQty = abcAnalysisClass.getQty();<NEW_LINE>classWorth = abcAnalysisClass.getWorth();<NEW_LINE>if (classQty.compareTo(BigDecimal.ZERO) <= 0 || classWorth.compareTo(BigDecimal.ZERO) <= 0) {<NEW_LINE>throw new AxelorException(abcAnalysis, TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.ABC_CLASSES_NEGATIVE_OR_NULL_QTY_OR_WORTH));<NEW_LINE>}<NEW_LINE>totalQty = totalQty.add(classQty);<NEW_LINE>totalWorth = totalWorth.add(classWorth);<NEW_LINE>}<NEW_LINE>if (totalQty.compareTo(comparisonValue) != 0 || totalWorth.compareTo(comparisonValue) != 0) {<NEW_LINE>throw new AxelorException(abcAnalysis, TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.ABC_CLASSES_INVALID_QTY_OR_WORTH));<NEW_LINE>}<NEW_LINE>}
BigDecimal comparisonValue = new BigDecimal(100);
136,469
public static String prettifyModel(Model model) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>List<Integer> states = model.getStates();<NEW_LINE>Collections.sort(states);<NEW_LINE>sb.append("Model(states=").append(states).append<MASK><NEW_LINE>for (int state : states) {<NEW_LINE>for (int next : model.getSuccessors(state)) {<NEW_LINE>sb.append(state).append("->").append(next).append(", ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sb.delete(sb.length() - 2, sb.length());<NEW_LINE>sb.append("}, labels={");<NEW_LINE>for (int state : states) {<NEW_LINE>if (model.getLabels(state).size() > 0) {<NEW_LINE>sb.append(state).append(": [");<NEW_LINE>for (Label label : model.getLabels(state)) {<NEW_LINE>sb.append(label.toString()).append(", ");<NEW_LINE>}<NEW_LINE>sb.delete(sb.length() - 2, sb.length());<NEW_LINE>sb.append("], ");<NEW_LINE>} else {<NEW_LINE>sb.append(state).append(": [], ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sb.delete(sb.length() - 2, sb.length());<NEW_LINE>sb.append("})");<NEW_LINE>return sb.toString();<NEW_LINE>}
(", ").append("successors={");
890,975
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)<NEW_LINE>*/<NEW_LINE>protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>ScriptingContainer container = ScriptingEngine.getInstance().getInitializedScriptingContainer();<NEW_LINE>Ruby runtime = container.getProvider().getRuntime();<NEW_LINE>Object result = null;<NEW_LINE>if (this._filename != null && new File(this._filename).canRead()) {<NEW_LINE>synchronized (runtime) {<NEW_LINE>// apply load paths<NEW_LINE>this.applyLoadPaths(runtime);<NEW_LINE>// compile<NEW_LINE>try {<NEW_LINE>EmbedEvalUnit unit = container.parse(PathType.ABSOLUTE, this._filename);<NEW_LINE>// execute<NEW_LINE>result = unit.run();<NEW_LINE>} catch (ParseFailedException e) {<NEW_LINE>String message = MessageFormat.format(Messages.ScriptingEngine_Parse_Error, new Object[] { this._filename, e.getMessage() });<NEW_LINE>ScriptLogger.logError(message);<NEW_LINE>} catch (EvalFailedException e) {<NEW_LINE>StringWriter sw = new StringWriter();<NEW_LINE>e.getCause().<MASK><NEW_LINE>String message = MessageFormat.format(Messages.ScriptingEngine_Execution_Error, new Object[] { this._filename, e.getMessage(), sw.toString() });<NEW_LINE>ScriptLogger.logError(message);<NEW_LINE>}<NEW_LINE>// register any bundle libraries that were loaded by this script<NEW_LINE>this.registerLibraries(runtime, this._filename);<NEW_LINE>// unapply load paths<NEW_LINE>this.unapplyLoadPaths(runtime);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// save result<NEW_LINE>this.setReturnValue(result);<NEW_LINE>// return status<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}
printStackTrace(new PrintWriter(sw));
719,025
private void addToMergedHeaderMap(TargetNode<? extends CxxLibraryDescription.CommonArg> targetNode, HeaderMap.Builder headerMapBuilder, ImmutableList.Builder<SourcePath> sourcePathsToBuildBuilder) {<NEW_LINE>CxxLibraryDescription.CommonArg arg = targetNode.getConstructorArg();<NEW_LINE>// If the target uses header symlinks, we need to use symlinks in the header map to support<NEW_LINE>// accurate indexing/mapping of headers.<NEW_LINE>boolean shouldCreateHeadersSymlinks = arg.getXcodePublicHeadersSymlinks().orElse(cxxBuckConfig.getPublicHeadersSymlinksEnabled());<NEW_LINE>Path headerSymlinkTreeRoot = getPathToHeaderSymlinkTree(targetNode, HeaderVisibility.PUBLIC);<NEW_LINE>AbsPath basePath;<NEW_LINE>if (shouldCreateHeadersSymlinks) {<NEW_LINE>basePath = projectFilesystem.getRootPath().resolve(headerSymlinkTreeRoot);<NEW_LINE>} else {<NEW_LINE>basePath = projectFilesystem.getRootPath();<NEW_LINE>}<NEW_LINE>ImmutableSortedMap<Path, SourcePath> publicCxxHeaders = getPublicCxxHeaders(targetNode);<NEW_LINE>publicCxxHeaders.values().forEach(sourcePath -> sourcePathsToBuildBuilder.add(sourcePath));<NEW_LINE>for (Map.Entry<Path, SourcePath> entry : publicCxxHeaders.entrySet()) {<NEW_LINE>AbsPath path;<NEW_LINE>if (shouldCreateHeadersSymlinks) {<NEW_LINE>path = basePath.<MASK><NEW_LINE>} else {<NEW_LINE>path = basePath.resolve(projectSourcePathResolver.resolveSourcePath(entry.getValue()));<NEW_LINE>}<NEW_LINE>headerMapBuilder.add(entry.getKey().toString(), path.getPath());<NEW_LINE>}<NEW_LINE>SwiftAttributes swiftAttributes = swiftAttributeParser.parseSwiftAttributes(targetNode);<NEW_LINE>ImmutableMap<Path, Path> swiftHeaderMapEntries = swiftAttributes.publicHeaderMapEntries();<NEW_LINE>for (Map.Entry<Path, Path> entry : swiftHeaderMapEntries.entrySet()) {<NEW_LINE>headerMapBuilder.add(entry.getKey().toString(), entry.getValue());<NEW_LINE>}<NEW_LINE>}
resolve(entry.getKey());
759,132
public void migrateNamespaceListToNewZk(final String namespaces, final String zkClusterKeyNew, final String lastUpdatedBy, final boolean updateDBOnly) throws SaturnJobConsoleException {<NEW_LINE>final List<String> namespaceList = new ArrayList<>();<NEW_LINE>String[] split = namespaces.split(",");<NEW_LINE>if (split != null) {<NEW_LINE>for (String tmp : split) {<NEW_LINE>String namespace = tmp.trim();<NEW_LINE>if (!namespace.isEmpty()) {<NEW_LINE>namespaceList.add(namespace);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int size = namespaceList.size();<NEW_LINE>final NamespaceMigrationOverallStatus migrationStatus = new NamespaceMigrationOverallStatus(size);<NEW_LINE>temporarySharedStatusService.delete(ShareStatusModuleNames.MOVE_NAMESPACE_BATCH_STATUS);<NEW_LINE>temporarySharedStatusService.create(ShareStatusModuleNames.MOVE_NAMESPACE_BATCH_STATUS, gson.toJson(migrationStatus));<NEW_LINE>moveNamespaceBatchThreadPool.execute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>for (String namespace : namespaceList) {<NEW_LINE>try {<NEW_LINE>migrationStatus.setMoving(namespace);<NEW_LINE>temporarySharedStatusService.update(ShareStatusModuleNames.MOVE_NAMESPACE_BATCH_STATUS, gson.toJson(migrationStatus));<NEW_LINE>migrateNamespaceToNewZk(namespace, zkClusterKeyNew, lastUpdatedBy, updateDBOnly);<NEW_LINE>migrationStatus.incrementSuccessCount();<NEW_LINE>} catch (SaturnJobConsoleException e) {<NEW_LINE>log.info("Unable to migrate to new zk for some reason.", e);<NEW_LINE>if (("The namespace(" + namespace + ") is in " + zkClusterKeyNew).equals(e.getMessage())) {<NEW_LINE>migrationStatus.incrementIgnoreCount();<NEW_LINE>} else {<NEW_LINE>migrationStatus.incrementFailCount();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>migrationStatus.setMoving("");<NEW_LINE>migrationStatus.decrementUnDoCount();<NEW_LINE>temporarySharedStatusService.update(ShareStatusModuleNames.MOVE_NAMESPACE_BATCH_STATUS<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (migrationStatus.getSuccessCount() > 0) {<NEW_LINE>try {<NEW_LINE>registryCenterService.notifyRefreshRegCenter();<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Fail to refresh registry center.", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>migrationStatus.setFinished(true);<NEW_LINE>temporarySharedStatusService.update(ShareStatusModuleNames.MOVE_NAMESPACE_BATCH_STATUS, gson.toJson(migrationStatus));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
, gson.toJson(migrationStatus));
347,898
public SVCallRecord collapse(final Collection<SVCallRecord> items) {<NEW_LINE>validateRecords(items);<NEW_LINE>final String id = collapseIds(items);<NEW_LINE>final List<String> algorithms = collapseAlgorithms(items);<NEW_LINE>final StructuralVariantType type = collapseTypes(items);<NEW_LINE>final Map<String, Object> attributes = collapseVariantAttributes(items);<NEW_LINE>// Prefer using variants generated with PESR callers, which tend to generate more precise breakpoints<NEW_LINE>final Collection<SVCallRecord> mostPreciseCalls = getRecordsWithMostPreciseBreakpoints(items);<NEW_LINE>final SVCallRecord exampleCall = mostPreciseCalls.iterator().next();<NEW_LINE>final Pair<Integer, Integer> coordinates = collapseInterval(mostPreciseCalls);<NEW_LINE>final int start = coordinates.getKey();<NEW_LINE>final int end = coordinates.getValue();<NEW_LINE>final Integer length = collapseLength(mostPreciseCalls, type);<NEW_LINE>final Allele refAllele = collapseRefAlleles(exampleCall.getContigA(), start);<NEW_LINE>final List<Allele> altAlleles = collapseAltAlleles(items);<NEW_LINE>final int numAlleles <MASK><NEW_LINE>final List<Allele> alleles = new ArrayList<>(numAlleles);<NEW_LINE>alleles.add(refAllele);<NEW_LINE>alleles.addAll(altAlleles);<NEW_LINE>final List<Genotype> genotypes = collapseAllGenotypes(items, refAllele, altAlleles);<NEW_LINE>final List<Genotype> harmonizedGenotypes = harmonizeAltAlleles(altAlleles, genotypes);<NEW_LINE>return new SVCallRecord(id, exampleCall.getContigA(), start, exampleCall.getStrandA(), exampleCall.getContigB(), end, exampleCall.getStrandB(), type, length, algorithms, alleles, harmonizedGenotypes, attributes, dictionary);<NEW_LINE>}
= 1 + altAlleles.size();
1,182,816
public void resolve(InjectionBinding<PersistenceContext> binding) throws InjectionException {<NEW_LINE>JPAPCtxtInjectionBinding pCtxtBinding = (JPAPCtxtInjectionBinding) binding;<NEW_LINE>final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "resolve : " + pCtxtBinding);<NEW_LINE><MASK><NEW_LINE>String modJarName = pCtxtBinding.getModJarName();<NEW_LINE>String puName = pCtxtBinding.getPuName();<NEW_LINE>// If this is a WAR module with EJBs, then the isSFSB setting is not reliable,<NEW_LINE>// so use a different object factory which knows how to look at the metadata<NEW_LINE>// on the thread to determine if running in a stateful bean context. d658638<NEW_LINE>boolean isEJBinWar = ivNameSpaceConfig.getOwningFlow() == HYBRID;<NEW_LINE>JPAPuId puId = new JPAPuId(applName, modJarName, puName);<NEW_LINE>AbstractJPAComponent jpaComponent = (AbstractJPAComponent) JPAAccessor.getJPAComponent();<NEW_LINE>Reference ref = // d510184<NEW_LINE>jpaComponent.// d510184<NEW_LINE>createPersistenceContextReference(// d510184<NEW_LINE>isEJBinWar, // d510184<NEW_LINE>puId, // d510184<NEW_LINE>ivNameSpaceConfig.getJ2EEName(), // d658638<NEW_LINE>pCtxtBinding.getJndiName(), // d658638<NEW_LINE>pCtxtBinding.isExtendedType(), ivNameSpaceConfig.isSFSB(), pCtxtBinding.getProperties(), pCtxtBinding.isUnsynchronized());<NEW_LINE>// d446013<NEW_LINE>pCtxtBinding.setObjects(null, ref);<NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.exit(tc, "resolve : " + pCtxtBinding);<NEW_LINE>}
String applName = pCtxtBinding.getApplName();
542,985
final GetTagsResult executeGetTags(GetTagsRequest getTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetTagsRequest> request = null;<NEW_LINE>Response<GetTagsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetTagsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getTagsRequest));<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, "Glue");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTags");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetTagsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTagsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
387,008
// Process incoming queue and put it on priority queue with next timestamp to rerun<NEW_LINE>private boolean processInQueue() {<NEW_LINE>boolean any = false;<NEW_LINE>while (true) {<NEW_LINE>long cursor = inSubSequence.next();<NEW_LINE>// -2 = there was a contest for queue index and this thread has lost<NEW_LINE>if (cursor < -1) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// -1 = queue is empty. All done.<NEW_LINE>if (cursor < 0) {<NEW_LINE>return any;<NEW_LINE>}<NEW_LINE>Retry retry;<NEW_LINE>try {<NEW_LINE>RetryHolder toRun = inQueue.get(cursor);<NEW_LINE>retry = toRun.retry;<NEW_LINE>toRun.retry = null;<NEW_LINE>} finally {<NEW_LINE>inSubSequence.done(cursor);<NEW_LINE>}<NEW_LINE>retry.getAttemptDetails().nextRunTimestamp = <MASK><NEW_LINE>nextRerun.add(retry);<NEW_LINE>any = true;<NEW_LINE>}<NEW_LINE>}
calculateNextTimestamp(retry.getAttemptDetails());
246,601
private static List<? extends TypeMirror> computeAssignment(Set<ElementKind> types, CompilationInfo info, TreePath parent, Tree error, int offset) {<NEW_LINE>AssignmentTree at = <MASK><NEW_LINE>TypeMirror type = null;<NEW_LINE>if (at.getVariable() == error) {<NEW_LINE>type = info.getTrees().getTypeMirror(new TreePath(parent, at.getExpression()));<NEW_LINE>if (type != null) {<NEW_LINE>// anonymous class?<NEW_LINE>type = JavaPluginUtils.convertIfAnonymous(type);<NEW_LINE>if (type.getKind() == TypeKind.EXECUTABLE) {<NEW_LINE>// TODO: does not actualy work, attempt to solve situations like:<NEW_LINE>// t = Collections.emptyList()<NEW_LINE>// t = Collections.<String>emptyList();<NEW_LINE>// see also testCreateFieldMethod1 and testCreateFieldMethod2 tests:<NEW_LINE>type = ((ExecutableType) type).getReturnType();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (at.getExpression() == error) {<NEW_LINE>type = info.getTrees().getTypeMirror(new TreePath(parent, at.getVariable()));<NEW_LINE>}<NEW_LINE>// class or field:<NEW_LINE>if (type == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>types.add(ElementKind.PARAMETER);<NEW_LINE>types.add(ElementKind.LOCAL_VARIABLE);<NEW_LINE>types.add(ElementKind.FIELD);<NEW_LINE>return Collections.singletonList(type);<NEW_LINE>}
(AssignmentTree) parent.getLeaf();
1,793,057
public void startBenchmark(BenchmarkParams params) {<NEW_LINE>String opts = Utils.join(<MASK><NEW_LINE>if (opts.trim().isEmpty()) {<NEW_LINE>opts = "<none>";<NEW_LINE>}<NEW_LINE>println("# JMH version: " + params.getJmhVersion());<NEW_LINE>println("# VM version: JDK " + params.getJdkVersion() + ", " + params.getVmName() + ", " + params.getVmVersion());<NEW_LINE>println("# VM invoker: " + params.getJvm());<NEW_LINE>println("# VM options: " + opts);<NEW_LINE>println("# Benchmark mode: " + params.getMode().longLabel());<NEW_LINE>hline();<NEW_LINE>String benchName = benchName(params);<NEW_LINE>IterationParams warmup = params.getWarmup();<NEW_LINE>IterationParams measurement = params.getMeasurement();<NEW_LINE>String info = "### %s, %d warmup iterations, %d bench iterations";<NEW_LINE>println(String.format(info, benchName, warmup.getCount(), measurement.getCount()));<NEW_LINE>String s = "";<NEW_LINE>boolean isFirst = true;<NEW_LINE>for (String k : params.getParamsKeys()) {<NEW_LINE>if (isFirst) {<NEW_LINE>isFirst = false;<NEW_LINE>} else {<NEW_LINE>s += ", ";<NEW_LINE>}<NEW_LINE>s += k + " = " + params.getParam(k);<NEW_LINE>}<NEW_LINE>println(String.format("### args = [%s]", s));<NEW_LINE>hline();<NEW_LINE>println("### start benchmark ...");<NEW_LINE>}
params.getJvmArgs(), " ");
9,099
public com.amazonaws.services.organizations.model.InvalidInputException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.organizations.model.InvalidInputException invalidInputException = new com.amazonaws.services.organizations.model.InvalidInputException(null);<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Reason", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>invalidInputException.setReason(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return invalidInputException;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
934,708
public ResponseData<String> send(TransmissionRequest<?> request) {<NEW_LINE>try {<NEW_LINE>logger.info("[HttpTransmission.send] this is http transmission and the service type is: {}", request.getServiceType());<NEW_LINE>if (request.getTransType() != TransType.HTTP && request.getTransType() != TransType.HTTPS) {<NEW_LINE>throw new WeIdBaseException("the transmission type error.");<NEW_LINE>}<NEW_LINE>TransmissionlRequestWarp<?> <MASK><NEW_LINE>Map<String, String> params = new HashMap<String, String>();<NEW_LINE>params.put(REQUEST_DATA, requestWarp.getEncodeData());<NEW_LINE>params.put(REQUEST_CHANNEL_ID, requestWarp.getWeIdAuthObj().getChannelId());<NEW_LINE>String result = null;<NEW_LINE>if (request.getTransType() == TransType.HTTP) {<NEW_LINE>result = HttpClient.doPost("", params, false);<NEW_LINE>} else {<NEW_LINE>result = HttpClient.doPost("", params, true);<NEW_LINE>}<NEW_LINE>return new ResponseData<String>(result, ErrorCode.SUCCESS);<NEW_LINE>} catch (WeIdBaseException e) {<NEW_LINE>logger.error("[HttpTransmission.send] send http fail.", e);<NEW_LINE>return new ResponseData<String>(StringUtils.EMPTY, e.getErrorCode());<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("[HttpTransmission.send] send http due to unknown error.", e);<NEW_LINE>return new ResponseData<String>(StringUtils.EMPTY, ErrorCode.UNKNOW_ERROR);<NEW_LINE>}<NEW_LINE>}
requestWarp = super.authTransmission(request);
1,287,147
public void onPlayerWhois(InfoComponent.PlayerWhoisEvent event) {<NEW_LINE>if (event.getPlayer() instanceof Player) {<NEW_LINE>Player player = (Player) event.getPlayer();<NEW_LINE>LocalPlayer localPlayer = plugin.wrapPlayer(player);<NEW_LINE>if (WorldGuard.getInstance().getPlatform().getGlobalStateManager().get(localPlayer.getWorld()).useRegions) {<NEW_LINE>ApplicableRegionSet regions = WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery().getApplicableRegions(localPlayer.getLocation());<NEW_LINE>// Current regions<NEW_LINE>StringBuilder regionStr = new StringBuilder();<NEW_LINE>boolean first = true;<NEW_LINE>for (ProtectedRegion region : regions) {<NEW_LINE>if (!first) {<NEW_LINE>regionStr.append(", ");<NEW_LINE>}<NEW_LINE>if (region.isOwner(localPlayer)) {<NEW_LINE>regionStr.append("+");<NEW_LINE>} else if (region.isMemberOnly(localPlayer)) {<NEW_LINE>regionStr.append("-");<NEW_LINE>}<NEW_LINE>regionStr.append(region.getId());<NEW_LINE>first = false;<NEW_LINE>}<NEW_LINE>if (regions.size() > 0) {<NEW_LINE>event.addWhoisInformation("Current Regions", regionStr);<NEW_LINE>}<NEW_LINE>event.addWhoisInformation("Can build", regions.testState<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(localPlayer, Flags.BUILD));
225,014
private void meetingEnded(MeetingEnded message) {<NEW_LINE>Meeting <MASK><NEW_LINE>if (m != null) {<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>m.setEndTime(now);<NEW_LINE>Map<String, Object> logData = new HashMap<>();<NEW_LINE>logData.put("meetingId", m.getInternalId());<NEW_LINE>logData.put("externalMeetingId", m.getExternalId());<NEW_LINE>logData.put("name", m.getName());<NEW_LINE>logData.put("duration", m.getDuration());<NEW_LINE>logData.put("record", m.isRecord());<NEW_LINE>logData.put("logCode", "meeting_ended");<NEW_LINE>logData.put("description", "Meeting has ended.");<NEW_LINE>Gson gson = new Gson();<NEW_LINE>String logStr = gson.toJson(logData);<NEW_LINE>log.info(" --analytics-- data={}", logStr);<NEW_LINE>String endCallbackUrl = "endCallbackUrl".toLowerCase();<NEW_LINE>Map<String, String> metadata = m.getMetadata();<NEW_LINE>if (!m.isBreakout()) {<NEW_LINE>if (metadata.containsKey(endCallbackUrl)) {<NEW_LINE>String callbackUrl = metadata.get(endCallbackUrl);<NEW_LINE>try {<NEW_LINE>callbackUrl = new URIBuilder(new URI(callbackUrl)).addParameter("recordingmarks", m.haveRecordingMarks() ? "true" : "false").addParameter("meetingID", m.getExternalId()).build().toURL().toString();<NEW_LINE>MeetingEndedEvent event = new MeetingEndedEvent(m.getInternalId(), m.getExternalId(), m.getName(), callbackUrl);<NEW_LINE>processMeetingEndedCallback(event);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Error in callback url=[{}]", callbackUrl, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!StringUtils.isEmpty(m.getMeetingEndedCallbackURL())) {<NEW_LINE>String meetingEndedCallbackURL = m.getMeetingEndedCallbackURL();<NEW_LINE>callbackUrlService.handleMessage(new MeetingEndedEvent(m.getInternalId(), m.getExternalId(), m.getName(), meetingEndedCallbackURL));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Remove Learning Dashboard files<NEW_LINE>if (!m.getDisabledFeatures().contains("learningDashboard") && m.getLearningDashboardCleanupDelayInMinutes() > 0) {<NEW_LINE>learningDashboardService.removeJsonDataFile(message.meetingId, m.getLearningDashboardCleanupDelayInMinutes());<NEW_LINE>}<NEW_LINE>processRemoveEndedMeeting(message);<NEW_LINE>}<NEW_LINE>}
m = getMeeting(message.meetingId);
1,402,004
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>generateProjectLabel = new JLabel();<NEW_LINE>optionsLabel = new JLabel();<NEW_LINE>// NOI18N<NEW_LINE>generateProjectLabel.setText(" ");<NEW_LINE>// NOI18N<NEW_LINE>optionsLabel.setText(NbBundle.getMessage(NewProjectConfigurationPanel.class, "NewProjectConfigurationPanel.optionsLabel.text"));<NEW_LINE>// NOI18N<NEW_LINE>optionsLabel.setToolTipText(NbBundle.getMessage(NewProjectConfigurationPanel.class, "NewProjectConfigurationPanel.optionsLabel.toolTipText"));<NEW_LINE>optionsLabel.addMouseListener(new MouseAdapter() {<NEW_LINE><NEW_LINE>public void mouseEntered(MouseEvent evt) {<NEW_LINE>optionsLabelMouseEntered(evt);<NEW_LINE>}<NEW_LINE><NEW_LINE>public void mousePressed(MouseEvent evt) {<NEW_LINE>optionsLabelMousePressed(evt);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);<NEW_LINE>this.setLayout(layout);<NEW_LINE>layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(generateProjectLabel).addPreferredGap(ComponentPlacement.RELATED, 240, Short.MAX_VALUE).addComponent(optionsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));<NEW_LINE>layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(generateProjectLabel).addComponent(optionsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addContainerGap(<MASK><NEW_LINE>}
119, Short.MAX_VALUE)));
857,393
public static ListTagResourcesResponse unmarshall(ListTagResourcesResponse listTagResourcesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listTagResourcesResponse.setRequestId<MASK><NEW_LINE>listTagResourcesResponse.setNextToken(_ctx.stringValue("ListTagResourcesResponse.NextToken"));<NEW_LINE>List<TagResource> tagResources = new ArrayList<TagResource>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListTagResourcesResponse.TagResources.Length"); i++) {<NEW_LINE>TagResource tagResource = new TagResource();<NEW_LINE>tagResource.setTagKey(_ctx.stringValue("ListTagResourcesResponse.TagResources[" + i + "].TagKey"));<NEW_LINE>tagResource.setTagValue(_ctx.stringValue("ListTagResourcesResponse.TagResources[" + i + "].TagValue"));<NEW_LINE>tagResource.setResourceType(_ctx.stringValue("ListTagResourcesResponse.TagResources[" + i + "].ResourceType"));<NEW_LINE>tagResource.setResourceId(_ctx.stringValue("ListTagResourcesResponse.TagResources[" + i + "].ResourceId"));<NEW_LINE>tagResources.add(tagResource);<NEW_LINE>}<NEW_LINE>listTagResourcesResponse.setTagResources(tagResources);<NEW_LINE>return listTagResourcesResponse;<NEW_LINE>}
(_ctx.stringValue("ListTagResourcesResponse.RequestId"));
1,446,574
// This method recursively visits all thread groups under `group'.<NEW_LINE>public static void visit(ThreadGroup group, int level, ExceptionReporting exceptionReporter) {<NEW_LINE>// Get threads in `group'<NEW_LINE><MASK><NEW_LINE>Thread[] threads = new Thread[numThreads * 2];<NEW_LINE>numThreads = group.enumerate(threads, false);<NEW_LINE>// Enumerate each thread in `group'<NEW_LINE>for (int i = 0; i < numThreads; i++) {<NEW_LINE>// Get thread<NEW_LINE>Thread thread = threads[i];<NEW_LINE>thread.setUncaughtExceptionHandler(exceptionReporter);<NEW_LINE>}<NEW_LINE>// Get thread subgroups of `group'<NEW_LINE>int numGroups = group.activeGroupCount();<NEW_LINE>ThreadGroup[] groups = new ThreadGroup[numGroups * 2];<NEW_LINE>numGroups = group.enumerate(groups, false);<NEW_LINE>// Recursively visit each subgroup<NEW_LINE>for (int i = 0; i < numGroups; i++) {<NEW_LINE>visit(groups[i], level + 1, exceptionReporter);<NEW_LINE>}<NEW_LINE>}
int numThreads = group.activeCount();
195,203
public void CheckForInner(String script) {<NEW_LINE>String lower = script.toLowerCase(Locale.ROOT);<NEW_LINE>int column = lower.indexOf("innerhtml");<NEW_LINE>if (column >= 0) {<NEW_LINE>report.message(MessageId.SCP_007, EPUBLocation.create(fileName, locator.getLineNumber(), locator.getColumnNumber(), trimContext(script, column)));<NEW_LINE>}<NEW_LINE>column = lower.indexOf("innertext");<NEW_LINE>if (column >= 0) {<NEW_LINE>report.message(MessageId.SCP_008, EPUBLocation.create(fileName, locator.getLineNumber(), locator.getColumnNumber(), trimContext(script, column)));<NEW_LINE>}<NEW_LINE>// the exact pattern is very complex and it slows down all script checking.<NEW_LINE>// what we can do here is use a blunt check (for the word "eval"). if it is not found, keep moving.<NEW_LINE>// If it is found, look closely using the exact pattern to see if the line truly matches the exact eval() function and report that.<NEW_LINE>Matcher m = null;<NEW_LINE>if (script.contains("eval")) {<NEW_LINE>m = evalPattern.matcher(script);<NEW_LINE>if (m.find()) {<NEW_LINE>report.message(MessageId.SCP_001, EPUBLocation.create(fileName, locator.getLineNumber(), locator.getColumnNumber(), trimContext(script, m.start())));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>m = localStoragePattern.matcher(script);<NEW_LINE>if (m.find()) {<NEW_LINE>report.message(MessageId.SCP_003, EPUBLocation.create(fileName, locator.getLineNumber(), locator.getColumnNumber(), trimContext(script, <MASK><NEW_LINE>}<NEW_LINE>m = sessionStoragePattern.matcher(script);<NEW_LINE>if (m.find()) {<NEW_LINE>report.message(MessageId.SCP_003, EPUBLocation.create(fileName, locator.getLineNumber(), locator.getColumnNumber(), trimContext(script, m.start())));<NEW_LINE>}<NEW_LINE>m = xmlHttpRequestPattern.matcher(script);<NEW_LINE>if (m.find()) {<NEW_LINE>report.message(MessageId.SCP_002, EPUBLocation.create(fileName, locator.getLineNumber(), locator.getColumnNumber(), trimContext(script, m.start())));<NEW_LINE>}<NEW_LINE>m = microsoftXmlHttpRequestPattern.matcher(script);<NEW_LINE>if (m.find()) {<NEW_LINE>report.message(MessageId.SCP_002, EPUBLocation.create(fileName, locator.getLineNumber(), locator.getColumnNumber(), trimContext(script, m.start())));<NEW_LINE>}<NEW_LINE>}
m.start())));
675,210
public AirbyteConnectionStatus check(final JsonNode config) {<NEW_LINE>try {<NEW_LINE>final PulsarDestinationConfig pulsarConfig = PulsarDestinationConfig.getPulsarDestinationConfig(config);<NEW_LINE>final String testTopic = pulsarConfig.getTestTopic();<NEW_LINE>if (!testTopic.isBlank()) {<NEW_LINE>final String key = UUID.randomUUID().toString();<NEW_LINE>final GenericRecord value = Schema.generic(PulsarDestinationConfig.getSchemaInfo()).newRecordBuilder().set(PulsarDestination.COLUMN_NAME_AB_ID, key).set(PulsarDestination.COLUMN_NAME_STREAM, "test-topic-stream").set(PulsarDestination.COLUMN_NAME_EMITTED_AT, System.currentTimeMillis()).set(PulsarDestination.COLUMN_NAME_DATA, Jsons.jsonNode(ImmutableMap.of("test-key", "test-value"))).build();<NEW_LINE>try (final PulsarClient client = PulsarUtils.buildClient(pulsarConfig.getServiceUrl());<NEW_LINE>final Producer<GenericRecord> producer = PulsarUtils.buildProducer(client, Schema.generic(PulsarDestinationConfig.getSchemaInfo()), pulsarConfig.getProducerConfig(), pulsarConfig.uriForTopic(testTopic))) {<NEW_LINE>final MessageId messageId = producer.send(value);<NEW_LINE>producer.flush();<NEW_LINE>LOGGER.info("Successfully sent message id '{}' to Pulsar brokers for topic '{}'.", messageId, testTopic);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new AirbyteConnectionStatus().withStatus(Status.SUCCEEDED);<NEW_LINE>} catch (final Exception e) {<NEW_LINE>LOGGER.error("Exception attempting to connect to the Pulsar brokers: ", e);<NEW_LINE>return new AirbyteConnectionStatus().withStatus(Status.FAILED).withMessage(<MASK><NEW_LINE>}<NEW_LINE>}
"Could not connect to the Pulsar brokers with provided configuration. \n" + e.getMessage());
376,505
public MultiValueMap<String, Connection<?>> findAllConnections() {<NEW_LINE>List<Connection<?>> resultList = jdbcTemplate.query(selectFromUserConnection() + " where userId = ? order by providerId, `rank`", connectionMapper, userId);<NEW_LINE>MultiValueMap<String, Connection<?>> connections = new LinkedMultiValueMap<String, Connection<?>>();<NEW_LINE>Set<String> registeredProviderIds = connectionFactoryLocator.registeredProviderIds();<NEW_LINE>for (String registeredProviderId : registeredProviderIds) {<NEW_LINE>connections.put(registeredProviderId, Collections.<Connection<?>>emptyList());<NEW_LINE>}<NEW_LINE>for (Connection<?> connection : resultList) {<NEW_LINE>String providerId = connection.getKey().getProviderId();<NEW_LINE>if (connections.get(providerId).size() == 0) {<NEW_LINE>connections.put(providerId, new LinkedList<<MASK><NEW_LINE>}<NEW_LINE>connections.add(providerId, connection);<NEW_LINE>}<NEW_LINE>return connections;<NEW_LINE>}
Connection<?>>());
1,318,896
public static PredictCategoryResponse unmarshall(PredictCategoryResponse predictCategoryResponse, UnmarshallerContext _ctx) {<NEW_LINE>predictCategoryResponse.setCode(_ctx.integerValue("PredictCategoryResponse.Code"));<NEW_LINE>predictCategoryResponse.setMessage(_ctx.stringValue("PredictCategoryResponse.Message"));<NEW_LINE>predictCategoryResponse.setSuccess(_ctx.booleanValue("PredictCategoryResponse.Success"));<NEW_LINE>Response response = new Response();<NEW_LINE>response.setSuccess(_ctx.booleanValue("PredictCategoryResponse.Response.Success"));<NEW_LINE>response.setUrl(_ctx.stringValue("PredictCategoryResponse.Response.Url"));<NEW_LINE>response.setRequestId(_ctx.stringValue("PredictCategoryResponse.Response.RequestId"));<NEW_LINE>response.setErrorCode(_ctx.stringValue("PredictCategoryResponse.Response.ErrorCode"));<NEW_LINE>response.setErrorMessage(_ctx.stringValue("PredictCategoryResponse.Response.ErrorMessage"));<NEW_LINE>List<Node> data = new ArrayList<Node>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("PredictCategoryResponse.Response.Data.Length"); i++) {<NEW_LINE>Node node = new Node();<NEW_LINE>node.setCateId(_ctx.stringValue("PredictCategoryResponse.Response.Data[" + i + "].CateId"));<NEW_LINE>Category category = new Category();<NEW_LINE>category.setCateLevelFOURName(_ctx.stringValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelFOURName"));<NEW_LINE>category.setCateLevelTwoId(_ctx.integerValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelTwoId"));<NEW_LINE>category.setCateLevelOneId(_ctx.integerValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelOneId"));<NEW_LINE>category.setCateLevelOneName(_ctx.stringValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelOneName"));<NEW_LINE>category.setCateLevelFourId(_ctx.integerValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelFourId"));<NEW_LINE>category.setCateLevel(_ctx.integerValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevel"));<NEW_LINE>category.setCateLevelThreeId(_ctx.integerValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelThreeId"));<NEW_LINE>category.setCateLevelFiveId(_ctx.integerValue<MASK><NEW_LINE>category.setCateLevelFiveName(_ctx.stringValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelFiveName"));<NEW_LINE>category.setCateName(_ctx.stringValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateName"));<NEW_LINE>category.setCateLevelTwoName(_ctx.stringValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelTwoName"));<NEW_LINE>category.setScore(_ctx.floatValue("PredictCategoryResponse.Response.Data[" + i + "].Category.Score"));<NEW_LINE>category.setCateId(_ctx.integerValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateId"));<NEW_LINE>category.setCateLevelThreeName(_ctx.stringValue("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelThreeName"));<NEW_LINE>node.setCategory(category);<NEW_LINE>data.add(node);<NEW_LINE>}<NEW_LINE>response.setData(data);<NEW_LINE>predictCategoryResponse.setResponse(response);<NEW_LINE>return predictCategoryResponse;<NEW_LINE>}
("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelFiveId"));
900,107
public void marshall(ListEndpointConfigsRequest listEndpointConfigsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listEndpointConfigsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listEndpointConfigsRequest.getSortBy(), SORTBY_BINDING);<NEW_LINE>protocolMarshaller.marshall(listEndpointConfigsRequest.getSortOrder(), SORTORDER_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(listEndpointConfigsRequest.getMaxResults(), MAXRESULTS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listEndpointConfigsRequest.getNameContains(), NAMECONTAINS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listEndpointConfigsRequest.getCreationTimeBefore(), CREATIONTIMEBEFORE_BINDING);<NEW_LINE>protocolMarshaller.marshall(listEndpointConfigsRequest.getCreationTimeAfter(), CREATIONTIMEAFTER_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
listEndpointConfigsRequest.getNextToken(), NEXTTOKEN_BINDING);
167,770
public void consumerSetChange(boolean isEmpty) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "consumerSetChange", new Object[] { isEmpty });<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "Sending ConsumerSetChangeCallback callback for: convId=" + connectionObjectId + ",id=" + consumerMonitorListenerID);<NEW_LINE>CommsByteBuffer request = getCommsByteBuffer();<NEW_LINE>// Put connectionObjectId<NEW_LINE>request.putShort(connectionObjectId);<NEW_LINE>// Put consumerMonitorListenerid<NEW_LINE>request.putShort(consumerMonitorListenerID);<NEW_LINE>// Put isEmpty<NEW_LINE>request.putBoolean(isEmpty);<NEW_LINE>try {<NEW_LINE>jfapSend(request, JFapChannelConstants.SEG_REGISTER_CONSUMER_SET_MONITOR_CALLBACK_NOREPLY, JFapChannelConstants.<MASK><NEW_LINE>} catch (SIConnectionLostException e) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(tc, e.getMessage(), e);<NEW_LINE>FFDCFilter.processException(e, CLASS_NAME + ".consumerSetChange", CommsConstants.SERVERCONSUMERMONITORLISTENER_CONSUMERSETCHANGE_01, this);<NEW_LINE>} catch (SIConnectionDroppedException e) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(tc, e.getMessage(), e);<NEW_LINE>FFDCFilter.processException(e, CLASS_NAME + ".consumerSetChange", CommsConstants.SERVERCONSUMERMONITORLISTENER_CONSUMERSETCHANGE_02, this);<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(this, tc, "consumerSetChange");<NEW_LINE>}
PRIORITY_MEDIUM, true, ThrottlingPolicy.BLOCK_THREAD);
534,748
private static String readResourceFile(File sunResourcesXml) throws IOException {<NEW_LINE>String content = null;<NEW_LINE>if (sunResourcesXml.exists()) {<NEW_LINE>sunResourcesXml = FileUtil.normalizeFile(sunResourcesXml);<NEW_LINE>FileObject sunResourcesFO = FileUtil.toFileObject(sunResourcesXml);<NEW_LINE>if (sunResourcesFO != null) {<NEW_LINE>InputStream is = null;<NEW_LINE>Reader reader = null;<NEW_LINE>try {<NEW_LINE>long flen = sunResourcesFO.getSize();<NEW_LINE>if (flen > 1000000) {<NEW_LINE>throw new IOException(sunResourcesXml.getAbsolutePath() + " is too long to update.");<NEW_LINE>}<NEW_LINE>int length = (int) (2 * flen + 32);<NEW_LINE>char[] buf = new char[length];<NEW_LINE>is = new BufferedInputStream(sunResourcesFO.getInputStream());<NEW_LINE>String encoding = EncodingUtil.detectEncoding(is);<NEW_LINE>reader = new InputStreamReader(is, encoding);<NEW_LINE>int <MASK><NEW_LINE>if (max > 0) {<NEW_LINE>content = new String(buf, 0, max);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (is != null) {<NEW_LINE>try {<NEW_LINE>is.close();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (reader != null) {<NEW_LINE>try {<NEW_LINE>reader.close();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new IOException("Unable to get FileObject for " + sunResourcesXml.getAbsolutePath());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return content;<NEW_LINE>}
max = reader.read(buf);
1,778,657
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>final int widthSize = MeasureSpec.getSize(widthMeasureSpec);<NEW_LINE>final int heightSize = MeasureSpec.getSize(heightMeasureSpec);<NEW_LINE>if (widthSize == 0 && heightSize == 0) {<NEW_LINE>// If there are no constraints on size, let FrameLayout measure<NEW_LINE>super.onMeasure(widthMeasureSpec, heightMeasureSpec);<NEW_LINE>// Now use the smallest of the measured dimensions for both dimensions<NEW_LINE>final int minSize = Math.min(<MASK><NEW_LINE>setMeasuredDimension(minSize, minSize);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int size;<NEW_LINE>if (widthSize == 0 || heightSize == 0) {<NEW_LINE>// If one of the dimensions has no restriction on size, set both dimensions to be the<NEW_LINE>// on that does<NEW_LINE>size = Math.max(widthSize, heightSize);<NEW_LINE>} else {<NEW_LINE>// Both dimensions have restrictions on size, set both dimensions to be the<NEW_LINE>// smallest of the two<NEW_LINE>size = Math.min(widthSize, heightSize);<NEW_LINE>}<NEW_LINE>final int newMeasureSpec = MeasureSpec.makeMeasureSpec(size, MeasureSpec.EXACTLY);<NEW_LINE>super.onMeasure(newMeasureSpec, newMeasureSpec);<NEW_LINE>}
getMeasuredWidth(), getMeasuredHeight());
821,107
private MethodSpec overrideGlideStaticMethod(ExecutableElement methodToOverride) {<NEW_LINE>List<ParameterSpec> parameters = processorUtil.getParameters(methodToOverride);<NEW_LINE>TypeElement element = (TypeElement) processingEnv.getTypeUtils().asElement(methodToOverride.getReturnType());<NEW_LINE>MethodSpec.Builder builder = MethodSpec.methodBuilder(methodToOverride.getSimpleName().toString()).addModifiers(Modifier.PUBLIC, Modifier.STATIC).addJavadoc(processorUtil.generateSeeMethodJavadoc(methodToOverride)).addParameters(parameters);<NEW_LINE>addReturnAnnotations(builder, methodToOverride);<NEW_LINE>boolean returnsValue = element != null;<NEW_LINE>if (returnsValue) {<NEW_LINE>builder.returns(ClassName.get(element));<NEW_LINE>}<NEW_LINE>StringBuilder code = new StringBuilder(returnsValue ? "return " : "");<NEW_LINE>code.append("$T.$N(");<NEW_LINE>List<Object> args = new ArrayList<>();<NEW_LINE>args.add<MASK><NEW_LINE>args.add(methodToOverride.getSimpleName());<NEW_LINE>if (!parameters.isEmpty()) {<NEW_LINE>for (ParameterSpec param : parameters) {<NEW_LINE>code.append("$L, ");<NEW_LINE>args.add(param.name);<NEW_LINE>}<NEW_LINE>code = new StringBuilder(code.substring(0, code.length() - 2));<NEW_LINE>}<NEW_LINE>code.append(")");<NEW_LINE>builder.addStatement(code.toString(), args.toArray(new Object[0]));<NEW_LINE>return builder.build();<NEW_LINE>}
(ClassName.get(glideType));
903,945
public static String modifyURL(String originalUrl, String newProtocol, int newPort, boolean omitPort) {<NEW_LINE>if (newProtocol == null || newProtocol.isEmpty() || (!omitPort && newPort < 0)) {<NEW_LINE>return originalUrl;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// Create handler to avoid unknown protocol error when parsing URL string. Actually this handler will do<NEW_LINE>// nothing.<NEW_LINE>URLStreamHandler handler = new URLStreamHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected URLConnection openConnection(URL u) throws IOException {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>URL url = new URL(null, originalUrl, handler);<NEW_LINE>logger.info("Existing protocol = " + url.getProtocol() + " and port = " + url.getPort());<NEW_LINE>if (omitPort) {<NEW_LINE>// The URL constructor will omit the port if we pass -1 in the port.<NEW_LINE>newPort = -1;<NEW_LINE>}<NEW_LINE>URL newUrl = new URL(newProtocol, url.getHost(), newPort, url.getFile(), handler);<NEW_LINE>logger.info("New protocol = " + newUrl.getProtocol() + <MASK><NEW_LINE>return newUrl.toString();<NEW_LINE>} catch (MalformedURLException e) {<NEW_LINE>throw new IllegalArgumentException("URL is not in valid format. URL:" + originalUrl);<NEW_LINE>}<NEW_LINE>}
" and port = " + newUrl.getPort());
1,137,119
protected CoderResult encodeLoop(CharBuffer source, ByteBuffer target) {<NEW_LINE>while (true) {<NEW_LINE>if (!source.hasRemaining()) {<NEW_LINE>return CoderResult.UNDERFLOW;<NEW_LINE>}<NEW_LINE>if (!target.hasRemaining()) {<NEW_LINE>return CoderResult.OVERFLOW;<NEW_LINE>}<NEW_LINE>int initialPosition = source.position();<NEW_LINE>char ch = source.get();<NEW_LINE>int codePoint = ch;<NEW_LINE>if (highSurrogate != 0) {<NEW_LINE>if (Character.isLowSurrogate(ch)) {<NEW_LINE>codePoint = Character.toCodePoint(highSurrogate, ch);<NEW_LINE>} else {<NEW_LINE>// Unpaired surrogate - emit the surrogates as separate characters<NEW_LINE>int len = BytesUtils.unicodeEscape(highSurrogate, 0, tmpBuf);<NEW_LINE>if (target.remaining() < len) {<NEW_LINE>source.position(initialPosition);<NEW_LINE>return CoderResult.OVERFLOW;<NEW_LINE>}<NEW_LINE>target.<MASK><NEW_LINE>highSurrogate = 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (Character.isHighSurrogate(ch)) {<NEW_LINE>highSurrogate = ch;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int len = BytesUtils.unicodeEscape(codePoint, 0, tmpBuf);<NEW_LINE>if (target.remaining() < len) {<NEW_LINE>source.position(initialPosition);<NEW_LINE>return CoderResult.OVERFLOW;<NEW_LINE>}<NEW_LINE>target.put(tmpBuf, 0, len);<NEW_LINE>highSurrogate = 0;<NEW_LINE>}<NEW_LINE>}
put(tmpBuf, 0, len);
114,637
private Mono<Response<Void>> triggerTiPackageUpdateWithResponseAsync(String scope, String iotSensorName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (scope == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (iotSensorName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2020-08-06-preview";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.triggerTiPackageUpdate(this.client.getEndpoint(), apiVersion, scope, iotSensorName, accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
1,170,319
private Submission loadBaseCodeViaName(String baseCodeName, File rootDirectory, Map<File, Submission> foundSubmissions) throws ExitException {<NEW_LINE>// Is the option value a single name after trimming spurious separators?<NEW_LINE>String name = baseCodeName;<NEW_LINE>while (name.startsWith(File.separator)) {<NEW_LINE>name = name.substring(1);<NEW_LINE>}<NEW_LINE>while (name.endsWith(File.separator)) {<NEW_LINE>name = name.substring(0, name.length() - 1);<NEW_LINE>}<NEW_LINE>// If it is not a name of a single sub-directory, bail out.<NEW_LINE>if (name.isEmpty() || name.contains(File.separator)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (name.contains(".")) {<NEW_LINE>throw new BasecodeException("The basecode directory name \"" + name + "\" cannot contain dots!");<NEW_LINE>}<NEW_LINE>// Grab the basecode submission from the regular submissions.<NEW_LINE>File basecodePath = new File(rootDirectory, baseCodeName);<NEW_LINE>Submission baseCode = foundSubmissions.get(makeCanonical(basecodePath, it -> new BasecodeException("Cannot compute canonical file path: " + basecodePath, it)));<NEW_LINE>if (baseCode == null) {<NEW_LINE>// No base code found at all, report an error.<NEW_LINE>throw new BasecodeException(String<MASK><NEW_LINE>} else {<NEW_LINE>// Found a base code as a submission, report about legacy usage.<NEW_LINE>System.out.println("Legacy use of the -bc option found, please specify the basecode by path instead of by name!");<NEW_LINE>}<NEW_LINE>return baseCode;<NEW_LINE>}
.format("Basecode path \"%s\" relative to the working directory could not be found.", baseCodeName));
210,738
// End of variables declaration//GEN-END:variables<NEW_LINE>@ProjectCustomizer.CompositeCategoryProvider.Registration(projectType = JDKProject.PROJECT_KEY, position = 100)<NEW_LINE>public static ProjectCustomizer.CompositeCategoryProvider createCategoryProvider() {<NEW_LINE>return new ProjectCustomizer.CompositeCategoryProvider() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ProjectCustomizer.Category createCategory(Lookup context) {<NEW_LINE>if (context.lookup(Settings.class) != null)<NEW_LINE>return ProjectCustomizer.Category.create("build", "Build", null);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public JComponent createComponent(ProjectCustomizer.Category category, Lookup context) {<NEW_LINE>Settings settings = <MASK><NEW_LINE>BuildCategory panel = new BuildCategory(settings.isUseAntBuild(), settings.getAntBuildLocation());<NEW_LINE>category.setOkButtonListener(evt -> {<NEW_LINE>settings.setUseAntBuild(panel.useAntBuild.isSelected());<NEW_LINE>settings.setAntBuildLocation(panel.antBuildLocation.getText());<NEW_LINE>});<NEW_LINE>category.setStoreListener(evt -> settings.flush());<NEW_LINE>return panel;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
context.lookup(Settings.class);