idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,135,197 | private ChannelFuture finishEncode(final ChannelHandlerContext ctx, ChannelPromise promise) {<NEW_LINE>if (finished) {<NEW_LINE>promise.setSuccess();<NEW_LINE>return promise;<NEW_LINE>}<NEW_LINE>finished = true;<NEW_LINE>final ByteBuf footer = ctx.alloc().heapBuffer(compressor.maxCompressedLength(buffer.readableBytes()... | footer.writerIndex(idx + HEADER_LENGTH); |
645,382 | final UpdateRuleResult executeUpdateRule(UpdateRuleRequest updateRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,578,143 | public static Resource computeTotalResourceChange(TopologyAPI.Topology topology, Map<String, Integer> componentChanges, Resource defaultInstanceResources, ScalingDirection scalingDirection) {<NEW_LINE>double cpu = 0;<NEW_LINE>ByteAmount ram = ByteAmount.ZERO;<NEW_LINE>ByteAmount disk = ByteAmount.ZERO;<NEW_LINE>Map<Str... | ().multiply(parallelismChange)); |
74,034 | protected void startCropActivity(Uri uri) {<NEW_LINE>final Context baseContext = getActivity();<NEW_LINE>if (baseContext != null) {<NEW_LINE>final Context context = new ContextThemeWrapper(baseContext, R.style.WordPress_NoActionBar);<NEW_LINE>UCrop.Options options = new UCrop.Options();<NEW_LINE>options.setShowCropGrid... | , R.attr.wpColorAppBar)); |
726,919 | private boolean suppress(final PsiElement element, final CommonProblemDescriptor descriptor, final SuppressIntentionAction action, final RefEntity refEntity) {<NEW_LINE>final PsiModificationTracker tracker = PsiManager.getInstance(myProject).getModificationTracker();<NEW_LINE>ApplicationManager.getApplication().runWrit... | getInstance(myProject).commitAllDocuments(); |
1,394,359 | public static void main(final String[] args) throws Exception {<NEW_LINE>final PlacementDriverOptions pdOpts = // use a fake pd<NEW_LINE>PlacementDriverOptionsConfigured.newConfigured().// use a fake pd<NEW_LINE>withFake(true).config();<NEW_LINE>final //<NEW_LINE>StoreEngineOptions //<NEW_LINE>storeOpts = StoreEngineOp... | Node node = new Node(opts); |
221,603 | final CreateTestGridProjectResult executeCreateTestGridProject(CreateTestGridProjectRequest createTestGridProjectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createTestGridProjectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,027,551 | private Mono<FeedResponse<T>> executeRequestAsync(RxDocumentServiceRequest request) {<NEW_LINE>if (this.operationContextAndListener == null) {<NEW_LINE>return client.readFeed(request).map(rsp -> BridgeInternal.toChangeFeedResponsePage(rsp, this.factoryMethod, klass));<NEW_LINE>} else {<NEW_LINE>final OperationListener ... | listener.responseListener(operationContext, rsp); |
305,816 | public static HTMLPageAsset createPage(final Folder folder, final User user) throws DotDataException, DotSecurityException {<NEW_LINE>final User sysuser = APILocator.getUserAPI().getSystemUser();<NEW_LINE>final Host host = APILocator.getHostAPI().findDefaultHost(sysuser, false);<NEW_LINE>Template template = new Templat... | setBoolProperty(Contentlet.IS_TEST_MODE, true); |
930,055 | public static DescribeDBNodePerformanceResponse unmarshall(DescribeDBNodePerformanceResponse describeDBNodePerformanceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDBNodePerformanceResponse.setRequestId(_ctx.stringValue("DescribeDBNodePerformanceResponse.RequestId"));<NEW_LINE>describeDBNodePerformanceResponse... | (_ctx.stringValue("DescribeDBNodePerformanceResponse.DBNodeId")); |
1,244,844 | public String handle(Request request, Response response) {<NEW_LINE>PhotonRequest photonRequest = null;<NEW_LINE>try {<NEW_LINE>photonRequest = photonRequestFactory.create(request);<NEW_LINE>} catch (BadRequestException e) {<NEW_LINE>JSONObject json = new JSONObject();<NEW_LINE>json.put("message", e.getMessage());<NEW_... | ), json.toString()); |
1,745,842 | static BufferedImage makeArrowImage(Color fillColor, Color backgroundColor, boolean flip) {<NEW_LINE>int height = 18, width = 18;<NEW_LINE>BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>Graphics2D g = im.createGraphics();<NEW_LINE>g.setRenderingHint(RenderingHints.KEY_ANTIALI... | height / 2, height / 2); |
1,265,071 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
757,373 | public void start(Stage stage) throws Exception {<NEW_LINE>final VBox pane = new VBox();<NEW_LINE>pane.setSpacing(30);<NEW_LINE>pane.setStyle("-fx-background-color:WHITE;-fx-padding:40;");<NEW_LINE>pane.getChildren().add(new TextField());<NEW_LINE>JFXTextField field = new JFXTextField();<NEW_LINE>field.setLabelFloat(tr... | getChildren().add(validationField); |
1,474,895 | protected void select_instances() {<NEW_LINE>List<Object<MASK><NEW_LINE>if (selected_violations.size() <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>java.util.Set<app.freerouting.board.Item> selected_items = new java.util.TreeSet<app.freerouting.board.Item>();<NEW_LINE>for (int i = 0; i < selected_violations.size(); ++i... | > selected_violations = list.getSelectedValuesList(); |
688,958 | protected void tr(OWLDeclarationAxiom axiom) {<NEW_LINE>OWLEntity entity = axiom.getEntity();<NEW_LINE>if (entity.isBottomEntity() || entity.isTopEntity()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<OWLAnnotationAssertionAxiom> set = asList(owlOntology.annotationAssertionAxioms(entity.getIRI()));<NEW_LINE>if (set.isEm... | altIdOptional.get().unrelated); |
720,785 | public void save(RowBasedPartition part, MatrixPartitionMeta partMeta, PSMatrixSaveContext saveContext, DataOutputStream output) throws IOException {<NEW_LINE>List<Integer> rowIds = saveContext.getRowIndexes();<NEW_LINE>ServerRowsStorage rows = part.getRowsStorage();<NEW_LINE>if (rowIds == null || rowIds.isEmpty()) {<N... | .getPartitionKey().getEndRow(); |
1,648,636 | protected Map<String, Object> convertMap(Map<String, Object> obj, long features, Set<String> ignoreProperty) {<NEW_LINE>if (ignoreProperty.isEmpty()) {<NEW_LINE>return obj;<NEW_LINE>}<NEW_LINE>boolean cover = ToString.Feature.hasFeature(features, coverIgnoreProperty);<NEW_LINE>boolean isNullPropertyToEmpty = ToString.F... | >(ignoreProperty.size()); |
1,808,020 | protected CsvReporter createInstance() {<NEW_LINE>final CsvReporter.Builder reporter = CsvReporter.forRegistry(getMetricRegistry());<NEW_LINE>if (hasProperty(DURATION_UNIT)) {<NEW_LINE>reporter.convertDurationsTo(getProperty(DURATION_UNIT, TimeUnit.class));<NEW_LINE>}<NEW_LINE>if (hasProperty(RATE_UNIT)) {<NEW_LINE>rep... | reporter.filter(getMetricFilter()); |
1,666,547 | public static BenchmarkClassModel create(Class<?> clazz) {<NEW_LINE>if (!clazz.getSuperclass().equals(Object.class)) {<NEW_LINE>throw new InvalidBenchmarkException("Class '%s' must not extend any class other than %s. Prefer composition.", clazz, Object.class);<NEW_LINE>}<NEW_LINE>if (Modifier.isAbstract(clazz.getModifi... | clazz.getAnnotation(VmOptions.class); |
610,411 | public INDArray sample(long[] shape) {<NEW_LINE>long numRows = 1;<NEW_LINE>for (int i = 0; i < shape.length - 1; i++) numRows *= shape[i];<NEW_LINE>long numCols = shape[shape.length - 1];<NEW_LINE>val dtype = Nd4j.defaultFloatingPointType();<NEW_LINE>val flatShape = new <MASK><NEW_LINE>val flatRng = Nd4j.getExecutioner... | long[] { numRows, numCols }; |
709,565 | public SolrQueryResponse query(SolrQueryRequest req) throws SolrException {<NEW_LINE>final long startTime = System.currentTimeMillis();<NEW_LINE>// during the solr query we set the thread name to the query string to get more debugging info in thread dumps<NEW_LINE>final String threadname = Thread.currentThread().getNam... | final SolrQueryResponse rsp = new SolrQueryResponse(); |
687,226 | private BaseExpireSnapshotsActionResult deleteFiles(Iterator<Row> expired) {<NEW_LINE>AtomicLong dataFileCount = new AtomicLong(0L);<NEW_LINE>AtomicLong manifestCount = new AtomicLong(0L);<NEW_LINE>AtomicLong manifestListCount = new AtomicLong(0L);<NEW_LINE>Tasks.foreach(expired).retry(3).stopRetryOn(NotFoundException.... | ), manifestListCount.get()); |
1,260,613 | protected void configure() {<NEW_LINE>if (options.enablePreemptor) {<NEW_LINE>LOG.info("Preemptor Enabled.");<NEW_LINE>bind(PreemptorMetrics.class).in(Singleton.class);<NEW_LINE>bind(Preemptor.class).to(Preemptor.PreemptorImpl.class);<NEW_LINE>bind(Preemptor.PreemptorImpl.class<MASK><NEW_LINE>bind(new TypeLiteral<Amoun... | ).in(Singleton.class); |
808,576 | public static Map<String, Object> encodeRuleDescriptionToMap(RuleDescription ruleDescription) {<NEW_LINE>HashMap<String, Object> descriptionMap = new HashMap<>();<NEW_LINE>if (ruleDescription.getFilter() instanceof SqlFilter) {<NEW_LINE>HashMap<String, Object> filterMap = new HashMap<>();<NEW_LINE>filterMap.put(ClientC... | filterMap = new HashMap<>(); |
1,709,903 | private static void restoreResumedTaskReports(ResumeState resume, LoaderState state) {<NEW_LINE>int inputTaskCount = resume.getInputTaskReports().size();<NEW_LINE>int outputTaskCount = resume.getOutputTaskReports().size();<NEW_LINE>state.initialize(inputTaskCount, outputTaskCount);<NEW_LINE>for (int i = 0; i < inputTas... | getOutputTaskReports().get(i); |
420,511 | public void __setitem__(org.python.Object index, org.python.Object value) {<NEW_LINE>try {<NEW_LINE>int idx;<NEW_LINE>if (index instanceof org.python.types.Bool) {<NEW_LINE>idx = (int) ((org.python.types.Bool) <MASK><NEW_LINE>} else {<NEW_LINE>idx = (int) ((org.python.types.Int) index).value;<NEW_LINE>}<NEW_LINE>if (id... | index).__int__().value; |
1,289,447 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath pathA = new RegressionPath();<NEW_LINE>env.compileDeploy("module A;\n @name('createA') @protected create window MyWindow#keepall as SupportBean", pathA);<NEW_LINE>RegressionPath pathB = new RegressionPath();<NEW_LINE>env.compileDeploy("module B;\n @na... | , EPObjectType.NAMEDWINDOW, "MyWindow")); |
102,775 | private void placeSlimefunBlock(SlimefunItem sfItem, ItemStack item, Block block, Dispenser dispenser) {<NEW_LINE>BlockPlacerPlaceEvent e = new BlockPlacerPlaceEvent(dispenser.getBlock(), item, block);<NEW_LINE>Bukkit.getPluginManager().callEvent(e);<NEW_LINE>if (!e.isCancelled()) {<NEW_LINE>boolean hasItemHandler = sf... | setType(item.getType()); |
1,441,950 | final DeleteServiceResult executeDeleteService(DeleteServiceRequest deleteServiceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteServiceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,745,019 | public ListAttachedIndicesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListAttachedIndicesResult listAttachedIndicesResult = new ListAttachedIndicesResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | int originalDepth = context.getCurrentDepth(); |
325,737 | public static P createSmartArt(String layoutRelId, String dataRelId, String colorsRelId, String styleRelId, String cx, String cy) throws Exception {<NEW_LINE>String ml = "<w:p xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\">" + "<w:r>" + "<w:rPr>" + "<w:noProof/>" + "<w:lang w:eastAsia=\"en-AU\... | XmlUtils.unmarshallFromTemplate(ml, mappings); |
66,288 | public EmailSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EmailSettings emailSettings = new EmailSettings();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<... | class).unmarshall(context)); |
496,880 | private Layout createLayout(final float textWidth, @Nullable Layout previousLayout) {<NEW_LINE>Layout layout;<NEW_LINE>if (previousWidth != textWidth || previousLayout == null) {<NEW_LINE>layout = new StaticLayout(spanned, mTextPaint, (int) Math.ceil(textWidth), Layout.Alignment.ALIGN_NORMAL, 1, 0, false);<NEW_LINE>} e... | ALIGN_NORMAL, 1, 0, false); |
1,679,737 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>// Inflate the layout for this fragment<NEW_LINE>View view = inflater.inflate(R.layout.fragment_arp_replay_dialog, container, false);<NEW_LINE>getDialog().setTitle("ARP Replay Attack");<NEW_LINE>btnArpStart = (B... | android.R.layout.simple_spinner_dropdown_item); |
1,032,392 | public void visit(BLangErrorDestructure errorDeStmt, AnalyzerData data) {<NEW_LINE>BLangErrorVarRef varRef = errorDeStmt.varRef;<NEW_LINE>if (varRef.message != null) {<NEW_LINE>if (names.fromIdNode(((BLangSimpleVarRef) varRef.message).variableName) != Names.IGNORE) {<NEW_LINE><MASK><NEW_LINE>checkInvalidTypeDef(varRef.... | setTypeOfVarRefInErrorBindingAssignment(varRef.message, data); |
1,340,610 | public void collect(int doc, long bucket) throws IOException {<NEW_LINE>weights = bigArrays.<MASK><NEW_LINE>sums = bigArrays.grow(sums, bucket + 1);<NEW_LINE>sumCompensations = bigArrays.grow(sumCompensations, bucket + 1);<NEW_LINE>weightCompensations = bigArrays.grow(weightCompensations, bucket + 1);<NEW_LINE>if (docV... | grow(weights, bucket + 1); |
1,295,581 | public Status update(String table, String key, Map<String, ByteIterator> values) {<NEW_LINE>setTable(table);<NEW_LINE>if (debug) {<NEW_LINE>System.<MASK><NEW_LINE>}<NEW_LINE>final byte[][] qualifiers = new byte[values.size()][];<NEW_LINE>final byte[][] byteValues = new byte[values.size()][];<NEW_LINE>int idx = 0;<NEW_L... | out.println("Setting up put for key: " + key); |
142,683 | private String render(Resource resource, Map<String, Object> model, Locale locale, PurchaseContext purchaseContext, TemplateOutput templateOutput) {<NEW_LINE>try {<NEW_LINE>ModelAndView mv = new ModelAndView();<NEW_LINE>mv.getModelMap().addAllAttributes(model);<NEW_LINE>mv.addObject("format-date", MustacheCustomTag.FOR... | updatedModel.putIfAbsent("custom-footer-text", ""); |
1,200,716 | public static ListCallOutDialogRecordsResponse unmarshall(ListCallOutDialogRecordsResponse listCallOutDialogRecordsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCallOutDialogRecordsResponse.setRequestId(_ctx.stringValue("ListCallOutDialogRecordsResponse.RequestId"));<NEW_LINE>listCallOutDialogRecordsResponse.setTo... | (_ctx.longValue("ListCallOutDialogRecordsResponse.TotalCount")); |
255,583 | public CellInput unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CellInput cellInput = new CellInput();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonTok... | class).unmarshall(context)); |
667,888 | // Node Table.<NEW_LINE>public static void exec(String location, XLoaderFiles loaderFiles, List<String> datafiles, boolean collectStats) {<NEW_LINE>FmtLog.info(BulkLoaderX.LOG_Data, "Ingest data");<NEW_LINE>// Possible parser speed up. This has no effect if parsing in parallel<NEW_LINE>// because the parser isn't the s... | IRIProvider provider = SystemIRIx.getProvider(); |
1,279,368 | private static void printHelpExit(CmdLineParser parser) {<NEW_LINE>parser.getProperties().withUsageWidth(120);<NEW_LINE><MASK><NEW_LINE>System.out.println();<NEW_LINE>System.out.println("Document Types");<NEW_LINE>for (PaperSize p : PaperSize.values()) {<NEW_LINE>System.out.printf(" %12s %5.0f %5.0f %s\n", p.getName(... | parser.printUsage(System.out); |
575,495 | public Object visitTuple(Tuple node) throws Exception {<NEW_LINE>if (node.getInternalCtx() == expr_contextType.Store) {<NEW_LINE>return seqSet(node.getInternalElts());<NEW_LINE>}<NEW_LINE>if (node.getInternalCtx() == expr_contextType.Del) {<NEW_LINE>return seqDel(node.getInternalElts());<NEW_LINE>}<NEW_LINE>if (my_scop... | , PyObject[].class)); |
103,898 | public static Dataset<Row> alignDupes(Dataset<Row> dupesActual, Arguments args) {<NEW_LINE>dupesActual = dupesActual.cache();<NEW_LINE>List<Column> cols = new ArrayList<Column>();<NEW_LINE>cols.add(dupesActual.col(ColName.CLUSTER_COLUMN));<NEW_LINE>cols.add(dupesActual.col(ColName.ID_COL));<NEW_LINE>cols.add(dupesActua... | .col(ColName.SOURCE_COL)); |
1,181,192 | public void actionPerformed(ActionEvent e) {<NEW_LINE>if (e.getSource() == loadButton) {<NEW_LINE>String title = "Load OSM Data";<NEW_LINE>if ((e.getModifiers() & KeyEvent.CTRL_DOWN_MASK) != 0)<NEW_LINE>title += " (Bounding Box Mode)";<NEW_LINE>if ((e.getModifiers() & KeyEvent.SHIFT_DOWN_MASK) != 0)<NEW_LINE>title += "... | [] { "Attribute", "Value" }); |
1,159,134 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>return srcSequence.minp(null, option, ctx);<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>Expression exp = param.getLeafExpression();<NEW_LINE>return srcSequence.minp(exp, option, ctx);<NEW_LINE>} else {<NEW_LINE>if (param.getSubSize() != 2)... | + mm.getMessage("function.paramTypeError")); |
296,939 | public void close(TaskAttemptContext attempt) throws IOException, InterruptedException {<NEW_LINE>log.debug("mutations written: " + mutCount + ", values written: " + valCount);<NEW_LINE>if (simulate)<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>mtbw.close();<NEW_LINE>} catch (MutationsRejectedException e) {<NEW_LINE>if (!e... | )).addAll(code)); |
1,213,188 | private static // returns true if text converted with charset is equals to the bytes currently on disk<NEW_LINE>boolean isGoodCharset(@Nonnull VirtualFile virtualFile, @Nonnull Charset charset) {<NEW_LINE>FileDocumentManager documentManager = FileDocumentManager.getInstance();<NEW_LINE>Document document = documentManag... | new File("C:\\temp\\bytesToSave"), bytesToSave); |
1,158,405 | private ExitCode installServerFeatures() {<NEW_LINE>ExitCode rc = ReturnCode.OK;<NEW_LINE>Collection<String> featuresToInstall = new HashSet<String>();<NEW_LINE>try {<NEW_LINE>// get original server features now<NEW_LINE>featuresToInstall.addAll(installKernel.getServerFeaturesToInstall(servers, false));<NEW_LINE><MASK>... | logger.fine("all server features: " + featuresToInstall); |
1,192,955 | public PartialImportResults doImport(PartialImportRepresentation rep, RealmModel realm, KeycloakSession session) throws ErrorResponseException {<NEW_LINE>PartialImportResults results = new PartialImportResults();<NEW_LINE>if (!rep.hasRealmRoles() && !rep.hasClientRoles())<NEW_LINE>return results;<NEW_LINE>// finalize p... | , Response.Status.INTERNAL_SERVER_ERROR)); |
601,440 | private void createUI() {<NEW_LINE>uriField = new AugmentedJTextField("", 45, URL_FIELD_PLACEHOLDER);<NEW_LINE>uriField.getDocument().addDocumentListener(new DocumentListener() {<NEW_LINE><NEW_LINE>public void insertUpdate(DocumentEvent event) {<NEW_LINE>handleValueChanged();<NEW_LINE>}<NEW_LINE><NEW_LINE>public void r... | add(uriField, BorderLayout.SOUTH); |
869,799 | private static Throwable esToCrateException(Throwable unwrappedError) {<NEW_LINE>if (unwrappedError instanceof IllegalArgumentException || unwrappedError instanceof ParsingException) {<NEW_LINE>return new SQLParseException(unwrappedError.getMessage(), (Exception) unwrappedError);<NEW_LINE>} else if (unwrappedError inst... | ) unwrappedError).repository()); |
748,426 | public static DescribeSQLLogFilesResponse unmarshall(DescribeSQLLogFilesResponse describeSQLLogFilesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSQLLogFilesResponse.setRequestId(_ctx.stringValue("DescribeSQLLogFilesResponse.RequestId"));<NEW_LINE>describeSQLLogFilesResponse.setTotalRecordCount<MASK><NEW_LINE>... | (_ctx.integerValue("DescribeSQLLogFilesResponse.TotalRecordCount")); |
1,422,910 | private void updateGlobalNameDeclarationAtVariableNode(Name n, boolean canCollapseChildNames) {<NEW_LINE>if (!canCollapseChildNames) {<NEW_LINE>logDecisionForName(n, "cannot collapse child names: skipping");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>String name = ref.getNode().getString();<NEW_LINE>Node rval... | Ref ref = n.getDeclaration(); |
652,635 | private static boolean isValidSectionOffset(final JTextField textField, final Section section) {<NEW_LINE>Preconditions.checkNotNull(textField, "Error: textField argument can not be null");<NEW_LINE>Preconditions.checkNotNull(section, "Error: section argument can not be null");<NEW_LINE>if (textField.getText().isEmpty(... | Long.parseLong(textFieldString, 10); |
132,098 | private void calculatePosition(Rectangle2D textBounds) {<NEW_LINE>double textHeight = textBounds.getHeight();<NEW_LINE>double textWidth = textBounds.getWidth();<NEW_LINE>double widthAdjustment = textWidth + styler.getChartButtonMargin() * 3;<NEW_LINE>double heightAdjustment = textHeight + styler.getChartButtonMargin() ... | () + styler.getChartButtonMargin(); |
209,604 | static void xorReverse(byte[] x, byte[] y) {<NEW_LINE>x[0] = (byte) (x[0] ^ y[15]);<NEW_LINE>x[1] = (byte) (x[1] ^ y[14]);<NEW_LINE>x[2] = (byte) (x[2] ^ y[13]);<NEW_LINE>x[3] = (byte) (x[3] ^ y[12]);<NEW_LINE>x[4] = (byte) (x[4] ^ y[11]);<NEW_LINE>x[5] = (byte) (x[5] ^ y[10]);<NEW_LINE>x[6] = (byte) (x[<MASK><NEW_LINE... | 6] ^ y[9]); |
318,063 | private HdfsBlobStore createBlobstore(URI blobstoreUri, String path, Settings repositorySettings) {<NEW_LINE>Configuration hadoopConfiguration = new Configuration(repositorySettings.getAsBoolean("load_defaults", true));<NEW_LINE>hadoopConfiguration.setClassLoader(HdfsRepository.class.getClassLoader());<NEW_LINE>hadoopC... | String host = blobstoreUri.getHost(); |
1,459,875 | public boolean performAccessibilityAction(View host, int action, Bundle args) {<NEW_LINE>if (mAccessibilityActionsMap.containsKey(action)) {<NEW_LINE>final WritableMap event = Arguments.createMap();<NEW_LINE>event.putString("actionName", mAccessibilityActionsMap.get(action));<NEW_LINE>ReactContext reactContext = (React... | int reactTag = host.getId(); |
148,930 | public static UserTrades adaptTradeHistory(LakeBTCTradeResponse[] transactions) {<NEW_LINE>List<UserTrade> trades = new ArrayList<>();<NEW_LINE>long lastTradeId = 0;<NEW_LINE>for (LakeBTCTradeResponse trade : transactions) {<NEW_LINE>final OrderType orderType = trade.getType().startsWith("buy") ? OrderType.BID : OrderT... | String tradeId = trade.getId(); |
1,279,777 | public Response authenticationAction(String execution) {<NEW_LINE>logger.debug("authenticationAction");<NEW_LINE>checkClientSession(true);<NEW_LINE>String current = authenticationSession.getAuthNote(CURRENT_AUTHENTICATION_EXECUTION);<NEW_LINE>if (execution == null || !execution.equals(current)) {<NEW_LINE>logger.debug(... | AUTH_METHOD, authenticationSession.getProtocol()); |
91,168 | protected void consumeNormalAnnotation(boolean isTypeAnnotation) {<NEW_LINE>// NormalTypeAnnotation ::= TypeAnnotationName '(' MemberValuePairsopt ')'<NEW_LINE>// NormalAnnotation ::= AnnotationName '(' MemberValuePairsopt ')'<NEW_LINE>NormalAnnotation normalAnnotation = null;<NEW_LINE>int oldIndex = this.identifierPtr... | [length], 0, length); |
1,413,275 | protected HttpClient newHttpClient() {<NEW_LINE>ServletConfig config = getServletConfig();<NEW_LINE>String scriptRoot = config.getInitParameter(SCRIPT_ROOT_INIT_PARAM);<NEW_LINE>if (scriptRoot == null)<NEW_LINE>throw new IllegalArgumentException("Mandatory parameter '" + SCRIPT_ROOT_INIT_PARAM + "' not configured");<NE... | unixDomainPath = config.getInitParameter("unixDomainPath"); |
1,442,383 | private void importItems(String appId, Env env, String clusterName, String namespaceName, String configText, NamespaceDTO namespaceDTO, String operator) {<NEW_LINE>List<ItemDTO> toImportItems = gson.fromJson(configText, GsonType.ITEM_DTOS);<NEW_LINE>toImportItems.parallelStream().forEach(newItem -> {<NEW_LINE>String ke... | env, clusterName, namespaceName, newItem); |
423,475 | public void marshall(Fleet fleet, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (fleet == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(fleet.getArn(), ARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(fl... | fleet.getDisplayName(), DISPLAYNAME_BINDING); |
121,441 | private String preprocessCreateResultWrapperShape(ServiceModel serviceModel, String operationName, OperationModifier modifier) {<NEW_LINE>String wrappedShapeName = modifier.getWrappedResultShape();<NEW_LINE>Shape wrappedShape = serviceModel.getShapes().get(wrappedShapeName);<NEW_LINE>String wrapperShapeName = operation... | getOperations().get(operationName); |
736,420 | final ListWorkloadsResult executeListWorkloads(ListWorkloadsRequest listWorkloadsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listWorkloadsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
970,710 | public synchronized void startup(Context context) {<NEW_LINE>if (mIsStarted) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mContext = context.getApplicationContext();<NEW_LINE>mIsStarted = true;<NEW_LINE>mBundle = null;<NEW_LINE>IntentFilter intentFilter = new IntentFilter();<NEW_LINE>intentFilter.addAction(WifiScanner.ACTION... | ).registerReceiver(this, intentFilter); |
1,157,387 | private Mono<PagedResponse<AutoScaleVCoreInner>> listSinglePageAsync() {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<N... | )).readOnly())); |
298,447 | public Mono<ServiceBusMessageBatch> createMessageBatch(CreateMessageBatchOptions options) {<NEW_LINE>if (isDisposed.get()) {<NEW_LINE>return monoError(LOGGER, new IllegalStateException(String.format(INVALID_OPERATION_DISPOSED_SENDER, "createMessageBatch")));<NEW_LINE>}<NEW_LINE>if (Objects.isNull(options)) {<NEW_LINE>r... | LOGGER, new NullPointerException("'options' cannot be null.")); |
1,640,061 | synchronized Map<String, String> properties(boolean resolveBase) {<NEW_LINE>if (properties == null) {<NEW_LINE>properties = new HashMap<String, String>();<NEW_LINE>String basedir = mainPropertiesFile.getParent();<NEW_LINE>for (Map.Entry<String, String> entry : loadProperties(mainPropertiesFile).entrySet()) {<NEW_LINE>S... | ('/', File.separatorChar)); |
1,193,637 | public boolean instantiateTo(int value, ICause cause) throws ContradictionException {<NEW_LINE>// BEWARE: THIS CODE SHOULD NOT BE MOVED TO THE DOMAIN TO NOT DECREASE PERFORMANCES!<NEW_LINE>assert cause != null;<NEW_LINE>if (!contains(value)) {<NEW_LINE>model.getSolver().getEventObserver().instantiateTo(this, value, cau... | this.INDICES.set(index); |
1,224,974 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.contacts_preference);<NEW_LINE>// setup toolbar<NEW_LINE>setupToolbar();<NEW_LINE>// setup drawer<NEW_LINE>// setupDrawer(R.id.nav_contacts); // TODO needed?<NEW_LINE>// show sidebar?<NEW_L... | getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
1,822,177 | protected BeanDefinitionBuilder buildBeanDefinition(Element element, ParserContext parserContext) {<NEW_LINE>BeanDefinitionBuilder builder = null;<NEW_LINE>Element queueElement;<NEW_LINE>String fixedSubscriberChannel = element.getAttribute("fixed-subscriber");<NEW_LINE>boolean isFixedSubscriber = "true".equalsIgnoreCas... | FixedSubscriberChannel.class : DirectChannel.class); |
942,796 | // GEN-LAST:event_btnCancelActionPerformed<NEW_LINE>private void btnRegisterActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_btnRegisterActionPerformed<NEW_LINE>if (!Arrays.equals(this.txtPassword.getPassword(), this.txtPasswordConfirmation.getPassword())) {<NEW_LINE>MageFrame.getInstance()... | ()).trim()); |
1,030,382 | protected void beforeCompletion(EJBContextImpl context) {<NEW_LINE>// SessionSync calls on TX_BEAN_MANAGED SessionBeans<NEW_LINE>// are not allowed<NEW_LINE>// Do not call beforeCompletion if it is a transactional lifecycle callback<NEW_LINE>if (isBeanManagedTran || beforeCompletionMethod == null || ((SessionContextImp... | beforeCompletionMethod.invoke(ejb, null); |
876,165 | public UpdateByQueryRequest updateByQueryRequest(UpdateQuery query, IndexCoordinates index) {<NEW_LINE>String indexName = index.getIndexName();<NEW_LINE>final UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(indexName);<NEW_LINE>updateByQueryRequest.setScript(getScript(query));<NEW_LINE>if (query.ge... | .setQuery(getQuery(queryQuery)); |
978,625 | public synchronized List<SingleAnalysis> analyze(Token token) {<NEW_LINE>SecondaryPos sPos = guessSecondaryPosType(token);<NEW_LINE>String word = token.getText();<NEW_LINE>// TODO: for now, for regular words and numbers etc, use the analyze method.<NEW_LINE>if (sPos == SecondaryPos.None) {<NEW_LINE>if (word.contains("?... | (word).replaceAll(""); |
431,811 | private void tryConnect() throws JSchException, IOException {<NEW_LINE>connectionAttempts++;<NEW_LINE>if (connectionAttempts > 1) {<NEW_LINE>try {<NEW_LINE>Thread.sleep(2000);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>// ignored<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!session.isConnected()) {<NEW_LINE>return;<NE... | channel = session.openChannel("exec"); |
928,564 | public static void _deleteChildrenAssetsFromFolder(Folder folder, Set<Inode> objectsList) throws DotDataException, DotStateException, DotSecurityException {<NEW_LINE>PermissionAPI perAPI = APILocator.getPermissionAPI();<NEW_LINE>FolderAPI fapi = APILocator.getFolderAPI();<NEW_LINE>List<Link> links = fapi.getLinks(folde... | ).getSystemUser(), false); |
703,860 | public Route.Handler apply(@Nonnull Route.Handler next) {<NEW_LINE>long timestamp = System.currentTimeMillis();<NEW_LINE>return ctx -> {<NEW_LINE>// Take remote address here (less chances of loosing it on interrupted requests).<NEW_LINE>String remoteAddr = ctx.getRemoteAddress();<NEW_LINE>ctx.onComplete(context -> {<NE... | (Q).append(SP); |
1,837,576 | private void sendModifyStoragePoolCommand(ModifyStoragePoolCommand cmd, StoragePool storagePool, long hostId) {<NEW_LINE>Answer answer = _agentMgr.easySend(hostId, cmd);<NEW_LINE>if (answer == null) {<NEW_LINE>throw new CloudRuntimeException("Unable to get an answer to the modify storage pool command (" + storagePool.g... | .getId() + " to host " + hostId; |
868,297 | public static List<Allele> filterToMaxNumberOfAltAllelesBasedOnScores(int numAltAllelesToKeep, List<Allele> alleles, double[] likelihoodSums) {<NEW_LINE>final int nonRefAltAlleleIndex = alleles.indexOf(Allele.NON_REF_ALLELE);<NEW_LINE>final int numAlleles = alleles.size();<NEW_LINE>final Set<Integer> properAltIndexesTo... | collect(Collectors.toList()); |
291,338 | private void processMemoryReference(XmlElement element, boolean overwrite) {<NEW_LINE>try {<NEW_LINE>String fromAddrStr = element.getAttribute("ADDRESS");<NEW_LINE>if (fromAddrStr == null) {<NEW_LINE>throw new XmlAttributeException("ADDRESS attribute missing for MEMORY_REFERENCE element");<NEW_LINE>}<NEW_LINE>Address f... | getDefaultRefType(fromAddr, toAddr, opIndex); |
317,596 | private Instruction pseudoDisassemble(Address addr) throws UnknownInstructionException {<NEW_LINE>Instruction instr;<NEW_LINE>if (lastPseudoInstructionBlock != null) {<NEW_LINE>instr = lastPseudoInstructionBlock.getInstructionAt(addr);<NEW_LINE>if (instr != null) {<NEW_LINE>return instr;<NEW_LINE>}<NEW_LINE>Instruction... | instr = lastPseudoInstructionBlock.getInstructionAt(addr); |
541,996 | final CreateLagResult executeCreateLag(CreateLagRequest createLagRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createLagRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | false), new CreateLagResultJsonUnmarshaller()); |
115,381 | static <T> T visit(SchemaZipFold<T> zipFold, Context context, FieldType left, FieldType right) {<NEW_LINE>if (left.getTypeName() != right.getTypeName()) {<NEW_LINE>return zipFold.accept(context, left, right);<NEW_LINE>}<NEW_LINE>Context newContext = context.withParent(left.getTypeName());<NEW_LINE>switch(left.getTypeNa... | , right.getCollectionElementType())); |
1,684,271 | public static <T, X extends Throwable> Tuple3<CompletableFuture<Subscription>, Runnable, CompletableFuture<Boolean>> forEachX(final FutureStream<T> stream, final long x, final Consumer<? super T> consumerElement) {<NEW_LINE>final CompletableFuture<Subscription> subscription = new CompletableFuture<>();<NEW_LINE>final C... | streamCompleted = new CompletableFuture<>(); |
1,570,769 | protected JPanel initResultsTable() {<NEW_LINE>ResultsTableCellRenderer renderer = new ResultsTableCellRenderer();<NEW_LINE>resultsModel = new ResultsModel(renderer);<NEW_LINE>resultsModel.addTableModelListener(e -> updateProgressLabel());<NEW_LINE>resultsTable = new ResultsTable(resultsModel, renderer);<NEW_LINE>resul... | warnLabel.setForeground(Color.RED); |
870,520 | private RelDataType sqlType(RelDataTypeFactory typeFactory, int dataType, int precision, int scale, String typeString) {<NEW_LINE>// Fall back to ANY if type is unknown<NEW_LINE>final SqlTypeName sqlTypeName = Util.first(SqlTypeName.getNameForJdbcType(dataType), SqlTypeName.ANY);<NEW_LINE>switch(sqlTypeName) {<NEW_LINE... | typeFactory.createSqlType(sqlTypeName, precision); |
1,213,711 | static <VB extends CompositeValuesSourceBuilder<VB>, T> void declareValuesSourceFields(AbstractObjectParser<VB, T> objectParser, ValueType targetValueType) {<NEW_LINE>objectParser.declareField(VB::field, XContentParser::text, new ParseField("field"), ObjectParser.ValueType.STRING);<NEW_LINE>objectParser.declareField(VB... | ), ObjectParser.ValueType.STRING); |
1,459,071 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>getDialog().setTitle(getActivity().getString(R.string.first_run_welcome_to_mozstumbler));<NEW_LINE>getDialog().getWindow().<MASK><NEW_LINE>getDialog().setCanceledOnTouchOutside(false);<NEW_LINE>root = inflater.i... | setBackgroundDrawable(new ColorDrawable(0xaa000000)); |
526,451 | public IPointcut normalize() {<NEW_LINE>IPointcut newPointcut = super.normalize();<NEW_LINE>if (newPointcut instanceof OrPointcut) {<NEW_LINE>OrPointcut newOr = (OrPointcut) newPointcut;<NEW_LINE>OrPointcut newNewOr = new OrPointcut(getContainerIdentifier(), "or");<NEW_LINE>// flatten the ands<NEW_LINE>for (int i = 0; ... | newOr.getArgumentNames()[i]; |
1,547,508 | private BeanRegistrationWriter createScopedProxyBeanRegistrationWriter(String beanName, BeanDefinition beanDefinition) {<NEW_LINE>Object targetBeanName = beanDefinition.getPropertyValues().get("targetBeanName");<NEW_LINE>BeanDefinition targetBeanDefinition = getTargetBeanDefinition(targetBeanName);<NEW_LINE>if (targetB... | getPropertyValues().removePropertyValue("targetBeanName"); |
416,384 | private Mono<PagedResponse<IncidentInner>> listByAlertRuleSinglePageAsync(String resourceGroupName, String ruleName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_L... | this.client.mergeContext(context); |
1,098,615 | public void run() {<NEW_LINE>for (AbstractVcs vcs : myVcsManager.getAllActiveVcss()) {<NEW_LINE>final CommittedChangesProvider provider = vcs.getCommittedChangesProvider();<NEW_LINE>if (provider == null)<NEW_LINE>continue;<NEW_LINE>final <MASK><NEW_LINE>CommittedListsSequencesZipper zipper = null;<NEW_LINE>if (vcsZippe... | VcsCommittedListsZipper vcsZipper = provider.getZipper(); |
817,427 | private String treeToString(CompilationInfoImpl info, CompilationUnitTree cut) {<NEW_LINE>StringBuilder dump = new StringBuilder();<NEW_LINE>new CancellableTreePathScanner<Void, Void>(cancel) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void scan(Tree tree, Void p) {<NEW_LINE>if (tree == null) {<NEW_LINE>dump.append(... | ()).append(":"); |
188,409 | public Object childEvaluate(Parser parser, VariableResolver resolver, String functionName, List<Object> param) throws ParserException {<NEW_LINE>String infoType = param.<MASK><NEW_LINE>if (infoType.equalsIgnoreCase("map") || infoType.equalsIgnoreCase("zone")) {<NEW_LINE>return getMapInfo();<NEW_LINE>} else if (infoType... | get(0).toString(); |
812,751 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static com.sun.jdi.ThreadReference thread(com.sun.jdi.event.ClassPrepareEvent a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.m... | jpda.jdi.VMDisconnectedExceptionWrapper(ex); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.