idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
648,431 | private static void populateListPartsRequestParameters(ListPartsRequest listPartsRequest, Map<String, String> params) {<NEW_LINE>params.put(UPLOAD_ID, listPartsRequest.getUploadId());<NEW_LINE>Integer maxParts = listPartsRequest.getMaxParts();<NEW_LINE>if (maxParts != null) {<NEW_LINE>if (!checkParamRange(maxParts, 0, ... | MAX_PARTS, maxParts.toString()); |
502,210 | protected boolean syncFiles() throws Exception {<NEW_LINE>Path cacheDir = manifest.resolveCacheDir(getParameters().getNamed());<NEW_LINE>log.info(() -> String.format(Constants.getString("Application.log.Sycnfiles"), cacheDir));<NEW_LINE>phase = Constants.getString("Application.Phase.Syncfile");<NEW_LINE>if (getParamete... | createDirectories(target.getParent()); |
1,841,491 | public static RocksDB createWithColumnFamily(Map conf, String rocksDbDir, final Map<String, ColumnFamilyHandle> columnFamilyHandleMap, int ttlTimeSec) throws IOException {<NEW_LINE>List<ColumnFamilyDescriptor> <MASK><NEW_LINE>List<ColumnFamilyHandle> columnFamilyHandles = new ArrayList<>();<NEW_LINE>DBOptions dbOptions... | columnFamilyDescriptors = getExistingColumnFamilyDesc(conf, rocksDbDir); |
1,587,130 | public void execute() {<NEW_LINE>WorkloadResource.MetaData metadata = getWorkloadRef().getMetadata();<NEW_LINE>String appStage = getSpec().getString("appStage");<NEW_LINE>String appUnit = getSpec().getString("appUnit");<NEW_LINE>String site = getSpec().getString("site");<NEW_LINE>String appName = getSpec().getString("a... | labels.put("sigma.ali/app-name", appName); |
572,847 | protected Widget createMainWidget() {<NEW_LINE>Styles styles = RESOURCES.styles();<NEW_LINE>VerticalPanel panel = new VerticalPanel();<NEW_LINE>panel.<MASK><NEW_LINE>VerticalPanel namePanel = new VerticalPanel();<NEW_LINE>namePanel.setWidth("100%");<NEW_LINE>// path<NEW_LINE>TextBox txtKeyPath = new TextBox();<NEW_LINE... | addStyleName(styles.mainWidget()); |
86,971 | final CreateFolderResult executeCreateFolder(CreateFolderRequest createFolderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createFolderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | (super.beforeMarshalling(createFolderRequest)); |
852,633 | public void initialize(@Nonnull ManagingFS managingFS, @Nonnull FileWatcherNotificationSink notificationSink) {<NEW_LINE>myNotificationSink = notificationSink;<NEW_LINE>boolean disabled = isDisabled();<NEW_LINE>myExecutable = getExecutable();<NEW_LINE>if (disabled) {<NEW_LINE>LOG.info("Native file watcher is disabled")... | -> ShowFilePathAction.openFile(myExecutable)); |
1,003,418 | private List<Torrent> makeStatsRequest(Log log) throws DaemonException, LoggedOutException {<NEW_LINE>try {<NEW_LINE>// Initialise the HTTP client<NEW_LINE>initialise();<NEW_LINE>makeLoginRequest(log);<NEW_LINE>// Make request<NEW_LINE>HttpGet httpget = new <MASK><NEW_LINE>HttpResponse response = httpclient.execute(htt... | HttpGet(buildWebUIUrl() + RPC_URL_STATS); |
283,429 | public void renderResource(String templateName, Map<String, Object> model, Writer writer) {<NEW_LINE>String language = (String) model.get(PippoConstants.REQUEST_PARAMETER_LANG);<NEW_LINE>if (StringUtils.isNullOrEmpty(language)) {<NEW_LINE>language = getLanguageOrDefault(language);<NEW_LINE>}<NEW_LINE>// prepare the loc... | , locale.getLanguage())); |
386,215 | private void handleShowTableId() throws AnalysisException {<NEW_LINE>ShowTableIdStmt showStmt = (ShowTableIdStmt) stmt;<NEW_LINE>long tableId = showStmt.getTableId();<NEW_LINE>List<List<String><MASK><NEW_LINE>Env env = ctx.getEnv();<NEW_LINE>List<Long> dbIds = env.getInternalCatalog().getDbIds();<NEW_LINE>// TODO shoul... | > rows = Lists.newArrayList(); |
752,331 | public static int createTopicIfNotExists(String topic, short replicationFactor, double partitionToBrokerRatio, int minPartitionNum, Properties topicConfig, AdminClient adminClient) throws ExecutionException, InterruptedException {<NEW_LINE>try {<NEW_LINE>if (adminClient.listTopics().names().get().contains(topic)) {<NEW... | NewTopic(topic, partitionCount, replicationFactor); |
866,579 | public void dontSymlinkDirectoriesInExecroot(Sequence<?> paths, StarlarkThread thread) throws EvalException {<NEW_LINE>List<String> pathsList = Sequence.cast(paths, String.class, "paths");<NEW_LINE>Set<String> set = Sets.newHashSet();<NEW_LINE>for (String path : pathsList) {<NEW_LINE>PathFragment pathFragment = PathFra... | doNotSymlinkInExecrootPaths = ImmutableSortedSet.copyOf(set); |
1,114,132 | protected long createBlob(int i, InputStream inputStream, @NonNegative long length) throws SQLException {<NEW_LINE>LargeObjectManager lom = connection.getLargeObjectAPI();<NEW_LINE>long oid = lom.createLO();<NEW_LINE>LargeObject <MASK><NEW_LINE>OutputStream outputStream = lob.getOutputStream();<NEW_LINE>byte[] buf = ne... | lob = lom.open(oid); |
517,060 | public MultiValueMap<String, Connection<?>> findConnectionsToUsers(MultiValueMap<String, String> providerUsers) {<NEW_LINE>if (providerUsers == null || providerUsers.isEmpty()) {<NEW_LINE>throw new IllegalArgumentException("Unable to execute find: no providerUsers provided");<NEW_LINE>}<NEW_LINE>StringBuilder providerU... | >(userIds.size()); |
1,832,140 | private static void assertEvents(RegressionEnvironment env, String symbol, Double oldMedian, Double oldDistMedian, Double oldStdev, Double oldAvedev, Double newMedian, Double newDistMedian, Double newStdev, Double newAvedev) {<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>EventBean[] oldData = listener.getLa... | 0].get("myMedian")); |
1,013,562 | protected void recreateBitmaps() {<NEW_LINE>super.recreateBitmaps();<NEW_LINE>float walkCircleH = attrsW<MASK><NEW_LINE>float walkCircleW = attrsW.paint.getStrokeWidth();<NEW_LINE>float walkCircleRadius = attrsW.paint.getStrokeWidth() / 2f;<NEW_LINE>float routeShieldRadius = attrsPT.paint3.getStrokeWidth() / 2f;<NEW_LI... | .paint.getStrokeWidth() * 1.33f; |
976,309 | public void doProxyInstall(ClassLoader webapploader, final String appid) {<NEW_LINE>dpInstaller.setTargetClassLoader(webapploader);<NEW_LINE>dpInstaller.defineField("mMap", Map.class, "org.aredis.cache.RedisCommandObject", "new java.util.HashMap()");<NEW_LINE>dpInstaller.installProxy("org.aredis.cache.RedisCommandObjec... | m.insertAfter("{AredisCommandObjectIT mObj = (AredisCommandObjectIT)mMap.get(\"mObj\");" + "mObj.doAsyncEnd(new Object[]{commandInfo});}"); |
75,737 | private void loadingFinished(Runnable continuation) {<NEW_LINE>if (!myLoadingFinished.compareAndSet(false, true))<NEW_LINE>return;<NEW_LINE>myEditor.putUserData(ASYNC_LOADER, null);<NEW_LINE>if (myEditorComponent.isDisposed())<NEW_LINE>return;<NEW_LINE>if (continuation != null) {<NEW_LINE>continuation.run();<NEW_LINE>}... | .getScrollingModel().disableAnimation(); |
1,043,151 | public double distance(NumberVector v1, NumberVector v2) {<NEW_LINE>// Dimensionality, and last valid value in second vector:<NEW_LINE>final int dim1 = v1.getDimensionality(), dim2 = v2.getDimensionality();<NEW_LINE>final int m2 = dim2 - 1;<NEW_LINE>// bandsize is the maximum allowed distance to the diagonal<NEW_LINE>f... | min(m2, i + band); |
955,769 | private String addM2OBinding(ActionBuilderLine line, boolean search, boolean filter) {<NEW_LINE>String fname = "setVar" + varCount;<NEW_LINE>varCount += 1;<NEW_LINE>String tModel = getTargetModel(line);<NEW_LINE>String srcModel = getSourceModel(line);<NEW_LINE>StringBuilder stb = new StringBuilder();<NEW_LINE>fbuilder.... | (format("}", 2)); |
209,419 | @ApiOperation(value = "Create an output")<NEW_LINE>@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid output specification in input.", response = OutputSummary.class) })<NEW_LINE>@AuditEvent(type = AuditEventT... | throw new ValidationException("type", "Invalid output type"); |
1,756,976 | public Event readImageAsync(CommandQueue queue, ByteBuffer dest, long[] origin, long[] region, long rowPitch, long slicePitch) {<NEW_LINE>if (origin.length != 3 || region.length != 3) {<NEW_LINE>throw new IllegalArgumentException("origin and region must both be arrays of length 3");<NEW_LINE>}<NEW_LINE>Utils.pointerBuf... | pointerBuffers[2].rewind(); |
1,323,718 | final GetUpgradeStatusResult executeGetUpgradeStatus(GetUpgradeStatusRequest getUpgradeStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getUpgradeStatusRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetUpgradeStatusRequest> ... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,008,786 | public Certificates decode(String data) throws DscListDecodeException {<NEW_LINE>try {<NEW_LINE>PublicKey publicKey = getPublicKeyFromString(distributionServiceConfig.getDigitalGreenCertificate().getDscClient().getPublicKey());<NEW_LINE>String signature = data.substring(0, data.indexOf<MASK><NEW_LINE>String content = d... | (CONTENT_STARTS_CHAR)).trim(); |
1,152,762 | private static void collectInstructionsRecursively(VirtualFile directory, final IncrementalCompilerInstructionCreatorBase creator, @Nullable final PackagingFileFilter filter, final ProjectFileIndex index, final boolean copyExcluded) {<NEW_LINE>final FileTypeManager fileTypeManager = FileTypeManager.getInstance();<NEW_L... | (child.getName())); |
1,442,175 | void parse(String html, int currentSearchOffset) {<NEW_LINE>searchFinished = true;<NEW_LINE>items.clear();<NEW_LINE>html = new String(html.getBytes(), StandardCharsets.UTF_8);<NEW_LINE>// NOI18N<NEW_LINE>Pattern // NOI18N<NEW_LINE>p = // NOI18N<NEW_LINE>Pattern.// NOI18N<NEW_LINE>compile("<a\\s+href\\s*=\\s*\"(.*?)\"[^... | title = m.group(2); |
1,618,989 | public void stateChanged(ChangeEvent e) {<NEW_LINE>JViewport viewport = (JViewport) e.getSource();<NEW_LINE>int tabPlacement = tabPane.getTabPlacement();<NEW_LINE>int tabCount = tabPane.getTabCount();<NEW_LINE>Rectangle vpRect = viewport.getBounds();<NEW_LINE><MASK><NEW_LINE>Rectangle viewRect = viewport.getViewRect();... | Dimension viewSize = viewport.getViewSize(); |
1,549,729 | public void writeNode(java.io.Writer out, String nodeName, String indent) throws java.io.IOException {<NEW_LINE>out.write(indent);<NEW_LINE>out.write("<");<NEW_LINE>out.write(nodeName);<NEW_LINE>// id is an attribute<NEW_LINE>if (_Id != null) {<NEW_LINE>// NOI18N<NEW_LINE>out.write(" id");<NEW_LINE>// NOI18N<NEW_LINE>o... | .InstanceStats) it.next(); |
157,196 | private String makeKeyConstractorComment(List<ColumnDefinition> columnDefinitions) {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append(" /**\n");<NEW_LINE>builder.append(" * Constructor\n");<NEW_LINE>Collection<ColumnDefinition> primaryKeys = getPrimaryKeys(columnDefinitions);<NEW_LIN... | " " + columnDefinition.getRemarks()); |
1,811,896 | public static TypeSpecDataHolder generateDelegates(SpecModel specModel, Map<Class<? extends Annotation>, DelegateMethodDescription> delegateMethodsMap, EnumSet<RunMode> runMode) {<NEW_LINE>TypeSpecDataHolder.Builder typeSpecDataHolder = TypeSpecDataHolder.newBuilder();<NEW_LINE>boolean hasAttachDetachCallback = false;<... | , delegateMethodDescription, delegateMethodModel, runMode)); |
429,886 | public AutoCompleteResult extractResult(@Nonnull SearchResponse searchResponse, @Nonnull String input) {<NEW_LINE>Set<String> results = new LinkedHashSet<>();<NEW_LINE>Set<AutoCompleteEntity> entityResults = new HashSet<>();<NEW_LINE>for (SearchHit hit : searchResponse.getHits()) {<NEW_LINE>Optional<String> matchedFiel... | [0].string()); |
995,006 | public void widgetSelected(SelectionEvent e) {<NEW_LINE>ColorDialog colorDialog = new ColorDialog(table.getShell());<NEW_LINE>Button self = ((Button) e.widget);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>RGBa theColor = (RGBa) self.getData("color");<NEW_LINE>if (theColor == null) {<NEW_LINE>theColor = color;<NEW_LINE>}<NEW_LINE>... | (ThemeRule) tableItem.getData(); |
984,344 | /*<NEW_LINE>* No need to process SwitchKey TODO test and reason<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public DavaFlowSet processASTSwitchNode(ASTSwitchNode node, DavaFlowSet input) {<NEW_LINE>if (DEBUG) {<NEW_LINE>System.out.println("Processing switch node");<NEW_LINE>}<NEW_LINE>if (!isReachable(input)) {<NEW_LINE>//... | > indexList = node.getIndexList(); |
1,474,217 | public Result render(Context ctx, Throwable cause, StatusCode code) {<NEW_LINE>try {<NEW_LINE>List<Frame> frames = Frame.toFrames(locator, cause);<NEW_LINE>if (frames.isEmpty()) {<NEW_LINE>return Result.skip();<NEW_LINE>}<NEW_LINE>StringWriter stacktrace = new StringWriter();<NEW_LINE>cause.printStackTrace(new PrintWri... | put("javascript", cpath + "/whoops/js/whoops.base.js"); |
112,957 | protected void render(TileEntityPersonalChest tile, float partialTick, PoseStack matrix, MultiBufferSource renderer, int light, int overlayLight, ProfilerFiller profiler) {<NEW_LINE>matrix.pushPose();<NEW_LINE>if (!tile.isRemoved()) {<NEW_LINE>matrix.<MASK><NEW_LINE>matrix.mulPose(Vector3f.YP.rotationDegrees(-tile.getD... | translate(0.5D, 0.5D, 0.5D); |
1,100,399 | final SetRepositoryPolicyResult executeSetRepositoryPolicy(SetRepositoryPolicyRequest setRepositoryPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setRepositoryPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,325,855 | public void prepare() {<NEW_LINE>LOG.debug("prepare() begin...");<NEW_LINE>// Compatible with the old version, path is a string before<NEW_LINE>String pathInString = this.originConfig.getNecessaryValue(Key.PATH, TxtFileReaderErrorCode.REQUIRED_VALUE);<NEW_LINE>if (StringUtils.isBlank(pathInString)) {<NEW_LINE>throw Add... | Key.PATH, String.class); |
883,233 | protected void __constructor__(@NonNull String path, @Format int format) throws IOException {<NEW_LINE>if (path == null) {<NEW_LINE>throw new IllegalArgumentException("path must not be null");<NEW_LINE>}<NEW_LINE>// Create a stream, and cache a mapping from file descriptor to stream.<NEW_LINE>FileOutputStream stream = ... | , realMuxer, "mLastTrackIndex", -1); |
668,877 | final public Value BasicValue(Env env) throws ParseException {<NEW_LINE>Token tok = null;<NEW_LINE>Token head = null;<NEW_LINE>Token tail = null;<NEW_LINE>SequencePattern.PatternExpr seqRegex = null;<NEW_LINE>switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) {<NEW_LINE>case REGEX:<NEW_LINE>{<NEW_LINE>tok = jj_consume_token(... | , parseLongInteger(tok.image)); |
1,701,450 | public DeleteDocumentClassifierResult deleteDocumentClassifier(DeleteDocumentClassifierRequest deleteDocumentClassifierRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDocumentClassifierRequest);<NEW_LINE>AWSRequestMetrics awsReque... | invoke(request, responseHandler, executionContext); |
1,327,808 | private static void addClassPathUrls(IProject project, List<URL> paths, Set<IProject> resolvedProjects) {<NEW_LINE>IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();<NEW_LINE>// add project to local cache to prevent adding its classpaths multiple times<NEW_LINE>if (resolvedProjects.contains(project)) {<NEW... | File file = entryPath.toFile(); |
1,734,440 | // end parseFiles<NEW_LINE>public void processResults(ParserQuery parserQuery, int num, PrintWriter pwo) {<NEW_LINE>if (parserQuery.parseSkipped()) {<NEW_LINE>List<? extends HasWord> sentence = parserQuery.originalSentence();<NEW_LINE>if (sentence != null) {<NEW_LINE>numWords -= sentence.size();<NEW_LINE>}<NEW_LINE>num... | .toString(num), pwo); |
685,220 | public void recomputeStatistics(@NonNull final RecomputeStatisticsRequest request) {<NEW_LINE>final <MASK><NEW_LINE>final Set<ProductId> productIds = request.getProductIds();<NEW_LINE>final Map<ProductId, BPartnerProductStats> existingStatsByProductId = getByPartnerAndProducts(bpartnerId, productIds);<NEW_LINE>Map<Prod... | BPartnerId bpartnerId = request.getBpartnerId(); |
1,624,882 | public void onCreate(final Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>addPreferencesFromResource(R.xml.preference_about);<NEW_LINE>final PackageInfo packageInfo = application.packageInfo();<NEW_LINE>final Preference versionPref = findPreference(KEY_ABOUT_VERSION);<NEW_LINE>versio... | installer = Installer.from(application); |
545,110 | private void playAsFirstEventRecord(NotificationEvent event, String eventKey) {<NEW_LINE>Map<String, Object> statusSet = new LinkedHashMap<String, Object>();<NEW_LINE>statusSet.put(NCConstant.COLUMN_STARTTIME, event.getTime());<NEW_LINE>statusSet.put(NCConstant.COLUMN_STATE, NCConstant.StateFlag.NEWCOME.getStatFlag());... | addArg(NCConstant.NTFVALUE, statusStr); |
1,762,199 | private String unsuan(String s) {<NEW_LINE>final String su = baseUrl.replace("http://", "");<NEW_LINE>boolean b = false;<NEW_LINE>for (int i = 0; i < sw.split("|").length; i++) {<NEW_LINE>if (su.indexOf(sw.split("|")[i]) > -1) {<NEW_LINE>b = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!b)<NEW_LINE>return "... | sk.length() - 1); |
543,424 | private boolean deleteSelectedAnchor() {<NEW_LINE>PolygonFollower follower = lastSelectedMeshFollower;<NEW_LINE>PolygonComponent polygonComponent = ComponentRetriever.get(follower.getEntity(), PolygonComponent.class);<NEW_LINE>if (follower != null) {<NEW_LINE>if (polygonComponent == null || polygonComponent.vertices ==... | = polygonComponent.vertices.clone(); |
1,840,490 | public static void computeStereoCloud(GrayU8 distortedLeft, GrayU8 distortedRight, Planar<GrayU8> colorLeft, Planar<GrayU8> colorRight, CameraPinholeBrown intrinsicLeft, CameraPinholeBrown intrinsicRight, Se3_F64 leftToRight, int minDisparity, int rangeDisparity) {<NEW_LINE>// drawInliers(origLeft, origRight, intrinsic... | > rectColorLeft = colorLeft.createSameShape(); |
281,370 | public static void vertical(GrayU16 input, GrayI16 output, int radius, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>workspaces = BoofMiscOps.checkDeclare(workspaces, DogArray_I32::new);<NEW_LINE>// CONCURRENT_REMOVE_LINE<NEW_LINE>final DogArray_I32 work = workspaces.grow();<NEW_LINE>final int kernelWidth = ... | .startIndex + y * output.stride; |
1,737,938 | private static void generateNumberToCharMap() {<NEW_LINE>numberToCharMap = new Character[10][5];<NEW_LINE>numberToCharMap[0] = new Character[] { '\0' };<NEW_LINE>numberToCharMap[1] = new Character[] { '\0' };<NEW_LINE>numberToCharMap[2] = new Character[] { 'a', 'b', 'c' };<NEW_LINE>numberToCharMap[3] = new Character[] ... | ] { 'g', 'h', 'i' }; |
706,605 | @Timed<NEW_LINE>@ApiOperation(value = "Delete a stream rule")<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 404, message = "Stream rule not found."), @ApiResponse(code = 400, message = "Invalid ObjectId.") })<NEW_LINE>@AuditEvent(type = AuditEventTypes.STREAM_RULE_DELETE)<NEW_LINE>public void delete(@ApiParam(na... | checkPermission(RestPermissions.STREAMS_EDIT, streamid); |
1,796,094 | private void init(Object[] objs) {<NEW_LINE>try {<NEW_LINE>m_endpoint = objs[0].toString() + "?scroll=1m";<NEW_LINE>String entity = "";<NEW_LINE>if (objs.length == 2) {<NEW_LINE>entity = objs[1].toString();<NEW_LINE>} else {<NEW_LINE>entity = "{ \"size\": 500," + " \"query\": { \"match_all\": {}}}";<NEW_LINE>}<NEW_LINE... | get("scroll_id").toString(); |
497,723 | public boolean visit(SwitchCase node) {<NEW_LINE>if (!hasChildrenChanges(node)) {<NEW_LINE>return doVisitUnchangedChildren(node);<NEW_LINE>}<NEW_LINE>// dont allow switching from case to default or back. New statements should be created.<NEW_LINE>if (node.getAST().apiLevel() == JLS12_INTERNAL && node.getAST().isPreview... | ), Util.EMPTY_STRING, ", "); |
1,452,758 | public static void main(String[] args) {<NEW_LINE>double[][] wifis = new double[10][];<NEW_LINE>wifis[0] = new double[] { -0.1752, 1.6722 };<NEW_LINE>wifis[1] = new double[] { 0.2784, 3.2999 };<NEW_LINE>wifis[2] = new double[] { 1.8177, 3.2585 };<NEW_LINE>wifis[3] = new double[] { 3.4643, 3.1955 };<NEW_LINE>wifis[4] = ... | KalmanFilter.Point(0, 0); |
532,019 | public double[] computeRegression(final double[] input) {<NEW_LINE>// first, compute the output values of each of the RBFs<NEW_LINE>// Add in one additional RBF output for bias (always set to one).<NEW_LINE>final double[] rbfOutput = new double[rbf.length + 1];<NEW_LINE>// bias<NEW_LINE>rbfOutput[rbfOutput.length - 1] ... | = new double[input.length]; |
366,749 | private void loadAnalyzerOptionsPanels() {<NEW_LINE>List<Options> optionGroups = analysisOptions.getChildOptions();<NEW_LINE>noOptionsPanel = new JPanel(new VerticalLayout(5));<NEW_LINE>noOptionsPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));<NEW_LINE>noOptionsPanel.add(new GLabel("No options available.")... | (analyzerName).add(comp); |
731,926 | public BigInteger[] generateSignature(byte[] digest) {<NEW_LINE>if (!this.forSigning) {<NEW_LINE>throw new IllegalStateException("not initialised for signing");<NEW_LINE>}<NEW_LINE>BigInteger n = getOrder();<NEW_LINE>BigInteger e <MASK><NEW_LINE>ECPrivateKeyParameters privKey = (ECPrivateKeyParameters) key;<NEW_LINE>if... | = new BigInteger(1, digest); |
902,750 | protected void analyzeMethod(ClassContext classContext, Method method) throws CheckedAnalysisException {<NEW_LINE>TaintDataflow dataflow = getTaintDataFlow(classContext, method);<NEW_LINE>ConstantPoolGen cpg = classContext.getConstantPoolGen();<NEW_LINE>ClassMethodSignature classMethodSignature = new ClassMethodSignatu... | Instruction instruction = handle.getInstruction(); |
1,475,299 | final SetActiveReceiptRuleSetResult executeSetActiveReceiptRuleSet(SetActiveReceiptRuleSetRequest setActiveReceiptRuleSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setActiveReceiptRuleSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,355,960 | public boolean tableExists(String tableName) throws TskCoreException {<NEW_LINE>boolean tableExists = false;<NEW_LINE>Statement tableExistsStatement = null;<NEW_LINE>ResultSet resultSet = null;<NEW_LINE>try {<NEW_LINE>tableExistsStatement = connection.createStatement();<NEW_LINE>// NON-NLS<NEW_LINE>resultSet = tableExi... | Level.SEVERE, "Error closing Statement", ex2); |
765,015 | public FilterConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FilterConfiguration filterConfiguration = new FilterConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | JsonToken token = context.getCurrentToken(); |
707,346 | public <T> T createMock(MockCreationSettings<T> settings, MockHandler handler) {<NEW_LINE>Class<T> typeToMock = settings.getTypeToMock();<NEW_LINE>Set<Class<?>> interfacesSet = settings.getExtraInterfaces();<NEW_LINE>Class<?>[] extraInterfaces = interfacesSet.toArray(new Class[interfacesSet.size()]);<NEW_LINE>Invocatio... | mock = unsafeAllocator.newInstance(proxyClass); |
876,331 | public static String md5(String s) {<NEW_LINE>// http://stackoverflow.com/questions/1057041/difference-between-java-and-php5-md5-hash<NEW_LINE>// http://code.google.com/p/roboguice/issues/detail?id=89<NEW_LINE>try {<NEW_LINE>final byte[] hash = MessageDigest.getInstance("MD5").digest(s.getBytes(CharEncoding.UTF_8));<NE... | .length() - 1)); |
1,812,502 | public void store(Item item, String alias) {<NEW_LINE>logger.debug("Storing item: {}", item.getName());<NEW_LINE>if (item.getState() instanceof UnDefType) {<NEW_LINE>logger.debug("This item is of undefined type. Cannot persist it!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!JpaConfiguration.isInitialized) {<NEW_LINE>l... | setRealName(item.getName()); |
524,600 | public BankStatementLineId createBankStatementLine(@NonNull final BankStatementLineCreateRequest request) {<NEW_LINE>final I_C_BankStatementLine record = newInstance(I_C_BankStatementLine.class);<NEW_LINE>record.setC_BankStatement_ID(request.getBankStatementId().getRepoId());<NEW_LINE>record.setAD_Org_ID(request.getOrg... | ElectronicFundsTransfer eft = request.getEft(); |
164,437 | private TypeDef findPreexistingTypeDef(Program program) throws InvalidDataTypeException {<NEW_LINE>DataTypeManager dtm = program.getDataTypeManager();<NEW_LINE>DataType dt = dtm.getDataType(userPath, userName);<NEW_LINE>if (dt == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!(dt instanceof TypeDef)) {<NEW_LINE... | InvalidDataTypeException("Data-type " + userName + " already exists"); |
1,203 | List<JCTree> enumBody(Name enumName) {<NEW_LINE>accept(LBRACE);<NEW_LINE>ListBuffer<JCTree> defs = new ListBuffer<JCTree>();<NEW_LINE>if (token.kind == COMMA) {<NEW_LINE>nextToken();<NEW_LINE>} else if (token.kind != RBRACE && token.kind != SEMI) {<NEW_LINE>defs.append(enumeratorDeclaration(enumName));<NEW_LINE>while (... | , COMMA, RBRACE, SEMI)); |
1,378,380 | private void addListeners() {<NEW_LINE>model.tradeCurrencyCode.addListener(tradeCurrencyCodeListener);<NEW_LINE>model.marketPriceAvailableProperty.addListener(marketPriceAvailableListener);<NEW_LINE>model.marketPriceMargin.addListener(marketPriceMarginListener);<NEW_LINE>model.volume.addListener(volumeListener);<NEW_LI... | model.isTradeFeeVisible.addListener(tradeFeeVisibleListener); |
625,934 | private void commonSupportingFiles() {<NEW_LINE>supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));<NEW_LINE>if (getLibrary().equals(MULTIPLATFORM)) {<NEW_LINE>supportingFiles.add(new SupportingFile("build.gradle.kts.mustache", "", "build.gradle.kts"));<NEW_LINE>supportingFiles.add(new Supporti... | File.separator), "gradle-wrapper.properties")); |
240,650 | final boolean complete(LogonCommand logonCommand, TDSReader tdsReader) throws SQLServerException {<NEW_LINE>// If we have the login ack already then we're done processing.<NEW_LINE>if (null != loginAckToken)<NEW_LINE>return true;<NEW_LINE>// No login ack yet. Check if there is more SSPI handshake to do...<NEW_LINE>if (... | secBlobOut, 0, secBlobOut.length); |
1,441,815 | public void readCustomNBT(CompoundTag nbt, boolean descPacket) {<NEW_LINE>if (!descPacket) {<NEW_LINE>NonNullList<ItemStack> merged = NonNullList.withSize(<MASK><NEW_LINE>ContainerHelper.loadAllItems(nbt, merged);<NEW_LINE>for (int i = 0; i < NUM_SLOTS; ++i) {<NEW_LINE>this.buffers.set(i, merged.get(i + NUM_SLOTS));<NE... | 2 * NUM_SLOTS, ItemStack.EMPTY); |
976,289 | protected Subscription createSingletonRSSSupport(String name, URL url, boolean is_public, int check_interval_mins, boolean is_anon, int add_type, boolean subscribe) throws SubscriptionException {<NEW_LINE>checkURL(url);<NEW_LINE>try {<NEW_LINE>Subscription existing = lookupSingletonRSS(name, url, is_public, check_inter... | is_anon, singleton_details, json, add_type); |
1,399,420 | /*<NEW_LINE>hash is MD5<NEW_LINE>h(0) <- hash(passphrase, iv);<NEW_LINE>h(n) <- hash(h(n-1), passphrase, iv);<NEW_LINE>key <- (h(0),...,h(n))[0,..,key.length];<NEW_LINE>*/<NEW_LINE>@SuppressWarnings({ "static" })<NEW_LINE>synchronized byte[] genKey(byte[] passphrase, byte[] iv) {<NEW_LINE>if (cipher == null)<NEW_LINE>c... | [3] = (byte) i; |
1,003,126 | private void serializeTimer(MetaData.Builder metaData, Timer metric) {<NEW_LINE>final Snapshot snapshot = metric.getSnapshot();<NEW_LINE>writeValue(metaData, COUNT, (double) metric.getCount());<NEW_LINE>writeDuration(metaData, MAX, (<MASK><NEW_LINE>writeDuration(metaData, MEAN, snapshot.getMean());<NEW_LINE>writeDurati... | double) snapshot.getMax()); |
1,640,523 | private static Pair<NewVirtualFile, Iterable<String>> prepare(@Nonnull NewVirtualFileSystem vfs, @Nonnull String path) {<NEW_LINE>String normalizedPath = normalize(vfs, path);<NEW_LINE>if (StringUtil.isEmptyOrSpaces(normalizedPath)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String <MASK><NEW_LINE>if (basePath.length(... | basePath = vfs.extractRootPath(normalizedPath); |
1,722,876 | static Object[] promotePrimitives(Object lhs, Object rhs) {<NEW_LINE>Number lnum = promoteToInteger(lhs);<NEW_LINE>Number rnum = promoteToInteger(rhs);<NEW_LINE>if (lhs instanceof BigDecimal) {<NEW_LINE>if (!(rhs instanceof BigDecimal))<NEW_LINE>rhs = Primitive.castNumber(BigDecimal.class, rnum);<NEW_LINE>} else if (rh... | valueOf(lnum.doubleValue()); |
1,361,381 | public StructureView createStructureView(FileEditor fileEditor, @Nonnull Project project) {<NEW_LINE>List<StructureViewComposite.StructureViewDescriptor> viewDescriptors = new ArrayList<>();<NEW_LINE>VirtualFile file = fileEditor == null ? null : fileEditor.getFile();<NEW_LINE>PsiFile psiFile = file == null || !file.is... | viewProvider.getPsi(o))); |
659,930 | public void visit(final IfStmt n, final Void arg) {<NEW_LINE>printOrphanCommentsBeforeThisChildNode(n);<NEW_LINE>printComment(n.getComment(), arg);<NEW_LINE>printer.print("if (");<NEW_LINE>n.getCondition(<MASK><NEW_LINE>final boolean thenBlock = n.getThenStmt() instanceof BlockStmt;<NEW_LINE>if (// block statement shou... | ).accept(this, arg); |
632,343 | public boolean init(final String actionPath, final String[] separators) {<NEW_LINE>String prefix = separators[0];<NEW_LINE>String split = separators[1];<NEW_LINE>String suffix = separators[2];<NEW_LINE>macrosCount = StringUtil.count(actionPath, prefix);<NEW_LINE>if (macrosCount == 0) {<NEW_LINE>return false;<NEW_LINE>}... | colonNdx + 1).trim(); |
234,101 | private List<? extends PreferencesCustomizer> loadCustomizers(String mimeType) {<NEW_LINE>ArrayList<PreferencesCustomizer> list = new ArrayList<PreferencesCustomizer>();<NEW_LINE>Preferences prefs = pf.getPreferences(mimeType);<NEW_LINE>if (mimeType.length() > 0) {<NEW_LINE>Lookup l = Lookups.forPath(FORMATTING_CUSTOMI... | l.lookupAll(OptionsPanelController.class); |
498,736 | public boolean tryUpdatingDatabaseConfigurationLocally(final String iDatabaseName, final OModifiableDistributedConfiguration cfg) {<NEW_LINE>ODistributedDatabaseImpl local = distributedPlugin.getMessageService().getDatabase(iDatabaseName);<NEW_LINE>if (local == null)<NEW_LINE>return false;<NEW_LINE>final ODistributedCo... | this, "Skip saving of distributed configuration file for database '%s' because is unchanged (version %d)", iDatabaseName, currVersion); |
640,896 | private void createOutlineView() {<NEW_LINE>outlineView = new OutlineView(// NOI18N<NEW_LINE>UiUtils.// NOI18N<NEW_LINE>getText("BasicSearchResultsPanel.outline.nodes"));<NEW_LINE>outlineView.getOutline().setDefaultRenderer(Node.Property.class, new ResultsOutlineCellRenderer());<NEW_LINE>setOutlineColumns();<NEW_LINE>o... | getOutline().setRootVisible(false); |
262,384 | private void updateView() {<NEW_LINE>if (dialog == null)<NEW_LINE>return;<NEW_LINE>final Wallet wallet = walletActivityViewModel.wallet.getValue();<NEW_LINE>final boolean needsPassword = wallet != null && wallet.isEncrypted();<NEW_LINE>if (wallet == null || transaction == null || feeRaise == null) {<NEW_LINE>messageVie... | passwordGroup.setVisibility(View.GONE); |
7,848 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>SharedPreferences themePrefs = getSharedPreferences("THEME", 0);<NEW_LINE>Boolean isDark = themePrefs.getBoolean("isDark", false);<NEW_LINE>if (isDark)<NEW_LINE>setTheme(R.style.DarkTheme);<NEW_LINE>else<NEW_LINE>setTheme(R.style.AppTheme);<NEW_LINE>super.onCre... | findViewById(R.id.inspectActivity); |
104,948 | public BlackboardArtifact addWebFormAutofill(String name, String value, long creationTime, long accessTime, int count, Collection<BlackboardAttribute> otherAttributesList) throws TskCoreException, BlackboardException {<NEW_LINE>Collection<BlackboardAttribute> attributes = new ArrayList<>();<NEW_LINE>// construct attrib... | , ingestJobId.orElse(null)); |
1,037,020 | public TSExecuteStatementResp executeUpdateStatement(TSExecuteStatementReq req) {<NEW_LINE>if (!serviceProvider.checkLogin(req.getSessionId())) {<NEW_LINE>return RpcUtils.getTSExecuteStatementResp(getNotLoggedInStatus());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>PhysicalPlan physicalPlan = serviceProvider.getPlanner().parseS... | .currentThread().interrupt(); |
790,175 | private void init() {<NEW_LINE>inflate(getContext(), R.layout.contact_friend_profile_layout, this);<NEW_LINE>mHeadImageView = findViewById(R.id.friend_icon);<NEW_LINE>mNickNameView = <MASK><NEW_LINE>mIDView = findViewById(R.id.friend_account);<NEW_LINE>mRemarkView = findViewById(R.id.remark);<NEW_LINE>mRemarkView.setOn... | findViewById(R.id.friend_nick_name); |
877,605 | public final void complete() {<NEW_LINE>NumberFormat nfMegabyte = NumberFormat.getInstance();<NEW_LINE>NumberFormat nfCounts = NumberFormat.getInstance();<NEW_LINE>nfCounts.setGroupingUsed(true);<NEW_LINE>nfMegabyte.setMaximumFractionDigits(2);<NEW_LINE>LOGGER.info("completing read...");<NEW_LINE>this.tileBasedGeoObjec... | , 2))) + "MB"); |
73,846 | public void draw(Canvas canvas) {<NEW_LINE>super.draw(canvas);<NEW_LINE>if (!badgeEnabled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Rect bounds = getBounds();<NEW_LINE>if (TextUtil.isTextEmpty(text)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final float x = (1 - <MASK><NEW_LINE>final float y = HALF_SIZE_FACTOR * bound... | HALF_SIZE_FACTOR) * bounds.width(); |
57,898 | private void createNewFiltersAndCursors(ItemStream itemStream) throws SIResourceException, MessageStoreException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "createNewFiltersAndCursors", itemStream);<NEW_LINE>LockingCursor cursor = null;<NEW_LINE>// Instantiate a... | consumerKeyFilter[i], !forwardScanning); |
1,027,749 | public void parseContentTypesFile(InputStream contentTypes) throws InvalidFormatException {<NEW_LINE>CTTypes types;<NEW_LINE>try {<NEW_LINE>XMLInputFactory xif = XMLInputFactory.newInstance();<NEW_LINE>xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);<NEW_LINE>// a DTD is merely ignored, its pres... | throw new InvalidFormatException("Bad [Content_Types].xml", e); |
291,182 | public static DescribeDnsGtmInstancesResponse unmarshall(DescribeDnsGtmInstancesResponse describeDnsGtmInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDnsGtmInstancesResponse.setRequestId(_ctx.stringValue("DescribeDnsGtmInstancesResponse.RequestId"));<NEW_LINE>describeDnsGtmInstancesResponse.setPageSize... | ("DescribeDnsGtmInstancesResponse.GtmInstances[" + i + "].Config.PublicUserDomainName")); |
717,264 | /*<NEW_LINE>* sends a channel command & value from openHAB => NeoHub. It delegates upwards<NEW_LINE>* to the NeoHub to handle the command<NEW_LINE>*/<NEW_LINE>protected void toNeoHubSendCommand(String channelId, Command command) {<NEW_LINE>String cmdStr = toNeoHubBuildCommandString(channelId, command);<NEW_LINE>if (!cm... | MSG_FMT_COMMAND_BAD, command.toString()); |
157,946 | private int addLink(int row, DataObject dob) {<NEW_LINE>Action action = extractAction(dob);<NEW_LINE>if (null != action) {<NEW_LINE>JPanel panel = <MASK><NEW_LINE>panel.setOpaque(false);<NEW_LINE>ActionButton lb = new ActionButton(action, Utils.getUrlString(dob), Utils.getColor(COLOR_BIG_BUTTON), true, dob.getPrimaryFi... | new JPanel(new GridBagLayout()); |
790,401 | public boolean checkTrigger(GameEvent event, Game game) {<NEW_LINE>Permanent equipment = game.getPermanent(this.sourceId);<NEW_LINE>if (equipment != null && equipment.getAttachedTo() != null && event.getSourceId().equals(equipment.getAttachedTo())) {<NEW_LINE>getEffects().setValue("sourceId", event.getSourceId());<NEW_... | getPermanent(event.getSourceId()); |
1,130,855 | /* (non-Javadoc)<NEW_LINE>* @see com.ibm.ws.sib.processor.runtime.AbstractControllable#checkValidControllable()<NEW_LINE>*/<NEW_LINE>public void assertValidControllable() throws SIMPControllableNotFoundException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "assert... | SibTr.exception(tc, finalE); |
1,527,126 | private CFNode<L> insert(CFNode<L> node, NumberVector nv, DBIDRef dbid) {<NEW_LINE>assert node.getChild(0) != null : "Unexpected empty node!";<NEW_LINE>// Find the best child:<NEW_LINE>AsClusterFeature best = node.getChild(0);<NEW_LINE>double bestd = sqdistance(nv, best.getCF());<NEW_LINE>for (int i = 1; i < capacity; ... | idmap.put(bestl, list); |
903,709 | public void writeObject(ByteBuffer buffer, Object object) throws IOException {<NEW_LINE>Collection collection = (Collection) object;<NEW_LINE>int length = collection.size();<NEW_LINE>buffer.putInt(length);<NEW_LINE>if (length == 0)<NEW_LINE>return;<NEW_LINE>Iterator it = collection.iterator();<NEW_LINE>Class elementCla... | .put((byte) 0); |
102,573 | public void handleResponse(Channel channel, ByteBuf byteBuf) {<NEW_LINE>timeoutCounter.set(0);<NEW_LINE>ByteBufReceiver byteBufReceiver = receivers.peek();<NEW_LINE>if (byteBufReceiver != null) {<NEW_LINE>ByteBufReceiver.RECEIVER_RESULT result = byteBufReceiver.receive(channel, byteBuf);<NEW_LINE>switch(result) {<NEW_L... | info("[handleResponse][fail, close channel]{}, {}", byteBufReceiver, channel); |
80,081 | private void appendSummary(TransactionProfile profile, StringBuilder sb) {<NEW_LINE>TransactionProfile.<MASK><NEW_LINE>sb.append("z:").append(rate(profile.getTotalMicros(), summary.persistCount + summary.queryCount)).append(' ');<NEW_LINE>sb.append("p:").append(rate(summary.persistMicros, summary.persistBeans)).append(... | Summary summary = profile.getSummary(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.