Wrote /root/JavaX-Caches/tmp_1307672968/main.java - 8297 bytes (written=8297, should be 8297)
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_50220003 /root/JavaX-Caches/tmp_1307672968/main.java 2>&1
[Compilation Error]Compiler errors. Medium transpile. Show Java sources. Show snippet. Edit.
/root/JavaX-Caches/tmp_1307672968/main.java:1: error: class, interface, or enum expected
srecord noeq FastRegions_BWImage(BWImage image) is Runnable, IImageRegions {
^
/root/JavaX-Caches/tmp_1307672968/main.java:3: error: class, interface, or enum expected
gettable int size;
^
/root/JavaX-Caches/tmp_1307672968/main.java:5: error: class, interface, or enum expected
new IntBuffer stack; // locations as y*w+x
^
/root/JavaX-Caches/tmp_1307672968/main.java:6: error: class, interface, or enum expected
int[] regionMatrix; // for each pixel: region index (starting at 1)
^
/root/JavaX-Caches/tmp_1307672968/main.java:7: error: class, interface, or enum expected
new IntBuffer regionPixels; // collect all pixels for regions
^
/root/JavaX-Caches/tmp_1307672968/main.java:11: error: class, interface, or enum expected
new IntBuffer regionFirstPixel; // for each region: index of first pixel found in regionPixels
^
/root/JavaX-Caches/tmp_1307672968/main.java:12: error: class, interface, or enum expected
new IntBuffer regionSize; // for each region: number of pixels
^
/root/JavaX-Caches/tmp_1307672968/main.java:13: error: class, interface, or enum expected
new IntBuffer regionBounds; // for each region: bounds (x1, y1, x2, y2)
^
/root/JavaX-Caches/tmp_1307672968/main.java:16: error: class, interface, or enum expected
new L regionsBySize;
^
/root/JavaX-Caches/tmp_1307672968/main.java:18: error: class, interface, or enum expected
int regionCounter;
^
/root/JavaX-Caches/tmp_1307672968/main.java:19: error: class, interface, or enum expected
bool verbose;
^
/root/JavaX-Caches/tmp_1307672968/main.java:21: error: class, interface, or enum expected
double regionStep = .1; // for rendering in regionsImage
^
/root/JavaX-Caches/tmp_1307672968/main.java:23: error: class, interface, or enum expected
int x(int pos) { ret pos % w; }
^
/root/JavaX-Caches/tmp_1307672968/main.java:23: error: class, interface, or enum expected
int x(int pos) { ret pos % w; }
^
/root/JavaX-Caches/tmp_1307672968/main.java:24: error: class, interface, or enum expected
int y(int pos) { ret pos / w; }
^
/root/JavaX-Caches/tmp_1307672968/main.java:25: error: class, interface, or enum expected
int pos(int x, int y) { ret y*w+x; }
^
/root/JavaX-Caches/tmp_1307672968/main.java:26: error: class, interface, or enum expected
Pt pt(int pos) { ret Pt(x(pos), y(pos)); }
^
/root/JavaX-Caches/tmp_1307672968/main.java:27: 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_1307672968/main.java:29: error: class, interface, or enum expected
int getColor(int pos) { ret image.getInt(x(pos), y(pos)); }
^
/root/JavaX-Caches/tmp_1307672968/main.java:31: error: class, interface, or enum expected
*(BufferedImage img) { this(toBWImage(img)); }
^
/root/JavaX-Caches/tmp_1307672968/main.java:34: error: class, interface, or enum expected
w = image.getWidth(); h = image.getHeight();
^
/root/JavaX-Caches/tmp_1307672968/main.java:35: error: class, interface, or enum expected
size = w*h;
^
/root/JavaX-Caches/tmp_1307672968/main.java:36: error: class, interface, or enum expected
regionMatrix = new int[size];
^
/root/JavaX-Caches/tmp_1307672968/main.java:39: error: class, interface, or enum expected
regionFirstPixel?.add(0);
^
/root/JavaX-Caches/tmp_1307672968/main.java:40: error: class, interface, or enum expected
regionSize?.add(0);
^
/root/JavaX-Caches/tmp_1307672968/main.java:42: error: class, interface, or enum expected
regionPixels?.setSize(size);
^
/root/JavaX-Caches/tmp_1307672968/main.java:44: error: class, interface, or enum expected
while (runner < size) {
^
/root/JavaX-Caches/tmp_1307672968/main.java:48: error: class, interface, or enum expected
regionFirstPixel?.add(regionPixels != null ? l(regionPixels) : runner);
^
/root/JavaX-Caches/tmp_1307672968/main.java:49: error: class, interface, or enum expected
stack.add(runner);
^
/root/JavaX-Caches/tmp_1307672968/main.java:50: error: class, interface, or enum expected
int color = getColor(runner);
^
/root/JavaX-Caches/tmp_1307672968/main.java:51: error: class, interface, or enum expected
int rsize = 0, x1 = w, y1 = h, x2 = 0, y2 = 0;
^
/root/JavaX-Caches/tmp_1307672968/main.java:52: error: class, interface, or enum expected
ifdef FastRegions_debug
^
/root/JavaX-Caches/tmp_1307672968/main.java:54: error: class, interface, or enum expected
endifdef
^
/root/JavaX-Caches/tmp_1307672968/main.java:59: error: class, interface, or enum expected
if (regionMatrix[pos] != 0) continue; // touching myself (or someone else)
^
/root/JavaX-Caches/tmp_1307672968/main.java:60: error: class, interface, or enum expected
if (getColor(pos) != color) continue; // wrong color
^
/root/JavaX-Caches/tmp_1307672968/main.java:63: error: class, interface, or enum expected
regionMatrix[pos] = region;
^
/root/JavaX-Caches/tmp_1307672968/main.java:64: error: class, interface, or enum expected
++rsize;
^
/root/JavaX-Caches/tmp_1307672968/main.java:65: error: class, interface, or enum expected
regionPixels?.add(pos);
^
/root/JavaX-Caches/tmp_1307672968/main.java:66: error: class, interface, or enum expected
int x = x(pos), y = y(pos);
^
/root/JavaX-Caches/tmp_1307672968/main.java:68: error: class, interface, or enum expected
ifdef FastRegions_debug
^
/root/JavaX-Caches/tmp_1307672968/main.java:70: error: class, interface, or enum expected
endifdef
^
/root/JavaX-Caches/tmp_1307672968/main.java:73: error: class, interface, or enum expected
if (x > x2) x2 = x;
^
/root/JavaX-Caches/tmp_1307672968/main.java:74: error: class, interface, or enum expected
if (y < y1) y1 = y;
^
/root/JavaX-Caches/tmp_1307672968/main.java:75: error: class, interface, or enum expected
if (y > y2) y2 = y;
^
/root/JavaX-Caches/tmp_1307672968/main.java:78: error: class, interface, or enum expected
if (x > 0) stack.add(pos-1);
^
/root/JavaX-Caches/tmp_1307672968/main.java:79: error: class, interface, or enum expected
if (x < w-1) stack.add(pos+1);
^
/root/JavaX-Caches/tmp_1307672968/main.java:80: error: class, interface, or enum expected
if (y > 0) stack.add(pos-w);
^
/root/JavaX-Caches/tmp_1307672968/main.java:81: error: class, interface, or enum expected
if (y < h-1) stack.add(pos+w);
^
/root/JavaX-Caches/tmp_1307672968/main.java:82: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:85: error: class, interface, or enum expected
regionBounds?.addAll(x1, y1, x2+1, y2+1);
^
/root/JavaX-Caches/tmp_1307672968/main.java:86: error: class, interface, or enum expected
if (regionsBySize != null) {
^
/root/JavaX-Caches/tmp_1307672968/main.java:88: error: class, interface, or enum expected
var buffer = listGetOrCreate(regionsBySize, iBucket, -> new IntBuffer);
^
/root/JavaX-Caches/tmp_1307672968/main.java:89: error: class, interface, or enum expected
buffer.add(region);
^
/root/JavaX-Caches/tmp_1307672968/main.java:90: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:94: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:100: error: class, interface, or enum expected
ret ((region-1)*regionStep) % (1.0+regionStep-0.0001);
^
/root/JavaX-Caches/tmp_1307672968/main.java:101: error: class, interface, or enum expected
}, w, h);
^
/root/JavaX-Caches/tmp_1307672968/main.java:102: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:104: error: class, interface, or enum expected
int regionCount aka nRegions() { ret regionCounter; }
^
/root/JavaX-Caches/tmp_1307672968/main.java:112: error: ';' expected
int x() { ret BWImage_FastRegions.this.x(pos); }
^
/root/JavaX-Caches/tmp_1307672968/main.java:113: error: ';' expected
int y() { ret BWImage_FastRegions.this.y(pos); }
^
/root/JavaX-Caches/tmp_1307672968/main.java:117: error: '{' expected
class FloodRegionIterator > RegionIterator {
^
/root/JavaX-Caches/tmp_1307672968/main.java:119: error: illegal start of type
new IntBuffer stack; // locations as y*w+x
^
/root/JavaX-Caches/tmp_1307672968/main.java:120: error: expected
BitSet seen = new(size);
^
/root/JavaX-Caches/tmp_1307672968/main.java:122: error: illegal start of type
*(int *region) {
^
/root/JavaX-Caches/tmp_1307672968/main.java:122: error: expected
*(int *region) {
^
/root/JavaX-Caches/tmp_1307672968/main.java:122: error: expected
*(int *region) {
^
/root/JavaX-Caches/tmp_1307672968/main.java:131: error: not a statement
if (empty(stack)) false;
^
/root/JavaX-Caches/tmp_1307672968/main.java:142: error: not a statement
true;
^
/root/JavaX-Caches/tmp_1307672968/main.java:153: error: '{' expected
class CachedRegionIterator > RegionIterator {
^
/root/JavaX-Caches/tmp_1307672968/main.java:156: error: illegal start of type
*(int region) {
^
/root/JavaX-Caches/tmp_1307672968/main.java:156: error: ';' expected
*(int region) {
^
/root/JavaX-Caches/tmp_1307672968/main.java:160: error: ';' expected
ifdef FastRegions_debug
^
/root/JavaX-Caches/tmp_1307672968/main.java:161: error: ';' expected
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_1307672968/main.java:161: error: not a statement
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_1307672968/main.java:161: error: ';' expected
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_1307672968/main.java:161: error: not a statement
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_1307672968/main.java:161: error: ';' expected
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_1307672968/main.java:161: error: not a statement
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_1307672968/main.java:161: error: ';' expected
printVars CachedRegionIterator(+region, +i, +to);
^
/root/JavaX-Caches/tmp_1307672968/main.java:162: error: not a statement
endifdef
^
/root/JavaX-Caches/tmp_1307672968/main.java:162: error: ';' expected
endifdef
^
/root/JavaX-Caches/tmp_1307672968/main.java:166: error: not a statement
if (i >= to) false;
^
/root/JavaX-Caches/tmp_1307672968/main.java:168: error: not a statement
true;
^
/root/JavaX-Caches/tmp_1307672968/main.java:172: error: class, interface, or enum expected
int regionSize(int iRegion) { ret regionSize.get(iRegion); }
^
/root/JavaX-Caches/tmp_1307672968/main.java:172: error: class, interface, or enum expected
int regionSize(int iRegion) { ret regionSize.get(iRegion); }
^
/root/JavaX-Caches/tmp_1307672968/main.java:176: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:180: error: class, interface, or enum expected
ret regionPixels != null ? regionPixels.get(i) : i;
^
/root/JavaX-Caches/tmp_1307672968/main.java:181: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:185: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:191: error: class, interface, or enum expected
); }
^
/root/JavaX-Caches/tmp_1307672968/main.java:193: error: class, interface, or enum expected
int regionAt(Pt p) { ret regionAt(p.x, p.y); }
^
/root/JavaX-Caches/tmp_1307672968/main.java:197: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:201: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:207: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:211: error: class, interface, or enum expected
new L l;
^
/root/JavaX-Caches/tmp_1307672968/main.java:212: error: class, interface, or enum expected
while (it.next())
^
/root/JavaX-Caches/tmp_1307672968/main.java:214: error: class, interface, or enum expected
ret l;
^
/root/JavaX-Caches/tmp_1307672968/main.java:215: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1307672968/main.java:225: error: class, interface, or enum expected
public Bool get(int x, int y) {
^
100 errors
only showing the first 100 errors, of 133 total; use -Xmaxerrs if you would like to see more