Showing 9,050 of 9,050 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
static <T, O> Future<O> channelAsync(final Class<T> clazz, final Supplier<Future<O>> supplier,
final Function<T, Future<O>> executor) {
final T channel = Pocket.lookup(clazz);
if (Objects.isNull(channel)) {
LOGGER.warn("「SL Channel」Channel Async {0} null", clazz.getName());
- 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 78.
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
Identical blocks of code found in 3 locations. Consider refactoring. Open
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
- 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 78.
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 2 locations. Consider refactoring. Open
} else if (ChangeFlag.DELETE == flag) {
/* 主记录删除 */
final Set<String> deleted = this.onSet(oldRecord.fieldNames(), atom, ignores, oldRecord::getValue);
this.onAttribute(deleted, atom, (attrName, change) -> {
- 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 78.
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
Method values
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public UiVisitorRecord values(String value1, String value2, String value3, String value4, String value5, String value6, String value7, String value8, String value9) {
Method values
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public TOaVacationRecord values(String value1, String value2, String value3, String value4, LocalDateTime value5, LocalDateTime value6, Integer value7, String value8, String value9) {
Method combine
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public UxJoin combine(final KModule module, final KModule connect, final MultiMap headers) {
Objects.requireNonNull(module);
Objects.requireNonNull(connect);
// 1. Build UxJoin Object
Method wrapInfix
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Object wrapInfix(final Object proxy) {
if (Objects.isNull(proxy)) {
return null;
}
final Class<?> typeOf = proxy.getClass();
Method fetchAggregation
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private <T> List<Map<String, Object>> fetchAggregation(final JsonObject criteria, final Field[] selectedFields, final String... groupFields) {
/*
* Field[] by groupFields
*/
final Field[] columns = this.analyzer.column(groupFields);
Method columnName
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private String columnName(final String field) {
String targetField;
if (null == this.pojo) {
/*
* The mapping is
Method envelop
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Envelop envelop(final BTree mapping) {
final Object response = this.envelop.data();
if (response instanceof JsonObject || response instanceof JsonArray) {
if (this.isAfter(mapping)) {
final BMapping bMapping;
Method aiJArray
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
static String aiJArray(final String literal) {
if (literal.contains(VString.QUOTE_DOUBLE)) {
return literal;
} else {
final StringBuilder buffer = new StringBuilder();
Method dispatch
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Destination dispatch(final StompServerConnection connection, final Frame frame) {
final String address = frame.getDestination();
// Send a frame to the event bus, check if this inbound traffic is allowed.
if (this.checkMatches(true, address, frame.getBody())) {
Method searchAsync
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Future<JsonObject> searchAsync(final JsonObject node, final Integer integer) {
final String command = N4J.graphicByKey(this.graph, integer);
N4J.LOG.Edge.info(this.getClass(), "Command: {0}", command);
final Session session = this.session();
final Transaction transaction = session.beginTransaction();
Method from
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void from(IWFlow from) {
setKey(from.getKey());
setName(from.getName());
setCode(from.getCode());
Method toJson
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public default io.vertx.core.json.JsonObject toJson() {
io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();
json.put("KEY",getKey());
json.put("TITLE",getTitle());
Method from
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void from(IWFlow from) {
setKey(from.getKey());
setName(from.getName());
setCode(from.getCode());
Method toJson
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public default io.vertx.core.json.JsonObject toJson() {
io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();
json.put("KEY",getKey());
json.put("COMPANY_ID",getCompanyId());
Method attack
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Handler<RoutingContext> attack(final JtUri uri) {
/*
* 「Booting Life Cycle」
* Code Area
Method from
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void from(IIJob from) {
setKey(from.getKey());
setNamespace(from.getNamespace());
setName(from.getName());
Method from
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void from(IIJob from) {
setKey(from.getKey());
setNamespace(from.getNamespace());
setName(from.getName());