idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
964,630 | // Returns a consistent hash for the given symbol across separate compilations and JVM instances.<NEW_LINE>private int hashSymbol(Symbol sym) {<NEW_LINE>// This method is necessary because Symbol, and most other javac internals, do not overload the<NEW_LINE>// Object#hashCode() method and the default implementation, Sy... | toString().hashCode()); |
1,723,450 | public void marshall(ApplicationComponent applicationComponent, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (applicationComponent == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(applicationComponent.get... | e.getMessage(), e); |
764,019 | private List<Wo> list(Business business, Wi wi) throws Exception {<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>List<Unit> os = business.unit().pick(wi.getUnitList());<NEW_LINE>List<String> unitIds = new ArrayList<>();<NEW_LINE>for (Unit o : os) {<NEW_LINE>unitIds.addAll(business.unit().listSubDirect(o.getId()))... | .getId(), 0L)); |
251,779 | public String format(String pattern) {<NEW_LINE>boolean unitPlaceholder = pattern.contains(UnitUtils.UNIT_PLACEHOLDER);<NEW_LINE>final String formatPattern;<NEW_LINE>if (unitPlaceholder) {<NEW_LINE>String unitSymbol = getUnit().equals(Units.PERCENT) ? "%%" : getUnit().toString();<NEW_LINE>formatPattern = pattern.replac... | .MILLI(Units.SECOND)); |
1,214,630 | private static Collection<SourceLineAnnotation> countWarnings(Collection<BugInstance> warnings, @CheckForNull String bugCode, int desiredPriority, int rank) {<NEW_LINE>Collection<SourceLineAnnotation> matching = new HashSet<SourceLineAnnotation>();<NEW_LINE>DetectorFactoryCollection i18n = DetectorFactoryCollection.ins... | BugPattern pattern = warning.getBugPattern(); |
186,138 | public Collection<? extends DomainConfigurationProblem> validateFieldMetadata(TransientFieldMetadata fieldMetadata, Class<?> domainType, DomainConfigurationValidationContext validationContext) {<NEW_LINE>final String propertyPath = fieldMetadata.getProperty();<NEW_LINE>if (isBlank(propertyPath)) {<NEW_LINE>return newAr... | String> properties = properties(propertyPath); |
124,193 | public void run(RegressionEnvironment env) {<NEW_LINE>String text = "@name('s0') select * from SupportBean(2*intBoxed=doubleBoxed)";<NEW_LINE>env.compileDeployAddListenerMile(text, "s0", 0);<NEW_LINE><MASK><NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendBeanIntDouble(env, 25, 50d);<NEW_LINE>env.assertListene... | sendBeanIntDouble(env, 20, 50d); |
1,828,856 | private void checkAndSyncLog4jXML() {<NEW_LINE>int sizeInDB = LogGlobalConfig.LOG_DELETE_ACCUMULATED_FILE_SIZE.value(Integer.class);<NEW_LINE>int dayInDB = LogGlobalConfig.LOG_DELETE_LAST_MODIFIED.value(Integer.class);<NEW_LINE>boolean needSync = false;<NEW_LINE>try {<NEW_LINE>Log4jXMLModifier log4jXMLModifier = new Lo... | flag = log4jXMLModifier.isLogRetentionSizeExpected(sizeInDB); |
550,495 | final ModifyVpcAttributeResult executeModifyVpcAttribute(ModifyVpcAttributeRequest modifyVpcAttributeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyVpcAttributeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | ModifyVpcAttributeResult>(new ModifyVpcAttributeResultStaxUnmarshaller()); |
452,067 | private int generateAnnotationDefaultAttribute(AnnotationMethodDeclaration declaration, int attributeOffset) {<NEW_LINE>int attributesNumber = 0;<NEW_LINE>// add an annotation default attribute<NEW_LINE>int annotationDefaultNameIndex = this.constantPool.literalIndex(AttributeNamesConstants.AnnotationDefaultName);<NEW_L... | declaration.binding.returnType, attributeOffset); |
1,483,630 | private void addSyntheticRecordOverrideMethods(TypeDeclaration typeDecl, SyntheticMethodBinding methodBinding, int purpose) {<NEW_LINE>if (this.bootstrapMethods == null)<NEW_LINE>this.bootstrapMethods <MASK><NEW_LINE>if (!this.bootstrapMethods.contains(typeDecl))<NEW_LINE>this.bootstrapMethods.add(typeDecl);<NEW_LINE>i... | = new ArrayList<>(3); |
1,412,369 | public void requestWillBeSent(InspectorRequest request) {<NEW_LINE>NetworkPeerManager peerManager = getPeerManagerIfEnabled();<NEW_LINE>if (peerManager != null) {<NEW_LINE>Network.Request requestJSON = new Network.Request();<NEW_LINE>requestJSON.url = request.url();<NEW_LINE>requestJSON.method = request.method();<NEW_L... | .type = Page.ResourceType.OTHER; |
54,632 | private static synchronized void validate(Type type) {<NEW_LINE><MASK><NEW_LINE>UniversalName universalName = type.getUniversalName();<NEW_LINE>if (exist(universalName) && hashMap.get(universalName.getHashBytes()).getClazz() != clazz) {<NEW_LINE>String msg = "Universal name already registered with another class " + has... | Class clazz = type.getClazz(); |
589,301 | public String createParameterStringForSignature(Map<String, String> parameters) {<NEW_LINE>if (parameters == null) {<NEW_LINE>if (tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Null parameters object provided; returning empty string");<NEW_LINE>}<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>Map<String, String> encodedParams ... | = new ArrayList<String>(); |
810,353 | public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {<NEW_LINE>// Do not continue if proxy was released.<NEW_LINE>if (this.proxy == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Create date object from selected hour and minute values.<NEW_LINE>Calendar calendar = Calendar.getInstance();<NEW_LINE>cal... | set(Calendar.SECOND, 0); |
236,960 | private <B> Collection<BeanRegistration<B>> resolveBeanRegistrationsWithGenericsFromArgument(BeanResolutionContext resolutionContext, Argument<?> argument, BeanResolutionContext.Path path, BiFunction<Argument<B>, Qualifier<B>, Collection<BeanRegistration<B>>> beanResolver) {<NEW_LINE>try {<NEW_LINE>final Supplier<Depen... | getFirstTypeVariable().orElseThrow(errorSupplier); |
154,633 | public void doExecute() throws SQLException {<NEW_LINE>Set<String> existing = JdbcUtils.getForeignKeys(getConnectionProperties(), myForeignTableName, getTableName());<NEW_LINE>if (existing.contains(myConstraintName)) {<NEW_LINE>logInfo(ourLog, "Already have constraint named {} - No action performed", myConstraintName);... | ourLog.warn("Index {} already exists", myConstraintName); |
1,028,724 | private void connect() {<NEW_LINE>String endpoint = "wss://" + connection.getEndpoint().replace(":80", "") + "?v=" + Javacord.DISCORD_VOICE_GATEWAY_VERSION;<NEW_LINE>logger.debug("Trying to connect to websocket {}", endpoint);<NEW_LINE>WebSocketFactory factory = new WebSocketFactory();<NEW_LINE>try {<NEW_LINE>factory.s... | (reconnectAttempt.get())); |
779,780 | private void addRelated(Object parent, Map<String, Object> pageModel) {<NEW_LINE>final Node<?> <MASK><NEW_LINE>Map<String, ResourceSchema> relatedResources;<NEW_LINE>Map<String, NamedDataSchema> relatedSchemas;<NEW_LINE>synchronized (this) {<NEW_LINE>relatedResources = _relatedResourceCache.get(parent);<NEW_LINE>if (re... | node = _relationships.getRelationships(parent); |
822,572 | public static void main(String[] args) {<NEW_LINE>Scanner scan = new Scanner(System.in);<NEW_LINE>System.out.print("Enter 1 for encrypting and 2 for decrypting : ");<NEW_LINE>char option = scan.nextLine().charAt(0);<NEW_LINE>if (option == '1') {<NEW_LINE>System.out.print("Enter the key : ");<NEW_LINE>// we take the key... | String key = scan.nextLine(); |
68,196 | private String serializeAutomaticKeywordGroup(AutomaticKeywordGroup group) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(MetadataSerializationConfiguration.AUTOMATIC_KEYWORD_GROUP_ID);<NEW_LINE>appendAutomaticGroupDetails(sb, group);<NEW_LINE>sb.append(StringUtil.quote(group.getField().getName()... | .GROUP_UNIT_SEPARATOR, MetadataSerializationConfiguration.GROUP_QUOTE_CHAR)); |
399,627 | public static void delete(final RendererConfiguration r, int delay) {<NEW_LINE>r.setActive(false);<NEW_LINE>// Using javax.swing.Timer because of gui (this works in headless mode too).<NEW_LINE>javax.swing.Timer t = new javax.swing.Timer(delay, new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void ac... | getInstance().removeRenderer(r); |
702,071 | public static int mul33DWordAdd(int x, long y, int[] z, int zOff) {<NEW_LINE>// assert x >>> 31 == 0;<NEW_LINE>// assert zOff <= 0;<NEW_LINE>long c = 0, xVal = x & M;<NEW_LINE>long y00 = y & M;<NEW_LINE>c += xVal * y00 + (z[zOff + 0] & M);<NEW_LINE>z[zOff + 0] = (int) c;<NEW_LINE>c >>>= 32;<NEW_LINE>long y01 = y >>> 32... | [zOff + 1] & M); |
1,671,943 | private AgendaItem buildAgendaItemFromCursor(final Cursor cursor, int cursorPosition, boolean isDayHeader) {<NEW_LINE>if (cursorPosition <= -1) {<NEW_LINE>cursor.moveToFirst();<NEW_LINE>} else {<NEW_LINE>cursor.moveToPosition(cursorPosition);<NEW_LINE>}<NEW_LINE>AgendaItem agendaItem = new AgendaItem();<NEW_LINE>agenda... | Time time = new Time(mTimeZone); |
1,108,869 | public void deployFromAssets(File dest) throws IOException {<NEW_LINE>Context ctx = softContext.get();<NEW_LINE>if (ctx != null) {<NEW_LINE>ArrayList<String> paths = new ArrayList<>();<NEW_LINE>AssetManager am = ctx.getAssets();<NEW_LINE>walkAssets(am, "", paths);<NEW_LINE>// Delete all files and subdirectories under g... | File f = new File(path); |
181,851 | public void change(Database database, DatabaseSession databaseSession) throws BimserverDatabaseException {<NEW_LINE>boolean transactional = !(ePackage == Ifc2x3tc1Package.eINSTANCE || ePackage == Ifc4Package.eINSTANCE || ePackage == GeometryPackage.eINSTANCE);<NEW_LINE>LOGGER.debug("Creating " + eClasses.size() + " " +... | createTable(eClass, databaseSession, transactional); |
1,588,998 | private void download(final DataRegion pDataRegion) {<NEW_LINE>final String key = pDataRegion.getISO3166();<NEW_LINE>if (mMapSnapshots.get(key) != null) {<NEW_LINE>// pending<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final double zoom = mTileSystem.getBoundingBoxZoom(pDataRegion.getBox(), mMapSize - 2 * mBorderSize, mMapSiz... | , true, 0, 0)); |
296,194 | public Object createObject(Attributes atts) {<NEW_LINE>JRDesignBand band = new JRDesignBand();<NEW_LINE>String height = atts.getValue(JRXmlConstants.ATTRIBUTE_height);<NEW_LINE>if (height != null && height.length() > 0) {<NEW_LINE>band.setHeight(Integer.parseInt(height));<NEW_LINE>}<NEW_LINE>String isSplitAllowed = att... | band.setSplitType(SplitTypeEnum.STRETCH); |
243,734 | public void processRecord(final TypedRecord<DeploymentRecord> command, final TypedResponseWriter responseWriter, final TypedStreamWriter streamWriter, final Consumer<SideEffectProducer> sideEffect) {<NEW_LINE>// need to add multiple side-effects for sending a response and scheduling timers<NEW_LINE>sideEffects.add(resp... | messageStartEventSubscriptionManager.tryReOpenMessageStartEventSubscription(deploymentEvent, stateWriter); |
85,253 | private JPanel createLookAndFeelPanel() {<NEW_LINE>// Initialises the theme panel.<NEW_LINE>// Look and feel panel.<NEW_LINE>JPanel lfPanel = new YBoxPanel();<NEW_LINE>lfPanel.setAlignmentX(LEFT_ALIGNMENT);<NEW_LINE>lfPanel.setBorder(BorderFactory.createTitledBorder(Translator.get("prefs_dialog.look_and_feel")));<NEW_L... | get("setup.look_and_feel") + ':')); |
1,689,931 | public Iterator<T> iterator() {<NEW_LINE>Iterator<T> it = new Iterator<T>() {<NEW_LINE><NEW_LINE>private Iterator<T> keySetIterator = new TreeSet<>(valueCounts.keySet()).iterator();<NEW_LINE><NEW_LINE>private T currentKey = valueCounts.isEmpty() <MASK><NEW_LINE><NEW_LINE>private int currentValueIndex = 0;<NEW_LINE><NEW... | ? null : keySetIterator.next(); |
610,634 | protected void initLayout() {<NEW_LINE>ThemeConstants theme = App.getInstance().getThemeConstants();<NEW_LINE>VerticalLayout root = new VerticalLayout();<NEW_LINE>root.setWidthUndefined();<NEW_LINE>root.setSpacing(true);<NEW_LINE>root.setMargin(false);<NEW_LINE>setContent(root);<NEW_LINE>messages = AppBeans.get(Message... | (messages.getMainMessage("PresentationsEditor.autoSave")); |
1,716,489 | public ByteBuffer transcodeFrame(ByteBuffer src, ByteBuffer dst) throws IOException {<NEW_LINE>if (src == null)<NEW_LINE>return null;<NEW_LINE>Picture decoded = decoder.decodeFrame(src, pic0.getData());<NEW_LINE>if (pic1 == null) {<NEW_LINE>pic1 = Picture.create(decoded.getWidth(), decoded.getHeight(), encoder.getSuppo... | encoder.encodeFrame(pic1, dst); |
1,579,761 | protected <S extends StylingString> S format(Widget widget, Object element, S string) {<NEW_LINE>if (element instanceof Group) {<NEW_LINE>Group group = (Group) element;<NEW_LINE>string.append(trimGroupString(group.name), string.defaultStyle());<NEW_LINE>string.append(" " + group.group.getItemsCount(), string.structureS... | ), string.linkStyle()); |
1,003,933 | protected void onLayout(boolean changed, int left, int top, int right, int bottom) {<NEW_LINE>super.onLayout(changed, left, top, right, bottom);<NEW_LINE>int CONTAINER_LEFT = 0;<NEW_LINE>int CONTAINER_TOP = 0;<NEW_LINE>int CONTAINER_RIGHT = getMeasuredWidth();<NEW_LINE>int CONTAINER_BOTTOM = getMeasuredHeight();<NEW_LI... | actionBarTop = CONTAINER_BOTTOM - getDesiredHeight(actionBarChild); |
19,367 | public void draw(Canvas canvas, Matrix parentMatrix, int parentAlpha) {<NEW_LINE>if (hidden) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>L.beginSection("FillContent#draw");<NEW_LINE>int color = ((ColorKeyframeAnimation) this.colorAnimation).getIntValue();<NEW_LINE>int alpha = (int) ((parentAlpha / 255f * opacityAnimation.ge... | () / 100f) * 255); |
124,639 | public boolean process(final I_ESR_ImportLine line, final String message) {<NEW_LINE>Check.assumeNotNull(line.getESR_Payment_Action(), "@" + ESRConstants.ERR_ESR_LINE_WITH_NO_PAYMENT_ACTION + "@");<NEW_LINE>// 08500: allocate when process<NEW_LINE>final <MASK><NEW_LINE>final PaymentId paymentId = PaymentId.ofRepoIdOrNu... | I_C_Invoice invoice = line.getC_Invoice(); |
741,735 | public static void main(String[] args) throws PcapNativeException, NotOpenException {<NEW_LINE>String filter = args.length != 0 ? args[0] : "";<NEW_LINE>System.out.println(COUNT_KEY + ": " + COUNT);<NEW_LINE>System.out.println(READ_TIMEOUT_KEY + ": " + READ_TIMEOUT);<NEW_LINE>System.out.<MASK><NEW_LINE>System.out.print... | println(SNAPLEN_KEY + ": " + SNAPLEN); |
1,341,550 | /*<NEW_LINE>*<NEW_LINE>*/<NEW_LINE>void configureConversationView(SocialNetConstant.Type socialNetType, String currentAccountKey) {<NEW_LINE>insertConversationView();<NEW_LINE>if (mConversationExpanded) {<NEW_LINE>mConversationView.setVisibility(VISIBLE);<NEW_LINE>int drawable = AppSettings.get().getCurrentTheme() == A... | onConversationViewToggle(mTwitterStatus.mId, mConversationExpanded); |
102,782 | static <X> TimeoutSubscriber<X> newInstance(TimeoutPublisher<X> parent, Subscriber<? super X> target, ContextMap contextMap, AsyncContextProvider contextProvider) {<NEW_LINE>TimeoutSubscriber<X> s = new TimeoutSubscriber<>(parent, target, contextProvider);<NEW_LINE>try {<NEW_LINE>s.lastStartNS = <MASK><NEW_LINE>// CAS ... | parent.timeoutExecutor.currentTime(NANOSECONDS); |
1,084,360 | // This method would upload the provided key file to the provider key file path.<NEW_LINE>public AccessKey uploadKeyFile(UUID regionUUID, File uploadedFile, String keyCode, KeyType keyType, String sshUser, Integer sshPort, boolean airGapInstall, boolean skipProvisioning, boolean setUpChrony, List<String> ntpServers, bo... | get(uploadedFile.getAbsolutePath()); |
543,492 | public static ResourceTableChunk providesResourceTableChunk(@Nullable /*@ApkPath*/<NEW_LINE>File apk) throws IOException {<NEW_LINE>Preconditions.checkNotNull(apk, "APK is required. Did you forget --apk=/my/app.apk?");<NEW_LINE>byte[] resourceBytes = getFile(apk, "resources.arsc");<NEW_LINE>if (resourceBytes == null) {... | new Object[] { "resources.arsc" }); |
1,229,535 | private static // BEGIN: readme-sample-buildPipelineTopology<NEW_LINE>PipelineTopology buildPipeLineTopology() {<NEW_LINE>IotHubMessageSource msgSource = new IotHubMessageSource("iotMsgSource").setHubInputName("${hubSourceInput}");<NEW_LINE>UsernamePasswordCredentials creds = new UsernamePasswordCredentials("${rtspUser... | ParameterDeclaration("hubSinkOutputName", ParameterType.STRING); |
563,292 | protected void mergeDeviceCommandParameters(IDeviceCommandCreateRequest request, RdbDeviceCommand existing) throws SiteWhereException {<NEW_LINE>Map<String, ICommandParameter> updatedByName = new HashMap<>();<NEW_LINE>for (ICommandParameter updated : request.getParameters()) {<NEW_LINE>updatedByName.put(updated.getName... | RdbCommandParameter created = new RdbCommandParameter(updated); |
1,622,297 | private static TileSourceTemplate createWmsTileSourceTemplate(Map<String, String> attributes) {<NEW_LINE>String name = attributes.get("name");<NEW_LINE>String layer = attributes.get("layer");<NEW_LINE>String urlTemplate = attributes.get("url_template");<NEW_LINE>if (name == null || urlTemplate == null || layer == null)... | ".jpg" : attributes.get("ext"); |
55,405 | public void daemonFinished() {<NEW_LINE>LOG.debug("Daemon finished");<NEW_LINE>final AppSettingsState.Model state = AppSettingsState.getInstance(project).getState();<NEW_LINE>if (!state.resolveRedSymbols)<NEW_LINE>return;<NEW_LINE>// As in com.intellij.codeInsight.daemon.impl.StatusBarUpdater.java<NEW_LINE>Editor edito... | getInstance().getFile(document); |
1,658,278 | public void updateStatus(@NonNull final JsonRequestCandidateResults results) {<NEW_LINE>final AdIssueId generalAdIssueId = <MASK><NEW_LINE>if (generalAdIssueId != null) {<NEW_LINE>logger.debug("Created AD_Issue_ID={} that applies to all exported receipt schedules", generalAdIssueId.getRepoId());<NEW_LINE>}<NEW_LINE>if ... | createADIssue(results.getError()); |
1,102,746 | static byte[] diff(ApplicationPackage left, ApplicationPackage right, int maxFileSizeToDiff, int maxDiffSizePerFile, int maxTotalDiffSize) {<NEW_LINE>if (Arrays.equals(left.zippedContent(), right.zippedContent()))<NEW_LINE>return "No diff\n".getBytes(StandardCharsets.UTF_8);<NEW_LINE>Map<String, ZipEntryWithContent> le... | ).getBytes(StandardCharsets.UTF_8); |
41,065 | final CreateTagsResult executeCreateTags(CreateTagsRequest createTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<CreateTagsRequest> request = nu... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,598,428 | public void fillAvailableAndAllocatedStock(ActionRequest request, ActionResponse response) {<NEW_LINE><MASK><NEW_LINE>SaleOrderLineServiceSupplyChainImpl saleOrderLineServiceSupplyChainImpl = Beans.get(SaleOrderLineServiceSupplyChainImpl.class);<NEW_LINE>SaleOrderLine saleOrderLine = context.asType(SaleOrderLine.class)... | Context context = request.getContext(); |
521,928 | final DescribeEdgePackagingJobResult executeDescribeEdgePackagingJob(DescribeEdgePackagingJobRequest describeEdgePackagingJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEdgePackagingJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,056,455 | public void releaseReservedMemory(long bytes, boolean immediately) {<NEW_LINE>if (immediately) {<NEW_LINE>long alreadyAllocated = allocated.get();<NEW_LINE>if (alreadyAllocated - bytes < free.get()) {<NEW_LINE>memoryPool.freeReserveMemory(allocated.getAndSet(0));<NEW_LINE>free.set(0);<NEW_LINE>} else {<NEW_LINE>long ac... | allocated.get(), freeSize); |
1,078,804 | public Job removeJob(final JobId id, final String token) throws JobDoesNotExistException, JobStillDeployedException, TokenVerificationException {<NEW_LINE>log.info("removing job: id={}", id);<NEW_LINE>final ZooKeeperClient client = provider.get("removeJob");<NEW_LINE>final Job job = getJob(client, id);<NEW_LINE>if (job... | (Paths.historyJob(id)); |
60,459 | protected ConsumptionProbe tryConsumeAndReturnRemainingTokensImpl(long tokensToConsume) {<NEW_LINE>long currentTimeNanos = timeMeter.currentTimeNanos();<NEW_LINE>state.refillAllBandwidth(currentTimeNanos);<NEW_LINE>long availableToConsume = state.getAvailableTokens();<NEW_LINE>if (tokensToConsume > availableToConsume) ... | nanosToWaitForReset = state.calculateFullRefillingTime(currentTimeNanos); |
1,097,926 | protected void decode(ChannelHandlerContext channelHandlerContext, ByteBuf in, List<Object> list) throws Exception {<NEW_LINE>if (in.readableBytes() < RemotingHeader.MIN_HEADER_SIZE + RemotingHeader.LENGTH_FIELD)<NEW_LINE>return;<NEW_LINE>int magicCode = in.getInt(in.readerIndex() + RemotingHeader.LENGTH_FIELD);<NEW_LI... | + Integer.toHexString(magicCode)); |
1,780,511 | protected SolrJSONFacet resolveJSONFacet(NamedList facetNamedList) {<NEW_LINE>SolrJSONFacet jsonFacet = new SolrJSONFacet();<NEW_LINE>Iterator<Map.Entry<String, Object>> iterator = facetNamedList.iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>Map.Entry<String, Object> entry = iterator.next();<NEW_LINE>if (e... | (entry.getValue())); |
1,370,520 | public WebTargetImpl queryParamNoTemplate(String name, Object... values) throws NullPointerException {<NEW_LINE>abortIfClosed();<NEW_LINE>if (name == null)<NEW_LINE>throw new NullPointerException("Param was null");<NEW_LINE>// The whole array can be represented as one object, so we need to cast it to array of objects<N... | Object[]) values[0]; |
1,835,419 | public static // <editor-fold defaultstate="collapsed" desc="Copy Operation"><NEW_LINE>void copyProject(final Project project) {<NEW_LINE>final ProgressHandle handle = ProgressHandleFactory.createHandle(NbBundle.getMessage(DefaultProjectOperationsImplementation.class, "LBL_Copy_Project_Handle"));<NEW_LINE>final Project... | String nueName = panel.getNewName(); |
1,337,462 | private static void checkColumnsCompatibility(final Optional<Integer> schemaId, final List<Column> tableColumns, final List<? extends SimpleColumn> connectColumns, final boolean isKey) {<NEW_LINE>if (!schemaId.isPresent()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (tableColumns.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<... | collect(Collectors.toList()); |
839,838 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>String executorSeed = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Read r... | persist(readCompleted, CheckPersistType.all); |
131,992 | private void writeMatchesSection(String sectionName, JsonGenerator g, List<CheckResults> res, AnnotatedText text, ContextTools contextTools) throws IOException {<NEW_LINE>g.writeArrayFieldStart(sectionName);<NEW_LINE>for (CheckResults r : res) {<NEW_LINE>for (RuleMatch match : r.getRuleMatches()) {<NEW_LINE>g.writeStar... | == -1 || contextEstimate > 3); |
1,594,912 | protected SubscriptionImpl addSubscription(SubscriptionImpl subs) {<NEW_LINE>SubscriptionImpl existing;<NEW_LINE>synchronized (this) {<NEW_LINE>int index = Collections.binarySearch(subscriptions, subs, new Comparator<Subscription>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(Subscription arg0, Subscript... | compareTo(arg1.getID()); |
1,792,968 | public void process(T image, GrayS32 pixelToRegion, DogArray_I32 regionMemberCount, DogArray<float[]> regionColor) {<NEW_LINE>// See if the input image has the expected number of bands<NEW_LINE>if (image.getImageType().getFamily() != ImageType.Family.GRAY) {<NEW_LINE>this.numBands = ((<MASK><NEW_LINE>regionSums = new C... | ImageMultiBand) image).getNumBands(); |
739,628 | final ListDomainNamesResult executeListDomainNames(ListDomainNamesRequest listDomainNamesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDomainNamesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | endClientExecution(awsRequestMetrics, request, response); |
459,283 | private void testItems() {<NEW_LINE>for (ImmutableList<String> inputList : inputLists) {<NEW_LINE>for (String input : inputList) {<NEW_LINE>Converter<?> converter = createConverter();<NEW_LINE>Converter<?> converter2 = createConverter();<NEW_LINE>Object converted;<NEW_LINE>Object convertedAgain;<NEW_LINE>Object convert... | "Failed to parse input: \"" + input + "\"", ex); |
862,431 | public void actionPerform(Component component) {<NEW_LINE>LoggedEntity selectedEntity = loggedEntityTable.getSelected().iterator().next();<NEW_LINE>Set<LoggedAttribute<MASK><NEW_LINE>for (Component c : attributesBoxScroll.getComponents()) {<NEW_LINE>CheckBox currentCheckBox = (CheckBox) c;<NEW_LINE>if (currentCheckBox.... | > enabledAttributes = selectedEntity.getAttributes(); |
764,525 | private Dependency createDependency(Dependency parent, String source, final String name, String version, String repo) {<NEW_LINE>final Dependency dependency = new Dependency(parent.getActualFile(), true);<NEW_LINE>dependency.setEcosystem(DEPENDENCY_ECOSYSTEM);<NEW_LINE>dependency.setName(name);<NEW_LINE>dependency.setV... | getVersion(), Confidence.HIGHEST); |
360,700 | public List<ProjectTask> convert(List<? extends TaskTemplate> templates, Project project, ProjectTask parent, LocalDateTime startDate, BigDecimal qty, SaleOrderLine saleOrderLine) throws AxelorException {<NEW_LINE>List<ProjectTask> tasks = new ArrayList<>();<NEW_LINE>Product product = saleOrderLine.getProduct();<NEW_LI... | , project.getCompany())); |
1,149,863 | private void executeRequisitionApproval(MPPMRP mrp) {<NEW_LINE>MRequisition requisition = (MRequisition) mrp.getM_Requisition();<NEW_LINE>Timestamp dateRequired = getSelectionAsTimestamp(mrp.getPP_MRP_ID(), "R_" + MRequisition.COLUMNNAME_DateRequired);<NEW_LINE>if (dateRequired != null)<NEW_LINE>requisition.setDateRequ... | COLUMNNAME_C_BPartner_ID, requisitionLine, MRequisitionLine.COLUMNNAME_C_BPartner_ID); |
754,700 | public static SAML11AuthenticationQueryType parseSAML11AuthenticationQuery(XMLEventReader xmlEventReader) throws ParsingException {<NEW_LINE>SAML11AuthenticationQueryType query = new SAML11AuthenticationQueryType();<NEW_LINE>StartElement startElement;<NEW_LINE>// There may be additional things under subject confirmatio... | startTag, startElement.getLocation()); |
876,058 | public SSLContext configure(SSLParams sslParams) {<NEW_LINE>this.sslParams = sslParams;<NEW_LINE>// get the protocol and the SSLContext.<NEW_LINE>String protocol = sslParams.getProtocol();<NEW_LINE>try {<NEW_LINE>sslContext = SSLContext.getInstance(protocol);<NEW_LINE>} catch (NoSuchAlgorithmException ex) {<NEW_LINE>_l... | String keyAlias = sslParams.getCertNickname(); |
718,749 | private void updateStats() {<NEW_LINE>final Runtime runtime = Runtime.getRuntime();<NEW_LINE>final long heapMemory = runtime.totalMemory() - runtime.freeMemory();<NEW_LINE>final <MASK><NEW_LINE>// When changing format of output below, make sure to sync "run_comparison.py" as well<NEW_LINE>sb.append("Heap: ");<NEW_LINE>... | StringBuilder sb = new StringBuilder(DEFAULT_MESSAGE_SIZE); |
1,301,095 | public void open(int serverId) {<NEW_LINE>close();<NEW_LINE>Server server = ServerManager.getInstance().getServer(serverId);<NEW_LINE>if (server == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>socket = new Socket();<NEW_LINE>socket.setKeepAlive(false);<NEW_LINE>socket.setTcpNoDelay(true);<NEW_LINE>socket... | setSoTimeout(server.getSoTimeOut()); |
1,116,795 | public void removeAllConversations(Object connectionReference) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "removeAllConversations", connectionReference);<NEW_LINE>final ArrayList list;<NEW_LINE>synchronized (activeConversations) {<NEW_LINE>list = (ArrayLis... | this, tc, "Found a Conversation in the table: ", conv); |
483,300 | public void add(int index, E element) {<NEW_LINE>ensureIsMutable();<NEW_LINE>if (index < 0 || index > size) {<NEW_LINE>throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(index));<NEW_LINE>}<NEW_LINE>if (size < array.length) {<NEW_LINE>// Shift everything over to make room<NEW_LINE>System.arraycopy(arra... | index + 1, size - index); |
1,365,003 | private Mono<PagedResponse<PerformanceTierPropertiesInner>> listSinglePageAsync(String locationName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>i... | (), null, null)); |
1,434,373 | public UnprocessedChangeEvents changed(PropertyChangeEvent[] events) {<NEW_LINE>// Events that we can't process now because they require server restart.<NEW_LINE>List<UnprocessedChangeEvent> unprocessedEvents <MASK><NEW_LINE>for (PropertyChangeEvent event : events) {<NEW_LINE>if (event.getSource() instanceof EjbTimerSe... | = new ArrayList<UnprocessedChangeEvent>(); |
1,803,073 | private synchronized void onServiceChange(HotSwapAction callback, ServiceLoader<?> serviceLoader, String fullName) {<NEW_LINE>// sanity-check that the file modification has led to actual changes in services<NEW_LINE>serviceLoader.reload();<NEW_LINE>Set<String> currentServiceImpl = services.getOrDefault(fullName, Collec... | services.put(fullName, changedServiceImpl); |
70,423 | private void evaluateParseSingular(@NotNull final CommandSender sender, @NotNull @Unmodifiable final List<String> params, final boolean broadcast, final boolean command) {<NEW_LINE>if (params.size() < 2) {<NEW_LINE>Msg.msg(sender, "&cYou must supply a target, and a message: &b/papi " + (broadcast ? "bcparse" : "parse")... | Bukkit.dispatchCommand(sender, message); |
1,228,191 | private void fileDownloadStatus() {<NEW_LINE>boolean downloadSuccessful = false;<NEW_LINE>Uri downloadedFileUri = null;<NEW_LINE>Cursor cursor = ContextCompat.getSystemService(getContext(), DownloadManager.class).query(new DownloadManager.Query().setFilterById(downloadId));<NEW_LINE>if (cursor != null && cursor.moveToF... | cursor.getColumnIndex(DownloadManager.COLUMN_REASON); |
1,443,781 | private int computeScrollOffset(RecyclerView.State state) {<NEW_LINE>if (getChildCount() == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int allChildrenCount = state.getItemCount();<NEW_LINE>View firstReferenceView = findFirstReferenceChild(allChildrenCount);<NEW_LINE>View lastReferenceView = findLastReferenceChild(allC... | int lineRange = lastLinePosition - firstLinePosition + 1; |
202,461 | public UploadShare updateUploadShare(UpdateUploadShareRequest body, Long shareId, String xSdsDateFormat, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing... | = new ArrayList<Pair>(); |
212,915 | public Object visitMethodInvocation(MethodInvocationTree node, Object p) {<NEW_LINE>Object r = scan(node.getArguments(), p);<NEW_LINE>Object x = scan(<MASK><NEW_LINE>if (x instanceof Tree && nonLocals) {<NEW_LINE>stop((Tree) x);<NEW_LINE>}<NEW_LINE>Object o = reduce(r, x);<NEW_LINE>Element e = ctx.getInfo().getTrees().... | node.getMethodSelect(), p); |
1,004,001 | protected void consumeConstructorHeader() {<NEW_LINE>// ConstructorHeader ::= ConstructorHeaderName MethodHeaderParameters MethodHeaderThrowsClauseopt<NEW_LINE>AbstractMethodDeclaration method = (AbstractMethodDeclaration) this.astStack[this.astPtr];<NEW_LINE>if (this.currentToken == TokenNameLBRACE) {<NEW_LINE>method.... | .currentElement = this.currentElement.parent; |
835,317 | public void fireDocValueWorkflows(final PO document) {<NEW_LINE>countCalled.incrementAndGet();<NEW_LINE>final ClientId clientId = ClientId.<MASK><NEW_LINE>final AdTableId adTableId = AdTableId.ofRepoId(document.get_Table_ID());<NEW_LINE>final Collection<Workflow> workflows = Services.get(IADWorkflowDAO.class).getDocVal... | ofRepoId(document.getAD_Client_ID()); |
511,843 | public void run() {<NEW_LINE>while (!serverSocket.isClosed()) {<NEW_LINE>try {<NEW_LINE>// wait for next client<NEW_LINE>Socket candidateSocket = serverSocket.accept();<NEW_LINE>// reject connection if already one client connected<NEW_LINE>if (clientSocket != null && !clientSocket.isClosed()) {<NEW_LINE>logger.info(<MA... | "Refused connection of client " + candidateSocket.getInetAddress()); |
1,224,331 | public void marshall(FileSystemAssociationInfo fileSystemAssociationInfo, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (fileSystemAssociationInfo == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(fileSyste... | fileSystemAssociationInfo.getEndpointNetworkConfiguration(), ENDPOINTNETWORKCONFIGURATION_BINDING); |
1,647,468 | void readStringValues(int[] docIds, int length, String[] valueBuffer) {<NEW_LINE>ForwardIndexReaderContext readerContext = getReaderContext();<NEW_LINE>if (_dictionary != null) {<NEW_LINE>int[] dictIdBuffer = THREAD_LOCAL_DICT_IDS.get();<NEW_LINE>_reader.readDictIds(docIds, length, dictIdBuffer, readerContext);<NEW_LIN... | (docIds[i], readerContext); |
651,392 | void expandTree(JTree tree, Object object, String[] items, DefaultMutableTreeNode[] nodes, int index) {<NEW_LINE>// if (object == null) {<NEW_LINE>// object = model.getRoot();<NEW_LINE>// }<NEW_LINE>TreeModel model = tree.getModel();<NEW_LINE>if (index == 0) {<NEW_LINE>nodes[0] = (DefaultMutableTreeNode) model.getRoot(... | count = model.getChildCount(node); |
1,305,353 | final UpdateJobQueueResult executeUpdateJobQueue(UpdateJobQueueRequest updateJobQueueRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateJobQueueRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateJobQueue"); |
348,222 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String serverName, String elasticPoolName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot b... | error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); |
867,168 | public static void commonOutboundProperties(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) {<NEW_LINE>final String <MASK><NEW_LINE>builder.addConstructorArgReference(kafkaTemplateBeanName);<NEW_LINE>IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element... | kafkaTemplateBeanName = element.getAttribute("kafka-template"); |
261,124 | public void verifyGqrViewComment(FeedbackQuestionAttributes question, FeedbackResponseCommentAttributes comment, FeedbackResponseAttributes response, Collection<InstructorAttributes> instructors, Collection<StudentAttributes> students, boolean isGroupedByTeam) {<NEW_LINE>selectViewType(GQR_VIEW);<NEW_LINE>FeedbackParti... | response.getRecipient(), students); |
886,944 | protected void configureService(ServiceBusClientBuilder.ServiceBusProcessorClientBuilder builder) {<NEW_LINE>Assert.notNull(processorClientProperties.getEntityType(), "Entity type cannot be null.");<NEW_LINE>Assert.notNull(processorClientProperties.getEntityName(), "Entity name cannot be null.");<NEW_LINE>final Propert... | t -> builder.disableAutoComplete()); |
1,167,571 | final UpdateUserHierarchyResult executeUpdateUserHierarchy(UpdateUserHierarchyRequest updateUserHierarchyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateUserHierarchyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | false), new UpdateUserHierarchyResultJsonUnmarshaller()); |
1,678,333 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>((WordPress) getActivity().getApplication()).component().inject(this);<NEW_LINE>setRetainInstance(true);<NEW_LINE>addPreferencesFromResource(R.xml.account_settings);<NEW_LINE>mUsernamePreference = findPreference(getS... | setTextAlignment(mEmailPreference.getEditText()); |
1,041,712 | final DetectStackSetDriftResult executeDetectStackSetDrift(DetectStackSetDriftRequest detectStackSetDriftRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(detectStackSetDriftRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,022,090 | void checkUserValue(OptionsParser parser, OptionInstanceOrigin origin, OptionDescription optionDescription, OptionValueDescription valueDescription, List<String> policyValues, String newValue, boolean useDefault, Set<Object> convertedPolicyValues) throws OptionsParsingException {<NEW_LINE><MASK><NEW_LINE>if (optionDesc... | OptionDefinition option = optionDescription.getOptionDefinition(); |
576,686 | public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) {<NEW_LINE>if (!LOG_MATCHER.matches(tree, state)) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>List<? extends ExpressionTree> arguments = tree.getArguments();<NEW_LINE>// There's a 0-arg 'log' method for terminating complex chain... | .Builder description = buildDescription(tree); |
1,785,138 | public ApiResponse logout(boolean fromLogin) {<NEW_LINE>Utils.printLog(context, TAG, "Al Logout call !!");<NEW_LINE>ApiResponse apiResponse = userLogoutResponse();<NEW_LINE>MobiComUserPreference mobiComUserPreference = MobiComUserPreference.getInstance(context);<NEW_LINE>final <MASK><NEW_LINE>final String userKeyString... | String deviceKeyString = mobiComUserPreference.getDeviceKeyString(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.