Skip to content

Instantly share code, notes, and snippets.

@Override
public List<RuleInvocationStatistics> getRuleInvocationStatistics()
{
final Field<Integer> emptyMatches = DSL.decode()
.when(EMPTY_MATCHES_CONDITION, 1).otherwise(0);
final Field<Integer> nonEmptyMatches = DSL.decode()
.when(NONEMPTY_MATCHES_CONDITION, 1).otherwise(0);
final Field<Integer> failedMatches = DSL.decode()
.when(FAILED_MATCHES_CONDITION, 1).otherwise(0);
final Field<String> status = DSL.decode()
.when(NODES.SUCCESS.eq(0), "fail")
.when(NODES.SUCCESS.eq(1)
.and(NODES.START_INDEX.equal( NODES.END_INDEX)),
"empty")
.otherwise("nonempty")
.as("status");
db.select(status, DSL.count().as("count"))
.from(NODES)
.groupBy(status)
package com.github.fge.grappa.debugger.csvtrace.model;
import com.github.fge.grappa.exceptions.GrappaException;
import com.github.fge.grappa.run.EventBasedParseRunner;
import com.github.fge.grappa.run.ParseRunner;
import com.github.fge.grappa.trace.TraceEvent;
import com.github.fge.grappa.trace.parser.TraceEventBuilder;
import com.github.fge.grappa.trace.parser.TraceEventParser;
import org.parboiled.Parboiled;
package com.github.fge.grappa.debugger.common;
import com.github.fge.lambdas.suppliers.ThrowingSupplier;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.Objects;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
package com.github.fge.grappa.debugger.common;
import com.github.fge.lambdas.ThrownByLambdaException;
@FunctionalInterface
public interface ThrowingRunnable
extends Runnable
{
void doRun()
throws Throwable;
taskRunner.runOrFail(
() -> view.setLabelText("Please wait..."),
() -> {
try (
final FileSystem zipfs
= FileSystems.newFileSystem(uri, ZIPFS_ENV);
) {
final boolean exists
= Files.exists(zipfs.getPath("/info.json"));
if (!exists)
package com.github.fge.grappa.debugger.common;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.Objects;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
package com.github.fge.grappa.trace.parser;
import com.github.fge.grappa.parsers.EventBusParser;
import com.github.fge.grappa.rules.Rule;
import com.google.common.collect.Range;
import javax.annotation.Nonnull;
import java.util.Objects;
public class TraceEventParser
package com.github.fge.grappa.trace.parser;
import com.github.fge.grappa.parsers.EventBusParser;
import com.github.fge.grappa.rules.Rule;
import com.google.common.collect.Range;
import javax.annotation.Nonnull;
import java.util.Objects;
public class TraceEventParser
callGraph.setCellValueFactory(
param -> new SimpleObjectProperty<RuleMatchingStats>()
{
@Override
public RuleMatchingStats get()
{
return param.getValue();
}
}
);