idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,244,945 | private void convertExternalStorageSource2ExternalStorageSources() throws Exception, IOException {<NEW_LINE>File file_externalStorageSource = new File(FileTools.parent(FileTools.parent(new File("./"))), "configSample/externalStorageSource.json");<NEW_LINE>File file_externalStorageSources = new File(FileTools.parent(Fil... | ("./"))), "configSample/externalStorageSources.json"); |
1,209,992 | public void run() {<NEW_LINE>final byte[] buf = new byte[MAX_PACKET_SIZE];<NEW_LINE>final DatagramPacket packet = new DatagramPacket(buf, buf.length);<NEW_LINE>while (!socket.isClosed() && !Thread.currentThread().isInterrupted()) {<NEW_LINE>startSignal.countDown();<NEW_LINE>try {<NEW_LINE>// TODO This doesn't handle th... | ), packet.getLength()); |
689,762 | public static ListListenersByIpResponse unmarshall(ListListenersByIpResponse listListenersByIpResponse, UnmarshallerContext _ctx) {<NEW_LINE>listListenersByIpResponse.setRequestId(_ctx.stringValue("ListListenersByIpResponse.RequestId"));<NEW_LINE>listListenersByIpResponse.setHttpCode(_ctx.stringValue("ListListenersByIp... | ("ListListenersByIpResponse.Listeners[" + i + "].Group")); |
321,253 | protected Problem preCheck(CompilationController info) throws IOException {<NEW_LINE>fireProgressListenerStart(refactoring.PRE_CHECK, 4);<NEW_LINE>Problem preCheckProblem = null;<NEW_LINE>info.toPhase(JavaSource.Phase.RESOLVED);<NEW_LINE>TreePath <MASK><NEW_LINE>TreePath method = JavaPluginUtils.findMethod(tp);<NEW_LIN... | tp = treePathHandle.resolve(info); |
1,448,151 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.aptana.editor.js.parsing.ast.JSTreeWalker#visit(com.aptana.editor.js.parsing.ast.JSForInNode)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void visit(JSForInNode node) {<NEW_LINE>JSNode expression = (JSNode) node.getExpression();<NEW_LINE>JSNode initializer = <MASK><NEW... | (JSNode) node.getInitializer(); |
1,447,858 | private Query createQueryInternal(ConvertingParameterAccessor accessor, boolean isCountQuery) {<NEW_LINE>MongoQueryCreator creator = new MongoQueryCreator(tree, accessor, context, isCountQuery ? false : isGeoNearQuery);<NEW_LINE>Query query = creator.createQuery();<NEW_LINE>if (isCountQuery) {<NEW_LINE>return query;<NE... | limit(tree.getMaxResults()); |
1,733,415 | public MethodNode generate() {<NEW_LINE>int size = Bytecode.getArgsSize(this.argTypes) + this.returnType.getSize() + (this.targetIsStatic ? 0 : 1);<NEW_LINE>MethodNode method = this.createMethod(size, size);<NEW_LINE>if (!this.targetIsStatic) {<NEW_LINE>method.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0));<NEW_LI... | Opcodes.INVOKESPECIAL : Opcodes.INVOKEVIRTUAL); |
811,111 | public void addToken(AbstractToken<T> token, int lookahead, Object state) {<NEW_LINE>// Check if lexer-input-operation advanced to next list and possibly add corresponding relex change(s)<NEW_LINE>int skipTokenListCount;<NEW_LINE>if ((skipTokenListCount = joinLexerInputOperation.skipTokenListCount()) > 0) {<NEW_LINE>wh... | addToken(partToken, 0, null); |
1,151,968 | // @SuppressWarnings("null")<NEW_LINE>// public static void main(String arg[]) {<NEW_LINE>// Rocket rocket = TestRocket.makeRocket();<NEW_LINE>// FinSet finset = null;<NEW_LINE>//<NEW_LINE>// Iterator<RocketComponent> iter = rocket.deepIterator();<NEW_LINE>// while (iter.hasNext()) {<NEW_LINE>// RocketComponent c = ite... | double mach = conditions.getMach(); |
1,511,855 | public boolean acceptIndexMatch(String documentPath, SearchPattern indexRecord, SearchParticipant participant, AccessRuleSet access) {<NEW_LINE>SuperTypeReferencePattern record = (SuperTypeReferencePattern) indexRecord;<NEW_LINE>boolean isLocalOrAnonymous = record.enclosingTypeName == IIndexConstants.ONE_ZERO;<NEW_LINE... | 1, lastDollar).toCharArray(); |
1,560,525 | public static Bitmap decodeSampledBitmapFromResourceMemOpt(InputStream inputStream, int reqWidth, int reqHeight) {<NEW_LINE>byte[] byteArr = new byte[0];<NEW_LINE>byte[] buffer = new byte[1024];<NEW_LINE>int len;<NEW_LINE>int count = 0;<NEW_LINE>try {<NEW_LINE>while ((len = inputStream.read(buffer)) > -1) {<NEW_LINE>if... | byteArr, 0, count, options); |
157,764 | boolean handleEndOfSegment(SegmentWithRange segmentCompleted) throws ReaderNotInReaderGroupException {<NEW_LINE>final Map<SegmentWithRange, List<Long>> segmentToPredecessor;<NEW_LINE>if (sync.getState().getEndSegments().containsKey(segmentCompleted.getSegment())) {<NEW_LINE>segmentToPredecessor = Collections.emptyMap()... | (readerId, segmentCompleted, segmentToPredecessor)); |
825,191 | private void exportInvoice(@NonNull final InvoiceToExport invoiceToExport) {<NEW_LINE>final ILoggable loggable = Loggables.withLogger(logger, Level.DEBUG);<NEW_LINE>final List<InvoiceExportClient> exportClients = invoiceExportServiceRegistry.createExportClients(invoiceToExport);<NEW_LINE>if (exportClients.isEmpty()) {<... | exportResults = exportClient.export(invoiceToExport); |
254,646 | public Container add(final char x) {<NEW_LINE>if (cardinality == 0 || (cardinality > 0 && (x) > (content[cardinality - 1]))) {<NEW_LINE>if (cardinality >= DEFAULT_MAX_SIZE) {<NEW_LINE>return toBitmapContainer().add(x);<NEW_LINE>}<NEW_LINE>if (cardinality >= this.content.length) {<NEW_LINE>increaseCapacity();<NEW_LINE>}... | content, 0, cardinality, x); |
1,818,385 | private DocIdSet build(LeafReader reader) throws IOException {<NEW_LINE>final DocIdSetBuilder builder = new DocIdSetBuilder(reader.maxDoc());<NEW_LINE>final Terms terms = reader.terms(getField());<NEW_LINE>if (terms == null) {<NEW_LINE>return DocIdSet.EMPTY;<NEW_LINE>}<NEW_LINE>final TermsEnum te = terms.iterator();<NE... | StringHelper.murmurhash3_x86_32(term, SEED); |
46,423 | public static void loadFromMap(DeviceCommandInvocation event, Map<String, Object> values) throws SiteWhereException {<NEW_LINE>event.setEventType(DeviceEventType.CommandInvocation);<NEW_LINE>event.setInitiator(CommandInitiator.valueOf(InfluxDbDeviceEvent.find(values, CMD_INITIATOR)));<NEW_LINE>event.setInitiatorId(Infl... | find(values, CMD_TARGET))); |
717,136 | public void encode(Result.PreparedMetadata metadata, ByteBuf dest, ProtocolVersion version) {<NEW_LINE>boolean globalTablesSpec = metadata.flags.contains(Result.Flag.GLOBAL_TABLES_SPEC);<NEW_LINE>dest.writeInt(Result.Flag<MASK><NEW_LINE>dest.writeInt(metadata.columns.size());<NEW_LINE>if (version.isGreaterOrEqualTo(Pro... | .serialize(metadata.flags)); |
349,410 | private static ScriptEnvironment makeScriptEnvironment(JSParserOptions parserOptions) {<NEW_LINE>ScriptEnvironment.Builder builder = ScriptEnvironment.builder();<NEW_LINE>builder.<MASK><NEW_LINE>builder.ecmaScriptVersion(parserOptions.getEcmaScriptVersion());<NEW_LINE>builder.emptyStatements(parserOptions.isEmptyStatem... | strict(parserOptions.isStrict()); |
1,793,740 | final GetGeoMatchSetResult executeGetGeoMatchSet(GetGeoMatchSetRequest getGeoMatchSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getGeoMatchSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,682,028 | private WebAppContext createWebAppContext() {<NEW_LINE>webAppContext = new WebAppContext();<NEW_LINE>webAppContext.setDefaultsDescriptor(GoWebXmlConfiguration.configuration(getWarFile()));<NEW_LINE>webAppContext.setConfigurationClasses(new String[] { WebInfConfiguration.class.getCanonicalName(), WebXmlConfiguration.cla... | setContextPath(systemEnvironment.getWebappContextPath()); |
658,586 | protected void buttonPressed(int buttonId) {<NEW_LINE><MASK><NEW_LINE>if (buttonId == NEW_ID) {<NEW_LINE>String profileName = EnterNameDialog.chooseName(getShell(), ResultSetMessages.dialog_data_format_profiles_dialog_name_chooser_title);<NEW_LINE>if (CommonUtils.isEmpty(profileName)) {<NEW_LINE>return;<NEW_LINE>}<NEW_... | DataFormatterRegistry registry = DataFormatterRegistry.getInstance(); |
115,440 | public void main() {<NEW_LINE>RVec4 color = (RVec4) getGlobal(DefaultShaderVar.G_COLOR);<NEW_LINE>RVec3 eyeDir = (RVec3) getGlobal(DefaultShaderVar.V_EYE_DIR);<NEW_LINE>RVec3 normal = (RVec3) getGlobal(DefaultShaderVar.G_NORMAL);<NEW_LINE>RFloat k = (RFloat) getGlobal(SpecularShaderVar.U_EXTINCTION_COEFFICIENT);<NEW_LI... | assign("max(0., dot(normalize(-vEyeDir), H" + i + "))"); |
418,257 | private void loadNode557() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.AuditEventType_ClientAuditEntryId, new QualifiedName(0, "ClientAuditEntryId"), new LocalizedText("en", "ClientAuditEntryId"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Var... | this.nodeManager.addNode(node); |
511,417 | protected void addEnumConstants(EnumDefinition enumDefinition, JDefinedClass _enum, Schema schema) {<NEW_LINE>JType type = enumDefinition.getBackingType();<NEW_LINE>String nodeName = enumDefinition.getNodeName();<NEW_LINE><MASK><NEW_LINE>for (EnumValueDefinition enumValueDefinition : enumDefinition.values()) {<NEW_LINE... | JsonNode parentNode = enumDefinition.getEnumNode(); |
478,390 | protected void initialize(String role, Offer offer, TradeModel tradeModel, PrivateNotificationManager privateNotificationManager, boolean useDevPrivilegeKeys) {<NEW_LINE>boolean hasTraded = numTrades > 0;<NEW_LINE>Tuple5<Long, Long, String, String, String> peersAccount = getPeersAccountAge(tradeModel, offer);<NEW_LINE>... | peersAccount.fourth, peersAccount.fifth); |
127,017 | public Object execute(CommandLine commandLine) throws Exception {<NEW_LINE>String folder = commandLine.getValue(Options.FOLDER_OPTION);<NEW_LINE>if (folder.endsWith("/") || folder.endsWith("\\")) {<NEW_LINE>folder = folder.substring(0, folder.length() - 1);<NEW_LINE>}<NEW_LINE>if (!new File(folder).exists()) {<NEW_LINE... | construct.newInstance(page, dotproject); |
905,658 | private static org.jreleaser.model.Changelog convertChangelog(Changelog changelog) {<NEW_LINE>org.jreleaser.model.Changelog c = new org.jreleaser.model.Changelog();<NEW_LINE>if (changelog.isEnabledSet())<NEW_LINE>c.setEnabled(changelog.isEnabled());<NEW_LINE>if (changelog.isLinksSet())<NEW_LINE>c.setLinks(changelog.isL... | (changelog.getReplacers())); |
374,397 | private void addDefaultTools(DefaultGccPlatformToolChain toolChain) {<NEW_LINE>toolChain.add(instantiator.newInstance(DefaultGccCommandLineToolConfiguration.class, ToolType.C_COMPILER, "gcc"));<NEW_LINE>toolChain.add(instantiator.newInstance(DefaultGccCommandLineToolConfiguration.class, ToolType.CPP_COMPILER, "g++"));<... | , ToolType.OBJECTIVECPP_COMPILER, "g++")); |
210,378 | final ReleaseAddressResult executeReleaseAddress(ReleaseAddressRequest releaseAddressRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(releaseAddressRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2"); |
683,342 | void doPrintNotification(final Notification notification) {<NEW_LINE>Editor editor = getConsoleEditor();<NEW_LINE>if (editor.isDisposed()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Document document = editor.getDocument();<NEW_LINE>boolean scroll = document.getTextLength() == editor.getCaretModel().getOffset() || !editor.... | moveToOffset(document.getTextLength()); |
1,670,939 | /*<NEW_LINE>* @see com.sitewhere.rdb.spi.ITransactionCallback#process()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public RdbZone process() throws SiteWhereException {<NEW_LINE>RdbZone existing = getEntityManagerProvider().findById(id, RdbZone.class);<NEW_LINE>if (existing != null) {<NEW_LINE>// Use common update logic.<N... | getId(), RdbZoneBoundary.class); |
1,680,022 | public ColumnStrategy generationStrategy(RelOptTable table, int iColumn) {<NEW_LINE>final ModifiableViewTable viewTable = table.unwrap(ModifiableViewTable.class);<NEW_LINE>assert iColumn < viewTable.columnMapping.size();<NEW_LINE>// Use the view constraint to generate the default value if the column is<NEW_LINE>// cons... | super.generationStrategy(table, iColumn); |
1,721,565 | public Long[] asLongArray() {<NEW_LINE>if (arrayType.getElementType().is(ExprType.LONG)) {<NEW_LINE>return Arrays.stream(value).map(v -> (Long) v).toArray(Long[]::new);<NEW_LINE>} else if (arrayType.getElementType().is(ExprType.DOUBLE)) {<NEW_LINE>return value == null ? null : Arrays.stream(value).map(v -> ((Double) v)... | toArray(Long[]::new); |
576,565 | public ListTagsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListTagsResult listTagsResult = new ListTagsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | )).unmarshall(context)); |
1,808,204 | protected String call() throws TSSException {<NEW_LINE>checkInputs();<NEW_LINE>List<Utils.IOSVersion> iosVersions = getIOSVersions();<NEW_LINE>System.out.println("iosVersions = " + iosVersions);<NEW_LINE>ArrayList<MASK><NEW_LINE>final int urlIndex = args.size() - 1;<NEW_LINE>StringBuilder responseBuilder = new StringBu... | <String> args = constructArgs(); |
306,139 | // Submit tasks via timed and untimed invokeAny that interrupts itself in order to test appropriate handling of InterruptedException during execution.<NEW_LINE>// ExecutionException with chained InterruptedException must be raised when running on a different thread, which is consistent with an asynchronous task failing... | , TIMEOUT_NS, TimeUnit.NANOSECONDS)); |
1,341,793 | public List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) {<NEW_LINE>List<ViewManager> managers = new ArrayList<>();<NEW_LINE>// components<NEW_LINE>managers.add(new RCTMGLCameraManager(reactApplicationContext));<NEW_LINE>managers.add(new RCTMGLAndroidTextureMapViewManager(reactApplic... | add(new RCTMGLShapeSourceManager(reactApplicationContext)); |
1,610,204 | public void start(String[] args) throws Exception {<NEW_LINE>readConf(args);<NEW_LINE>DLRLogger.setLevel(LogLevel.valueOf(loggingLevel.toUpperCase()));<NEW_LINE>if (lisumFile.isEmpty()) {<NEW_LINE>System.err.println("Error: No Lisum file received. Use -f <path_to_file/lisum.xml>. Quitting.");<NEW_LINE>return;<NEW_LINE>... | "> " + cu.getFullName()); |
1,034,931 | public final void init(NodeEngine nodeEngine, Properties properties) {<NEW_LINE>this.nodeEngine = nodeEngine;<NEW_LINE>int partitionCount = nodeEngine.getPartitionService().getPartitionCount();<NEW_LINE>this.segments = new CachePartitionSegment[partitionCount];<NEW_LINE>for (int i = 0; i < partitionCount; i++) {<NEW_LI... | = new CacheSplitBrainHandlerService(nodeEngine, segments); |
1,627,370 | public void initializeDefaultPreferences() {<NEW_LINE>IPreferenceStore preferenceStore = BootLanguageServerPlugin.getDefault().getPreferenceStore();<NEW_LINE>preferenceStore.setDefault(Constants.PREF_LIVE_INFORMATION_AUTOMATIC_TRACKING_ENABLED, true);<NEW_LINE>preferenceStore.<MASK><NEW_LINE>preferenceStore.setDefault(... | setDefault(Constants.PREF_LIVE_INFORMATION_AUTOMATIC_TRACKING_DELAY, 5000); |
680,742 | static ClassPath createModulePath(@NonNull final Collection<FileObject> installFolders) {<NEW_LINE>final List<PathResourceImplementation> modules = new ArrayList<>();<NEW_LINE>for (FileObject installFolder : installFolders) {<NEW_LINE>final File installDir = FileUtil.toFile(installFolder);<NEW_LINE>final URI imageURI =... | null : ClassPathSupport.createClassPath(modules); |
796,844 | private boolean acquireSegmentsIfNeeded(PositionInternal position) throws ReaderNotInReaderGroupException {<NEW_LINE>Map<SegmentWithRange, Long> newSegments = groupState.acquireNewSegmentsIfNeeded(getLag(), position);<NEW_LINE>if (!newSegments.isEmpty()) {<NEW_LINE>log.info("{} acquiring segments {}", this, newSegments... | ), newSegment.getValue()); |
438,401 | public int analyzePotentialWinPositions(Integer action) {<NEW_LINE>final int[] rowIncr = new int[] { 1, 0, 1, 1 };<NEW_LINE>final int[] colIncr = new int[] { 0, 1, -1, 1 };<NEW_LINE>int moveCol = action;<NEW_LINE>int moveRow = getFreeRow(moveCol);<NEW_LINE>int playerNum = getPlayerToMove();<NEW_LINE>int result = 0;<NEW... | 0 ? getRows() : -1; |
1,013,904 | private void decodeMethodParameters(int offset, MethodInfo methodInfo) {<NEW_LINE>int readOffset = offset + 6;<NEW_LINE>final int length = u1At(readOffset);<NEW_LINE>if (length != 0) {<NEW_LINE>readOffset += 1;<NEW_LINE>char[][] names = new char[length][];<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>int nameIn... | (i).toCharArray()); |
1,225,379 | protected void deleteUsageVMSnapshot(UsageEventVO event) {<NEW_LINE>long accountId = event.getAccountId();<NEW_LINE>Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId());<NEW_LINE>Long domainId = acct.getDomainId();<NEW_LINE>Long diskOfferingId = event.getOfferingId();<NEW_LINE>long vmId = event.get... | zoneId, domainId, vmId, diskOfferingId); |
1,465,184 | public List<Advice> evaluate(AnnotatedString s) {<NEW_LINE>List<Advice> out_list = new ArrayList<Advice>();<NEW_LINE>List<Line> lines = s.getLines();<NEW_LINE>for (int line_cnt = 0; line_cnt < lines.size(); line_cnt++) {<NEW_LINE>Line <MASK><NEW_LINE>String line = l.toString();<NEW_LINE>int start_pos = line.indexOf("\\... | l = lines.get(line_cnt); |
1,500,970 | public void insertLocalHostAssignment(HostInterface h, LayerInterface layer, LocalHostAssignment l) {<NEW_LINE>l.id = SqlUtil.genKeyRandom();<NEW_LINE>l.name = String.format("%s->%s", h.getName(), layer.getName());<NEW_LINE>l.setHostId(h.getHostId());<NEW_LINE>l.setJobId(layer.getJobId());<NEW_LINE>l.setLayerId(layer.g... | ), l.getThreads()); |
1,127,416 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String epl = "@public create window MyWindow#keepall as SupportBean_ST0;\n" + "on SupportBean_A delete from MyWindow;\n" + "insert into MyWindow select * from SupportBean_ST0;\n";<NEW_LINE>env.compileDeploy(epl, p... | assertEqualsNew("s0", "allOfX", true); |
1,790,073 | public static Boolean showDialog(Project project, String message, String title, File file) {<NEW_LINE>final Boolean[] ref = new Boolean[1];<NEW_LINE>final DialogWrapper.DoNotAskOption option = new DialogWrapper.DoNotAskOption() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean isToBeShown() {<NEW_LINE>return true;... | ref[0] = exitCode == 0; |
1,442,175 | void parse(String html, int currentSearchOffset) {<NEW_LINE>searchFinished = true;<NEW_LINE>items.clear();<NEW_LINE>html = new String(html.getBytes(), StandardCharsets.UTF_8);<NEW_LINE>// NOI18N<NEW_LINE>Pattern // NOI18N<NEW_LINE>p = // NOI18N<NEW_LINE>Pattern.// NOI18N<NEW_LINE>compile("<a\\s+href\\s*=\\s*\"(.*?)\"[^... | Item(url, title, null); |
182,659 | private void handleCallOfferMessage(@NonNull SignalServiceContent content, @NonNull OfferMessage message, @NonNull Optional<Long> smsMessageId, @NonNull Recipient senderRecipient) {<NEW_LINE>log(String.valueOf(content.getTimestamp()), "handleCallOfferMessage...");<NEW_LINE>if (smsMessageId.isPresent()) {<NEW_LINE><MASK... | MessageDatabase database = SignalDatabase.sms(); |
1,363,016 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.grpc.service.DeviceManagementGrpc.DeviceManagementImplBase#<NEW_LINE>* listDeviceCommands(com.sitewhere.grpc.service.GListDeviceCommandsRequest,<NEW_LINE>* io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void lis... | setCount(apiResult.getNumResults()); |
1,348,252 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>binding = DataBindingUtil.inflate(inflater, R.layout.auto_check_in_fragment, container, false);<NEW_LINE>autoCheckInViewModel = ViewModelProviders.of(getActivity(), viewModelFactory).get(AutoCheckInViewModel.cla... | observe(this, this::showProgress); |
1,772,340 | private void GeneralizePath(MultiPathImpl mpsrc, int ipath, MultiPathImpl mpdst, Line lineHelper) {<NEW_LINE>if (mpsrc.getPathSize(ipath) < 2)<NEW_LINE>return;<NEW_LINE>int start = mpsrc.getPathStart(ipath);<NEW_LINE>int end = mpsrc.getPathEnd(ipath) - 1;<NEW_LINE>AttributeStreamOfDbl xy = (AttributeStreamOfDbl) mpsrc.... | ++) mpdst.lineTo(point); |
527,120 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>App.getInstance().getDaggerComponent().inject(this);<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// noinspection deprecation<NEW_LINE>setRetainInstance(true);<NEW_LINE>appVersion = getString(R.string.appVersion);<NEW_LINE>appProcVersion = getString(R.... | operationMode = preferences.getStringPreference(OPERATION_MODE); |
99,173 | private void collectEnumSchemas(String parentName, Map<String, Schema> schemas) {<NEW_LINE>for (Map.Entry<String, Schema> schemasEntry : schemas.entrySet()) {<NEW_LINE>String sName = schemasEntry.getKey();<NEW_LINE>Schema schema = schemasEntry.getValue();<NEW_LINE>collectEnumSchemas(parentName, sName, schema);<NEW_LINE... | ? parentName + "_" + sName : sName; |
12,042 | public static BatchCreateSandBoxWhileListResponse unmarshall(BatchCreateSandBoxWhileListResponse batchCreateSandBoxWhileListResponse, UnmarshallerContext _ctx) {<NEW_LINE>batchCreateSandBoxWhileListResponse.setRequestId(_ctx.stringValue("BatchCreateSandBoxWhileListResponse.RequestId"));<NEW_LINE>batchCreateSandBoxWhile... | ("BatchCreateSandBoxWhileListResponse.WhiteList[" + i + "].Uuid")); |
380,021 | protected void factoryCall(AbstractProcessor processor, PrintWriter out, InjectedDependencies deps, int argCount, boolean inReplacement) {<NEW_LINE>out.printf(" if (%s.%s(b", customFactory.getEnclosingElement(), customFactory.getSimpleName());<NEW_LINE>for (int i = 0; i < argCount; i++) {<NEW_LINE>out.printf(", ... | (processor), getReplacementName()); |
1,473,097 | public RestResponseContainer executeRequest(RestRequestContainer request, Templater templater, AsyncControl asyncControl) {<NEW_LINE>HttpRequest httpRequest = toHttpRequest(request, templater);<NEW_LINE>asyncControl.triggerReqeuestStarted();<NEW_LINE>AtomicLong startTime = new AtomicLong(System.currentTimeMillis());<NE... | proxyReq.executeRequest(asyncControl.onCancellationRequested); |
531,422 | public void apply() throws ConfigurationException {<NEW_LINE>// Bazel workspaces do not specify a sdk path so we do not need to update the sdk path if using<NEW_LINE>// a bazel workspace.<NEW_LINE>if (!workspaceCache.isBazel()) {<NEW_LINE>final String errorMessage = FlutterSdkUtil.getErrorMessageIfWrongSdkRootPath(getS... | setOpenInspectorOnAppLaunch(myOpenInspectorOnAppLaunchCheckBox.isSelected()); |
868,710 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>pnlAttributes = new javax.swing.JPanel();<NEW_LINE>jLabel1 = new javax.swing.JLabel();<NEW_LINE>jLabel2 = new javax.swing.J... | pnlAttributes.add(jLabel2, gridBagConstraints); |
718,841 | public static ApplicationMode saveProfile(ApplicationModeBuilder builder, OsmandApplication app) {<NEW_LINE>ApplicationMode mode = ApplicationMode.valueOfStringKey(builder.applicationMode.stringKey, null);<NEW_LINE>if (mode != null) {<NEW_LINE>mode.setParentAppMode(builder.applicationMode.parentAppMode);<NEW_LINE>mode.... | mode.setLocationIcon(builder.locationIcon); |
868,360 | private void handleDetermineSize(boolean detected) {<NEW_LINE>String message = "Determine Scale: Hold target in view and center";<NEW_LINE>if (detected) {<NEW_LINE>double stationaryTime = actions.getStationaryTime();<NEW_LINE>CalibrationObservation points;<NEW_LINE>synchronized (detectorLock) {<NEW_LINE>points = detect... | (focusQuad.get(3)); |
1,354,018 | public Map<String, CRV> normalize() {<NEW_LINE>final TreeMap<Double, List<byte[]>> reorder = new TreeMap<>();<NEW_LINE>for (final Map.Entry<String, double[]> entry : this.crt.entrySet()) {<NEW_LINE>final Double d = entry.getValue()[0];<NEW_LINE>List<byte[]> ds = reorder.get(d);<NEW_LINE>if (ds == null) {<NEW_LINE>ds = ... | + count + 1) / 2); |
1,470,072 | public void run(RegressionEnvironment env) {<NEW_LINE>EPStatement[] statements = new EPStatement[5];<NEW_LINE>sendTimer(env, 1000);<NEW_LINE>statements[0] = env.compileDeploy("@name('stmtmetric') select * from " + StatementMetric.class.getName()).statement("stmtmetric");<NEW_LINE>statements[0].addListener(env.listenerN... | ("runtimemetric").getAndClearIsInvoked()); |
1,060,915 | private static void pack_h_b(ByteList result, ByteList lCurElemString, int occurrences) {<NEW_LINE>int currentByte = 0;<NEW_LINE>int padLength = 0;<NEW_LINE>if (occurrences > lCurElemString.length()) {<NEW_LINE>padLength = (occurrences - lCurElemString.length()) / 2 + (occurrences + <MASK><NEW_LINE>occurrences = lCurEl... | lCurElemString.length()) % 2; |
1,192,282 | public void startElement(XMLElement element, Attributes attributes) {<NEW_LINE>// DOLUtils.getDefaultLogger().finer("STARTELEMENT : " + "in " + getXMLRootTag() + " Node, startElement " +<NEW_LINE>// element.getQName());<NEW_LINE>if (!this.getXMLRootTag().equals(element))<NEW_LINE>return;<NEW_LINE>if (attributes.getLeng... | + attributes.getQName(i)); |
737,981 | private static Range parseRange(String range, PrintStream out) {<NEW_LINE>int start = 1;<NEW_LINE>int end = -1;<NEW_LINE>int index = range.indexOf(RANGE_INDICATOR);<NEW_LINE>try {<NEW_LINE>if (index < 0) {<NEW_LINE>start = Integer.parseInt(range);<NEW_LINE>end = start;<NEW_LINE>} else {<NEW_LINE>String x = <MASK><NEW_L... | range.substring(0, index); |
368,659 | public boolean compareRecord(Schema schema, ResultSet oracleRecord, GenericRecord avroRecord) throws SQLException {<NEW_LINE>List<Field> fields = schema.getFields();<NEW_LINE>boolean result = true;<NEW_LINE>for (Field avroField : fields) {<NEW_LINE>int dbFieldPosition = 0;<NEW_LINE>// this is just avroField.schema() if... | throw new RuntimeException(errMsg, sx); |
751,149 | public List<GrailsPlugin> refreshAvailablePlugins() throws InterruptedException {<NEW_LINE>// NOI18N<NEW_LINE>final String command = "list-plugins";<NEW_LINE>final ProjectInformation <MASK><NEW_LINE>// NOI18N<NEW_LINE>final String displayName = inf.getDisplayName() + " (" + command + ")";<NEW_LINE>final Callable<Proces... | inf = ProjectUtils.getInformation(project); |
467,092 | public void disablePlugin(Plugin plugin) {<NEW_LINE>Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader");<NEW_LINE>if (plugin.isEnabled()) {<NEW_LINE>plugin.getLogger().info("Disabling " + plugin.getDescription().getFullName());<NEW_LINE>server.getPluginManager().callEvent(ne... | ClassLoader cloader = jPlugin.getClassLoader(); |
422,337 | public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {<NEW_LINE>// activate consider if within x tolerance<NEW_LINE>int touchSlop = ViewConfiguration.get(TerminalView.<MASK><NEW_LINE>if (Math.abs(e1.getX() - e2.getX()) < touchSlop * 4) {<NEW_LINE>// estimate how many rows we have sc... | this.context).getScaledTouchSlop(); |
1,795,361 | protected void addAndMeasureViewIfNeeded(FreeFlowItem freeflowItem) {<NEW_LINE>View view;<NEW_LINE>if (freeflowItem.view == null) {<NEW_LINE>View convertView = viewpool.getViewFromPool(mAdapter.getViewType(freeflowItem));<NEW_LINE>if (freeflowItem.isHeader) {<NEW_LINE>view = mAdapter.getHeaderViewForSection(<MASK><NEW_... | freeflowItem.itemSection, convertView, this); |
236,865 | //<NEW_LINE>// AttributeListener methods<NEW_LINE>//<NEW_LINE>@Override<NEW_LINE>public void attributeValueChanged(AttributeEvent e) {<NEW_LINE>final var attr = e.getAttribute();<NEW_LINE>if (e.getAttribute().equals(StdAttr.LABEL)) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final var lAttr = (Attribute<String>)... | ).setValue(lAttr, oldValue); |
1,754,649 | @ExceptionMetered<NEW_LINE>@Path("/hostactions")<NEW_LINE>@ApiOperation(value = "Take a deploy action", notes = "Take an action on a deploy using host information", response = Response.class)<NEW_LINE>public void update(@Context SecurityContext sc, @ApiParam(value = "Environment name", required = true) @PathParam("envN... | envBean.getEnv_id(), agentBean); |
160,078 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>FilterCard filter = new FilterCard("card named Scion of Darkness");<NEW_LINE>filter.add(new NamePredicate("Scion of Darkness"));<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW... | getCard(target.getFirstTarget()); |
1,135,111 | protected String formatGroupPropertyValue(GroupInfo<MetaPropertyPath> groupId, @Nullable Object value) {<NEW_LINE>if (value == null) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>MetaPropertyPath propertyPath = groupId.getProperty();<NEW_LINE>Table.Column<E> column = columns.get(propertyPath);<NEW_LINE>if (column != null) ... | children = component.getGroupItemIds(groupId); |
1,831,684 | static void writeMetricsCollectedByPrometheusClient(Writer w, CollectorRegistry registry) throws IOException {<NEW_LINE>Enumeration<MetricFamilySamples> metricFamilySamples = registry.metricFamilySamples();<NEW_LINE>while (metricFamilySamples.hasMoreElements()) {<NEW_LINE>MetricFamilySamples metricFamily = metricFamily... | .labelNames.get(j)); |
927,636 | public static ApiDesignResourceInfo fromDataModelContent(String content) throws Exception, ApiValidationException {<NEW_LINE>try {<NEW_LINE>String name = null;<NEW_LINE>String description = null;<NEW_LINE>FormatType format = FormatType.JSON;<NEW_LINE>ObjectMapper mapper = jsonMapper;<NEW_LINE>if (!content.startsWith("{... | info.setType(ApiDesignType.AsyncAPI20); |
1,287,219 | public static void buildIndexMetaByAddColumns(List<IndexRecord> indexRecords, SqlAlterTable alterTable, String schemaName, String tableName, String indexTableName, int seqInIndex, IndexStatus indexStatus) {<NEW_LINE>final Map<String, SqlColumnDeclaration> columnDefMap = new HashMap<>();<NEW_LINE>for (SqlAlterSpecificat... | get(SqlAlterTable.ColumnOpt.ADD); |
645,991 | public boolean visit(MySqlJSONTableExpr.Column x) {<NEW_LINE>x.getName().accept(this);<NEW_LINE>if (x.isOrdinality()) {<NEW_LINE>print0(ucase ? " FOR ORDINALITY" : " for ordinality");<NEW_LINE>}<NEW_LINE>SQLDataType dataType = x.getDataType();<NEW_LINE>if (dataType != null) {<NEW_LINE>print(' ');<NEW_LINE>dataType.acce... | print0(ucase ? " EXISTS" : " exists"); |
555,197 | private State checks(State state) throws DatatypeException, IOException {<NEW_LINE>if (state.context.length() == 0) {<NEW_LINE>state = appendToContext(state);<NEW_LINE>}<NEW_LINE>state.current <MASK><NEW_LINE>state = appendToContext(state);<NEW_LINE>state = skipSpaces(state);<NEW_LINE>boolean expectNumber = true;<NEW_L... | = state.reader.read(); |
815,545 | public Request<GetClusterCredentialsRequest> marshall(GetClusterCredentialsRequest getClusterCredentialsRequest) {<NEW_LINE>if (getClusterCredentialsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<GetClusterCredentialsRequest> request = n... | (getClusterCredentialsRequest.getClusterIdentifier())); |
1,268,061 | private void clipSequences(ReadClipperWithData clipper) {<NEW_LINE>if (sequencesToClip != null) {<NEW_LINE>// don't bother if we don't have any sequences to clip<NEW_LINE>GATKRead read = clipper.getRead();<NEW_LINE>ClippingData data = clipper.getData();<NEW_LINE>for (SeqToClip stc : sequencesToClip) {<NEW_LINE>// we ha... | seq, op.getLength()); |
391,005 | public void bool(BoolCall<FileAuthenticationCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {<NEW_LINE>FileAuthenticationCQ mustQuery = new FileAuthenticationCQ();<NEW_LINE>FileAuthenticationCQ shouldQuery = new FileAuthenticationCQ();<NEW_LINE>FileAuthenticationCQ mustNotQuery = new FileAuthenticationC... | ), filterQuery.getQueryBuilderList()); |
990,825 | public void addInstances(InstanceList training, List<LabelSequence> topics) {<NEW_LINE>initializeForTypes(training.getDataAlphabet());<NEW_LINE>assert (training.size() == topics.size());<NEW_LINE>for (int i = 0; i < training.size(); i++) {<NEW_LINE>Topication t = new Topication(training.get(i), this, topics.get(i));<NE... | putOrAdd(topic, 1, 1); |
1,663,213 | public ServiceStatus save(String userId, String json) {<NEW_LINE>JSONObject jsonObject = JSONObject.parseObject(json);<NEW_LINE>DashboardBoard board = new DashboardBoard();<NEW_LINE>board.setUserId(userId);<NEW_LINE>board.setName(jsonObject.getString("name"));<NEW_LINE>board.setCategoryId(jsonObject.getLong("categoryId... | "success", board.getId()); |
1,434,465 | private void preserveExistingLineBreaks() {<NEW_LINE>// normally n empty lines = n+1 line breaks, but not at the file start and end<NEW_LINE>Token first = this.tm.get(0);<NEW_LINE>int startingBreaks = first.getLineBreaksBefore();<NEW_LINE>first.clearLineBreaksBefore();<NEW_LINE><MASK><NEW_LINE>this.tm.traverse(0, new T... | first.putLineBreaksBefore(startingBreaks - 1); |
1,052,242 | private void calcPositionAndShow(Project project, JBPopup balloon) {<NEW_LINE>Point savedLocation = WindowStateService.getInstance(myProject).getLocation(LOCATION_SETTINGS_KEY);<NEW_LINE>// for first show and short mode popup should be shifted to the top screen half<NEW_LINE>if (savedLocation == null && mySearchEverywh... | y - shift, screenRectangle.y); |
1,010,208 | public void marshall(NodeInstance nodeInstance, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (nodeInstance == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(nodeInstance.getCurrentStatus(), CURRENTSTATUS_B... | nodeInstance.getPackageName(), PACKAGENAME_BINDING); |
1,151,500 | public static InputStream createInputStream(final AbstractFolder fo) throws FileNotFoundException {<NEW_LINE>InputStream retVal = null;<NEW_LINE>synchronized (StreamPool.class) {<NEW_LINE>if (get(fo).waitForOutputStreamsClosed(fo, 2000)) {<NEW_LINE>retVal = new NotifyInputStream(fo);<NEW_LINE>get(fo).iStream().add(retV... | iStream().add(retVal); |
230,415 | private void dispatchSplitsUseLocation(List<org.apache.hadoop.mapreduce.InputSplit> splitsNewAPI, int groupNumber, int groupItemNumber) throws IOException, InterruptedException {<NEW_LINE>splitNum = splitsNewAPI.size();<NEW_LINE>// Since the actual split size is sometimes not exactly equal to the expected split size, w... | splitClassifications.put(i, splitClassification); |
1,150,988 | protected void submitCallback(int code) {<NEW_LINE>if (BKException.Code.OK == code) {<NEW_LINE>numPendingEntries--;<NEW_LINE>if (numPendingEntries != 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// ensure callback once<NEW_LINE>if (!complete.compareAndSet(false, true)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>can... | (BKException.create(code)); |
1,426,065 | public JobDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>JobDetails jobDetails = new JobDetails();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>Jso... | class).unmarshall(context)); |
1,713,670 | final DescribeVpcsResult executeDescribeVpcs(DescribeVpcsRequest describeVpcsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeVpcsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,489,847 | private ThreadPoolExecutor createPriorityExecutor(ScanExecutorConfig sec, Map<String, Queue<Runnable>> scanExecQueues) {<NEW_LINE>BlockingQueue<Runnable> queue;<NEW_LINE>if (sec.prioritizerClass.orElse("").isEmpty()) {<NEW_LINE>queue = new LinkedBlockingQueue<>();<NEW_LINE>} else {<NEW_LINE>ScanPrioritizer factory = nu... | get(), ScanPrioritizer.class); |
696,246 | public GroupLevelInfo display(ProblemReport report) {<NEW_LINE>Machine machine = report.getMachines().get(m_model.getIpAddress());<NEW_LINE>if (machine == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Collection<Entity> entities = machine.getEntities().values();<NEW_LINE>for (Entity entity : entities) {<NEW_LINE>Ma... | String groupName = thread.getGroupName(); |
580,161 | public Subchannel createSubchannel(CreateSubchannelArgs args) {<NEW_LINE>List<EquivalentAddressGroup> addresses = new ArrayList<>();<NEW_LINE>for (EquivalentAddressGroup eag : args.getAddresses()) {<NEW_LINE>Attributes.Builder attrBuilder = eag.getAttributes().toBuilder().set(InternalXdsAttributes.ATTR_CLUSTER_NAME, cl... | lrsServerInfo, cluster, edsServiceName, locality); |
113,668 | private ScrollablePicture buildScrollablePicture() {<NEW_LINE>final GeneratedImage generatedImage = simpleLine.getGeneratedImage();<NEW_LINE>if (generatedImage == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final File png = generatedImage.getPngFile();<NEW_LINE>BufferedImage image = null;<NEW_LINE>try {<NEW_LINE>... | = me.getY() - startY; |
86,613 | public ResponseData<Boolean> createRawEvidenceWithSpecificSigner(String hashValue, String signature, String log, Long timestamp, String extraKey, String signer, String privateKey) {<NEW_LINE>List<String> hashValues = new ArrayList<>();<NEW_LINE>hashValues.add(hashValue);<NEW_LINE>List<String> signatures = new ArrayList... | signers = new ArrayList<>(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.