idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,386,413 | final UpdateRecipeJobResult executeUpdateRecipeJob(UpdateRecipeJobRequest updateRecipeJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateRecipeJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,778,981 | public void mergeTo(IntIntVector mergedRow) {<NEW_LINE>StorageMethod method = VectorStorageUtils.getStorageMethod(vector);<NEW_LINE>switch(method) {<NEW_LINE>case DENSE:<NEW_LINE>{<NEW_LINE>int[] values = getVector().getStorage().getValues();<NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>mergedRow.set(i +... | .getStorage().entryIterator(); |
1,110,308 | public static BatchGetEdgeInstanceChannelResponse unmarshall(BatchGetEdgeInstanceChannelResponse batchGetEdgeInstanceChannelResponse, UnmarshallerContext _ctx) {<NEW_LINE>batchGetEdgeInstanceChannelResponse.setRequestId(_ctx.stringValue("BatchGetEdgeInstanceChannelResponse.RequestId"));<NEW_LINE>batchGetEdgeInstanceCha... | ("BatchGetEdgeInstanceChannelResponse.Data[" + i + "].ChannelId")); |
40,166 | private static AddressFamilyCapabilities jsonCreator(@Nullable @JsonProperty(PROP_ADDITIONAL_PATHS_RECEIVE) Boolean additionalPathsReceive, @Nullable @JsonProperty(PROP_ADDITIONAL_PATHS_SELECT_ALL) Boolean additionalPathsSelectAll, @Nullable @JsonProperty(PROP_ADDITIONAL_PATHS_SEND) Boolean additionalPathsSend, @Nullab... | sendExtendedCommunity != null, "Missing %s", PROP_SEND_COMMUNITY); |
1,730,338 | public void SASTORE(Object conc_array, int conc_index, String className, String methodName) {<NEW_LINE>// get symbolic arguments<NEW_LINE>IntegerValue symb_value = env.topFrame().operandStack.popBv32();<NEW_LINE>IntegerValue symb_index = env.topFrame<MASK><NEW_LINE>ReferenceExpression array_ref = env.topFrame().operand... | ().operandStack.popBv32(); |
1,460,645 | private void updateUiMine() {<NEW_LINE>List<Entry> entries = new ArrayList<>();<NEW_LINE>List<WalletAccount<?>> activeAccounts = new ArrayList<>(mbwManager.getWalletManager(false).getAllActiveAccounts());<NEW_LINE>WalletAccount selectedAccount = mbwManager.getSelectedAccount();<NEW_LINE>for (WalletAccount account : Uti... | ).setVisibility(View.VISIBLE); |
1,032,916 | public MappeableArrayContainer andNot(MappeableBitmapContainer value2) {<NEW_LINE>final MappeableArrayContainer answer = new <MASK><NEW_LINE>int pos = 0;<NEW_LINE>char[] sarray = answer.content.array();<NEW_LINE>if (BufferUtil.isBackedBySimpleArray(this.content)) {<NEW_LINE>char[] c = content.array();<NEW_LINE>for (int... | MappeableArrayContainer(content.limit()); |
1,242,434 | public void dispatchDraw(Canvas c) {<NEW_LINE>View v = mMessageBlock;<NEW_LINE>if (v != null) {<NEW_LINE>float l = v.getX() + getPaddingLeft();<NEW_LINE>float t = v.getY();<NEW_LINE>float b = v.getY() + v.getHeight();<NEW_LINE>super.dispatchDraw(c);<NEW_LINE>Path path = mPath;<NEW_LINE>// if (mAvatar.getPosition() == D... | setStyle(Paint.Style.STROKE); |
1,623,419 | public void map(final LongWritable key, final Text value, final OutputCollector<Text, Text> output, final Reporter reporter) throws IOException {<NEW_LINE>String line_text = value.toString();<NEW_LINE>if (// ignore comments in edge file<NEW_LINE>line_text.startsWith("#"))<NEW_LINE>return;<NEW_LINE>final String[] line =... | + in_block_row + " " + in_block_col)); |
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... | = new RobotstxtServer(robotstxtConfig, pageFetcherHtml); |
1,409,396 | public FulfillmentGroup addItemToFulfillmentGroup(Order order, OrderItem item, FulfillmentGroup fulfillmentGroup, int quantity, boolean priceOrder) throws PricingException {<NEW_LINE>// 1) Find the item's existing fulfillment group, if any<NEW_LINE>for (FulfillmentGroup fg : order.getFulfillmentGroups()) {<NEW_LINE>Ite... | order = updateOrder(order, priceOrder); |
1,758,014 | public HttpResponse findPetsByTagsForHttpResponse(Set<String> tags, Map<String, Object> params) throws IOException {<NEW_LINE>// verify the required parameter 'tags' is set<NEW_LINE>if (tags == null) {<NEW_LINE>throw new IllegalArgumentException("Missing the required parameter 'tags' when calling findPetsByTags");<NEW_... | uriBuilder.queryParam(key, value); |
1,281,129 | final CreateUserResult executeCreateUser(CreateUserRequest createUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | CreateUserResult>(new CreateUserResultStaxUnmarshaller()); |
1,531,663 | protected void doAssemble(Map<String, Object> props) throws AssemblerProcessingException {<NEW_LINE>Jpackage.PlatformPackager packager = assembler.getResolvedPlatformPackager();<NEW_LINE>// verify jdk<NEW_LINE>Path jdkPath = packager.getJdk().getEffectivePath(context, assembler);<NEW_LINE>SemVer jdkVersion = SemVer.of(... | context, assembler, workDirectory, platform); |
989,149 | private boolean checkForFolderSetting(final ArrayList<ImmutableTriple<PersistableFolder, String, String>> currentFolderValues, final ArrayList<ImmutablePair<PersistableFolder, String>> unsetFolders, final String key, final String value) {<NEW_LINE>// check if persistable folder settings differ<NEW_LINE>for (int i = 0; ... | , current.right, value)); |
1,642,345 | int applyLabel(GrayF32 image, int seedX, int seedY, float seedValue) {<NEW_LINE>int label = totalRegions++;<NEW_LINE>open.reset();<NEW_LINE>open.grow().setTo(seedX, seedY, seedValue);<NEW_LINE>labels.unsafe_set(seedX, seedY, label);<NEW_LINE>int location = 0;<NEW_LINE>while (location < open.size()) {<NEW_LINE>Pixel p =... | y + 1, label, value); |
1,823,692 | protected void encodeMarkup(FacesContext context, TextEditor editor) throws IOException {<NEW_LINE><MASK><NEW_LINE>String clientId = editor.getClientId(context);<NEW_LINE>String valueToRender = sanitizeHtml(context, editor, ComponentUtils.getValueToRender(context, editor));<NEW_LINE>String inputId = clientId + "_input"... | ResponseWriter writer = context.getResponseWriter(); |
575,692 | public ListVocabulariesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListVocabulariesResult listVocabulariesResult = new ListVocabulariesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | )).unmarshall(context)); |
195,939 | public void run(RegressionEnvironment env) {<NEW_LINE>String startTime = "2002-05-30T09:00:00.000";<NEW_LINE>env.advanceTime(DateTime.parseDefaultMSec(startTime));<NEW_LINE>String sdfPattern = "yyyy.MM.dd G 'at' HH:mm:ss";<NEW_LINE>SimpleDateFormat sdf = new SimpleDateFormat(sdfPattern);<NEW_LINE>DateTimeFormatter dtf ... | fields = "val0,val1,val2,val3,val4,val5,val6".split(","); |
1,210,300 | protected Listener createEyeballPainter(final Image eyeball, final int IMAGE_MARGIN, final Tree tree) {<NEW_LINE>return new Listener() {<NEW_LINE><NEW_LINE>public void handleEvent(Event event) {<NEW_LINE>if (hoveredItem == null || hoveredItem.isDisposed())<NEW_LINE>return;<NEW_LINE>if (eyeball != null) {<NEW_LINE>int e... | eyeball.getBounds().width); |
991,108 | public static // modifies json_out<NEW_LINE>void toJson(Object object, JSONStringer json_out) throws Exception {<NEW_LINE>json_out.object();<NEW_LINE>// for each inherited class...<NEW_LINE>for (Class c = object.getClass(); c != Object.class; c = c.getSuperclass()) {<NEW_LINE>// for each member variable...<NEW_LINE>Fie... | key(f.getName()); |
1,731,995 | private static void testFileEncryptionWithStream(StreamingAead ags, File tmpFile, int plaintextSize) throws Exception {<NEW_LINE>byte[] <MASK><NEW_LINE>byte[] pt = generatePlaintext(plaintextSize);<NEW_LINE>FileOutputStream ctStream = new FileOutputStream(tmpFile);<NEW_LINE>WritableByteChannel channel = Channels.newCha... | aad = TestUtil.hexDecode("aabbccddeeff"); |
897,812 | private ReferenceContext makeSpanningReferenceContext(final List<VariantContext> variantContexts, final int referenceWindowPadding) {<NEW_LINE>Utils.nonEmpty(variantContexts, "Must have at least one current variant context");<NEW_LINE>final List<String> contigs = variantContexts.stream().map(VariantContext::getContig).... | .min().getAsInt(); |
1,814,710 | public void writeMetrics(MetricQueryResults metricQueryResults) throws Exception {<NEW_LINE>final long metricTimestamp = System.currentTimeMillis() / 1000L;<NEW_LINE>Socket socket = new Socket(InetAddress.getByName(address), port);<NEW_LINE>BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(socket.getOut... | > distributions = metricQueryResults.getDistributions(); |
1,736,463 | private void findTypeParamInUnion(Location loc, BType expType, BUnionType actualType, SymbolEnv env, HashSet<BType> resolvedTypes, FindTypeParamResult result) {<NEW_LINE>LinkedHashSet<BType> members = new LinkedHashSet<>();<NEW_LINE>for (BType type : actualType.getMemberTypes()) {<NEW_LINE>if (type.tag == TypeTags.ARRA... | tupleElementType, env, resolvedTypes, result); |
210,150 | public void validateJWTToken(String jwt_token, validationData expected, TestSettings settings) throws Exception {<NEW_LINE>// this routine is called when the validation type is RESPONSE_JWT_TOKEN<NEW_LINE>// it can be used to verify the content of the token, or individual segments<NEW_LINE>String thisMethod = "validate... | payloadInfo = JSONObject.parse(decodedPayload); |
60,978 | final GetTemplateResult executeGetTemplate(GetTemplateRequest getTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | (super.beforeMarshalling(getTemplateRequest)); |
35,317 | public IngestedEventsTimeWindow unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>IngestedEventsTimeWindow ingestedEventsTimeWindow = new IngestedEventsTimeWindow();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE... | class).unmarshall(context)); |
531,721 | private void drawShadowsBlurs(Canvas canvas) {<NEW_LINE>canvas.save();<NEW_LINE>try (Paint fill = new Paint().setColor(0xFF8E86C9);<NEW_LINE>Path path = new Path()) {<NEW_LINE>path.setFillMode(PathFillMode.EVEN_ODD);<NEW_LINE>path.lineTo(0, 60).lineTo(60, 60).lineTo(60, 0).closePath();<NEW_LINE>path.moveTo(10, 5).lineT... | canvas.translate(70, 0); |
103,249 | public void initialize(WizardDescriptor wizardDescriptor) {<NEW_LINE>wiz = wizardDescriptor;<NEW_LINE>Project project = Templates.getProject(wiz);<NEW_LINE>Sources <MASK><NEW_LINE>sourceGroups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);<NEW_LINE>ejbPanel = new EntityWizardDescriptor();<NEW_LINE>W... | sources = ProjectUtils.getSources(project); |
693,496 | private void filter(final boolean sendEvents, final SeverityLevel... levels) {<NEW_LINE>final Set<TogglableTreeNode> <MASK><NEW_LINE>for (int fileIndex = 0; fileIndex < visibleRootNode.getChildCount(); ++fileIndex) {<NEW_LINE>final TogglableTreeNode fileNode = (TogglableTreeNode) visibleRootNode.getChildAt(fileIndex);<... | changedNodes = new HashSet<>(); |
27,662 | final CreateProjectResult executeCreateProject(CreateProjectRequest createProjectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createProjectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<CreateProjectReq... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,522,683 | final ModifySecurityGroupRulesResult executeModifySecurityGroupRules(ModifySecurityGroupRulesRequest modifySecurityGroupRulesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifySecurityGroupRulesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,848,791 | private void verifyBundles(Properties props) {<NEW_LINE>String bundlePath = props.getProperty(AUTO_DEPLOY_DIR_PROPERTY);<NEW_LINE>String baseDirectory = getBaseDirectory();<NEW_LINE>String defaultFelixPath = baseDirectory + File.separator + "felix";<NEW_LINE>String defaultBundlePath = defaultFelixPath + File.separator ... | File defaultFelixDirectory = new File(defaultFelixPath); |
1,015,247 | private void registerAddMapLayerReceiver(@NonNull MapActivity mapActivity) {<NEW_LINE>final WeakReference<MapActivity> mapActivityRef = new WeakReference<>(mapActivity);<NEW_LINE>BroadcastReceiver addMapLayerReceiver = new BroadcastReceiver() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onReceive(Context context... | getLayers().get(layerId); |
335,216 | private void showReverseTransitionAnimation() {<NEW_LINE>mTransitionViewWhite.setLayerType(View.LAYER_TYPE_HARDWARE, null);<NEW_LINE>final SupportAnimator whiteReversed = transitionAnimationWhite.reverse();<NEW_LINE>whiteReversed<MASK><NEW_LINE>whiteReversed.addListener(new SupportAnimator.AnimatorListener() {<NEW_LINE... | .setInterpolator(new AccelerateDecelerateInterpolator()); |
561,186 | public void initView(int sketchWidth, int sketchHeight) {<NEW_LINE>if (component.getKind() == AppComponent.FRAGMENT) {<NEW_LINE>int displayWidth = component.getDisplayWidth();<NEW_LINE>int displayHeight = component.getDisplayHeight();<NEW_LINE>View rootView;<NEW_LINE>if (sketchWidth == displayWidth && sketchHeight == d... | lp.addRule(RelativeLayout.CENTER_IN_PARENT); |
824,690 | public void init() throws TaskInitException {<NEW_LINE>super.init();<NEW_LINE>String inputPath = config.getApkPath();<NEW_LINE>if (Util.isNullOrNil(inputPath)) {<NEW_LINE>throw new TaskInitException(TAG + "---APK-FILE-PATH can not be null!");<NEW_LINE>}<NEW_LINE>inputFile = new File(inputPath);<NEW_LINE>if (!FileUtil.i... | uncompressSizeMap = new HashMap<>(); |
1,572,883 | final SetTypeDefaultVersionResult executeSetTypeDefaultVersion(SetTypeDefaultVersionRequest setTypeDefaultVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setTypeDefaultVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,797,407 | public AttachSettings configure(AttachSettings settings, boolean partially) {<NEW_LINE>if (settings == null)<NEW_LINE>settings = new AttachSettings();<NEW_LINE>// Configure default settings<NEW_LINE>if (settings.getTargetType().isEmpty()) {<NEW_LINE>settings.setDirect(false);<NEW_LINE>settings.setDynamic16(true);<NEW_L... | setTargetType(Bundle.AttachDialog_JavaApplication()); |
990,055 | private boolean processInTypeRef(@Nullable GoTypeReferenceExpression e, @NotNull GoScopeProcessor processor, @NotNull ResolveState state) {<NEW_LINE>PsiElement resolve = e != null <MASK><NEW_LINE>if (resolve instanceof GoTypeOwner) {<NEW_LINE>GoType type = ((GoTypeOwner) resolve).getGoType(state);<NEW_LINE>if (type == ... | ? e.resolve() : null; |
1,316,035 | public static EvaluatedParams evaluate(EvalContext context) {<NEW_LINE>List<Expression> params = context.getParams();<NEW_LINE>if (params.isEmpty()) {<NEW_LINE>return EMPTY;<NEW_LINE>} else if (params.size() == 1) {<NEW_LINE>return new EvaluatedParams(context.evaluate(params.get(0)));<NEW_LINE>}<NEW_LINE>Supplier<?>[] ... | ] = Futures.toSupplier(fu); |
716,531 | public void updateOpt(SinkRequest request, String operator) {<NEW_LINE>String sinkType = request.getSinkType();<NEW_LINE>Preconditions.checkTrue(Constant.SINK_HIVE.equals(sinkType), String.format(Constant.SINK_TYPE_NOT_SAME<MASK><NEW_LINE>StreamSinkEntity entity = sinkMapper.selectByPrimaryKey(request.getId());<NEW_LIN... | , Constant.SINK_HIVE, sinkType)); |
1,293,257 | public void marshall(VpcLink vpcLink, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (vpcLink == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(vpcLink.getCreatedDate(), CREATEDDATE_BINDING);<NEW_LINE>protoc... | vpcLink.getVpcLinkId(), VPCLINKID_BINDING); |
1,666,647 | public Object calculate(Context ctx) {<NEW_LINE>if (left == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("\"^\"" <MASK><NEW_LINE>}<NEW_LINE>if (right == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("\"^\"" + mm.getMessage("operator.... | + mm.getMessage("operator.missingLeftOperation")); |
9,097 | public static List<DispatchSpec.Group> createDispatchGroups(List<SearchNode> searchNodes, int numDispatchGroups) {<NEW_LINE>if (numDispatchGroups > searchNodes.size())<NEW_LINE>numDispatchGroups = searchNodes.size();<NEW_LINE>List<DispatchSpec.Group> <MASK><NEW_LINE>int numNodesPerGroup = searchNodes.size() / numDispat... | groupsSpec = new ArrayList<>(); |
243,179 | private void load(InputStream inputStream) throws ConfigError {<NEW_LINE>try (final Reader reader = new InputStreamReader(inputStream)) {<NEW_LINE>Properties currentSection = null;<NEW_LINE>String currentSectionId = null;<NEW_LINE>final Tokenizer tokenizer = new Tokenizer();<NEW_LINE>Tokenizer.Token token = tokenizer.g... | valueToken = tokenizer.getToken(reader); |
121,145 | protected List<SparseItemset> frequentItemsetsSparse(List<SparseItemset> candidates, Relation<BitVector> relation, int needed, DBIDs ids, ArrayModifiableDBIDs survivors, int length) {<NEW_LINE>// Current search interval:<NEW_LINE>int begin = 0, end = candidates.size();<NEW_LINE>int[] scratchi = new int[length], iters =... | bv = relation.get(iditer); |
796,365 | public static void main(String[] args) {<NEW_LINE>int[] array1 = { 1, 2, 3, 4, -1, -2, -3 };<NEW_LINE>int[] array2 = { 1, 5, 4, 3, 2, 0 };<NEW_LINE>int[] array3 = { 2, 4, 8, 16, 32, 1 };<NEW_LINE>int[] array4 = { 2, 4, 8, 16, 32 };<NEW_LINE>int[] array5 = { 2, 1 };<NEW_LINE>int[] array6 = { 9 };<NEW_LINE>int indexOfEle... | indexOfElement5 = bitonicSearch(array4, 32); |
188,816 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>String appPackage = invokerPackage + ".app";<NEW_LINE>supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));<NEW_LINE>supportingFiles.add(new SupportingFile("build.mustache", "", "build.sbt"));<NEW_LINE>supportingFiles.add(new Supp... | ("web.xml", "/src/main/webapp/WEB-INF", "web.xml")); |
624,871 | public static void deleteLifecycle(HandlerContext handlerCtx) {<NEW_LINE>List<Map<String, Object>> selectedList = (List<Map<String, Object>>) handlerCtx.getInputValue("selectedList");<NEW_LINE>String endpoint = GuiUtil.getSessionValue(REST_URL) + "/applications/application/delete-lifecycle-module";<NEW_LINE>Map<String,... | attrs, "DELETE", null, false); |
1,623,514 | public Tuple2<String, List<Writable>> call(List<Writable> writables) throws Exception {<NEW_LINE>List<String> keyColumns = reducer.getKeyColumns();<NEW_LINE>if (keyColumns == null) {<NEW_LINE>// Global reduction<NEW_LINE>return new Tuple2<>(GLOBAL_KEY, writables);<NEW_LINE>} else {<NEW_LINE>Schema schema = reducer.getI... | Tuple2<>(key, writables); |
897,504 | public void bindMessageDestinationReferenceForEjb(String ejbName, String ejbType, String referenceName, String connectionFactoryName, String destName, MessageDestination.Type type) throws ConfigurationException {<NEW_LINE>Set beanNames = new HashSet();<NEW_LINE>beanNames.add(ejbName);<NEW_LINE>String destPrefix = null;... | connectionFactoryName, beanNames, BEAN_TYPE.SESSION); |
584,317 | public List<? extends CodeGenerator> create(Lookup context) {<NEW_LINE>ArrayList<CodeGenerator> ret = new ArrayList<>();<NEW_LINE>JTextComponent component = context.lookup(JTextComponent.class);<NEW_LINE>CompilationController controller = context.lookup(CompilationController.class);<NEW_LINE>if (component == null || co... | createEqualsHashCodeGenerator(component, controller, elem); |
29,929 | public String handleRequest(CloudWatchLogsEvent event, Context context) {<NEW_LINE>LambdaLogger logger = context.getLogger();<NEW_LINE>String response = new String("200 OK");<NEW_LINE>Decoder decoder = Base64.getDecoder();<NEW_LINE>byte[] decodedEvent = decoder.decode(event.getAwsLogs().getData());<NEW_LINE>StringBuild... | BufferedReader bufferedReader = new BufferedReader(inputStreamReader); |
641,269 | public void listModules(PrintStream out, List<String> tags) {<NEW_LINE>if (tags.contains("-*"))<NEW_LINE>return;<NEW_LINE>tags = new ArrayList<>(tags);<NEW_LINE>boolean wild = tags.contains("*");<NEW_LINE>Set<String> included = new HashSet<>();<NEW_LINE>if (wild)<NEW_LINE>tags.remove("*");<NEW_LINE>else<NEW_LINE>tags.s... | ).forEach(included::add); |
1,086,834 | public static boolean breakBlockWithTool(@Nonnull Block block, @Nonnull World world, @Nonnull BlockPos pos, @Nullable EnumFacing side, @Nonnull EntityPlayer entityPlayer, @Nonnull EnumHand hand, @Nonnull String permissionNode) {<NEW_LINE>ItemStack heldItem = entityPlayer.getHeldItem(hand);<NEW_LINE>ITool tool = ToolUti... | Lang.WRENCH_DENIED.toChatServer()); |
910,036 | private void disconnectClientWithSameClientId(@NotNull final ClientConnection clientConnection, @NotNull final ChannelHandlerContext ctx, @NotNull final CONNECT msg) {<NEW_LINE>if (clientConnection.getClientState().disconnected()) {<NEW_LINE>log.debug("Disconnecting client with same client identifier '{}' failed. " + "... | disconnectClientWithSameClientId(clientConnection, ctx, msg); |
641,953 | public synchronized void store(String fileName) throws IOException {<NEW_LINE>ByteArrayOutputStream out = new ByteArrayOutputStream();<NEW_LINE>store(out, null);<NEW_LINE>ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());<NEW_LINE>InputStreamReader reader = new InputStreamReader(in, StandardCharsets... | String line = r.readLine(); |
1,306,478 | void doStateMaintenance() {<NEW_LINE>while (!isShutdown()) {<NEW_LINE>RunnableScheduledFuture<?> toSchedule;<NEW_LINE>while ((toSchedule = submittedScheduledTasks.poll()) != null) delayedTasks.add(toSchedule);<NEW_LINE>RunnableScheduledFuture<?> toExecute;<NEW_LINE>while ((toExecute = delayedTasks.peek()) != null && to... | > nextTask = delayedTasks.peek(); |
234,346 | public List<List<Vertex<Integer>>> simpleCyles(Graph<Integer> graph) {<NEW_LINE>blockedSet = new HashSet<>();<NEW_LINE><MASK><NEW_LINE>stack = new LinkedList<>();<NEW_LINE>allCycles = new ArrayList<>();<NEW_LINE>long startIndex = 1;<NEW_LINE>TarjanStronglyConnectedComponent tarjan = new TarjanStronglyConnectedComponent... | blockedMap = new HashMap<>(); |
652,283 | public void lower(FloatConvertNode convert, LoweringTool tool) {<NEW_LINE>if (!convert.graph().isAfterStage(StageFlag.VALUE_PROXY_REMOVAL)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SnippetInfo key;<NEW_LINE>switch(convert.getFloatConvert()) {<NEW_LINE>case F2I:<NEW_LINE>key = f2i;<NEW_LINE>break;<NEW_LINE>case F2L:<NEW_L... | StructuredGraph graph = convert.graph(); |
893,973 | boolean updateCompactionProgress(String partitionPath, String fieldName, long progressTime) {<NEW_LINE>try {<NEW_LINE>// load existing progress checkpoint.<NEW_LINE>Map<String, Long> checkpoints = getCompactionProgress(partitionPath);<NEW_LINE>// Ensure we don't downgrade progress already recorded.<NEW_LINE>if (progres... | error("Could not save compaction progress for {}", partitionPath, e); |
1,105,181 | public void deletePendingMembership(ResourceContext ctx, String domainName, String roleName, String memberName, String auditRef) {<NEW_LINE>final String caller = ctx.getApiName();<NEW_LINE>logPrincipal(ctx);<NEW_LINE>if (readOnlyMode.get()) {<NEW_LINE>throw ZMSUtils.requestError(SERVER_READ_ONLY_MESSAGE, caller);<NEW_L... | validate(memberName, TYPE_MEMBER_NAME, caller); |
340,849 | public Properties next() {<NEW_LINE>if (!hasNext) {<NEW_LINE>throw new NoSuchElementException();<NEW_LINE>}<NEW_LINE>final byte[] topColumnQualifier = source.getTopKey().getColumnQualifierData().getBackingArray();<NEW_LINE>final byte[] topColumnVisibility = source.getTopKey()<MASK><NEW_LINE>final long topTimestamp = so... | .getColumnVisibilityData().getBackingArray(); |
1,115,348 | private void refill() {<NEW_LINE>refill.mark();<NEW_LINE>List<FeedRefreshContext> contexts = new ArrayList<>();<NEW_LINE>int batchSize = Math.min(100, 3 * config.getApplicationSettings().getBackgroundThreads());<NEW_LINE>// add feeds we got from the add() method<NEW_LINE>int addQueueSize = addQueue.size();<NEW_LINE>for... | map = new LinkedHashMap<>(); |
120,129 | public static void registerRenderers(EntityRenderersEvent.RegisterRenderers event) {<NEW_LINE>event.registerBlockEntityRenderer(GeneratorsTileEntityTypes.BIO_GENERATOR.get(), RenderBioGenerator::new);<NEW_LINE>event.registerBlockEntityRenderer(GeneratorsTileEntityTypes.FUSION_REACTOR_CONTROLLER.get(), RenderFusionReact... | get(), RenderFissionReactor::new); |
734,343 | public void run(RegressionEnvironment env) {<NEW_LINE>String text = "@name('s0') select irstream *, " + "prev(1, symbol) as prev1, " + "prevtail(0, symbol) as prevTail0, " + "prevtail(1, symbol) as prevTail1, " + "prevcount(symbol) as prevCountSym, " + "prevwindow(symbol) as prevWindowSym " + "from SupportMarketDataBea... | .sendEventBean(makeMarketDataEvent("E1")); |
477,356 | protected void prepareVarParam(Sql sql) {<NEW_LINE>for (String name : sql.varIndex().names()) {<NEW_LINE>if ("view".equals(name))<NEW_LINE>sql.vars().set("view", getEntity().getViewName());<NEW_LINE>else if ("table".equals(name))<NEW_LINE>sql.vars().set("table", getEntity().getTableName());<NEW_LINE>else if ("field".eq... | "field", entityField.getColumnName()); |
2,458 | public void hereOp(String capture) throws IOException {<NEW_LINE>if (!capture.startsWith("<<")) {<NEW_LINE>throw new IllegalArgumentException("bad HERE: " + capture);<NEW_LINE>}<NEW_LINE>offer(capture);<NEW_LINE>if (dataHead.hereSettings == null) {<NEW_LINE>dataHead.hereSettings = new LinkedList<>();<NEW_LINE>}<NEW_LIN... | = new HereDocSettings(terminator, state); |
1,213,279 | public int compareTo(HelloMessage other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetHeader(), other.isSetHeader());<NEW_LINE>if (la... | ), other.isSetNodeId()); |
541,781 | public void generateInvoice(ActionRequest request, ActionResponse response) throws AxelorException {<NEW_LINE>Timetable timetable = request.getContext(<MASK><NEW_LINE>timetable = Beans.get(TimetableRepository.class).find(timetable.getId());<NEW_LINE>Context parentContext = request.getContext().getParent();<NEW_LINE>if ... | ).asType(Timetable.class); |
1,113,112 | public static void writeLong(long value, byte[] byteArray, int offset, boolean bigEndian, int numBytes) {<NEW_LINE>if ((offset + numBytes > byteArray.length) && (numBytes > 0) && (numBytes <= 8))<NEW_LINE>throw new ArrayIndexOutOfBoundsException("Array access index out of bounds. " + "writeLong is trying to access byte... | byteArray, offset, true, numBytes); |
1,428,577 | private void save(ServerMatrix matrix, Path matrixPath, FileSystem fs, List<Integer> partIds, PSMatrixSaveContext saveContext, int startPos, int endPos, PSMatrixFilesMeta dataFilesMeta) throws IOException {<NEW_LINE>Path destFile = new Path(matrixPath, ModelFilesUtils.fileName(partIds.get(startPos)));<NEW_LINE>Path tmp... | .ANGEL_PS_IO_FILE_BUFFER_SIZE, AngelConf.DEFAULT_ANGEL_PS_IO_FILE_BUFFER_SIZE)); |
1,314,376 | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {<NEW_LINE>final boolean debug = logger.isDebugEnabled();<NEW_LINE><MASK><NEW_LINE>final HttpServletResponse response = (HttpServletResponse) res;<NEW_LINE>try {<NEW_LINE>Authentication authentication =... | final HttpServletRequest request = (HttpServletRequest) req; |
1,791,943 | public void showParameterInfo(@NotNull ErlangArgumentList args, @NotNull CreateParameterInfoContext context) {<NEW_LINE>ErlangFunctionCallExpression erlFunctionCall = PsiTreeUtil.getParentOfType(args, ErlangFunctionCallExpression.class);<NEW_LINE>if (erlFunctionCall != null) {<NEW_LINE>PsiReference reference = erlFunct... | functionName) : Collections.emptyList(); |
1,048,683 | protected String readMessage() throws IOException {<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>int messageSize = 0;<NEW_LINE>int i;<NEW_LINE>char ch;<NEW_LINE>while ((i = reader.read()) != -1) {<NEW_LINE>ch = (char) i;<NEW_LINE>if (ch == '*' && sb.length() > 0) {<NEW_LINE>try {<NEW_LINE>messageSize = Integ... | ] buffer = new char[1024]; |
661,058 | public void rollback() {<NEW_LINE>if (!isFailCalled) {<NEW_LINE>throw new CloudRuntimeException("rollback() cannot be called before fail() is called");<NEW_LINE>}<NEW_LINE>isRollbackStart = true;<NEW_LINE>if (rollBackFlows.empty()) {<NEW_LINE>callErrorHandler(true);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (skipRestRoll... | name, getFlowName(currentRollbackFlow))); |
160,775 | public static void runTest(String test, String num) {<NEW_LINE>System.out.println("Testing: " + test + " : num newline breaks: " + num);<NEW_LINE>Annotation ann = new Annotation(test);<NEW_LINE>Properties props = new Properties();<NEW_LINE>props.setProperty("annotators", "tokenize,ssplit");<NEW_LINE>StanfordCoreNLP pip... | = new ParagraphAnnotator(propsPara, true); |
258,307 | public com.amazonaws.services.inspector.model.InvalidInputException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.inspector.model.InvalidInputException invalidInputException = new com.amazonaws.services.inspector.model.InvalidInputException(null);<NEW_LINE>int... | String currentParentElement = context.getCurrentParentElement(); |
1,050,329 | private static boolean insertPreHeader(MethodNode mth, LoopInfo loop) {<NEW_LINE>BlockNode start = loop.getStart();<NEW_LINE>List<BlockNode> preds = start.getPredecessors();<NEW_LINE>// don't count back edge<NEW_LINE>int predsCount = preds.size() - 1;<NEW_LINE>if (predsCount == 1) {<NEW_LINE>return false;<NEW_LINE>}<NE... | .startNewBlock(mth, -1); |
840,761 | public void emitBlockQuads(BlockAndTintGetter blockView, BlockState state, BlockPos pos, Supplier<Random> randomSupplier, RenderContext context) {<NEW_LINE>super.emitBlockQuads(blockView, <MASK><NEW_LINE>// Add cell models on top of the base model, if possible<NEW_LINE>Item[] cells = getCells(blockView, pos);<NEW_LINE>... | state, pos, randomSupplier, context); |
1,447,456 | private static String titleForType(Context context, Notification notification, AccountEntity account) {<NEW_LINE>String accountName = StringUtils.unicodeWrap(notification.getAccount().getName());<NEW_LINE>switch(notification.getType()) {<NEW_LINE>case MENTION:<NEW_LINE>return String.format(context.getString(R.string.no... | getString(R.string.poll_ended_created); |
135,241 | public void updateAllCentralAdminConfig(AllCentralAdminConfig config, @Nullable String priorVersion) throws Exception {<NEW_LINE>validatePagerDutyConfig(config.pagerDuty());<NEW_LINE>validateSlackConfig(config.slack());<NEW_LINE>if (priorVersion == null) {<NEW_LINE>centralConfigDao.writeWithoutOptimisticLocking(GENERAL... | ldap().version()); |
280,779 | public boolean generate(World world, Random random, int blockX, int blockY, int blockZ) {<NEW_LINE>if (cannotGenerateAt(blockX, blockY, blockZ, world)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// generate the leaves<NEW_LINE>int radius = 0;<NEW_LINE>for (int y = blockY + height; y >= blockY + leavesHeight; y--) {<N... | 1, blockZ, Material.DIRT); |
1,132,127 | protected org.activiti.engine.impl.persistence.entity.JobEntity convertToActiviti5JobEntity(final JobEntity job) {<NEW_LINE>org.activiti.engine.impl.persistence.entity.JobEntity activity5Job = new org.activiti.engine.impl.persistence.entity.JobEntity();<NEW_LINE>activity5Job.setJobType(job.getJobType());<NEW_LINE>activ... | setRepeat(job.getRepeat()); |
766,876 | private void defineFields() {<NEW_LINE>defineField("SIZEOF", Type.LONG_TYPE, structure.getSizeOf());<NEW_LINE>// other constants<NEW_LINE>for (ConstantDescriptor constant : structure.getConstants()) {<NEW_LINE>defineField(constant.getName(), Type.LONG_TYPE, constant.getValue());<NEW_LINE>}<NEW_LINE>// offsets<NEW_LINE>... | ), Type.INT_TYPE, fieldOffset); |
548,106 | protected void configureRabbitConnectionFactory(RabbitConnectionFactoryBean factoryBean) {<NEW_LINE>// overrides all preceding items when set<NEW_LINE>JavaUtils.INSTANCE.acceptIfNotNull(this.host, factoryBean::setHost).acceptIfNotNull(this.port, factoryBean::setPort).acceptIfNotNull(this.username, factoryBean::setUsern... | factoryBean.setKeyStore(this.keyStore); |
796,271 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateLinkHubName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>i... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
569,158 | protected int encodeExpansion(long[] ces, int start, int length) {<NEW_LINE>// See if this sequence of CEs has already been stored.<NEW_LINE>long first = ces[start];<NEW_LINE>int ce64sMax <MASK><NEW_LINE>for (int i = 0; i <= ce64sMax; ++i) {<NEW_LINE>if (first == ce64s.elementAti(i)) {<NEW_LINE>if (i > Collation.MAX_IN... | = ce64s.size() - length; |
777,631 | private CostDetail toCostDetail(final I_M_CostDetail record) {<NEW_LINE>final AcctSchemaId acctSchemaId = AcctSchemaId.ofRepoId(record.getC_AcctSchema_ID());<NEW_LINE>final ProductId productId = ProductId.ofRepoId(record.getM_Product_ID());<NEW_LINE>final I_C_UOM productUOM = uomsRepo.<MASK><NEW_LINE>final CurrencyId c... | getById(record.getC_UOM_ID()); |
1,154,735 | private Either<SessionNotCreatedException, Result> createSession(HttpHandler client, InputStream newSessionBlob, long size) {<NEW_LINE>// Create the http request and send it<NEW_LINE>HttpRequest request = new <MASK><NEW_LINE>HttpResponse response;<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>request.setHe... | HttpRequest(HttpMethod.POST, "/session"); |
1,608,052 | public JsonNode normalizeData(final EventNode event, final long timestamp, final long slot, final List<String> fillIds) {<NEW_LINE>final String side = event.eventFlags.bid ? "buy" : "sell";<NEW_LINE>if (event.eventFlags.fill) {<NEW_LINE>final ObjectNode fill = JsonNodeFactory.instance.objectNode();<NEW_LINE>fill.put("t... | getOwnAddress().getKeyString()); |
1,489,788 | private void generatePackageInfo() {<NEW_LINE>Map<String, Object> attrs = new LinkedHashMap<String, Object>();<NEW_LINE>attrs.put("id", getClassNamePrefix());<NEW_LINE>attrs.put("categoryName", "#OptionsCategory_Name_" + getClassNamePrefix());<NEW_LINE>attrs.put("iconBase", getIconPath());<NEW_LINE>attrs.put("keywords"... | annotations.put("org.netbeans.spi.options.OptionsPanelController.ContainerRegistration", attrs); |
1,245,853 | private List<Map<String, Object>> executeQuery(final String sql, final Object... params) {<NEW_LINE>List<Map<String, Object>> list = null;<NEW_LINE>try (<MASK><NEW_LINE>PreparedStatement ps = createPreparedStatement(con, sql, params);<NEW_LINE>ResultSet rs = ps.executeQuery()) {<NEW_LINE>ResultSetMetaData md = rs.getMe... | Connection con = dataSource.getConnection(); |
581,884 | public MessageActionResult receiveMessages(List<ProtocolMessage> expectedMessages, TlsContext context) {<NEW_LINE>context.setTalkingConnectionEndType(context.getChooser().getMyConnectionPeer());<NEW_LINE>MessageActionResult result = new MessageActionResult();<NEW_LINE>try {<NEW_LINE>byte[] receivedBytes;<NEW_LINE>boole... | receivedBytes.length != 0 && shouldContinue); |
303,502 | default void populateJavaTypes(Map<String, Object> map, Object object) {<NEW_LINE>Class<?> targetClass = object.getClass();<NEW_LINE>Class<?> contentClass = null;<NEW_LINE>Class<?> keyClass = null;<NEW_LINE>map.put(JsonHeaders.TYPE_ID, targetClass);<NEW_LINE>if (object instanceof Collection && !((Collection<?>) object)... | .iterator().next(); |
362,774 | public static AbstractComponent createComponent(ThingUID thingUID, HaID haID, String configJSON, @Nullable ChannelStateUpdateListener updateListener, Gson gson) {<NEW_LINE>try {<NEW_LINE>switch(haID.component) {<NEW_LINE>case "alarm_control_panel":<NEW_LINE>return new ComponentAlarmControlPanel(thingUID, haID, configJS... | haID, configJSON, updateListener, gson); |
1,451,577 | public boolean visit(ForClause x) {<NEW_LINE>print0(ucase ? "FOR " : "for ");<NEW_LINE>if (ForClause.Option.UPDATE.equals(x.getOption())) {<NEW_LINE>print0(ucase ? "UPDATE" : "update");<NEW_LINE>} else if (ForClause.Option.SHARE.equals(x.getOption())) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (x.getOf().size() > 0) {<NE... | print0(ucase ? "SHARE" : "share"); |
411,760 | public void init(GameContainer container, StateBasedGame game) throws SlickException {<NEW_LINE>this.container = container;<NEW_LINE>this.game = game;<NEW_LINE>input = container.getInput();<NEW_LINE>int width = container.getWidth();<NEW_LINE>int height = container.getHeight();<NEW_LINE>// create offscreen graphics<NEW_... | scoreboardStarStream.setPositionSpread(height / 20f); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.