IndentUsageInfo () { configureByFile(getFileNameWithExtension()); Document document = getDocument(getFile()); FormattingModelBuilder builder = LanguageFormatting.INSTANCE.forContext(getFile()); Assert.assertNotNull(builder); FormattingModel model = builder.createModel(FormattingContext.create(getFile(), CodeStyle.getSettings(getProject()))); List<LineIndentInfo> lines = new FormatterBasedLineIndentInfoBuilder(document, model.getRootBlock(), null).build(); IndentUsageStatistics statistics = new IndentUsageStatisticsImpl(lines); return statistics.getKMostUsedIndentInfo(0); }