idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
206,066 | private void checkSignature(StringBuilder sb) {<NEW_LINE>boolean checkEnabled = false;<NEW_LINE>assert checkEnabled = true;<NEW_LINE>if (checkEnabled) {<NEW_LINE>String signature = sb.toString();<NEW_LINE>try {<NEW_LINE>ParameterElement parsedParameter = parseOneParameter(signature);<NEW_LINE>assert getName().equals(pa... | String paramDefaultValue = parsedParameter.getDefaultValue(); |
18,086 | public static QueryMediaWorkflowExecutionListResponse unmarshall(QueryMediaWorkflowExecutionListResponse queryMediaWorkflowExecutionListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryMediaWorkflowExecutionListResponse.setRequestId(_ctx.stringValue("QueryMediaWorkflowExecutionListResponse.RequestId"));<NEW_LINE>Lis... | + "].ActivityList[" + j + "].Code")); |
1,005,783 | // Parameters example: 6 0.5 100<NEW_LINE>public static void main(String[] args) {<NEW_LINE>int vertices = Integer.parseInt(args[0]);<NEW_LINE>double radius = Double.parseDouble(args[1]);<NEW_LINE>int numberOfDigraphs = Integer.parseInt(args[2]);<NEW_LINE>List<EdgeWeightedDigraphInterface> randomEuclideanEdgeWeightedDi... | int neighbor = edge.to(); |
335,229 | private void addRootView(@NonNull final View rootView) {<NEW_LINE>if (isStopped()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mTagToViewState.put(mSurfaceId, new ViewState(mSurfaceId, rootView, new ReactViewManagerWrapper.DefaultViewManager((<MASK><NEW_LINE>Runnable runnable = new Runnable() {<NEW_LINE><NEW_LINE>@Override<... | ViewManager) mRootViewManager), true)); |
1,249,174 | public BackgroundException map(final Throwable failure, final StringBuilder buffer, final int statusCode) {<NEW_LINE>switch(statusCode) {<NEW_LINE>case HttpStatus.SC_UNAUTHORIZED:<NEW_LINE>return new LoginFailureException(buffer.toString(), failure);<NEW_LINE>case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:<NEW_LINE>r... | buffer.toString(), failure); |
326,495 | public void impute(double[][] data) throws MissingValueImputationException {<NEW_LINE>int[] count = new int[data[0].length];<NEW_LINE>for (int i = 0; i < data.length; i++) {<NEW_LINE>int n = 0;<NEW_LINE>for (int j = 0; j < data[i].length; j++) {<NEW_LINE>if (Double.isNaN(data[i][j])) {<NEW_LINE>n++;<NEW_LINE>count[j]++... | .lloyd(data, k)); |
394,111 | final TestFunctionResult executeTestFunction(TestFunctionRequest testFunctionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(testFunctionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
839,845 | public static void drawFluidInTank(Level level, BlockPos pos, PoseStack ps, MultiBufferSource mbs, FluidVariant fluid, float fill) {<NEW_LINE>// From Modern Industrialization<NEW_LINE>VertexConsumer vc = mbs.getBuffer(RenderType.translucent());<NEW_LINE>TextureAtlasSprite sprite = FluidVariantRendering.getSprite(fluid)... | .meshBuilder().getEmitter(); |
603,835 | private String formatByteBuf(ChannelHandlerContext ctx, String eventName, ByteBuf msg) {<NEW_LINE>String chStr = <MASK><NEW_LINE>int length = msg.readableBytes();<NEW_LINE>if (length == 0) {<NEW_LINE>return new StringBuilder(chStr.length() + 1 + eventName.length() + 4).append(chStr).append(' ').append(eventName).append... | channelString(ctx.channel()); |
252,940 | private Body patchHandlerPostBody(SootMethod method, SootClass runnable) {<NEW_LINE>SootClass sc = method.getDeclaringClass();<NEW_LINE>sc.setLibraryClass();<NEW_LINE>method.setPhantom(false);<NEW_LINE>Body b = Jimple.<MASK><NEW_LINE>method.setActiveBody(b);<NEW_LINE>Local thisLocal = Jimple.v().newLocal("this", sc.get... | v().newBody(method); |
504,660 | public void invoke(@NotNull Project project, @NotNull PsiFile psiFile, @NotNull PsiElement startElement, @NotNull PsiElement endElement) {<NEW_LINE>final PsiClass myClass = (PsiClass) startElement;<NEW_LINE>final Editor editor = CodeInsightUtil.positionCursor(project, psiFile, myClass.getLBrace());<NEW_LINE>if (editor ... | modifierList.setModifierProperty(modifier, true); |
1,830,996 | protected boolean evaluateExpression(final OIdentifiable iRecord, final OSQLFilterCondition condition, final Object left, final Object right, OCommandContext iContext) {<NEW_LINE>validate(right);<NEW_LINE>final Iterator<?> valueIterator = OMultiValue.getMultiValueIterator(right, false);<NEW_LINE>Object right1 = valueIt... | ) left, (Number) right2); |
514,311 | protected BackupStorageVO updateBackupStorage(APIUpdateBackupStorageMsg msg) {<NEW_LINE>if (!(msg instanceof APIUpdateSftpBackupStorageMsg)) {<NEW_LINE>return super.updateBackupStorage(msg);<NEW_LINE>}<NEW_LINE>SftpBackupStorageVO vo = (SftpBackupStorageVO) super.updateBackupStorage(msg);<NEW_LINE>vo = vo == null ? get... | setPassword(umsg.getPassword()); |
601,116 | public Request<GetSignalingChannelEndpointRequest> marshall(GetSignalingChannelEndpointRequest getSignalingChannelEndpointRequest) {<NEW_LINE>if (getSignalingChannelEndpointRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetSignalingChannelEndpointRequest)");<NEW_LINE>}<... | t.getMessage(), t); |
1,834,414 | public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.<MASK><NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {<NE... | apache.thrift.protocol.TField schemeField; |
1,077,403 | public static SyntaxHighlighter build(Path nanorc, String syntaxName) {<NEW_LINE>SyntaxHighlighter out = new SyntaxHighlighter(nanorc, syntaxName);<NEW_LINE>List<Path> syntaxFiles = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>try (BufferedReader reader = new BufferedReader(new FileReader(nanorc.toFile()))) {<NEW_LINE>St... | .get(1), syntaxFiles); |
1,597,689 | private Answer sendToLeastBusyEndpoint(List<EndPoint> eps, CopyCommand cmd) {<NEW_LINE>Answer answer = null;<NEW_LINE>EndPoint endPoint = null;<NEW_LINE>List<Long> epIds = ssvmWithLeastMigrateJobs();<NEW_LINE>if (epIds.isEmpty()) {<NEW_LINE>Collections.shuffle(eps);<NEW_LINE>endPoint = eps.get(0);<NEW_LINE>} else {<NEW... | collect(Collectors.toList()); |
10,308 | public ScalarTypeArrayList typeFor(Type valueType, boolean nullable) {<NEW_LINE>lock.lock();<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>if (valueType.equals(UUID.class)) {<NEW_LINE>return cache.computeIfAbsent(key, s -> new ScalarTypeArrayList(nullable, "uuid", DocPropertyType.UUID, ArrayElementConverter.UUID));<NEW_LINE>... | String key = valueType + ":" + nullable; |
49,544 | public static byte[] serialize(ConstraintDescriptor constraint, MemoryTracker memoryTracker) {<NEW_LINE>try (var scopedBuffer = new HeapScopedBuffer(lengthOf(constraint), memoryTracker)) {<NEW_LINE>ByteBuffer target = scopedBuffer.getBuffer();<NEW_LINE>target.putInt(LEGACY_LABEL_OR_REL_TYPE_ID);<NEW_LINE>target.put(CON... | , constraint.type())); |
1,394,324 | private void writeEqualsMethod(ClassVisitor cw, Type generatedType) {<NEW_LINE>MethodVisitor methodVisitor = cw.visitMethod(Opcodes.ACC_PUBLIC, "equals", EQUALS_METHOD_DESCRIPTOR, null, null);<NEW_LINE>methodVisitor.visitCode();<NEW_LINE>// if (arg == this) { return true; }<NEW_LINE>methodVisitor.visitVarInsn(ALOAD, 0)... | ), "__view_state__", GET_VIEW_STATE_METHOD_DESCRIPTOR, true); |
593,419 | public int[] kWeakestRows(int[][] mat, int k) {<NEW_LINE>List<int[]> list = new ArrayList<>();<NEW_LINE>for (int i = 0; i < mat.length; i++) {<NEW_LINE>int soldiers = 0;<NEW_LINE>for (int j = 0; j < mat[0].length; j++) {<NEW_LINE>if (mat[i][j] == 1) {<NEW_LINE>soldiers++;<NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NE... | ] result = new int[k]; |
152,652 | protected SuggestionTestResult testThem(SuggestionOptions options, String name1, Rect area1, String name2, Rect area2) {<NEW_LINE>int topAlignDiff = Math.abs(area1.getTop() - area2.getTop());<NEW_LINE>int bottomAlignDiff = Math.abs(area1.getBottom() - area2.getBottom());<NEW_LINE>String spec = null;<NEW_LINE>if (topAli... | spec = format("aligned horizontally centered %s", name2); |
1,572,577 | public void addImpassableRoad(@Nullable final MapActivity mapActivity, @NonNull final LatLon loc, final boolean showDialog, final boolean skipWritingSettings, @Nullable final String appModeKey) {<NEW_LINE>final Location ll = new Location("");<NEW_LINE>ll.setLatitude(loc.getLatitude());<NEW_LINE>ll.setLongitude(loc.getL... | valueOfStringKey(appModeKey, defaultAppMode) : defaultAppMode; |
1,159,856 | public RestResponse buildResponse(PostStartTrialResponse response, XContentBuilder builder) throws Exception {<NEW_LINE>PostStartTrialResponse.Status status = response.getStatus();<NEW_LINE>builder.startObject();<NEW_LINE>builder.field("acknowledged", startTrialRequest.isAcknowledged());<NEW_LINE>if (status.isTrialStar... | builder.field("trial_was_started", false); |
454,115 | private Thread runRequest(String clientName, Request request) {<NEW_LINE>return new Thread(() -> {<NEW_LINE>String server = _clientState.get(clientName).getRing().get(request.getId());<NEW_LINE>String consistentServer = _consistentClientState.get(clientName).getRing().get(request.getId());<NEW_LINE>if (server != null &... | (server), _serverCapacity, true); |
814,709 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("align" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>IParam tgtParam;<NEW_LINE>Expression fltExp = null;<NEW_LINE>if (param.getType() == IParam.Comma) {... | intValue(), option, ctx); |
1,592,743 | final RejectGrantResult executeRejectGrant(RejectGrantRequest rejectGrantRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(rejectGrantRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RejectGrantRequest> request = null;<NEW_LINE>Respo... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,284,660 | private static void appendAutoScrollAssignment(FacesContext context, ScriptContext scriptContext, String formName) {<NEW_LINE>String formNameStr = formName == null ? "formName" : (new StringBuilder("'").append(formName).append<MASK><NEW_LINE>String paramName = new StringBuilder().append("'").append(AUTO_SCROLL_PARAM).a... | ("'").toString()); |
999,871 | private void testSubmit(ExecutorService xsvc) throws Exception {<NEW_LINE>AtomicInteger counter = new AtomicInteger();<NEW_LINE>Callable<Integer> task1 = new CounterTask(counter);<NEW_LINE>Runnable task2 = new CounterTask(counter);<NEW_LINE>Future<Integer> future1 = xsvc.submit(task1);<NEW_LINE>Future<?> future2 = xsvc... | throw new Exception("Unexpected result of task3: " + result3); |
1,255,113 | /* (non-Javadoc)<NEW_LINE>* @see com.ibm.ws.sib.msgstore.impl.AbstractItemLink#expirableExpire()<NEW_LINE>*/<NEW_LINE>public final // 179365.3<NEW_LINE>// 179365.3<NEW_LINE>boolean // 179365.3<NEW_LINE>expirableExpire(// 179365.3<NEW_LINE>PersistentTransaction transaction) throws SevereMessageStoreException {<NEW_LINE>... | debug(this, tc, "cannot expire a non-empty stream"); |
599,545 | public static void main(String[] args) {<NEW_LINE>// Create a new Options class, which holds our flag.<NEW_LINE>Options options = new Options();<NEW_LINE>try {<NEW_LINE>// Populate the created class from the command line arguments.<NEW_LINE>CommandLine.populateCommand(options, args);<NEW_LINE>} catch (ParameterExceptio... | usage(options, System.out); |
854,279 | private void renderAttributes(EventBean theEvent, StringBuilder buf, RendererMeta meta) {<NEW_LINE>String delimiter = " ";<NEW_LINE>GetterPair[] simpleProps = meta.getSimpleProperties();<NEW_LINE>for (GetterPair simpleProp : simpleProps) {<NEW_LINE>Object value = simpleProp.getGetter().get(theEvent);<NEW_LINE>if (value... | setPropertyName(simpleProp.getName()); |
1,410,747 | private void processInTrx_unpackHU(@NonNull final PickingCandidate pickingCandidate) {<NEW_LINE>final <MASK><NEW_LINE>if (packedToHUId == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final I_M_HU packedToHU = handlingUnitsBL.getById(packedToHUId);<NEW_LINE>if (handlingUnitsBL.isDestroyed(packedToHU)) {<NEW_LINE>// shal... | HuId packedToHUId = pickingCandidate.getPackedToHuId(); |
1,671,832 | // Must already have started a transaction<NEW_LINE>protected void writeDown(Trace trace, long snap, TraceThread thread, int frame) {<NEW_LINE>if (space.isUniqueSpace()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>byte[] data = new byte[4096];<NEW_LINE>ByteBuffer buf = ByteBuffer.wrap(data);<NEW_LINE>TraceMemorySpace mem = ... | unsignedMin(data.length, fullLen); |
1,634,821 | final RejectSkillResult executeRejectSkill(RejectSkillRequest rejectSkillRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(rejectSkillRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
927,641 | public void onViewCreated(@NonNull final View view, final Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>final Context context = view.getContext();<NEW_LINE>final AppSettings as = new AppSettings(context);<NEW_LINE>final ContextUtils cu = new ContextUtils(context);<NEW_LIN... | COMPLEX_UNIT_SP, as.getFontSize()); |
1,431,811 | public static CreateECoCheckDocumentPDF ecoCheckToPdf(String outputFile, PaperSize paper, Unit units, int rows, int columns, float squareWidth, int numMarkers, int errorLevel, int checksum) throws IOException {<NEW_LINE>ConfigECoCheckMarkers config = ConfigECoCheckMarkers.singleShape(rows, columns, numMarkers, squareWi... | = (rows - 1) * squareWidth; |
1,726,705 | public void onNext(T t) {<NEW_LINE>if (done) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AtomicReferenceArray<Object> ara = values;<NEW_LINE>int n = ara.length();<NEW_LINE>Object[] objects = new Object[n + 1];<NEW_LINE>objects[0] = t;<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>Object o = ara.get(i);<NEW_LINE>if (o == n... | downstream, v, this, error); |
123,530 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>ByteBuf buf = (ByteBuf) msg;<NEW_LINE>char protocol = (char) buf.readByte();<NEW_LINE>int version = buf.readUnsignedByte();<NEW_LINE>String imei;<NEW_LINE>if ((version & 0x80) != 0) {<NEW_LINE>imei = String.val... | decodeF(position, buf, selector); |
1,432,181 | private void initView(Context context) {<NEW_LINE>setBackgroundIconColor(getColor());<NEW_LINE>incButton = new Button(context);<NEW_LINE>decButton = new Button(context);<NEW_LINE>LinearLayout incDecLayout = getIncDecLayout();<NEW_LINE>incDecLayout.addView(incButton);<NEW_LINE>incDecLayout.addView(decButton);<NEW_LINE>i... | decButton.setBackgroundColor(Color.TRANSPARENT); |
545,932 | static PTransform<PCollection<Metadata>, PCollection<String>> moveAndConsumeMatches() {<NEW_LINE>return new PTransform<PCollection<Metadata>, PCollection<String>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public PCollection<String> expand(PCollection<Metadata> input) {<NEW_LINE>// TODO(pabloem, dhercher): Use a Beam st... | = new TupleTag<String>(); |
1,282,538 | public int parsePrintfTerm(MessageBuilder<?> builder, int index, String message, int termStart, int specStart, int formatStart) throws ParseException {<NEW_LINE>// Assume terms are single characters.<NEW_LINE>int termEnd = formatStart + 1;<NEW_LINE>// This _must_ be an ASCII letter representing printf-like specifier (b... | "illegal date/time conversion", message, formatStart + 1); |
92,381 | public static String encode(final String url) throws HttpRequestException {<NEW_LINE>URL parsed;<NEW_LINE>try {<NEW_LINE>parsed = new URL(url.toString());<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new HttpRequestException(e);<NEW_LINE>}<NEW_LINE>String host = parsed.getHost();<NEW_LINE>int port = parsed.getPort... | paramsStart = encoded.indexOf('?'); |
1,084,027 | protected Object saveDocument(String collectionName, Document dbDoc, Class<?> entityClass) {<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.debug(String.format("Saving Document containing fields: %s", dbDoc.keySet()));<NEW_LINE>}<NEW_LINE>return execute(collectionName, collection -> {<NEW_LINE>MongoAction mong... | entity)).first()); |
1,295,981 | public static void main(String[] args) throws Exception {<NEW_LINE>ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 8888).usePlaintext().build();<NEW_LINE>RxGreeterGrpc.RxGreeterStub stub = RxGreeterGrpc.newRxStub(channel);<NEW_LINE>Single<HelloRequest> request = Single.just(HelloRequest.newBuilde... | ::getMessage).blockingGet()); |
1,473,628 | private ArrayWrapper readNewArray() throws IOException {<NEW_LINE>ArrayWrapper aw = new ArrayWrapper();<NEW_LINE>aw.classdesc = readClassDesc();<NEW_LINE>makeRef(aw);<NEW_LINE>int size = readInt();<NEW_LINE>if (size < 0)<NEW_LINE>throw new NotImplementedException();<NEW_LINE>aw.values = new ArrayList<Object>(size);<NEW... | values.add(readContent()); |
728,367 | public static ListCampaignsResponse unmarshall(ListCampaignsResponse listCampaignsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCampaignsResponse.setRequestId(_ctx.stringValue("ListCampaignsResponse.RequestId"));<NEW_LINE>listCampaignsResponse.setMessage(_ctx.stringValue("ListCampaignsResponse.Message"));<NEW_LINE... | ("ListCampaignsResponse.Data.List[" + i + "].CasesUncompleted")); |
1,247,867 | private Mono<Response<Flux<ByteBuffer>>> captureWithResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is requ... | this.client.mergeContext(context); |
1,637,445 | public static SearchWaterMarkTemplateResponse unmarshall(SearchWaterMarkTemplateResponse searchWaterMarkTemplateResponse, UnmarshallerContext _ctx) {<NEW_LINE>searchWaterMarkTemplateResponse.setRequestId(_ctx.stringValue("SearchWaterMarkTemplateResponse.RequestId"));<NEW_LINE>searchWaterMarkTemplateResponse.setTotalCou... | ("SearchWaterMarkTemplateResponse.WaterMarkTemplateList[" + i + "].Dy")); |
973,191 | // -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public Trade parseTrade(FpmlDocument document, XmlElement tradeEl) {<NEW_LINE>// supported elements:<NEW_LINE>// 'buyerPartyReference'<NEW_LINE>// 'sellerPartyReference'<NEW_LINE>// 'adjustedTerminationDate'<NEW_LIN... | (fraEl.getChild("notional")); |
954,176 | public Explanation explain(LeafReaderContext context, int doc) throws IOException {<NEW_LINE>RuntimePhraseScorer scorer = scorer(context);<NEW_LINE>if (scorer == null) {<NEW_LINE>return Explanation.noMatch("No matching phrase");<NEW_LINE>}<NEW_LINE>final TwoPhaseIterator twoPhase = scorer.twoPhaseIterator();<NEW_LINE>i... | leafSimScorer.explain(doc, freqExplanation); |
1,625,672 | protected void updateVariableInspector(ThreadReference t) {<NEW_LINE>if (!t.isSuspended()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (t.frameCount() == 0) {<NEW_LINE>// TODO: needs to be handled in a better way:<NEW_LINE>log("call stack empty");<NEW_LINE>} else {<NEW_LINE>// first get data<NEW_LINE>final... | updateLocals(locals, "Locals at " + currentLocation); |
1,789,580 | protected void doPrefetch(final File tokenFile, final Props props, final Logger logger, final String userToProxy) throws HadoopSecurityManagerException {<NEW_LINE>// Create suffix to be added to kerberos principal<NEW_LINE>final String suffix = getFQNSuffix(props);<NEW_LINE>final String userToProxyFQN = userToProxy + s... | logger.info("Getting hadoop tokens based on props for " + userToProxyFQN); |
1,702,001 | void Init() {<NEW_LINE>BaseInit();<NEW_LINE>_rangeEncoder.Init();<NEW_LINE>com.mucommander.commons.file.archive.sevenzip.provider.SevenZip.Compression.RangeCoder.Encoder.InitBitModels(_isMatch);<NEW_LINE>com.mucommander.commons.file.archive.sevenzip.provider.SevenZip.Compression.RangeCoder.Encoder.InitBitModels(_isRep0... | _repMatchLenEncoder.Init(1 << _posStateBits); |
1,549,085 | void checkAggregateAndGaugeAndHeartbeatAlertsAsync(String agentRollupId, String agentRollupDisplay, long endTime) throws InterruptedException {<NEW_LINE>List<AlertConfig> alertConfigs;<NEW_LINE>try {<NEW_LINE>if (isCurrentlyDisabled(agentRollupId)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>alertConfigs = configRepository.... | e.getMessage(), e); |
623,807 | static void startMetrics(VelocityServer server, VelocityConfiguration.Metrics metricsConfig) {<NEW_LINE>Metrics metrics = new Metrics(logger, 4752, metricsConfig.isEnabled());<NEW_LINE>metrics.addCustomChart(new SingleLineChart("players", server::getPlayerCount));<NEW_LINE>metrics.addCustomChart(new SingleLineChart("ma... | .split("\\.")[0]; |
692,883 | protected void addCompletions(@NotNull CompletionParameters completionParameters, ProcessingContext processingContext, @NotNull CompletionResultSet completionResultSet) {<NEW_LINE>PsiElement position = completionParameters.getPosition();<NEW_LINE>if (!Symfony2ProjectComponent.isEnabled(position)) {<NEW_LINE>return;<NEW... | .getKeyText().toLowerCase(); |
86,519 | private <T extends Annotation> void inspect(Object handler, Method method, Class<T> annotationType, Class<? extends RepositoryEvent> eventType) {<NEW_LINE>T annotation = AnnotationUtils.findAnnotation(method, annotationType);<NEW_LINE>if (annotation == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (method.getParamete... | 0, handler.getClass()); |
1,394,822 | private void execFilterMethod(RpcConnection rpcConnection, Request<JsonObject> request) {<NEW_LINE>Participant participant;<NEW_LINE>try {<NEW_LINE>participant = sanityCheckOfSession(rpcConnection, "execFilterMethod");<NEW_LINE>} catch (OpenViduException e) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String streamId = getSt... | getStringParam(request, ProtocolElements.FILTER_METHOD_PARAM); |
989,869 | public Collection<? extends ProjectProblem> call() throws Exception {<NEW_LINE>Object wasprocessed = prj.getContextValue(MavenModelProblemsProvider.class.getName());<NEW_LINE>if (wasprocessed != null) {<NEW_LINE>Collection<ProjectProblem> cached = problemsCache.get();<NEW_LINE>LOG.log(Level.FINER, "Project was processe... | .addAll(doArtifactChecks(prj)); |
955,920 | public Void call() throws Exception {<NEW_LINE>final Builder parsedDataBuilder <MASK><NEW_LINE>try {<NEW_LINE>dependency.deserialize(dependencyType, deserializer, parsedDataBuilder.consumers());<NEW_LINE>} catch (DeserializationException e) {<NEW_LINE>if (!e.isLegacy()) {<NEW_LINE>throw MergingException.wrapException(e... | = ParsedAndroidData.Builder.newBuilder(); |
385,202 | private boolean hasJsonMedia(List<? extends AnnotationMirror> annotations) {<NEW_LINE>AnnotationMirror consumes = getAnnotation(annotations, CONSUMES);<NEW_LINE>AnnotationMirror <MASK><NEW_LINE>AnnotationMirror mimeTypeDecl = consumes == null ? produces : consumes;<NEW_LINE>if (mimeTypeDecl == null) {<NEW_LINE>return f... | produces = getAnnotation(annotations, PRODUCES); |
1,174,400 | private static void addBundle(final Object bundleWiring, final ClassLoader classLoader, final ClasspathOrder classpathOrderOut, final Set<Object> bundles, final ScanSpec scanSpec, final LogNode log) {<NEW_LINE>// Track the bundles we've processed to prevent loops<NEW_LINE>bundles.add(bundleWiring);<NEW_LINE>// Get the ... | invokeMethod(false, bundleWiring, "getRevision"); |
793,379 | private void processNearCacheMessage(byte[] message) {<NEW_LINE><MASK><NEW_LINE>int msgType = 0;<NEW_LINE>String cacheKey = null;<NEW_LINE>try {<NEW_LINE>ObjectInputStream oi = new ObjectInputStream(new ByteArrayInputStream(message));<NEW_LINE>String sourceServerId = oi.readUTF();<NEW_LINE>if (sourceServerId.equals(ser... | long nanos = System.nanoTime(); |
799,620 | protected void dead(DHTRouterContactImpl contact, boolean force) {<NEW_LINE>// DHTLog.log( DHTLog.getString( contact.getID()) + ": dead" );<NEW_LINE>contact.setPingOutstanding(false);<NEW_LINE>// record whether was failing<NEW_LINE>boolean was_failing = contact.isFailing();<NEW_LINE>if (contact.setFailed() || force) {<... | (rep.getID())); |
1,626,845 | public static String typeToString(int type) {<NEW_LINE>switch(type & MASK_TYPE) {<NEW_LINE>case TYPE_STRING:<NEW_LINE>// NOI18N<NEW_LINE>return "TYPE_STRING";<NEW_LINE>case TYPE_COMMENT:<NEW_LINE>return "TYPE_COMMENT";<NEW_LINE>case TYPE_BEAN:<NEW_LINE>// NOI18N<NEW_LINE>return "TYPE_BEAN";<NEW_LINE>case TYPE_BOOLEAN:<... | Integer.valueOf(type))); |
364,246 | public IBuildParticipant doSave() {<NEW_LINE>IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(qualifier);<NEW_LINE>if (enabledForBuild != null) {<NEW_LINE>prefs.putBoolean(PreferenceUtil.getEnablementPreferenceKey(getId(), BuildType.BUILD), enabledForBuild);<NEW_LINE>enabledForBuild = null;<NEW_LINE>}<NEW_LIN... | , PreferenceUtil.serializeFilters(filters)); |
187,484 | public List<String> find() {<NEW_LINE>ArrayList<String> nicknames = new ArrayList<>();<NEW_LINE>if (certType == SYSTEM)<NEW_LINE>return nicknames;<NEW_LINE>try {<NEW_LINE>for (String nssdb : NSSDB_URLS) {<NEW_LINE>Process p = Runtime.getRuntime().exec(new String[] { "certutil", "-d", nssdb, "-L" });<NEW_LINE>BufferedRe... | log.warn("Could not get certificate nicknames", e); |
17,191 | public Boolean startActivity(RunActivity anActivity) {<NEW_LINE>log.debug("Harmony api start activity requested for: " + anActivity.getName() + " for a hub: " + anActivity.getHub() + " noop mode: " + noopCalls);<NEW_LINE>if (anActivity.isValid()) {<NEW_LINE>try {<NEW_LINE>if (noopCalls || devMode) {<NEW_LINE>if (devMod... | (anActivity.getName())); |
761,750 | public static RegisterFaceResponse unmarshall(RegisterFaceResponse registerFaceResponse, UnmarshallerContext _ctx) {<NEW_LINE>registerFaceResponse.setRequestId(_ctx.stringValue("RegisterFaceResponse.RequestId"));<NEW_LINE>registerFaceResponse.setGroupId(_ctx.stringValue("RegisterFaceResponse.GroupId"));<NEW_LINE>List<F... | ("RegisterFaceResponse.Faces[" + i + "].Rect.Width")); |
426,894 | public String fetchConfig() {<NEW_LINE>final ArrayNode adaptersArray = JsonNodeFactory.instance.arrayNode();<NEW_LINE>// Construct the JObject for each adapter.<NEW_LINE>for (final Map.Entry<String, StorageAdapterBase> namespaceAdapterTuple : this.namespaceAdapters.entrySet()) {<NEW_LINE>// Skip system-defined adapters... | "fetchConfig", null, CdmLogCode.ErrStorageNullAdapter); |
1,349,380 | protected void configure() {<NEW_LINE>// must not be a singleton!<NEW_LINE>bind(LocalMetricRegistry.class).in(Scopes.NO_SCOPE);<NEW_LINE>install(new FactoryModuleBuilder().build(DecodingProcessor.Factory.class));<NEW_LINE>bind(ProcessBuffer.class).asEagerSingleton();<NEW_LINE>if (isMigrationCommand) {<NEW_LINE>bind(Inp... | String.class, IndexTemplateProvider.class); |
1,541,590 | public boolean saveListState() {<NEW_LINE>HashMap<Long, Boolean> savedPositions = ((VisibleListAdapter) getListAdapter()).getState();<NEW_LINE>ArrayList<ContentProviderOperation> ops <MASK><NEW_LINE>for (Long posInt : savedPositions.keySet()) {<NEW_LINE>boolean val = savedPositions.get(posInt);<NEW_LINE>ContentProvider... | = new ArrayList<ContentProviderOperation>(); |
1,005,240 | private Map<String, Boolean> deal(SysSite site, String path) {<NEW_LINE>path = path.replace("\\", CommonConstants.SEPARATOR).replace("//", CommonConstants.SEPARATOR);<NEW_LINE>Map<String, Boolean> map = new LinkedHashMap<>();<NEW_LINE>List<FileInfo> list = CmsFileUtils.getFileList(siteComponent.getWebTemplateFilePath(s... | .getWebTemplateFilePath(site, filePath)); |
52,177 | public void proposeNewNodeState(final ClusterState currentClusterState, final NodeInfo node, final NodeState proposedState) {<NEW_LINE>final NodeState currentState = currentClusterState.getNodeState(node.getNode());<NEW_LINE>final NodeState currentReported = node.getReportedState();<NEW_LINE>if (currentState.getState()... | .WANTED, timeNow), isMaster); |
540,443 | private MPayment createCounterDoc() {<NEW_LINE>// Is this a counter doc ?<NEW_LINE>if (getRef_Payment_ID() != 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Org Must be linked to BPartner<NEW_LINE>final MOrg org = MOrg.get(getCtx(), getAD_Org_ID());<NEW_LINE>final int counterC_BPartner_ID = org.getLinkedC_BPartner_I... | counter.setTenderType(getTenderType()); |
1,070,273 | public ApiResponse<ExtendedUser> usersPutWithHttpInfo(String id, UpdateUserRequest updateUserRequest) throws ApiException {<NEW_LINE>Object localVarPostBody = updateUserRequest;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(400, "Missing the required pa... | HashMap<String, Object>(); |
181,953 | void checkAggregateAlertsAsync(String agentId, String agentDisplay, long endTime) throws InterruptedException {<NEW_LINE>List<AlertConfig> alertConfigs;<NEW_LINE>try {<NEW_LINE>if (isCurrentlyDisabled(agentId)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>// probabl... | alertConfigs = configRepository.getAlertConfigs(agentId); |
1,165,067 | protected void validateRedirectUris() throws OidcServerException {<NEW_LINE>JsonArray redirectUris = client.getRedirectUris();<NEW_LINE>// Normalize by setting empty array, if null<NEW_LINE>if (redirectUris == null) {<NEW_LINE>client.setRedirectUris(new JsonArray());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!OidcOAuth2... | OIDCConstants.ERROR_INVALID_REDIRECT_URI, HttpServletResponse.SC_BAD_REQUEST); |
10,644 | private Mono<Response<ResourceNavigationLinksListResultInner>> listWithResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>retu... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
23,632 | private void processClusters(SimpleGraph<Glyph, GlyphLink> systemGraph) {<NEW_LINE>// Retrieve all the clusters of glyphs (sets of connected glyphs)<NEW_LINE>final ConnectivityInspector<Glyph, GlyphLink> inspector = new ConnectivityInspector<>(systemGraph);<NEW_LINE>final List<Set<Glyph>> sets = inspector.connectedSets... | .size(), maxPartCount)); |
329,147 | protected void fillData(boolean trimList) {<NEW_LINE>super.fillData(trimList);<NEW_LINE>ViewGroup group = (ViewGroup) findViewById(R.id.extra_strings);<NEW_LINE>if (trimList) {<NEW_LINE>group.removeAllViews();<NEW_LINE>}<NEW_LINE>PwEntryV4 entry = (PwEntryV4) mEntry;<NEW_LINE>PwDatabase pm <MASK><NEW_LINE>SprEngine spr... | = App.getDB().pm; |
669,785 | final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,229,059 | public static ListOTATaskByJobResponse unmarshall(ListOTATaskByJobResponse listOTATaskByJobResponse, UnmarshallerContext _ctx) {<NEW_LINE>listOTATaskByJobResponse.setRequestId(_ctx.stringValue("ListOTATaskByJobResponse.RequestId"));<NEW_LINE>listOTATaskByJobResponse.setSuccess(_ctx.booleanValue("ListOTATaskByJobRespons... | (_ctx.integerValue("ListOTATaskByJobResponse.PageSize")); |
823,617 | public static StaticScope restoreScope(String descriptor, StaticScope enclosingScope) {<NEW_LINE>String[] bits = descriptor.split(";");<NEW_LINE>StaticScope.Type type = StaticScope.Type.fromOrdinal(Integer.parseInt(bits[0]));<NEW_LINE>String file = bits[1];<NEW_LINE>String[] varNames = bits<MASK><NEW_LINE>int kwIndex =... | [2].split(","); |
997,081 | private void validateAndRegister() {<NEW_LINE>Collection<PlatformManagedObject> allBeans = beansByName.values();<NEW_LINE>// all beans should implement all the provided interfaces<NEW_LINE>for (PlatformManagedObject bean : allBeans) {<NEW_LINE>for (Class<?> interfaceType : interfaceTypes) {<NEW_LINE>if (!interfaceType.... | beansByInterface.put(interfaceType, beans); |
985,602 | public String beginFileUpload() throws TException {<NEW_LINE>String fileLoc = null;<NEW_LINE>try {<NEW_LINE>String path;<NEW_LINE>String key = UUID.randomUUID().toString();<NEW_LINE>path = StormConfig.masterInbox(conf) + "/" + key;<NEW_LINE>FileUtils.forceMkdir(new File(path));<NEW_LINE>FileUtils.cleanDirectory(new Fil... | (new FileOutputStream(fileLoc))); |
722,872 | private static String extractPath(String line, int strip, int loc) throws PatchFailedException {<NEW_LINE>// The line could look like:<NEW_LINE>// --- a/foo/bar.txt 2019-05-27 17:19:37.054593200 +0200<NEW_LINE>// +++ b/foo/bar.txt 2019-05-27 17:19:37.054593200 +0200<NEW_LINE>// If strip is 1, we want extract the fi... | || line.startsWith("--- ")); |
1,244,869 | public static boolean isDevServer() {<NEW_LINE>// In production server, GAE sets some non-overrideable environment variables.<NEW_LINE>// We will make use of some of them to determine whether the server is dev server or not.<NEW_LINE>// This means that any developer can replicate this condition in dev server,<NEW_LINE>... | version = System.getenv("GAE_VERSION"); |
637,850 | private String serializeMetrics(MetricQueryResults metricQueryResults) throws Exception {<NEW_LINE>SimpleModule module = new JodaModule();<NEW_LINE>module.addSerializer(new MetricNameSerializer(MetricName.class));<NEW_LINE>module.addSerializer(new MetricKeySerializer(MetricKey.class));<NEW_LINE>module.addSerializer(new... | result = objectMapper.writeValueAsString(metricQueryResults); |
1,270,823 | public SootMethod createDummyMain() {<NEW_LINE>// Load the substitution classes<NEW_LINE>if (substituteCallParams)<NEW_LINE>for (String className : substituteClasses) Scene.v().forceResolve(className, SootClass.BODIES).setApplicationClass();<NEW_LINE>// Create the empty main method<NEW_LINE>createAdditionalFields();<NE... | IntConstant.v(conditionCounter))); |
109,052 | private void inlineAnonymousConstructor(ICodeWriter code, ClassNode cls, ConstructorInsn insn) throws CodegenException {<NEW_LINE>if (this.mth.getParentClass() == cls) {<NEW_LINE>cls.remove(AType.ANONYMOUS_CLASS);<NEW_LINE>cls.remove(AFlag.DONT_GENERATE);<NEW_LINE>mth.getParentClass().getTopParentClass().add(AFlag.REST... | resolveMethod(insn.getCallMth()); |
1,111,538 | private JComboBox createComboBox(DataItem item, Font font, FocusListener listener) {<NEW_LINE>List<ItemVariant<MASK><NEW_LINE>JComboBox combo = new JComboBox(variants.toArray());<NEW_LINE>combo.setSelectedItem(item.getDefaultVariant());<NEW_LINE>// NOI18N<NEW_LINE>combo.getAccessibleContext().setAccessibleDescription(g... | > variants = item.getVariants(); |
1,302,537 | private DownlinkMsg processEntityMessage(EdgeEvent edgeEvent, EdgeEventActionType action) {<NEW_LINE>UpdateMsgType msgType = getResponseMsgType(edgeEvent.getAction());<NEW_LINE>log.trace("Executing processEntityMessage, edgeEvent [{}], action [{}], msgType [{}]", edgeEvent, action, msgType);<NEW_LINE>switch(edgeEvent.g... | log.warn("Unsupported edge event type [{}]", edgeEvent); |
530,337 | public Map<String, Mat> predict(Map<String, Mat> input) {<NEW_LINE>var net = getNet();<NEW_LINE>// If we have one input and one output, use simpler method<NEW_LINE>if (input.size() == 1 && outputLayerNames.size() == 1) {<NEW_LINE>var output = predict(input.values().iterator().next());<NEW_LINE>return Map.of(outputLayer... | setInput(entry.getValue()); |
1,259,061 | public StockQtyAndUOMQty extractQtys(final IHUContext huContext, final ProductId productId, final Quantity pickedQty, final I_M_HU huRecord) {<NEW_LINE>final IUOMConversionBL uomConversionBL = Services.get(IUOMConversionBL.class);<NEW_LINE>final IProductBL productBL = Services.get(IProductBL.class);<NEW_LINE>final UomI... | stockUOMId = productBL.getStockUOMId(productId); |
889,206 | public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {<NEW_LINE>super.configure(name, params);<NEW_LINE>LOGGER.debug("Configuring LDAP Manager");<NEW_LINE>messageBus.subscribe(AccountManager.MESSAGE_REMOVE_ACCOUNT_EVENT, new MessageSubscriber() {<NEW_LINE><NEW_LINE>@Override<N... | remove(ldapTrustMapVO.getId()); |
1,227,543 | private String formatExecutionSummary(String conclusion, long completionTime) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("Execution of ").append(mc.jobIdString()).append(' ').append(conclusion);<NEW_LINE>sb.append("\n\t").append("Start time: ").append(Util.toLocalDateTime(executionStartTime))... | .RECEIVED_COUNT, vertex, receivedCounts)); |
57,545 | public void run() {<NEW_LINE>BufferedImage bi = new BufferedImage(frm.getWidth(), frm.getHeight() + headerHeight, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>bi.setRGB(0, headerHeight, imageWidth, imageHeight, imageRGB, 0, imageWidth);<NEW_LINE>if (headerImage != null) {<NEW_LINE>Graphics2D g2d = bi.createGraphics();<NEW_LI... | = new FileOutputStream(findScreenshotFile()); |
1,267,194 | private void processResponses(Result result, String summaryClass) throws TimeoutException {<NEW_LINE>try {<NEW_LINE>int skippedHits = 0;<NEW_LINE>while (outstandingResponses > 0) {<NEW_LINE>long timeLeftMs = result<MASK><NEW_LINE>if (timeLeftMs <= 0) {<NEW_LINE>throwTimeout();<NEW_LINE>}<NEW_LINE>var responseAndHits = ... | .getQuery().getTimeLeft(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.