Workspace
has 63 methods (exceeds 20 allowed). Consider refactoring. Open
public class Workspace extends Editor implements ModelListener {
int vertices;
int faces;
File Workspace.java
has 378 lines of code (exceeds 250 allowed). Consider refactoring. Open
package workspace;
import math.Vector3f;
import mesh.Mesh3D;
import mesh.util.VertexNormals;
Method draw
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void draw(Mesh3D mesh, Color color) {
p.pushStyle();
vertices = mesh.vertices.size();
faces = mesh.faces.size();
- 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 keyEvent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void keyEvent(KeyEvent e) {
if (!isUseKeyBindings()) return;
if (e.getAction() != KeyEvent.TYPE) return;
- 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 handleSelection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void handleSelection(int x, int y) {
SceneObject sceneObject = null;
String sceneObjectName = selectionRender.getObject(x, y);
if (sceneObjectName != null) {
- 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"