idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,072,647 | public ExitOrRestartOrPowerOff displayQRCode(String encodedData) throws IOException {<NEW_LINE>System.out.println("Displaying QR code. Data: " + encodedData);<NEW_LINE>String message = "We are done. Please scan the following QR-code with the blue scanner.\n" + "Then type 'exit' + <enter> or 'restart' + <enter>.\n" + "T... | 18, offset + 20, false); |
588,862 | // The phase concept please refer to AggregateInfo::AggPhase<NEW_LINE>private LogicalAggregationOperator createDistinctAggForFirstPhase(ColumnRefFactory columnRefFactory, List<ColumnRefOperator> groupKeys, Map<ColumnRefOperator, CallOperator> aggregationMap, AggType type) {<NEW_LINE>Set<ColumnRefOperator> newGroupKeys ... | .newArrayList(newGroupKeys), localAggMap); |
1,055,015 | void applyRotation(PdfDictionary pageN, ByteBuffer out) {<NEW_LINE>if (!cstp.rotateContents) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Rectangle page = reader.getPageSizeWithRotation(pageN);<NEW_LINE>int rotation = page.getRotation();<NEW_LINE>switch(rotation) {<NEW_LINE>case 90:<NEW_LINE>out.append(PdfContents.ROTATE90);... | out.append(PdfContents.ROTATE180); |
957,170 | // Returns true if polyline_a crosses envelope_b.<NEW_LINE>private static boolean polylineCrossesEnvelope_(Polyline polyline_a, Envelope envelope_b, double tolerance, ProgressTracker progress_tracker) {<NEW_LINE>Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();<NEW_LINE>polyline_a.queryEnvelope2D(env_a);<N... | polyline_a, polyline_b, tolerance, progress_tracker); |
1,681,022 | public Object postProcessAfterInitialization(@Nonnull final Object bean, @Nonnull final String beanName) throws BeansException {<NEW_LINE>// noinspection ConstantConditions<NEW_LINE>if (bean instanceof FactoryBean || (beanName != null && !isNullBean(bean) && beanFactory.containsBean(beanName) && !beanFactory.isSingleto... | parameterResolverFactory = ClasspathParameterResolverFactory.forClassLoader(classLoader); |
1,373,243 | protected void onActivityResult(int requestCode, int resultCode, Intent intent) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, intent);<NEW_LINE>logDebug("onActivityResult");<NEW_LINE>if (intent == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (nodeSaver.handleActivityResult(this, requestCode, resultCode,... | intent.getLongExtra("IMPORT_TO", 0); |
271,389 | private static boolean polygonContainsPolygonImpl_(Polygon polygon_a, Polygon polygon_b, double tolerance, ProgressTracker progressTracker) {<NEW_LINE>boolean[<MASK><NEW_LINE>b_result_known[0] = false;<NEW_LINE>boolean res = polygonContainsMultiPath_(polygon_a, polygon_b, tolerance, b_result_known, progressTracker);<NE... | ] b_result_known = new boolean[1]; |
1,368,387 | public List<GlobalSession> findGlobalSessionByPage(int pageNum, int pageSize, boolean withBranchSessions) {<NEW_LINE>List<GlobalSession> globalSessions = new ArrayList<>();<NEW_LINE>int start = Math.max((pageNum - 1) * pageSize, 0);<NEW_LINE>int end = pageNum * pageSize - 1;<NEW_LINE>List<String> statusKeys = convertSt... | collect(Collectors.toList()); |
618,094 | private void insertCastOrBoxingCode(Local lhs, Local rhs, Chain<Unit> newUnits) {<NEW_LINE>final Type lhsType = lhs.getType();<NEW_LINE>// if assigning to a primitive type then there's nothing to do<NEW_LINE>if (lhsType instanceof RefLikeType) {<NEW_LINE>final Type rhsType = rhs.getType();<NEW_LINE>if (rhsType instance... | (rhsType), boxedType, true); |
238,146 | public final void initValues() {<NEW_LINE>// NOI18N<NEW_LINE>tDictionary.setText(System.getProperty("user.home"));<NEW_LINE>Set<String> set = Charset.availableCharsets().keySet();<NEW_LINE>cEncoding.setModel(new javax.swing.DefaultComboBoxModel(set.toArray(new String[set<MASK><NEW_LINE>// NOI18N<NEW_LINE>cEncoding.setS... | .size()]))); |
1,272,657 | public void writeBytes(@NotNull final BytesStore bytes) {<NEW_LINE>throwExceptionIfClosed();<NEW_LINE>checkAppendLock();<NEW_LINE>writeLock.lock();<NEW_LINE>try {<NEW_LINE>int cycle = queue.cycle();<NEW_LINE>if (wire == null)<NEW_LINE>setWireIfNull(cycle);<NEW_LINE>if (this.cycle != cycle)<NEW_LINE>rollCycleTo(cycle);<... | lastIndex(wire.headerNumber()); |
842,013 | static TypeSpecDataHolder generateGetEventHandlerMethod(SpecModel specModel, EventDeclarationModel eventDeclaration) {<NEW_LINE>final String scopeMethodName = specModel.getScopeMethodName();<NEW_LINE>final ClassName eventClassName = ClassName.bestGuess(eventDeclaration.getRawName().toString());<NEW_LINE>final List<Type... | .add((TypeVariableName) name); |
1,390,183 | private org.opendope.xpaths.Xpaths.Xpath createNewXPathObject(String newPath, org.opendope.xpaths.Xpaths.Xpath xpathObj, int index) {<NEW_LINE>// org.opendope.xpaths.Xpaths.Xpath newXPathObj = XmlUtils<NEW_LINE>// .deepCopy(xpathObj);<NEW_LINE>org.opendope.xpaths.Xpaths.Xpath newXPathObj = new org.opendope.xpaths.Xpath... | .getId() + "_" + index; |
156,569 | private void sqliteReadString(boolean useTransaction) {<NEW_LINE>long startTime = System.nanoTime();<NEW_LINE>SQLIteKV sqlIteKV = new SQLIteKV(m_context);<NEW_LINE>if (useTransaction) {<NEW_LINE>sqlIteKV.beginTransaction();<NEW_LINE>}<NEW_LINE>for (int index = 0; index < m_loops; index++) {<NEW_LINE>final String key = ... | String msg = useTransaction ? "sqlite transaction" : "sqlite"; |
392,102 | public StartThingRegistrationTaskResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StartThingRegistrationTaskResult startThingRegistrationTaskResult = new StartThingRegistrationTaskResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | int originalDepth = context.getCurrentDepth(); |
1,349,910 | public CreateAssociationBatchResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateAssociationBatchResult createAssociationBatchResult = new CreateAssociationBatchResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | int originalDepth = context.getCurrentDepth(); |
1,220,031 | public static DescribeCapacityReservationsResponse unmarshall(DescribeCapacityReservationsResponse describeCapacityReservationsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeCapacityReservationsResponse.setRequestId(_ctx.stringValue("DescribeCapacityReservationsResponse.RequestId"));<NEW_LINE>describeCapacityRe... | = new ArrayList<Tag>(); |
971,513 | public void open(Configuration parameters) {<NEW_LINE>List<Long> bcDivisibleIndices = getRuntimeContext().getBroadcastVariable(DIVISIBLE_INDICES);<NEW_LINE>divisibleIndices = new HashSet<>(bcDivisibleIndices);<NEW_LINE>List<Tuple1<IterInfo>> bcIterInfo = getRuntimeContext().getBroadcastVariable(ITER_INFO);<NEW_LINE>sho... | getRuntimeContext().getBroadcastVariable(NEW_CLUSTER_CENTERS); |
736,817 | public static Exception writeGpx(Writer output, GPXFile file, IProgress progress) {<NEW_LINE>if (progress != null) {<NEW_LINE>progress.startWork(file.getItemsToWriteSize());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>XmlSerializer serializer = PlatformUtil.newSerializer();<NEW_LINE>serializer.setOutput(output);<NEW_LINE>// $NO... | attribute(null, "version", "1.1"); |
34,339 | protected void handleMessage(final Message message) {<NEW_LINE>final MessageData messageData = message.getData();<NEW_LINE>switch(messageData.getCode()) {<NEW_LINE>case IbftV2.PROPOSAL:<NEW_LINE>consumeMessage(message, ProposalMessageData.fromMessageData(messageData).decode(), currentHeightManager::handleProposalPayloa... | decode(), currentHeightManager::handleRoundChangePayload); |
1,281,203 | private void addMaterialRecipes(Consumer<FinishedRecipe> consumer) {<NEW_LINE>String folder = "common/materials/";<NEW_LINE>// ores<NEW_LINE>metalCrafting(consumer, TinkerMaterials.cobalt, folder);<NEW_LINE>// tier 3<NEW_LINE>metalCrafting(consumer, TinkerMaterials.slimesteel, folder);<NEW_LINE>metalCrafting(consumer, ... | consumer, TinkerMaterials.queensSlime, folder); |
1,614,073 | public Object read() {<NEW_LINE>skipWhitespace();<NEW_LINE>Object o = null;<NEW_LINE>switch(current()) {<NEW_LINE>case '{':<NEW_LINE>o = readObject();<NEW_LINE>break;<NEW_LINE>case '[':<NEW_LINE>o = readArray();<NEW_LINE>break;<NEW_LINE>case '"':<NEW_LINE>case '\'':<NEW_LINE>o = readString();<NEW_LINE>break;<NEW_LINE>c... | ) + " character " + getCurrentLineOffset()); |
688,126 | public static MOrder copyFrom(MOrder from, Timestamp dateDoc, int C_DocTypeTarget_ID, boolean isSOTrx, boolean counter, boolean copyASI, String trxName) {<NEW_LINE>MOrder to = new MOrder(from.getCtx(), 0, trxName);<NEW_LINE>to.set_TrxName(trxName);<NEW_LINE>PO.copyValues(from, to, from.getAD_Client_ID(), from.getAD_Org... | setRef_Order_ID(from.getC_Order_ID()); |
50,550 | private Set<Inter> checkSlurOnTuplet() {<NEW_LINE>logger.debug("S#{} checkSlurOnTuplet", system.getId());<NEW_LINE>Set<Inter> <MASK><NEW_LINE>final int maxSlurWidth = scale.toPixels(constants.maxTupletSlurWidth);<NEW_LINE>final List<Inter> slurs = sig.inters((Inter inter) -> !inter.isRemoved() && (inter instanceof Slur... | deleted = new LinkedHashSet<>(); |
85,871 | public void handleOutbound(Context ctx) throws ServletException, IOException {<NEW_LINE>Model model = new Model(ctx);<NEW_LINE>Payload payload = ctx.getPayload();<NEW_LINE>normalize(model, payload);<NEW_LINE>StorageReport storageReport = null;<NEW_LINE>StorageReport rawReport = null;<NEW_LINE>switch(payload.getAction()... | int minuteCounts = payload.getMinuteCounts(); |
754,981 | public static String makeCsv(String configName) {<NEW_LINE>var wayPropertySet = new WayPropertySet();<NEW_LINE>var <MASK><NEW_LINE>source.populateProperties(wayPropertySet);<NEW_LINE>var buf = new CsvReportBuilder(",");<NEW_LINE>buf.addHeader("OSM tags for osmWayPropertySet " + configName, "mixin", "permissions", "safe... | source = WayPropertySetSource.fromConfig(configName); |
586,320 | public synchronized void updateLocation(Location location) {<NEW_LINE>currentLocation = location;<NEW_LINE>if (autoAnnounce && app.accessibilityEnabled()) {<NEW_LINE>final TargetPoint point = app.getTargetPointsHelper().getPointToNavigate();<NEW_LINE>if (point != null) {<NEW_LINE>if ((currentLocation != null) && curren... | Location destination = new Location("map"); |
1,510,187 | public void marshall(Decision decision, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (decision == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(decision.getDecisionType(), DECISIONTYPE_BINDING);<NEW_LINE>... | decision.getScheduleLambdaFunctionDecisionAttributes(), SCHEDULELAMBDAFUNCTIONDECISIONATTRIBUTES_BINDING); |
508,850 | public void addDesktopSharingComponents() {<NEW_LINE>OperationSetDesktopSharingServer opSetDesktopSharingServer = callPeer.getProtocolProvider().getOperationSet(OperationSetDesktopSharingServer.class);<NEW_LINE>if (opSetDesktopSharingServer != null && opSetDesktopSharingServer.isRemoteControlAvailable(callPeer)) {<NEW_... | ).getColor("service.gui.MAC_PANEL_BACKGROUND"))); |
871,754 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Permanent permanent = game.getPermanent(source.getFirstTarget());<NEW_LINE>if (controller != null && permanent != null) {<NEW_LINE>Player player = game.getPlayer(permanent.getControllerId())... | target.getFirstTarget(), game); |
1,559,945 | // TODO Recursion to same type will result in endless loop<NEW_LINE>public SServiceType createSServiceType(SClass sClass, boolean recurse) throws UserException, ServerException {<NEW_LINE>if (sClass == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SServiceType sServiceType = new SServiceType();<NEW_LINE>sServiceTyp... | setSimpleName(sClass.getSimpleName()); |
587,140 | protected void encodeHiddenInput(FacesContext context, InputNumber inputNumber, String clientId, String valueToRender) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String inputId = clientId + "_hinput";<NEW_LINE>writer.startElement("input", null);<NEW_LINE>writer.writeAttr... | writeAttribute("value", valueToRender, null); |
1,460,564 | public okhttp3.Call readNamespacedPodDisruptionBudgetCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/policy/v1/namespaces/{namespace}/poddisrupti... | localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); |
1,838,808 | public void drawTo(Graphic graphic, Style heighLight) {<NEW_LINE>if (graphic.isFlagSet(Graphic.Flag.smallIO)) {<NEW_LINE>Vector center = new Vector(-LATEX_RAD.x, 0);<NEW_LINE>graphic.drawCircle(center.sub(LATEX_RAD), center.add(LATEX_RAD), Style.NORMAL);<NEW_LINE>Vector textPos = new Vector(-SIZE2 - LATEX_RAD.x, 0);<NE... | outSize = OutputShape.getOutSize(small); |
83,564 | final CreateDataCatalogResult executeCreateDataCatalog(CreateDataCatalogRequest createDataCatalogRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDataCatalogRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,477,772 | private static <T> boolean intersects(T[] firstSortedArr, T[] secondSortedArr, Comparator<? super T> comparator) {<NEW_LINE>for (int i = 0, l = firstSortedArr.length, j = 0, k = secondSortedArr.length; i < l && j < k; ) {<NEW_LINE>T firstElement = firstSortedArr[i];<NEW_LINE>T secondElement = secondSortedArr[j];<NEW_LI... | j, k, firstElement, comparator); |
193,941 | protected void buildActionMapping() {<NEW_LINE>mapping.clear();<NEW_LINE>Class<?> dc;<NEW_LINE>InterceptorManager interMan = InterceptorManager.me();<NEW_LINE>for (Routes routes : getRoutesList()) {<NEW_LINE>for (Route route : routes.getRouteItemList()) {<NEW_LINE>Class<? extends Controller> controllerClass = route.get... | ) : controllerClass.getMethods()); |
117,532 | private static <K, InputT, AccumT, OutputT> DoFnInfo<?, ?> createDoFnInfo(AppliedCombineFn<K, InputT, AccumT, OutputT> combineFn, SideInputReader sideInputReader) {<NEW_LINE>GlobalCombineFnRunner<InputT, AccumT, OutputT> combineFnRunner = GlobalCombineFnRunners.create(combineFn.getFn());<NEW_LINE>DoFn<KV<K, Iterable<In... | <InputT>>> inputCoder = null; |
1,517,691 | final EventSubscription executeModifyEventSubscription(ModifyEventSubscriptionRequest modifyEventSubscriptionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyEventSubscriptionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>aw... | (super.beforeMarshalling(modifyEventSubscriptionRequest)); |
1,728,431 | public Clustering<Model> run(Relation<? extends NumberVector> relation) {<NEW_LINE>// current dimensionality associated with each seed<NEW_LINE>int dim_c = RelationUtil.dimensionality(relation);<NEW_LINE>if (dim_c < l) {<NEW_LINE>throw new IllegalStateException("Dimensionality of data < parameter l! " + "(" + <MASK><NE... | dim_c + " < " + l + ")"); |
1,055,560 | public void levelOrderInput() {<NEW_LINE>LinkedList<Integer> inputData = new LinkedList<>();<NEW_LINE>LinkedList<Node> nodes = new LinkedList<>();<NEW_LINE>Node root = new Node();<NEW_LINE><MASK><NEW_LINE>root.data = data;<NEW_LINE>nodes.addLast(root);<NEW_LINE>int flag = 1;<NEW_LINE>int total = 1;<NEW_LINE>while (flag... | int data = scan.nextInt(); |
1,159,525 | protected boolean areAllModuleOptionsEqual(ClasspathLocation other) {<NEW_LINE>if (this.patchModuleName != null) {<NEW_LINE>if (other.patchModuleName == null)<NEW_LINE>return false;<NEW_LINE>if (!this.patchModuleName.equals(other.patchModuleName))<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>if (other.patchModuleN... | getList(UpdateKind.MODULE, false); |
380,639 | public Map<String, Object> buildHiveReader() {<NEW_LINE>DataxHivePojo dataxHivePojo = new DataxHivePojo();<NEW_LINE>dataxHivePojo.setJdbcDatasource(readerDatasource);<NEW_LINE>List<Map<String, Object>> columns = Lists.newArrayList();<NEW_LINE>readerColumns.forEach(c -> {<NEW_LINE>Map<String, Object<MASK><NEW_LINE>colum... | > column = Maps.newLinkedHashMap(); |
583,323 | final CreateContactFlowModuleResult executeCreateContactFlowModule(CreateContactFlowModuleRequest createContactFlowModuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createContactFlowModuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | invoke(request, responseHandler, executionContext); |
93,987 | // Identity link related history<NEW_LINE>@Override<NEW_LINE>public void recordIdentityLinkCreated(IdentityLinkEntity identityLink) {<NEW_LINE>// It makes no sense storing historic counterpart for an identity link that is related<NEW_LINE>// to a process definition only as this is never kept in history<NEW_LINE>if (get... | setId(identityLink.getId()); |
581,986 | private void loadNode515() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerConfiguration_CertificateGroups_DefaultUserTokenGroup_TrustList_CloseAndUpdate_OutputArguments, new QualifiedName(0, "OutputArguments"), new LocalizedText("en", "OutputArgu... | setInput(new StringReader(xml)); |
1,685,151 | public ApiResponse<RecycleBinContents> recycleBinGetRecycleBinContentsWithHttpInfo(Integer pageIndex, Integer pageSize, String sortExpression) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'pageIndex' is set<NEW_LINE>if (pageIndex == null) {<NEW_LINE>throw new ... | ("", "pageIndex", pageIndex)); |
447,521 | public void innerComplete(InnerSubscriber<R> sender) {<NEW_LINE>sender.setDone();<NEW_LINE>if (get() == 0 && compareAndSet(0, 1)) {<NEW_LINE>Queue<R<MASK><NEW_LINE>if (innerQueue == null || innerQueue.isEmpty()) {<NEW_LINE>subscribers.remove(sender);<NEW_LINE>boolean done = upstreamDone;<NEW_LINE>Queue<InnerSubscriber<... | > innerQueue = sender.getQueue(); |
621,095 | public void load(PolicyMappings policyMappings) {<NEW_LINE>ASN1Sequence policyMappingsSeq = (ASN1Sequence) policyMappings.toASN1Primitive();<NEW_LINE>// convert and sort<NEW_LINE>ASN1Encodable[] asn1EncArray = policyMappingsSeq.toArray();<NEW_LINE>PolicyMapping[] policyMappingsArray <MASK><NEW_LINE>for (int i = 0; i < ... | = new PolicyMapping[asn1EncArray.length]; |
608,033 | public void addParent(MProductBOM bom, DefaultMutableTreeNode parent) {<NEW_LINE>MProduct M_Product = MProduct.get(getCtx(), bom.getM_Product_ID());<NEW_LINE>Vector<Object> line = new Vector<Object>(17);<NEW_LINE>// 0 Select<NEW_LINE>line.add(new Boolean(false));<NEW_LINE>// 1 IsActive<NEW_LINE>line.add(new Boolean(M_P... | ), u.getUOMSymbol()); |
1,207,042 | public static void init(GameContainer container, StateBasedGame game) {<NEW_LINE>input = container.getInput();<NEW_LINE>int width = container.getWidth();<NEW_LINE>int height = container.getHeight();<NEW_LINE>// game settings<NEW_LINE>container.setTargetFrameRate(Options.getTargetFPS());<NEW_LINE>container.setVSync(Opti... | DownloadNode.init(width, height); |
1,449,812 | public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {<NEW_LINE>final AttributedList<ch.cyberduck.core.Path> paths = new AttributedList<>();<NEW_LINE>try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(session.toPath(directory))) {... | add(Path.Type.directory); |
1,574,763 | Map<ImportEntry, Collection<ImportComment>> reassignComments(Collection<ImportEntry> resultantImports) {<NEW_LINE>Map<ImportEntry, Collection<OriginalImportEntry>> importAssignments = assignRemovedImports(resultantImports);<NEW_LINE>Map<ImportEntry, Collection<ImportComment>> commentAssignments = new HashMap<ImportEntr... | > assignedImportIterator = assignedImports.iterator(); |
57,701 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View root = inflater.inflate(R.layout.fragment_wallet, container, false);<NEW_LINE>loadingRecentContainer = root.findViewById(R.id.wallet_loading_recent_container);<NEW_LINE>layoutAccountRecommended = r... | findViewById(R.id.wallet_supporting_balance); |
703,998 | private void checkParentProject(final NbMavenProjectImpl project, final String newName) throws IOException {<NEW_LINE>Project[] prjs = OpenProjects.getDefault().getOpenProjects();<NEW_LINE>for (Project prj : prjs) {<NEW_LINE>if (prj.getProjectDirectory().equals(project.getProjectDirectory())) {<NEW_LINE>continue;<NEW_L... | ).lookup(NbMavenProjectImpl.class); |
1,587,674 | // TODO-BQ: this function may be refactored<NEW_LINE>private void updateBaseInfo(final BaseInfo baseInfo, final ResolveOptions resOpt) {<NEW_LINE>if (this.getExtendsTrait() != null) {<NEW_LINE>baseInfo.setTrait(this.getExtendsTrait<MASK><NEW_LINE>if (baseInfo.getTrait() != null) {<NEW_LINE>baseInfo.setRts(this.getExten... | ().fetchObjectDefinition(resOpt)); |
491,746 | public static Set<ITargetSelector> parse(Iterable<?> selectors, ISelectorContext context, Set<ITargetSelector> parsed) {<NEW_LINE>if (parsed == null) {<NEW_LINE>parsed = new LinkedHashSet<ITargetSelector>();<NEW_LINE>}<NEW_LINE>if (selectors != null) {<NEW_LINE>for (Object selector : selectors) {<NEW_LINE>if (selector ... | .parse(desc, context)); |
1,723,715 | private void load(int AD_User_ID) {<NEW_LINE>log.info("ID=" + AD_User_ID + ", AD_Client_ID=" + m_AD_Client_ID);<NEW_LINE>String sql <MASK><NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sql, null);<NEW_LINE>pstmt.setInt(1, m_AD_Client_ID);<NEW_... | = "SELECT * " + "FROM AD_User " + "WHERE AD_Client_ID=?" + " AND AD_User_ID=?"; |
1,316,339 | public void added(VisualizerEvent.Added ev) {<NEW_LINE>if (this != parent.getChildren()) {<NEW_LINE>// children were replaced, quit processing event<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>snapshot = ev.getSnapshot();<NEW_LINE>ListIterator<VisualizerNode> it = getVisNodes(true).listIterator();<NEW_LINE>int[] indxs = ev.ge... | (VisualizerNode) p.getParent(); |
150,247 | protected Optional<String> lookup(Path developerDir) {<NEW_LINE>return cache.computeIfAbsent(developerDir, ignored -> {<NEW_LINE>Path versionPlist = developerDir.getParent().resolve("version.plist");<NEW_LINE>NSString result;<NEW_LINE>try {<NEW_LINE>NSDictionary dict = (NSDictionary) PropertyListParser.parse(Files.read... | throw new IllegalStateException("plist parser threw unexpected exception", e); |
392,386 | public void fillMenu(String sColumnName, Menu menu) {<NEW_LINE>List<Object<MASK><NEW_LINE>final List<ChatInstance> chats = new ArrayList<>();<NEW_LINE>for (Object obj : ds) {<NEW_LINE>if (obj instanceof ChatInstance) {<NEW_LINE>chats.add((ChatInstance) obj);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// show in sidebar<NEW_LINE>Me... | > ds = tv.getSelectedDataSources(); |
1,389,180 | private void dealMessage(FlatDhcpAcquireDhcpServerIpMsg msg) {<NEW_LINE>FlatDhcpAcquireDhcpServerIpReply reply = new FlatDhcpAcquireDhcpServerIpReply();<NEW_LINE>L3NetworkVO l3NetworkVO = dbf.findByUuid(msg.getL3NetworkUuid(), L3NetworkVO.class);<NEW_LINE>for (int ipVersion : l3NetworkVO.getIpVersions()) {<NEW_LINE>Str... | getDhcpServerList().add(struct); |
493,486 | private static synchronized FDBigInt big5pow(int p) {<NEW_LINE>if (p < 0)<NEW_LINE>throw new RuntimeException("Assertion botch: negative power of 5");<NEW_LINE>if (b5p == null) {<NEW_LINE>b5p = new FDBigInt[p + 1];<NEW_LINE>} else if (b5p.length <= p) {<NEW_LINE>FDBigInt[] t <MASK><NEW_LINE>System.arraycopy(b5p, 0, t, ... | = new FDBigInt[p + 1]; |
1,577,845 | public boolean eIsSet(int featureID) {<NEW_LINE>switch(featureID) {<NEW_LINE>case ModelPackage.COLOR_LED__LOGGER:<NEW_LINE>return LOGGER_EDEFAULT == null ? logger != null : !LOGGER_EDEFAULT.equals(logger);<NEW_LINE>case ModelPackage.COLOR_LED__UID:<NEW_LINE>return UID_EDEFAULT == null ? uid != null : !UID_EDEFAULT.equa... | : !DIGITAL_STATE_EDEFAULT.equals(digitalState); |
132,663 | public void run(RegressionEnvironment env) {<NEW_LINE>String expression = "@name('s0') select * from pattern " + "[every A=SupportCallEvent -> every B=SupportCallEvent(dest=A.dest, startTime in [A.startTime:A.endTime]) where timer:within (7200000)]" + "where B.source != A.source";<NEW_LINE>env.compileDeploy(expression)... | getNewDataList().size()); |
1,682,133 | public PlatformToolProvider select(NativeLanguage sourceLanguage, NativePlatformInternal targetMachine) {<NEW_LINE>PlatformToolProvider toolProvider = getProviderForPlatform(targetMachine);<NEW_LINE>switch(sourceLanguage) {<NEW_LINE>case CPP:<NEW_LINE>if (toolProvider instanceof UnsupportedPlatformToolProvider) {<NEW_L... | toolProvider.locateTool(ToolType.C_COMPILER); |
642,230 | private void loadLanguageProviders() {<NEW_LINE>LOGGER.debug(CORE, "Found {} language providers", ServiceLoaderUtils.streamServiceLoader(() -> serviceLoader, sce -> LOGGER.fatal("Problem with language loaders")).count());<NEW_LINE>serviceLoader.forEach(languageProviders::add);<NEW_LINE>languageProviders.forEach(lp -> {... | throw new RuntimeException("Huh?", e); |
1,330,109 | public void onRecordStopped() {<NEW_LINE>Log.i(TAG, "record stop time: " + System.currentTimeMillis());<NEW_LINE>long sectionRecordDurationMs = System.currentTimeMillis() - mSectionBeginMs;<NEW_LINE>long totalRecordDurationMs = sectionRecordDurationMs + (mDurationRecordStack.isEmpty() ? <MASK><NEW_LINE>double totalVide... | 0 : mDurationRecordStack.peek()); |
1,079,947 | public Map<PathItem.HttpMethod, Operation> readOperationsMap() {<NEW_LINE>Map<PathItem.HttpMethod, Operation> result = new LinkedHashMap<>();<NEW_LINE>if (this.get != null) {<NEW_LINE>result.put(PathItem.HttpMethod.GET, this.get);<NEW_LINE>}<NEW_LINE>if (this.put != null) {<NEW_LINE>result.put(PathItem.HttpMethod.PUT, ... | HttpMethod.POST, this.post); |
1,014,933 | public void marshall(PutAlarmRequest putAlarmRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (putAlarmRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(putAlarmRequest.getAlarmName(), ALARMNA... | putAlarmRequest.getMonitoredResourceName(), MONITOREDRESOURCENAME_BINDING); |
89,242 | public void onRegisterDevice(int status, @Nullable String message, @Nullable BackupError error) {<NEW_LINE>FragmentActivity activity = getActivity();<NEW_LINE>if (AndroidUtils.isActivityNotDestroyed(activity)) {<NEW_LINE>int errorCode = error != null ? error.getCode() : -1;<NEW_LINE>if (dialogType == LoginDialogType.VE... | progressBar.setVisibility(View.INVISIBLE); |
510,601 | public static List<Field> createFields(String fieldName, Object value, Field.Store store, Boolean sort) {<NEW_LINE>List<Field> fields = new ArrayList<>();<NEW_LINE>if (value instanceof Number) {<NEW_LINE>Number number = (Number) value;<NEW_LINE>if (value instanceof Long) {<NEW_LINE>fields.add(new NumericDocValuesField(... | , date.getTime())); |
180,757 | // Development assistance in seeing into the algorithms.<NEW_LINE>private static void print(Set<String> inUsePrefixURIs, PrefixMapping prefixMapping) {<NEW_LINE>// Convert to prefixes.<NEW_LINE>Set<String> inUsePrefixes = urisToPrefixes(prefixMapping, inUsePrefixURIs);<NEW_LINE>// ----- Analysis<NEW_LINE>System.out.pri... | SetUtils.difference(prefixURIs, inUsePrefixURIs); |
1,797,267 | void propagate() {<NEW_LINE>if (this.parent != null) {<NEW_LINE>// Propagate the lowest death level of any descendants:<NEW_LINE>if (this.propagatedLowestChildSplitLevel == Double.MAX_VALUE) {<NEW_LINE>this.propagatedLowestChildSplitLevel = this.splitLevel;<NEW_LINE>}<NEW_LINE>if (this.propagatedLowestChildSplitLevel <... | propagatedDescendants.addAll(this.propagatedDescendants); |
5,887 | private void validateUnicodePoints(String text, Location pos) {<NEW_LINE>Matcher matcher = Utils.UNICODE_PATTERN.matcher(text);<NEW_LINE>while (matcher.find()) {<NEW_LINE>String leadingBackSlashes = matcher.group(1);<NEW_LINE>if (Utils.isEscapedNumericEscape(leadingBackSlashes)) {<NEW_LINE>// e.g. \\u{61}, \\\\u{61}<NE... | hexCodePoint = matcher.group(2); |
281,167 | public void show(Activity activity) {<NEW_LINE>if (picker != null) {<NEW_LINE>picker.show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// prompt for input params<NEW_LINE>AlertDialog.Builder builder <MASK><NEW_LINE>View view = View.inflate(activity, R.layout.milstd2525list, null);<NEW_LINE>milstd_search_affil_f = view.findV... | = new AlertDialog.Builder(activity); |
1,023,957 | private void decodeExtras(Position position, Parser parser) {<NEW_LINE>int mask = parser.nextInt();<NEW_LINE>String[] data = parser.next().split(",");<NEW_LINE>int index = 0;<NEW_LINE>if (BitUtil.check(mask, 0)) {<NEW_LINE>// pulse counter 3<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>if (BitUtil.check(mask, 1)) {<NEW_LINE>p... | (data[index++])); |
585,524 | public void clear() {<NEW_LINE>Path path = new Path();<NEW_LINE><MASK><NEW_LINE>path.addRect(0F, 0F, 1000F, 1000F, Path.Direction.CCW);<NEW_LINE>path.close();<NEW_LINE>Paint paint = new Paint();<NEW_LINE>paint.setColor(Color.parseColor("#303030"));<NEW_LINE>paint.setStyle(Paint.Style.FILL);<NEW_LINE>if (this.historyPoi... | path.moveTo(0F, 0F); |
1,602,922 | public static void deferredTick() {<NEW_LINE>deferTick = false;<NEW_LINE>Minecraft instance = Minecraft.getInstance();<NEW_LINE>Screen currentScreen = instance.screen;<NEW_LINE>if (hoveredStack.isEmpty() || trackingStack.isEmpty()) {<NEW_LINE>trackingStack = ItemStack.EMPTY;<NEW_LINE>holdWProgress.startWithValue(0);<NE... | .25f, value) * .25f)); |
1,769,611 | public static void fetchViewers(final SiteModel site, final int offset, final FetchViewersCallback callback) {<NEW_LINE>RestRequest.Listener listener = new RestRequest.Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(JSONObject jsonObject) {<NEW_LINE>if (jsonObject != null && callback != null) ... | ), Person.PersonType.VIEWER); |
197,832 | private void processParam(Element element, T holder) {<NEW_LINE>ExecutableElement method = (ExecutableElement) element.getEnclosingElement();<NEW_LINE>List<? extends VariableElement> parameters = method.getParameters();<NEW_LINE>List<ParamHelper> parameterList = methodParameterMap.get(method);<NEW_LINE>JBlock targetBlo... | afterAllParametersInjected(holder, method, parameterList); |
1,742,313 | public SidewalkListDevice unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SidewalkListDevice sidewalkListDevice = new SidewalkListDevice();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.get... | String currentParentElement = context.getCurrentParentElement(); |
1,359,648 | public static String restoreDatabaseInternal(final Context context, final Uri databaseUri) {<NEW_LINE>final File tmpFile = ContentStorage.get().writeUriToTempFile(databaseUri, "backup_db.tmp");<NEW_LINE>DBRestoreResult result = DBRestoreResult.RESTORE_FAILED_GENERAL;<NEW_LINE>try {<NEW_LINE>final SQLiteDatabase backup ... | ? DBRestoreResult.RESTORE_SUCCESSFUL : DBRestoreResult.RESTORE_FAILED_GENERAL; |
995,755 | private static Map<Long, ECPublicKey> parsePublicKeysJson(String publicKeysJson) throws GeneralSecurityException {<NEW_LINE>Map<Long, ECPublicKey> publicKeys = new HashMap<>();<NEW_LINE>try {<NEW_LINE>JsonArray keys = JsonParser.parseString(publicKeysJson).getAsJsonObject().get("keys").getAsJsonArray();<NEW_LINE>for (i... | ).getAsString()))); |
1,810,690 | protected ObjectNode createPropertiesNode(FlowElement flowElement, ObjectNode flowElementNode, ObjectMapper objectMapper) {<NEW_LINE>UserTask userTask = (UserTask) flowElement;<NEW_LINE>ObjectNode taskNameNode = objectMapper.createObjectNode();<NEW_LINE>putPropertyValue(BPMN_MODEL_VALUE, userTask.getName(), taskNameNod... | userTask.getCandidateGroups(), candidateGroupsNode); |
1,663,974 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@public @buseventtype create objectarray schema MyEventTwo (g1 String, d1 String, d2 String, val int);\n" + "@name('s0') select sum(val) as c0, sum(val, group_by: d1) as c1, sum(val, group_by: d2) as c2 from MyEventTwo group by g1";<NEW_LINE>env.compil... | cols = "c0,c1,c2".split(","); |
83,991 | public byte[] serialize(String json) {<NEW_LINE>try {<NEW_LINE>JSONObject jsonObject = new JSONObject(json);<NEW_LINE>jsonSchema.validate(jsonObject);<NEW_LINE>} catch (JsonProcessingException e) {<NEW_LINE>String errorMsg = String.format("Provided json [%s] is not valid according to schema", json);<NEW_LINE>log.error(... | (schemaId).array()); |
1,830,547 | public void sendNotificationScheduled(Bundle bundle) {<NEW_LINE>String intentClassName = getMainActivityClassName();<NEW_LINE>if (intentClassName == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String notificationId = bundle.getString("id");<NEW_LINE>if (notificationId == null) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LI... | Log.e(TAG, "failed to schedule notification because id is missing"); |
1,740,572 | private String build(AppConsole console) throws Exception {<NEW_LINE>String[] imageIds = new String[BUILT_IMAGE_MESSAGE_PATS.length];<NEW_LINE>File directory = new File(project.getLocation().toString());<NEW_LINE>String[] command = getBuildCommand(directory);<NEW_LINE>ProcessBuilder builder = new ProcessBuilder(command... | ).put("JAVA_HOME", jhome); |
278,116 | public static void checkNeedForEnclosingInstanceCast(BlockScope scope, Expression enclosingInstance, TypeBinding enclosingInstanceType, TypeBinding memberType) {<NEW_LINE>if (scope.compilerOptions().getSeverity(CompilerOptions.UnnecessaryTypeCheck) == ProblemSeverities.Ignore)<NEW_LINE>return;<NEW_LINE>TypeBinding cast... | CastExpression) enclosingInstance).expression.resolvedType; |
1,020,177 | protected static String[] handleNodeLabeling(String[] argArray) {<NEW_LINE>// HadoopSparkJob will set env var on this process if we enable node labeling policy for spark jobtype.<NEW_LINE>// We also detect the yarn cluster settings has enable node labeling<NEW_LINE>// Enabling node labeling policy for spark job type is... | addFirst(SPARK_EXECUTOR_NODE_LABEL_EXP + "=" + desiredNodeLabel); |
421,551 | static Geometry symmetricDifference(Geometry geometry_a, Geometry geometry_b, SpatialReference spatial_reference, ProgressTracker progress_tracker) {<NEW_LINE>int dim_a = geometry_a.getDimension();<NEW_LINE>int dim_b = geometry_b.getDimension();<NEW_LINE>if (geometry_a.isEmpty() && geometry_b.isEmpty())<NEW_LINE>return... | geometry_a, geometry_b, spatial_reference, progress_tracker); |
9,052 | public ASTNode generateWhitespaceBetweenTokens(ASTNode left, ASTNode right) {<NEW_LINE>Language l = PsiUtilCore.getNotAnyLanguage(left);<NEW_LINE>Language rightLang = PsiUtilCore.getNotAnyLanguage(right);<NEW_LINE>if (rightLang.isKindOf(l)) {<NEW_LINE>// get more precise lexer<NEW_LINE>l = rightLang;<NEW_LINE>}<NEW_LIN... | 0, 1, null, manager); |
1,228,415 | public static List<String> prepareQueries(List<PublishQueueElement> bundle) {<NEW_LINE>StringBuilder assetBuffer = new StringBuilder();<NEW_LINE>List<String> assets;<NEW_LINE>assets = new ArrayList<String>();<NEW_LINE>if (bundle.size() == 1 && bundle.get(0).getType().equals("contentlet")) {<NEW_LINE>assetBuffer.append(... | assetBuffer.toString() + " +working:true"); |
1,450,788 | private static EventType resolveOrCreateType(EPTypeClass clazz, StatementCompileTimeServices services) {<NEW_LINE>services.getEventTypeCompileTimeResolver();<NEW_LINE>// find module-own type<NEW_LINE>Collection<EventType> moduleTypes = services.getEventTypeCompileTimeRegistry().getNewTypesAdded();<NEW_LINE>for (EventTy... | ).getCreateBeanType(clazz, false); |
417,421 | public ModelAndView handle(Request request, Response response) {<NEW_LINE>String username = request.session().attribute("username");<NEW_LINE>String currentPassword = request.queryParams("password");<NEW_LINE>String <MASK><NEW_LINE>String newPasswordRepeat = request.queryParams("new_password_repeat");<NEW_LINE>if (newP... | newPassword = request.queryParams("new_password"); |
244,300 | final DescribeScriptResult executeDescribeScript(DescribeScriptRequest describeScriptRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeScriptRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
257,991 | public void preparedData() {<NEW_LINE>AlterTableGroupDropPartition alterTableGroupDropPartition = (AlterTableGroupDropPartition) relDdl;<NEW_LINE>String tableGroupName = alterTableGroupDropPartition.getTableGroupName();<NEW_LINE>String tableName = alterTableGroupDropPartition.getTableName().toString();<NEW_LINE>SqlAlte... | targetGroupDetailInfoExRecords = TableGroupLocation.getOrderedGroupList(schemaName); |
353,903 | public void onPrepareOptionsMenu(@NonNull Menu menu) {<NEW_LINE>super.onPrepareOptionsMenu(menu);<NEW_LINE>CollapsingToolbarLayout collapsingToolbarLayout = requireView().findViewById(R.id.collapsingtoolbarlayout);<NEW_LINE>@SuppressWarnings("RestrictTo")<NEW_LINE>int maxLines = collapsingToolbarLayout.getMaxLines();<N... | value = linesMap.valueAt(i); |
1,633,040 | public void handleCreationDict(KrollDict dict) {<NEW_LINE>// only supported on Android 7.1 and above<NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N_MR1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String id = null;<NEW_LINE>if (dict.containsKey(TiC.PROPERTY_ID)) {<NEW_LINE>id = dict.getString(TiC.PROPERTY_ID);<N... | Bitmap bitmap = blob.getImage(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.