You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Sebastian Schelter (JIRA)" <ji...@apache.org> on 2010/03/31 14:18:27 UTC

[jira] Created: (MAHOUT-355) Misleading JavaDoc comment in FPGrowth

Misleading JavaDoc comment in FPGrowth
--------------------------------------

                 Key: MAHOUT-355
                 URL: https://issues.apache.org/jira/browse/MAHOUT-355
             Project: Mahout
          Issue Type: Bug
          Components: Frequent Itemset/Association Rule Mining
    Affects Versions: 0.3, 0.2
            Reporter: Sebastian Schelter
            Priority: Trivial


The JavaDoc for org.apache.mahout.fpm.pfpgrowth.fpgrowth.FPGrowth.generateTopKFrequentPatterns(...) states that if the parameter returnableFeatures is null then patterns for every frequent item are generated. 

But this works only if you give the method an empty set, submitting null results in a NullPointerException. Either change the comment or do a null check here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (MAHOUT-355) Misleading JavaDoc comment in FPGrowth

Posted by Ted Dunning <te...@gmail.com>.
Sebastian, can you post a patch with suggested language?

On Wed, Mar 31, 2010 at 5:18 AM, Sebastian Schelter (JIRA)
<ji...@apache.org>wrote:

> Misleading JavaDoc comment in FPGrowth
> --------------------------------------
>
>                 Key: MAHOUT-355
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-355
>             Project: Mahout
>          Issue Type: Bug
>          Components: Frequent Itemset/Association Rule Mining
>    Affects Versions: 0.3, 0.2
>            Reporter: Sebastian Schelter
>            Priority: Trivial
>
>
> The JavaDoc for
> org.apache.mahout.fpm.pfpgrowth.fpgrowth.FPGrowth.generateTopKFrequentPatterns(...)
> states that if the parameter returnableFeatures is null then patterns for
> every frequent item are generated.
>
> But this works only if you give the method an empty set, submitting null
> results in a NullPointerException. Either change the comment or do a null
> check here.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Updated: (MAHOUT-355) Misleading JavaDoc comment in FPGrowth

Posted by "Sebastian Schelter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Schelter updated MAHOUT-355:
--------------------------------------

    Status: Patch Available  (was: Open)

I added a null check in the code, changed the JavaDoc to state that you can give null or an empty set to the method and added a trivial unit test.

> Misleading JavaDoc comment in FPGrowth
> --------------------------------------
>
>                 Key: MAHOUT-355
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-355
>             Project: Mahout
>          Issue Type: Bug
>          Components: Frequent Itemset/Association Rule Mining
>    Affects Versions: 0.3, 0.2
>            Reporter: Sebastian Schelter
>            Priority: Trivial
>         Attachments: MAHOUT-355.patch
>
>
> The JavaDoc for org.apache.mahout.fpm.pfpgrowth.fpgrowth.FPGrowth.generateTopKFrequentPatterns(...) states that if the parameter returnableFeatures is null then patterns for every frequent item are generated. 
> But this works only if you give the method an empty set, submitting null results in a NullPointerException. Either change the comment or do a null check here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-355) Misleading JavaDoc comment in FPGrowth

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen updated MAHOUT-355:
-----------------------------

       Resolution: Fixed
    Fix Version/s: 0.4
           Status: Resolved  (was: Patch Available)

Looks so reasonable I committed it.

> Misleading JavaDoc comment in FPGrowth
> --------------------------------------
>
>                 Key: MAHOUT-355
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-355
>             Project: Mahout
>          Issue Type: Bug
>          Components: Frequent Itemset/Association Rule Mining
>    Affects Versions: 0.2, 0.3
>            Reporter: Sebastian Schelter
>            Priority: Trivial
>             Fix For: 0.4
>
>         Attachments: MAHOUT-355.patch
>
>
> The JavaDoc for org.apache.mahout.fpm.pfpgrowth.fpgrowth.FPGrowth.generateTopKFrequentPatterns(...) states that if the parameter returnableFeatures is null then patterns for every frequent item are generated. 
> But this works only if you give the method an empty set, submitting null results in a NullPointerException. Either change the comment or do a null check here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-355) Misleading JavaDoc comment in FPGrowth

Posted by "Sebastian Schelter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Schelter updated MAHOUT-355:
--------------------------------------

    Attachment: MAHOUT-355.patch

> Misleading JavaDoc comment in FPGrowth
> --------------------------------------
>
>                 Key: MAHOUT-355
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-355
>             Project: Mahout
>          Issue Type: Bug
>          Components: Frequent Itemset/Association Rule Mining
>    Affects Versions: 0.2, 0.3
>            Reporter: Sebastian Schelter
>            Priority: Trivial
>         Attachments: MAHOUT-355.patch
>
>
> The JavaDoc for org.apache.mahout.fpm.pfpgrowth.fpgrowth.FPGrowth.generateTopKFrequentPatterns(...) states that if the parameter returnableFeatures is null then patterns for every frequent item are generated. 
> But this works only if you give the method an empty set, submitting null results in a NullPointerException. Either change the comment or do a null check here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.