CalebFenton/dex-oracle

View on GitHub

Showing 6 of 136 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  def lookup_strings_1int(method)
    target_to_contexts = {}
    matches = method.body.scan(STRING_LOOKUP_1INT)
    @optimizations[:string_lookups] += matches.size if matches
    matches.each do |original, _, arg1, class_name, method_signature, out_reg|
Severity: Major
Found in lib/dex-oracle/plugins/undexguard.rb and 2 other locations - About 55 mins to fix
lib/dex-oracle/plugins/indexed_class_lookup.rb on lines 53..65
lib/dex-oracle/plugins/indexed_string_lookup.rb on lines 45..57

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 46.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  def decrypt_classes(method)
    target_to_contexts = {}
    matches = method.body.scan(CLASS_DECRYPT)
    @optimizations[:class_lookups] += matches.size if matches
    matches.each do |original, _, class_index, class_name, method_signature, out_reg|
Severity: Major
Found in lib/dex-oracle/plugins/indexed_class_lookup.rb and 2 other locations - About 55 mins to fix
lib/dex-oracle/plugins/indexed_string_lookup.rb on lines 45..57
lib/dex-oracle/plugins/undexguard.rb on lines 101..113

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 46.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  def decrypt_strings(method)
    target_to_contexts = {}
    matches = method.body.scan(STRING_DECRYPT)
    @optimizations[:string_lookups] += matches.size if matches
    matches.each do |original, _, str_index, class_name, method_signature, out_reg|
Severity: Major
Found in lib/dex-oracle/plugins/indexed_string_lookup.rb and 2 other locations - About 55 mins to fix
lib/dex-oracle/plugins/indexed_class_lookup.rb on lines 53..65
lib/dex-oracle/plugins/undexguard.rb on lines 101..113

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 46.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  def process
    method_to_target_to_contexts = {}
    @methods.each do |method|
      logger.info("Decrypting Bitwise Anti-Skid #{method.descriptor}")
      target_to_contexts = {}
Severity: Major
Found in lib/dex-oracle/plugins/bitwise_antiskid.rb and 2 other locations - About 55 mins to fix
lib/dex-oracle/plugins/indexed_string_lookup.rb on lines 27..40
lib/dex-oracle/plugins/string_decryptor.rb on lines 27..40

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 45.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  def process
    method_to_target_to_contexts = {}
    @methods.each do |method|
      logger.info("Decrypting indexed strings #{method.descriptor}")
      target_to_contexts = {}
Severity: Major
Found in lib/dex-oracle/plugins/indexed_string_lookup.rb and 2 other locations - About 55 mins to fix
lib/dex-oracle/plugins/bitwise_antiskid.rb on lines 29..42
lib/dex-oracle/plugins/string_decryptor.rb on lines 27..40

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 45.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  def process
    method_to_target_to_contexts = {}
    @methods.each do |method|
      logger.info("Decrypting strings #{method.descriptor}")
      target_to_contexts = {}
Severity: Major
Found in lib/dex-oracle/plugins/string_decryptor.rb and 2 other locations - About 55 mins to fix
lib/dex-oracle/plugins/bitwise_antiskid.rb on lines 29..42
lib/dex-oracle/plugins/indexed_string_lookup.rb on lines 27..40

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 45.

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

Further Reading

Severity
Category
Status
Source
Language