idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,473,733 | public Builder mergeWith(final Builder resourceBuilder) {<NEW_LINE>resourceBuilder.processMethodBuilders();<NEW_LINE>this.resourceMethods.addAll(resourceBuilder.resourceMethods);<NEW_LINE>this.childResources.addAll(resourceBuilder.childResources);<NEW_LINE>if (Resource.Builder.this.subResourceLocator != null && resourc... | .this, resourceBuilder, path)); |
1,085,497 | public Map<ByteBuffer, List<ColumnOrSuperColumn>> multiget_slice(String kvsMethodName, TableReference tableRef, List<ByteBuffer> keys, SlicePredicate predicate, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, TException {<NEW_LINE><MASK><NEW_LINE>int numberOf... | int numberOfKeys = keys.size(); |
1,516,712 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>String test = request.getParameter("test");<NEW_LINE>PrintWriter out = response.getWriter();<NEW_LINE>out.println("Starting " + test + "<br>");<NEW_LINE>// The injection engine doesn't like thi... | this, tc, test, e); |
1,013,197 | private Collection<? extends IPath> globalFolders() {<NEW_LINE>List<IPath> dirs <MASK><NEW_LINE>// FIXME Handle properly on Windows...<NEW_LINE>Map<String, String> env = ShellExecutable.getEnvironment(location);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String nodePath = env.get("NODE_PATH");<NEW_LINE>if (nodePath != null) {<NE... | = new ArrayList<IPath>(); |
771,397 | public static void horizontal9(Kernel1D_S32 kernel, GrayU8 input, GrayI16 output, int skip) {<NEW_LINE>final byte[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final i... | k6 = kernel.data[5]; |
1,842,806 | private String lookupVariableImpl(String variableName) throws ExpansionException {<NEW_LINE>if (variableName.equals("SRCS")) {<NEW_LINE>return Artifact.joinExecPaths(<MASK><NEW_LINE>}<NEW_LINE>if (variableName.equals("<")) {<NEW_LINE>return expandSingletonArtifact(resolvedSrcs, "$<", "input file");<NEW_LINE>}<NEW_LINE>... | " ", resolvedSrcs.toList()); |
552,268 | public static ArrayList<EventProxy> queryEvents(Uri uri, String query, String[] queryArgs, String orderBy) {<NEW_LINE>ArrayList<EventProxy> events = new ArrayList<>();<NEW_LINE>if (!CalendarProxy.hasCalendarPermissions()) {<NEW_LINE>return events;<NEW_LINE>}<NEW_LINE>ContentResolver contentResolver = TiApplication.getI... | location = eventCursor.getString(3); |
1,696,401 | public byte[] transform(ClassLoader loader, String className, Class<?> clazz, ProtectionDomain protectionDomain, byte[] bytes) {<NEW_LINE>if (loader == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (className == null || className.startsWith("java/") || className.startsWith("jdk/") || className.startsWith("sun/")... | ClassWriter(cr, ClassWriter.COMPUTE_MAXS); |
1,393,345 | private static FontInfo doGetFontAbleToDisplay(int codePoint, char[] remainingText, int start, int end, int size, @JdkConstants.FontStyle int style, boolean useLigatures, FontRenderContext context) {<NEW_LINE>if (style < 0 || style > 3)<NEW_LINE>style = Font.PLAIN;<NEW_LINE>synchronized (lock) {<NEW_LINE>FallBackInfo f... | getFontInfo(size, useLigatures, context); |
1,278,774 | public static RubyValue trace_var(RubyValue receiver, RubyArray args, RubyBlock block) {<NEW_LINE>if (null == args || args.size() < 1) {<NEW_LINE>int actual_argc = (null == args) ? 0 : args.size();<NEW_LINE>throw new RubyException(RubyRuntime.ArgumentErrorClass, "in `trace_var': wrong number of arguments (" + actual_ar... | , ObjectFactory.createProc(block)); |
1,652,483 | public void generateSharedComponents(GenerationContext context) {<NEW_LINE>super.generateSharedComponents(context);<NEW_LINE>AwsProtocolUtils.generateXmlParseBody(context);<NEW_LINE>AwsProtocolUtils.addItempotencyAutofillImport(context);<NEW_LINE>TypeScriptWriter writer = context.getWriter();<NEW_LINE><MASK><NEW_LINE>/... | writer.addDependency(AwsDependency.XML_BUILDER); |
1,015,510 | public EntityAggregate unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EntityAggregate entityAggregate = new EntityAggregate();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | class).unmarshall(context)); |
1,646,468 | private void drawVertical(Canvas c, RecyclerView parent) {<NEW_LINE>final int left = parent.getPaddingLeft() + leftPaddingPx;<NEW_LINE>final int right = parent.getWidth() - parent.getPaddingRight() - rightPaddingPx;<NEW_LINE>final int childCount = parent.getChildCount();<NEW_LINE>for (int i = showtopbottomdividers ? 0 ... | = top + mDivider.getIntrinsicHeight(); |
356,739 | public void createLayers(@NonNull OsmandMapTileView mapView) {<NEW_LINE>// first create to make accessible<NEW_LINE>mapTextLayer = new MapTextLayer(app);<NEW_LINE>// 5.95 all labels<NEW_LINE>mapView.addLayer(mapTextLayer, 5.95f);<NEW_LINE>// 8. context menu layer<NEW_LINE>contextMenuLayer = new ContextMenuLayer(app);<N... | mapView.addLayer(distanceRulerControlLayer, 7.9f); |
445,019 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.ibm.ws.recoverylog.spi.RecoveryAgent#processLeasesForPeers(com.ibm.ws.recoverylog.spi.FailureScope)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public ArrayList<String> processLeasesForPeers(String recoveryIdentity, String recoveryGroup) {<NEW_LINE>if (tc.isEntryEn... | debug(tc, "Need to recover: " + peer); |
1,576,316 | private void runAssertionInRange(RegressionEnvironment env, String epl, boolean not, AtomicInteger milestone) {<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportBean_S0(10));<NEW_LINE>env.sendEventBean(new SupportBean_S1(200));<NEW_LINE>env.milestoneInc(milestone);<NEW_LINE>env.a... | env, 200, 3, not); |
454,299 | public static void main(String[] args) {<NEW_LINE>int size = 8192;<NEW_LINE>if (args.length > 0) {<NEW_LINE>size = Integer.parseInt(args[0]);<NEW_LINE>}<NEW_LINE>int[] a = new int[size];<NEW_LINE>int[] b = new int[size];<NEW_LINE>int[] c = new int[size];<NEW_LINE>int[] result = new int[size];<NEW_LINE>Arrays.fill(a, 10... | System.out.println("Test success"); |
47,439 | protected void initView() {<NEW_LINE>super.initView();<NEW_LINE>mStoragePath = getAppInstance().getDocumentFile().getUri().toString();<NEW_LINE>mReaderKeepBright.bindPreference(PreferenceManager.PREF_READER_KEEP_BRIGHT, false);<NEW_LINE>mReaderHideInfo.bindPreference(PreferenceManager.PREF_READER_HIDE_INFO, false);<NEW... | bindPreference(PreferenceManager.PREF_READER_PAGING_REVERSE, false); |
472,153 | private void indexOrdinal(HollowObjectTypeReadState keyTypeState, int ordinal, int[] hashedRecordKeys, int[][] hashedFieldKeys, LongList hashedFieldKeyChains) {<NEW_LINE>int bucketMask = hashedRecordKeys.length - 1;<NEW_LINE>int bucket = <MASK><NEW_LINE>while (hashedRecordKeys[bucket] != ORDINAL_NONE) bucket = (bucket ... | hashKeyRecord(keyTypeState, ordinal) & bucketMask; |
449,935 | public State mouseWheelMoved(Widget widget, WidgetMouseWheelEvent event) {<NEW_LINE>Scene scene = widget.getScene();<NEW_LINE>int modifiers = scene.getInputBindings().getZoomActionModifiers();<NEW_LINE>if ((event.getModifiers() & modifiers) != modifiers)<NEW_LINE>return State.REJECTED;<NEW_LINE><MASK><NEW_LINE>double s... | int amount = event.getWheelRotation(); |
416,749 | private BatchFinderSchema createBatchFinderSchema(ResourceMethodDescriptor resourceMethodDescriptor) {<NEW_LINE>BatchFinderSchema batchFinder = new BatchFinderSchema();<NEW_LINE>batchFinder.setName(resourceMethodDescriptor.getBatchFinderName());<NEW_LINE>String doc = _docsProvider.getMethodDoc(resourceMethodDescriptor.... | MaxBatchSizeSchema maxBatchSize = resourceMethodDescriptor.getMaxBatchSize(); |
855,744 | final RemoveLayerVersionPermissionResult executeRemoveLayerVersionPermission(RemoveLayerVersionPermissionRequest removeLayerVersionPermissionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(removeLayerVersionPermissionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveLayerVersionPermission"); |
1,750,305 | public static ClassificationMetrics of(double fitTime, double scoreTime, int[] truth, int[] prediction, double[][] posteriori) {<NEW_LINE>if (posteriori[0].length == 2) {<NEW_LINE>double[] probability = Arrays.stream(posteriori).mapToDouble(p -> p[1]).toArray();<NEW_LINE>return new ClassificationMetrics(fitTime, scoreT... | .of(truth, probability)); |
1,354,014 | public void refresh() {<NEW_LINE>Map<String, UnderDatabaseFactory> map = new HashMap<>();<NEW_LINE>String libDir = PathUtils.concatPath(ServerConfiguration.global().get(PropertyKey.HOME), "lib");<NEW_LINE>LOG.info("Loading udb jars from {}", libDir);<NEW_LINE>List<File> files = new ArrayList<>();<NEW_LINE>try (Director... | .toURI().toURL(); |
851,522 | private Object addScalarAdjustment(Object opObj, Address addr, Scalar originalScalar, boolean scalarOperand) {<NEW_LINE>if (originalScalar == null) {<NEW_LINE>return opObj;<NEW_LINE>}<NEW_LINE>long originalValue = (addr.isStackAddress() && originalScalar.bitLength() == addr.getAddressSpace().getSize()) ? originalScalar... | SegmentedAddress) addr).getSegmentOffset(); |
1,599,575 | public OSSAsyncTask<UploadPartResult> uploadPart(UploadPartRequest request, final OSSCompletedCallback<UploadPartRequest, UploadPartResult> completedCallback) {<NEW_LINE>RequestMessage requestMessage = new RequestMessage();<NEW_LINE>requestMessage.setIsAuthorizationRequired(request.isAuthorizationRequired());<NEW_LINE>... | checkCRC64(request, result, completedCallback); |
517,902 | public static void horizontal(Kernel1D_S32 kernel, GrayS32 input, GrayS32 output) {<NEW_LINE>final int[] dataSrc = input.data;<NEW_LINE>final int[] dataDst = output.data;<NEW_LINE>final int[] dataKer = kernel.data;<NEW_LINE>final int kernelWidth = kernel.getWidth();<NEW_LINE>final int offsetL = kernel.getOffset();<NEW_... | .startIndex + i * output.stride; |
89,500 | public static void prepareAlert(String type, String summary, String detail) {<NEW_LINE>try {<NEW_LINE>Map<String, Object> attrMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();<NEW_LINE>if (isEmpty(type)) {<NEW_LINE>attrMap.put("alertType", "information");<NEW_LINE>} else if (!(type.equals("i... | .encode(detail, "UTF-8")); |
1,596,318 | public boolean validate() throws ContractValidateException {<NEW_LINE>if (this.any == null) {<NEW_LINE>throw new ContractValidateException(ActuatorConstant.CONTRACT_NOT_EXIST);<NEW_LINE>}<NEW_LINE>if (chainBaseManager == null) {<NEW_LINE>throw new ContractValidateException(ActuatorConstant.STORE_NOT_EXIST);<NEW_LINE>}<... | = dynamicStore.getWitnessAllowanceFrozenTime() * FROZEN_PERIOD; |
1,295,211 | public Response searchDebug(@QueryParam("key") String apiToken, @QueryParam("q") String query, @QueryParam("fq") final List<String> filterQueries) {<NEW_LINE>User user = findUserByApiToken(apiToken);<NEW_LINE>if (user == null) {<NEW_LINE>return error(Response.Status.UNAUTHORIZED, "Invalid apikey ");<NEW_LINE>}<NEW_LINE... | JsonArrayBuilder itemsArrayBuilder = Json.createArrayBuilder(); |
574,595 | private boolean recoverSend() throws IOException {<NEW_LINE>int interval = conn.getHeartbeat() / 2;<NEW_LINE>interval = interval > 0 ? interval : 1;<NEW_LINE>int count = 0;<NEW_LINE>// as the connection is lost, there is no need to wait heart beat missing 8 times<NEW_LINE>// so we use reflection to fast the process<NEW... | warn(e1.getMessage()); |
961,432 | public Request<ListApprovedOriginsRequest> marshall(ListApprovedOriginsRequest listApprovedOriginsRequest) {<NEW_LINE>if (listApprovedOriginsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListApprovedOriginsRequest)");<NEW_LINE>}<NEW_LINE>Request<ListApprovedOriginsRequ... | request.setHttpMethod(HttpMethodName.GET); |
1,533,403 | private static String updateSignature(String originalSignature, String annotatedSignature, int updatePosition, MergeStrategy mergeStrategy) {<NEW_LINE>StringBuffer buf = new StringBuffer();<NEW_LINE>String signatureToReplace;<NEW_LINE>String postfix = null;<NEW_LINE>switch(updatePosition) {<NEW_LINE>case POSITION_FULL_... | '(', wrapper.signature) + 1; |
1,304,304 | public static Class<?> toClassWeld3(Object proxyFactory, ClassFile ct, Class<?> originalClass, ProxyServices proxyServices, ProtectionDomain domain) {<NEW_LINE>if (MAGIC_IN_PROGRESS.get()) {<NEW_LINE>try {<NEW_LINE>ClassLoader loader = originalClass.getClassLoader();<NEW_LINE>if (loader == null) {<NEW_LINE>loader = Thr... | .currentThread().getContextClassLoader(); |
1,635,736 | public static void showAbout(final Activity activity, final String versionName) {<NEW_LINE>Resources r = activity.getResources();<NEW_LINE>StringBuilder aboutText = new StringBuilder();<NEW_LINE>aboutText.append("<b>").append(r.getString(R.string.app_name)).append("</b><br />").append(r.getString(R.string.p_about_text,... | setMovementMethod(LinkMovementMethod.getInstance()); |
106,021 | public static OSelectStatement indexChainToStatement(OModifier modifier, OClass clazz, OExpression right, OCommandContext ctx) {<NEW_LINE>OClass queryClass = clazz;<NEW_LINE>OSelectStatement result = new OSelectStatement(-1);<NEW_LINE>result.target = new OFromClause(-1);<NEW_LINE>result.target.setItem(new OFromItem(-1)... | whereClause.baseExpression).negate = false; |
1,096,271 | public List<JoinTransactionBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {<NEW_LINE>final String id = decodingContext.getApplicationId();<NEW_LINE>final long baseTimestamp = decodingContext.getBaseTimestamp();<NEW_LINE>final long timestampDelta = decodingContext.getTimestampDelta(... | joinTransactionBoList = new ArrayList<>(); |
673 | private static int calcFrameSize(int header) {<NEW_LINE>int bitrateIdx = getField(header, BITRATE);<NEW_LINE>int layer = 3 - getField(header, LAYER);<NEW_LINE>int version = getField(header, VERSION);<NEW_LINE>int mpeg2 = version != 3 ? 1 : 0;<NEW_LINE>int bitRate = bitrateTable[mpeg2][layer][bitrateIdx] * 1000;<NEW_LIN... | || version == MPEG2 ? 1 : 0; |
240,734 | public void unloadContext(String name) {<NEW_LINE>log.debug("Un-load context - name: {}", name);<NEW_LINE>ApplicationContext context = contextMap.remove(name);<NEW_LINE>log.debug("Context from map: {}", context);<NEW_LINE>String[] bnames = BeanFactoryUtils.beanNamesIncludingAncestors(context);<NEW_LINE>for (String bnam... | log.debug("Context does not contain singleton: {}", name); |
762,911 | public void doInit(AppContext appContext) throws Throwable {<NEW_LINE>List<RenderDef> renderInfoList = <MASK><NEW_LINE>for (RenderDef renderInfo : renderInfoList) {<NEW_LINE>String renderName = renderInfo.getRenderName();<NEW_LINE>logger.info("web -> renderName {}.", renderName);<NEW_LINE>this.engineMap.put(renderName.... | appContext.findBindingBean(RenderDef.class); |
1,138,502 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ws_call" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>if (size < 2) {<NEW_LINE>MessageManager mm = EngineMessag... | toString() + ":" + n); |
267,335 | private void sendServiceFault(ChannelHandlerContext ctx, UInteger requestHandle, Throwable fault) {<NEW_LINE>StatusCode statusCode = UaException.extract(fault).map(UaException::getStatusCode).orElse(StatusCode.BAD);<NEW_LINE>ServiceFault serviceFault = new ServiceFault(new ResponseHeader(DateTime.now(), requestHandle, ... | HttpHeaderNames.CONNECTION, HttpHeaderValues.KEEP_ALIVE); |
439,239 | public static Cell<Double> pausableClock(Stream<Unit> sPause, Stream<Unit> sResume, Cell<Double> clock) {<NEW_LINE>Cell<Optional<Double>> pauseTime = sPause.snapshot(clock, (u, t) -> Optional.<Double>of(t)).orElse(sResume.map(u -> Optional.<Double>empty())).hold(Optional.<Double>empty());<NEW_LINE>Cell<Double> lostTime... | .sample().get(); |
213,687 | private void clearAll() {<NEW_LINE>if (this.listview == null) {<NEW_LINE>this.listview = this.findViewById(R.id.listview);<NEW_LINE>}<NEW_LINE>ListAdapter adapter = listview.getAdapter();<NEW_LINE>if (adapter != null) {<NEW_LINE>int count = adapter.getCount(), item;<NEW_LINE>for (item = 0; item < count; item++) {<NEW_L... | BaseAdapter) adapter).notifyDataSetChanged(); |
429,919 | public void selectCategory(final String name) {<NEW_LINE>// prevent clicking on category button when panel not initialized<NEW_LINE>new EventTool().waitNoEvent(300);<NEW_LINE>final <MASK><NEW_LINE>new JLabelOperator(this, new ComponentChooser() {<NEW_LINE><NEW_LINE>public boolean checkComponent(Component comp) {<NEW_LI... | StringComparator comparator = this.getComparator(); |
1,684,164 | private void executeInternal(OCommandContext ctx, OResultInternal result) {<NEW_LINE>ODatabase db = ctx.getDatabase();<NEW_LINE>OClassEmbedded clazz = (OClassEmbedded) db.getMetadata().getSchema().getClass(className.getStringValue());<NEW_LINE>if (clazz == null) {<NEW_LINE>throw new OCommandExecutionException("Class no... | .toUpperCase(Locale.ENGLISH)); |
985,285 | public void createMqProducer() throws MQClientException {<NEW_LINE>DefaultMQProducer producer = new DefaultMQProducer(rocketmqConfig.getProducerGroup());<NEW_LINE>producer.setNamesrvAddr(rocketmqConfig.getNamesrvAddr());<NEW_LINE>if (StrUtil.isNotBlank(rocketmqConfig.getNamespace())) {<NEW_LINE>producer.setNamespace(ro... | setRetryTimesWhenSendAsyncFailed(rocketmqConfig.getRetryTimesWhenSendAsyncFailed()); |
1,529,621 | protected void lowerLoadHubOrNullNode(LoadHubOrNullNode loadHubOrNullNode, LoweringTool tool) {<NEW_LINE>StructuredGraph graph = loadHubOrNullNode.graph();<NEW_LINE>if (tool.getLoweringStage() != LoweringTool.StandardLoweringStage.LOW_TIER) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (graph.getGuardsStage().allowsFloatin... | ValueNode[] { nullHub, hub }; |
1,600,510 | final CreateListenerResult executeCreateListener(CreateListenerRequest createListenerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createListenerRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateListenerRequest> request = nu... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
172,527 | public static GetMappingsResponse fromXContent(XContentParser parser) throws IOException {<NEW_LINE>if (parser.currentToken() == null) {<NEW_LINE>parser.nextToken();<NEW_LINE>}<NEW_LINE>XContentParserUtils.ensureExpectedToken(parser.currentToken(), XContentParser.Token.START_OBJECT, parser);<NEW_LINE>Map<String, Object... | .getValue().getClass(); |
593,071 | public boolean waitForTransactionFinished(Database db, long transactionId, long timeoutMillis) throws TransactionCommitFailedException {<NEW_LINE>TransactionState transactionState = null;<NEW_LINE>readLock();<NEW_LINE>try {<NEW_LINE>transactionState = unprotectedGetTransactionState(transactionId);<NEW_LINE>} finally {<... | db.getFullName(), transactionId); |
851,283 | private void copyToTable(SnowflakeBatchServiceConfig config) throws SQLException {<NEW_LINE>SerializableFunction<Void, DataSource> dataSourceProviderFn = config.getDataSourceProviderFn();<NEW_LINE>List<String> filesList = config.getFilesList();<NEW_LINE>String database = config.getDatabase();<NEW_LINE>String schema = c... | dataSource.getConnection(), null); |
1,141,557 | public ProcessWrapper launchTranscode(DLNAResource dlna, DLNAMediaInfo media, OutputParams params) throws IOException {<NEW_LINE>// Use device-specific pms conf<NEW_LINE>PmsConfiguration prev = configuration;<NEW_LINE>configuration = (DeviceConfiguration) params.getMediaRenderer();<NEW_LINE>boolean isWindows = Platform... | String filename = dlna.getFileName(); |
1,416,420 | public void calculateJvmArgs(List<String> jvmArgs) {<NEW_LINE>File yourKitHome = YourKit.findYourKitHome();<NEW_LINE>if (yourKitHome == null) {<NEW_LINE>throw new IllegalArgumentException("Could not locate YourKit installation. Try setting the " + ENIVONMENT_VARIABLE + " environment variable");<NEW_LINE>}<NEW_LINE>File... | .getProfilerOutputBaseName() + ",port=" + PORT; |
1,565,310 | public void refreshRecentFileOnClose(String fileName, JInternalFrame[] frames) throws Throwable {<NEW_LINE>if (!StringUtils.isValidString(fileName)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (frames == null || frames.length == 0)<NEW_LINE>return;<NEW_LINE>String tempFileName;<NEW_LINE>int point = -1;<NEW_LINE>for (int ... | [i].setText(tempFileName); |
866,061 | public DigitalTwinsEndpointResource deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.<MASK><NEW_LINE>}<NEW_LIN... | format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); |
163,777 | public List<RequestedConfigurationField> extractRequestedConfiguration(Map<String, Map<String, Object>> config) {<NEW_LINE>List<RequestedConfigurationField> result = Lists.newArrayList();<NEW_LINE>List<RequestedConfigurationField> booleanFields = Lists.newArrayList();<NEW_LINE>for (Map.Entry<String, Map<String, Object>... | add(new BooleanField(entry)); |
351,647 | private Map<Integer, InsnFormatter> registerFormatters() {<NEW_LINE>Map<Integer, InsnFormatter> map = new HashMap<>();<NEW_LINE>map.put(DexOpcodes.NOP, fi -> fi.getCodeWriter().add("nop"));<NEW_LINE>map.put(DexOpcodes.SGET_OBJECT, staticFieldInsn("sget-object"));<NEW_LINE>map.put(DexOpcodes.SPUT_BOOLEAN, staticFieldIns... | .MOVE, simpleInsn("move")); |
197,743 | public GeoResults<GeoLocation<byte[]>> decode(List<Object> parts, State state) {<NEW_LINE>List<GeoResult<GeoLocation<byte[]>>> result = new ArrayList<GeoResult<GeoLocation<byte[]>>>();<NEW_LINE>for (Object object : parts) {<NEW_LINE>if (object instanceof List) {<NEW_LINE>List<Object> vals = (<MASK><NEW_LINE>if (metric ... | (List<Object>) object); |
1,794,336 | public int compare(Template o1, Template o2) {<NEW_LINE>try {<NEW_LINE>Identifier id1 = APILocator.getIdentifierAPI().find(o1.getIdentifier());<NEW_LINE>if (id1.getHostId() == null)<NEW_LINE>id1 = null;<NEW_LINE>Identifier id2 = APILocator.getIdentifierAPI().find(o2.getIdentifier());<NEW_LINE>if (id2.getHostId() == nul... | compareTo(o2.getTitle()); |
1,744,243 | private static void createMainClass(@NonNull final String mainClassName, @NonNull final FileObject srcFolder, @NullAllowed String mainClassTemplate) throws IOException {<NEW_LINE>int lastDotIdx = mainClassName.lastIndexOf('.');<NEW_LINE>String mName, pName;<NEW_LINE>if (lastDotIdx == -1) {<NEW_LINE>mName = mainClassNam... | mt = DataObject.find(mainTemplate); |
259,749 | public int maxSumAfterOperation(int[] nums) {<NEW_LINE>int len = nums.length;<NEW_LINE>// dp[i][0] means the sum of all elements in the subarray up to index i without any number squared<NEW_LINE>// dp[i][1] means the sum of all elements in the subarray up to index i with nums[i] squared<NEW_LINE>// esentially, there ar... | = dp[0][1]; |
337,612 | public void unparse(SqlWriter writer, int leftPrec, int rightPrec) {<NEW_LINE>writer.keyword("REBALANCE");<NEW_LINE>if (this.target.equals(RebalanceTarget.TABLE)) {<NEW_LINE>writer.keyword("TABLE");<NEW_LINE>this.tableName.unparse(writer, leftPrec, rightPrec);<NEW_LINE>} else if (this.target.equals(RebalanceTarget.DATA... | .toStringTrueFalse(this.explain)); |
967,969 | protected void doInit() {<NEW_LINE>try (MemoryWorkspace ws = Nd4j.getWorkspaceManager().scopeOutOfWorkspaces()) {<NEW_LINE>org.deeplearning4j.nn.conf.layers.<MASK><NEW_LINE>sameDiff = SameDiff.create();<NEW_LINE>// Use SingleThreadArrayHolder so we can use views (also don't nede multithreading here, DL4J is not thread ... | samediff.SameDiffOutputLayer bl = layerConf(); |
178,305 | public ActionResult execute() {<NEW_LINE>String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID);<NEW_LINE>String studentEmail = getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL);<NEW_LINE>StudentProfileAttributes studentProfile = null;<NEW_LINE>if (studentEmail == null || courseId == null) {<NEW_LINE>s... | logic.getStudentForEmail(courseId, studentEmail); |
1,502,584 | public void updateInsPreds() {<NEW_LINE>LOG.info("------Update instance predictions------");<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>// 1. update predictions of training data<NEW_LINE>int nodeNum = this.forest[currentTree].nodes.size();<NEW_LINE>for (int nid = 0; nid < nodeNum; nid++) {<NEW_LINE>... | get(nid).getLeafValue(); |
1,391,762 | public static DescribeScalingInstancesResponse unmarshall(DescribeScalingInstancesResponse describeScalingInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeScalingInstancesResponse.setRequestId(_ctx.stringValue("DescribeScalingInstancesResponse.RequestId"));<NEW_LINE>describeScalingInstancesResponse.setTo... | ("DescribeScalingInstancesResponse.ScalingInstances[" + i + "].LaunchTemplateVersion")); |
345,836 | private void insertSessionAttributes(JdbcSession session, List<String> attributeNames) {<NEW_LINE>Assert.notEmpty(attributeNames, "attributeNames must not be null or empty");<NEW_LINE>try (LobCreator lobCreator = this.lobHandler.getLobCreator()) {<NEW_LINE>if (attributeNames.size() > 1) {<NEW_LINE>try {<NEW_LINE>this.j... | attributeName = attributeNames.get(0); |
1,691,269 | final GetPermissionPolicyResult executeGetPermissionPolicy(GetPermissionPolicyRequest getPermissionPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPermissionPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,854,730 | public void testToString() throws Exception {<NEW_LINE>CountDownLatch runningLatch = new CountDownLatch(1);<NEW_LINE>CountDownLatch continueLatch = new CountDownLatch(1);<NEW_LINE>CompletableFuture<Boolean> cf = noContextExecutor.supplyAsync(() -> {<NEW_LINE>System.out.println("> supply from testToString");<NEW_LINE>ru... | || s.contains("RUNNING")); |
1,240,884 | public ActionResult<Wo> call() throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Work work = emc.find(id, Work.class);<NEW_LINE>if (null == w... | items = new ArrayList<>(); |
1,608,052 | public JsonNode normalizeData(final EventNode event, final long timestamp, final long slot, final List<String> fillIds) {<NEW_LINE>final String side = event.eventFlags.bid ? "buy" : "sell";<NEW_LINE>if (event.eventFlags.fill) {<NEW_LINE>final ObjectNode fill = JsonNodeFactory.instance.objectNode();<NEW_LINE>fill.put("t... | fill.put("symbol", symbol); |
40,555 | public static BigDecimal discount(int p_C_Invoice_ID, Timestamp p_PayDate, int p_C_InvoicePaySchedule_ID) throws SQLException {<NEW_LINE>// Parameters<NEW_LINE>if (p_C_Invoice_ID == 0)<NEW_LINE>return null;<NEW_LINE>Timestamp PayDate = p_PayDate;<NEW_LINE>if (PayDate == null)<NEW_LINE>PayDate = new Timestamp(System.cur... | C_Currency_ID, C_PaymentTerm_ID, DateInvoiced, PayDate); |
1,521,178 | protected final void initProcessorList(Project proj, RunConfig config) {<NEW_LINE>// get the registered processors.<NEW_LINE>Lookup.Result<OutputProcessorFactory> result = Lookup.getDefault().lookupResult(OutputProcessorFactory.class);<NEW_LINE>Iterator<? extends OutputProcessorFactory> it = result.allInstances().itera... | new HashSet<OutputProcessor>(procs); |
922,082 | static void generateEncoderVarData(final StringBuilder sb, final List<Token> tokens, final int level) throws IOException {<NEW_LINE>for (int i = 0, size = tokens.size(); i < size; ) {<NEW_LINE>final Token <MASK><NEW_LINE>if (varDataToken.signal() != Signal.BEGIN_VAR_DATA) {<NEW_LINE>throw new IllegalStateException("tok... | varDataToken = tokens.get(i); |
1,614,957 | private void initializeResources() {<NEW_LINE>chatId = getIntent().getIntExtra(CHAT_ID_EXTRA, 0);<NEW_LINE>contactId = getIntent().getIntExtra(CONTACT_ID_EXTRA, 0);<NEW_LINE>chatIsMultiUser = false;<NEW_LINE>chatIsDeviceTalk = false;<NEW_LINE>chatIsMailingList = false;<NEW_LINE>chatIsBroadcast = false;<NEW_LINE>fromCha... | ).getBooleanExtra(FROM_CHAT, false); |
611,707 | protected TaskResult run(Config params, Config state, RedshiftConnectionConfig connectionConfig) {<NEW_LINE>UUID queryId;<NEW_LINE>// generate query id<NEW_LINE>if (!state.has(QUERY_ID)) {<NEW_LINE>// this is the first execution of this task<NEW_LINE>logger.debug("Generating query id for a new {} task", type());<NEW_LI... | , ConfigElement.copyOf(state)); |
645,736 | private static void unicodeEscape(char ch, CharVector charVector) {<NEW_LINE>charVector.add(JS_ESCAPE_CHAR);<NEW_LINE>if (ch < NUMBER_OF_JS_ESCAPED_CHARS && JS_CHARS_ESCAPED[ch] != 0) {<NEW_LINE>charVector.add(JS_CHARS_ESCAPED[ch]);<NEW_LINE>} else {<NEW_LINE>charVector.add('u');<NEW_LINE>charVector.add(NIBBLE_TO_HEX_C... | >> 8) & 0x0F]); |
775,855 | private static void allTheOtherLinesGrammar(LexerfulGrammarBuilder b) {<NEW_LINE>// if-section, if-group, # ifdef/ifndef<NEW_LINE>b.rule(ifdefLine).is(b.firstOf(IFDEF, IFNDEF), b.oneOrMore(WS), IDENTIFIER<MASK><NEW_LINE>// if-section, else-group, #else<NEW_LINE>b.rule(elseLine).is(ELSE, b.zeroOrMore(WS));<NEW_LINE>// i... | , b.zeroOrMore(WS)); |
616,868 | public QueryDataSet execute(QueryExpression queryExpression, long spacePartitionStartPos, long spacePartitionEndPos) throws IOException {<NEW_LINE>// convert the space partition constraint to the time partition constraint<NEW_LINE>ArrayList<TimeRange> resTimeRanges = new ArrayList<>(metadataQuerier.convertSpace2TimePar... | (i).getExpression()); |
1,547,071 | private final void printError() {<NEW_LINE>SharedCommandLineUtilities.printPrefix();<NEW_LINE>System.err.println("Name:");<NEW_LINE>System.err.println("\tTarsosDSP resynthesizer");<NEW_LINE>SharedCommandLineUtilities.printLine();<NEW_LINE>System.err.println("Synopsis:");<NEW_LINE>System.err.println("\tjava -jar Command... | += algo.name() + "\n\t\t\t\t"; |
837,065 | protected void assertJobEquals(final Job expected, final Job actual) {<NEW_LINE>final Builder expectedBuilder = expected.toBuilder();<NEW_LINE>// hack to make sure that any environment variables that were folded into the created job<NEW_LINE>// because of environment variables set at runtime on the test-running-agent a... | newHashMap(actual.getMetadata()); |
592,114 | private ResourceSpec associationToResourceSpec(ResourceSchema resourceSchema, AssociationSchema association) {<NEW_LINE>ActionSchemaArray actions = null, entityActions = null;<NEW_LINE>StringArray supports = association.getSupports();<NEW_LINE>if (association.hasActions()) {<NEW_LINE>actions = association.getActions();... | .TypeInfo(type, type)); |
1,809,231 | public Comparator<ExecutionTask> taskComparator(StrategyOptions strategyOptions) {<NEW_LINE>Comparator<PartitionInfo> comparator = Comparator.comparing(PartitionInfo::topic).thenComparingInt(PartitionInfo::partition);<NEW_LINE>Set<PartitionInfo> atMinIsr = new TreeSet<>(comparator);<NEW_LINE>Set<PartitionInfo> underMin... | ), underMinIsr, atMinIsr, true); |
1,108,834 | static // [START translate_create_glossary_beta]<NEW_LINE>Glossary createGlossary(String projectId, String location, String name, String gcsUri) {<NEW_LINE>try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {<NEW_LINE>LocationName locationName = LocationName.newBuilder().setProj... | addLanguageCodes("es").build(); |
1,416,324 | public static BlobIV<?> fromString(final String s) {<NEW_LINE>final char type = s.charAt(s.length() - 2);<NEW_LINE>final VTE vte = VTE.valueOf(type);<NEW_LINE>// everything after the '(' up to (but not including) the VTE type code.<NEW_LINE>final String t = s.substring(7, /* beginIndex */<NEW_LINE>s.length() - 3);<NEW_... | t.substring(pos + 1); |
658,373 | public void marshall(DescribeProvisioningParametersRequest describeProvisioningParametersRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (describeProvisioningParametersRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>p... | describeProvisioningParametersRequest.getAcceptLanguage(), ACCEPTLANGUAGE_BINDING); |
1,688,215 | public static void PP_Order(MPPOrder o) {<NEW_LINE>Properties ctx = o.getCtx();<NEW_LINE>String trxName = o.get_TrxName();<NEW_LINE>//<NEW_LINE>// Supply<NEW_LINE>MPPMRP mrpSupply = getQuery(o, TYPEMRP_Supply, ORDERTYPE_ManufacturingOrder).firstOnly();<NEW_LINE>if (mrpSupply == null) {<NEW_LINE>mrpSupply = new MPPMRP(c... | (o.getQtyDelivered())); |
1,352,737 | private // --------------//<NEW_LINE>FormLayout createLayout(int checkNb) {<NEW_LINE>// Build proper column specification<NEW_LINE>StringBuilder sbc = new StringBuilder();<NEW_LINE>// Covariance<NEW_LINE>sbc.append("center:pref").append(", ").append(COLUMN_GAP).append(", ");<NEW_LINE>// Name<NEW_LINE>sbc.append(" right... | (COLUMN_GAP).append(", "); |
705,735 | private Map<String, Object> createLast7DaysMap(ServerUUID serverUUID) {<NEW_LINE>Database db = dbSystem.getDatabase();<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>long weekAgo = now - <MASK><NEW_LINE>Map<String, Object> sevenDays = new HashMap<>();<NEW_LINE>sevenDays.put("unique_players", db.query(PlayerCo... | TimeUnit.DAYS.toMillis(7L); |
150,463 | protected void configureGraphicalViewer() {<NEW_LINE>super.configureGraphicalViewer();<NEW_LINE>DiagramEditorContextMenuProvider provider = new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());<NEW_LINE>getDiagramGraphicalViewer().setContextMenu(provider);<NEW_LINE>getSite().registerContextMenu(Actio... | = getSite().getPage(); |
304,822 | public static byte[] nonceGeneration(byte[] partialIV, byte[] senderID, byte[] commonIV, int nonceLength) throws OSException {<NEW_LINE>if (partialIV != null) {<NEW_LINE>if (senderID != null) {<NEW_LINE>if (commonIV != null) {<NEW_LINE>if (nonceLength > 0) {<NEW_LINE>int s = senderID.length;<NEW_LINE>int zeroes = 5 - p... | throw new IllegalArgumentException(ErrorDescriptions.NONCE_LENGTH_INVALID); |
556,067 | public String generateConstants() {<NEW_LINE>final String columnName = getColumnName();<NEW_LINE>final String columnNameUC = columnName.toUpperCase();<NEW_LINE>final ListInfo listInfo = getListInfo();<NEW_LINE>final <MASK><NEW_LINE>final String referenceName = listInfo.getName();<NEW_LINE>final StringBuilder javaCode =... | int AD_Reference_ID = listInfo.getAD_Reference_ID(); |
841,173 | public void run(RegressionEnvironment env) {<NEW_LINE>String fields = "count,escape,every,sum,avg,max,min,coalesce,median,stddev,avedev,events,first,last,unidirectional,pattern,sql,metadatasql,prev,prior,weekday,lastweekday,cast,snapshot,variable,window,left,right,full,outer,join";<NEW_LINE>env.compileDeploy("@name('s0... | , theEvent.get("stddev")); |
1,553,869 | public void appendHoverText(@Nonnull ItemStack stack, Level world, @Nonnull List<Component> tooltip, @Nonnull TooltipFlag flag) {<NEW_LINE>if (MekKeyHandler.isKeyPressed(MekanismKeyHandler.detailsKey)) {<NEW_LINE>tooltip.add(MekanismLang.CAPABLE_OF_TRANSFERRING.translateColored(EnumColor.DARK_GRAY));<NEW_LINE>tooltip.a... | tier.getTubeCapacity()))); |
1,506,057 | public Object visitIndexes(JsonPathParser.IndexesContext ctx) {<NEW_LINE>List<Object> results;<NEW_LINE>if (scope instanceof List) {<NEW_LINE>// noinspection unchecked<NEW_LINE>results = (List<Object>) scope;<NEW_LINE>} else if (scope instanceof Yaml.Sequence) {<NEW_LINE>Yaml.Sequence array = (Yaml.Sequence) scope;<NEW... | >(array.getEntries()); |
568,606 | CachedLayer writeUncompressed(Blob uncompressedLayerBlob, @Nullable DescriptorDigest selector) throws IOException {<NEW_LINE>// Creates the layers directory if it doesn't exist.<NEW_LINE>Files.createDirectories(cacheStorageFiles.getLayersDirectory());<NEW_LINE>// Creates the temporary directory. The temporary directory... | writeSelector(selector, writtenLayer.layerDigest); |
698,666 | public boolean validate() {<NEW_LINE>boolean result = false;<NEW_LINE>SearchDictionary vtsd = new SearchDictionary(DictionaryType.VALID_TEXT_MEDIA_TYPES);<NEW_LINE>for (int i = 0; i < epack.getManifest().itemsLength(); i++) {<NEW_LINE>ManifestItem mi = epack.<MASK><NEW_LINE>if (vtsd.isValidMediaType(mi.getMediaType()))... | getManifest().getItem(i); |
1,218,662 | public static byte[] privKeyTweakAdd(byte[] privkey, byte[] tweak) throws AssertFailException {<NEW_LINE>Preconditions.checkArgument(privkey.length == 32);<NEW_LINE>ByteBuffer byteBuff = nativeECDSABuffer.get();<NEW_LINE>if (byteBuff == null || byteBuff.capacity() < privkey.length + tweak.length) {<NEW_LINE>byteBuff = ... | byteBuff, Secp256k1Context.getContext()); |
8,778 | public static Object createItem(Class<?> clazz, int id, String title, int icon) {<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>Constructor initWithArgv = clazz.getConstructor(int.class, <MASK><NEW_LINE>return initWithArgv.newInstance(id, title, icon);<NEW_LINE>} catch (NoSuchMethodException unused) {<NEW_LINE>// no direct co... | String.class, int.class); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.