Condition Coverage

File:blib/lib/App/Test/Generator/SchemaExtractor.pm
Coverage:59.3%

line%coveragecondition
134050
Adec
00
11
Params::Get::get_params('input_file', @_) || {}
135450
Adec
00
11
$params->{'allow_signature_exec'} // 0
100
Adec
00
11
$params->{'verbose'} // 0
100
Adec
00
11
$params->{'include_private'} // 0
67
ABdec
000
011
1X1
$params->{'confidence_threshold'} // $DEFAULT_CONFIDENCE_THRESH
67
ABdec
000
011
1X1
$params->{'max_parameters'} // $DEFAULT_MAX_PARAMETERS
1442100
Adec
00
11
Params::Get::get_params(undef, @_) || {}
145367
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
1503100
Adec
00
11
$document->find('PPI::Statement::Package') || []
150967
ABdec
000
011
1X1
$self->{'_package_name'} //= $pkgs->[0]->namespace
1545100
Adec
00
11
$document->find('PPI::Statement::Sub') || []
1546100
Adec
00
11
$document->find('PPI::Statement') || []
1556100
ABdec
0X0
100
111
$name =~ /^_/ and not $name =~ /^_(new|init|build)/
15880
ABdec
0X0
100
111
$next_sib and not $next_sib->isa("PPI::Statement::Sub")
15920
ABdec
0X0
100
111
$next_sib and $next_sib->isa("PPI::Statement::Sub")
167750
Adec
00
11
$2 || '()'
168033
ABdec
0X0
100
111
$method_name =~ /^_/ and not $method_name =~ /^_(new|init|build)/
174567
ABdec
0X0
100
111
$current and $steps++ < $POD_WALK_LIMIT
174667
ABdec
000
011
1X1
$current->isa("PPI::Token::Whitespace") or $current->isa("PPI::Token::Separator")
181867
ABdec
0X0
100
111
$method->{'fields'} and keys %{$$method{"fields"};}
184167
ABdec
0X0
100
111
$self->{'strict_pod'} and $pod
1910100
ABdec
0X0
100
111
$method->{'name'} ne "new" and $needs_object
1926100
Adec
00
11
$schema->{'_analysis'} ||= {}
1929100
Adec
00
11
$schema->{'_analysis'}{'confidence_factors'} ||= {}
1930100
ABdec
000
011
1X1
$schema->{'_analysis'}{'confidence_factors'}{'input'} ||= $input_confidence->{'factors'}
193133
ABdec
000
011
1X1
$schema->{'_analysis'}{'confidence_factors'}{'output'} ||= $output_confidence->{'factors'}
1955100
Adec
00
11
$input_level //= "none"
195650
Adec
00
11
$output_level //= "none"
196367
ABdec
0X0
100
111
$relationships and @{$relationships;}
199350
Adec
00
11
$schema->{'_yamltest_hints'} ||= {}
199650
Adec
00
11
$schema->{'_yamltest_hints'}{'boundary_values'} ||= []
2010100
Adec
00
11
$schema->{'_yamltest_hints'} ||= {}
2017100
ABdec
0X0
100
111
$level_rank{$overall} < $level_rank{$LEVEL_MEDIUM} and $level_rank{$overall} < $self->{'confidence_threshold'} * 4
210475
ABCdec
0XX0
10X0
1100
1111
$schema->{'output'} and $schema->{'output'}{'type'} and $schema->{'output'}{'type'} =~ /^(number|integer)$/
210967
ABdec
0X0
100
111
$p->{'type'} and $p->{'type'} =~ /^(number|integer)$/
218850
ABCdec
0XX0
10X0
1100
1111
$code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*shift\s*;/ and $code =~ /return\s+\$self\s*->\s*\{\s*['"]?\Q$1\E['"]?\s*\}\s*;/ and $code =~ /if\s*\(\s*\@_/
75
ABCdec
0XX0
10X0
1100
1111
$code =~ /if\s*\(\s*(?:\@_|[\$]\w+)/ and $code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*(?:shift|\@_|\$_\[\d+\]|\$\w+)\b/x and $code =~ /return\b/
100
ABdec
0X0
100
111
$code =~ /return\s+\$self\b/ and $code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*\$(\w+)\s*;/
22090
Adec
00
11
$schema->{'input'} ||= {"value", {"type", "string", "optional", 1}}
227550
Adec
00
11
$schema->{'input'} ||= {"value", {"type", "string", "optional", 1}}
238550
ABCdec
0XX0
10X0
1100
1111
$schema->{'accessor'}{'type'} and $schema->{'accessor'}{'type'} =~ /setter|getset/ and $schema->{'input'}
2389100
ABdec
0X0
100
111
$in->{'type'} and $in->{'type'} eq "object"
240367
ABCDEdec
0XXXX0
10XXX0
110XX0
111000
111011
1111X1
$schema->{'accessor'}{'type'} and $schema->{'accessor'}{'property'} and $schema->{'accessor'}{'type'} =~ /getter|getset/ and !defined($schema->{'output'}{'type'}) || $schema->{'output'}{'type'} eq 'string'
2438100
Adec
00
11
$args{'method'} // "UNKNOWN"
2439100
Adec
00
11
$args{'message'} // "Analysis error"
2441100
Adec
00
11
$self->{'_package_name'} // "UNKNOWN"
2442100
Adec
00
11
$self->{'input_file'} // "UNKNOWN"
248250
ABCdec
0XX0
10X0
1100
1111
$res and ref $res eq "HASH" and keys %{{} unless $res->{'input'};}
251633
ABdec
000
011
1X1
$child->isa("PPI::Statement") or $child->isa("PPI::Statement::Expression")
25200
ABdec
000
011
1X1
$_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator')
25250
ABCdec
00X0
0100
0111
1X00
1X11
$tokens[$i]->isa('PPI::Token::Word') || $tokens[$i]->isa('PPI::Token::Quote') and $tokens[$i + 1]->isa("PPI::Structure::Constructor")
25340
ABdec
0X0
100
111
$key and $val
25380
ABdec
000
011
1X1
$inner->isa("PPI::Statement") or $inner->isa("PPI::Statement::Expression")
25410
ABdec
000
011
1X1
$_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator')
25450
ABdec
0X0
100
111
$k and $v
25510
ABdec
0X0
100
111
$keyname =~ /^(min|max)$/ and &looks_like_number($value)
25620
Adec
00
11
$param{'type'} //= "string"
25630
Adec
00
11
$param{'optional'} //= 0
260467
ABdec
0X0
100
111
ref $code and $code->can("find")
2606100
Adec
00
11
$self->{'_ppi_cache'} ||= {}
260767
ABdec
000
011
1X1
$self->{'_ppi_cache'}{$code} //= "PPI::Document"->new(\$code)
2635100
ABdec
000
011
1X1
$_[1]->content eq "validate_strict" or $_[1]->content eq "Params::Validate::Strict::validate_strict"
264067
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
2699100
ABdec
000
011
1X1
$_[1]->content eq "validate" or $_[1]->content eq "Params::Validate::validate"
270467
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
284667
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
293467
ABdec
0X0
100
111
$block and $block->can("children")
29380
ABCdec
0XX0
10X0
1100
1111
$result and ref $result eq "HASH" and $result->{'input'}
32840
ABdec
0X0
100
111
$stderr and length $stderr
3334100
Adec
00
11
$type_map{$p->{'type'}} // "string"
335350
Adec
00
11
$type_map{$ret->{'type'}} // "string"
342533
ABdec
0X0
100
111
@sig_params and $sig_params[0] =~ /^(self|class)$/i
342933
ABdec
000
011
1X1
$params{$param}{'position'} //= $position_counter
345967
ABdec
000
011
1X1
$line =~ /^\s*\$(\w+)\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i or $line =~ /^\s*C<\$(\w+)>\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i
3469100
Adec
00
11
$params{$name} ||= {"_source", "pod"}
347933
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
3493100
Adec
00
11
$desc || ''
100
Adec
00
11
$constraint || ''
3510100
ABdec
0X0
100
111
$desc and $desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i
353450
Adec
00
11
$params{$name} ||= {"_source", "pod"}
353833
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
357533
ABdec
0X0
100
111
defined $name and length $name
3582100
Adec
00
11
$params{$name} ||= {"_source", "pod"}
35920
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
367150
Adec
00
11
$params{$_}{'position'} // -1
369050
Adec
00
11
$params{$name} //= {"_source", "pod"}
387933
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\bundef\b/i
67
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(string|text)\b/i
67
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(integer|int|count)\b/i
33
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(float|decimal|number)\b/i
67
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(boolean|true|false)\b/i
33
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(array|list)\b/i
33
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(hash|hashref|dictionary)\b/i
67
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(object|instance)\b/i
390033
ABdec
0X0
100
111
defined $output->{'type'} and $output->{'type'} eq "scalar"
390350
Adec
00
11
$output->{'type'} ||= "boolean"
391350
Adec
00
11
$output->{'type'} ||= "boolean"
3921100
ABdec
0X0
100
111
not $output->{'type'} and $pod =~ /returns?\s+(?:an?\s+)?(\w+)/i
39320
ABdec
000
011
1X1
$type eq 1 or $type eq 0
394633
ABdec
0X0
100
111
not $type and $pod =~ /returns?\s+.+\slist\b/i
407567
ABdec
0X0
100
111
$boolean_count >= 2 and $boolean_count >= $total_count * "0.8"
4085100
ABdec
0X0
100
111
$code =~ /return\s+\$self\s*;/ and $code =~ /\$self\s*->\s*\{[^}]+\}\s*=/
40900
ABdec
0X0
100
111
$self->{'_document'} and my $package_stmt = $self->{'_document'}->find_first("PPI::Statement::Package")
40920
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
41170
Adec
00
11
$output->{'isa'} || 'UNKNOWN'
41180
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
413150
Adec
00
11
$output->{'isa'} || 'UNKNOWN'
413233
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
4156100
ABdec
0X0
100
111
$ret =~ /=/ and $ret =~ /\$\w+/
100
ABdec
000
011
1X1
$ret eq 1 or $ret eq 0
423067
ABdec
0X0
100
111
$return_types{'integer'} and not $return_types{'string'}
423133
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "scalar"
423450
Adec
00
11
$output->{'_type_confidence'} ||= "low"
424550
Adec
00
11
$output->{'_type_confidence'} ||= "medium"
4256100
ABdec
0X0
100
111
@return_statements == 1 and $return_statements[0] eq 1
425833
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "scalar"
430067
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "unknown"
430367
ABdec
0X0
100
111
$pod and not $output->{'type'}
436320
ABCDdec
00000
00011
001X1
01XX1
1XXX1
not $output->{'type'} or $output->{'type'} eq "scalar" or $output->{'type'} eq "array" or $output->{'type'} eq "undef"
436450
Adec
00
11
$output->{'type'} || 'none'
445267
ABdec
0X0
100
111
$comma_count > 0 and not $content =~ /\b(?:bless|new)\b/
445467
ABdec
0X0
100
111
$output->{'type'} and $output->{'type'} eq "boolean"
4538100
ABdec
0X0
100
111
$no_value_returns > 0 and $no_value_returns == $total_returns
75
ABCdec
0XX0
10X0
1100
1111
$true_returns > 0 and $true_returns == $total_returns and $total_returns >= 1
4546100
ABdec
0X0
100
111
$output->{'type'} and $output->{'type'} eq "boolean"
459067
ABdec
0X0
100
111
$self_returns > 0 and $total_returns > 0
460133
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
467067
ABdec
0X0
100
111
$zero_returns > 0 and $one_returns > 0
468767
ABdec
000
011
1X1
/^\s*undef\s*$/ || /^\s*$/
468950
ABCdec
0XX0
10X0
1100
1111
$has_undef and $has_value and scalar @all_returns >= 2
477075
ABCdec
0000
0011
01X1
1XX1
$expr =~ /^\@\w+/ or $expr =~ /^qw\(/ or $expr =~ /^\@\{/
4780100
ABdec
000
011
1X1
$expr =~ /^\[/ or $expr =~ /^\\\@/
4785100
ABdec
000
011
1X1
$expr =~ /^\{/ or $expr =~ /^\\\%/
479033
ABdec
000
011
1X1
$expr =~ /^\%\w+/ or $expr =~ /^\%\{/
479567
ABdec
000
011
1X1
$expr =~ /^['"]/ or $expr =~ /['"]$/
485080
ABCDdec
00000
00011
001X1
01XX1
1XXX1
$pod =~ /returns?\s+(?:\$)?self\b/i or $pod =~ /chainable/i or $pod =~ /fluent\s+interface/i or $pod =~ /method\s+chaining/i
4882100
ABCdec
0XX0
10X0
1100
1111
defined $output->{'type'} and $output->{'type'} eq "boolean" and not defined $output->{'value'}
488550
ABCdec
0XX0
10X0
1100
1111
$output->{'value'} and defined $output->{'type'} and $output->{'type'} ne "boolean"
494167
ABdec
0X0
100
111
$param->{'type'} and $param->{'type'} eq "integer"
494267
ABdec
0X0
100
111
$param->{'type'} and $param->{'type'} eq "number"
501850
Adec
00
11
$params{$name} //= {"_source", "code", "position", $pos++}
5027100
ABdec
0X0
100
111
$params{$param}{'_default'} and not $params{$param}{'type'}
508250
Adec
00
11
$$p->{'type'} //= "number"
50870
Adec
00
11
$$p->{'type'} //= "number"
517233
ABdec
000
011
1X1
$code =~ /\%\{\s*\$$param\s*\}/ or $code =~ /\$$param\s*->\s*\{/
33
ABdec
000
011
1X1
$code =~ /\@\{\s*\$$param\s*\}/ or $code =~ /push\s*\(\s*\@?\$$param/
5180100
ABdec
0X0
100
111
not $p->{'type'} and exists $p->{'_default'}
5201100
ABdec
000
011
1X1
$code =~ /\$$param\s*(?:==|!=|<=|>=|<|>)/ or $code =~ /(?:==|!=|<=|>=|<|>)\s*\$$param/
60
ABCDdec
00000
00011
001X1
01XX1
1XXX1
$code =~ m[\$$param\s*(?:[\+\-\*\%]|/(?!/))] or $code =~ m[(?:[\+\-\*\%]|/(?!/))\s*\$$param] or $code =~ /\bint\s*\(\s*\$$param\s*\)/ or $code =~ /\babs\s*\(\s*\$$param\s*\)/
530033
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
532133
ABdec
000
011
1X1
$code =~ /\$$param\s*->\s*isa\s*\(\s*['"]Time::Piece['"]\s*\)/i or $code =~ /\$$param\s*->\s*(strftime|epoch|year|mon|mday)/
534950
ABCdec
0000
0011
01X1
1XX1
$code =~ /\$$param\s*>\s*\d{9,}/ or $code =~ /time\(\s*\)\s*-\s*\$$param/ or $code =~ /\$$param\s*-\s*time\(\s*\)/
536033
ABdec
000
011
1X1
$code =~ /strptime\s*\(\s*\$$param/ or $code =~ /DateTime::Format::\w+\s*->\s*parse_datetime\s*\(\s*\$$param/
539333
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
542233
ABdec
000
011
1X1
$code =~ /File::(?:Spec|Basename)::\w+\s*\(\s*\$$param/ or $code =~ /(?:basename|dirname|fileparse)\s*\(\s*\$$param/
543267
ABdec
0X0
100
111
defined $p->{'_default'} and $p->{'_default'} =~ m[^([A-Za-z]:\\|/|\./|\.\./)]
544033
ABdec
000
011
1X1
$code =~ /\$$param\s*->\s*isa\s*\(\s*['"]IO::File['"]\s*\)/ or $code =~ /IO::File\s*->\s*new\s*\(\s*\$$param/
547333
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
548450
ABCdec
0000
0011
01X1
1XX1
$code =~ /\$$param\s*->\s*\(/ or $code =~ /\$$param\s*->\s*\(\s*\@_\s*\)/ or $code =~ /&\s*\{\s*\$$param\s*\}/
550233
ABdec
0X0
100
111
$code =~ /blessed\s*\(\s*\$$param\s*\)/ and $code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i
554133
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
556167
ABdec
0X0
100
111
defined $values_str and $code =~ /\$$hash_name\s*\{\s*\$$param\s*\}/
561733
ABdec
000
011
1X1
$code =~ /\$$param\s*~~\s*\[([^\]]+)\]/ or $code =~ /\$$param\s*~~\s*qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/
567667
ABdec
000
011
1X1
$1 || $2
5683100
Adec
00
11
$$p->{'_invalid'} ||= []
5684100
Adec
00
11
$$p->{'_errors'} ||= []
57970
Adec
00
11
$params->{$name} //= {"_source", "code", "optional", 1, "position", $pos++}
581350
Adec
00
11
$params->{$name} //= {"_source", "code", "optional", 1}
582933
ABdec
0X0
100
111
@shifts and $shifts[0] =~ /^(self|class)$/i
583250
Adec
00
11
$params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++}
58440
Adec
00
11
$params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++}
609133
ABdec
000
011
1X1
$default eq 1 or $default eq 0
614767
ABdec
0X0
100
111
defined $value and $value ne ""
635850
Adec
00
11
$params->{$param_name} ||= {}
647950
Adec
00
11
$params->{$param} ||= {}
6515100
ABdec
000
011
1X1
keys %{$params;} || $code =~ /my\s+\$(?:self|class)\s*=\s*\$_\[0\]/
652250
ABCdec
0XX0
10X0
1100
1111
$var eq "class" and $position == 0 and $method->{'name'} eq "new"
25
ABCdec
0XX0
10X0
1100
1111
$var eq "self" and $position == 0 and $method->{'name'} ne "new"
65290
Adec
00
11
$params->{$var} ||= {"position", $position++}
653825
ABCdec
0XX0
10X0
1100
1111
$var eq "class" and $position == 0 and $method->{'name'} eq "new"
25
ABCdec
0XX0
10X0
1100
1111
$var eq "self" and $position == 0 and $method->{'name'} ne "new"
65450
Adec
00
11
$params->{$var} ||= {"position", $position++}
65530
ABCdec
0000
0011
01X1
1XX1
$var ne "class" or $position > 0 or $method->{'name'} ne "new"
65540
Adec
00
11
$params->{$var} ||= {"position", $index}
662550
Adec
00
11
$p->{'type'} ||= "string"
6639100
ABdec
0X0
100
111
not $guarded and $code =~ /\$$param\s*([<>]=?)\s*([+-]?(?:\d+\.?\d*|\.\d+))/
664433
ABdec
000
011
1X1
$p->{'type'} ||= &looks_like_number($val) ? "number" : "integer"
664667
ABdec
000
011
1X1
$op eq ">" or $op eq ">="
67
ABdec
000
011
1X1
$op eq "<" or $op eq "<="
664933
ABdec
000
011
1X1
not defined $p->{'max'} or $max < $p->{'max'}
665233
ABdec
000
011
1X1
not defined $p->{'min'} or $min > $p->{'min'}
665950
Adec
00
11
$p->{'type'} ||= "string"
6709100
ABdec
0X0
100
111
defined $default_value and not exists $p->{'_default'}
67150
ABdec
0X0
100
111
defined $default_value and not ref $default_value
6733100
ABdec
0X0
100
111
not $default_value || exists $p->{'_default'} and $code =~ /\$$param\s*=\s*([^;{}]+?)(?:\s*[;}])/s
100
ABdec
000
011
1X1
$default_value || exists $p->{'_default'}
673633
ABdec
000
011
1X1
$assignment =~ /\$$param/ or $assignment =~ /^shift/
6803100
ABdec
0X0
100
111
$pod->{$param} and defined $pod->{$param}{'position'}
680433
ABdec
0X0
100
111
$sig->{$param} and defined $sig->{$param}{'position'}
6805100
ABdec
0X0
100
111
$code->{$param} and defined $code->{$param}{'position'}
682883
ABCDEdec
00XXX0
010XX0
0110X0
011100
011111
1XXXX1
not exists $p->{$key} or $key eq "type" and $from_pod and $p->{'type'} eq "string" and $code->{$param}{$key} ne "string"
68410
ABdec
000
011
1X1
$p->{$key} //= $sig->{$param}{$key}
685450
Adec
00
11
$merged{$b}{'position'} || 999
50
Adec
00
11
$merged{$a}{'position'} || 999
685950
Adec
00
11
$p->{'type'} || 'none'
100
Adec
00
11
$p->{'position'} || 'none'
6957100
ABCdec
0XX0
1000
1011
11X1
$p->{'type'} eq "string" and $p->{'min'} || $p->{'max'} || $p->{'matches'}
7154100
ABdec
0X0
100
111
$output->{'_error_handling'} and $output->{'_error_handling'}{'exception_handling'}
721050
Adec
00
11
$schema->{'method_name'} || 'method'
7479100
ABdec
000
011
1X1
$code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*if\s+\$$param2\s+&&\s+\$$param1/
748533
ABdec
0X0
100
111
$rel->{'type'} eq "mutually_exclusive" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)
67
ABdec
0X0
100
111
$rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1
750467
ABdec
000
011
1X1
$code =~ /(?:die|croak|confess)\s+['"](Cannot|Can't)[^'"]*both[^'"]*${param1}[^'"]*$param2/i or $code =~ /(?:die|croak|confess)\s+['"](Cannot|Can't)[^'"]*both[^'"]*${param2}[^'"]*$param1/i
750933
ABdec
0X0
100
111
$rel->{'type'} eq "mutually_exclusive" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)
33
ABdec
0X0
100
111
$rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1
7562100
ABdec
000
011
1X1
$code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param1\s+\|\|\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param2\s+\|\|\s+\$$param1/
756833
ABdec
0X0
100
111
$rel->{'type'} eq "required_group" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)
33
ABdec
0X0
100
111
$rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1
758867
ABdec
000
011
1X1
$code =~ /(?:die|croak|confess)\s+['"]Must\s+specify\s+either[^'"]*${param1}[^'"]*or[^'"]*$param2/i or $code =~ /(?:die|croak|confess)\s+['"]Must\s+specify\s+either[^'"]*${param2}[^'"]*or[^'"]*$param1/i
759333
ABdec
0X0
100
111
$rel->{'type'} eq "required_group" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)
33
ABdec
0X0
100
111
$rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1
7719100
ABdec
0X0
100
111
$code =~ /(?:die|croak|confess)\s+['"]\w*${param1}[^'"]*requires[^'"]*$param2/i and $code =~ /if\s+\$$param1\s+&&\s+!\$$param2/
784133
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
788467
ABdec
0X0
100
111
@with_pos and @without_pos
789350
Adec
00
11
$schema->{'output'} and scalar keys %{$$schema{"output"};}
7894100
ABdec
0X0
100
111
ref $schema->{'output'}{'_error_handling'} eq "HASH" and scalar keys %{$$schema{"output"}{"_error_handling"};} == 0
790067
ABdec
0X0
100
111
$schema->{'output'}{'type'} and $schema->{'output'}{'type'} eq "scalar"
790867
ABdec
000
011
1X1
ref $schema->{'new'} or $schema->{'new'} eq $package_name
792567
ABdec
0X0
100
111
$schema->{'relationships'} and @{$schema->{'relationships'};}
7929100
Adec
00
11
$schema->{'accessor'} and scalar keys %{$$schema{"accessor"};}
800867
ABdec
0X0
100
111
$schema->{'relationships'} and @{$schema->{'relationships'};}
801433
ABdec
000
011
1X1
$rel->{'description'} || _format_relationship($rel)
8020100
Adec
00
11
$schema->{'_notes'} and scalar @{$schema->{'_notes'};}
805267
ABdec
0X0
100
111
$p->{'type'} and $p->{'type'} eq "coderef"
8056100
ABdec
0X0
100
111
$p->{'semantic'} and $p->{'semantic'} eq "filehandle"
8060100
ABdec
0X0
100
111
$p->{'isa'} and $p->{'isa'} =~ /DateTime/
812150
Adec
00
11
$param->{'isa'} || 'DateTime'
81250
Adec
00
11
$param->{'isa'} || 'Time::Piece'
813050
Adec
00
11
$cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}\$/"
813450
Adec
00
11
$cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z?\$/"
813850
Adec
00
11
$cleaned{'min'} ||= 0
813967
ABdec
000
011
1X1
$cleaned{'max'} ||= $INT32_MAX
814750
Adec
00
11
$param->{'isa'} || 'IO::Handle'
815250
Adec
00
11
$cleaned{'matches'} ||= "/^[\\w\\/.\\-_]+\$/"
816133
ABdec
0X0
100
111
$param->{'enum'} and ref $param->{'enum'} eq "ARRAY"
817175
ABCdec
0XX0
10X0
1100
1111
$param->{'enum'} and ref $param->{'enum'} eq "ARRAY" and not $cleaned{'enum'}
817433
ABdec
0X0
100
111
$param->{'memberof'} and ref $param->{'memberof'} eq "ARRAY"
8179100
ABdec
0X0
100
111
$param->{'isa'} and not $cleaned{'isa'}
826650
Adec
00
11
$method_info ||= {}
827467
ABdec
000
011
1X1
$self->{'_package_name'} //= $current_package
831650
ABCdec
0XX0
1000
1011
11X1
$is_instance_method and $is_instance_method->{'explicit_self'} || $is_instance_method->{'shift_self'} || $is_instance_method->{'accesses_object_data'} || $is_instance_method->{'calls_instance_methods'} && scalar @{$is_instance_method->{'calls_instance_methods'};}
833867
ABdec
0X0
100
111
$inheritance_info and $inheritance_info->{'use_parent_constructor'}
8378100
ABdec
0X0
100
111
$is_factory and not $skip_object
842767
ABdec
000
011
1X1
$method_body =~ /return\s+bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?/s or $method_body =~ /bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?.*return/s
8446100
ABdec
000
011
1X1
$method_body =~ /return\s+([\$\w:]+)->new\(/s or $method_body =~ /([\$\w:]+)->new\(.*return/s
845125
ABCdec
0000
0011
01X1
1XX1
$target eq "\$self" or $target eq "shift" or $target =~ /^\$/
846733
ABdec
000
011
1X1
$method_body =~ /return\s+([\$\w:]+)->(create_|make_|build_|get_)/i or $method_body =~ /([\$\w:]+)->(create_|make_|build_|get_).*return/is
847650
ABCdec
0XX0
10X0
1100
1111
$method_info and ref $method_info eq "HASH" and $method_info->{'pod'}
852767
ABdec
000
011
1X1
$method_body =~ /(?:my\s+)?(?:our\s+)?\$(?:instance|_instance|singleton)\b/s or $method_body =~ /state\s+\$(?:instance|_instance|singleton)\b/s
853467
ABdec
000
011
1X1
$method_body =~ /return\s+\$instance\s+if\s+(?:defined\s+)?\$instance/ or $method_body =~ /unless\s+\$instance.*?=\s*.*?new/
854167
ABdec
000
011
1X1
$method_body =~ /\$instance\s*\|\|=\s*.*?new/ or $method_body =~ /\$instance\s*=\s*.*?new\s+unless\s+(?:defined\s+)?\$instance/
862967
ABdec
0X0
100
111
$method_name =~ /^_/ and not $method_name =~ /^_new/
8676100
Adec
00
11
$doc->find('PPI::Statement::Include') || []
8693100
Adec
00
11
$doc->find('PPI::Statement::Variable') || []
870650
Adec
00
11
$doc->find('PPI::Statement') || []
8718100
ABdec
0X0
100
111
$method_body and $method_body =~ /SUPER::/
889750
ABCdec
0000
0011
01X1
1XX1
$class eq "main" or $class eq "__PACKAGE__" or $class =~ /^\$/
896650
ABCdec
0XX0
10X0
1100
1111
$_[1]->isa("PPI::Statement::Include") and $_[1]->type eq "use" and $_[1]->module =~ /^(parent|base)$/
898133
ABdec
0X0
100
111
$isa_stmt and $isa_stmt->content =~ /['"](\w+(?:::\w+)*)['"]/
901733
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
9066100
ABdec
0X0
100
111
$param and $code
9212100
ABdec
000
011
1X1
$code =~ /\beq\s*''/ or $code =~ /\blength\s*\(/
9330100
Adec
00
11
$hints->{'valid_inputs'} ||= []
9337100
Adec
00
11
$hints->{$k} //= []
947567
ABdec
000
011
1X1
$value =~ /^\$[a-zA-Z_]/ or $value =~ /\(.*\)/
9522100
Adec
00
11
$pod_params->{$param} || {}
9523100
Adec
00
11
$code_params->{$param} || {}
9531100
ABdec
0X0
100
111
exists $pod_params->{$param} and not exists $code_params->{$param}
953667
ABdec
0X0
100
111
not exists $pod_params->{$param} and exists $code_params->{$param}
955075
ABCdec
0XX0
10X0
1100
1111
$pod->{'type'} and $code->{'type'} and $pod->{'type'} ne $code->{'type'}
955950
ABCdec
0XX0
10X0
1100
1111
exists $pod->{'optional'} and exists $code->{'optional'} and $pod->{'optional'} != $code->{'optional'}
956725
ABCdec
0XX0
10X0
1100
1111
defined $pod->{'min'} and defined $code->{'min'} and $pod->{'min'} != $code->{'min'}
957125
ABCdec
0XX0
10X0
1100
1111
defined $pod->{'max'} and defined $code->{'max'} and $pod->{'max'} != $code->{'max'}
957625
ABCdec
0XX0
10X0
1100
1111
$pod->{'matches'} and $code->{'matches'} and $pod->{'matches'} ne $code->{'matches'}