Tabnine Logo
ProblemSummary
Code IndexAdd Tabnine to your IDE (free)

How to use
ProblemSummary
in
org.jboss.windup.reporting.freemarker.problemsummary

Best Java code snippets using org.jboss.windup.reporting.freemarker.problemsummary.ProblemSummary (Showing top 9 results out of 315)

origin: org.jboss.windup.reporting/windup-reporting-api

  /**
   * Adds a file with the provided description.
   */
  public void addFile(String description, FileModel fileModel)
  {
    Map<FileModel, ProblemFileSummary> files = addDescription(description);

    if (files.containsKey(fileModel))
    {
      files.get(fileModel).addOccurrence();
    } else {
      files.put(fileModel, new ProblemFileSummary(fileModel, 1));
    }
  }
}
origin: org.jboss.windup.web.addons/windup-web-support-impl

private List<ProblemFileSummaryWrapper> getFileSummaries(Long executionId, ProblemSummary summary)
{
  return StreamSupport.stream(summary.getDescriptions().spliterator(), false)
        .flatMap(description -> StreamSupport.stream(summary.getFilesForDescription(description).spliterator(), false))
        .map(fileSummary -> new ProblemFileSummaryWrapper(
              this.convertToMap(executionId, fileSummary.getFile().getElement(), 0, false),
              fileSummary.getOccurrences()))
        .collect(Collectors.toList());
}
origin: org.jboss.windup.reporting/windup-reporting-api

  private static void addToResults(Map<IssueCategoryModel, List<ProblemSummary>> results, ProblemSummary summary)
  {
    List<ProblemSummary> list = results.get(summary.getIssueCategoryModel());
    if (list == null)
    {
      list = new ArrayList<>();
      results.put(summary.getIssueCategoryModel(), list);
    }
    list.add(summary);
  }
}
origin: org.jboss.windup.web.addons/windup-web-support-impl

private ProblemSummary getProblemSummary(Long executionId, String issueId, Map<String, Object> filterAsMap)
{
  Map<String, List<ProblemSummary>> categorizedProblems = this.getAggregatedIssues(executionId, filterAsMap);
  List<ProblemSummary> problemSummaries = categorizedProblems.entrySet()
        .stream()
        .map(Map.Entry::getValue)
        .flatMap(Collection::stream)
        .filter(item -> item.getRuleID().concat(item.getIssueName()).equals(issueId))
        .collect(Collectors.toList());
  if (problemSummaries.size() == 0)
  {
    throw new NotFoundException();
  }
  return problemSummaries.get(0);
}
origin: windup/windup

if (summary == null)
  summary = new ProblemSummary(UUID.randomUUID().toString(), hint.getIssueCategory(), hint.getRuleID(), hint.getTitle(), 1, hint.getEffort());
  for (LinkModel link : hint.getLinks())
    summary.addLink(link.getDescription(), link.getLink());
  summary.setNumberFound(summary.getNumberFound() + 1);
summary.addFile(hint.getHint(), hint.getFile());
if (summary == null)
  summary = new ProblemSummary(UUID.randomUUID().toString(), classification.getIssueCategory(), classification.getRuleID(),
        classification.getClassification(),
        0, classification.getEffort());
  for (LinkModel link : classification.getLinks())
    summary.addLink(link.getDescription(), link.getLink());
  summary.addFile(classification.getDescription(), file);
summary.setNumberFound(summary.getNumberFound() + newFileModels.size());
origin: org.jboss.windup.web.addons/windup-web-support-impl

/**
 * Get details from problems categorized by EffortLevel and # of incidents
 *
 * @param problems all found problems
 * @return
 */
private EffortByCategoryDTO getIncidentsByEffort(Map<IssueCategoryModel, List<ProblemSummary>> problems)
{
  EffortByCategoryDTO result = new EffortByCategoryDTO();
  Map<String, Integer> categoryIDToPriority = new HashMap<>();
  problems.forEach((issueCategory, problemSummaries) -> {
    categoryIDToPriority.put(issueCategory.getCategoryID(), issueCategory.getPriority());
    EffortCategoryDTO categoryDTO = new EffortCategoryDTO();
    categoryDTO.setCategoryID(issueCategory.getCategoryID());
    for (ProblemSummary problemSummary : problemSummaries)
    {
      EffortLevel effort = EffortLevel.forPoints(problemSummary.getEffortPerIncident());
      categoryDTO.addValue(effort.getShortDescription(), problemSummary.getNumberFound());
    }
    result.addCategory(categoryDTO);
  });
  result.categories.sort((category1, category2) -> {
    int priority1 = categoryIDToPriority.get(category1.getCategoryID());
    int priority2 = categoryIDToPriority.get(category2.getCategoryID());
    return priority1 - priority2;
  });
  return result;
}
origin: org.jboss.windup.reporting/windup-reporting-api

if (summary == null)
  summary = new ProblemSummary(UUID.randomUUID().toString(), hint.getIssueCategory(), hint.getRuleID(), hint.getTitle(), 1, hint.getEffort());
  for (LinkModel link : hint.getLinks())
    summary.addLink(link.getDescription(), link.getLink());
  summary.setNumberFound(summary.getNumberFound() + 1);
summary.addFile(hint.getHint(), hint.getFile());
if (summary == null)
  summary = new ProblemSummary(UUID.randomUUID().toString(), classification.getIssueCategory(), classification.getRuleID(),
        classification.getClassification(),
        0, classification.getEffort());
  for (LinkModel link : classification.getLinks())
    summary.addLink(link.getDescription(), link.getLink());
  summary.addFile(classification.getDescription(), file);
summary.setNumberFound(summary.getNumberFound() + newFileModels.size());
origin: windup/windup

  private static void addToResults(Map<IssueCategoryModel, List<ProblemSummary>> results, ProblemSummary summary)
  {
    List<ProblemSummary> list = results.get(summary.getIssueCategoryModel());
    if (list == null)
    {
      list = new ArrayList<>();
      results.put(summary.getIssueCategoryModel(), list);
    }
    list.add(summary);
  }
}
origin: windup/windup

  /**
   * Adds a file with the provided description.
   */
  public void addFile(String description, FileModel fileModel)
  {
    Map<FileModel, ProblemFileSummary> files = addDescription(description);

    if (files.containsKey(fileModel))
    {
      files.get(fileModel).addOccurrence();
    } else {
      files.put(fileModel, new ProblemFileSummary(fileModel, 1));
    }
  }
}
org.jboss.windup.reporting.freemarker.problemsummaryProblemSummary

Most used methods

  • getNumberFound
    Contains the number of incidents found for this issue.
  • <init>
    Creates a new instance with the given information.
  • addDescription
  • addFile
    Adds a file with the provided description.
  • addLink
  • getDescriptions
    Gets the descriptions found for this rule.
  • getEffortPerIncident
    Returns the effort points per incident.
  • getFilesForDescription
    Gets the files associated with a particular description.
  • getIssueCategoryModel
    Returns the IssueCategoryModel for this summary. This generally represents the severity of the issue
  • getIssueName
    Contains the issue name.
  • getRuleID
    Contains the original rule id.
  • setNumberFound
    Sets the number found for this issue.
  • getRuleID,
  • setNumberFound

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Menu (java.awt)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now