idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,540,694 | public void recordHandlingException(ReferenceBinding exceptionType, UnconditionalFlowInfo flowInfo, TypeBinding raisedException, TypeBinding caughtException, ASTNode invocationSite, boolean wasMasked) {<NEW_LINE>// even if unreachable code, need to perform unhandled exception diagnosis<NEW_LINE>int size = this.thrownEx... | 2]), 0, size); |
318,522 | public static void initCalendarsPreference(Context context, ListPreference listPreference) {<NEW_LINE>Resources r = context.getResources();<NEW_LINE>CalendarResult calendars = getCalendars();<NEW_LINE>// Fetch the current setting. Invalid calendar id will<NEW_LINE>// be changed to default value.<NEW_LINE>String current... | getStringValue(R.string.gcal_p_default); |
1,641,534 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static com.sun.jdi.ShortValue mirrorOf(com.sun.jdi.VirtualMachine a, short b) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modu... | [] { a, b }); |
427,494 | public synchronized TreeLogger loadModule(BrowserChannelServer channel, String moduleName, String userAgent, String url, String tabKey, String sessionKey, byte[] userAgentIcon) {<NEW_LINE>Event moduleInit = SpeedTracerLogger.start(channel.getDevModeSession(), <MASK><NEW_LINE>ModuleHandle moduleHandle = host.createModul... | DevModeEventType.MODULE_INIT, "Module Name", moduleName); |
797,069 | public SetupClusterOperator runInstallation() {<NEW_LINE>LOGGER.info("Cluster operator installation configuration:\n{}", this::prettyPrint);<NEW_LINE>LOGGER.<MASK><NEW_LINE>// if it's shared context (before suite) skip<NEW_LINE>if (BeforeAllOnce.getSharedExtensionContext() != extensionContext) {<NEW_LINE>testClassName ... | debug("Cluster operator installation configuration:\n{}", this::toString); |
718,591 | public void onBindViewHolder(final ViewHolder holder, int position) {<NEW_LINE>holder.mItem = mValues.get(position);<NEW_LINE>holder.title.setText(FileUtils.nameWithoutExtension(mValues.get(position).getName()));<NEW_LINE>holder.title.setOnClickListener(v -> itemClickListener.onItemClick(holder.mItem));<NEW_LINE>holder... | View.VISIBLE : View.GONE); |
1,541,600 | private void printBuffer(Buffer buffer) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(ANSI_MAGENTA);<NEW_LINE>if (buffer instanceof ByteBuffer) {<NEW_LINE>sb.append("byte");<NEW_LINE>} else if (buffer instanceof ShortBuffer) {<NEW_LINE>sb.append("short");<NEW_LINE>} else if (buffer instanceof Ch... | append(buffer.limit()); |
1,604,898 | public final ET compile(final ExpressionContext context, final String expressionStr) {<NEW_LINE>// Check if it's an empty expression<NEW_LINE>// NOTE: we are preserving all whitespaces from expressions, so that's why we are not trimming the string<NEW_LINE>if (expressionStr == null || expressionStr.isEmpty()) {<NEW_LIN... | createSingleParamaterExpression(context, expressionStr, parameter); |
1,204,072 | static List<ServiceTokenInfo> parseFileToken(XContentParser parser) throws IOException {<NEW_LINE>ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.nextToken(), parser);<NEW_LINE>XContentParser.Token token;<NEW_LINE>final ArrayList<ServiceTokenInfo> fileTokenInfos = new ArrayList<>();<NEW_LINE>while ((token... | Token.FIELD_NAME, token, parser); |
959,479 | public AuthenticationResult loginWithUserName(HttpServletRequest req, HttpServletResponse res, String userName, Subject subj, Hashtable<String, Object> customProperties, boolean mapIdentityToRegistryUser) {<NEW_LINE>Subject tempSubject = subj;<NEW_LINE>if (tempSubject == null)<NEW_LINE>tempSubject = new Subject();<NEW_... | AuthenticationResult(AuthResult.SUCCESS, subject); |
719,302 | private void deleteContainerAccountStats(Map<Long, Map<Short, Map<Short, ContainerStorageStats>>> prevPartitionMap, Map<Long, Map<Short, Map<Short, ContainerStorageStats>>> currPartitionMap) throws SQLException {<NEW_LINE>long deleteStartTimeMs = System.currentTimeMillis();<NEW_LINE>int deleteStatementCounter = 0;<NEW_... | > prevContainerMap = prevAccountMapEntry.getValue(); |
1,818,794 | public void onHandleIntent(Intent intent) {<NEW_LINE><MASK><NEW_LINE>Context context = getApplicationContext();<NEW_LINE>AppSettings settings = AppSettings.getInstance(context);<NEW_LINE>// if they have mobile data on and don't want to sync over mobile data<NEW_LINE>if (Utils.getConnectionStatus(context) && !settings.s... | sharedPrefs = getSharedPreferences("com.klinker.android.twitter_world_preferences", 0); |
1,300,984 | public void execute() throws Exception {<NEW_LINE>String tableName = getTableName(DEFAULT_BOOTSTRAP_DIRECTORY);<NEW_LINE>File quickstartTmpDir = new File(_dataDir, String.valueOf(System.currentTimeMillis()));<NEW_LINE>File baseDir = new File(quickstartTmpDir, tableName);<NEW_LINE>File dataDir = new File(baseDir, "rawda... | printStatus(Color.GREEN, "***** Shutting down offline quick start *****"); |
650,369 | private void buildExtensionData(StatusInfo status) {<NEW_LINE>StatusExtensionRegister res = StatusExtensionRegister.getInstance();<NEW_LINE>List<StatusExtension<MASK><NEW_LINE>int length = extensions.size();<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>StatusExtension extension = extensions.get(i);<NEW_LINE>Str... | > extensions = res.getStatusExtension(); |
559,478 | // TManagerLocationRefreshMessage handler<NEW_LINE>private void handleTManagerLocationRefreshMessage(Metrics.MetricPublisher request, Metrics.TManagerLocationRefreshMessage tManagerLocationRefreshMessage) {<NEW_LINE>TopologyManager.TManagerLocation oldLocation = (TopologyManager.TManagerLocation) SingletonRegistry.INST... | scope(SERVER_NEW_TMANAGER_LOCATION).incr(); |
672,905 | private void addSlaMonitorTasks(TaskControl lockedTask, String type, Config taskConfig) {<NEW_LINE>// TODO: validate sla configuration parameters ahead of time instead of potentially failing at runtime<NEW_LINE>// Send an alert?<NEW_LINE>boolean alert = true;<NEW_LINE>try {<NEW_LINE>alert = taskConfig.get("alert", bool... | config.set("_type", "notify"); |
1,600,194 | @Record(value = ExecutionTime.RUNTIME_INIT)<NEW_LINE>CoreVertxBuildItem build(VertxCoreRecorder recorder, LaunchModeBuildItem launchMode, ShutdownContextBuildItem shutdown, VertxConfiguration config, List<VertxOptionsConsumerBuildItem> vertxOptionsConsumers, BuildProducer<SyntheticBeanBuildItem> syntheticBeans, BuildPr... | add(x.getConsumer()); |
1,033,422 | public static void multTranC(DMatrixRMaj A, DMatrixRMaj B, DMatrixRMaj C, DMatrixRMaj output) {<NEW_LINE>double t11 = A.data[0] * B.data[0] + A.data[1] * B.data[3] + A.data[2<MASK><NEW_LINE>double t12 = A.data[0] * B.data[1] + A.data[1] * B.data[4] + A.data[2] * B.data[7];<NEW_LINE>double t13 = A.data[0] * B.data[2] + ... | ] * B.data[6]; |
1,765,422 | final DBClusterSnapshot executeDeleteDBClusterSnapshot(DeleteDBClusterSnapshotRequest deleteDBClusterSnapshotRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDBClusterSnapshotRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>aw... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
74,791 | public static <R> R callInstanceMethod(final Object instance, final String methodName, ClassParameter<?>... classParameters) {<NEW_LINE>perfStatsCollector.incrementCount(String.format("ReflectionHelpers.callInstanceMethod-%s_%s", instance.getClass()<MASK><NEW_LINE>try {<NEW_LINE>final Class<?>[] classes = ClassParamete... | .getName(), methodName)); |
491,665 | private void filePathChanged(@Nonnull final String oldPath, @Nonnull final String newPath) {<NEW_LINE>final Collection<Artifact> artifacts = myParentPathsToArtifacts.getValue().get(oldPath);<NEW_LINE>if (artifacts != null) {<NEW_LINE>final ModifiableArtifactModel model = myArtifactManager.createModifiableModel();<NEW_L... | myArtifactManager.getResolvingContext(), false); |
387,311 | public DescribeVpnConnectionsResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeVpnConnectionsResult describeVpnConnectionsResult = new DescribeVpnConnectionsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (c... | XMLEvent xmlEvent = context.nextEvent(); |
1,183,930 | // snippet-start:[dynamodb.java2.list_tables.main]<NEW_LINE>public static void listAllTables(DynamoDbClient ddb) {<NEW_LINE>boolean moreTables = true;<NEW_LINE>String lastName = null;<NEW_LINE>while (moreTables) {<NEW_LINE>try {<NEW_LINE>ListTablesResponse response = null;<NEW_LINE>if (lastName == null) {<NEW_LINE>List... | println(e.getMessage()); |
138,435 | public void run() {<NEW_LINE>if (libraries == null || libraries.contains("javaxjson")) {<NEW_LINE>JsonUtils.printJavaxJsonProvider();<NEW_LINE>}<NEW_LINE>ChainedOptionsBuilder b = new OptionsBuilder().forks(forks).warmupIterations(warmupIterations).measurementIterations(measurementIterations).measurementTime(new TimeVa... | Runner(opt).run(); |
1,233,269 | public List<Object[]> showEngine(MySqlShowEnginesStatement statement) {<NEW_LINE>ArrayList<List<Object>> objects = new ArrayList<>();<NEW_LINE>objects.add(Arrays.asList("InnoDB", "DEFAULT", "Supports transactions, row-level locking, foreign keys and encryption for tables"));<NEW_LINE>objects.add(Arrays.asList("CSV", "Y... | ("PERFORMANCE_SCHEMA", "YES", "Performance Schema")); |
214,311 | private boolean isRouteCloseToGpxPoints(GpxRouteApproximation gctx, List<GpxPoint> gpxPoints, GpxPoint start, GpxPoint next) {<NEW_LINE>boolean routeIsClose = true;<NEW_LINE>for (RouteSegmentResult r : start.routeToTarget) {<NEW_LINE><MASK><NEW_LINE>int end = r.getEndPointIndex();<NEW_LINE>while (st != end) {<NEW_LINE>... | int st = r.getStartPointIndex(); |
1,292,130 | public void marshall(VoiceTemplateResponse voiceTemplateResponse, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (voiceTemplateResponse == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(voiceTemplateResponse... | voiceTemplateResponse.getDefaultSubstitutions(), DEFAULTSUBSTITUTIONS_BINDING); |
1,484,255 | private static void tableExistsCheck(List<ErrorInfo> list, ServerConfig serverConfig, boolean isLowerCase, Map<String, Set<String>> schemaMap) {<NEW_LINE>// get All the exists table from all shardingNode<NEW_LINE>TraceManager.TraceObject traceObject = TraceManager.threadTrace("table-exists-check");<NEW_LINE>try {<NEW_L... | sb.length() - 1); |
988,796 | public static AnyValue multiply(AnyValue lhs, AnyValue rhs) {<NEW_LINE>assert lhs != NO_VALUE && rhs != NO_VALUE : "NO_VALUE checks need to happen outside this call";<NEW_LINE>if (lhs instanceof NumberValue && rhs instanceof NumberValue) {<NEW_LINE>try {<NEW_LINE>return ((NumberValue) lhs).times((NumberValue) rhs);<NEW... | e.getMessage(), e); |
122,011 | private void init() {<NEW_LINE>// WARNING: called from ctor so must not be overridden (i.e. must be private or final)<NEW_LINE>setLayout(new BorderLayout(0, 5));<NEW_LINE>setBorder(makeBorder());<NEW_LINE>// URL CONFIG<NEW_LINE>urlConfigGui = new UrlConfigGui(false, true, false);<NEW_LINE>// HTTP request options<NEW_LI... | .getResString("web_testing_advanced"), advancedPanel); |
119,998 | protected RelDataType deriveRowType() {<NEW_LINE>final RelDataTypeFactory typeFactory = getCluster().getTypeFactory();<NEW_LINE>List<RelDataTypeFieldImpl> columns = new LinkedList<>();<NEW_LINE>columns.add(new RelDataTypeFieldImpl("BASELINE_ID", 0, typeFactory.createSqlType(SqlTypeName.BIGINT)));<NEW_LINE>columns.add(n... | createSqlType(SqlTypeName.BIGINT))); |
8,161 | public EbicsCertificate updateCertificate(X509Certificate certificate, EbicsCertificate cert, boolean cleanPrivateKey) throws CertificateEncodingException, IOException {<NEW_LINE>String sha = DigestUtils.sha256Hex(certificate.getEncoded());<NEW_LINE>log.debug("sha256 HEX : {}", sha);<NEW_LINE>log.debug("certificat : {}... | getIssuerDN().getName()); |
35,421 | private List<SceneCollection> updateSceneGroupChannels() throws HubInvalidResponseException, HubProcessingException, HubMaintenanceException {<NEW_LINE>List<SceneCollection> sceneCollections = fetchSceneCollections();<NEW_LINE>if (sceneCollections.size() == sceneCollectionCache.size() && sceneCollectionCache.containsAl... | (sceneCollections).withChannels(allChannels); |
379,289 | public static void horizontal11(Kernel1D_F32 kernel, GrayF32 image, GrayF32 dest) {<NEW_LINE>final float[] dataSrc = image.data;<NEW_LINE>final float[] dataDst = dest.data;<NEW_LINE>final float k1 = kernel.data[0];<NEW_LINE>final float k2 = kernel.data[1];<NEW_LINE>final float k3 = kernel.data[2];<NEW_LINE>final float ... | k6 = kernel.data[5]; |
794,134 | void decodeMonoData(int x, int y, int w, int h, byte[] src, int[] palette) {<NEW_LINE>int dx, dy, n;<NEW_LINE>int i = bitmapData.offset(x, y);<NEW_LINE>int[] pixels = bitmapData.bitmapPixels;<NEW_LINE>int rowBytes = (w + 7) / 8;<NEW_LINE>byte b;<NEW_LINE>for (dy = 0; dy < h; dy++) {<NEW_LINE>for (dx = 0; dx < w / 8; dx... | src[dy * rowBytes + dx]; |
1,641,035 | public static void main(String[] args) {<NEW_LINE>SwingUtilities.invokeLater(() -> {<NEW_LINE>try {<NEW_LINE>JFrame dialog = new JFrame();<NEW_LINE>dialog.setSize(100, 100);<NEW_LINE>dialog.setLocationRelativeTo(null);<NEW_LINE>dialog.setVisible(true);<NEW_LINE>JButton button = new JButton("Shake");<NEW_LINE>ImageIcon ... | ImageIcon(new URL("https://cdn.betterttv.net/emote/58487cc6f52be01a7ee5f205/1x")); |
432,103 | public List<B2UploadPartResponse> list(final String fileid) throws BackgroundException {<NEW_LINE>if (log.isInfoEnabled()) {<NEW_LINE>log.info(String.format("List completed parts of file %s", fileid));<NEW_LINE>}<NEW_LINE>// This operation lists the parts that have been uploaded for a specific multipart upload.<NEW_LIN... | listParts(fileid, startPartNumber, null); |
302,322 | private SendResponse sendRequest(final PrivateTransaction privateTransaction, final String privacyUserId, final Optional<PrivacyGroup> maybePrivacyGroup) {<NEW_LINE>final BytesValueRLPOutput rlpOutput = new BytesValueRLPOutput();<NEW_LINE>if (maybePrivacyGroup.isPresent()) {<NEW_LINE>final PrivacyGroup privacyGroup = m... | PrivacyGroup.Type.PANTHEON + "was expected."); |
1,555,630 | final DeleteTableResult executeDeleteTable(DeleteTableRequest deleteTableRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTableRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | false), new DeleteTableResultJsonUnmarshaller()); |
1,660,150 | public void applyEffects(OpenEndedPipe pipe, FluidStack fluid) {<NEW_LINE>if (pipe.cachedFluid == null || pipe.cachedEffects == null || !fluid.isFluidEqual(pipe.cachedFluid)) {<NEW_LINE>FluidStack copy = fluid.copy();<NEW_LINE>copy.setAmount(250);<NEW_LINE>ItemStack bottle = PotionFluidHandler.fillBottle(new ItemStack<... | (Items.GLASS_BOTTLE), fluid); |
1,476,988 | public void drawConnection(int[] xPoints, int[] yPoints, String connectionType, double scaleFactor) {<NEW_LINE>Paint originalPaint = g.getPaint();<NEW_LINE><MASK><NEW_LINE>g.setPaint(CONNECTION_COLOR);<NEW_LINE>for (int i = 1; i < xPoints.length; i++) {<NEW_LINE>int sourceX = xPoints[i - 1];<NEW_LINE>int sourceY = yPoi... | Stroke originalStroke = g.getStroke(); |
647,328 | public void processFlowElements(Collection<FlowElement> flowElements) {<NEW_LINE>// Parsing the elements is done in a strict order of types,<NEW_LINE>// as otherwise certain information might not be available when parsing<NEW_LINE>// a certain type.<NEW_LINE>// Using lists as we want to keep the order in which they are... | sequenceFlowToParse = new ArrayList<>(); |
511,616 | private void typecheckDataHeader(DataDefinition dataDefinition, Concrete.DataDefinition def, LocalInstancePool localInstancePool) {<NEW_LINE>def.getData().setTypecheckedIfNotCancelled(dataDefinition);<NEW_LINE>if (def.enclosingClass != null) {<NEW_LINE>dataDefinition.setHasEnclosingClass(true);<NEW_LINE>}<NEW_LINE>if (... | .setLevelParameters(typecheckLevelParameters(def)); |
1,167,582 | public PyObject __call__(PyObject[] args, String[] kwds) {<NEW_LINE>if (args.length == 0) {<NEW_LINE>throw Py.TypeError("sorted() takes at least 1 argument (0 given)");<NEW_LINE>} else if (args.length > 4) {<NEW_LINE>throw Py.TypeError(String.format("sorted() takes at most 4 arguments (%s given)", args.length));<NEW_LI... | getPyObject(2, Py.None); |
178,984 | protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final I... | environment, instruction, instructions, shifter); |
1,776,668 | public Component createComponent(Style[] style, ComponentType type, ArrowConfiguration config, ISkinParam param, Display stringsToDisplay) {<NEW_LINE>if (type == ComponentType.ACTOR_HEAD || type == ComponentType.ACTOR_TAIL) {<NEW_LINE>return new ComponentTextActor(type, stringsToDisplay, fileFormat, fileFormat == FileF... | ComponentTextGroupingHeader(type, stringsToDisplay, fileFormat); |
720,452 | protected void addTransportLayers(Event event, TransportInternal transport) {<NEW_LINE>// default connection idle timeout is 0.<NEW_LINE>// Giving it an idle timeout will enable the client side to know broken connection faster.<NEW_LINE>// Refer to http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-o... | ), defaultSslContext.getProtocol()); |
1,516,991 | protected NaiveBayesModelData deserializeModel(Params meta, Iterable<String> stringData, Iterable<Object> distinctLabels) {<NEW_LINE>int <MASK><NEW_LINE>NaiveBayesModelData modelData = new NaiveBayesModelData();<NEW_LINE>modelData.stringIndexerModelSerialized = new ArrayList<>(stringIndexerModelSize);<NEW_LINE>int coun... | stringIndexerModelSize = meta.get(STRING_INDEXER_MODEL_SIZE); |
498,564 | final DescribeRouteTablesResult executeDescribeRouteTables(DescribeRouteTablesRequest describeRouteTablesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeRouteTablesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,257,573 | private static void createShortcutPostOreo(Context context, Note note, String shortcutTitle) {<NEW_LINE>ShortcutManager shortcutManager = <MASK><NEW_LINE>if (shortcutManager.isRequestPinShortcutSupported()) {<NEW_LINE>Uri uri = new Uri.Builder().scheme("app").authority(context.getString(R.string.app_package)).appendQue... | context.getSystemService(ShortcutManager.class); |
107,279 | private <T extends NfsPrimaryStorageAgentResponse> void asyncHttpCall(String path, final String hostUuid, NfsPrimaryStorageAgentCommand cmd, boolean noCheckStatus, final Class<T> rspType, PrimaryStorageInventory inv, final ReturnValueCompletion<T> completion) {<NEW_LINE>cmd.setUuid(inv.getUuid());<NEW_LINE>KVMHostAsync... | KVMHostAsyncHttpCallReply r = reply.castReply(); |
521,786 | public void execute() {<NEW_LINE>final int[] idxs = new int[myLists.size()];<NEW_LINE>for (int i = 0; i < myLists.size(); i++) {<NEW_LINE>final ReadonlyList<T> member = myLists.get(i);<NEW_LINE>idxs[i] = member.getSize() == 0 ? -1 : 0;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>CompoundNumber minIdxs = null;<NEW_LINE>... | int memberIdx = minIdxs.getMemberNumber(); |
520,810 | private void checkJsEnum(Type type) {<NEW_LINE>JsEnumInfo jsEnumInfo = type.getTypeDescriptor().getJsEnumInfo();<NEW_LINE>if (!type.isEnum()) {<NEW_LINE>problems.error(type.getSourcePosition(), "JsEnum '%s' has to be an enum type.", type.getReadableDescription());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (type.getDeclar... | "Non-custom-valued JsEnum '%s' cannot have a field named 'value'.", type.getReadableDescription()); |
1,745,076 | private static void writePidFile() throws IOException {<NEW_LINE>if (CoreGlobalProperty.UNIT_TEST_ON) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>File pidFile = new File(CoreGlobalProperty.PID_FILE_PATH);<NEW_LINE>if (pidFile.exists()) {<NEW_LINE>String pidStr = FileUtils.readFileToString(pidFile);<NEW_LINE>try {<NEW_LINE>l... | ("stale pid file[%s], ignore it", CoreGlobalProperty.PID_FILE_PATH)); |
1,491,149 | private void loadAdapter() {<NEW_LINE>WorldEdit worldEdit = WorldEdit.getInstance();<NEW_LINE>// Attempt to load a Bukkit adapter<NEW_LINE>BukkitImplLoader adapterLoader = new BukkitImplLoader();<NEW_LINE>try {<NEW_LINE>adapterLoader.addFromPath(getClass().getClassLoader());<NEW_LINE>} catch (IOException e) {<NEW_LINE>... | adapterLoader.addFromJar(getFile()); |
1,459,157 | public Response serve(IHTTPSession session) {<NEW_LINE>Map<String, List<String>> decodedQueryParameters = decodeParameters(session.getQueryParameterString());<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<html>");<NEW_LINE>sb.append("<head><title>Debug Server</title></head>");<NEW_LINE>sb.append... | files)).append("</blockquote></p>"); |
151,614 | private static List<Property> projectProperties(TypeDef typeDef) {<NEW_LINE>final String fqn = typeDef.getFullyQualifiedName();<NEW_LINE>return Stream.concat(typeDef.getProperties().stream().filter(p -> {<NEW_LINE>// enums have self-referential static properties for each enum case so we cannot ignore them<NEW_LINE>if (... | TypeRef typeRef = p.getTypeRef(); |
492,099 | private void sync() {<NEW_LINE>inSync = true;<NEW_LINE>doNotSync = true;<NEW_LINE>try {<NEW_LINE>ConfigVersion configVersion = PolicyModelHelper.getConfigVersion(binding);<NEW_LINE>cfgVersionCombo.setSelectedItem(configVersion);<NEW_LINE>boolean addrEnabled = AddressingModelHelper.isAddressingEnabled(binding);<NEW_LINE... | fiEnabled = TransportModelHelper.isFIEnabled(binding); |
1,093,443 | public DataSetSchema unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DataSetSchema dataSetSchema = new DataSetSchema();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCu... | int originalDepth = context.getCurrentDepth(); |
399,884 | final SearchSystemInstancesResult executeSearchSystemInstances(SearchSystemInstancesRequest searchSystemInstancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(searchSystemInstancesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | invoke(request, responseHandler, executionContext); |
674,748 | private void createColumns() {<NEW_LINE>for (DiskColumnEnum column : DiskColumnEnum.values()) {<NEW_LINE>TableViewerColumn c = createTableViewerColumn(column.getTitle(), column.getWidth(), column.getAlignment(), column.isResizable(), column.isMoveable(), column.isNumber());<NEW_LINE>ColumnLabelProvider labelProvider = ... | ((NetStatData) element).status; |
834,480 | private void uploadPart(final InputStream content, final long contentLength, final byte[] checksum, final int partNumber, final boolean lastPart) throws IOException {<NEW_LINE>if (aborted)<NEW_LINE>return;<NEW_LINE>final UploadPartRequest request = new UploadPartRequest();<NEW_LINE>request.setBucketName(objectId.getBuc... | (Base64.encodeAsString(checksum)); |
685,995 | protected GocodeServerInstance doCreateServerInstance(IOperationMonitor om) throws CommonException, OperationCancellation {<NEW_LINE>Path gocodePath = getServerPath();<NEW_LINE>ArrayList2<String> commandLine = new ArrayList2<String>();<NEW_LINE>commandLine.<MASK><NEW_LINE>commandLine.add("-s");<NEW_LINE>if (GocodeCompl... | add(gocodePath.toString()); |
1,047,418 | public CoreNLPProtos.Section toProtoSection(CoreMap section) {<NEW_LINE>CoreNLPProtos.Section.Builder builder = CoreNLPProtos.Section.newBuilder();<NEW_LINE>// Set char start<NEW_LINE>builder.setCharBegin(section.get(CharacterOffsetBeginAnnotation.class));<NEW_LINE>// Set char end<NEW_LINE>builder.setCharEnd(section.ge... | .get(AuthorAnnotation.class)); |
1,850,036 | public static DescribeOssObjectsResponse unmarshall(DescribeOssObjectsResponse describeOssObjectsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeOssObjectsResponse.setRequestId(_ctx.stringValue("DescribeOssObjectsResponse.RequestId"));<NEW_LINE>describeOssObjectsResponse.setPageSize(_ctx.integerValue("DescribeOs... | + "].RuleList[" + j + "].Count")); |
1,427,909 | public void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm) {<NEW_LINE>final int memAccessSize = accessKind.getSizeInBytes() * Byte.SIZE;<NEW_LINE>Register address = asRegister(addressValue);<NEW_LINE>Register result = asRegister(resultValue);<NEW_LINE>moveSPAndEmitCode(masm, asRegister(newValue), va... | scratch, value, address, true); |
1,723,461 | ScanResult scanNextPageOfSegment(int currentSegment, boolean checkLastEvaluatedKey) {<NEW_LINE>final ScanRequest segmentScanRequest = parallelScanRequests.get(currentSegment);<NEW_LINE>if (checkLastEvaluatedKey) {<NEW_LINE>final ScanResult lastScanResult = segmentScanResults.get(currentSegment);<NEW_LINE>segmentScanReq... | set(currentSegment, SegmentScanState.HasNextPage); |
820,884 | public static List<String> doExportFileDiff(File repository, File file, String revStr, String outputFileName, OutputLogger logger) throws HgException {<NEW_LINE>// Ensure that parent directory of target exists, creating if necessary<NEW_LINE>File fileTarget = new File(outputFileName);<NEW_LINE>File parentTarget = fileT... | String> list = exec(command); |
437,214 | private void rebuildBlockSelection(String searchText) {<NEW_LINE>blockSelection.clear();<NEW_LINE>blocksOut.clear();<NEW_LINE>blocksOut.addAll(Vars.content.blocks());<NEW_LINE>blocksOut.sort((b1, b2) -> {<NEW_LINE>int core = -Boolean.compare(b1 instanceof CoreBlock, b2 instanceof CoreBlock);<NEW_LINE>if (core != 0)<NEW... | Tex.whiteui, Styles.clearTogglei); |
394,222 | public void load(final String name, final OType[] keyTypes, final boolean nullKeyIsSupported, final OEncryption encryption, final OHashFunction<K> keyHashFunction, final OBinarySerializer<K> keySerializer, final OBinarySerializer<V> valueSerializer) {<NEW_LINE>acquireExclusiveLock();<NEW_LINE>try {<NEW_LINE>this.keyHas... | openFile(atomicOperation, getFullName()); |
172,301 | private boolean checkDeadNodes(final Configuration conf, final long monotonicNowMs, final boolean stepDownOnCheckFail) {<NEW_LINE>// Check learner replicators at first.<NEW_LINE>for (final PeerId peer : conf.getLearners()) {<NEW_LINE>checkReplicator(peer);<NEW_LINE>}<NEW_LINE>// Ensure quorum nodes alive.<NEW_LINE>fina... | this.currTerm, deadNodes, conf); |
527,534 | protected String doIt() throws Exception {<NEW_LINE>final List<IReferenceNoGeneratorInstance> generatorInstancesAll = Services.get(IReferenceNoBL.class).getReferenceNoGeneratorInstances(getCtx());<NEW_LINE>final Map<Integer, List<IReferenceNoGeneratorInstance<MASK><NEW_LINE>for (final Integer adTableId : tableId2Genera... | >> tableId2GeneratorInstances = groupByTableId(generatorInstancesAll); |
1,181,317 | protected void updateOKStatus() {<NEW_LINE>IStatus status = null;<NEW_LINE>if (selectRemoteButton.getSelection()) {<NEW_LINE>ISelection selection = tv.getSelection();<NEW_LINE>if (selection != null && !selection.isEmpty() && manualEurekaURL.getText() != null && manualEurekaURL.getText().length() > 0) {<NEW_LINE>status ... | URL url = new URL(manualURL); |
1,591,471 | private static int readSimpleHuffmanCode(int alphabetSizeMax, int alphabetSizeLimit, int[] tableGroup, int tableIdx, State s) {<NEW_LINE>// TODO(eustas): Avoid allocation?<NEW_LINE>int[] codeLengths = new int[alphabetSizeLimit];<NEW_LINE>int[] symbols = new int[4];<NEW_LINE>int maxBits = 1 + log2floor(alphabetSizeMax -... | [symbols[3]] = 3; |
475,776 | private InputStream scale(InputStream inputStream, int maxWidth, int maxHeight) throws IOException {<NEW_LINE>final BufferedImage srcBufferedImage = ImageIO.read(inputStream);<NEW_LINE>final int srcWidth = srcBufferedImage.getWidth();<NEW_LINE>final int srcHeight = srcBufferedImage.getHeight();<NEW_LINE>final float sca... | (int) (srcWidth * scale); |
791,366 | public long select(final long j) throws IllegalArgumentException {<NEW_LINE>if (!doCacheCardinalities) {<NEW_LINE>return selectNoCache(j);<NEW_LINE>}<NEW_LINE>// Ensure all cumulatives as we we have straightforward way to know in advance the high of the<NEW_LINE>// j-th value<NEW_LINE>int indexOk = ensureCumulatives(hi... | previousBucketCardinality = sortedCumulatedCardinality[insertionPoint - 1]; |
1,084,697 | public OutputStream createOutputStream(COSBase filters) throws IOException {<NEW_LINE>checkClosed();<NEW_LINE>if (isWriting) {<NEW_LINE>throw new IllegalStateException("Cannot have more than one open stream writer.");<NEW_LINE>}<NEW_LINE>// apply filters, if any<NEW_LINE>if (filters != null) {<NEW_LINE>setItem(COSName.... | int) randomAccess.length()); |
815,234 | private boolean selectVictim(int bucketStart) {<NEW_LINE>byte victimOffset = (byte) rnd.nextInt(itemsPerSet);<NEW_LINE>int victimChain = indexing.getChainAtOffset(hashFunc.fpaux, chainIndex, lastIndex, victimOffset);<NEW_LINE>long victim = cache[bucketStart + victimOffset];<NEW_LINE>// this if is still for debugging an... | byte) victimChain, bucketStart, victimOffset); |
557,240 | public PartitionSpec apply() {<NEW_LINE>PartitionSpec.Builder builder = PartitionSpec.builderFor(schema);<NEW_LINE>for (PartitionField field : spec.fields()) {<NEW_LINE>if (!deletes.contains(field.fieldId())) {<NEW_LINE>String newName = renames.get(field.name());<NEW_LINE>if (newName != null) {<NEW_LINE>builder.add(fie... | ), field.transform()); |
77,884 | public Request<DescribePlacementGroupsRequest> marshall(DescribePlacementGroupsRequest describePlacementGroupsRequest) {<NEW_LINE>if (describePlacementGroupsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribePlacementGroupsRequest... | (filterMember.getName())); |
1,621,065 | private boolean buildDefaultActivator(Path bindir, String activatorClassName, Writer writer) throws IOException {<NEW_LINE>Path activatorSourceFileName = bindir.resolve(activatorClassName + ".java");<NEW_LINE>try (PrintWriter activatorWriter = new PrintWriter(Files.newBufferedWriter(activatorSourceFileName, Charset.for... | getStandardFileManager(null, null, null); |
1,125,896 | final GetParametersResult executeGetParameters(GetParametersRequest getParametersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getParametersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
912,937 | private synchronized void verifyHost(PublicKey key) throws TransportException {<NEW_LINE>for (HostKeyVerifier hkv : hostVerifiers) {<NEW_LINE>log.debug("Trying to verify host key with {}", hkv);<NEW_LINE>if (hkv.verify(transport.getRemoteHost(), transport.getRemotePort(), key))<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>log.... | "` on port " + transport.getRemotePort()); |
357,702 | private void rpcNativeVerify(Cursor cursor, int mtime) {<NEW_LINE>if (cursor == null) {<NEW_LINE>// starting a new scan -> read stored mtime from preferences<NEW_LINE>mtime = MediaLibrary.getPreferences(mContext)._nativeLastMtime;<NEW_LINE>String selection = MediaStore.Audio.Media.IS_MUSIC + "!= 0 AND " + MediaStore.Me... | path = cursor.getString(0); |
916,093 | protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY) {<NEW_LINE>GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);<NEW_LINE>bindGuiTexture();<NEW_LINE>int sx = (width - xSize) / 2;<NEW_LINE>int sy = (height - ySize) / 2;<NEW_LINE>drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize... | drawScreen(mouseX, mouseY, partialTick); |
1,071,683 | final DeleteCustomRoutingEndpointGroupResult executeDeleteCustomRoutingEndpointGroup(DeleteCustomRoutingEndpointGroupRequest deleteCustomRoutingEndpointGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteCustomRoutingEndpointGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
699,499 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>Logger.logDebug(LOG_TAG, "onCreate");<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_termux_api);<NEW_LINE>// Set NightMode.APP_NIGHT_MODE<NEW_LINE>TermuxThemeUtils.setAppNightMode(this);<NEW_LINE>AppCompatActivityUtil... | toolbar, TermuxConstants.TERMUX_API_APP_NAME, 0); |
1,112,184 | private static String buildErrorMessage(String stage, Throwable e) {<NEW_LINE>StringBuilder errorMessage = new StringBuilder("{").append(Version.CURRENT).append("}: ");<NEW_LINE>errorMessage.append<MASK><NEW_LINE>if (e instanceof CreationException) {<NEW_LINE>CreationException createException = (CreationException) e;<N... | (stage).append(" Failed ...\n"); |
335,535 | public static DescribeACLAttributeResponse unmarshall(DescribeACLAttributeResponse describeACLAttributeResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeACLAttributeResponse.setRequestId(_ctx.stringValue("DescribeACLAttributeResponse.RequestId"));<NEW_LINE>describeACLAttributeResponse.setTotalCount(_ctx.integerVal... | ("DescribeACLAttributeResponse.Acrs[" + i + "].Description")); |
1,141,345 | public static void horizontal11(Kernel1D_S32 kernel, GrayS16 input, GrayI16 output, int skip, int divisor) {<NEW_LINE>final short[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<... | dataSrc[indexSrc++]) * k10; |
1,103,275 | protected Optional<ActiveSession> performHandshake(Tracer tracer, X additionalData, URL url, Set<Dialect> downstreamDialects, Capabilities capabilities) {<NEW_LINE>try {<NEW_LINE>HttpClient client = HttpClient.Factory.createDefault().createClient(url);<NEW_LINE>Command command = new Command(null, DriverCommand.NEW_SESS... | = new ReverseProxyHandler(tracer, client); |
492,165 | public OAuthClient requestOAuthClient(String clientId, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'clientId' is set<NEW_LINE>if (clientId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'clientId' when ca... | (clientId.toString())); |
428,922 | public CurrencyAmount recovery01(ResolvedCds cds, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData) {<NEW_LINE>if (isExpired(cds, ratesProvider)) {<NEW_LINE>return CurrencyAmount.of(cds.getCurrency(), 0d);<NEW_LINE>}<NEW_LINE>LocalDate stepinDate = cds.getStepinDateOffset().adjust(<MASK... | ratesProvider.getValuationDate(), refData); |
1,478,493 | public Object calculate(Context ctx) {<NEW_LINE>IParam param = this.param;<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("cor" + mm.getMessage("function.missingParam"));<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>Object obj = param.getLeafExpression()... | + mm.getMessage("function.invalidParam")); |
93,704 | public PrefixAdjustResult adjustByPrefix(String prefix, int hour, int min, boolean hasMin) {<NEW_LINE>int deltaMin;<NEW_LINE>String trimmedPrefix = prefix.trim().toLowerCase();<NEW_LINE>if (checkMatch(halfTokenRegex, trimmedPrefix)) {<NEW_LINE>deltaMin = -30;<NEW_LINE>} else if (checkMatch(quarterToTokenRegex, trimmedP... | numbers.getOrDefault(minStr, 0); |
22,871 | private void handleProviderRemoved(ProtocolProviderService provider) {<NEW_LINE>OperationSetBasicInstantMessaging opSetIm = <MASK><NEW_LINE>if (opSetIm != null) {<NEW_LINE>opSetIm.removeMessageListener(this);<NEW_LINE>}<NEW_LINE>OperationSetSmsMessaging opSetSms = provider.getOperationSet(OperationSetSmsMessaging.class... | provider.getOperationSet(OperationSetBasicInstantMessaging.class); |
1,610,817 | public void run(RegressionEnvironment env) {<NEW_LINE>// prepare<NEW_LINE>RegressionPath path = preloadData(env, false);<NEW_LINE>// test join<NEW_LINE>String eplJoin = "@name('s0') select * from SupportBean_S0 as s0 unidirectional, AWindow(p00='x') as aw where aw.id = s0.id";<NEW_LINE>env.compileDeploy(eplJoin, path).... | SupportBean_S0(-1, "x")); |
1,576,611 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE><MASK><NEW_LINE>env.compileDeploy(eplCreate, path);<NEW_LINE>// create insert into<NEW_LINE>String eplInsert = "insert into MyInfra select theString as c0, intPrimitive as c1 from SupportBean";<NEW_LINE>env.compil... | String eplCreate = namedWindow ? "@public create window MyInfra#keepall as (c0 string, c1 int)" : "@public create table MyInfra(c0 string primary key, c1 int)"; |
1,852,595 | public void write(Encoder encoder, CompilationState value) throws Exception {<NEW_LINE>// Deduplicates the include file states, as these are often shared between source files<NEW_LINE>Map<IncludeFileEdge, Integer> ids = new HashMap<IncludeFileEdge, Integer>();<NEW_LINE>encoder.writeSmallInt(value.getFileStates().size()... | encoder, includeFileState.getIncludedBy()); |
854,892 | // Based on the explanation at https://algs4.cs.princeton.edu/61event/<NEW_LINE>public void bounceOff(ParticleInterface otherParticleInterface) {<NEW_LINE>Particle otherParticle = (Particle) otherParticleInterface;<NEW_LINE>double deltaPositionX = otherParticle.positionX - positionX;<NEW_LINE>double deltaPositionY = ot... | double normalForceInYDirection = magnitudeOfNormalForce * deltaPositionY / distanceBetweenCenters; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.