idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,820,149 | public Scope attach(Context context) {<NEW_LINE>Scope scope = delegate.attach(context);<NEW_LINE>CallerStackTrace caller = new CallerStackTrace(context);<NEW_LINE>StackTraceElement[<MASK><NEW_LINE>// Detect invalid use from top-level kotlin coroutine. The stacktrace will have the order<NEW_LINE>// makeCurrent -> invoke... | ] stackTrace = caller.getStackTrace(); |
185,818 | private void popupMenu(final ImageView onGridList) {<NEW_LINE>MyPopupMenu p = new MyPopupMenu(getActivity(), onGridList);<NEW_LINE>PopupHelper.addPROIcon(p, getActivity());<NEW_LINE>List<Integer> names = Arrays.asList(R.string.bookmark_by_date, R.string.bookmark_by_book);<NEW_LINE>final List<Integer> icons = Arrays.asL... | bookmarksSearchContainer.setVisibility(View.GONE); |
339,262 | private void printTypeLists() throws IOException {<NEW_LINE>if (tableOfContents.typeLists.off == -1) {<NEW_LINE>Log.d("DexIndexPrinter", "No type lists");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Dex.Section in = dex.open(tableOfContents.typeLists.off);<NEW_LINE>for (int i = 0; i < tableOfContents.typeLists.size; i++) {<NE... | ) in.readShort())); |
641,804 | public synchronized void selectMember(IMetaMember member, boolean updateTree, boolean updateTriView) {<NEW_LINE>// TimerUtil.timerStart(getClass().getName() + ".selectMember()");<NEW_LINE>selectedProgrammatically = true;<NEW_LINE>selectedMember = member;<NEW_LINE>compilationRowList.clear();<NEW_LINE>if (selectedMember ... | CompilationTableRow row = new CompilationTableRow(compilation); |
318,045 | public void acceptField(char[] declaringTypePackageName, char[] declaringTypeName, char[] name, boolean isDeclaration, char[] uniqueKey, int start, int end) {<NEW_LINE>if (isDeclaration) {<NEW_LINE>IType type = resolveTypeByLocation(declaringTypePackageName, declaringTypeName, NameLookup.ACCEPT_ALL, start, end);<NEW_LI... | ] fields = type.getFields(); |
1,241,717 | public void onFinish(List<Amenity> amenities) {<NEW_LINE>ViewGroup viewGroup = viewGroupRef.get();<NEW_LINE>if (viewGroup == null || Algorithms.isEmpty(amenities)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String title = app.getString(R.string.wiki_around);<NEW_LINE>String count = "(" + amenities.size() + ")";<NEW_LINE>St... | Context context = viewGroup.getContext(); |
574,794 | private void wrapAndExecute(@Nonnull Runnable firstTask, long status) {<NEW_LINE>try {<NEW_LINE>AtomicReference<Runnable> currentTask <MASK><NEW_LINE>myBackendExecutor.execute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>if (myChangeThreadName) {<NEW_LINE>String name = myName;<NEW... | = new AtomicReference<>(firstTask); |
1,552,823 | public ListRemoteAccessSessionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListRemoteAccessSessionsResult listRemoteAccessSessionsResult = new ListRemoteAccessSessionsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCu... | JsonToken token = context.getCurrentToken(); |
971,991 | private void logDocOutbound(final I_C_Print_Job_Line line, @NonNull final UserId userToPrintId) {<NEW_LINE>final Set<String> printerNames = new HashSet<>();<NEW_LINE>for (final I_C_Print_Job_Detail detail : Services.get(IPrintingDAO.class).retrievePrintJobDetails(line)) {<NEW_LINE>final I_AD_PrinterRouting routing = lo... | IArchiveEventManager.COPIES_ONE, ArchivePrintOutStatus.Success); |
946,392 | public JSONObject list(HttpServletRequest request) throws Exception {<NEW_LINE>String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID);<NEW_LINE>String serviceName = WebUtils.required(request, CommonParams.SERVICE_NAME);<NEW_LINE>String agent = request.getHeader("Clien... | request, "tid", StringUtils.EMPTY); |
5,194 | public void onLoaded(com.ansca.corona.CoronaRuntime runtime) {<NEW_LINE>// This method is invoked on the Corona runtime's thread.<NEW_LINE>// This is our chance to set up an exception handler to catch unhandled exceptions on this thread.<NEW_LINE>Thread.currentThread().setDefaultUncaughtExceptionHandler(new UncaughtExc... | [] { new ThrowExceptionLuaFunction() }; |
1,720,427 | private void addOutput(String name, PValue value, Coder<?> valueCoder) {<NEW_LINE>translator.registerOutputName(value, name);<NEW_LINE>// If the output requires runner determined sharding, also append necessary input properties.<NEW_LINE>if (value instanceof PCollection) {<NEW_LINE>if (translator.runner.doesPCollection... | throw new RuntimeException("Inconsistent dataflow pipeline translation", e); |
1,804,423 | final GetResourceMetricsResult executeGetResourceMetrics(GetResourceMetricsRequest getResourceMetricsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getResourceMetricsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | endClientExecution(awsRequestMetrics, request, response); |
112,707 | private static List<FeedEntryModel> readFeed(String url, List<String> parameters, String repository, String branch, String username, char[] password) throws IOException {<NEW_LINE>// build url<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(MessageFormat.format("{0}" + Constants.SYNDICATION_PATH + "... | = new ArrayList<FeedEntryModel>(); |
1,096,892 | public void addJSendArray(ClassMeta classMeta) {<NEW_LINE>try {<NEW_LINE>if (definitionMap.containsKey("jsend-array-" + classMeta.name())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>definitionMap.put("jsend-array-" + classMeta.name(), null);<NEW_LINE>final DefinitionBuilder definitionBuilder = new DefinitionBuilder();<NEW_... | Definition definition = definitionBuilder.build(); |
754,670 | final ExchangeCodeForTokenResult executeExchangeCodeForToken(ExchangeCodeForTokenRequest exchangeCodeForTokenRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(exchangeCodeForTokenRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | false), new ExchangeCodeForTokenResultJsonUnmarshaller()); |
763,245 | private void addToProvideMap(Iterable<DependencyInfo> depInfos, Map<String, DependencyInfo> providesMap, boolean isFromDepsFile) {<NEW_LINE>for (DependencyInfo depInfo : depInfos) {<NEW_LINE>List<String> provides = new ArrayList<>(depInfo.getProvides());<NEW_LINE>// Add a munged symbol to the provides map so that looku... | providesMap.put(provide, depInfo); |
1,749,826 | public void marshall(AwsIamPolicyDetails awsIamPolicyDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsIamPolicyDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(awsIamPolicyDetails.getAtta... | awsIamPolicyDetails.getPermissionsBoundaryUsageCount(), PERMISSIONSBOUNDARYUSAGECOUNT_BINDING); |
1,471,914 | private void calculate() {<NEW_LINE>categories.put(CategoryType.INITIAL_VALUE, new Category(// $NON-NLS-1$<NEW_LINE>String.// $NON-NLS-1$<NEW_LINE>format(// $NON-NLS-1$<NEW_LINE>Messages.ColumnInitialValue, // $NON-NLS-1$<NEW_LINE>Values.Date.format(snapshotStart.getTime())), "", snapshotStart.getMonetaryAssets()));<NE... | .ColumnCapitalGains, "+", zero)); |
212,201 | public String changePassword(Model model, @RequestParam("current_password") String currentPassword, @RequestParam("new_password") String newPassword, @RequestParam("confirm_password") String confirmPassword, HttpServletResponse response, HttpServletRequest request) {<NEW_LINE>PasswordConfirmationValidation validation =... | HttpStatus.UNPROCESSABLE_ENTITY.value()); |
933,264 | static String constructRequestURL(String url) {<NEW_LINE>int index = url.indexOf("?");<NEW_LINE>if (-1 != index) {<NEW_LINE>url = <MASK><NEW_LINE>}<NEW_LINE>int slashIndex = url.indexOf("/", 8);<NEW_LINE>String baseURL = url.substring(0, slashIndex).toLowerCase();<NEW_LINE>int colonIndex = baseURL.indexOf(":", 8);<NEW_... | url.substring(0, index); |
1,491,108 | public Response<Void> deleteEventHubConsumerGroupByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resour... | Utils.getValueFromIdByName(id, "eventHubEndpoints"); |
1,710,785 | public static void writeDataUnavailableForApplication(String application, HttpServletResponse resp) throws IOException {<NEW_LINE>final PrintWriter writer = createWriterFromOutputStream(resp);<NEW_LINE>writeHtmlBegin(writer);<NEW_LINE>writer.write(I18N.htmlEncode(I18N.getFormattedString("data_unavailable", application)... | I18N.getFormattedString("confirm_remove_application", application); |
1,525,351 | public void run() {<NEW_LINE>try {<NEW_LINE>// if we are not registerd do nothing<NEW_LINE>if (!icqProvider.isRegistered())<NEW_LINE>return;<NEW_LINE><MASK><NEW_LINE>sysMsg.append("pp:").append(icqProvider.hashCode()).append("&op:").append(OperationSetBasicInstantMessagingIcqImpl.this.hashCode());<NEW_LINE>ImConversati... | StringBuffer sysMsg = new StringBuffer(SYS_MSG_PREFIX_TEST); |
1,483,193 | protected void doXContentBody(XContentBuilder builder, boolean includeDefaults, Params params) throws IOException {<NEW_LINE>super.doXContentBody(builder, includeDefaults, params);<NEW_LINE>doXContentAnalyzers(builder, includeDefaults);<NEW_LINE>if (includeInAll != null) {<NEW_LINE>builder.field("include_in_all", inclu... | fieldType().fielddataMinFrequency()); |
1,415,284 | protected List<EventStripe> call() throws Exception {<NEW_LINE>// newly loaded substripes<NEW_LINE>List<EventStripe> stripes;<NEW_LINE>// next LoD in diraction of given relativeDetail<NEW_LINE>TimelineLevelOfDetail next = loadedDescriptionLevel;<NEW_LINE>do {<NEW_LINE>loadedDescriptionLevel = next;<NEW_LINE>if (loadedD... | next = withRelativeDetail(loadedDescriptionLevel, relativeDetail); |
1,542,314 | final DeleteBillingGroupResult executeDeleteBillingGroup(DeleteBillingGroupRequest deleteBillingGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteBillingGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | endClientExecution(awsRequestMetrics, request, response); |
1,808,485 | public CustomResponse unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CustomResponse customResponse = new CustomResponse();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | class).unmarshall(context)); |
1,243,259 | public SVD createSVD(final RealMatrix m) {<NEW_LINE>Utils.nonNull(m, "Cannot create SVD on a null matrix.");<NEW_LINE>logger.info("Converting Apache RealMatrix to ojAlgo Matrix...");<NEW_LINE>final RealMatrixWrapper <MASK><NEW_LINE>logger.info("Calculating SVD...");<NEW_LINE>final SingularValue<Double> svd = SingularVa... | pds = RealMatrixWrapper.of(m); |
448,176 | public void run() {<NEW_LINE>if (request != null && request.fileToSave != null && request.url != null) {<NEW_LINE>pendingToDownload.remove(request.fileToSave);<NEW_LINE>if (currentlyDownloaded.contains(request.fileToSave)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>currentlyDownloaded.add(request.fileToSave);<NEW_LINE>if (... | long time = System.currentTimeMillis(); |
1,081,329 | // index@3<NEW_LINE>public void loadAllKeys() {<NEW_LINE>if (cache != null)<NEW_LINE>return;<NEW_LINE>byte[][] buf = new byte[1000][];<NEW_LINE>int bufSize = (int) ((MAX_DIRECT_POS_SIZE / 1000) * POSITION_SIZE);<NEW_LINE><MASK><NEW_LINE>ObjectReader reader = new ObjectReader(is, BUFFER_SIZE);<NEW_LINE>try {<NEW_LINE>re... | InputStream is = indexFile.getInputStream(); |
1,078,262 | private static Matcher makeMatcher(Sortables s, BugInstance bug) {<NEW_LINE>switch(s) {<NEW_LINE>case BUGCODE:<NEW_LINE>return new BugMatcher(s.getFrom(bug), null, null);<NEW_LINE>case CATEGORY:<NEW_LINE>return new BugMatcher(null, null, s.getFrom(bug));<NEW_LINE>case CLASS:<NEW_LINE>return new ClassMatcher(s.getFrom(b... | (bug), RelationalOp.EQ); |
1,441,083 | public byte[] readFully() throws IOException, RemoteException {<NEW_LINE>try (ProxyInputStream stream = openRead()) {<NEW_LINE>int pos = 0;<NEW_LINE><MASK><NEW_LINE>byte[] data = new byte[avail];<NEW_LINE>while (true) {<NEW_LINE>int amt = stream.read(data, pos, data.length - pos);<NEW_LINE>// Log.i("foo", "Read " + amt... | int avail = stream.available(); |
347,520 | private Project createProject(DatabaseSession databaseSession, long poid) throws BimserverDatabaseException, ServerException, UserException, PublicInterfaceNotFoundException {<NEW_LINE>SProject project = remoteClient.getServiceInterface().getProjectByPoid(poid);<NEW_LINE>if (projects.containsKey(project.getOid())) {<NE... | , project.getCreatedById())); |
981,210 | protected Query[] prepareQueries() throws Exception {<NEW_LINE>final int maxQueries = config.get("query.file.maxQueries", 1000);<NEW_LINE>Config srcConfig = new Config(new Properties());<NEW_LINE>srcConfig.set("docs.file", config.get("query.file", null));<NEW_LINE>srcConfig.set("line.parser", config.get("query.file.lin... | shape = shapeConverter.convert(shape); |
814,709 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("align" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>IParam tgtParam;<NEW_LINE>Expression fltExp = null;<NEW_LINE>if (param.getType() == IParam.Comma) {... | MessageManager mm = EngineMessage.get(); |
1,191,237 | protected void processData(@Nonnull final Collection<DataNode<ModuleData>> nodes, @Nonnull Project project, @javax.annotation.Nullable final ExternalSystemTasksTreeModel model) {<NEW_LINE>if (nodes.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ProjectSystemId externalSystemId = nodes.iterator().next().getData().get... | data, settings.getAvailableProjects()); |
175,629 | // readability of this method would decrease signigicantly if splitted across submethods<NEW_LINE>@SuppressWarnings("PMD.NPathComplexity")<NEW_LINE>private String constructSqlInternal(final String columnString, final boolean includeOrderBy, final boolean includeLimit) {<NEW_LINE>final StringBuilder sb = new StringBuild... | (", ").append(tab); |
133,403 | public Pair<Gradient, INDArray> backpropGradient(INDArray epsilon, LayerWorkspaceMgr workspaceMgr) {<NEW_LINE>assertInputSet(true);<NEW_LINE>// Returns Gradient and delta^(this), not Gradient and epsilon^(this-1)<NEW_LINE>Pair<Gradient, INDArray> pair = getGradientsAndDelta(preOutput2d(true, workspaceMgr), workspaceMgr... | CenterLossParamInitializer.WEIGHT_KEY, true, workspaceMgr); |
463,785 | public static Fp12 finalExponentiation(Fp12 el) {<NEW_LINE>// first chunk<NEW_LINE>// el.b = -el.b<NEW_LINE>Fp12 w = new Fp12(el.a, el.b.negate());<NEW_LINE><MASK><NEW_LINE>Fp12 y = w.mul(x);<NEW_LINE>Fp12 z = y.frobeniusMap(2);<NEW_LINE>Fp12 pre = z.mul(y);<NEW_LINE>// last chunk<NEW_LINE>Fp12 a = pre.negExp(PAIRING_F... | Fp12 x = el.inverse(); |
1,462,315 | public void layout(int indent) {<NEW_LINE>boolean insignificant;<NEW_LINE>cpuText.setText(df.format(getMsFromNs(cpuValue)) + "ms /");<NEW_LINE>insignificant = setColor(cpuText, cpuValue, totalTimeCpu, !children.isEmpty(), expended);<NEW_LINE>gpuText.setText(" " + df.format(getMsFromNs(gpuValue)) + "ms");<NEW_LINE>insig... | * (maxLevel - indent + 1); |
1,083,385 | private boolean projectBuild(Project project, String socketId) {<NEW_LINE>StringBuilder builder = tailBuffer.get(project.getId());<NEW_LINE>AtomicBoolean success = new AtomicBoolean(false);<NEW_LINE>CommandUtils.execute(project.getMavenBuildCmd(), (line) -> {<NEW_LINE>builder.append(line).append("\n");<NEW_LINE>if (lin... | .writeMessage(socketId, out)); |
767,407 | public ECPoint twice() {<NEW_LINE>if (this.isInfinity()) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>ECCurve curve = this.getCurve();<NEW_LINE>ECFieldElement X1 = this.x;<NEW_LINE>if (X1.isZero()) {<NEW_LINE>// A point with X == 0 is its own additive inverse<NEW_LINE>return curve.getInfinity();<NEW_LINE>}<NEW_LINE>ECFi... | L1 : L1.multiply(Z1); |
991,691 | private void generateHeaderFile(Hashtable headerHashtable, File nlsFile, String headerPath, HeaderBuffer headerBuffer) throws IOException, FileNotFoundException {<NEW_LINE>if (!headerHashtable.containsKey(headerBuffer.getHeaderName())) {<NEW_LINE>StringBuffer buffer = new StringBuffer();<NEW_LINE>buffer.append(headerBu... | write(headerBuffer.toString()); |
730,586 | default void shadowRouteDecorate(final RouteContext routeContext, final ShadowRule shadowRule, final Map<String, String> shadowDataSourceMappings) {<NEW_LINE>Collection<RouteUnit> routeUnits = routeContext.getRouteUnits();<NEW_LINE>Collection<RouteUnit> toBeRemoved = new LinkedList<>();<NEW_LINE>Collection<RouteUnit> t... | String sourceDataSourceName = sourceDataSourceNameOptional.get(); |
758,333 | String model(CalciteConnectionImpl connection) {<NEW_LINE>String model = connection.config().model();<NEW_LINE>if (model != null) {<NEW_LINE>return model;<NEW_LINE>}<NEW_LINE>SchemaFactory schemaFactory = connection.config().schemaFactory(SchemaFactory.class, null);<NEW_LINE>final Properties info = connection.getProper... | root.put("defaultSchema", schemaName); |
1,027,099 | public ISeq<Phenotype<G, C>> eval(final Seq<Phenotype<G, C>> population) {<NEW_LINE>final ISeq<PhenotypeFitness<G, C>> evaluate = population.stream().filter(Phenotype::nonEvaluated).map(pt -> new PhenotypeFitness<>(pt, _function)).collect(ISeq.toISeq());<NEW_LINE>final ISeq<Phenotype<G, C>> result;<NEW_LINE>if (evaluat... | .map(PhenotypeFitness::phenotype)); |
877,341 | public Object invoke(Object object, Method method, Object[] objects) throws Throwable {<NEW_LINE>// Hotfix for huge and expected regression in carina: we lost managed<NEW_LINE>// time delays with lists manipulations<NEW_LINE>// Temporary we are going to restore explicit waiter here with hardcoded<NEW_LINE>// timeout be... | > elements = locator.findElements(); |
680,295 | private void markupDynamicTable(TaskMonitor monitor) {<NEW_LINE>// Assume default space for pointers<NEW_LINE>Address dynamicTableAddress = null;<NEW_LINE>try {<NEW_LINE>ElfDynamicTable dynamicTable = elf.getDynamicTable();<NEW_LINE>if (dynamicTable == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>dynamicTableAddress = ... | ElfStringTable dynamicStringTable = elf.getDynamicStringTable(); |
132,647 | public boolean save() throws IOException {<NEW_LINE>// make sure the user didn't hide the sketch folder<NEW_LINE>ensureExistence();<NEW_LINE>if (isReadOnly()) {<NEW_LINE>Base.showMessage(tr("Sketch is read-only"), tr("Some files are marked \"read-only\", so you'll\n" + "need to re-save this sketch to another location."... | PreferencesData.setBoolean("editor.update_extension", true); |
227,916 | private boolean canBeOrphan(SlurInter slur, HorizontalSide side, SystemInfo system) {<NEW_LINE>final CubicCurve2D curve = slur.getCurve();<NEW_LINE>// Check if slur is rather horizontal<NEW_LINE>if (abs(LineUtil.getSlope(curve.getP1(), curve.getP2())) > params.maxOrphanSlope) {<NEW_LINE>logger.debug("{} too sloped orph... | logger.debug("{} too far orphan", slur); |
964,188 | public String calculateAndCheckViewId(FacesContext context, String viewId) {<NEW_LINE>// If no viewId found, don't try to derive it, just continue.<NEW_LINE>if (viewId == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>FacesServletMapping mapping = getFacesServletMapping(context);<NEW_LINE>if (mapping == null || mapp... | viewId = handleSuffixMapping(context, viewId); |
1,684,416 | private void removeInvalidCachedUnitsAndRescheduleCorrespondingBuilders(TreeLogger logger, Collection<CompilationUnitBuilder> builders, Map<CompilationUnitBuilder, CompilationUnit> cachedUnits) {<NEW_LINE>Collection<CompilationUnit> invalidatedUnits = Lists.newArrayList();<NEW_LINE>for (Iterator<Entry<CompilationUnitBu... | "Invalid units found: " + invalidatedUnits.size()); |
168,014 | public static HierarchicalClustering fit(Linkage linkage) {<NEW_LINE>int n = linkage.size();<NEW_LINE>int[][] merge = new int[n - 1][2];<NEW_LINE>int[] id = new int[n];<NEW_LINE>double[] height = new double[n - 1];<NEW_LINE>int[] points = new int[n];<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>points[i] = i;<NEW_LI... | return new HierarchicalClustering(merge, height); |
611,542 | public static void main(String[] args) {<NEW_LINE>String pattern1 = "AABAAA";<NEW_LINE>String straightLineProgram1 = Exercise34_StraightLineCode.generateStraightLineProgram(pattern1);<NEW_LINE>StdOut.println("Straight line program 1:");<NEW_LINE>StdOut.println(straightLineProgram1);<NEW_LINE>StdOut.println("Expected: \... | "s3: if (txt[i]) != 'A' goto s2;\n" + "s4: if (txt[i]) != 'A' goto s0;\n" + "s5: if (txt[i]) != 'A' goto s3;\n" + " return i-8;\n"); |
790,755 | private void resetQtyIssuedForPPOrder(@NonNull final MaterialTrackingId materialTrackingId, @NonNull final I_PP_Cost_Collector ppCostCollector) {<NEW_LINE>final IMaterialTrackingDAO materialTrackingDAO = Services.get(IMaterialTrackingDAO.class);<NEW_LINE>final IPPCostCollectorDAO ppCostCollectorDAO = Services.get(IPPCo... | add(ref.getQtyIssued()); |
1,206,908 | private void applyTouchFeedback(Integer rippleColor) {<NEW_LINE>// Do not continue if there is no view to modify.<NEW_LINE>if (this.nativeView == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Fetch default ripple color if given null.<NEW_LINE>if (rippleColor == null) {<NEW_LINE>Context context = proxy.getActivity();<... | final ColorDrawable drawable = (ColorDrawable) backgroundDrawable; |
385,261 | public static void showMessage(String title, String message, boolean error) {<NEW_LINE>StartupError.hasStartupError = true;<NEW_LINE>PrintStream stream = error ? System.err : System.out;<NEW_LINE>stream.println("\n" + title + ": " + message);<NEW_LINE>boolean headless = !hasGraphics || GraphicsEnvironment.isHeadless();... | ), scrollPane, title, type); |
589,740 | public static String verifyLocation(Rect mainArea, Rect secondArea, Location location, PageValidation pageValidation, Spec spec, OffsetProvider offsetProvider) {<NEW_LINE>List<String> messages = new LinkedList<>();<NEW_LINE>Range range = location.getRange();<NEW_LINE>for (Side side : location.getSides()) {<NEW_LINE>int... | mainArea, secondArea, side, spec); |
1,651,877 | public static void main(String[] args) {<NEW_LINE>Exercise29_DenseGraphs exercise29_denseGraphs = new Exercise29_DenseGraphs();<NEW_LINE>EdgeWeightedGraph edgeWeightedGraph = new EdgeWeightedGraph(5);<NEW_LINE>edgeWeightedGraph.addEdge(new Edge(0, 1, 0.42));<NEW_LINE>edgeWeightedGraph.addEdge(new Edge(0, 3, 0.5));<NEW_... | "0-1 0.42000\n" + "1-2 0.12000\n" + "0-3 0.50000\n" + "3-4 0.80000"); |
763,013 | private void initializeWriters() {<NEW_LINE>List<EventPropertyDescriptor> writeableProps = new ArrayList<EventPropertyDescriptor>();<NEW_LINE>Map<String, Pair<EventPropertyDescriptor, ObjectArrayEventBeanPropertyWriter>> propertWritersMap = new HashMap<String, Pair<EventPropertyDescriptor, ObjectArrayEventBeanPropertyW... | String propertyName = prop.getPropertyName(); |
295,349 | private void verifyAlgorithmIdentifierProtectionAttribute(AttributeTable signedAttrTable) throws CMSException {<NEW_LINE>AttributeTable unsignedAttrTable = this.getUnsignedAttributes();<NEW_LINE>if (unsignedAttrTable != null && unsignedAttrTable.getAll(CMSAttributes.cmsAlgorithmProtect).size() > 0) {<NEW_LINE>throw new... | signedAttrTable.getAll(CMSAttributes.cmsAlgorithmProtect); |
859,746 | private void handleClassLiteral(polyglot.ast.ClassBody cBody) {<NEW_LINE>// check for class lits whose type is not primitive<NEW_LINE>ClassLiteralChecker classLitChecker = new ClassLiteralChecker();<NEW_LINE>cBody.visit(classLitChecker);<NEW_LINE>ArrayList<Node> classLitList = classLitChecker.getList();<NEW_LINE>if (!c... | soot.RefType.v("java.lang.Class"); |
1,702,297 | String unzipContent(String str) {<NEW_LINE>if (isContentZipped(str)) {<NEW_LINE>try {<NEW_LINE>int ind = 4;<NEW_LINE>byte[] bytes = new byte[str.length() - ind];<NEW_LINE>for (int i = ind; i < str.length(); i++) {<NEW_LINE>char ch = str.charAt(i);<NEW_LINE>bytes[i - ind] = (byte) ((int) ch - 128 - 32);<NEW_LINE>}<NEW_L... | new InputStreamReader(gzn, "UTF-8")); |
547,916 | public void doReportStat(SofaTracerSpan sofaTracerSpan) {<NEW_LINE>Map<String, String> tagsWithStr = sofaTracerSpan.getTagsWithStr();<NEW_LINE>StatKey statKey = new StatKey();<NEW_LINE>String localApp = tagsWithStr.get(CommonSpanTags.LOCAL_APP);<NEW_LINE>String operationName = sofaTracerSpan.getOperationName();<NEW_LIN... | .getLoadTestMark(sofaTracerSpan) })); |
999,033 | public void outputJoinSet(final IBuffer<IBindingSet> outputBuffer) {<NEW_LINE>try {<NEW_LINE>@SuppressWarnings({ "rawtypes", "unchecked" })<NEW_LINE>final Constant t = askVar == null ? null : new Constant(XSDBooleanIV.valueOf(true));<NEW_LINE>final JVMHashIndex rightSolutions = getRightSolutions();<NEW_LINE>final IVari... | bs.set(askVar, t); |
418,625 | public void showIncomingContactRequestNotification() {<NEW_LINE>logDebug("showIncomingContactRequestNotification");<NEW_LINE>ArrayList<MegaContactRequest> icr = megaApi.getIncomingContactRequests();<NEW_LINE>if (icr == null) {<NEW_LINE>logWarning("Number of requests: NULL");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ArrayLi... | = cr.getModificationTime() * 1000; |
38,261 | public StatelessRuleGroup unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StatelessRuleGroup statelessRuleGroup = new StatelessRuleGroup();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | class).unmarshall(context)); |
479,301 | public synchronized void finishAuthentication(String accountId, String verificationCode, String userId) {<NEW_LINE>WithingsAccount withingsAccount = getAccount(accountId);<NEW_LINE>if (withingsAccount == null) {<NEW_LINE>logger.warn("Couldn't find Credentials of Account '{}'. Please check openhab.cfg or withings.cfg.",... | registerAccount(componentContext.getBundleContext()); |
104,542 | public void paintIcon(final Component c, final Graphics g, final int x, int y) {<NEW_LINE>final Color color = c == null ? Color.GRAY : c.getBackground();<NEW_LINE>// In a compound sort, make each succesive triangle 20%<NEW_LINE>// smaller than the previous one.<NEW_LINE>final int dx = (int) ((size / 2) * Math.pow(0.8, ... | setColor(color.brighter()); |
1,717,037 | private void analyzeNonStdOutSink(final Sink sink) {<NEW_LINE>final CreateSourceAsProperties props = sink.getProperties();<NEW_LINE>analysis.setProperties(props);<NEW_LINE>if (!sink.shouldCreateSink()) {<NEW_LINE>final DataSource existing = metaStore.getSource(sink.getName());<NEW_LINE>if (existing == null) {<NEW_LINE>... | getValueFormat().getFormatInfo()); |
604,644 | private PsiElementVisitor createVisitor(final String schemaFileName, final ProblemsHolder holder, final LocalInspectionToolSession session, final PsiFile file) {<NEW_LINE>JsonValue root = file instanceof JsonFile ? ObjectUtils.tryCast(file.getFirstChild(), JsonValue.class) : null;<NEW_LINE>if (root == null)<NEW_LINE>re... | virtualFile = VfsUtil.findFileByURL(url); |
373,101 | // Create Continuous Query<NEW_LINE>@Override<NEW_LINE>public Operator visitCreateContinuousQuery(IoTDBSqlParser.CreateContinuousQueryContext ctx) {<NEW_LINE>CreateContinuousQueryOperator createContinuousQueryOperator = new CreateContinuousQueryOperator(SQLConstant.TOK_CONTINUOUS_QUERY_CREATE);<NEW_LINE>createContinuou... | ().substring(6)); |
1,438,711 | final CreateRealtimeLogConfigResult executeCreateRealtimeLogConfig(CreateRealtimeLogConfigRequest createRealtimeLogConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRealtimeLogConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,617,692 | private void parseFile(I18NResource r, Map<String, String> results) {<NEW_LINE>List<String> lines;<NEW_LINE>try (InputStream is = r.getInputStream()) {<NEW_LINE>lines = IOUtils.readLines(is, StandardCharsets.UTF_8);<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.debug("Error parsing UI I18N content file; skipping: {} ... | results.put(key, value); |
1,723,025 | // autogenerated by CtBiScannerGenerator<NEW_LINE>@java.lang.Override<NEW_LINE>public <T> void visitCtArrayRead(final spoon.reflect.code.CtArrayRead<T> arrayRead) {<NEW_LINE>spoon.reflect.code.CtArrayRead other = ((spoon.reflect.code.CtArrayRead) (this<MASK><NEW_LINE>enter(arrayRead);<NEW_LINE>biScan(spoon.reflect.path... | .stack.peek())); |
141,115 | public void acceptLocalField(FieldBinding fieldBinding) {<NEW_LINE>IJavaElement res;<NEW_LINE>if (fieldBinding.declaringClass instanceof ParameterizedTypeBinding) {<NEW_LINE>LocalTypeBinding localTypeBinding = (LocalTypeBinding) ((ParameterizedTypeBinding) fieldBinding.declaringClass).genericType();<NEW_LINE>res = find... | System.out.println(")"); |
1,295,028 | protected List findByC_T(String companyId, String type) throws SystemException {<NEW_LINE>Session session = null;<NEW_LINE>try {<NEW_LINE>session = openSession();<NEW_LINE>StringBuffer query = new StringBuffer();<NEW_LINE>query.append("FROM AdminConfig IN CLASS com.liferay.portlet.admin.ejb.AdminConfigHBM WHERE ");<NEW... | .list().iterator(); |
1,202,515 | public Request<GetTerminologyRequest> marshall(GetTerminologyRequest getTerminologyRequest) {<NEW_LINE>if (getTerminologyRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetTerminologyRequest)");<NEW_LINE>}<NEW_LINE>Request<GetTerminologyRequest> request = new DefaultRequ... | request.addHeader("X-Amz-Target", target); |
548,010 | private Collection<IFile> filterFiles(Collection<IFile> files, IProgressMonitor monitor) {<NEW_LINE>SubMonitor sub = SubMonitor.convert(monitor, 100);<NEW_LINE>// First filter out files that don't exist, are derived, or are team-private<NEW_LINE>files = CollectionsUtil.filter(files, new IFilter<IFile>() {<NEW_LINE><NEW... | .getWorkspace().getRoot(); |
1,558,110 | public void marshall(Deployment deployment, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (deployment == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(deployment.getId(), ID_BINDING);<NEW_LINE>protocolMars... | deployment.getNetworkConfiguration(), NETWORKCONFIGURATION_BINDING); |
256,290 | private int checkStems() {<NEW_LINE>logger.debug("S#{} checkStems (stemHasHeads + stemHasSingleHeadEnd)", system.getId());<NEW_LINE>int modifs = 0;<NEW_LINE>final List<Inter> stems = sig.inters(Shape.STEM);<NEW_LINE>for (Inter inter : stems) {<NEW_LINE><MASK><NEW_LINE>if (stem.isVip()) {<NEW_LINE>logger.info("VIP check... | final StemInter stem = (StemInter) inter; |
942,809 | public void checkAndWorkOnTasksWhenAvailable() {<NEW_LINE>securityUtil.logInAs("bob");<NEW_LINE>Page<Task> tasks = taskRuntime.tasks(Pageable.of(0, 10));<NEW_LINE>if (tasks.getTotalItems() > 0) {<NEW_LINE>for (Task t : tasks.getContent()) {<NEW_LINE>logger.info("> Claiming task: " + t.getId());<NEW_LINE>taskRuntime.cla... | Content contentToProcess = variableInstance.getValue(); |
1,246,199 | public void run() {<NEW_LINE>Datastream datastream = _datastreamGroup.getDatastreams().get(0);<NEW_LINE>String bootstrapValue = KafkaConnectionString.valueOf(datastream.getSource().getConnectionString()).getBrokers().stream().map(KafkaBrokerAddress::toString).collect(Collectors.joining(KafkaConnectionString.BROKER_LIST... | getName(), _subscribedPartitions, newPartitionInfo); |
736,805 | private ROI geometryToROI(Geometry geometry, ImagePlane plane) {<NEW_LINE>if (geometry.isEmpty())<NEW_LINE>return ROIs.createEmptyROI(plane);<NEW_LINE>// Make sure out Geometry is all of the same type<NEW_LINE>var geometry2 = homogenizeGeometryCollection(geometry);<NEW_LINE>if (geometry2 != geometry) {<NEW_LINE>logger.... | return new GeometryROI(geometry, plane); |
186,275 | /* <port-unification><NEW_LINE>* <protocol-finder protocol="sec-admin-listener" name="http-finder" classname="org.glassfish.grizzly.config.portunif.HttpProtocolFinder"></protocol-finder><NEW_LINE>* <protocol-finder protocol="admin-http-redirect" name="admin-http-redirect" classname="org.glassfish.grizzly.co... | p.createChild(PortUnification.class); |
1,136,557 | public ReturnResult beforeCheckin(@Nullable final CommitExecutor executor, final PairConsumer<Object, Object> additionalDataConsumer) {<NEW_LINE>final Project project = checkinPanel.getProject();<NEW_LINE>if (project == null) {<NEW_LINE>LOG.warn("Could not get project for check-in panel, skipping");<NEW_LINE>return COM... | scanResults = new HashMap<>(); |
93,145 | private void editValues(PlayerProfile profile) {<NEW_LINE>mcMMO.p.debug("========================================================================");<NEW_LINE>mcMMO.p.debug("Conversion report for " + profile.getPlayerName() + ":");<NEW_LINE>for (PrimarySkillType primarySkillType : SkillTools.NON_CHILD_SKILLS) {<NEW_LINE... | p.debug(" XP " + newXPlevel); |
211,992 | public static Map<String, String> nodeData(final INodeEntry nodeentry) {<NEW_LINE>final HashMap<String, String> data = new HashMap<String, String>();<NEW_LINE>if (null != nodeentry) {<NEW_LINE>HashSet<String> skipProps = new HashSet<String>();<NEW_LINE>skipProps.addAll(Arrays.asList("nodename", "osName", "osVersion", "... | (nodeentry.getOsName())); |
1,073,758 | public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {<NEW_LINE>Object child = listAdapter.getChild(groupPosition, childPosition);<NEW_LINE>if (child instanceof DownloadResourceGroup) {<NEW_LINE>String uniqueId = ((DownloadResourceGroup) child).getUniqueId();<NEW... | (ItemViewHolder) v.getTag(); |
68,276 | public void fullRedraw() {<NEW_LINE>setupCanvas();<NEW_LINE>final StyleLibrary style = context.getStyleLibrary();<NEW_LINE>int projdim = BitsUtil.cardinality(proj.getVisibleDimensions2D());<NEW_LINE>ColorLibrary colors = style.getColorSet(StyleLibrary.PLOT);<NEW_LINE>if (tree != null) {<NEW_LINE>E root = tree.getRootEn... | SVGConstants.CSS_STROKE_LINEJOIN_PROPERTY, SVGConstants.CSS_ROUND_VALUE); |
304,111 | public void removeCheckState(int position) {<NEW_LINE>SparseBooleanArray cip = getCheckedItemPositions();<NEW_LINE>if (cip.size() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int[] runStart = new <MASK><NEW_LINE>int[] runEnd = new int[cip.size()];<NEW_LINE>int rangeStart = position;<NEW_LINE>int rangeEnd = cip.keyAt(ci... | int[cip.size()]; |
972,229 | private void loadNode88() {<NEW_LINE>DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.RedundantServerDataType_Encoding_DefaultBinary, new QualifiedName(0, "Default Binary"), new LocalizedText("en", "Default Binary"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0... | this.nodeManager.addNode(node); |
1,256,415 | private void parseDocument(boolean updateWebApp) throws IOException {<NEW_LINE>WebAppProxy webAppProxy = (WebAppProxy) webApp;<NEW_LINE>try {<NEW_LINE>// preparsing<NEW_LINE>SAXParseException error = WebParseUtils.parse(new InputSource(createReader()), new EnterpriseCatalog());<NEW_LINE>setSaxError(error);<NEW_LINE>Str... | new InputSource(createReader())); |
753,557 | private final void resize() {<NEW_LINE>final int newTableEntries = nextPrime((<MASK><NEW_LINE>final int newCapacityEntries = (int) (newTableEntries * LOAD_FACTOR);<NEW_LINE>final byte[] newKeysArr = new byte[newTableEntries * keySizeBytes_];<NEW_LINE>final long[] newArrOfHllArr = new long[newTableEntries * hllArrLongs_... | int) (tableEntries_ * growthFactor_)); |
1,212,775 | public String updateWhitelistedSite(@PathVariable("id") Long id, @RequestBody String jsonString, ModelMap m, Principal p) {<NEW_LINE>JsonObject json;<NEW_LINE>WhitelistedSite whitelist = null;<NEW_LINE>try {<NEW_LINE>json = parser.<MASK><NEW_LINE>whitelist = gson.fromJson(json, WhitelistedSite.class);<NEW_LINE>} catch ... | parse(jsonString).getAsJsonObject(); |
1,483,625 | private void runTest(final String threadName) throws Throwable {<NEW_LINE>Throwable failure = null;<NEW_LINE>try {<NEW_LINE>ExecutorService executorService = Executors.newSingleThreadExecutor(new ThreadFactory() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Thread newThread(Runnable runnable) {<NEW_LINE>return new Thr... | ignored = executorService.submit(test); |
1,834,114 | public static QueryDomainListResponse unmarshall(QueryDomainListResponse queryDomainListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryDomainListResponse.setRequestId(_ctx.stringValue("QueryDomainListResponse.RequestId"));<NEW_LINE>queryDomainListResponse.setTotalItemNum(_ctx.integerValue("QueryDomainListResponse.... | ("QueryDomainListResponse.Data[" + i + "].DomainGroupName")); |
1,346,995 | public Void visitMethodInvocation(MethodInvocationTree tree, Void unused) {<NEW_LINE>List<? extends ExpressionTree> arguments = tree.getArguments();<NEW_LINE>if (// Only consider side-effects-only calls to checkNotNull: it turns out people often<NEW_LINE>!arguments.isEmpty() && arguments.get(0) instanceof IdentifierTre... | (arguments.get(0)); |
14,315 | private static void associateInboundNATPoolsToIpConfiguration(String loadBalancerId, VirtualMachineScaleSetIpConfiguration ipConfig, String... inboundNatPools) {<NEW_LINE>List<SubResource> inboundNatPoolSubResourcesToAssociate = new ArrayList<>();<NEW_LINE>for (String inboundNatPool : inboundNatPools) {<NEW_LINE>String... | mergePath(loadBalancerId, "inboundNatPools", inboundNatPool); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.