idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,402,778 | final CacheCluster executeRebootCacheCluster(RebootCacheClusterRequest rebootCacheClusterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(rebootCacheClusterRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEven... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
576,353 | private static Font createFont(Workbook workbook, Font originFont, WriteFont writeFont) {<NEW_LINE>Font font = workbook.createFont();<NEW_LINE>if (originFont == null) {<NEW_LINE>return font;<NEW_LINE>}<NEW_LINE>if (originFont instanceof XSSFFont) {<NEW_LINE>XSSFFont xssfFont = (XSSFFont) font;<NEW_LINE>XSSFFont xssfOri... | setFontHeightInPoints(hssfOriginFont.getFontHeightInPoints()); |
316,003 | private void writeResourceStructure(GeneratorContext context, ResourceTypeDescriptor structure) {<NEW_LINE>String className = structure.getRootInterface().getName();<NEW_LINE>String fileName = "resources/" + context.escapeFileName(className) + ".h";<NEW_LINE>context.includes().includePath(fileName);<NEW_LINE>if (!writt... | names().forClass(className); |
721,052 | final UpdateDomainNameResult executeUpdateDomainName(UpdateDomainNameRequest updateDomainNameRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDomainNameRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
130,581 | public void read(org.apache.thrift.protocol.TProtocol prot, HavingFilterQuery struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>struct.id = iprot.readI32();<NEW_LINE>struct.setIdIsSet(true);<NEW_LINE>java.u... | incoming = iprot.readBitSet(4); |
549,231 | ConsumerMaxRates decode(byte[] data) {<NEW_LINE>MessageHeaderDecoder header = new MessageHeaderDecoder();<NEW_LINE>MaxRateDecoder body = new MaxRateDecoder();<NEW_LINE>UnsafeBuffer buffer = new UnsafeBuffer(data);<NEW_LINE>header.wrap(buffer, 0);<NEW_LINE>if (header.templateId() != MaxRateDecoder.TEMPLATE_ID) {<NEW_LIN... | long id = subscriptionDecoder.id(); |
693,240 | public void finalizeEStep(double weight, double prior) {<NEW_LINE>final int dim = covariance.length;<NEW_LINE>this.weight = weight;<NEW_LINE>double f = wsum > Double.MIN_NORMAL && wsum < Double.POSITIVE_INFINITY ? 1. / wsum : 1.;<NEW_LINE>if (prior > 0 && priormatrix != null) {<NEW_LINE>// MAP<NEW_LINE>// Popular defau... | * pri_i[i]) * f2; |
856,932 | public <T> void visitCtNewArray(CtNewArray<T> newArray) {<NEW_LINE>enterCtExpression(newArray);<NEW_LINE>boolean isNotInAnnotation = (newArray.getParent(CtAnnotationType.class) == null) && (newArray.getParent(CtAnnotation.class) == null);<NEW_LINE>if (isNotInAnnotation) {<NEW_LINE>CtTypeReference<?> ref = newArray.getT... | writeComment(newArray, CommentOffset.AFTER); |
1,589,401 | private void prepareThenExecuteTransactionWriteOperations(RequestDetails theRequestDetails, String theActionName, TransactionDetails theTransactionDetails, StopWatch theTransactionStopWatch, IBaseBundle theResponse, IdentityHashMap<IBase, Integer> theOriginalRequestOrder, List<IBase> theEntries) {<NEW_LINE>TransactionW... | execute(theRequestDetails, theTransactionDetails, txCallback); |
996,002 | public void characters(char[] ch, int start, int length) throws SAXException {<NEW_LINE>String text = new String(ch, start, length);<NEW_LINE>if (length == 1) {<NEW_LINE>if (StringUtils.equals("&", text)) {<NEW_LINE>char[] escape = "&".toCharArray();<NEW_LINE>super.characters(escape, start, escape.length);<NEW_LINE... | escape, start, escape.length); |
1,322,424 | //<NEW_LINE>public static void addGroovyRuntime(final IProject project) {<NEW_LINE>GroovyCore.trace("GroovyRuntime.addGroovyRuntime(IProject)");<NEW_LINE>try {<NEW_LINE>if (project != null && project.isAccessible() && project.hasNature(JavaCore.NATURE_ID) && !project.hasNature(GroovyNature.GROOVY_NATURE)) {<NEW_LINE>IJ... | javaProject = JavaCore.create(project); |
1,563,166 | public void createAccount(IMiniTable dataTable) {<NEW_LINE>log.config("");<NEW_LINE>//<NEW_LINE>listCreated = new StringBuffer();<NEW_LINE>listRejected = new StringBuffer();<NEW_LINE>//<NEW_LINE>int rows = dataTable.getRowCount();<NEW_LINE>for (int i = 0; i < rows; i++) {<NEW_LINE>if (dataTable.isRowChecked(i)) {<NEW_L... | dataTable.setRowChecked(i, false); |
446,262 | public void run() {<NEW_LINE>final SingleScanSession scanSession = (<MASK><NEW_LINE>String oldThreadName = Thread.currentThread().getName();<NEW_LINE>try {<NEW_LINE>if (isCancelled() || scanSession == null)<NEW_LINE>return;<NEW_LINE>runState.set(ScanRunState.RUNNING);<NEW_LINE>Thread.currentThread().setName("User: " + ... | SingleScanSession) server.getSession(scanID); |
31,860 | public static ExprNode validateEventPrecedence(boolean insertingIntoTable, ExprNode eventPrecedence, EventType resultEventType, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) throws ExprValidationException {<NEW_LINE>StreamTypeService streamTypeService = new <MASK><NEW_LINE>ExprValidationCont... | StreamTypeServiceImpl(resultEventType, null, true); |
83,134 | private void loadNode628() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.SessionDiagnosticsVariableType_ClientLastContactTime, new QualifiedName(0, "ClientLastContactTime"), new LocalizedText("en", "ClientLastContactTime"), LocalizedText.NULL_VALUE, UInteger.valueOf(0... | .expanded(), true)); |
44,705 | private void updateDrawerMode(boolean accountMode) {<NEW_LINE>mLeftDrawerMenu.setGroupVisible(R.id.my_items, !accountMode);<NEW_LINE>mLeftDrawerMenu.setGroupVisible(R<MASK><NEW_LINE>mLeftDrawerMenu.setGroupVisible(R.id.explore, !accountMode);<NEW_LINE>mLeftDrawerMenu.setGroupVisible(R.id.settings, !accountMode);<NEW_LI... | .id.navigation, !accountMode); |
599,946 | protected RequestBody finalizeData() {<NEW_LINE>DataObject body = DataObject.empty().put("name", getGuild().getName());<NEW_LINE>if (shouldUpdate(NAME))<NEW_LINE>body.put("name", name);<NEW_LINE>if (shouldUpdate(AFK_TIMEOUT))<NEW_LINE>body.put("afk_timeout", afkTimeout);<NEW_LINE>if (shouldUpdate(ICON))<NEW_LINE>body.p... | body.put("system_channel_id", systemChannel); |
1,608,737 | private void doDeregister(DropTriggerPlan plan) throws TriggerManagementException {<NEW_LINE>TriggerExecutor executor = executors.remove(plan.getTriggerName());<NEW_LINE>executor.getMeasurementMNode().setTriggerExecutor(null);<NEW_LINE>try {<NEW_LINE>executor.onDrop();<NEW_LINE>} catch (TriggerExecutionException e) {<N... | getRegistrationInformation().getClassName()); |
626,778 | private static boolean addVolumes(VolumeManager fs, InitialConfiguration initConfig, ServerDirs serverDirs) {<NEW_LINE>var hadoopConf = initConfig.getHadoopConf();<NEW_LINE>var siteConfig = initConfig.getSiteConf();<NEW_LINE>Set<String> volumeURIs = VolumeConfiguration.getVolumeUris(siteConfig);<NEW_LINE>Set<String> in... | Path(aBasePath, Constants.VERSION_DIR); |
1,519,454 | public void decode(final ChannelHandlerContext context, final ByteBuf in, final List<Object> out) {<NEW_LINE>while (isValidHeader(in.readableBytes())) {<NEW_LINE>if (startupPhase) {<NEW_LINE>handleStartupPhase(in, out);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int payloadLength = in.getInt(in.readerIndex() + 1);<NEW_LINE>i... | .readRetainedSlice(MESSAGE_TYPE_LENGTH + payloadLength)); |
1,606,003 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Permanent krovikanVampire = game.getPermanent(source.getSourceId());<NEW_LINE>creaturesAffected = (Set<UUID>) game.getState().getValue(source.getSourceId() + "creatureToGainControl");<NEW_LI... | false, false, false, null); |
494,106 | public ModelAndView doPost(HttpServletRequest request) throws Exception {<NEW_LINE>boolean sonosEnabled = ServletRequestUtils.getBooleanParameter(request, "sonosEnabled", false);<NEW_LINE>String sonosServiceName = StringUtils.trimToNull(request.getParameter("sonosServiceName"));<NEW_LINE>if (StringUtils.isBlank(sonosSe... | map.put("returnCodes", returnCodes); |
928,540 | public Object invoke(Exchange exchange, Object o) {<NEW_LINE>final Object serviceObject = getServiceObject(exchange);<NEW_LINE>try {<NEW_LINE>BindingOperationInfo bop = exchange.getBindingOperationInfo();<NEW_LINE>// Liberty Change: exchange.getService() causes an NPE since it returns null when an EJB service is being ... | (List<?>) o); |
1,463,243 | public synchronized void transitionState(BackupState newState) {<NEW_LINE>// Need updated backup state as multiple threads can access backup object.<NEW_LINE>this.refresh();<NEW_LINE>if (this.state == newState) {<NEW_LINE>LOG.error("Skipping state transition as no change in previous and new state");<NEW_LINE>} else if ... | error("Ignored INVALID STATE TRANSITION {} -> {}", state, newState); |
600,050 | public void dispose() {<NEW_LINE>log.config("(" + <MASK><NEW_LINE>// clear info<NEW_LINE>stopEditor(false);<NEW_LINE>if (m_mTab.isLoadComplete()) {<NEW_LINE>if (m_mTab.needSave(true, false))<NEW_LINE>m_mTab.dataIgnore();<NEW_LINE>}<NEW_LINE>// FR [ 1757088 ] vIncludedGC = null;<NEW_LINE>// Listeners<NEW_LINE>if (m_mTab... | m_mTab.toString() + ")"); |
1,428,352 | public void payStandbyWitness() {<NEW_LINE>List<WitnessCapsule> witnessCapsules = witnessStore.getAllWitnesses();<NEW_LINE>Map<ByteString, WitnessCapsule> witnessCapsuleMap = new HashMap<>();<NEW_LINE>List<ByteString> witnessAddressList = new ArrayList<>();<NEW_LINE>for (WitnessCapsule witnessCapsule : witnessCapsules)... | get(b).getVoteCount(); |
1,700,921 | public void handlerSelector(final SelectorData selectorData) {<NEW_LINE>LOG.info("handler loggingRocketMQ selector data:{}", GsonUtils.getGson().toJson(selectorData));<NEW_LINE><MASK><NEW_LINE>if (StringUtils.isEmpty(handleJson) || EMPTY_JSON.equals(handleJson.trim())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (selecto... | String handleJson = selectorData.getHandle(); |
812,772 | final DeleteTestGridProjectResult executeDeleteTestGridProject(DeleteTestGridProjectRequest deleteTestGridProjectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTestGridProjectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
615,563 | protected void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) {<NEW_LINE>final boolean isPathSelected = tree.getSelectionModel().isPathSelected(path);<NEW_LINE>boolean isPropertyNode = false;<NEW_... | Object lastPathComponent = path.getLastPathComponent(); |
568,734 | public static void copy(InputStream in, OutputStream os, long size) throws IOException {<NEW_LINE>if (os instanceof FileOutputStream) {<NEW_LINE>copy(in, (FileOutputStream) os, size);<NEW_LINE>} else {<NEW_LINE>ReadableByteChannel inChannel = Channels.newChannel(in);<NEW_LINE>WritableByteChannel outChannel = Channels.n... | byteBuffer = ByteBuffer.allocate(10240); |
585,762 | private void internalInitialize() {<NEW_LINE>try {<NEW_LINE>scpdUtil = new SCPDUtil(httpClient, endpointBaseURL);<NEW_LINE>} catch (SCPDException e) {<NEW_LINE>updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "could not get device definitions from " + config.host);<NEW_LINE>return;<NEW_LINE>}<NE... | scpdUtil, "", deviceType, channels); |
412,218 | protected void doTransactionScan(final DB db, Object threadstate) {<NEW_LINE>final ThreadState state = (ThreadState) threadstate;<NEW_LINE>final Random random = ThreadLocalRandom.current();<NEW_LINE>final String keyname = keys[random.nextInt(keys.length)];<NEW_LINE>// choose a random scan length<NEW_LINE>int len = scan... | .nextInt(queryTimeSpan / timestampInterval)); |
706,938 | public Transferable clipboardCopy() {<NEW_LINE>String result = "";<NEW_LINE>GlassfishModule commonModule = lu.lookup(GlassfishModule.class);<NEW_LINE>if (commonModule != null) {<NEW_LINE>Map<String, String> ip = commonModule.getInstanceProperties();<NEW_LINE>String host = ip.get(GlassfishModule.HTTPHOST_ATTR);<NEW_LINE... | result.length() - 1); |
478,808 | private void registerContext(ServerRequest req, ServerResponse res) {<NEW_LINE>Map<String, List<String>> allHeaders = new HashMap<>(req.headers().toMap());<NEW_LINE>Optional<Map> newHeaders = req.context().get(CONTEXT_ADD_HEADERS, Map.class);<NEW_LINE>newHeaders.ifPresent(allHeaders::putAll);<NEW_LINE>// make sure ther... | context().register(context); |
1,125,941 | final DeleteAutoSnapshotResult executeDeleteAutoSnapshot(DeleteAutoSnapshotRequest deleteAutoSnapshotRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAutoSnapshotRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | invoke(request, responseHandler, executionContext); |
635,114 | protected void visit(QueryNode query) {<NEW_LINE>if (query.isWithSubQuery() && !isTopQuery) {<NEW_LINE>sqlBuilder.append(" ( ");<NEW_LINE>}<NEW_LINE>if (query.isWithSubQuery() || isTopQuery) {<NEW_LINE>buildSelect(query);<NEW_LINE>sqlBuilder.append(" from ");<NEW_LINE>}<NEW_LINE>sqlBuilder.append('(');<NEW_LINE><MASK><... | PlanNode child = query.getChild(); |
512,177 | private void startElectionScheduler() {<NEW_LINE>assert electionScheduler == null : electionScheduler;<NEW_LINE>if (getLocalNode().isMasterNode() == false) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final TimeValue gracePeriod = TimeValue.ZERO;<NEW_LINE>electionScheduler = electionSchedulerFactory.startElectionScheduler(gr... | collect(Collectors.toList()); |
1,829,517 | private void initializeWeb3j(PropertyReader reader) {<NEW_LINE>String endPoint = reader.getProperty(EthConstants.ETHEREUM_NODE_ENDPOINT);<NEW_LINE>if (endPoint == null || endPoint.isEmpty()) {<NEW_LINE>LOGGER.error("Specify - " + EthConstants.ETHEREUM_NODE_ENDPOINT + " in " + EthConstants.KUNDERA_ETHEREUM_PROPERTIES);<... | ETHEREUM_NODE_ENDPOINT + " in " + EthConstants.KUNDERA_ETHEREUM_PROPERTIES); |
58,970 | public MemberSelectTree buildIteratorMethodAccess(ExpressionTree iterableExpr) {<NEW_LINE>DeclaredType exprType = (DeclaredType) TypesUtils.upperBound(TreeUtils.typeOf(iterableExpr));<NEW_LINE>assert exprType != null : "expression must be of declared type Iterable<>";<NEW_LINE>TypeElement exprElement = (TypeElement) ex... | List.nil(), methodClass); |
1,558,200 | public boolean accept(@NonNull final IValidationContext evalCtx, final NamePair item) {<NEW_LINE>if (null == item) {<NEW_LINE>// Should never happen.<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final String docType = evalCtx.get_ValueAsString(COLUMNNAME_C_DocType_ID);<NEW_LINE>final String docTypeTarget = evalCtx.get_Va... | "Invalid warehouse {}", item.getID()); |
170,469 | public static void main(String[] args) {<NEW_LINE>// Parse text to separate words<NEW_LINE>String INPUT_TEXT = "Hello World! Hello All! Hi World!";<NEW_LINE>// Create Multiset<NEW_LINE>Bag bag = new TreeBag(Arrays.asList(INPUT_TEXT.split(" ")));<NEW_LINE>// Print count words<NEW_LINE>// print [1:All!,2:Hello,1:Hi,2:Wor... | println(bag.size()); |
572,435 | protected Subscriber createSubscriber(boolean noLocal) throws JMSException {<NEW_LINE>try {<NEW_LINE>Logger logger = connection.getLogger();<NEW_LINE>SubscriberQosHolder holder = new SubscriberQosHolder(QosPolicies.newSubscriberQos());<NEW_LINE><MASK><NEW_LINE>participant.get_default_subscriber_qos(holder);<NEW_LINE>Su... | DomainParticipant participant = connection.getParticipant(); |
821,443 | public void reloadConfig(RestartRequirement restartType) {<NEW_LINE>if (restartType == RestartRequirement.GAME) {<NEW_LINE>reloadConfig(RestartRequirement.WORLD);<NEW_LINE>} else if (restartType == RestartRequirement.WORLD) {<NEW_LINE>oldBlueprintServerDir = BuildCraftCore.mainConfigManager.get("blueprints.serverDataba... | get("general.quarry.doChunkLoading").getBoolean(); |
1,259,830 | public // testCreateSharedDurableExpiry_B_SecOff<NEW_LINE>void testCreateSharedDurableConsumer_create_Expiry_B_SecOff(HttpServletRequest request, HttpServletResponse response) throws Throwable {<NEW_LINE>JMSContext jmsContextSender = tcfBindings.createContext();<NEW_LINE>JMSContext jmsContextReceiver = tcfBindings.crea... | tmsg = jmsContextSender.createTextMessage("This is a test message"); |
1,241,728 | public final static void YUVJtoRGB(byte y, byte cb, byte cr, byte[] data, int off) {<NEW_LINE>int y_ = (y + 128) << SCALEBITS;<NEW_LINE>int add_r = FIX_1_402 * cr + ONE_HALF;<NEW_LINE>int add_g = _FIX_0_34414 * cb - FIX_0_71414 * cr + ONE_HALF;<NEW_LINE>int add_b = FIX_1_772 * cb + ONE_HALF;<NEW_LINE>int r = (y_ + add_... | (y_ + add_b) >> SCALEBITS; |
622,465 | public static PaymentAccount fromProto(protobuf.PaymentAccount proto, CoreProtoResolver coreProtoResolver) {<NEW_LINE>String paymentMethodId = proto.getPaymentMethod().getId();<NEW_LINE>List<TradeCurrency> tradeCurrencies = proto.getTradeCurrenciesList().stream().map(TradeCurrency::fromProto).collect(Collectors.toList(... | (proto.getSelectedTradeCurrency())); |
1,265,795 | public void render(PoseStack poseStack, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {<NEW_LINE>// Draw dividing line<NEW_LINE>fill(poseStack, x - 3, (y + entryHeight) - 2, x + entryWidth, (y <MASK><NEW_LINE>Font font = Minecraft.getInstance().font;... | + entryHeight) - 1, 0x66BEBEBE); |
421,139 | final ListPipelinesResult executeListPipelines(ListPipelinesRequest listPipelinesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPipelinesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListPipelinesReq... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,226,740 | public void apply(final GridFieldVO vo) {<NEW_LINE>final GridFieldLayoutConstraints layoutConstraints = vo.getLayoutConstraints();<NEW_LINE>final String name = getName();<NEW_LINE>if (!Check.isEmpty(name) && name.length() > 1)<NEW_LINE>vo.setHeader(name);<NEW_LINE>if (!Check.isEmpty(getDescription()))<NEW_LINE>vo.setDe... | vo.setHelp(getHelp()); |
159,504 | public boolean install(final String name, final String version, final ProgressHandle progressHandle) throws OperationException {<NEW_LINE>final CompositeProgress composite = new CompositeProgress(new ProgressHandleAdapter(progressHandle));<NEW_LINE>final Progress logicProgress = new Progress();<NEW_LINE>final Progress ... | composite.addChild(installProgress, 30); |
147,674 | private void resetTabInfo() {<NEW_LINE>if (this.m_lookup == null)<NEW_LINE>return;<NEW_LINE>//<NEW_LINE>// fully qualified name<NEW_LINE>String col = m_lookup.getColumnName();<NEW_LINE>if (col.indexOf('.') != -1)<NEW_LINE>col = col.substring(col.indexOf('.') + 1);<NEW_LINE>// TODO : hard-coded<NEW_LINE>final String[] i... | "M_Product_ID", "M_AttributeSetInstance_ID", "M_Locator_ID", "M_Lookup_ID" }; |
1,496,046 | public String dump() {<NEW_LINE>StringBuilder reply = new StringBuilder();<NEW_LINE>reply.append("\nConfiguration:");<NEW_LINE>reply.append(" class='").append(this.getClass()).append("'");<NEW_LINE>reply.append(" name='").append(this.getName()).append("'");<NEW_LINE>reply.append(" hashcode='").append(this.hashCode()... | ("\n ").append(d); |
1,460,014 | protected static String digest(@Sensitive String input, String algorithm, String charset) {<NEW_LINE>MessageDigest md;<NEW_LINE>String output = null;<NEW_LINE>if (input != null && input.length() > 0) {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>md.update(input.getBytes(charset));<NEW_LINE>output = Base64Coder.toString(Bas... | md = MessageDigest.getInstance(algorithm); |
1,525,741 | private String buildStr(List<ReplaceInfo> fieldList, Map<String, Object> refData) {<NEW_LINE>if (CollectionUtils.isEmpty(fieldList)) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>StringBuilder sb = new StringBuilder("");<NEW_LINE>for (ReplaceInfo replaceInfo : fieldList) {<NEW_LINE>if (replaceInfo.getType() == EReplaceType... | getSubReplaceInfos(), refData))); |
1,572,078 | public GenericTableColumn createTableColumnImpl(@NotNull DBRProgressMonitor monitor, JDBCResultSet dbResult, @NotNull GenericTableBase table, String columnName, String typeName, int valueType, int sourceType, int ordinalPos, long columnSize, long charLength, Integer scale, Integer precision, int radix, boolean notNull,... | remarks, defaultValue, autoIncrement, autoGenerated); |
796,928 | public void closeElement(String element, HashMap<String, String> attributes, String content, WarningSet warnings) throws SAXException {<NEW_LINE>super.closeElement(element, attributes, content, warnings);<NEW_LINE>try {<NEW_LINE>if (RocksimCommonConstants.LEN.equals(element)) {<NEW_LINE>mass.setLength(Double.parseDoubl... | element + " value of " + content + ". It is expected to be a number."); |
1,049,910 | Mono<Response<CopyStatusType>> copyIncrementalWithResponse(PageBlobCopyIncrementalOptions options, Context context) {<NEW_LINE><MASK><NEW_LINE>UrlBuilder builder = UrlBuilder.parse(options.getSource());<NEW_LINE>builder.setQueryParameter(Constants.UrlConstants.SNAPSHOT_QUERY_PARAMETER, options.getSnapshot());<NEW_LINE>... | StorageImplUtils.assertNotNull("options", options); |
640,990 | private static Vector combineServerIntLongRowSplits(List<ServerRow> rowSplits, MatrixMeta matrixMeta, int rowIndex) {<NEW_LINE>int colNum = (int) matrixMeta.getColNum();<NEW_LINE>int elemNum = 0;<NEW_LINE>int size = rowSplits.size();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>elemNum += rowSplits.get(i).size();... | setMatrixId(matrixMeta.getId()); |
11,784 | public void initialize(URL location, ResourceBundle resources) {<NEW_LINE>// cellvaluefactory<NEW_LINE>checkedColumn.setCellValueFactory(new PropertyValueFactory<>("checked"));<NEW_LINE>columnNameColumn.setCellValueFactory(new PropertyValueFactory<>("columnName"));<NEW_LINE>jdbcTypeColumn.setCellValueFactory(new Proper... | setCellFactory(TextFieldTableCell.forTableColumn()); |
630,304 | public Sentence visitBinarySentence(ComplexSentence s, Object arg) {<NEW_LINE>Sentence result;<NEW_LINE>if (s.isOrSentence()) {<NEW_LINE>Sentence s1 = s.getSimplerSentence(0).accept(this, arg);<NEW_LINE>Sentence s2 = s.getSimplerSentence(1).accept(this, arg);<NEW_LINE>if (s1.isAndSentence() || s2.isAndSentence()) {<NEW... | ).accept(this, null); |
396,096 | private Mono<PagedResponse<EventSubscriptionInner>> listSinglePageAsync(String resourceGroupName, String topicName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LI... | error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); |
1,672,065 | private long scanThroughBytesAndDoSomething(long numToScan, Doer doer) throws IOException {<NEW_LINE>long numScanned = 0;<NEW_LINE>long numPulled = 0;<NEW_LINE>while (numToScan > numScanned) {<NEW_LINE>if (currIndex >= curr.length) {<NEW_LINE>synchronized (singleByteReaderDoer) {<NEW_LINE>if (bytes.isEmpty()) {<NEW_LIN... | length - currIndex, numToScan - numScanned); |
687,829 | private static void checkMethods(Deobfuscator deobfuscator, ClassNode cls, JadxArgs args) {<NEW_LINE>List<MethodNode> methods = new ArrayList<>(cls.getMethods().size());<NEW_LINE>for (MethodNode method : cls.getMethods()) {<NEW_LINE>if (!method.getAccessFlags().isConstructor()) {<NEW_LINE>methods.add(method);<NEW_LINE>... | && !NameMapper.isAllCharsPrintable(alias); |
177,789 | private Resource<Bitmap> decode(ImageReader imageReader, int requestedWidth, int requestedHeight, Options options, DecodeCallbacks callbacks) throws IOException {<NEW_LINE>byte[] bytesForOptions = byteArrayPool.get(ArrayPool.STANDARD_BUFFER_SIZE_BYTES, byte[].class);<NEW_LINE><MASK><NEW_LINE>bitmapFactoryOptions.inTemp... | BitmapFactory.Options bitmapFactoryOptions = getDefaultOptions(); |
1,513,025 | // flush ////////////////////////////////////////////////////////////////////<NEW_LINE>@Override<NEW_LINE>public void flush() {<NEW_LINE>List<DeleteOperation> removedOperations = removeUnnecessaryOperations();<NEW_LINE>flushDeserializedObjects();<NEW_LINE>List<PersistentObject> updatedObjects = getUpdatedObjects();<NEW... | LOGGER.debug("{}", deleteOperation); |
1,215,920 | public void visitMatrixReport(MatrixReport matrixReport) {<NEW_LINE>Map<String, Matrix> matrixs = matrixReport.getMatrixs();<NEW_LINE>Collection<Matrix> matrix = matrixs.values();<NEW_LINE>int size = matrix.size();<NEW_LINE>if (size > m_maxSize) {<NEW_LINE>List<Matrix> matrixList = new ArrayList<Matrix>(matrix);<NEW_LI... | temp = matrixList.get(i); |
298,537 | public static DescribeInstancesResponse unmarshall(DescribeInstancesResponse describeInstancesResponse, UnmarshallerContext context) {<NEW_LINE>describeInstancesResponse.setRequestId<MASK><NEW_LINE>describeInstancesResponse.setTotalCount(context.integerValue("DescribeInstancesResponse.TotalCount"));<NEW_LINE>List<Insta... | (context.stringValue("DescribeInstancesResponse.RequestId")); |
400,317 | private void copyResources(File resourcesDirectory) throws IOException {<NEW_LINE>// Unzip res.zip into resources directory<NEW_LINE>InputStream inputStream = getClass().getResourceAsStream("res.zip");<NEW_LINE>ZipInputStream zipInputStream = new ZipInputStream(inputStream);<NEW_LINE>try {<NEW_LINE>ZipEntry zipEntry = ... | int b = zipInputStream.read(); |
220,277 | public HttpResponse testGroupParametersForHttpResponse(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Map<String, Object> params) throws IOException {<NEW_LINE>// verify the required parameter 'requiredStringGroup' is set<NEW_LINE>if (requiredStringGroup == null) {<NEW_LINE>throw ne... | String key = entry.getKey(); |
1,002,957 | protected void extractFile(Path sgmFile) throws IOException {<NEW_LINE>try (BufferedReader reader = Files.newBufferedReader(sgmFile, StandardCharsets.ISO_8859_1)) {<NEW_LINE>StringBuilder buffer = new StringBuilder(1024);<NEW_LINE>StringBuilder outBuffer = new StringBuilder(1024);<NEW_LINE>String line = null;<NEW_LINE>... | i], META_CHARS[i]); |
325,969 | public void add(final Cpe cpe) {<NEW_LINE>final Document doc = new Document();<NEW_LINE>addField(doc, IndexConstants.CPE_UUID, cpe.getUuid().toString(), Field.Store.YES, false);<NEW_LINE>addField(doc, IndexConstants.CPE_22, cpe.getCpe22(), Field.Store.YES, true);<NEW_LINE>addField(doc, IndexConstants.CPE_23, cpe.getCpe... | LOGGER.error("An error occurred while adding a CPE to the index", e); |
991,013 | protected void toThrift(TPlanNode msg, TPlanNodeType nodeType) {<NEW_LINE>Preconditions.checkState(materializedResultExprLists_.size() == children.size());<NEW_LINE>List<List<TExpr>> texprLists = Lists.newArrayList();<NEW_LINE>for (List<Expr> exprList : materializedResultExprLists_) {<NEW_LINE>texprLists.add<MASK><NEW_... | (Expr.treesToThrift(exprList)); |
273,336 | private void glomProcessingErrors(Writer writer, List<Report.ProcessingError> errors) throws IOException {<NEW_LINE>if (errors.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>writer.write("<hr/>");<NEW_LINE>writer.write("<center><h3>Processing errors</h3></center>");<NEW_LINE>writer.write("<table align=\"center\" cel... | write(buf.toString()); |
349,098 | public void customTypeDeclared() {<NEW_LINE>// START SNIPPET: customTypeClientDeclared<NEW_LINE><MASK><NEW_LINE>// Instruct the context that if it receives a resource which<NEW_LINE>// claims to conform to the given profile (by URL), it should<NEW_LINE>// use the MyPatient type to parse this resource<NEW_LINE>ctx.setDe... | FhirContext ctx = FhirContext.forDstu3(); |
1,153,661 | public Description matchCatch(CatchTree tree, VisitorState state) {<NEW_LINE>if (isSuppressed(tree.getParameter())) {<NEW_LINE>return Description.NO_MATCH;<NEW_LINE>}<NEW_LINE>List<? extends StatementTree> statements = tree<MASK><NEW_LINE>if (statements.size() != 1) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>State... | .getBlock().getStatements(); |
699,974 | default <R1, R2, R> ImmutableQueue<R> forEach3(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, Function3<? super T, ? super R1, ? super R2, Boolean> filterFunction, Function3<? super T, ? super R1, ? super R2, ? extends R> yieldingFunction) {<N... | .apply(in, ina)); |
253,522 | private void restartExecutableFlow(final ExecutableFlow exFlow) {<NEW_LINE>// Enable restartability for containerized execution<NEW_LINE>if (exFlow.getDispatchMethod() != DispatchMethod.CONTAINERIZED)<NEW_LINE>return;<NEW_LINE>// Create a new ExecutableFlow based on existing flow in EXECUTION_STOPPED state<NEW_LINE>fin... | setSuccessEmails(flow.getSuccessEmails()); |
71,908 | public static Builder onePercentError(int maxCardinality) {<NEW_LINE>if (maxCardinality <= 0) {<NEW_LINE>throw new IllegalArgumentException("maxCardinality (" + maxCardinality + ") must be a positive integer");<NEW_LINE>}<NEW_LINE>int length = -1;<NEW_LINE>if (maxCardinality < 100) {<NEW_LINE>length = onePercentErrorLe... | Math.pow(10, logscale); |
926,040 | public void listIncidentRootCausesWithIncident() {<NEW_LINE>// BEGIN: com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentRootCauses#AnomalyIncident<NEW_LINE>final String detectionConfigurationId = "c0f2539f-b804-4ab9-a70f-0da0c89c76d8";<NEW_LINE>final OffsetDateTime startTime = OffsetDateTime.parse("2020-01-0... | getSeriesKey().asMap()); |
1,272,692 | public synchronized void updated(Dictionary properties) throws ConfigurationException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())<NEW_LINE>Tr.event(tc, "properties updated " + properties);<NEW_LINE>Map<String, Object> newMap = null;<NEW_LINE>if (properties != null) {<NEW_LINE>if (propert... | > keys = properties.keys(); |
1,709,735 | private void saveTslintError(SensorContext context, TslintError tslintError) {<NEW_LINE>String tslintKey = tslintError.ruleName;<NEW_LINE>InputFile inputFile = getInputFile(context, tslintError.name);<NEW_LINE>if (inputFile == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TextRange location = getLocation(tslintError, in... | TextPointer start = location.start(); |
1,334,090 | final ListLicensesResult executeListLicenses(ListLicensesRequest listLicensesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listLicensesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
479,770 | public void mousePressed(MouseEvent e) {<NEW_LINE>ZonePoint zp = getPoint(e);<NEW_LINE>if (SwingUtilities.isLeftMouseButton(e)) {<NEW_LINE>if (rectangle == null) {<NEW_LINE>rectangle = new Rectangle(zp.x, zp.y, zp.x, zp.y);<NEW_LINE>} else {<NEW_LINE>rectangle.getEndPoint().x = zp.x;<NEW_LINE>rectangle.getEndPoint().y ... | getZone().getTopologyTypes()); |
501,667 | public void deployResource(Object resource, String applicationName, String moduleName) throws Exception {<NEW_LINE>ManagedThreadFactory ManagedThreadFactoryRes = (ManagedThreadFactory) resource;<NEW_LINE>if (ManagedThreadFactoryRes == null) {<NEW_LINE>_logger.log(Level.WARNING, LogFacade.DEPLOY_ERROR_NULL_CONFIG, "Mana... | publishObject(resourceInfo, ref, true); |
1,315,653 | public ResponseEntity<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws RestClientException {<NEW_LINE>Object postBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required ... | String[] contentTypes = { "application/json" }; |
624,090 | public static NormalizedDiffStat normalizeDiffStat(final int segments, final int insertions, final int deletions) {<NEW_LINE>final int total = insertions + deletions;<NEW_LINE>final float fi = ((float) insertions) / total;<NEW_LINE>int si;<NEW_LINE>int sd;<NEW_LINE>int sb;<NEW_LINE>if (deletions == 0) {<NEW_LINE>// onl... | Math.min(deletions, segments); |
546,034 | private static Context createContext(Editor editor, int offset) {<NEW_LINE>Project project = Objects.requireNonNull(editor.getProject());<NEW_LINE>HighlightInfo info = null;<NEW_LINE>if (!Registry.is("ide.disable.editor.tooltips")) {<NEW_LINE>info = ((DaemonCodeAnalyzerImpl) DaemonCodeAnalyzer.getInstance(project)).fin... | getPsiFile(editor.getDocument()); |
550,199 | static void addHandlerAfterReactorCodecs(Connection context, String name, ChannelHandler handler) {<NEW_LINE>Objects.requireNonNull(name, "name");<NEW_LINE>Objects.requireNonNull(handler, "handler");<NEW_LINE>Channel channel = context.channel();<NEW_LINE>boolean exists = channel.pipeline().get(name) != null;<NEW_LINE>i... | addAfter(after, name, handler); |
728,613 | public ParseArgs invoke() {<NEW_LINE>OptionGroup optionsGroup = new OptionGroup();<NEW_LINE>optionsGroup.setRequired(true);<NEW_LINE>Option dbTypeOption = new Option("dbType", "dbType", true, "Database Type");<NEW_LINE>optionsGroup.addOption(dbTypeOption);<NEW_LINE>Options commandLineOptions = new Options();<NEW_LINE>c... | getOptionValue(dbTypeOption.getOpt()); |
355,920 | private void initOnReturnAdvice(PointcutClass adviceClass, PointcutMethod adviceMethod) throws AdviceConstructionException {<NEW_LINE>checkState(!hasOnReturnAdvice, "@Pointcut '" + adviceClass.type(<MASK><NEW_LINE>Method asmMethod = adviceMethod.toAsmMethod();<NEW_LINE>List<AdviceParameter> parameters = getAdviceParame... | ).getClassName() + "' has more than one @OnReturn method"); |
869,220 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE><MASK><NEW_LINE>final Demo demo = getDemo();<NEW_LINE>Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);<NEW_LINE>toolbar.setTitle(demo.titleResId);<NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>getSupportA... | setContentView(R.layout.activity_demo_tab_with_notification_mark); |
306,362 | public void generateVarStore(MethodVisitor mv, BIRNode.BIRVariableDcl varDcl, int valueIndex) {<NEW_LINE>BType bType = JvmCodeGenUtil.getReferredType(varDcl.type);<NEW_LINE>if (varDcl.kind == VarKind.GLOBAL) {<NEW_LINE>String varName = varDcl.name.value;<NEW_LINE>PackageID moduleId = ((<MASK><NEW_LINE>String pkgName = ... | BIRNode.BIRGlobalVariableDcl) varDcl).pkgId; |
149,541 | private ASTNode failedToBindStubToAst(@Nonnull PsiFileImpl file, @Nonnull final FileElement fileElement) {<NEW_LINE><MASK><NEW_LINE>StubTree stubTree = file.getStubTree();<NEW_LINE>final String stubString = stubTree != null ? ((PsiFileStubImpl) stubTree.getRoot()).printTree() : null;<NEW_LINE>final String astString = R... | VirtualFile vFile = file.getVirtualFile(); |
959,144 | private void calculateXForward() {<NEW_LINE>String forwardedSsl = delegate.getHeader(X_FORWARDED_SSL);<NEW_LINE>boolean isForwardedSslOn = forwardedSsl != null && forwardedSsl.equalsIgnoreCase("on");<NEW_LINE>String protocolHeader = delegate.getHeader(X_FORWARDED_PROTO);<NEW_LINE>if (protocolHeader != null) {<NEW_LINE>... | hostHeader = delegate.getHeader(X_FORWARDED_HOST); |
568,755 | public void run() {<NEW_LINE>AntProjectHelper helper = project.getAntProjectHelper();<NEW_LINE>EditableProperties projectProps = <MASK><NEW_LINE>String jarName = projectProps.get(AppClientProjectProperties.JAR_NAME);<NEW_LINE>String oldName = jarName.substring(0, jarName.length() - 4);<NEW_LINE>if (jarName.endsWith(".j... | helper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH); |
56,800 | private void determineGoBinaryAndVersion() {<NEW_LINE>if (IGNORE_LOCAL.equals(setting.getGoExecutable())) {<NEW_LINE>fetchGoDistribution();<NEW_LINE>} else if ("go".equals(setting.getGoExecutable())) {<NEW_LINE>Optional<Pair<Path, String>> binPathAndVersionOnHost = findGoBinAndVersionHost();<NEW_LINE>if (binPathAndVers... | String>> pathAndVersion = tryGivenGoExecutable(); |
1,333,961 | private Optional<Submission> loadBaseCode(Set<File> rootDirectories, Map<File, Submission> foundSubmissions) throws ExitException {<NEW_LINE>// Extract the basecode submission if necessary.<NEW_LINE>Optional<Submission> baseCodeSubmission = Optional.empty();<NEW_LINE>if (options.hasBaseCode()) {<NEW_LINE>String baseCod... | loadBaseCodeViaName(baseCodeName, rootDirectory, foundSubmissions); |
849,813 | protected final <T> IQuery<T> createQuery(final QueryBuildContext<T> queryBuildCtx, final ISqlQueryFilter sqlFilters, final IQueryFilter<T> nonSqlFilters) {<NEW_LINE>final Properties ctx = queryBuildCtx.getCtx();<NEW_LINE>final String sqlWhereClause;<NEW_LINE>final List<Object> sqlParams;<NEW_LINE>if (sqlFilters != nul... | > modelClass = queryBuildCtx.getModelClass(); |
1,269,335 | public List<Integer> fillModelInput(int batchIdx, boolean isTrainMode) {<NEW_LINE>imageBuffer.clear();<NEW_LINE>labelIdBuffer.clear();<NEW_LINE>if ((batchIdx + 1) * imageSize * Float.BYTES - 1 >= imageArray.length) {<NEW_LINE>logger.severe<MASK><NEW_LINE>return new ArrayList<>();<NEW_LINE>}<NEW_LINE>List<Integer> predi... | (Common.addTag("fill model image input failed")); |
1,405,439 | private void grantPermissions(TopicName topicUri, String role, Set<AuthAction> actions) {<NEW_LINE>try {<NEW_LINE>AuthorizationService authService = pulsar()<MASK><NEW_LINE>if (null != authService) {<NEW_LINE>authService.grantPermissionAsync(topicUri, actions, role, null).get();<NEW_LINE>} else {<NEW_LINE>throw new Res... | .getBrokerService().getAuthorizationService(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.