idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
229,089 | public static void main(String[] args) throws Exception {<NEW_LINE>File crawlStorageBase = new File("src/test/resources/crawler4j");<NEW_LINE>CrawlConfig htmlConfig = new CrawlConfig();<NEW_LINE>CrawlConfig imageConfig = new CrawlConfig();<NEW_LINE>htmlConfig.setCrawlStorageFolder(new File(crawlStorageBase, "html").get... | CrawlController(htmlConfig, pageFetcherHtml, robotstxtServer); |
1,774,108 | protected CommandHandler createCommandHandler() {<NEW_LINE>CommandHandler commandHandler = new CommandHandler();<NEW_LINE>commandHandler.attach(PropertiesLoader.getProperty(COMMAND_EXIT), new ExitCommand(this));<NEW_LINE>commandHandler.attach(PropertiesLoader.getProperty(COMMAND_HELP), new HelpCommand(this));<NEW_LINE>... | (this, evaluator::availableImports)); |
1,809,716 | public GameButton recoverData(Context context, CallCustomizeKeyboard call, Controller controller, CkbManager manager) {<NEW_LINE>GameButton gb = new GameButton(context, call, controller, manager);<NEW_LINE>gb.setKeyMaps(this.keyMaps);<NEW_LINE>gb.setKeyTypes(this.keyTypes);<NEW_LINE>gb.setDesignIndex(this.designIndex);... | this.themeColors[a])); |
475,956 | private static PresoObjAllocCCTNode[] computeChildren(PresoObjAllocCCTNode[] children1, PresoObjAllocCCTNode[] children2, PresoObjLivenessCCTNode parent) {<NEW_LINE>Map<Handle, PresoObjAllocCCTNode> nodes1 = new HashMap();<NEW_LINE>for (PresoObjAllocCCTNode node : children1) {<NEW_LINE>Handle name = new Handle(node);<N... | Handle name = new Handle(node); |
1,761,729 | private void threadMain(RubyThread thread, Node currentNode, Supplier<Object> task) {<NEW_LINE>try {<NEW_LINE>final <MASK><NEW_LINE>setThreadValue(thread, result);<NEW_LINE>// Handlers in the same order as in FiberManager<NEW_LINE>// Each catch must either setThreadValue() (before rethrowing) or setException()<NEW_LINE... | Object result = task.get(); |
740,524 | public static String formatTimeStamp(long time) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE><MASK><NEW_LINE>calendar.setTimeInMillis(time);<NEW_LINE>sb.append('[');<NEW_LINE>sb.append(formatIntToTwoDigits(calendar.get(Calendar.DAY_OF_MONTH)));<NEW_LINE>sb.append('.');<NEW_LINE>// 0 based<NEW_LINE>sb.app... | Calendar calendar = Calendar.getInstance(); |
1,790,790 | public void updateViewsData() {<NEW_LINE>binding.titleTextView.setText(currentCard.getTitle());<NEW_LINE>if (currentCard.getPublishTimestamp() != null) {<NEW_LINE>binding.publishDateTextView.setText(currentCard.getPublishDatePretty());<NEW_LINE>} else {<NEW_LINE>binding.publishDateTextView.setVisibility(View.GONE);<NEW... | separatorTextView.setVisibility(View.GONE); |
355,576 | private static void detectCycles(Map<ModuleIdentifier, Replacement> replacements, ModuleIdentifier source, ModuleIdentifier target) {<NEW_LINE>if (source.equals(target)) {<NEW_LINE>throw new InvalidUserDataException(String.format<MASK><NEW_LINE>}<NEW_LINE>ModuleIdentifier m = unwrap(replacements.get(target));<NEW_LINE>... | ("Cannot declare module replacement that replaces self: %s->%s", source, target)); |
766,523 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>final Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), R.style.AppTheme);<NEW_LINE>LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);<NE... | = new Validator(binding.form); |
1,364,060 | public static void main(String[] args) {<NEW_LINE>Set<String> words = new HashSet<>();<NEW_LINE>words.add("sb");<NEW_LINE>words.add("xx");<NEW_LINE>SensitiveFilter sensitiveFilter = new SensitiveFilter(words);<NEW_LINE>String text1 = "u sb a";<NEW_LINE>Set<String> ss = sensitiveFilter.getSensitiveWords(text1, MatchType... | println(ss.size()); |
1,007,185 | public static void createFederatedRoleMappings(UserFederatedStorageProvider federatedStorage, UserRepresentation userRep, RealmModel realm) {<NEW_LINE>if (userRep.getRealmRoles() != null) {<NEW_LINE>for (String roleString : userRep.getRealmRoles()) {<NEW_LINE>RoleModel role = realm.getRole(roleString.trim());<NEW_LINE>... | userRep, entry.getValue()); |
1,412,674 | public void readFromNBT(NBTTagCompound nbt) {<NEW_LINE>// TODO: remove in next version<NEW_LINE>NBTTagCompound <MASK><NEW_LINE>if (tanksTag.hasKey("out_gas")) {<NEW_LINE>tanksTag.setTag("gasOut", tanksTag.getTag("out_gas"));<NEW_LINE>}<NEW_LINE>if (tanksTag.hasKey("out_liquid")) {<NEW_LINE>tanksTag.setTag("liquidOut", ... | tanksTag = nbt.getCompoundTag("tanks"); |
1,333,637 | private void generateIsSupertypeFunctions(TagRegistry tagRegistry, WasmModule module, WasmClassGenerator classGenerator) {<NEW_LINE>for (ValueType type : classGenerator.getRegisteredClasses()) {<NEW_LINE>WasmFunction function = new WasmFunction(classGenerator.names.forSupertypeFunction(type));<NEW_LINE>function.getPara... | itemType, function.getBody()); |
1,389,291 | public Builder mergeFrom(TransactionEnd other) {<NEW_LINE>if (other == TransactionEnd.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasExecuteTime()) {<NEW_LINE>setExecuteTime(other.getExecuteTime());<NEW_LINE>}<NEW_LINE>if (other.hasTransactionId()) {<NEW_LINE>bitField0_ |= 0x00000002;<NEW_LINE>transa... | props_.addAll(other.props_); |
1,773,204 | private void approveComment() {<NEW_LINE>if (mNote == null) {<NEW_LINE>requestFailed(ARG_ACTION_APPROVE);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SiteModel site = mSiteStore.getSiteBySiteId(mNote.getSiteId());<NEW_LINE>// Bump analytics<NEW_LINE>// TODO klymyam remove legacy comment tracking after new comments are shipped... | keepRemoteCommentIdForPostProcessing(comment.getRemoteCommentId()); |
371,117 | private static Bundle convertArrayArguments(Map<String, ?> arrayArguments) {<NEW_LINE>Bundle bundle = new Bundle();<NEW_LINE>if (arrayArguments == null) {<NEW_LINE>return bundle;<NEW_LINE>}<NEW_LINE>for (String key : arrayArguments.keySet()) {<NEW_LINE>Object value = arrayArguments.get(key);<NEW_LINE>if (isTypedArrayLi... | = (ArrayList<Boolean>) value; |
1,840,345 | protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>Pack p = null;<NEW_LINE>try {<NEW_LINE>p = tcp.<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>} finally {<NEW_LINE>TcpProxy.putTcpProxy... | getSingle(RequestCmd.LOAD_UA_SUMMARY, param); |
1,705,111 | public void handleCommit(ApplyCommitRequest applyCommit) {<NEW_LINE>if (applyCommit.getTerm() != getCurrentTerm()) {<NEW_LINE>logger.debug("handleCommit: ignored commit request due to term mismatch " + "(expected: [term {} version {}], actual: [term {} version {}])", getLastAcceptedTerm(), getLastAcceptedVersion(), app... | ).equals(getLastAcceptedConfiguration()); |
1,426,681 | public ItemAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {<NEW_LINE>String signatureString = type_to_signature.get(new Integer(viewType));<NEW_LINE>ItemAdapter.ViewHolder viewHolder;<NEW_LINE>if (signatureString.startsWith("[")) {<NEW_LINE>// Horizontal Section => Build a ViewHolder with a horiz... | factory.build(null, json); |
209,245 | public void visitConstant(ConstantNode irConstantNode, ScriptScope scope) {<NEW_LINE>super.visitConstant(irConstantNode, scope);<NEW_LINE>Object constant = irConstantNode.getDecorationValue(IRDConstant.class);<NEW_LINE>if (constant instanceof String || constant instanceof Double || constant instanceof Float || constant... | .getDecoration(IRDConstant.class)); |
1,622,557 | public void visitField(final FieldNode fieldNode) {<NEW_LINE>onLineNumber(fieldNode, "visitField: " + fieldNode.getName());<NEW_LINE>ClassNode t = fieldNode.getType();<NEW_LINE>String <MASK><NEW_LINE>Expression initialValueExpression = fieldNode.getInitialValueExpression();<NEW_LINE>ConstantExpression cexp = initialVal... | signature = BytecodeHelper.getGenericsBounds(t); |
1,276,892 | private Answer executeProxyLoadScan(final Command cmd, final long proxyVmId, final String proxyVmName, final String proxyManagementIp, final int cmdPort) {<NEW_LINE>String result = null;<NEW_LINE>final StringBuffer sb = new StringBuffer();<NEW_LINE>sb.append("http://").append(proxyManagementIp).append(":" + cmdPort).ap... | InputStream is = conn.getInputStream(); |
995,419 | public BLangNode transform(FunctionTypeDescriptorNode functionTypeDescriptorNode) {<NEW_LINE>BLangFunctionTypeNode functionTypeNode = (BLangFunctionTypeNode) TreeBuilder.createFunctionTypeNode();<NEW_LINE>functionTypeNode.pos = getPosition(functionTypeDescriptorNode);<NEW_LINE>functionTypeNode.returnsKeywordExists = tr... | .functionSignature().get(); |
1,369,392 | public AdminCreateUserConfigType unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AdminCreateUserConfigType adminCreateUserConfigType = new AdminCreateUserConfigType();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | class).unmarshall(context)); |
1,711,070 | public CompletableFuture<CreateStreamResponse> create(final StreamConfiguration configuration, long createTimestamp, int startingSegmentNumber, OperationContext context) {<NEW_LINE>Preconditions.checkNotNull(context, "operation context cannot be null");<NEW_LINE>return checkStreamExists(configuration, createTimestamp, ... | (Void v) -> createStreamResponse)); |
45,662 | protected void replace() throws TextureException {<NEW_LINE>checkBitmapConfiguration();<NEW_LINE>if (mTextureId > 0) {<NEW_LINE>GLES20.glBindTexture(GLES20.GL_TEXTURE_CUBE_MAP, mTextureId);<NEW_LINE>if (mHasCompressedTextures) {<NEW_LINE>for (int i = 0; i < 6; i++) {<NEW_LINE>ACompressedTexture tex = mCompressedTexture... | , h = tex.getHeight(); |
331,879 | public void writeCsv(CsvOutput.CsvRowOutputWithHeaders csv, CdsIndexTrade trade) {<NEW_LINE>CdsIndex product = trade.getProduct();<NEW_LINE>csv.writeCell(TRADE_TYPE_FIELD, "CdsIndex");<NEW_LINE>csv.writeCell(CDS_INDEX_ID_SCHEME_FIELD, product.getCdsIndexId().getScheme());<NEW_LINE>csv.writeCell(CDS_INDEX_ID_FIELD, prod... | ), product.getPaymentSchedule()); |
1,842,700 | protected void addPropertyMethod(final MethodNode method) {<NEW_LINE>classNode.addMethod(method);<NEW_LINE>markAsGenerated(classNode, method);<NEW_LINE>// GROOVY-4415 / GROOVY-4645: check that there's no abstract method which corresponds to this one<NEW_LINE><MASK><NEW_LINE>Parameter[] parameters = method.getParameters... | String methodName = method.getName(); |
147,891 | private List<CustomTypeMapping> validateCustomTypeMappings(Map<String, String> customTypeMappings, boolean matchSubclasses) {<NEW_LINE>final List<CustomTypeMapping> mappings = new ArrayList<>();<NEW_LINE>for (Map.Entry<String, String> entry : customTypeMappings.entrySet()) {<NEW_LINE>final String javaName = entry.getKe... | (Collectors.joining(", ")); |
693,635 | private MessageExtBrokerInner toMessageExtBrokerInner(MessageExt msgExt) {<NEW_LINE>TopicConfig topicConfig = this.getBrokerController().getTopicConfigManager().createTopicOfTranCheckMaxTime(TCMT_QUEUE_NUMS, <MASK><NEW_LINE>int queueId = ThreadLocalRandom.current().nextInt(99999999) % TCMT_QUEUE_NUMS;<NEW_LINE>MessageE... | PermName.PERM_READ | PermName.PERM_WRITE); |
563,852 | protected void renderBg(PoseStack matrices, float partialTicks, int mouseX, int mouseY) {<NEW_LINE>RenderUtils.setup(BACKGROUND_IMAGE);<NEW_LINE>this.border.draw(matrices);<NEW_LINE>BACKGROUND.drawScaled(matrices, this.leftPos + 4, this.topPos + 4, this.imageWidth - 8, this.imageHeight - 8);<NEW_LINE><MASK><NEW_LINE>fl... | float y = 5 + this.topPos; |
597,972 | protected <RESULT extends FileConfig> RESULT createEntity(Map<String, Object> source, Class<? extends RESULT> entityType) {<NEW_LINE>try {<NEW_LINE>final RESULT result = entityType.newInstance();<NEW_LINE>result.setAvailable(DfTypeUtil.toBoolean(source.get("available")));<NEW_LINE>result.setBoost(DfTypeUtil.toFloat(sou... | source.get("name"))); |
73,466 | public FieldStatsResult fieldStats(String query, String filter, TimeRange range, Set<String> indices, String field, boolean includeCardinality, boolean includeStats, boolean includeCount) {<NEW_LINE>final SearchesConfig config = SearchesConfig.builder().query(query).filter(filter).range(range).offset(0).limit(-1).build... | AGG_EXTENDED_STATS).field(field)); |
643,717 | public static DescribeSlowLogRecordsResponse unmarshall(DescribeSlowLogRecordsResponse describeSlowLogRecordsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSlowLogRecordsResponse.setRequestId(_ctx.stringValue("DescribeSlowLogRecordsResponse.RequestId"));<NEW_LINE>SlowLogRecords slowLogRecords = new SlowLogRecor... | (_ctx.stringValue("DescribeSlowLogRecordsResponse.SlowLogRecords.RowsBeforeLimitAtLeast")); |
118,220 | private FetchedData doHandle(ContentHandlerArgs args, MessageQueue mq) {<NEW_LINE>String inputUrlString = CajaArguments.URL.get(args);<NEW_LINE>URI inputUri;<NEW_LINE>if (inputUrlString == null) {<NEW_LINE>mq.addMessage(ServiceMessageType.MISSING_ARGUMENT, MessagePart.Factory.valueOf(CajaArguments.URL.toString()));<NEW... | b, new InputSource(inputUri)); |
298,993 | private void putLang(ChannelHandlerContext ctx, FullHttpRequest req) {<NEW_LINE>JSONStringer jso = new JSONStringer();<NEW_LINE>LangFileUpdater.updateCustomLang(req.content().toString(Charset.forName("UTF-8")), req.headers().get("lang-path"), jso);<NEW_LINE>JSONObject j;<NEW_LINE>try {<NEW_LINE>j = new JSONObject(jso.t... | ("UTF-8")), "plain")); |
1,166,054 | public boolean onLayoutChild(CoordinatorLayout parent, V child, int layoutDirection) {<NEW_LINE>if (ViewCompat.getFitsSystemWindows(parent) && !ViewCompat.getFitsSystemWindows(child)) {<NEW_LINE>child.setFitsSystemWindows(true);<NEW_LINE>}<NEW_LINE>int savedTop = child.getTop();<NEW_LINE>// First let the parent lay it ... | ViewCompat.offsetTopAndBottom(child, mMaxOffset); |
1,669,185 | private static boolean isServiceInterestingToUser() {<NEW_LINE>try {<NEW_LINE>Class activityThreadClass = Class.forName("android.app.ActivityThread");<NEW_LINE>Object activityThread = activityThreadClass.getMethod("currentActivityThread").invoke(null);<NEW_LINE>Field servicesField = activityThreadClass.getDeclaredField... | >) servicesField.get(activityThread); |
1,172,597 | public RefactoringStatus[] checkAndResolveMethodTypes() throws CoreException {<NEW_LINE>RefactoringStatus[] results = new MethodTypesSyntaxChecker(fMethod, fParameterInfos, fReturnTypeInfo).checkSyntax();<NEW_LINE>for (RefactoringStatus result : results) {<NEW_LINE>if (result != null && result.hasFatalError()) {<NEW_LI... | resolveBindings(types, semanticsResults2, false); |
880,927 | protected ActionCallback _execute(PlaybackContext context) {<NEW_LINE>String[] args = getText().substring(PREFIX.length()).trim().split(" ");<NEW_LINE>String syntaxText = "Syntax error, expected: " + PREFIX + " " + ON + "|" + OFF + " actionName";<NEW_LINE>if (args.length != 2) {<NEW_LINE>context.error(syntaxText, getLi... | inputEvent = ActionCommand.getInputEvent(actionId); |
1,048,587 | public void run() {<NEW_LINE>Context context = mCore.getContext();<NEW_LINE>String mainProc = context.getPackageName();<NEW_LINE>if (mainProc.contains(":")) {<NEW_LINE>mainProc = mainProc.substring(0, mainProc.indexOf(":"));<NEW_LINE>}<NEW_LINE>ActivityManager am = (ActivityManager) <MASK><NEW_LINE>if (am == null) {<NE... | context.getSystemService(Context.ACTIVITY_SERVICE); |
1,535,291 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String epl = "@public create table MyTable(sortcol sorted(intPrimitive) @type('SupportBean'));\n" + "into table MyTable select sorted(*) as sortcol from SupportBean;\n";<NEW_LINE>env.compileDeploy(epl, path);<NEW_... | sendEventBean(new SupportBean_S0(i)); |
938,115 | public static void main(String[] args) throws UnsupportedAudioFileException, IOException, MaryConfigurationException {<NEW_LINE>if (args.length < 3) {<NEW_LINE>System.out.println("Missing parameters:");<NEW_LINE>System.out.println("<input wav file or directory> <output wav file or directory> <full path of phone set fil... | String outputFile = outputFolder + baseFileName + ".wav"; |
764,798 | public void beginCopy2() {<NEW_LINE>ShareFileAsyncClient shareFileAsyncClient = createAsyncClientWithSASToken();<NEW_LINE>// BEGIN: com.azure.storage.file.share.ShareFileAsyncClient.beginCopy#string-filesmbproperties-string-permissioncopymodetype-boolean-boolean-map-duration-ShareRequestConditions<NEW_LINE>FileSmbPrope... | .out.println("Complete copying the file.")); |
1,519,501 | public Stream<CentralityScore> stream(@Name(value = "label", defaultValue = "") String label, @Name(value = "relationship", defaultValue = "") String relationship, @Name(value = "config", defaultValue = "{}") Map<String, Object> config) {<NEW_LINE>ProcedureConfiguration configuration = ProcedureConfiguration.create(con... | getGraphImpl(), statsBuilder, configuration); |
742,714 | private void computeProjection() {<NEW_LINE>projection = new Projection.Short(0, <MASK><NEW_LINE>final ArrayList<Integer> derivatives = new ArrayList<>();<NEW_LINE>final LineInfo firstLine = staff.getFirstLine();<NEW_LINE>final LineInfo lastLine = staff.getLastLine();<NEW_LINE>final int dx = params.staffAbscissaMargin;... | sheet.getWidth() - 1); |
31,821 | public String formatWhiteCard(final JSONArray textParts) {<NEW_LINE>// The white cards should only ever have one element in text, but let's be safe.<NEW_LINE>final List<String> strs = new ArrayList<String>(textParts.size());<NEW_LINE>for (final Object o : textParts) {<NEW_LINE>final String cardCastString = (String) o;<... | .join(strs, "")); |
961,580 | private void createRowKeyForMappedProperties(ResultMap resultMap, ResultSetWrapper rsw, CacheKey cacheKey, List<ResultMapping> resultMappings, String columnPrefix) throws SQLException {<NEW_LINE>for (ResultMapping resultMapping : resultMappings) {<NEW_LINE>if (resultMapping.isSimple()) {<NEW_LINE>final String column = ... | > th = resultMapping.getTypeHandler(); |
325,549 | private AssociationHandler<Neo4jPersistentProperty> populateFrom(MapAccessor queryResult, NodeDescription<?> baseDescription, PersistentPropertyAccessor<?> propertyAccessor, Predicate<Neo4jPersistentProperty> isConstructorParameter, boolean objectAlreadyMapped, Collection<Relationship> relationshipsFromResult, Collecti... | >) propertyValue).isEmpty(); |
1,408,810 | private void imageCell(Image image) throws SAXException {<NEW_LINE>this.emitter.startElementWithClass("td", "img");<NEW_LINE>String src = image.getSrc();<NEW_LINE>if (src == null) {<NEW_LINE>this.emitter.startElement("i");<NEW_LINE>this.emitter.characters(NOT_RESOLVABLE);<NEW_LINE>this.emitter.endElement("i");<NEW_LINE... | ((double) width))); |
1,514,860 | public String dot() {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append("digraph CART {\n node [shape=box, style=\"filled, rounded\", color=\"black\", fontname=helvetica];\n edge [fontname=helvetica];\n");<NEW_LINE>String trueLabel = " [labeldistance=2.5, labelangle=45, headlabel=\"True\"];\... | (tid).append(trueLabel); |
806,113 | public void addPath(String path) {<NEW_LINE>// Null path references the root directory.<NEW_LINE>if (path == null) {<NEW_LINE>path = "";<NEW_LINE>}<NEW_LINE>// Remove path separator(s) from the front of the path. It must be relative down below.<NEW_LINE>int startIndex = 0;<NEW_LINE>while ((startIndex < path.length()) &... | path.substring(nameIndex, separatorIndex); |
317,892 | public static DescribeDataCountsResponse unmarshall(DescribeDataCountsResponse describeDataCountsResponse, UnmarshallerContext context) {<NEW_LINE>describeDataCountsResponse.setRequestId(context.stringValue("DescribeDataCountsResponse.RequestId"));<NEW_LINE>List<DataCount> dataCountList = new ArrayList<DataCount>();<NE... | ("DescribeDataCountsResponse.DataCountList[" + i + "].Table.SensitiveCount")); |
1,596,407 | protected Query createQuery(EntityManager em, LoadContext<?> context, boolean singleResult, boolean countQuery) {<NEW_LINE>LoadContext.Query contextQuery = context.getQuery();<NEW_LINE>JpqlQueryBuilder queryBuilder = AppBeans.get(JpqlQueryBuilder.NAME);<NEW_LINE>queryBuilder.setId(context.getId()).setIds(context.getIds... | query = queryBuilder.getQuery(em); |
773,065 | public void onActivityCreated(Bundle savedInstanceState) {<NEW_LINE>super.onActivityCreated(savedInstanceState);<NEW_LINE>loadButton = getView().findViewById(R.id.adsizes_btn_loadad);<NEW_LINE>cb120x20 = getView().findViewById(R.id.adsizes_cb_120x20);<NEW_LINE>cb320x50 = getView().findViewById(R.id.adsizes_cb_320x50);<... | adView.setVisibility(View.VISIBLE); |
973,210 | private void loadCustomizedActions(GradleExecConfiguration c) {<NEW_LINE>String id;<NEW_LINE>if (c != null) {<NEW_LINE>id = c.getId();<NEW_LINE>} else {<NEW_LINE>id = GradleExecConfiguration.DEFAULT;<NEW_LINE>}<NEW_LINE>ActionsHolder h = configHolders.get(id);<NEW_LINE>if (h != null) {<NEW_LINE>customActions = h.custom... | ActionsHolder nh = new ActionsHolder(c); |
972,218 | final ListDevicesResult executeListDevices(ListDevicesRequest listDevicesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDevicesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListDevicesRequest> reques... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,535,417 | public static void main(String[] argv) {<NEW_LINE>LOG.info("Starting Parameter Server");<NEW_LINE>int serverIndex = Integer.valueOf(System.getenv(AngelEnvironment.PARAMETERSERVER_ID.name()));<NEW_LINE>String appMasterHost = System.getenv(AngelEnvironment.LISTEN_ADDR.name());<NEW_LINE>int appMasterPort = Integer.valueOf... | LOG.fatal("Start PS failed ", x); |
484,427 | private static void apply(CompIntLongVector v1, CompIntLongVector v2, Binary op, CompIntLongVector result, int start, int end) {<NEW_LINE>if (v1.isCompatable(v2)) {<NEW_LINE>IntLongVector[] v1Parts = v1.getPartitions();<NEW_LINE>IntLongVector[] v2Parts = v2.getPartitions();<NEW_LINE>if (op.isInplace()) {<NEW_LINE>for (... | , v2Parts[i], op); |
101,564 | public void marshall(Vp9Settings vp9Settings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (vp9Settings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(vp9Settings.getBitrate(), BITRATE_BINDING);<NEW_LIN... | vp9Settings.getFramerateConversionAlgorithm(), FRAMERATECONVERSIONALGORITHM_BINDING); |
1,742,270 | public void artifactsUpdated(Iterable<File> artifacts) {<NEW_LINE><MASK><NEW_LINE>if (realProvider == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>J2eeModuleProvider.DeployOnSaveClassInterceptor interceptor = realProvider.getDeployOnSaveClassInterceptor();<NEW_LINE>Set<Artifact> realArtifacts = new HashSet<Artifact>();... | J2eeModuleProvider realProvider = provider.get(); |
291,007 | protected Object[] createItemArray(XYDataset dataset, int series, int item) {<NEW_LINE>Object[] result = new Object[8];<NEW_LINE>result[0] = dataset.getSeriesKey(series).toString();<NEW_LINE>Number x = dataset.getX(series, item);<NEW_LINE>if (getXDateFormat() != null) {<NEW_LINE>result[1] = getXDateFormat().format(new ... | (x.longValue())); |
1,538,522 | private void onMouseUp(Event e) {<NEW_LINE>double y = e.y - size.tree.y + commonVBar.getSelection();<NEW_LINE>if (y >= size.headerHeight) {<NEW_LINE>int rowIdx = size.<MASK><NEW_LINE>if (rowIdx < tree.getNumRows()) {<NEW_LINE>if (e.count == 2) {<NEW_LINE>if (tree.toggle(rowIdx, this::initRows)) {<NEW_LINE>updateSize(fa... | getRow(y - size.headerHeight); |
502,316 | private void doPrintEntries(PrintStream out) throws Exception {<NEW_LINE>// Adjust displayed keystore type if needed.<NEW_LINE>String keystoreTypeToPrint = keyStore.getType();<NEW_LINE>if ("JKS".equalsIgnoreCase(keystoreTypeToPrint)) {<NEW_LINE>if (ksfile != null && ksfile.exists()) {<NEW_LINE>String realType = keyStor... | .getString("Keystore.type.") + keystoreTypeToPrint); |
415,086 | public void paint(Graphics g, int x, int y) {<NEW_LINE>if (selected) {<NEW_LINE>g.setColor(highlightColor);<NEW_LINE>} else {<NEW_LINE>g.setColor(bgColor);<NEW_LINE>}<NEW_LINE>g.fillRect(x, y, width - 1, height);<NEW_LINE>if (valueString != null) {<NEW_LINE>switch(type) {<NEW_LINE>case Cell.VALUE:<NEW_LINE>case Cell.LA... | (height / 2) + 5); |
386,013 | protected void drawFilter() {<NEW_LINE>GLES20.glUseProgram(program);<NEW_LINE>squareVertex.position(SQUARE_VERTEX_DATA_POS_OFFSET);<NEW_LINE>GLES20.glVertexAttribPointer(aPositionHandle, 3, GLES20.GL_FLOAT, false, SQUARE_VERTEX_DATA_STRIDE_BYTES, squareVertex);<NEW_LINE>GLES20.glEnableVertexAttribArray(aPositionHandle)... | GLES20.glActiveTexture(GLES20.GL_TEXTURE4); |
313,512 | public SecretsManagerSecretResourceData unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SecretsManagerSecretResourceData secretsManagerSecretResourceData = new SecretsManagerSecretResourceData();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = conte... | class).unmarshall(context)); |
1,652,357 | private NameEnvironmentAnswer findClassInternal(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName, boolean asBinaryOnly) {<NEW_LINE>// most common case TODO(SHMOD): use module name from this.module?<NEW_LINE>if (!isPackage(qualifiedPackageName, null))<NEW_LINE>return null;<NEW_LINE>String fil... | doesFileExist(fileName + SUFFIX_STRING_class, qualifiedPackageName); |
376,408 | public static BuildOptions createBuildOptions(PackageConfig packageConfig, BuildOptions theirOptions, Path projectDirPath) {<NEW_LINE>// Todo figure out how to pass the build options without a performance hit<NEW_LINE>TomlDocument ballerinaToml = TomlDocument.from(ProjectConstants.BALLERINA_TOML, packageConfig.ballerin... | )).orElse("")); |
567,634 | private static NodeState computeEffectiveNodeState(final NodeInfo nodeInfo, final Params params, Map<Node, NodeStateReason> nodeStateReasons) {<NEW_LINE>final NodeState reported = nodeInfo.getReportedState();<NEW_LINE>final NodeState wanted = nodeInfo.getWantedState();<NEW_LINE>final NodeState baseline = reported.clone... | baseline.setState(State.DOWN); |
1,331,070 | private List<AvailableContribution> parseContribList(File file) {<NEW_LINE>List<AvailableContribution> outgoing = new ArrayList<>();<NEW_LINE>if (file != null && file.exists()) {<NEW_LINE>String[] lines = PApplet.loadStrings(file);<NEW_LINE>int start = 0;<NEW_LINE>while (start < lines.length) {<NEW_LINE>String type = l... | contribType = ContributionType.fromName(type); |
1,774,789 | private long installDownloadedSnapshot() {<NEW_LINE>if (!transitionState(DownloadState.DOWNLOADED, DownloadState.INSTALLING)) {<NEW_LINE>return RaftLog.INVALID_LOG_INDEX;<NEW_LINE>}<NEW_LINE>File tempFile = null;<NEW_LINE>try (Timer.Context ctx = MetricsSystem.timer(MetricKey.MASTER_EMBEDDED_JOURNAL_SNAPSHOT_INSTALL_TI... | LOG.error("Failed to install snapshot", e); |
1,562,291 | private void ajaxFetchScheduledFlowGraph(final String projectName, final String flowName, final HashMap<String, Object> ret, final User user) throws ServletException {<NEW_LINE>final Project project = getProjectAjaxByPermission(ret, projectName, user, Type.EXECUTE);<NEW_LINE>if (project == null) {<NEW_LINE>ret.put(<MAS... | "error", "Project '" + projectName + "' doesn't exist."); |
336,133 | String read(ByteSource byteSource, Charset cs) throws IOException {<NEW_LINE>Optional<Long> size = byteSource.sizeIfKnown();<NEW_LINE>// if we know the size and it fits in an int<NEW_LINE>if (size.isPresent() && size.get().longValue() == size.get().intValue()) {<NEW_LINE>// otherwise try to presize a StringBuilder<NEW_... | CharStreams.copy(reader, builder); |
739,567 | public void decrypt(byte[] buffer) throws GeneralSecurityException {<NEW_LINE>byte[] CV = new byte[16];<NEW_LINE>byte[] C = new byte[16];<NEW_LINE>byte[] TEMP = new byte[16];<NEW_LINE>int count = buffer.length;<NEW_LINE>CV = <MASK><NEW_LINE>for (int index = 0; count > 0; ) {<NEW_LINE>if (count > 15) {<NEW_LINE>count -=... | this.encipher.doFinal(CV); |
1,563,760 | public void run(SourceContext<Row> ctx) throws Exception {<NEW_LINE>final StringBuilder buffer = new StringBuilder();<NEW_LINE>long attempt = 0;<NEW_LINE>while (isRunning) {<NEW_LINE>try (Socket socket = new Socket()) {<NEW_LINE>currentSocket = socket;<NEW_LINE>LOG.info("Connecting to server socket " + tableInfo.getHos... | deserialize(record.getBytes()); |
1,671,639 | final GetVocabularyFilterResult executeGetVocabularyFilter(GetVocabularyFilterRequest getVocabularyFilterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getVocabularyFilterRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | (super.beforeMarshalling(getVocabularyFilterRequest)); |
1,566,289 | private void parseDialogueLine(String dialogueLine, SsaDialogueFormat format, List<List<Cue>> cues, List<Long> cueTimesUs) {<NEW_LINE>Assertions.checkArgument(dialogueLine.startsWith(DIALOGUE_LINE_PREFIX));<NEW_LINE>String[] lineValues = dialogueLine.substring(DIALOGUE_LINE_PREFIX.length()).split(",", format.length);<N... | (i).add(cue); |
1,426,371 | public void marshall(Member member, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (member == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(member.getAccountId(), ACCOUNTID_BINDING);<NEW_LINE>protocolMarsha... | member.getMasterAccountId(), MASTERACCOUNTID_BINDING); |
1,667,655 | private String toFilter(DeviceInfo keys) {<NEW_LINE>if (keys == null)<NEW_LINE>return "(objectclass=dicomDevice)";<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("(&(objectclass=dicomDevice)");<NEW_LINE>appendFilter("dicomDeviceName", keys.getDeviceName(), sb);<NEW_LINE>appendFilter("dicomDescripti... | keys.getSoftwareVersions(), sb); |
1,157,565 | public ListCreatedArtifactsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListCreatedArtifactsResult listCreatedArtifactsResult = new ListCreatedArtifactsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme... | )).unmarshall(context)); |
1,193,958 | public EppResponse run() throws EppException {<NEW_LINE>extensionManager.register(MetadataExtension.class);<NEW_LINE>validateRegistrarIsLoggedIn(registrarId);<NEW_LINE>extensionManager.validate();<NEW_LINE>DateTime now = tm().getTransactionTime();<NEW_LINE>ContactResource existingContact = loadAndVerifyExistence(Contac... | , Key.create(contactHistory)); |
8,989 | private void loadExternalData(File mediaFolder) {<NEW_LINE>// SCTO-594<NEW_LINE>File[] zipFiles = mediaFolder.listFiles(new FileFilter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean accept(File file) {<NEW_LINE>return file.getName().toLowerCase(Locale.US).endsWith(".zip");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if ... | && !lowerCaseName.equalsIgnoreCase(ITEMSETS_CSV); |
169,392 | private void addCrusherRedRockRecipes(Consumer<FinishedRecipe> consumer, String basePath) {<NEW_LINE>// Chiseled Red Rock -> Red Rock Bricks<NEW_LINE>crushing(consumer, BYGBlocks.CHISELED_RED_ROCK_BRICKS, BYGBlocks.RED_ROCK_BRICKS, basePath + "chiseled_to_brick");<NEW_LINE>crushing(consumer, BYGBlocks.CHISELED_RED_ROCK... | BYGBlocks.RED_ROCK_STAIRS, basePath + "brick_stairs_to_stairs"); |
720,452 | protected void addTransportLayers(Event event, TransportInternal transport) {<NEW_LINE>// default connection idle timeout is 0.<NEW_LINE>// Giving it an idle timeout will enable the client side to know broken connection faster.<NEW_LINE>// Refer to http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-o... | SslDomain sslDomain = Proton.sslDomain(); |
1,774,277 | // findSystemActionsByScheme.<NEW_LINE>@GET<NEW_LINE>@Path("/schemes/{schemeId}/system/actions")<NEW_LINE>@JSONP<NEW_LINE>@NoCache<NEW_LINE>@Produces({ MediaType.APPLICATION_JSON, "application/javascript" })<NEW_LINE>public final Response findSystemActionsByScheme(@Context final HttpServletRequest request, @Context fin... | ), initDataObject.getUser()); |
1,851,465 | private void processBlockRegistrations(NetData.NetMessage message) {<NEW_LINE>for (NetData.BlockFamilyRegisteredMessage blockFamily : message.getBlockFamilyRegisteredList()) {<NEW_LINE>if (blockFamily.getBlockIdCount() != blockFamily.getBlockUriCount()) {<NEW_LINE>logger.error("Received block registration with mismatch... | (0)).getFamilyUri(); |
337,164 | // Composition - publication on valuation date: Check if a fixing is available on current date<NEW_LINE>private double valuationCompositionFactor() {<NEW_LINE>LocalDate currentFixing = nextFixing;<NEW_LINE>LocalDate currentPublication = computation.calculatePublicationFromFixing(currentFixing);<NEW_LINE>if (rates.getVa... | maturityDate = computation.calculateMaturityFromEffective(effectiveDate); |
748,766 | private void addCommitDetails(RepositoryCommit commit) {<NEW_LINE>adapter.addHeader(commitHeader);<NEW_LINE>commitMessage.setText(commit.getCommit().getMessage());<NEW_LINE>String commitAuthor = CommitUtils.getAuthor(commit);<NEW_LINE>String commitCommitter = CommitUtils.getCommitter(commit);<NEW_LINE>if (commitAuthor ... | bindCommitter(commit, avatars, committerAvatar); |
72,986 | protected void visitCustomTagEnd(Element jspElement) throws JspCoreException {<NEW_LINE>ValidateResult.CollectedTagData collectedTagData = result.getCollectedTagData(jspElement);<NEW_LINE>String uri = jspElement.getNamespaceURI();<NEW_LINE>String prefix = jspElement.getPrefix();<NEW_LINE>String tagName = jspElement.get... | getTagLibMap().get(uri); |
1,660,789 | final DescribeMovingAddressesResult executeDescribeMovingAddresses(DescribeMovingAddressesRequest describeMovingAddressesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeMovingAddressesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | DescribeMovingAddressesResult>(new DescribeMovingAddressesResultStaxUnmarshaller()); |
131,583 | protected ProcessPreconditionsResolution checkPreconditionsApplicable() {<NEW_LINE>if (!getSelectedRowIds().isSingleDocumentId()) {<NEW_LINE>return ProcessPreconditionsResolution.rejectBecauseNotSingleSelection();<NEW_LINE>}<NEW_LINE>final PickingSlotRow pickingSlotRow = getSingleSelectedRow();<NEW_LINE>if (!pickingSlo... | (msgBL.getTranslatableMsgText(MSG_WEBUI_PICKING_MISSING_SOURCE_HU)); |
1,158,393 | private Position decodeLink(String sentence, Channel channel, SocketAddress remoteAddress) {<NEW_LINE>Parser parser = new Parser(PATTERN_LINK, sentence);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());<NEW... | position, dateBuilder.getDate()); |
1,412,399 | Object doTimeout(VirtualFrame frame, PSimpleQueue self, boolean block, Object timeout, @Cached PyLongAsLongAndOverflowNode asLongNode, @Cached CastToJavaDoubleNode castToDouble) {<NEW_LINE>assert block;<NEW_LINE>// convert timeout object (given in seconds) to a Java long in microseconds<NEW_LINE>long ltimeout;<NEW_LINE... | (frame, timeout), 1000000); |
176,162 | public Map<QueryType, List<ValueIndexCondition>> translateMatch(RexNode condition) {<NEW_LINE>condition = <MASK><NEW_LINE>Map<QueryType, List<ValueIndexCondition>> tryAndInRes = tryAndIn(condition);<NEW_LINE>if (tryAndInRes != null && !tryAndInRes.isEmpty())<NEW_LINE>return tryAndInRes;<NEW_LINE>// does not support dis... | conditionClippingByKeyMeta(condition, fieldNames, keyMetas); |
1,833,460 | public void commonProcessing(VirtualConnection vc, TCPWriteRequestContext twc, IOException ioe, boolean complete) {<NEW_LINE>// if calling the callbacks is moved to after this code, then the H2WriteQEntry needs to be copied to a variable that is local to avoid a race<NEW_LINE>// condition.<NEW_LINE>// need a local copy... | "hit write complete latch for qentry: " + qEntry.hashCode()); |
366,068 | public Mono<Boolean> isHigher(RestMember otherMember) {<NEW_LINE>if (guildId != otherMember.guildId) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>// A member is not considered to be higher in the role hierarchy than themself<NEW_LINE>if (this.equals(otherMember)) {<NEW_LINE>return Mono.just(false);<NEW_LINE>}<NEW_... | error(new IllegalArgumentException("The provided member is in a different guild.")); |
47,105 | protected void run() throws IOException {<NEW_LINE>if (!file.exists()) {<NEW_LINE>this.posix_errno = Posix.ENOENT;<NEW_LINE>this.result_ok = false;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Path path = file.toPath();<NEW_LINE>Files.setLastModifiedTime(path, file_mtime);<NEW_LINE>Map<String, Object> atts = Files.readAttribut... | path, "unix:mode,gid,uid", LinkOption.NOFOLLOW_LINKS); |
188,877 | public Request<DescribeConversionTasksRequest> marshall(DescribeConversionTasksRequest describeConversionTasksRequest) {<NEW_LINE>if (describeConversionTasksRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeConversionTasksRequest> r... | , StringUtils.fromString(describeConversionTasksRequestConversionTaskIdsListValue)); |
1,020,850 | public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException {<NEW_LINE>if (inOff + len > in.length) {<NEW_LINE>throw new DataLengthException("input buffer too small");<NEW_LINE>}<NEW_LINE>if (outOff + len > out.length) {<NEW_LINE>throw new OutputLengthException("output buff... | ] ^ counterOut[byteCount++]); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.