bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public Note addNote (Note note ) { if (note == null) { Log.warn("in Notes.addNote(), the Note passed in is null"); return null; } getNoteList().add(note); return note; }
|
public Note addNote (Note note ) { if (note == null) { Log.warn("in Notes.addNote(), the Note passed in is null"); return null; } getNoteList().add(note); return note; }
| 2,577
|
public Unit addUnit(Unit unit) { if (unit == null) { Log.warn("in Units.addUnit(), the Unit passed in is null"); return null; } getUnitList().add(unit); return unit; }
|
public Unit addUnit(Unit unit) { if (unit == null) { Log.warn("in Units.addUnit(), the Unit passed in is null"); return null; } getUnitList().add(unit); return unit; }
| 2,578
|
public int decrementDimension() { if (dimension == 0) { Log.error(" in DataCube, incrementDimentsion, the dimension is 0"); return 0; } else return dimension--;}
|
public int decrementDimension() { if (dimension == 0) { Log.error(" in DataCube, incrementDimentsion, the dimension is 0"); return 0; } else return dimension--;}
| 2,579
|
public void setLocationOrderList (List axisIdList) { NotesLocationOrder orderObj = (NotesLocationOrder) ((XMLAttribute) attribHash.get("locationOrder")).getAttribValue(); orderObj.setAxisOrderList(axisIdList); }
|
public void setLocationOrderList (List axisIdList) { NotesLocationOrder orderObj = (NotesLocationOrder) ((XMLAttribute) attribHash.get("locationOrder")).getAttribValue(); orderObj.setAxisOrderList(axisIdList); }
| 2,580
|
public void startInstruction(int address) { if (debug) { BootLog.debug("#" + address + "\t" + vstack); } if (log) { os.log("#" + address); } this.curAddress = address; this.curInstrLabel = helper.getInstrLabel(address); if (startOfBB || setCurInstrLabel) { os.setObjectRef(curInstrLabel); startOfBB = false; setCurInstrLabel = false; } final int offset = os.getLength() - startOffset; cm.add(currentMethod, address, offset); }
|
public void startInstruction(int address) { if (debug) { BootLog.debug("#" + address + "\t" + vstack); } if (log) { if (debug) { os.log("#" + address + " VStack: " + vstack.toString()); } else { os.log("#" + address); } } this.curAddress = address; this.curInstrLabel = helper.getInstrLabel(address); if (startOfBB || setCurInstrLabel) { os.setObjectRef(curInstrLabel); startOfBB = false; setCurInstrLabel = false; } final int offset = os.getLength() - startOffset; cm.add(currentMethod, address, offset); }
| 2,581
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
| 2,582
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
| 2,583
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
| 2,584
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
| 2,585
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
| 2,586
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
| 2,587
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
|
public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } }
| 2,588
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
|
final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
| 2,589
|
public final void writeClassInitialize(Label curInstrLabel, Register classReg, VmType cls) { if (!cls.isInitialized()) { // Test declaringClass.modifiers os.writeTEST(classReg, context.getVmTypeState().getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(curInstrLabel + "$$after-classinit-ex"); os.writeJCC(afterInit, X86Constants.JNZ); os.writePUSHA(); // Call cls.initialize os.writePUSH(classReg); invokeJavaMethod(context.getVmTypeInitialize()); os.writePOPA(); // Set label os.setObjectRef(afterInit); } }
|
public final void writeClassInitialize(Label curInstrLabel, Register classReg, VmType cls) { if (!cls.isInitialized()) { // Test declaringClass.modifiers os.writeTEST(classReg, context.getVmTypeState().getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(curInstrLabel + "$$after-classinit-ex"); os.writeJCC(afterInit, X86Constants.JNZ); os.writePUSHA(); // Call cls.initialize os.writePUSH(classReg); invokeJavaMethod(context.getVmTypeInitialize()); os.writePOPA(); // Set label os.setObjectRef(afterInit); } }
| 2,590
|
final static void rem(AbstractX86Stream os, EmitterContext ec, VirtualStack vstack, int type) { final Item v2 = vstack.pop(type); final Item v1 = vstack.pop(type); if (v1.isConstant() && v2.isConstant()) { final double fpv1 = getFPValue(v1); final double fpv2 = getFPValue(v2); vstack.push(createConst(type, fpv1 / fpv2)); } else { // Prepare stack final FPUStack fpuStack = vstack.fpuStack; final Register reg; reg = prepareForOperation(os, ec, vstack, fpuStack, v2, v1, false); // We need reg to be ST1, if not swap fxchST1(os, fpuStack, reg); // Pop the fpuStack.tos fpuStack.pop(); // Calculate os.writeFPREM(); os.writeFSTP(Register.ST1); // Push result vstack.push(fpuStack.tos()); } }
|
final static void rem(AbstractX86Stream os, EmitterContext ec, VirtualStack vstack, int type) { final Item v2 = vstack.pop(type); final Item v1 = vstack.pop(type); if (v1.isConstant() && v2.isConstant()) { final double fpv1 = getFPValue(v1); final double fpv2 = getFPValue(v2); vstack.push(createConst(type, fpv1 / fpv2)); } else { // Prepare stack final FPUStack fpuStack = vstack.fpuStack; final Register reg; reg = prepareForOperation(os, ec, vstack, fpuStack, v2, v1, false); // We need reg to be ST1, if not swap fxchST1(os, fpuStack, reg); // Pop the fpuStack.tos fpuStack.pop(); // Calculate os.writeFPREM(); os.writeFSTP(Register.ST1); // Push result vstack.push(fpuStack.tos()); } }
| 2,592
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
| 2,594
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
| 2,595
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
| 2,596
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
| 2,597
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
| 2,598
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
| 2,599
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); }
| 2,600
|
public Exception getException() { return exception; }
|
public Exception getException() { return exception; }
| 2,601
|
public Exception getException() { return exception; }
|
public Exception getException() { return exception; }
| 2,602
|
private void parseIncoming() { boolean controlChars = false; byte control0; byte control1; boolean done = false; boolean error = false; try { while (bk.hasNext() && !done) { byte b = bk.getNextByte(); switch (b) { case 0: case 1: break; case CMD_SAVE_SCREEN: // 0x02 2 Save Screen case 3: // 0x03 3 Save Partial Screen// System.out.println("save screen partial"); saveScreen(); break; case ESC: // ESCAPE break; case 7: // audible bell Toolkit.getDefaultToolkit().beep(); bk.getNextByte(); bk.getNextByte(); break; case CMD_WRITE_TO_DISPLAY: // 0x11 17 write to display error = writeToDisplay(true); break; case CMD_RESTORE_SCREEN: // 0x12 18 Restore Screen case 13: // 0x13 19 Restore Partial Screen System.out.println("restore screen partial"); restoreScreen(); break; case CMD_CLEAR_UNIT_ALTERNATE: // 0x20 32 clear unit alternate int param = bk.getNextByte(); if (param != 0) {// System.out.println(" clear unit alternate error " + Integer.toHexString(param)); sendNegResponse(NR_REQUEST_ERROR,03,01,05, " clear unit alternate not supported"); done = true; } else { if (screen52.getRows() != 27) screen52.setRowsCols(27,132); screen52.clearAll(); } break; case CMD_WRITE_ERROR_CODE: // 0x21 33 Write Error Code writeErrorCode(); error = writeToDisplay(false); break; case CMD_WRITE_ERROR_CODE_TO_WINDOW: // 0x22 34 // Write Error Code to window writeErrorCodeToWindow(); error = writeToDisplay(false); break; case CMD_READ_SCREEN_IMMEDIATE: // 0x62 98 case CMD_READ_SCREEN_TO_PRINT: // 0x66 102 read screen to print readScreen(); break; case CMD_CLEAR_UNIT: // 64 0x40 clear unit if (screen52.getRows() != 24) screen52.setRowsCols(24,80); screen52.clearAll(); break; case CMD_CLEAR_FORMAT_TABLE: // 80 0x50 Clear format table screen52.clearTable(); break; case CMD_READ_INPUT_FIELDS: //0x42 66 read input fields case CMD_READ_MDT_FIELDS: // 0x52 82 read MDT Fields bk.getNextByte(); bk.getNextByte(); readType = b; screen52.goHome();// screen52.setCursorOn(); waitingForInput = true; pendingUnlock = true;// screen52.setKeyboardLocked(false); break; case CMD_READ_MDT_IMMEDIATE_ALT: // 0x53 83 readType = b;// screen52.goHome();// waitingForInput = true;// screen52.setKeyboardLocked(false); readImmediate(readType); break; case CMD_WRITE_STRUCTURED_FIELD: // 243 0xF3 -13 Write structured field writeStructuredField(); break; default: done = true; sendNegResponse(NR_REQUEST_ERROR,03,01,01,"parseIncoming"); break; } if (error) done = true; } } catch (Exception exc) {System.out.println("incoming " + exc.getMessage());}; }
|
private void parseIncoming() { boolean controlChars = false; byte control0; byte control1; boolean done = false; boolean error = false; try { while (bk.hasNext() && !done) { byte b = bk.getNextByte(); switch (b) { case 0: case 1: break; case CMD_SAVE_SCREEN: // 0x02 2 Save Screen case 3: // 0x03 3 Save Partial Screen// System.out.println("save screen partial"); saveScreen(); break; case ESC: // ESCAPE break; case 7: // audible bell Toolkit.getDefaultToolkit().beep(); bk.getNextByte(); bk.getNextByte(); break; case CMD_WRITE_TO_DISPLAY: // 0x11 17 write to display error = writeToDisplay(true); break; case CMD_RESTORE_SCREEN: // 0x12 18 Restore Screen case 13: // 0x13 19 Restore Partial Screen restoreScreen(); break; case CMD_CLEAR_UNIT_ALTERNATE: // 0x20 32 clear unit alternate int param = bk.getNextByte(); if (param != 0) {// System.out.println(" clear unit alternate error " + Integer.toHexString(param)); sendNegResponse(NR_REQUEST_ERROR,03,01,05, " clear unit alternate not supported"); done = true; } else { if (screen52.getRows() != 27) screen52.setRowsCols(27,132); screen52.clearAll(); } break; case CMD_WRITE_ERROR_CODE: // 0x21 33 Write Error Code writeErrorCode(); error = writeToDisplay(false); break; case CMD_WRITE_ERROR_CODE_TO_WINDOW: // 0x22 34 // Write Error Code to window writeErrorCodeToWindow(); error = writeToDisplay(false); break; case CMD_READ_SCREEN_IMMEDIATE: // 0x62 98 case CMD_READ_SCREEN_TO_PRINT: // 0x66 102 read screen to print readScreen(); break; case CMD_CLEAR_UNIT: // 64 0x40 clear unit if (screen52.getRows() != 24) screen52.setRowsCols(24,80); screen52.clearAll(); break; case CMD_CLEAR_FORMAT_TABLE: // 80 0x50 Clear format table screen52.clearTable(); break; case CMD_READ_INPUT_FIELDS: //0x42 66 read input fields case CMD_READ_MDT_FIELDS: // 0x52 82 read MDT Fields bk.getNextByte(); bk.getNextByte(); readType = b; screen52.goHome();// screen52.setCursorOn(); waitingForInput = true; pendingUnlock = true;// screen52.setKeyboardLocked(false); break; case CMD_READ_MDT_IMMEDIATE_ALT: // 0x53 83 readType = b;// screen52.goHome();// waitingForInput = true;// screen52.setKeyboardLocked(false); readImmediate(readType); break; case CMD_WRITE_STRUCTURED_FIELD: // 243 0xF3 -13 Write structured field writeStructuredField(); break; default: done = true; sendNegResponse(NR_REQUEST_ERROR,03,01,01,"parseIncoming"); break; } if (error) done = true; } } catch (Exception exc) {System.out.println("incoming " + exc.getMessage());}; }
| 2,604
|
public byte uni2ebcdic (char index) { if (convert) { if (codePage.equals("1141")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1141")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } if (codePage.equals("1140")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1140")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } int ind = index; int len = unicode.length; if (index > '\u007F') for (int x = 0x80; x < len; x++) { if (unicode[x] == index) {// System.out.println("conversion found " + (char)index + " " + unicode[x]); ind = x; break; } }// System.out.println("using conversion"); return (byte)ascii[ind & 0xff]; } else return (byte)ascii[index & 0xff]; }
|
public byte uni2ebcdic (char index) { if (convert) { if (codePage.equals("1141")) { byte b = 0x0; try { b = characterToString(index).getBytes("Cp1141")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } if (codePage.equals("1140")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1140")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } int ind = index; int len = unicode.length; if (index > '\u007F') for (int x = 0x80; x < len; x++) { if (unicode[x] == index) {// System.out.println("conversion found " + (char)index + " " + unicode[x]); ind = x; break; } }// System.out.println("using conversion"); return (byte)ascii[ind & 0xff]; } else return (byte)ascii[index & 0xff]; }
| 2,606
|
public byte uni2ebcdic (char index) { if (convert) { if (codePage.equals("1141")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1141")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } if (codePage.equals("1140")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1140")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } int ind = index; int len = unicode.length; if (index > '\u007F') for (int x = 0x80; x < len; x++) { if (unicode[x] == index) {// System.out.println("conversion found " + (char)index + " " + unicode[x]); ind = x; break; } }// System.out.println("using conversion"); return (byte)ascii[ind & 0xff]; } else return (byte)ascii[index & 0xff]; }
|
public byte uni2ebcdic (char index) { if (convert) { if (codePage.equals("1141")) { byte b = 0x0; try { b = Character.toString(index).getBytes("Cp1141")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } if (codePage.equals("1140")) { byte b = 0x0; try { b = characterToString(index).getBytes("Cp1140")[0]; } catch (java.io.UnsupportedEncodingException uee) { uee.printStackTrace(); } return b; } int ind = index; int len = unicode.length; if (index > '\u007F') for (int x = 0x80; x < len; x++) { if (unicode[x] == index) {// System.out.println("conversion found " + (char)index + " " + unicode[x]); ind = x; break; } }// System.out.println("using conversion"); return (byte)ascii[ind & 0xff]; } else return (byte)ascii[index & 0xff]; }
| 2,607
|
protected void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
|
protected void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
| 2,609
|
protected void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
|
protected void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
| 2,610
|
protected void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
|
protected void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
| 2,611
|
public static Properties getInitProperties() { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); final Properties res = new Properties(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("java.vm.specification.version", "1.4"); res.put("java.vm.specification.vendor", "JNode.org"); res.put("java.vm.specification.name", "jnode"); res.put("java.vm.version", vm.getVersion()); res.put("java.vm.vendor", "JNode.org"); res.put("java.vm.name", "JNode"); res.put("java.class.version", "1.1"); res.put("java.class.path", ""); res.put("java.library.path", ""); res.put("java.io.tmpdir", "/tmp"); res.put("java.compiler", "Internal"); res.put("java.ext.dirs", ""); res.put("os.name", "JNode"); res.put("os.arch", arch); res.put("os.version", vm.getVersion()); res.put("file.separator", "/"); res.put("path.separator", ":"); res.put("line.separator", "\n"); res.put("user.name", "System"); res.put("user.home", "/"); res.put("user.dir", "/"); // GNU properties res.put("gnu.java.io.encoding_scheme_alias.US-ASCII", "ISO8859-1"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16LE", "UTF16LE"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16BE", "UTF16BE"); return res; }
|
public static Properties getInitProperties() { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); final Properties res = new Properties(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("java.vm.specification.version", "1.4"); res.put("java.vm.specification.vendor", "JNode.org"); res.put("java.vm.specification.name", "jnode"); res.put("java.vm.version", vm.getVersion()); res.put("java.vm.vendor", "JNode.org"); res.put("java.vm.name", "JNode"); res.put("java.class.version", "1.1"); res.put("java.class.path", ""); res.put("java.library.path", ""); res.put("java.io.tmpdir", "/tmp"); res.put("java.compiler", "Internal"); res.put("java.ext.dirs", ""); res.put("os.name", "JNode"); res.put("os.arch", arch); res.put("os.version", vm.getVersion()); res.put("file.separator", "/"); res.put("path.separator", ":"); res.put("line.separator", "\n"); res.put("user.name", "System"); res.put("user.home", "/"); res.put("user.dir", "/"); // GNU properties res.put("gnu.java.io.encoding_scheme_alias.US-ASCII", "ISO8859-1"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16LE", "UTF16LE"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16BE", "UTF16BE"); return res; }
| 2,612
|
public static Properties getInitProperties() { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); final Properties res = new Properties(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("java.vm.specification.version", "1.4"); res.put("java.vm.specification.vendor", "JNode.org"); res.put("java.vm.specification.name", "jnode"); res.put("java.vm.version", vm.getVersion()); res.put("java.vm.vendor", "JNode.org"); res.put("java.vm.name", "JNode"); res.put("java.class.version", "1.1"); res.put("java.class.path", ""); res.put("java.library.path", ""); res.put("java.io.tmpdir", "/tmp"); res.put("java.compiler", "Internal"); res.put("java.ext.dirs", ""); res.put("os.name", "JNode"); res.put("os.arch", arch); res.put("os.version", vm.getVersion()); res.put("file.separator", "/"); res.put("path.separator", ":"); res.put("line.separator", "\n"); res.put("user.name", "System"); res.put("user.home", "/"); res.put("user.dir", "/"); // GNU properties res.put("gnu.java.io.encoding_scheme_alias.US-ASCII", "ISO8859-1"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16LE", "UTF16LE"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16BE", "UTF16BE"); return res; }
|
public static Properties getInitProperties() { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); final Properties res = new Properties(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("java.vm.specification.version", "1.4"); res.put("java.vm.specification.vendor", "JNode.org"); res.put("java.vm.specification.name", "jnode"); res.put("java.vm.version", vm.getVersion()); res.put("java.vm.vendor", "JNode.org"); res.put("java.vm.name", "JNode"); res.put("java.class.version", "1.1"); res.put("java.class.path", ""); res.put("java.library.path", ""); res.put("java.io.tmpdir", "/tmp"); res.put("java.compiler", "Internal"); res.put("java.ext.dirs", ""); res.put("os.name", "JNode"); res.put("os.arch", arch); res.put("os.version", vm.getVersion()); res.put("file.separator", "/"); res.put("path.separator", ":"); res.put("line.separator", "\n"); res.put("user.name", "System"); res.put("user.home", "/"); res.put("user.dir", "/"); // GNU properties res.put("gnu.java.io.encoding_scheme_alias.US-ASCII", "ISO8859-1"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16LE", "UTF16LE"); res.put("gnu.java.io.encoding_scheme_alias.UTF-16BE", "UTF16BE"); return res; }
| 2,613
|
public static Object[] getStackTrace(VmThread current) { if (current.inException) { Unsafe.debug("Exception in getStackTrace"); Unsafe.die("getStackTrace"); return null; } else { current.inException = true; } if (Vm.getVm().getHeapManager().isLowOnMemory()) { return null; } final VmProcessor proc = Unsafe.getCurrentProcessor(); final VmStackReader reader = proc.getArchitecture().getStackReader(); final VmStackFrame[] mt; //Address lastIP = null; if (current == proc.getCurrentThread()) { final Address curFrame = Unsafe.getCurrentFrame(); mt = reader.getVmStackTrace(reader.getPrevious(curFrame), reader .getReturnAddress(curFrame), STACKTRACE_LIMIT); } else { proc.disableReschedule(); try { mt = reader.getVmStackTrace(current.getStackFrame(), current .getInstructionPointer(), STACKTRACE_LIMIT); //lastIP = current.getInstructionPointer(); } finally { proc.enableReschedule(); } } final int cnt = (mt == null) ? 0 : mt.length; VmType lastClass = null; int i = 0; while (i < cnt) { final VmStackFrame f = mt[ i]; if (f == null) { break; } final VmMethod method = f.getMethod(); if (method == null) { break; } final VmType vmClass = method.getDeclaringClass(); if (vmClass == null) { break; } final VmType sClass = vmClass.getSuperClass(); if ((lastClass != null) && (sClass != lastClass) && (vmClass != lastClass)) { break; } final String mname = method.getName(); if (mname == null) { break; } if (!("<init>".equals(mname) || "fillInStackTrace".equals(mname) || "getStackTrace" .equals(mname))) { break; } lastClass = vmClass; i++; } final VmStackFrame[] st = new VmStackFrame[ cnt - i]; int j = 0; for (; i < cnt; i++) { st[ j++] = mt[ i]; } current.inException = false; return st; }
|
public static Object[] getStackTrace(VmThread current) { if (current.inException) { Unsafe.debug("Exception in getStackTrace"); Unsafe.die("getStackTrace"); return null; } else { current.inException = true; } if (Vm.getVm().getHeapManager().isLowOnMemory()) { return null; } final VmProcessor proc = Unsafe.getCurrentProcessor(); final VmStackReader reader = proc.getArchitecture().getStackReader(); final VmStackFrame[] mt; //Address lastIP = null; if (current.isInSystemException()) { proc.disableReschedule(); try { mt = reader.getVmStackTrace(current.getExceptionStackFrame(), current.getExceptionInstructionPointer(), STACKTRACE_LIMIT); } finally { proc.enableReschedule(); } } else if (current == proc.getCurrentThread()) { final Address curFrame = Unsafe.getCurrentFrame(); mt = reader.getVmStackTrace(reader.getPrevious(curFrame), reader .getReturnAddress(curFrame), STACKTRACE_LIMIT); } else { proc.disableReschedule(); try { mt = reader.getVmStackTrace(current.getStackFrame(), current .getInstructionPointer(), STACKTRACE_LIMIT); //lastIP = current.getInstructionPointer(); } finally { proc.enableReschedule(); } } final int cnt = (mt == null) ? 0 : mt.length; VmType lastClass = null; int i = 0; while (i < cnt) { final VmStackFrame f = mt[ i]; if (f == null) { break; } final VmMethod method = f.getMethod(); if (method == null) { break; } final VmType vmClass = method.getDeclaringClass(); if (vmClass == null) { break; } final VmType sClass = vmClass.getSuperClass(); if ((lastClass != null) && (sClass != lastClass) && (vmClass != lastClass)) { break; } final String mname = method.getName(); if (mname == null) { break; } if (!("<init>".equals(mname) || "fillInStackTrace".equals(mname) || "getStackTrace" .equals(mname))) { break; } lastClass = vmClass; i++; } final VmStackFrame[] st = new VmStackFrame[ cnt - i]; int j = 0; for (; i < cnt; i++) { st[ j++] = mt[ i]; } current.inException = false; return st; }
| 2,614
|
public NoClassDefFoundError() { super(); }
|
public NoClassDefFoundError() { super(); }
| 2,615
|
public ArrayStoreException(String s) { super(s); }
|
public ArrayStoreException(String s) { super(s); }
| 2,616
|
public VmCompiledExceptionHandler getExceptionHandler(int index) { if (eTable != null) { return eTable[index]; } else { throw new IndexOutOfBoundsException("eTable is null; index " + index); } }
|
public VmCompiledExceptionHandler getExceptionHandler(int index) { if (eTable != null) { return eTable[index]; } else { throw new IndexOutOfBoundsException("eTable is null; index " + index); } }
| 2,617
|
public boolean isResolved() { return resolved; }
|
public boolean isResolved() { return resolved; }
| 2,618
|
public boolean contains(Address codePtr) { final int cmpStart = Address.compare(codePtr, nativeCode); final int cmpEnd = Address.compare(codePtr, Address.add(nativeCode, nativeCodeSize1)); return ((cmpStart >= 0) && (cmpEnd < 0)); }
|
public boolean contains(Address codePtr) { final int cmpStart = Address.compare(codePtr, nativeCode); final int cmpEnd = Address.compare(codePtr, Address.add(nativeCode, nativeCodeSize1)); return ((cmpStart >= 0) && (cmpEnd < 0)); }
| 2,619
|
public Address getDefaultExceptionHandler() { return defaultExceptionHandler; }
|
public Address getDefaultExceptionHandler() { return defaultExceptionHandler; }
| 2,620
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); Unsafe.debug(getMagic(f)); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); ip = stack[i].getReturnAddress(); f = getPrevious(f); } return stack; }
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); Unsafe.debug(getMagic(f)); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); ip = stack[i].getReturnAddress(); f = getPrevious(f); } return stack; }
| 2,621
|
public BigDecimal (String num) throws NumberFormatException { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while (point < len) { char c = num.charAt (point); if (c == '.') { if (dot >= 0) throw new NumberFormatException ("multiple `.'s in number"); dot = point; } else if (c == 'e' || c == 'E') break; else if (Character.digit (c, 10) < 0) throw new NumberFormatException ("unrecognized character: " + c); ++point; } String val; if (dot >= 0) { val = num.substring (start, dot) + num.substring (dot + 1, point); scale = point - 1 - dot; } else { val = num.substring (start, point); scale = 0; } if (val.length () == 0) throw new NumberFormatException ("no digits seen"); if (negative) val = "-" + val; intVal = new BigInteger (val); // Now parse exponent. if (point < len) { point++; if (num.charAt(point) == '+') point++; if (point >= len ) throw new NumberFormatException ("no exponent following e or E"); try { int exp = Integer.parseInt (num.substring (point)); exp -= scale; if (signum () == 0) scale = 0; else if (exp > 0) { intVal = intVal.multiply (BigInteger.valueOf (10).pow (exp)); scale = 0; } else scale = - exp; } catch (NumberFormatException ex) { throw new NumberFormatException ("malformed exponent"); } } }
|
public BigDecimal (BigInteger num) { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while (point < len) { char c = num.charAt (point); if (c == '.') { if (dot >= 0) throw new NumberFormatException ("multiple `.'s in number"); dot = point; } else if (c == 'e' || c == 'E') break; else if (Character.digit (c, 10) < 0) throw new NumberFormatException ("unrecognized character: " + c); ++point; } String val; if (dot >= 0) { val = num.substring (start, dot) + num.substring (dot + 1, point); scale = point - 1 - dot; } else { val = num.substring (start, point); scale = 0; } if (val.length () == 0) throw new NumberFormatException ("no digits seen"); if (negative) val = "-" + val; intVal = new BigInteger (val); // Now parse exponent. if (point < len) { point++; if (num.charAt(point) == '+') point++; if (point >= len ) throw new NumberFormatException ("no exponent following e or E"); try { int exp = Integer.parseInt (num.substring (point)); exp -= scale; if (signum () == 0) scale = 0; else if (exp > 0) { intVal = intVal.multiply (BigInteger.valueOf (10).pow (exp)); scale = 0; } else scale = - exp; } catch (NumberFormatException ex) { throw new NumberFormatException ("malformed exponent"); } } }
| 2,622
|
public BigDecimal (String num) throws NumberFormatException { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while (point < len) { char c = num.charAt (point); if (c == '.') { if (dot >= 0) throw new NumberFormatException ("multiple `.'s in number"); dot = point; } else if (c == 'e' || c == 'E') break; else if (Character.digit (c, 10) < 0) throw new NumberFormatException ("unrecognized character: " + c); ++point; } String val; if (dot >= 0) { val = num.substring (start, dot) + num.substring (dot + 1, point); scale = point - 1 - dot; } else { val = num.substring (start, point); scale = 0; } if (val.length () == 0) throw new NumberFormatException ("no digits seen"); if (negative) val = "-" + val; intVal = new BigInteger (val); // Now parse exponent. if (point < len) { point++; if (num.charAt(point) == '+') point++; if (point >= len ) throw new NumberFormatException ("no exponent following e or E"); try { int exp = Integer.parseInt (num.substring (point)); exp -= scale; if (signum () == 0) scale = 0; else if (exp > 0) { intVal = intVal.multiply (BigInteger.valueOf (10).pow (exp)); scale = 0; } else scale = - exp; } catch (NumberFormatException ex) { throw new NumberFormatException ("malformed exponent"); } } }
|
public BigDecimal (String num) throws NumberFormatException { int len = num.length(); int start = 0, point = 0; int dot = -1; boolean negative = false; if (num.charAt(0) == '+') { ++start; ++point; } else if (num.charAt(0) == '-') { ++start; ++point; negative = true; } while (point < len) { char c = num.charAt (point); if (c == '.') { if (dot >= 0) throw new NumberFormatException ("multiple `.'s in number"); dot = point; } else if (c == 'e' || c == 'E') break; else if (Character.digit (c, 10) < 0) throw new NumberFormatException ("unrecognized character: " + c); ++point; } String val; if (dot >= 0) { val = num.substring (start, dot) + num.substring (dot + 1, point); scale = point - 1 - dot; } else { val = num.substring (start, point); scale = 0; } if (val.length () == 0) throw new NumberFormatException ("no digits seen"); if (negative) val = "-" + val; intVal = new BigInteger (val); // Now parse exponent. if (point < len) { point++; if (num.charAt(point) == '+') point++; if (point >= len ) throw new NumberFormatException ("no exponent following e or E"); try { int exp = Integer.parseInt (num.substring (point)); exp -= scale; if (signum () == 0) scale = 0; else if (exp > 0) { intVal = intVal.multiply (BigInteger.valueOf (10).pow (exp)); scale = 0; } else scale = - exp; } catch (NumberFormatException ex) { throw new NumberFormatException ("malformed exponent"); } } }
| 2,623
|
private void expireOldRange(LiveRange lr) { for (int i=0; i<active.size(); i+=1) { LiveRange l = (LiveRange) active.get(i); if (l.getLastUseAddress() >= lr.getAssignAddress()) { return; } active.remove(l); registerPool.release(l.getLocation()); } }
|
private void expireOldRange(LiveRange lr) { for (int i=0; i<active.size(); i+=1) { LiveRange l = (LiveRange) active.get(i); if (l.getLastUseAddress() >= lr.getAssignAddress()) { return; } active.remove(l); registerPool.release(l.getLocation()); } }
| 2,625
|
public StackLocation() { this(0); }
|
public StackLocation() { this(0); }
| 2,626
|
HelpException(String message) { super(message); }
|
HelpException(String message) { super(message); }
| 2,627
|
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
|
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
| 2,628
|
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
|
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
| 2,629
|
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
|
public void append(SocketBuffer skbuf) { if (next != null) { next.append(skbuf); } else { next = skbuf; } testBuffer(); }
| 2,630
|
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } } } }
|
public void sendKeys(String text) { if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; simulateMnemonic(getMnemonicValue(text)); } else { keysBuffered = true; if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; done = true; } } } } }
| 2,633
|
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : case AID_PF8 : case AID_PF9 : case AID_PF10 : case AID_PF11 : case AID_PF12 : case AID_PF13 : case AID_PF14 : case AID_PF15 : case AID_PF16 : case AID_PF17 : case AID_PF18 : case AID_PF19 : case AID_PF20 : case AID_PF21 : case AID_PF22 : case AID_PF23 : case AID_PF24 : case AID_ROLL_DOWN : case AID_ROLL_UP : case AID_ROLL_LEFT : case AID_ROLL_RIGHT : sendAid(mnem); simulated = true; break; case AID_HELP : sessionVT.sendHelpRequest(); simulated = true; break; case AID_PRINT : sessionVT.hostPrint(1); simulated = true; break; case BACK_SPACE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.getCurrentField().startPos() == lastPos) displayError(ERR_CURSOR_PROTECTED); else { setCursorOff(); screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); setCursorOn(); screenFields.setCurrentFieldMDT(); simulated = true; } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BACK_TAB : if (screenFields.getCurrentField() != null && screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldPrev(); updateDirty(); } else gotoFieldPrev(); if (screenFields.isCurrentFieldContinued()) { do { gotoFieldPrev(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } isInField(lastPos); simulated = true; break; case UP : case MARK_UP : process_XY(lastPos - numCols); simulated = true; break; case DOWN : case MARK_DOWN : process_XY(lastPos + numCols); simulated = true; break; case LEFT : case MARK_LEFT : process_XY(lastPos - 1); simulated = true; break; case RIGHT : case MARK_RIGHT : process_XY(lastPos + 1); simulated = true; break; case NEXTWORD : gotoNextWord(); simulated = true; break; case PREVWORD : gotoPrevWord(); simulated = true; break; case DELETE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case TAB : if (screenFields.getCurrentField() != null && !screenFields.isCurrentFieldContinued()) { if (screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldNext(); updateDirty(); } else gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.getCurrentField() != null && (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast())); } isInField(lastPos); simulated = true; break; case EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = endOfField(screenFields.getCurrentField().startPos(),true); if (where > 0) { goto_XY((where / numCols) + 1,(where % numCols) + 1); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case ERASE_EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; lastPos = screenFields.getCurrentField().startPos(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : setCursorOff(); // we toggle it insertMode = insertMode ? false : true; setCursorOn(); break; case HOME : // position to the home position set if (lastPos + numCols + 1 != homePos) { goto_XY(homePos - numCols - 1); // now check if we are in a field isInField(lastPos); } else gotoField(1); break; case KEYPAD_0 : simulated = simulateKeyStroke('0'); break; case KEYPAD_1 : simulated = simulateKeyStroke('1'); break; case KEYPAD_2 : simulated = simulateKeyStroke('2'); break; case KEYPAD_3 : simulated = simulateKeyStroke('3'); break; case KEYPAD_4 : simulated = simulateKeyStroke('4'); break; case KEYPAD_5 : simulated = simulateKeyStroke('5'); break; case KEYPAD_6 : simulated = simulateKeyStroke('6'); break; case KEYPAD_7 : simulated = simulateKeyStroke('7'); break; case KEYPAD_8 : simulated = simulateKeyStroke('8'); break; case KEYPAD_9 : simulated = simulateKeyStroke('9'); break; case KEYPAD_PERIOD : simulated = simulateKeyStroke('.'); break; case KEYPAD_COMMA : simulated = simulateKeyStroke(','); break; case KEYPAD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } simulated = true; updateDirty(); if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_EXIT : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_PLUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { setCursorOff(); screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); simulated = true; updateDirty(); break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; default : System.out.println(" Mnemonic not supported " + mnem); break; } return simulated; }
|
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : case AID_PF8 : case AID_PF9 : case AID_PF10 : case AID_PF11 : case AID_PF12 : case AID_PF13 : case AID_PF14 : case AID_PF15 : case AID_PF16 : case AID_PF17 : case AID_PF18 : case AID_PF19 : case AID_PF20 : case AID_PF21 : case AID_PF22 : case AID_PF23 : case AID_PF24 : case AID_ROLL_DOWN : case AID_ROLL_UP : case AID_ROLL_LEFT : case AID_ROLL_RIGHT : sendAid(mnem); simulated = true; break; case AID_HELP : sessionVT.sendHelpRequest(); simulated = true; break; case AID_PRINT : sessionVT.hostPrint(1); simulated = true; break; case BACK_SPACE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.getCurrentField().startPos() == lastPos) displayError(ERR_CURSOR_PROTECTED); else { setCursorOff(); screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); setCursorOn(); screenFields.setCurrentFieldMDT(); simulated = true; } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BACK_TAB : if (screenFields.getCurrentField() != null && screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldPrev(); updateDirty(); } else gotoFieldPrev(); if (screenFields.isCurrentFieldContinued()) { do { gotoFieldPrev(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } isInField(lastPos); simulated = true; break; case UP : case MARK_UP : process_XY(lastPos - numCols); simulated = true; break; case DOWN : case MARK_DOWN : process_XY(lastPos + numCols); simulated = true; break; case LEFT : case MARK_LEFT : process_XY(lastPos - 1); simulated = true; break; case RIGHT : case MARK_RIGHT : process_XY(lastPos + 1); simulated = true; break; case NEXTWORD : gotoNextWord(); simulated = true; break; case PREVWORD : gotoPrevWord(); simulated = true; break; case DELETE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case TAB : if (screenFields.getCurrentField() != null && !screenFields.isCurrentFieldContinued()) { if (screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldNext(); updateDirty(); } else gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.getCurrentField() != null && (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast())); } isInField(lastPos); simulated = true; break; case EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = endOfField(screenFields.getCurrentField().startPos(),true); if (where > 0) { goto_XY((where / numCols) + 1,(where % numCols) + 1); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case ERASE_EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; lastPos = screenFields.getCurrentField().startPos(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : setCursorOff(); // we toggle it insertMode = insertMode ? false : true; setCursorOn(); break; case HOME : // position to the home position set if (lastPos + numCols + 1 != homePos) { goto_XY(homePos - numCols - 1); // now check if we are in a field isInField(lastPos); } else gotoField(1); break; case KEYPAD_0 : simulated = simulateKeyStroke('0'); break; case KEYPAD_1 : simulated = simulateKeyStroke('1'); break; case KEYPAD_2 : simulated = simulateKeyStroke('2'); break; case KEYPAD_3 : simulated = simulateKeyStroke('3'); break; case KEYPAD_4 : simulated = simulateKeyStroke('4'); break; case KEYPAD_5 : simulated = simulateKeyStroke('5'); break; case KEYPAD_6 : simulated = simulateKeyStroke('6'); break; case KEYPAD_7 : simulated = simulateKeyStroke('7'); break; case KEYPAD_8 : simulated = simulateKeyStroke('8'); break; case KEYPAD_9 : simulated = simulateKeyStroke('9'); break; case KEYPAD_PERIOD : simulated = simulateKeyStroke('.'); break; case KEYPAD_COMMA : simulated = simulateKeyStroke(','); break; case KEYPAD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } simulated = true; updateDirty(); if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_EXIT : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_PLUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { setCursorOff(); screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); simulated = true; updateDirty(); break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; default : System.out.println(" Mnemonic not supported " + mnem); break; } return simulated; }
| 2,635
|
public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); }
|
public Dimension getMaximumSize(JComponent c) { Dimension d = getPreferredSize(c); View view = (View) c.getClientProperty(BasicHTML.propertyKey); if (view != null) d.width += view.getMaximumSpan(View.X_AXIS) - view.getPreferredSpan(View.X_AXIS); return d; }
| 2,636
|
public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); }
|
public Dimension getMinimumSize(JComponent c) { Dimension d = getPreferredSize(c); View view = (View) c.getClientProperty(BasicHTML.propertyKey); if (view != null) d.width -= view.getPreferredSpan(View.X_AXIS) - view.getMinimumSpan(View.X_AXIS); return d; }
| 2,637
|
public Dimension getPreferredSize(JComponent c) { JToolTip tip = (JToolTip) c; FontMetrics fm; Toolkit g = tip.getToolkit(); text = tip.getTipText(); Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = tip.getInsets(); fm = g.getFontMetrics(tip.getFont()); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); return new Dimension(insets.left + tr.width + insets.right, insets.top + tr.height + insets.bottom); }
|
public Dimension getPreferredSize(JComponent c) { JToolTip tip = (JToolTip) c; FontMetrics fm; Toolkit g = tip.getToolkit(); text = tip.getTipText(); Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); Insets insets = tip.getInsets(); fm = g.getFontMetrics(tip.getFont()); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); return new Dimension(insets.left + tr.width + insets.right, insets.top + tr.height + insets.bottom); }
| 2,638
|
protected void installListeners(JComponent c) { // TODO: Implement this properly. }
|
propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); protectedpropertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); voidpropertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); installListeners(JComponentpropertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); c)propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); {propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); //propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); TODO:propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); ImplementpropertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); thispropertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); properly.propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); propertyChangeHandler = new PropertyChangeHandler(); c.addPropertyChangeListener(propertyChangeHandler); }
| 2,639
|
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawString(text, vr.x, vr.y + ascent); g.setColor(saved); }
|
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawString(text, vr.x, vr.y + ascent); g.setColor(saved); }
| 2,641
|
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawString(text, vr.x, vr.y + ascent); g.setColor(saved); }
|
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawString(text, vr.x, vr.y + ascent); g.setColor(saved); }
| 2,642
|
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawString(text, vr.x, vr.y + ascent); g.setColor(saved); }
|
public void paint(Graphics g, JComponent c) { JToolTip tip = (JToolTip) c; String text = tip.getTipText(); Toolkit t = tip.getToolkit(); if (text == null) return; Rectangle vr = new Rectangle(); vr = SwingUtilities.calculateInnerArea(tip, vr); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); FontMetrics fm = t.getFontMetrics(tip.getFont()); int ascent = fm.getAscent(); SwingUtilities.layoutCompoundLabel(tip, fm, text, null, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, vr, ir, tr, 0); Color saved = g.getColor(); g.setColor(Color.BLACK); View view = (View) c.getClientProperty(BasicHTML.propertyKey); if (view != null) view.paint(g, paintR); else g.drawString(text, paintR.x + 3, paintR.y + ascent); g.setColor(saved); }
| 2,643
|
protected void uninstallListeners(JComponent c) { // TODO: Implement this properly. }
|
if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } protectedif (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } voidif (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } uninstallListeners(JComponentif (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } c)if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } {if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } //if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } TODO:if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } Implementif (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } thisif (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } properly.if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } if (propertyChangeHandler != null) { c.removePropertyChangeListener(propertyChangeHandler); propertyChangeHandler = null; } }
| 2,645
|
public static Icon getCheckBoxIcon() { return new Icon() { public int getIconHeight() { return 10; } public int getIconWidth() { return 10; } public void paintIcon(Component c, Graphics g, int x, int y) { if (c instanceof AbstractButton) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("CheckBox.highlight"); Color low = defaults.getColor("CheckBox.darkShadow"); Color sel = defaults.getColor("CheckBox.foreground"); Color dim = defaults.getColor("CheckBox.shadow"); Polygon check = new Polygon(new int[] {x+3, x+3, x+8}, new int[] {y+5, y+9, y+3}, 3); AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawRect(x, y, 10, 10); g.setColor(hi); g.drawRect(x+1, y+1, 10, 10); if (b.isSelected()) { g.setColor(sel); if (b.isSelected()) { g.drawLine(x+3, y+5, x+3, y+8); g.drawLine(x+4, y+5, x+4, y+8); g.drawLine(x+3, y+8, x+8, y+3); g.drawLine(x+4, y+8, x+8, y+3); } } } else { g.setColor(hi); g.drawRect(x, y, 10, 10); if (b.isSelected()) { g.drawLine(x+3, y+5, x+3, y+9); g.drawLine(x+3, y+9, x+8, y+3); } } g.setColor(saved); } } }; }
|
public static Icon getCheckBoxIcon() { return new Icon() { public int getIconHeight() { return 10; } public int getIconWidth() { return 10; } public void paintIcon(Component c, Graphics g, int x, int y) { if (c instanceof AbstractButton) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("CheckBox.highlight"); Color low = defaults.getColor("CheckBox.darkShadow"); Color sel = defaults.getColor("CheckBox.foreground"); Color dim = defaults.getColor("CheckBox.shadow"); Polygon check = new Polygon(new int[] {x+3, x+3, x+8}, new int[] {y+5, y+9, y+3}, 3); AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawRect(x, y, 10, 10); g.setColor(hi); g.drawRect(x+1, y+1, 10, 10); if (b.isSelected()) { g.setColor(sel); if (b.isSelected()) { g.drawLine(x+3, y+5, x+3, y+8); g.drawLine(x+4, y+5, x+4, y+8); g.drawLine(x+3, y+8, x+8, y+3); g.drawLine(x+4, y+8, x+8, y+3); } } } else { g.setColor(hi); g.drawRect(x, y, 10, 10); if (b.isSelected()) { g.drawLine(x+3, y+5, x+3, y+9); g.drawLine(x+3, y+9, x+8, y+3); } } g.setColor(saved); } } }; }
| 2,648
|
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("RadioButton.highlight"); Color low = defaults.getColor("RadioButton.darkShadow"); Color sel = defaults.getColor("RadioButton.foreground"); Color dim = defaults.getColor("RadioButton.shadow"); if (c instanceof AbstractButton) { AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawOval(x, y, 12, 12); g.setColor(hi); g.drawOval(x+1, y+1, 12, 12); if (b.isSelected()) { g.setColor(sel); g.fillOval(x+4, y+4, 6, 6); } } else { g.setColor(hi); g.drawOval(x, y, 12, 12); if (b.isSelected()) g.fillOval(x+4, y+4, 6, 6); } g.setColor(saved); } } }; }
|
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("RadioButton.highlight"); Color low = defaults.getColor("RadioButton.darkShadow"); Color sel = defaults.getColor("RadioButton.foreground"); Color dim = defaults.getColor("RadioButton.shadow"); if (c instanceof AbstractButton) { AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawOval(x, y, 12, 12); g.setColor(hi); g.drawOval(x+1, y+1, 12, 12); if (b.isSelected()) { g.setColor(sel); g.fillOval(x+4, y+4, 6, 6); } } else { g.setColor(hi); g.drawOval(x, y, 12, 12); if (b.isSelected()) g.fillOval(x+4, y+4, 6, 6); } g.setColor(saved); } } }; }
| 2,649
|
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("RadioButton.highlight"); Color low = defaults.getColor("RadioButton.darkShadow"); Color sel = defaults.getColor("RadioButton.foreground"); Color dim = defaults.getColor("RadioButton.shadow"); if (c instanceof AbstractButton) { AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawOval(x, y, 12, 12); g.setColor(hi); g.drawOval(x+1, y+1, 12, 12); if (b.isSelected()) { g.setColor(sel); g.fillOval(x+4, y+4, 6, 6); } } else { g.setColor(hi); g.drawOval(x, y, 12, 12); if (b.isSelected()) g.fillOval(x+4, y+4, 6, 6); } g.setColor(saved); } } }; }
|
public static Icon getRadioButtonIcon() { return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("RadioButton.highlight"); Color low = defaults.getColor("RadioButton.darkShadow"); Color sel = defaults.getColor("RadioButton.foreground"); Color dim = defaults.getColor("RadioButton.shadow"); if (c instanceof AbstractButton) { AbstractButton b = (AbstractButton) c; Color saved = g.getColor(); if (b.isEnabled()) { g.setColor(low); g.drawOval(x, y, 12, 12); g.setColor(hi); g.drawOval(x+1, y+1, 12, 12); if (b.isSelected()) { g.setColor(sel); g.fillOval(x+4, y+4, 6, 6); } } else { g.setColor(hi); g.drawOval(x, y, 12, 12); if (b.isSelected()) g.fillOval(x+4, y+4, 6, 6); } g.setColor(saved); } } }; }
| 2,650
|
public ISO9660Directory(ISO9660Entry entry) { this.entry = entry; }
|
public ISO9660Directory(ISO9660Entry entry) { this.entry = entry; }
| 2,651
|
public FSEntry addDirectory(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
|
public FSEntry addDirectory(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
| 2,652
|
public FSEntry addFile(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
|
public FSEntry addFile(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
| 2,653
|
public FSEntry getEntry(String name) throws IOException { for(Iterator it = this.iterator();it.hasNext();) { ISO9660Entry entry = (ISO9660Entry) it.next(); if(entry.getName().equalsIgnoreCase(name)) return entry; } return null; }
|
public FSEntry getEntry(String name) throws IOException { for(Iterator it = this.iterator();it.hasNext();) { ISO9660Entry entry = (ISO9660Entry) it.next(); if(entry.getName().equalsIgnoreCase(name)) return entry; } return null; }
| 2,654
|
public FileSystem getFileSystem() { return null; }
|
public FileSystem getFileSystem() { return null; }
| 2,655
|
public boolean isValid() { return true; }
|
public boolean isValid() { return true; }
| 2,656
|
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
|
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
| 2,657
|
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
|
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
| 2,658
|
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
|
public Iterator iterator() throws IOException { return new Iterator() { int offset = 0; EntryRecord parent = ISO9660Directory.this.entry.getCDFSentry(); byte[] buffer = parent.getExtentData(); public boolean hasNext() { return buffer[offset] > 0; } public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); } public void remove() { throw new UnsupportedOperationException("Not yet implemented"); } }; }
| 2,659
|
public boolean hasNext() { return buffer[offset] > 0; }
|
public boolean hasNext() { return buffer[offset] > 0; }
| 2,660
|
public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); }
|
public Object next() { EntryRecord fEntry = new EntryRecord(parent.getVolume(),buffer,offset); offset += fEntry.getLengthOfDirectoryEntry(); return new ISO9660Entry(fEntry); }
| 2,661
|
public void remove() { throw new UnsupportedOperationException("Not yet implemented"); }
|
public void remove() { throw new UnsupportedOperationException("Not yet implemented"); }
| 2,662
|
public void remove(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
|
public void remove(String name) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); }
| 2,663
|
UTF_16 () { super ("UTF-16", null); }
|
UTF_16 () { super ("UTF-16", null); }
| 2,664
|
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
|
public Object read_abstract_interface() { boolean isObject = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
| 2,665
|
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
|
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
| 2,666
|
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_Object(); }
|
public Object read_abstract_interface() { boolean isValue = read_boolean(); if (isValue) return read_value(); else return read_value(); }
| 2,667
|
public static Serializable read(InputStream input) { // Explicitly prevent the stream from closing as we may need // to read the subsequent bytes as well. Stream may be auto-closed // in its finalizer. try { // We may need to jump back if the value is read via value factory. input.mark(512); int value_tag = input.read_long(); checkTag(value_tag); String codebase = null; String[] ids = null; String id = null; // The existing implementing object. java.lang.Object ox = null; // Check for the agreed null value. if (value_tag == vt_NULL) return null; else if (value_tag == vt_INDIRECTION) // TODO FIXME Implement support for indirections. throw new NO_IMPLEMENT("Indirections unsupported"); else { // Read the value. if ((value_tag & vf_CODEBASE) != 0) { // The codebase is present. The codebase is a space // separated list of URLs from where the implementing // code can be downloaded. codebase = input.read_string(); } if ((value_tag & vf_MULTIPLE_IDS) != 0) { // Multiple supported repository ids are present. ids = StringSeqHelper.read(input); for (int i = 0; (i < ids.length) && (ox == null); i++) { ox = ObjectCreator.Idl2Object(ids [ i ]); if (ox == null) { // Try to find the value factory. ValueFactory f = ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(ids [ i ]); if (f != null) { // Reset, as the value factory reads from beginning. input.reset(); return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input); } } } } else if ((value_tag & vf_ID) != 0) { // Single supported repository id is present. id = input.read_string(); ox = ObjectCreator.Idl2Object(id); if (ox == null) { // Try to find the value factory. ValueFactory f = ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(id); if (f != null) { input.reset(); return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input); } } } } if (ox == null) throw new MARSHAL("Unable to instantiate the value type"); else { read_instance(input, ox, value_tag, null); return (Serializable) ox; } } catch (Exception ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
|
public static Serializable read(InputStream input) { // Explicitly prevent the stream from closing as we may need // to read the subsequent bytes as well. Stream may be auto-closed // in its finalizer. try { // We may need to jump back if the value is read via value factory. input.mark(512); int value_tag = input.read_long(); checkTag(value_tag); String codebase = null; String[] ids = null; String id = null; // The existing implementing object. java.lang.Object ox = null; // Check for the agreed null value. if (value_tag == vt_NULL) return null; else if (value_tag == vt_INDIRECTION) // TODO FIXME Implement support for indirections. throw new NO_IMPLEMENT("Indirections unsupported"); else { // Read the value. if ((value_tag & vf_CODEBASE) != 0) { // The codebase is present. The codebase is a space // separated list of URLs from where the implementing // code can be downloaded. codebase = input.read_string(); } if ((value_tag & vf_MULTIPLE_IDS) != 0) { // Multiple supported repository ids are present. ids = StringSeqHelper.read(input); for (int i = 0; (i < ids.length) && (ox == null); i++) { ox = ObjectCreator.Idl2Object(ids [ i ]); if (ox == null) { // Try to find the value factory. ValueFactory f = ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(ids [ i ]); if (f != null) { // Reset, as the value factory reads from beginning. input.reset(); return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input); } } } } else if ((value_tag & vf_ID) != 0) { // Single supported repository id is present. id = input.read_string(); ox = ObjectCreator.Idl2Object(id); if (ox == null) { // Try to find the value factory. ValueFactory f = ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(id); if (f != null) { input.reset(); return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input); } } } } if (ox == null) throw new MARSHAL("Unable to instantiate the value type"); else { read_instance(input, ox, value_tag, null); return (Serializable) ox; } } catch (Exception ex) { throw new MARSHAL(ex + ":" + ex.getMessage()); } }
| 2,668
|
public Image createImage(byte[] data) { return createImage(data, 0, data.length); }
|
public Image createImage(byte[] data) { return createImage(data, 0, data.length); }
| 2,669
|
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.transmitTimestamp = skbuf.get32(16); }
|
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.transmitTimestamp = skbuf.get32(16); }
| 2,670
|
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.transmitTimestamp = skbuf.get32(16); }
|
public ICMPTimestampHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_TIMESTAMP) && (type != ICMP_TIMESTAMPREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.originateTimestamp = skbuf.get32(8); this.receiveTimestamp = skbuf.get32(12); this.transmitTimestamp = skbuf.get32(16); }
| 2,671
|
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = new IPv4Address(skbuf, 8); }
|
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = new IPv4Address(skbuf, 8); }
| 2,672
|
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = new IPv4Address(skbuf, 8); }
|
public ICMPAddressMaskHeader(SocketBuffer skbuf) { super(skbuf); final int type = getType(); if ((type != ICMP_ADDRESS) && (type != ICMP_ADDRESSREPLY)) { throw new IllegalArgumentException("Invalid type " + type); } this.subnetMask = new IPv4Address(skbuf, 8); }
| 2,673
|
public ICMPEchoHeader(SocketBuffer skbuf) { super(skbuf); }
|
public ICMPEchoHeader(SocketBuffer skbuf) { super(skbuf); }
| 2,674
|
private void init() { classXDFNodeName = "axis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"valueList"); attribOrder.add(0,"axisIdRef"); attribOrder.add(0,"axisId"); attribOrder.add(0,"align"); //not sure what it is??? attribOrder.add(0,"axisUnits"); attribOrder.add(0,"axisDatatype"); attribOrder.add(0,"description"); attribOrder.add(0,"name"); //set up the attribute hashtable key with the default initial value //set the minimum array size(essentially the size of the axis) attribHash.put("valueList", new XMLAttribute(Collections.synchronizedList(new ArrayList(super.sDefaultDataArraySize)), Constants.LIST_TYPE)); attribHash.put("axisIdRef", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("axisId", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("aligh", new XMLAttribute(null, Constants.STRING_TYPE)); //double check??? //set up the axisUnits attribute Units unitsObj = new Units(); attribHash.put("axisUnits", new XMLAttribute(unitsObj, Constants.OBJECT_TYPE)); unitsObj.setXDFNodeName("axisUnits"); attribHash.put("axisDatatype",new XMLAttribute(new StringDataFormat(), Constants.OBJECT_TYPE)); attribHash.put("description", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("name", new XMLAttribute(null, Constants.STRING_TYPE)); length = 0; }
|
private void init() { classXDFNodeName = "axis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"valueList"); attribOrder.add(0,"axisIdRef"); attribOrder.add(0,"axisId"); attribOrder.add(0,"align"); //not sure what it is??? attribOrder.add(0,"axisUnits"); attribOrder.add(0,"axisDatatype"); attribOrder.add(0,"description"); attribOrder.add(0,"name"); //set up the attribute hashtable key with the default initial value //set the minimum array size(essentially the size of the axis) attribHash.put("valueList", new XMLAttribute(Collections.synchronizedList(new ArrayList(super.sDefaultDataArraySize)), Constants.LIST_TYPE)); attribHash.put("axisIdRef", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("axisId", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("aligh", new XMLAttribute(null, Constants.STRING_TYPE)); //double check??? //set up the axisUnits attribute Units unitsObj = new Units(); attribHash.put("axisUnits", new XMLAttribute(unitsObj, Constants.OBJECT_TYPE)); unitsObj.setXDFNodeName("axisUnits"); attribHash.put("axisDatatype",new XMLAttribute(new StringDataFormat(), Constants.STRING_TYPE)); attribHash.put("description", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("name", new XMLAttribute(null, Constants.STRING_TYPE)); length = 0; }
| 2,675
|
public Dimension minimumLayoutSize(Container parent) { JViewport vp = (JViewport)parent; Component view = vp.getView(); if (view != null) return view.getMinimumSize(); else return new Dimension(); }
|
public Dimension minimumLayoutSize(Container parent) { JViewport vp = (JViewport)parent; Component view = vp.getView(); if (view != null) return view.getMinimumSize(); else return new Dimension(); }
| 2,676
|
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
|
public void connect(InetAddress address, int port) { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
| 2,677
|
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
|
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
| 2,678
|
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
|
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
| 2,679
|
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
|
public void connect(SocketAddress address) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; connect(tmp.getAddress(), tmp.getPort()); }
| 2,680
|
public abstract int read(ByteBuffer dst) throws IOException;
|
public abstract int read(ByteBuffer dst) throws IOException;
| 2,681
|
public DatagramPacket(byte[] buf, int length) { this(buf, 0, length); }
|
public DatagramPacket(byte[] buf, int length) { this(buf, 0, length); }
| 2,682
|
public SocketAddress getSocketAddress() { return new InetSocketAddress(address, port); }
|
public SocketAddress getSocketAddress() { return new InetSocketAddress(address, port); }
| 2,683
|
public abstract int write(ByteBuffer src) throws IOException;
|
public abstract int write(ByteBuffer src) throws IOException;
| 2,684
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: log.setLevel((Level)Level.OFF); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
| 2,685
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
| 2,686
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.setLevel((Level)Level.DEBUG); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
| 2,687
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.setLevel((Level)Level.INFO); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
| 2,688
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
|
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.setLevel((Level)Level.WARN); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
| 2,689
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.