idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,196,729 | public static boolean deleteRealm(String canonicalPath, File realmFolder, String realmFileName) {<NEW_LINE>final String management = ".management";<NEW_LINE>File managementFolder = new File(realmFolder, realmFileName + management);<NEW_LINE>File realmFile = new File(canonicalPath);<NEW_LINE>// This file is not always s... | , realmFile.getAbsolutePath())); |
521,664 | private void drawText(Canvas canvas, CharSequence text, int start, int end, int textWidth) {<NEW_LINE>if (end <= start || end > text.length() || start >= text.length()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (mIsInDrawSpan && mCurrentDrawSpan != null) {<NEW_LINE>@ColorInt<NEW_LINE>int color = mCurrentDrawSpan.isPres... | mCurrentDrawUsedWidth + textWidth, bottom, mDecorationPaint); |
1,013,765 | public ConfigManager putObject(@NonNull String key, @NonNull Object v) {<NEW_LINE>if (v == null || key == null) {<NEW_LINE>throw new NullPointerException("null key/value not allowed");<NEW_LINE>}<NEW_LINE>if (v instanceof Float || v instanceof Double) {<NEW_LINE>putFloat(key, ((Number) v).floatValue());<NEW_LINE>} else... | , (byte[]) v); |
219,409 | public static void main(String[] args) throws ParseException {<NEW_LINE>String date = LocalDate.now().toString();<NEW_LINE><MASK><NEW_LINE>String incrementedDateJava8 = DateIncrementer.addOneDay(date);<NEW_LINE>log.info("Date incremented by one day using (Java 8): " + incrementedDateJava8);<NEW_LINE>String incrementedD... | log.info("Current date = " + date); |
845,902 | protected List<? extends JComponent> createPreviewElements() {<NEW_LINE>final AsyncTreeDataProvider<SampleNode> leftDataProvider = SampleData.createDelayingAsyncDataProvider();<NEW_LINE>final WebAsyncTree left = new WebAsyncTree(getStyleId(), leftDataProvider, new SampleTreeCellEditor());<NEW_LINE>left.setVisibleRowCou... | right.setTransferHandler(createTransferHandler()); |
755,598 | public void rectInCamera() {<NEW_LINE>rectToWorld.concat(worldToCamera, rectToCamera);<NEW_LINE>// surface normal in world frame<NEW_LINE>normal.setTo(0, 0, 1);<NEW_LINE>GeometryMath_F64.mult(rectToCamera.R, normal, normal);<NEW_LINE>visible = normal.z < 0;<NEW_LINE>if (!visible) {<NEW_LINE>pixelRect.x0 = pixelRect.y0 ... | w) + b.x * w; |
542,333 | final GetIntegrationResult executeGetIntegration(GetIntegrationRequest getIntegrationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getIntegrationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | (super.beforeMarshalling(getIntegrationRequest)); |
489,774 | public void marshall(DescribeEvaluationsRequest describeEvaluationsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (describeEvaluationsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(descri... | describeEvaluationsRequest.getLE(), LE_BINDING); |
1,691,224 | public void close(String namespace) {<NEW_LINE>byte[] idBytes;<NEW_LINE>synchronized (namespaceId) {<NEW_LINE>idBytes = getNamespaceId(namespace);<NEW_LINE>if (idBytes == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>namespaceId.remove(namespace);<NEW_LINE>}<NEW_LINE>synchronized (clearLock) {<NEW_LINE>Iterator<ByteBuff... | ByteBuffer next = iter.next(); |
1,598,739 | /* package */<NEW_LINE>Optional<IPair<StockQtyAndUOMQty, Money>> sumupQtyInvoicedAndNetAmtInvoiced(final I_C_Invoice_Candidate ic) {<NEW_LINE>if (ic.getC_Currency_ID() <= 0 || ic.getC_UOM_ID() <= 0) {<NEW_LINE>// if those two columns are not yet set, then for sure nothing is invoiced yet either<NEW_LINE>return Optional... | ofRepoId(ic.getC_UOM_ID()); |
1,592,673 | private void loadTable(Connection conn) throws SQLException {<NEW_LINE>String insertDml = "INSERT INTO SQLXML_JDBC_SAMPLE (DOCUMENT, ID) VALUES (?, ?)";<NEW_LINE>try (PreparedStatement prepStmt = conn.prepareStatement(insertDml)) {<NEW_LINE>SQLXML xml = conn.createSQLXML();<NEW_LINE>xml.setString("<?xml version=\"1.0\"... | " <EMP>\n" + " <EMPNO>221</EMPNO>\n" + " <ENAME>John</ENAME>\n" + " </EMP>"); |
238,802 | private AnchorPane createBisqDAOContent() {<NEW_LINE>AnchorPane anchorPane = new AnchorPane();<NEW_LINE>anchorPane.setMinWidth(373);<NEW_LINE>GridPane bisqDAOPane = new GridPane();<NEW_LINE>AnchorPane.setTopAnchor(bisqDAOPane, 0d);<NEW_LINE>bisqDAOPane.setVgap(5);<NEW_LINE>bisqDAOPane.setMaxWidth(373);<NEW_LINE>int row... | getChildren().add(bisqDAOPane); |
1,597,644 | public static void registerType(ModelBuilder modelBuilder) {<NEW_LINE>ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Collaboration.class, BPMN_ELEMENT_COLLABORATION).namespaceUri(BPMN20_NS).extendsType(RootElement.class).instanceProvider(new ModelTypeInstanceProvider<Collaboration>() {<NEW_LINE><NEW_LINE... | ConversationLink.class).build(); |
997,027 | protected void configure() {<NEW_LINE>if (retainedPersistenceType == PersistenceType.FILE) {<NEW_LINE>bind(RetainedMessageLocalPersistence.class).to(RetainedMessageXodusLocalPersistence.class).in(Singleton.class);<NEW_LINE>}<NEW_LINE>if (payloadPersistenceType == PersistenceType.FILE) {<NEW_LINE>bind(PublishPayloadLoca... | ).in(Singleton.class); |
1,382,136 | public void startVM(final Connection conn, final Host host, final VM vm, final String vmName) throws Exception {<NEW_LINE>Task task = null;<NEW_LINE>try {<NEW_LINE>task = vm.startOnAsync(<MASK><NEW_LINE>try {<NEW_LINE>// poll every 1 seconds , timeout after 10 minutes<NEW_LINE>waitForTask(conn, task, 1000, 10 * 60 * 10... | conn, host, false, true); |
1,339,429 | public PhoneNumberSummary unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>PhoneNumberSummary phoneNumberSummary = new PhoneNumberSummary();<NEW... | ().unmarshall(context)); |
100,137 | public void buildGraph(Graph graph, HashMap<Class<?>, Object> extra, DataImportIssueStore issueStore) {<NEW_LINE>this.issueStore = issueStore;<NEW_LINE>OSMDatabase osmdb = new OSMDatabase(issueStore);<NEW_LINE>Handler handler = new Handler(graph, osmdb);<NEW_LINE>for (BinaryOpenStreetMapProvider provider : providers) {... | setIntersectionTraversalCostModel(wayPropertySetSource.getIntersectionTraversalCostModel()); |
1,780,655 | public void run(RegressionEnvironment env) {<NEW_LINE>// test for JIRA ESPER-332<NEW_LINE>sendTimer(0, env);<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE><MASK><NEW_LINE>env.compileDeploy(stmtTextCreate, path);<NEW_LINE>String stmtCount = "on pattern[every timer:interval(10 sec)] select count(eve), eve... | String stmtTextCreate = namedWindow ? "@public create window MyInfraPTS#keepall as select * from SupportBean" : "@public create table MyInfraPTS as (theString string)"; |
388,054 | private GeneralPath createShape(GeneralPath out, double x, double y, double width, double height) {<NEW_LINE>if (hasBorderRadius()) {<NEW_LINE>out.reset();<NEW_LINE>out.moveTo(borderRadius.topLeftRadiusX(), 0);<NEW_LINE>out.lineTo(width - <MASK><NEW_LINE>// out.arcTo(width-borderRadius.topRightRadiusX(), borderRadius.t... | borderRadius.topRightRadiusX(), 0); |
357,629 | private Collection<Particle> findNearest(Particle target, Collection<Particle> particles, int k, double maxDist) {<NEW_LINE>List<Particle> result <MASK><NEW_LINE>double[] tempDist = new double[k];<NEW_LINE>int worstIndex = -1;<NEW_LINE>for (Particle particle : particles) {<NEW_LINE>if (particle == target) {<NEW_LINE>co... | = new ArrayList<Particle>(); |
1,097,734 | public <T> T toJava(Class<T> type) {<NEW_LINE>final Object object = getObject();<NEW_LINE>if (object == null) {<NEW_LINE>throw getRuntime().newRuntimeError("Java proxy not initialized. Did you call super() yet?");<NEW_LINE>}<NEW_LINE>final Class clazz = object.getClass();<NEW_LINE>if (type.isPrimitive()) {<NEW_LINE>if ... | " to " + type.getName()); |
1,080,703 | final void executeRequestCancelWorkflowExecution(RequestCancelWorkflowExecutionRequest requestCancelWorkflowExecutionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(requestCancelWorkflowExecutionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics... | addHandlerContext(HandlerContextKey.SERVICE_ID, "SWF"); |
1,501,412 | public Tuple2<Double, Double> calcHessianGradientLoss(Iterable<Tuple3<Double, Double, Vector>> labelVectors, DenseVector coefVector, DenseMatrix hessian, DenseVector grad) {<NEW_LINE>if (this.hasSecondDerivative()) {<NEW_LINE>int size = grad.size();<NEW_LINE>for (int i = 0; i < size; ++i) {<NEW_LINE>grad.set(i, 0.0);<N... | updateHessian(labledVector, coefVector, hessian); |
29,722 | private Response invoke(final RequestProcessingContext context, final Object resource) {<NEW_LINE>Response jaxrsResponse;<NEW_LINE>context.triggerEvent(RequestEvent.Type.RESOURCE_METHOD_START);<NEW_LINE>context.push(response -> {<NEW_LINE>// Need to check whether the response is null or mapped from exception. In these ... | resource, context.request()); |
1,852,128 | public static void main(String[] args) {<NEW_LINE>Scanner s = new Scanner(System.in);<NEW_LINE>System.out.println("Of First Matrix");<NEW_LINE>System.out.println(" Enter number of rows ");<NEW_LINE>int rows_first = s.nextInt();<NEW_LINE>System.out.println(" Enter number of columns ");<NEW_LINE>int columns_first = s.nex... | j] = s.nextInt(); |
364,650 | private TreeSet<AspectRatio> findCommonAspectRatios(List<Camera.Size> previewSizes, List<Camera.Size> pictureSizes) {<NEW_LINE>Set<AspectRatio> previewAspectRatios = new HashSet<>();<NEW_LINE>for (Camera.Size size : previewSizes) {<NEW_LINE>AspectRatio deviceRatio = AspectRatio.of(CameraKit.Internal.screenHeight, Camer... | maxSize = previewSizes.get(0); |
232,947 | public Vector<ContentValues> parse() {<NEW_LINE>commentsList.clear();<NEW_LINE>Elements tableRows = document.select("table tr table tr:has(table)");<NEW_LINE>storesQuestion();<NEW_LINE>for (int row = 0; row < tableRows.size(); row++) {<NEW_LINE>Element mainRowElement = tableRows.get(row).<MASK><NEW_LINE>Element rowLeve... | select("td:eq(2)").first(); |
545,009 | void scanElement_file(org.w3c.dom.Element element, Version version) {<NEW_LINE>// <file><NEW_LINE>ModuleFile file = new ModuleFile();<NEW_LINE>org.w3c.dom.NamedNodeMap attrs = element.getAttributes();<NEW_LINE>for (int i = 0; i < attrs.getLength(); i++) {<NEW_LINE>org.w3c.dom.Attr attr = (org.w3c.dom.Attr) attrs.item(i... | setName(attr.getValue()); |
680,437 | public void read(JmeImporter im) throws IOException {<NEW_LINE>InputCapsule ic = im.getCapsule(this);<NEW_LINE>name = <MASK><NEW_LINE>worldBound = (BoundingVolume) ic.readSavable("world_bound", null);<NEW_LINE>cullHint = ic.readEnum("cull_mode", CullHint.class, CullHint.Inherit);<NEW_LINE>batchHint = ic.readEnum("batch... | ic.readString("name", null); |
1,277,307 | public ECPoint twice() {<NEW_LINE>if (this.isInfinity()) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>ECCurve curve = this.getCurve();<NEW_LINE>ECFieldElement X1 = this.x;<NEW_LINE>if (X1.isZero()) {<NEW_LINE>// A point with X == 0 is its own additive inverse<NEW_LINE>return curve.getInfinity();<NEW_LINE>}<NEW_LINE>ECFi... | (X3).add(Z3); |
1,696,629 | public void inviteGroupMembers(GroupInfo groupInfo, List<String> addMembers, final IUIKitCallback callBack) {<NEW_LINE>if (addMembers == null || addMembers.size() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>V2TIMManager.getGroupManager().inviteUserToGroup(groupInfo.getId(), addMembers, new V2TIMValueCallback<List<V2TI... | (R.string.request_wait)); |
540,868 | private void processMessage(IPresentationCompletionMessage msg) {<NEW_LINE>if (msg instanceof PresentationConvertMessage) {<NEW_LINE>PresentationConvertMessage m = (PresentationConvertMessage) msg;<NEW_LINE>PresentationToConvert p = new PresentationToConvert(m.pres);<NEW_LINE>String presentationToConvertKey = p.getKey(... | p = presentationsToConvert.get(presentationToConvertKey); |
1,554,660 | public VoiceChannel createVoiceChannel(GuildImpl guild, DataObject json, long guildId) {<NEW_LINE>boolean playbackCache = false;<NEW_LINE>final long id = json.getLong("id");<NEW_LINE>VoiceChannelImpl channel = ((VoiceChannelImpl) getJDA().getVoiceChannelsView().get(id));<NEW_LINE>if (channel == null) {<NEW_LINE>if (gui... | = new VoiceChannelImpl(id, guild); |
1,488,074 | public Secret generateBrokersSecret(ClusterCa clusterCa, ClientsCa clientsCa) {<NEW_LINE>Map<String, String> data = new HashMap<>(replicas * 4);<NEW_LINE>for (int i = 0; i < replicas; i++) {<NEW_LINE>CertAndKey cert = brokerCerts.get(KafkaCluster.kafkaPodName(cluster, i));<NEW_LINE>data.put(KafkaCluster.kafkaPodName(cl... | ".crt", cert.certAsBase64String()); |
1,608,362 | public List<Graph> generate(List<? extends Summary> results) {<NEW_LINE>List<Graph> graphs = new ArrayList<>();<NEW_LINE>List<IOTaskSummary> summaries = results.stream().map(x -> (IOTaskSummary) x).collect(Collectors.toList());<NEW_LINE>if (summaries.isEmpty()) {<NEW_LINE>LOG.info("No summaries to generate.");<NEW_LINE... | getDescription(fieldNames.getSecond()); |
1,714,103 | protected static void death(Person person, long time) {<NEW_LINE>if (ENABLE_DEATH_BY_NATURAL_CAUSES) {<NEW_LINE>double roll = person.rand();<NEW_LINE>double likelihoodOfDeath = likelihoodOfDeath(person.ageInYears(time));<NEW_LINE>if (roll < likelihoodOfDeath) {<NEW_LINE>person.recordDeath(time, NATURAL_CAUSES);<NEW_LIN... | attributes.get(Person.DEATHDATE); |
1,287,039 | private static Object evalNumeric(Number left, Number right, QueryDataTypeFamily family) {<NEW_LINE>switch(family) {<NEW_LINE>case TINYINT:<NEW_LINE>return (byte) (left.byteValue(<MASK><NEW_LINE>case SMALLINT:<NEW_LINE>return (short) (left.shortValue() - right.shortValue());<NEW_LINE>case INTEGER:<NEW_LINE>return left.... | ) - right.byteValue()); |
86,692 | public List<Step> toSteps(Client client, String phase, StepKey nextStepKey) {<NEW_LINE>StepKey preUnfollowKey = new StepKey(phase, NAME, CONDITIONAL_UNFOLLOW_STEP);<NEW_LINE>StepKey indexingComplete = new StepKey(phase, NAME, WaitForIndexingCompleteStep.NAME);<NEW_LINE>StepKey waitForFollowShardTasks = new StepKey(phas... | phase, NAME, WaitForIndexColorStep.NAME); |
1,116,424 | private HttpRequest.Builder uploadFileRequestBuilder(Long petId, String additionalMetadata, File file) throws ApiException {<NEW_LINE>// verify the required parameter 'petId' is set<NEW_LINE>if (petId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");<NEW_... | (petId.toString())); |
1,809,992 | public void draw(@NonNull Canvas canvas, @NonNull Value value, int coordinateX, int coordinateY) {<NEW_LINE>if (!(value instanceof ThinWormAnimationValue)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ThinWormAnimationValue v = (ThinWormAnimationValue) value;<NEW_LINE><MASK><NEW_LINE>int rectEnd = v.getRectEnd();<NEW_LINE>in... | int rectStart = v.getRectStart(); |
998,998 | public final VariableDeclaratorContext variableDeclarator() throws RecognitionException {<NEW_LINE>VariableDeclaratorContext _localctx = new <MASK><NEW_LINE>enterRule(_localctx, 60, RULE_variableDeclarator);<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(624);<NEW_LINE>variableDeclara... | VariableDeclaratorContext(_ctx, getState()); |
910,591 | public RegistryCenterClient connect(final String nameAndNameSpace) {<NEW_LINE>final RegistryCenterClient registryCenterClient = new RegistryCenterClient();<NEW_LINE>registryCenterClient.setNameAndNamespace(nameAndNameSpace);<NEW_LINE>if (nameAndNameSpace == null) {<NEW_LINE>return registryCenterClient;<NEW_LINE>}<NEW_L... | String zkAddressList = registryCenterConfiguration.getZkAddressList(); |
1,011,532 | public Optional<FileResource> resolveUri(final ResourceRequestContext resourceRequestContext) throws PwmUnrecoverableException {<NEW_LINE>final String effectiveUri = resourceRequestContext.getUri();<NEW_LINE>final ResourceServletConfiguration resourceServletConfiguration = resourceRequestContext.getResourceServletConfi... | path.length() + 1); |
1,301,311 | private void addColumnFamilyToTable(String tableName, String columnFamilyName) throws IOException {<NEW_LINE>HColumnDescriptor cfDesciptor = new HColumnDescriptor(columnFamilyName);<NEW_LINE>try {<NEW_LINE>if (admin.tableExists(tableName)) {<NEW_LINE>// Before any modification to table schema, it's necessary to<NEW_LIN... | error("Error while adding column family {}, to table{} . ", columnFamilyName, tableName); |
559,705 | public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);<NEW_LINE>View view = inflater.inflate(R.layout.number_picker_dialog, null);<NEW_LINE>final NumberPicker numberPicker = view.findViewById(R.id.num... | ), numberPicker.getValue()); |
1,086,111 | public void submitTicket(LotteryService service, Scanner scanner) {<NEW_LINE>logger.info("What is your email address?");<NEW_LINE>var email = readString(scanner);<NEW_LINE>logger.info("What is your bank account number?");<NEW_LINE>var account = readString(scanner);<NEW_LINE>logger.info("What is your phone number?");<NE... | PlayerDetails(email, account, phone); |
697,783 | public static void foldKeyboard() {<NEW_LINE>if (instance.isAsyncEditMode()) {<NEW_LINE>Form f = Display.getInstance().getCurrent();<NEW_LINE>final Component cmp = f == null ? null : f.getFocused();<NEW_LINE>instance.callHideTextEditor();<NEW_LINE>nativeInstance.foldVKB();<NEW_LINE>// after folding the keyboard the scr... | setPadding(Component.BOTTOM, 0); |
1,699,113 | boolean processVoteRequest(boolean isUpvote, ParaObject votable, HttpServletRequest req) {<NEW_LINE>Profile author = null;<NEW_LINE>Profile authUser = utils.getAuthUser(req);<NEW_LINE>boolean result = false;<NEW_LINE>boolean update = false;<NEW_LINE>if (votable == null || authUser == null) {<NEW_LINE>return false;<NEW_... | DOWN).getId())); |
1,618,371 | public void enterSid_trunk_group(A10Parser.Sid_trunk_groupContext ctx) {<NEW_LINE>TrunkGroup.Type type = ctx.trunk_type() != null ? toType(<MASK><NEW_LINE>Optional<Integer> maybeNum = toInteger(ctx, ctx.trunk_number());<NEW_LINE>if (!maybeNum.isPresent()) {<NEW_LINE>// dummy<NEW_LINE>_currentTrunkGroup = new TrunkGroup... | ctx.trunk_type()) : null; |
2,791 | public static MemorySize parse(String value, MemoryUnit defaultUnit) {<NEW_LINE>if (value == null || value.length() == 0) {<NEW_LINE>return new MemorySize(0, MemoryUnit.BYTES);<NEW_LINE>}<NEW_LINE>MemoryUnit unit = defaultUnit;<NEW_LINE>final char last = value.charAt(value.length() - 1);<NEW_LINE>if (!Character.isDigit... | .parseLong(value), unit); |
1,012,613 | public void read(JmeImporter im) throws IOException {<NEW_LINE>super.read(im);<NEW_LINE>InputCapsule ic = im.getCapsule(this);<NEW_LINE>size = ic.readInt("size", 16);<NEW_LINE>totalSize = <MASK><NEW_LINE>quadrant = ic.readShort("quadrant", (short) 0);<NEW_LINE>stepScale = (Vector3f) ic.readSavable("stepScale", Vector3f... | ic.readInt("totalSize", 16); |
381,781 | public void debugPrint(StringBuilder sb, int indent) {<NEW_LINE>indent(sb, indent);<NEW_LINE>sb.append("Scope: ").append(scopeId).append("\n");<NEW_LINE>indent(sb, indent + 1);<NEW_LINE>sb.append("Kind: ").append(scopeKind).append("\n");<NEW_LINE>Set<String> names = new HashSet<>();<NEW_LINE>for (Object id : getFrameId... | debugPrint(sb, indent + 1); |
449,360 | private List<LookupElement> fillModelByRelevance(LookupElementListPresenter lookup, Set<? extends LookupElement> items, Iterable<? extends LookupElement> sortedElements, @Nullable LookupElement relevantSelection) {<NEW_LINE>if (!sortedElements.iterator().hasNext()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<... | byRelevance, lookup.getCurrentItem()); |
875,440 | public static HistoricDecisionInputInstanceDto fromHistoricDecisionInputInstance(HistoricDecisionInputInstance historicDecisionInputInstance) {<NEW_LINE>HistoricDecisionInputInstanceDto dto = new HistoricDecisionInputInstanceDto();<NEW_LINE>dto.id = historicDecisionInputInstance.getId();<NEW_LINE>dto.decisionInstanceId... | .removalTime = historicDecisionInputInstance.getRemovalTime(); |
993,041 | private static byte[] transformByteArray(@NonNull byte[] data, @Nullable Rect cropRect, int rotation, boolean flip) throws IOException {<NEW_LINE>Stopwatch stopwatch = new Stopwatch("transform");<NEW_LINE>Bitmap in;<NEW_LINE>if (cropRect != null) {<NEW_LINE>BitmapRegionDecoder decoder = BitmapRegionDecoder.newInstance(... | 0, data.length, false); |
63,736 | public ResultSet deserialize(JsonParser jsonParser, DeserializationContext ctx) throws IOException {<NEW_LINE>JsonNode node = jsonParser.getCodec().readTree(jsonParser);<NEW_LINE>ResultKind resultKind;<NEW_LINE>List<ColumnInfo> columns;<NEW_LINE>List<Boolean> changeFlags = null;<NEW_LINE>List<Row> data;<NEW_LINE>JsonNo... | changeFlagNode = node.get(FIELD_NAME_CHANGE_FLAGS); |
1,270,111 | public double evaluate(RecommendedList groundTruthList, RecommendedList recommendedList) {<NEW_LINE><MASK><NEW_LINE>int numItems = conf.getInt("rec.eval.item.num");<NEW_LINE>// First collect item counts needed for estimating probabilities of the items<NEW_LINE>// We want to calculate the probability of each item to be ... | int numUsers = groundTruthList.size(); |
913,586 | public JComponent createComponent() {<NEW_LINE>JBList list = new JBList(myModel);<NEW_LINE>ToolbarDecorator decorator = ToolbarDecorator.createDecorator(list);<NEW_LINE>decorator.disableUpDownActions();<NEW_LINE>decorator.setAddAction(new AnActionButtonRunnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(... | ._50, Gray._130)); |
1,845,079 | static Errno writeToStream(Node node, WasmMemory memory, OutputStream stream, int iovecArrayAddress, int iovecCount, int sizeAddress) {<NEW_LINE>if (stream == null) {<NEW_LINE>return Errno.Acces;<NEW_LINE>}<NEW_LINE>int totalBytesWritten = 0;<NEW_LINE>try {<NEW_LINE>for (int i = 0; i < iovecCount; i++) {<NEW_LINE>final... | = iovecArrayAddress + i * Iovec.BYTES; |
620,676 | public void checkParentContract() {<NEW_LINE>_rootPackage.filterChildren(null).forEach((CtElement elem) -> {<NEW_LINE>// there is always one parent<NEW_LINE>assertTrue("no parent for " + elem.getClass() + "-" + elem.getPosition(), elem.isParentInitialized());<NEW_LINE>});<NEW_LINE>// the scanner and the parent are in c... | ), e.getParent()); |
1,786,864 | protected final SuspendedResourcesHolder suspend(@Nullable Object transaction) throws TransactionException {<NEW_LINE>if (TransactionSynchronizationManager.isSynchronizationActive()) {<NEW_LINE>List<TransactionSynchronization> suspendedSynchronizations = doSuspendSynchronization();<NEW_LINE>try {<NEW_LINE>Object suspen... | boolean readOnly = TransactionSynchronizationManager.isCurrentTransactionReadOnly(); |
914,226 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Exile all nontoken permanents.<NEW_LINE>Cards exiledCards = new CardsImpl();<NEW_LINE>for (Permanent permanent : game.... | playerList.getNext(game, false); |
610,197 | private Map<String, Object> initMagicVariables() {<NEW_LINE>Map<String, Object> map = new HashMap();<NEW_LINE>if (!caller.isNone()) {<NEW_LINE>// karate principle: parent variables are always "visible"<NEW_LINE>// so we inject the parent variables<NEW_LINE>// but they will be over-written by what is local to this scena... | map.put("__row", exampleData); |
1,153,354 | public AggregationConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AggregationConfig aggregationConfig = new AggregationConfig();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token... | int originalDepth = context.getCurrentDepth(); |
632,662 | public void rejectCertificateTransfer(RejectCertificateTransferRequest rejectCertificateTransferRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(rejectCertificateTransferRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | new JsonResponseHandler<Void>(null); |
121,631 | public List<OptExpression> transform(OptExpression input, OptimizerContext context) {<NEW_LINE>OptExpression aggOptExpression = input.getInputs().get(1);<NEW_LINE>OptExpression projectExpression = aggOptExpression.getInputs().get(0);<NEW_LINE>OptExpression filterExpression = projectExpression.getInputs().get(0);<NEW_LI... | removeAll(apply.getCorrelationColumnRefs()); |
751,082 | private void doFinish() {<NEW_LINE>CvsInstallerModuleConfig.getInstance().setCvsInstalled(true);<NEW_LINE>if (listener != null) {<NEW_LINE>OpenProjects.getDefault().removePropertyChangeListener(listener);<NEW_LINE>listener = null;<NEW_LINE>}<NEW_LINE>assert !EventQueue.isDispatchThread();<NEW_LINE>for (UpdateUnit u : U... | restarter = support.doOperation(null); |
1,626,142 | protected void addSubElements(JRPrintElementContainer printContainer, JRFillElement element, Collection<? extends JRPrintElement> printElements) {<NEW_LINE>if (printContainer instanceof OffsetElementsContainer) {<NEW_LINE>// adding the subelements as whole lists to bands so that we don't need<NEW_LINE>// another virtua... | ), element.getRelativeY()); |
895,707 | public void discoverChildren() {<NEW_LINE>try {<NEW_LINE>ArrayList<SubtitleItem> subtitleItems = OpenSubtitle.findSubtitles(originalResource, getDefaultRenderer());<NEW_LINE>if (subtitleItems == null || subtitleItems.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Collections.sort(subtitleItems, new SubSort(getDefaul... | DLNAResource liveResource = originalResource.clone(); |
293,225 | public TreeSet<byte[]> /* peer-b64-hashes/ipport */<NEW_LINE>clusterHashes(final String clusterdefinition) {<NEW_LINE>// collects seeds according to cluster definition string, which consists of<NEW_LINE>// comma-separated .yacy or .yacyh-domains<NEW_LINE>// the domain may be extended by an alternative address specifica... | addresse.substring(0, p); |
264,406 | public static void initGeneratedColumn(final Table table, final String fileProperty) {<NEW_LINE>final ComponentsFactory componentsFactory = AppBeans.get(ComponentsFactory.NAME);<NEW_LINE>final ExportDisplay exportDisplay = <MASK><NEW_LINE>table.addGeneratedColumn(fileProperty + ".name", new Table.ColumnGenerator() {<NE... | AppBeans.get(ExportDisplay.NAME); |
828,373 | private void updateTaskCleanupTimeout(Set<String> topologies) {<NEW_LINE>Map topologyConf = null;<NEW_LINE>Map<String, Integer> taskCleanupTimeouts = new HashMap<>();<NEW_LINE>for (String topologyId : topologies) {<NEW_LINE>try {<NEW_LINE>topologyConf = StormConfig.read_supervisor_topology_conf(conf, topologyId);<NEW_L... | LOG.error("Failed to write local task cleanup timeout map", e); |
959,922 | public static DescribeAccessPointsResponse unmarshall(DescribeAccessPointsResponse describeAccessPointsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAccessPointsResponse.setRequestId(_ctx.stringValue("DescribeAccessPointsResponse.RequestId"));<NEW_LINE>describeAccessPointsResponse.setPageNumber(_ctx.integerVal... | (_ctx.integerValue("DescribeAccessPointsResponse.TotalCount")); |
532,518 | private void createEntries(YearMonth month) {<NEW_LINE>for (int i = 1; i < 28; i++) {<NEW_LINE>LocalDate date = month.atDay(i);<NEW_LINE>for (int j = 0; j < (int) (Math.random() * 7); j++) {<NEW_LINE>Entry<?> entry = new Entry<>();<NEW_LINE>entry.setTitle("Entry " + (j + 1));<NEW_LINE>int hour = (int) (Math.random() * ... | ) * 4)), endTime); |
1,658,280 | public static void main(String[] argv) {<NEW_LINE>Random ran = new Random();<NEW_LINE>int len = 102;<NEW_LINE>int numBits = 4;<NEW_LINE>double[] dArr = new double[len];<NEW_LINE>float[] fArr = new float[len];<NEW_LINE>for (int i = 0; i < dArr.length; i++) {<NEW_LINE>dArr[i] = ran.nextDouble() - 0.5;<NEW_LINE>}<NEW_LINE... | buf1 = Unpooled.buffer(1000); |
130,907 | private <T extends JpaObject> String idleNameWithPortal(Business business, String portalId, String name, Class<T> cls, String excludeId) throws Exception {<NEW_LINE>if (StringUtils.isEmpty(name)) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>List<String> list = new ArrayList<>();<NEW_LINE>list.add(name);<NEW_LINE>for (int ... | CriteriaBuilder cb = em.getCriteriaBuilder(); |
538,174 | public Callable<ResponseEntity<String>> elidePatch(@RequestHeader HttpHeaders requestHeaders, @RequestParam MultiValueMap<String, String> allRequestParams, @RequestBody String body, HttpServletRequest request, Authentication authentication) {<NEW_LINE>final String apiVersion = HeaderUtils.resolveApiVersion(requestHeade... | User user = new AuthenticationUser(authentication); |
847,049 | public void testTaskSchedulesAnotherTask(PrintWriter out) throws Exception {<NEW_LINE>SchedulingTask task = new SchedulingTask();<NEW_LINE>task.getExecutionProperties().put(AutoPurge.PROPERTY_NAME, AutoPurge.NEVER.toString());<NEW_LINE>TaskStatus<Long> status = scheduler.schedule(task, 26, TimeUnit.MICROSECONDS);<NEW_L... | throw new Exception("Task did not complete successfully in allotted interval. " + status); |
146,552 | public StringBuilder append(long value, int minLength, char prefix) {<NEW_LINE>if (value == Long.MIN_VALUE) {<NEW_LINE>append0("-9223372036854775808");<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (value < 0L) {<NEW_LINE>append0('-');<NEW_LINE>value = -value;<NEW_LINE>}<NEW_LINE>if (minLength > 1) {<NEW_LINE>for (int j... | value % 100000000000000L / 10000000000000L)]); |
1,299,203 | public boolean shouldOverrideUrlLoading(WebView view, String url) {<NEW_LINE><MASK><NEW_LINE>boolean isWebPage = url.startsWith(PAGE_PREFIX_HTTP) || url.startsWith(PAGE_PREFIX_HTTPS);<NEW_LINE>if (url.contains(WIKIVOYAGE_DOMAIN) && isWebPage) {<NEW_LINE>WikivoyageUtils.processWikivoyageDomain(activity, url, nightMode);... | url = WikiArticleHelper.normalizeFileUrl(url); |
1,086,556 | public static AlternateMailbox loadFromXml(final EwsXmlReader reader) throws Exception {<NEW_LINE>final AlternateMailbox altMailbox = new AlternateMailbox();<NEW_LINE>do {<NEW_LINE>reader.read();<NEW_LINE>if (reader.getNodeType().getNodeType() == XmlNodeType.START_ELEMENT) {<NEW_LINE>if (reader.getLocalName().equalsIgn... | .readElementValue(String.class)); |
254,878 | private boolean updateTooltip() {<NEW_LINE>String displayName = getDisplayName();<NEW_LINE>if (displayName.startsWith("#")) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>displayName = displayName.replaceFirst("#", "");<NEW_LINE>}<NEW_LINE>String oldTooltip = tooltip;<NEW_LINE>String status = isFinished() ? Bundle.LB... | + estimateLabel + ":</b></td><td>" + estimate + "</td></tr>"; |
780,383 | protected void processMessage(CharSequence methodName, MessageHistory history) {<NEW_LINE>CharSequence extraHistoId = histosByMethod ? ("_" + methodName) : "";<NEW_LINE>long lastTime = 0;<NEW_LINE>// if the tailer has recordHistory(true) then the MessageHistory will be<NEW_LINE>// written with a single timing and nothi... | histoId, s -> histogram()); |
424,261 | public int compare(NodeResources a, NodeResources b) {<NEW_LINE>if (a.memoryGb() > b.memoryGb())<NEW_LINE>return 1;<NEW_LINE>if (a.memoryGb() < b.memoryGb())<NEW_LINE>return -1;<NEW_LINE>if (a.diskGb() > b.diskGb())<NEW_LINE>return 1;<NEW_LINE>if (a.diskGb() < b.diskGb())<NEW_LINE>return -1;<NEW_LINE>if (a.vcpu() > b.v... | ), b.diskSpeed()); |
1,043,605 | protected ExtendedIterator<Triple> graphBaseFind(String _gName, TripleMatch tm) {<NEW_LINE>StringBuilder sb = new StringBuilder("sparql ");<NEW_LINE>Node nS, nP, nO;<NEW_LINE>checkOpen();<NEW_LINE>appendSparqlPrefixes(sb);<NEW_LINE>if (readFromAllGraphs && _gName == null)<NEW_LINE>sb.append(" select * where { ");<NEW_L... | bindObject(ps, col, nO); |
1,598,201 | private String generateClass(TypeElement type, String className, String ifaceToImpl, boolean isFinal) {<NEW_LINE>if (type == null) {<NEW_LINE>mErrorReporter.abortWithError("generateClass was invoked with null type", null);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (className == null) {<NEW_LINE>mErrorReporter.abortW... | ClassName.get("java.lang", "Integer"); |
1,222,515 | private List<List<K>> prepareKeysForParallelism() {<NEW_LINE>// Calculate the number of row keys to be queried at a time.<NEW_LINE>// Consider whether parallelism is enabled or not.<NEW_LINE>// When numThreads is calculated, the int truncation<NEW_LINE>// causes one fewer thread to be used if numKeys isn't evenly divid... | Math.max(numKeysPerThread, 1); |
1,741,185 | public void finalizar_sessao() {<NEW_LINE>if (pode_enviar_dados) {<NEW_LINE>for (String url : URL_LIST) {<NEW_LINE>InetAddress ip;<NEW_LINE>try {<NEW_LINE>ip = InetAddress.getLocalHost();<NEW_LINE>String username;<NEW_LINE>if (Configuracoes.getInstancia().getUserMac().equals("nao")) {<NEW_LINE>username = searchForMac()... | .getInstancia().getUserMac(); |
656,032 | public void onDataConnectionStateChanged(int state) {<NEW_LINE>Common.logger.add(new LogEntry(LogEntry.PB_LOG_DEBUG, "START"));<NEW_LINE>if (state == TelephonyManager.DATA_CONNECTED) {<NEW_LINE>NetworkConnectionStatus.Network_Connection_Available = NetworkConnectionStatus.NETWORK_CONNECTED;<NEW_LINE>wanStatus.connectio... | .getResourceId("string", "network_connman_connecting")); |
1,773,526 | public static TableMetadata metadata(boolean differential) {<NEW_LINE>List<ColumnMetadata> columnMetadata;<NEW_LINE>if (differential) {<NEW_LINE>columnMetadata = ImmutableList.of(new ColumnMetadata(COL_FLOW, Schema.FLOW, "The flow", true, false), new ColumnMetadata(TableDiff.baseColumnName(COL_TRACES), Schema.set(Schem... | .format("Paths for flow ${%s}", COL_FLOW)); |
1,062,002 | public void execute(@Nonnull Editor originalEditor, char charTyped, @Nonnull DataContext dataContext) {<NEW_LINE>final Project project = dataContext.getData(CommonDataKeys.PROJECT);<NEW_LINE>PsiFile file = project == null ? null : PsiUtilBase.getPsiFileInEditor(originalEditor, project);<NEW_LINE>if (file == null) {<NEW... | injectedEditorIfCharTypedIsSignificant(charTyped, originalEditor, file); |
395,437 | private boolean checkForAzPodAppContainerStarting() {<NEW_LINE>if (isPodCompleted()) {<NEW_LINE>logger.debug("ContainerStarting is false as podPhase is in completion state");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Pod must have been initialized<NEW_LINE>if (!this.initializedConditionStatus.isPresent() || this.in... | = this.v1PodStatus.getContainerStatuses(); |
1,009,048 | CodeTypeElement createAOTExportProvider(ExportsLibrary libraryExports, CodeTypeElement genClass) {<NEW_LINE>String libraryName = libraryExports.getLibrary().getTemplateType().getSimpleName().toString();<NEW_LINE>CodeTypeElement providerClass = createClass(libraryExports, null, modifiers(PUBLIC, STATIC, FINAL), libraryN... | m = CodeExecutableElement.cloneNoAnnotations(method); |
1,454,155 | private void visitSetConstVar(Node node, Node child, boolean needValue) {<NEW_LINE>if (!hasVarsInRegs)<NEW_LINE>Kit.codeBug();<NEW_LINE>int varIndex = fnCurrent.getVarIndex(node);<NEW_LINE>generateExpression(child.getNext(), node);<NEW_LINE>boolean isNumber = (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1);<NEW_LINE>sh... | short stack = cfw.getStackTop(); |
999,168 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('s0') select cast(item?,java.lang.String) as t0 from SupportBeanDynRoot";<NEW_LINE>env.eplToModelCompileDeploy(epl).addListener("s0");<NEW_LINE>env.assertStmtType("s0", "t0", EPTypePremade.STRING.getEPType());<NEW_LINE>env.sendEventBean(new Suppo... | assertEqualsNew("s0", "t0", "2"); |
806,308 | static Authority fromString(String authority) {<NEW_LINE>if (authority == null || authority.length() == 0) {<NEW_LINE>return NoAuthority.INSTANCE;<NEW_LINE>}<NEW_LINE>Matcher matcher = ZOOKEEPER_AUTH.matcher(authority);<NEW_LINE>if (matcher.matches()) {<NEW_LINE>return new ZookeeperAuthority(matcher.group(1).replaceAll... | (matcher.group(1)); |
1,180,484 | private void listBadLinks() throws Exception {<NEW_LINE>ArrayList<String> errors = new ArrayList<>();<NEW_LINE>for (String link : links.keySet()) {<NEW_LINE>if (!link.startsWith("http") && !link.endsWith("h2.pdf") && /* For Javadoc 8 */<NEW_LINE>!link.startsWith("docs/javadoc")) {<NEW_LINE>if (targets.get(link) == null... | (link) + ": Link missing " + link); |
520,486 | public void serialize(StringBuilder builder) {<NEW_LINE>builder.append<MASK><NEW_LINE>builder.append(mDeviceType).append("\n");<NEW_LINE>builder.append(mDeviceOS).append("\n");<NEW_LINE>builder.append(mAlias).append("\n");<NEW_LINE>// a network can't be saved in a session file<NEW_LINE>if (mType == Type.NETWORK) {<NEW_... | (mType).append("\n"); |
131,436 | public static /*<NEW_LINE>@Deprecated<NEW_LINE>public static JsonArrayBuilder harvestingConfigsAsJsonArray(List<Dataverse> harvestingDataverses) {<NEW_LINE>JsonArrayBuilder hdArr = Json.createArrayBuilder();<NEW_LINE><NEW_LINE>for (Dataverse hd : harvestingDataverses) {<NEW_LINE>hdArr.add(harvestingConfigAsJson(hd.getH... | getLastFailedDatasetCount().toString()); |
370,856 | public <T extends Parcelable> T decodeParcelable(String key, Class<T> tClass, @Nullable T defaultValue) {<NEW_LINE>if (tClass == null) {<NEW_LINE>return defaultValue;<NEW_LINE>}<NEW_LINE>byte[] bytes = decodeBytes(nativeHandle, key);<NEW_LINE>if (bytes == null) {<NEW_LINE>return defaultValue;<NEW_LINE>}<NEW_LINE>Parcel... | "Parcelable protocol requires a " + "non-null static Parcelable.Creator object called " + "CREATOR on class " + name); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.