idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
945,297 | public static void copyToDir(Directory in, File out, String fileName) throws DirectoryException {<NEW_LINE>try {<NEW_LINE>if (in.containsDir(fileName)) {<NEW_LINE>OS.rmdir(new File(out, fileName));<NEW_LINE>in.getDir(fileName).copyToDir(new File(out, fileName));<NEW_LINE>} else {<NEW_LINE>if (fileName.equals("res") && ... | ), new FileOutputStream(outFile)); |
740,068 | private CompletionStage<T> processChildRowCountOperation(long updateCount) {<NEW_LINE>// Remove child operation, if any exist<NEW_LINE>Operation operationFromQueue = resultOperations.poll();<NEW_LINE>// Keep as effective final, because it uses in lambda expression<NEW_LINE>Operation operation;<NEW_LINE>boolean onCountH... | >(session, group, true); |
280,020 | private void checkUpdate() {<NEW_LINE>if (Utilities.isWindows() && useShellFolder) {<NEW_LINE>Long startTime = (Long) fileChooser.getClientProperty(DelegatingChooserUI.START_TIME);<NEW_LINE>if (startTime == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// clean for future marking<NEW_LINE>fileChooser.putClientProperty(D... | ).putLong(TIMEOUT_KEY, 0); |
1,718,008 | private void collectRoots(OrderRootType type, ModuleRootModel rootModel, Collection<VirtualFile> result, final boolean includeProduction, final boolean includeTests, NotNullPairFunction<ContentEntry, Predicate<ContentFolderTypeProvider>, VirtualFile[]> funForSources, NotNullPairFunction<ModuleRootModel, Predicate<Conte... | rootsProcessor = ModuleRootsProcessor.findRootsProcessor(rootModel); |
1,684,196 | public static void main(String[] args) {<NEW_LINE>if (args.length != 1) {<NEW_LINE>System.err.println("Expecting a single argument which is the filepath of an enclave.");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>String enclavePath = args[0];<NEW_LINE>String enclaveName = "demo_enclave";<NEW_LINE>// Part 1: Initiali... | output.getExtension(EnclaveDemoExtension.quickstartOutput); |
1,474,487 | public void startRequest(ServletRequest request) {<NEW_LINE>if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {<NEW_LINE>logger.entering(CLASS_NAME, "startRequest", "state = " + getStateString(state));<NEW_LINE>}<NEW_LINE>HttpServletRequest httpServletReq = (HttpServletRequest) ... | && method.equals("HEAD")); |
1,349,715 | public void parse(XMLStreamReader xtr, List<SubProcess> activeSubProcessList, Process activeProcess, BpmnModel model) throws Exception {<NEW_LINE>BaseElement parentElement = null;<NEW_LINE>if (!activeSubProcessList.isEmpty()) {<NEW_LINE>parentElement = activeSubProcessList.get(activeSubProcessList.size() - 1);<NEW_LINE... | parseChildElement(xtr, parentElement, model); |
1,578,377 | // rebuild in the same memory<NEW_LINE>@Override<NEW_LINE>protected void rebuild(final int newCapacity) {<NEW_LINE>final int numValues = getNumValues();<NEW_LINE><MASK><NEW_LINE>final int currCapacity = getCurrentCapacity();<NEW_LINE>final long[] keys = new long[currCapacity];<NEW_LINE>final double[] values = new doubl... | checkIfEnoughMemory(mem_, newCapacity, numValues); |
65,369 | private static void fetchDatabaseMetadata(LibertyServer server) throws Exception {<NEW_LINE>if (dbMetaAcquired) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String pathAndQuery = "/DatabaseManagement/DMS?command=GETINFO";<NEW_LINE>final HttpURLConnection con = HttpUtils.getHttpConnectionWithAnyResponseCode(server, path... | ByteArrayInputStream bais = new ByteArrayInputStream(objectData); |
332,721 | public com.amazonaws.services.waf.model.WAFInvalidParameterException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.waf.model.WAFInvalidParameterException wAFInvalidParameterException = new com.amazonaws.services.waf.model.WAFInvalidParameterException(null);<NE... | class).unmarshall(context)); |
1,502,386 | public void executeScriptHeader(List<String> codeBefore, String... paths) {<NEW_LINE>List<String> path = interpreterGetLoadPaths();<NEW_LINE>if (null == path) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String sikuliLibPath = Commons.getLibFolder().getAbsolutePath();<NEW_LINE>if (path.size() == 0 || !FileManager.pathEquals(... | interpreterRunScriptletString(buffer.toString()); |
114,263 | private boolean doMove(boolean extending) {<NEW_LINE>Vector3 pos = this.getLocation();<NEW_LINE>BlockFace direction = getFacing();<NEW_LINE>if (!extending) {<NEW_LINE>this.level.setBlock(pos.getSide(direction), new BlockAir(), true, false);<NEW_LINE>}<NEW_LINE>BlocksCalculator calculator = new BlocksCalculator(this.lev... | this.level.useBreakOn(block); |
806,287 | private void carregaSimbolosInspecionados(final String codigoFonteCompleto, final Programa programa) {<NEW_LINE>if (codigoFonteCompleto == null || programa == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>Strin... | trim().split(","); |
1,326 | public Sign.SignatureData callHSM(byte[] dataToSign, HSMHTTPPass pass) {<NEW_LINE>Request request = createRequest(dataToSign, pass);<NEW_LINE>try (okhttp3.Response response = client.newCall(request).execute()) {<NEW_LINE>ResponseBody responseBody = response.body();<NEW_LINE>if (response.isSuccessful()) {<NEW_LINE>if (r... | signBytes = Numeric.hexStringToByteArray(signHex); |
920,810 | public static ByteBuffer stbtt_GetCodepointBitmapSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, @NativeType("int *") IntBuffer width, @NativeType("int *") IntBuffer height, @Nullable @NativeType("int *") IntBuffer xoff, @Null... | (height.position())); |
792,906 | Self compute(Direction direction, long maxIterations, RandomProvider random) {<NEW_LINE>if (maxIterations <= 0L) {<NEW_LINE>throw new IllegalArgumentException("Must iterate at least 1 time");<NEW_LINE>}<NEW_LINE>if (labels == null || labels.size() != nodeCount) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>ranIterations = 0L;<... | labels = initialLabels(nodeCount, tracker); |
802,141 | // end class CoNLLIterator<NEW_LINE>private static Iterator<String> splitIntoDocs(Reader r) {<NEW_LINE>if (TREAT_FILE_AS_ONE_DOCUMENT) {<NEW_LINE>return Collections.singleton(IOUtils.slurpReader(r)).iterator();<NEW_LINE>} else {<NEW_LINE>Collection<String> docs = new ArrayList<>();<NEW_LINE>ObjectBank<String> <MASK><NE... | ob = ObjectBank.getLineIterator(r); |
810,101 | private void ensureCorrectYarnRootDirectory(File installDirectory, String yarnVersion) throws IOException {<NEW_LINE>File yarnRootDirectory <MASK><NEW_LINE>if (!yarnRootDirectory.exists()) {<NEW_LINE>logger.debug("Yarn root directory not found, checking for yarn-{}", yarnVersion);<NEW_LINE>// Handle renaming Yarn 1.X r... | = new File(installDirectory, YARN_ROOT_DIRECTORY); |
1,630,812 | public static ListVpcEndpointServiceResourcesResponse unmarshall(ListVpcEndpointServiceResourcesResponse listVpcEndpointServiceResourcesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVpcEndpointServiceResourcesResponse.setRequestId(_ctx.stringValue("ListVpcEndpointServiceResourcesResponse.RequestId"));<NEW_LINE>lis... | ("ListVpcEndpointServiceResourcesResponse.Resources[" + i + "].Ip")); |
28,647 | public void executeAction(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>final String wfContentletId = request.getParameter("wfContentletId");<NEW_LINE>final String wfActionAssign = request.getParameter("wfActionAssign");<NEW_LINE>final String wfAct... | e.getMessage(), e); |
427,679 | private Mono<PagedResponse<PrivateEndpointConnectionDescriptionInner>> listByServiceSinglePageAsync(String resourceGroupName, String resourceName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
924,874 | public static boolean isMavenFXProject(@NonNull final Project prj) {<NEW_LINE>if (isMavenProject(prj)) {<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>FileObject pomXml = prj.getProjectDirectory().getFileObject("pom.xml");<NEW_LINE>DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();<NEW_LINE>DocumentBui... | exprPackager = xpath.compile("//executable[contains(text(),'javapackager')]"); |
334,695 | public void flush() throws IOException {<NEW_LINE>for (MethodReference method : newMethods) {<NEW_LINE>File file = getMethodFile(method, true);<NEW_LINE>Item item = cache.get(method);<NEW_LINE>try (VarDataOutput output = new VarDataOutput(new BufferedOutputStream(new FileOutputStream(file)))) {<NEW_LINE>output.writeUns... | item = asyncCache.get(method); |
1,631,666 | private ErrorBuffer checkInput(final Map<String, Object> data, final boolean nameOnly) {<NEW_LINE>final ErrorBuffer errorBuffer = new ErrorBuffer();<NEW_LINE>if (StringUtils.isEmpty((String) data.get(KEY_NAME))) {<NEW_LINE>errorBuffer.add(new EmptyPropertyToken("Connection", new GenericProperty("name")));<NEW_LINE>}<NE... | , new GenericProperty("url"))); |
285,437 | protected JComponent createCenterPanel() {<NEW_LINE>JPanel panel = new JPanel(new GridBagLayout());<NEW_LINE>GridBagConstraints gb = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 5<MASK><NEW_LINE>JLabel patternLabel = new JLabel(IdeBundle.message(... | , 10), 0, 0); |
354,685 | // This is called if the user clicks on one of the buttons: "Save",<NEW_LINE>// "Discard", or "Delete". This is also called if the user clicks<NEW_LINE>// on the "remove reminder" button.<NEW_LINE>@Override<NEW_LINE>public void onClick(View view) {<NEW_LINE>if (view == mRruleButton) {<NEW_LINE>Bundle b = new Bundle();<... | (LinearLayout) reminderItem.getParent(); |
1,355,383 | private void parseBootstrapBox(byte[] bootstrapInfo, int pos) {<NEW_LINE>System.out.println("parsing abst");<NEW_LINE>live = false;<NEW_LINE>// isMetadata = true;<NEW_LINE>readByte(bootstrapInfo, pos);<NEW_LINE>readInt24(bootstrapInfo, pos + 1);<NEW_LINE>readInt32(bootstrapInfo, pos + 4);<NEW_LINE>// Console.WriteLine(... | ; i++) readString(bPtr); |
467,477 | public ObjectNode createParserUIInitializationData(ImportingJob job, List<ObjectNode> fileRecords, String format) {<NEW_LINE>ObjectNode options = super.createParserUIInitializationData(job, fileRecords, format);<NEW_LINE>ArrayNode columnWidths = ParsingUtilities.mapper.createArrayNode();<NEW_LINE>if (fileRecords.size()... | JSONUtilities.append(columnWidths, w); |
294,075 | private synchronized void erasePartitionWithSameName(long dbId, long tableId, String partitionName) {<NEW_LINE>Iterator<Map.Entry<Long, RecyclePartitionInfo>> iterator = idToPartition.entrySet().iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>Map.Entry<Long, RecyclePartitionInfo> entry = iterator.next();<NEW... | remove(entry.getKey()); |
121,750 | private static org.jreleaser.model.Jlink convertJlink(Jlink jlink) {<NEW_LINE>org.jreleaser.model.Jlink a = new org.jreleaser.model.Jlink();<NEW_LINE>convertJavaAssembler(jlink, a);<NEW_LINE>a.setTargetJdks(convertArtifacts(jlink.getTargetJdks()));<NEW_LINE>a.setModuleNames(tr(jlink.getModuleNames()));<NEW_LINE>a.setAd... | (jlink.getJdk())); |
1,334,211 | private static Function<IntervalWalkerContext, String> intervalFunction(List<FeatureInput<VariantContext>> auxiliaryVariants) {<NEW_LINE>return (Function<IntervalWalkerContext, String>) context -> {<NEW_LINE>SimpleInterval interval = context.getInterval();<NEW_LINE>ReadsContext readsContext = context.getReadsContext();... | ReferenceContext referenceContext = context.getReferenceContext(); |
116,227 | public void marshall(CreateChannelRequest createChannelRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createChannelRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createChannelRequest.get... | createChannelRequest.getTags(), TAGS_BINDING); |
262,910 | public void clearResponses(final SessionLabel sessionLabel, final UserIdentity userIdentity, final ChaiUser theUser, final String userGUID) throws PwmUnrecoverableException {<NEW_LINE>if (userGUID == null || userGUID.length() < 1) {<NEW_LINE>throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_MISSIN... | " in remote database, error: " + e.getMessage()); |
812,234 | public Expense updateMoveDateAndPeriod(Expense expense) {<NEW_LINE>if (CollectionUtils.isNotEmpty(expense.getGeneralExpenseLineList())) {<NEW_LINE>LocalDate recentDate = expense.getGeneralExpenseLineList().stream().map(ExpenseLine::getExpenseDate).max(<MASK><NEW_LINE>expense.setMoveDate(recentDate);<NEW_LINE>PeriodRepo... | LocalDate::compareTo).get(); |
691,120 | @SubmarineApi<NEW_LINE>public Response edit(SysDeptEntity sysDept) {<NEW_LINE>LOG.info("edit({})", sysDept.toString());<NEW_LINE>try (SqlSession sqlSession = MyBatisUtil.getSqlSession()) {<NEW_LINE>SysDeptMapper sysDeptMapper = sqlSession.getMapper(SysDeptMapper.class);<NEW_LINE>SysDeptEntity dept = sysDeptMapper.getBy... | message("Update department successfully!").build(); |
367,536 | @Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@Operation(operationId = "createSitemapEventSubscription", summary = "Creates a sitemap event subscription.", responses = { @ApiResponse(responseCode = "201", description = "Subscription created."), @ApiResponse(responseCode = "503", description = "Subscriptions limit reac... | path(subscriptionId).build(); |
1,345,274 | public void writeTo(OutputStream os) throws IOException {<NEW_LINE>if (recordLocationsByOrdinal.size() == 0)<NEW_LINE>throw new IOException("No data to write!");<NEW_LINE>int locationOfTopRecord = recordLocationsByOrdinal.get(recordLocationsByOrdinal.size() - 1);<NEW_LINE>int schemaIdOfTopRecord = VarInt.readVInt(buf.g... | 0, buf.length()); |
835,649 | private void implementExactMatch(SDField field, Schema schema) {<NEW_LINE>field.setStemming(Stemming.NONE);<NEW_LINE>field.getNormalizing().inferLowercase();<NEW_LINE>if (field.getMatching().getType().equals(MatchType.WORD)) {<NEW_LINE>field.addQueryCommand("word");<NEW_LINE>} else {<NEW_LINE>// exact<NEW_LINE>String e... | (field.getIndexingScript())); |
103,386 | protected boolean treatMessage(NetworkEnvelope networkEnvelope, Connection connection) {<NEW_LINE>checkNotNull(connection.getPeersNodeAddressProperty(), "although the property is nullable, we need it to not be null");<NEW_LINE>if (networkEnvelope instanceof GetDataResponse) {<NEW_LINE>Statistics result = new MyStatisti... | "StoragePayload was null: {}", networkEnvelope.toString()); |
855,902 | public Thumb[] scrapeFanart() {<NEW_LINE>// Believe it or not, the fanart (dvd cover) exists, but is normally only set as the preview of the trailer<NEW_LINE>// it follows a predictable URL structure though, so we can grab it anyways :)<NEW_LINE>// start by grabbing the ID part of the current page<NEW_LINE>String urlOf... | String imageURL = "http://www.caribbeancompr.com/moviepages/" + movieID + "/images/l_l.jpg"; |
945,779 | public Matrix33 toMatrix(int w, int h) {<NEW_LINE>switch(this) {<NEW_LINE>case TOP_LEFT:<NEW_LINE>return Matrix33.IDENTITY;<NEW_LINE>case TOP_RIGHT:<NEW_LINE>return new Matrix33(-1, 0, w, 0, 1, 0, 0, 0, 1);<NEW_LINE>case BOTTOM_RIGHT:<NEW_LINE>return new Matrix33(-1, 0, w, 0, -1, <MASK><NEW_LINE>case BOTTOM_LEFT:<NEW_L... | h, 0, 0, 1); |
1,553,585 | public String validateGiverRecipientVisibility(FeedbackQuestionAttributes feedbackQuestionAttributes) {<NEW_LINE>String errorMsg = "";<NEW_LINE>// giver type can only be STUDENTS<NEW_LINE>if (feedbackQuestionAttributes.getGiverType() != FeedbackParticipantType.STUDENTS) {<NEW_LINE>log.severe("Unexpected giverType for c... | " (forced to :" + FeedbackParticipantType.OWN_TEAM_MEMBERS_INCLUDING_SELF + ")"); |
589,205 | private static // common US holidays<NEW_LINE>void usCommon(List<LocalDate> holidays, int year, boolean bumpBack, boolean columbusVeteran, int mlkStartYear) {<NEW_LINE>// new year, adjusted if Sunday<NEW_LINE>holidays.add(bumpSunToMon(date(year, 1, 1)));<NEW_LINE>// martin luther king<NEW_LINE>if (year >= mlkStartYear)... | year, 5, 30))); |
1,247,722 | public EstimatedResourceSize unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EstimatedResourceSize estimatedResourceSize = new EstimatedResourceSize();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int t... | "unixTimestamp").unmarshall(context)); |
605,269 | private SecurityUser authenticateByUserId(UserId userId) {<NEW_LINE>TenantId systemId = TenantId.SYS_TENANT_ID;<NEW_LINE>User user = userService.findUserById(systemId, userId);<NEW_LINE>if (user == null) {<NEW_LINE>throw new UsernameNotFoundException("User not found by refresh token");<NEW_LINE>}<NEW_LINE>UserCredentia... | USER_NAME, user.getEmail()); |
1,255,659 | private WasmExpression applyForResourceArray(WasmIntrinsicManager manager, InvocationExpr invocation) {<NEW_LINE>switch(invocation.getMethod().getName()) {<NEW_LINE>case "get":<NEW_LINE>{<NEW_LINE>WasmExpression map = manager.generate(invocation.getArguments().get(0));<NEW_LINE>WasmExpression index = manager.generate(i... | ), WasmInt32Subtype.INT32, 0); |
916,032 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static boolean notifyUncaught(com.sun.jdi.request.ExceptionRequest a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modules.debu... | Mirror) a).virtualMachine(); |
1,834,032 | public void actionPerformed(AnActionEvent e) {<NEW_LINE>final ArrangementMatchingRulesControl control = getRulesControl(e);<NEW_LINE>if (control == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int editing = control.getEditingRow() - 1;<NEW_LINE>control.runOperationIgnoreSelectionChange(new Runnable() {<NEW_LINE><... | ArrangementMatchingRulesModel model = control.getModel(); |
1,817,536 | public static boolean importPrintFormat(File arxml) {<NEW_LINE>PackIn.updateMode = false;<NEW_LINE>PackIn.packageDirectory = arxml<MASK><NEW_LINE>File doc = new File(PackIn.packageDirectory + File.separator + "doc");<NEW_LINE>doc.mkdir();<NEW_LINE>if (DB.isOracle())<NEW_LINE>PackIn.database = "Oracle";<NEW_LINE>else if... | .getParentFile().getAbsolutePath(); |
417,042 | public void read(org.apache.thrift.protocol.TProtocol iprot, TExceptionValue struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org... | skip(iprot, schemeField.type); |
579,390 | private DeferredResult<ResponseEntity> saveAttributes(TenantId srcTenantId, EntityId entityIdSrc, String scope, JsonNode json) throws ThingsboardException {<NEW_LINE>if (!DataConstants.SERVER_SCOPE.equals(scope) && !DataConstants.SHARED_SCOPE.equals(scope)) {<NEW_LINE>return getImmediateDeferredResult("Invalid scope: "... | t, result, HttpStatus.INTERNAL_SERVER_ERROR); |
1,797,250 | protected FilterResults performFiltering(CharSequence constraint) {<NEW_LINE>FilterResults results = new FilterResults();<NEW_LINE>String prefix = constraint.toString(<MASK><NEW_LINE>if (prefix == null || prefix.isEmpty()) {<NEW_LINE>CaseInsensitiveArrayList list = new CaseInsensitiveArrayList(baseItems);<NEW_LINE>resu... | ).toLowerCase(Locale.ENGLISH); |
419,652 | final DescribeTapeArchivesResult executeDescribeTapeArchives(DescribeTapeArchivesRequest describeTapeArchivesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeTapeArchivesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | endClientExecution(awsRequestMetrics, request, response); |
1,598,716 | private void drawControl(InstancePainter painter, int xpos, int ypos, int nrOfBits) {<NEW_LINE>final var g = painter.getGraphics();<NEW_LINE>GraphicsUtil.switchToWidth(g, 2);<NEW_LINE>g.drawLine(xpos + 10, ypos, xpos + 70, ypos);<NEW_LINE>g.drawLine(xpos + 10, ypos, xpos + 10, ypos + 60);<NEW_LINE>g.drawLine(xpos + 70,... | GraphicsUtil.switchToWidth(g, 1); |
1,846,896 | private void expand_to_drill_page(DrillPage p_drill_page, MazeListElement p_from_element) {<NEW_LINE>int layer = p_from_element.next_room.get_layer();<NEW_LINE>FloatPoint from_element_shape_entry_middle = p_from_element.shape_entry.a.middle_point(p_from_element.shape_entry.b);<NEW_LINE>FloatPoint nearest_point = p_dril... | = p_from_element.expansion_value + ctrl.min_normal_via_cost; |
1,704,561 | public static DescribeAssetDetailByUuidResponse unmarshall(DescribeAssetDetailByUuidResponse describeAssetDetailByUuidResponse, UnmarshallerContext context) {<NEW_LINE>describeAssetDetailByUuidResponse.setRequestId(context.stringValue("DescribeAssetDetailByUuidResponse.RequestId"));<NEW_LINE>AssetDetail assetDetail = n... | (context.stringValue("DescribeAssetDetailByUuidResponse.AssetDetail.Uuid")); |
1,450,358 | public static void _extends(Map<?, ?> args, Closure body, PrintWriter out, ExecutableTemplate template, int fromLine) {<NEW_LINE>try {<NEW_LINE>if (!args.containsKey("arg") || args.get("arg") == null) {<NEW_LINE>throw new TemplateExecutionException(template.template, fromLine, <MASK><NEW_LINE>}<NEW_LINE>String name = a... | "Specify a template name", new TagInternalException("Specify a template name")); |
1,637,986 | public static void main(String[] args) {<NEW_LINE>TimerSystem sys = new MillisecondsTimerSystem();<NEW_LINE>Cell<Long> time = sys.time;<NEW_LINE>StreamSink<Unit> sMain = new StreamSink<Unit>();<NEW_LINE>Listener l = Transaction.run(() -> {<NEW_LINE>long t0 = time.sample();<NEW_LINE>Listener l1 = periodic(sys, 1000).lis... | (t - t0) + " main"); |
1,792,135 | public void swapToJVMConfigProp() throws Exception {<NEW_LINE>Log.info(c, testName.getMethodName(), "Swap config from Kerberos file to JVM property");<NEW_LINE>ServerConfiguration newServer = emptyConfiguration.clone();<NEW_LINE>LdapRegistry ldap = getLdapRegistryForKeytabWithContextPool();<NEW_LINE>// start with defau... | .waitForStringInTrace(LdapConstants.KERBEROS_UDPATE_MSG)); |
1,626,264 | public void run() {<NEW_LINE>LOGGER.info("Spawning workflow on socket " + socket);<NEW_LINE>// Currently, WorkflowTraces cannot be copied with external modules<NEW_LINE>// if they define custom actions. This is because copying relies<NEW_LINE>// on serialization, and actions from other packages are unknown<NEW_LINE>// ... | AliasedConnection serverCon = serverCtx.getConnection(); |
1,153,323 | public Mono<Void> write(Publisher<? extends PartEvent> partDataStream, ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) {<NEW_LINE>byte[] boundary = generateMultipartBoundary();<NEW_LINE>mediaType = getMultipartMediaType(mediaType, boundary);... | .getLogPrefix(hints) + "Encoding Publisher<PartEvent>"); |
184,302 | public void execute() {<NEW_LINE>// get existing filter as JSON string<NEW_LINE>String serializedFilters = "[]";<NEW_LINE>JRPropertiesMap propertiesMap = dataset.getPropertiesMap();<NEW_LINE>if (propertiesMap.getProperty(DATASET_FILTER_PROPERTY) != null) {<NEW_LINE>serializedFilters = propertiesMap.getProperty(DATASET_... | ), filterData.getFilterTypeOperator()); |
982,672 | final DescribeJobLogItemsResult executeDescribeJobLogItems(DescribeJobLogItemsRequest describeJobLogItemsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeJobLogItemsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,492,332 | public CreateFaqResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateFaqResult createFaqResult = new CreateFaqResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | JsonToken token = context.getCurrentToken(); |
317,319 | public void deleteFriend(List<String> idList, IUIKitCallback<Void> callback) {<NEW_LINE>provider.deleteFriend(idList, new IUIKitCallback<Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(Void data) {<NEW_LINE>for (String id : idList) {<NEW_LINE>String conversationId = TUIConstants.TUIConversation.CO... | param = new HashMap<>(); |
1,482,102 | // Compares seg_1 and seg_2 x coordinates of intersection with the line<NEW_LINE>// parallel to axis x, passing through the coordinate y.<NEW_LINE>// If segments intersect not at the endpoint, the m_b_intersection_detected<NEW_LINE>// is set.<NEW_LINE>int compareTwoSegments_(Segment seg_1, Segment seg_2) {<NEW_LINE>int... | ptSweep.y, ptSweep.x); |
10,550 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>getListView().setDivider(null);<NEW_LINE>getListView().setSelector(android.R.color.transparent);<NEW_LINE>translatorsLoader = Single.create((SingleOnSubscribe<ArrayList<S... | translators = new ArrayList<>(); |
1,044,917 | public void run() {<NEW_LINE>try {<NEW_LINE>List<IMarker> list = getMarkers();<NEW_LINE>if (list.isEmpty()) {<NEW_LINE>// create new markers<NEW_LINE>IDocument document = fTextEditor.getDocumentProvider().getDocument(fTextEditor.getEditorInput());<NEW_LINE>int lineNumber = fRuler.getLineOfLastMouseButtonActivity();<NEW... | breakpoint = manager.getBreakpoint(marker); |
808,759 | public Parent createContent() {<NEW_LINE>// First rectangle<NEW_LINE>Rectangle rect1 = new Rectangle(0, 0, 80, 80);<NEW_LINE>// create simple linear gradient<NEW_LINE>LinearGradient gradient1 = new LinearGradient(0, 0, 1, 0, true, CycleMethod.NO_CYCLE, new Stop[] { new Stop(0, Color.DODGERBLUE), new Stop(1, Color.BLACK... | HBox hb = new HBox(10); |
1,200,630 | public String buildAttr() throws Exception {<NEW_LINE>if (id == null) {<NEW_LINE>throw new Exception("id is null");<NEW_LINE>}<NEW_LINE>if (t == null) {<NEW_LINE>throw new Exception("t is null");<NEW_LINE>}<NEW_LINE>attrBuffer.append("&iname=").append(id);<NEW_LINE>Date d = transData(this.tt, t);<NEW_LINE>String tstr =... | SimpleDateFormat f = new SimpleDateFormat("yyyyMMddHH"); |
1,791,725 | private Object createCglibProxyForFactoryBean(Object factoryBean, ConfigurableBeanFactory beanFactory, String beanName) {<NEW_LINE>Enhancer enhancer = new Enhancer();<NEW_LINE>enhancer.setSuperclass(factoryBean.getClass());<NEW_LINE>enhancer.setNamingPolicy(SpringNamingPolicy.INSTANCE);<NEW_LINE>enhancer.setCallbackTyp... | proxy.invoke(factoryBean, args); |
1,555,497 | public void combineOne(SumByDoubleProcedure<T, V> thingToCombine) {<NEW_LINE>if (this.result.isEmpty()) {<NEW_LINE>thingToCombine.getResult().forEachKeyValue(new Procedure2<V, DoubleDoublePair>() {<NEW_LINE><NEW_LINE>public void value(V each, DoubleDoublePair sumCompensation) {<NEW_LINE>SumByDoubleCombiner.this.result.... | = sumCompensation.getOne() - currentCompensation; |
1,753,267 | // GEN-LAST:event_btnAddActionPerformed<NEW_LINE>@NbBundle.Messages({ "TIT_Add_Config=Add a new Configuration", "ACSD_Add_Config=Add a new Configuration", "TIT_Clone_Config=Add a new Configuration", "ACSD_Clone_Config=Add a new Configuration", "# {0} - original ID", "FMT_ConfigurationCloneId={0}_clone", "CONF_CloneOfDe... | = new DialogDescriptor(pnl, title); |
443,478 | public static JSONObject Bundle2Json(Bundle bundle) {<NEW_LINE>JSONObject json = new JSONObject();<NEW_LINE>Set<String> keys = bundle.keySet();<NEW_LINE>Iterator<String> iter = keys.iterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>String key = iter.next();<NEW_LINE>try {<NEW_LINE>Object value = bundle.get(key);<N... | = Bundle2Json((Bundle) value); |
1,542,375 | private void updateLayout() {<NEW_LINE>UISettings uiSettings = UISettings.getInstance();<NEW_LINE>if (myWidescreen != uiSettings.getWideScreenSupport()) {<NEW_LINE>JComponent documentComponent = (myWidescreen ? myVerticalSplitter : myHorizontalSplitter).getInnerComponent();<NEW_LINE>myWidescreen = uiSettings.getWideScr... | getWindowInfo().getWeight()); |
319,445 | private static int run(CommandContext<CommandSourceStack> context, Operation op, int count) throws CommandSyntaxException {<NEW_LINE>if (count == 0 && op != Operation.SET) {<NEW_LINE>throw INVALID_SLOT_COUNT.create();<NEW_LINE>}<NEW_LINE>SlotType slotType = SlotTypeArgument.getSlotType(context, "slot_type");<NEW_LINE>L... | - tool.getFreeSlots(slotType)); |
830,988 | public boolean unlockKey(int keystoreIndex, int aliasIndex, String keyPassword) throws KeyStoreException, KeyManagementException {<NEW_LINE>KeyStore ks = _keyStores.get(keystoreIndex);<NEW_LINE>String alias = getAliasAt(keystoreIndex, aliasIndex);<NEW_LINE>AliasKeyManager akm = new AliasKeyManager(ks, alias, keyPasswor... | , key.indexOf(" ")); |
1,532,368 | protected void checkRenewTimeAgainstCertValidityPeriod(Date notBefore, Date notAfter, String serialNumber) {<NEW_LINE>long notBeforems = notBefore.getTime();<NEW_LINE>long notAfterms = notAfter.getTime();<NEW_LINE>long renewCertMin = acmeConfig.getRenewCertMin();<NEW_LINE>long validityPeriod = notAfterms - notBeforems;... | "ms", AcmeConstants.RENEW_DEFAULT_MS + "ms"); |
720,490 | private synchronized void reprocessChildrenNotifiers() {<NEW_LINE>for (EntryInfo entry : children.keySet()) {<NEW_LINE>LooseArtifactNotifier childNotifier = children.get(entry);<NEW_LINE>String monitoredPath = this.getEntryMonitoredPath(entry);<NEW_LINE>if (monitoredPath != null) {<NEW_LINE>if (!enabledChildren.contain... | DefaultArtifactNotification(childNotifier.root, paths); |
1,532,225 | public static FunctionDefinitionNode createFunctionDefinitionNode(SyntaxKind kind, MetadataNode metadata, NodeList<Token> qualifierList, Token functionKeyword, IdentifierToken functionName, NodeList<Node> relativeResourcePath, FunctionSignatureNode functionSignature, FunctionBodyNode functionBody) {<NEW_LINE>Objects.re... | Objects.requireNonNull(functionName, "functionName must not be null"); |
622,606 | private static Map<String, String> buildCredentialInfo(CredentialPojo preCredential, String claimJson) {<NEW_LINE>CredentialPojo tempCredential = DataToolUtils.clone(preCredential);<NEW_LINE>Map<String, Object> claim = preCredential.getClaim();<NEW_LINE>Map<String, String> credentialInfo = new HashMap<String, String>()... | logger.error("[buildCredentialInfo] build credential info map failed.", e); |
382,028 | private void printEpubCheckCompleted(Report report) {<NEW_LINE>if (report != null) {<NEW_LINE>StringBuilder messageCount = new StringBuilder();<NEW_LINE>int count;<NEW_LINE>String variant;<NEW_LINE>if (reportingLevel <= ReportingLevel.Fatal) {<NEW_LINE>messageCount.append(messages.get("messages") + ": ");<NEW_LINE>coun... | "counter_warn_" + variant), count)); |
16,322 | public static String prettyXmlWithIndentType(String originalXml, int indentType) {<NEW_LINE>try {<NEW_LINE>Source xmlInput = new StreamSource(new StringReader(originalXml));<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>StreamResult xmlOutput = new StreamResult(stringWriter);<NEW_LINE><MASK><NEW_LIN... | TransformerFactory transformerFactory = TransformerFactory.newInstance(); |
809,210 | public void write(Node node, EntityMetadata entityMetadata, String persistenceUnit, ConsistencyLevel consistencyLevel, CassandraDataHandler cdHandler) {<NEW_LINE>// Index in Inverted Index table if applicable<NEW_LINE>boolean invertedIndexingApplicable = CassandraIndexHelper.isInvertedIndexingApplicable(entityMetadata,... | Mutator mutator = pelopsClient.getMutator(); |
587,238 | public void createAndShowGui(Component component) {<NEW_LINE>// title<NEW_LINE>setTitle(s_logger.localizeMessage("guiHelpTitle"));<NEW_LINE>// load icons<NEW_LINE>ArrayList<Image> images = new ArrayList<Image>();<NEW_LINE>images.add(getImage("AD16.png"));<NEW_LINE>images.add(getImage("AD32.png"));<NEW_LINE>setIconImage... | setBorder(BorderFactory.createLoweredBevelBorder()); |
169,460 | public void translateTransform(PTransform<PBegin, PCollection<T>> transform, AbstractTranslationContext context) {<NEW_LINE>AppliedPTransform<PBegin, PCollection<T>, PTransform<PBegin, PCollection<T>>> rootTransform = (AppliedPTransform<PBegin, PCollection<T>, PTransform<PBegin, PCollection<T><MASK><NEW_LINE>BoundedSou... | >>) context.getCurrentTransform(); |
849,042 | private static Vector apply(CompIntIntVector v1, IntDummyVector v2, Binary op) {<NEW_LINE>IntIntVector[] parts = v1.getPartitions();<NEW_LINE>Storage[] resParts = StorageSwitch.applyComp(v1, v2, op);<NEW_LINE>if (!op.isKeepStorage()) {<NEW_LINE>for (int i = 0; i < parts.length; i++) {<NEW_LINE>if (parts[i].getStorage()... | getStorage().getValues()); |
23,315 | public void onTabSelected(TabProxy tabProxy) {<NEW_LINE>TabProxy previousSelectedTab = getActiveTabProxy();<NEW_LINE>selectedTab = tabProxy;<NEW_LINE>// Focus event data which will be dispatched to the selected tab.<NEW_LINE>// The 'source' of these events will always be the tab being focused.<NEW_LINE>KrollDict focusE... | , tabs.indexOf(tabProxy)); |
590,418 | private boolean handleDataChange() throws Exception {<NEW_LINE>StateWrapper currentWrapper = stateRef.get();<NEW_LINE>StateWrapper notifyWrapper = notifyRef.get();<NEW_LINE>StateWrapper newWrapper = readCurrentContext();<NEW_LINE>traceLogWrappers(currentWrapper, notifyWrapper, newWrapper);<NEW_LINE>if (currentWrapper.v... | "Replay position " + i + " with version " + ver); |
1,260,954 | public void aggregate(int length, AggregationResultHolder aggregationResultHolder, Map<ExpressionContext, BlockValSet> blockValSetMap) {<NEW_LINE>BlockValSet blockValSet = blockValSetMap.get(_expression);<NEW_LINE>switch(blockValSet.getValueType().getStoredType()) {<NEW_LINE>case INT:<NEW_LINE>{<NEW_LINE>int[] values =... | "Cannot compute min for non-numeric type: " + blockValSet.getValueType()); |
138,657 | public static void exampleUpdateAuth() {<NEW_LINE>System.out.println();<NEW_LINE>UpdateExecution uExec1 = UpdateExecutionHTTP.service(dataURL).<MASK><NEW_LINE>try {<NEW_LINE>// Expect failed because there is no authentication credentials.<NEW_LINE>System.out.println("Update/no auth");<NEW_LINE>uExec1.execute();<NEW_LIN... | update("INSERT DATA{}").build(); |
1,532,035 | public static void addDebugger(final AbstractSQLProvider provider, final INaviProject project, final DebuggerTemplate debugger) throws CouldntSaveDataException {<NEW_LINE>checkArguments(provider, project);<NEW_LINE>Preconditions.checkNotNull(debugger, "IE00519: Debugger argument can't be null");<NEW_LINE>Preconditions.... | .inSameDatabase(provider), "IE00520: The given debugger template is not part of this database"); |
1,215,347 | public long readLong() {<NEW_LINE>if (dbg)<NEW_LINE>System.err.println("\nread");<NEW_LINE>if (!hasMore()) {<NEW_LINE>throw new NoSuchElementException();<NEW_LINE>}<NEW_LINE>readElementCount--;<NEW_LINE>if (repeatCount != 0) {<NEW_LINE>if (dbg)<NEW_LINE>System.err.println("next repeat count = " + repeatCount + " lastn ... | delta = bitStream.readIntBits(SMALL_DELTA_BITS); |
1,080,976 | private static Path createDemoCertificate() throws Throwable {<NEW_LINE>CertificateChainBuilder chainBuilder = new CertificateChainBuilder(DEMO_CERT_NAME);<NEW_LINE>KeyPairWrapper keyPair = chainBuilder.createCaCert();<NEW_LINE>// Some locations a user might be happy with<NEW_LINE>Path homeDir = Paths.get(System.getPro... | PemWriter pemWriter = new PemWriter(writer); |
1,702,233 | public void convert(String notation, NotationConvertResult<? super ComponentSelector> result) throws TypeConversionException {<NEW_LINE>ParsedModuleStringNotation parsed;<NEW_LINE>try {<NEW_LINE>parsed = new ParsedModuleStringNotation(notation, null);<NEW_LINE>} catch (IllegalDependencyNotation e) {<NEW_LINE>throw new ... | parsed.getVersion()))); |
1,240,877 | public void reset(View v) {<NEW_LINE>String CheckQ1 = question1.getText().toString();<NEW_LINE>String CheckQ2 = question2.getText().toString();<NEW_LINE>if (CheckQ1.contentEquals("") || CheckQ2.contentEquals("")) {<NEW_LINE>Toast empty = Toast.makeText(poorAuth_Reset.this, "Empty Fields Detected.", Toast.LENGTH_SHORT);... | this, "Invalid answers.", Toast.LENGTH_SHORT); |
1,464,500 | protected void internalRollback(Xid xid) throws XAException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "internalRollback", xid);<NEW_LINE>try {<NEW_LINE>CommsByteBuffer request = getCommsByteBuffer();<NEW_LINE>request.putInt(getTransactionId());<NEW_LINE>r... | SEG_XAROLLBACK, getLowestMessagePriority(), true); |
794,490 | public static void convert(GrayS32 input, GrayF64 output) {<NEW_LINE>if (input.isSubimage() || output.isSubimage()) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, input.height, y -> {<NEW_LINE>for (int y = 0; y < input.height; y++) {<NEW_LINE>int indexSrc = input.getIndex(0, y);<NEW_LINE>int indexDst = outpu... | = input.width * input.height; |
1,148,897 | public static void saveComboPfad(JComboBox<String> jcb, String orgPath) {<NEW_LINE>ArrayList<String> <MASK><NEW_LINE>String s = Objects.requireNonNull(jcb.getSelectedItem()).toString();<NEW_LINE>if (!s.equals(orgPath) || ApplicationConfiguration.getConfiguration().getBoolean(ApplicationConfiguration.DOWNLOAD_SHOW_LAST_... | pfade = new ArrayList<>(); |
1,606,664 | private FileObject generateJaxWSImplFromTemplate(FileObject pkg, String wsName, int projectType) throws Exception {<NEW_LINE>DataFolder <MASK><NEW_LINE>FileObject template = Templates.getTemplate(wiz);<NEW_LINE>if ((Boolean) wiz.getProperty(WizardProperties.IS_STATELESS_BEAN)) {<NEW_LINE>// EJB Web Service<NEW_LINE>Fil... | df = DataFolder.findFolder(pkg); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.