idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
943,671 | public Short implicitCast(Object value) throws IllegalArgumentException, ClassCastException {<NEW_LINE>if (value == null) {<NEW_LINE>return null;<NEW_LINE>} else if (value instanceof Short) {<NEW_LINE>return (Short) value;<NEW_LINE>} else if (value instanceof String) {<NEW_LINE>return Short.valueOf((String) value);<NEW... | throw new IllegalArgumentException("short value out of range: " + value); |
1,733,766 | // Linear interpolation of values in xVals at indices xInds to give values at indices xInds2<NEW_LINE>public static double[] interpolate(int[] xInds, double[] xVals, int[] xInds2) {<NEW_LINE>double[] xVals2 <MASK><NEW_LINE>assert xInds.length == xVals.length;<NEW_LINE>for (int i = 0; i < xInds2.length; i++) {<NEW_LINE>... | = new double[xInds2.length]; |
98,316 | public void run() {<NEW_LINE>SeleniumWrapper remote = getRemote();<NEW_LINE>try {<NEW_LINE>String domain = "http://" + getLocalHostName() + ":" + shell.getPort() + "/";<NEW_LINE>String <MASK><NEW_LINE>// Create the selenium instance and open the browser.<NEW_LINE>if (shell.getTopLogger().isLoggable(TreeLogger.TRACE)) {... | url = shell.getModuleUrl(moduleName); |
851,363 | /*<NEW_LINE><NEW_LINE>Structure:<NEW_LINE><NEW_LINE>struct Map {<NEW_LINE>INT length<NEW_LINE>BYTE flags = { 0x01 = all keys have the same type,<NEW_LINE>0x02 = all values have the same type }<NEW_LINE>if (flags has 0x01 set)<NEW_LINE>SHORT keyType<NEW_LINE>if (flags has 0x02 set)<NEW_LINE>SHORT valType<NEW_LINE><NEW_L... | reg = Serializer.readClass(data); |
10,215 | public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>assertArrayHasMinLengthAndAllElementsNotNull(sources, 2);<NEW_LINE>if (sources[0] instanceof GraphObject && sources[1] instanceof GraphObject) {<NEW_LINE>final Set<PropertyKey> m... | usage(ctx.isJavaScriptContext()); |
226,359 | private Object visitInheritDocInterfaces(ArrayList<IType> visited, IType currentType, ITypeHierarchy typeHierarchy) throws JavaModelException {<NEW_LINE>ArrayList<IType> toVisitChildren = new ArrayList<>();<NEW_LINE>IType[] superInterfaces = typeHierarchy.getSuperInterfaces(currentType);<NEW_LINE>for (int i = 0; i < su... | visitInheritDocInterfaces(visited, child, typeHierarchy); |
552,073 | final UpdateProvisionedProductPropertiesResult executeUpdateProvisionedProductProperties(UpdateProvisionedProductPropertiesRequest updateProvisionedProductPropertiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateProvisionedProductPropertiesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequ... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
165,753 | public List<? super PsiElement> process(@NotNull PsiClass psiClass, @Nullable String nameHint) {<NEW_LINE>final Optional<PsiClass> parentClass = getSupportedParentClass(psiClass);<NEW_LINE>final Optional<PsiAnnotation> builderAnnotation = parentClass.map(this::getSupportedAnnotation);<NEW_LINE>if (builderAnnotation.isP... | PsiAnnotation psiBuilderAnnotation = builderAnnotation.get(); |
534,555 | protected String encodeClasspath(IClasspathEntry[] classpath, IClasspathEntry[] referencedEntries, IPath outputLocation, boolean indent, Map unknownElements) throws JavaModelException {<NEW_LINE>try {<NEW_LINE>StringWriter writer = new StringWriter();<NEW_LINE>XMLWriter xmlWriter = new XMLWriter(writer, this, true);<NE... | startTag(ClasspathEntry.TAG_CLASSPATH, indent); |
744,562 | public Request<DeleteIdentityProviderRequest> marshall(DeleteIdentityProviderRequest deleteIdentityProviderRequest) {<NEW_LINE>if (deleteIdentityProviderRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DeleteIdentityProviderRequest)");<NEW_LINE>}<NEW_LINE>Request<DeleteId... | <DeleteIdentityProviderRequest>(deleteIdentityProviderRequest, "AmazonCognitoIdentityProvider"); |
1,028,987 | private void propagateDepth(Chunk adjChunk, Side side, boolean propagateExternal, Function<Vector3ic, Integer> indexProvider, BlockRegion edgeRegion, int[] depths) {<NEW_LINE>Vector3i adjPos = new Vector3i();<NEW_LINE>int[] adjDepth = new int[depths.length];<NEW_LINE>int dimA = (side == Side.LEFT || side == Side.RIGHT)... | rules.getValue(adjChunk, adjPos); |
719,757 | static RunConfigurationContext fromKnownTarget(TargetExpression target, BlazeCommandName command, PsiElement sourceElement) {<NEW_LINE>return new RunConfigurationContext() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public PsiElement getSourceElement() {<NEW_LINE>return sourceElement;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Overrid... | getCommandState().setCommand(command); |
1,135,869 | private SqlSource createSqlSource(Object parameterObject) {<NEW_LINE>try {<NEW_LINE>String sql;<NEW_LINE>if (parameterObject instanceof Map) {<NEW_LINE>int bindParameterCount = providerMethodParameterTypes.length - (providerContext == null ? 0 : 1);<NEW_LINE>if (bindParameterCount == 1 && providerMethodParameterTypes[I... | ) + "' because SqlProvider method arguments for '" + mapperMethod + "' is an invalid combination."); |
1,087,453 | void store(WizardDescriptor settings) {<NEW_LINE>File srcRoot = null;<NEW_LINE><MASK><NEW_LINE>if (srcPath.length() > 0) {<NEW_LINE>srcRoot = FileUtil.normalizeFile(new File(srcPath));<NEW_LINE>}<NEW_LINE>if (srcRoot != null)<NEW_LINE>UserProjectSettings.getDefault().setLastUsedImportLocation(srcRoot);<NEW_LINE>setting... | String srcPath = moduleLocationTextField.getText(); |
862,414 | private long findOffset(long beginTime, String metricFileName, String idxFileName, long offsetInIndex) throws Exception {<NEW_LINE>lastPosition.metricFileName = null;<NEW_LINE>lastPosition.indexFileName = null;<NEW_LINE>if (!new File(idxFileName).exists()) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>long beginSecond = be... | FileInputStream in = new FileInputStream(idxFileName); |
699,801 | final ListResolverQueryLogConfigsResult executeListResolverQueryLogConfigs(ListResolverQueryLogConfigsRequest listResolverQueryLogConfigsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listResolverQueryLogConfigsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
695,670 | private static StainVector parseStainVector(Locale locale, String name, String s) {<NEW_LINE>if (s == null)<NEW_LINE>return null;<NEW_LINE>s = s.trim();<NEW_LINE>if (s.length() == 0)<NEW_LINE>return null;<NEW_LINE>if (s.length() == 1) {<NEW_LINE>s = s.toLowerCase();<NEW_LINE>if (s.equals("h"))<NEW_LINE>return StainVect... | 1], vector[2]); |
1,843,127 | /* (non-Javadoc)<NEW_LINE>* @see org.openide.WizardDescriptor.InstantiatingIterator#initialize(org.openide.WizardDescriptor)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void initialize(WizardDescriptor descriptor) {<NEW_LINE>myWizard = descriptor;<NEW_LINE>myRestPanel = new RestPanel(descriptor);<NEW_LINE>Project pr... | Templates.setTargetFolder(myWizard, publicHtml); |
1,552,578 | public static void vertical(Kernel1D_F32 kernel, ImageBorder_F32 input, GrayF32 output) {<NEW_LINE>final float[] dataDst = output.data;<NEW_LINE>final float[] dataKer = kernel.data;<NEW_LINE>final int offset = kernel.getOffset();<NEW_LINE>final int kernelWidth = kernel.getWidth();<NEW_LINE>final <MASK><NEW_LINE>final i... | int width = output.getWidth(); |
1,102,145 | protected void processProgramVars() {<NEW_LINE>if (program.getLanguage().getProcessor() == Processor.findOrPossiblyCreateProcessor("PowerPC")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SymbolTable symbolTable = program.getSymbolTable();<NEW_LINE>int defaultPointerSize = program.getDefaultPointerSize();<NEW_LINE>DataType i... | argcData = data.getComponent(1); |
1,282,070 | public static void main(String[] args) {<NEW_LINE>final String USAGE = "To run this example, supply a resource arn\n" + "Ex: PutEvents <resource-arn>\n";<NEW_LINE>if (args.length != 1) {<NEW_LINE>System.out.println(USAGE);<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>String resource_arn = args[0];<NEW_LINE>final Amazon... | response = cwe.putEvents(request); |
849,797 | public static boolean usesScrollbars() {<NEW_LINE>if (usesScrollbars_ != null)<NEW_LINE>return usesScrollbars_;<NEW_LINE>if (!BrowseCap.isMacintosh()) {<NEW_LINE>usesScrollbars_ = true;<NEW_LINE>} else {<NEW_LINE>Element parent = Document.get().createElement("div");<NEW_LINE>parent.getStyle().setWidth(100, Unit.PX);<NE... | setWidth(100, Unit.PX); |
860,819 | private void refresh(Account account, Collection<PhoneNumberContact> contacts) {<NEW_LINE>for (Contact contact : account.getRoster().getWithSystemAccounts(PhoneNumberContact.class)) {<NEW_LINE>final Uri uri = contact.getSystemAccount();<NEW_LINE>if (uri == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final String num... | uri.toString() + " vanished from address book"); |
215,820 | public void run() {<NEW_LINE>Runtime rt = Runtime.getRuntime();<NEW_LINE><MASK><NEW_LINE>long maxMem = rt.maxMemory();<NEW_LINE>long freeMem = rt.freeMemory();<NEW_LINE>long usedMem = totalMem - freeMem;<NEW_LINE>double megs = 1024.0 * 1024;<NEW_LINE>MEM_TOTAL.put(U.time(), totalMem / megs);<NEW_LINE>MEM_USED.put(U.tim... | long totalMem = rt.totalMemory(); |
231,847 | public ShapedOreRecipe buildRotated() {<NEW_LINE>int fromRows = shape.size();<NEW_LINE>int toRows = shape.get(0).length();<NEW_LINE>StringBuilder[<MASK><NEW_LINE>for (int toRow = 0; toRow < toRows; toRow++) {<NEW_LINE>strings[toRow] = new StringBuilder();<NEW_LINE>}<NEW_LINE>for (String toAdd : shape) {<NEW_LINE>for (i... | ] strings = new StringBuilder[toRows]; |
1,491,716 | final UpdateMemberSessionResult executeUpdateMemberSession(UpdateMemberSessionRequest updateMemberSessionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateMemberSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | false), new UpdateMemberSessionResultJsonUnmarshaller()); |
992,155 | private void removeTextDecorationRecursive(Component cmp, CSSElement selector) {<NEW_LINE>if (cmp instanceof Container) {<NEW_LINE>Container cont = (Container) cmp;<NEW_LINE>for (int i = 0; i < cont.getComponentCount(); i++) {<NEW_LINE>removeTextDecorationRecursive(cont.getComponentAt(i), selector);<NEW_LINE>}<NEW_LINE... | ).setTextDecoration(Style.TEXT_DECORATION_NONE); |
1,439,783 | public ExecuteResult call() throws Exception {<NEW_LINE>ExecuteResult result = new ExecuteResult("Build Free SQL[" + entry.getKey() + "] Host");<NEW_LINE>progress.setOtherMessage(result.getTaskName());<NEW_LINE>List<GenTaskByFreeSql<MASK><NEW_LINE>if (currentTasks.size() < 1)<NEW_LINE>return result;<NEW_LINE>FreeSqlHo... | > currentTasks = entry.getValue(); |
1,424,235 | File loadLibraryFromJarToTemp(final String tmpDir) throws IOException {<NEW_LINE>InputStream is = null;<NEW_LINE>try {<NEW_LINE>// attempt to look up the static library in the jar file<NEW_LINE>String libraryFileName = jniLibraryFileName;<NEW_LINE>is = getClass().getClassLoader().getResourceAsStream(libraryFileName);<N... | File parentDir = new File(tmpDir); |
1,749,769 | public Result<List<String>> checkPendingReservations(Collection<TicketReservationWithTransaction> reservations, PaymentContext context, ZonedDateTime lastCheck) {<NEW_LINE>if (reservations.isEmpty()) {<NEW_LINE>return Result.success(List.of());<NEW_LINE>}<NEW_LINE>var options = bankTransferManager.options(context);<NEW... | REVOLUT_MANUAL_REVIEW).getValueAsBooleanOrDefault())); |
266,681 | private static String[] splitTableDataTag(String trTag) {<NEW_LINE>if (!StringUtils.isValidString(trTag))<NEW_LINE>return null;<NEW_LINE>List<String> dataList = new ArrayList<String>();<NEW_LINE>int index = 0;<NEW_LINE>Pattern p1 = Pattern.compile("<\\s*t[hd][^>]*>", Pattern.CASE_INSENSITIVE);<NEW_LINE>Pattern p2 = Pat... | null ? null : (String) data; |
1,633,666 | private ConsumerConfig createConsumerConfig() throws UnknownHostException {<NEW_LINE>Properties props = new Properties();<NEW_LINE>props.put("zookeeper.connect", mConfig.getZookeeperQuorum() + mConfig.getKafkaZookeeperPath());<NEW_LINE>props.put("group.id", mConfig.getKafkaGroup());<NEW_LINE>props.put("zookeeper.sessio... | "consumer.id", IdUtil.getConsumerId()); |
240,744 | default ECKey signatureToKey(byte[] messageHash, ECDSASignature signature) throws SignatureException {<NEW_LINE>int header = signature.getV() & 0xFF;<NEW_LINE>// The header byte: 0x1B = first key with even y, 0x1C = first key with odd y,<NEW_LINE>// 0x1D = second key with even y, 0x1E = second key with odd y<NEW_LINE>i... | recId, signature, messageHash, compressed); |
661,274 | public StringBuilder visitTypeVariable(TypeVariable t, Boolean p) {<NEW_LINE>Element e = t.asElement();<NEW_LINE>if (e != null) {<NEW_LINE>String name = e.getSimpleName().toString();<NEW_LINE>if (!CAPTURED_WILDCARD.equals(name))<NEW_LINE>return DEFAULT_VALUE.append(name);<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>DEFAULT_... | TypeMirror bound = t.getLowerBound(); |
1,442,183 | public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {<NEW_LINE>ConfigurableEnvironment environment = this.context.getEnvironment();<NEW_LINE>String customModuleList = initialP6SpyOptions.get("modulelist");<NEW_LINE>boolean isEnableLogging = environment.getProperty("spri... | ()).toUpperCase()); |
1,274,988 | private TreeCache buildAndStartTreeCache(String path, int depth) {<NEW_LINE>try {<NEW_LINE>String key = buildMapKey(path, depth);<NEW_LINE>TreeCache tc = treeCacheMap.get(key);<NEW_LINE>if (tc == null) {<NEW_LINE>tc = TreeCache.newBuilder(client, path).setMaxDepth(depth).setExecutor(new CloseableExecutorService(executo... | executorName, jobName, path, depth); |
1,527,014 | public static OnsMessageGetByMsgIdResponse unmarshall(OnsMessageGetByMsgIdResponse onsMessageGetByMsgIdResponse, UnmarshallerContext _ctx) {<NEW_LINE>onsMessageGetByMsgIdResponse.setRequestId(_ctx.stringValue("OnsMessageGetByMsgIdResponse.RequestId"));<NEW_LINE>onsMessageGetByMsgIdResponse.setHelpUrl(_ctx.stringValue("... | = new ArrayList<MessageProperty>(); |
869,772 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>getWindow().setStatusBarColor(0xFF000000);<NEW_LINE>getWindow().setNavigationBarColor(0xFF000000);<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {<NEW_LINE>getWindow().setNavigationBarDividerColor(0xFF... | .READ_EXTERNAL_STORAGE }, CropImageConsts.PICK_IMAGE_PERMISSIONS_REQUEST_CODE); |
471,017 | public TableMember unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TableMember tableMember = new TableMember();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | class).unmarshall(context)); |
934,725 | public ListChannelMembershipsResult listChannelMemberships(ListChannelMembershipsRequest listChannelMembershipsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listChannelMembershipsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics ... | awsRequestMetrics.endEvent(Field.ClientExecuteTime); |
1,719,996 | private void paintTextEffect(float xFrom, float xTo, int y, @Nullable ColorValue effectColor, @Nullable EffectType effectType, boolean allowBorder) {<NEW_LINE>if (effectColor == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>myGraphics.setColor(TargetAWT.to(effectColor));<NEW_LINE>int xStart = (int) xFrom;<NEW_LINE>int x... | .getFont(EditorFontType.PLAIN)); |
105,107 | static Type resolveTypeParam(Type typeParam, Map<TypeVariable, Type> resolvedTypeParameters, IndexView index) {<NEW_LINE>if (typeParam.kind() == Kind.TYPE_VARIABLE) {<NEW_LINE>return resolvedTypeParameters.getOrDefault(typeParam, typeParam);<NEW_LINE>} else if (typeParam.kind() == Kind.PARAMETERIZED_TYPE) {<NEW_LINE>Pa... | Type[typeParameters.size()]; |
1,106,246 | public List<TransferItem> list(final Session<?> session, final Path directory, final Local local, final ListProgressListener listener) throws BackgroundException {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug(String.format("List children for %s", directory));<NEW_LINE>}<NEW_LINE>if (directory.isSymbolicLink(... | cache.put(directory, list); |
1,736,631 | public static void main(String[] args) {<NEW_LINE>// Instantiate a client that will be used to call the service.<NEW_LINE>TextAnalyticsClient client = new TextAnalyticsClientBuilder().credential(new AzureKeyCredential("{key}")).endpoint("{endpoint}").buildClient();<NEW_LINE>// The texts that need be analyzed.<NEW_LINE>... | "Results of Azure Text Analytics \"Key Phrases Extraction\" Model, version: %s%n", keyPhrasesBatchResultCollection.getModelVersion()); |
1,046,984 | final StartServerResult executeStartServer(StartServerRequest startServerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startServerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,201,916 | private void addConstValTag(polyglot.ast.FieldDecl field, soot.SootField sootField) {<NEW_LINE>// logger.debug("adding constantval tag to field: "+field);<NEW_LINE>if (field.fieldInstance().constantValue() instanceof Integer) {<NEW_LINE>sootField.addTag(new IntegerConstantValueTag(((Integer) field.fieldInstance(<MASK><... | ).constantValue()))); |
230,069 | private void loadHeaderless(InputStream inStream, String encoding, boolean verbose) throws IOException, UnsupportedEncodingException {<NEW_LINE>int i;<NEW_LINE>DataInputStream in = new DataInputStream(new BufferedInputStream(inStream));<NEW_LINE>// int fileSize= (int) f.length();<NEW_LINE>// TODO: how robust is this??<... | targets[i] = thisArc & 1048575; |
1,228,251 | public void process(int row, float[] scores) {<NEW_LINE>int indexDisparity = imageDisparity.startIndex + row * imageDisparity.stride;<NEW_LINE>// Mark all pixels as invalid which can't be estimate due to disparityMin<NEW_LINE>for (int col = 0; col < disparityMin; col++) {<NEW_LINE>imageDisparity.data[<MASK><NEW_LINE>}<... | indexDisparity++] = (byte) disparityRange; |
505,476 | private Component buildEditor() {<NEW_LINE>if (times == null || times.isEmpty()) {<NEW_LINE>JPanel panel = new JPanel(new FlowLayout());<NEW_LINE>panel.add(new JLabel("No Data Available"));<NEW_LINE>return panel;<NEW_LINE>}<NEW_LINE>JPanel panel = new JPanel(new PairLayout(6, 10));<NEW_LINE>panel.add(new GDLabel(""));<... | valueField.setHorizontalAlignment(SwingConstants.RIGHT); |
737,921 | private static void loadCreativeTab() {<NEW_LINE>var id = new AtomicInteger(<MASK><NEW_LINE>var newTypes = new ArrayList<CreativeCategory>();<NEW_LINE>var tabs = CreativeModeTab.TABS;<NEW_LINE>var map = new HashMap<CreativeModeTab, CreativeCategory>(Unsafe.getStatic(CraftCreativeCategory.class, "NMS_TO_BUKKIT"));<NEW_L... | CreativeCategory.values().length); |
1,610,218 | private void invoiceLine(MRequest request, MInvoice invoice) {<NEW_LINE>AtomicInteger lineNo = new AtomicInteger(invoice.getLines().length);<NEW_LINE>Arrays.stream(request.getUpdates(null)).filter(requestUpdate -> requestUpdate.getQtyInvoiced() != null && requestUpdate.getQtyInvoiced().signum() != 0 && (requestUpdate.g... | "\n ").append(result)); |
944,091 | private void drawMap() {<NEW_LINE>System.out.println("MAP OF THE CITY OF HYATTSVILLE");<NEW_LINE>System.out.println();<NEW_LINE>System.out.println(" -----1-----2-----3-----4-----");<NEW_LINE>int k = 3;<NEW_LINE>for (int i = 1; i < 5; i++) {<NEW_LINE>System.out.println("-");<NEW_LINE>System.out.println("-");<NEW_LINE>Sy... | .print(gridPos[k]); |
5,496 | public void handleInboundConnect(@NotNull final ChannelHandlerContext ctx, @NotNull final CONNECT connect) {<NEW_LINE>final Channel channel = ctx.channel();<NEW_LINE>final ClientConnection clientConnection = channel.attr(ChannelAttributes.CLIENT_CONNECTION).get();<NEW_LINE>final String clientId = clientConnection.getCl... | > providers = interceptors.connectInboundInterceptorProviders(); |
1,636,583 | public PublishResponse handlePublishRequest(PublishRequest publishRequest) {<NEW_LINE>final ClusterState clusterState = publishRequest.getAcceptedState();<NEW_LINE>if (clusterState.term() != getCurrentTerm()) {<NEW_LINE>LOGGER.debug("handlePublishRequest: ignored publish request due to term mismatch (expected: [{}], ac... | ), clusterState.term()); |
1,470,191 | private Table buildTable(RestRequest req, GetSnapshotsResponse getSnapshotsResponse) {<NEW_LINE>Table table = getTableWithHeader(req);<NEW_LINE>if (getSnapshotsResponse.isFailed()) {<NEW_LINE>ElasticsearchException causes = null;<NEW_LINE>for (ElasticsearchException e : getSnapshotsResponse.getFailures().values()) {<NE... | addCell(snapshotStatus.reason()); |
1,313,839 | public UnidbgPointer onRegister(SvcMemory svcMemory, int svcNumber) {<NEW_LINE>try (Keystone keystone = new Keystone(KeystoneArchitecture.Arm, KeystoneMode.Arm)) {<NEW_LINE>KeystoneEncoded encoded = keystone.assemble(// manipulated stack in dlopen<NEW_LINE>Arrays.// manipulated stack in dlopen<NEW_LINE>asList(// manipu... | ] code = encoded.getMachineCode(); |
967,061 | private void filterPrunedResultBySelectedPartitions(List<PartPrunedResult> resultList) {<NEW_LINE>if (this.partitions != null && resultList.size() > 1) {<NEW_LINE>throw GeneralUtil.nestedException(new TddlRuntimeException(ErrorCode.ERR_EXECUTOR, "Not support to do partition selection with join pushed"));<NEW_LINE>}<NEW... | TddlRuntimeException(ErrorCode.ERR_EXECUTOR, "PARTITION () clause on non partitioned table"); |
1,845,796 | protected Attachment executeInternal(CommandContext commandContext) {<NEW_LINE>AttachmentEntity attachment = commandContext.getAttachmentEntityManager().create();<NEW_LINE>attachment.setName(attachmentName);<NEW_LINE>attachment.setProcessInstanceId(processInstanceId);<NEW_LINE>attachment.setTaskId(taskId);<NEW_LINE>att... | getClock().getCurrentTime()); |
558,199 | public TestSettings copyAndOverrideProviderSettings(TestSettings origSettings, String oldProvider, String newProivder, String newResource) throws Exception {<NEW_LINE>TestSettings updatedTestSettings = origSettings.copyTestSettings();<NEW_LINE>updatedTestSettings.setAuthorizeEndpt(origSettings.getAuthorizeEndpt().repla... | .replaceAll(oldProvider, newProivder)); |
1,846,257 | void flush(RetryManager<AppendRowsResponse, Context<AppendRowsResponse>> retryManager) throws Exception {<NEW_LINE>if (pendingMessages.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ProtoRows.Builder inserts = ProtoRows.newBuilder();<NEW_LINE>for (ByteString m : pendingMessages) {<NEW_LINE>inserts.addSerialize... | ProtoRows protoRows = inserts.build(); |
702,585 | protected void buildQueryParams(StringBuilder body, HttpMethod httpMethod, List<VariableTree> paramList, TreeMaker maker) {<NEW_LINE>Map<String, String> queryParams = httpMethod.getQueryParams();<NEW_LINE>if (queryParams.size() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (Entry<String, String> entry : queryParams.... | clientParam = getClientParamName(paramName, paramList); |
784,034 | public static void interpretDex2Oat(String dexFilePath, String oatFilePath) throws IOException {<NEW_LINE>String targetISA = null;<NEW_LINE>try {<NEW_LINE>targetISA = getCurrentInstructionSet();<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>final File oatFile = new File(oatFilePath)... | throw new IOException("dex2oat works unsuccessfully, exit code: " + ret); |
1,113,011 | public void onActivityResult(int requestCode, int resultCode, Intent intent) {<NEW_LINE>super.<MASK><NEW_LINE>if (onActivityResultCallbackContext != null && intent != null) {<NEW_LINE>intent.putExtra("requestCode", requestCode);<NEW_LINE>intent.putExtra("resultCode", resultCode);<NEW_LINE>PluginResult result = new Plug... | onActivityResult(requestCode, resultCode, intent); |
1,658,590 | private void addDragSupport(final TreeViewer viewer) {<NEW_LINE>int ops = DND.DROP_COPY;<NEW_LINE>final Transfer[] transfers = new Transfer[] { LocalSelectionTransfer.getTransfer() };<NEW_LINE>DragSourceAdapter listener = new DragSourceAdapter() {<NEW_LINE><NEW_LINE>// @Override<NEW_LINE>// public void dragSetData(Drag... | setSelection(new StructuredSelection(elements)); |
555,440 | private static boolean isInsertSeq(ShardingService service, String stmt, SchemaConfig schema) throws SQLException {<NEW_LINE>SQLStatementParser parser = new MySqlStatementParser(stmt);<NEW_LINE>MySqlInsertStatement statement = (MySqlInsertStatement) parser.parseStatement();<NEW_LINE>String schemaName = schema == null ?... | getUser(), schemaName, tableSource); |
623,017 | public void warm(LeafReader reader) throws IOException {<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>int indexedCount = 0;<NEW_LINE>int docValuesCount = 0;<NEW_LINE>int normsCount = 0;<NEW_LINE>for (FieldInfo info : reader.getFieldInfos()) {<NEW_LINE>if (info.getIndexOptions() != IndexOptions.NONE) {... | reader.getNormValues(info.name); |
1,769,573 | public Map<HugeKeys, Object> writeEdgeLabel(EdgeLabel edgeLabel) {<NEW_LINE>HugeGraph graph = edgeLabel.graph();<NEW_LINE>assert graph != null;<NEW_LINE>Map<HugeKeys, Object> map = new LinkedHashMap<>();<NEW_LINE>map.put(HugeKeys.ID, edgeLabel.id().asLong());<NEW_LINE>map.put(HugeKeys.NAME, edgeLabel.name());<NEW_LINE>... | ENABLE_LABEL_INDEX, edgeLabel.enableLabelIndex()); |
594,742 | private void parseDataLine(String data) {<NEW_LINE>String address = ParsingUtils.parseAddress(data);<NEW_LINE>if (!checkNewMessage(address, ParsingUtils.parseCounter(data))) {<NEW_LINE>logger.warn("Received message from " + address + " more than once");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>EMType type = ParsingUtils.pa... | , ParsingUtils.parseCurrentValue(data)); |
1,614,055 | private void onBlocked() {<NEW_LINE>if (DEBUG) {<NEW_LINE>Log.d(TAG, "onBlocked() called");<NEW_LINE>}<NEW_LINE>if (!isProgressLoopRunning()) {<NEW_LINE>startProgressLoop();<NEW_LINE>}<NEW_LINE>// if we are e.g. switching players, hide controls<NEW_LINE>hideControls(DEFAULT_CONTROLS_DURATION, 0);<NEW_LINE>binding.playb... | setImageResource(R.drawable.ic_play_arrow); |
384,722 | public void run(RegressionEnvironment env) {<NEW_LINE>runSequenceMicro(env, "2013-08-23T08:05:00.000u000", "select * from pattern [ every timer:at(*, *, *, *, *, *, *, *, 200) ]", new String[] { "2013-08-23T08:05:00.000u200", "2013-08-23T08:05:00.001u200", "2013-08-23T08:05:00.002u200", "2013-08-23T08:05:00.003u200" })... | , "2013-08-23T08:05:00.010u000", "2013-08-23T08:05:00.015u000", "2013-08-23T08:05:00.020u000" }); |
131,771 | public Connection newConnection(Connector connector, EndPoint endPoint) {<NEW_LINE>ServerSessionListener listener = newSessionListener(connector, endPoint);<NEW_LINE>Generator generator = new Generator(connector.getByteBufferPool(), isUseOutputDirectByteBuffers(), getMaxDynamicTableSize(), getMaxHeaderBlockFragment());... | session.setMaxLocalStreams(getMaxConcurrentStreams()); |
864,920 | private void decreaseShardLimits(ShardId shardId, LongSupplier shardCurrentBytesSupplier, LongSupplier shardLimitSupplier, BiPredicate<Long, Long> updateShardLimitPredicate, long shardBaseLimit) {<NEW_LINE>long currentShardLimit;<NEW_LINE>long newShardLimit;<NEW_LINE>do {<NEW_LINE>currentShardLimit = shardLimitSupplier... | long shardCurrentBytes = shardCurrentBytesSupplier.getAsLong(); |
1,399,238 | protected void activate(MovementContext context, BlockPos pos) {<NEW_LINE>if (!spawnEggsRegistered) {<NEW_LINE>spawnEggsRegistered = true;<NEW_LINE>IMovedDispenseItemBehaviour.initSpawnEggs();<NEW_LINE>}<NEW_LINE>DispenseItemLocation location = getDispenseLocation(context);<NEW_LINE>if (location.isEmpty()) {<NEW_LINE>c... | ContraptionBlockSource(context, pos, clostestFacing); |
956,223 | protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>monitor.beginTask("Load Profile....", IProgressMonitor.UNKNOWN);<NEW_LINE>if (data == null || (gxid != 0 && txid != gxid)) {<NEW_LINE>if (serverId == 0) {<NEW_LINE>Set<Integer> serverSet = ServerManager.getInstance().getOpenServerList();<NEW_LINE>for (int serve... | secId = Hexa32.toString32(txid); |
179,015 | private String unescapeName(String name) {<NEW_LINE>if (name == null || name.length() <= 0) {<NEW_LINE>return name;<NEW_LINE>}<NEW_LINE>if (name.charAt(0) != '`') {<NEW_LINE>return name;<NEW_LINE>}<NEW_LINE>if (name.charAt(name.length() - 1) != '`') {<NEW_LINE>throw new IllegalArgumentException("id start with a '`' mus... | = name.length() - 1; |
1,187,116 | private DateTimeResolutionResult parseWeekOfYear(String text, LocalDateTime referenceDate) {<NEW_LINE>DateTimeResolutionResult ret = new DateTimeResolutionResult();<NEW_LINE>String trimmedText = text.trim().toLowerCase();<NEW_LINE>ConditionalMatch match = RegexExtension.matchExact(this.config.getWeekOfYearRegex(), trim... | "order").value.toLowerCase(); |
1,541,432 | private void enforceChildDistribution(DistributionSpec distributionSpec, GroupExpression child, PhysicalPropertySet childOutputProperty) {<NEW_LINE>double childCosts = child.getCost(childOutputProperty);<NEW_LINE>Group childGroup = child.getGroup();<NEW_LINE>if (child.getOp() instanceof PhysicalDistributionOperator) {<... | enforcer.setOutputPropertySatisfyRequiredProperty(newOutputProperty, newOutputProperty); |
1,020,151 | public <T> CosmosPagedFlux<T> queryItemsOnEncryptedProperties(SqlQuerySpecWithEncryption sqlQuerySpecWithEncryption, CosmosQueryRequestOptions options, Class<T> classType) {<NEW_LINE>if (options == null) {<NEW_LINE>options = new CosmosQueryRequestOptions();<NEW_LINE>}<NEW_LINE>if (specWithEncryptionAccessor.getEncrypti... | ), options, classType, false); |
1,311,931 | private void handleNamedEvent(FacesConfigImpl facesConfig, Set<Class<?>> classes) {<NEW_LINE>for (Class<?> clazz : classes) {<NEW_LINE>NamedEvent namedEvent = (NamedEvent) clazz.getAnnotation(NamedEvent.class);<NEW_LINE>if (namedEvent != null) {<NEW_LINE>// Can only apply @NamedEvent to ComponentSystemEvent subclasses.... | setShortName(namedEvent.shortName()); |
1,755,421 | protected void updateContent() {<NEW_LINE>final FavouritesHelper favorites = getMyApplication().getFavoritesHelper();<NEW_LINE>final FavouritePoint homePoint = favorites.<MASK><NEW_LINE>final FavouritePoint workPoint = favorites.getSpecialPoint(FavouritePoint.SpecialPointType.WORK);<NEW_LINE>final TextView homeDescr = ... | getSpecialPoint(FavouritePoint.SpecialPointType.HOME); |
1,575,886 | public <T> EventStreamWriter<T> createEventWriter(String writerId, String streamName, Serializer<T> s, EventWriterConfig config) {<NEW_LINE>NameUtils.validateWriterId(writerId);<NEW_LINE>log.info("Creating writer: {} for stream: {} with configuration: {}", writerId, streamName, config);<NEW_LINE>Stream stream <MASK><NE... | = new StreamImpl(scope, streamName); |
1,470,632 | public void execute() throws IOException {<NEW_LINE>loadConfigIfNeeded(<MASK><NEW_LINE>SeleniumBrowserFactory browserFactory = new SeleniumBrowserFactory();<NEW_LINE>Browser browser = browserFactory.openBrowser();<NEW_LINE>try {<NEW_LINE>if (dumpArguments.getUrl() == null || dumpArguments.getUrl().isEmpty()) {<NEW_LINE... | getDumpArguments().getConfig()); |
153,104 | public static void main(String[] args) throws IOException, InterruptedException {<NEW_LINE>System.out.printf("\n\n HOT RELOAD EXAMPLE \n\n");<NEW_LINE>Util.save(target, new Properties() {<NEW_LINE><NEW_LINE>{<NEW_LINE>setProperty("someValue", "10");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>AutoReloadConfig cfg = ConfigFactory.... | + new Date() + " \n"); |
297,407 | public static void raw(HuobiExchange exchange, HuobiMarketDataService marketDataService) throws IOException {<NEW_LINE>List<HuobiTicker> tickers = new ArrayList<>();<NEW_LINE>for (CurrencyPair cp : exchange.getExchangeMetaData().getCurrencyPairs().keySet()) {<NEW_LINE>if (cp.counter == Currency.USDT) {<NEW_LINE>tickers... | , t.toString())); |
184,199 | public void visitModule(ModuleNode node) {<NEW_LINE>// start fresh<NEW_LINE>runMethod = null;<NEW_LINE>if (node.getPackage() != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>for (ImportNode importNode : getAllImportNodes(node)) {<NEW_LINE>visitImport(importNode);<NEW_LINE>}<NEW_LINE>for (ClassNode classNode : node.getCla... | visitPackage(node.getPackage()); |
97,931 | private void _getImage(Uri uri, ResizeOptions resizeOptions, final ImageCallback imageCallback) {<NEW_LINE>BaseBitmapDataSubscriber dataSubscriber = new BaseBitmapDataSubscriber() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void onNewResultImpl(Bitmap bitmap) {<NEW_LINE>if (bitmap != null) {<NEW_LINE>if (bitmap.g... | ImagePipeline imagePipeline = Fresco.getImagePipeline(); |
1,018,019 | private void appendLocationChecks(@NonNull final BPartnerLocationQuery query, @NonNull final IQueryBuilder<I_C_BPartner_Location> bpLocationQueryBuilder) {<NEW_LINE>final boolean <MASK><NEW_LINE>if (skipLocationChecks) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final IQueryBuilder<I_C_Location> locationIQueryBuilder = quer... | skipLocationChecks = !query.applyLocationChecks(); |
1,797,743 | public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {<NEW_LINE>if (game.getState().getZone(objectId) != Zone.EXILED || !game.getState().getCardState(objectId).isFaceDown()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// TODO: Does not handle if a player had the control of the la... | card = game.getCard(objectId); |
512,310 | protected void writeToFile(File file) throws IOException {<NEW_LINE>try (CSVPrinter printer = new CSVPrinter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8), STRATEGY)) {<NEW_LINE>ITreeContentProvider provider = (ITreeContentProvider) viewer.getContentProvider();<NEW_LINE>int depth = depth(pr... | path = new LinkedList<>(); |
1,737,026 | public Response<Void> deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not val... | format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); |
346,128 | public void apply(Traversal.Admin<?, ?> traversal) {<NEW_LINE>for (final GraphStep originalGraphStep : TraversalHelper.getStepsOfClass(GraphStep.class, traversal)) {<NEW_LINE>final ScanFusionStep<?, ?> scanFusionStep = new ScanFusionStep<>(originalGraphStep);<NEW_LINE>TraversalHelper.replaceStep(originalGraphStep, scan... | > currentStep = scanFusionStep.getNextStep(); |
488,028 | public void onReceive(final Context context, Intent intent) {<NEW_LINE>Log.d(TAG, "Package changed: " + intent);<NEW_LINE>if ((ACTION_PACKAGE_REMOVED.contains(intent.getAction()) && intent.getBooleanExtra(EXTRA_DATA_REMOVED, false) && !intent.getBooleanExtra(EXTRA_REPLACING, false)) || ACTION_PACKAGE_FULLY_REMOVED.cont... | null, null).deleted != null; |
806,314 | private void deserializeFromReader(MLogReader mLogReader, Map<IStorageGroupMNode, List<IMeasurementMNode>> sgMeasurementMap) throws IOException {<NEW_LINE>Deque<IMNode> nodeStack = new ArrayDeque<>();<NEW_LINE>IMNode node = null;<NEW_LINE>List<IMeasurementMNode> measurementMNodeList = new LinkedList<>();<NEW_LINE>while... | add(node.getAsMeasurementMNode()); |
788,635 | private void populateHandlers() {<NEW_LINE>ListIterator<String> listIterator = handlerClasses.listIterator();<NEW_LINE>final int[] handlerType = new int[] { WSHandlerDialog.JAXWS_LOGICAL_HANDLER };<NEW_LINE>boolean firstIteration = true;<NEW_LINE>while (listIterator.hasNext()) {<NEW_LINE>String handlerClass = listItera... | ).setSelectionInterval(0, 0); |
1,439,992 | public final <K> Map<K, ?> toMap(Supplier<? extends K> keySupplier1, Supplier<? extends K> keySupplier2, Supplier<? extends K> keySupplier3, Supplier<? extends K> keySupplier4, Supplier<? extends K> keySupplier5, Supplier<? extends K> keySupplier6, Supplier<? extends K> keySupplier7, Supplier<? extends K> keySupplier8,... | keySupplier14.get(), v14); |
311,404 | public void update(float delta) {<NEW_LINE>if (enableAutomaticTimeDilation && lastCheckedAutomaticTimeDilation < time.getRealTimeInMs()) {<NEW_LINE>lastCheckedAutomaticTimeDilation = time.getRealTimeInMs() + CHECK_AUTOMATIC_TIME_DILATION_MS;<NEW_LINE>// attempt to maintain the target delta by slowing down time in gener... | send(new TimeResynchEvent(lastGameTimeDilationValue)); |
786,920 | private static boolean isMemberNullable(Model model, MemberShape member) {<NEW_LINE>Shape container = model.getShape(member.getContainer<MASK><NEW_LINE>// Ignore broken models in this index. Other validators handle these checks.<NEW_LINE>if (container == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>switch(contain... | ()).orElse(null); |
1,288,517 | public DataType toDataType() throws DuplicateNameException, IOException {<NEW_LINE>Structure structure = new StructureDataType("ext4_inode", 0);<NEW_LINE>structure.add(WORD, "i_mode", null);<NEW_LINE>structure.add(WORD, "i_uid", null);<NEW_LINE>structure.add(DWORD, "i_size_lo", null);<NEW_LINE>structure.add(DWORD, "i_a... | add(DWORD, "i_crtime", null); |
1,582,589 | public static ChannelConfig defaultChannelConfig(String listenAddressName) {<NEW_LINE>ChannelConfig config = new ChannelConfig();<NEW_LINE>config.add(new ChannelConfigValue<>(CommonChannelConfigKeys.maxConnections, chooseIntChannelProperty(listenAddressName, "connection.max", CommonChannelConfigKeys.maxConnections.defa... | , StripUntrustedProxyHeadersHandler.AllowWhen.NEVER)); |
1,357,716 | public static ModifyContactFlowResponse unmarshall(ModifyContactFlowResponse modifyContactFlowResponse, UnmarshallerContext context) {<NEW_LINE>modifyContactFlowResponse.setRequestId(context.stringValue("ModifyContactFlowResponse.RequestId"));<NEW_LINE>modifyContactFlowResponse.setSuccess(context.booleanValue("ModifyCo... | (context.integerValue("ModifyContactFlowResponse.HttpStatusCode")); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.