idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
41,026 | public static void main(String[] args) throws Exception {<NEW_LINE>DialogViewer.prepare();<NEW_LINE>KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA", "BC");<NEW_LINE>KeyPair caKeyPair = keyGen.genKeyPair();<NEW_LINE>X509CertificateGenerator certGen = new X509CertificateGenerator(X509CertificateVersion.VERSI... | Hex.decode("1122334455667788990011223344556677889900"))); |
301,045 | public static void main(String[] args) {<NEW_LINE>System.setProperty("picocli.trace", "DEBUG");<NEW_LINE>PrintCommand printCommand = new PrintCommand();<NEW_LINE><MASK><NEW_LINE>args = "--paper A4 A.pdf --count 3 B.pdf --rotate left C.pdf ** D.pdf --rotate right E.pdf".split(" ");<NEW_LINE>cmd.parseArgs(args);<NEW_LINE... | CommandLine cmd = new CommandLine(printCommand); |
619,028 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.<MASK><NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>player.surveil(2, source, game);<NEW_LINE>Target target = new TargetCardInYourGraveyard(new FilterInstantOrSorceryCard("instant or sorcery card from your grave... | getPlayer(source.getControllerId()); |
1,659,043 | static ArrayList<SequenceSearchState> buildTransitionLevel(ArrayList<SequenceSearchState> prev, int pos) {<NEW_LINE>ArrayList<SequenceSearchState> res <MASK><NEW_LINE>Iterator<SequenceSearchState> iterator = prev.iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>// For each current state<NEW_LINE>SequenceSearc... | = new ArrayList<SequenceSearchState>(); |
894,732 | private static void openRuntimeModules(ReflectUtil.MethodRef addExportsOrOpens, Object manifoldModule) {<NEW_LINE>//<NEW_LINE>// Module: java.base<NEW_LINE>//<NEW_LINE>Object /*Module*/<NEW_LINE>javaBaseModule = ReflectUtil.method(Class.class, "getModule").invoke(String.class);<NEW_LINE>addExportsOrOpens.invoke(javaBas... | "java.lang.reflect", manifoldModule, true, true); |
1,241,781 | // node sensitivity function<NEW_LINE>private Function<DoubleArray, DoubleMatrix> createJacobianFunction(SabrIborCapletFloorletVolatilityCalibrationDefinition sabrDefinition, RatesProvider ratesProvider, SabrParametersIborCapletFloorletVolatilities volatilities, List<ResolvedIborCapFloorLeg> capList, List<Double> price... | = new double[nCaps][]; |
1,806,323 | protected boolean renameImpl(RepositoryModel oldRepository, RepositoryModel newRepository) {<NEW_LINE><MASK><NEW_LINE>if (jedis == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean success = false;<NEW_LINE>try {<NEW_LINE>Set<String> oldKeys = jedis.keys(oldRepository.name + ":*");<NEW_LINE>Transaction t = jed... | Jedis jedis = pool.getResource(); |
1,612,113 | final CreateDatasetGroupResult executeCreateDatasetGroup(CreateDatasetGroupRequest createDatasetGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDatasetGroupRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateDatasetGr... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,424,366 | public long writeHistogramEventCustomBins(String name, EventSubtype subtype, long time, int iteration, int epoch, INDArray bins, INDArray y) throws IOException {<NEW_LINE>Preconditions.checkState(y.rank() == 1, "Y array must be rank 1, got Y array with shape %ndShape", y);<NEW_LINE>Preconditions.checkState(bins.rank() ... | ), binRangesOffset, yOffset, 0); |
497,083 | public <T> It<T> createIterator(@Nonnull Iterable<? extends T> roots, @Nonnull final Function<T, ? extends Iterable<? extends T>> tree) {<NEW_LINE>final Condition<? super T> inRangeCondition = (Condition<? super T>) rangeCondition;<NEW_LINE>final Condition<? super T> notInRangeCondition = (Condition<? super T>) not(ran... | .filter(inRangeCondition), wrappedTree); |
1,516,969 | private BLangFunction generateMockFunction(String functionName) {<NEW_LINE>// Set the current mock object<NEW_LINE>this.mockFnObjectName = this.bLangPackage.getTestablePkg().getMockFunctionNamesMap().get(functionName);<NEW_LINE>// Reset both import and original functions<NEW_LINE>this.importFunction = null;<NEW_LINE>th... | .indexOf(MOCK_ANNOTATION_DELIMITER) + 1); |
1,571,263 | // Speech recognition from microphone.<NEW_LINE>public static void recognitionWithMicrophoneAsync() throws InterruptedException, ExecutionException {<NEW_LINE>// <recognitionWithMicrophone><NEW_LINE>// Creates an instance of a speech config with specified<NEW_LINE>// subscription key and service region. Replace with yo... | SpeechRecognizer recognizer = new SpeechRecognizer(config); |
1,560,042 | public void encode(float value, ByteArrayOutputStream out) {<NEW_LINE>if (!flag) {<NEW_LINE>flag = true;<NEW_LINE>preValue = Float.floatToIntBits(value);<NEW_LINE>leadingZeroNum = Integer.numberOfLeadingZeros(preValue);<NEW_LINE>tailingZeroNum = Integer.numberOfTrailingZeros(preValue);<NEW_LINE>out.write(preValue & 0xF... | TSFileConfig.FLOAT_VALUE_LENGTH - 1, 0); |
310,876 | public void LAPACK_dsbgvx(String arg0, String arg1, String arg2, IntBuffer arg3, IntBuffer arg4, IntBuffer arg5, DoubleBuffer arg6, IntBuffer arg7, DoubleBuffer arg8, IntBuffer arg9, DoubleBuffer arg10, IntBuffer arg11, DoubleBuffer arg12, DoubleBuffer arg13, IntBuffer arg14, IntBuffer arg15, DoubleBuffer arg16, IntBuf... | arg21, arg22, arg23, arg24); |
470,038 | public final boolean cancel() {<NEW_LINE>checkState(started, "Task is not running. Task: " + taskExecutor.<MASK><NEW_LINE>boolean canceled = taskExecutor.cancelExecution();<NEW_LINE>if (canceled) {<NEW_LINE>removeAfterDetachListener();<NEW_LINE>BackgroundTask<T, V> task = taskExecutor.getTask();<NEW_LINE>task.canceled(... | getTask().toString()); |
304,153 | // Visible for testing<NEW_LINE>static Resource buildResource(Map<String, String> sysEnv, DockerHelper dockerHelper) {<NEW_LINE>if (!isOnEcs(sysEnv)) {<NEW_LINE>return Resource.empty();<NEW_LINE>}<NEW_LINE>AttributesBuilder attrBuilders = Attributes.builder();<NEW_LINE>attrBuilders.put(ResourceAttributes.CLOUD_PROVIDER... | Level.WARNING, "Could not get docker container name from hostname.", e); |
729,241 | public void tableChanged(WTableModelEvent e) {<NEW_LINE>if (e.getColumn() != 0)<NEW_LINE>return;<NEW_LINE>log.config("Row=" + e.getFirstRow() + "-" + e.getLastRow() + ", Col=" + e.getColumn() + ", Type=" + e.getType());<NEW_LINE>// Matched From<NEW_LINE>int matchedRow = xMatchedTable.getSelectedRow();<NEW_LINE>KeyNameP... | .getValueAt(row, I_MATCHED)); |
1,129,610 | public Slices combine(Slices other) {<NEW_LINE>for (int i = 0; i < other.count; i++) {<NEW_LINE>if (!this.sliceKeys.contains(other.ids.get(i))) {<NEW_LINE>this.count++;<NEW_LINE>this.ids.add(other.ids.get(i));<NEW_LINE>this.times.add(other.times.get(i));<NEW_LINE>this.durs.add(other.durs.get(i));<NEW_LINE>this.cpus.add... | .cpus.get(i)); |
168,772 | public static void login(final JSONObject user, final Response response) {<NEW_LINE>try {<NEW_LINE>final String userId = user.optString(Keys.OBJECT_ID);<NEW_LINE>final JSONObject cookieJSONObject = new JSONObject();<NEW_LINE>cookieJSONObject.<MASK><NEW_LINE>final String b3Key = user.optString(UserExt.USER_B3_KEY);<NEW_... | put(Keys.OBJECT_ID, userId); |
625,752 | public List<Modification> modifications(ConsoleResult result) {<NEW_LINE>List<Modification> modifications = new ArrayList<>();<NEW_LINE>for (String change : result.output()) {<NEW_LINE>if (!StringUtils.isBlank(change)) {<NEW_LINE>String description = "";<NEW_LINE>try {<NEW_LINE>long revision = revisionFromChange(change... | (result.replaceSecretInfo(description)); |
1,200,688 | public static void main(String[] args) {<NEW_LINE>// load and convert the image into a usable format<NEW_LINE>BufferedImage image = UtilImageIO.loadImageNotNull(UtilIO.pathExample("particles01.jpg"));<NEW_LINE>// convert into a usable format<NEW_LINE>GrayF32 input = ConvertBufferedImage.convertFromSingle(image, null, G... | showWindow(panel, "Binary Operations", true); |
1,374,078 | private void checkRecipe() {<NEW_LINE>boolean reset = false;<NEW_LINE>if (heatableRecipe != null) {<NEW_LINE>if (!heatableRecipe.in().equals(inHeatable.getFluid())) {<NEW_LINE>heatableRecipe = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (coolableRecipe != null) {<NEW_LINE>if (!coolableRecipe.in().equals(inCoolable.getFluid... | getRecipeForInput(inHeatable.getFluid()); |
1,769,429 | final UpdateArchiveResult executeUpdateArchive(UpdateArchiveRequest updateArchiveRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateArchiveRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
934,015 | public static void main(String[] args) {<NEW_LINE>// create an arbitrary transform from world to camera reference frames<NEW_LINE>Se3_F64 worldToCamera = new Se3_F64();<NEW_LINE>worldToCamera.getT().setTo(5, 10, -7);<NEW_LINE>ConvertRotation3D_F64.eulerToMatrix(EulerType.XYZ, 0.1, -0.3, 0, worldToCamera.getR());<NEW_LI... | app.createObservations(worldToCamera, 100); |
1,270,820 | public void deserialize(ByteBuffer buffer) throws IllegalPathException {<NEW_LINE>int length = buffer.getInt();<NEW_LINE>byte[] bytes = new byte[length];<NEW_LINE>buffer.get(bytes);<NEW_LINE>path = new PartialPath(new String(bytes));<NEW_LINE>dataType = TSDataType.values()[buffer.get()];<NEW_LINE>encoding = TSEncoding.... | )[buffer.get()]; |
635,202 | private void checkForUpdates(final boolean autoRun) {<NEW_LINE>final Date now = new Date();<NEW_LINE>ResourceController.getResourceController().setProperty(LAST_UPDATE_CHECK_TIME, Long.toString(now.getTime()));<NEW_LINE>final String translatedWebUpdate = getWebUpdateUrl(ConnectionStatus.TRANSLATED.language);<NEW_LINE>f... | final String defaultWebUpdate = getWebUpdateUrl(DEFAULT_LANGUAGE); |
1,181,123 | private void putPlaceOrPublisherOrDate(Map<Field, String> fields, String elementName, Object object) {<NEW_LINE>Optional<IssuanceDefinition> issuanceDefinition = getElement(object, IssuanceDefinition.class);<NEW_LINE>Optional<PlaceDefinition> placeDefinition = getElement(object, PlaceDefinition.class);<NEW_LINE>Optiona... | (fields, elementName, pubOrEd)); |
149,747 | public void flatMap(Tuple6<Long, Integer, Integer, Vector, Object, double[]> value, Collector<Tuple2<Long, Object>> out) throws Exception {<NEW_LINE>Long timeStamps = System.currentTimeMillis();<NEW_LINE>if (value.f0 >= 0) {<NEW_LINE>Vector vec = value.f3;<NEW_LINE>double[] rval = kernel.calcLocalWx(coef, vec, startIdx... | (value.f0 + 1)); |
1,839,293 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>if (isSingleCell) {<NEW_LINE>if (itemsCount > 1 && ignoreHeightCheck()) {<NEW_LINE>super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(getCellHeight(MeasureSpec.getSize(widthMeasureSpec)) * itemsCount, MeasureSpec.EXACTLY));<NEW_... | itemsCount), MeasureSpec.EXACTLY)); |
715,347 | public void execute() throws UserException {<NEW_LINE>try (DatabaseSession tmpSession = getBimServer().getDatabase().createSession(OperationType.POSSIBLY_WRITE)) {<NEW_LINE>Project project = tmpSession.get(poid, OldQuery.getDefault());<NEW_LINE>project.setCheckinInProgress(0);<NEW_LINE>tmpSession.store(project);<NEW_LI... | .getOid(), authorization)); |
1,084,518 | public void write(DataOutput dataOutput) throws IOException {<NEW_LINE>if (iterators != null) {<NEW_LINE>dataOutput.writeInt(iterators.size());<NEW_LINE>for (IteratorSetting setting : getIterators()) setting.write(dataOutput);<NEW_LINE>} else {<NEW_LINE>dataOutput.writeInt(0);<NEW_LINE>}<NEW_LINE>if (ranges != null) {<... | getFirst().write(dataOutput); |
390,599 | public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain filterChain) throws IOException, ServletException {<NEW_LINE>final FilterPipeline filterPipeline = getFilterPipeline();<NEW_LINE>Context previous <MASK><NEW_LINE>HttpServletRequest request = (HttpServletRe... | = GuiceFilter.localContext.get(); |
865,102 | private void printMethods(JClassType c, String varName, String methodType, JAbstractMethod[] methodTypes) {<NEW_LINE>if (methodTypes != null) {<NEW_LINE>pb(varName + "." + methodType.toLowerCase() + "s = new " + methodType + "[] {");<NEW_LINE>for (JAbstractMethod m : methodTypes) {<NEW_LINE>MethodStub stub = new Method... | .isMethod().isFinal(); |
1,795,805 | protected void map(StaticBuffer key, Iterable<Entry> values, Context context) throws IOException, InterruptedException {<NEW_LINE>EntryArrayList <MASK><NEW_LINE>// KeyFilter check<NEW_LINE>if (!keyFilter.test(key)) {<NEW_LINE>log.debug("Skipping key {} based on KeyFilter", key);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// ... | al = EntryArrayList.of(values); |
628,396 | protected final void mainEntry(final String[] args) {<NEW_LINE>CommandLineProgram program = null;<NEW_LINE>try {<NEW_LINE>program = setupConfigAndExtractProgram(args, getPackageList(), <MASK><NEW_LINE>final Object result = runCommandLineProgram(program, args);<NEW_LINE>handleResult(result);<NEW_LINE>// no explicit Syst... | getClassList(), getCommandLineName()); |
874,633 | private Pair<InferenceResult, InferenceResult> inferFromArguments(final AnnotatedTypeFactory typeFactory, final Set<AFConstraint> afArgumentConstraints, final Set<TypeVariable> targets) {<NEW_LINE>Set<TUConstraint> <MASK><NEW_LINE>addConstraintsBetweenTargets(tuArgConstraints, targets, false, typeFactory);<NEW_LINE>Con... | tuArgConstraints = afToTuConstraints(afArgumentConstraints, targets); |
1,575,963 | protected void checkBuffer(@NonNull ByteBuffer byteBuffer, @NonNull MediaCodec.BufferInfo bufferInfo) {<NEW_LINE>if (forceKey && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {<NEW_LINE>forceKey = false;<NEW_LINE>requestKeyframe();<NEW_LINE>}<NEW_LINE>fixTimeStamp(bufferInfo);<NEW_LINE>if (!spsPpsSetted && type.... | onSpsPpsVps(oldSps, oldPps, oldVps); |
1,447,932 | public void run() {<NEW_LINE>int width = table.getWidth();<NEW_LINE>TableColumnModel cModel = table.getColumnModel();<NEW_LINE>int columnCount = cModel.getColumnCount();<NEW_LINE>if (tableColumns.length != columnCount) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (columnCount == 3) {<NEW_LINE>for (int i = 0; i < columnCou... | setPreferredWidth(width * 15 / 100); |
1,654,905 | public static void forceGenerateCache(Integer zoomLevel, Progress progressChannel) {<NEW_LINE>File[] files = Config.getWorldDir().listFiles((d, n) -> FileHelper.MCA_FILE_PATTERN.matcher(n).matches());<NEW_LINE>if (files == null || files.length == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>progressChannel.setMax(files.le... | zoomLevel, progressChannel, false, null); |
516,130 | public static void main(String[] args) {<NEW_LINE>boolean verbose = false;<NEW_LINE>EnumSet<FloatingPointFormat> formats = EnumSet.noneOf(FloatingPointFormat.class);<NEW_LINE>formats.add(FloatingPointFormat.FLOAT16);<NEW_LINE>formats.add(FloatingPointFormat.FLOAT32);<NEW_LINE>formats.add(FloatingPointFormat.FLOAT64);<N... | formats.add(FloatingPointFormat.FLOAT80); |
1,689,122 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NE... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,321,648 | private void processFacetFields(TaxonomyWriter taxoWriter, Map<String, List<FacetField>> byField, Document doc) throws IOException {<NEW_LINE>for (Map.Entry<String, List<FacetField>> ent : byField.entrySet()) {<NEW_LINE>String indexFieldName = ent.getKey();<NEW_LINE>IntsRefBuilder ordinals = new IntsRefBuilder();<NEW_L... | new SortedNumericDocValuesField(indexFieldName, ord)); |
1,428,466 | final PutTargetsResult executePutTargets(PutTargetsRequest putTargetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putTargetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutTargets"); |
1,810,617 | public void mergomatic(AccumuloClient client, String table, Text start, Text end, long goalSize, boolean force) throws MergeException {<NEW_LINE>try {<NEW_LINE>if (table.equals(MetadataTable.NAME)) {<NEW_LINE>throw new IllegalArgumentException("cannot merge tablets on the metadata table");<NEW_LINE>}<NEW_LINE>List<Size... | sizes, goalSize, force, false); |
300,284 | public static QueryQuotaPlanScheduleResponse unmarshall(QueryQuotaPlanScheduleResponse queryQuotaPlanScheduleResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryQuotaPlanScheduleResponse.setRequestId(_ctx.stringValue("QueryQuotaPlanScheduleResponse.RequestId"));<NEW_LINE>queryQuotaPlanScheduleResponse.setSuccess(_ctx.b... | (_ctx.stringValue("QueryQuotaPlanScheduleResponse.ErrorMessage")); |
57,279 | public synchronized ExecutorService createExecutorIfAbsent(URL url) {<NEW_LINE>Map<Integer, ExecutorService> executors = data.computeIfAbsent(EXECUTOR_SERVICE_COMPONENT_KEY, k -> new ConcurrentHashMap<>());<NEW_LINE>// Consumer's executor is sharing globally, key=Integer.MAX_VALUE. Provider's executor is sharing by pro... | , k -> createExecutor(finalUrl)); |
1,850,008 | public static String[] loadCommandData(File libraryFile) {<NEW_LINE>ArrayList<String> output = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>String command = Cooja.getExternalToolsSetting("PARSE_COMMAND");<NEW_LINE>if (command == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String line;<NEW_LINE>Process p = Runtime.g... | toArray(new String[0]); |
598,468 | public void onBindViewHolder(BlockStatisticsViewHolder holder, int position) {<NEW_LINE>final StatBlock item = items.get(position);<NEW_LINE>holder.valueText.setText(item.value);<NEW_LINE>holder.valueText.setTextColor(activeColor);<NEW_LINE>holder.<MASK><NEW_LINE>holder.titleText.setTextColor(ContextCompat.getColor(app... | titleText.setText(item.title); |
1,590,399 | private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String envName, String name, 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... | this.client.mergeContext(context); |
1,555,896 | public void marshall(UpdateAnswerRequest updateAnswerRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updateAnswerRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(updateAnswerRequest.getWork... | updateAnswerRequest.getNotes(), NOTES_BINDING); |
1,290,638 | public static ListClusterResponse unmarshall(ListClusterResponse listClusterResponse, UnmarshallerContext _ctx) {<NEW_LINE>listClusterResponse.setRequestId(_ctx.stringValue("ListClusterResponse.RequestId"));<NEW_LINE>listClusterResponse.setCode(_ctx.integerValue("ListClusterResponse.Code"));<NEW_LINE>listClusterRespons... | ("ListClusterResponse.ClusterList[" + i + "].CsClusterId")); |
1,398,994 | public void init(ServletConfig config) throws ServletException {<NEW_LINE>super.init(config);<NEW_LINE>final ServletContext context = config.getServletContext();<NEW_LINE>final StringBuilder servletLinks = new StringBuilder();<NEW_LINE>this.metricsEnabled = Boolean.parseBoolean(getParam(context.getInitParameter(METRICS... | .getInitParameter(HEALTHCHECK_URI_PARAM_KEY), DEFAULT_HEALTHCHECK_URI); |
390,119 | public static AlertProxy createAlert(EventProxy event, int minutes) {<NEW_LINE>if (!CalendarProxy.hasCalendarPermissions()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ContentResolver contentResolver = TiApplication.getInstance().getContentResolver();<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE><MASK>... | Calendar alarmTime = Calendar.getInstance(); |
545,114 | public void showCharacter(final RequestContext context) {<NEW_LINE>final AbstractFreeMarkerRenderer renderer <MASK><NEW_LINE>final Map<String, Object> dataModel = renderer.getDataModel();<NEW_LINE>dataModelService.fillHeaderAndFooter(context, dataModel);<NEW_LINE>dataModelService.fillRandomArticles(dataModel);<NEW_LINE... | = new SkinRenderer(context, "activity/character.ftl"); |
1,580,621 | private boolean isSupportClientInfo() {<NEW_LINE>Boolean isSupportClientInfo = getManagedConnection().isClientInfoSupported();<NEW_LINE>if (isSupportClientInfo != null) {<NEW_LINE>return isSupportClientInfo;<NEW_LINE>}<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>rs = getManagedConnection().getCachedDatabaseMe... | Level.SEVERE, "Cannot close resultset!", e); |
726,738 | public static DescribeAntChainConsortiumsV2Response unmarshall(DescribeAntChainConsortiumsV2Response describeAntChainConsortiumsV2Response, UnmarshallerContext _ctx) {<NEW_LINE>describeAntChainConsortiumsV2Response.setRequestId(_ctx.stringValue("DescribeAntChainConsortiumsV2Response.RequestId"));<NEW_LINE>describeAntCh... | ("DescribeAntChainConsortiumsV2Response.Result.AntConsortiums[" + i + "].CreateTime")); |
1,413,338 | // We still call Listener#onSeekProcessed() for backwards compatibility with listeners that<NEW_LINE>// don't implement onPositionDiscontinuity().<NEW_LINE>@SuppressWarnings("deprecation")<NEW_LINE>@Override<NEW_LINE>public void seekTo(int mediaItemIndex, long positionMs) {<NEW_LINE>MediaStatus mediaStatus = getMediaSt... | onPositionDiscontinuity(oldPosition, newPosition, DISCONTINUITY_REASON_SEEK); |
1,801,234 | private void renderReport() throws Exception {<NEW_LINE>Listitem selected = previewType.getSelectedItem();<NEW_LINE>//<NEW_LINE>// Place Common code outside the If else block<NEW_LINE>//<NEW_LINE>String path = System.getProperty("java.io.tmpdir");<NEW_LINE>String prefix = makePrefix(jasperPrint.getName());<NEW_LINE>if ... | FileOutputStream fos = new FileOutputStream(file); |
1,695,184 | protected void serializeTextClassifier(PrintWriter pw) throws Exception {<NEW_LINE>pw.printf("labelIndices.length=\t%d%n", labelIndices.size());<NEW_LINE>for (int i = 0; i < labelIndices.size(); i++) {<NEW_LINE>pw.printf("labelIndices[%d].size()=\t%d%n", i, labelIndices.get(i).size());<NEW_LINE>for (int j = 0; j < labe... | get(j).getLabel(); |
706,842 | public void onEvent(Event event) throws Exception {<NEW_LINE>if (Events.ON_CLICK.equals(event.getName())) {<NEW_LINE>Event evt = new Event(Events.ON_CLICK, _grid, event.getTarget());<NEW_LINE><MASK><NEW_LINE>} else if (Events.ON_DOUBLE_CLICK.equals(event.getName())) {<NEW_LINE>Event evt = new Event(Events.ON_DOUBLE_CLI... | Events.sendEvent(_grid, evt); |
1,257,011 | @Timed<NEW_LINE>@ExceptionMetered<NEW_LINE>public Response createDeploymentGroup(@Valid final DeploymentGroup deploymentGroup) {<NEW_LINE>try {<NEW_LINE>model.addDeploymentGroup(deploymentGroup);<NEW_LINE>return Response.ok(CREATED_RESPONSE).build();<NEW_LINE>} catch (DeploymentGroupExistsException ignored) {<NEW_LINE>... | ok(NOT_MODIFIED_RESPONSE).build(); |
1,684,225 | public Response<Void> deleteByIdWithResponse(String id, Boolean deleteRunningTasks, Context context) {<NEW_LINE>String groupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (groupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s... | Utils.getValueFromIdByName(id, "tasks"); |
1,327,464 | static public void apply(Bone bone, float targetX, float targetY, boolean compress, boolean stretch, boolean uniform, float alpha) {<NEW_LINE>if (bone == null)<NEW_LINE>throw new IllegalArgumentException("bone cannot be null.");<NEW_LINE>Bone p = bone.parent;<NEW_LINE>float pa = p.a, pb = p.b, pc = p.c, pd = p.d;<NEW_L... | - bone.arotation, tx, ty; |
1,629,855 | protected void createOrReplaceFunction(DdlBuffer apply, String procedureName, String historyTable, List<String> includedColumns) {<NEW_LINE>apply.append("create or replace function ").append(procedureName).append("() returns trigger as $$").newLine();<NEW_LINE>apply.append("declare").newLine().append(" lowerTs timesta... | append(" elsif (TG_OP = 'DELETE') then").newLine(); |
1,341,300 | public void notDuplicateGoldenResource(IAnyResource theGoldenResource, IAnyResource theTargetGoldenResource, MdmTransactionContext theMdmContext) {<NEW_LINE>validateNotDuplicateGoldenResourceRequest(theGoldenResource, theTargetGoldenResource);<NEW_LINE>Long goldenResourceId = myIdHelperService.getPidOrThrowException(th... | MdmLink mdmLink = oMdmLink.get(); |
1,576,932 | static void addAnnotatedFields(List<Monitor<?>> monitors, String id, TagList tags, Object obj) {<NEW_LINE>final Class<com.netflix.servo.annotations.Monitor> annoClass = com.netflix.servo.annotations.Monitor.class;<NEW_LINE>try {<NEW_LINE>Set<Field> fields = getFieldsAnnotatedBy(obj.getClass(), annoClass);<NEW_LINE>for ... | (config, obj, method)); |
575,843 | public static BigInteger createRandomPrime(int bitLength, int certainty, SecureRandom random) {<NEW_LINE>if (bitLength < 2) {<NEW_LINE>throw new IllegalArgumentException("bitLength < 2");<NEW_LINE>}<NEW_LINE>BigInteger rv;<NEW_LINE>if (bitLength == 2) {<NEW_LINE>return (random.nextInt() < 0) ? TWO : THREE;<NEW_LINE>}<N... | base = createRandom(bitLength, random); |
368,496 | private static void touch(File f, long minTime) {<NEW_LINE>for (int cnt = 0; ; cnt++) {<NEW_LINE><MASK><NEW_LINE>if (time > minTime) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (!f.exists()) {<NEW_LINE>LOG.log(Level.FINE, "File {0} does not exist anymore", f);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>LOG.log(Level.FINE, "Need ... | long time = f.lastModified(); |
1,768,540 | final DeleteListenerResult executeDeleteListener(DeleteListenerRequest deleteListenerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteListenerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | (super.beforeMarshalling(deleteListenerRequest)); |
343,777 | public boolean parseParameters(Object params) {<NEW_LINE>if (params == null || !(params instanceof BuildBattleDecorator))<NEW_LINE>return false;<NEW_LINE>this.params = (BuildBattleDecorator) params;<NEW_LINE>this.sourceBounds = this.params.getGoalStructureBounds();<NEW_LINE>this.destBounds = this.params.getPlayerStruct... | = this.params.getBlockTypeOnCorrectPlacement(); |
653,209 | public boolean visit(SQLSubqueryTableSource x) {<NEW_LINE>String subViewName = generateSubViewName();<NEW_LINE><MASK><NEW_LINE>if (parent instanceof SQLSelectQueryBlock) {<NEW_LINE>SQLSelectQueryBlock queryBlock = (SQLSelectQueryBlock) parent;<NEW_LINE>queryBlock.setFrom(subViewName, x.getAlias());<NEW_LINE>} else if (... | SQLObject parent = x.getParent(); |
32,385 | private void addInputsAndChangeOutputForTx(Transaction tx, Coin fee, BsqCoinSelector bsqCoinSelector) throws InsufficientBsqException {<NEW_LINE>Coin requiredInput;<NEW_LINE>// If our fee is less then dust limit we increase it so we are sure to not get any dust output.<NEW_LINE>if (Restrictions.isDust(fee)) {<NEW_LINE>... | requiredInput, wallet.calculateAllSpendCandidates()); |
1,361,676 | private List<String> findAllPossibilities(String str) {<NEW_LINE>List<String> result = new ArrayList<>();<NEW_LINE>if (str.length() == 1) {<NEW_LINE>result.add(str);<NEW_LINE>return result;<NEW_LINE>} else {<NEW_LINE>for (int i = 1; i < str.length(); i++) {<NEW_LINE>String integerPart = str.substring(0, i);<NEW_LINE>St... | floatPart = str.substring(i); |
87,473 | public void onPreviewNativeEvent(NativePreviewEvent event) {<NEW_LINE>if (getEventHandleStrategy().isDragInterrupted(event, managerMediator)) {<NEW_LINE>// end drag if ESC is hit<NEW_LINE>interruptDrag();<NEW_LINE>event.cancel();<NEW_LINE>event.getNativeEvent().preventDefault();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int... | ).handleKeyDownEvent(event, managerMediator); |
420,796 | private void handleHttpRequest(final HttpServerRequest request, final Map<String, Object> data) {<NEW_LINE>if (debug) {<NEW_LINE>setupMetrics(request);<NEW_LINE>logger.debug("HttpServerVertx::handleHttpRequest::{}:{}", request.method(), request.uri());<NEW_LINE>}<NEW_LINE>switch(request.method().toString()) {<NEW_LINE>... | ), simpleHttpServer.getHttpResponseCreator()); |
1,200,275 | protected ListenableFuture<Boolean> deleteNode(String path, boolean deleteChildrenIfNecessary) {<NEW_LINE>final SettableFuture<Boolean> result = SettableFuture.create();<NEW_LINE>try {<NEW_LINE>DeleteBuilder deleteBuilder = client.delete();<NEW_LINE>if (deleteChildrenIfNecessary) {<NEW_LINE>deleteBuilder = <MASK><NEW_L... | (DeleteBuilder) deleteBuilder.deletingChildrenIfNeeded(); |
1,672,504 | public static void copy(RealmModel realm, String newName, AuthenticationFlowModel from, AuthenticationFlowModel to) {<NEW_LINE>realm.getAuthenticationExecutionsStream(from.getId()).forEachOrdered(execution -> {<NEW_LINE>if (execution.isAuthenticatorFlow()) {<NEW_LINE>AuthenticationFlowModel subFlow = realm.getAuthentic... | copy = realm.addAuthenticationFlow(copy); |
9,114 | public CmdDesc commandDescription(List<String> args) {<NEW_LINE>CommandLine sub = findSubcommandLine(args, args.size());<NEW_LINE>if (sub == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>CommandSpec spec = sub.getCommandSpec();<NEW_LINE>Help cmdhelp = new picocli.CommandLine.Help(spec);<NEW_LINE>List<AttributedStri... | , HelpException.defaultStyle())); |
604,363 | public Object execute(ExecutionEvent event) throws ExecutionException {<NEW_LINE><MASK><NEW_LINE>if (applicationContext instanceof IEvaluationContext) {<NEW_LINE>IEvaluationContext evaluationContext = (IEvaluationContext) applicationContext;<NEW_LINE>Object variable = evaluationContext.getVariable(ISources.ACTIVE_EDITO... | Object applicationContext = event.getApplicationContext(); |
1,318,982 | // Set up AuthenticationFlowContext error.<NEW_LINE>private boolean badPasswordHandler(AuthenticationFlowContext context, UserModel user, boolean clearUser, boolean isEmptyPassword) {<NEW_LINE>context.getEvent().user(user);<NEW_LINE>context.getEvent(<MASK><NEW_LINE>if (isUserAlreadySetBeforeUsernamePasswordAuth(context... | ).error(Errors.INVALID_USER_CREDENTIALS); |
486,755 | private void initializeSettingsMenu() {<NEW_LINE>JMenu settingsMenu = new JMenu("Settings");<NEW_LINE>settingsMenu.setMnemonic(KeyEvent.VK_S);<NEW_LINE>// This is a scraping preference but fits better under the Settings menu<NEW_LINE>JMenuItem scrapersMenuItem = new JMenuItem("Amalgamation Settings...");<NEW_LINE>scrap... | getCurrentlySelectedMovieFileList().get(0); |
1,149,075 | private void loadNode409() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupFolderType_DefaultHttpsGroup_TrustList_OpenWithMasks_OutputArguments, new QualifiedName(0, "OutputArguments"), new LocalizedText("en", "OutputArguments"), Localiz... | setInput(new StringReader(xml)); |
220,177 | private boolean updateCache(final int startOffset, final int endOffset, OffsetsBag bag) {<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.fine("Updating cache: <" + startOffset + ", " + endOffset + ">");<NEW_LINE>}<NEW_LINE>for (int i = 0; i < layers.length; i++) {<NEW_LINE>if (blacklisted[i]... | + "]=" + layers[i]); |
1,428,804 | public DetectKeyPhrasesResult detectKeyPhrases(DetectKeyPhrasesRequest detectKeyPhrasesRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(detectKeyPhrasesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsReque... | invoke(request, responseHandler, executionContext); |
303,502 | default void populateJavaTypes(Map<String, Object> map, Object object) {<NEW_LINE>Class<?> targetClass = object.getClass();<NEW_LINE>Class<?> contentClass = null;<NEW_LINE>Class<?> keyClass = null;<NEW_LINE>map.put(JsonHeaders.TYPE_ID, targetClass);<NEW_LINE>if (object instanceof Collection && !((Collection<?>) object)... | put(JsonHeaders.CONTENT_TYPE_ID, contentClass); |
333,397 | public static StorageDirView selectDirWithRequestedSpace(long bytesToBeAvailable, BlockStoreLocation location, BlockMetadataEvictorView mManagerView) {<NEW_LINE>if (location.equals(BlockStoreLocation.anyTier())) {<NEW_LINE>for (StorageTierView tierView : mManagerView.getTierViews()) {<NEW_LINE>for (StorageDirView dirVi... | String tierAlias = location.tierAlias(); |
310,731 | protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {<NEW_LINE>final Labeled labeled = getSkinnable();<NEW_LINE>final Font font = text.getFont();<NEW_LINE>final ContentDisplay contentDisplay = labeled.getContentDisplay();<NEW_LINE>final <MASK><NEW_L... | double gap = labeled.getGraphicTextGap(); |
1,576,564 | private void inputConstSumDetails(int questionNum, FeedbackConstantSumQuestionDetails questionDetails) {<NEW_LINE>if (!questionDetails.isDistributeToRecipients()) {<NEW_LINE>inputOptions(questionNum, questionDetails.getConstSumOptions());<NEW_LINE>}<NEW_LINE>if (questionDetails.isPointsPerOption()) {<NEW_LINE>click(get... | (questionDetails.getPoints())); |
666,412 | protected final ExitCode run(String[] args) {<NEW_LINE>// We need a console before parsing the args because it could fail with wrong<NEW_LINE>// arguments and we need to show the error.<NEW_LINE>this.console = getConsole(args);<NEW_LINE>// Configure logs location correctly before anything else. We want to write to the<... | console, "Execution was interrupted.", args, e); |
332,066 | public CtClass makeSubclass2(ClassPool pool, CtClass type) throws CannotCompileException, NotFoundException, IOException {<NEW_LINE>CtClass vec = pool<MASK><NEW_LINE>vec.setSuperclass(pool.get("java.util.Vector"));<NEW_LINE>CtClass c = pool.get("sample.vector.Sample2");<NEW_LINE>CtMethod addmethod = c.getDeclaredMethod... | .makeClass(makeClassName(type)); |
196,157 | private List<HollowBlobOptionalPartHeader> readPartHeaders(HollowBlobHeader header, Map<String, HollowBlobInput> inputsByPartName, MemoryMode mode) throws IOException {<NEW_LINE>if (inputsByPartName == null)<NEW_LINE>return Collections.emptyList();<NEW_LINE>List<HollowBlobOptionalPartHeader> list = new ArrayList<>(inpu... | " but was " + partHeader.getPartName()); |
1,100,133 | private void initActionMaps() {<NEW_LINE>// <editor-fold defaultstate="collapsed" desc="Init of action-maps so we have shortcuts for the tables"><NEW_LINE>// create action which should be executed when the user presses<NEW_LINE>// the enter-key<NEW_LINE>AbstractAction a_enter = new AbstractAction() {<NEW_LINE><NEW_LINE... | ).put(ks, "EnterKeyPressed"); |
309,455 | private void onMarkerSelected(Marker marker) {<NEW_LINE>// Zoom to current location<NEW_LINE>GeoPoint coordinate = new GeoPoint(Double.parseDouble(mCurlat), Double.parseDouble(mCurlon));<NEW_LINE>mController.setZoom(14.0);<NEW_LINE>mController.animateTo(coordinate);<NEW_LINE>marker.showInfoWindow();<NEW_LINE>scrollView... | findViewById(R.id.call); |
1,366,354 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>account = getAccount(getIntent());<NEW_LINE>if (account == null) {<NEW_LINE>finish();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>setContentView(R.layout.activity_with_toolbar_and_container);<NEW_LINE>toolbar = (Toolbar)... | RecyclerView recyclerView = new RecyclerView(this); |
1,799,068 | protected Field createEntityField(Datasource datasource, MetaProperty property) {<NEW_LINE>Lookup lookup = property.getAnnotatedElement().getAnnotation(Lookup.class);<NEW_LINE>if (lookup != null && lookup.type() == LookupType.DROPDOWN) {<NEW_LINE>DataComponents dataComponents = AppBeans.get(DataComponents.class);<NEW_L... | loader.setView(View.MINIMAL); |
435,715 | final ListTestGridProjectsResult executeListTestGridProjects(ListTestGridProjectsRequest listTestGridProjectsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTestGridProjectsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,007,812 | public void actionPerformed(@Nonnull AnActionEvent e) {<NEW_LINE>Project project = e.getRequiredData(CommonDataKeys.PROJECT);<NEW_LINE>String fileText = e.getData(PlatformDataKeys.FILE_TEXT);<NEW_LINE>VirtualFile file = e.getData(PlatformDataKeys.VIRTUAL_FILE);<NEW_LINE><MASK><NEW_LINE>String nameWithoutExtension = fil... | String extension = file.getExtension(); |
507,615 | public <K, V> void assertContainsExactly(AssertionInfo info, Map<K, V> actual, Entry<? extends K, ? extends V>[] entries) {<NEW_LINE>doCommonContainsCheck(info, actual, entries);<NEW_LINE>if (actual.isEmpty() && entries.length == 0)<NEW_LINE>return;<NEW_LINE>failIfEntriesIsEmptySinceActualIsNotEmpty(info, actual, entri... | notFound = new LinkedHashSet<>(); |
597,632 | public void configure(Binder binder) {<NEW_LINE>binder.bindConstant().annotatedWith(Names.named("serviceName")).to("druid/indexer");<NEW_LINE>binder.bindConstant().annotatedWith(Names.named("servicePort")).to(8091);<NEW_LINE>binder.bindConstant().annotatedWith(Names.named("tlsServicePort")).to(8291);<NEW_LINE>binder.bi... | DruidNode.class, Parent.class); |
237,412 | public static PackageAttributes forFileToStage(String source, String hash, String dest, String stagingPath) throws IOException {<NEW_LINE>final <MASK><NEW_LINE>if (!file.exists()) {<NEW_LINE>throw new FileNotFoundException(String.format("Non-existent file to stage: %s", file.getAbsolutePath()));<NEW_LINE>}<NEW_LINE>che... | File file = new File(source); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.