idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
7,269 | protected void onDraw(Canvas canvas) {<NEW_LINE>super.onDraw(canvas);<NEW_LINE>float eatRightX = mPadding + eatErWidth + eatErPositionX;<NEW_LINE>mRect.set(mPadding + eatErPositionX, mHigh / 2 - eatErWidth / 2, eatRightX, mHigh / 2 + eatErWidth / 2);<NEW_LINE>canvas.drawArc(mRect, <MASK><NEW_LINE>canvas.drawCircle(mPad... | eatErStartAngle, eatErEndAngle, true, mPaint); |
1,749,548 | private boolean handle(SyntaxDocument doc, Token token) {<NEW_LINE>final Matcher matcher = nodeIdPattern.matcher(token.getText(doc));<NEW_LINE>if (matcher.matches()) {<NEW_LINE>String id = matcher.group(1);<NEW_LINE>final NodeModel node = Controller.getCurrentController().getMap().getNodeForID(id);<NEW_LINE>if (node !=... | NodeModel selectedNode = mapController.getSelectedNode(); |
666,740 | public static TrifocalTensor createTrifocal(Se3_F64 P2, Se3_F64 P3, @Nullable TrifocalTensor ret) {<NEW_LINE>if (ret == null)<NEW_LINE>ret = new TrifocalTensor();<NEW_LINE>DMatrixRMaj R2 = P2.getR();<NEW_LINE><MASK><NEW_LINE>Vector3D_F64 T2 = P2.getT();<NEW_LINE>Vector3D_F64 T3 = P3.getT();<NEW_LINE>for (int col = 0; c... | DMatrixRMaj R3 = P3.getR(); |
965,215 | public boolean save() {<NEW_LINE>StringBuffer sql = new StringBuffer("INSERT INTO AD_PInstance_Log " + "(AD_PInstance_ID, AD_PInstance_Log_ID, P_Date, P_ID, P_Number, P_Msg)" + " VALUES (");<NEW_LINE>sql.append(m_AD_PInstance_ID).append(",").append(m_Log_ID).append(",");<NEW_LINE>if (m_P_Date == null) {<NEW_LINE>sql.ap... | sql.toString(), null); |
1,114,270 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>// widen to long<NEW_LINE>String stmtTextCreate = namedWindow ? "@public create window MyInfraW#keepall as (f1 long, f2 string)" : "@public create table MyInfraW as (f1 long primary key, f2 string primary key)";<N... | env.compileDeploy("insert into MyInfraW(f1, f2) select longPrimitive, theString from SupportBean", path); |
398,314 | private boolean isNeedRun() {<NEW_LINE>List<String> ignoreAgentPortModule = new ArrayList<String>();<NEW_LINE>ignoreAgentPortModule.add("imagestorebackupstorage.py");<NEW_LINE>if (isFullDeploy()) {<NEW_LINE>logger.debug("Ansible.fullDeploy is set, run ansible anyway");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (ansi... | .format("ansible module[%s] changed, run ansible", playBookName)); |
862,874 | static ByteBuf encodeFirstFragment(ByteBufAllocator allocator, int mtu, FrameType frameType, int streamId, boolean hasMetadata, ByteBuf metadata, ByteBuf data) {<NEW_LINE>// subtract the header bytes + frame length size<NEW_LINE>int remaining = mtu - FRAME_OFFSET;<NEW_LINE>ByteBuf metadataFragment = hasMetadata ? Unpoo... | throw new IllegalStateException("unsupported fragment type: " + frameType); |
613,260 | // CSI: Sponge<NEW_LINE>private void checkFingerprint() {<NEW_LINE>final Certificate[] certificates = this.getClass().getProtectionDomain().getCodeSource().getCertificates();<NEW_LINE>final List<String> <MASK><NEW_LINE>if (((Boolean) Launch.blackboard.getOrDefault("fml.deobfuscatedEnvironment", false))) {<NEW_LINE>Spon... | fingerprints = CertificateHelper.getFingerprints(certificates); |
131,214 | private ValueFetcher createFetcher(BlockValSet blockValSet) {<NEW_LINE>DataType storedType = blockValSet.getValueType().getStoredType();<NEW_LINE>if (blockValSet.isSingleValue()) {<NEW_LINE>switch(storedType) {<NEW_LINE>case INT:<NEW_LINE>return new IntSingleValueFetcher(blockValSet.getIntValuesSV());<NEW_LINE>case LON... | FloatMultiValueFetcher(blockValSet.getFloatValuesMV()); |
443,268 | private InMemoryPrivateKey createBip32WebsitePrivateKey(byte[] masterSeed, int accountIndex, String site) {<NEW_LINE>// Create BIP32 root node<NEW_LINE>HdKeyNode rootNode = HdKeyNode.fromSeed(masterSeed, null);<NEW_LINE>// Create bit id node<NEW_LINE>HdKeyNode <MASK><NEW_LINE>// Create the private key for the specified... | bidNode = rootNode.createChildNode(BIP32_ROOT_AUTHENTICATION_INDEX); |
1,252,184 | public void propagate(InstanceState state) {<NEW_LINE>// get attributes<NEW_LINE>final var dataWidth = state.getAttributeValue(StdAttr.FP_WIDTH);<NEW_LINE>// compute outputs<NEW_LINE>final var a = state.getPortValue(IN0);<NEW_LINE>final var b = state.getPortValue(IN1);<NEW_LINE>final var a_val = dataWidth.getWidth() ==... | ? 1 : 0), delay); |
490,521 | public static ArrayList<ReminderEntry> readRemindersFromBundle(Bundle bundle) {<NEW_LINE>ArrayList<ReminderEntry> reminders = null;<NEW_LINE>ArrayList<Integer> reminderMinutes = bundle.getIntegerArrayList(EventInfoFragment.BUNDLE_KEY_REMINDER_MINUTES);<NEW_LINE>ArrayList<Integer> reminderMethods = <MASK><NEW_LINE>if (r... | bundle.getIntegerArrayList(EventInfoFragment.BUNDLE_KEY_REMINDER_METHODS); |
1,546,290 | private void buildClassInfo() {<NEW_LINE>String internalSuperName = ASMToolkit.getInternalName(Event.class.getName());<NEW_LINE>String internalClassName = type.getInternalName();<NEW_LINE>classWriter.visit(52, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER, internalClassName, null, internalSuperName, null);... | (null, array[i]); |
579,689 | private void bindView(View view) {<NEW_LINE>View llContent = view.findViewById(R.id.ll_content);<NEW_LINE>llContent.setOnClickListener(null);<NEW_LINE>searchView = view.findViewById(R.id.searchView);<NEW_LINE>atvTitle = view.findViewById(R.id.atv_title);<NEW_LINE>ibtStop = view.findViewById(R.id.ibt_stop);<NEW_LINE>rvS... | findViewById(R.id.rf_rv_change_source); |
301,686 | private Operation calculateNewDefaultOperation(long lastTimestamp) {<NEW_LINE>if (localTransferFile == null || remoteTransferFile == null) {<NEW_LINE>if (localTransferFile == null) {<NEW_LINE>return new RemoteTimestamp(remoteTransferFile.getTimestamp()).newerThan(lastTimestamp) ? Operation.DOWNLOAD : Operation.DELETE;<... | RemoteTimestamp(remoteTransferFile.getTimestamp()); |
449,247 | public void run() {<NEW_LINE>IOException exception = null;<NEW_LINE>// Note that we do not need socketFinder lock here<NEW_LINE>// as we update nothing in socketFinder based on the condition.<NEW_LINE>// So, its perfectly fine to make a dirty read.<NEW_LINE>SocketFinder.Result result = socketFinder.getResult();<NEW_LIN... | socket.connect(inetSocketAddress, timeoutInMilliseconds); |
381,878 | private void ensureArrayCreated(CtReference reference) {<NEW_LINE>// Create memory array for the reference if it does not exist<NEW_LINE>if (memoryMap.get(reference) == null) {<NEW_LINE>ArrayExpr memoryArray;<NEW_LINE>ArraySort sort;<NEW_LINE>if (reference instanceof CtArrayTypeReference) {<NEW_LINE>ArraySort arraySort... | , getTypeSort(context, typeReference)); |
1,829,620 | public static String MakePrettyDate(String getCreatedTime) {<NEW_LINE>SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZ", Locale.US);<NEW_LINE>ParsePosition pos = new ParsePosition(0);<NEW_LINE>long then = formatter.parse(getCreatedTime, pos).getTime();<NEW_LINE>long now = <MASK><NEW_LINE>long s... | new Date().getTime(); |
336,207 | public void write(org.apache.thrift.protocol.TProtocol prot, grantNamespacePermission_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache<MASK><NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetTinfo()) {<NEW_LINE... | .thrift.protocol.TTupleProtocol) prot; |
324,624 | public static <T> T deserialize(String json, Class<T> cls, JsonPathConfig jsonPathConfig) {<NEW_LINE>Validate.notNull(jsonPathConfig, "JsonPath configuration wasn't specified, cannot deserialize.");<NEW_LINE><MASK><NEW_LINE>DataToDeserialize dataToDeserialize = new DataToDeserialize() {<NEW_LINE><NEW_LINE>@Override<NEW... | JsonParserType mapperType = jsonPathConfig.defaultParserType(); |
1,572,468 | private DonutChartModel initDonutModel() {<NEW_LINE>DonutChartModel model = new DonutChartModel();<NEW_LINE>Map<String, Number> circle1 = new LinkedHashMap<String, Number>();<NEW_LINE>circle1.put("Brand 1", 150);<NEW_LINE><MASK><NEW_LINE>circle1.put("Brand 3", 200);<NEW_LINE>circle1.put("Brand 4", 10);<NEW_LINE>model.a... | circle1.put("Brand 2", 400); |
1,095,797 | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {<NEW_LINE>if (!(c instanceof AbstractButton) || UIUtil.isHelpButton(c))<NEW_LINE>return;<NEW_LINE>Graphics2D g2 = (Graphics2D) g.create();<NEW_LINE>AbstractButton b = (AbstractButton) c;<NEW_LINE>Rectangle outerRect = new Rectangle(x... | RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
956,021 | private PointSensitivityBuilder rateForwardSensitivity(OvernightAveragedRateComputation computation, OvernightIndexRates rates) {<NEW_LINE>OvernightIndex index = computation.getIndex();<NEW_LINE>HolidayCalendar calendar = computation.getFixingCalendar();<NEW_LINE>LocalDate startFixingDate = computation.getStartDate();<... | lastNonCutOffMatDate = computation.calculateMaturityFromEffective(cutOffEffectiveDate); |
1,318,310 | public static ListApplicationsWithTagRulesResponse unmarshall(ListApplicationsWithTagRulesResponse listApplicationsWithTagRulesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listApplicationsWithTagRulesResponse.setRequestId(_ctx.stringValue("ListApplicationsWithTagRulesResponse.RequestId"));<NEW_LINE>listApplicationsWi... | (_ctx.integerValue("ListApplicationsWithTagRulesResponse.Code")); |
1,307,416 | private static Collection<Collection<Net.Pin>> create_ordered_subnets(Collection<Net.Pin> p_pin_list) {<NEW_LINE>Collection<Collection<Net.Pin>> result = new LinkedList<Collection<Net.Pin>>();<NEW_LINE>if (p_pin_list.isEmpty()) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>Iterator<Net.Pin> it = p_pin_list.iterator();<... | Pin next_pin = it.next(); |
7,511 | private void internalReadEntryFailed(ManagedLedgerException exception, Object ctx) {<NEW_LINE>PendingReadEntryRequest pendingReadEntryRequest = (PendingReadEntryRequest) ctx;<NEW_LINE>PositionImpl readPosition = pendingReadEntryRequest.position;<NEW_LINE>pendingReadEntryRequest.retry++;<NEW_LINE>long waitTimeMillis = r... | getMessage(), waitTimeMillis / 1000.0); |
1,713,659 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.fasterxml.jackson.databind.ser.std.StdSerializer#serialize(java.lang.Object, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>@SuppressWarnings("null")<NEW_LINE>public void serialize(Colle... | serialize(doc, jgen, provider); |
1,484,855 | public Result build(List<String> args, String nativeImageName, String resultingExecutableName, Path outputDir, boolean debugSymbolsEnabled, boolean processInheritIODisabled) throws InterruptedException, IOException {<NEW_LINE>preBuild(args);<NEW_LINE>try {<NEW_LINE>CountDownLatch errorReportLatch = new CountDownLatch(1... | return new Result(exitCode, objcopyExists); |
1,472,530 | static ErrorProneAnalyzer createAnalyzer(ScannerSupplier scannerSupplier, ErrorProneOptions epOptions, Context context, RefactoringCollection[] refactoringCollection) {<NEW_LINE>if (!epOptions.patchingOptions().doRefactor()) {<NEW_LINE>return ErrorProneAnalyzer.createByScanningForPlugins(scannerSupplier, epOptions, con... | create(toUse.get()); |
1,725,085 | public static DescribeLaunchTemplatesResponse unmarshall(DescribeLaunchTemplatesResponse describeLaunchTemplatesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeLaunchTemplatesResponse.setRequestId(_ctx.stringValue("DescribeLaunchTemplatesResponse.RequestId"));<NEW_LINE>describeLaunchTemplatesResponse.setPageSize... | ("DescribeLaunchTemplatesResponse.LaunchTemplateSets[" + i + "].DefaultVersionNumber")); |
1,232,370 | private void handleLocalDevice(Node deviceNode) {<NEW_LINE>BeanDefinitionBuilder deviceConfigBuilder = createBeanBuilder(LocalDeviceConfig.class);<NEW_LINE>AbstractBeanDefinition beanDefinition = deviceConfigBuilder.getBeanDefinition();<NEW_LINE>Node attName = deviceNode.getAttributes().getNamedItem("name");<NEW_LINE>S... | ("baseDir", getTextContent(n)); |
1,599,763 | CompletableFuture<CreateKVTableResponse> checkKeyValueTableExists(KeyValueTableConfiguration configuration, long timestamp, final int startingSegmentNumber, OperationContext context) {<NEW_LINE>CompletableFuture<CreateKVTableResponse> result = new CompletableFuture<>();<NEW_LINE>final long time;<NEW_LINE>final KVTConfi... | , configuration, timestamp, startingSegmentNumber)); |
901,752 | int writeMemberAttrs(Symbol sym) {<NEW_LINE>int acount = writeFlagAttrs(sym.flags());<NEW_LINE>long flags = sym.flags();<NEW_LINE>if (source.allowGenerics() && (flags & (SYNTHETIC | BRIDGE)) != SYNTHETIC && (flags & ANONCONSTR) == 0 && (!types.isSameType(sym.type, sym.erasure(types)) || signatureGen.hasTypeVar(sym.type... | typeSig(sym.type))); |
398,336 | static void bfs(int X, int Y) {<NEW_LINE>Queue<Pair> q = new LinkedList<>();<NEW_LINE>q.add(new Pair(X, Y));<NEW_LINE>visited[X][Y] = true;<NEW_LINE>while (!q.isEmpty()) {<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < 4; i++) {<NEW_LINE>int nextx = cur.x + dx[i];<NEW_LINE>int nexty = cur.y + dy[i];<NEW_LINE>if (nextx <=... | Pair cur = q.poll(); |
1,697,130 | public String massageExampleFilePath(final String path) {<NEW_LINE>String modifiedPath = systemToUnix(path);<NEW_LINE>// System.out.println("demo.openFile() = "+path);<NEW_LINE>URL url = null;<NEW_LINE>try {<NEW_LINE>url = new URL(modifiedPath);<NEW_LINE>if (!UtilIO.validURL(url)) {<NEW_LINE>// System.out.println(" in... | err.println("Can't open " + path); |
1,793,901 | public User updateUser(final UpdateUserForm updateUserForm, final User modUser, final HttpServletRequest request, Locale locale) throws DotSecurityException, DotDataException, IncorrectPasswordException {<NEW_LINE>final HttpSession session = request.getSession();<NEW_LINE>boolean validatePassword = false;<NEW_LINE>User... | util.WebKeys.CMS_USER, userToSave); |
1,579,228 | private static ResolvedEvent resolve(Rule rule, BlazeDirectories directories) {<NEW_LINE>String name = rule.getName();<NEW_LINE>Object pathObj = rule.getAttr("path");<NEW_LINE>ImmutableMap.Builder<String, Object> origAttr = ImmutableMap.<String, Object>builder().put("name", name).put("path", pathObj);<NEW_LINE>StringBu... | .getEmbeddedBinariesRoot().asFragment(); |
820,685 | private static void buildConversionMap() {<NEW_LINE>// Values in the map below may be always changed<NEW_LINE>ArrayMap<String, String> keyValueMap = new ArrayMap<>(10);<NEW_LINE>keyValueMap.put("top", "0");<NEW_LINE>keyValueMap.put("left", "0");<NEW_LINE>keyValueMap.put("right", "DUMMY_RIGHT");<NEW_LINE>keyValueMap.put... | keyValueMap.put("width", "DUMMY_WIDTH"); |
808,484 | /*<NEW_LINE>* void GetStringUTFRegion(JNIEnv *env, jstring str, jsize start, jsize len, char *buf);<NEW_LINE>*/<NEW_LINE>@CEntryPoint(exceptionHandler = JNIExceptionHandlerVoid.class, include = CEntryPoint.NotIncludedAutomatically.class)<NEW_LINE>@CEntryPointOptions(prologue = JNIEnvEnterFatalOnFailurePrologue.class, p... | Utf8.maxUtf8ByteLength(len, true); |
146,396 | public static DescribeAntChainMembersResponse unmarshall(DescribeAntChainMembersResponse describeAntChainMembersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAntChainMembersResponse.setRequestId(_ctx.stringValue("DescribeAntChainMembersResponse.RequestId"));<NEW_LINE>Result result = new Result();<NEW_LINE>Pagi... | ("DescribeAntChainMembersResponse.Result.Members[" + i + "].JoinTime")); |
1,538,771 | public static void createContent(MainDocumentPart wordDocumentPart) {<NEW_LINE>try {<NEW_LINE>// Do this explicitly, since we need<NEW_LINE>// it in order to create our content<NEW_LINE>PhysicalFonts.discoverPhysicalFonts();<NEW_LINE>Map<String, PhysicalFont> physicalFontMap = PhysicalFonts.getPhysicalFonts();<NEW_LINE... | pfVariation = PhysicalFonts.getItalicForm(pf); |
89,003 | private // (e.g. a revealjs presentation or a pdf)<NEW_LINE>String useQuartoPreview() {<NEW_LINE>if (session_.getSessionInfo().getQuartoConfig().enabled && (extendedType_ == SourceDocument.XT_QUARTO_DOCUMENT) && !isShinyDoc() && !isRmdNotebook() && !isQuartoWebsiteDefaultHtmlDoc()) {<NEW_LINE>String format = quartoForm... | , QUARTO_HTML_FORMAT, QUARTO_REVEALJS_FORMAT, QUARTO_SLIDY_FORMAT)); |
506,069 | private static boolean loadBTraceScript(String filePath, boolean traceToStdOut) {<NEW_LINE>try {<NEW_LINE>String scriptName = "";<NEW_LINE>String scriptParent = "";<NEW_LINE>File traceScript = new File(filePath);<NEW_LINE>scriptName = traceScript.getName();<NEW_LINE>scriptParent = traceScript.getParent();<NEW_LINE>if (... | debugPrint("script " + filePath + " does not exist!"); |
324,870 | private void updateAndPublish() {<NEW_LINE>StationConfiguration config = getConfigAs(StationConfiguration.class);<NEW_LINE>try {<NEW_LINE>OpenDatasoftResponse measures = apiHandler.getMeasures(config.id);<NEW_LINE>measures.getFirstRecord().ifPresent(field -> {<NEW_LINE>double height = field.getHeight();<NEW_LINE>if (he... | FLOW, flow, Units.CUBICMETRE_PER_SECOND); |
100,565 | public static ListRamUsersResponse unmarshall(ListRamUsersResponse listRamUsersResponse, UnmarshallerContext _ctx) {<NEW_LINE>listRamUsersResponse.setRequestId(_ctx.stringValue("ListRamUsersResponse.RequestId"));<NEW_LINE>listRamUsersResponse.setCode(_ctx.stringValue("ListRamUsersResponse.Code"));<NEW_LINE>listRamUsers... | ("ListRamUsersResponse.Data.List[" + i + "].AliyunUid")); |
296,758 | protected Object parseSourceValue(Object value) {<NEW_LINE>RangeType rangeType = rangeType();<NEW_LINE>if (!(value instanceof Map)) {<NEW_LINE>assert rangeType == RangeType.IP;<NEW_LINE>Tuple<InetAddress, Integer> ipRange = InetAddresses.parseCidr(value.toString());<NEW_LINE>return InetAddresses.toCidrString(ipRange.v1... | ), ipRange.v2()); |
437,118 | public void createNode(int rootID, HippyArray hippyArray) {<NEW_LINE>HippyRootView hippyRootView = mContext.getInstance(rootID);<NEW_LINE>DomManager domManager = this.mContext.getDomManager();<NEW_LINE>if (hippyArray != null && hippyRootView != null && domManager != null) {<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < ... | int len = hippyArray.size(); |
1,795,803 | final GetUploadResult executeGetUpload(GetUploadRequest getUploadRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getUploadRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,262,863 | public ModuleVariableDeclarationNode transform(ModuleVariableDeclarationNode moduleVariableDeclarationNode) {<NEW_LINE>MetadataNode metadata = formatNode(moduleVariableDeclarationNode.metadata().orElse(null), 0, 1);<NEW_LINE>Token visibilityQual = formatToken(moduleVariableDeclarationNode.visibilityQualifier().orElse(n... | ) ? 1 : 0, 0); |
220,675 | private static void tryAssertionDocSampleCarEvent(RegressionEnvironment env, AtomicInteger milestone) {<NEW_LINE>String[] fields = new String[] { "name", "place", "sum(count)", "grouping(name)", "grouping(place)", "gid" };<NEW_LINE>env.sendEventBean(new SupportCarEvent("skoda", "france", 100));<NEW_LINE>env.assertProps... | 1, 1, 3 } }); |
1,015,716 | static void edgeType(int u) {<NEW_LINE>status[u] = EXPLORED;<NEW_LINE>for (int v : adjList[u]) if (status[v] == UNVISITED) {<NEW_LINE>System.out.printf(<MASK><NEW_LINE>parent[v] = u;<NEW_LINE>edgeType(v);<NEW_LINE>} else if (// cross edges only occur in directed graph<NEW_LINE>status[v] == VISITED)<NEW_LINE>System.out.... | "Edge from %d to %d is %s%n", u, v, "tree edge"); |
1,230,528 | private HttpRequest.Builder testGroupParametersRequestBuilder(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {<NEW_LINE>// verify the required parameter 'requiredStringGroup' is set<NEW_LINE>if (required... | throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters"); |
697,210 | public void copyFrom(final CopyFrom o) {<NEW_LINE>final YWeatherModuleImpl from = (YWeatherModuleImpl) o;<NEW_LINE>setAstronomy(from.getAstronomy() != null ? (Astronomy) from.getAstronomy().clone() : null);<NEW_LINE>setCondition(from.getCondition() != null ? (Condition) from.getCondition().clone() : null);<NEW_LINE>set... | ).clone() : null); |
1,277,873 | private static AsyncProfiler load() throws Exception {<NEW_LINE>// check compatibility<NEW_LINE>String os = System.getProperty("os.name").toLowerCase(Locale.ROOT).replace(" ", "");<NEW_LINE>String arch = System.getProperty("os.arch").toLowerCase(Locale.ROOT);<NEW_LINE>Table<String, String, String> supported = Immutable... | supported.get(os, arch); |
784,555 | public void rebuild(int source) {<NEW_LINE>for (int i = 0; i < n2; i++) {<NEW_LINE>mates[i].clear();<NEW_LINE>support.getSuccessorsOf(i).clear();<NEW_LINE>support.getPredecessorsOf(i).clear();<NEW_LINE>G_R.getPredecessorsOf(i).clear();<NEW_LINE>G_R.getSuccessorsOf(i).clear();<NEW_LINE>}<NEW_LINE>G_R.getNodes().clear();... | getNodes().add(i); |
1,613,110 | private void exportXLS() {<NEW_LINE>if (miniTable.getListHead() == null)<NEW_LINE>return;<NEW_LINE>ListHead listHead = miniTable.getListHead();<NEW_LINE>WListItemRenderer itemRenderer = (WListItemRenderer) ((WListbox) listHead.getParent()).getItemRenderer();<NEW_LINE>try {<NEW_LINE>HSSFWorkbook workbook = new HSSFWorkb... | SEVERE, e.getLocalizedMessage()); |
1,634,463 | public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new ViewTimeWindowSceneOne());<NEW_LINE>execs.add(new ViewTimeWindowSceneTwo());<NEW_LINE>execs.add(new ViewTimeJustSelectStar());<NEW_LINE>execs.add(new ViewTimeSum());<NEW... | .add(new ViewTimeWindowMonthScoped()); |
766,256 | public void handleDiscoveredPeers(List<Peer> peers, String hexInfoHash) {<NEW_LINE>if (peers.size() == 0)<NEW_LINE>return;<NEW_LINE>SharedTorrent torrent = torrentsStorage.getTorrent(hexInfoHash);<NEW_LINE>if (torrent != null && torrent.isFinished())<NEW_LINE>return;<NEW_LINE>final LoadedTorrent announceableTorrent = t... | PeerUID peerUID = e.getKey(); |
831,597 | protected QualifiedDeclaration<TypeDeclaration> lookupTypeDeclaration(String name) {<NEW_LINE>if (name == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// NOTE: it is possible to search using the context find methods... it<NEW_LINE>// would be nicer but it may be slower, so we do it this way... to be<NEW_LINE>// th... | match = context.getTypeDeclaration(declFullName); |
1,034,546 | public void actionPerformed(ActionEvent e) {<NEW_LINE>for (int i = 0; i < algBoxes.length; i++) {<NEW_LINE>if (algBoxes[i] == e.getSource()) {<NEW_LINE>// see if its ready to start posting these events<NEW_LINE>if (!postAlgorithmEvents)<NEW_LINE>return;<NEW_LINE>// notify the main GUI to change the input algorithm<NEW_... | , cookie)).start(); |
22,401 | public static void main(String[] args) throws URISyntaxException, InterruptedException {<NEW_LINE>Map<String, String> httpHeaders = new HashMap<String, String>();<NEW_LINE>httpHeaders.put("Cookie", "test");<NEW_LINE>ExampleClient c = new ExampleClient(new URI("ws://localhost:8887"), httpHeaders);<NEW_LINE>// We expect ... | httpHeaders.put("Cookie", "username=nemo"); |
661,814 | private String generateMigration(Request request, Migration dbMigration, String dropsFor) throws IOException {<NEW_LINE>String fullVersion = fullVersion(request.nextVersion(), dropsFor);<NEW_LINE>logInfo("generating migration:%s", fullVersion);<NEW_LINE>if (!request.initMigration && !writeMigrationXml(dbMigration, requ... | ), request.current, options); |
2,044 | final CreateServiceResult executeCreateService(CreateServiceRequest createServiceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createServiceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
253,226 | public boolean solveMLCP(SWIGTYPE_p_btMatrixXT_float_t A, SWIGTYPE_p_btVectorXT_float_t b, SWIGTYPE_p_btVectorXT_float_t x, SWIGTYPE_p_btVectorXT_float_t lo, SWIGTYPE_p_btVectorXT_float_t hi, SWIGTYPE_p_btAlignedObjectArrayT_int_t limitDependency, int numIterations, boolean useSparsity) {<NEW_LINE>return DynamicsJNI.bt... | (limitDependency), numIterations, useSparsity); |
1,811,424 | public static void main(final String[] args) throws Exception {<NEW_LINE>final Options opts = new Options();<NEW_LINE>opts.addOption(Option.builder("b").longOpt("bootstrap-servers").hasArg().desc("Kafka cluster bootstrap server string (ex: broker:9092)").build());<NEW_LINE>opts.addOption(Option.builder("s").longOpt("sc... | ("Show usage information").build()); |
1,434,156 | protected Integer doInBackground(Void... params) {<NEW_LINE>if (mDownloadUrl == null)<NEW_LINE>return DownloadManager.STATUS_FAILED;<NEW_LINE>String savedFile = DEFAULT_DOWNLOAD_FILE_NAME;<NEW_LINE>File downloadDir = FileHelpers.getCacheDir(mContext);<NEW_LINE>File downloadFile = new File(downloadDir, savedFile);<NEW_L... | ) bytesRead, (int) contentLength); |
795,679 | /*<NEW_LINE>* This method is called when an entry is removed from the cache. This could<NEW_LINE>* be because access time of that ledger has elapsed<NEW_LINE>* entrylogMapAccessExpiryTimeInSeconds period, or number of active<NEW_LINE>* currentlogs in the cache has reached the size of<NEW_LINE>* maximumNumberOfActiveEnt... | log.error("logChannel for ledger: {} is not supposed to be null in entry removal listener", ledgerId); |
694,093 | private void populateSubMap(NavigableMap subMap, FieldValues fieldValues, int startIndex) {<NEW_LINE>if (startIndex >= fieldValues.getValues().size())<NEW_LINE>return;<NEW_LINE>Pair<String, Object> pair = fieldValues.getValues().get(startIndex);<NEW_LINE><MASK><NEW_LINE>DBValue dbValue;<NEW_LINE>if (value == null) {<NE... | Object value = pair.getSecond(); |
1,814,029 | private void handleFeatureParameters() {<NEW_LINE>Parameter[] parameters = whereBlock.getParent().getAst().getParameters();<NEW_LINE>Map<Boolean, List<Parameter>> declaredParameters = Arrays.stream(parameters).collect(partitioningBy(parameter -> isDataProcessorVariable(parameter.getName())));<NEW_LINE>Map<String, Param... | .toArray(Parameter.EMPTY_ARRAY)); |
13,614 | public void run() {<NEW_LINE>try {<NEW_LINE>if (!isRunning) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, MessageId> currentOffsetsCopy;<NEW_LINE>synchronized (context.getCheckpointLock()) {<NEW_LINE>currentOffsetsCopy = new HashMap<>(currentOffsets);<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, MessageId> entry : c... | LOG.warn("Could not properly commit the offset.", throwable); |
1,851,184 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see javax.swing.text.DefaultCaret#paint(java.awt.Graphics)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void paint(Graphics g) {<NEW_LINE>JTextComponent comp = getComponent();<NEW_LINE>if (comp == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int dot = getDot();<NEW_LINE>Rectang... | r = comp.modelToView(dot); |
1,708,504 | private static // TODO(hw): integer or long?<NEW_LINE>Map<Integer, List<Tablet.Dimension>> buildDimensions(CSVRecord record, Map<Integer, List<Integer>> keyIndexMap, int pidNum) {<NEW_LINE>Map<Integer, List<Tablet.Dimension>> dims = new HashMap<>();<NEW_LINE>int pid = 0;<NEW_LINE>for (Map.Entry<Integer, List<Integer>> ... | (Collectors.joining("|")); |
149,946 | protected void now(final IUser teleportee, final ITarget target, final TeleportCause cause) throws Exception {<NEW_LINE>cancel(false);<NEW_LINE>Location loc = target.getLocation();<NEW_LINE>final PreTeleportEvent event = new PreTeleportEvent(teleportee, cause, target);<NEW_LINE>Bukkit.getServer().getPluginManager().cal... | loc = LocationUtil.getRoundedDestination(loc); |
1,362,014 | protected void validate(Element element, ElementValidation validation) {<NEW_LINE>if (element.getKind() == ElementKind.METHOD || element.getKind() == ElementKind.PARAMETER) {<NEW_LINE>ExecutableElement methodElement = (ExecutableElement) (element.getKind() == ElementKind.METHOD ? element : element.getEnclosingElement()... | validatorHelper.isNotPrivate(element, validation); |
693,407 | /*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.microservice.api.device.IDeviceManagement#createCustomerType(<NEW_LINE>* com.sitewhere.spi.customer.request.ICustomerTypeCreateRequest)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public ICustomerType createCustomerType(ICustomerTypeCreateRequest request) throws SiteWhereExceptio... | .add(getCustomerTypeByToken(token)); |
560,472 | private void doRefreshMetadata(long timeoutMs) {<NEW_LINE><MASK><NEW_LINE>long remaining = timeoutMs;<NEW_LINE>Cluster beforeUpdate = cluster();<NEW_LINE>boolean isMetadataUpdated = _metadata.updateVersion() > updateVersion;<NEW_LINE>while (!isMetadataUpdated && remaining > 0) {<NEW_LINE>_metadata.requestUpdate();<NEW_... | int updateVersion = _metadata.requestUpdate(); |
697,389 | public void handleOutboundPuback(@NotNull final ChannelHandlerContext ctx, @NotNull final PUBACK puback, @NotNull final ChannelPromise promise) {<NEW_LINE>final Channel channel = ctx.channel();<NEW_LINE>final ClientConnection clientConnection = channel.attr(ChannelAttributes.CLIENT_CONNECTION).get();<NEW_LINE>final Str... | > interceptors = clientContext.getPubackOutboundInterceptors(); |
906,249 | public static ListAcceleratorsResponse unmarshall(ListAcceleratorsResponse listAcceleratorsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAcceleratorsResponse.setRequestId(_ctx.stringValue("ListAcceleratorsResponse.RequestId"));<NEW_LINE>listAcceleratorsResponse.setTotalCount(_ctx.integerValue("ListAcceleratorsResp... | ("ListAcceleratorsResponse.Accelerators[" + i + "].CrossDomainBandwidthPackage.Bandwidth")); |
791,215 | public void onClick(View v) {<NEW_LINE>if (currentId.equals(id)) {<NEW_LINE>// Back to all<NEW_LINE>resetAssignedFilter();<NEW_LINE>} else {<NEW_LINE>// New filter<NEW_LINE>currentId = id;<NEW_LINE>Criterion assignedCriterion;<NEW_LINE>if (ActFmPreferenceService.userId().equals(currentId))<NEW_LINE>assignedCriterion = ... | (R.string.actfm_TVA_filter_by_unassigned)); |
398,626 | private void refresh() {<NEW_LINE>Object[] temp = ActivitiesManager.getMostRecentUnseen();<NEW_LINE>ActivitiesEntry entry = (ActivitiesEntry) temp[0];<NEW_LINE>String old_text = (String) notification_text.getData();<NEW_LINE>if (entry == null) {<NEW_LINE>notification_icon.setImage(null);<NEW_LINE>if (old_text.length() ... | (num - 1) })); |
26,615 | private static boolean isSafeEquals(Tuple<Set<Var>> varsByPosition, Var left, Var right) {<NEW_LINE>// For equality based joins ensure at least one variable must be<NEW_LINE>// used in graph/subject/predicate position thus guaranteeing it to<NEW_LINE>// not be a literal so replacing with term equality by ways of<NEW_LI... | boolean lhsSafe = true, rhsSafe = true; |
608,209 | public Object apply(final Object context, final Options options) throws IOException {<NEW_LINE>if (context == null) {<NEW_LINE>return options.hash("default", "");<NEW_LINE>}<NEW_LINE>String viewName = options.hash("view", "");<NEW_LINE>JsonGenerator generator = null;<NEW_LINE>try {<NEW_LINE>final ObjectWriter writer;<N... | .setCharacterEscapes(new HtmlEscapes()); |
44,076 | private void zeroMeanWorldPoints(List<AssociatedPair> points) {<NEW_LINE>center.setTo(0, 0);<NEW_LINE>pointsAdj.reset();<NEW_LINE>for (int i = 0; i < points.size(); i++) {<NEW_LINE>AssociatedPair pair = points.get(i);<NEW_LINE>Point2D_F64 p = pair.p1;<NEW_LINE>pointsAdj.grow().p2.setTo(pair.p2);<NEW_LINE>center.x += p.... | p.y - center.y); |
728,104 | public void marshall(CreateLicenseConfigurationRequest createLicenseConfigurationRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createLicenseConfigurationRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarsh... | createLicenseConfigurationRequest.getTags(), TAGS_BINDING); |
326,167 | public // region bulk<NEW_LINE>BulkRequest bulkRequest(List<?> queries, BulkOptions bulkOptions, IndexCoordinates index) {<NEW_LINE>BulkRequest bulkRequest = new BulkRequest();<NEW_LINE>if (bulkOptions.getTimeout() != null) {<NEW_LINE>bulkRequest.timeout(TimeValue.timeValueMillis(bulkOptions.getTimeout().toMillis()));<... | (UpdateQuery) query, index)); |
335,416 | private Point parsePoint() {<NEW_LINE>double x = data.getDouble();<NEW_LINE>double y = data.getDouble();<NEW_LINE>double z = Double.NaN;<NEW_LINE>double m = Double.NaN;<NEW_LINE>if (xyzmMode.hasZ()) {<NEW_LINE>z = data.getDouble();<NEW_LINE>}<NEW_LINE>if (xyzmMode.hasM()) {<NEW_LINE>m = data.getDouble();<NEW_LINE>}<NEW... | (0).setX(x); |
205,192 | public static ShardId selectSplitShard(int shardId, IndexMetaData sourceIndexMetadata, int numTargetShards) {<NEW_LINE>if (shardId >= numTargetShards) {<NEW_LINE>throw new IllegalArgumentException("the number of target shards (" + numTargetShards + ") must be greater than the shard id: " + shardId);<NEW_LINE>}<NEW_LINE... | numSourceShards + "] must be less that the number of target shards [" + numTargetShards + "]"); |
1,759,902 | public Object combine(JRCalculable calculable, JRCalculable calculableValue, AbstractValueProvider valueProvider) {<NEW_LINE>Number value = (Number) calculable.getIncrementedValue();<NEW_LINE>if (calculableValue.getValue() == null) {<NEW_LINE>if (calculable.isInitialized()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>r... | float v1 = value.floatValue(); |
674,189 | protected Collection<Method> toMethods(SootClass clazz) {<NEW_LINE>if (clazz.getMethods().isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String classType = SootToDexUtils.getDexTypeDescriptor(clazz.getType());<NEW_LINE>List<Method> methods = new ArrayList<Method>();<NEW_LINE>for (SootMethod sm : clazz.getMethod... | paramType = SootToDexUtils.getDexTypeDescriptor(tp); |
952,559 | public void exitRmm_route_type(Rmm_route_typeContext ctx) {<NEW_LINE>ImmutableSet.Builder<RouteMapMatchRouteType.Type> types = ImmutableSet.builder();<NEW_LINE>if (ctx.external != null) {<NEW_LINE>types.add(RouteMapMatchRouteType.Type.EXTERNAL);<NEW_LINE>}<NEW_LINE>if (ctx.internal != null) {<NEW_LINE>types.add(RouteMa... | add(RouteMapMatchRouteType.Type.NSSA_EXTERNAL); |
1,005,905 | protected // ////////////////////////////////////////////////////////////<NEW_LINE>void imageImpl(PImage image, float x1, float y1, float x2, float y2, int u1, int v1, int u2, int v2) {<NEW_LINE>pushMatrix();<NEW_LINE>translate(x1, y1);<NEW_LINE>int imageWidth = image.width;<NEW_LINE>int imageHeight = image.height;<NEW... | (y2 - y1) / imageHeight); |
889,826 | public QuotaBalanceVO findLaterBalanceEntry(final Long accountId, final Long domainId, final Date afterThis) {<NEW_LINE>return Transaction.execute(TransactionLegacy.USAGE_DB, new TransactionCallback<QuotaBalanceVO>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public QuotaBalanceVO doInTransaction(final TransactionStatus s... | "updatedOn", true, 0L, 1L); |
1,503,911 | void executeDeletePendingMembership(ResourceContext ctx, String domainName, String roleName, String normalizedMember, String auditRef, String caller) {<NEW_LINE>// our exception handling code does the check for retry count<NEW_LINE>// and throws the exception it had received when the retry<NEW_LINE>// count reaches 0<N... | final String principal = getPrincipalName(ctx); |
1,165,814 | public void resolveRelatives() {<NEW_LINE>if (labelref == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (LabelRef ref : labelref) {<NEW_LINE>if ((ref.labelIndex >= labeldef.size()) || (labeldef.get(ref.labelIndex) == null)) {<NEW_LINE>throw new SleighException("Reference to non-existant sleigh label");<NEW_LINE>}<NE... | ref.streampos + 5, res); |
1,128,469 | private Mesh createFrequencyMesh(short frequency, boolean active) {<NEW_LINE>MeshBuilder meshBuilder = renderer.meshBuilder();<NEW_LINE>final AEColor[] colors = Platform.p2p().toColors(frequency);<NEW_LINE>final CubeBuilder cb = new CubeBuilder(meshBuilder.getEmitter());<NEW_LINE>cb.setTexture(this.texture);<NEW_LINE>c... | [] offs = QUAD_OFFSETS[i]; |
1,829,548 | public void executeDmn(String decisionDefinitionId, Model model) throws AxelorException {<NEW_LINE>ProcessEngine processEngine = Beans.get(ProcessEngineService.class).getEngine();<NEW_LINE>FullContext context = new FullContext(model);<NEW_LINE>String varName = Beans.get(WkfCommonService.class).getVarName(EntityHelper.g... | .getName()), model); |
1,305,981 | void link() {<NEW_LINE>for (Map.Entry<StationElement, FeedScopedId> entry : stationElementsToStations.entrySet()) {<NEW_LINE>StationElement stationElement = entry.getKey();<NEW_LINE>FeedScopedId stationId = entry.getValue();<NEW_LINE>Station otpStation = otpStations.get(stationId);<NEW_LINE>if (otpStation == null) {<NE... | .addChildStop((Stop) stationElement); |
1,584,058 | public TransferAction prompt(final TransferItem item) {<NEW_LINE>final StringBuilder actions = new StringBuilder().append(StringUtils.LF);<NEW_LINE>final Set<TransferAction> options = new HashSet<TransferAction>(TransferAction.forTransfer(transfer));<NEW_LINE>options.add(TransferAction.cancel);<NEW_LINE>for (TransferAc... | action = TransferAction.forName(input); |
622,730 | public static void resizeHeap(int newHeapSize) {<NEW_LINE>if (newHeapSize <= heapSize) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int newStorageSize = calculateStorageSize(newHeapSize);<NEW_LINE>int newRegionsCount = calculateRegionsCount(newHeapSize, regionSize);<NEW_LINE>int newRegionsSize = calculateRegionsSize(newRegio... | .add(newStorageSize), PAGE_SIZE); |
307,845 | private static void createEventPoolAndEvents(LevelZeroContext context, LevelZeroDevice device, ZeEventPoolHandle eventPoolHandle, int poolEventFlags, int poolSize, ZeEventHandle kernelEvent) {<NEW_LINE>ZeEventPoolDescription eventPoolDescription = new ZeEventPoolDescription();<NEW_LINE>eventPoolDescription.setCount(poo... | eventDescription.setSignal(ZeEventScopeFlags.ZE_EVENT_SCOPE_FLAG_HOST); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.