35d7c539c93bd0bff7788fad93ce08686e0cc760,mne/source_space.py,,_check_spacing,#Any#Any#,1335

Before Change


        if stype in ["ico", "oct"]:
            sval = int(sval)
        elif stype == "spacing":  // spacing
            sval = float(sval)
    except Exception:
        raise ValueError(space_err)
    if stype == "all":
        logger.info("Include all vertices")

After Change


    // check to make sure our parameters are good, parse "spacing"
    types = ("a string with values "ico//", "oct//", "all", or an int >= 2")
    space_err = ""spacing" must be " + types
    if isinstance(spacing, str):
        if spacing == "all":
            stype = "all"
            sval = ""
        elif isinstance(spacing, str) and spacing[:3] in ("ico", "oct"):
            stype = spacing[:3]
            sval = spacing[3:]
            try:
                sval = int(sval)
            except Exception:
                raise ValueError("ico and oct numbers must be integers, got %r"
                                 % (sval,))
        else:
            raise ValueError(space_err)
    else:
        stype = "spacing"
        sval = _ensure_int(spacing, "spacing", types)
        if sval < 2:
            raise ValueError("spacing must be >= 2, got %d" % (sval,))
    if stype == "all":
        logger.info("Include all vertices")
        ico_surf = None
        src_type_str = "all"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: mne-tools/mne-python
Commit Name: 35d7c539c93bd0bff7788fad93ce08686e0cc760
Time: 2019-04-10
Author: larson.eric.d@gmail.com
File Name: mne/source_space.py
Class Name:
Method Name: _check_spacing


Project Name: cmu-db/ottertune
Commit Name: 01b4ec3f531e07b8c4a32a13288c963ad8b4b843
Time: 2019-10-14
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/db/base/parser.py
Class Name: BaseParser
Method Name: convert_dbms_metrics


Project Name: cmu-db/ottertune
Commit Name: 01b4ec3f531e07b8c4a32a13288c963ad8b4b843
Time: 2019-10-14
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/db/myrocks/parser.py
Class Name: MyRocksParser
Method Name: convert_dbms_metrics