Wrote /root/JavaX-Caches/tmp_379637528/main.java - 9238 bytes (written=9238, should be 9238)
javac=0, ecj=1, useJarBot=0
Checking ECJ at port 4898 at 127.0.0.1
/root/jdk-17/bin/javac -source 11 -target 11 -nowarn -encoding utf8 -Xdiags:verbose -cp /root/.javax/x30.jar:/root/dexcompiler/android.jar:/root/dexcompiler/support-v4-22.2.1.jar:/root/javafx/javafx.base.jar:/root/javafx/javafx.graphics.jar:/root/javafx/javafx.swing.jar -d /root/JavaX-Caches/tmp_132650678 /root/JavaX-Caches/tmp_379637528/main.java 2>&1
[Compilation Error]Compiler errors. Medium transpile. Show Java sources. Show snippet. Edit.
/root/JavaX-Caches/tmp_379637528/main.java:4: error: class, interface, or enum expected
abstract srecord noeq AbstractFastRegions(Img image) is Runnable, IImageRegions {
^
/root/JavaX-Caches/tmp_379637528/main.java:6: error: class, interface, or enum expected
gettable int size; // =w*h
^
/root/JavaX-Caches/tmp_379637528/main.java:8: error: class, interface, or enum expected
new IntBuffer stack; // locations as y*w+x
^
/root/JavaX-Caches/tmp_379637528/main.java:9: error: class, interface, or enum expected
int[] regionMatrix; // for each pixel: region index (starting at 1)
^
/root/JavaX-Caches/tmp_379637528/main.java:10: error: class, interface, or enum expected
new IntBuffer regionPixels; // collect all pixels for regions
^
/root/JavaX-Caches/tmp_379637528/main.java:12: error: class, interface, or enum expected
settable bool withDiagonals; // also walk diagonally?
^
/root/JavaX-Caches/tmp_379637528/main.java:16: error: class, interface, or enum expected
new IntBuffer regionFirstPixel; // for each region: index of first pixel found in regionPixels
^
/root/JavaX-Caches/tmp_379637528/main.java:17: error: class, interface, or enum expected
new IntBuffer regionSize; // for each region: number of pixels
^
/root/JavaX-Caches/tmp_379637528/main.java:18: error: class, interface, or enum expected
new IntBuffer regionBounds; // for each region: bounds (x1, y1, x2, y2)
^
/root/JavaX-Caches/tmp_379637528/main.java:21: error: class, interface, or enum expected
new L regionsBySize;
^
/root/JavaX-Caches/tmp_379637528/main.java:23: error: class, interface, or enum expected
int regionCounter;
^
/root/JavaX-Caches/tmp_379637528/main.java:24: error: class, interface, or enum expected
bool verbose;
^
/root/JavaX-Caches/tmp_379637528/main.java:26: error: class, interface, or enum expected
double regionStep = .1; // for rendering in regionsImage
^
/root/JavaX-Caches/tmp_379637528/main.java:28: error: class, interface, or enum expected
int x(int pos) { ret pos % w; }
^
/root/JavaX-Caches/tmp_379637528/main.java:28: error: class, interface, or enum expected
int x(int pos) { ret pos % w; }
^
/root/JavaX-Caches/tmp_379637528/main.java:29: error: class, interface, or enum expected
int y(int pos) { ret pos / w; }
^
/root/JavaX-Caches/tmp_379637528/main.java:30: error: class, interface, or enum expected
int pos(int x, int y) { ret y*w+x; }
^
/root/JavaX-Caches/tmp_379637528/main.java:31: error: class, interface, or enum expected
Pt pt(int pos) { ret Pt(x(pos), y(pos)); }
^
/root/JavaX-Caches/tmp_379637528/main.java:32: error: class, interface, or enum expected
bool validPos(int x, int y) { ret x >= 0 && y >= 0 && x < w && y < h; }
^
/root/JavaX-Caches/tmp_379637528/main.java:34: error: class, interface, or enum expected
abstract int getColor(int pos);
^
/root/JavaX-Caches/tmp_379637528/main.java:36: error: class, interface, or enum expected
run {
^
/root/JavaX-Caches/tmp_379637528/main.java:39: error: class, interface, or enum expected
w = image.getWidth(); h = image.getHeight();
^
/root/JavaX-Caches/tmp_379637528/main.java:39: error: class, interface, or enum expected
w = image.getWidth(); h = image.getHeight();
^
/root/JavaX-Caches/tmp_379637528/main.java:40: error: class, interface, or enum expected
size = w*h;
^
/root/JavaX-Caches/tmp_379637528/main.java:41: error: class, interface, or enum expected
regionMatrix = new int[size];
^
/root/JavaX-Caches/tmp_379637528/main.java:44: error: class, interface, or enum expected
regionFirstPixel?.add(0);
^
/root/JavaX-Caches/tmp_379637528/main.java:45: error: class, interface, or enum expected
regionSize?.add(0);
^
/root/JavaX-Caches/tmp_379637528/main.java:47: error: class, interface, or enum expected
regionPixels?.setSize(size);
^
/root/JavaX-Caches/tmp_379637528/main.java:49: error: class, interface, or enum expected
while (runner < size) {
^
/root/JavaX-Caches/tmp_379637528/main.java:53: error: class, interface, or enum expected
regionFirstPixel?.add(regionPixels != null ? l(regionPixels) : runner);
^
/root/JavaX-Caches/tmp_379637528/main.java:54: error: class, interface, or enum expected
stack.add(runner);
^
/root/JavaX-Caches/tmp_379637528/main.java:55: error: class, interface, or enum expected
int color = getColor(runner);
^
/root/JavaX-Caches/tmp_379637528/main.java:56: error: class, interface, or enum expected
int rsize = 0, x1 = w, y1 = h, x2 = 0, y2 = 0;
^
/root/JavaX-Caches/tmp_379637528/main.java:57: error: class, interface, or enum expected
ifdef FastRegions_debug
^
/root/JavaX-Caches/tmp_379637528/main.java:59: error: class, interface, or enum expected
endifdef
^
/root/JavaX-Caches/tmp_379637528/main.java:64: error: class, interface, or enum expected
if (regionMatrix[pos] != 0) continue; // touching myself (or someone else)
^
/root/JavaX-Caches/tmp_379637528/main.java:65: error: class, interface, or enum expected
if (getColor(pos) != color) continue; // wrong color
^
/root/JavaX-Caches/tmp_379637528/main.java:68: error: class, interface, or enum expected
regionMatrix[pos] = region;
^
/root/JavaX-Caches/tmp_379637528/main.java:69: error: class, interface, or enum expected
++rsize;
^
/root/JavaX-Caches/tmp_379637528/main.java:70: error: class, interface, or enum expected
regionPixels?.add(pos);
^
/root/JavaX-Caches/tmp_379637528/main.java:71: error: class, interface, or enum expected
int x = x(pos), y = y(pos);
^
/root/JavaX-Caches/tmp_379637528/main.java:73: error: class, interface, or enum expected
ifdef FastRegions_debug
^
/root/JavaX-Caches/tmp_379637528/main.java:75: error: class, interface, or enum expected
endifdef
^
/root/JavaX-Caches/tmp_379637528/main.java:78: error: class, interface, or enum expected
if (x > x2) x2 = x;
^
/root/JavaX-Caches/tmp_379637528/main.java:79: error: class, interface, or enum expected
if (y < y1) y1 = y;
^
/root/JavaX-Caches/tmp_379637528/main.java:80: error: class, interface, or enum expected
if (y > y2) y2 = y;
^
/root/JavaX-Caches/tmp_379637528/main.java:83: error: class, interface, or enum expected
if (x > 0) stack.add(pos-1);
^
/root/JavaX-Caches/tmp_379637528/main.java:84: error: class, interface, or enum expected
if (x < w-1) stack.add(pos+1);
^
/root/JavaX-Caches/tmp_379637528/main.java:85: error: class, interface, or enum expected
if (y > 0) stack.add(pos-w);
^
/root/JavaX-Caches/tmp_379637528/main.java:86: error: class, interface, or enum expected
if (y < h-1) stack.add(pos+w);
^
/root/JavaX-Caches/tmp_379637528/main.java:88: error: class, interface, or enum expected
if (withDiagonals) {
^
/root/JavaX-Caches/tmp_379637528/main.java:91: error: class, interface, or enum expected
if (x < w-1) stack.add(pos-w+1);
^
/root/JavaX-Caches/tmp_379637528/main.java:92: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_379637528/main.java:95: error: class, interface, or enum expected
if (x < w-1) stack.add(pos+w+1);
^
/root/JavaX-Caches/tmp_379637528/main.java:96: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_379637528/main.java:101: error: class, interface, or enum expected
regionBounds?.addAll(x1, y1, x2+1, y2+1);
^
/root/JavaX-Caches/tmp_379637528/main.java:102: error: class, interface, or enum expected
if (regionsBySize != null) {
^
/root/JavaX-Caches/tmp_379637528/main.java:104: error: class, interface, or enum expected
var buffer = listGetOrCreate(regionsBySize, iBucket, -> new IntBuffer);
^
/root/JavaX-Caches/tmp_379637528/main.java:105: error: class, interface, or enum expected
buffer.add(region);
^
/root/JavaX-Caches/tmp_379637528/main.java:106: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_379637528/main.java:110: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_379637528/main.java:116: error: class, interface, or enum expected
ret ((region-1)*regionStep) % (1.0+regionStep-0.0001);
^
/root/JavaX-Caches/tmp_379637528/main.java:117: error: class, interface, or enum expected
}, w, h);
^
/root/JavaX-Caches/tmp_379637528/main.java:118: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_379637528/main.java:120: error: class, interface, or enum expected
int regionCount aka nRegions() { ret regionCounter; }
^
/root/JavaX-Caches/tmp_379637528/main.java:128: error: ';' expected
int x() { ret AbstractFastRegions.this.x(pos); }
^
/root/JavaX-Caches/tmp_379637528/main.java:129: error: ';' expected
int y() { ret AbstractFastRegions.this.y(pos); }
^
/root/JavaX-Caches/tmp_379637528/main.java:133: error: '{' expected
class FloodRegionIterator > RegionIterator {
^
/root/JavaX-Caches/tmp_379637528/main.java:135: error: illegal start of type
new IntBuffer stack; // locations as y*w+x
^
/root/JavaX-Caches/tmp_379637528/main.java:136: error: expected
BitSet seen = new(size);
^
/root/JavaX-Caches/tmp_379637528/main.java:138: error: illegal start of type
*(int *region) {
^
/root/JavaX-Caches/tmp_379637528/main.java:138: error: expected
*(int *region) {
^
/root/JavaX-Caches/tmp_379637528/main.java:138: error: expected
*(int *region) {
^
/root/JavaX-Caches/tmp_379637528/main.java:147: error: not a statement
if (empty(stack)) false;
^
/root/JavaX-Caches/tmp_379637528/main.java:158: error: not a statement
true;
^
/root/JavaX-Caches/tmp_379637528/main.java:169: error: '{' expected
class CachedRegionIterator > RegionIterator {
^
/root/JavaX-Caches/tmp_379637528/main.java:172: error: illegal start of type
*(int region) {
^
/root/JavaX-Caches/tmp_379637528/main.java:172: error: ';' expected
*(int region) {
^
/root/JavaX-Caches/tmp_379637528/main.java:176: error: ';' expected
ifdef FastRegions_debug
^
/root/JavaX-Caches/tmp_379637528/main.java:177: error: ';' expected
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_379637528/main.java:177: error: not a statement
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_379637528/main.java:177: error: ';' expected
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_379637528/main.java:177: error: not a statement
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_379637528/main.java:177: error: ';' expected
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_379637528/main.java:177: error: not a statement
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_379637528/main.java:177: error: ';' expected
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_379637528/main.java:178: error: not a statement
endifdef
^
/root/JavaX-Caches/tmp_379637528/main.java:178: error: ';' expected
endifdef
^
/root/JavaX-Caches/tmp_379637528/main.java:182: error: not a statement
if (i >= to) false;
^
/root/JavaX-Caches/tmp_379637528/main.java:184: error: not a statement
true;
^
/root/JavaX-Caches/tmp_379637528/main.java:188: error: class, interface, or enum expected
int regionSize(int iRegion) { ret regionSize.get(iRegion); }
^
/root/JavaX-Caches/tmp_379637528/main.java:188: error: class, interface, or enum expected
int regionSize(int iRegion) { ret regionSize.get(iRegion); }
^
/root/JavaX-Caches/tmp_379637528/main.java:192: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_379637528/main.java:196: error: class, interface, or enum expected
ret regionPixels != null ? regionPixels.get(i) : i;
^
/root/JavaX-Caches/tmp_379637528/main.java:197: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_379637528/main.java:201: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_379637528/main.java:207: error: class, interface, or enum expected
); }
^
/root/JavaX-Caches/tmp_379637528/main.java:209: error: class, interface, or enum expected
int regionAt(Pt p) { ret regionAt(p.x, p.y); }
^
/root/JavaX-Caches/tmp_379637528/main.java:213: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_379637528/main.java:217: error: class, interface, or enum expected
}
^
100 errors
only showing the first 100 errors, of 149 total; use -Xmaxerrs if you would like to see more