Showing 102 of 102 total issues
Method parse_event
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse_event e
row = Array.new
row << Qt::StandardItem.new(e.value["id"].value.to_s)
row << Qt::StandardItem.new(Time.at(e.value["timestamp"].value).to_s)
Method initialize
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
@layout = Qt::GridLayout.new
super *args
setLayout @layout
Method initialize
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
super *args
# details on selected app
@layout = Qt::GridLayout.new
Method populate_files
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def populate_files path
@model.clear
@model.setHorizontalHeaderItem(0, Qt::StandardItem.new("filename"))
@model.setHorizontalHeaderItem(1, Qt::StandardItem.new("size"))
@model.setHorizontalHeaderItem(2, Qt::StandardItem.new("permissions"))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setup_device_config
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def setup_device_config
@device_config_tab = Qt::Widget.new self
device_config_layout = Qt::GridLayout.new
@device_config_tab.setLayout device_config_layout
Method initialize
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def initialize *args
super *args
@fuzz_config_layout = Qt::GridLayout.new
setLayout @fuzz_config_layout
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method initialize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
super *args
@tabs = Hash.new
Method initialize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
super *args
Method initialize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(args)
super(*args)
# details on selected app
@layout = Qt::GridLayout.new
Method initialize
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
super *args
@layout = Qt::GridLayout.new
setLayout(@layout)
Method init_ui
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def init_ui
# setup central widget and grid layout
@central_widget = Qt::Widget.new self
self.setCentralWidget @central_widget
@grid = Qt::GridLayout.new @central_widget
Method parse_event
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse_event e
row = Array.new
row << Qt::StandardItem.new(e.value["id"].value.to_s)
row << Qt::StandardItem.new(Time.at(e.value["timestamp"].value).to_s)
Method refresh_app_list
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def refresh_app_list
if $device.ios_version >= 8 && $device.ios_version != 10
refresh_msg = "Refreshing uicache to ensure app information is" \
"up-to-date. This may take a few seconds."
box = Qt::MessageBox.new 1, "Refreshing...", refresh_msg
Method update_device
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def update_device
if $device.device?
@connect.hide
if $device.mode == "usb"
usb_mode_text = "<b>USB device:</b> Manually connect via SSH as " \
Method sync_dir
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def sync_dir(remote, local_relative)
local = @local_path + "/" + local_relative
if $settings['device_connection_mode'] == "ssh"
cmd = "rsync -avz -e 'ssh -oStrictHostKeyChecking=no -p #{$settings.ssh_port}'" \
" #{$settings.ssh_username}@#{$settings.ssh_host}:#{Shellwords.escape(remote)}/" \
Method initialize
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
super *args
@refresh = Qt::PushButton.new "Refresh"
@refresh.connect(SIGNAL :released) {
Method populate_files
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def populate_files path
@model.clear
@model.setHorizontalHeaderItem(0, Qt::StandardItem.new("filename"))
@model.setHorizontalHeaderItem(1, Qt::StandardItem.new("size"))
@model.setHorizontalHeaderItem(2, Qt::StandardItem.new("permissions"))
Similar blocks of code found in 4 locations. Consider refactoring. Open
def open_section
@open_label = Qt::Label.new "<b>open</b><br>(Open apps on the device)"
@layout.addWidget @open_label, 1, 0
if $device.open_installed?
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 57.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
def dumpdecrypted_section
@dumpdecrypted_label = Qt::Label.new "<b>dumpdecrypted</b><br>(Decrypt app binaries on the device).<br>Developed and maintained by Stefan Esser https://github.com/stefanesser/dumpdecrypted"
@layout.addWidget @dumpdecrypted_label, 3, 0
if $device.dumpdecrypted_installed?
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 57.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
def cycript_section
@cycript_label = Qt::Label.new "<b>cycript</b><br>(explore and modify running applications using a hybrid of Objective-C++ and JavaScript. http://www.cycript.org/ )"
@layout.addWidget @cycript_label, 8, 0
if $device.cycript_installed?
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 57.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76