Showing 9,050 of 9,050 total issues
Method fromJson
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public default IPBuyTicket fromJson(io.vertx.core.json.JsonObject json) {
setOrThrow(this::setKey,json::getString,"KEY","java.lang.String");
setOrThrow(this::setSerial,json::getString,"SERIAL","java.lang.String");
setOrThrow(this::setType,json::getString,"TYPE","java.lang.String");
Method fromJson
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public default IPPos fromJson(io.vertx.core.json.JsonObject json) {
setOrThrow(this::setKey,json::getString,"KEY","java.lang.String");
setOrThrow(this::setName,json::getString,"NAME","java.lang.String");
setOrThrow(this::setCode,json::getString,"CODE","java.lang.String");
Method toJson
has 26 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("NAME",getName());
Method toString
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public String toString() {
StringBuilder sb = new StringBuilder("TplModel (");
sb.append(key);
Method hashCode
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((this.key == null) ? 0 : this.key.hashCode());
Method hashCode
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((this.key == null) ? 0 : this.key.hashCode());
Method toString
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public String toString() {
StringBuilder sb = new StringBuilder("IPortfolio (");
sb.append(key);
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected JsonObject initialize(final JsonObject data, final JsonObject initialize) {
final JsonObject directoryJ = new JsonObject();
Ut.valueCopy(directoryJ, data,
// key for inserted
KName.KEY,
Method transferAsync
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Future<JsonObject> transferAsync(final ConcurrentMap<Boolean, List<FBillItem>> fromTo, final FBook book,
final JsonObject params) {
/*
* `comment` from params
Method fetchByKey
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Future<JsonObject> fetchByKey(final String key) {
return Ux.Jooq.on(FBookDao.class).<FBook>fetchByIdAsync(key).compose(book -> {
// Fetch all bills in current book
return Ux.Jooq.on(FBillDao.class).<FBill>fetchAsync("bookId", key).compose(bills -> {
Method fromJson
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public default IFBook fromJson(io.vertx.core.json.JsonObject json) {
setOrThrow(this::setKey,json::getString,"KEY","java.lang.String");
setOrThrow(this::setName,json::getString,"NAME","java.lang.String");
setOrThrow(this::setCode,json::getString,"CODE","java.lang.String");
Method onTable
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Table<Record> onTable(final DataTpl tpl, final Set<String> tables,
final ConcurrentMap<String, String> aliasMap) {
/*
* 多表 Join 查询的时候,使用 LEFT 模式(默认),即主表一定会有数据
Method toJson
has 26 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("NAME",getName());
Method tree
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Function<JsonArray, Future<ConcurrentMap<String, String>>> tree(final IxMod in, final boolean from) {
return (data) -> {
final KModule module = in.module();
final KTransform transform = module.getTransform();
final KTree tree = transform.getTree();
Method fabric
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Future<DFabric> fabric(final IxMod in) {
final Envelop envelop = in.envelop();
final KModule module = in.module();
final KTransform transform = module.getTransform();
return this.fabric(module, envelop).compose(dictData -> {
Method ok
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Future<JsonArray> ok(final JsonArray columns, final Object linkedObj) {
/*
* Fix Bug:
* java.lang.ClassCastException: io.vertx.core.json.JsonObject cannot be cast to io.vertx.core.json.JsonArray
Method getRecord
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
static Record getRecord(final JsonObject config) {
/* Config Verify **/
Fn.outBug(() -> Fn.bugAt(() -> Ruler.verify(YmlCore.rpc.client.RPC_CLIENT, config), config),
LOGGER);
// Connect remote etcd to check service
Similar blocks of code found in 3 locations. Consider refactoring. Open
@Override
public String toString() {
return "UTenant{" +
"vendorMap=" + this.vendorMap +
", global=" + this.global +
- 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 71.
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
public EmModel.Join modeSource() {
/* P1: classDao */
if (Objects.nonNull(this.classDao)) {
return EmModel.Join.DAO;
}
- 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 71.
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 3 locations. Consider refactoring. Open
@Override
public String toString() {
return "RRule{" +
"condition=" + this.condition +
", conditions=" + this.conditions +
- 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 71.
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