rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k | meta stringlengths 141 403 |
|---|---|---|---|
protected synchronized void freeDataBlock(long i) throws IOException, FileSystemException { final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); if(i != blockCount-1) throw new IOException("Only the last block of the inode can be freed." + "You were trying to free block nr. "... | protected synchronized void freeDataBlock(long i) throws IOException, FileSystemException { final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); | protected synchronized void freeDataBlock(long i) throws IOException, FileSystemException { final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); if(i != blockCount-1) throw new IOException("Only the last block of the inode can be freed." + "You were trying to free bl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
long block512 = fs.getBlockSize()/512; setBlocks( getBlocks()-block512 ); | if (i != blockCount - 1) throw new IOException( "Only the last block of the inode can be freed." + "You were trying to free block nr. " + i + ", while inode contains " + +blockCount + " blocks."); | protected synchronized void freeDataBlock(long i) throws IOException, FileSystemException { final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); if(i != blockCount-1) throw new IOException("Only the last block of the inode can be freed." + "You were trying to free bl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
setDirty(true); if(i<12) { indirectFree(Ext2Utils.get32(data,40+(int)i*4), 0, 0); Ext2Utils.set32(data, 40+(int)i*4, 0); return; } | desc.setLastAllocatedBlockIndex(i - 1); | protected synchronized void freeDataBlock(long i) throws IOException, FileSystemException { final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); if(i != blockCount-1) throw new IOException("Only the last block of the inode can be freed." + "You were trying to free bl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
i-=12; if(i<indirectCount) { indirectFree( Ext2Utils.get32(data, 40+12*4), i, 1 ); if(i==0) Ext2Utils.set32(data, 40+12*4, 0); return; } i-=indirectCount; if(i<indirectCount * indirectCount) { indirectFree( Ext2Utils.get32(data, 40+13*4), i, 2 ); if(i==0) Ext2Utils.set32(data, 40+13*4, 0); return; } i-=indir... | freePreallocatedBlocks(); long block512 = fs.getBlockSize() / 512; setBlocks(getBlocks() - block512); setDirty(true); if (i < 12) { indirectFree(Ext2Utils.get32(data, 40 + (int) i * 4), 0, 0); Ext2Utils.set32(data, 40 + (int) i * 4, 0); return; } i -= 12; if (i < indirectCount) { indirectFree(Ext2Utils.get32(... | protected synchronized void freeDataBlock(long i) throws IOException, FileSystemException { final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); if(i != blockCount-1) throw new IOException("Only the last block of the inode can be freed." + "You were trying to free bl... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
private void freePreallocatedBlocks() throws FileSystemException, IOException{ int preallocCount = desc.getPreallocCount(); if(preallocCount>0) log.debug("Freeing preallocated blocks"); else { log.debug("No preallocated blocks in the inode"); return; } long prealloc512 = preallocCount * (fs.getBlockSize()/512); setBlo... | private void freePreallocatedBlocks() throws FileSystemException, IOException { int preallocCount = desc.getPreallocCount(); if (preallocCount > 0) log.debug("Freeing preallocated blocks"); else { log.debug("No preallocated blocks in the inode"); return; } long prealloc512 = preallocCount * (fs.getBlockSize() / 512); ... | private void freePreallocatedBlocks() throws FileSystemException, IOException{ int preallocCount = desc.getPreallocCount(); if(preallocCount>0) log.debug("Freeing preallocated blocks"); else { log.debug("No preallocated blocks in the inode"); return; } long prealloc512 = preallocCount * (fs.getBlockSize(... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
if(desc.getLastAllocatedBlockIndex()!=-1) return desc.getLastAllocatedBlockIndex()+1; else return getSizeInBlocks(); } | if (desc.getLastAllocatedBlockIndex() != -1) return desc.getLastAllocatedBlockIndex() + 1; else return getSizeInBlocks(); } | protected long getAllocatedBlockCount() { if(desc.getLastAllocatedBlockIndex()!=-1) return desc.getLastAllocatedBlockIndex()+1; else return getSizeInBlocks(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 8); } | return Ext2Utils.get32(data, 8); } | public synchronized long getAtime() { return Ext2Utils.get32(data, 8); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 28); } | return Ext2Utils.get32(data, 28); } | public synchronized long getBlocks() { return Ext2Utils.get32(data, 28); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 12); } | return Ext2Utils.get32(data, 12); } | public synchronized long getCtime() { return Ext2Utils.get32(data, 12); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return fs.getBlock( getDataBlockNr(i) ); } | return fs.getBlock(getDataBlockNr(i)); } | public byte[] getDataBlock(long i) throws IOException { return fs.getBlock( getDataBlockNr(i) ); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); if(i > blockCount-1) throw new IOException( "Trying to read block "+i+" (counts from 0), while"+ " INode contains only "+blockCount+" blocks"); if(i<12) { log.debug("getDataBlockNr(): block nr: "+Ext2Utils.get32(data,40+(i... | final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); if (i > blockCount - 1) throw new IOException("Trying to read block " + i + " (counts from 0), while" + " INode contains only " + blockCount + " blocks"); | private long getDataBlockNr(long i) throws IOException { final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); if(i > blockCount-1) throw new IOException( "Trying to read block "+i+" (counts from 0), while"+ " INode contains only "+blockCount+" blocks"); //get... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
i-=12; if(i<indirectCount) return indirectRead( Ext2Utils.get32(data, 40+12*4), i, 1 ); i-=indirectCount; if(i<indirectCount * indirectCount) return indirectRead( Ext2Utils.get32(data, 40+13*4), i, 2 ); i-=indirectCount*indirectCount; if(i<indirectCount*indirectCount*indirectCount) return indirectRead( Ext2Util... | if (i < 12) { log.debug("getDataBlockNr(): block nr: " + Ext2Utils.get32(data, 40 + (int) i * 4)); return Ext2Utils.get32(data, 40 + (int) i * 4); } i -= 12; if (i < indirectCount) return indirectRead(Ext2Utils.get32(data, 40 + 12 * 4), i, 1); i -= indirectCount; if (i < indirectCount * indirectCount) return ind... | private long getDataBlockNr(long i) throws IOException { final long blockCount = getAllocatedBlockCount(); final int indirectCount = getIndirectCount(); if(i > blockCount-1) throw new IOException( "Trying to read block "+i+" (counts from 0), while"+ " INode contains only "+blockCount+" blocks"); //get... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 108); } | return Ext2Utils.get32(data, 108); } | public synchronized long getDirACL() { return Ext2Utils.get32(data, 108); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 20); } | return Ext2Utils.get32(data, 20); } | public synchronized long getDtime() { return Ext2Utils.get32(data, 20); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return fs; } | return fs; } | public Ext2FileSystem getExt2FileSystem() { return fs; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 112); } | return Ext2Utils.get32(data, 112); } | public synchronized long getFAddr() { return Ext2Utils.get32(data, 112); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 104); } | return Ext2Utils.get32(data, 104); } | public synchronized long getFileACL() { return Ext2Utils.get32(data, 104); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 32); } | return Ext2Utils.get32(data, 32); } | public synchronized long getFlags() { return Ext2Utils.get32(data, 32); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 100); } | return Ext2Utils.get32(data, 100); } | public synchronized long getGeneration() { return Ext2Utils.get32(data, 100); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get16(data, 24); } | return Ext2Utils.get16(data, 24); } | public synchronized int getGid() { return Ext2Utils.get16(data, 24); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return desc.getGroup(); } | return desc.getGroup(); } | protected long getGroup() { return desc.getGroup(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return desc.getINodeNr(); } | return desc.getINodeNr(); } | protected int getINodeNr() { return desc.getINodeNr(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return fs.getSuperblock().getBlockSize() >> 2; } | return fs.getSuperblock().getBlockSize() >> 2; } | private final int getIndirectCount() { return fs.getSuperblock().getBlockSize() >> 2; //a block index is 4 bytes long } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get16(data, 26); } | return Ext2Utils.get16(data, 26); } | public synchronized int getLinksCount() { return Ext2Utils.get16(data, 26); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
int iMode=Ext2Utils.get16(data, 0); return iMode; } | int iMode = Ext2Utils.get16(data, 0); return iMode; } | public synchronized int getMode() { int iMode=Ext2Utils.get16(data, 0); //log.debug("INode.getIMode(): "+Ext2Print.hexFormat(iMode)); return iMode; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 16); } | return Ext2Utils.get32(data, 16); } | public synchronized long getMtime() { return Ext2Utils.get32(data, 16); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 36); } | return Ext2Utils.get32(data, 36); } | public synchronized long getOSD1() { return Ext2Utils.get32(data, 36); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get32(data, 4); } | return Ext2Utils.get32(data, 4); } | public synchronized long getSize() { return Ext2Utils.get32(data, 4); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return (long)Math.ceil((double)getSize()/(double)getExt2FileSystem().getBlockSize()); } | return (long) Math.ceil((double) getSize() / (double) getExt2FileSystem().getBlockSize()); } | public long getSizeInBlocks() { return (long)Math.ceil((double)getSize()/(double)getExt2FileSystem().getBlockSize()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return Ext2Utils.get16(data, 2); } | return Ext2Utils.get16(data, 2); } | public synchronized int getUid() { return Ext2Utils.get16(data, 2); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
++locked; } | ++locked; } | public synchronized void incLocked() { ++locked; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
private final void indirectFree(long dataBlockNr, long offset, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectFree(datablockNr="+dataBlockNr+", offset="+offset+", ind="+indirectionLevel+")"); if(indirectionLevel==0) { fs.freeBlock( dataBlockNr ); return; } | private final void indirectFree(long dataBlockNr, long offset, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectFree(datablockNr=" + dataBlockNr + ", offset=" + offset + ", ind=" + indirectionLevel + ")"); if (indirectionLevel == 0) { fs.freeBlock(dataBlockNr); return; } | private final void indirectFree(long dataBlockNr, long offset, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectFree(datablockNr="+dataBlockNr+", offset="+offset+", ind="+indirectionLevel+")"); if(indirectionLevel==0) { fs.freeBlock( dataBlockNr ); return; } byte[] dat... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
byte[] data = fs.getBlock( dataBlockNr ); long blockIndex = offset / (long)Math.pow(getIndirectCount(), indirectionLevel-1); long blockOffset= offset % (long)Math.pow(getIndirectCount(), indirectionLevel-1); long blockNr = Ext2Utils.get32(data, (int)blockIndex*4); | byte[] data = fs.getBlock(dataBlockNr); | private final void indirectFree(long dataBlockNr, long offset, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectFree(datablockNr="+dataBlockNr+", offset="+offset+", ind="+indirectionLevel+")"); if(indirectionLevel==0) { fs.freeBlock( dataBlockNr ); return; } byte[] dat... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
indirectFree( blockNr, blockOffset, indirectionLevel-1); if(offset==0) { fs.freeBlock( dataBlockNr ); long block512 = fs.getBlockSize()/512; setBlocks( getBlocks()-block512 ); } } | long blockIndex = offset / (long) Math.pow(getIndirectCount(), indirectionLevel - 1); long blockOffset = offset % (long) Math.pow(getIndirectCount(), indirectionLevel - 1); long blockNr = Ext2Utils.get32(data, (int) blockIndex * 4); indirectFree(blockNr, blockOffset, indirectionLevel - 1); if (offset == 0) { fs.fr... | private final void indirectFree(long dataBlockNr, long offset, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectFree(datablockNr="+dataBlockNr+", offset="+offset+", ind="+indirectionLevel+")"); if(indirectionLevel==0) { fs.freeBlock( dataBlockNr ); return; } byte[] dat... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
private final long indirectRead(long dataBlockNr, long offset, int indirectionLevel) throws IOException{ byte[] data = fs.getBlock( dataBlockNr ); if(indirectionLevel==1) return Ext2Utils.get32(data, (int)offset*4); | private final long indirectRead(long dataBlockNr, long offset, int indirectionLevel) throws IOException { byte[] data = fs.getBlock(dataBlockNr); if (indirectionLevel == 1) return Ext2Utils.get32(data, (int) offset * 4); | private final long indirectRead(long dataBlockNr, long offset, int indirectionLevel) throws IOException{ byte[] data = fs.getBlock( dataBlockNr ); if(indirectionLevel==1) //data is a (simple) indirect block return Ext2Utils.get32(data, (int)offset*4); long blockIndex = offset / (long)Math.pow(getIndire... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
long blockIndex = offset / (long)Math.pow(getIndirectCount(), indirectionLevel-1); long blockOffset= offset % (long)Math.pow(getIndirectCount(), indirectionLevel-1); long blockNr = Ext2Utils.get32(data, (int)blockIndex*4); | long blockIndex = offset / (long) Math.pow(getIndirectCount(), indirectionLevel - 1); long blockOffset = offset % (long) Math.pow(getIndirectCount(), indirectionLevel - 1); long blockNr = Ext2Utils.get32(data, (int) blockIndex * 4); | private final long indirectRead(long dataBlockNr, long offset, int indirectionLevel) throws IOException{ byte[] data = fs.getBlock( dataBlockNr ); if(indirectionLevel==1) //data is a (simple) indirect block return Ext2Utils.get32(data, (int)offset*4); long blockIndex = offset / (long)Math.pow(getIndire... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return indirectRead( blockNr, blockOffset, indirectionLevel-1); } | return indirectRead(blockNr, blockOffset, indirectionLevel - 1); } | private final long indirectRead(long dataBlockNr, long offset, int indirectionLevel) throws IOException{ byte[] data = fs.getBlock( dataBlockNr ); if(indirectionLevel==1) //data is a (simple) indirect block return Ext2Utils.get32(data, (int)offset*4); long blockIndex = offset / (long)Math.pow(getIndire... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
private final void indirectWrite(long dataBlockNr, long offset, long allocatedBlocks, long value, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectWrite(blockNr="+dataBlockNr+", offset="+offset+"...)"); byte[] data = fs.getBlock( dataBlockNr ); if(indirectionLevel==1) { Ext2Utils.set3... | private final void indirectWrite(long dataBlockNr, long offset, long allocatedBlocks, long value, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectWrite(blockNr=" + dataBlockNr + ", offset=" + offset + "...)"); byte[] data = fs.getBlock(dataBlockNr); if (indirectionLevel == 1) { Ext2U... | private final void indirectWrite(long dataBlockNr, long offset, long allocatedBlocks, long value, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectWrite(blockNr="+dataBlockNr+", offset="+offset+"...)"); byte[] data = fs.getBlock( dataBlockNr ); if(indirectionLevel==1) { //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
long blockNr; long blockIndex = offset / (long)Math.pow(getIndirectCount(), indirectionLevel-1); long blockOffset= offset % (long)Math.pow(getIndirectCount(), indirectionLevel-1); if(blockOffset==0) { blockNr = findFreeBlock(allocatedBlocks++); Ext2Utils.set32(data, (int)blockIndex*4, blockNr); fs.writeBlock( dataBloc... | long blockNr; long blockIndex = offset / (long) Math.pow(getIndirectCount(), indirectionLevel - 1); long blockOffset = offset % (long) Math.pow(getIndirectCount(), indirectionLevel - 1); if (blockOffset == 0) { blockNr = findFreeBlock(allocatedBlocks++); Ext2Utils.set32(data, (int) blockIndex * 4, blockNr); fs.writeBl... | private final void indirectWrite(long dataBlockNr, long offset, long allocatedBlocks, long value, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectWrite(blockNr="+dataBlockNr+", offset="+offset+"...)"); byte[] data = fs.getBlock( dataBlockNr ); if(indirectionLevel==1) { //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
byte[] zeroes=new byte[fs.getBlockSize()]; Arrays.fill(zeroes, 0, fs.getBlockSize(), (byte)0); fs.writeBlock(blockNr, zeroes, false); } else blockNr = Ext2Utils.get32(data, (int)blockIndex*4); | byte[] zeroes = new byte[fs.getBlockSize()]; Arrays.fill(zeroes, 0, fs.getBlockSize(), (byte) 0); fs.writeBlock(blockNr, zeroes, false); } else blockNr = Ext2Utils.get32(data, (int) blockIndex * 4); | private final void indirectWrite(long dataBlockNr, long offset, long allocatedBlocks, long value, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectWrite(blockNr="+dataBlockNr+", offset="+offset+"...)"); byte[] data = fs.getBlock( dataBlockNr ); if(indirectionLevel==1) { //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
indirectWrite( blockNr, blockOffset, allocatedBlocks, value, indirectionLevel-1); } | indirectWrite(blockNr, blockOffset, allocatedBlocks, value, indirectionLevel - 1); } | private final void indirectWrite(long dataBlockNr, long offset, long allocatedBlocks, long value, int indirectionLevel) throws IOException, FileSystemException { log.debug("indirectWrite(blockNr="+dataBlockNr+", offset="+offset+"...)"); byte[] data = fs.getBlock( dataBlockNr ); if(indirectionLevel==1) { //... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return dirty; } | return dirty; } | public boolean isDirty() { return dirty; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
return locked>0; } | return locked > 0; } | public synchronized boolean isLocked() { return locked>0; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
public void read(byte[] data){ System.arraycopy(data, 0, this.data, 0, INODE_LENGTH); setDirty(false); } | public void read(byte[] data) { System.arraycopy(data, 0, this.data, 0, INODE_LENGTH); setDirty(false); } | public void read(byte[] data){ System.arraycopy(data, 0, this.data, 0, INODE_LENGTH); setDirty(false); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from 0), when... | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException { final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if (i != blockCount) throw new FileSystemException("Trying to register block " + i + " (counts from 0),... | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
indirectWrite( indirectBlockNr, i, allocatedBlocks, blockNr, 1 ); return; } | log.debug("registering block #" + blockNr); | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
i-=indirectCount; final int doubleIndirectCount = indirectCount * indirectCount; if(i<doubleIndirectCount) { long doubleIndirectBlockNr; if(i==0) { doubleIndirectBlockNr = findFreeBlock(allocatedBlocks++); Ext2Utils.set32(data, 40+13*4, doubleIndirectBlockNr); | setDirty(true); | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
if (i < 12) { Ext2Utils.set32(data, 40 + (int) i * 4, blockNr); return; } | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java | |
byte[] zeroes=new byte[fs.getBlockSize()]; Arrays.fill(zeroes, 0, fs.getBlockSize(), (byte)0); fs.writeBlock(doubleIndirectBlockNr, zeroes, false); } else doubleIndirectBlockNr = Ext2Utils.get32(data, 40+13*4); | i -= 12; if (i < indirectCount) { long indirectBlockNr; if (i == 0) { indirectBlockNr = findFreeBlock(allocatedBlocks++); Ext2Utils.set32(data, 40 + 12 * 4, indirectBlockNr); | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
indirectWrite( doubleIndirectBlockNr, i, allocatedBlocks, blockNr, 2 ); return; } final int tripleIndirectCount = indirectCount * indirectCount * indirectCount; i-=doubleIndirectCount; if(i<tripleIndirectCount) { long tripleIndirectBlockNr; if(i==0) { tripleIndirectBlockNr = findFreeBlock(allocatedBlocks++); Ext2U... | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java | |
byte[] zeroes = new byte[fs.getBlockSize()]; Arrays.fill(zeroes, 0, fs.getBlockSize(), (byte) 0); fs.writeBlock(indirectBlockNr, zeroes, false); } else indirectBlockNr = Ext2Utils.get32(data, 40 + 12 * 4); | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java | |
byte[] zeroes=new byte[fs.getBlockSize()]; Arrays.fill(zeroes, 0, fs.getBlockSize(), (byte)0); fs.writeBlock(tripleIndirectBlockNr, zeroes, false); } else tripleIndirectBlockNr = Ext2Utils.get32(data, 40+14*4); indirectWrite( tripleIndirectBlockNr, i, allocatedBlocks, blockNr, 3 ); return; } | indirectWrite(indirectBlockNr, i, allocatedBlocks, blockNr, 1); | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
throw new FileSystemException("Internal FS exception: getDataBlockIndex(i="+i+")"); } | return; } i -= indirectCount; final int doubleIndirectCount = indirectCount * indirectCount; if (i < doubleIndirectCount) { long doubleIndirectBlockNr; if (i == 0) { doubleIndirectBlockNr = findFreeBlock(allocatedBlocks++); Ext2Utils.set32(data, 40 + 13 * 4, doubleIndirectBlockNr); byte[] zeroes = new byte[fs.... | private final void registerBlockIndex(long i, long blockNr) throws FileSystemException, IOException{ final long blockCount = getSizeInBlocks(); final int indirectCount = getIndirectCount(); long allocatedBlocks = i; if(i != blockCount) throw new FileSystemException( "Trying to register block "+i+" (counts from ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 8, atime); setDirty(true); } | Ext2Utils.set32(data, 8, atime); setDirty(true); } | public synchronized void setAtime(long atime) { Ext2Utils.set32(data, 8, atime); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
log.debug("setBlocks("+count+")"); Ext2Utils.set32(data, 28, count); setDirty(true); } | log.debug("setBlocks(" + count + ")"); Ext2Utils.set32(data, 28, count); setDirty(true); } | public synchronized void setBlocks(long count) { log.debug("setBlocks("+count+")"); Ext2Utils.set32(data, 28, count); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 12, ctime); setDirty(true); } | Ext2Utils.set32(data, 12, ctime); setDirty(true); } | public synchronized void setCtime(long ctime) { Ext2Utils.set32(data, 12, ctime); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 108, acl); setDirty(true); } | Ext2Utils.set32(data, 108, acl); setDirty(true); } | public synchronized void setDirACL(long acl) { Ext2Utils.set32(data, 108, acl); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
dirty = b; } | dirty = b; } | public void setDirty(boolean b) { dirty = b; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 20, dtime); setDirty(true); } | Ext2Utils.set32(data, 20, dtime); setDirty(true); } | public synchronized void setDtime(long dtime) { Ext2Utils.set32(data, 20, dtime); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 112, faddr); setDirty(true); } | Ext2Utils.set32(data, 112, faddr); setDirty(true); } | public synchronized void setFAddr(long faddr) { Ext2Utils.set32(data, 112, faddr); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 104, acl); setDirty(true); } | Ext2Utils.set32(data, 104, acl); setDirty(true); } | public synchronized void setFileACL(long acl) { Ext2Utils.set32(data, 104, acl); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 32, flags); setDirty(true); } | Ext2Utils.set32(data, 32, flags); setDirty(true); } | public synchronized void setFlags(long flags) { Ext2Utils.set32(data, 32, flags); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 100, gen); setDirty(true); } | Ext2Utils.set32(data, 100, gen); setDirty(true); } | public synchronized void setGeneration(long gen) { Ext2Utils.set32(data, 100, gen); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set16(data, 24, gid); setDirty(true); } | Ext2Utils.set16(data, 24, gid); setDirty(true); } | public synchronized void setGid(int gid) { Ext2Utils.set16(data, 24, gid); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set16(data, 26, lc); setDirty(true); } | Ext2Utils.set16(data, 26, lc); setDirty(true); } | public synchronized void setLinksCount(int lc) { Ext2Utils.set16(data, 26, lc); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set16(data, 0, imode); setDirty(true); } | Ext2Utils.set16(data, 0, imode); setDirty(true); } | public synchronized void setMode(int imode) { Ext2Utils.set16(data, 0, imode); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 16, mtime); setDirty(true); } | Ext2Utils.set32(data, 16, mtime); setDirty(true); } | public synchronized void setMtime(long mtime) { Ext2Utils.set32(data, 16, mtime); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 36, osd1); setDirty(true); } | Ext2Utils.set32(data, 36, osd1); setDirty(true); } | public synchronized void setOSD1(long osd1) { Ext2Utils.set32(data, 36, osd1); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set32(data, 4, size); setDirty(true); } | Ext2Utils.set32(data, 4, size); setDirty(true); } | public synchronized void setSize(long size) { Ext2Utils.set32(data, 4, size); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
Ext2Utils.set16(data, 2, uid); setDirty(true); } | Ext2Utils.set16(data, 2, uid); setDirty(true); } | public synchronized void setUid(int uid) { Ext2Utils.set16(data, 2, uid); setDirty(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
protected synchronized void update() throws IOException{ try{ if(dirty) { log.debug(" ** updating inode **"); desc.getINodeTable().writeInodeData( desc.getIndex(), data ); dirty=false; } }catch(FileSystemException fs) { throw new IOException(fs); } } | protected synchronized void update() throws IOException { try { if (dirty) { log.debug(" ** updating inode **"); desc.getINodeTable().writeInodeData(desc.getIndex(), data); dirty = false; } } catch (FileSystemException ex) { final IOException ioe = new IOException(); ioe.initCause(ex); throw ioe; } } | protected synchronized void update() throws IOException{ try{ if(dirty) { log.debug(" ** updating inode **"); desc.getINodeTable().writeInodeData( desc.getIndex(), data ); dirty=false; } }catch(FileSystemException fs) { throw new IOException(fs); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
public void writeDataBlock(long i, byte[] data) throws IOException{ long blockCount = getAllocatedBlockCount(); if(i < blockCount) { long blockIndex = getDataBlockNr(i); fs.writeBlock(blockIndex, data, false); } else throw new UnallocatedBlockException("Block "+i+" not yet reserved "+ "for the inode"); } | public void writeDataBlock(long i, byte[] data) throws IOException { long blockCount = getAllocatedBlockCount(); if (i < blockCount) { long blockIndex = getDataBlockNr(i); fs.writeBlock(blockIndex, data, false); } else throw new UnallocatedBlockException("Block " + i + " not yet reserved " + "for the inode"); } | public void writeDataBlock(long i, byte[] data) throws IOException{ //see if the block is already reserved for the inode long blockCount = getAllocatedBlockCount(); if(i < blockCount) { long blockIndex = getDataBlockNr(i); //overwrite the block fs.writeBlock(blockIndex, data, false); } else throw new Una... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/INode.java/clean/fs/src/fs/org/jnode/fs/ext2/INode.java |
htmlAttributeSet attributes = gnu.getAttributes(); | SimpleAttributeSet attributes = gnu.getAttributes(); | protected final void handleStartTag(TagElement tag) { htmlAttributeSet attributes = gnu.getAttributes(); if (tag.fictional()) attributes.addAttribute(ParserCallback.IMPLIED, Boolean.TRUE); callBack.handleStartTag(tag.getHTMLTag(), attributes, hTag.where.startPos... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/61e6771ccdb144a4f9e26f7fc81e7d1c4dee81ad/ParserDelegator.java/clean/core/src/classpath/javax/javax/swing/text/html/parser/ParserDelegator.java |
((Block)eldest.getValue()).flush(); | try{ ((Block)eldest.getValue()).flush(); CacheEvent event = new CacheEvent(eldest.getValue(),CacheEvent.REMOVED); Iterator listeners=cacheListeners.iterator(); while(listeners.hasNext()) { ((CacheListener)listeners.next()).elementRemoved(event); } }catch(IOException e) { log.error("Exception when flushing a block from... | protected boolean removeEldestEntry(Map.Entry eldest) { if(size()>MAX_SIZE) { ((Block)eldest.getValue()).flush(); return true; } else return false; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5d32e4c533c3f554b2099795fe6d30766c16e4da/BlockCache.java/clean/fs/src/fs/org/jnode/fs/ext2/cache/BlockCache.java |
public Object next() { | public IndexEntry next() { | public Object next() { //log.debug("next: offset=" + offset); if (nextEntry == null) { //log.debug("next: islast"); throw new NoSuchElementException(); } else { final IndexEntry result = nextEntry; final int size = nextEntry.getSize(); //lo... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/982e1b1b1ed579528f868755d8a932bed0e03228/IndexEntryIterator.java/buggy/fs/src/fs/org/jnode/fs/ntfs/IndexEntryIterator.java |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return RequestingUserName.class; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/49e488b8530051383b90b1357fa767c87c9ff7f5/RequestingUserName.java/buggy/core/src/classpath/javax/javax/print/attribute/standard/RequestingUserName.java |
public final String getName() | public String getName() | public final String getName() { return "requesting-user-name"; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/49e488b8530051383b90b1357fa767c87c9ff7f5/RequestingUserName.java/buggy/core/src/classpath/javax/javax/print/attribute/standard/RequestingUserName.java |
if (peer != null) peer.setVisible(false); | ComponentPeer currentPeer=peer; if (currentPeer != null) currentPeer.setVisible(false); | public void hide() { if (isVisible()) { if (peer != null) peer.setVisible(false); this.visible = false; invalidate(); ComponentEvent ce = new ComponentEvent(this,ComponentEvent.COMPONENT_HIDDEN); getToolkit().getSystemEventQueue().postEvent(ce); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0819f69fb87c25602911abcc49016c8e9b9db5d/Component.java/clean/core/src/classpath/java/java/awt/Component.java |
invalidate(); | Container currentParent = parent; if (currentParent != null) { currentParent.invalidate(); currentParent.repaint(); } | public void hide() { if (isVisible()) { if (peer != null) peer.setVisible(false); this.visible = false; invalidate(); ComponentEvent ce = new ComponentEvent(this,ComponentEvent.COMPONENT_HIDDEN); getToolkit().getSystemEventQueue().postEvent(ce); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0819f69fb87c25602911abcc49016c8e9b9db5d/Component.java/clean/core/src/classpath/java/java/awt/Component.java |
if (peer != null) peer.setVisible(true); invalidate(); | ComponentPeer currentPeer=peer; if (currentPeer != null) currentPeer.setVisible(true); Container currentParent = parent; if (currentParent != null) { currentParent.invalidate(); currentParent.repaint(); } | public void show() { // We must set visible before showing the peer. Otherwise the // peer could post paint events before visible is true, in which // case lightweight components are not initially painted -- // Container.paint first calls isShowing () before painting itself // and its children. if... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0819f69fb87c25602911abcc49016c8e9b9db5d/Component.java/clean/core/src/classpath/java/java/awt/Component.java |
if (longestLine == null) findLongestLine(0, element.getElementCount() - 1); | protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { // This happens during initialization. if (metrics == null) { updateMetrics(); preferenceChanged(null, true, true); return; } Element element = getElement(); ElementChange change = changes.getC... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53983e95556bf4b775130b06570aa2ea08d85628/PlainView.java/clean/core/src/classpath/javax/javax/swing/text/PlainView.java | |
throws NotImplementedException | protected void fireDragGestureRecognized(int dragAction, Point p) throws NotImplementedException { throw new Error("not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53983e95556bf4b775130b06570aa2ea08d85628/DragGestureRecognizer.java/buggy/core/src/classpath/java/java/awt/dnd/DragGestureRecognizer.java | |
throw new Error("not implemented"); | if(dragGestureListener != null) dragGestureListener.dragGestureRecognized (new DragGestureEvent(this, dragAction, p, events)); | protected void fireDragGestureRecognized(int dragAction, Point p) throws NotImplementedException { throw new Error("not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53983e95556bf4b775130b06570aa2ea08d85628/DragGestureRecognizer.java/buggy/core/src/classpath/java/java/awt/dnd/DragGestureRecognizer.java |
throw new Error("not implemented"); | events = new ArrayList(); | public void resetRecognizer() throws NotImplementedException { throw new Error("not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53983e95556bf4b775130b06570aa2ea08d85628/DragGestureRecognizer.java/buggy/core/src/classpath/java/java/awt/dnd/DragGestureRecognizer.java |
ftf = new JFormattedTextField(); add(ftf); ftf.setValue(spinner.getValue()); | public DefaultEditor(JSpinner spinner) { this.spinner = spinner; spinner.addChangeListener(this); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1edc4cba009ff2c639001f1fd1842c4da4b86249/JSpinner.java/clean/core/src/classpath/javax/javax/swing/JSpinner.java | |
return null; } /* TODO */ | return ftf; } | public JFormattedTextField getTextField() { return null; } /* TODO */ | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1edc4cba009ff2c639001f1fd1842c4da4b86249/JSpinner.java/clean/core/src/classpath/javax/javax/swing/JSpinner.java |
} /* TODO */ | Insets insets = getInsets(); Dimension size = getSize(); ftf.setBounds(insets.left, insets.top, size.width - insets.left - insets.right, size.height - insets.top - insets.bottom); } | public void layoutContainer(Container parent) { } /* TODO */ | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1edc4cba009ff2c639001f1fd1842c4da4b86249/JSpinner.java/clean/core/src/classpath/javax/javax/swing/JSpinner.java |
return null; } /* TODO */ | Insets insets = getInsets(); Dimension minSize = ftf.getMinimumSize(); return new Dimension(minSize.width + insets.left + insets.right, minSize.height + insets.top + insets.bottom); } | public Dimension minimumLayoutSize(Container parent) { return null; } /* TODO */ | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1edc4cba009ff2c639001f1fd1842c4da4b86249/JSpinner.java/clean/core/src/classpath/javax/javax/swing/JSpinner.java |
return null; } /* TODO */ | Insets insets = getInsets(); Dimension prefSize = ftf.getPreferredSize(); return new Dimension(prefSize.width + insets.left + insets.right, prefSize.height + insets.top + insets.bottom); } | public Dimension preferredLayoutSize(Container parent) { return null; } /* TODO */ | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1edc4cba009ff2c639001f1fd1842c4da4b86249/JSpinner.java/clean/core/src/classpath/javax/javax/swing/JSpinner.java |
return new StubEditor(this); } /* TODO */} | if (model instanceof SpinnerDateModel) return new DateEditor(this); else if (model instanceof SpinnerNumberModel) return new NumberEditor(this); else return new DefaultEditor(this); } | protected JComponent createEditor(SpinnerModel model) { return new StubEditor(this); } /* TODO */} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1edc4cba009ff2c639001f1fd1842c4da4b86249/JSpinner.java/clean/core/src/classpath/javax/javax/swing/JSpinner.java |
} | } | public void run() { drainEvents(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
if (! repeats) | if ( ! repeats) | public void run() { running = true; try { sleep(initialDelay); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
running = false; | public void run() { running = true; try { sleep(initialDelay); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java | |
initialDelay = d; | public Timer(int d, ActionListener listener) { delay = d; if (listener != null) addActionListener(listener); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java | |
while (queue > 0) { | while (queue > 0) { | private void drainEvents() { synchronized (queueLock) { if (isCoalesce()) { if (queue > 0) fireActionPerformed(); } else { while (queue > 0) { fireActionPerformed(); queue--; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
} | } | private void drainEvents() { synchronized (queueLock) { if (isCoalesce()) { if (queue > 0) fireActionPerformed(); } else { while (queue > 0) { fireActionPerformed(); queue--; ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
protected void fireActionPerformed(ActionEvent event) { ActionListener[] listeners = getActionListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].actionPerformed(event); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java | ||
listeners[i].actionPerformed(event); | listeners [ i ].actionPerformed(event); | protected void fireActionPerformed(ActionEvent event) { ActionListener[] listeners = getActionListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].actionPerformed(event); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
SwingUtilities.invokeLater(drainer); | SwingUtilities.invokeLater(drainer); | private void queueEvent() { synchronized (queueLock) { queue++; if (queue == 1) SwingUtilities.invokeLater(drainer); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
return; | return; | public void start() { if (isRunning()) return; waker = new Waker(); waker.start(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/Timer.java/buggy/core/src/classpath/javax/javax/swing/Timer.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.