Showing 1,243 of 1,244 total issues
MetasmUtils#self.find_start_of_function calls 'di.block.from_normal' 6 times Open
while (defined?(di.block.from_normal.length) && !di.block.from_normal.empty?) || (defined?(di.block.from_subfuncret.length) && !di.block.from_subfuncret.empty?)
if defined?(di.block.from_normal.length)
i = 0
while blocks.include?(di.block.from_normal[i]) && (i < di.block.from_normal.length)
i += 1
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.find_start_of_function calls 'di.block.from_normal[i]' 2 times Open
while blocks.include?(di.block.from_normal[i]) && (i < di.block.from_normal.length)
i += 1
end
end
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.find_start_of_function calls 'di.block.from_subfuncret' 2 times Open
while (defined?(di.block.from_normal.length) && !di.block.from_normal.empty?) || (defined?(di.block.from_subfuncret.length) && !di.block.from_subfuncret.empty?)
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.getArg calls 'di.block' 21 times Open
i = di.block.list.length
while i > 0
if di.block.list[i - 1].address == addrori
i -= 1
while i > 0
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.getArg calls 'di.block.list.length' 3 times Open
i = di.block.list.length
while i > 0
if di.block.list[i - 1].address == addrori
i -= 1
while i > 0
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.getArg calls 'di.block.list[i - 1].opcode' 3 times Open
if di.block.list[i - 1].opcode.name == 'push'
if carg == arg
return $gdasm.normalize(di.block.list[i - 1].instruction.args.first)
end
carg += 1
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.find_start_of_function calls '$gdasm.function[di.block.list[0].address]' 2 times Open
return di.block.list[0].address if $gdasm.function[di.block.list[0].address]
end
return di.block.list[0].address if $gdasm.function[di.block.list[0].address]
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.find_start_of_function calls 'blocks << di.address' 2 times Open
blocks << di.address
di = $gdasm.di_at(di.block.list[0].block.from_subfuncret[0])
elsif
blocks << di.address
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.getArg calls 'di.block.list[i - 1].instruction.args.first.to_s' 2 times Open
if (di.block.list[i - 1].opcode.name == 'mov') && ((di.block.list[i - 1].instruction.args.first.to_s == "dword ptr [esp+0#{arg.to_s(16)}h]") || (((di.block.list[i - 1].instruction.args.first.to_s == 'dword ptr [esp]') && (esp == 0))))
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.getArg calls 'di.block.list[i - 1].opcode.name' 3 times Open
if di.block.list[i - 1].opcode.name == 'push'
if carg == arg
return $gdasm.normalize(di.block.list[i - 1].instruction.args.first)
end
carg += 1
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MachocHash#self.calculate_machoc_hash calls '@treetbfunc[y][0]' 2 times Open
currFunc += ',' if (to_ref == @treetbfunc[y][0]) && (currFunc[-1] != ',') && (currFunc[-1] != ':')
currFunc += (y + 1).to_s.to_s if to_ref == @treetbfunc[y][0]
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.find_start_of_function calls 'di.address' 2 times Open
blocks << di.address
di = $gdasm.di_at(di.block.list[0].block.from_subfuncret[0])
elsif
blocks << di.address
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.getArg calls 'di.block.list[i - 1]' 8 times Open
if di.block.list[i - 1].address == addrori
i -= 1
while i > 0
if di.block.list[i - 1].opcode.name == 'push'
if carg == arg
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.find_start_of_function calls 'di.block.list' 9 times Open
if di.block.list[0].block.from_normal.nil? && !di.block.list[0].block.from_subfuncret.nil? && (di.block.list[0].block.from_subfuncret.length == 1)
blocks << di.address
di = $gdasm.di_at(di.block.list[0].block.from_subfuncret[0])
elsif
blocks << di.address
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.find_start_of_function calls '$gdasm.function' 2 times Open
return di.block.list[0].address if $gdasm.function[di.block.list[0].address]
end
return di.block.list[0].address if $gdasm.function[di.block.list[0].address]
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.find_start_of_function calls 'di.block.from_normal.length' 3 times Open
while (defined?(di.block.from_normal.length) && !di.block.from_normal.empty?) || (defined?(di.block.from_subfuncret.length) && !di.block.from_subfuncret.empty?)
if defined?(di.block.from_normal.length)
i = 0
while blocks.include?(di.block.from_normal[i]) && (i < di.block.from_normal.length)
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.find_start_of_function calls 'di.block.list[0]' 9 times Open
if di.block.list[0].block.from_normal.nil? && !di.block.list[0].block.from_subfuncret.nil? && (di.block.list[0].block.from_subfuncret.length == 1)
blocks << di.address
di = $gdasm.di_at(di.block.list[0].block.from_subfuncret[0])
elsif
blocks << di.address
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MachocHash#self.calculate_machoc_hash calls 'addr.to_s' 2 times Open
@listoffunct << addr if addr.to_s =~ /^[0-9]+$/
end
@listoffunct = @listoffunct.sort
@listoffunct .each do |addr|
next unless addr.to_s =~ /^[0-9]+$/
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MachocHash#self.calculate_machoc_hash calls 'to_ref == @treetbfunc[y][0]' 2 times Open
currFunc += ',' if (to_ref == @treetbfunc[y][0]) && (currFunc[-1] != ',') && (currFunc[-1] != ':')
currFunc += (y + 1).to_s.to_s if to_ref == @treetbfunc[y][0]
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.
MetasmUtils#self.getArg calls 'di.block.list[i].instruction.args.first' 4 times Open
if (di.block.list[i].opcode.name == 'call') && (di.block.list[i].instruction.args.first == creg)
i -= 1
while i >= 0
if di.block.list[i].opcode.name == 'push'
if carg == arg
- Read upRead up
- Exclude checks
Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.
Reek implements a check for Duplicate Method Call.
Example
Here's a very much simplified and contrived example. The following method will report a warning:
def double_thing()
@other.thing + @other.thing
end
One quick approach to silence Reek would be to refactor the code thus:
def double_thing()
thing = @other.thing
thing + thing
end
A slightly different approach would be to replace all calls of double_thing
by calls to @other.double_thing
:
class Other
def double_thing()
thing + thing
end
end
The approach you take will depend on balancing other factors in your code.