idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
532,793 | protected void encodeEndPoint(WidgetBuilder wb, EndPoint endPoint, String elementClientId) throws IOException {<NEW_LINE>String type = endPoint.getType();<NEW_LINE>StringBuilder sb = SharedStringBuilder.get(SB_DIAGRAM);<NEW_LINE>String styleClass = endPoint.getStyleClass();<NEW_LINE>String hoverStyleClass = endPoint.ge... | (",paintStyle:").append(style); |
204,433 | final DescribeEntitiesDetectionV2JobResult executeDescribeEntitiesDetectionV2Job(DescribeEntitiesDetectionV2JobRequest describeEntitiesDetectionV2JobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEntitiesDetectionV2JobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,433,799 | public static int estimateBandPassOrder(double sampleRate, int passBandStart, int passBandEnd, double passBandRippleDb, double stopBandRippleDb) {<NEW_LINE>double df = (double) FastMath.abs(passBandEnd - passBandStart) / sampleRate;<NEW_LINE>double ddp = FastMath.log10(passBandRippleDb);<NEW_LINE>double dds = FastMath.... | a3) + t3 + t4 + a6; |
1,614,986 | public static boolean isCdi11OrLater(Project p) {<NEW_LINE>if (!hasResource(p, "javax/enterprise/inject/spi/AfterTypeDiscovery.class")) {<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>FileObject beans = getBeansXmlExists(p);<NEW_LINE>if (beans == null) {<NEW_LINE>// no beans.xml and ee7 environment, default cdi 1.1... | ).getAttribute(BeansAttributes.VERSION); |
542,963 | public ResponseCard unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ResponseCard responseCard = new ResponseCard();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_... | JsonToken token = context.getCurrentToken(); |
1,587,253 | final GetFaceSearchResult executeGetFaceSearch(GetFaceSearchRequest getFaceSearchRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFaceSearchRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetFaceSearchRequest> request = null;<NE... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,051,051 | public static void main(final String... args) {<NEW_LINE>LOGGER.info("\n=========================================================" + "\n " + "\n Welcome to Spring Integration! " + "\n ... | context.getBean(SearchB.class); |
1,514,098 | private static String decrypt(PublicKey publicKey, String cipherText) throws Exception {<NEW_LINE>Cipher cipher = Cipher.getInstance("RSA");<NEW_LINE>try {<NEW_LINE>cipher.init(Cipher.DECRYPT_MODE, publicKey);<NEW_LINE>} catch (InvalidKeyException e) {<NEW_LINE>// IBM JDK not support Private key encryption, public key ... | plainBytes = cipher.doFinal(cipherBytes); |
519,573 | public void marshall(CreateSimulationJobRequest createSimulationJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createSimulationJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(create... | createSimulationJobRequest.getDataSources(), DATASOURCES_BINDING); |
1,337,522 | public String uploadFile(String fileKey, File file) throws IOException {<NEW_LINE>if (s3Client == null || bucketName == null) {<NEW_LINE>throw new IllegalStateException("BackblazeDataTransferClient has not been initialised");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>long contentLength = file.length();<NEW_LINE>monitor.debug(... | uploadFileUsingMultipartUpload(fileKey, file, contentLength); |
719,559 | protected boolean isCurrentPlanSuccessful() {<NEW_LINE>boolean successful = true;<NEW_LINE>List<ExecutionContext.ErrorMessage> errorMessages = (List<ExecutionContext.ErrorMessage>) executionContext.getExtraDatas().get(ExecutionContext.FailedMessage);<NEW_LINE>if (GeneralUtil.isNotEmpty(errorMessages)) {<NEW_LINE>// Cop... | phyTableName.replaceAll(BACKTICK, EMPTY_CONTENT); |
1,810,583 | protected Tuple4<String[], String[], TypeInformation<?>[], String[]> prepareIoSchema(TableSchema dataSchema, Params params) {<NEW_LINE>ArrayList<String> tensorCols = new ArrayList<>();<NEW_LINE>ArrayList<TypeInformation<?>> tensorColTypes = new ArrayList<>();<NEW_LINE>String[] names = dataSchema.getFieldNames();<NEW_LI... | .add(names[i]); |
141,648 | private static void testContainers() {<NEW_LINE>TestContainers testContainers = new TestContainers();<NEW_LINE>Foo[] sv = testContainers.getStructVec();<NEW_LINE>assert sv.length == 2;<NEW_LINE>assert sv[0].getName().equals("1");<NEW_LINE>assert sv[0].calcF(0, 0) == 1;<NEW_LINE>assert sv[1].getName().equals("2");<NEW_L... | [1].equals("was"); |
1,362,521 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.group_join_bottom_sheet, container, false);<NEW_LINE>groupCancelButton = view.findViewById(R.id.group_join_cancel_button);<NEW_LINE>groupJoinBut... | findViewById(R.id.group_join_group_details); |
1,325,202 | final CreateMembersResult executeCreateMembers(CreateMembersRequest createMembersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createMembersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | (super.beforeMarshalling(createMembersRequest)); |
1,493,545 | public void marshall(ListFeatureGroupsRequest listFeatureGroupsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listFeatureGroupsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listFeatureG... | listFeatureGroupsRequest.getMaxResults(), MAXRESULTS_BINDING); |
679,832 | private void buildHeader(byte msgCount, byte msgFlag, MaxCulMsgType msgType, byte groupId, String srcAddr, String dstAddr) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>this.msgCount = msgCount;<NEW_LINE>sb.append(String.format("%02x", msgCount).toUpperCase());<NEW_LINE>this.msgFlag = msgFlag;<NEW_LINE>sb... | append(dstAddr.toUpperCase()); |
934,348 | public void printLog(int level) {<NEW_LINE>// convert total time to nanoseconds<NEW_LINE>totalTime = (long) (((double) totalTime * (double) 1000000000) / (<MASK><NEW_LINE>StringBuffer sb = new StringBuffer(200);<NEW_LINE>for (int i = 0; i < (level * 3); i++) sb.append(' ');<NEW_LINE>sb.append(name);<NEW_LINE>sb.append(... | double) ProfileTimer.getResolution()); |
948,561 | // Final entry of adding backend<NEW_LINE>private void addBackend(String host, int heartbeatPort, boolean isFree, String destCluster, Map<String, String> tagMap) {<NEW_LINE>Backend newBackend = new Backend(Env.getCurrentEnv().getNextId(), host, heartbeatPort);<NEW_LINE>// update idToBackend<NEW_LINE>Map<Long, Backend> ... | newBackend.getId(), newBackend); |
1,346,828 | private void renderMovementInfo(Graphics2D graphics, Tile tile) {<NEW_LINE>Polygon poly = Perspective.getCanvasTilePoly(client, tile.getLocalLocation());<NEW_LINE>if (poly == null || !poly.contains(client.getMouseCanvasPosition().getX(), client.getMouseCanvasPosition().getY())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if... | renderPolygon(graphics, poly, GREEN); |
557,861 | public void send(PRUDPPacket request_packet, InetSocketAddress destination_address) throws PRUDPPacketHandlerException {<NEW_LINE>if (socket == null || socket.isClosed()) {<NEW_LINE>if (init_error != null) {<NEW_LINE>throw (new PRUDPPacketHandlerException("Transport unavailable", init_error));<NEW_LINE>}<NEW_LINE>throw... | Debug.getNestedExceptionMessage(e))); |
809,421 | public void authorizeSubscriptions(@NotNull final ChannelHandlerContext ctx, @NotNull final SUBSCRIBE msg) {<NEW_LINE>final String clientId = ctx.channel().attr(ChannelAttributes.CLIENT_CONNECTION).get().getClientId();<NEW_LINE>if (clientId == null || !ctx.channel().isActive()) {<NEW_LINE>// no more processing needed<N... | SubscriptionAuthorizerOutputImpl output = new SubscriptionAuthorizerOutputImpl(asyncer); |
1,501,331 | public Policy findById(ResourceServer resourceServer, String id) {<NEW_LINE>if (id == null)<NEW_LINE>return null;<NEW_LINE>CachedPolicy cached = cache.get(id, CachedPolicy.class);<NEW_LINE>if (cached != null) {<NEW_LINE>logger.tracev("by id cache hit: {0}", cached.getId());<NEW_LINE>}<NEW_LINE>if (cached == null) {<NEW... | ).findById(resourceServer, id); |
1,844,901 | public void pickBlockerOrder(UUID playerId, Game game) {<NEW_LINE>if (blockers.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// game.getPlayer(defenderAssignsCombatDamage(game) ? defendingPlayerId : playerId); // this was incorrect because defenderAssignsCombatDamage might be false by the time damage is dealt<NEW_L... | blockerPerms, this, blockerOrder, game); |
330,499 | public List<String> introspect() {<NEW_LINE>List<String> rc = new LinkedList<String>();<NEW_LINE>String prefix = getClass().getSimpleName() + "@" + hashCode() + ": ";<NEW_LINE>rc.add(prefix + "aborted=" + this.aborted);<NEW_LINE>rc.add(prefix + "forceQueue=" + this.forceQueue);<NEW_LINE>rc.add(<MASK><NEW_LINE>rc.add(pr... | prefix + "ioAmount=" + this.ioAmount); |
1,606,196 | public void buildWriteMethod(JDefinedClass parcelableClass, JBlock body, JExpression parcel, JVar flags, ASTType type, JExpression targetExpression, ASTType converter, ReadWriteGenerator overrideGenerator, JExpression writeIdentitySet) {<NEW_LINE>JType parcelType = generationUtil.ref(ANDROID_PARCEL);<NEW_LINE>// write ... | , variableNamer.generateName(parcelType)); |
996,326 | public Void visitNewClass(NewClassTree javacTree, Node javaParserNode) {<NEW_LINE>ObjectCreationExpr node = castNode(ObjectCreationExpr.class, javaParserNode, javacTree);<NEW_LINE>processNewClass(javacTree, node);<NEW_LINE>// When using Java 11 javac, an expression like this.new MyInnerClass() would store "this"<NEW_LI... | javacArgs, node.getArguments()); |
668,282 | public final IJavaElement transplantHandle(IJavaElement element) {<NEW_LINE>IJavaElement parent = element.getParent();<NEW_LINE>if (parent != null) {<NEW_LINE>// recursive<NEW_LINE>parent = transplantHandle(parent);<NEW_LINE>}<NEW_LINE>switch(element.getElementType()) {<NEW_LINE>case IJavaElement.JAVA_MODEL:<NEW_LINE><... | return transplantHandle((IJavaModel) element); |
1,413,999 | public void initialize(AccessServiceConfig accessServiceConfig, OMRSTopicConnector enterpriseOMRSTopicConnector, OMRSRepositoryConnector repositoryConnector, AuditLog auditLog, String serverUserName) {<NEW_LINE>final String actionDescription = "initialize Glossary View OMAS";<NEW_LINE>this.auditLog = auditLog;<NEW_LINE... | auditLog.logMessage(actionDescription, messageDefinition); |
1,521,171 | public List<MigrationQuery> compute(MappingModel mappingModel, Keyspace keyspace) {<NEW_LINE>List<MigrationQuery> queries = new ArrayList<>();<NEW_LINE>List<String> errors = new ArrayList<>();<NEW_LINE>for (EntityModel entity : mappingModel.getEntities().values()) {<NEW_LINE>switch(entity.getTarget()) {<NEW_LINE>case T... | UDT_NO_CREATE_INDEX, "UDT", queries, errors); |
6,381 | protected List<ProgrammingLanguage> sortAndFilterInternal(Map<String, SortMeta> sortBy, Map<String, FilterMeta> filterBy) {<NEW_LINE>Stream<ProgrammingLanguage<MASK><NEW_LINE>if (filterBy != null && !filterBy.isEmpty()) {<NEW_LINE>for (FilterMeta meta : filterBy.values()) {<NEW_LINE>if (meta.getFilterValue() != null) {... | > langsStream = langs.stream(); |
1,342,658 | final GetFindingsPublicationConfigurationResult executeGetFindingsPublicationConfiguration(GetFindingsPublicationConfigurationRequest getFindingsPublicationConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFindingsPublicationConfigurationRequest);<NEW_LINE>AWSRequestMetrics ... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Macie2"); |
1,209,656 | public void onProjectsLinked(@Nonnull final Collection linked) {<NEW_LINE>List<VcsDirectoryMapping> newMappings = ContainerUtilRt.newArrayList();<NEW_LINE>final LocalFileSystem fileSystem = LocalFileSystem.getInstance();<NEW_LINE>ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(project);<NEW_LINE>... | refreshAndFindFileByPath(settings.getExternalProjectPath()); |
842,520 | public com.amazonaws.services.medialive.model.ConflictException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.medialive.model.ConflictException conflictException = new com.amazonaws.services.medialive.model.ConflictException(null);<NEW_LINE><MASK><NEW_LINE>Str... | int originalDepth = context.getCurrentDepth(); |
223,649 | private BeanReference createFilterChain(Element element, ParserContext pc) {<NEW_LINE>boolean secured = !OPT_SECURITY_NONE.equals(element.getAttribute(ATT_SECURED));<NEW_LINE>if (!secured) {<NEW_LINE>validateSecuredFilterChainElement(element, pc);<NEW_LINE>for (int i = 0; i < element.getChildNodes().getLength(); i++) {... | portResolver, httpBldr.getCsrfLogoutHandler()); |
588,037 | private UncachedKeyRing fetchKeyFromFacebook(@NonNull ParcelableProxy proxy, OperationLog log, ParcelableKeyRing entry) throws PgpGeneralException, IOException {<NEW_LINE>if (facebookServer == null) {<NEW_LINE>facebookServer = FacebookKeyserverClient.getInstance();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>log.add(LogType.MSG... | Timber.e(e, "query failed"); |
631,202 | private static IndexFileList downloadIndexesListFromInternet(OsmandApplication ctx) {<NEW_LINE>try {<NEW_LINE>IndexFileList result = new IndexFileList();<NEW_LINE>log.debug("Start loading list of index files");<NEW_LINE>try {<NEW_LINE>String strUrl = ctx.getAppCustomization().getIndexesUrl();<NEW_LINE>long nd = ctx.get... | .getAppInitializer().getNumberOfStarts(); |
1,689,427 | private List<Operation> extractOperations(RestMockService mockService) {<NEW_LINE>// Actions corresponding to same operations may be defined multiple times in SoapUI<NEW_LINE>// with different resourcePaths. We have to track them to complete them in second step.<NEW_LINE>Map<String, Operation> collectedOperations = new... | action.getName(), operation); |
1,794,150 | public static IValue createFrom(final IValueInputStream vos) throws IOException {<NEW_LINE>final int index = vos.getIndex();<NEW_LINE>final <MASK><NEW_LINE>final int info = vos.readByte();<NEW_LINE>Value res;<NEW_LINE>final Value[] rvals = new Value[len];<NEW_LINE>if (info == 0) {<NEW_LINE>final int low = vos.readInt()... | int len = vos.readNat(); |
622,092 | void generateMapLoadIns(BIRNonTerminator.FieldAccess mapLoadIns) {<NEW_LINE>// visit map_ref<NEW_LINE>this.loadVar(mapLoadIns.rhsOp.variableDcl);<NEW_LINE>BType varRefType = mapLoadIns.rhsOp.variableDcl.type;<NEW_LINE>jvmCastGen.addUnboxInsn(this.mv, varRefType);<NEW_LINE>// visit key_expr<NEW_LINE>this.<MASK><NEW_LINE... | loadVar(mapLoadIns.keyOp.variableDcl); |
959,740 | public void display(GLAutoDrawable glautodrawable) {<NEW_LINE>GL2 gl = glautodrawable.getGL().getGL2();<NEW_LINE>if (DEBUG) {<NEW_LINE>gl = new DebugGL2(gl);<NEW_LINE>}<NEW_LINE>camera.simpleAnimate();<NEW_LINE>camera.applyCamera(gl);<NEW_LINE>// int width = glautodrawable.getWidth();<NEW_LINE>gl.glClearColor(1.f, 1.f,... | gl.glEnableClientState(GL2.GL_NORMAL_ARRAY); |
690,717 | final DescribeJobLogItemsResult executeDescribeJobLogItems(DescribeJobLogItemsRequest describeJobLogItemsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeJobLogItemsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.SERVICE_ID, "drs"); |
138,678 | private void initInfo(int record_id, String value) {<NEW_LINE>if (!(record_id == 0) && value != null && value.length() > 0) {<NEW_LINE>log.severe("Received both a record_id and a value: " + record_id + " - " + value);<NEW_LINE>}<NEW_LINE>// Set values<NEW_LINE>if (// A record is defined<NEW_LINE>!(record_id == 0)) {<NE... | p_WindowNo, p_TabNo, "C_BankAccount_ID", true); |
1,615,235 | protected static Collection<Geocache> searchByBBox(final Viewport viewport) {<NEW_LINE>if (!Settings.isGCPremiumMember() || CONSUMER_KEY.isEmpty() || viewport.getLatitudeSpan() == 0 || viewport.getLongitudeSpan() == 0) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>final double lat1 = viewport.getLatitu... | Log.d("_AL Radius: " + radius); |
1,594,361 | public List<LintDefectV2Entity> findDefectsByFilePath(Long taskId, String toolName, Set<Integer> excludeStatusSet, Set<String> filterPaths) {<NEW_LINE>BasicDBObject fieldsObj = new BasicDBObject();<NEW_LINE><MASK><NEW_LINE>fieldsObj.put("exclude_time", true);<NEW_LINE>Query query = new BasicQuery(new BasicDBObject(), f... | fieldsObj.put("status", true); |
1,392,008 | public void refresh() {<NEW_LINE>collectObj();<NEW_LINE>isActive = false;<NEW_LINE>Iterator<Integer> serverIds = serverObjMap.keySet().iterator();<NEW_LINE>final List<Pack> result <MASK><NEW_LINE>while (serverIds.hasNext()) {<NEW_LINE>int serverId = serverIds.next();<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverI... | = new ArrayList<Pack>(); |
562,385 | private void handleSegmentReferredToCountAndRententionFlags(SegmentHeader segmentHeader) throws IOException, JBIG2Exception {<NEW_LINE>short referedToSegmentCountAndRetentionFlags = reader.readByte();<NEW_LINE>// 224<NEW_LINE>int referredToSegmentCount = (referedToSegmentCountAndRetentionFlags & 224) >> 5;<NEW_LINE>// ... | out.println("referredToSegmentCount = " + referredToSegmentCount); |
868,082 | public Object intercept(final Invocation invocation) throws Throwable {<NEW_LINE>StatementHandler statementHandler = (StatementHandler) invocation.getTarget();<NEW_LINE>// Elegant access to object properties through MetaObject, here is access to the properties of statementHandler;<NEW_LINE>// MetaObject is an object pr... | BoundSql boundSql = statementHandler.getBoundSql(); |
587,481 | final BatchGetAggregateResourceConfigResult executeBatchGetAggregateResourceConfig(BatchGetAggregateResourceConfigRequest batchGetAggregateResourceConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetAggregateResourceConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
977,728 | public synchronized void createUser(User user, int account) {<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>long id = user.getId();<NEW_LINE>String screenName = user.getScreenName();<NEW_LINE>String name = user.getName();<NEW_LINE><MASK><NEW_LINE>values.put(FavoriteUsersSQLiteHelper.COLUMN_ACCOUNT, acco... | String proPicUrl = user.getOriginalProfileImageURL(); |
337,604 | public static void verticalInverse(WlCoef_F32 coefficients, GrayF32 input, GrayF32 output) {<NEW_LINE>final int offsetA = coefficients.offsetScaling;<NEW_LINE>final int offsetB = coefficients.offsetWavelet;<NEW_LINE>final float[] alpha = coefficients.scaling;<NEW_LINE>final float[] beta = coefficients.wavelet;<NEW_LINE... | lowerBorder = UtilWavelet.borderForwardLower(coefficients); |
1,755,878 | private Map<String, Object> _getCompositeComponentAttributesMapWrapper(UIComponent baseComponent, ELContext elContext) {<NEW_LINE>Map<Object, Object> contextMap = (Map<Object, Object>) <MASK><NEW_LINE>// We use a WeakHashMap<UIComponent, WeakReference<Map<String, Object>>> to<NEW_LINE>// hold attribute map wrappers by ... | facesContext(elContext).getAttributes(); |
137,077 | private ArgParsed parseLongOption(String pArg, String pNextArgument) {<NEW_LINE>// Long option<NEW_LINE>String opt = pArg.substring(2);<NEW_LINE>String value = null;<NEW_LINE>// Check for format 'key=value' as argument<NEW_LINE>Matcher <MASK><NEW_LINE>if (matcher.matches()) {<NEW_LINE>opt = matcher.group(1);<NEW_LINE>v... | matcher = ARGUMENT_PATTERN_WITH_EQUAL.matcher(opt); |
794,143 | public Boolean isVulnerable() {<NEW_LINE>List<ProtocolVersion> versions = config.getVersions();<NEW_LINE>Config tlsConfig = getTlsConfig();<NEW_LINE>List<CipherSuite> <MASK><NEW_LINE>if (tlsConfig.getDefaultClientSupportedCipherSuites().isEmpty()) {<NEW_LINE>for (CipherSuite cs : CipherSuite.getImplemented()) {<NEW_LIN... | ciphers = new LinkedList<>(); |
1,203,496 | public void rotate(double theta, boolean flipH, boolean flipV, double cx, double cy) {<NEW_LINE>cx += state.dx;<NEW_LINE>cy += state.dy;<NEW_LINE>cx *= state.scale;<NEW_LINE>cy *= state.scale;<NEW_LINE>state.g.rotate(Math.toRadians(theta), cx, cy);<NEW_LINE>// This implementation uses custom scale/translate and built-i... | (flipV) ? -1 : 1; |
897,018 | public void marshall(RegisterActivityTypeRequest registerActivityTypeRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (registerActivityTypeRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(reg... | registerActivityTypeRequest.getDefaultTaskPriority(), DEFAULTTASKPRIORITY_BINDING); |
1,631,707 | public Mono<PollResponse<T>> poll(PollingContext<T> pollingContext, TypeReference<T> pollResponseType) {<NEW_LINE>HttpRequest request = new HttpRequest(HttpMethod.GET, pollingContext.getData(PollingConstants.LOCATION));<NEW_LINE>return httpPipeline.send(request, this.context).flatMap(response -> {<NEW_LINE>HttpHeader l... | LOCATION, locationHeader.getValue()); |
930,395 | protected List<Person> doInBackground(Account... accounts) {<NEW_LINE>if (mActivityRef.get() == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Context context = mActivityRef.get().getApplicationContext();<NEW_LINE>try {<NEW_LINE>GoogleAccountCredential credential = GoogleAccountCredential.usingOAuth2(context, Collec... | get().onRecoverableAuthException(recoverableException); |
1,716,109 | private void enterPlanRouteMode() {<NEW_LINE>final MapActivity mapActivity = getMapActivity();<NEW_LINE>MapMarkersLayer markersLayer = getMapMarkersLayer();<NEW_LINE>if (mapActivity != null && markersLayer != null) {<NEW_LINE>markersLayer.setInPlanRouteMode(true);<NEW_LINE>mapActivity.disableDrawer();<NEW_LINE>AndroidU... | planRouteContext.setSnappedMode(ApplicationMode.DEFAULT); |
989,326 | public Tree tree() throws ScanException, ParseException {<NEW_LINE>consumeToken();<NEW_LINE>AstNode t = text();<NEW_LINE>if (token.getSymbol() == EOF) {<NEW_LINE>if (t == null) {<NEW_LINE>t = new AstText("");<NEW_LINE>}<NEW_LINE>return new Tree(t, functions, identifiers, false);<NEW_LINE>}<NEW_LINE>AstEval e = eval();<... | identifiers, e.isDeferred()); |
901,294 | public void taskFinished(Task task) {<NEW_LINE>FileObject modeDir = userDir.get().getFileObject("config/Windows2Local/Modes");<NEW_LINE>OutputStream os;<NEW_LINE>if (modeDir != null) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>try {<NEW_LINE>FileSystem layer = findLayer(project);<NEW_LINE>if (layer == n... | layer.getRoot(), name); |
1,723,470 | public boolean performCommand(ConsoleInput ci, DownloadManager dm, List<String> args) {<NEW_LINE>if (args.size() < 2) {<NEW_LINE>ci.out.println("> Command 'hack': Not enough parameters for subcommand '" + getCommandName() + "'");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>String op = args.get(0);<NEW_LIN... | println("Tag '" + tag_name + "' created"); |
1,152,570 | public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>final InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);<... | getDeclaredMethod("writeTo", "org.springframework.http.client.reactive.ClientHttpRequest", "org.springframework.web.reactive.function.client.ExchangeStrategies"); |
670,768 | final ListAnalyzersResult executeListAnalyzers(ListAnalyzersRequest listAnalyzersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAnalyzersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.SERVICE_ID, "AccessAnalyzer"); |
446,407 | public void load() {<NEW_LINE>if (panel != null) {<NEW_LINE>this.remove(panel);<NEW_LINE>}<NEW_LINE>joystickService.setActivateActionDispatcher(false);<NEW_LINE>panel = new JPanel(new MigLayout("inset 5"));<NEW_LINE>activeCheckbox = new JCheckBox(Localization.getString("platform.plugin.joystick.activate"), Settings.isA... | getString("platform.plugin.joystick.buttonControls")), "wrap, spanx, hmin 24"); |
748,377 | static void test_i386_inout() {<NEW_LINE>// ECX register<NEW_LINE>Long r_eax = 0x1234L;<NEW_LINE>// EDX register<NEW_LINE>Long r_ecx = 0x6789L;<NEW_LINE>System.out.print("===================================\n");<NEW_LINE>System.out.print("Emulate i386 code with IN/OUT instructions\n");<NEW_LINE>// Initialize emulator i... | ), 1, 0, null); |
1,464,444 | public int doStartTag() throws JspException {<NEW_LINE>Properties ctx = JSPEnv.getCtx((HttpServletRequest) pageContext.getRequest());<NEW_LINE>//<NEW_LINE>WebUser wu = getWebUser(ctx);<NEW_LINE>if (wu == null)<NEW_LINE>pageContext.getSession().removeAttribute(WebUser.NAME);<NEW_LINE>else<NEW_LINE>pageContext.getSession... | html = getWelcomeLink(serverContext, wu); |
1,549,733 | public void onEnable() {<NEW_LINE>if (this.incompatibleVersion) {<NEW_LINE>Logger logger = this.loader.getLogger();<NEW_LINE>logger.severe("----------------------------------------------------------------------");<NEW_LINE>logger.severe("Your server version is not compatible with this build of LuckPerms. :(");<NEW_LINE... | ).disablePlugin(this.loader); |
1,019,306 | protected void exportToBEncodedMap(Map map, boolean for_export) throws IOException {<NEW_LINE>String cla = this.getClass().getName();<NEW_LINE>if (cla.startsWith(MY_PACKAGE)) {<NEW_LINE>cla = cla.substring(MY_PACKAGE.length());<NEW_LINE>}<NEW_LINE>MapUtils.setMapString(map, "_impl", cla);<NEW_LINE>MapUtils.exportLong(m... | = new HashMap<>(persistent_properties); |
27,629 | public Single<Long> call() {<NEW_LINE><MASK><NEW_LINE>if (query.count() && (query.hasAggregations() || !query.groupBy().isEmpty())) {<NEW_LINE>throw new UnsupportedOperationException("count(*) doesn't work with existing aggregates");<NEW_LINE>}<NEW_LINE>if (query.offset().isPresent()) {<NEW_LINE>throw new UnsupportedOp... | Query query = operation.query(); |
1,397,588 | /*<NEW_LINE>*<NEW_LINE><w:p><NEW_LINE><w:pPr><NEW_LINE><w:pStyle w:val="Heading1"/><NEW_LINE></w:pPr><NEW_LINE><w:subDoc r:id="rId4"/><NEW_LINE><w:r><NEW_LINE><w:t>Another heading</w:t><NEW_LINE></w:r><NEW_LINE></w:p><NEW_LINE><NEW_LINE>* word/_rels/document.xml.rels contains:<NEW_LINE>*<NEW_LINE>* <Relationship Id="rI... | getProperty("user.dir") + "/OUT_SubDocumentMASTER.docx")); |
1,646,814 | public static ListTimeLinesResponse unmarshall(ListTimeLinesResponse listTimeLinesResponse, UnmarshallerContext context) {<NEW_LINE>listTimeLinesResponse.setRequestId(context.stringValue("ListTimeLinesResponse.RequestId"));<NEW_LINE>listTimeLinesResponse.setCode(context.stringValue("ListTimeLinesResponse.Code"));<NEW_L... | ("ListTimeLinesResponse.TimeLines[" + i + "].PhotosCount")); |
1,169,300 | public TransferResult<CFValue, CFStore> visitNumericalAddition(NumericalAdditionNode n, TransferInput<CFValue, CFStore> in) {<NEW_LINE>// type of leftNode + rightNode is glb(t, s) where<NEW_LINE>// t = minusOffset(type(leftNode), rightNode) and<NEW_LINE>// s = minusOffset(type(rightNode), leftNode)<NEW_LINE>UBQualifi... | n.getRightOperand(), atypeFactory); |
923,500 | private void loadNode540() {<NEW_LINE>SessionSecurityDiagnosticsTypeNode node = new SessionSecurityDiagnosticsTypeNode(this.context, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, new QualifiedName(0, "SessionSecurityDiagnostics"), new LocalizedText("en", "SessionSecurityDiagnostics"), LocalizedTe... | .expanded(), true)); |
377,742 | final BatchDeleteClusterSnapshotsResult executeBatchDeleteClusterSnapshots(BatchDeleteClusterSnapshotsRequest batchDeleteClusterSnapshotsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDeleteClusterSnapshotsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,182,729 | private void init() {<NEW_LINE>mInAnimationSet = new AnimationSet(false);<NEW_LINE>TranslateAnimation mSlideInAnimation = new TranslateAnimation(TranslateAnimation.RELATIVE_TO_PARENT, 0.0f, TranslateAnimation.RELATIVE_TO_PARENT, 0.0f, TranslateAnimation.RELATIVE_TO_SELF, 1.0f, TranslateAnimation.RELATIVE_TO_SELF, 0.0f)... | = new AlphaAnimation(1.0f, 0.0f); |
292,136 | public DataObject execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {<NEW_LINE>Revision virtualRevision = getRevisionByRoid(roid);<NEW_LINE>ObjectIdentifier objectIdentifier = null;<NEW_LINE>for (ConcreteRevision concreteRevision : virtualRevision.getConcreteRevisions()) {<NEW_L... | ), concreteRevision.getId()); |
612,125 | public static Drawable drawCircleAndImage(int color, @DimenRes int sizeResId, @DrawableRes int imageResId, @DimenRes int sizeImgResId, @NonNull Resources res) {<NEW_LINE>final int size = res.getDimensionPixelSize(sizeResId);<NEW_LINE>final Bitmap bmp = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);<NEW_LINE>... | size - offset, size - offset); |
973,820 | private static String nextDateValue(TimexProperty timex, LocalDateTime date) {<NEW_LINE>if (timex.getDayOfMonth() != null) {<NEW_LINE>Integer year = date.getYear();<NEW_LINE>Integer month = date.getMonth().getValue();<NEW_LINE>if (timex.getMonth() != null) {<NEW_LINE>month = timex.getMonth();<NEW_LINE>if (date.getMonth... | setMonth(start.getMonthValue()); |
1,208,938 | public void deleteUser(String username) throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>VolleyError error = new VolleyError("Missing the required param... | (username.toString())); |
1,569,012 | public okhttp3.Call readClusterRoleCall(String name, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}".replaceAll("\\{" + "name" + "\... | (name.toString())); |
359,433 | public static void createEntity(HandlerContext handlerCtx) {<NEW_LINE>Map<String, Object> attrs = (Map) handlerCtx.getInputValue("attrs");<NEW_LINE>if (attrs == null) {<NEW_LINE>attrs = new HashMap<>();<NEW_LINE>}<NEW_LINE>String endpoint = (String) handlerCtx.getInputValue("endpoint");<NEW_LINE>RestResponse response =... | Boolean) handlerCtx.getInputValue("throwException"); |
978,532 | public void unregisterMetrics(SharedMetricRegistries sharedMetricRegistry) {<NEW_LINE>MetricRegistry vendorRegistry = sharedMetricRegistry.getOrCreate(MetricRegistry.Type.VENDOR.getName());<NEW_LINE>MetricRegistry baseRegistry = sharedMetricRegistry.getOrCreate(MetricRegistry.Type.BASE.getName());<NEW_LINE>for (MetricI... | (rc ? "successfully" : "unsuccessfully")); |
808,957 | public void configure(Customer customer, UniverseConfigureTaskParams taskParams) {<NEW_LINE>if (taskParams.currentClusterType == null) {<NEW_LINE>throw new PlatformServiceException(BAD_REQUEST, "currentClusterType must be set");<NEW_LINE>}<NEW_LINE>if (taskParams.clusterOperation == null) {<NEW_LINE>throw new PlatformS... | getCustomerId(), c.uuid); |
1,775,255 | default <T, T2, T3, R> Higher<CRE, R> ap3(Higher<CRE, ? extends Function<T, ? extends Function<T2, ? extends Function<T3, R>>>> fn, Higher<CRE, T> apply, Higher<CRE, T2> apply2, Higher<CRE, T3> apply3) {<NEW_LINE>Higher<CRE, Function<T, Function<T2, Function<T3, R>>>> fnToUse = (Higher<CRE, Function<T, Function<T2, Fun... | ap2 = ap(ap1, apply2); |
912,176 | public PostingsEnum postings(FieldInfo fieldInfo, BlockTermState termState, PostingsEnum reuse, int flags) throws IOException {<NEW_LINE>boolean indexHasPositions = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;<NEW_LINE>if (indexHasPositions == false || PostingsEnum.featureReque... | ((IntBlockTermState) termState, flags); |
151,855 | public static DescribeVulListResponse unmarshall(DescribeVulListResponse describeVulListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVulListResponse.setRequestId(_ctx.stringValue("DescribeVulListResponse.RequestId"));<NEW_LINE>describeVulListResponse.setCurrentPage(_ctx.integerValue("DescribeVulListResponse.C... | ("DescribeVulListResponse.VulRecords[" + i + "].AliasName")); |
887,983 | public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException {<NEW_LINE>int grant = 0;<NEW_LINE>int deny = 0;<NEW_LINE>for (AccessDecisionVoter voter : getDecisionVoters()) {<NEW_LINE>int result = voter.<MASK><NEW_LINE>switch(result) {<NEW_L... | vote(authentication, object, configAttributes); |
241,945 | public static boolean enablePlugin(@Nullable Activity activity, @NonNull OsmandApplication app, @NonNull OsmandPlugin plugin, boolean enable) {<NEW_LINE>if (enable) {<NEW_LINE>if (!plugin.init(app, activity)) {<NEW_LINE>plugin.setEnabled(false);<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>plugin.setEnabled(true);... | plugin.updateLayers(mapActivity, mapActivity); |
867,662 | private Map<String, String> parseOracleUrl(String jdbcUrl) {<NEW_LINE>HashMap<String, String> map = new HashMap<String, String>();<NEW_LINE>if (jdbcUrl == null || !StringUtils.startsWithIgnoreCase(jdbcUrl, "jdbc:oracle:thin")) {<NEW_LINE>return map;<NEW_LINE>}<NEW_LINE>int pos1 = jdbcUrl.indexOf(':', 5);<NEW_LINE>if (p... | map.put("urlWithoutParams", urlWithoutParams); |
616,600 | public com.amazonaws.services.simplesystemsmanagement.model.OpsItemNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.simplesystemsmanagement.model.OpsItemNotFoundException opsItemNotFoundException = new com.amazonaws.services.simplesystemsmanagem... | String currentParentElement = context.getCurrentParentElement(); |
697,081 | private void applyState(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value, EndpointState epState) {<NEW_LINE>switch(state) {<NEW_LINE>case RELEASE_VERSION:<NEW_LINE>StargateSystemKeyspace.updatePeerInfo(endpoint, "release_version", value.value);<NEW_LINE>break;<NEW_LINE>case DC:<NEW_LINE>Stargat... | InetAddressAndPort.getByName(value.value); |
897,540 | public void enableNetworkLogging() {<NEW_LINE>Logger logger = LoggerFactory.getLogger(REACTOR_NETWORK_LOG_CATEGORY);<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>this.httpClient = this.httpClient.wiretap(REACTOR_NETWORK_LOG_CATEGORY, LogLevel.TRACE);<NEW_LINE>} else if (logger.isDebugEnabled()) {<NEW_LINE>this.http... | wiretap(REACTOR_NETWORK_LOG_CATEGORY, LogLevel.ERROR); |
182,087 | public final void recover() throws IOException {<NEW_LINE>String filename = this.filePrefix + "queue.chkpt";<NEW_LINE>final BufferedDataInputStream vis = new BufferedDataInputStream(filename);<NEW_LINE>this.len = vis.readLong();<NEW_LINE>this.loPool = vis.readInt();<NEW_LINE>this.hiPool = vis.readInt();<NEW_LINE>this.e... | (this.deqBuf[i]); |
1,625,390 | public void saveSortConsumption(InlongGroupInfo bizInfo, String topic, String consumerGroup) {<NEW_LINE>String groupId = bizInfo.getInlongGroupId();<NEW_LINE>ConsumptionEntity exists = consumptionMapper.selectConsumptionExists(groupId, topic, consumerGroup);<NEW_LINE>if (exists != null) {<NEW_LINE>log.warn("consumption... | setCreator(bizInfo.getCreator()); |
1,136,061 | public int[] pivotArray(int[] nums, int pivot) {<NEW_LINE>List<Integer> <MASK><NEW_LINE>List<Integer> greater = new ArrayList<>();<NEW_LINE>int count = 0;<NEW_LINE>for (int i = 0; i < nums.length; i++) {<NEW_LINE>if (nums[i] < pivot) {<NEW_LINE>less.add(nums[i]);<NEW_LINE>} else if (nums[i] > pivot) {<NEW_LINE>greater.... | less = new ArrayList<>(); |
895,637 | private static String buildAutomodFragments(JSONArray fragments) {<NEW_LINE>StringBuilder b = new StringBuilder();<NEW_LINE>for (Object o : fragments) {<NEW_LINE>JSONObject fragment = (JSONObject) o;<NEW_LINE>String text = <MASK><NEW_LINE>if (fragment.containsKey("automod")) {<NEW_LINE>if (b.length() > 0) {<NEW_LINE>b.... | JSONUtil.getString(fragment, "text"); |
758,879 | final DescribeScheduledActionsResult executeDescribeScheduledActions(DescribeScheduledActionsRequest describeScheduledActionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeScheduledActionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
178,848 | public boolean isValid(String newNm) {<NEW_LINE>newName = newNm;<NEW_LINE>LocalSymbolMap localSymbolMap = hfunction.getLocalSymbolMap();<NEW_LINE>if (localSymbolMap.containsVariableWithName(newName) || isSymbolInFunction(function, newName)) {<NEW_LINE>errorMsg = "Duplicate name";<NEW_LINE>return false;<NEW_LINE>}<NEW_L... | = "Rename Failed: " + e.getMessage(); |
403,915 | final DeleteHITResult executeDeleteHIT(DeleteHITRequest deleteHITRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteHITRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.