ilscipio/scipio-erp

View on GitHub
applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java

Summary

Maintainability
F
4 days
Test Coverage

ProductDocBuilder has 106 methods (exceeds 20 allowed). Consider refactoring.
Open

    public class ProductDocBuilder {
        protected final String productId;
        protected GenericValue product;
        protected Timestamp moment;
        protected String parentProductId; // empty string means already looked up
Severity: Major
Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 2 days to fix

    SolrDocBuilder has 49 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class SolrDocBuilder {
        private static final Debug.OfbizLogger module = Debug.getOfbizLogger(java.lang.invoke.MethodHandles.lookup().lookupClass());
    
        protected static final Factory DEFAULT_FACTORY = new Factory();
        protected static final Factory CONFIGURED_FACTORY = readConfiguredFactory();
    Severity: Minor
    Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 6 hrs to fix

      Method addAlphaLocalizedContentStringMapToDoc has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          protected void addAlphaLocalizedContentStringMapToDoc(Map<String, Object> doc, String alphaKeyPrefix, String alphaDefaultKey,
                                                             String keyPrefix, String defaultKey, Map<String, String> contentMap,
                                                             List<Locale> locales, Locale defaultLocale, Function<Locale, String> langCodeFn, String generalKey) {
      Severity: Major
      Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 1 hr to fix

        Method getChildProductIdsForIndexing has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public Collection<String> getChildProductIdsForIndexing(String productId, GenericValue product, ProductIndexer.ProductEntry pur,
                                                                    Map<String, ProductIndexer.ProductEntry> expandedProducts, Timestamp moment, ExpandProductResult expandResult) throws GeneralException {
        Severity: Minor
        Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 45 mins to fix

          Method hasParentProductIdsForIndexing has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public boolean hasParentProductIdsForIndexing(String productId, GenericValue product, ProductIndexer.ProductEntry pur,
                                                            Map<String, ProductIndexer.ProductEntry> expandedProducts, Timestamp moment, ExpandProductResult expandResult) throws GeneralException {
          Severity: Minor
          Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 45 mins to fix

            Method addLocalizedContentStringMapToDoc has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                protected void addLocalizedContentStringMapToDoc(Map<String, Object> doc, String keyPrefix, String defaultKey, Map<String, String> contentMap,
                                                                 Function<Locale, String> langCodeFn, String generalKey) {
            Severity: Minor
            Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 45 mins to fix

              Method getParentProductIdsForIndexing has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public Collection<String> getParentProductIdsForIndexing(String productId, GenericValue product, ProductIndexer.ProductEntry pur,
                                                                           Map<String, ProductIndexer.ProductEntry> expandedProducts, Timestamp moment, ExpandProductResult expandResult) throws GeneralException {
              Severity: Minor
              Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 45 mins to fix

                Method hasChildProductIdsForIndexing has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public boolean hasChildProductIdsForIndexing(String productId, GenericValue product, ProductIndexer.ProductEntry pur,
                                                                 Map<String, ProductIndexer.ProductEntry> expandedProducts, Timestamp moment, ExpandProductResult expandResult) throws GeneralException {
                Severity: Minor
                Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 45 mins to fix

                  Method getRelatedProductIdsForIndexing has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public Collection<String> getRelatedProductIdsForIndexing(String productId, GenericValue product, ProductIndexer.ProductEntry pur,
                                                                                Map<String, ProductIndexer.ProductEntry> expandedProducts, Timestamp moment,
                                                                                ExpandProductResult expandResult) throws GeneralException {
                  Severity: Minor
                  Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 45 mins to fix

                    Method setMainPriceField has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            protected void setMainPriceField(Map<String, Object> doc, String baseName, String fieldGroup, BigDecimal value, String currencyUomId) {
                    Severity: Minor
                    Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 35 mins to fix

                      Method setFloatPriceField has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              protected void setFloatPriceField(Map<String, Object> doc, String baseName, String fieldGroup, BigDecimal value, String currencyUomId) {
                      Severity: Minor
                      Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 35 mins to fix

                        Method allowProduct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                static boolean allowProduct(DispatchContext dctx, Collection<? extends ProductFilter> productFilters, GenericValue product, ProductDocBuilder productDocBuilder,
                                                            ProductIndexer.ProductEntry productEntry) throws GeneralException {
                        Severity: Minor
                        Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 35 mins to fix

                          Method setPriceFields has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  protected void setPriceFields(Map<String, Object> doc, String baseName, String fieldGroup, BigDecimal value, String currencyUomId) {
                          Severity: Minor
                          Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 35 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                            return null;
                            Severity: Major
                            Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                      return (entry != null) ? entityIndexer.makeDocEntry(entry, doc, data) : entityIndexer.makeDocEntry(pk, doc, data);
                              Severity: Major
                              Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return null;
                                Severity: Major
                                Found in applications/solr/src/com/ilscipio/scipio/solr/SolrDocBuilder.java - About 30 mins to fix

                                  There are no issues that match your filters.

                                  Category
                                  Status