idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
633,246 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (channel != null) {<NEW_LINE>channel.writeAndFlush(<MASK><NEW_LINE>}<NEW_LINE>De... | new NetworkMessage("+##Received OK\n", remoteAddress)); |
717,776 | public int callRemoveElement(String instanceId, String ref) {<NEW_LINE>if (TextUtils.isEmpty(instanceId) || TextUtils.isEmpty(ref)) {<NEW_LINE>if (WXEnvironment.isApkDebugable()) {<NEW_LINE>WXLogUtils.d("[WXBridgeManager] call callRemoveElement arguments is null");<NEW_LINE>}<NEW_LINE>WXExceptionUtils.commitCriticalExc... | (mLodBuilder.substring(0)); |
798,032 | public static GroupRepresentation toRepresentation(GroupModel group, boolean full) {<NEW_LINE>GroupRepresentation rep = new GroupRepresentation();<NEW_LINE>rep.<MASK><NEW_LINE>rep.setName(group.getName());<NEW_LINE>rep.setPath(buildGroupPath(group));<NEW_LINE>if (!full)<NEW_LINE>return rep;<NEW_LINE>// Role mappings<NE... | setId(group.getId()); |
501,313 | public boolean isEnabled(Object sender) {<NEW_LINE>if (sender instanceof JTableHeader) {<NEW_LINE>JTableHeader th = (JTableHeader) sender;<NEW_LINE>TableColumnModel cm = th.getColumnModel();<NEW_LINE>if (cm.getColumnCount() <= 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String key = getName();<NEW_LINE>BasicTableHe... | getUI(), BasicTableHeaderUI.class); |
183,898 | private static GeneralDataset<String, String> generateFeatureVectors(Properties props) throws Exception {<NEW_LINE>GeneralDataset<String, String> dataset = new Dataset<>();<NEW_LINE>Dictionaries dict = new Dictionaries(props);<NEW_LINE>MentionExtractor mentionExtractor = new CoNLLMentionExtractor(dict, props, new Seman... | gold_heads.add(gold_men.headWord); |
940,577 | public static ModbusTransaction createTransactionForEndpoint(ModbusSlaveEndpoint endpoint, ModbusSlaveConnection connection) {<NEW_LINE>ModbusTransaction transaction = endpoint.accept(new ModbusSlaveEndpointVisitor<ModbusTransaction>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>@NonNull<NEW_LINE>public ModbusTransaction v... | .setConnection((TCPMasterConnection) connection); |
1,130,637 | private static void backslashreplace_internal(int start, int end, String object, StringBuilder replacement) {<NEW_LINE>for (Iterator<Integer> iter = new StringSubsequenceIterator(object, start, end, 1); iter.hasNext(); ) {<NEW_LINE>int c = iter.next();<NEW_LINE>replacement.append('\\');<NEW_LINE>if (c >= 0x00010000) {<... | (hexdigits[c & 0xf]); |
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(<MASK><NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>CompoundNumber minIdxs = null;<NEW_LINE>for (int i... | ) == 0 ? -1 : 0; |
1,732,855 | public <E extends Entity> ObjectStream<IdBox<List<E>>> streamEntityGroups(EntityQuery<E> query, TypedName<Long> grpCol) {<NEW_LINE>EntityCollection data = storage.get(query.getEntityType());<NEW_LINE>if (data == null) {<NEW_LINE>return ObjectStreams.empty();<NEW_LINE>}<NEW_LINE>Map<Long, List<Entity>> groups = data.gro... | stream().filter(query); |
1,026,890 | public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {<NEW_LINE>// Special case method invocations for name translation.<NEW_LINE>// Specifically to deal with methods mirrors.<NEW_LINE>String newOwner = owner;<NEW_LINE>int newOpcode = opcode;<NEW_LINE>String newDesc = ... | newOpcode, newOwner, name, newDesc); |
492,753 | private boolean isProtectedSignAround(Location searchBlock, LocalPlayer player) {<NEW_LINE>Location side;<NEW_LINE>Boolean res;<NEW_LINE>side = searchBlock;<NEW_LINE>res = isProtectedSign(side, player);<NEW_LINE>if (res != null && res)<NEW_LINE>return res;<NEW_LINE>side = searchBlock.setX(<MASK><NEW_LINE>res = isProtec... | searchBlock.getX() - 1); |
948,664 | protected IntervalsSource analyzeSynonyms(TokenStream ts, int maxGaps, boolean ordered) throws IOException {<NEW_LINE>List<IntervalsSource> terms = new ArrayList<>();<NEW_LINE>List<IntervalsSource> synonyms = new ArrayList<>();<NEW_LINE>TermToBytesRefAttribute bytesAtt = ts.addAttribute(TermToBytesRefAttribute.class);<... | int posInc = posAtt.getPositionIncrement(); |
184,154 | public GetTagValuesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetTagValuesResult getTagValuesResult = new GetTagValuesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.get... | String currentParentElement = context.getCurrentParentElement(); |
656,889 | public CreateFleetResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateFleetResult createFleetResult = new CreateFleetResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurr... | String currentParentElement = context.getCurrentParentElement(); |
96,760 | final CreateDeliverabilityTestReportResult executeCreateDeliverabilityTestReport(CreateDeliverabilityTestReportRequest createDeliverabilityTestReportRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDeliverabilityTestReportRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEven... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
563,213 | public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {<NEW_LINE>SimpleMetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory(applicationContext);<NEW_LINE>DefaultListableBeanFactory defaultListableBeanFactory = (DefaultListableBeanFactory) beanFactory;<NEW_LINE>String r... | logger.debug("Scanning '{}' for JSON-RPC service interfaces.", resolvedPath); |
996,902 | public static void applyOptions(boolean holdConsole, boolean isReport) {<NEW_LINE>int style = Font.PLAIN;<NEW_LINE>if (ConfigOptions.bBold.booleanValue()) {<NEW_LINE>style += Font.BOLD;<NEW_LINE>}<NEW_LINE>if (ConfigOptions.bItalic.booleanValue()) {<NEW_LINE>style += Font.ITALIC;<NEW_LINE>}<NEW_LINE>GC.font = new Font(... | (ConfigUtil.parseBufferSize(sFileBuffer)); |
1,587,801 | public void drawScreen(int mouseX, int mouseY, float par3) {<NEW_LINE>super.<MASK><NEW_LINE>int left = this.guiLeft;<NEW_LINE>int top = this.guiTop;<NEW_LINE>GlStateManager.disableDepth();<NEW_LINE>GL11.glPushMatrix();<NEW_LINE>GL11.glTranslatef(left, top, 0.0F);<NEW_LINE>GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);<N... | drawScreen(mouseX, mouseY, par3); |
496,886 | private static void fdctCol(int[] block, int off) {<NEW_LINE>int z0 = block[off + 0] - block[off + 56];<NEW_LINE>int z1 = block[off + 8] - block[off + 48];<NEW_LINE>int z2 = block[off + 16] - block[off + 40];<NEW_LINE>int z3 = block[off + 24] - block[off + 32];<NEW_LINE>int z4 = block[off + 0] + block[off + 56];<NEW_LI... | * C2 + ROUND_COL) >> SHIFT_COL; |
1,312,513 | protected boolean readNodeChild(org.w3c.dom.Node childNode, String childNodeName, String childNodeValue, java.util.Map namespacePrefixes) {<NEW_LINE>// assert childNodeName == childNodeName.intern()<NEW_LINE>if ("schema-type-namespace".equals(childNodeName)) {<NEW_LINE>_SchemaTypeNamespace = childNodeValue;<NEW_LINE>} ... | || "1".equals(childNodeValue)); |
1,362,933 | public static <S, T> boolean corresponds(OrderedIterable<T> o1, OrderedIterable<S> o2, Predicate2<? super T, ? super S> predicate) {<NEW_LINE>if (o1.size() != o2.size()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (o1 instanceof RandomAccess) {<NEW_LINE>return RandomAccessListIterate.corresponds((List<T<MASK><NEW_L... | >) o1, o2, predicate); |
763,941 | public Observable<ServiceResponseWithHeaders<Page<NodeFile>, FileListFromTaskHeaders>> listFromTaskNextWithServiceResponseAsync(final String nextPageLink, final FileListFromTaskNextOptions fileListFromTaskNextOptions) {<NEW_LINE>return listFromTaskNextSinglePageAsync(nextPageLink, fileListFromTaskNextOptions).concatMap... | (listFromTaskNextWithServiceResponseAsync(nextPageLink, fileListFromTaskNextOptions)); |
947,063 | protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {<NEW_LINE>super.<MASK><NEW_LINE>if (resultCode == RESULT_OK) {<NEW_LINE>if (requestCode == SUBREDDIT_SELECTION_REQUEST_CODE) {<NEW_LINE>if (data != null) {<NEW_LINE>if (subreddits == null) {<NEW_LINE>subreddits = new ArrayList<>();... | onActivityResult(requestCode, resultCode, data); |
1,176,452 | public void mouseMoved(MouseEvent e, float scale) {<NEW_LINE>var xpos = AppPreferences.getDownScaled(e.getX(), scale);<NEW_LINE>var ypos = AppPreferences.getDownScaled(e.getY(), scale);<NEW_LINE>xpos = Math.max(xpos, 0);<NEW_LINE>xpos = Math.min(xpos, BoardManipulator.IMAGE_WIDTH - 1);<NEW_LINE>ypos = Math.max(ypos, 0)... | selected.getRectangle(), scale); |
1,758,365 | private void fillMetaDataForBinlogSplit(BinlogSplitMetaEvent metadataEvent) {<NEW_LINE>MySqlBinlogSplit binlogSplit = uncompletedBinlogSplits.<MASK><NEW_LINE>if (binlogSplit != null) {<NEW_LINE>final int receivedMetaGroupId = metadataEvent.getMetaGroupId();<NEW_LINE>final int expectedMetaGroupId = getNextMetaGroupId(bi... | get(metadataEvent.getSplitId()); |
99,470 | protected void processSubElement(XMLEventReader xmlEventReader, IDPSSODescriptorType target, SAMLMetadataQNames element, StartElement elementDetail) throws ParsingException {<NEW_LINE>switch(element) {<NEW_LINE>case SINGLE_SIGNON_SERVICE:<NEW_LINE>target.addSingleSignOnService(SAMLSingleSignOnServiceParser.getInstance(... | ().parse(xmlEventReader)); |
1,678,026 | final GetGeneratedCodeJobResult executeGetGeneratedCodeJob(GetGeneratedCodeJobRequest getGeneratedCodeJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getGeneratedCodeJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
588,490 | private IsoTO convertIsoToCephIfNeeded(final IsoTO to) {<NEW_LINE>if (to == null || !to.getPath().startsWith(VolumeTO.CEPH)) {<NEW_LINE>return to;<NEW_LINE>}<NEW_LINE>CephPrimaryStorageVO pri = new Callable<CephPrimaryStorageVO>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>@Transactional(readOnly = true)<NEW_LINE>public C... | setPort(arg.getMonPort()); |
1,319,415 | protected boolean gt(final Object o1, final Object o2) {<NEW_LINE>if (o1 != null && o2 == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if ((o1 == null && o2 != null) || (o1 == null && o2 == null)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (o1 instanceof Number && o2 instanceof Number) {<NEW_LINE>return compa... | , (Boolean) o2) > 0; |
1,008,450 | public void listScopes(Controller.ScopesRequest request, StreamObserver<Controller.ScopesResponse> responseObserver) {<NEW_LINE>RequestTag requestTag = requestTracker.initializeAndTrackRequestTag(controllerService.nextRequestId(), LIST_SCOPES);<NEW_LINE>log.info(requestTag.getRequestId(), "listScope called.");<NEW_LINE... | ()).build()); |
630,853 | private List<NameValueCountPair> listCreatorUnitPair(Business business, EffectivePerson effectivePerson) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(TaskCompleted.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(St... | ), effectivePerson.getDistinguishedName()); |
393,013 | public static EsMajorVersion parse(String version) {<NEW_LINE>if (version.startsWith("0.")) {<NEW_LINE>return new EsMajorVersion((byte) 0, version);<NEW_LINE>}<NEW_LINE>if (version.startsWith("1.")) {<NEW_LINE>return new EsMajorVersion((byte) 1, version);<NEW_LINE>}<NEW_LINE>if (version.startsWith("2.")) {<NEW_LINE>ret... | ((byte) 7, version); |
853,285 | private static List<String> updateStructuredComments(final String finalContigColumnName, final String finalStartColumnName, final String finalEndColumnName, final List<String> currentComments) {<NEW_LINE>Utils.nonNull(currentComments);<NEW_LINE>Utils.validateArg(!StringUtils.isEmpty(finalContigColumnName), "Contig colu... | commentsToWrite.add(START_COL_COMMENT + finalStartColumnName); |
1,134,008 | private static void migrateOldConnectors(Map<String, String> values, Log log) {<NEW_LINE>Map<String, Matcher> oldConnectors = new HashMap<>();<NEW_LINE>values.forEach((setting, value) -> {<NEW_LINE>Matcher <MASK><NEW_LINE>if (matcher.find()) {<NEW_LINE>oldConnectors.put(setting, matcher);<NEW_LINE>}<NEW_LINE>});<NEW_LI... | matcher = oldConnector.matcher(setting); |
1,794,988 | public void processElement(ProcessContext c) throws IOException, ExecutionException, InterruptedException {<NEW_LINE>CatalogName parent = CatalogName.of(projectId, "global", catalogName);<NEW_LINE>ArrayList<CatalogItem> catalogItems = new ArrayList<>();<NEW_LINE>for (GenericJson element : c.element().getValue()) {<NEW_... | setInputConfig(inputConfig).build(); |
1,162,269 | final CreateHITTypeResult executeCreateHITType(CreateHITTypeRequest createHITTypeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createHITTypeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
432,624 | public static DescribeGtmLogsResponse unmarshall(DescribeGtmLogsResponse describeGtmLogsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGtmLogsResponse.setRequestId(_ctx.stringValue("DescribeGtmLogsResponse.RequestId"));<NEW_LINE>describeGtmLogsResponse.setTotalItems(_ctx.integerValue("DescribeGtmLogsResponse.To... | ("DescribeGtmLogsResponse.Logs[" + i + "].OperTime")); |
1,652,482 | public static void main(String[] args) {<NEW_LINE>LinkedListNode lA1 = new LinkedListNode(3, null, null);<NEW_LINE>LinkedListNode lA2 = new LinkedListNode(1, null, lA1);<NEW_LINE>LinkedListNode lA3 = new LinkedListNode(5, null, lA2);<NEW_LINE>LinkedListNode lB1 = new LinkedListNode(5, null, null);<NEW_LINE>LinkedListNo... | " = " + (l1 + l2)); |
1,537,202 | private void predictCollisions(ParticleWithTemperature particle, double limit) {<NEW_LINE>if (particle == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < particles.length; i++) {<NEW_LINE>double deltaTime = particle.timeToHit(particles[i]);<NEW_LINE>if (time + deltaTime <= limit) {<NEW_LINE>priorityQue... | double deltaTimeHorizontalWall = particle.timeToHitHorizontalWall(); |
332,161 | protected NormalIpRangeVO scripts() {<NEW_LINE>NormalIpRangeVO vo = new NormalIpRangeVO();<NEW_LINE>vo.setUuid(ipr.getUuid() == null ? Platform.getUuid() : ipr.getUuid());<NEW_LINE>vo.setDescription(ipr.getDescription());<NEW_LINE>vo.setEndIp(ipr.getEndIp());<NEW_LINE>vo.setGateway(ipr.getGateway());<NEW_LINE>vo.setL3N... | .getEntityManager().flush(); |
1,588,174 | private void gwFieldValueInt64V(MethodWriterContext mwc, FieldWriter fieldWriter, int OBJECT, int i, boolean jsonb) {<NEW_LINE>MethodWriter mw = mwc.mw;<NEW_LINE>String format = fieldWriter.getFormat();<NEW_LINE>String classNameType = mwc.classNameType;<NEW_LINE>int FIELD_VALUE = mwc.var(long.class);<NEW_LINE>int WRITE... | visitJumpInsn(Opcodes.IFNE, notDefaultValue_); |
982,275 | public boolean instantiateTo(int value, ICause cause) throws ContradictionException {<NEW_LINE>assert cause != null;<NEW_LINE>if (!this.contains(value)) {<NEW_LINE>model.getSolver().getEventObserver().instantiateTo(this, value, cause, getLB(), getUB());<NEW_LINE>this.contradiction(cause, MSG_INST);<NEW_LINE>} else if (... | this.UB.set(value); |
864,469 | final GetResourcePolicyResult executeGetResourcePolicy(GetResourcePolicyRequest getResourcePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getResourcePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetResourcePolicy"); |
360,871 | protected DatabaseSnapshot createReferenceSnapshot(CommandScope commandScope) throws DatabaseException, InvalidExampleException {<NEW_LINE>CatalogAndSchema[] schemas;<NEW_LINE>CompareControl compareControl = commandScope.getArgumentValue(COMPARE_CONTROL_ARG);<NEW_LINE>Database targetDatabase = commandScope.getArgumentV... | getReferenceSchema().getSchemaName()); |
641,607 | public io.kubernetes.client.proto.V1alpha1Rbac.PolicyRule buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1alpha1Rbac.PolicyRule result = new io.kubernetes.client.proto.V1alpha1Rbac.PolicyRule(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>verb... | bitField0_ = (bitField0_ & ~0x00000002); |
661,462 | public boolean restartProcess(String groupId, String streamId, String operator, boolean sync) {<NEW_LINE>log.info("begin to restart stream process for groupId={} streamId={}", groupId, streamId);<NEW_LINE>InlongGroupInfo groupInfo = groupService.get(groupId);<NEW_LINE>if (groupInfo == null) {<NEW_LINE><MASK><NEW_LINE>}... | throw new BusinessException(ErrorCodeEnum.GROUP_NOT_FOUND); |
329,639 | public ActionRequestValidationException validate() {<NEW_LINE>ActionRequestValidationException validationException = super.validate();<NEW_LINE>if (type == null) {<NEW_LINE>validationException = addValidationError("type is missing", validationException);<NEW_LINE>}<NEW_LINE>if (source == null) {<NEW_LINE>validationExce... | validationException = addValidationError("content type is missing", validationException); |
1,854,878 | public void process(TaskMonitor monitor) throws Exception {<NEW_LINE>SymbolTableCommand symbolTableCommand = header.getFirstLoadCommand(SymbolTableCommand.class);<NEW_LINE>List<DynamicSymbolTableCommand> commands = header.getLoadCommands(DynamicSymbolTableCommand.class);<NEW_LINE>for (DynamicSymbolTableCommand command ... | nList = symbolTableCommand.getSymbolAt(symbolIndex); |
1,045,428 | protected Node box(Node node) {<NEW_LINE>// For boxing conversion, see JLS 5.1.7<NEW_LINE>if (TypesUtils.isPrimitive(node.getType())) {<NEW_LINE>PrimitiveType primitive = types.getPrimitiveType(node.getType().getKind());<NEW_LINE>TypeMirror boxedType = types.getDeclaredType(types.boxedClass(primitive));<NEW_LINE>TypeEl... | classTree = treeBuilder.buildClassUse(boxedElement); |
10,926 | final UpdateFuotaTaskResult executeUpdateFuotaTask(UpdateFuotaTaskRequest updateFuotaTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateFuotaTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | (super.beforeMarshalling(updateFuotaTaskRequest)); |
353,632 | AlgorithmParameters generateParameters(ASN1ObjectIdentifier encryptionOID, SecretKey encKey, SecureRandom rand) throws CMSException {<NEW_LINE>try {<NEW_LINE>AlgorithmParameterGenerator pGen = createAlgorithmParameterGenerator(encryptionOID);<NEW_LINE>if (encryptionOID.equals(CMSAlgorithm.RC2_CBC)) {<NEW_LINE>byte[] iv... | * 8, iv), rand); |
1,841,250 | public void run(RegressionEnvironment env) {<NEW_LINE>EPStatementObjectModel model = new EPStatementObjectModel();<NEW_LINE>model.setSelectClause(SelectClause.create().streamSelector(StreamSelector.RSTREAM_ISTREAM_BOTH).add("symbol").add(Expressions.min("volume"), "minVol").add(Expressions.max("volume"), "maxVol").add(... | (env, new AtomicInteger()); |
1,113,897 | public void play(int duration, int inputVolume) {<NEW_LINE>// normalise to make the volume decrease seem linear<NEW_LINE>float volume = ((inputVolume + 1.0f) * (inputVolume > 0 ? inputVolume : 1)) / 12.0f;<NEW_LINE>// calculate how many times we need to play the entire buffer<NEW_LINE>int cycles = (int) (duration / mLo... | write(mAudioData, 0, mSampleCount); |
1,191,459 | private String decodeResponseData(String charsetName) {<NEW_LINE>Charset charset;<NEW_LINE>try {<NEW_LINE>charset = Charset.forName(charsetName);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>Log.e(TAG, "Could not find charset: " + e.getMessage());<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>byte[] byteBuffer ... | decodedText = decoder.decode(in); |
326,682 | public void onResponse(BaseItemDto response) {<NEW_LINE>if (response.getIsFolderItem() && response.getBaseItemType() != BaseItemType.Series) {<NEW_LINE>// open generic folder browsing<NEW_LINE>Intent intent = new Intent(activity, GenericGridActivity.class);<NEW_LINE>intent.putExtra(Extras.Folder, KoinJavaComponent.<Gso... | "ItemId", response.getId()); |
990,895 | // We don't compute fractional MutableDistribution, it's either whole or none.<NEW_LINE>@Override<NEW_LINE>void combine(MutableAggregation other, double fraction) {<NEW_LINE>checkArgument(other instanceof MutableDistribution, "MutableDistribution expected.");<NEW_LINE>if (Math.abs(1.0 - fraction) > TOLERANCE) {<NEW_LIN... | ] otherExemplars = mutableDistribution.getExemplars(); |
1,350,727 | public static SequenceStorage createStorage(Object[] values) {<NEW_LINE>assert values != null;<NEW_LINE>assert values.getClass() == Object[].class : "cannot use non-Object array for modifiable list";<NEW_LINE>if (values.length == 0) {<NEW_LINE>return EmptySequenceStorage.INSTANCE;<NEW_LINE>}<NEW_LINE>if (canSpecializeT... | new DoubleSequenceStorage(specializeToDouble(values)); |
593,585 | private void initialize(Dimension dim, String[] tabLabels) {<NEW_LINE>this.setLayout(new GridBagLayout());<NEW_LINE>this.setSize(dim);<NEW_LINE>if (tabLabels == null) {<NEW_LINE>this.initializeSinglePane(dim);<NEW_LINE>} else {<NEW_LINE>this.initializeTabbed(dim, tabLabels);<NEW_LINE>}<NEW_LINE>addWindowListener(new Wi... | ).put(escape, "ESCAPE"); |
1,407,693 | public J visitLambda(Lambda lambda, PrintOutputCapture<P> p) {<NEW_LINE>visitSpace(lambda.getPrefix(), Space.Location.LAMBDA_PREFIX, p);<NEW_LINE>visitMarkers(<MASK><NEW_LINE>visitSpace(lambda.getParameters().getPrefix(), Space.Location.LAMBDA_PARAMETERS_PREFIX, p);<NEW_LINE>visitMarkers(lambda.getParameters().getMarke... | lambda.getMarkers(), p); |
1,445,641 | public static void testParameterTypes() {<NEW_LINE>JsBiFunction tIntegerJsBiFunction = new TIntegerJsBiFunction<String>();<NEW_LINE>JsBiFunction doubleDoubleJsBiFunction = new DoubleDoubleJsBiFunction();<NEW_LINE>callInterfaceRaw(tIntegerJsBiFunction, "a", 1);<NEW_LINE>callInterfaceRaw(doubleDoubleJsBiFunction, 1.1, 1.... | <String>(), ""); |
1,216,464 | private static void solveNQueensWithGeneticAlgorithmSearch() {<NEW_LINE>System.out.println("\n--- NQueensDemo GeneticAlgorithm ---");<NEW_LINE>FitnessFunction<Integer> fitnessFunction = NQueensGenAlgoUtil.getFitnessFunction();<NEW_LINE>Predicate<Individual<Integer>> goalTest = NQueensGenAlgoUtil.getGoalTest();<NEW_LINE... | out.println("Board Size = " + boardSize); |
1,849,015 | private void handleDescribeModel(ChannelHandlerContext ctx, String modelName) throws ModelNotFoundException {<NEW_LINE>ModelManager modelManager = ModelManager.getInstance();<NEW_LINE>Model model = modelManager.getModels().get(modelName);<NEW_LINE>if (model == null) {<NEW_LINE>throw new ModelNotFoundException("Model no... | ().contains(modelName)); |
794,878 | public static void main(String[] args) {<NEW_LINE>// Position 0 is not used, so -9999 element is ignored<NEW_LINE>Comparable[] array = { -9999, 0, -1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9 };<NEW_LINE>String initialArray = Arrays.toString(array);<NEW_LINE>StdOut.println("Initial array: " + initialAr... | ().new MaxPQ(array); |
1,295,385 | public void contributeParameters(Map<String, Object> parameters) throws JRException {<NEW_LINE>RemoteXmlDataAdapter remoteXmlDataAdapter = getRemoteXmlDataAdapter();<NEW_LINE>if (remoteXmlDataAdapter != null) {<NEW_LINE>if (remoteXmlDataAdapter.isUseConnection()) {<NEW_LINE>String fileName = remoteXmlDataAdapter.getFil... | put(JRXPathQueryExecuterFactory.XML_TIME_ZONE, timeZone); |
686,161 | public static double strikeForDelta(double spot, double spotDelta, double timeToExpiry, double lognormalVol, double interestRate, double costOfCarry, boolean isCall) {<NEW_LINE>ArgChecker.isTrue(spot > 0d, "non-positive/NaN spot; have {}", spot);<NEW_LINE>ArgChecker.isTrue(timeToExpiry > 0d, "non-positive/NaN timeToExp... | lognormalVol > 0d, "non-positive/NaN lognormalVol; have {}", lognormalVol); |
62,946 | private GraphQLInputType mapFilter(GraphQLInputType gqlInputType) {<NEW_LINE>// see GqlMapBuilder<NEW_LINE>GraphQLList gqlMapType = (GraphQLList) gqlInputType;<NEW_LINE>GraphQLInputObjectType entryType = (GraphQLInputObjectType) gqlMapType.getWrappedType();<NEW_LINE>GraphQLNonNull nonNullkeyType = (GraphQLNonNull) entr... | .CONTAINS_KEY.buildField(keyType)); |
276,258 | public void onInit() {<NEW_LINE>if (this.initialized) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>super.onInit();<NEW_LINE>if (this.maxSubscribers == null) {<NEW_LINE>setMaxSubscribers(getIntegrationProperty(IntegrationProperties<MASK><NEW_LINE>}<NEW_LINE>if (this.messageConverter == null) {<NEW_LINE>this.messageConverter =... | .CHANNELS_MAX_BROADCAST_SUBSCRIBERS, Integer.class)); |
1,219,297 | public void marshall(UpdateFunctionRequest updateFunctionRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updateFunctionRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(updateFunctionRequest... | updateFunctionRequest.getFunctionVersion(), FUNCTIONVERSION_BINDING); |
1,217,299 | protected void checkReturnType(TreeLogger logger, JMethod method) throws UnableToCompleteException {<NEW_LINE>JType returnType = method.getReturnType();<NEW_LINE>JPrimitiveType primitive = returnType.isPrimitive();<NEW_LINE>if (primitive != null && (primitive == JPrimitiveType.BOOLEAN || primitive == JPrimitiveType.DOU... | JArrayType arrayType = returnType.isArray(); |
1,215,267 | public void consume(Map<Channel, BitmapFrame> channels) {<NEW_LINE>BitmapFrame frame = channels.get(Channel.BRGA);<NEW_LINE>try {<NEW_LINE>checkSize(frame.getSize());<NEW_LINE>channel.write(frame.getByteBuffer());<NEW_LINE>} catch (Throwable t) {<NEW_LINE>if (aborted) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LI... | CrashReport.create(t, "Exporting frame"); |
599,831 | // hmm, one listener can be added more times but should not be problem since frameworks in project do not change often...<NEW_LINE>private void listenOnFrameworks() {<NEW_LINE>List<PhpFrameworkProvider> frameworks = project.getFrameworks();<NEW_LINE>List<ImportantFilesImplementation> newConfigFiles = new ArrayList<>(fr... | configurationFiles = framework.getConfigurationFiles2(phpModule); |
1,471,771 | public void perform(WsdlMockService mockService, Object param) {<NEW_LINE>if (mockService.getMockRunner() != null && mockService.getMockRunner().isRunning()) {<NEW_LINE>UISupport.showErrorMessage("Can not set MockService options while running");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (dialog == null) {<NEW_LINE>dialog... | ADialogBuilder.buildDialog(OptionsForm.class); |
1,555,755 | private void assertResultsEqual(Object expected, Object result) throws TestFailure {<NEW_LINE>boolean comparisonResult;<NEW_LINE>if (comp != null) {<NEW_LINE>comparisonResult = comp.test(expected, result);<NEW_LINE>} else if (expected == null) {<NEW_LINE>comparisonResult = result == null;<NEW_LINE>} else if (expected i... | ) expected, (Double) result); |
758,043 | public Void visitLiteral(LiteralTree tree, AnnotatedTypeMirror type) {<NEW_LINE>if (!type.isAnnotatedInHierarchy(I18NUNKNOWNFORMAT)) {<NEW_LINE>String format = null;<NEW_LINE>if (tree.getKind() == Tree.Kind.STRING_LITERAL) {<NEW_LINE>format = (String) tree.getValue();<NEW_LINE>} else if (tree.getKind() == Tree.Kind.CHA... | cs = I18nFormatUtil.formatParameterCategories(format); |
1,347,452 | private void cast(long time, Binary value, PointCollector collector) throws IOException, QueryProcessException {<NEW_LINE>String stringValue = value.getStringValue();<NEW_LINE>switch(targetDataType) {<NEW_LINE>case INT32:<NEW_LINE>try {<NEW_LINE>collector.putInt(time, (int) Double.parseDouble(stringValue));<NEW_LINE>} ... | ) Double.parseDouble(stringValue)); |
902,810 | public Object start(IApplicationContext context) throws Exception {<NEW_LINE>// If running on Linux lock the instance location so we can only launch Archi once<NEW_LINE>if (PlatformUtils.isLinux()) {<NEW_LINE>Location loc = Platform.getInstanceLocation();<NEW_LINE>if (loc.isLocked()) {<NEW_LINE>return EXIT_OK;<NEW_LINE... | getInstance().hook(display); |
1,193,571 | /*<NEW_LINE><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><NEW_LINE><style><NEW_LINE><xsl:comment><NEW_LINE><NEW_LINE>/#paged media #/ div.header {display: none }<NEW_LINE>div.footer {display: none } /#@media print { #/<NEW_LINE><xsl:if<NEW_LINE>test="java:org.docx4j.convert.out.common.Xslt... | StringBuilder buffer = new StringBuilder(10240); |
30,835 | public static void format(API.Command command, Function<Path.ConstantSet, Service.ConstantSet> constantResolver, Function<String, Path.Any> followResolver, StylingString string, Style style) {<NEW_LINE>string.append(command.getName(), string.labelStyle());<NEW_LINE>string.append("(", string.structureStyle());<NEW_LINE>... | ")", string.structureStyle()); |
1,772,173 | private void retainEntries() {<NEW_LINE>for (Entry e : new ArrayList<>(ge.getEntries())) {<NEW_LINE>if (e instanceof UriEntry) {<NEW_LINE>UriEntry ue = (UriEntry) e;<NEW_LINE>try {<NEW_LINE>long lastUpdated = -1;<NEW_LINE>String updatedString = LibraryUtilities.getStringProperty(ue, OntologyCatalogManager.TIMESTAMP);<N... | logger.error("Exception caught updating catalog entry.", t); |
1,744,508 | public boolean onPrepareActionMode(ActionMode mode, Menu menu) {<NEW_LINE>logDebug("onPrepareActionMode");<NEW_LINE>ArrayList<MegaShare> selected = adapter.getSelectedShares();<NEW_LINE>boolean deleteShare = false;<NEW_LINE>boolean permissions = false;<NEW_LINE>if (selected.size() != 0) {<NEW_LINE>permissions = true;<N... | (R.string.action_unselect_all)); |
23,830 | private static void fillBotAttrs(final Request request) {<NEW_LINE>final String <MASK><NEW_LINE>final UserAgent userAgent = UserAgent.parseUserAgentString(userAgentStr);<NEW_LINE>BrowserType browserType = userAgent.getBrowser().getBrowserType();<NEW_LINE>if (StringUtils.containsIgnoreCase(userAgentStr, "mobile") || Str... | userAgentStr = request.getHeader("User-Agent"); |
451,494 | public static void createIgnored(File path) {<NEW_LINE>if (path == null)<NEW_LINE>return;<NEW_LINE>BufferedWriter fileWriter = null;<NEW_LINE>Mercurial hg = Mercurial.getInstance();<NEW_LINE>File root = hg.getRepositoryRoot(path);<NEW_LINE>if (root == null)<NEW_LINE>return;<NEW_LINE>File ignore = new File(root, FILENAM... | (new FileOutputStream(ignore))); |
612,616 | public PinotExpression visitSpecialForm(SpecialFormExpression specialForm, Function<VariableReferenceExpression, Selection> context) {<NEW_LINE>switch(specialForm.getForm()) {<NEW_LINE>case IF:<NEW_LINE>case NULL_IF:<NEW_LINE>case SWITCH:<NEW_LINE>case WHEN:<NEW_LINE>case COALESCE:<NEW_LINE>case DEREFERENCE:<NEW_LINE>c... | empty(), "Pinot does not support the special form " + specialForm); |
346,112 | public static void main(String[] args) throws Exception {<NEW_LINE>if (args.length != 2) {<NEW_LINE>System.err.println("Usage: YodaQA_GS INPUT.json OUTPUT.TSV");<NEW_LINE>System.err.println("Measures YodaQA performance on some Gold Standard questions.");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>CollectionReaderDesc... | ], ParallelEngineFactory.PARAM_NO_MULTIPROCESSING, 1); |
1,077,909 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>overridePendingTransition(R.anim.activity_slide_up, R.anim.activity_slide_down);<NEW_LINE>slug = getIntent().getStringExtra("slug");<NEW_LINE>context = this;<NEW_LINE>sharedPrefs = context.getSharedPreferences("com.k... | setContentView(R.layout.ptr_list_layout); |
783,245 | public boolean onClickAddressContextMenuItem(final MenuItem item, final Address address, final String label) {<NEW_LINE>int itemId = item.getItemId();<NEW_LINE>if (itemId == R.id.wallet_addresses_context_edit) {<NEW_LINE>viewModel.showEditAddressBookEntryDialog.setValue(new Event<>(address));<NEW_LINE>return true;<NEW_... | log.info("wallet address copied to clipboard: {}", address); |
147,584 | @Override<NEW_LINE>public AsyncResult<Void> configureTask(RunConfiguration runConfiguration, T task) {<NEW_LINE>final Artifact[] artifacts = ArtifactManager.getInstance(myProject).getArtifacts();<NEW_LINE>Set<ArtifactPointer> pointers = new HashSet<>();<NEW_LINE>for (Artifact artifact : artifacts) {<NEW_LINE>pointers.a... | (CompilerBundle.message("build.artifacts.before.run.selector.title")); |
1,560,077 | public static Setting fromTenantParameterStore(UUID tenantId, Parameter parameter) {<NEW_LINE>Setting setting = null;<NEW_LINE>if (parameter != null) {<NEW_LINE>String parameterStoreName = parameter.name();<NEW_LINE>if (Utils.isEmpty(parameterStoreName)) {<NEW_LINE>throw new RuntimeException("Can't get Setting name for... | " does not belong to tenant " + tenantId.toString()); |
1,023,313 | private boolean fixBooleanUsage(MethodNode mth, ITypeBound bound) {<NEW_LINE>ArgType boundType = bound.getType();<NEW_LINE>if (boundType == ArgType.BOOLEAN || (boundType.isTypeKnown() && !boundType.isPrimitive())) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>RegisterArg boundArg = bound.getArg();<NEW_LINE>if (boundArg ... | prepareBooleanConvertInsn(resultArg, boundArg, boundType); |
1,482,324 | public static Value SelectInSeq(Value s, Value test) {<NEW_LINE>TupleValue seq = (TupleValue) s.toTuple();<NEW_LINE>if (seq == null) {<NEW_LINE>throw new EvalException(EC.TLC_MODULE_ARGUMENT_ERROR, new String[] { "first", "SelectInSeq", "sequence", Values.ppr(s.toString()) });<NEW_LINE>}<NEW_LINE>if (!(test instanceof ... | test.toString()) }); |
614,854 | final DescribeAlgorithmResult executeDescribeAlgorithm(DescribeAlgorithmRequest describeAlgorithmRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAlgorithmRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | false), new DescribeAlgorithmResultJsonUnmarshaller()); |
387,274 | public static void main(String[] args) throws IOException, DocumentException {<NEW_LINE>FindBugs.setNoAnalysis();<NEW_LINE>DetectorFactoryCollection.instance();<NEW_LINE>if (args.length < 1 || args.length > 2) {<NEW_LINE>System.out.println(USAGE);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>BugCollection origCollection;<NEW_L... | Date firstSeen = new Date(when); |
1,701,605 | private void createGui() {<NEW_LINE>setLayout(new BorderLayout());<NEW_LINE>final JPanel panel = new JPanel(new BorderLayout());<NEW_LINE>final JLabel lbl = new JLabel("Address" + ":");<NEW_LINE>lbl.setBorder(new EmptyBorder(5, 5, 5, 5));<NEW_LINE>panel.add(lbl, BorderLayout.WEST);<NEW_LINE><MASK><NEW_LINE>final Action... | m_offsetField.setSize(400, 20); |
30,713 | public synchronized void paintComponent(Graphics g) {<NEW_LINE>super.paintComponent(g);<NEW_LINE>if (leftImage == null || rightImage == null)<NEW_LINE>return;<NEW_LINE>computeScales();<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>// location in the current frame, taking in account the scale of each image<NEW_LINE>... | scaleRight * rightImage.getWidth()); |
1,759,037 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>super.onCreateView(inflater, container, savedInstanceState);<NEW_LINE>sharedPrefs = context.getSharedPreferences("com.klinker.android.twitter_world_preferences", 0);<NEW_LINE>settings = AppSettings.getInstance(c... | findViewById(R.id.listView); |
1,607,338 | public static ListFlowRulesOfResourceResponse unmarshall(ListFlowRulesOfResourceResponse listFlowRulesOfResourceResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFlowRulesOfResourceResponse.setRequestId(_ctx.stringValue("ListFlowRulesOfResourceResponse.RequestId"));<NEW_LINE>listFlowRulesOfResourceResponse.setCode(_ct... | ("ListFlowRulesOfResourceResponse.Data.Datas[" + i + "].ClusterThresholdType")); |
622,221 | private Mono<Response<Void>> updateWithResponseAsync(String resourceGroupName, String monitorName, VMCollectionUpdate body, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."))... | monitorName, body, accept, context); |
1,412,031 | public List<HotPictureInfo> listForPage(String application, String infoId, String title, Integer selectTotal) throws Exception {<NEW_LINE>EntityManager em = this.entityManagerContainer().get(HotPictureInfo.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<HotPictureInfo> cq = cb.crea... | , "%" + title + "%")); |
612,103 | public NoteEncryption.Encryption.EncPlaintext encode() {<NEW_LINE>ByteBuffer buffer = ByteBuffer.allocate(ZC_V_SIZE);<NEW_LINE>buffer.putLong(0, value);<NEW_LINE>byte[] valueLong = buffer.array();<NEW_LINE>for (int i = 0; i < valueLong.length / 2; i++) {<NEW_LINE>byte temp = valueLong[i];<NEW_LINE>valueLong[i] = valueL... | valueLong.length - 1 - i]; |
1,494,642 | private void update() {<NEW_LINE>icon = TargetAWT.to(crumb.getIcon());<NEW_LINE>if (icon != null) {<NEW_LINE>crumbIconWidth = icon.getIconWidth();<NEW_LINE>crumbIconHeight = icon.getIconHeight();<NEW_LINE>} else {<NEW_LINE>crumbIconWidth = 0;<NEW_LINE>crumbIconHeight = 0;<NEW_LINE>}<NEW_LINE>text = crumb.getText();<NEW... | .MAX_VALUE, Short.MAX_VALUE)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.