Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
  • Loading branch information
arthurscchan committed Jul 17, 2024
1 parent f17aeed commit 80675bc
Showing 1 changed file with 33 additions and 34 deletions.
67 changes: 33 additions & 34 deletions src/fuzz_introspector/code_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ def correlate_python_functions_with_coverage(

return


def get_hit_summary(self,
funcname: str) -> Tuple[Optional[int], Optional[int]]:
"""Returns the hit summary of a give function.
Expand Down Expand Up @@ -699,9 +698,9 @@ def load_jvm_coverage(target_dir: str,

# Get total valid lines count of this method
for counter in method.findall('counter'):
if counter.attrib('type') == 'LINE':
missed_line = int(counter.attrib('missed'))
covered_line = int(counter.attrib('covered'))
if counter.attrib['type'] == 'LINE':
missed_line = int(counter.attrib['missed'])
covered_line = int(counter.attrib['covered'])
total_line = missed_line + covered_line
break

Expand Down Expand Up @@ -760,39 +759,39 @@ class name specification use single upper case letter for
next_arg = ''
array_count = 0
for c in desc:
if c == '(':
continue
if c == ')':
break

if start:
if c == ';':
start = False
next_arg = arg.replace('/', '.')
else:
arg = arg + c
else:
if c == 'L':
start = True
if next_arg:
next_arg = f'{next_arg}{"[]" * array_count}'
array_count = 0
args.append(next_arg)
arg = ''
next_arg = ''
elif c == '[':
array_count += 1
if c == '(':
continue
if c == ')':
break

if start:
if c == ';':
start = False
next_arg = arg.replace('/', '.')
else:
arg = arg + c
else:
if c in JVM_CLASS_MAPPING:
if next_arg:
next_arg = f'{next_arg}{"[]" * array_count}'
array_count = 0
args.append(next_arg)
next_arg = JVM_CLASS_MAPPING[c]
if c == 'L':
start = True
if next_arg:
next_arg = f'{next_arg}{"[]" * array_count}'
array_count = 0
args.append(next_arg)
arg = ''
next_arg = ''
elif c == '[':
array_count += 1
else:
if c in JVM_CLASS_MAPPING:
if next_arg:
next_arg = f'{next_arg}{"[]" * array_count}'
array_count = 0
args.append(next_arg)
next_arg = JVM_CLASS_MAPPING[c]

if next_arg:
next_arg = f'{next_arg}{"[]" * array_count}'
args.append(next_arg)
next_arg = f'{next_arg}{"[]" * array_count}'
args.append(next_arg)
return args


Expand Down

0 comments on commit 80675bc

Please sign in to comment.