Showing 27 of 27 total issues
QRCodeResponse
has 64 methods (exceeds 20 allowed). Consider refactoring. Open
public class QRCodeResponse {
@SerializedName("codeId")
private String codeId = null;
File ApiClient.java
has 493 lines of code (exceeds 250 allowed). Consider refactoring. Open
package jp.ne.paypay;
import com.google.gson.reflect.TypeToken;
import com.squareup.okhttp.Call;
import com.squareup.okhttp.FormEncodingBuilder;
QRCode
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
public class QRCode {
@SerializedName("merchantPaymentId")
@NotEmpty(message = "merchantPaymentId is required")
@Size(max = 64, message = "maximum 64 characters are allowed for merchantPaymentId")
ApiClient
has 49 methods (exceeds 20 allowed). Consider refactoring. Open
public class ApiClient {
private String basePath = ApiConstants.DEFAULT_BASE_PATH;
private String basePathProd = ApiConstants.PROD_BASE_PATH;
private String basePathSandbox = ApiConstants.SANDBOX_BASE_PATH;
Payment
has 45 methods (exceeds 20 allowed). Consider refactoring. Open
public class Payment extends PaymentState {
@SerializedName("merchantPaymentId")
@NotEmpty(message = "merchantPaymentId is required")
@Size(max = 64, message = "maximum 64 characters are allowed for merchantPaymentId")
PaymentApi
has 44 methods (exceeds 20 allowed). Consider refactoring. Open
public class PaymentApi {
private ApiClient apiClient;
private final Validator validator = Validator.getInstance();
File PaymentApiExample.java
has 341 lines of code (exceeds 250 allowed). Consider refactoring. Open
package jp.ne.paypay.example;
import jp.ne.paypay.ApiClient;
import jp.ne.paypay.ApiException;
import jp.ne.paypay.Configuration;
File QRCodeResponse.java
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
package jp.ne.paypay.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
PaymentState
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
public class PaymentState {
@SerializedName("paymentId")
private String paymentId = null;
Capture
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
public class Capture {
@SerializedName("merchantCaptureId")
@NotEmpty(message = "merchantCaptureId is required")
private String merchantCaptureId = null;
UserAuthorizationData
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
public class UserAuthorizationData {
@SerializedName("userAuthorizationId")
private String userAuthorizationId = null;
File QRCode.java
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
package jp.ne.paypay.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
Identical blocks of code found in 2 locations. Consider refactoring. Open
@Override
public boolean equals(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 164.
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 2 locations. Consider refactoring. Open
@Override
public boolean equals(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 164.
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
RevertAuthResponseData
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class RevertAuthResponseData {
/**
* Gets or Sets status
*/
Refund
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class Refund extends RefundState {
@SerializedName("merchantRefundId")
@NotEmpty(message = "merchantRefundId is required")
@Size(max = 64, message = "maximum 64 characters are allowed for merchantRefundtId")
File Payment.java
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
package jp.ne.paypay.model;
import com.google.gson.annotations.SerializedName;
import java.time.Instant;
Identical blocks of code found in 2 locations. Consider refactoring. Open
return Objects.equals(this.paymentMethodType, another.paymentMethodType) &&
Objects.equals(this.paymentMethodId, another.paymentMethodId) &&
Objects.equals(this.issuerName, another.issuerName) &&
Objects.equals(this.accountNo, another.accountNo) &&
Objects.equals(this.logoUrl, another.logoUrl) &&
- 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 138.
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 2 locations. Consider refactoring. Open
return Objects.equals(this.merchantPaymentId, payment.merchantPaymentId) &&
Objects.equals(this.userAuthorizationId, payment.userAuthorizationId) &&
Objects.equals(this.amount, payment.amount) &&
Objects.equals(this.requestedAt, payment.requestedAt) &&
Objects.equals(this.storeId, payment.storeId) &&
- 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 138.
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 deserialize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public <T> T deserialize(Response response, Type returnType) throws ApiException {
if (response == null || returnType == null) {
return null;
}