idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
390,594 | final void showHelp(long address) {<NEW_LINE>System.out.println("c: continue");<NEW_LINE>System.out.println("n: step over");<NEW_LINE>if (emulator.isRunning()) {<NEW_LINE>System.out.println("bt: back trace");<NEW_LINE>}<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("st hex: search stack");<NEW_LINE>System.... | System.out.println("wx0-wx28, wfp, wip, wsp <value>: write specified register"); |
856,035 | final SearchQuantumTasksResult executeSearchQuantumTasks(SearchQuantumTasksRequest searchQuantumTasksRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(searchQuantumTasksRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | invoke(request, responseHandler, executionContext); |
579,736 | public void handleMessage(int group, byte cmd1a, Msg msg, DeviceFeature f, String fromPort) {<NEW_LINE>byte cmd = 0x00;<NEW_LINE>byte cmd2 = 0x00;<NEW_LINE>try {<NEW_LINE>cmd = msg.getByte("Cmd");<NEW_LINE><MASK><NEW_LINE>} catch (FieldException e) {<NEW_LINE>logger.debug("{} no cmd found, dropping msg {}", nm(), msg);... | cmd2 = msg.getByte("command2"); |
437,232 | public void putLong(long t, long v) {<NEW_LINE>if (writeCurArrayIndex == -1) {<NEW_LINE>if (capacity >= CAPACITY_THRESHOLD) {<NEW_LINE>((LinkedList<long[]>) timeRet).addFirst(new long[capacity]);<NEW_LINE>((LinkedList<long[]>) longRet).addFirst(new long[capacity]);<NEW_LINE>writeCurListIndex++;<NEW_LINE>writeCurArrayIn... | ] newValueData = new long[newCapacity]; |
614,228 | public static DescribeChangeOrderResponse unmarshall(DescribeChangeOrderResponse describeChangeOrderResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeChangeOrderResponse.setRequestId(_ctx.stringValue("DescribeChangeOrderResponse.RequestId"));<NEW_LINE>describeChangeOrderResponse.setMessage(_ctx.stringValue("Descri... | ("DescribeChangeOrderResponse.Data.Pipelines[" + i + "].Status")); |
1,722,378 | // /////////////////////////////////////////////////////////////////////////////////////////<NEW_LINE>private boolean checkFeeAddressBTC(String jsonTxt, List<String> btcFeeReceivers) {<NEW_LINE>try {<NEW_LINE>JsonArray jsonVout = getVinAndVout(jsonTxt).second;<NEW_LINE>JsonObject jsonVout0 = jsonVout.get(0).getAsJsonOb... | "fee address: {}", jsonFeeAddress.getAsString()); |
297,865 | final CreateBackupSelectionResult executeCreateBackupSelection(CreateBackupSelectionRequest createBackupSelectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createBackupSelectionRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
972,997 | private void updateConfig(Model model, Payload payload, String domain) {<NEW_LINE>BusinessReportConfig config;<NEW_LINE>BusinessItemConfig itemConfig = payload.getBusinessItemConfig();<NEW_LINE>String key = itemConfig.getId();<NEW_LINE>config = m_configManager.queryConfigByDomain(domain);<NEW_LINE>boolean isModify = fa... | setViewOrder(itemConfig.getViewOrder()); |
1,162,361 | void serialize(@Nonnull Stub rootStub, @Nonnull OutputStream stream) throws IOException {<NEW_LINE>BufferExposingByteArrayOutputStream out = new BufferExposingByteArrayOutputStream();<NEW_LINE>FileLocalStringEnumerator storage = new FileLocalStringEnumerator(true);<NEW_LINE>IntEnumerator selializerIdLocalEnumerator = n... | 0, out.size()); |
189,864 | public Expr visitCompoundPredicate(CompoundPredicateOperator predicate, FormatterContext context) {<NEW_LINE>Expr callExpr;<NEW_LINE>if (CompoundPredicateOperator.CompoundType.AND.equals(predicate.getCompoundType())) {<NEW_LINE>callExpr = new CompoundPredicate(CompoundPredicate.Operator.AND, buildExecExpression(predica... | 0), context), null); |
1,178,426 | public void updateAutoLogin(Tab tab, boolean animate) {<NEW_LINE>DeviceAccountLogin login = tab.getDeviceAccountLogin();<NEW_LINE>if (login != null) {<NEW_LINE>mAutoLoginHandler = login;<NEW_LINE>// TODO: modified, mContext replaced with getContext()<NEW_LINE>ContextThemeWrapper wrapper = new ContextThemeWrapper(getCon... | android.R.style.Theme_Holo_Light); |
1,035,285 | public ExecPlan plan(DeleteStmt deleteStatement, ConnectContext session) {<NEW_LINE>if (!deleteStatement.supportNewPlanner()) {<NEW_LINE>// executor will use DeleteHandler to handle delete statement<NEW_LINE>// so just return empty plan here<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>QueryRelation query = deleteStatemen... | , session).transformWithSelectLimit(query); |
414,256 | private Mono<Response<Void>> deleteHybridConnectionWithResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is require... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
1,726,802 | public double beta(HullWhiteOneFactorPiecewiseConstantParameters data, double startExpiry, double endExpiry) {<NEW_LINE>double numerator = 2 * data.getMeanReversion();<NEW_LINE>// Period in which the time startExpiry is; volatilityTime.get(i-1) <= startExpiry < volatilityTime.get(i);<NEW_LINE>int indexStart = 1;<NEW_LI... | s, 1, sLen - 1); |
929,838 | public void runInternal() {<NEW_LINE>int partitionId = getPartitionId();<NEW_LINE>Indexes <MASK><NEW_LINE>InternalIndex index = indexes.addOrGetIndex(config);<NEW_LINE>if (index.hasPartitionIndexed(partitionId)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SerializationService serializationService = getNodeEngine().getSerial... | indexes = mapContainer.getIndexes(partitionId); |
350,331 | String formatSlackMessage(JsonObject kgResponse, String query) {<NEW_LINE>JsonObject attachmentJson = new JsonObject();<NEW_LINE>JsonObject responseJson = new JsonObject();<NEW_LINE>responseJson.addProperty("response_type", "in_channel");<NEW_LINE>responseJson.addProperty("text", String.format("Query: %s", query));<NEW... | get("name").getAsString(); |
1,592,283 | final DescribeDomainChangeProgressResult executeDescribeDomainChangeProgress(DescribeDomainChangeProgressRequest describeDomainChangeProgressRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDomainChangeProgressRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
398,948 | public boolean visit(SQLUnaryExpr x) {<NEW_LINE>// ~<NEW_LINE>SQLUnaryOperator operator = x.getOperator();<NEW_LINE>switch(operator) {<NEW_LINE>case NOT:<NEW_LINE>case Not:<NEW_LINE>this.sqlNode = SqlStdOperatorTable.NOT.createCall(SqlParserPos.ZERO, convertToSqlNode(x.getExpr()));<NEW_LINE>break;<NEW_LINE>case Plus:<N... | ExceptionType.NOT_SUPPORT, "Does not support :" + operator); |
1,451,328 | public void handle(Context ctx) throws IOException, ServletException {<NEW_LINE>boolean isTraceMode = Cat.getManager().isTraceMode();<NEW_LINE>HttpServletRequest req = ctx.getRequest();<NEW_LINE>HttpServletResponse res = ctx.getResponse();<NEW_LINE>MessageProducer producer = Cat.getProducer();<NEW_LINE>int mode = ctx.g... | (req.getHeader("X-CAT-PARENT-ID")); |
819,826 | public static void main(String[] args) {<NEW_LINE>Exercise10.EdgeWeightedGraphAdjacencyMatrix edgeWeightedGraphAdjacencyMatrix = new Exercise10().new EdgeWeightedGraphAdjacencyMatrix(5);<NEW_LINE>edgeWeightedGraphAdjacencyMatrix.addEdge(new Edge(0, 2, 0.35));<NEW_LINE>edgeWeightedGraphAdjacencyMatrix.addEdge(new Edge(0... | "1: 1-2 0.99000 \n" + "2: 2-4 0.34000 2-3 0.58000 2-1 0.99000 2-0 0.35000 \n" + "3: 3-2 0.58000 \n" + "4: 4-4 0.10000 4-2 0.34000 4-0 0.12000"); |
297,531 | public static synchronized void onMessegeBrightness(final Handler h, MessegeBrightness msg, final TextView textView, final View overlay) {<NEW_LINE>int value = msg.getValue();<NEW_LINE>textView.setVisibility(View.VISIBLE);<NEW_LINE>h.removeCallbacksAndMessages(null);<NEW_LINE>h.postDelayed(new Runnable() {<NEW_LINE><NE... | .AUTO_BRIGTNESS), textView, overlay); |
130,263 | public void kalmanFilter(Double opt) throws IOException, NullPointerException {<NEW_LINE>ArrayList<double[]> noise = new ArrayList<>();<NEW_LINE>double[] innerNoiseArray = new double[NUMPLOTS];<NEW_LINE>ArrayList<Double> vals;<NEW_LINE>double standardDeviation;<NEW_LINE>if (opt == null) {<NEW_LINE>// Replaced "OFF" wit... | ] = vals.get(b); |
575,833 | private void onSendBtc() {<NEW_LINE>if (!GUIUtil.isReadyForTxBroadcastOrShowPopup(p2PService, walletsSetup)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String receiversAddressString = receiversBtcAddressInputTextField.getText();<NEW_LINE>Coin receiverAmount = bsqFormatter.parseToBTC(btcAmountInputTextField.getText());<NEW_... | signedTx = bsqWalletService.signTxAndVerifyNoDustOutputs(txWithBtcFee); |
242,783 | public EnrollmentConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EnrollmentConfig enrollmentConfig = new EnrollmentConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentT... | String currentParentElement = context.getCurrentParentElement(); |
1,705,044 | protected void initCas(JCas jcas, Question q) {<NEW_LINE>jcas.setDocumentLanguage(language);<NEW_LINE>QuestionInfo qInfo = new QuestionInfo(jcas);<NEW_LINE>qInfo.setSource("web");<NEW_LINE>qInfo.setQuestionId(q.getId());<NEW_LINE>qInfo.addToIndexes(jcas);<NEW_LINE>qInfo.setOnlyArtificialConcepts(q.getHasOnlyArtificialC... | setPageID(c.getPageId()); |
832 | private void transform() {<NEW_LINE>if (mContainer == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (mViews == null) {<NEW_LINE>reCacheViews();<NEW_LINE>}<NEW_LINE>calcCenters();<NEW_LINE>double rad = (Float.isNaN(mGroupRotateAngle)) ? 0.0 : Math.toRadians(mGroupRotateAngle);<NEW_LINE>float sin = (float) Math.sin(rad... | view.getBottom()) / 2; |
344,582 | public int add(long user, long item, double pref) {<NEW_LINE>assert users != null;<NEW_LINE>assert items != null;<NEW_LINE>assert values != null;<NEW_LINE>assert users.length == items.length;<NEW_LINE>assert values.length == users.length;<NEW_LINE>final int idx = freeList.isEmpty() ? nprefs : freeList.dequeueInt();<NEW... | ci] = new int[CHUNK_SIZE]; |
1,819,732 | private void initPanel() {<NEW_LINE>displayNameTF.setText(constraint.getDefaultDisplayName());<NEW_LINE>addValidatee(displayNameTF);<NEW_LINE><MASK><NEW_LINE>if (authConstraint != null) {<NEW_LINE>authConstraintCB.setSelected(true);<NEW_LINE>updateVisualState();<NEW_LINE>String nameString = getRoleNamesString(authConst... | AuthConstraint authConstraint = constraint.getAuthConstraint(); |
1,783,030 | private void extractBindTargets(ExpressionNode node, Map<FunctionReference, ExpressionFunction> functions, Set<String> bindTargets, Set<String> arguments, List<OnnxModel> onnxModels, Map<String, OnnxModel> onnxModelsInUse) {<NEW_LINE>if (isFunctionReference(node)) {<NEW_LINE>FunctionReference reference = FunctionRefere... | bindTargets, arguments, onnxModels, onnxModelsInUse); |
212,246 | protected void addDropDownMenus(List<NavLink> navLinks) {<NEW_LINE>PageParameters params = getPageParameters();<NEW_LINE>DropDownPageMenuNavLink menu = new DropDownPageMenuNavLink("gb.filters", ProjectPage.class);<NEW_LINE>// preserve time filter option on repository choices<NEW_LINE>menu.menuItems.addAll(getRepository... | WicketUtils.getProjectName(params))); |
1,616,428 | private static void addExtensionMetaFromAllFiles(File targetDirectory, List<String> runtimeClasspathElements, Log logger, boolean includeOrigin, List<NamespaceMetaData> namespaceMetaDataList) throws MojoFailureException, MalformedURLException {<NEW_LINE>List<File> jarFiles = new ArrayList<>();<NEW_LINE>listOfJarFiles(t... | .get(index), e); |
1,742,270 | public void artifactsUpdated(Iterable<File> artifacts) {<NEW_LINE>J2eeModuleProvider realProvider = provider.get();<NEW_LINE>if (realProvider == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>J2eeModuleProvider.DeployOnSaveClassInterceptor interceptor = realProvider.getDeployOnSaveClassInterceptor();<NEW_LINE>Set<Artifac... | = new HashSet<Artifact>(); |
713,524 | public void testCompletedStage() throws Exception {<NEW_LINE>CompletionStage<Integer> cs0 = defaultManagedExecutor.completedStage(86);<NEW_LINE>// Disallow CompletableFuture methods:<NEW_LINE>CompletableFuture<Integer> cf0 = (CompletableFuture<Integer>) cs0;<NEW_LINE>try {<NEW_LINE>cf0.obtrudeValue(860);<NEW_LINE>fail(... | , result.startsWith("Default Executor-thread-")); |
1,733,090 | public Object createResultObject(List<Object> fields) throws CodingException {<NEW_LINE>if (fields.size() != count()) {<NEW_LINE>throw new CodingException("Invalid field number for create object " + ". Needs " + count() + " fields, while having " + fields.size() + " fields.");<NEW_LINE>}<NEW_LINE>switch(objectType) {<N... | , fields.get(i)); |
1,758,066 | public void explain(int p, ExplanationForSignedClause explanation) {<NEW_LINE>IntIterableRangeSet set;<NEW_LINE>int m;<NEW_LINE>if (explanation.readVar(p) == vars[0]) {<NEW_LINE>// case a. (see javadoc)<NEW_LINE>m = explanation.readDom(vars[1]).max();<NEW_LINE>set = explanation.complement(vars[1]);<NEW_LINE>set.retainB... | (p) == vars[1]; |
199,676 | public void removeWorkerNodePath(String path, NodeType nodeType, boolean failover) {<NEW_LINE>logger.info("{} node deleted : {}", nodeType, path);<NEW_LINE>try {<NEW_LINE>String serverHost = null;<NEW_LINE>if (!StringUtils.isEmpty(path)) {<NEW_LINE>serverHost = registryClient.getHostByEventDataPath(path);<NEW_LINE>if (... | error("{} server failover failed", nodeType, e); |
246,418 | public InstanceList[] nextSplit(int numTrainFolds) {<NEW_LINE>if (!hasNext()) {<NEW_LINE>throw new NoSuchElementException();<NEW_LINE>}<NEW_LINE>List<InstanceList> trainingSet = new ArrayList<InstanceList>();<NEW_LINE>List<InstanceList> testSet = new ArrayList<InstanceList>();<NEW_LINE>// train on folds [index, index+n... | 1] = new MultiInstanceList(testSet); |
161,456 | public static void rgbToGray_Weighted(InterleavedF32 rgb, GrayF32 gray) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0,rgb.height,row->{<NEW_LINE>for (int row = 0; row < rgb.height; row++) {<NEW_LINE>int indexRgb = rgb.startIndex + row * rgb.stride;<NEW_LINE>int indedGra = gray.startIndex + row * gray.stride;... | = rgb.data[indexRgb++]; |
1,461,129 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0,c1,c2,c3".split(",");<NEW_LINE>SupportEvalBuilder builder = new SupportEvalBuilder("SupportCollection");<NEW_LINE>builder.expression(fields[0], "strvals.countof()");<NEW_LINE>builder.expression(fields[1], "strvals.countof(x => x = 'E1')");<NEW_... | (fields[2], "strvals.countof((x, i) => x = 'E1' and i >= 1)"); |
734,605 | static Query blendPhrase(PhraseQuery query, float tiebreaker, FieldAndFieldType... fields) {<NEW_LINE>List<Query> disjunctions = new ArrayList<>();<NEW_LINE>for (FieldAndFieldType field : fields) {<NEW_LINE>int[] positions = query.getPositions();<NEW_LINE>Term[] terms = query.getTerms();<NEW_LINE>PhraseQuery.Builder <M... | builder = new PhraseQuery.Builder(); |
365,166 | public void createIcons(MultiPacker packer) {<NEW_LINE>for (int i = 0; i < variants; i++) {<NEW_LINE>PixmapRegion shadow = Core.atlas.getPixmap(itemDrop.name + (i + 1));<NEW_LINE>Pixmap image = shadow.crop();<NEW_LINE>int offset = image.width / tilesize - 1;<NEW_LINE>int shadowColor = Color.rgba8888(0, 0, 0, 0.3f);<NEW... | "editor-block-" + name + "-full", image); |
1,449,127 | public Expression evalFieldCall(ClassField field, Expression arg) {<NEW_LINE>if (arg instanceof FunCallExpression && ((FunCallExpression) arg).getDefinition().getResultType() instanceof ClassCallExpression) {<NEW_LINE>FunCallExpression funCall = (FunCallExpression) arg;<NEW_LINE>ClassCallExpression classCall = (ClassCa... | .getDefinition().getResultType(); |
1,215,001 | private void createExtraNics(int size, List<NicProfile> nics, Network finalNetwork) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {<NEW_LINE>if (nics.size() != size) {<NEW_LINE>s_logger.warn("Number of nics " + nics.size() + " doesn't match number of requested nics " + size);<... | - nics.size())); |
1,061,524 | private boolean isDdlOnGsi(CdcDDLContext cdcDDLContext, Map<String, Object> extendParams) {<NEW_LINE>if (extendParams.containsKey(ConnectionProperties.DDL_ON_PRIMARY_GSI_TYPE)) {<NEW_LINE>String type = (String) <MASK><NEW_LINE>return DdlConstants.TYPE_ON_GSI.equals(type);<NEW_LINE>}<NEW_LINE>DdlType ddlType = cdcDDLCon... | extendParams.get(ConnectionProperties.DDL_ON_PRIMARY_GSI_TYPE); |
1,182,463 | public RECIPE fromJson(@Nonnull ResourceLocation recipeId, @Nonnull JsonObject json) {<NEW_LINE>JsonElement itemInput = GsonHelper.isArrayNode(json, JsonConstants.ITEM_INPUT) ? GsonHelper.getAsJsonArray(json, JsonConstants.ITEM_INPUT) : GsonHelper.getAsJsonObject(json, JsonConstants.ITEM_INPUT);<NEW_LINE>ItemStackIngre... | gas().deserialize(gasInput); |
700,088 | private void loadNode15() {<NEW_LINE>UaMethodNode node = new UaMethodNode(this.context, Identifiers.ServerConfigurationType_CreateSigningRequest, new QualifiedName(0, "CreateSigningRequest"), new LocalizedText("en", "CreateSigningRequest"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), true, true)... | .expanded(), true)); |
827,277 | protected TlsCredentials selectClientCredentials13(Principal[] issuers, byte[] certificateRequestContext) throws IOException {<NEW_LINE>LinkedHashMap<String, SignatureSchemeInfo> keyTypeMap = new <MASK><NEW_LINE>for (SignatureSchemeInfo signatureSchemeInfo : jsseSecurityParameters.peerSigSchemes) {<NEW_LINE>if (!signat... | LinkedHashMap<String, SignatureSchemeInfo>(); |
384,770 | public Mono<Response<RoleDefinitionInner>> createOrUpdateWithResponseAsync(String scope, String roleDefinitionId, RoleDefinitionInner roleDefinition) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be... | error(new IllegalArgumentException("Parameter roleDefinitionId is required and cannot be null.")); |
356,566 | static void orderMethods(Class<?> c, String orderS) throws Exception {<NEW_LINE>// #7023180<NEW_LINE>if (orderS == null) {<NEW_LINE>orderS = findOrder();<NEW_LINE>}<NEW_LINE>if ("natural".equals(orderS)) {<NEW_LINE>// NOI18N<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Method[] ms = null;<NEW_LINE>try {<NEW_LINE>Field declared... | Object refData = ref.get(); |
1,139,358 | static String doBsh(String url, String text) {<NEW_LINE>String host = "";<NEW_LINE>String port = "";<NEW_LINE>String returnValue = "-1";<NEW_LINE>String orgURL = url;<NEW_LINE>// Need some format checking here<NEW_LINE>try {<NEW_LINE>// remove the bsh://<NEW_LINE>url = url.substring(6);<NEW_LINE>// get the index of the... | .parseInt(port) + 1); |
1,426,247 | protected String doIt() {<NEW_LINE>if (AcctSchemaId.equals(p_SourceAcctSchema_ID, p_TargetAcctSchema_ID)) {<NEW_LINE>throw new AdempiereException("Must be different");<NEW_LINE>}<NEW_LINE>final AcctSchema <MASK><NEW_LINE>final AcctSchemaElementsMap sourceElements = source.getSchemaElements();<NEW_LINE>final I_C_AcctSch... | source = acctSchemasRepo.getById(p_SourceAcctSchema_ID); |
1,701,877 | final void changeFile(FileObject newFile) {<NEW_LINE>if (newFile == null) {<NEW_LINE>// NOI18N<NEW_LINE>throw new NullPointerException("NPE for " + file);<NEW_LINE>}<NEW_LINE>if (newFile.equals(file)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (ERR.isLoggable(Level.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>ERR.fine("changeFi... | ? null : lock.get(); |
1,254,326 | private void scheduleDownloadStatusSending() {<NEW_LINE>scheduledFuture = scheduler.scheduleAtFixedRate(() -> {<NEW_LINE>final DownloaderStatus newStatus = downloaderStatusRetrieval.getStatus();<NEW_LINE>if (newStatus.getState() == DownloaderStatus.State.DOWNLOADING) {<NEW_LINE>// Always send updates when downloading<N... | ), newStatus.getDownloadRateFormatted()); |
414,287 | protected final Value evalImpl(final SemanticNode expr, final Context c, final TLCState s0, final TLCState s1, final int control, CostModel cm) {<NEW_LINE>try {<NEW_LINE>if (isInitialize()) {<NEW_LINE>// Cannot delegate to fastTool that is null during initialization.<NEW_LINE>return super.evalImpl(expr, c, s0, s1, cont... | s0, s1, control, cm); |
1,477,851 | protected boolean checkTargetController(UUID playerId, Game game) {<NEW_LINE>switch(mayActivate) {<NEW_LINE>case ANY:<NEW_LINE>case EACH_PLAYER:<NEW_LINE>return true;<NEW_LINE>case ACTIVE:<NEW_LINE>return game.getActivePlayerId() == playerId;<NEW_LINE>case NOT_YOU:<NEW_LINE><MASK><NEW_LINE>case TEAM:<NEW_LINE>return !g... | return !controlsAbility(playerId, game); |
1,051,363 | public Tuple4<DataSet<Tuple2<Long, MT>>, DataSet<Tuple2<Long, DT>>, ApsContext, BatchOperator[]> persistentAll(DataSet<Tuple2<Long, MT>> model, DataSet<Tuple2<Long, DT>> data, ApsContext context, BatchOperator[] others, String prefix) {<NEW_LINE>if (available()) {<NEW_LINE>TypeInformation<DT> dtType = (null == data) ? ... | ()).getTypeAt(1); |
82,892 | public static java.sql.Date convert(Object value) throws DBException {<NEW_LINE>Calendar cal = Calendar.getInstance();<NEW_LINE>if (null == value) {<NEW_LINE>return null;<NEW_LINE>} else if (value instanceof Timestamp) {<NEW_LINE>cal.setTimeInMillis(((Timestamp) value).getTime());<NEW_LINE>} else if (value instanceof j... | = doParse((String) value); |
549,972 | // American (avoid calculating the whole set of dates)<NEW_LINE>private AdjustableDate selectAmerican(LocalDate proposedExerciseDate, DateAdjuster adjuster) {<NEW_LINE>LocalDate start = dateDefinition.getUnadjusted().get(0);<NEW_LINE>LocalDate end = dateDefinition.getUnadjusted().get(1);<NEW_LINE>// search adjusted dat... | throw new IllegalArgumentException("Invalid exercise date: " + proposedExerciseDate); |
638,256 | private String _findDupes(String val) {<NEW_LINE>// caller must call stripHTMLMedia on passed val<NEW_LINE>String[] split = val.split(",", 1);<NEW_LINE>if (split.length != 2) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String mid = split[0];<NEW_LINE>val = split[1];<NEW_LINE>String csum = Long.toString(Utils.fieldCheck... | nids = new ArrayList<>(); |
1,669,200 | public void testActionlessFutureWithDefaultManagedExecutor() throws Exception {<NEW_LINE>BlockableIncrementFunction increment = new BlockableIncrementFunction("testActionlessFutureWithDefaultManagedExecutor", null, null, false);<NEW_LINE>CompletableFuture<Integer> cf1 = defaultManagedExecutor.newIncompleteFuture();<NEW... | assertFalse(cf1.isCompletedExceptionally()); |
1,146,977 | private void placeBlockSimple(BlockPos pos) {<NEW_LINE>Direction side = null;<NEW_LINE>Direction[] sides = Direction.values();<NEW_LINE>Vec3d eyesPos = RotationUtils.getEyesPos();<NEW_LINE>Vec3d posVec = Vec3d.ofCenter(pos);<NEW_LINE>double distanceSqPosVec = eyesPos.squaredDistanceTo(posVec);<NEW_LINE>Vec3d[] hitVecs ... | .offset(sides[i]); |
269,967 | private void showErrorNotification(@Nonnull Project project) {<NEW_LINE>String title = DiagnosticBundle.message("error.new.notification.title");<NEW_LINE>String linkText = DiagnosticBundle.message("error.new.notification.link");<NEW_LINE>Notification notification = new Notification("", AllIcons.Ide.FatalError, title, n... | .CurrentTheme.Notification.Error.BACKGROUND; |
1,707,278 | public static ContractSummaryBean unmarshallContractSummary(Map<String, Object> source) {<NEW_LINE>if (source == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ContractSummaryBean bean = new ContractSummaryBean();<NEW_LINE>bean.setContractId(asLong(source.get("id")));<NEW_LINE>bean.setCreatedOn(asDate(source.get("cr... | source.get("apiOrganizationName"))); |
1,067,862 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TagResourceRequest> request = null;<NEW_LINE>Respo... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,758,525 | static ConfiguredType create(JsonObject type) {<NEW_LINE>ConfiguredType ct = new ConfiguredType(type.getString("type"), type.getBoolean("standalone", false), type.getString("prefix", null), type.getString("description", null), toList(type.getJsonArray("provides")));<NEW_LINE>List<String> producers = toList(type.getJson... | (type.getJsonArray("inherits")); |
371,269 | public boolean visit(SQLOrderBy x) {<NEW_LINE>final SQLASTVisitor orderByVisitor = createOrderByVisitor(x);<NEW_LINE>SQLSelectQueryBlock query = null;<NEW_LINE>if (x.getParent() instanceof SQLSelectQueryBlock) {<NEW_LINE>query = (SQLSelectQueryBlock) x.getParent();<NEW_LINE>}<NEW_LINE>if (query != null) {<NEW_LINE>for ... | SQLExpr expr = item.getExpr(); |
85,791 | public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {<NEW_LINE>final String createTableSql = "CREATE TABLE IF NOT EXISTS visits ( visit_id INT NOT NULL " + "AUTO_INCREMENT, user_ip VARCHAR(46) NOT NULL, timestamp DATETIME NOT NULL, " + "PRIMARY KEY (visit_id) )";<NEW... | savedIp = rs.getString("user_ip"); |
746,268 | public final AltererResult<G, C> alter(final Seq<Phenotype<G, C>> population, final long generation) {<NEW_LINE>final AltererResult<G, C> result;<NEW_LINE>if (population.size() >= 2) {<NEW_LINE>final var random = RandomRegistry.random();<NEW_LINE>final int order = Math.min(_order, population.size());<NEW_LINE>final MSe... | , generation)).sum(); |
107,504 | public void allocateMemory(int declaredMinSize, int declaredMaxSize) {<NEW_LINE>checkNotParsed();<NEW_LINE>validateSingleMemory();<NEW_LINE>memory <MASK><NEW_LINE>module().addLinkAction((context, instance) -> {<NEW_LINE>final int maxAllowedSize = minUnsigned(declaredMaxSize, module().limits().memoryInstanceSizeLimit())... | = new MemoryInfo(declaredMinSize, declaredMaxSize); |
1,525,483 | final ConfigureLogsForPlaybackConfigurationResult executeConfigureLogsForPlaybackConfiguration(ConfigureLogsForPlaybackConfigurationRequest configureLogsForPlaybackConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(configureLogsForPlaybackConfigurationRequest);<NEW_LINE>AWSReque... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,584,222 | public MsTCPSampler handleTcpRequest(MsTestElement testElement) {<NEW_LINE>MsTCPSampler tcpSampler = null;<NEW_LINE>try {<NEW_LINE>if (testElement instanceof MsTCPSampler) {<NEW_LINE>tcpSampler = (MsTCPSampler) testElement;<NEW_LINE>String protocol = tcpSampler.getProtocol();<NEW_LINE>if (StringUtils.equalsIgnoreCase(p... | String reportType = tcpSampler.getReportType(); |
508,719 | public static void quickSort(long[] array, float[] values, int low, int high) {<NEW_LINE>if (low < high) {<NEW_LINE>int mid <MASK><NEW_LINE>long tmp = array[mid];<NEW_LINE>float tmpValue = values[mid];<NEW_LINE>array[mid] = array[low];<NEW_LINE>values[mid] = values[low];<NEW_LINE>array[low] = tmp;<NEW_LINE>values[low] ... | = (low + high) / 2; |
1,244,728 | private void makeEditForm(HtmlPage html, String resource, boolean firstTimeForNewPage, String defaultNewPageContent) {<NEW_LINE>html.put("resource", resource);<NEW_LINE>html.put(TIME_STAMP, String.valueOf(SaveRecorder.timeStamp()));<NEW_LINE>html.put(TICKET_ID, String.valueOf(SaveRecorder.newTicket()));<NEW_LINE>if (re... | "?" + request.getInput("redirectAction"); |
1,183,024 | public void verifyNoChanges(Path firstOutputFile, List<Path> outputFiles) throws ParseException, MaxDifferencesException, TargetsStressRunException {<NEW_LINE>TargetHashFileParser parser = new TargetHashFileParser();<NEW_LINE>ParsedTargetsFile originalFile = parser.parseFile(firstOutputFile);<NEW_LINE>for (Path file : ... | newTargetsFile = parser.parseFile(file); |
834,799 | public void addAll(final Iterator<PartitionChunkEntry<VersionType, ObjectType>> objects) {<NEW_LINE>lock.writeLock().lock();<NEW_LINE>try {<NEW_LINE>final IdentityHashMap<TimelineEntry, Interval> allEntries = new IdentityHashMap<>();<NEW_LINE>while (objects.hasNext()) {<NEW_LINE>PartitionChunkEntry<VersionType, ObjectT... | .writeLock().unlock(); |
423,491 | protected void init() {<NEW_LINE>// httpclient<NEW_LINE>Map<String, Integer> httpParamsMap = JSONHelper.toObject(request.getServletContext().getInitParameter("uav.app.godeye.http.client.params"), Map.class);<NEW_LINE>initHttpClient(httpParamsMap.get("max.con"), httpParamsMap.get("max.tot.con"), httpParamsMap.get("sock.... | ("uav.app.godeye.redis.store.params"), Map.class); |
488,528 | private static JsonAlbertaPatient patientToPatientBPartner(@NonNull final Patient patient) {<NEW_LINE>final JsonAlbertaPatient albertaPatient = new JsonAlbertaPatient();<NEW_LINE>albertaPatient.setIsTransferPatient(patient.isChangeInSupplier());<NEW_LINE>albertaPatient.setIVTherapy(patient.isIvTherapy());<NEW_LINE>// d... | ().getDischargeDate())); |
168,975 | protected static void addStreamsOptions(ContextMenu m, int numStreams, boolean join) {<NEW_LINE>String streamSubmenu = "Twitch Stream";<NEW_LINE>String miscSubmenu = Language.getString("channelCm.menu.misc");<NEW_LINE><MASK><NEW_LINE>m.addItem("stream", "Normal", streamSubmenu);<NEW_LINE>m.addItem("streamPopout", "Popo... | m.setSubMenuIcon(streamSubmenu, ICON_SPACING); |
716,285 | public boolean enterUnaryNode(final UnaryNode unaryNode) {<NEW_LINE>enterDefault(unaryNode);<NEW_LINE>final TokenType tokenType = unaryNode.tokenType();<NEW_LINE>if (tokenType == TokenType.NEW) {<NEW_LINE>type("NewExpression");<NEW_LINE>comma();<NEW_LINE>final CallNode callNode = (CallNode) unaryNode.getExpression();<N... | getExpression().accept(this); |
1,036,675 | // creates an HTML table to display actions loaded by the plugin<NEW_LINE>private void addLoadedActionsContent(StringBuilder buffer, PluginDescription pluginDescription) {<NEW_LINE>if (!model.isLoaded(pluginDescription)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>buffer.append("<TR>");<NEW_LINE>buffer.append("<TD VALIGN=\"... | KeyStroke keyBinding = dockableAction.getKeyBinding(); |
1,149,283 | public void workspaceSwitching(Workspace workspace) {<NEW_LINE>switchingWorkspace = true;<NEW_LINE>recentEditorsMenu.removeAll();<NEW_LINE>if (recentEditorsMenu.getItemCount() == 0) {<NEW_LINE>recentEditorsMenu.add(EMPTYMARKER).setEnabled(false);<NEW_LINE>}<NEW_LINE>String filePath = workspace.getPath();<NEW_LINE>Defau... | null, null, false, filePath); |
697,056 | private ActionResult<FluidStack> tryExtractFluidInternal(int millibuckets, EnumFacing from, FluidExtractor extractor, boolean simulate) {<NEW_LINE>if (from == null || millibuckets <= 0) {<NEW_LINE>return FAILED_EXTRACT;<NEW_LINE>}<NEW_LINE>IFluidHandler fluidHandler = pipe.getHolder().getCapabilityFromPipe(from, CapUti... | getHolder().getPipePos()); |
1,743,991 | public final VariableModifierContext variableModifier() throws RecognitionException {<NEW_LINE>VariableModifierContext _localctx = new VariableModifierContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 24, RULE_variableModifier);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>setState(422);<NEW_LINE>_errHandler.sync(t... | _errHandler.recover(this, re); |
1,812,884 | public boolean onClickTransactionContextMenuItem(final MenuItem item, final Sha256Hash transactionId) {<NEW_LINE>final Wallet wallet = viewModel.wallet.getValue();<NEW_LINE>final Transaction tx = wallet.getTransaction(transactionId);<NEW_LINE>final int itemId = item.getItemId();<NEW_LINE>if (itemId == R.id.wallet_trans... | (Qr.encodeCompressBinary(txSerialized)); |
611,715 | public void doCommand() throws Exception {<NEW_LINE>final File configurationFile = cliEnvironment.getConfigurationFile();<NEW_LINE>if (configurationFile == null || !configurationFile.exists()) {<NEW_LINE>out("configuration file is not present");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!promptForContinue("Proceeding wi... | null, DomainID.systemId()); |
1,765,172 | public static MimeType mimeTypeFromObject(Object payload, String originalContentType) {<NEW_LINE>Assert.notNull(payload, "payload object cannot be null.");<NEW_LINE>if (payload instanceof byte[]) {<NEW_LINE>return MimeTypeUtils.APPLICATION_OCTET_STREAM;<NEW_LINE>}<NEW_LINE>if (payload instanceof String) {<NEW_LINE>retu... | .getClass().getName(); |
803,880 | void paintIntersecting(Graphics g, Component cmp, int x, int y, int w, int h, boolean above, int elevation) {<NEW_LINE>if (layout.isOverlapSupported() && cmp.getParent() == this) {<NEW_LINE>int <MASK><NEW_LINE>int startIndex;<NEW_LINE>int endIndex;<NEW_LINE>if (above) {<NEW_LINE>startIndex = indexOfComponent + 1;<NEW_L... | indexOfComponent = components.indexOf(cmp); |
522,660 | public void showPopup(HashMap<String, String> actionsSet, Object observable) {<NEW_LINE>UIDropDownMenu uiDropDownMenu = new UIDropDownMenu();<NEW_LINE>actionsSet.entrySet().forEach(entry -> uiDropDownMenu.setActionName(entry.getKey(), entry.getValue()));<NEW_LINE>Array<String> actions = new Array<>();<NEW_LINE>actionsS... | uiDropDownMenu.setX(coordinates.x); |
1,752,021 | // Call on EDT<NEW_LINE>private void addMBeanInfo(XMBean mbean, MBeanInfo mbeanInfo) {<NEW_LINE>// NOI18N<NEW_LINE>String border = Resources.getText("LBL_MBeanInfo");<NEW_LINE>// NOI18N<NEW_LINE>String <MASK><NEW_LINE>DefaultTableModel tableModel = (DefaultTableModel) infoTable.getModel();<NEW_LINE>Object[] rowData = n... | text = Resources.getText("LBL_Info"); |
1,117,823 | private static UsageViewPresentation createPresentation(@Nonnull UsageViewDescriptor descriptor, @Nonnull Usage[] usages) {<NEW_LINE>UsageViewPresentation presentation = new UsageViewPresentation();<NEW_LINE>presentation.setTabText(RefactoringBundle.message("usageView.tabText"));<NEW_LINE>presentation.setTargetsNodeTex... | (RefactoringBundle.message("usageView.usagesText")); |
1,319,647 | public ByteBuf encode(ByteBuf buf, JoinGameMessage message) throws IOException {<NEW_LINE>buf.writeInt(message.getId());<NEW_LINE>buf.writeBoolean(message.isHardcore());<NEW_LINE>buf.writeByte(message.getMode());<NEW_LINE>buf.writeByte(message.getPreviousMode());<NEW_LINE>writeVarInt(buf, message.getWorlds().length);<N... | buf, message.getMaxPlayers()); |
1,830,209 | private void createIngressRoute(String namespace, String name) throws ApiException {<NEW_LINE>try {<NEW_LINE>IngressRoute ingressRoute = new IngressRoute();<NEW_LINE>V1ObjectMeta meta = new V1ObjectMeta();<NEW_LINE>meta.setName(name);<NEW_LINE>meta.setNamespace(namespace);<NEW_LINE>meta.setOwnerReferences(OwnerReferenc... | e.getMessage(), e); |
309,830 | public void marshall(ConformancePackDetail conformancePackDetail, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (conformancePackDetail == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(conformancePackDetail... | conformancePackDetail.getConformancePackId(), CONFORMANCEPACKID_BINDING); |
885,141 | public void stretchDIBits(int dx, int dy, int dw, int dh, int sx, int sy, int sw, int sh, byte[] image, int usage, long rop) {<NEW_LINE>byte[] record = new byte[26 + (image.length + image.length % 2)];<NEW_LINE>int pos = 0;<NEW_LINE>pos = setUint32(record, pos, record.length / 2);<NEW_LINE>pos = <MASK><NEW_LINE>pos = s... | setUint16(record, pos, RECORD_STRETCH_DIBITS); |
1,424,702 | public DeleteInventoryResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteInventoryResult deleteInventoryResult = new DeleteInventoryResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int t... | JsonToken token = context.getCurrentToken(); |
1,849,831 | public void analyze(Program program) {<NEW_LINE>Graph cfg = ProgramUtils.buildControlFlowGraph(program);<NEW_LINE>Graph dom = GraphUtils.buildDominatorGraph(GraphUtils.buildDominatorTree(cfg), cfg.size());<NEW_LINE>DefinitionExtractor defExtractor = new DefinitionExtractor();<NEW_LINE>UsageExtractor useExtractor = new ... | .getIncomings().size(); |
1,225,637 | private void read() throws BuildException {<NEW_LINE>Document document;<NEW_LINE>if (this.is == null) {<NEW_LINE>File directory = new File(nbPath + FILE_SEPARATOR + TRACKING_DIRECTORY);<NEW_LINE>if (!directory.exists()) {<NEW_LINE>directory.mkdirs();<NEW_LINE>}<NEW_LINE>setTrackingFile(directory, getTrackingFileName())... | getAbsolutePath() + " is not well formatted XML document.", e); |
1,428,460 | public void actionPerformed(final ActionEvent e) {<NEW_LINE>final Controller controller = Controller.getCurrentController();<NEW_LINE>MapStyle mapStyle = controller.getModeController().getExtension(MapStyle.class);<NEW_LINE>final MapStyleModel model = (MapStyleModel) mapStyle.getMapHook(controller.getMap());<NEW_LINE>f... | ).getProperty(MapStyle.RESOURCES_BACKGROUND_COLOR); |
1,150,827 | final RetryBuildBatchResult executeRetryBuildBatch(RetryBuildBatchRequest retryBuildBatchRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(retryBuildBatchRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "RetryBuildBatch"); |
1,164,809 | public static // at runtime.<NEW_LINE>void generateBackendsTabletMetrics() {<NEW_LINE>// remove all previous 'tablet' metric<NEW_LINE>DORIS_METRIC_REGISTER.removeMetrics(TABLET_NUM);<NEW_LINE>DORIS_METRIC_REGISTER.removeMetrics(TABLET_MAX_COMPACTION_SCORE);<NEW_LINE>SystemInfoService infoService = Env.getCurrentSystemI... | long) invertedIndex.getTabletNumByBackendId(beId); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.