idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
182,014 | public final TextEdit rewriteImports(IProgressMonitor monitor) throws CoreException {<NEW_LINE>SubMonitor subMonitor = SubMonitor.convert(monitor, Messages.bind(Messages.importRewrite_processDescription), 2);<NEW_LINE>if (!hasRecordedChanges()) {<NEW_LINE>this.createdImports = CharOperation.NO_STRINGS;<NEW_LINE>this.cr... | computer.requireExplicitImport(false, typeExplicitSimpleName); |
25,511 | private void selectInEditor(boolean openEditor) {<NEW_LINE>if (bug == null || (file == null && javaElt == null)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>IWorkbenchPage page = contributingPart.getSite().getPage();<NEW_LINE>IEditorPart activeEditor = page.getActiveEditor();<NEW_LINE>IEditorInput input = activeEditor != nu... | IDE.openEditor(page, file); |
726,689 | public double minDist(SpatialComparable mbr1, SpatialComparable mbr2) {<NEW_LINE>final int dim1 = mbr1.getDimensionality(), dim2 = mbr2.getDimensionality();<NEW_LINE>final int mindim = (dim1 < dim2) ? dim1 : dim2;<NEW_LINE>double agg = 0.;<NEW_LINE>for (int d = 0; d < mindim; d++) {<NEW_LINE>final double min1 = mbr1.ge... | max2 = mbr2.getMax(d); |
1,180,688 | private void requestScrollPositionInternal(int position, @NonNull OnPerformScroll onPerformScroll, @NonNull Runnable onScrollRequestComplete, @NonNull Runnable onInvalidPosition) {<NEW_LINE>Objects.requireNonNull(scrollRequestValidator, "Cannot request positions when SnapToTopObserver was initialized without a validato... | TAG, "requestScrollPositionInternal(" + position + ") Scrolling"); |
1,655,444 | public static void buildPredDCIns(int blkX, int blkY, int mbX, boolean leftAvailable, boolean topAvailable, byte[] leftRow, byte[] topLine, byte[] pixOut) {<NEW_LINE>int s0, blkOffX = (blkX << 2) + (mbX << 3), blkOffY = blkY << 2;<NEW_LINE>if (leftAvailable && topAvailable) {<NEW_LINE>s0 = 0;<NEW_LINE>for (int i = 0; i... | s0 += leftRow[i + blkOffY]; |
1,239,052 | public static void main(String[] args) {<NEW_LINE><MASK><NEW_LINE>String webwolfPort = System.getenv("WEBWOLF_PORT");<NEW_LINE>String webWolfHost = null == System.getenv("WEBWOLF_HOST") ? "127.0.0.1" : System.getenv("WEBWOLF_HOST");<NEW_LINE>String fileEncoding = System.getProperty("file.encoding");<NEW_LINE>int wolfPo... | System.setProperty("spring.config.name", "application-webwolf"); |
780,076 | public int compare(Message a, Message b) {<NEW_LINE>MessagePart a0 = firstPartOf(a);<NEW_LINE>MessagePart b0 = firstPartOf(b);<NEW_LINE>InputSource aSrc = toInputSource(a0), bSrc = toInputSource(b0);<NEW_LINE>// Compure by source first.<NEW_LINE>if (aSrc != null && bSrc != null) {<NEW_LINE>int delta = aSrc.getUri().com... | , bEPos = Integer.MAX_VALUE + 1L; |
555,620 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "sumb" };<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>// create window<NEW_LINE>String stmtTextCreate = namedWindow ? "@name('create') @public create window MyInfraSA#keepall as select theString as a, intPrimitive a... | new Object[] { 6 }); |
1,040,620 | ASTNode clone0(AST target) {<NEW_LINE>MethodDeclaration result = new MethodDeclaration(target);<NEW_LINE>result.setSourceRange(getStartPosition(), getLength());<NEW_LINE>result.setJavadoc((Javadoc) ASTNode.copySubtree(target, getJavadoc()));<NEW_LINE>if (this.ast.apiLevel == AST.JLS2_INTERNAL) {<NEW_LINE>result.interna... | (target, thrownExceptionTypes())); |
663,227 | protected Control createControl(Composite editPlaceholder) {<NEW_LINE>Object value = valueController.getValue();<NEW_LINE>valueController.getEditPlaceholder();<NEW_LINE>boolean inline = valueController.getEditType() == IValueController.EditType.INLINE;<NEW_LINE>timeEditor = new CustomTimeEditor(editPlaceholder, SWT.MUL... | = new DateEditorMode(this, timeEditor); |
363,609 | public void checkPrivilege(String driverName, String url, String userName, String password, String tableName, String schema, List<String> privilegeList) {<NEW_LINE>Connection connection = JdbcConnectionUtil.getConnectionWithRetry(driverName, url, userName, password);<NEW_LINE>Statement statement = null;<NEW_LINE>String... | )), "$table", tableName)); |
214,607 | public ListSigningProfilesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListSigningProfilesResult listSigningProfilesResult = new ListSigningProfilesResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | int originalDepth = context.getCurrentDepth(); |
1,836,475 | protected void channelRead0(ChannelHandlerContext ctx, StreamResponse response) throws Exception {<NEW_LINE>final Map<String, String> headers = new <MASK><NEW_LINE>headers.putAll(response.getHeaders());<NEW_LINE>final Map<String, String> wireAttrs = WireAttributeHelper.removeWireAttributes(headers);<NEW_LINE>final Stre... | TreeMap<>(String.CASE_INSENSITIVE_ORDER); |
1,217,553 | private void printGetBorder() {<NEW_LINE>String sumToFloat = image.getSumType().<MASK><NEW_LINE>out.print("\tpublic void get_border(float x, float y, float[] values) {\n" + "\t\tfloat xf = (float)Math.floor(x);\n" + "\t\tfloat yf = (float)Math.floor(y);\n" + "\t\tint xt = (int) xf;\n" + "\t\tint yt = (int) yf;\n" + "\t... | equals("float") ? "" : "(float)"; |
755,434 | private long createPhoto(PrintWriter respWriter) throws RemoteInvocationException {<NEW_LINE>// make create photo request and send with the rest client synchronously<NEW_LINE>// response of create request does not have body, therefore use EmptyRecord as template<NEW_LINE>// create an instance of photo pragmatically<NEW... | input(newPhoto).build(); |
247,773 | public ConcurrentMap<String, Object> deserializeAttributes(final byte[] in) {<NEW_LINE>ByteArrayInputStream bis = null;<NEW_LINE>ObjectInputStream ois = null;<NEW_LINE>try {<NEW_LINE>bis = new ByteArrayInputStream(in);<NEW_LINE>ois = createObjectInputStream(bis);<NEW_LINE>final ConcurrentMap<String, Object> attributes ... | throw new TranscoderDeserializationException("Caught IOException decoding data", e); |
1,386,997 | final GetUnfilteredTableMetadataResult executeGetUnfilteredTableMetadata(GetUnfilteredTableMetadataRequest getUnfilteredTableMetadataRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getUnfilteredTableMetadataRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,334,527 | public static void init() {<NEW_LINE>logger.info("server starts");<NEW_LINE>// setup system property to redirect undertow logs to slf4j/logback.<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>loadConfigs();<NEW_LINE>// this will make sure that all log statement will have serviceId<NEW_LINE>MDC.put(SID, getServerConfig().getSe... | System.setProperty("org.jboss.logging.provider", "slf4j"); |
645,691 | public void writeToParcel(Parcel dest, int flags) {<NEW_LINE>dest.writeLong(this.id);<NEW_LINE>dest.writeParcelable(this.user, flags);<NEW_LINE>dest.writeString(this.url);<NEW_LINE>dest.writeString(this.body);<NEW_LINE>dest.writeString(this.bodyHtml);<NEW_LINE>dest.writeString(this.htmlUrl);<NEW_LINE>dest.writeLong(thi... | dest.writeString(this.path); |
697,066 | private void writeClass() {<NEW_LINE>if (writingAssocBean) {<NEW_LINE>writer.append("/**").eol();<NEW_LINE>writer.append(" * Association query bean for %s.", shortName).eol();<NEW_LINE>writer.append(" * ").eol();<NEW_LINE>writer.append(" * THIS IS A GENERATED OBJECT, DO NOT MODIFY THIS CLASS.").eol();<NEW_LINE>writer.a... | Constants.AT_TYPEQUERYBEAN).eol(); |
119,627 | private void generateClinicians() {<NEW_LINE>Random random = new Random(999L);<NEW_LINE>for (int i = 0; i < CLINICIANS; i++) {<NEW_LINE>Person clinician = new Person(random.nextLong());<NEW_LINE>if (random.nextBoolean()) {<NEW_LINE>clinician.attributes.put(Person.GENDER, "M");<NEW_LINE>} else {<NEW_LINE>clinician.attri... | LifecycleModule.birth(clinician, 0L); |
1,562,092 | public static boolean isJavadocContext(TokenHierarchy hierarchy, int offset) {<NEW_LINE>TokenSequence<JavaTokenId> ts = SourceUtils.getJavaTokenSequence(hierarchy, offset);<NEW_LINE>if (!movedToJavadocToken(ts, offset)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TokenSequence<JavadocTokenId> jdts = ts.embedded(Javado... | offset - ts.offset()); |
1,525,581 | public static If suppressSummarizedPrefixes(Configuration c, String vrfName, Stream<Prefix> summaryOnlyPrefixes) {<NEW_LINE>Iterator<Prefix> prefixesToSuppress = summaryOnlyPrefixes.iterator();<NEW_LINE>if (!prefixesToSuppress.hasNext()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Create a RouteFilterList that match... | ), ImmutableList.of()); |
1,096,778 | final DescribeCrossAccountAccessRoleResult executeDescribeCrossAccountAccessRole(DescribeCrossAccountAccessRoleRequest describeCrossAccountAccessRoleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCrossAccountAccessRoleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,532,581 | public void marshall(PostCommentForPullRequestRequest postCommentForPullRequestRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (postCommentForPullRequestRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshall... | postCommentForPullRequestRequest.getAfterCommitId(), AFTERCOMMITID_BINDING); |
235,292 | public boolean onHoverEvent(MotionEvent event) {<NEW_LINE>// if in layout inspector and talkback is running, override the first click to locate the<NEW_LINE>// clicked view<NEW_LINE>if (mConnection != null && AccessibilityUtil.isTalkbackEnabled(getContext()) && event.getPointerCount() == 1) {<NEW_LINE>FlipperObject par... | int action = event.getAction(); |
1,029,295 | public IniFileProperties read(Reader input) throws IOException {<NEW_LINE>final BufferedReader reader = new BufferedReader(input);<NEW_LINE>final IniFileProperties properties = new IniFileProperties();<NEW_LINE>String currentSection = null;<NEW_LINE>String line;<NEW_LINE>while ((line = reader.readLine()) != null) {<NEW... | line.length() - 1); |
597,846 | public List<R> visit(final ConstructorDeclaration n, final A arg) {<NEW_LINE>List<R> result = new ArrayList<>();<NEW_LINE>List<R> tmp;<NEW_LINE>{<NEW_LINE>tmp = n.getBody().accept(this, arg);<NEW_LINE>if (tmp != null)<NEW_LINE>result.addAll(tmp);<NEW_LINE>}<NEW_LINE>{<NEW_LINE>tmp = n.getModifiers(<MASK><NEW_LINE>if (t... | ).accept(this, arg); |
394,035 | private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEnd... | this.client.mergeContext(context); |
933,373 | private static long insertModuleVersion(long moduleId, ModuleVersion version) {<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>values.put(ModuleVersionsColumns.MODULE_ID, moduleId);<NEW_LINE>values.put(ModuleVersionsColumns.NAME, version.name);<NEW_LINE>values.put(ModuleVersionsColumns.CODE, version.code... | ModuleVersionsColumns.CHANGELOG, version.changelog); |
812,084 | public void purgeTaskHistory(String requestId, int count, Optional<Integer> limit, Optional<Date> purgeBefore, boolean deleteRowInsteadOfUpdate, Integer maxPurgeCount) {<NEW_LINE>if (limit.isPresent() && count > limit.get()) {<NEW_LINE>Date beforeBasedOnLimit = history.getMinUpdatedAtWithLimitForRequest(requestId, limi... | purgeBefore.get(), maxPurgeCount); |
339,901 | private void triggerImportProtocol(boolean verbose, URL importURL, String boltUri, Path source, long crc32Sum, String bearerToken) throws IOException {<NEW_LINE>HttpURLConnection connection = (HttpURLConnection) importURL.openConnection();<NEW_LINE>try (Closeable c = connection::disconnect) {<NEW_LINE>connection.setReq... | int responseCode = connection.getResponseCode(); |
945,612 | final ListPendingInvitationResourcesResult executeListPendingInvitationResources(ListPendingInvitationResourcesRequest listPendingInvitationResourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPendingInvitationResourcesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEven... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,640,236 | static String printRules(AutomationCommandsPluggable autoCommands, Map<String, String> ruleUIDs) {<NEW_LINE>int[] columnWidths = new int[] { COLUMN_ID, COLUMN_RULE_UID, COLUMN_RULE_NAME, COLUMN_RULE_STATUS };<NEW_LINE>List<String> columnValues = new ArrayList<>();<NEW_LINE>columnValues.add(ID);<NEW_LINE>columnValues.ad... | 2, rule.getName()); |
1,741,377 | public Observable<ServiceResponse<Project>> updateProjectWithServiceResponseAsync(UUID projectId, Project updatedProject) {<NEW_LINE>if (this.client.endpoint() == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");<NEW_LINE>}<NEW_LINE>if (projectId ==... | Project> clientResponse = updateProjectDelegate(response); |
1,844,657 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create context ContextOne start SupportBean_S0 end SupportBean_S1", path);<NEW_LINE>String eplCreate = namedWindow ? "@public context ContextOne create window MyInfra#keepall as (pkey0 s... | env, path, 2, "context ContextOne select count(*) as thecnt from MyInfra output snapshot when terminated"); |
342,785 | default ToDoubleNullable<T> mapToDoubleIfPresent(IntToDoubleFunction mapper) {<NEW_LINE><MASK><NEW_LINE>return new ToDoubleNullable<T>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Double apply(T object) {<NEW_LINE>return delegate.isNull(object) ? null : mapper.applyAsDouble(delegate.applyAsInt(object));<NEW_LINE>}<... | final ToIntNullable<T> delegate = this; |
1,365,930 | public Adjustment unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Adjustment adjustment = new Adjustment();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MA... | JsonToken token = context.getCurrentToken(); |
1,235,985 | public void init() {<NEW_LINE>leftSide = app.getSettings()<MASK><NEW_LINE>app.registerReceiver(new BroadcastReceiver() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onReceive(Context context, Intent intent) {<NEW_LINE>RoutingHelper routingHelper = app.getRoutingHelper();<NEW_LINE>routingHelper.setRoutePlanningMod... | .DRIVING_REGION.get().leftHandDriving; |
570,922 | public DataPoint next() {<NEW_LINE>scratch.zeroOut();<NEW_LINE><MASK><NEW_LINE>// for (int j = 0; j < cur_col_vals.length; j++)//slow option, not needed b/c we maintain sparse set mapping<NEW_LINE>for (int j : nonZeroTable.getOrDefault(i, empty_set)) if (cur_col_vals[j] != null && cur_col_vals[j].getIndex() <= i) {<NEW... | int i = pos.getAndIncrement(); |
1,168,019 | final DescribeReservedInstanceOfferingsResult executeDescribeReservedInstanceOfferings(DescribeReservedInstanceOfferingsRequest describeReservedInstanceOfferingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReservedInstanceOfferingsRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
718,703 | private void checkACXmlJ2eeVersion(FileObject appClientXML) {<NEW_LINE>try {<NEW_LINE>BigDecimal version = getACXmlVersion(appClientXML);<NEW_LINE>if (version == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (new BigDecimal(org.netbeans.modules.j2ee.dd.api.client.AppClient.VERSION_1_4).equals(version)) {<NEW_LINE>j2e... | new ProfileItem(Profile.JAVA_EE_6_FULL)); |
813,419 | public double[] solve(double[] b) {<NEW_LINE>int dim = b.length;<NEW_LINE>ArgChecker.isTrue(dim == _lArray.length, "b array of incorrect size");<NEW_LINE>double[] x = new double[dim];<NEW_LINE>System.arraycopy(b, 0, x, 0, dim);<NEW_LINE>// L y = b (y stored in x array)<NEW_LINE>for (int looprow = 0; looprow < dim; loop... | * _lArray[j][looprow]; |
347,654 | public FileSystem HdfsConfigure(String[] xmlfiles, String uri, String hdfUser) throws IOException {<NEW_LINE>JobConf conf = new JobConf();<NEW_LINE>{<NEW_LINE>String envPath = System.getProperty("java.library.path");<NEW_LINE>String path = System.getProperty("user.dir");<NEW_LINE>System.setProperty("HADOOP_USER_NAME", ... | System.setProperty("user.name", "root"); |
1,713,934 | public boolean createFailedExecutorHealthCheckMessage(final List<ExecutableFlow> flows, final Executor executor, final ExecutorManagerException failureException, final EmailMessage message, final String azkabanName, final String scheme, final String clientHostname, final String clientPortNumber, final List<String> emai... | .getStackTrace(failureException) + "</pre>"); |
955,125 | public static DescribeTotalAndRateLineResponse unmarshall(DescribeTotalAndRateLineResponse describeTotalAndRateLineResponse, UnmarshallerContext context) {<NEW_LINE>describeTotalAndRateLineResponse.setRequestId(context.stringValue("DescribeTotalAndRateLineResponse.RequestId"));<NEW_LINE>List<String> categories = new Ar... | = new ArrayList<Item>(); |
1,650,125 | private void runBashCommand(String bisqCmd) throws IOException, InterruptedException {<NEW_LINE>String cmdDescription = config.runSubprojectJars ? "java -> " + bisqAppConfig.mainClassName + " -> " + bisqAppConfig.appName : bisqAppConfig.startupScript + " -> " + bisqAppConfig.appName;<NEW_LINE>BashCommand bashCommand = ... | cmdDescription, bashCommand.getCommand()); |
1,790,503 | public void onClick(View v) {<NEW_LINE>String appID = viewAppID.getText().toString();<NEW_LINE>String productID = viewProductID.getText().toString();<NEW_LINE>if (appID.length() == 0) {<NEW_LINE>showAlert("Invalid App ID!");<NEW_LINE>} else if (productID.length() == 0) {<NEW_LINE>showAlert("Invalid Product ID!");<NEW_L... | data.put("product_id", productID); |
456,648 | public static void updateProxyButtonAndTooltip() {<NEW_LINE>if (applyProxyButton == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>applyProxyButton.setVerticalTextPosition(SwingConstants.BOTTOM);<NEW_LINE>applyProxyButton.setHorizontalTextPosition(SwingConstants.CENTER);<NEW_LINE>if (ProxyUtils.isProxyEnabled()) {<NEW_LI... | putValue(Action.SHORT_DESCRIPTION, "Proxy Setting: Automatic"); |
892,016 | public okhttp3.Call addPetCall(Pet body, final ApiCallback _callback) throws ApiException {<NEW_LINE>String basePath = null;<NEW_LINE>// Operation Servers<NEW_LINE>String[] localBasePaths = new String[] {};<NEW_LINE>// Determine Base Path to Use<NEW_LINE>if (localCustomBaseUrl != null) {<NEW_LINE>basePath = localCustom... | HashMap<String, Object>(); |
535,432 | private void rewritePolymer1ClassDefinition(Node node, Node parent, NodeTraversal traversal) {<NEW_LINE><MASK><NEW_LINE>if (grandparent.isConst()) {<NEW_LINE>grandparent.setToken(Token.LET);<NEW_LINE>Node scriptNode = traversal.getCurrentScript();<NEW_LINE>if (scriptNode != null) {<NEW_LINE>NodeUtil.addFeatureToScript(... | Node grandparent = parent.getParent(); |
208,424 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>repository = getSerializableExtra(EXTRA_REPOSITORY);<NEW_LINE>Project project = getSerializableExtra(EXTRA_PROJECT);<NEW_LINE>loadingBar = finder.<MASK><NEW_LINE>ActionBar actionBar = getSupportActionBar();<NEW_LI... | find(R.id.pb_loading); |
152,675 | public void updateBackground(int x0, int y0, int x1, int y1, T frame) {<NEW_LINE>interpolationInput.setImage(frame);<NEW_LINE>final int numBands = frame.getNumBands();<NEW_LINE>final float minusLearn = 1.0f - learnRate;<NEW_LINE>transform.setModel(worldToCurrent);<NEW_LINE>for (int y = y0; y < y1; y++) {<NEW_LINE>int i... | bg = background.data[indexBG]; |
1,483,179 | private void handleCloseReason(ChannelHandlerContext ctx, CloseReason cr, boolean writeCloseReason) {<NEW_LINE>cleanupBuffer();<NEW_LINE>if (closed.compareAndSet(false, true)) {<NEW_LINE>if (LOG.isDebugEnabled()) {<NEW_LINE>LOG.debug("Closing WebSocket session {} with reason {}", getSession(), cr);<NEW_LINE>}<NEW_LINE>... | target, boundExecutable, methodExecutionHandle, true); |
262,967 | public static String createLiveCopy(CQClient client, String srcPath, String destPath, String title, String label, int... expectedStatus) throws ClientException {<NEW_LINE>FormEntityBuilder feb = FormEntityBuilder.create();<NEW_LINE>feb.addParameter("cmd", "createLiveCopy");<NEW_LINE><MASK><NEW_LINE>feb.addParameter("de... | feb.addParameter("srcPath", srcPath); |
1,282,703 | private void computeFoldingRanges(List<FoldingRange> foldingRanges, ITypeRoot unit, IProgressMonitor monitor) {<NEW_LINE>try {<NEW_LINE>ISourceRange range = unit.getSourceRange();<NEW_LINE>if (!SourceRange.isAvailable(range)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String contents = unit.getSource();<NEW_LINE>if (String... | commentFoldingRange.setKind(FoldingRangeKind.Comment); |
478,911 | private void addCSSClasses(SVGPlot svgp) {<NEW_LINE>final StyleLibrary style = context.getStyleLibrary();<NEW_LINE>// Class for the cube<NEW_LINE>if (!svgp.getCSSClassManager().contains(CSS_CUBE)) {<NEW_LINE>CSSClass cls = new CSSClass(this, CSS_CUBE);<NEW_LINE>cls.setStatement(SVGConstants.CSS_STROKE_VALUE, style.getC... | .getColor(StyleLibrary.SELECTION)); |
252,001 | public boolean print(DateTimePrintContext context, StringBuilder buf) {<NEW_LINE>Long offsetSecs = context.getValue(OFFSET_SECONDS);<NEW_LINE>if (offsetSecs == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>buf.append("GMT");<NEW_LINE>if (style == TextStyle.FULL) {<NEW_LINE>return new OffsetIdPrinterParser("", "+HH... | totalSecs = Jdk8Methods.safeToInt(offsetSecs); |
594,349 | private Cipher createCipher(byte[] salt, final int mode) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException {<NEW_LINE>digest.reset();<NEW_LINE>byte[] pwdAsBytes = getKeyAsBytes();<NEW_LINE>byte[] keyAndIv = new byte[16 * 2];<NEW_LINE>byte[] result;<NEW_LINE... | iv, 0, iv.length); |
303,544 | private String contrast() {<NEW_LINE>final MetaDataDO before = (MetaDataDO) getBefore();<NEW_LINE>Objects.requireNonNull(before);<NEW_LINE>final MetaDataDO after = (MetaDataDO) getAfter();<NEW_LINE>Objects.requireNonNull(after);<NEW_LINE>if (Objects.equals(before, after)) {<NEW_LINE>return "it no change";<NEW_LINE>}<NE... | , after.getPathDesc())); |
1,165,511 | private void onRecipientChanged(@NonNull Recipient recipient) {<NEW_LINE>if (getContext() == null) {<NEW_LINE>Log.w(TAG, "onRecipientChanged called in detached state. Ignoring.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Log.i(TAG, "onModified(" + recipient.getId() + <MASK><NEW_LINE>titleView.setTitle(glideRequests, recipi... | ") " + recipient.getRegistered()); |
1,540,958 | private void startUpdateNodes() {<NEW_LINE>Thread nodes = new Thread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>for (; ; ) {<NEW_LINE>try {<NEW_LINE>if (isDetach()) {<NEW_LINE>LockSupport.parkNanos(TimeUnit.MILLISECONDS.toNanos(2000));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Usha... | usePlaintext(true).build(); |
616,480 | public BatchGetDevEndpointsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchGetDevEndpointsResult batchGetDevEndpointsResult = new BatchGetDevEndpointsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme... | )).unmarshall(context)); |
1,829,934 | public MethodVisitor visitMethod(int flags, String name, String descriptor, String signature, String[] exceptions) {<NEW_LINE>// TODO should we special case statics (and not have them require an extra leading param)?<NEW_LINE>if (isClinitOrInit(name)) {<NEW_LINE>if (name.charAt(1) != 'c') {<NEW_LINE>// avoid <clinit><N... | name, newDescriptor, signature, exceptions); |
79,016 | public void postConfig() {<NEW_LINE>// We use java.util.Random here because SplittableRandom doesn't have nextGaussian yet.<NEW_LINE>Random rng = new Random(seed);<NEW_LINE>if (weights.length != 4) {<NEW_LINE>throw new PropertyException("", "weights", "Must supply 4 weights, found " + weights.length);<NEW_LINE>}<NEW_LI... | "", "variance", "Variance must be positive, found variance = " + variance); |
786,752 | private static NodeMetadata loadNodeMetadata(Settings settings, Logger logger, NodePath... nodePaths) throws IOException {<NEW_LINE>final Path[] paths = Arrays.stream(nodePaths).map(np -> np.path).toArray(Path[]::new);<NEW_LINE>NodeMetadata metadata = PersistedClusterStateService.nodeMetadata(paths);<NEW_LINE>if (metad... | )) : nodeIds + " doesn't match " + legacyMetadata; |
1,116,863 | private void walkFile(BufferedReader reader) throws Exception {<NEW_LINE>if (reader.ready()) {<NEW_LINE><MASK><NEW_LINE>if (isNodeFirstLine(firstLine)) {<NEW_LINE>findNodeColumns(firstLine);<NEW_LINE>boolean edgesWalking = false;<NEW_LINE>while (reader.ready() && !cancel) {<NEW_LINE>String line = reader.readLine();<NEW... | String firstLine = reader.readLine(); |
367,478 | public Operand buildMatch2(Variable result, Match2Node matchNode) {<NEW_LINE>Operand receiver = build(matchNode.getReceiverNode());<NEW_LINE>Operand value = build(matchNode.getValueNode());<NEW_LINE>if (result == null)<NEW_LINE>result = createTemporaryVariable();<NEW_LINE>addInstr(new MatchInstr(scope, result, receiver... | (scope, depth, offset)); |
1,324,575 | public void opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs) {<NEW_LINE>super.opExecution(sd, at, batch, op, opContext, outputs);<NEW_LINE>if (op.getOp() instanceof Enter) {<NEW_LINE>entersExecuted.incrementCount(op.getName(), 1.0);<NEW_LINE>} else if (op.getOp... | op.getName(), 1.0); |
1,368,123 | public Operand buildDXStr(Variable result, DXStrNode node) {<NEW_LINE>Node[] nodePieces = node.children();<NEW_LINE>Operand[] pieces = new Operand[nodePieces.length];<NEW_LINE>int estimatedSize = 0;<NEW_LINE>for (int i = 0; i < pieces.length; i++) {<NEW_LINE>estimatedSize += dynamicPiece(pieces, i, nodePieces[i]);<NEW_... | .getInstanceConfig().isDebuggingFrozenStringLiteral(); |
468,663 | private Map<String, Object> toJson(Trigger trigger, ZoneId zoneId) throws SchedulerException {<NEW_LINE>Scheduler scheduler = getScheduler();<NEW_LINE>Trigger.TriggerState state = scheduler.getTriggerState(trigger.getKey());<NEW_LINE>Map<String, Object> json = new LinkedHashMap<>();<NEW_LINE>json.put("key", trigger.get... | .getNextFireTime(), zoneId)); |
595,919 | protected static int underflowDistanceAdd(int op1, int op2) {<NEW_LINE>int result = op1 + op2;<NEW_LINE>if (op1 <= 0 && op2 <= 0) {<NEW_LINE>if (op1 == Integer.MIN_VALUE && op2 == Integer.MIN_VALUE) {<NEW_LINE>return Integer.MIN_VALUE;<NEW_LINE>} else {<NEW_LINE>// result has to be < 0 for overflow<NEW_LINE>return resu... | .abs(op2), HALFWAY); |
1,181,827 | public static void main(String[] args) throws FileNotFoundException, IOException {<NEW_LINE>// Process the command-line options<NEW_LINE>CommandOption.setSummary(Vectors2Info.class, "A tool for printing information about instance lists of feature vectors.");<NEW_LINE>CommandOption.process(Vectors2Info.class, args);<NEW... | System.out.print("\n"); |
897,111 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>logDebug("onCreateView");<NEW_LINE>View v = inflater.inflate(R.layout.fragment_clouddriveprovider, container, false);<NEW_LINE>Display display = getActivity().getWindowManager().getDefaultDisplay();<NEW_LINE>Dis... | addItemDecoration(new SimpleDividerItemDecoration(context)); |
385,968 | public void syncApiCase(LoadTestWithBLOBs loadTest, List<ApiLoadTest> apiLoadTests) {<NEW_LINE>List<String> caseIds = apiLoadTests.stream().filter(i -> i.getType().equals(ApiLoadType.API_CASE.name())).map(ApiLoadTest::getApiId).collect(Collectors.toList());<NEW_LINE>if (!CollectionUtils.isEmpty(caseIds)) {<NEW_LINE>Api... | (0).getEnvId()); |
1,380,695 | public static GetTopicStatusResponse unmarshall(GetTopicStatusResponse getTopicStatusResponse, UnmarshallerContext _ctx) {<NEW_LINE>getTopicStatusResponse.setRequestId(_ctx.stringValue("GetTopicStatusResponse.RequestId"));<NEW_LINE>getTopicStatusResponse.setSuccess(_ctx.booleanValue("GetTopicStatusResponse.Success"));<... | = new ArrayList<OffsetTableItem>(); |
322,576 | public void start() throws Exception {<NEW_LINE>MqttClientOptions options = new MqttClientOptions().setKeepAliveInterval(2);<NEW_LINE>MqttClient client = MqttClient.create(Vertx.vertx(), options);<NEW_LINE>// handler will be called when we have a message in topic we subscribing for<NEW_LINE>client.publishHandler(publis... | publish.qosLevel() + "]"); |
24,184 | public Builder fromSeed(DeterministicSeed seed, Script.ScriptType outputScriptType) {<NEW_LINE>if (outputScriptType == Script.ScriptType.P2PKH) {<NEW_LINE>DeterministicKeyChain chain = DeterministicKeyChain.builder().seed(seed).outputScriptType(Script.ScriptType.P2PKH).accountPath(structure.accountPathFor(Script.Script... | IllegalArgumentException(outputScriptType.toString()); |
132,981 | static void encodePrivateKey(byte[] privateKey, final long[] secretPolynomial, final long[] errorPolynomial, final byte[] seed, int seedOffset, byte[] publicKey) {<NEW_LINE>int i, k = 0;<NEW_LINE>int skPtr = 0;<NEW_LINE>for (i = 0; i < PARAM_N; i++) {<NEW_LINE>privateKey[skPtr + i] = (byte) secretPolynomial[i];<NEW_LIN... | privateKey, skPtr, CRYPTO_SEEDBYTES * 2); |
1,813,492 | public Request<CreateServiceLinkedRoleRequest> marshall(CreateServiceLinkedRoleRequest createServiceLinkedRoleRequest) {<NEW_LINE>if (createServiceLinkedRoleRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<CreateServiceLinkedRoleRequest> r... | request.setHttpMethod(HttpMethodName.POST); |
695,083 | public static void init(List<String> packages) {<NEW_LINE>if (_init) {<NEW_LINE>LOGGER.info("TableConfigTunerRegistry already initialized, skipping.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>List<URL> urls = new ArrayList<>();<NEW_LINE>for (String pack : packages) {<N... | ("Unable to register tuner %s . Cannot instantiate.", tunerName), e); |
533,439 | final DescribeStorageResult executeDescribeStorage(DescribeStorageRequest describeStorageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeStorageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeStorage"); |
614,917 | private void tryDecode(ChannelHandlerContext ctx, ByteBuf buf) throws Exception {<NEW_LINE>if (!ctx.channel().isActive() || !buf.isReadable()) {<NEW_LINE>buf.release();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int originalReaderIndex = buf.readerIndex();<NEW_LINE>int packetId = ProtocolUtils.readVarInt(buf);<NEW_LINE>Minec... | handleDecodeFailure(e, packet, packetId); |
785,969 | private static Vector apply(LongDoubleVector v1, Unary op) {<NEW_LINE>LongDoubleVector res;<NEW_LINE>if (op.isOrigin() || v1.isDense()) {<NEW_LINE>if (!op.isInplace()) {<NEW_LINE>res = v1.copy();<NEW_LINE>} else {<NEW_LINE>res = v1;<NEW_LINE>}<NEW_LINE>if (v1.isDense()) {<NEW_LINE>double[] values = res.getStorage().get... | .apply(values[i]); |
1,588,680 | public void onCharacteristicChanged(final BluetoothGatt gatt, final BluetoothGattCharacteristic characteristic) {<NEW_LINE>final int responseType = characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, 0);<NEW_LINE>switch(responseType) {<NEW_LINE>case OP_CODE_PACKET_RECEIPT_NOTIF_KEY:<NEW_LINE>mProgressI... | (BluetoothGattCharacteristic.FORMAT_UINT32, 1)); |
1,152,678 | final CreateLocationS3Result executeCreateLocationS3(CreateLocationS3Request createLocationS3Request) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createLocationS3Request);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
594,477 | public static void registerPercentileRanksAggregator(ValuesSourceRegistry.Builder builder) {<NEW_LINE>builder.register(PercentileRanksAggregationBuilder.REGISTRY_KEY, AnalyticsValuesSourceType.HISTOGRAM, (name, valuesSource, context, parent, percents, percentilesConfig, keyed, formatter, metadata) -> {<NEW_LINE>if (per... | numSigFig, keyed, formatter, metadata); |
1,571,815 | public boolean isValidForSlot(Slot s, ItemStack is) {<NEW_LINE>final ItemStack top = getHost().getInternalInventory().getStackInSlot(0);<NEW_LINE>final ItemStack bot = getHost().getInternalInventory().getStackInSlot(1);<NEW_LINE>if (s == this.middle) {<NEW_LINE>ItemDefinition<?> press = AEItems.NAME_PRESS;<NEW_LINE>if ... | <?> namePress = AEItems.NAME_PRESS; |
168,562 | public void marshall(LicenseConfiguration licenseConfiguration, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (licenseConfiguration == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(licenseConfiguration.get... | licenseConfiguration.getStatus(), STATUS_BINDING); |
1,262,670 | /*<NEW_LINE>* Retrieve the address of the heap on the device<NEW_LINE>*/<NEW_LINE>public TaskMetaData compileLookupBufferKernel() {<NEW_LINE>TaskMetaData meta = new TaskMetaData(scheduleMeta, OCLCodeCache.LOOKUP_BUFFER_KERNEL_NAME);<NEW_LINE>meta.setDevice(deviceContext.asMapping());<NEW_LINE>OCLCodeCache codeCache = d... | lookupCode = deviceContext.installCode(result); |
1,595,211 | protected void configure() {<NEW_LINE>bind(CronPredictor.class).to(CronPredictorImpl.class);<NEW_LINE>bind(CronPredictorImpl.class).in(Singleton.class);<NEW_LINE>bind(CronJobManager.class).to(CronJobManagerImpl.class);<NEW_LINE>bind(CronJobManagerImpl.class).in(Singleton.class);<NEW_LINE>bind(CronScheduler.class).to(Cr... | binder(), AuroraCronJob.class); |
1,454,556 | public void collect(JRCrosstab crosstab) {<NEW_LINE>collectElement(crosstab);<NEW_LINE>createCrosstabId(crosstab);<NEW_LINE>JRCrosstabDataset dataset = crosstab.getDataset();<NEW_LINE>collect(dataset);<NEW_LINE>JRExpressionCollector datasetCollector = getCollector(dataset);<NEW_LINE>JRExpressionCollector crosstabCollec... | addExpression(bucket.getComparatorExpression()); |
1,785,881 | public void write(org.apache.thrift.protocol.TProtocol prot, revokeTablePermission_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (st... | oprot.writeByte(struct.permission); |
1,737,327 | public void run(ApplicationArguments applicationArguments) throws Exception {<NEW_LINE>String[] templates = { "Up and running with %s", "%s Basics", "%s for Beginners", "%s for Neckbeards", "Under the hood: %s", "Discovering %s", "A short guide to %s", "%s with Baeldung" };<NEW_LINE>String[] buzzWords = { "Spring REST ... | blurbs[i % blurbs.length]; |
1,022,871 | void expandColumns() {<NEW_LINE>if (!isUndefinedWidth()) {<NEW_LINE>int usedSpace = calcColumnUsedSpace();<NEW_LINE>float[] actualExpandRatio = calcColumnExpandRatio();<NEW_LINE>// Round down to avoid problems with fractions (100.1px available -><NEW_LINE>// can use 100, not 101)<NEW_LINE>int availableSpace = (int) Lay... | * actualExpandRatio[i] / expandRatioSum); |
1,537,648 | final GetLifecyclePolicyPreviewResult executeGetLifecyclePolicyPreview(GetLifecyclePolicyPreviewRequest getLifecyclePolicyPreviewRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getLifecyclePolicyPreviewRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | endClientExecution(awsRequestMetrics, request, response); |
99,917 | private boolean convergence(List<Page> pages) {<NEW_LINE>double aveHubDelta = 100;<NEW_LINE>double aveAuthDelta = 100;<NEW_LINE>if (pages == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// get current values from pages<NEW_LINE>double[] currHubVals = new <MASK><NEW_LINE>double[] currAuthVals = new double[pages.siz... | double[pages.size()]; |
190,925 | public ArtifactConfigInput unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ArtifactConfigInput artifactConfigInput = new ArtifactConfigInput();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonTok... | int originalDepth = context.getCurrentDepth(); |
1,054,219 | public void nullDefaultAnnotationIsRedundant(ASTNode location, Annotation[] annotations, Binding outer) {<NEW_LINE>if (outer == Scope.NOT_REDUNDANT)<NEW_LINE>return;<NEW_LINE>Annotation annotation = <MASK><NEW_LINE>int start = annotation != null ? annotation.sourceStart : location.sourceStart;<NEW_LINE>int end = annota... | findAnnotation(annotations, TypeIds.BitNonNullByDefaultAnnotation); |
79,602 | public void createMenuItems(Bundle savedInstanceState) {<NEW_LINE>Context ctx = getContext();<NEW_LINE>Bundle args = getArguments();<NEW_LINE>if (ctx == null || args == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String contentsJson = args.getString(CONTENTS_JSON_KEY);<NEW_LINE>if (contentsJson == null) {<NEW_LINE>ret... | (container).create()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.