idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,089,637 | // Use breadth first search to find methods are called more than once in call graph<NEW_LINE>private void finder1(PegCallGraph pcg) {<NEW_LINE>Set clinitMethods = pcg.getClinitMethods();<NEW_LINE>Iterator it = pcg.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>Object head = it.next();<NEW_LINE>// breadth first sc... | = new HashSet<Object>(); |
1,577,763 | private Table findTable(String alias) {<NEW_LINE>List<String> names = null;<NEW_LINE>if (tableScope == null) {<NEW_LINE>// no tables to find<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>for (ScopeChild child : tableScope.children) {<NEW_LINE>if (catalogReader.nameMatcher().matches(child.name, alias)) {<NEW_LINE>if (!(chil... | namespace.getNode()).names; |
30,670 | public static void initCache() {<NEW_LINE>final Instant startTime = Instant.now();<NEW_LINE>for (final PwmSetting pwmSetting : EnumSet.allOf(PwmSetting.class)) {<NEW_LINE>pwmSetting.getProperties();<NEW_LINE>pwmSetting.getFlags();<NEW_LINE>pwmSetting.getOptions();<NEW_LINE>pwmSetting.getLabel(PwmConstants.DEFAULT_LOCAL... | toMenuLocationDebug(null, PwmConstants.DEFAULT_LOCALE); |
1,357,920 | public int compareSp(Slice str1, Slice str2) {<NEW_LINE>UcaScanner scanner1 = new UcaScanner(str1);<NEW_LINE>UcaScanner scanner2 = new UcaScanner(str2);<NEW_LINE>int weight1, weight2;<NEW_LINE>do {<NEW_LINE>weight1 = scanner1.next();<NEW_LINE>weight2 = scanner2.next();<NEW_LINE>} while (weight1 == weight2 && weight1 > ... | [0x20 * UCA_LENGTH[0]]; |
81,448 | public void detectAPILeaks(ASTNode typeNode, TypeBinding type) {<NEW_LINE>if (environment().useModuleSystem) {<NEW_LINE>// NB: using an ASTVisitor yields more precise locations than a TypeBindingVisitor would<NEW_LINE>ASTVisitor visitor = new ASTVisitor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean visit(Sin... | typeReference.sourceStart, typeReference.sourceEnd); |
517,927 | private void constructMenu(@Nonnull BlockMenuPreset preset) {<NEW_LINE>for (int i : border) {<NEW_LINE>preset.addItem(i, ChestMenuUtils.getBackground(), ChestMenuUtils.getEmptyClickHandler());<NEW_LINE>}<NEW_LINE>for (int i : border_1) {<NEW_LINE>preset.addItem(i, new CustomItemStack(Material.LIME_STAINED_GLASS_PANE, "... | ), ChestMenuUtils.getEmptyClickHandler()); |
654,846 | ActionResult<List<Wo>> execute(EffectivePerson effectivePerson) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>CacheKey cacheKey = new CacheKey(this.getClass());<NEW_LINE>Optional<... | .copier.copy(o)); |
1,025,948 | protected void exec() {<NEW_LINE>Graph shapesGraph = load(shapesfile, "shapes file");<NEW_LINE>Graph dataGraph;<NEW_LINE>if (datafile.equals(shapesfile))<NEW_LINE>dataGraph = shapesGraph;<NEW_LINE>else<NEW_LINE>dataGraph = load(datafile, "data file");<NEW_LINE>Node node = null;<NEW_LINE>if (targetNode != null) {<NEW_LI... | getGraph(), Lang.TTL); |
502,456 | public void onBindViewHolder(@NonNull ViewHolder holder, int position) {<NEW_LINE>String packageName = packages.get(position);<NEW_LINE>ApplicationInfo info = null;<NEW_LINE>try {<NEW_LINE>info = pm.getApplicationInfo(packageName, 0);<NEW_LINE>} catch (PackageManager.NameNotFoundException ignore) {<NEW_LINE>}<NEW_LINE>... | loadLabel(pm).toString(); |
1,786,819 | final CreateRateBasedRuleResult executeCreateRateBasedRule(CreateRateBasedRuleRequest createRateBasedRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRateBasedRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
944,958 | final DescribePatchGroupStateResult executeDescribePatchGroupState(DescribePatchGroupStateRequest describePatchGroupStateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePatchGroupStateRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LIN... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,205,442 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>locationContainer = new javax.swing.JPanel();<NEW_LINE>fill = <MASK><NEW_LINE>setPreferredSize(new java.awt.Dimension(500, ... | new javax.swing.JPanel(); |
1,646,525 | public static OSSUnderFileSystem createInstance(AlluxioURI uri, UnderFileSystemConfiguration conf) throws Exception {<NEW_LINE>String bucketName = UnderFileSystemUtils.getBucketName(uri);<NEW_LINE>Preconditions.checkArgument(conf.isSet(PropertyKey.OSS_ACCESS_KEY<MASK><NEW_LINE>Preconditions.checkArgument(conf.isSet(Pro... | ), "Property %s is required to connect to OSS", PropertyKey.OSS_ACCESS_KEY); |
464,146 | final DisassociateInstanceEventWindowResult executeDisassociateInstanceEventWindow(DisassociateInstanceEventWindowRequest disassociateInstanceEventWindowRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateInstanceEventWindowRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateInstanceEventWindow"); |
192,498 | protected Pair<RegisterSetLatticeElement, RegisterSetLatticeElement> transformAnd(final ReilInstruction ins, final RegisterSetLatticeElement state) {<NEW_LINE>if ((ins.getFirstOperand().getType() == OperandType.INTEGER_LITERAL) && ins.getFirstOperand().getValue().equalsIgnoreCase("0")) {<NEW_LINE>final RegisterSetLatti... | getThirdOperand().getValue()); |
1,796,037 | private ResponseSpec loginUserRequestCreation(String username, String password) throws WebClientResponseException {<NEW_LINE>Object postBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>throw new WebClientResponseException("Missing the required parameter ... | ), null, null, null); |
1,370,627 | private void createDatabase(String dbname) throws Exception {<NEW_LINE>final String method = "createDatabase";<NEW_LINE>Log.info(c, method, "Creating database " + dbname + " on " + dbhostname);<NEW_LINE>if (dbname.length() > SYBASE_MAX_NAME_LENGTH)<NEW_LINE>throw new Exception(DATABASE_NAME_LENGTH_EXCEEDED + SYBASE_MAX... | ] cmd = new String[20]; |
1,350,657 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>Permanent <MASK><NEW_LINE>if (player == null || permanent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int power = permanent.getPower().getValue();<NEW_LINE>if (power == 0) {<NEW_LINE>r... | permanent = source.getSourcePermanentOrLKI(game); |
1,315,815 | public void upgrade() throws IOException {<NEW_LINE>if (!DirectoryReader.indexExists(dir)) {<NEW_LINE>throw new IndexNotFoundException(dir.toString());<NEW_LINE>}<NEW_LINE>if (!deletePriorCommits) {<NEW_LINE>final Collection<IndexCommit> commits = DirectoryReader.listCommits(dir);<NEW_LINE>if (commits.size() > 1) {<NEW... | (iwc.getMergePolicy())); |
445,955 | public void channelRead(ChannelHandlerContext ctx, Object msg) {<NEW_LINE>Channel channel = ctx.channel();<NEW_LINE>Attribute<Context> contextAttr = channel.attr(AttributeKeys.SERVER_CONTEXT);<NEW_LINE>Attribute<HttpRequestAndChannel> requestAttr = channel.attr(AttributeKeys.SERVER_REQUEST);<NEW_LINE>if (!(msg instance... | Context serverContext = contextAttr.get(); |
698,142 | public void execute() throws BuildException {<NEW_LINE>String release = getRelease();<NEW_LINE>if (release == null || release.isEmpty()) {<NEW_LINE>String tgr = getTarget();<NEW_LINE>if (tgr.matches("\\d+")) {<NEW_LINE>tgr = "1." + tgr;<NEW_LINE>}<NEW_LINE>if (!isBootclasspathOptionUsed()) {<NEW_LINE>setRelease(tgr.sub... | " from this VM; forking " + maybeFork, Project.MSG_WARN); |
255,724 | protected void flushPixels() {<NEW_LINE><MASK><NEW_LINE>if (hasPixels) {<NEW_LINE>// If the user has been manipulating individual pixels,<NEW_LINE>// the changes need to be copied to the screen before<NEW_LINE>// drawing any new geometry.<NEW_LINE>int mx1 = getModifiedX1();<NEW_LINE>int mx2 = getModifiedX2();<NEW_LINE>... | boolean hasPixels = modified && pixels != null; |
1,377,282 | final GetRequestedServiceQuotaChangeResult executeGetRequestedServiceQuotaChange(GetRequestedServiceQuotaChangeRequest getRequestedServiceQuotaChangeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRequestedServiceQuotaChangeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | endClientExecution(awsRequestMetrics, request, response); |
1,493,040 | public static PubsubTopic fromPath(String path) {<NEW_LINE>if (path.equals(TOPIC_DEV_NULL_TEST_NAME)) {<NEW_LINE>return new PubsubTopic(PubsubTopic.Type.FAKE, "", path);<NEW_LINE>}<NEW_LINE>String projectName, topicName;<NEW_LINE>Matcher v1beta1Match = V1BETA1_TOPIC_REGEXP.matcher(path);<NEW_LINE>if (v1beta1Match.match... | LOG.warn("Saw topic in v1beta1 format. Topics should be in the format " + "projects/<project_id>/topics/<topic_name>"); |
1,415,076 | public List<AnnotatedDeclaredType> visitDeclared(AnnotatedDeclaredType type, Void p) {<NEW_LINE>// Set<AnnotationMirror> annotations = type.getAnnotations();<NEW_LINE>TypeElement typeElement = (TypeElement) type.getUnderlyingType().asElement();<NEW_LINE>if (type.getTypeArguments().size() != typeElement.getTypeParameter... | (supertypesFromElement(type, typeElement)); |
861,902 | public ListContactFlowsResult listContactFlows(ListContactFlowsRequest listContactFlowsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listContactFlowsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsReque... | new JsonResponseHandler<ListContactFlowsResult>(unmarshaller); |
762,042 | private void decodeMacroblocks(Frame[][] refList) {<NEW_LINE>Picture mb = Picture.create(16, 16, activeSps.chromaFormatIdc);<NEW_LINE>int mbWidth = activeSps.picWidthInMbsMinus1 + 1;<NEW_LINE>MBlock mBlock = new MBlock(activeSps.chromaFormatIdc);<NEW_LINE>while (parser.readMacroblock(mBlock)) {<NEW_LINE>int mbAddr = ma... | mbAddr] = parser.getSliceHeader(); |
1,390,713 | private Geometry createMultiPointFromStreams_() {<NEW_LINE>assert (m_position != null);<NEW_LINE>assert (m_paths == null);<NEW_LINE>assert (m_path_flags == null);<NEW_LINE>MultiPoint multi_point = new MultiPoint();<NEW_LINE>MultiPointImpl multi_point_impl = (MultiPointImpl) multi_point._getImpl();<NEW_LINE>multi_point_... | notifyModified(MultiVertexGeometryImpl.DirtyFlags.DirtyAll); |
1,002,159 | protected void doExecute(Task task, Request request, ActionListener<Response> listener) {<NEW_LINE>final Repository repository = repositoriesService.repository(request.getRepositoryName());<NEW_LINE>if (repository instanceof BlobStoreRepository == false) {<NEW_LINE>throw new IllegalArgumentException("repository [" + re... | logger.trace("handling [{}]", request); |
524,942 | public void write(CompoundTag compound, boolean clientPacket) {<NEW_LINE>super.write(compound, clientPacket);<NEW_LINE>compound.put("InputItems", inputInventory.serializeNBT());<NEW_LINE>compound.put("OutputItems", outputInventory.serializeNBT());<NEW_LINE>if (preferredSpoutput != null)<NEW_LINE>NBTHelper.writeEnum(com... | ().serializeNBT())); |
1,617,225 | public FormatterStep newFormatterStep(FormatterStepConfig stepConfig) {<NEW_LINE>Map<String, String> devDependencies = TsFmtFormatterStep.defaultDevDependencies();<NEW_LINE>if (typescriptFormatterVersion != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (typescriptVersion != null) {<NEW_LINE>devDependencies.put("typesc... | devDependencies.put("typescript-formatter", typescriptFormatterVersion); |
66,177 | public long handle(Emulator<?> emulator) {<NEW_LINE>RegisterContext context = emulator.getContext();<NEW_LINE>Pointer pthread_start = context.getPointerArg(0);<NEW_LINE>Pointer child_stack = context.getPointerArg(1);<NEW_LINE>int flags = context.getIntArg(2);<NEW_LINE>Pointer thread = context.getPointerArg(3);<NEW_LINE... | arg = thread.getPointer(0x68); |
624,128 | final DeleteBrowserSettingsResult executeDeleteBrowserSettings(DeleteBrowserSettingsRequest deleteBrowserSettingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteBrowserSettingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBrowserSettings"); |
1,471,813 | private List<Pair<double[], long[]>> findDimensions(ArrayList<PROCLUSCluster> clusters, Relation<? extends NumberVector> database) {<NEW_LINE>// compute x_ij = avg distance from points in c_i to c_i.centroid<NEW_LINE>final int <MASK><NEW_LINE>final int numc = clusters.size();<NEW_LINE>double[][] averageDistances = new ... | dim = RelationUtil.dimensionality(database); |
491,048 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>findViewById(R.id.btSimpleView).setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>startAc... | .this, SimpleViewFlipActivity.class)); |
1,397,192 | protected static List<LayoutDecision> maximalDecisionValues(Map<Element, LayoutDecisionMap> alreadyDecided, LayoutDecision.Kind k, Comparator<LayoutDecision> cmp) {<NEW_LINE>ArrayList<LayoutDecision> currentMax = null;<NEW_LINE>for (Map.Entry<Element, LayoutDecisionMap> eOuter : alreadyDecided.entrySet()) {<NEW_LINE>La... | , currentMax.get(0)); |
915,109 | public static String transformQueryString(String qs) {<NEW_LINE>// drop characters that are not properly supported by Indri<NEW_LINE>// ('.' is only allowed in between digits)<NEW_LINE>qs = qs.replaceAll("&\\w++;", " ");<NEW_LINE>qs = qs.replaceAll(FORBIDDEN_CHAR, " ");<NEW_LINE>String dotsRemoved = "";<NEW_LINE>for (i... | + "(\\([^\\(\\)]*+\\)|\\\"[^\\\"]*+\\\"|[^\\s\\(\\)]++)").matcher(qs); |
1,633,134 | private Object findObjectToSelectAfterDeletion() {<NEW_LINE>Object firstObject = fSelectedObjects[0];<NEW_LINE>TreeItem item = fViewer.findTreeItem(firstObject);<NEW_LINE>if (item == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>TreeItem parentTreeItem = item.getParentItem();<NEW_LINE>// Parent Item not found so mu... | Tree tree = item.getParent(); |
79,279 | IntTree<V> minus(final long key) {<NEW_LINE>if (size == 0)<NEW_LINE>return this;<NEW_LINE>if (key < this.key)<NEW_LINE>return rebalanced(left.minus(key - this.key), right);<NEW_LINE>if (key > this.key)<NEW_LINE>return rebalanced(left, right.minus(key - this.key));<NEW_LINE>// otherwise key==this.key, so we are killing ... | + this.key) - newKey); |
1,798,848 | final void executeRespondActivityTaskCanceled(RespondActivityTaskCanceledRequest respondActivityTaskCanceledRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(respondActivityTaskCanceledRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
781,297 | public ListSatellitesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListSatellitesResult listSatellitesResult = new ListSatellitesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | )).unmarshall(context)); |
860,988 | public void marshall(ResourceDataSyncSourceWithState resourceDataSyncSourceWithState, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (resourceDataSyncSourceWithState == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.... | resourceDataSyncSourceWithState.getAwsOrganizationsSource(), AWSORGANIZATIONSSOURCE_BINDING); |
853,661 | private //<NEW_LINE>RepairCandidate errorRecovery(int error_token, boolean forcedError) {<NEW_LINE>this.errorToken = error_token;<NEW_LINE>this.errorTokenStart = this.lexStream.start(error_token);<NEW_LINE>int prevtok = this.lexStream.previous(error_token);<NEW_LINE>int prevtokKind = this.lexStream.kind(prevtok);<NEW_L... | [MAX_DISTANCE - MIN_DISTANCE + 2]); |
1,115,567 | private Expression newArrayAccess(ArrayAccess arrayAccessNode, TypeMirror componentType, TypeElement iosArrayElement, boolean assignable) {<NEW_LINE>String funcName = ElementUtil.getName(iosArrayElement) + "_Get";<NEW_LINE>TypeMirror returnType = componentType;<NEW_LINE>TypeMirror declaredReturnType = componentType.get... | = new FunctionInvocation(element, returnType); |
1,359,330 | public com.amazonaws.services.redshiftdataapi.model.ValidationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.redshiftdataapi.model.ValidationException validationException = new com.amazonaws.services.redshiftdataapi.model.ValidationException(null);<NE... | int originalDepth = context.getCurrentDepth(); |
1,390,275 | protected BuildScriptBuilder.SuiteSpec addTestSuite(String name, BuildScriptBuilder buildScriptBuilder, BuildInitTestFramework testFramework, TemplateLibraryVersionProvider libraryVersionProvider) {<NEW_LINE>switch(testFramework) {<NEW_LINE>case JUNIT:<NEW_LINE>return buildScriptBuilder.testing(<MASK><NEW_LINE>case JUN... | ).junitSuite(name, libraryVersionProvider); |
290,934 | protected JFreeChart createPieChart() throws JRException {<NEW_LINE>ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());<NEW_LINE>JFreeChart jfreeChart = ChartFactory.createPieChart(evaluateTextExpression(getChart().getTitleExpression()), (PieDataset) getDataset(), isShowLegend(), true, false);<NEW_LINE>... | ? true : jrPiePlot.getCircular(); |
975,382 | final GetDomainSuggestionsResult executeGetDomainSuggestions(GetDomainSuggestionsRequest getDomainSuggestionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDomainSuggestionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDomainSuggestions"); |
1,448,660 | private void writeTicketsFile(Repository db, String file, String content, String createdBy, String msg) {<NEW_LINE>if (getTicketsBranch(db) == null) {<NEW_LINE>createTicketsBranch(db);<NEW_LINE>}<NEW_LINE>DirCache newIndex = DirCache.newInCore();<NEW_LINE>DirCacheBuilder builder = newIndex.builder();<NEW_LINE><MASK><NE... | ObjectInserter inserter = db.newObjectInserter(); |
1,297,910 | <T> T evictionOrder(boolean hottest, Function<V, V> transformer, Function<Stream<CacheEntry<K, V>>, T> mappingFunction) {<NEW_LINE>Comparator<Node<K, V>> comparator = Comparator.comparingInt(node -> {<NEW_LINE>K key = node.getKey();<NEW_LINE>return (key == null) ? 0 : frequencySketch().frequency(key);<NEW_LINE>});<NEW_... | ), comparator.reversed()); |
1,361,465 | public static int computeMaxAcceptableAlleleCount(final int ploidy, final int maxGenotypeCount) {<NEW_LINE>// a hack to check ploidy makes sense (could duplicate code but choice must be made)<NEW_LINE>checkPloidyAndMaximumAllele(ploidy, ploidy);<NEW_LINE>if (ploidy == 1) {<NEW_LINE>return maxGenotypeCount;<NEW_LINE>}<N... | floor(x) - ploidy - 1; |
199,720 | public void verify(Component component, JRVerifier verifier) {<NEW_LINE>ListComponent listComponent = (ListComponent) component;<NEW_LINE>JRDatasetRun datasetRun = listComponent.getDatasetRun();<NEW_LINE>if (datasetRun == null) {<NEW_LINE>verifier.addBrokenRule("No list subdataset run set", listComponent);<NEW_LINE>} e... | verifier.addBrokenRule("No list contents set", listComponent); |
1,297,160 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Choice choice = new ChoiceCreatureType(game.getObject(source));<NEW_LINE>if (controller != null && controller.choose(Outcome.GainControl, choice, game)) {<NEW_LINE>String chosenType = choice... | add(new ControllerIdPredicate(playerId)); |
1,496,542 | public void run(ResultIterator resultIterator) throws Exception {<NEW_LINE>final Map<Library, String> importsMap = new LinkedHashMap<>();<NEW_LINE>for (Map.Entry<String, String> entry : context.getDeclarations().entrySet()) {<NEW_LINE>String uri = entry.getKey();<NEW_LINE>String prefix = entry.getValue();<NEW_LINE>Libr... | lib = jsfs.getLibrary(uri); |
430,172 | public static String toUserDisplayableString(final Uri uri) {<NEW_LINE>if (uri == null) {<NEW_LINE>return "---";<NEW_LINE>}<NEW_LINE>// Handle special File case<NEW_LINE>if (isFileUri(uri)) {<NEW_LINE>return uri.getPath();<NEW_LINE>}<NEW_LINE>String uriString = uri.getLastPathSegment();<NEW_LINE>if (uriString == null) ... | uriString = uriString.substring(1); |
1,760,160 | protected Collection<Declarable> processListener(MethodRabbitListenerEndpoint endpoint, RabbitListener rabbitListener, Object bean, Object target, String beanName) {<NEW_LINE>final List<Declarable> declarables = new ArrayList<>();<NEW_LINE>endpoint.setBean(bean);<NEW_LINE>endpoint.setMessageHandlerMethodFactory(this.me... | setExclusive(rabbitListener.exclusive()); |
1,785,363 | public static void registerTornadoMathPlugins(final InvocationPlugins plugins) {<NEW_LINE>Registration registration = new Registration(plugins, TornadoMath.class);<NEW_LINE>registerFloatMath1Plugins(registration, float.class, JavaKind.Float);<NEW_LINE>registerTrigonometric1Plugins(registration, float.class, JavaKind.Fl... | float.class, JavaKind.Float); |
489,202 | public boolean intersects(List<String> value, ChunkData data) {<NEW_LINE>if (data.getRegion() == null || data.getRegion().getData() == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>ChunkFilter chunkFilter = VersionController.getChunkFilter(data.getRegion().getData().getInt("DataVersion"));<NEW_LINE>CompoundTag ref... | getRegion().getData()); |
163,420 | public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<ModelMap> allModels) {<NEW_LINE>Map<String, Object> operations = (Map<String, Object>) objs.get("operations");<NEW_LINE>List<CodegenOperation> os = (List<CodegenOperation>) operations.get("operation");<NEW_LINE>List<ExtendedCodege... | = new ArrayList<String>(); |
1,017,020 | public void forceCleanOnlineStatus(String userId, String clientId) {<NEW_LINE>if (m_Server.isShutdowning()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!mMultiPlatformNotification || m_Server.getStore().sessionsStore().isMultiEndpointSupported()) {<NEW_LINE>WFCMessage.UserSettingEntry pcentry = getUserSetting(userId, kU... | ).build(), clientId); |
1,810,765 | private void customizeComponents() {<NEW_LINE>searchTextField.setComponentPopupMenu(rightClickMenu);<NEW_LINE>ActionListener actList = new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>JMenuItem jmi = <MASK><NEW_LINE>if (jmi.equals(cutMenuItem)) {<NEW_LIN... | (JMenuItem) e.getSource(); |
1,632,952 | protected Mono<Void> renderInternal(Map<String, Object> model, @Nullable MediaType contentType, ServerWebExchange exchange) {<NEW_LINE>return exchange.getResponse().writeWith(Mono.fromCallable(() -> {<NEW_LINE>try {<NEW_LINE>ScriptEngine engine = getEngine();<NEW_LINE>String url = getUrl();<NEW_LINE>Assert.state(url !=... | ).getBytes(StandardCharsets.UTF_8); |
442,172 | private StringBuilder innModifyTopicDeployStatusInfo(HttpServletRequest req, StringBuilder sBuffer, ProcessResult result, TopicStsChgType chgType) {<NEW_LINE>// check and get operation info<NEW_LINE>if (!WebParameterUtils.getAUDBaseInfo(req, false, null, sBuffer, result)) {<NEW_LINE>WebParameterUtils.buildFailResult(sB... | sBuffer, result.getErrMsg()); |
553,901 | public synchronized void draw(Rect rect) {<NEW_LINE>if (mFrame == null || !(mFrame.is(Extension.POINTS)))<NEW_LINE>return;<NEW_LINE>setViewport(rect);<NEW_LINE>GLES10.glMatrixMode(GLES10.GL_PROJECTION);<NEW_LINE>GLES10.glPushMatrix();<NEW_LINE>GLES10.glLoadIdentity();<NEW_LINE>GLES10.glOrthof(1f, -1f, -1f, 1f, -7f, 0f)... | mFrame.as(Extension.POINTS); |
711,289 | protected void updateContext(Map<String, Object> context) {<NEW_LINE>context.put("showTickLabels", showLabels);<NEW_LINE>context.put("tickLength", length);<NEW_LINE>context.put("tickWidth", width);<NEW_LINE>context.put("tickColor", color);<NEW_LINE>context.put("tickFont", tickFont);<NEW_LINE>context.put("ticks", placem... | context.put("exponentFormat", exponentFormat); |
457,749 | final UpdateCertificateResult executeUpdateCertificate(UpdateCertificateRequest updateCertificateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateCertificateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCertificate"); |
1,282,168 | protected void parseXmlInputStream(DefaultHandler handler, InputStream inputStream) throws IOException {<NEW_LINE>try {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Parsing XML response document with handler: " + handler.getClass());<NEW_LINE>}<NEW_LINE>final BufferedReader breader = new BufferedReader(new ... | handler.getClass(), t); |
717,482 | public void run() {<NEW_LINE>if (!LOG.isStatistics()) {<NEW_LINE>LOG.error("Logging level should be at least level STATISTICS (parameter -time) to see any output.");<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>Relation<O> relation = database.getRelation(distance.getInputTypeRestriction());<NEW_LINE>final String key = getClass(... | Database database = inputstep.getDatabase(); |
1,356,199 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>String username = Preferences.getUsername(this);<NEW_LINE>boolean addAccount = getIntent().getBooleanExtra(EXTRA_ADD_ACCOUNT, false);<NEW_LINE>setContentView(R.layout.activity_login);<NEW_LINE>mUsernameLayout = (T... | setTitle(R.string.re_enter_password); |
754,428 | final CreateEnvironmentTemplateResult executeCreateEnvironmentTemplate(CreateEnvironmentTemplateRequest createEnvironmentTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createEnvironmentTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | (super.beforeMarshalling(createEnvironmentTemplateRequest)); |
396,876 | public static // but overrides the disk and machine type options in the template.<NEW_LINE>void createInstanceFromTemplateWithOverrides(String projectId, String zone, String instanceName, String instanceTemplateName) throws IOException, ExecutionException, InterruptedException {<NEW_LINE>try (InstancesClient instancesC... | addDisks(newdisk).build(); |
422,913 | private int parseLine(int startOff, int endOff, Pattern ptn) throws BadLocationException {<NEW_LINE>if (endOff <= startOff) {<NEW_LINE>return endOff;<NEW_LINE>}<NEW_LINE>Document doc = getDocument();<NEW_LINE>while (true) {<NEW_LINE>String line = doc.getText(startOff, endOff - startOff);<NEW_LINE>Matcher m = ptn.matche... | += m.end() + 1; |
558,549 | private List<Versioned<byte[]>> proxyGetAndLocalPut(ByteArray key, int proxyId, byte[] transforms) throws VoldemortException {<NEW_LINE>List<Versioned<byte[]>> proxyValues = <MASK><NEW_LINE>for (Versioned<byte[]> proxyValue : proxyValues) {<NEW_LINE>try {<NEW_LINE>getInnerStore().put(key, proxyValue, null);<NEW_LINE>} ... | proxyGet(key, proxyId, transforms); |
397,186 | final SendProjectSessionActionResult executeSendProjectSessionAction(SendProjectSessionActionRequest sendProjectSessionActionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(sendProjectSessionActionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,493,027 | private static void findSyntacticRelationsFromDependency(List<Mention> orderedMentions) {<NEW_LINE>if (orderedMentions.size() == 0)<NEW_LINE>return;<NEW_LINE>markListMemberRelation(orderedMentions);<NEW_LINE>SemanticGraph dependency = orderedMentions.get(0).enhancedDependency;<NEW_LINE>// apposition<NEW_LINE>Set<Pair<I... | ().index() - 1; |
950,812 | public static void main(String[] args) throws IOException {<NEW_LINE>BufferedReader br = new BufferedReader(new InputStreamReader(System.in));<NEW_LINE>br.readLine();<NEW_LINE>br.readLine();<NEW_LINE>// no. of elements in array<NEW_LINE>int n = Integer.parseInt(br.readLine());<NEW_LINE>int[<MASK><NEW_LINE>String[] inpu... | ] sides = new int[n]; |
1,812,940 | private int[] computeRequiredStemIndices(PreprocessingContext context) {<NEW_LINE>final int[] labelsFeatureIndex = context.allLabels.featureIndex;<NEW_LINE>final int[] wordsStemIndex = context.allWords.stemIndex;<NEW_LINE>final short[] wordsTypes = context.allWords.type;<NEW_LINE>final int[][] phrasesWordIndices = cont... | = new BitSet(labelsFeatureIndex.length); |
29,517 | public void start() {<NEW_LINE>bootstrap.option(ChannelOption.SO_REUSEADDR, true);<NEW_LINE>bootstrap.childOption(ChannelOption.TCP_NODELAY, true);<NEW_LINE>bootstrap.group(bossGroup, workerGroup).channel(NioServerSocketChannel.class).childHandler(new ChannelInitializer<SocketChannel>() {<NEW_LINE><NEW_LINE>@Override<N... | LOG.error("server start fail", e); |
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 ... | psiElementFactory = JavaPsiFacade.getElementFactory(project); |
1,589,446 | public static ExtDocElement createElementForType(ExtDocElementType elementType, String elementText, int elementTextStartOffset) {<NEW_LINE>switch(elementType.getCategory()) {<NEW_LINE>case DESCRIPTION:<NEW_LINE>return ExtDocDescriptionElement.create(elementType, elementText);<NEW_LINE>case IDENT_SIMPLE:<NEW_LINE>return... | ), namedInfo.getDefaultValue()); |
1,432,553 | public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException {<NEW_LINE>IAnalysisCache analysisCache = Global.getAnalysisCache();<NEW_LINE>ObligationFactory factory = database.getFactory();<NEW_LINE>JavaClass jclass = analysisCache.getClassAnalysis(JavaClass.class, classDescriptor);<NEW_LINE>... | out.println(classDescriptor + " isn't interesting for obligation analysis"); |
740,255 | public String simulateData(String trxName) {<NEW_LINE>HashMap<String, Object> parameters = new HashMap<String, Object>();<NEW_LINE>// Add Parameters<NEW_LINE>parameters.put("FINANCIAL_PRODUCT_ID", financialProductId);<NEW_LINE>parameters.put("BUSINESS_PARTNER_ID", businessPartnerId);<NEW_LINE>parameters.put("CAPITAL_AM... | parameters.put("END_DATE", endDate); |
1,548,443 | public // The caller need to hold the db write lock<NEW_LINE>void modifyTableReplicationNum(Database db, OlapTable table, Map<String, String> properties) throws DdlException {<NEW_LINE>Preconditions.<MASK><NEW_LINE>ColocateTableIndex colocateTableIndex = Catalog.getCurrentColocateIndex();<NEW_LINE>if (colocateTableInde... | checkArgument(db.isWriteLockHeldByCurrentThread()); |
854,107 | public BackgroundException map(final SSLException failure) {<NEW_LINE>final StringBuilder buffer = new StringBuilder();<NEW_LINE>for (Throwable cause : ExceptionUtils.getThrowableList(failure)) {<NEW_LINE>if (cause instanceof SocketException) {<NEW_LINE>// Connection has been shutdown: javax.net.ssl.SSLException: java.... | String message = failure.getMessage(); |
1,808,494 | private String _findSecondary(int origOffset, int hash, int[] q, int qlen) {<NEW_LINE>int offset = _tertiaryStart + ((origOffset >> (_tertiaryShift + 2)) << _tertiaryShift);<NEW_LINE>final int[] hashArea = _hashArea;<NEW_LINE>final int bucketSize = (1 << _tertiaryShift);<NEW_LINE>for (int end = offset + bucketSize; off... | return _names[offset >> 2]; |
1,795,029 | private void statInit() {<NEW_LINE>label1.setLabelFor(textField1);<NEW_LINE>label1.setText("Label1");<NEW_LINE>label1.setHorizontalAlignment(JLabel.LEADING);<NEW_LINE>textField1.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>label2.setLabelFor(textField2);<NEW_LINE>label2.setText("Label2");<NEW_LINE>label2.... | new ALayoutConstraint(0, 0)); |
52,310 | public Polygon roundEdges(int rad) {<NEW_LINE>Polygon newPoly = new Polygon(closed);<NEW_LINE>int len = path.size();<NEW_LINE>if (!closed)<NEW_LINE>len--;<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>VectorInterface p0 = path.get(i).getPoint();<NEW_LINE>VectorInterface p1 = path.get(wrapIndex(i <MASK><NEW_LINE>Vec... | + 1)).getPoint(); |
951,405 | protected void printObject(Object o) {<NEW_LINE>if (o == null) {<NEW_LINE>commandOutput.print("null");<NEW_LINE>} else if (o instanceof String) {<NEW_LINE>commandOutput.print('"');<NEW_LINE>commandOutput.print(o);<NEW_LINE>commandOutput.print('"');<NEW_LINE>} else if (o instanceof Date) {<NEW_LINE>DateFormat df = DateF... | format((Date) o)); |
988,509 | private static List<ExecutableElement> disambiguateMethods(Iterable<? extends ExecutableElement> methods) {<NEW_LINE>Multimap<String, ExecutableElement<MASK><NEW_LINE>for (ExecutableElement m : methods) {<NEW_LINE>if (IsParameterlessNonstaticNonobject.PREDICATE.apply(m)) {<NEW_LINE>methodsAlternatives.put(ToSimpleName.... | > methodsAlternatives = HashMultimap.create(); |
1,833,940 | public static GetCompanyLegalCaseThreeResponse unmarshall(GetCompanyLegalCaseThreeResponse getCompanyLegalCaseThreeResponse, UnmarshallerContext _ctx) {<NEW_LINE>getCompanyLegalCaseThreeResponse.setRequestId(_ctx.stringValue("GetCompanyLegalCaseThreeResponse.RequestId"));<NEW_LINE>getCompanyLegalCaseThreeResponse.setCo... | = new ArrayList<String>(); |
1,847,010 | public static void merge(ContentImpl from, Content to, boolean override, ApiContext context) {<NEW_LINE>if (from == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, MediaType> fromEntry : from.getMediaTypes().entrySet()) {<NEW_LINE>final String typeName = fromEntry.getKey();<NEW_LINE>final <MASK><NEW... | MediaType fromMediaType = fromEntry.getValue(); |
1,476,842 | final CreateIdentityProviderResult executeCreateIdentityProvider(CreateIdentityProviderRequest createIdentityProviderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createIdentityProviderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkSpaces Web"); |
1,816,232 | public void exectute() {<NEW_LINE>try {<NEW_LINE>// create a temporary file for the resource editory PDF<NEW_LINE>File f = File.createTempFile("CodenameOneDesigner", ".pdf");<NEW_LINE>FileOutputStream out = new FileOutputStream(f);<NEW_LINE>InputStream input = getClass().getResourceAsStream("/CodenameOne-Designer.pdf")... | ] buffer = new byte[65536]; |
352,148 | public void load(final String name, final int keySize, final OType[] keyTypes, final OBinarySerializer<K> keySerializer, final OEncryption encryption) {<NEW_LINE>acquireExclusiveLock();<NEW_LINE>try {<NEW_LINE>final OAtomicOperation atomicOperation = atomicOperationsManager.getCurrentOperation();<NEW_LINE>fileId = open... | = new CellBTreeMultiValueV2EntryPoint<>(entryPointCacheEntry); |
212,506 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.profile_settings_fragment, container, false);<NEW_LINE>adapter = new ProfileSettingsAdapter(getContext(), GlideApp.with<MASK><NEW_LINE>list = ViewUtil.findById(view... | (this), locale, this); |
1,616,680 | public void stopModule(ExtendedModuleInfo moduleInfo) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, "stopModule()", ((WebModuleInfo) moduleInfo).getName());<NEW_LINE>}<NEW_LINE>WebModuleInfo webModule = (WebModuleInfo) moduleInfo;<NEW_LINE>try {<NEW_LINE>DeployedMod... | ExtendedModuleInfo) webModule).getMetaData(); |
1,106,255 | private void createActions(final Plugin plugin) {<NEW_LINE>GhidraTable table = threadedPanel.getTable();<NEW_LINE>selectAction = new MakeProgramSelectionAction(tableServicePlugin, table) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected ProgramSelection makeSelection(ActionContext context) {<NEW_LINE>ProgramSelection s... | , selection.getMinAddress())); |
1,481,025 | private Optional<Node> tryAllocateNodes(List<Node> nodes, List<Node> hosts, Map<Node, AllocationResources> availableResources, Map<Node, List<Allocation>> containedAllocations, boolean withHistory) {<NEW_LINE>for (var node : nodes) {<NEW_LINE>var newParent = tryAllocateNode(node, hosts, availableResources, containedAll... | get(), eligibleParents + 1); |
311,306 | private void wrapAssignOrDestructuringInCallToArrow(NodeTraversal t, Node assignment) {<NEW_LINE>String tempVarName = getTempVariableName();<NEW_LINE>Node rhs = assignment.getLastChild().detach();<NEW_LINE>Node tempVarModel = astFactory.createName(tempVarName, type(rhs));<NEW_LINE>// let temp0 = rhs;<NEW_LINE>Node newA... | tempVarModel.cloneNode(), rhs); |
748,762 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.ibm.ws.sib.admin.JsEngineComponent#stop(int)<NEW_LINE>*/<NEW_LINE>public void stop(final int mode) {<NEW_LINE>final String methodName = "stop";<NEW_LINE>if (TRACE.isEntryEnabled()) {<NEW_LINE>SibTr.entry(this, TRACE, methodName);<NEW_LINE>}<NEW_LINE>final Set l... | getUuid().toString()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.