Showing 49 of 153 total issues
Method value
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public String value() {
try {
final HttpURLConnection conn =
((HttpURLConnection) new URL(URL_TOKEN).openConnection());
Method value
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
override fun value(): Metadata {
db.value().prepareStatement(
// language=H2
"""//
UPDATE METADATA
Method fire
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void fire() {
final List<Attachment> remoteUpdates = new ArrayList<>();
final Map<Long, Attachment> localUpdates = nyx.attachments()
.all()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method fire
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void fire() {
final List<Jot> remoteUpdates = new ArrayList<>();
final Map<Long, Jot> localJotMap = nyx.jots().all()
.stream()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method value
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
override fun value(): Jot {
val sameGroupJots = QueriedJots(
JotsByTimestampRange(
db,
Calendar.getInstance().apply {
Method fire
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void fire() {
final List<Jot> remoteUpdates = new ArrayList<>();
final Map<Long, Jot> localJotMap = nyx.jots().all()
.stream()
Method fire
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
override fun fire() {
val cursorPosition = textView.selectionStart
val spannable = SpannableString(content)
tags.keys.forEach { tagName ->
try {
Method onViewCreated
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
RecyclerView listView = view.findViewById(R.id.list);
listView.setBackgroundColor(Color.BLACK);
Method onBindVideo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void onBindVideo(Uri uri, ViewHolder holder) {
ImageView imageView =
holder.itemView.findViewById(R.id.itemAttachmentVideo_icon);
if (new IsLocalExist(context, uri.toString()).value()) {
MediaMetadataRetriever mmr = new MediaMetadataRetriever();
Method fire
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void fire() {
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
if (uri.startsWith(URI_FILE_PROVIDER) &&
!new IsLocalExist(image.getContext(), uri).value() &&
Method value
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
override fun value(): List<RankedMood> {
val result: MutableMap<String?, Int> = HashMap()
for (jot in QueriedJots(AllJots(db)).value()) {
if (jot.mood().length < 2 || jot.mood().substring(0, 1).contains(" ")) {
continue
Method value
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
override fun value(): Connection {
return try {
val conn = connSource.value()
conn.createStatement().executeUpdate( // language=H2
"""//---
Method sync
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void sync() {
try {
if (isSyncing) {
return;
Method fire
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void fire() {
try (final PreparedStatement stmt = db.value().prepareStatement(
// language=H2
"INSERT INTO jots(ID, content, createdTime, location, mood, VERSION, TITLE, PRIVATE, delete)\n" +
Method value
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
override fun value(): Jot {
try {
db.value().prepareStatement( // language=H2
"SELECT * FROM jots WHERE id=?;"
).use { stmt ->
Method loginSuccessHtml
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private String loginSuccessHtml(){
return "<!DOCTYPE html>\n" +
"<html>\n" +
" \n" +
"<body>\n" +
Method onBindPreview
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void onBindPreview(Uri uri, ViewHolder holder) {
RichPreview preview = new RichPreview(new ResponseListener() {
@Override
public void onData(MetaData metaData) {
final View root = holder.getRootView();
Method value
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
override fun value(): Metadata {
db.value().prepareStatement(
"""//
INSERT INTO METADATA(TYPE, TITLE, VALUE, JOT_ID, VALUE_DECIMAL, COMMENT)
values (?, ?, ?, ?, ?, ?)""",
Method fire
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void fire() {
try {
final InputStream stream = streamSource.value();
final HttpURLConnection conn = (HttpURLConnection) new URL(URL).openConnection();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method updateRemoteFiles
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private void updateRemoteFiles(List<Attachment> remoteUpdates) {
try {
final List<Future<?>> asyncFuture = new ArrayList<>();
for (Attachment remoteUpdate : remoteUpdates) {
final File sourceFile = nyx.files().fileByUri(remoteUpdate.uri());
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"