idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,598,055 | private List<DriverLibraryMavenArtifact> parseGradle() throws DBException {<NEW_LINE>final List<DriverLibraryMavenArtifact> <MASK><NEW_LINE>final Matcher matcher = REGEX_FOR_GRADLE.matcher(fieldText.getText());<NEW_LINE>while (matcher.find()) {<NEW_LINE>String group = matcher.group(1);<NEW_LINE>String name = matcher.gr... | artifacts = new ArrayList<>(); |
224,681 | public BPacket toBValue(BObjectType objType, BValueSerializer serializer) {<NEW_LINE>String packagePath = objType.getPackagePath();<NEW_LINE>String typeName = objType.getName();<NEW_LINE>var flags = objType.flags;<NEW_LINE>BValue fields = serializer.toBValue(objType.getFields(), null);<NEW_LINE>BValue attachedFunctions... | packet.put(DEFAULT_INIT, defaultsValuesInitFunc); |
1,653,774 | public static void readURIParameters(TermVectorsRequest termVectorsRequest, RestRequest request) {<NEW_LINE>String fields = request.param("fields");<NEW_LINE>addFieldStringsFromParameter(termVectorsRequest, fields);<NEW_LINE>termVectorsRequest.offsets(request.paramAsBoolean("offsets", termVectorsRequest.offsets()));<NE... | , termVectorsRequest.fieldStatistics())); |
1,045,164 | public ServiceResponse serviceImpl(Query post, HttpServletResponse response, Authorization rights, final JsonObjectWithDefault permissions) throws APIException {<NEW_LINE>JSONObject jsonObject = new JSONObject();<NEW_LINE>String url = post.get("url", "");<NEW_LINE>if (url == null || url.isEmpty()) {<NEW_LINE><MASK><NEW... | jsonObject.put("message", "URL Not given"); |
605,045 | private void initialize(SWTSkinObjectTabFolder soTabFolder) {<NEW_LINE>MyTorrentsView.registerPluginViews();<NEW_LINE>if (tabbedMDI == null) {<NEW_LINE>tabbedMDI = new TabbedMDI(Download.class, VIEW_ID, "detailsview", getMdiEntry(), <MASK><NEW_LINE>tabbedMDI.buildMDI(soTabFolder);<NEW_LINE>} else {<NEW_LINE>System.out.... | manager == null ? dataSource : manager); |
694,534 | public static double circleCircleIntersectionArea(Point2D c1, double r1, Point2D c2, double r2) {<NEW_LINE>double r = r1, R = r2;<NEW_LINE>Point2D c = c1, C = c2;<NEW_LINE>if (r1 > r2) {<NEW_LINE>r = r2;<NEW_LINE>R = r1;<NEW_LINE>c = c2;<NEW_LINE>C = c1;<NEW_LINE>}<NEW_LINE>double dist = c1.distance(c2);<NEW_LINE>Point... | (d + r + R)); |
1,576,621 | public GameServerInstance unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GameServerInstance gameServerInstance = new GameServerInstance();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken t... | int originalDepth = context.getCurrentDepth(); |
1,841,634 | public boolean enterImportSpecifierNode(ImportSpecifierNode importSpecifierNode) {<NEW_LINE>if (importSpecifierNode.getIdentifier() != null) {<NEW_LINE>int start = importSpecifierNode<MASK><NEW_LINE>TokenSequence<? extends JsTokenId> ts = LexUtilities.getJsPositionedSequence(result.getSnapshot(), start);<NEW_LINE>if (t... | .getIdentifier().getFinish(); |
1,520,196 | public void onClick(View v) {<NEW_LINE>if (listener != null) {<NEW_LINE>listener.onChangeSkin(v, "smoothing", useSkinNatural);<NEW_LINE>}<NEW_LINE>if (!useSkinNatural) {<NEW_LINE>beautyViewHolder.skinBeautyImage.setImageResource(R.drawable.lsq_ic_skin_extreme_nor);<NEW_LINE>beautyViewHolder.skinBeautyName.<MASK><NEW_LI... | setText(R.string.lsq_filter_set_skin_extreme); |
1,578,042 | // Responds to an HTTP request using data from the request body parsed according to the<NEW_LINE>// "content-type" header.<NEW_LINE>@Override<NEW_LINE>public void service(HttpRequest request, HttpResponse response) throws IOException {<NEW_LINE>String name = null;<NEW_LINE>// Default values avoid null issues (with swit... | .getReader().readLine(); |
1,065,334 | public static ListDegradeRulesOfResourceResponse unmarshall(ListDegradeRulesOfResourceResponse listDegradeRulesOfResourceResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDegradeRulesOfResourceResponse.setRequestId(_ctx.stringValue("ListDegradeRulesOfResourceResponse.RequestId"));<NEW_LINE>listDegradeRulesOfResourceRe... | ("ListDegradeRulesOfResourceResponse.Data.Datas[" + i + "].MinRequestAmount")); |
326,003 | public static DataSet<FeatureMeta> createCategoricalMetaFromStringIndexer(final DataSet<Row> stringIndexerModel, final Params params) {<NEW_LINE>return stringIndexerModel.reduceGroup(new GroupReduceFunction<Row, FeatureMeta>() {<NEW_LINE><NEW_LINE>private static final long serialVersionUID = 8374084070326048116L;<NEW_L... | lookUpCols = new ArrayList<>(); |
1,355,874 | private String serializeSearchGroup(SearchGroup group) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(MetadataSerializationConfiguration.SEARCH_GROUP_ID);<NEW_LINE>sb.append(StringUtil.quote(group.getName(), MetadataSerializationConfiguration.GROUP_UNIT_SEPARATOR, MetadataSerializationConfigurati... | sb.append(MetadataSerializationConfiguration.GROUP_UNIT_SEPARATOR); |
35,836 | public boolean validateKeySpecifier(List<String> fieldNameList, BType constraint, Location pos) {<NEW_LINE>for (String fieldName : fieldNameList) {<NEW_LINE>BField field = <MASK><NEW_LINE>if (field == null) {<NEW_LINE>dlog.error(pos, DiagnosticErrorCode.INVALID_FIELD_NAMES_IN_KEY_SPECIFIER, fieldName, constraint);<NEW_... | types.getTableConstraintField(constraint, fieldName); |
686,309 | private void addWorker(final Worker worker) {<NEW_LINE>synchronized (workers) {<NEW_LINE>log.info("Worker[%s] reportin' for duty!", worker.getHost());<NEW_LINE>cancelWorkerCleanup(worker.getHost());<NEW_LINE>WorkerHolder holder = workers.get(worker.getHost());<NEW_LINE>if (holder == null) {<NEW_LINE>List<TaskAnnounceme... | ().getLocation())); |
57,341 | protected String expandDate(String date) throws ParseException {<NEW_LINE>// Fix date in case format not completely correct<NEW_LINE>date = date.replace('.', '/');<NEW_LINE>String[] <MASK><NEW_LINE>Date humanDate;<NEW_LINE>if (Integer.parseInt(dateParts[0]) > 12) {<NEW_LINE>humanDate = DateFormat.getPatternInstance("dd... | dateParts = date.split("/"); |
94,404 | private SortedMap<KeyExtent, Files> computeMappingFromPlan(FileSystem fs, TableId tableId, Path srcPath, int maxTablets) throws IOException, AccumuloException, AccumuloSecurityException, TableNotFoundException {<NEW_LINE>Map<String, List<Destination>> fileDestinations = plan.getDestinations().stream().collect(groupingB... | mapping = new TreeMap<>(); |
717,647 | static boolean isAssigningReference(Node n) {<NEW_LINE>Node parent = n.getParent();<NEW_LINE>Node gparent = parent.getParent();<NEW_LINE>switch(parent.getToken()) {<NEW_LINE>case LET:<NEW_LINE>case CONST:<NEW_LINE>case VAR:<NEW_LINE>// value assigned<NEW_LINE>return n.hasChildren();<NEW_LINE>case STRING_KEY:<NEW_LINE>r... | return parent.getFirstChild() != n; |
1,514,565 | public void updateSupportedExtensions(Map map) {<NEW_LINE>try {<NEW_LINE>Iterator itr = map<MASK><NEW_LINE>while (itr.hasNext()) {<NEW_LINE>Map.Entry extension = (Map.Entry) itr.next();<NEW_LINE>String ext_name;<NEW_LINE>Object ext_key = extension.getKey();<NEW_LINE>if (ext_key instanceof byte[]) {<NEW_LINE>ext_name = ... | .entrySet().iterator(); |
1,704,077 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.single_date_picker_activity_main);<NEW_LINE>final SingleDateAndTimePicker singleDateAndTimePicker = findViewById(R.id.single_day_picker);<NEW_LINE>final SingleDateAndTimePicker singleDateAn... | findViewById(R.id.single_day_picker2); |
600,893 | protected void documentToAnswer(JCas jcas, SolrDocument doc, int isLast, JCas questionView) throws Exception {<NEW_LINE>Integer id = (Integer) doc.getFieldValue("id");<NEW_LINE>String title = (String) doc.getFieldValue("titleText");<NEW_LINE>logger.info(" FOUND: " + id + " " + (title != null ? title : ""));<NEW_LINE>jc... | AnswerResource ar = new AnswerResource(jcas); |
833,649 | private boolean safeCallToPrimateParseMethod(XMethod calledMethod, Location location) {<NEW_LINE>int position = location.getHandle().getPosition();<NEW_LINE>if ("java.lang.Integer".equals(calledMethod.getClassName())) {<NEW_LINE>ConstantPool constantPool = classContext<MASK><NEW_LINE>Code code = method.getCode();<NEW_L... | .getJavaClass().getConstantPool(); |
95,974 | public void prepareMessagesToShare(ArrayList<AndroidMegaChatMessage> androidMessagesSelected, long idChat) {<NEW_LINE>if (androidMessagesSelected == null || androidMessagesSelected.isEmpty())<NEW_LINE>return;<NEW_LINE>logDebug("Number of messages: " + androidMessagesSelected.size() + ",Chat ID: " + idChat);<NEW_LINE>Ar... | messagesToImport = new ArrayList<>(); |
1,817,722 | // check task exists or not before call method<NEW_LINE>private void executeTaskOnTxnStatusChanged(RoutineLoadTaskInfo routineLoadTaskInfo, TransactionState txnState, TransactionStatus txnStatus, TransactionState.TxnStatusChangeReason txnStatusChangeReason) throws UserException {<NEW_LINE>// step0: get progress from tr... | (RLTaskTxnCommitAttachment) txnState.getTxnCommitAttachment(); |
886,421 | private void logPeriodically() {<NEW_LINE>long now = DateTimeUtils.currentTimeMillis();<NEW_LINE>// can't be updated from the async callback<NEW_LINE>WRITE_LATENCY_MS.update(sumPutRequestLatency.get(now), numPutRequests.get(now), minPutRequestLatency.get(now), maxPutRequestLatency.get(now));<NEW_LINE>if (now > nextLogT... | putRequests = numPutRequests.get(now); |
1,016,121 | public TagCostEstimationResourceCollectionFilter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TagCostEstimationResourceCollectionFilter tagCostEstimationResourceCollectionFilter = new TagCostEstimationResourceCollectionFilter();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE... | String currentParentElement = context.getCurrentParentElement(); |
1,785,338 | public void marshall(NotebookInstanceSummary notebookInstanceSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (notebookInstanceSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(notebookInstanc... | notebookInstanceSummary.getUrl(), URL_BINDING); |
1,094,083 | public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {<NEW_LINE>for (int i = 0; i < iterations; ++i) {<NEW_LINE>final long block0 = blocks[blocksOffset++];<NEW_LINE>values[valuesOffset++] = (int) (block0 >>> 52);<NEW_LINE>values[valuesOffset++] = (int) ((block0 >>> 40) & 4... | >>> 16) & 4095L); |
708,352 | void writeBatch(ChannelHandlerContext ctx, ChannelPromise promise) {<NEW_LINE>try {<NEW_LINE>FullHttpRequest request = buildRequest(ctx, currentMessage);<NEW_LINE>int eventListSize = currentMessage.getEventList().size();<NEW_LINE>batchSize.set((double) eventListSize);<NEW_LINE>final long start = clock.millis();<NEW_LIN... | LOG.debug("unable to serialize batch", e); |
56,213 | public void updateContentFromFile(DBRProgressMonitor monitor, Object value) throws DBException {<NEW_LINE>if (valueController.isReadOnly()) {<NEW_LINE>throw new DBCException("Can't update read-only value");<NEW_LINE>}<NEW_LINE>if (value instanceof DBDContent) {<NEW_LINE>DBDContent content = (DBDContent) value;<NEW_LINE... | content.updateContents(monitor, storage); |
770,502 | private static CudaLibrary loadLibrary() {<NEW_LINE>try {<NEW_LINE>if (System.getProperty("os.name").startsWith("Win")) {<NEW_LINE>String path = System.getenv("PATH");<NEW_LINE>if (path == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Pattern p = Pattern.compile("cudart64_\\d+\\.dll");<NEW_LINE>String cudaPath = Sy... | ()).matches()); |
955,611 | public Object clusterOverview(HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>if (!Env.getCurrentEnv().isMaster()) {<NEW_LINE>return redirectToMaster(request, response);<NEW_LINE>}<NEW_LINE>Map<String, Object<MASK><NEW_LINE>Env env = Env.getCurrentEnv();<NEW_LINE>SystemInfoService infoService = Env... | > resultMap = Maps.newHashMap(); |
379,335 | /*<NEW_LINE>* The entry of replacing partitions with temp partitions.<NEW_LINE>*/<NEW_LINE>public void replaceTempPartition(Database db, OlapTable olapTable, ReplacePartitionClause clause) throws DdlException {<NEW_LINE>Preconditions.checkState(olapTable.isWriteLockHeldByCurrentThread());<NEW_LINE>List<String> partitio... | partitionNames, tempPartitionNames, isStrictRange, useTempPartitionName); |
1,446,412 | public static void hotSwap(ReInitializable r) {<NEW_LINE>OverrideConfig o = r.getOverrideConfig();<NEW_LINE>r.reInitialize();<NEW_LINE>switch(o.configuredBy) {<NEW_LINE>case FILE:<NEW_LINE>r.configure(File.class.cast(o.config));<NEW_LINE>break;<NEW_LINE>case NONE:<NEW_LINE>r.configure();<NEW_LINE>break;<NEW_LINE>case S... | ), e.getValue()); |
1,780,418 | public UserDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UserDetails userDetails = new UserDetails();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | class).unmarshall(context)); |
104,352 | public JsonResult execute() throws InvalidHttpRequestBodyException {<NEW_LINE>String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID);<NEW_LINE>String feedbackSessionName = getNonNullRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME);<NEW_LINE>FeedbackSessionAttributes feedbackSession = getNo... | getSubmissionStartTime(), timeZone, true); |
769,563 | public String normalizeConfigPath(final String path) {<NEW_LINE>if (StringUtil.isBlank(path)) {<NEW_LINE>return StringUtils.EMPTY;<NEW_LINE>}<NEW_LINE>final String p = path.trim();<NEW_LINE>if (p.startsWith("#")) {<NEW_LINE>return StringUtils.EMPTY;<NEW_LINE>}<NEW_LINE>if (p.startsWith(GsaConfigParser.CONTAINS)) {<NEW_... | GsaConfigParser.REGEXP_IGNORE_CASE.length()); |
1,687,936 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | Context.NONE).getValue(); |
287,436 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "string" };<NEW_LINE>String text = "@name('s0') select irstream a.p00||b.p10 as string from pattern [every a=SupportBean_S0 -> b=SupportBean_S1]#unique(a.id)#unique(b.id) retain-union";<NEW_LINE>env.compileDeployAddListenerMileZero(t... | , toArr("E3E4", "E5E6")); |
1,170,867 | public static ProcessBuilder createProcessBuilder(File workingDir, String[] cmd, String[] extra_env) throws IOException {<NEW_LINE>ProcessBuilder pb;<NEW_LINE>Map<String, String> newEnv = new HashMap<>();<NEW_LINE>newEnv.putAll(System.getenv());<NEW_LINE>newEnv.put("LANG", "C.UTF-8");<NEW_LINE>if (extra_env != null && ... | 1], extra_env[i]); |
41,319 | List<Long> jfrCheck() {<NEW_LINE>if (!isJfrAvailable()) {<NEW_LINE>throw new UnsupportedOperationException();<NEW_LINE>}<NEW_LINE>String recordings = getJfrCheck();<NEW_LINE>if (recordings == null) {<NEW_LINE>return Collections.EMPTY_LIST;<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>String[] lines = recordings.split("\\r?\\... | index = line.indexOf(JCMD_JFR_CHECK_RECORDING_ID); |
1,498,362 | protected void doOKAction() {<NEW_LINE>String oldName = myList.getName();<NEW_LINE>String oldComment = myList.getComment();<NEW_LINE>if (!Comparing.equal(oldName, myPanel.getChangeListName()) && ChangeListManager.getInstance(myProject).findChangeList(myPanel.getChangeListName()) != null) {<NEW_LINE>Messages.showErrorDi... | myList.getName(), newName); |
1,425,924 | public boolean overlaps(TupleDomain<T> other) {<NEW_LINE>requireNonNull(other, "other is null");<NEW_LINE>if (this.isNone() || other.isNone()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (this == other || this.isAll() || other.isAll()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Map<T, Domain> thisDomains <MASK><NE... | = this.domains.orElseThrow(); |
105,015 | private void loadActivities() {<NEW_LINE>synchronized (mActivityItems) {<NEW_LINE>mActivityItems.clear();<NEW_LINE>if (getPackageInfoInternal() == null || mPackageInfo.activities == null) {<NEW_LINE>mActivities.postValue(mActivityItems);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (ActivityInfo activityInfo : mPackageInfo... | AppDetailsComponentItem componentItem = new AppDetailsComponentItem(activityInfo); |
54,959 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject sourceObject = source.getSourceObject(game);<NEW_LINE>if (player == null || sourceObject == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Cards cards = new CardsImpl(player.getLi... | card, game, source, false); |
1,192,771 | protected String internalAssertResponse(MessageExchange messageExchange, SubmitContext context) throws AssertionException {<NEW_LINE>Map<String, String> checkMap = createCheckMap(context);<NEW_LINE>List<AssertionError> assertionErrorList = new ArrayList<AssertionError>();<NEW_LINE>String response = messageExchange.getR... | + token + "] found [" + match + "]"; |
721,071 | protected void loadFavicons(String designPath) {<NEW_LINE>favicons.put(PN_FAVICON_ICO, getFaviconPath(designPath, FN_FAVICON_ICO));<NEW_LINE>favicons.put(PN_FAVICON_PNG, getFaviconPath(designPath, FN_FAVICON_PNG));<NEW_LINE>favicons.put(PN_TOUCH_ICON_120, getFaviconPath(designPath, FN_TOUCH_ICON_120));<NEW_LINE>favicon... | , getFaviconPath(designPath, FN_TOUCH_ICON_60)); |
1,509,727 | public static JsonArray timeSeriesByIDAndPIDToJson(List<Object[]> results) {<NEW_LINE>JsonArrayBuilder jab = Json.createArrayBuilder();<NEW_LINE>Map<Integer, Long> totals = new HashMap<Integer, Long>();<NEW_LINE>Map<Integer, String> pids = new HashMap<Integer, String>();<NEW_LINE>String curDate = (String) results.get(0... | .get(i)[0]; |
755,210 | protected void downloadSucceeded(Download download, File torrent_file, File data_dir) {<NEW_LINE>synchronized (this) {<NEW_LINE>if (completed) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>completed = true;<NEW_LINE>}<NEW_LINE>reportActivity("Torrent download complete");<NEW_LINE>// assumption is that this is a SIMPLE torrent... | FileUtil.copyFile(actual_target_file, target_file); |
43,911 | public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception {<NEW_LINE>if (reader.getLocalName().equals(XmlElementNames.NumberOfMembers)) {<NEW_LINE>this.numberOfMembers = reader.readElementValue(Integer.class);<NEW_LINE>return true;<NEW_LINE>} else if (reader.getLocalName().equals(XmlElementNames... | reader.readElementValue(Integer.class); |
809,133 | public int[] determineOceans(int chunkX, int chunkZ, int[] oceansIn, double[] temperatureNoises, double[] rainfallNoises) throws InvocationTargetException, IllegalAccessException {<NEW_LINE>int[] oceans = (oceansIn != null && oceansIn.length >= 16 * 16) ? oceansIn : new int[16 * 16];<NEW_LINE>double[] noises = this.cal... | isFrozen ? FROZEN_OCEAN : OCEAN) : LAND; |
1,760,167 | public void connecting04(Vertx vertx) {<NEW_LINE>// Connect options<NEW_LINE>MySQLConnectOptions connectOptions = new MySQLConnectOptions().setPort(3306).setHost("the-host").setDatabase("the-db").setUser("user").setPassword("secret");<NEW_LINE>// Pool options<NEW_LINE>PoolOptions poolOptions = new PoolOptions().setMaxS... | cause().getMessage()); |
256,058 | private void bindProperty(String property, JCheckBox auto, JLabel min, JLabel max, JSlider slider, JLabel label, JTextField value, JLabel def) {<NEW_LINE>IntegerConverter intConverter = new IntegerConverter();<NEW_LINE>bind(UpdateStrategy.READ_WRITE, camera, property + ".auto", auto, "selected");<NEW_LINE>bind(UpdateSt... | property + ".supported", label, "enabled"); |
1,852,092 | final TableRestoreStatus executeRestoreTableFromClusterSnapshot(RestoreTableFromClusterSnapshotRequest restoreTableFromClusterSnapshotRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(restoreTableFromClusterSnapshotRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.ge... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,255,818 | protected void onCreate(@Nullable Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>final ValueAnimator animator = ValueAnimator.ofFloat(0, 1);<NEW_LINE>animator.setDuration(ONE_SECOND);<NEW_LINE>animator.setRepeatMode(ValueAnimator.REVERSE);<NEW_LINE>animator.setRepeatCount(ValueAnimat... | (d, START_COLOR, END_COLOR)); |
441,757 | private void rebuildReasonerMenu(JMenuBar menuBar) {<NEW_LINE>final OWLModelManager mngr = getOWLModelManager();<NEW_LINE>java.util.Optional<JMenu> menu = getReasonerMenu(menuBar);<NEW_LINE>if (!menu.isPresent()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>reasonerMenu.removeAll();<NEW_LINE>startReasonerActi... | JMenu reasonerMenu = menu.get(); |
1,286,090 | public void shutdown(Language pcodelanguage, String xmlOptions) {<NEW_LINE>OutputStream debugStream;<NEW_LINE>if (debugFile.exists()) {<NEW_LINE>debugFile.delete();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>debugStream = new BufferedOutputStream(new FileOutputStream(debugFile));<NEW_LINE>} catch (FileNotFoundException e) {<NE... | toString().getBytes()); |
1,372,938 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static long timeout(com.sun.jdi.event.MonitorWaitEvent a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JD... | Mirror) a).virtualMachine(); |
913,017 | private Field parseField(final NodeList nodeList, final int nodeIndex) {<NEW_LINE>final Node node = nodeList.item(nodeIndex);<NEW_LINE>final String typeName = getAttributeValue(node, "type");<NEW_LINE>final Type fieldType = typeByNameMap.get(typeName);<NEW_LINE>if (fieldType == null) {<NEW_LINE>handleError(node, "could... | field.validate(node, typeByNameMap); |
459,225 | private static JdbcCatalog createCatalog(Params params, ClassLoader classLoader) {<NEW_LINE>String catalogName = params.get(MySqlCatalogParams.CATALOG_NAME);<NEW_LINE>CatalogFactory factory = createCatalogFactory(classLoader);<NEW_LINE>Map<String, String> properties = new HashMap<>();<NEW_LINE>properties.put(CATALOG_MY... | catalogName, properties, null, null); |
67,774 | protected boolean readLine() throws IOException {<NEW_LINE>if (!scan.hasNext()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String cmd = scan.next();<NEW_LINE>if (cmd.startsWith("#")) {<NEW_LINE>// skip entire comment until next line<NEW_LINE>return nextStatement();<NEW_LINE>} else if (cmd.equals("v")) {<NEW_LINE>// v... | Level.WARNING, "Unknown statement in OBJ! {0}", cmd); |
1,629,708 | // updateData<NEW_LINE>public WindowTabDataDocument readData(ModelCRUDRequestDocument req) throws XFireFault {<NEW_LINE>WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance();<NEW_LINE>WindowTabData resp = ret.addNewWindowTabData();<NEW_LINE>ModelCRUD modelCRUD = req<MASK><NEW_LINE>String serviceType =... | .getModelCRUDRequest().getModelCRUD(); |
1,782,859 | public void map(AvroKey<GenericRecord> key, NullWritable value, Context context) throws IOException, InterruptedException {<NEW_LINE>GenericRecord record = key.datum();<NEW_LINE>if (_sortingColumn != null) {<NEW_LINE>Object object = record.get(_sortingColumn);<NEW_LINE>Object valueToConvert = object != null ? _avroReco... | , _sortingColumn, record), e); |
653,585 | final GetRecommendationReportDetailsResult executeGetRecommendationReportDetails(GetRecommendationReportDetailsRequest getRecommendationReportDetailsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRecommendationReportDetailsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRecommendationReportDetails"); |
456,974 | public void render(@Nonnull EntityObsidianTNT tnt, float entityYaw, float partialTick, @Nonnull PoseStack matrix, @Nonnull MultiBufferSource renderer, int light) {<NEW_LINE>matrix.pushPose();<NEW_LINE>matrix.translate(0, 0.5, 0);<NEW_LINE>if (tnt.getFuse() - partialTick + 1.0F < 10.0F) {<NEW_LINE>float f = 1.0F - (tnt.... | ) / 5 % 2 == 0); |
1,103,614 | private boolean loadUntilInternal(long until) {<NEW_LINE>long index = resolveStartIndex();<NEW_LINE>if (index < 0)<NEW_LINE>return true;<NEW_LINE>try {<NEW_LINE>while (index <= until) {<NEW_LINE>ScheduleSetSegment <MASK><NEW_LINE>if (segment == null) {<NEW_LINE>long nextIndex = facade.higherScheduleBaseOffset(index);<N... | segment = facade.loadScheduleLogSegment(index); |
287,579 | public void fromStream() {<NEW_LINE>subclasses = null;<NEW_LINE>superClasses.clear();<NEW_LINE>name = document.field("name");<NEW_LINE>if (document.containsField("shortName"))<NEW_LINE>shortName = document.field("shortName");<NEW_LINE>else<NEW_LINE>shortName = null;<NEW_LINE>if (document.containsField("description"))<N... | field("customFields", OType.EMBEDDEDMAP); |
850,926 | final ListRealtimeContactAnalysisSegmentsResult executeListRealtimeContactAnalysisSegments(ListRealtimeContactAnalysisSegmentsRequest listRealtimeContactAnalysisSegmentsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRealtimeContactAnalysisSegmentsRequest);<NEW_LINE>AWSRequestMetrics ... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
715,625 | public void handleBookiesThatJoined(Set<BookieId> joinedBookies) {<NEW_LINE>Map<String, Set<BookieId>> perRegionClusterChange = new HashMap<String, Set<BookieId>>();<NEW_LINE>// node joined<NEW_LINE>for (BookieId addr : joinedBookies) {<NEW_LINE>BookieNode node = createBookieNode(addr);<NEW_LINE>topology.add(node);<NEW... | = new HashSet<BookieId>(); |
202,997 | private void init() {<NEW_LINE>this.hasDistinct = false;<NEW_LINE>this.topNumber = -1;<NEW_LINE>this.limitNumber = -1;<NEW_LINE>this.offsetNumber = -1;<NEW_LINE>this.parallelNumber = 1;<NEW_LINE>// must be null when init<NEW_LINE>this.distinctGatherField = null;<NEW_LINE>this.levelMap = new LinkedHashMap<String, String... | = new ArrayList<Object>(); |
1,090,590 | private Boolean handleImageMissing(Image img, boolean recap) {<NEW_LINE>log(logLevel, "handleImageMissing: %s", img.getName());<NEW_LINE>ObserveEvent evt = null;<NEW_LINE>FindFailedResponse response = findFailedResponse;<NEW_LINE>if (!recap && imageMissingHandler != null) {<NEW_LINE>log(logLevel, "handleImageMissing: c... | String path = ImagePath.getBundlePath(); |
369,159 | public void marshall(CreateMeetingWithAttendeesRequest createMeetingWithAttendeesRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createMeetingWithAttendeesRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarsh... | createMeetingWithAttendeesRequest.getMeetingFeatures(), MEETINGFEATURES_BINDING); |
1,517,183 | public Request<CreateUserRequest> marshall(CreateUserRequest createUserRequest) {<NEW_LINE>if (createUserRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<CreateUserRequest> request = new DefaultRequest<CreateUserRequest>(createUserRequest,... | (createUserRequest.getPermissionsBoundary())); |
839,908 | public void jsConstructor(final String type, final ScriptableObject details) {<NEW_LINE>super.jsConstructor(type, details);<NEW_LINE>if (getBrowserVersion().hasFeature(EVENT_ONMESSAGE_DEFAULT_DATA_NULL)) {<NEW_LINE>data_ = null;<NEW_LINE>}<NEW_LINE>String origin = "";<NEW_LINE>String lastEventId = "";<NEW_LINE>if (deta... | lastEventId = Context.toString(detailLastEventId); |
1,854,302 | private static boolean prefixExists(RowExpression expression, Set<RowExpression> allExpressions) {<NEW_LINE>int[] referenceCount = { 0 };<NEW_LINE>expression.accept(new DefaultRowExpressionTraversalVisitor<int[]>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void visitSpecialForm(SpecialFormExpression specialForm, i... | base.accept(this, context); |
616,466 | public void openImage(final File file) {<NEW_LINE>try {<NEW_LINE>// Ignore same file opening<NEW_LINE>if (imageSrc != null && file.getAbsolutePath().equals(imageSrc)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Check if changes save needed<NEW_LINE>if (!continueAfterSave()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Ignor... | fileTree.expandToFile(file, true); |
299,905 | private void doConvert(String key, Object value) {<NEW_LINE>if (value == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (value instanceof Class) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Class type = org.springframework.util.ClassUtils.getUserClass(value);<NEW_LINE>if (basicClass.contains(type) || value instanceof Number... | HttpParameterConverter converter = new HttpParameterConverter(value); |
1,650,057 | final GetSuiteResult executeGetSuite(GetSuiteRequest getSuiteRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSuiteRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>R... | invoke(request, responseHandler, executionContext); |
1,210,365 | public void MakeDirectory(FileScope scope, String directoryName, final Continuation<Boolean> continuation) {<NEW_LINE>if (scope == FileScope.Asset) {<NEW_LINE>form.dispatchErrorOccurredEvent(this, "MakeDirectory", ErrorMessages.ERROR_CANNOT_MAKE_DIRECTORY, directoryName);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>new Single... | file = scopedFile.resolve(form); |
525,572 | public com.squareup.okhttp.Call chatNewCall(String message, Double channelID, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<... | localVarFormParams.put("channelID", channelID); |
645,657 | public static void main(final String[] args) {<NEW_LINE>final String topic = args.length > 0 ? args[0] : DEFAULT_TOPIC;<NEW_LINE>final String bootstrapServers = args.length > 1 ? args[1] : DEFAULT_BOOTSTRAP_SERVERS;<NEW_LINE>final String schemaRegistryUrl = args.length > 2 ? args[2] : DEFAULT_SCHEMA_REGISTRY_URL;<NEW_L... | put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "true"); |
1,150,535 | private static void populateCopyObjectHeaders(CopyObjectRequest copyObjectRequest, Map<String, String> headers) {<NEW_LINE>String copySourceHeader = "/" + copyObjectRequest.getSourceBucketName() + "/" + HttpUtil.urlEncode(copyObjectRequest.getSourceKey(), DEFAULT_CHARSET_NAME);<NEW_LINE>if (copyObjectRequest.getSourceV... | headers, copyObjectRequest.getRequestPayer()); |
38,703 | private boolean rename(String src, String dst) throws IOException {<NEW_LINE>src = stripPath(src);<NEW_LINE>dst = stripPath(dst);<NEW_LINE>IOException te = null;<NEW_LINE>RetryPolicy retryPolicy = new CountingRetry(MAX_TRY);<NEW_LINE>while (retryPolicy.attempt()) {<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>CephStat stat =... | mMount.rename(src, dst); |
477,118 | public static void main(String[] args) throws Exception {<NEW_LINE>Properties properties = Utils.readPropertiesFile(ExampleConstants.CONFIG_FILE_NAME);<NEW_LINE>final String eventMeshIp = properties.getProperty(ExampleConstants.EVENTMESH_IP);<NEW_LINE>final int eventMeshTcpPort = Integer.parseInt(properties.getProperty... | UserAgent userAgent = EventMeshTestUtils.generateClient1(); |
1,045,939 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_forwarded);<NEW_LINE>Intent intent = getIntent();<NEW_LINE>if (intent != null) {<NEW_LINE>messageId = intent.getStringExtra(KEY_MESSAGE_ID);<NEW_LINE>account = intent.getParcelable... | ().getAccountMainColor(account)); |
1,000,498 | public void deleteTask(ServerConfig serverConfig, String taskId) {<NEW_LINE>if (taskId == null) {<NEW_LINE>throw new IllegalArgumentException("Task id is required");<NEW_LINE>}<NEW_LINE>JsonNode taskNode = getTask(serverConfig, taskId, false);<NEW_LINE>if (taskNode.has("endTime")) {<NEW_LINE>JsonNode endTimeNode = task... | (RUNTIME_TASK_URL, taskId) + "?cascadeHistory=true"); |
414,153 | public AwsJobAbortConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJobAbortConfig awsJobAbortConfig = new AwsJobAbortConfig();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token... | int originalDepth = context.getCurrentDepth(); |
1,802,830 | private void processTupleBatchEvent(Tuple tuple) {<NEW_LINE>try {<NEW_LINE>if ((!isSystemBolt && tuple.getSourceStreamId().equals(Common.TOPOLOGY_MASTER_CONTROL_STREAM_ID)) || tuple.getSourceStreamId().equals(Common.TOPOLOGY_MASTER_REGISTER_METRICS_RESP_STREAM_ID)) {<NEW_LINE>if (tuple.getValues().get(0) instanceof Pai... | , List<Object>>) value; |
1,609,545 | final GetReplicationSetResult executeGetReplicationSet(GetReplicationSetRequest getReplicationSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getReplicationSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,154,810 | public static DateValue parseDate(String s) {<NEW_LINE>Matcher matcher = suTimeDateFormat.matcher(s.toUpperCase());<NEW_LINE>if (matcher.matches()) {<NEW_LINE>String yS = matcher.group(1), mS = matcher.group(2), dS = matcher.group(3);<NEW_LINE>int y = -1, m = -1, d = -1;<NEW_LINE>if (!(yS == null || yS.isEmpty() || yS.... | d = Integer.parseInt(dS); |
576,769 | void notifyLocationUpdated() {<NEW_LINE>if (mSavedLocation == null) {<NEW_LINE>mLogger.d(TAG, "No saved location - skip");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (LocationListener listener : <MASK><NEW_LINE>mListeners.finishIterate();<NEW_LINE>// TODO: consider to create callback mechanism to transfer 'ROUTE_IS_FINIS... | mListeners) listener.onLocationUpdated(mSavedLocation); |
753,203 | public void readSettings(Object settings) {<NEW_LINE>WizardDescriptor wizard = (WizardDescriptor) settings;<NEW_LINE>wizardDesc = wizard;<NEW_LINE>// NOI18N<NEW_LINE>connection = (DatabaseConnection) wizard.getProperty("connection");<NEW_LINE>// NOI18N<NEW_LINE>masterTable = (String) wizard.getProperty("master");<NEW_L... | String) wizard.getProperty("detailTable"); |
1,266,357 | protected void work() {<NEW_LINE>Map<TailFile, List<Map>> serverlogs = null;<NEW_LINE>try {<NEW_LINE>TailFile tf = (TailFile) this.get("tfevent");<NEW_LINE>this.setCurrenttfref((TaildirLogComponent<MASK><NEW_LINE>// tfref = ((TaildirLogComponent) this.get("tfref"));<NEW_LINE>serverlogs = this.getCurrenttfref().tailFile... | ) this.get("tfref")); |
1,834,521 | public Variable emitFusedMultiplyAdd(Value a, Value b, Value c) {<NEW_LINE>Variable result = getLIRGen().newVariable(LIRKind.combine(a, b, c));<NEW_LINE>assert ((AMD64Kind) a.getPlatformKind()).isXMM() && ((AMD64Kind) b.getPlatformKind()).isXMM() && ((AMD64Kind) c.<MASK><NEW_LINE>assert a.getPlatformKind().equals(b.get... | getPlatformKind()).isXMM(); |
200,508 | public void openReaderContext(ShardId shardId, TimeValue keepAlive, ActionListener<ShardSearchContextId> listener) {<NEW_LINE>checkKeepAliveLimit(keepAlive.millis());<NEW_LINE>final IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());<NEW_LINE>final IndexShard shard = indexService.getShard(s... | SearchOperationListener searchOperationListener = shard.getSearchOperationListener(); |
811,683 | private <T extends HasDescription & HasAnnotations<?>> Stream<Dependency> annotationDependencies(T annotated) {<NEW_LINE>final Stream.Builder<Dependency<MASK><NEW_LINE>for (final JavaAnnotation<?> annotation : annotated.getAnnotations()) {<NEW_LINE>Dependency.tryCreateFromAnnotation(annotation).forEach(addToStream);<NE... | > addToStream = Stream.builder(); |
822,777 | public void deleteOrder(String orderId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {<NEW_LINE>Object localVarBody = null;<NEW_LINE>// verify the required parameter 'orderId' is set<NEW_LINE>if (orderId == null) {<NEW_LINE>resultHandler.handle(ApiException.fail(400, "Missing the required para... | MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); |
1,517,262 | private static void openFile(@NotNull VirtualFile file) {<NEW_LINE>final Project project = ProjectUtil.guessProjectForFile(file);<NEW_LINE>final FlutterSdk sdk = project != null ? FlutterSdk.getFlutterSdk(project) : null;<NEW_LINE>if (sdk == null) {<NEW_LINE>FlutterSdkAction.showMissingSdkDialog(project);<NEW_LINE>retu... | , buildArg).startInConsole(project); |
543,233 | public void run() {<NEW_LINE>// Make sure that the directory exists.<NEW_LINE>if (directory.exists()) {<NEW_LINE>List<File> backups = Arrays.asList(directory.listFiles());<NEW_LINE>if (backups.size() > MAX_BACKUPS) {<NEW_LINE>try {<NEW_LINE>purgeBackups(backups);<NEW_LINE>} catch (IOException e) {<NEW_LINE>Slimefun.log... | .now()) + ".zip"); |
1,703,574 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>output.writeInt32(1, currentNumberScheduled_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (((... | output.writeInt32(2, numberMisscheduled_); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.