Showing 111 of 171 total issues
Method parsed
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public XML parsed() throws IOException {
final XePhiListener xel = new XePhiListener(this.name);
final ParsingErrors spy = new ParsingErrors(this.input);
final PhiLexer lexer = new PhiLexer(
Method exec
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void exec() throws IOException {
final List<Path> all = new Walk(this.classesDir.toPath()).stream()
.filter(
file -> this.includes.stream().anyMatch(
Method run
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static void run(final List<String> opts) throws Exception {
final String path = new JavaPath(opts.get(0)).toString();
final Phi app;
try {
Main.LOGGER.fine(String.format("Loading class %s...", path));
Method find
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public int find(final String name) {
if (name == null) {
throw new IllegalArgumentException(
"Argument name is null"
Method accept
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void accept(final Path sources, final Path destination) {
final String src = sources.toString();
final String dst = destination.toString();
try {
Method exec
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void exec() {
final Collection<ForeignTojo> tojos = this.scopedTojos().notDiscovered();
final Collection<String> discovered = new HashSet<>();
for (final ForeignTojo tojo : tojos) {
Method iterator
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Iterator<Dependency> iterator() {
final Collection<ForeignTojo> list = this.tojos.dependencies();
Logger.debug(
this, "%d suitable tojo(s) found out of %d",
- 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 unplaceClasses
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("PMD.AvoidAccessToStaticMembersViaThis")
private void unplaceClasses() throws IOException {
final Collection<PlacedTojo> classes = this.placedTojos.classes();
int deleted = 0;
if (!this.keepBinaries.isEmpty()) {
Method attr
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private String attr(final int pos) {
if (0 > pos) {
throw new ExFailure(
String.format(
"Attribute position can't be negative (%d)",
Method load
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static ConcurrentHashMap<String, String> load(final String src) throws IOException {
try (ObjectInputStream map = new ObjectInputStream(
new ByteArrayInputStream(
Base64.getDecoder().decode(
Files.readAllBytes(Paths.get(src))
Method parse
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static boolean parse(final String opt) throws IOException {
if ("--verbose".equals(opt)) {
Main.EOLOG.setLevel(Level.FINE);
for (final Handler hnd : Main.EOLOG.getHandlers()) {
hnd.setLevel(Level.FINE);
Method parsed
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public XML parsed() throws IOException {
final List<Text> lines = this.lines();
final ParsingErrors spy = new ParsingErrors(lines);
final EoLexer lexer = new EoIndentLexer(this.normalize());
lexer.removeErrorListeners();
Method iterator
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Iterator<Dependency> iterator() {
return new Mapped<>(
dependency -> {
final Iterable<Dependency> transitives = new Filtered<>(
Method exec
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void exec() {
final Collection<ForeignTojo> tojos = this.scopedTojos().withXmir();
final int total = new OptimizedTojos(
new Filtered<>(
Method exec
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void exec() throws IOException {
final Path target = this.outputDir.toPath().resolve(CopyMojo.DIR);
final Collection<Path> sources = new Walk(this.sourcesDir.toPath());
for (final Path src : sources) {
Method take
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public <T> T take(final Class<T> type) {
final byte[] weak = this.take();
final Object strong;
if (type.equals(Long.class)) {
strong = new BytesOf(weak).asNumber(Long.class);
Method exec
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
void exec() {
final Collection<ForeignTojo> tojos = this.scopedTojos().withOptimized();
final int total = new OptimizedTojos(
new Filtered<>(
Method failures
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Collection<String> failures() throws IOException {
final Yaml yaml = new Yaml();
final Map<String, Object> map = yaml.load(this.script);
final String src = map.get("eo").toString();
- 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 enterBeginner
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
@SuppressWarnings("PMD.ConfusingTernary")
public void enterBeginner(final EoParser.BeginnerContext ctx) {
this.startObject(ctx);
if (ctx.data() == 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"
Further reading
Method exec
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void exec() {
final Collection<ForeignTojo> tojos = this.scopedTojos().notDiscovered();
final Collection<String> discovered = new HashSet<>();
for (final ForeignTojo tojo : tojos) {
- 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"