idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
935,483 | public long produceSamples(Path samplePath, boolean textOutput) throws Exception {<NEW_LINE>Path input = new Path(samplePath.toString() + "-seeds");<NEW_LINE><MASK><NEW_LINE>LOG.info("Generating " + this.numSamples + " of samples");<NEW_LINE>JobConf jobConf = getJobConf();<NEW_LINE>jobConf.set("genkmeansdataset.dimensi... | this.numSamples = writeSeeds(input); |
1,808,311 | private static List<SegmentPruner> sortSegmentPruners(List<SegmentPruner> pruners) {<NEW_LINE>// If there's multiple pruners, always prune empty segments first. After that, pruned based on time range, and<NEW_LINE>// followed by partition pruners.<NEW_LINE>// Partition pruner run time is proportional to input # of segm... | sortedPruners = new ArrayList<>(); |
1,339,339 | private VTMatchInfo generateMatchFromMatchedSymbol(VTMatchSet matchSet, Address sourceAddress, Address destinationAddress, int scoreFactor, SymbolType matchType) {<NEW_LINE>int sourceLength;<NEW_LINE>int destinationLength;<NEW_LINE>VTAssociationType associationType;<NEW_LINE>VTScore similarity = new VTScore(1.000);<NEW... | = new VTScore(10.0 / scoreFactor); |
1,612,257 | private static TsModel transformBeanPropertyTypes(TsModel tsModel, TsType.Transformer transformer) {<NEW_LINE>final List<TsBeanModel> newBeans = new ArrayList<>();<NEW_LINE>for (TsBeanModel bean : tsModel.getBeans()) {<NEW_LINE>final TsType.Context context = new TsType.Context();<NEW_LINE>final List<TsPropertyModel> ne... | method.getReturnType(), transformer); |
363,688 | private void stripUnusedTiles() {<NEW_LINE>int mapWidth = map.getProperties().get("width", Integer.class);<NEW_LINE>int mapHeight = map.getProperties().get("height", Integer.class);<NEW_LINE>int numlayers = map.getLayers().getCount();<NEW_LINE>int bucketSize = mapWidth * mapHeight * numlayers;<NEW_LINE>Iterator<MapLaye... | .getLayers().iterator(); |
558,142 | public void loadSkin() {<NEW_LINE>openedGroupIcon = new ImageIcon(ImageLoader.getImage(ImageLoader.OPENED_GROUP_ICON));<NEW_LINE>closedGroupIcon = new ImageIcon(ImageLoader.getImage(ImageLoader.CLOSED_GROUP_ICON));<NEW_LINE>callButton.setIconImage(ImageLoader<MASK><NEW_LINE>callButton.setRolloverIcon(ImageLoader.getIma... | .getImage(ImageLoader.CALL_BUTTON_SMALL)); |
56,114 | public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);<NEW_LI... | (traceKey), ArcusConstants.ARCUS_SCOPE); |
1,418,836 | public Object commitChanges() throws PropertyVetoException {<NEW_LINE>int currentIndex = editorsCombo.getSelectedIndex();<NEW_LINE>PropertyEditor currentEditor = currentIndex > -1 ? allEditors[currentIndex] : null;<NEW_LINE>if (currentEditor instanceof ExPropertyEditor) {<NEW_LINE>// we can only guess - according to th... | 1 ? allCustomEditors[currentIndex] : null; |
1,832,410 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('s0') select * from SupportBean group by theString output last every 3 events order by theString asc";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportBean("IBM", 10));<NEW_LINE>env.sendEventBean(new Suppo... | new SupportBean("ATT", 11)); |
1,750,364 | public int write(byte[] data) throws IOException, JSONException {<NEW_LINE>int result = 1;<NEW_LINE>URL baseURL = new URL("http://" + baseIP + "/" + sendDataEndPoint);<NEW_LINE>int written = 0;<NEW_LINE>JSONArray responseArray = new JSONArray();<NEW_LINE>while (written < data.length) {<NEW_LINE>JSONObject jsonObject = ... | , MediaType.get("application/json; charset=utf-8")); |
1,821,540 | public void marshall(AwsCodeBuildProjectArtifactsDetails awsCodeBuildProjectArtifactsDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsCodeBuildProjectArtifactsDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protoco... | awsCodeBuildProjectArtifactsDetails.getType(), TYPE_BINDING); |
514,831 | /*<NEW_LINE>* retrieve list of note type in variable, which will going to be in use for adding/cloning note type<NEW_LINE>*/<NEW_LINE>private void initializeNoteTypeList() {<NEW_LINE>String add = getResources().getString(R.string.model_browser_add_add);<NEW_LINE>String clone = getResources().getString(R.string.model_br... | String defaultName = StdModels.getDefaultName(); |
1,323,363 | public static ValidationResult validateImportConfiguration(ImportConfiguration conf) {<NEW_LINE>// Note: for now it is assumed all properties of the conf are set (i.e. not null) when this is called.<NEW_LINE>// This true for current use cases but may not be true for more complex wizards<NEW_LINE>// that allow specifyin... | name + "' unavailable: File exists at '" + defaultLocation + "'"); |
148,883 | public ListSecurityProfilesForTargetResult listSecurityProfilesForTarget(ListSecurityProfilesForTargetRequest listSecurityProfilesForTargetRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSecurityProfilesForTargetRequest);<NEW_LINE>A... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
462,709 | final CreateAutoPredictorResult executeCreateAutoPredictor(CreateAutoPredictorRequest createAutoPredictorRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAutoPredictorRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,778,025 | /* Utility function*/<NEW_LINE>public JSONArray createFeedbackLogObject(String skill_rate, String user_query, String susi_reply, String country_name, String country_code, String device_type, String skill_path) {<NEW_LINE>JSONArray skillName = new JSONArray();<NEW_LINE>JSONObject feedbackLogObject = new JSONObject();<NE... | feedbackLogObject.put("user_query", user_query); |
166,906 | public ModifyHostsResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>ModifyHostsResult modifyHostsResult = new ModifyHostsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetD... | XMLEvent xmlEvent = context.nextEvent(); |
1,614,458 | public static BufferedImage resizeWithRatio(BufferedImage image, int destinationWidth, int destinationHeight) {<NEW_LINE>int type = image.getType() == 0 ? BufferedImage<MASK><NEW_LINE>// *Special* if the width or height is 0 use image src dimensions<NEW_LINE>if (destinationWidth == 0) {<NEW_LINE>destinationWidth = imag... | .TYPE_INT_ARGB : image.getType(); |
693,887 | public static void configureTemporalNamespace(final WorkflowServiceStubs temporalService) {<NEW_LINE>final var client = temporalService.blockingStub();<NEW_LINE>final var describeNamespaceRequest = DescribeNamespaceRequest.newBuilder().setNamespace(DEFAULT_NAMESPACE).build();<NEW_LINE>final var currentRetentionGrpcDura... | getSeconds()).build(); |
845,310 | private Border createImageBorder(String[] value) {<NEW_LINE>if (value[0].equals("h")) {<NEW_LINE>return Border.createHorizonalImageBorder(getImage(value[1]), getImage(value[2]), getImage(value[3]));<NEW_LINE>}<NEW_LINE>if (value[0].equals("v")) {<NEW_LINE>return Border.createVerticalImageBorder(getImage(value[1]), getI... | = getImage(value[iter]); |
54,065 | public ClusterStateTaskExecutor<DropPublicationRequest> clusterStateTaskExecutor(DropPublicationRequest request) {<NEW_LINE>return new DDLClusterStateTaskExecutor<>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected ClusterState execute(ClusterState currentState, DropPublicationRequest request) throws Exception {<NEW_... | newMetadata = PublicationsMetadata.newInstance(oldMetadata); |
225,140 | public Object doQuery(Object[] objs) {<NEW_LINE>if (objs == null || objs.length < 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("spark_read1" + mm.getMessage(Integer.toString(param.getSubSize())));<NEW_LINE>}<NEW_LINE>if (!(objs[0] instanceof SparkCli)) {<NEW_LINE>MessageManager ... | + mm.getMessage("function.paramTypeError")); |
1,457,705 | public void onEnum(final Token fieldToken, final DirectBuffer buffer, final int bufferIndex, final List<Token> tokens, final int beginIndex, final int endIndex, final int actingVersion) {<NEW_LINE>final Token typeToken = tokens.get(beginIndex + 1);<NEW_LINE>final long encodedValue = readEncodingAsLong(buffer, bufferInd... | .constValue().toString(); |
456,083 | private XmlTiers createXmlTiers(@NonNull final GarantType garantType) {<NEW_LINE>final XmlTiersBuilder xtiers = XmlTiers.builder();<NEW_LINE>xtiers.type(Tiers.GARANT);<NEW_LINE>xtiers.paymentPeriod(garantType.getPaymentPeriod());<NEW_LINE>xtiers.biller(createXmlBiller(garantType.getBiller()));<NEW_LINE>final DebitorAdd... | (garantType.getPatient())); |
89,567 | private void formatInformation() {<NEW_LINE>PackedBits32 bits = formatInformationBits(qr);<NEW_LINE>// System.out.println("encoder format bits "+Integer.toBinaryString(bits.data[0]));<NEW_LINE>for (int i = 0; i < 15; i++) {<NEW_LINE>if (bits.get(i) == 0) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (i < 6) {<NEW_LINE>sq... | square(i + 1, 8); |
1,788,925 | protected void createStructure() {<NEW_LINE>indexSize = IO_USER_START + 0 * 8 + 8;<NEW_LINE>assert (indexSize > IO_USER_START);<NEW_LINE>index.ensureAvailable(indexSize);<NEW_LINE>for (int i = 0; i < indexSize; i += 8) index.putLong(i, 0L);<NEW_LINE>index.putInt(0, HEADER);<NEW_LINE>index.putUnsignedShort(4, STORE_VERS... | index.putLong(IO_FREE_SIZE, freeSize); |
348,358 | public void multiSet(final List<HippyStorageKeyValue> keyValues, final Callback<Void> callback) {<NEW_LINE>execute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>if (database == null) {<NEW_LINE>callback.onError("Database Error");<NEW_LINE>return;<NEW_... | SQLiteDatabase database = mSQLiteHelper.getDatabase(); |
538,885 | private io.quarkus.maven.dependency.ResolvedDependency resolve(ArtifactCoords appArtifact, Artifact mvnArtifact, List<RemoteRepository> managedRepos) throws BootstrapMavenException {<NEW_LINE>final ResolvedDependency resolvedArtifact = ResolvedDependency.class.isAssignableFrom(appArtifact.getClass()<MASK><NEW_LINE>if (... | ) ? (ResolvedDependency) appArtifact : null; |
441,883 | // GEN-LAST:event_tablesDropdownListActionPerformed<NEW_LINE>@NbBundle.Messages({ "SQLiteViewer.csvExport.fileName.empty=Please input a file name for exporting.", "SQLiteViewer.csvExport.title=Export to csv file", "SQLiteViewer.csvExport.confirm.msg=Do you want to overwrite the existing file?" })<NEW_LINE>private void ... | setSelectedFile(new File(defaultFileName)); |
330,438 | static boolean isWideningConversion(Class<?> sourceType, Class<?> targetType) {<NEW_LINE>Preconditions.condition(targetType.isPrimitive(), "targetType must be primitive");<NEW_LINE>boolean isPrimitive = sourceType.isPrimitive();<NEW_LINE>boolean isWrapper = primitiveToWrapperMap.containsValue(sourceType);<NEW_LINE>// N... | .class || targetType == double.class; |
1,618,736 | private void renderExport(WasmModule module) {<NEW_LINE>// https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#export-section<NEW_LINE>WasmBinaryWriter section = new WasmBinaryWriter();<NEW_LINE>List<WasmFunction> functions = module.getFunctions().values().stream().filter(function -> function.getExportN... | get(function.getName()); |
1,231,137 | public INDArray activate(boolean training, LayerWorkspaceMgr workspaceMgr) {<NEW_LINE>assertInputSet(false);<NEW_LINE>INDArray ret;<NEW_LINE>if (!training) {<NEW_LINE>ret = input;<NEW_LINE>} else {<NEW_LINE>if (layerConf().getIDropout() != null) {<NEW_LINE>INDArray result;<NEW_LINE>if (inputModificationAllowed) {<NEW_L... | ), getEpochCount(), workspaceMgr); |
221,612 | String makeOAuthGetUserInfoRequest(final PwmRequest pwmRequest, final String accessToken) throws PwmUnrecoverableException {<NEW_LINE>final PwmHttpClientResponse restResults;<NEW_LINE>{<NEW_LINE>final DomainConfig config = pwmRequest.getDomainConfig();<NEW_LINE>final String requestUrl = settings.getAttributesUrl();<NEW... | (sessionLabel, () -> "received attribute values from OAuth IdP for attributes: "); |
935,553 | protected void exportBEncodedMappings(Map map, String name, List mappings) throws IOException {<NEW_LINE>List l = new ArrayList();<NEW_LINE>map.put(name, l);<NEW_LINE>for (int i = 0; i < mappings.size(); i++) {<NEW_LINE>FieldRemapper mapper = (<MASK><NEW_LINE>Map m = new HashMap();<NEW_LINE>l.add(m);<NEW_LINE>m.put("fr... | FieldRemapper) mappings.get(i); |
12,821 | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {<NEW_LINE>final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();<NEW_LINE>if (Configuration.INSTANCE.getSecureDeployment(deploymentUnit) == null) {<NEW_LINE>WarMetaData warMetaData = deploymentUnit.getAtta... | deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); |
1,636,009 | private void createVirtualPad(int surfaceWidth, int surfaceHeight) {<NEW_LINE>DisplayMetrics dm = new DisplayMetrics();<NEW_LINE>((Activity) getContext()).getWindowManager().getDefaultDisplay().getMetrics(dm);<NEW_LINE>float density = dm.density;<NEW_LINE>float screenWidth = (float) surfaceWidth / density;<NEW_LINE>flo... | InputManager.getVirtualPadItems(screenWidth, screenHeight); |
709,476 | public static boolean addPropertyToGraphEntity(Entity entity, CsvHeaderField field, Object value, CsvLoaderConfig config) {<NEW_LINE>if (field.isIgnore() || value == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (field.isArray()) {<NEW_LINE>final List list = (List) value;<NEW_LINE>final boolean listContainingNu... | getType().toUpperCase()); |
924,370 | protected void createSiteSection(Composite parent) {<NEW_LINE>super.createSiteSection(parent);<NEW_LINE>Label label = new Label(parent, SWT.NONE);<NEW_LINE>label.setLayoutData(GridDataFactory.swtDefaults().hint(new PixelConverter(label).convertHorizontalDLUsToPixels(IDialogConstants.LABEL_WIDTH), SWT.DEFAULT).create())... | = new String[PROTOCOL_TYPES.length]; |
831,655 | public static String statisticToTclAttrString(StatisticImpl stats, long time, String modName, DataDescriptor dd, String nodeName, String serverName) {<NEW_LINE>if (stats == null)<NEW_LINE>return "";<NEW_LINE>StringBuffer rv = new StringBuffer(256);<NEW_LINE>rv.append("{Id ").append(stats.getId<MASK><NEW_LINE>// comment... | ()).append("} "); |
652,854 | public void handleGET(CoapExchange exchange) {<NEW_LINE>Response response = new Response(CONTENT);<NEW_LINE>Integer maxConnections = null;<NEW_LINE>Integer nodeId = null;<NEW_LINE>List<CounterStatisticManager> healths = endpointHealth;<NEW_LINE>Endpoint endpoint = exchange<MASK><NEW_LINE>if (endpoint != null) {<NEW_LIN... | .advanced().getEndpoint(); |
1,797,585 | private BucketSearchResult lastItem(final OAtomicOperation atomicOperation) throws IOException {<NEW_LINE>final LinkedList<PagePathItemUnit> path = new LinkedList<>();<NEW_LINE>long bucketIndex = ROOT_INDEX;<NEW_LINE>OCacheEntry cacheEntry = loadPageForRead(atomicOperation, fileId, bucketIndex, false);<NEW_LINE>CellBTr... | new PagePathItemUnit(bucketIndex, itemIndex)); |
1,212,093 | final ListV2LoggingLevelsResult executeListV2LoggingLevels(ListV2LoggingLevelsRequest listV2LoggingLevelsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listV2LoggingLevelsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,589,038 | private static void raw(CoincheckMarketDataServiceRaw marketDataService) throws IOException {<NEW_LINE>// Get the latest trade data.<NEW_LINE>CoincheckTradesContainer defaultTrades = marketDataService.getCoincheckTrades(new CoincheckPair(CurrencyPair.BTC_JPY), null);<NEW_LINE>System.out.println(String.format("Coincheck... | ().size())); |
949,637 | private void openPathSegments(String[] pathSegments, int from) throws IOException {<NEW_LINE>for (int i = from; i < pathSegments.length; i++) {<NEW_LINE>StringBuilder sb = new StringBuilder(pathSegments[0]);<NEW_LINE>StringBuilder parentPath = new StringBuilder(pathSegments[0]);<NEW_LINE>for (int j = 1; j <= i; j++) {<... | write("\"" + currentProperty + "\":"); |
70,974 | private void createOrUpdateIndexedObservation(IBaseResource theResource, Date theEffectiveDtm, String theSubjectId, List<IBase> theObservationCodeCodeableConcepts, List<IBase> theObservationCategoryCodeableConcepts) {<NEW_LINE>String resourcePID = theResource<MASK><NEW_LINE>// Determine if an index already exists for O... | .getIdElement().getIdPart(); |
995,221 | private static void showArtifactViewer(NBVersionInfo info, Artifact artifact, List<ArtifactRepository> repos, String panelHint) {<NEW_LINE>ArtifactViewerFactory fact = Lookup.getDefault().lookup(ArtifactViewerFactory.class);<NEW_LINE>if (fact == null) {<NEW_LINE>Logger.getLogger(ArtifactViewer.class.getName<MASK><NEW_L... | ()).info("No implementation of ArtifactViewerFactory available."); |
1,603,521 | final CreateGlobalNetworkResult executeCreateGlobalNetwork(CreateGlobalNetworkRequest createGlobalNetworkRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createGlobalNetworkRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
528,832 | private String send(Message<?> message, String subDirectory, FileExistsMode mode) {<NEW_LINE>Assert.notNull(this.directoryExpressionProcessor, "'remoteDirectoryExpression' is required");<NEW_LINE>Assert.isTrue(!FileExistsMode.APPEND.equals(mode) || !this.useTemporaryFileName, "Cannot append when using a temporary file ... | .equals(mode), "FilExistsMode.REPLACE_IF_MODIFIED can only be used for local files"); |
671,489 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>mSimpleDraweeView = (SimpleDraweeView) view.findViewById(R.id.drawee_view);<NEW_LINE>mSimpleDraweeView.setImageURI(sampleUris().createSvgUri());<NEW_LINE>final SwitchCompat switchBackground = (SwitchCompat) view.findViewById(R.id.switc... | show(getChildFragmentManager(), null); |
251,139 | // Given set of edges and the search response, extract all valid edges that originate from the input entityUrns<NEW_LINE>@WithSpan<NEW_LINE>private List<LineageRelationship> extractRelationships(@Nonnull Set<Urn> entityUrns, @Nonnull SearchResponse searchResponse, Set<Pair<String, EdgeInfo>> validEdges, Set<Urn> visite... | ("urn").toString()); |
1,387,071 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>jScrollPane1 = new javax.swing.JScrollPane();<NEW_LINE>msgPanel = new javax.swing.JTextPane();<NEW_LINE>msgPanel.setBackground(new Color(0, 0, 0, 0));<NEW_LINE>// NOI18N<NEW_LINE>m... | , 272, Short.MAX_VALUE)); |
1,751,461 | public Collection<Pair<FileObject, Integer>> filesForClass(FileObject sourceRoot, PhpClass phpClass) {<NEW_LINE>if (sourceRoot.isData()) {<NEW_LINE>throw new IllegalArgumentException("sourceRoot must be a folder");<NEW_LINE>}<NEW_LINE>final List<Pair<FileObject, Integer>> retval = new ArrayList<>();<NEW_LINE>Index inde... | , indexedClass.getOffset())); |
136,121 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_confirm_setup);<NEW_LINE>RelativeLayout mLoginTextContainer = findViewById(R.id.login_text_container);<NEW_LINE>mSetupProgress = findViewById(R.id.SetupProgress);<NEW_LINE>mContinu... | mTransitionViewWhite.setVisibility(View.INVISIBLE); |
67,097 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String queryFlag) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Qu... | ExceptionEntityNotExist(flag, ImportModel.class); |
38,069 | public static DescribeDrGatewaysResponse unmarshall(DescribeDrGatewaysResponse describeDrGatewaysResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDrGatewaysResponse.setRequestId(_ctx.stringValue("DescribeDrGatewaysResponse.RequestId"));<NEW_LINE>describeDrGatewaysResponse.setSuccess(_ctx.booleanValue("DescribeDrG... | ("DescribeDrGatewaysResponse.DrGateways[" + i + "].IpAddress")); |
1,479,842 | public boolean checkForStep(Vector3f direction, float stepHeight, float slopeFactor, float checkForwardDistance) {<NEW_LINE>boolean moveUpStep;<NEW_LINE>boolean hitStep = false;<NEW_LINE>float stepSlope = 1f;<NEW_LINE>Vector3f lookAheadOffset = new Vector3f(direction.x, direction.y, direction.z);<NEW_LINE>lookAheadOffs... | .getHitCollisionObject().getWorldTransform(); |
1,673,299 | private static void pprintSelect(Select exp, StringBuilder sb) {<NEW_LINE>if (exp.sym().name.contentEquals(ENCLOSING_INSTANCE_NAME)) {<NEW_LINE>GuardedByExpression curr = exp.base();<NEW_LINE>while (curr.kind() == Kind.SELECT) {<NEW_LINE>curr = ((<MASK><NEW_LINE>if (curr.kind() == Kind.THIS) {<NEW_LINE>break;<NEW_LINE>... | Select) curr).base(); |
1,193,185 | private void mergePluginFilesFromDir(final CommandConsole console, String sourcePath, String targetPath) {<NEW_LINE>console.printlnInfoMessage(getMessage("MergePluginFilesTask.merging.plugin.dir", sourcePath));<NEW_LINE>File sourcePathFile = new File(sourcePath);<NEW_LINE>if (!sourcePathFile.exists()) {<NEW_LINE>abort(... | = targetPath + File.separator + TARGET_MERGED_FILE_NAME; |
230,372 | private void handleDataDownloadAsZip(final HttpServletResponse response, final SecurityContext securityContext, final String name, final String types) {<NEW_LINE>logger.info("Preparing data deployment export for download as zip");<NEW_LINE>try {<NEW_LINE>DeployDataCommand deployDataCommand = StructrApp.getInstance(secu... | attributes.put("mode", "export"); |
19,330 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>output.writeBool(1, attachRequired_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>output.writeBool(2, podInfoOnMount_);<NEW_... | writeString(output, 5, fsGroupPolicy_); |
850,565 | final ListSubscribedWorkteamsResult executeListSubscribedWorkteams(ListSubscribedWorkteamsRequest listSubscribedWorkteamsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSubscribedWorkteamsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | (super.beforeMarshalling(listSubscribedWorkteamsRequest)); |
901,559 | private void appendReference(StringBuilder sb, ReferenceTree ref, List<? extends DocTree> label, TreePath docPath, DocCommentTree doc, DocTrees trees) {<NEW_LINE>String sig = ref.getSignature();<NEW_LINE>if (sig != null && sig.length() > 0) {<NEW_LINE>if (sig.charAt(0) == '#') {<NEW_LINE>// NOI18N<NEW_LINE>sig = sig.su... | , doc, trees, null)); |
355,943 | private InventoryLineHU syncQtyFromInventoryLineToHU(@NonNull final InventoryLine inventoryLine, @NonNull final InventoryLineHU inventoryLineHU) {<NEW_LINE>final Quantity qtyCountMinusBooked = inventoryLineHU.getQtyCountMinusBooked();<NEW_LINE>if (qtyCountMinusBooked.signum() == 0) {<NEW_LINE>return inventoryLineHU;<NE... | (productId, qtyToTransfer), inventoryLineRecord); |
1,271,391 | public ValidateResult validate(Object value) {<NEW_LINE>if (value instanceof BigDecimal) {<NEW_LINE>BigDecimal decimal = (BigDecimal) value;<NEW_LINE>value = decimal.stripTrailingZeros();<NEW_LINE>long longValue = decimal.longValue();<NEW_LINE>if (decimal.compareTo(BigDecimal.valueOf(longValue)) == 0) {<NEW_LINE>value ... | Long) value).longValue(); |
1,335,998 | public static void main(String[] args) throws Exception {<NEW_LINE>RubyInstanceConfig config = new RubyInstanceConfig();<NEW_LINE>config.setArgv(args);<NEW_LINE>Ruby runtime = JavaEmbedUtils.initialize(<MASK><NEW_LINE>String mainRubyFile = "main";<NEW_LINE>String runConfigFile = "run_configuration";<NEW_LINE>ArrayList<... | new ArrayList(0), config); |
1,711,181 | public // /////////////////////////////////////////////////////////////////////////////////////////<NEW_LINE>void applySnapshot(DaoState snapshot) {<NEW_LINE>allowDaoStateChange = true;<NEW_LINE>assertDaoStateChange();<NEW_LINE>log.info("Apply snapshot with chain height {}", snapshot.getChainHeight());<NEW_LINE>daoStat... | clearAndSetBlocks(snapshot.getBlocks()); |
954,777 | private static AspectDeps buildAspectDeps(AspectDescriptor descriptor, HashMap<AspectDescriptor, AspectDeps> aspectPaths, LinkedHashMap<AspectDescriptor, ArrayList<AspectDescriptor>> deps) {<NEW_LINE>if (aspectPaths.containsKey(descriptor)) {<NEW_LINE>return aspectPaths.get(descriptor);<NEW_LINE>}<NEW_LINE>ImmutableLis... | descriptor, aspectPathBuilder.build()); |
425,829 | private ContentPreviewer contentPreviewer(RequestContext ctx, HttpHeaders headers) {<NEW_LINE>for (PreviewSpec previewSpec : previewSpecs) {<NEW_LINE>if (previewSpec.predicate().test(ctx, headers)) {<NEW_LINE>switch(previewSpec.mode()) {<NEW_LINE>case TEXT:<NEW_LINE>final Charset charset = charset(headers);<NEW_LINE>re... | MediaType contentType = headers.contentType(); |
440,207 | public void updateServices() {<NEW_LINE>if (bundleContext == null) {<NEW_LINE>// do nothing; not really in a running system (unit tests etc.)<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Set<String> installedSymbolicNames = new HashSet<String>();<NEW_LINE>for (String featureName : installedFeatures) {<NEW_LINE>String symbolicN... | = previous != null ? previous : factory; |
1,535,867 | public void format(AbstractConfiguration<?> conf, LayoutManager layoutManager) throws InterruptedException, KeeperException, IOException {<NEW_LINE>MetastoreTable ledgerTable;<NEW_LINE>try {<NEW_LINE>ledgerTable = metastore.createScannableTable(TABLE_NAME);<NEW_LINE>} catch (MetastoreException mse) {<NEW_LINE>throw new... | throw new IOException("Failed to get ledger manager factory class from configuration : ", e); |
1,601,217 | private static void initRocksDbSettings(Config config) {<NEW_LINE>String prefix = Constant.STORAGE_DB_SETTING;<NEW_LINE>int levelNumber = config.hasPath(prefix + "levelNumber") ? config.getInt(prefix + "levelNumber") : 7;<NEW_LINE>int compactThreads = config.hasPath(prefix + "compactThreads") ? config.getInt(prefix + "... | getDouble(prefix + "maxBytesForLevelMultiplier") : 10; |
1,293,881 | public void init(FilterConfig filterConfig) throws ServletException {<NEW_LINE>// build the configuration object<NEW_LINE>TogglzFilterConfig config = new TogglzFilterConfig(filterConfig.getServletContext());<NEW_LINE>requestListener = new CompositeRequestListener(Services<MASK><NEW_LINE>// did the user specify whether ... | .getSorted(RequestListener.class)); |
1,342,002 | public static QueryServicePackAndPriceResponse unmarshall(QueryServicePackAndPriceResponse queryServicePackAndPriceResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryServicePackAndPriceResponse.setRequestId(_ctx.stringValue("QueryServicePackAndPriceResponse.RequestId"));<NEW_LINE>queryServicePackAndPriceResponse.setRe... | ("QueryServicePackAndPriceResponse.ServicePack[" + i + "].EndTime")); |
1,512,716 | public void leave(DelegateExecution childExecution) {<NEW_LINE>DelegateExecution multiInstanceRootExecution = getMultiInstanceRootExecution(childExecution);<NEW_LINE>int nrOfInstances = getLoopVariable(multiInstanceRootExecution, NUMBER_OF_INSTANCES);<NEW_LINE>int loopCounter = getLoopVariable(childExecution, getCollec... | childExecution, getCollectionElementIndexVariable(), loopCounter); |
243,333 | // <editor-fold><NEW_LINE>@LuaApiUsed<NEW_LINE>public LuaValue[] selectScale(LuaValue[] v) {<NEW_LINE>if (v.length == 0) {<NEW_LINE>if (getTabLayout().getTabCount() >= 1) {<NEW_LINE>BaseTabLayout.Tab tab = getTabLayout().getTabAt(0);<NEW_LINE>TextDotTabInfoLua info = tab.getTabInfo();<NEW_LINE>return varargsOf(LuaNumbe... | (info.getSelectScale())); |
1,372,972 | final UpdateAppResult executeUpdateApp(UpdateAppRequest updateAppRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateAppRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateApp"); |
1,484,963 | public void updateE(NumberVector vec, double wei) {<NEW_LINE>assert vec.getDimensionality() == mean.length;<NEW_LINE>assert wei >= 0 && wei < Double.POSITIVE_INFINITY : wei;<NEW_LINE>if (wei < Double.MIN_NORMAL) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int dim = mean.length;<NEW_LINE>// Naive aggregates:<NEW_LINE>f... | i), vi_wei = vi * wei; |
1,011,359 | /*public static IdealState rebalanceCustomIdealStateFor(IdealState oldIdealState,<NEW_LINE>String topicName, String oldPartition, String newPartition, String newInstanceName) {<NEW_LINE>final CustomModeISBuilder customModeIdealStateBuilder = new CustomModeISBuilder(topicName);<NEW_LINE><NEW_LINE>int oldNumPartitions = ... | equals(oldPartition) ? newInstanceName : instanceName; |
1,225,452 | void applyAssumedStartupBehaviors() {<NEW_LINE>if (ApplicationUtils.isFirstTimeAppHasBeenRun()) {<NEW_LINE>ArgumentType.BACKUP.<MASK><NEW_LINE>ApplicationUtils.getPresenter().clearMessages();<NEW_LINE>}<NEW_LINE>if (isEmpty() || !containsKey(ArgumentType.RUN_KOANS) && (containsKey(ArgumentType.CLASS_ARG) || containsKey... | run(new String[0]); |
1,824,815 | private void extractOrderedAccesses(List<Statement> stmtList, TreeNode subExpr, List<VariableAccess> toExtract) {<NEW_LINE>for (int i = 0; i < toExtract.size(); i++) {<NEW_LINE>VariableAccess access = toExtract.get(i);<NEW_LINE>TreeNode topConditional = getTopConditional(access.expression, subExpr);<NEW_LINE>if (topCon... | .subList(i, j)); |
1,096,292 | private boolean processPayment(HttpServletRequest request, Properties ctx, MPayment payment, WebUser wu, WebOrder wo) {<NEW_LINE>boolean ok = processParameter(request, ctx, payment, wu);<NEW_LINE>if (ok) {<NEW_LINE>// if negative amount - make it positive<NEW_LINE>if (payment.getPayAmt().compareTo(Env.ZERO) < 0)<NEW_LI... | payment.processIt(DocAction.ACTION_Complete); |
1,850,642 | private void uploadChunk() {<NEW_LINE>try {<NEW_LINE>mStreamBuffer.fill(mCurrentChunkSize);<NEW_LINE>int bytesToUpload = Math.min(mCurrentChunkSize, mStreamBuffer.available());<NEW_LINE>NetworkRequest uploadRequest = new ResumableUploadByteRequest(mStorageRef.getStorageReferenceUri(), mStorageRef.getApp(), mUploadUri, ... | d(TAG, "Resetting chunk size to " + mCurrentChunkSize); |
1,150,847 | private void upgradeDatabase() {<NEW_LINE>logger.info("Upgrading the Apicurio Hub API database.");<NEW_LINE>int fromVersion = this.getDatabaseVersion();<NEW_LINE>int toVersion = DB_VERSION;<NEW_LINE>logger.info(<MASK><NEW_LINE>logger.info("\tFrom Version: {}", fromVersion);<NEW_LINE>logger.info("\tTo Version: {}", ... | "\tDatabase type: {}", config.getJdbcType()); |
1,177,077 | public void renderTileEntityAt(TileArchitect architect, double x, double y, double z, float f, int aThing) {<NEW_LINE>Minecraft.getMinecraft().mcProfiler.startSection("bc");<NEW_LINE>Minecraft.getMinecraft().mcProfiler.startSection("architect");<NEW_LINE>super.renderTileEntityAt(architect, x, y, z, f, aThing);<NEW_LINE... | GL11.glEnable(GL11.GL_LIGHTING); |
1,321,701 | public void after(Object target, Object[] args, Object result, Throwable throwable) {<NEW_LINE>if (isDebug) {<NEW_LINE>logAfterInterceptor(<MASK><NEW_LINE>}<NEW_LINE>final boolean success = InterceptorUtils.isSuccess(throwable);<NEW_LINE>// Must not check if current transaction is trace target or not. Connection can be... | target, args, result, throwable); |
1,562,189 | public static OkHttpClient.Builder enableTls12OnPreLollipop(OkHttpClient.Builder client) {<NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1 && "Samsung".equals(Build.MANUFACTURER)) {<NEW_LINE>try {<NEW_LINE>Timber.d("Creating unified TrustManager");<NEW_LINE>Certificate cert = getUserTrustRootCerti... | [] { trustManager }, null); |
1,670,353 | private org.apache.http.cookie.Cookie convert(Cookie in) {<NEW_LINE>BasicClientCookie out = new BasicClientCookie(in.getName(), in.getValue());<NEW_LINE>String domainStr = null;<NEW_LINE>if (StringUtils.isEmpty(in.getDomain())) {<NEW_LINE>String urlStr = context.item().engine.get().getLocation();<NEW_LINE>try {<NEW_LIN... | setSecure(in.isSecure()); |
289,421 | public CategoricalDistribution forward(CategoricalDistribution f1_t, List<AssignmentProposition> e_tp1) {<NEW_LINE>final CategoricalDistribution s1 = new ProbabilityTable(f1_t.getFor());<NEW_LINE>// Set up required working variables<NEW_LINE>Proposition[] props = new Proposition[s1.getFor().size()];<NEW_LINE>int i = 0;... | .get(rv), "<Dummy Value>"); |
813,860 | public void onPublish(Datum datum, RaftPeer source) throws Exception {<NEW_LINE>RaftPeer local = peers.local();<NEW_LINE>if (datum.value == null) {<NEW_LINE>Loggers.RAFT.warn("received empty datum");<NEW_LINE>throw new IllegalStateException("received empty datum");<NEW_LINE>}<NEW_LINE>if (!peers.isLeader(source.ip)) {<... | local.term.addAndGet(PUBLISH_TERM_INCREASE_COUNT); |
1,609,562 | private Expression<?> parseStringExpression() throws ParserException {<NEW_LINE>List<Expression<?>> nodes = new ArrayList<>();<NEW_LINE>Token.Type previousNodeType = null;<NEW_LINE>// Sequential strings are not OK, but strings can follow interpolation<NEW_LINE>while (true) {<NEW_LINE>if (this.stream.current().test(Toke... | = new ConcatenateExpression(first, null); |
1,570,306 | public static QueryAvailableInstancesResponse unmarshall(QueryAvailableInstancesResponse queryAvailableInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryAvailableInstancesResponse.setRequestId(_ctx.stringValue("QueryAvailableInstancesResponse.RequestId"));<NEW_LINE>queryAvailableInstancesResponse.setCode(_ct... | ("QueryAvailableInstancesResponse.Data.InstanceList[" + i + "].RenewStatus")); |
1,045,908 | public IGeometric2D transform(TransformMatrix2D matrix) {<NEW_LINE>final Point2D centerNew = matrix.multiply(center);<NEW_LINE>final Point2D maxXNew = matrix.multiply(new Point2D(center.getX() + radius, center.getY()));<NEW_LINE>final Point2D maxYNew = matrix.multiply(new Point2D(center.getX(), center.getY() + radius))... | vectorYNew = centerNew.vec(maxYNew); |
753,068 | protected AstNode visitQuery(final Query node, final C context) {<NEW_LINE>final Optional<AstNode> result = plugin.apply(node, new Context<>(context, this));<NEW_LINE>if (result.isPresent()) {<NEW_LINE>return result.get();<NEW_LINE>}<NEW_LINE>final Select select = (Select) rewriter.apply(node.getSelect(), context);<NEW... | node.getFrom(), context); |
1,558,577 | public void close() {<NEW_LINE>List<Exception> exceptions = new ArrayList<>();<NEW_LINE>for (IOThread ioThread : ioThreads) {<NEW_LINE>try {<NEW_LINE>ioThread.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>exceptions.add(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (exceptions.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_... | RuntimeException) exceptions.get(0); |
77,676 | private // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>lName = new javax.swing.JLabel();<NEW_LINE>lName1 = new javax.swing.JLabel();<NEW_LINE>tfHost = new javax.swing.JTextField();<NEW_LINE>tfPort = new javax.swing.JTextField();<NEW_... | DEFAULT_SIZE, Short.MAX_VALUE))); |
1,411,288 | public void processStream(InputStream input) throws IOException {<NEW_LINE>try (BufferedReader reader = new BufferedReader(new InputStreamReader(input))) {<NEW_LINE>String line;<NEW_LINE>int lineno = 0;<NEW_LINE>try {<NEW_LINE>while ((line = reader.readLine()) != null) {<NEW_LINE>++lineno;<NEW_LINE>Matcher matcher = AN... | annotation.getFilename(), e); |
752,176 | public List<String> list(EffectivePerson effectivePerson) throws Exception {<NEW_LINE>EntityManager em = this.entityManagerContainer().get(Portal.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LINE>Root<Portal> root = cq.from(Portal.c... | get(Portal_.controllerList))); |
1,612,230 | private void checkUpdateStatusToEnableAllowed(long ctime, long mtime) throws SaturnJobConsoleHttpException {<NEW_LINE>if (Math.abs(System.currentTimeMillis() - ctime) < OPERATION_FORBIDDEN_INTERVAL_AFTER_CREATION_IN_MILL_SECONDS) {<NEW_LINE>String errMsg = "Cannot enable the job until " + OPERATION_FORBIDDEN_INTERVAL_A... | FORBIDDEN.value(), errMsg); |
162,503 | protected void serializeUnion(GenerationContext context, UnionShape shape) {<NEW_LINE>GoWriter writer = context.getWriter().get();<NEW_LINE>SymbolProvider symbolProvider = context.getSymbolProvider();<NEW_LINE>Symbol symbol = symbolProvider.toSymbol(shape);<NEW_LINE>writer.addUseImports(SmithyGoDependency.FMT);<NEW_LIN... | "av := object.Key($S)", member.getMemberName()); |
1,565,635 | private void generateHalideLibraryTarget(ImmutableXCodeNativeTargetAttributes.Builder xcodeNativeTargetAttributesBuilder, ImmutableSet.Builder<Path> xcconfigPathsBuilder, ImmutableSet.Builder<String> targetConfigNamesBuilder, TargetNode<HalideLibraryDescriptionArg> targetNode) throws IOException {<NEW_LINE><MASK><NEW_L... | BuildTarget buildTarget = targetNode.getBuildTarget(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.