idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,556,270 | public void readFields(DataInput in) throws IOException {<NEW_LINE>state = TEtlState.valueOf(Text.readString(in));<NEW_LINE>trackingUrl = Text.readString(in);<NEW_LINE>int statsCount = in.readInt();<NEW_LINE>for (int i = 0; i < statsCount; ++i) {<NEW_LINE>String key = Text.readString(in);<NEW_LINE>String value = Text.r... | counters.put(key, value); |
1,542,055 | public void appendBatch(VectorAccessible batch) {<NEW_LINE>assert numPartitions == 1;<NEW_LINE>int recordCount = batch.getRecordCount();<NEW_LINE>currHVVector = new IntVector(MaterializedField.create(HASH_VALUE_COLUMN_NAME, HVtype), allocator);<NEW_LINE>currHVVector.allocateNew(recordCount);<NEW_LINE>try {<NEW_LINE>// ... | getValueVector().getTransferPair(allocator); |
606,367 | public void testAuthenticateMethodFL_ProtectedServlet1() throws Exception {<NEW_LINE>METHODS = "testMethod=authenticate,logout,login";<NEW_LINE>String url = "http://" + server.getHostname() + ":" + server.getHttpDefaultPort() + "/formlogin/ProgrammaticAPIServlet?" + METHODS + "&user=" + managerUser + "&password=" + man... | validUser, test2, NOT_MANAGER_ROLE, IS_EMPLOYEE_ROLE); |
1,132,911 | final CreateVPCEConfigurationResult executeCreateVPCEConfiguration(CreateVPCEConfigurationRequest createVPCEConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createVPCEConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
764,163 | public static void main(String[] args) {<NEW_LINE>Exercise30_ChiSquareStatistic chiSquareStatistic = new Exercise30_ChiSquareStatistic();<NEW_LINE>SeparateChainingHashTableChiSquare<Integer, Integer> separateChainingHashTableChiSquare = chiSquareStatistic.new SeparateChainingHashTableChiSquare<>(100, 20);<NEW_LINE>for ... | keysSize / (double) separateChainingHashTableChiSquare.size; |
1,410,893 | public void populateCredentials(Map<String, String> credentials) {<NEW_LINE>// Log the user in and get the TGT<NEW_LINE>try {<NEW_LINE>Configuration <MASK><NEW_LINE>ClientCallbackHandler client_callback_handler = new ClientCallbackHandler(login_conf);<NEW_LINE>// login our user<NEW_LINE>Configuration.setConfiguration(l... | login_conf = AuthUtils.GetConfiguration(conf); |
341,225 | public void handle(HttpRequest httpRequest, HttpResponse response) throws IOException {<NEW_LINE>int queries = Math.min(Math.max(NumberUtils.toInt(httpRequest.getParameter("queries"), 1), 1), 500);<NEW_LINE>World[] worlds = new World[queries];<NEW_LINE>try (Connection connection = dataSource.getConnection();<NEW_LINE>P... | (resultSet.getInt(2)); |
1,534,157 | protected void work() {<NEW_LINE>Map<TailFile, List<Map>> serverlogs = null;<NEW_LINE>try {<NEW_LINE>TailFile tf = (TailFile) this.get("tfevent");<NEW_LINE>this.setCurrenttfref((CopyOfProcessOfLogagent) this.get("tfref"));<NEW_LINE>// tfref = ((TaildirLogComponent) this.get("tfref"));<NEW_LINE>serverlogs = this.getCurr... | log.debug(this, "serverlogs is emptry!!!"); |
188,816 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>String appPackage = invokerPackage + ".app";<NEW_LINE>supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));<NEW_LINE>supportingFiles.add(new SupportingFile("build.mustache", "", "build.sbt"));<NEW_LINE>supportingFiles.add(new Supp... | sourceFolderByPackage(invokerPackage), "ScalatraBootstrap.scala")); |
134,310 | final DescribePublicIpv4PoolsResult executeDescribePublicIpv4Pools(DescribePublicIpv4PoolsRequest describePublicIpv4PoolsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePublicIpv4PoolsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,001,325 | public static DataPreprocessingHelper generateDataPreprocessingHelper(Path inputPaths, Path outputPath) throws IOException {<NEW_LINE>final List<Path> avroFiles = DataFileUtils.getDataFiles(inputPaths, DataFileUtils.AVRO_FILE_EXTENSION);<NEW_LINE>final List<Path> orcFiles = DataFileUtils.getDataFiles(inputPaths, DataFi... | "Cannot preprocess mixed AVRO files: %s and ORC files: %s in directories: %s", avroFiles, orcFiles, inputPaths); |
1,257,197 | // @Override<NEW_LINE>// public SpringAppDeploymentImpl withSourceCodeFolder(File sourceCodeFolder) {<NEW_LINE>// ensureSource();<NEW_LINE>// inner().properties().source().withType(UserSourceType.SOURCE);<NEW_LINE>// this.addDependency(<NEW_LINE>// context -> parent().getResourceUploadUrlAsync()<NEW_LINE>// .flatMap(op... | .properties().source(); |
1,610,138 | // Visible for testing<NEW_LINE>byte[] DERToJOSE(byte[] derSignature) throws SignatureException {<NEW_LINE>// DER Structure: http://crypto.stackexchange.com/a/1797<NEW_LINE>boolean derEncoded = derSignature[0] == 0x30 && derSignature.length != ecNumberSize * 2;<NEW_LINE>if (!derEncoded) {<NEW_LINE>throw new SignatureEx... | = new byte[ecNumberSize * 2]; |
1,353,516 | public GroupCandidate recipientIdToCandidate(@NonNull RecipientId recipientId) throws IOException {<NEW_LINE>final Recipient recipient = Recipient.resolved(recipientId);<NEW_LINE>ServiceId serviceId = recipient.getServiceId().orElse(null);<NEW_LINE>if (serviceId == null) {<NEW_LINE>throw new AssertionError("Non UUID me... | , recipient.getId())); |
552,883 | public static void parsePredicateLogicalCompare(Message.LogicalCompare.Builder logicalCompareBuilder, P predicate) {<NEW_LINE>if (predicate instanceof AndP) {<NEW_LINE>List<P> plist = ((AndP) predicate).getPredicates();<NEW_LINE>logicalCompareBuilder.setCompare(Message.CompareType.AND_RELATION);<NEW_LINE>int andPropId ... | ? null : predicate.getValue(); |
1,777,079 | public void run() {<NEW_LINE>double percentile = routerConfig.routerLatencyToleranceQuantile * 100;<NEW_LINE>for (Map.Entry<Resource, CachedHistogram> resourceToHistogram : getBlobLocalDcResourceToLatency.entrySet()) {<NEW_LINE>Resource resource = resourceToHistogram.getKey();<NEW_LINE>CachedHistogram histogram = resou... | percentile, histogram.getCachedValue()); |
1,102,630 | public void write(KeyValue keyValue) throws IOException {<NEW_LINE>byte[] kafkaKey = keyValue.hasKafkaKey() ? keyValue.getKafkaKey<MASK><NEW_LINE>long timestamp = keyValue.getTimestamp();<NEW_LINE>final int timestampLength = (keyValue.hasTimestamp()) ? 10 : 0;<NEW_LINE>// output size estimate<NEW_LINE>// 1 - map header... | () : new byte[0]; |
1,831,016 | private void fetchNextEdge() {<NEW_LINE>this.nextEdge = null;<NEW_LINE>while (true) {<NEW_LINE>while (this.currentToEdgesIter == null || !this.currentToEdgesIter.hasNext()) {<NEW_LINE>if (this.toIter == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.toIter.hasNext()) {<NEW_LINE>Object from = toIter.next();<NEW_L... | = this.currentToEdgesIter.next(); |
709,892 | public Map<SystemInfo, List<Section>> process() {<NEW_LINE>final Scale scale = sheet.getScale();<NEW_LINE>final int minDistanceFromStaff = scale.toPixels(constants.minDistanceFromStaff);<NEW_LINE>final StaffManager staffManager = sheet.getStaffManager();<NEW_LINE>// Filter to keep only the runs which stand outside of s... | (length / 2), y); |
1,335,477 | protected void prepareConsumerOffset() {<NEW_LINE>Map<TopicPartition, Long> beginningTimestamp = new HashMap<>();<NEW_LINE>long currentTimeMs = System.currentTimeMillis();<NEW_LINE>for (TopicPartition tp : _consumer.assignment()) {<NEW_LINE>if (tp.topic().equals(_brokerMetricSampleStoreTopic)) {<NEW_LINE>beginningTimes... | currentTimeMs - _sampleLoader.brokerMonitoringPeriodMs()); |
1,410,703 | public static void reRegisterHost(final ZooKeeperClient client, final String host, final String hostId) throws HostNotFoundException, KeeperException {<NEW_LINE>// * Delete everything in the /status/hosts/<hostname> subtree<NEW_LINE>// * Don't delete any history for the job (on the host)<NEW_LINE>// * DON'T touch anyth... | Paths.statusHostJobs(host))); |
1,229,606 | private boolean writeGroupResCtrlInfo(Map<String, GroupResCtrlEntity> groupResCtrlMap, StringBuilder strBuff, ProcessResult result) {<NEW_LINE>if (groupResCtrlMap.isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Map<String, String> inParamMap = new HashMap<>();<NEW_LINE>for (GroupResCtrlEntity entity : groupResCt... | (entity.getCreateDateStr())); |
1,334,391 | Optional<org.jreleaser.model.releaser.spi.User> findUser(String email, String name) throws RestAPIException {<NEW_LINE>logger.debug(RB.$("git.user.lookup"), name, email);<NEW_LINE>List<User> users = api.searchUser(CollectionUtils.<String, String>newMap("scope", "users", "search", email));<NEW_LINE>if (users != null && ... | , user.getWebUrl())); |
1,318,674 | void update_merge(Business business, List<WrapMerge> wraps, Process process) throws Exception {<NEW_LINE>List<String> ids = business.merge().listWithProcess(process.getId());<NEW_LINE>List<Merge> os = business.entityManagerContainer().list(Merge.class, ids);<NEW_LINE>for (Merge o : os) {<NEW_LINE>if (null == jpaInWrapL... | inCopier.copy(w, o); |
1,302,860 | protected void merge(ArrayState in1, ArrayState in2, ArrayState out) {<NEW_LINE>out.active.clear();<NEW_LINE>out.active.or(in1.active);<NEW_LINE>out.active.or(in2.active);<NEW_LINE>BitSet in2_excl = (BitSet) in2.active.clone();<NEW_LINE><MASK><NEW_LINE>for (int i = in1.active.nextSetBit(0); i >= 0; i = in1.active.nextS... | in2_excl.andNot(in1.active); |
1,097,092 | protected T instantiateAndValidate(Map<String, Object> pluginArgs, String id, Context pluginContext, PluginLookup.PluginClass pluginClass) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final Class<T> cls = (Class<T>) pluginClass.klass();<NEW_LINE>if (cls == null) {<NEW_LINE>throw new IllegalStateException("Unable ... | (ex).getCause()); |
1,162,514 | void refreshServers(MasterClientOuterClass.TabletLocationsPB tabletLocations) throws NonRecoverableException {<NEW_LINE>synchronized (tabletServers) {<NEW_LINE>// TODO not a fat lock with IP resolving in it<NEW_LINE>tabletServers.clear();<NEW_LINE>leaderIndex = NO_LEADER_INDEX;<NEW_LINE>List<UnknownHostException> looku... | (CommonTypes.PeerRole.LEADER)); |
1,232,144 | private void addTaxReturnBlock(Map<String, String> context, DocumentType type) {<NEW_LINE>Block block = new Block("^Steuerliche Ausgleichrechnung$");<NEW_LINE>type.addBlock(block);<NEW_LINE>block.set(new Transaction<AccountTransaction>().subject(() -> {<NEW_LINE>AccountTransaction t = new AccountTransaction();<NEW_LINE... | v.get("date"))); |
1,527,837 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>output.writeInt32(1, replicas_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>output.writeMessage(2, getSelector());<NEW_LINE... | output.writeInt32(9, minReadySeconds_); |
1,796,360 | public com.amazonaws.services.serverlessapplicationrepository.model.TooManyRequestsException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.serverlessapplicationrepository.model.TooManyRequestsException tooManyRequestsException = new com.amazonaws.services.serv... | int originalDepth = context.getCurrentDepth(); |
1,853,298 | void permitVerify() {<NEW_LINE>logDebug("permitVerify");<NEW_LINE>if (firstPin.length() == 1 && secondPin.length() == 1 && thirdPin.length() == 1 && fourthPin.length() == 1 && fifthPin.length() == 1 && sixthPin.length() == 1) {<NEW_LINE>hideKeyboard(this, 0);<NEW_LINE>if (sb.length() > 0) {<NEW_LINE>sb.delete(0, sb.len... | append(sixthPin.getText()); |
377,455 | public static CTTblPPr apply(CTTblPPr source, CTTblPPr destination) {<NEW_LINE>if (!isEmpty(source)) {<NEW_LINE>if (destination == null)<NEW_LINE>destination = Context.getWmlObjectFactory().createCTTblPPr();<NEW_LINE>destination.setLeftFromText(apply(source.getLeftFromText(), destination.getLeftFromText()));<NEW_LINE>d... | setTblpYSpec(source.getTblpYSpec()); |
747,238 | void recordRescanStepTimes(CMSRemark collection, String line) {<NEW_LINE>GCLogTrace clause;<NEW_LINE>double unloading = 0.0d, symbolTable = 0.0d, stringTable = 0.0d, stringAndSymbolTable = 0.0d;<NEW_LINE>if ((clause = CLASS_UNLOADING.parse(line)) != null)<NEW_LINE>unloading = clause.getDoubleGroup(2);<NEW_LINE>if ((cla... | symbolTable = clause.getDoubleGroup(2); |
76,688 | public final void typeIdentifier() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>PascalAST typeIdentifier_AST = null;<NEW_LINE>switch(LA(1)) {<NEW_LINE>case IDENT:<NEW_LINE>{<NEW_LINE>identifier();<NEW_LINE>astFactory.addASTChild(cur... | .create(LT(1)); |
1,497,463 | public Request<StartOnDemandAuditTaskRequest> marshall(StartOnDemandAuditTaskRequest startOnDemandAuditTaskRequest) {<NEW_LINE>if (startOnDemandAuditTaskRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(StartOnDemandAuditTaskRequest)");<NEW_LINE>}<NEW_LINE>Request<StartOnD... | request.addHeader("Content-Type", "application/x-amz-json-1.0"); |
1,529,625 | private // begin F196678.10<NEW_LINE>int determineHeartbeatTimeout(Map properties) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "determineHeartbeatTimeout", properties);<NEW_LINE>// How often should we heartbeat?<NEW_LINE>int heartbeatTimeout = JFapChannelCo... | heartbeatTimeout = Integer.parseInt(timeoutStr); |
1,752,020 | private Object[] createInstrumentedMethodPack15() {<NEW_LINE>String[] instrMethodClasses = new String[nInstrClasses];<NEW_LINE>int[] instrClassLoaderIds = new int[nInstrClasses];<NEW_LINE>byte[][] replacementClassFileBytes <MASK><NEW_LINE>for (int j = 0; j < nInstrClasses; j++) {<NEW_LINE>DynamicClassInfo clazz = (Dyna... | = new byte[nInstrClasses][]; |
697,589 | public <T1, T2, T3, R1, R2, R3, R> Higher<W1, R> forEach4(Higher<W1, T1> value1, Function<? super T1, ? extends Higher<W1, R1>> value2, BiFunction<? super T1, ? super R1, ? extends Higher<W1, R2>> value3, Function3<? super T1, ? super R1, ? super R2, ? extends Higher<W1, R3>> value4, Function4<? super T1, ? super R1, ?... | apply(in, ina, inb); |
1,850,394 | private String hashPassword(String password) {<NEW_LINE>int bcryptWork = Constants.DEFAULT_BCRYPT_WORK;<NEW_LINE>String envBcryptWork = System.getenv(Constants.BCRYPT_WORK_ENV);<NEW_LINE>if (!Strings.isNullOrEmpty(envBcryptWork)) {<NEW_LINE>try {<NEW_LINE>int <MASK><NEW_LINE>if (envBcryptWorkInt >= 4 && envBcryptWorkIn... | envBcryptWorkInt = Integer.parseInt(envBcryptWork); |
1,011,654 | private static void primeHTTPDeliveryServices(final String domain, final TrafficRouter tr, final LoadingCache<ZoneKey, Zone> dzc, final Zone zone, final DeliveryService ds, final CacheRegister data) throws TextParseException {<NEW_LINE>final Name edgeName = newName(ds.getRoutingName(), domain);<NEW_LINE>LOGGER.info("Pr... | .getZoneName(), ds)); |
1,119,351 | public boolean place(@Nonnull WorldGenLevel world, ChunkGenerator generator, Random rand, BlockPos pos, OreConfiguration config) {<NEW_LINE>float angle = rand.nextFloat() * (float) Math.PI;<NEW_LINE>float f1 = (float) config.size / 8.0F;<NEW_LINE>int i = Mth.ceil((f1 + 1.0F) / 2.0F);<NEW_LINE>float sin = Mth.sin(angle)... | = 2 * (2 + i); |
1,774,408 | public void changeEvent(final IChangeRecord record) {<NEW_LINE>if (log.isTraceEnabled()) {<NEW_LINE>log.trace(record);<NEW_LINE>}<NEW_LINE>{<NEW_LINE>final IV<?, ?> p = record.getStatement().p();<NEW_LINE>if (added.equals(p) || removed.equals(p)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!accept(record)) {<... | == ChangeAction.INSERTED ? added : removed; |
115,778 | private void evalCPU() {<NEW_LINE>int small = Evaluate.evaluateTrain(2, 4, 0, 1);<NEW_LINE>this.report.report(EncogBenchmark.STEPS, EncogBenchmark.STEP1, "Evaluate CPU, tiny= " + Format.formatInteger(small / 100));<NEW_LINE>int medium = Evaluate.evaluateTrain(10, 20, 0, 1);<NEW_LINE>this.report.report(EncogBenchmark.ST... | + Format.formatInteger(large)); |
376,607 | public FlagDefinition removeFlagDefinition(FlagDefinition flagDefinition) {<NEW_LINE>if (_flagDefinitions.containsValue(flagDefinition)) {<NEW_LINE>// Remove from category list<NEW_LINE>Set<FlagDefinition> categoryDefinitions = _flagCategories.get(flagDefinition.getCategory());<NEW_LINE>categoryDefinitions.remove(flagD... | removeRequires(flagDefinition.getId()); |
772,568 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String locationName, String failoverGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cann... | this.client.mergeContext(context); |
925,890 | protected final void mINT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {<NEW_LINE>int _ttype;<NEW_LINE>Token _token = null;<NEW_LINE><MASK><NEW_LINE>_ttype = INT;<NEW_LINE>int _saveIndex;<NEW_LINE>{<NEW_LINE>int _cnt610 = 0;<NEW_LINE>_loop610: do {<NEW_LINE>if (((LA(1) >=... | int _begin = text.length(); |
928,386 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* com.vaadin.client.ui.AbstractComponentConnector#onStateChanged(com.vaadin<NEW_LINE>* .client.communication.StateChangeEvent)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void onStateChanged(StateChangeEvent stateChangeEvent) {<NEW_LINE>super.onStateCha... | .getElement().getStyle(); |
1,590,317 | static SecretKey decryptAesKey(@NonNull byte[] encryptedAesKey) throws CryptoException {<NEW_LINE>// We only have 32/64 bytes AES key with either 256 or 512 bytes minus 42 bytes of data,<NEW_LINE>// so it should work without issues<NEW_LINE>KeyPair keyPair;<NEW_LINE>try {<NEW_LINE>KeyStoreManager keyStoreManager = KeyS... | throw new CryptoException("No KeyPair with alias " + RSA_KEY_ALIAS); |
679,930 | private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required an... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
634,608 | public static <T> RBFNetwork<T> fit(T[] x, double[] y, RBF<T>[] rbf, boolean normalized) {<NEW_LINE>if (x.length != y.length) {<NEW_LINE>throw new IllegalArgumentException(String.format("The sizes of X and Y don't match: %d != %d", x.length, y.length));<NEW_LINE>}<NEW_LINE>int n = x.length;<NEW_LINE>int m = rbf.length;... | w = qr.solve(b); |
46,795 | public static void replicatedMapYamlGenerator(Map<String, Object> parent, Config config) {<NEW_LINE>if (config.getReplicatedMapConfigs().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, Object> child = new LinkedHashMap<>();<NEW_LINE>for (ReplicatedMapConfig subConfigAsObject : config.getReplicatedMapConfi... | parent.put("replicatedmap", child); |
575,731 | public static boolean parseNorms(FieldMapper.Builder builder, String fieldName, String propName, Object propNode, Mapper.TypeParser.ParserContext parserContext) {<NEW_LINE>if (propName.equals("norms")) {<NEW_LINE>if (propNode instanceof Map) {<NEW_LINE>final Map<String, Object> properties = nodeMapValue(propNode, "norm... | DEPRECATION_LOGGER.deprecated("The [norms{enabled:true/false}] way of specifying norms is deprecated, please use " + "[norms:true/false] instead"); |
983,201 | private static void prepareData() throws IoTDBConnectionException, StatementExecutionException {<NEW_LINE>Session session = new Session(LOCAL_HOST, 6667, "root", "root");<NEW_LINE>session.open(false);<NEW_LINE>try {<NEW_LINE>session.setStorageGroup("root.sg1");<NEW_LINE>if (!session.checkTimeseriesExists(ROOT_SG1_D1_S1... | types.add(TSDataType.INT64); |
274,489 | public OutlierMetrics toMetrics() {<NEW_LINE>String[] labelStrs = new String[labels.length];<NEW_LINE>for (int i = 0; i < labels.length; i++) {<NEW_LINE>labelStrs[i] = labels[i].toString();<NEW_LINE>}<NEW_LINE>Params params = new Params();<NEW_LINE>Tuple3<ConfusionMatrix[], double[], EvaluationCurve[]> <MASK><NEW_LINE>... | threshCurves = extractThreshCurves(threshCMs, total); |
135,665 | public void subscribe(URL url, NotifyListener listener) {<NEW_LINE>super.subscribe(url, listener);<NEW_LINE>removeFailedSubscribed(url, listener);<NEW_LINE>try {<NEW_LINE>// Sending a subscription request to the server side<NEW_LINE>doSubscribe(url, listener);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Throwable t = e;<... | t.getMessage(), t); |
394,743 | public void validate(Update update) {<NEW_LINE>for (ValidationCapability c : getCapabilities()) {<NEW_LINE>validateFeature(c, Feature.update);<NEW_LINE>validateOptionalFeature(c, update.getFromItem(), Feature.updateFrom);<NEW_LINE>validateOptionalFeature(c, update.getStartJoins(), Feature.updateJoins);<NEW_LINE>validat... | validateOptionalOrderByElements(update.getOrderByElements()); |
1,303,542 | public void draw(Batch batch, float parentAlpha) {<NEW_LINE>validate();<NEW_LINE>drawBackground(batch, parentAlpha);<NEW_LINE>BitmapFont font = style.font;<NEW_LINE>Drawable selectedDrawable = style.selection;<NEW_LINE>Color fontColorSelected = style.fontColorSelected;<NEW_LINE>Color fontColorUnselected = style.fontCol... | -= leftWidth + background.getRightWidth(); |
89,278 | public static void send(@NotNull final Socket socket, final String host, final int port) throws IOException, SocksException {<NEW_LINE>final InputStream inputStream = socket.getInputStream();<NEW_LINE>final OutputStream outputStream = socket.getOutputStream();<NEW_LINE>final int lengthOfHost = host.getBytes(UTF_8).leng... | (byte) (port & 0xff); |
104,394 | void encode(PgEncoder encoder) {<NEW_LINE>this.encoder = encoder;<NEW_LINE>if (cmd.isSuspended()) {<NEW_LINE>encoder.writeExecute(cmd.cursorId(), cmd.fetch());<NEW_LINE>encoder.writeSync();<NEW_LINE>} else {<NEW_LINE>PgPreparedStatement ps = (PgPreparedStatement) cmd.preparedStatement();<NEW_LINE>if (cmd.isBatch()) {<N... | (CommandResponse.failure("Can not execute batch query with 0 sets of batch parameters.")); |
1,088,638 | public static void main(String[] args) throws Exception {<NEW_LINE>SystemProperties.getDefault().overrideParams("database.dir", "");<NEW_LINE>Source<byte[], byte[]> index = CommonConfig.getDefault().cachedDbSource("index");<NEW_LINE>Source<byte[], byte[]> blockDS = CommonConfig.getDefault().cachedDbSource("block");<NEW... | indexedBlockStore.init(index, blockDS); |
1,658,872 | public void run(final WorkingCopy working) throws IOException {<NEW_LINE>working.toPhase(Phase.RESOLVED);<NEW_LINE>TypeElement targetType = target.resolve(working);<NEW_LINE>if (targetType == null) {<NEW_LINE>// NOI18N<NEW_LINE>ErrorHintsProvider.LOG.log(Level.INFO, "Cannot resolve target.");<NEW_LINE>return;<NEW_LINE>... | TreeMaker make = working.getTreeMaker(); |
1,034,269 | public static Expression parse(final String expression) {<NEW_LINE>CompilerConfiguration cc = new CompilerConfiguration();<NEW_LINE>cc.setScriptBaseClass(DelegatingScript.class.getName());<NEW_LINE>ImportCustomizer icz = new ImportCustomizer();<NEW_LINE>icz.addImport("K8sRetagType", K8sRetagType.class.getName());<NEW_L... | .class).build()); |
1,660,414 | public Set<EventBean> lookup(EventBean theEvent, Map parent, Set<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context, ArrayList<Object> optionalKeyCollector, CompositeIndexQueryResultPostProcessor postProcessor) {<NEW_LINE>Object comparableStart = <MASK><NEW_LINE>if (optionalKeyCollector != null) ... | super.evaluateLookupStart(theEvent, context); |
1,026,859 | private void onMouseDoubleClick(MouseEvent e) {<NEW_LINE>if (e.button == 1) {<NEW_LINE>if (hoveringOnColumnResizer) {<NEW_LINE>columnBeingResized.pack(true);<NEW_LINE>resizingColumn = false;<NEW_LINE>scrollValuesObsolete = true;<NEW_LINE>handleHoverOnColumnHeader(e.x, e.y);<NEW_LINE>redraw();<NEW_LINE>return;<NEW_LINE>... | .get(rowElements[row]); |
158,510 | public static DescribeVulDetailsResponse unmarshall(DescribeVulDetailsResponse describeVulDetailsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVulDetailsResponse.setRequestId(_ctx.stringValue("DescribeVulDetailsResponse.RequestId"));<NEW_LINE>List<Cve> cves = new ArrayList<Cve>();<NEW_LINE>for (int i = 0; i < ... | ("DescribeVulDetailsResponse.Cves[" + i + "].CvssVector")); |
431,420 | static double[][] of(float[] data, float[] breaks) {<NEW_LINE>int k = breaks.length - 1;<NEW_LINE>if (k <= 1) {<NEW_LINE>throw new IllegalArgumentException("Invalid number of bins: " + k);<NEW_LINE>}<NEW_LINE>double[][] freq = new double[3][k];<NEW_LINE>for (int i = 0; i < k; i++) {<NEW_LINE>freq[0][i] = breaks[i];<NEW... | Arrays.binarySearch(breaks, d); |
1,415,986 | public void deleteShardDirectoryUnderLock(ShardLock lock, IndexSettings indexSettings, Consumer<Path[]> listener) throws IOException {<NEW_LINE>final ShardId shardId = lock.getShardId();<NEW_LINE>assert isShardLocked(shardId) : "shard " + shardId + " is not locked";<NEW_LINE>final Path[] paths = availableShardPaths(sha... | indexSettings.customDataPath(), shardId); |
1,166,743 | public InitiateBucketWormResult initiateBucketWorm(InitiateBucketWormRequest initiateBucketWormRequest) throws OSSException, ClientException {<NEW_LINE>assertParameterNotNull(initiateBucketWormRequest, "initiateBucketWormRequest");<NEW_LINE>String bucketName = initiateBucketWormRequest.getBucketName();<NEW_LINE>assertP... | HashMap<String, String>(); |
251,083 | public JComponent createComponent() {<NEW_LINE>ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<MethodSignatureSetting>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public MethodSignatureSetting createElement() {<NEW_LINE>// IdeFocusManager.getInstance(TwigSettingsForm.thi... | .tableView.getSelectedObject())); |
42,468 | private byte[] applySegmentation(final int mtuSize, final byte[] pdu) {<NEW_LINE>int srcOffset = 0;<NEW_LINE>int dstOffset = 0;<NEW_LINE>final int chunks = (pdu.length + (mtuSize - 1)) / mtuSize;<NEW_LINE>final int pduType = pdu[0];<NEW_LINE>if (chunks > 1) {<NEW_LINE>final byte[] segmentedBuffer = new byte[pdu.length ... | (GATT_SAR_END << 6) | pduType); |
1,805,101 | private void loadNode1184() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ProgramStateMachineType_ProgramDiagnostics_LastMethodInputArguments, new QualifiedName(0, "LastMethodInputArguments"), new LocalizedText("en", "LastMethodInputArguments"), LocalizedText.NULL_VALUE, UInteger.val... | .expanded(), true)); |
913,641 | private void generateRegisterGcRoot(Expr slotExpr, Expr gcRootExpr) {<NEW_LINE>if (stackVariable == null) {<NEW_LINE>throw new IllegalStateException("Call to ShadowStack.registerGCRoot must be dominated by " + "Mutator.allocStack");<NEW_LINE>}<NEW_LINE>slotExpr.acceptVisitor(this);<NEW_LINE>WasmExpression slotOffset = ... | address, gcRoot, WasmInt32Subtype.INT32); |
183,470 | public static DetectFaceAttributesResponse unmarshall(DetectFaceAttributesResponse detectFaceAttributesResponse, UnmarshallerContext _ctx) {<NEW_LINE>detectFaceAttributesResponse.setRequestId(_ctx.stringValue("DetectFaceAttributesResponse.RequestId"));<NEW_LINE>detectFaceAttributesResponse.setCode(_ctx.stringValue("Det... | ("DetectFaceAttributesResponse.Data.FaceInfos[" + i + "].FaceAttributes.Blur")); |
1,605,443 | private Node move(String hostname, Node.State toState, Agent agent, boolean keepAllocation, Optional<String> reason, NestedTransaction transaction) {<NEW_LINE>// TODO: Work out a safe lock acquisition strategy for moves. Lock is only held while adding operations to<NEW_LINE>// transaction, but lock must also be held wh... | illegal("Could not set " + node + " active: It has no allocation"); |
594,207 | public boolean handlesFile(IFile file) {<NEW_LINE>Set<String> fqns = getModule().getPathCache().getFqnForFile(file);<NEW_LINE>if (fqns == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>for (String fqn : fqns) {<NEW_LINE>if (fqn.length() > EXTENSIONS_PACKAGE.length() + 2) {<NEW_LINE>int iExt = fqn.indexOf(EXTENSIONS... | .replace('.', '/')); |
28,700 | private RemotingCommand processReplyMessageRequest(final ChannelHandlerContext ctx, final RemotingCommand request, final SendMessageContext sendMessageContext, final SendMessageRequestHeader requestHeader) {<NEW_LINE>final RemotingCommand response = RemotingCommand.createResponseCommand(SendMessageResponseHeader.class)... | setBornTimestamp(requestHeader.getBornTimestamp()); |
834,901 | protected void createPreViews() {<NEW_LINE>reflectionCam <MASK><NEW_LINE>refractionCam = new Camera(renderWidth, renderHeight);<NEW_LINE>// create a pre-view. a view that is rendered before the main view<NEW_LINE>reflectionView = new ViewPort("Reflection View", reflectionCam);<NEW_LINE>reflectionView.setClearFlags(true... | = new Camera(renderWidth, renderHeight); |
695,326 | public void addTargets(Iterable<Tuple3<Integer, Long, float[]>> iterable) {<NEW_LINE>List<Tuple3<Integer, Long, float[]>> cache = new ArrayList<>();<NEW_LINE>iterable.forEach(cache::add);<NEW_LINE>int dim = 0;<NEW_LINE>if (cache.size() > 0) {<NEW_LINE>dim = cache.get(0).f2.length;<NEW_LINE>}<NEW_LINE>ids = new long[cac... | float[cache.size()]; |
429,074 | public com.amazonaws.services.workspacesweb.model.ConflictException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.workspacesweb.model.ConflictException conflictException = new com.amazonaws.services.workspacesweb.model.ConflictException(null);<NEW_LINE><MASK><... | int originalDepth = context.getCurrentDepth(); |
1,027,908 | public void scrollLines(int firstLine, int lastLine, int distance) throws IOException {<NEW_LINE>final String CSI = "\033[";<NEW_LINE>// some sanity checks:<NEW_LINE>if (distance == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (firstLine < 0) {<NEW_LINE>firstLine = 0;<NEW_LINE>}<NEW_LINE>if (lastLine < firstLine) {<NEW... | (CSI).append('r'); |
714,899 | public int run(CommandLine cl) throws IOException {<NEW_LINE>String[] args = cl.getArgs();<NEW_LINE>BackupPRequest.Builder opts = BackupPRequest.newBuilder();<NEW_LINE>if (args.length >= 1) {<NEW_LINE>opts.setTargetDirectory(args[0]);<NEW_LINE>}<NEW_LINE>opts.setOptions(BackupPOptions.newBuilder().setRunAsync(true).set... | backup(opts.build()); |
1,446,837 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject().field("grant_type", grantType);<NEW_LINE>if (scope != null) {<NEW_LINE>builder.field("scope", scope);<NEW_LINE>}<NEW_LINE>if (username != null) {<NEW_LINE>builder.field("username", username);<NE... | kerberosTicketBytes, 0, kerberosTicketBytes.length); |
112,052 | public static Duration parse(String value) throws ParseException {<NEW_LINE>// Must end with "s".<NEW_LINE>if (value.isEmpty() || value.charAt(value.length() - 1) != 's') {<NEW_LINE>throw new ParseException("Invalid duration string: " + value, 0);<NEW_LINE>}<NEW_LINE>boolean negative = false;<NEW_LINE>if (value.charAt(... | seconds = Long.parseLong(secondValue); |
9,360 | private void moveNewBundlesToFelixLoadFolder(final File uploadFolderFile, final String[] pathnames) {<NEW_LINE>final File deployDirectory = new File(this.getFelixDeployPath());<NEW_LINE>try {<NEW_LINE>if (deployDirectory.exists() && deployDirectory.canWrite()) {<NEW_LINE>for (final String pathname : pathnames) {<NEW_LI... | ).create(), null); |
790,869 | public void checkLimitaions(SqlBlockRule rule, Long partitionNum, Long tabletNum, Long cardinality) throws AnalysisException {<NEW_LINE>if (rule.getPartitionNum() == 0 && rule.getTabletNum() == 0 && rule.getCardinality() == 0) {<NEW_LINE>return;<NEW_LINE>} else if (rule.getEnable()) {<NEW_LINE>if ((rule.getPartitionNum... | ", reach tablet_num : " + rule.getTabletNum()); |
551,888 | public void applyMigration() {<NEW_LINE>final long start = System.currentTimeMillis();<NEW_LINE>try {<NEW_LINE>if (curator.checkExists().forPath(PENDING_TASKS_ROOT) == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>for (Str... | .makePath(PENDING_TASKS_ROOT, pendingTaskId)); |
176,222 | final ListConfigurationSetsResult executeListConfigurationSets(ListConfigurationSetsRequest listConfigurationSetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listConfigurationSetsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,088,032 | public void onTraversalStart() {<NEW_LINE>// Users can disable the AVX check to allow an older version of TF that doesn't require AVX to be used.<NEW_LINE>if (this.disableAVXCheck == false) {<NEW_LINE>IntelGKLUtils utils = new IntelGKLUtils();<NEW_LINE>utils.load(null);<NEW_LINE>if (utils.isAvxSupported() == false) {<N... | pythonExecutor.initStreamWriter(AsynchronousStreamWriter.stringSerializer); |
952,437 | private long calculateDuration(float delta, float width, float velocity) {<NEW_LINE>final float halfScreenSize = width / 2;<NEW_LINE>float distanceRatio = delta / width;<NEW_LINE>float distanceInfluenceForSnapDuration = distanceInfluenceForSnapDuration(distanceRatio);<NEW_LINE>float distance = halfScreenSize + halfScre... | velocity = Math.abs(velocity); |
638,497 | ActionResult<WrapOutId> execute(String appDictFlag, String appInfoFlag, String path0, String path1, String path2, String path3, String path4, String path5, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wr... | path2, path3, path4, path5); |
142,790 | public void onSuccess(@NonNull RegistrationResponse registrationResponse, final Context context) {<NEW_LINE>// After successful registration with Applozic server the callback will come here<NEW_LINE>mAuthTask = null;<NEW_LINE>showProgress(false);<NEW_LINE>// Basic setting for context based chat enable...<NEW_LINE>Applo... | (context).setActivityCallbacks(activityCallbacks); |
532,908 | protected void doBegin(Object transactionObject, TransactionDefinition transactionDefinition) throws TransactionException {<NEW_LINE>if (transactionDefinition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT && transactionDefinition.getIsolationLevel() != TransactionDefinition.ISOLATION_SERIALIZABLE) {<NE... | throw new IllegalStateException("DatastoreTransactionManager supports only propagation behavior " + "TransactionDefinition.PROPAGATION_REQUIRED"); |
483,420 | public void onEntityDamage(EntityDamageEvent event) {<NEW_LINE>Entity victim = event.getEntity();<NEW_LINE>if (victim instanceof Player) {<NEW_LINE>Player player = (Player) victim;<NEW_LINE>LocalPlayer localPlayer = WorldGuardPlugin.<MASK><NEW_LINE>if (isInvincible(localPlayer)) {<NEW_LINE>player.setFireTicks(0);<NEW_L... | inst().wrapPlayer(player); |
1,385,689 | private void loadPresets() {<NEW_LINE>int alpha = Color.alpha(color);<NEW_LINE>presets = getArguments().getIntArray(ARG_PRESETS);<NEW_LINE>if (presets == null)<NEW_LINE>presets = MATERIAL_COLORS;<NEW_LINE>boolean isMaterialColors = presets == MATERIAL_COLORS;<NEW_LINE>// don't update the original array when modifying a... | alpha, red, green, blue); |
1,301,625 | public static Map<String, List<DBSnapshot>> fetchRDSDBSnapshots(BasicSessionCredentials temporaryCredentials, String skipRegions, String accountId, String accountName) {<NEW_LINE>Map<String, List<DBSnapshot>> snapshots = new LinkedHashMap<>();<NEW_LINE>String expPrefix <MASK><NEW_LINE>for (Region region : RegionUtils.g... | = InventoryConstants.ERROR_PREFIX_CODE + accountId + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"RDS Snapshot\" , \"region\":\""; |
1,322,716 | public double applyAsDouble(FixedNode node) {<NEW_LINE>assert node != null;<NEW_LINE>computeNodeRelativeFrequencyCounter.increment(node.getDebug());<NEW_LINE>FixedNode current = findBegin(node);<NEW_LINE>if (current == null) {<NEW_LINE>// this should only appear for dead code<NEW_LINE>return 1D;<NEW_LINE>}<NEW_LINE>ass... | (ControlSplitNode) current.predecessor(); |
560,867 | protected Object predictResult(Object input) {<NEW_LINE>if (null == input) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>HashMap<Integer, Integer> wordCount = new HashMap<>(0);<NEW_LINE>String content = (String) input;<NEW_LINE>String[] tokens = content.split(NLPConstant.WORD_DELIMITER);<NEW_LINE>double minTermCount = mo... | : model.minTF * tokens.length; |
1,011,072 | final BatchEnableAlarmResult executeBatchEnableAlarm(BatchEnableAlarmRequest batchEnableAlarmRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchEnableAlarmRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchEnableAlarmRequest> ... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,265,322 | public void marshall(NetworkConnectionAction networkConnectionAction, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (networkConnectionAction == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(networkConnecti... | networkConnectionAction.getConnectionDirection(), CONNECTIONDIRECTION_BINDING); |
1,721,534 | public Long generateNewDPAE(Employee employee) throws AxelorException {<NEW_LINE>EmploymentContract mainEmploymentContract = employee.getMainEmploymentContract();<NEW_LINE>if (mainEmploymentContract == null) {<NEW_LINE>throw new AxelorException(TraceBackRepository.CATEGORY_MISSING_FIELD, I18n.get(IExceptionMessage.EMPL... | setCompanyFixedPhone(employer.getFixedPhone()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.