idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
921,896 | private static final long fibonacciSequenceUsingRecursion(long[] array, int n) {<NEW_LINE>if (n == 0 || n == 1)<NEW_LINE>return n;<NEW_LINE>// If array already has a value then it has previously been computed<NEW_LINE>if (array[n] != 0)<NEW_LINE>return array[n];<NEW_LINE>final String exception = "Run out of bits in lon... | array, (n - 2)); |
1,472,765 | // Override the reallocate method to provide for reallocating the contents when a field<NEW_LINE>// changes size. This method is only called in a top-level JMFMessage (one with no<NEW_LINE>// parent).<NEW_LINE>// Locking: We rely on something up the calling stack to protect us from<NEW_LINE>// concurrency issues.<NEW_L... | oldMessageOffset, contents, 0, tableOffset); |
770,523 | final void localTransactionRolledBack() {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {<NEW_LINE>SibTr.<MASK><NEW_LINE>}<NEW_LINE>final ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);<NEW_LINE>// Copy list to protect against concurrent mo... | entry(this, TRACE, "localTransactionRolledBack"); |
1,114,026 | // suppressing warnings because I expect headers and query strings to be checked by the underlying<NEW_LINE>// servlet implementation<NEW_LINE>@SuppressFBWarnings({ "SERVLET_HEADER", "SERVLET_QUERY_STRING" })<NEW_LINE>private ContainerRequest servletRequestToContainerRequest(ServletRequest request) {<NEW_LINE>Timer.sta... | String headerKey = headerNames.nextElement(); |
639,045 | public GeckoResult<SlowScriptResponse> onSlowScript(@NonNull GeckoSession aSession, @NonNull String aScriptFileName) {<NEW_LINE>final GeckoResult<SlowScriptResponse> result = new GeckoResult<>();<NEW_LINE>if (mSlowScriptPrompt == null) {<NEW_LINE>mSlowScriptPrompt = new ConfirmPromptWidget(mContext);<NEW_LINE>mSlowScri... | .getPlacement().parentAnchorY = 0.0f; |
1,222,899 | final GetDomainPermissionsPolicyResult executeGetDomainPermissionsPolicy(GetDomainPermissionsPolicyRequest getDomainPermissionsPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDomainPermissionsPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | (super.beforeMarshalling(getDomainPermissionsPolicyRequest)); |
514,379 | public void write(Object object, Properties properties) {<NEW_LINE>if (object instanceof LineBreakpoint) {<NEW_LINE>LineBreakpoint breakpoint = (LineBreakpoint) object;<NEW_LINE>FileObject fileObject = breakpoint.getLine().getLookup().lookup(FileObject.class);<NEW_LINE>properties.setString(LineBreakpoint.PROP_URL, file... | getLine().getLineNumber()); |
542,262 | private void removeService(final EndpointDefinition endpointDefinition) {<NEW_LINE>logger.info(sputs("ClusteredStatReplicator::removeService()", serviceName, endpointDefinition, " replicator count ", replicatorsMap.size()));<NEW_LINE>final Pair<EndpointDefinition, StatReplicator> statReplicatorPair = this.replicatorsMa... | get(endpointDefinition.getId()); |
138,877 | public void run() {<NEW_LINE>synchronized (mAccessibilityLock) {<NEW_LINE>if (mCodeMatcher == null) {<NEW_LINE>mCodeMatcher = mControlCodes.matcher(mAccessibilityBuffer.toString());<NEW_LINE>} else {<NEW_LINE>mCodeMatcher.reset(mAccessibilityBuffer.toString());<NEW_LINE>}<NEW_LINE>// Strip all control codes out.<NEW_LI... | i = mAccessibilityBuffer.indexOf(BACKSPACE_CODE); |
515,970 | public byte[] convertToXmlByteArray(AccessControlList acl) throws AmazonClientException {<NEW_LINE>Owner owner = acl.getOwner();<NEW_LINE>if (owner == null) {<NEW_LINE>throw new AmazonClientException("Invalid AccessControlList: missing an S3Owner");<NEW_LINE>}<NEW_LINE>XmlWriter xml = new XmlWriter();<NEW_LINE>xml.star... | getDisplayName()).end(); |
284,318 | public void menuWillBeShown(MenuItem menu, Object data) {<NEW_LINE>menu.removeAllChildItems();<NEW_LINE>int vo = subs.getViewOptions();<NEW_LINE>MenuItem m = menu_manager.addMenuItem(menu, "label.full");<NEW_LINE>m.setStyle(MenuItem.STYLE_RADIO);<NEW_LINE>m.setData(Boolean.valueOf(vo == Subscription.VO_FULL));<NEW_LINE... | subs.setViewOptions(Subscription.VO_FULL); |
1,641,907 | public String checkDependencies(final String containerInode) throws DotDataException, DotSecurityException, PortalException, SystemException {<NEW_LINE>final HttpServletRequest req = WebContextFactory.get().getHttpServletRequest();<NEW_LINE>final User user = userWebAPI.getLoggedInUser(req);<NEW_LINE>final boolean respe... | templates, container, user, respectFrontendRoles); |
198,814 | public void propagate(CircuitState circuitState) {<NEW_LINE>final var state = getState(circuitState);<NEW_LINE>final var attrs = getAttributeSet();<NEW_LINE>final var x = addr(circuitState, P_X);<NEW_LINE>final var y = addr(circuitState, P_Y);<NEW_LINE>final var color = addr(circuitState, P_DATA);<NEW_LINE>state.lastX ... | resetOption = attrs.getValue(RESET_OPTION); |
188,532 | public Dialog createView(@NonNull AlertDialog fragment, @NonNull Bundle args) {<NEW_LINE>AppCompatDialog appCompatDialog = new AppCompatDialog(fragment.getContext());<NEW_LINE>LayoutInflater inflater = LayoutInflater.from(fragment.getContext());<NEW_LINE>View root = inflater.inflate(fragment.getLayoutId(), null, false)... | .onPositiveClicked(DialogInterface.BUTTON_POSITIVE)); |
1,173,247 | protected RFuture<Long> fastRemoveOperationAsync(K... keys) {<NEW_LINE>long threadId = Thread.currentThread().getId();<NEW_LINE>List<RLock> locks = Arrays.stream(keys).map(k -> getLock(k)).collect(Collectors.toList());<NEW_LINE>return executeLocked(timeout, () -> {<NEW_LINE>AtomicLong counter = new AtomicLong();<NEW_LI... | currentValue = state.get(keyHash); |
548,919 | public void showLog(User user, @PathVariable("id") long id, @RemainedPath String path, HttpServletResponse response) {<NEW_LINE>getOneWithPermissionCheck(user, id, false);<NEW_LINE>File targetFile = perfTestService.getLogFile(id, path);<NEW_LINE>response.reset();<NEW_LINE>response.setContentType("text/plain");<NEW_LINE... | ServletOutputStream outputStream = response.getOutputStream(); |
1,327,404 | public SQLStatement parseRename() {<NEW_LINE>acceptIdentifier("RENAME");<NEW_LINE>if (lexer.token() == Token.SEQUENCE) {<NEW_LINE>lexer.nextToken();<NEW_LINE>MySqlRenameSequenceStatement stmt = new MySqlRenameSequenceStatement();<NEW_LINE>SQLName name <MASK><NEW_LINE>stmt.setName(name);<NEW_LINE>accept(Token.TO);<NEW_L... | = this.exprParser.name(); |
55,677 | public EntitlementData unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EntitlementData entitlementData = new EntitlementData();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken... | String currentParentElement = context.getCurrentParentElement(); |
1,534,157 | protected void work() {<NEW_LINE>Map<TailFile, List<Map>> serverlogs = null;<NEW_LINE>try {<NEW_LINE>TailFile tf = (TailFile) this.get("tfevent");<NEW_LINE>this.setCurrenttfref((CopyOfProcessOfLogagent) this.get("tfref"));<NEW_LINE>// tfref = ((TaildirLogComponent) this.get("tfref"));<NEW_LINE>serverlogs = this.getCurr... | "### Logvalue ###: " + applogs.getValue()); |
99,241 | private Tika instantiateTika(Map<String, Object> conf) {<NEW_LINE>Tika tika = null;<NEW_LINE>String tikaConfigFile = ConfUtils.getString(conf, "parser.tika.config.file", "tika-config.xml");<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>URL tikaConfigUrl = getClass().getClassLoader().getResource(tikaConfigF... | long end = System.currentTimeMillis(); |
1,497,872 | public static List<Map<String, Object>> run(MysqlContent mysqlContent) throws Exception {<NEW_LINE>HttpResponse<String> response = Requests.get("http://prod-dataops-pmdb.sreworks-dataops/datasource/getDatasourceById?id=" + mysqlContent.getDatasourceId(), null, null);<NEW_LINE>Requests.checkResponseStatus(response);<NEW... | Statement statement = con.createStatement(); |
460,783 | public static <R> R callStaticMethod(Class<?> clazz, String methodName, ClassParameter<?>... classParameters) {<NEW_LINE>perfStatsCollector.incrementCount(String.format("ReflectionHelpers.callStaticMethod-%s_%s", clazz.getName(), methodName));<NEW_LINE>try {<NEW_LINE>Class<?>[] classes = ClassParameter.getClasses(class... | method.invoke(null, values); |
1,374,280 | private static RowSet resultSetFromCSV(List<Var> vars, CSVParser parser) {<NEW_LINE>BindingBuilder builder = Binding.builder();<NEW_LINE>Function<List<String>, Binding> transform = new Function<List<String>, Binding>() {<NEW_LINE><NEW_LINE>private int count = 1;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Binding appl... | v = vars.get(i); |
1,127,528 | public CompletableFuture<VirtualMachine> addVM(Connector cx, List<String> args) {<NEW_LINE>Map<String, Connector.Argument> arguments = cx.defaultArguments();<NEW_LINE>if (cx instanceof LaunchingConnector) {<NEW_LINE>if (arguments.containsKey("command")) {<NEW_LINE>arguments.get("command").setValue(args.get(0));<NEW_LIN... | (args.get(1)); |
1,078,115 | public static void shortenTooTooLongFile(String filePath) {<NEW_LINE>File file = new File(filePath);<NEW_LINE>if (!file.exists())<NEW_LINE>return;<NEW_LINE>long fileLength = file.length();<NEW_LINE>if (fileLength > TOO_TOO_LONG_FILE_LENGTH) {<NEW_LINE>try (RandomAccessFile randomAccessFile = new RandomAccessFile(file, ... | write(buffer, 0, len); |
1,228,977 | private int trimBlockToVariant(final VariantContext variantContextToOutput, final List<VariantContextBuilder> completedBlocks, final List<VariantContextBuilder> tailBuffer, final VariantContextBuilder builder) {<NEW_LINE>final int blockStart = (int) builder.getStart();<NEW_LINE>final int variantEnd = variantContextToOu... | VCFConstants.END_KEY, variantStart - 1); |
929,869 | public final IndexHintContext indexHint() throws RecognitionException {<NEW_LINE>IndexHintContext _localctx = new IndexHintContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 216, RULE_indexHint);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(3349);<NEW_LINE>((... | _errHandler.recover(this, re); |
1,199,955 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String activityId, JsonElement jsonElement) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW_LINE>String job = null;<NEW_LINE>try (... | emc.beginTransaction(Work.class); |
1,184,905 | public static com.jme3.math.Matrix3f convert(javax.vecmath.Matrix3f oldMatrix, com.jme3.math.Matrix3f newMatrix) {<NEW_LINE>newMatrix.set(0, 0, oldMatrix.m00);<NEW_LINE>newMatrix.set(0, 1, oldMatrix.m01);<NEW_LINE>newMatrix.set(0, 2, oldMatrix.m02);<NEW_LINE>newMatrix.set(1, 0, oldMatrix.m10);<NEW_LINE>newMatrix.set(1,... | 2, 1, oldMatrix.m21); |
445,991 | private NativeModule create() {<NEW_LINE>SoftAssertions.<MASK><NEW_LINE>ReactMarker.logMarker(CREATE_MODULE_START, mName, mInstanceKey);<NEW_LINE>SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "ModuleHolder.createModule").arg("name", mName).flush();<NEW_LINE>PrinterHolder.getPrinter().logMessage(ReactDebugOv... | assertCondition(mModule == null, "Creating an already created module."); |
927,268 | public void init() {<NEW_LINE>addDrawableChild(new CleanUpButton(width / 2 - 100, height / 4 + 168 + 12, () -> "Cancel", "", b -> client.setScreen(prevScreen)));<NEW_LINE>addDrawableChild(cleanUpButton = new CleanUpButton(width / 2 - 100, height / 4 + 144 + 12, () -> "Clean Up", "Start the Clean Up with the settings\n"... | b -> cleanupUnknown = !cleanupUnknown)); |
1,730,127 | private void routeDownward(Vertex2d start, Vertex2d end, FGEdge e, Vertex2dFactory vertex2dFactory, List<Point2D> articulations) {<NEW_LINE>lighten(e);<NEW_LINE>int delta = end.rowIndex - start.rowIndex;<NEW_LINE>int distanceSpacing = delta * EDGE_ENDPOINT_DISTANCE_MULTIPLIER;<NEW_LINE>// update for extra spacing<NEW_L... | .Double(x2, y2)); |
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... | -> ctx.getResponseHeader(h)); |
1,833,818 | public static void loadNearestNeighborBin(InputStream in, RecognitionNearestNeighborInvertedFile<?> nn) {<NEW_LINE>DogArray<InvertedFile> inverted = nn.getInvertedFiles();<NEW_LINE>BigDogArray_I32 imageDB = nn.getImagesDB();<NEW_LINE>inverted.reset();<NEW_LINE>imageDB.reset();<NEW_LINE>var builder = new StringBuilder()... | int index = input.readInt(); |
1,819,100 | public Table executionList(@ShellOption(help = "the job name to be used as a filter", defaultValue = ShellOption.NULL) String name) {<NEW_LINE>final PagedModel<JobExecutionThinResource> jobs;<NEW_LINE>if (name == null) {<NEW_LINE>jobs = jobOperations().executionThinList();<NEW_LINE>} else {<NEW_LINE>jobs = jobOperation... | modelBuilder = new TableModelBuilder<>(); |
774,668 | public void visitBinaryExpression(BinaryExpression expression) {<NEW_LINE>boolean writeParanthesis = false;<NEW_LINE>preVisitExpression(expression);<NEW_LINE>if (expression.getOperation().getType() == Types.LEFT_SQUARE_BRACKET) {<NEW_LINE>expression.getLeftExpression().visit(this);<NEW_LINE>groovyCode.append("[");<NEW_... | GroovyCore.logException("Error in refactoring", e); |
1,779,068 | private static void addToBranch(MXCIFQuadTreeNodeBranch<Object> branch, double x, double y, double width, double height, Object value, MXCIFQuadTree<Object> tree) {<NEW_LINE>QuadrantAppliesEnum quadrant = branch.getBb().getQuadrantApplies(x, y, width, height);<NEW_LINE>if (quadrant == QuadrantAppliesEnum.NW) {<NEW_LINE... | .getSe(), tree)); |
969,375 | synchronized void requestCheckpoint(boolean persistent) throws ObjectManagerException {<NEW_LINE>if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())<NEW_LINE>trace.entry(this, cclass, "requestCheckpoint", new Object[] { new Boolean(persistent) });<NEW_LINE>// Has something previously gone wrong?<NEW_LINE>if (a... | this, cclass, "requestCheckpoint", abnormalTerminationException); |
1,325,426 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject <MASK><NEW_LINE>if (controller == null || sourceObject == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Permanent permanent = game.getPermanent(source.getFirstTarget());<NEW_... | sourceObject = source.getSourceObject(game); |
921,209 | public static ApplyTagPoliciesResponse unmarshall(ApplyTagPoliciesResponse applyTagPoliciesResponse, UnmarshallerContext _ctx) {<NEW_LINE>applyTagPoliciesResponse.setRequestId(_ctx.stringValue("ApplyTagPoliciesResponse.RequestId"));<NEW_LINE>applyTagPoliciesResponse.setHttpStatusCode(_ctx.integerValue("ApplyTagPolicies... | ("ApplyTagPoliciesResponse.Data[" + i + "].Status")); |
1,333,472 | final private void fillCallerData(String callerFQCN, LogRecord record) {<NEW_LINE>if (!FILL_CALLER_DATA) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>StackTraceElement[] steArray = <MASK><NEW_LINE>int selfIndex = -1;<NEW_LINE>for (int i = 0; i < steArray.length; i++) {<NEW_LINE>final String className = steArray[i].getClassNa... | new Throwable().getStackTrace(); |
1,580,268 | private static List<Region> internalParse(final InputStream input, final boolean endpointVerification) throws IOException {<NEW_LINE>Document document;<NEW_LINE>try {<NEW_LINE>DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();<NEW_LINE>factory.setXIncludeAware(false);<NEW_LINE>factory.setExpandEntit... | setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); |
1,212,060 | public static GlobalQRCodeParseResult parse(@NonNull final String string) {<NEW_LINE>String remainingString = string;<NEW_LINE>//<NEW_LINE>// Extract type<NEW_LINE>final GlobalQRCodeType type;<NEW_LINE>{<NEW_LINE>int idx = remainingString.indexOf(SEPARATOR);<NEW_LINE>if (idx <= 0) {<NEW_LINE>return GlobalQRCodeParseRes... | .substring(0, idx)); |
1,109,813 | private void onInit(CallbackInfo info) {<NEW_LINE>addDrawableChild(new ButtonWidget(4, 4, 120, 20, new LiteralText("Copy"), button -> {<NEW_LINE>NbtList listTag = new NbtList();<NEW_LINE>for (int i = 0; i < contents.getPageCount(); i++) listTag.add(NbtString.of(contents.getPage(i).getString()));<NEW_LINE>NbtCompound ta... | = mc.player.getMainHandStack(); |
1,449,800 | private void loadSettings(PClient newClient, Client client) throws IOException {<NEW_LINE>PSettings newSettings = newClient.getSettings();<NEW_LINE><MASK><NEW_LINE>// remove all auto-created bookmarks<NEW_LINE>settings.clearBookmarks();<NEW_LINE>for (PBookmark newBookmark : newSettings.getBookmarksList()) {<NEW_LINE>se... | ClientSettings settings = client.getSettings(); |
295,328 | protected JMenu createSizeMenu() {<NEW_LINE>JMenu sizeMenu = new JMenu(I18N.getText("token.popup.menu.size"));<NEW_LINE>JCheckBoxMenuItem freeSize = new JCheckBoxMenuItem(new FreeSizeAction());<NEW_LINE>freeSize.setSelected(!tokenUnderMouse.isSnapToScale());<NEW_LINE>sizeMenu.add(freeSize);<NEW_LINE>JCheckBoxMenuItem r... | .getZone().getGrid(); |
843,426 | public void runAssertion(RegressionEnvironment env, String createSchemaEPL, Consumer<String[]> sender) {<NEW_LINE>String epl = createSchemaEPL + "@name('s0') select * from LocalEvent;\n" + "@name('s1') select property[0].id as c0, property[1].id as c1," + " exists(property[0].id) as c2, exists(property[1].id) as c3," +... | , null, false, null)); |
1,638,393 | public User createUser(String userId, String email) throws DotDataException, DuplicateUserException {<NEW_LINE>Company comp = com.dotmarketing.cms.factories.PublicCompanyFactory.getDefaultCompany();<NEW_LINE>String companyId = comp.getCompanyId();<NEW_LINE>User defaultUser = APILocator.getUserAPI().getDefaultUser();<NE... | setRefreshRate(defaultUser.getRefreshRate()); |
1,459,507 | private static void addAvailableFixesForGroups(@Nonnull HighlightInfo info, @Nonnull Editor editor, @Nonnull PsiFile file, @Nonnull List<? super HighlightInfo.IntentionActionDescriptor> outList, int group, int offset) {<NEW_LINE>if (info.quickFixActionMarkers == null)<NEW_LINE>return;<NEW_LINE>if (group != -1 && group ... | = injectedFile == null ? file : injectedFile; |
1,188,440 | public void marshall(Finding finding, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (finding == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(finding.getAccountId(), ACCOUNTID_BINDING);<NEW_LINE>protocolMa... | finding.getResource(), RESOURCE_BINDING); |
1,661,463 | private Object insertRecord(Table table, Context ctx) {<NEW_LINE>if (param.getType() != IParam.Colon || param.getSubSize() != 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("insert" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>IParam sub1 = param.getSub(1);<NEW_L... | getLeafExpression().calculate(ctx); |
1,315,858 | void dumpStatistics() {<NEW_LINE>int leafPages = height == 3 ? pagesCount - (1 + root.getNodeView().getChildrenCount() + 1) : height == 2 ? pagesCount - 1 : 1;<NEW_LINE>long leafNodesCapacity = (long) hashedPagesCount * maxLeafNodesInHash + (long) (leafPages - hashedPagesCount) * maxLeafNodes;<NEW_LINE>long leafNodesCa... | (count * 100L) / leafNodesCapacity); |
703,542 | public IMessage onMessage(PacketRequestMissingItems message, MessageContext ctx) {<NEW_LINE>EntityPlayerMP player = ctx.getServerHandler().player;<NEW_LINE>if (player.openContainer.windowId == message.windowId && player.openContainer instanceof InventoryPanelContainer) {<NEW_LINE>InventoryPanelContainer ipc = (Inventor... | TileInventoryPanel teInvPanel = ipc.getTe(); |
915,099 | public static // }<NEW_LINE>BlockedTerm parse(JSONObject data, String streamLogin) {<NEW_LINE>String id = JSONUtil.getString(data, "id");<NEW_LINE>long createdAt = JSONUtil.getDatetime(data, "created_at", -1);<NEW_LINE>long updatedAt = JSONUtil.getDatetime(data, "updated_at", -1);<NEW_LINE>long expiresAt = JSONUtil.get... | (data, "expires_at", -1); |
534,666 | public void lower(LoweringTool tool) {<NEW_LINE>StructuredGraph replacementGraph = getLoweredSnippetGraph(tool);<NEW_LINE>if (replacementGraph != null) {<NEW_LINE>// Replace this node with an invoke but disable verification of the stamp since the<NEW_LINE>// invoke only exists for the purpose of performing the inling.<... | getTargetMethod(), "Replace with graph.", "LoweringPhase"); |
1,225,100 | public void handleRequest(HttpServerExchange exchange) throws Exception {<NEW_LINE>var request = (MongoRequest) MongoRequest.of(exchange);<NEW_LINE>var response = (MongoResponse) MongoResponse.of(exchange);<NEW_LINE>if (!request.isWriteDocument() || request.isPatch()) {<NEW_LINE>next(exchange);<NEW_LINE>return;<NEW_LIN... | = new ArrayList<String>(); |
442,601 | public void onProgressUpdate(Object... values) {<NEW_LINE>Resources res = getResources();<NEW_LINE>if (values[0] instanceof Integer) {<NEW_LINE>int id = (Integer) values[0];<NEW_LINE>if (id != 0) {<NEW_LINE>mCurrentMessage = res.getString(id);<NEW_LINE>}<NEW_LINE>if (values.length >= 3) {<NEW_LINE>mCountUp = (Long) val... | = (Long) values[1]; |
1,295,129 | public void createSubmission(BasicNetwork network) throws IOException {<NEW_LINE>System.out.println("Building submission file.");<NEW_LINE>FileInputStream istream = new FileInputStream(KAGGLE_TEST);<NEW_LINE>final DataSet ds = DataSet.load(istream);<NEW_LINE>istream.close();<NEW_LINE>int columnCount = ds.getHeaderCount... | ids = ds.columnAsList(0); |
1,612,643 | private KeywordFieldType buildFieldType(BuilderContext context, FieldType fieldType) {<NEW_LINE>NamedAnalyzer normalizer = Lucene.KEYWORD_ANALYZER;<NEW_LINE>NamedAnalyzer searchAnalyzer = Lucene.KEYWORD_ANALYZER;<NEW_LINE>String normalizerName = this.normalizer.getValue();<NEW_LINE>if (Objects.equals(normalizerName, "d... | normalizerName + "] not found for field [" + name + "]"); |
179,838 | public static Object addArrays(Object first, Object second) {<NEW_LINE>if (first != null && !first.getClass().isArray()) {<NEW_LINE>throw new IllegalArgumentException("Parameter is not an array: " + first);<NEW_LINE>}<NEW_LINE>if (second != null && !second.getClass().isArray()) {<NEW_LINE>throw new IllegalArgumentExcep... | firstLength = Array.getLength(first); |
790,409 | public boolean checkAuths(Long appId) {<NEW_LINE>if (appId == null) {<NEW_LINE>logger.warn("appId is null");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>AppDesc appDesc = appDao.getAppDescById(appId);<NEW_LINE>if (appDesc == null) {<NEW_LINE><MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String passwordMD5 = "";<NEW_... | logger.error("appId = {} not exist", appId); |
447,272 | public void actionPerformed(final ActionEvent e) {<NEW_LINE>List<JavaPlatform> platforms = JavaPlatform.getPlatforms();<NEW_LINE>String[] columnNames = new String[] { Bundle.LBL_JavaPlatform(), Bundle.LBL_LastCalibrated() };<NEW_LINE>Object[][] columnData = new Object[platforms.size()][2];<NEW_LINE>for (int i = 0; i < ... | .get(i), null }; |
392,802 | public SampleSubsetSummary estimateSubsetSum(final Predicate<Long> predicate) {<NEW_LINE>if (itemsSeen_ == 0) {<NEW_LINE>return new SampleSubsetSummary(0.0, 0.0, 0.0, 0.0);<NEW_LINE>}<NEW_LINE>final long numSamples = getNumSamples();<NEW_LINE>final double <MASK><NEW_LINE>assert samplingRate >= 0.0;<NEW_LINE>assert samp... | samplingRate = numSamples / (double) itemsSeen_; |
6,431 | static List<List<Integer>> newPartitionAssignments(int minPartitionNum, int partitionNum, Set<BrokerMetadata> brokers, int rf) {<NEW_LINE>// The replica assignments for the new partitions, and not the old partitions.<NEW_LINE>// .increaseTo(6, asList(asList(1, 2),<NEW_LINE>// asList(2, 3),<NEW_LINE>// asList(3, 1)))<NE... | replicas = new ArrayList<>(); |
527,815 | private void handleErrorState(File report, String firstLine, Deque<String> queue) {<NEW_LINE>System.err.println(firstLine);<NEW_LINE>String remainder = firstLine.substring(LINE_START.length());<NEW_LINE>Matcher m = Pattern.compile("([^(]*).*").matcher(remainder);<NEW_LINE>if (!m.find()) {<NEW_LINE>return;<NEW_LINE>}<NE... | index = fullName.lastIndexOf('.'); |
996,848 | public String formatRecord(RepositoryLogRecord record, Locale locale) {<NEW_LINE>SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");<NEW_LINE>String loggerName = record.getLoggerName();<NEW_LINE>String methodName = record.getSourceMethodName();<NEW_LINE>String message = record.getFormat... | String threadID = threadSB.toString(); |
43,564 | public void testSLRemoteEnvEntry_Double() throws Exception {<NEW_LINE>// The test case looks for a environment variable named "envDouble".<NEW_LINE>Double tempDouble = fejb1.getDoubleEnvVar("envDouble");<NEW_LINE>assertNotNull("Get environment double object was null.", tempDouble);<NEW_LINE>assertEquals("Test content o... | doubleValue(), 7003.0, DDELTA); |
1,152,065 | private Mono<Response<Flux<ByteBuffer>>> createWithResponseAsync(String resourceGroupName, String name, RedisCreateParameters parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cann... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
267,743 | public static Entry<String, List<String>> extract(CharSequence typeString) {<NEW_LINE>StringBuilder typeName = new StringBuilder();<NEW_LINE>StringBuilder typeArgument = new StringBuilder();<NEW_LINE>List<String<MASK><NEW_LINE>int anglesOpened = 0;<NEW_LINE>chars: for (int i = 0; i < typeString.length(); i++) {<NEW_LIN... | > typeArguments = Lists.newArrayList(); |
610,648 | public void read(org.apache.thrift.protocol.TProtocol prot, revokeNamespacePermission_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(5);<NEW_LINE>if (inc... | struct.credentials.read(iprot); |
265,529 | final ListRevisionAssetsResult executeListRevisionAssets(ListRevisionAssetsRequest listRevisionAssetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRevisionAssetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | addHandlerContext(HandlerContextKey.SERVICE_ID, "DataExchange"); |
40,864 | private HashMap<DefaultMutableTreeNode, String> addTreeNodes(Timestamp dateTime, DefaultMutableTreeNode root, MResource r) {<NEW_LINE>HashMap<DefaultMutableTreeNode, String> names = new <MASK><NEW_LINE>DefaultMutableTreeNode parent = new DefaultMutableTreeNode(dateTime);<NEW_LINE>names.put(parent, getTreeNodeRepresenta... | HashMap<DefaultMutableTreeNode, String>(); |
1,258,208 | private void initUI() {<NEW_LINE>paint = new Paint();<NEW_LINE>paint.setStyle(Style.STROKE);<NEW_LINE>paint.setAntiAlias(true);<NEW_LINE>borderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);<NEW_LINE>borderPaint.setStyle(Style.STROKE);<NEW_LINE>borderPaint.setStrokeJoin(Paint.Join.ROUND);<NEW_LINE>borderPaint.setStrokeCap(Pa... | ), R.color.gpx_color_point); |
895,326 | private void addWurstCape(GameProfile profile, HashMap<MinecraftProfileTexture.Type, MinecraftProfileTexture> map) {<NEW_LINE>String name = profile.getName();<NEW_LINE>String uuid = profile<MASK><NEW_LINE>try {<NEW_LINE>if (capes == null)<NEW_LINE>setupWurstCapes();<NEW_LINE>if (capes.has(name)) {<NEW_LINE>String capeU... | .getId().toString(); |
220,566 | public void compactTable(AdminCompactTableStmt stmt) throws DdlException {<NEW_LINE>String dbName = stmt.getDbName();<NEW_LINE>String tableName = stmt.getTblName();<NEW_LINE><MASK><NEW_LINE>Database db = this.getDbOrDdlException(dbName);<NEW_LINE>OlapTable olapTable = db.getOlapTableOrDdlException(tableName);<NEW_LINE>... | String type = stmt.getCompactionType(); |
1,512,064 | private JComponent createActionsPanel() {<NEW_LINE>final JButton include = new JButton(IdeBundle.message("button.include"));<NEW_LINE>final JButton includeRec = new JButton(IdeBundle.message("button.include.recursively"));<NEW_LINE>final JButton exclude = new JButton<MASK><NEW_LINE>final JButton excludeRec = new JButto... | (IdeBundle.message("button.exclude")); |
514,704 | private Unit pickObject(String flag) throws Exception {<NEW_LINE>Unit o = this.entityManagerContainer().flag(flag, Unit.class);<NEW_LINE>if (o != null) {<NEW_LINE>this.entityManagerContainer().get(Unit.class).detach(o);<NEW_LINE>} else {<NEW_LINE>String name = flag;<NEW_LINE>Matcher matcher = PersistenceProperties.<MAS... | Unit.distinguishedName_pattern.matcher(flag); |
1,113,663 | public void onWindowUpdate(WindowUpdateFrame frame) {<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("Received {} on {}", frame, this);<NEW_LINE>int streamId = frame.getStreamId();<NEW_LINE>int windowDelta = frame.getWindowDelta();<NEW_LINE>if (streamId > 0) {<NEW_LINE>IStream stream = getStream(streamId);<NEW_L... | .code), Callback.NOOP); |
1,701,808 | public Request<DescribeStackSetOperationRequest> marshall(DescribeStackSetOperationRequest describeStackSetOperationRequest) {<NEW_LINE>if (describeStackSetOperationRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeStackSetOperation... | request.addParameter("Version", "2010-05-15"); |
852,898 | protected void executeTasks(final AccessPathTask[] tasks) throws Exception {<NEW_LINE>if (executor == null) {<NEW_LINE>for (AccessPathTask task : tasks) {<NEW_LINE>task.call();<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final List<FutureTask<Void>> futureTasks = new LinkedList<FutureTask<Void>>();<NEW_LINE>for (Ac... | RuntimeException(firstCause.get()); |
1,756,333 | public void createConfirmation() {<NEW_LINE>final MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());<NEW_LINE>final boolean pick = dt.isPickQAConfirm();<NEW_LINE>final boolean ship = dt.isShipConfirm();<NEW_LINE>// Nothing to do<NEW_LINE>if (!pick && !ship) {<NEW_LINE>log.trace("Create confirmations not need");<N... | [] confirmations = getConfirmations(false); |
933,440 | public Tree transformTree(Tree t, Tree root) {<NEW_LINE><MASK><NEW_LINE>StringBuilder newCategory = new StringBuilder();<NEW_LINE>// Add manual state splits<NEW_LINE>for (Pair<TregexPattern, Function<TregexMatcher, String>> e : activeAnnotations) {<NEW_LINE>TregexMatcher m = e.first().matcher(root);<NEW_LINE>if (m.matc... | String baseCat = t.value(); |
218,345 | private static DecryptedGroup performLocalMigration(@NonNull Context context, @NonNull GroupId.V1 gv1Id, long threadId, @NonNull Recipient groupRecipient) throws IOException, GroupChangeBusyException {<NEW_LINE>Log.i(TAG, "performLocalMigration(" + gv1Id + ", " + threadId + ", " + groupRecipient.getId());<NEW_LINE>try ... | Log.w(TAG, "[Local] We are not in the group. Doing a local leave."); |
144,859 | private void readZapAddOnXmlFile(ZapAddOnXmlFile zapAddOnXml) {<NEW_LINE>this.name = zapAddOnXml.getName();<NEW_LINE>this.version = zapAddOnXml.getVersion();<NEW_LINE>this.semVer = zapAddOnXml.getSemVer();<NEW_LINE>this.status = AddOn.Status.valueOf(zapAddOnXml.getStatus());<NEW_LINE>this.description = zapAddOnXml.getD... | createUrl(zapAddOnXml.getRepo()); |
628,620 | void putFieldInfo(final ByteVector output) {<NEW_LINE>boolean useSyntheticAttribute = symbolTable.getMajorVersion() < Opcodes.V1_5;<NEW_LINE>// Put the access_flags, name_index and descriptor_index fields.<NEW_LINE>int mask = useSyntheticAttribute ? Opcodes.ACC_SYNTHETIC : 0;<NEW_LINE>output.putShort(accessFlags & ~mas... | SYNTHETIC)).putInt(0); |
1,254,112 | final DeleteEndpointResult executeDeleteEndpoint(DeleteEndpointRequest deleteEndpointRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteEndpointRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | (super.beforeMarshalling(deleteEndpointRequest)); |
876,511 | public void abortTxn(String reason) throws TException, TimeoutException, InterruptedException, ExecutionException {<NEW_LINE>if (!isTxnBegin()) {<NEW_LINE>LOG.<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>this.txnExecutor.abortTransaction();<NEW_LINE>LOG.info("abort txn in channel {}, table: {}, txn id: {}... | warn("No transaction to abort in channel {}, table: {}", id, targetTable); |
1,350,491 | public static CreatePrometheusAlertRuleResponse unmarshall(CreatePrometheusAlertRuleResponse createPrometheusAlertRuleResponse, UnmarshallerContext _ctx) {<NEW_LINE>createPrometheusAlertRuleResponse.setRequestId(_ctx.stringValue("CreatePrometheusAlertRuleResponse.RequestId"));<NEW_LINE>PrometheusAlertRule prometheusAle... | = new ArrayList<Label>(); |
1,019,419 | private boolean login(String username, String password) throws IOException {<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>String dbPath = this.getDatabasePath("Users.db").getPath();<NEW_LINE>SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbPath, dbPassword, null);<NEW_LINE>String query = ("SELECT * FROM Users WHERE ... | username + "' AND memPass = '" + password + "';"); |
727,262 | public QueryDumpInfo deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {<NEW_LINE>QueryDumpInfo dumpInfo = new QueryDumpInfo();<NEW_LINE>JsonObject dumpJsonObject = jsonElement.getAsJsonObject();<NEW_LINE>// 1. statement<NEW_LINE>String stat... | (columnStatistic).build()); |
168,659 | final ImportSnapshotResult executeImportSnapshot(ImportSnapshotRequest importSnapshotRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(importSnapshotRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
894,421 | public static void registerType(final ModelBuilder modelBuilder) {<NEW_LINE>final ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(SendTask.class, BPMN_ELEMENT_SEND_TASK).namespaceUri(BPMN20_NS).extendsType(Task.class).instanceProvider(new ModelTypeInstanceProvider<SendTask>() {<NEW_LINE><NEW_LINE>@Overrid... | Operation.class).build(); |
1,276,112 | public void addConsent(String clientId, String user, String scopeString, String resource, String providerId, int keyLifeTimeInSeconds) {<NEW_LINE>// TODO Auto-generated method stub<NEW_LINE>boolean error = true;<NEW_LINE>Connection conn = null;<NEW_LINE>// String cacheKey = getCacheKey(lookupKey);<NEW_LINE>// cache.put... | debug(tc, " resource: " + resource); |
18,345 | private static String genericsBounds(final ClassNode theType, final Set<String> visited) {<NEW_LINE>StringBuilder ret = new StringBuilder();<NEW_LINE>if (theType.getOuterClass() == null) {<NEW_LINE>ret.append(nameOf(theType));<NEW_LINE>} else {<NEW_LINE>String parentClassNodeName = theType<MASK><NEW_LINE>if (Modifier.i... | .getOuterClass().getName(); |
335,867 | public static Document createXmlDocument(InputStream in, boolean validate, EntityResolver er) throws Schema2BeansRuntimeException {<NEW_LINE>if (in == null)<NEW_LINE>// NOI18N<NEW_LINE>throw new IllegalArgumentException("in == null");<NEW_LINE>try {<NEW_LINE>if (DDLogFlags.debug) {<NEW_LINE>// Dump the contents to stdo... | GraphManager.factoryMap.get(in); |
1,306,280 | private void createArchive(final I_C_Print_Package printPackage, final byte[] data, final I_C_Async_Batch asyncBatch, final int current) {<NEW_LINE>final TableRecordReference printPackageRef = TableRecordReference.of(printPackage);<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(asyncBatch);<NEW_LINE>fina... | SimpleDateFormat dt = new SimpleDateFormat("dd-MM-yyyy"); |
727,572 | private void processFeatureRange(FeatureRange range, PredicateOptions options) {<NEW_LINE>range.clearPartitions();<NEW_LINE>int arity = options.getArity();<NEW_LINE>RangePruner rangePruner = new RangePruner(range, options, arity);<NEW_LINE>long from = rangePruner.getFrom();<NEW_LINE>long to = rangePruner.getTo();<NEW_L... | 0, to, arity, false); |
1,254,108 | private void handleRemovedResources(ClassLoadingConfig classLoadingConfig, CurateOutcomeBuildItem curateOutcomeBuildItem, Map<Path, Set<TransformedClassesBuildItem.TransformedClass>> transformedClassesByJar, List<RemovedResourceBuildItem> removedResourceBuildItems) {<NEW_LINE>// a little bit of a hack, but we use an em... | add(applicationModel.getAppArtifact()); |
127,779 | private void changeTemperatureUnits(boolean isImperial, @NonNull Style loadedMapStyle) {<NEW_LINE>if (mapboxMap != null && this.isImperial != isImperial) {<NEW_LINE>this.isImperial = isImperial;<NEW_LINE>// Apply new units to the data displayed in text fields of SymbolLayers<NEW_LINE>SymbolLayer maxTempLayer = (SymbolL... | SymbolLayer) loadedMapStyle.getLayer(MIN_TEMP_LAYER_ID); |
547,972 | public DoubleMatrix apply(DoubleArray x) {<NEW_LINE>SabrParametersIborCapletFloorletVolatilities volsNew = updateParameters(sabrDefinition, volatilities, x);<NEW_LINE>double[][] jacobian <MASK><NEW_LINE>for (int i = 0; i < nCaps; ++i) {<NEW_LINE>PointSensitivities point = sabrPricer.presentValueSensitivityModelParamsSa... | = new double[nCaps][]; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.