idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,556,755 | private Resource.Builder doCreateResourceBuilder() {<NEW_LINE>if (!disableValidation) {<NEW_LINE>checkForNonPublicMethodIssues();<NEW_LINE>}<NEW_LINE>final Class<?> annotatedResourceClass = ModelHelper.getAnnotatedResourceClass(handlerClass);<NEW_LINE>final Path rPathAnnotation = annotatedResourceClass.getAnnotation(Pa... | checkResourceClassSetters(methodList, keepEncodedParams, resourceClassParameters); |
739,329 | public Joystick[] loadJoysticks(InputManager inputManager) {<NEW_LINE>ControllerEnvironment ce = ControllerEnvironment.getDefaultEnvironment();<NEW_LINE>Controller[<MASK><NEW_LINE>List<Joystick> list = new ArrayList<>();<NEW_LINE>for (Controller c : ce.getControllers()) {<NEW_LINE>if (c.getType() == Controller.Type.KEY... | ] cs = ce.getControllers(); |
1,342,822 | public void testDeliveryDelayForDifferentDelaysTopic(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>boolean testFailed = false;<NEW_LINE>JMSContext jmsContext = jmsTCFBindings.createContext();<NEW_LINE>Topic topic = (Topic) new InitialContext().lookup("java:comp/env/eis/topic");<N... | JMSProducer jmsProducer = jmsContext.createProducer(); |
1,748,996 | protected void onHandleIntent(Intent intent) {<NEW_LINE>mTodoText = intent.getStringExtra(TODOTEXT);<NEW_LINE>mTodoUUID = (UUID) intent.getSerializableExtra(TODOUUID);<NEW_LINE>Log.d("OskarSchindler", "onHandleIntent called");<NEW_LINE>NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SE... | putExtra(TodoNotificationService.TODOUUID, mTodoUUID); |
1,132,245 | public long addFile(final String fileName) throws IOException {<NEW_LINE>filesLock.acquireWriteLock();<NEW_LINE>try {<NEW_LINE>checkForClose();<NEW_LINE>Integer fileId = nameIdMap.get(fileName);<NEW_LINE>final OFile fileClassic;<NEW_LINE>if (fileId != null && fileId >= 0) {<NEW_LINE>throw new OStorageException("File wi... | new OStorageException("File add was interrupted"), e); |
933,865 | private Map<String, RequestParameter> validateQueryParams(RoutingContext routingContext) throws ValidationException {<NEW_LINE>// Validation process validate only params that are registered in the validation -> extra params are allowed<NEW_LINE>Map<String, RequestParameter> parsedParams = new HashMap<>();<NEW_LINE>Mult... | String name = rule.getName(); |
1,289,551 | public S3Action unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>S3Action s3Action = new S3Action();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.next... | int originalDepth = context.getCurrentDepth(); |
822,819 | protected Label createDescriptionLabel(Composite parent) {<NEW_LINE>if (isDataSourcePreferencePage()) {<NEW_LINE>Composite composite = UIUtils.createPlaceholder(parent, 2);<NEW_LINE>composite.setFont(parent.getFont());<NEW_LINE>composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));<NEW_LINE>dataSourc... | .CENTER, true, false)); |
692,830 | private Where addWhereClauseForRowRange(String keyAlias, Select select, RowRange<?> rowRange) {<NEW_LINE>Where where = null;<NEW_LINE>boolean keyIsPresent = false;<NEW_LINE>boolean tokenIsPresent = false;<NEW_LINE>if (rowRange.getStartKey() != null || rowRange.getEndKey() != null) {<NEW_LINE>keyIsPresent = true;<NEW_LI... | (lte(keyAlias, BIND_MARKER)); |
704,083 | private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String integrationAccountName, String partnerName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be nu... | this.client.mergeContext(context); |
1,024,196 | public void createPartControl(Composite aParent) {<NEW_LINE>super.createPartControl(aParent);<NEW_LINE>getGitRepositoryManager().addListener(this);<NEW_LINE>if (fChangedFilesFilterProjects.contains(selectedProject)) {<NEW_LINE>UIJob job = new // $NON-NLS-1$<NEW_LINE>// $NON-NLS-1$<NEW_LINE>UIJob("Turn on git filter ini... | pullCalc.setPriority(Job.LONG); |
1,655,174 | private void doUpdateVisitedHistory(String url) {<NEW_LINE>ContentResolver cr = mContext.getContentResolver();<NEW_LINE>Cursor c = null;<NEW_LINE>try {<NEW_LINE>c = cr.query(History.CONTENT_URI, new String[] { History._ID, History.VISITS }, History.URL + "=?", new String[] { url }, null);<NEW_LINE>if (c.moveToFirst()) ... | put(History.URL, url); |
1,384,158 | public RedshiftDestinationProperties unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RedshiftDestinationProperties redshiftDestinationProperties = new RedshiftDestinationProperties();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurren... | class).unmarshall(context)); |
1,408,619 | protected void encodeSubmenu(FacesContext context, SplitButton button, Submenu submenu) throws IOException {<NEW_LINE>if (!submenu.isRendered()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String label = submenu.getLabel();<NEW_LINE>String style = submenu.getStyl... | writeAttribute("class", styleClass, null); |
1,225,720 | private static ResultCursor handleExplainDdl(ExecutionContext executionContext, ExecutionPlan executionPlan) {<NEW_LINE>if (executionPlan.getPlan() instanceof BaseDdlOperation) {<NEW_LINE>final BaseDdlOperation plan = (BaseDdlOperation) executionPlan.getPlan();<NEW_LINE>ArrayResultCursor result = new ArrayResultCursor(... | addColumn("Count", DataTypes.IntegerType); |
775,003 | final DescribeDomainEndpointOptionsResult executeDescribeDomainEndpointOptions(DescribeDomainEndpointOptionsRequest describeDomainEndpointOptionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDomainEndpointOptionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,338,581 | public void execute(RequestMethod method) throws IOException {<NEW_LINE>switch(method) {<NEW_LINE>case GET:<NEW_LINE>{<NEW_LINE>// add parameters<NEW_LINE>String combinedParams = "";<NEW_LINE>if (!params.isEmpty()) {<NEW_LINE>combinedParams += "?";<NEW_LINE>for (NameValuePair p : params) {<NEW_LINE>String paramString =... | ), h.getValue()); |
1,156,821 | private List<ExcelSheetData> parseExcel2(String filename, InputStream inputStream, boolean isPreview) throws Exception {<NEW_LINE>List<ExcelSheetData> excelSheetDataList = new ArrayList<>();<NEW_LINE>String suffix = filename.substring(filename.lastIndexOf(".") + 1);<NEW_LINE>if (StringUtils.equalsIgnoreCase(suffix, "xl... | toArray(String[]::new); |
1,837,155 | final GetPredictiveScalingForecastResult executeGetPredictiveScalingForecast(GetPredictiveScalingForecastRequest getPredictiveScalingForecastRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPredictiveScalingForecastRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.Cl... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,669,825 | public void actionPerformed(AnActionEvent e) {<NEW_LINE>final VirtualFile projectFile = findProjectFile(e);<NEW_LINE>if (projectFile == null) {<NEW_LINE>FlutterMessages.showError("Error Opening Android Studio", "Project not found.", e.getProject());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int modifiers = e.getModifi... | e.getData(CommonDataKeys.VIRTUAL_FILE); |
692,621 | private CompletableFuture<SessionDetails> reallyJoin(String realm, List<IAuthenticator> authenticators) {<NEW_LINE>LOGGER.d("Called join() with realm=" + realm);<NEW_LINE>mRealm = realm;<NEW_LINE>mAuthenticators = authenticators;<NEW_LINE>mGoodbyeSent = false;<NEW_LINE>Map<String, Map> roles = new HashMap<>();<NEW_LINE... | mJoinFuture = new CompletableFuture<>(); |
784,164 | public static double rawLogProbability(double x, double lambda) {<NEW_LINE>// Extreme lambda<NEW_LINE>if (lambda == 0) {<NEW_LINE>return ((x == 0) ? 1. : Double.NEGATIVE_INFINITY);<NEW_LINE>}<NEW_LINE>// Extreme values<NEW_LINE>if (Double.isInfinite(lambda) || x < 0) {<NEW_LINE>return Double.NEGATIVE_INFINITY;<NEW_LINE... | ) - devianceTerm(x, lambda); |
304,822 | public static byte[] nonceGeneration(byte[] partialIV, byte[] senderID, byte[] commonIV, int nonceLength) throws OSException {<NEW_LINE>if (partialIV != null) {<NEW_LINE>if (senderID != null) {<NEW_LINE>if (commonIV != null) {<NEW_LINE>if (nonceLength > 0) {<NEW_LINE>int s = senderID.length;<NEW_LINE>int zeroes = 5 - p... | throw new NullPointerException(ErrorDescriptions.PARTIAL_IV_NULL); |
1,507,317 | public edu.stanford.nlp.loglinear.model.proto.GraphicalModelProto.GraphicalModel buildPartial() {<NEW_LINE>edu.stanford.nlp.loglinear.model.proto.GraphicalModelProto.GraphicalModel result = new edu.stanford.nlp.loglinear.model.proto.GraphicalModelProto.GraphicalModel(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NE... | .metaData_ = metaDataBuilder_.build(); |
226,718 | public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException {<NEW_LINE>final Weight fastMatchWeight = fastMatchQuery == null ? null : searcher.createWeight(fastMatchQuery, ScoreMode.COMPLETE_NO_SCORES, 1f);<NEW_LINE>return new ConstantScoreWeight(this, boost) {<NEW_LINE><NEW_... | score(), scoreMode, twoPhase); |
1,544,088 | private void loadNode138() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.SubscriptionDiagnosticsArrayType_SubscriptionDiagnostics_TransferredToAltClientCount, new QualifiedName(0, "TransferredToAltClientCount"), new LocalizedText("en", "TransferredToAltClientCount"), ... | this.nodeManager.addNode(node); |
974,277 | public Pair<GeneralDataset<L, F>, GeneralDataset<L, F>> split(int start, int end) {<NEW_LINE>int devSize = end - start;<NEW_LINE>int trainSize = size() - devSize;<NEW_LINE>int[][] devData = new int[devSize][];<NEW_LINE>double[][] devValues = new double[devSize][];<NEW_LINE>int[] devLabels = new int[devSize];<NEW_LINE>i... | Pair<>(train, dev); |
511,677 | public void addInvitedSignaling(MethodCall methodCall, final MethodChannel.Result result) {<NEW_LINE>HashMap<String, Object> info = CommonUtil.getParam(methodCall, result, "info");<NEW_LINE>V2TIMSignalingInfo param = new V2TIMSignalingInfo();<NEW_LINE>if (info.get("inviteID") != null) {<NEW_LINE>param.setInviteID((Stri... | returnError(result, code, desc); |
841,791 | protected String doIt() throws Exception {<NEW_LINE>log.info("SourceAcctSchema_ID=" + p_SourceAcctSchema_ID + ", TargetAcctSchema_ID=" + p_TargetAcctSchema_ID);<NEW_LINE>if (p_SourceAcctSchema_ID == 0 || p_TargetAcctSchema_ID == 0)<NEW_LINE>throw new AdempiereSystemError("ID=0");<NEW_LINE>if (p_SourceAcctSchema_ID == p... | ] targetElements = target.getAcctSchemaElements(); |
149,027 | final CreateHostResult executeCreateHost(CreateHostRequest createHostRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createHostRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | addHandlerContext(HandlerContextKey.SERVICE_ID, "CodeStar connections"); |
656,613 | public Observable<Boolean> namedJobExists(final String jobName) {<NEW_LINE>return masterMonitor.getMasterObservable().filter(md -> md != null).switchMap((Func1<MasterDescription, Observable<Boolean>>) masterDescription -> {<NEW_LINE>String uri = API_JOB_NAME_LIST + "/" + jobName;<NEW_LINE>logger.info("Calling GET on " ... | JSONArray jsonArray = new JSONArray(response); |
128,226 | static public String add_escapes(String str) {<NEW_LINE>String retval = "";<NEW_LINE>char ch;<NEW_LINE>for (int i = 0; i < str.length(); i++) {<NEW_LINE>ch = str.charAt(i);<NEW_LINE>if (ch == '\b') {<NEW_LINE>retval += "\\b";<NEW_LINE>} else if (ch == '\t') {<NEW_LINE>retval += "\\t";<NEW_LINE>} else if (ch == '\n') {<... | 4, s.length()); |
160,663 | // find element in unsorted collection<NEW_LINE>private static void testSearch() {<NEW_LINE>Collection<String> collection = Lists.newArrayList("2", "14", "3", "13", "43");<NEW_LINE>MutableList<String> mutableList = FastList.newListWith("2", "14", "3", "13", "43");<NEW_LINE>Iterable<String> iterable = collection;<NEW_LI... | find(iterable, "13"::equals); |
1,110,150 | public void visit(BIRFunction birFunction) {<NEW_LINE>for (BIRErrorEntry errorEntry : birFunction.errorTable) {<NEW_LINE>addErrorTableDependency(errorEntry);<NEW_LINE>}<NEW_LINE>// First add all the instructions within the function to a list.<NEW_LINE>// This is done since the order of bb's cannot be guaranteed.<NEW_LI... | ).forEach(this::addDependency); |
844,196 | public <T extends Script, M> CompiledScript<T, M> loadFromDir(ScriptSource source, HashCode sourceHashCode, ClassLoaderScope targetScope, ClassPath scriptClassPath, File metadataCacheDir, CompileOperation<M> transformer, Class<T> scriptBaseClass) {<NEW_LINE>File metadataFile = new File(metadataCacheDir, METADATA_FILE_N... | .getDisplayName()), e); |
105,789 | public void write(org.apache.thrift.protocol.TProtocol prot, create_atomic_multilog_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (s... | oprot.writeString(struct.name); |
670,862 | public void endReport() {<NEW_LINE>FileOutputStream out = null;<NEW_LINE>try {<NEW_LINE>out = new FileOutputStream(reportPath);<NEW_LINE>wb.write(out);<NEW_LINE>Case.getCurrentCaseThrows().addReport(reportPath, NbBundle.getMessage(this.getClass(), "ReportExcel.endReport.srcModuleName.text"), "");<NEW_LINE>} catch (IOEx... | Level.SEVERE, "Failed to write Excel report.", ex); |
1,050,807 | public void draw(CommandProcess process, GetStaticModel result) {<NEW_LINE>if (result.getMatchedClassLoaders() != null) {<NEW_LINE>process.write("Matched classloaders: \n");<NEW_LINE>ClassLoaderView.drawClassLoaders(process, result.getMatchedClassLoaders(), false);<NEW_LINE>process.write("\n");<NEW_LINE>return;<NEW_LIN... | table)).write("\n"); |
725,607 | public OutputFormatterCallback<Target> createPostFactoStreamCallback(OutputStream out, QueryOptions options) {<NEW_LINE>return new OutputFormatterCallback<Target>() {<NEW_LINE><NEW_LINE>private Document doc;<NEW_LINE><NEW_LINE>private Element queryElem;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void start() {<NEW_LI... | setOutputProperty(OutputKeys.INDENT, "yes"); |
243,405 | private static long queryLatestStatisticsTimestamp(Datastore datastore, @Nullable String namespace) throws DatastoreException {<NEW_LINE>Query.Builder query = Query.newBuilder();<NEW_LINE>// Note: namespace either being null or empty represents the default namespace, in which<NEW_LINE>// case we treat it as not provide... | ().setValue(1)); |
1,013,028 | public static byte[] readDialogEEPROMBytes(Component parent) {<NEW_LINE>// Choose file<NEW_LINE>File file = null;<NEW_LINE>JFileChooser fileChooser = new JFileChooser();<NEW_LINE>fileChooser.setCurrentDirectory(new java.io.File("."));<NEW_LINE>fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);<NEW_LINE>fileChoo... | new byte[(int) fileSize]; |
346,340 | private void buildJoinFilters() {<NEW_LINE>nameContext.setFindInSelect(false);<NEW_LINE>nameContext.setSelectFirst(false);<NEW_LINE>if (usingFields != null) {<NEW_LINE>for (String using : usingFields) {<NEW_LINE>using = StringUtil.removeBackQuote(using);<NEW_LINE>Pair<String, String> lName = findTbNameByUsing(this.getL... | bf = joinFilter.get(index); |
1,491,376 | private ApiResponseSet<Object> alertToSet(Alert alert) {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put("id", String.valueOf(alert.getAlertId()));<NEW_LINE>map.put("pluginId", String.valueOf(alert.getPluginId()));<NEW_LINE>map.put("alertRef", alert.getAlertRef());<NEW_LINE>// Deprecated in 2.5.0, ... | "tags", alert.getTags()); |
72,293 | private void writePart(JRPart part) throws IOException {<NEW_LINE>ComponentKey componentKey = part.getComponentKey();<NEW_LINE>PartComponentXmlWriter componentXmlWriter = PartComponentsEnvironment.getInstance(jasperReportsContext).getManager<MASK><NEW_LINE>if (componentXmlWriter.isToWrite(part, this)) {<NEW_LINE>writer... | (componentKey).getComponentXmlWriter(jasperReportsContext); |
1,636,100 | protected void initScene() {<NEW_LINE>PointLight pointLight = new PointLight();<NEW_LINE>pointLight.setPower(1);<NEW_LINE>pointLight.setPosition(-1, 1, 4);<NEW_LINE>getCurrentScene().addLight(pointLight);<NEW_LINE>getCurrentScene().setBackgroundColor(0xff040404);<NEW_LINE>try {<NEW_LINE>Object3D android = new Cube(2.0f... | (3, 1, 3)); |
630,899 | protected boolean playback(IFigure figure) {<NEW_LINE>Connection conn = (Connection) figure;<NEW_LINE>PointList list1 = (PointList) Animation.getInitialState(this, conn);<NEW_LINE>PointList list2 = (PointList) Animation.getFinalState(this, conn);<NEW_LINE>if (list1 == null) {<NEW_LINE>conn.setVisible(false);<NEW_LINE>r... | - progress) * pt2.y); |
1,756,154 | private void generateVersionXMLFiles() throws IOException {<NEW_LINE>FileSet fs = new FileSet();<NEW_LINE>fs.setIncludes("**/*.jar");<NEW_LINE>for (File directory : jarDirectories) {<NEW_LINE>fs.setDir(directory);<NEW_LINE>DirectoryScanner scan = fs.getDirectoryScanner(getProject());<NEW_LINE>StringWriter writeVersionX... | scan.getBasedir(), jarName); |
1,345,922 | public Object convert(Class destClass, Object srcObj) {<NEW_LINE>if (null == srcObj) {<NEW_LINE>MappingUtils.throwMappingException("Cannot convert null to enum of type " + destClass);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if ((srcObj.getClass().equals(Byte.class)) || (srcObj.getClass().equals(Byte.TYPE))) {<NEW_LINE>retur... | ) srcObj).name()); |
1,101,163 | private static long loadRecords(int recordsPerPage, long highestRecordId, ToLongFunction<long[]> loader, GraphDatabaseAPI db) {<NEW_LINE>long total = 0L;<NEW_LINE>int batchSize = 100_000;<NEW_LINE>long[] ids = new long[batchSize];<NEW_LINE>int idx = 0;<NEW_LINE>List<Future<Long>> futures <MASK><NEW_LINE>for (long id = ... | = new ArrayList<>(100); |
564,747 | protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>User user = securityService.getCurrentUser(request);<NEW_LINE>Map<String, Object> map = new HashMap<String, Object>();<NEW_LINE>int id = <MASK><NEW_LINE>MediaFile file = mediaFileService.ge... | ServletRequestUtils.getRequiredIntParameter(request, "id"); |
285,886 | @Path("/{queryname}/drillacross")<NEW_LINE>public ThinQuery drillacross(@PathParam("queryname") String queryName, @FormParam("position") String position, @FormParam("drill") String returns) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("TRACK\t" + "\t/query/" + queryName + "/drillacross\tPOST");<NEW_LINE>}<... | pInt = Integer.parseInt(p); |
1,131,539 | public DataType toDataType() throws DuplicateNameException, IOException {<NEW_LINE>Structure struct = new StructureDataType(FBPT.class.getSimpleName(), 0);<NEW_LINE>struct.add(STRING, FBPK_Constants.FBPT.length(), "magic", null);<NEW_LINE>struct.add(DWORD, "unknown1", null);<NEW_LINE>struct.add(DWORD, "unknown2", null)... | add(DWORD, "unknownE", null); |
41,779 | public static void bufferedToInterleaved(BufferedImage src, InterleavedU8 dst) {<NEW_LINE>final int width = src.getWidth();<NEW_LINE>final int height = src.getHeight();<NEW_LINE>if (dst.getNumBands() == 3) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, height, y -> {<NEW_LINE>for (int y = 0; y < height; y++)... | ) (argb >>> 16); |
799,992 | private void updateColumnSelector() {<NEW_LINE>boolean showDisplayExpression = showDisplayExpression();<NEW_LINE>if (!showDisplayExpression && (columnSelector == null))<NEW_LINE>return;<NEW_LINE>TypeHelper type = getSelectedType();<NEW_LINE>if ((type != null) && Collection.class.isAssignableFrom(FormUtils.typeToClass(t... | String className = t.getName(); |
841,351 | public void insertString(DriverState state) throws Throwable {<NEW_LINE>final int range = state.getRandomNumber();<NEW_LINE>final int rows = state.getSampleSize() + range;<NEW_LINE>final String batchId = UUID.randomUUID().toString();<NEW_LINE>SupplyValueFunction func = state.getSupplyFunction((p, v, l, i) -> p.setStrin... | state, batchId, rows, result); |
761,160 | public void run() {<NEW_LINE>final Map<PsiFile, List<Integer>> lineLengthCachesByFile = new HashMap<>();<NEW_LINE>for (final Issue event : errors) {<NEW_LINE>final PsiFile psiFile = fileNamesToPsiFiles.get(filenameFrom(event));<NEW_LINE>if (psiFile == null) {<NEW_LINE>LOG.info("Could not find mapping for file: " + even... | lineLengthCache = new ArrayList<>(); |
540,448 | private void forcefulClose(final ChannelHandlerContext ctx, final ForcefulCloseCommand msg, ChannelPromise promise) throws Exception {<NEW_LINE>connection().forEachActiveStream(new Http2StreamVisitor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean visit(Http2Stream stream) throws Http2Exception {<NEW_LINE>Nett... | .TransportState clientStream = clientStream(stream); |
741,971 | private void createSchedule(Properties context, String transactionName) {<NEW_LINE>// Delete before apply<NEW_LINE>new Query(context, I_AD_Scheduler.Table_Name, I_AD_Scheduler.COLUMNNAME_AD_Process_ID + " = ?", transactionName).setParameters(FlushSystemQueue.getProcessId()).setClient_ID().list().forEach(scheduler -> sc... | context, FlushSystemQueue.getProcessId()); |
1,048,456 | final DescribeReportDefinitionsResult executeDescribeReportDefinitions(DescribeReportDefinitionsRequest describeReportDefinitionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReportDefinitionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Cost and Usage Report Service"); |
14,941 | public static BlockPos readBlockPos(NBTBase base) {<NEW_LINE>if (base == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>switch(base.getId()) {<NEW_LINE>case Constants.NBT.TAG_INT_ARRAY:<NEW_LINE>{<NEW_LINE>int[] array = ((NBTTagIntArray) base).getIntArray();<NEW_LINE>if (array.length == 3) {<NEW_LINE>return new Bloc... | z = nbt.getInteger("z"); |
1,825,400 | void update(int pollResponseStatusCode, HttpHeaders pollResponseHeaders, String pollResponseBody) {<NEW_LINE>if (pollResponseStatusCode == 202) {<NEW_LINE>try {<NEW_LINE>this.provisioningState = ProvisioningState.IN_PROGRESS;<NEW_LINE>final URL locationUrl = Util.getLocationUrl(pollResponseHeaders, logger);<NEW_LINE>if... | pollResponseHeaders.toMap(), pollResponseBody); |
445,759 | public AuthenticatedUser convertBuiltInUserToRemoteUser(AuthenticatedUser builtInUserToConvert, String newProviderId, UserIdentifier newUserIdentifierInLookupTable) {<NEW_LINE>logger.info("converting user " + builtInUserToConvert.getId() + " from builtin to remote");<NEW_LINE><MASK><NEW_LINE>logger.info("builtin user i... | String builtInUserIdentifier = builtInUserToConvert.getIdentifier(); |
538,438 | final ListDeliveryStreamsResult executeListDeliveryStreams(ListDeliveryStreamsRequest listDeliveryStreamsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDeliveryStreamsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
447,333 | public void init(ClientCapabilities clientCapabilities, ServerCapabilities severCapabilities) {<NEW_LINE>SemanticTokensCapabilities semanticTokens = clientCapabilities != null && clientCapabilities.getTextDocument() != null ? clientCapabilities.getTextDocument().getSemanticTokens() : null;<NEW_LINE>if (semanticTokens !... | modifiersLegend = new LinkedHashMap<>(); |
49,309 | public Request<StopTrainingEntityRecognizerRequest> marshall(StopTrainingEntityRecognizerRequest stopTrainingEntityRecognizerRequest) {<NEW_LINE>if (stopTrainingEntityRecognizerRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(StopTrainingEntityRecognizerRequest)");<NEW_LI... | request.setHttpMethod(HttpMethodName.POST); |
1,666,647 | public Object calculate(Context ctx) {<NEW_LINE>if (left == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("\"^\"" + mm.getMessage("operator.missingLeftOperation"));<NEW_LINE>}<NEW_LINE>if (right == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQ... | MessageManager mm = EngineMessage.get(); |
610,470 | final DescribeChannelMembershipForAppInstanceUserResult executeDescribeChannelMembershipForAppInstanceUser(DescribeChannelMembershipForAppInstanceUserRequest describeChannelMembershipForAppInstanceUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeChannelMembershipForAppInstanceU... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,184,563 | private void peekDrawer() {<NEW_LINE>final View toCapture;<NEW_LINE>final int childLeft;<NEW_LINE>final int peekDistance = mDragger.getEdgeSize();<NEW_LINE>final boolean leftEdge = mGravity == Gravity.LEFT;<NEW_LINE>if (leftEdge) {<NEW_LINE>toCapture = findDrawerWithGravity(Gravity.LEFT);<NEW_LINE>childLeft = (toCaptur... | toCapture = findDrawerWithGravity(Gravity.RIGHT); |
519,113 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_... | getQuery(), Query.class); |
1,756,863 | public ProducerRecord<?, ?> fromMessage(Message<?> messageArg, String defaultTopic) {<NEW_LINE>Message<?> message = messageArg;<NEW_LINE>if (this.messagingConverter != null) {<NEW_LINE>Message<?> converted = this.messagingConverter.toMessage(message.getPayload(), message.getHeaders());<NEW_LINE>if (converted != null) {... | " must be a String or byte[], not " + topicHeader.getClass()); |
332,071 | private Object readFrom(Row row, @Nullable RowMetadata metadata, RelationalPersistentProperty property, String prefix) {<NEW_LINE>String identifier = prefix + property.getColumnName().getReference();<NEW_LINE>try {<NEW_LINE>Object value = null;<NEW_LINE>if (metadata == null || RowMetadataUtils.containsColumn(metadata, ... | value = row.get(identifier); |
510,556 | public void syncAttributesToASIAware(@NonNull final IAttributeSet attributeSet, @NonNull final IAttributeSetInstanceAware asiAware) {<NEW_LINE>final AttributeSetInstanceId oldAsiId = AttributeSetInstanceId.ofRepoIdOrNone(asiAware.getM_AttributeSetInstance_ID());<NEW_LINE>final AttributeSetInstanceId asiId;<NEW_LINE>if ... | ofRepoId(asiNew.getM_AttributeSetInstance_ID()); |
1,560,220 | public void onClick(View v) {<NEW_LINE>if (!isOnline(context)) {<NEW_LINE>if (context instanceof ManagerActivity) {<NEW_LINE>((ManagerActivity) context).showSnackbar(SNACKBAR_TYPE, context.getString(R.<MASK><NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ViewHolderContacts holder = (ViewHolderContacts) v.getTag();<NEW... | string.error_server_connection_problem), -1); |
280,585 | private boolean verify(Attributes attributes, String entry, byte[] data, int start, int end, boolean ignoreSecondEndline, boolean ignorable) {<NEW_LINE>String algorithms = attributes.getValue("Digest-Algorithms");<NEW_LINE>if (algorithms == null) {<NEW_LINE>algorithms = "SHA SHA1";<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>w... | StringTokenizer tokens = new StringTokenizer(algorithms); |
1,094,775 | protected int initialAssignToNearestCluster() {<NEW_LINE>assert k == means.length;<NEW_LINE>double[][] cdist = new double[k][k];<NEW_LINE>computeSquaredSeparation(cdist);<NEW_LINE>for (DBIDIter it = relation.iterDBIDs(); it.valid(); it.advance()) {<NEW_LINE>NumberVector <MASK><NEW_LINE>// Find closest center, and dista... | fv = relation.get(it); |
588,354 | static void spawnMetricsAccounting(SpawnMetrics.Builder spawnMetrics, ExecutedActionMetadata executionMetadata) {<NEW_LINE>// Expect that a non-empty worker indicates that all fields are populated.<NEW_LINE>// If the bounded sides of these checkpoints are default timestamps, i.e. unset,<NEW_LINE>// the phase durations ... | ), executionMetadata.getExecutionStartTimestamp()); |
30,629 | public void run(RegressionEnvironment env) {<NEW_LINE>Object[][] testData;<NEW_LINE>String expression;<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>expression = "fib(num);" + "function fib(n) {" + " if(n <= 1) return n; " + " return fib(n-1) + fib(n-2); " + "};";<NEW_LINE>testData = new Object[][] { ... | "abc(intPrimitive)", Double.class, testData); |
210,457 | static String binToHex(int binary) {<NEW_LINE>// hm to store hexadecimal codes for binary numbers within the range: 0000 to 1111 i.e. for<NEW_LINE>// decimal numbers 0 to 15<NEW_LINE>HashMap<Integer, String> hm = new HashMap<>();<NEW_LINE>// String to store hexadecimal code<NEW_LINE>String hex = "";<NEW_LINE>int i;<NEW... | hm.get(code4) + hex; |
491,745 | public void reload() {<NEW_LINE>try {<NEW_LINE>SortTaskConfig newSortTaskConfig = SortClusterConfigHolder.getTaskConfig(taskName);<NEW_LINE>LOG.info("start to get SortTaskConfig:taskName:{}:config:{}", taskName, JSON.toJSONString(newSortTaskConfig));<NEW_LINE>if (this.sortTaskConfig != null && this.sortTaskConfig.equal... | newIdConfigMap = new ConcurrentHashMap<>(); |
1,317,872 | public void run() {<NEW_LINE>// in case of recursive call to run()<NEW_LINE>if (running)<NEW_LINE>return;<NEW_LINE>final <MASK><NEW_LINE>running = true;<NEW_LINE>for (; ; ) {<NEW_LINE>Finalizer f;<NEW_LINE>if (TenantGlobals.isDataIsolationEnabled() && TenantContainer.current() != null) {<NEW_LINE>TenantData td = Tenant... | JavaLangAccess jla = SharedSecrets.getJavaLangAccess(); |
597,507 | /*<NEW_LINE>* @see com.sitewhere.microservice.security.SystemUserRunnable#runAsSystemUser()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void runAsSystemUser() throws SiteWhereException {<NEW_LINE>List<IProcessedEventPayload> decoded = new ArrayList<>();<NEW_LINE>for (ConsumerRecord<String, byte[]> record : getRecord... | getOutboundConnector().processEventBatch(decoded); |
1,470,561 | private static void parseDynamicValue(final ParseContext context, ObjectMapper parentMapper, String currentFieldName, XContentParser.Token token) throws IOException {<NEW_LINE>ObjectMapper.Dynamic dynamic = dynamicOrDefault(parentMapper, context);<NEW_LINE>if (dynamic == ObjectMapper.Dynamic.STRICT) {<NEW_LINE>throw ne... | .singletonMap(path, existingFieldType)); |
326,781 | public MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator, long startPositionUs) {<NEW_LINE>Object <MASK><NEW_LINE>MediaPeriodId childMediaPeriodId = id.copyWithPeriodUid(getChildPeriodUid(id.periodUid));<NEW_LINE>@Nullable<NEW_LINE>MediaSourceHolder holder = mediaSourceByUid.get(mediaSourceHolderUid);<NEW_... | mediaSourceHolderUid = getMediaSourceHolderUid(id.periodUid); |
309,747 | public Map<String, Object> measureUser(Recommender recommender, TestUser testUser) {<NEW_LINE>ItemRecommender irec = recommender.getItemRecommender();<NEW_LINE>if (irec == null) {<NEW_LINE>logger.debug("recommender cannot produce recommendations");<NEW_LINE>return Collections.emptyMap();<NEW_LINE>}<NEW_LINE>LongSet can... | ), n, candidates, excludes); |
1,172,096 | public void onClick(View view) {<NEW_LINE>int status = Integer.parseInt(view.getTag().toString());<NEW_LINE>if (status == 0) {<NEW_LINE>status = 1;<NEW_LINE>fabActions.animate().rotation(45).setInterpolator(new AccelerateDecelerateInterpolator()).setDuration(100).start();<NEW_LINE>AnimationUtils.scaleInAnimation(fabSet... | , new OvershootInterpolator(), true); |
723,196 | public void execute(FlinkCommandArgs flinkCommandArgs) {<NEW_LINE>EngineType engine = flinkCommandArgs.getEngineType();<NEW_LINE>String configFile = flinkCommandArgs.getConfigFile();<NEW_LINE>Config config = new ConfigBuilder<>(configFile, engine).getConfig();<NEW_LINE>ExecutionContext<FlinkEnvironment> executionContex... | ), sources, transforms, sinks); |
569,984 | public InputDataConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>InputDataConfig inputDataConfig = new InputDataConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | class).unmarshall(context)); |
1,196,864 | static private Font createFont(String filename, int size) throws IOException, FontFormatException {<NEW_LINE>File fontFile = Platform.getContentFile("lib/fonts/" + filename);<NEW_LINE>if (fontFile == null || !fontFile.exists()) {<NEW_LINE>String msg = "Could not find required fonts. ";<NEW_LINE>// This gets the JAVA_HO... | createFont(Font.TRUETYPE_FONT, input); |
441,488 | void refresh(TruffleHeapHistogram histogram) {<NEW_LINE>if (histogram == null || isPaused())<NEW_LINE>return;<NEW_LINE>forceRefresh = false;<NEW_LINE>boolean diff = lrDeltasButton.isSelected();<NEW_LINE>if (diff) {<NEW_LINE>if (baseClasses == null) {<NEW_LINE>baseClasses = new ArrayList(classes);<NEW_LINE>baseTotalByte... | = histogram.getTotalBytes() - baseTotalBytes; |
1,847,896 | @NbBundle.Messages({ "GroupTree.displayName.allGroups=All Groups" })<NEW_LINE>void initialize() {<NEW_LINE>super.initialize();<NEW_LINE><MASK><NEW_LINE>// NON-NLS<NEW_LINE>setGraphic(new ImageView("org/sleuthkit/autopsy/imagegallery/images/Folder-icon.png"));<NEW_LINE>Node placeholder = new Label(Bundle.NavPanel_placeH... | setText(Bundle.GroupTree_displayName_allGroups()); |
1,039,423 | public static GetQueryOptimizeDataTopResponse unmarshall(GetQueryOptimizeDataTopResponse getQueryOptimizeDataTopResponse, UnmarshallerContext _ctx) {<NEW_LINE>getQueryOptimizeDataTopResponse.setRequestId(_ctx.stringValue("GetQueryOptimizeDataTopResponse.RequestId"));<NEW_LINE>getQueryOptimizeDataTopResponse.setCode(_ct... | (_ctx.stringValue("GetQueryOptimizeDataTopResponse.Data.Extra")); |
1,195,440 | public static void vertical9(Kernel1D_S32 kernel, GrayU8 src, GrayI8 dst, int divisor, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>final byte[] dataSrc = src.data;<NEW_LINE>final byte[] dataDst = dst.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3... | (total + halfDivisor) / divisor); |
1,019,370 | public void example59(Vertx vertx, Router router) {<NEW_LINE>// create an OAuth2 provider, clientID and clientSecret<NEW_LINE>// should be requested to Google<NEW_LINE>OAuth2Auth authProvider = OAuth2Auth.create(vertx, new OAuth2Options().setClientId("CLIENT_ID").setClientSecret("CLIENT_SECRET").setFlow(OAuth2FlowType.... | (router.get("/callback")); |
820,650 | public void startJob() {<NEW_LINE>String enteredPath = pathField.getText();<NEW_LINE>AbstractFile currentFolder = mainFrame.getActivePanel().getCurrentFolder();<NEW_LINE>// Resolves destination folder<NEW_LINE>PathUtils.ResolvedDestination resolvedDest = PathUtils.resolveDestination(enteredPath, currentFolder, currentF... | .get("directory_already_exists", enteredPath)); |
1,322,888 | public static List<RegressionExecution> executions() {<NEW_LINE>List<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new ClientCompileSubstParamNamedParameter(false));<NEW_LINE>execs.add(new ClientCompileSubstParamNamedParameter(true));<NEW_LINE>execs<MASK><NEW_LINE>execs.add(new ClientCompileSubstPa... | .add(new ClientCompileSubstParamMethodInvocation()); |
1,331,636 | private static PixelClassifier createClassifier(ImageData<BufferedImage> imageData, DensityMapParameters params) {<NEW_LINE>var pixelSize = params.pixelSize;<NEW_LINE>if (pixelSize == null) {<NEW_LINE>if (imageData == null) {<NEW_LINE>throw new IllegalArgumentException("You need to specify a pixel size or provide an Im... | getAveragedPixelSize().doubleValue()); |
144,231 | public boolean finalLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {<NEW_LINE>monitor.beginTask("Verifying model files", 4);<NEW_LINE>final Model model = configuration.getAdapter(Model.class);<NEW_LINE>final IFile rootModule = model.getTLAFile();<NEW_LINE>mon... | "Errors in model file found " + rootModule.getLocation()); |
1,265,100 | public ListPricingRulesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListPricingRulesResult listPricingRulesResult = new ListPricingRulesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | JsonToken token = context.getCurrentToken(); |
321,863 | public void parseAttributeClauses(IoTDBSqlParser.AttributeClausesContext ctx, CreateAlignedTimeSeriesStatement createAlignedTimeSeriesStatement) {<NEW_LINE>if (ctx.alias() != null) {<NEW_LINE>createAlignedTimeSeriesStatement.addAliasList(parseNodeName(ctx.alias().nodeNameCanInExpr<MASK><NEW_LINE>} else {<NEW_LINE>creat... | ().getText())); |
570,128 | /*<NEW_LINE>* may be used for issue 177341 fix later<NEW_LINE>*/<NEW_LINE>private ForeignKeyElement[] removeDuplicateFK(ForeignKeyElement[] fkeys) {<NEW_LINE>if (fkeys == null || fkeys.length == 0)<NEW_LINE>return fkeys;<NEW_LINE>HashMap<ComparableFK, ForeignKeyElement> ret = new HashMap<ComparableFK, ForeignKeyElement... | ).getFullName() + " is considered as a duplicate, you may need to verify your schema or database structure."); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.