for (int i = 0; i < sectorsNeeded; ++i) {
this.sectorFree.set(sectorNumber + i, false);
</BUG>
}
<BUG>this.write(sectorNumber, data, length);
} else {</BUG>
this.file.seek(this.file.length());
<BUG>sectorNumber = this.sectorFree.size();

for (int i = 0; i < sectorsNeeded; ++i) {</BUG>
this.file.write(EMPTY_SECTOR);

for (int i = 0; i < sectorsNeeded; ++i) {
this.freeSectors.set(sectorNumber + i, false);
}
write(sectorNumber, data, length);
} else {
this.file.seek(this.file.length());
sectorNumber = this.freeSectors.size();
int size = this.freeSectors.size();
for (int i = 0; i < sectorsNeeded; ++i) {
