Showing 21,886 of 21,886 total issues
Method reset_ecu
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def reset_ecu(bus, src_id, dst_id, hard, opt = {})
Method read_data_by_id
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def read_data_by_id(bus, src_id, dst_id, id, opt = {})
Method shell_registry_setvaldata
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def shell_registry_setvaldata(key, valname, data, type, view)
Method get_security_token
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_security_token(bus, src_id, dst_id, level = 1, opt = {})
Method meterpreter_registry_setvaldata
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def meterpreter_registry_setvaldata(key, valname, data, type, view)
Method get_current_data
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_current_data(bus, src_id, dst_id, pid, opt = {})
Method registry_setvaldata
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def registry_setvaldata(key, valname, data, type, view = REGISTRY_VIEW_NATIVE)
Method query_ldap
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def query_ldap(session_handle, base, scope, filter, fields)
Method set_dsc
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def set_dsc(bus, src_id, dst_id, level, opt = {})
Method create_process_with_logon
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_process_with_logon(domain, user, password, application_name, command_line)
Method find_files
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_files(userprofile, application, artifact, path, dir)
Method create_process_as_user
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_process_as_user(domain, user, password, application_name, command_line)
Method add_reg_key_value
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_reg_key_value(reg_key, reg_value, reg_data, reg_type, opts = {})
Method send_wrapper
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def send_wrapper(sock, pkt, host, port, flags)
Method CfCreatePlaceholders
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string BaseDirectoryPath,
[In, Out, MarshalAs(UnmanagedType.LPArray)] CF_PLACEHOLDER_CREATE_INFO[] PlaceholderArray,
int PlaceholderCount,
CF_CREATE_FLAGS CreateFlags,
out int EntriesProcessed
Method sign
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def sign(creds, service, headers, body_digest, now)
Method CfHydratePlaceholder
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
SafeHandle FileHandle,
LargeIntegerStruct StartingOffset,
LargeIntegerStruct Length,
CF_HYDRATE_FLAGS HydrateFlags,
IntPtr Overlapped
Method auth
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def auth(creds, service, headers, body_digest, now)
Method CfConnectSyncRoot
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string SyncRootPath,
[MarshalAs(UnmanagedType.LPArray), In] CF_CALLBACK_REGISTRATION[] CallbackTable,
IntPtr CallbackContext,
CF_CONNECT_FLAGS ConnectFlags,
out long ConnectionKey
Similar blocks of code found in 2 locations. Consider refactoring. Open
public int getType()
{
String caller = java.lang.Thread.currentThread().getStackTrace()[2].toString();
if (caller.contains("ICC_Transform.getImageLayout(")) {
return this._fakeType;
- 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 47.
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