Showing 28 of 38 total issues
Method run
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
public void run() {
final AtomicInteger grp = new AtomicInteger();
final ExecutorService exec = Executors.newCachedThreadPool(
Method exec
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Iterable<Directive> exec(final XML deck) {
final boolean ready = !deck.nodes(
Joiner.on(" and ").join(
"/deck/containers[not(container/@waste)",
Method regex
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Take regex(final Base base) throws IOException {
return new TkFork(
new FkParams(
PsByFlag.class.getSimpleName(),
Pattern.compile(".+"),
Method act
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Response act(final Request req) throws IOException {
final Deck deck = new RqDeck(this.base, req).deck();
final Href home = new Href("/d").path(deck.name());
final PrettyTime pretty = new PrettyTime();
Method exec
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public void exec(final Iterable<Deck> decks) throws IOException {
final Iterable<String> confs = Iterables.concat(
Iterables.transform(
decks,
Method exec
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public String exec(final String host, final Map<String, String> args)
throws IOException {
final String command = Joiner.on(" && ").join(
Iterables.concat(
Method update
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void update(final String domain, final XML deck)
throws IOException {
// @checkstyle LineLength (1 line)
final String terms = "not(@waste) and @type='green' and @state='alive' and http";
final String servers = Joiner.on(' ').join(
Method make
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Take make(final Take take) {
return new TkAuth(
take,
new PsChain(
new TkAppAuth.FakePass(),
Method repo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Iterable<Directive> repo(final XML deck,
final String... args) throws IOException {
if (args.length == 0) {
throw new RsForward(
new RsFlash(
Method exec
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Iterable<Directive> exec(final XML deck) throws IOException {
final Collection<XML> containers = deck.nodes(
"/deck/containers/container[not(@waste) and @state='dead']"
);
Method build
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private String build(final String deck, final XML repo)
throws IOException {
final String name = String.format(
"%s-%08x", deck,
BuildImage.RND.nextInt()
Method add
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public void add(final String name) throws IOException {
if (!name.matches("[a-z]{3,12}")) {
throw new IllegalStateException(
String.format(
Method make
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Response make(final String xsl, final Base base,
final Request req, final XeSource... src) throws IOException {
final Response xbl = new RsXembly(
new XeStylesheet(xsl),
new XePage(base, req, src)
Method exec
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Iterable<Directive> exec(final XML deck) throws IOException {
final Collection<XML> images = deck.nodes(
"/deck/images/image[not(@waste)]"
);
Method answer
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Iterable<Directive> answer(final XML deck, final String cmd)
throws IOException {
final Directives dirs = new Directives().xpath("/deck");
final String[] parts = cmd.trim().split("\\s+");
if ("domain".equals(parts[0])) {
Method iterate
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Iterable<String> iterate(final long since) {
return Iterables.transform(
this.region.table(DyEvents.TBL)
.frame()
Method exec
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Iterable<Directive> exec(final XML deck) throws IOException {
final Collection<XML> containers = deck.nodes(
"/deck/containers/container[@waste and @state='alive']"
);
Method exec
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Iterable<Directive> exec(final XML deck) throws IOException {
final Directives dirs = new Directives();
final Collection<XML> containers = deck.nodes(
"/deck/containers/container[host and http]"
Method image
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Iterable<Directive> image(final String... args)
throws IOException {
if (args.length == 0) {
throw new RsForward(
new RsFlash(
Method domain
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Iterable<Directive> domain(final String... args)
throws IOException {
if (args.length == 0) {
throw new RsForward(
new RsFlash(