rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
protected void addImpl(Component comp, Object constraints, int index)
protected void addImpl(Component comp, Object constraints, int index)
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. if (!initStageDone) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JApplet directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
super.addImpl(comp, constraints, index);
super.addImpl(comp, constraints, index);
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. if (!initStageDone) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JApplet directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
public Component getGlassPane()
public Component getGlassPane()
public Component getGlassPane() { return getRootPane().getGlassPane(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
{ if (rootPane == null) setRootPane(createRootPane()); return rootPane; }
{ if (rootPane == null) setRootPane(createRootPane()); return rootPane; }
public JRootPane getRootPane() { if (rootPane == null) setRootPane(createRootPane()); return rootPane; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
protected boolean isRootPaneCheckingEnabled()
protected boolean isRootPaneCheckingEnabled()
protected boolean isRootPaneCheckingEnabled() { return rootPaneCheckingEnabled; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
protected String paramString()
protected String paramString()
protected String paramString() { return "JFrame"; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
protected void processKeyEvent(KeyEvent e)
protected void processKeyEvent(KeyEvent e)
protected void processKeyEvent(KeyEvent e) { super.processKeyEvent(e); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
getContentPane().remove(comp);
getContentPane().remove(comp);
public void remove(Component comp) { // If we're removing the root pane, use super.remove. Otherwise // pass it on to the content pane instead if (comp == rootPane) super.remove(rootPane); else getContentPane().remove(comp); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
public void setLayeredPane(JLayeredPane layeredPane)
public void setLayeredPane(JLayeredPane layeredPane)
public void setLayeredPane(JLayeredPane layeredPane) { getRootPane().setLayeredPane(layeredPane); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
public void setLayout(LayoutManager manager)
public void setLayout(LayoutManager manager)
public void setLayout(LayoutManager manager) { // Check if we're in initialization stage. If so, call super.setLayout // otherwise, valid calls go to the content pane if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + "instead."); getContentPane().setLayout(manager); } else super.setLayout(manager); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
super.setLayout(manager);
super.setLayout(manager);
public void setLayout(LayoutManager manager) { // Check if we're in initialization stage. If so, call super.setLayout // otherwise, valid calls go to the content pane if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + "instead."); getContentPane().setLayout(manager); } else super.setLayout(manager); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
{ if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); }
{ if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); }
protected void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
protected void setRootPaneCheckingEnabled(boolean enabled)
protected void setRootPaneCheckingEnabled(boolean enabled)
protected void setRootPaneCheckingEnabled(boolean enabled) { rootPaneCheckingEnabled = enabled; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JApplet.java/clean/core/src/classpath/javax/javax/swing/JApplet.java
public BasicPermission(String name) {
public BasicPermission(String name) {
public BasicPermission(String name) { super(name); if (name.indexOf("*") != -1) { if ((!name.endsWith(".*") && !name.equals("*")) || name.indexOf("*") != name.lastIndexOf("*")) throw new IllegalArgumentException("Bad wildcard: " + name); } if ("".equals(name)) throw new IllegalArgumentException("Empty name"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
if (name.indexOf("*") != -1) { if ((!name.endsWith(".*") && !name.equals("*")) || name.indexOf("*") != name.lastIndexOf("*")) throw new IllegalArgumentException("Bad wildcard: " + name); } if ("".equals(name)) throw new IllegalArgumentException("Empty name");
if ("".equals(name)) throw new IllegalArgumentException("Empty name");
public BasicPermission(String name) { super(name); if (name.indexOf("*") != -1) { if ((!name.endsWith(".*") && !name.equals("*")) || name.indexOf("*") != name.lastIndexOf("*")) throw new IllegalArgumentException("Bad wildcard: " + name); } if ("".equals(name)) throw new IllegalArgumentException("Empty name"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
public boolean equals(Object obj) {
public boolean equals(Object obj) {
public boolean equals(Object obj) { return getClass().isInstance(obj) && getName().equals(((BasicPermission) obj).getName()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
public String getActions() {
public String getActions() {
public String getActions() { return ""; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
public int hashCode() {
public int hashCode() {
public int hashCode() { return getName().hashCode(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
public boolean implies(Permission perm) { if (!getClass().isInstance(perm)) return false;
public boolean implies(Permission perm) { if (! getClass().isInstance(perm)) return false;
public boolean implies(Permission perm) { if (!getClass().isInstance(perm)) return false; String otherName = perm.getName(); String name = getName(); if (name.equals(otherName)) return true; int last = name.length() - 1; return name.charAt(last) == '*' && otherName.startsWith(name.substring(0, last)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
if (name.equals(otherName)) return true;
if (name.equals(otherName)) return true;
public boolean implies(Permission perm) { if (!getClass().isInstance(perm)) return false; String otherName = perm.getName(); String name = getName(); if (name.equals(otherName)) return true; int last = name.length() - 1; return name.charAt(last) == '*' && otherName.startsWith(name.substring(0, last)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
public PermissionCollection newPermissionCollection() {
public PermissionCollection newPermissionCollection() {
public PermissionCollection newPermissionCollection() { return new BasicPermissionCollection(getClass()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
BasicPermissionCollection(Class c) {
BasicPermissionCollection(Class c) {
BasicPermissionCollection(Class c) { permClass = c; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
public void add(Permission perm) { if (isReadOnly()) throw new SecurityException("readonly"); if (!permClass.isInstance(perm)) throw new IllegalArgumentException("Expecting instance of " + permClass);
public void add(Permission perm) { if (isReadOnly()) throw new SecurityException("readonly"); if (! permClass.isInstance(perm)) throw new IllegalArgumentException("Expecting instance of " + permClass);
public void add(Permission perm) { if (isReadOnly()) throw new SecurityException("readonly"); if (!permClass.isInstance(perm)) throw new IllegalArgumentException("Expecting instance of " + permClass); BasicPermission bp = (BasicPermission) perm; String name = bp.getName(); if (name.equals("*")) all_allowed = true; permissions.put(name, bp); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
if (name.equals("*")) all_allowed = true;
if (name.equals("*")) all_allowed = true;
public void add(Permission perm) { if (isReadOnly()) throw new SecurityException("readonly"); if (!permClass.isInstance(perm)) throw new IllegalArgumentException("Expecting instance of " + permClass); BasicPermission bp = (BasicPermission) perm; String name = bp.getName(); if (name.equals("*")) all_allowed = true; permissions.put(name, bp); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
public Enumeration elements() {
public Enumeration elements() {
public Enumeration elements() { return permissions.elements(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
public boolean implies(Permission permission) { if (!permClass.isInstance(permission)) return false; if (all_allowed) return true;
public boolean implies(Permission permission) { if (! permClass.isInstance(permission)) return false; if (all_allowed) return true;
public boolean implies(Permission permission) { if (!permClass.isInstance(permission)) return false; if (all_allowed) return true; BasicPermission toImply = (BasicPermission) permission; String name = toImply.getName(); if (name.equals("*")) return false; int prefixLength = name.length(); if (name.endsWith("*")) prefixLength -= 2; while (true) { if (permissions.get(name) != null) return true; prefixLength = name.lastIndexOf('.', prefixLength); if (prefixLength < 0) return false; name = name.substring(0, prefixLength + 1) + '*'; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
if (name.equals("*")) return false;
if (name.equals("*")) return false;
public boolean implies(Permission permission) { if (!permClass.isInstance(permission)) return false; if (all_allowed) return true; BasicPermission toImply = (BasicPermission) permission; String name = toImply.getName(); if (name.equals("*")) return false; int prefixLength = name.length(); if (name.endsWith("*")) prefixLength -= 2; while (true) { if (permissions.get(name) != null) return true; prefixLength = name.lastIndexOf('.', prefixLength); if (prefixLength < 0) return false; name = name.substring(0, prefixLength + 1) + '*'; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
if (name.endsWith("*")) prefixLength -= 2;
if (name.endsWith("*")) prefixLength -= 2;
public boolean implies(Permission permission) { if (!permClass.isInstance(permission)) return false; if (all_allowed) return true; BasicPermission toImply = (BasicPermission) permission; String name = toImply.getName(); if (name.equals("*")) return false; int prefixLength = name.length(); if (name.endsWith("*")) prefixLength -= 2; while (true) { if (permissions.get(name) != null) return true; prefixLength = name.lastIndexOf('.', prefixLength); if (prefixLength < 0) return false; name = name.substring(0, prefixLength + 1) + '*'; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
while (true) { if (permissions.get(name) != null) return true;
while (true) { if (permissions.get(name) != null) return true;
public boolean implies(Permission permission) { if (!permClass.isInstance(permission)) return false; if (all_allowed) return true; BasicPermission toImply = (BasicPermission) permission; String name = toImply.getName(); if (name.equals("*")) return false; int prefixLength = name.length(); if (name.endsWith("*")) prefixLength -= 2; while (true) { if (permissions.get(name) != null) return true; prefixLength = name.lastIndexOf('.', prefixLength); if (prefixLength < 0) return false; name = name.substring(0, prefixLength + 1) + '*'; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
if (prefixLength < 0) return false;
if (prefixLength < 0) return false;
public boolean implies(Permission permission) { if (!permClass.isInstance(permission)) return false; if (all_allowed) return true; BasicPermission toImply = (BasicPermission) permission; String name = toImply.getName(); if (name.equals("*")) return false; int prefixLength = name.length(); if (name.endsWith("*")) prefixLength -= 2; while (true) { if (permissions.get(name) != null) return true; prefixLength = name.lastIndexOf('.', prefixLength); if (prefixLength < 0) return false; name = name.substring(0, prefixLength + 1) + '*'; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e7ba6ccc0138cc0edd9484ef9d447008e8271fd1/BasicPermission.java/clean/core/src/classpath/java/java/security/BasicPermission.java
this.helper = new X86CompilerHelper(os, vstack.createStackMgr(pool),
this.ifac = ItemFactory.getFactory(); this.helper = new X86CompilerHelper(os, vstack.createStackMgr(pool, ifac),
public X86BytecodeVisitor(NativeStream outputStream, CompiledMethod cm, boolean isBootstrap, X86CompilerContext context) { this.os = (AbstractX86Stream) outputStream; this.context = context; this.vstack = new VirtualStack(os); final X86RegisterPool pool = new X86RegisterPool(); this.helper = new X86CompilerHelper(os, vstack.createStackMgr(pool), context, isBootstrap); this.cm = cm; this.slotSize = VmX86Architecture.SLOT_SIZE; this.arrayLengthOffset = VmArray.LENGTH_OFFSET * slotSize; this.arrayDataOffset = VmArray.DATA_OFFSET * slotSize; this.tibOffset = ObjectLayout.TIB_SLOT * slotSize; this.log = os.isLogEnabled(); this.eContext = new EmitterContext(os, helper, vstack, pool); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
this.eContext = new EmitterContext(os, helper, vstack, pool);
this.eContext = new EmitterContext(os, helper, vstack, pool, ifac);
public X86BytecodeVisitor(NativeStream outputStream, CompiledMethod cm, boolean isBootstrap, X86CompilerContext context) { this.os = (AbstractX86Stream) outputStream; this.context = context; this.vstack = new VirtualStack(os); final X86RegisterPool pool = new X86RegisterPool(); this.helper = new X86CompilerHelper(os, vstack.createStackMgr(pool), context, isBootstrap); this.cm = cm; this.slotSize = VmX86Architecture.SLOT_SIZE; this.arrayLengthOffset = VmArray.LENGTH_OFFSET * slotSize; this.arrayDataOffset = VmArray.DATA_OFFSET * slotSize; this.tibOffset = ObjectLayout.TIB_SLOT * slotSize; this.log = os.isLogEnabled(); this.eContext = new EmitterContext(os, helper, vstack, pool); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
private final void checkBounds(RefItem ref, IntItem index) { final Label ok = new Label(curInstrLabel + "$$cbok"); // CMP length, index assertCondition(ref.isRegister(), "ref must be in a register"); final Register refr = ref.getRegister(); if (index.isConstant()) { os.writeCMP_Const(refr, arrayLengthOffset, index.getValue()); } else { //BootLog.debug("index.kind=" + index.getKind()); os.writeCMP(refr, arrayLengthOffset, index.getRegister()); } os.writeJCC(ok, X86Constants.JA); // Signal ArrayIndexOutOfBounds os.writeINT(5); os.setObjectRef(ok); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
inlinedMethod.pushExitStack(vstack);
inlinedMethod.pushExitStack(ifac, vstack);
public void endInlinedMethod(VmMethod previousMethod) { helper.setMethod(previousMethod); os.setObjectRef(inlinedMethod.getEndOfInlineLabel()); this.currentMethod = previousMethod; inlinedMethod.pushExitStack(vstack); this.inlinedMethod = null; if (debug) { BootLog.debug("endInlinedMethod"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
inlinedMethod.pushOuterMethodStack(vstack);
inlinedMethod.pushOuterMethodStack(ifac, vstack);
public void startBasicBlock(BasicBlock bb) { if (log) { os.log("Start of basic block " + bb); } if (debug) { BootLog.debug("-- Start of BB " + bb); } startOfBB = true; this.vstack.reset(); eContext.getPool().reset(os); // Push the result from the outer method stack on the vstack if (inlinedMethod != null) { inlinedMethod.pushOuterMethodStack(vstack); } // Push the items on the vstack the result from a previous basic block. final TypeStack tstack = bb.getStartStack(); vstack.pushAll(tstack); if (debug) { BootLog.debug("-- VStack: " + vstack.toString()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.pushAll(tstack);
vstack.pushAll(ifac, tstack);
public void startBasicBlock(BasicBlock bb) { if (log) { os.log("Start of basic block " + bb); } if (debug) { BootLog.debug("-- Start of BB " + bb); } startOfBB = true; this.vstack.reset(); eContext.getPool().reset(os); // Push the result from the outer method stack on the vstack if (inlinedMethod != null) { inlinedMethod.pushOuterMethodStack(vstack); } // Push the items on the vstack the result from a previous basic block. final TypeStack tstack = bb.getStartStack(); vstack.pushAll(tstack); if (debug) { BootLog.debug("-- VStack: " + vstack.toString()); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(RefItem.createConst(null));
vstack.push(ifac.createAConst(null));
public final void visit_aconst_null() { vstack.push(RefItem.createConst(null)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(RefItem.createLocal(stackFrame.getEbpOffset(index)));
vstack.push(ifac.createLocal(JvmType.REFERENCE, stackFrame.getEbpOffset(index)));
public final void visit_aload(int index) { vstack.push(RefItem.createLocal(stackFrame.getEbpOffset(index))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(eContext);
public final void visit_anewarray(VmConstClass classRef) { // Claim EAX, we're going to use it later L1AHelper.requestRegister(eContext, EAX); // Request tmp register final Register classr = L1AHelper.requestRegister(eContext, JvmType.INT, false); // Pop final IntItem cnt = vstack.popInt(); // Load the count value cnt.load(eContext); final Register cntr = cnt.getRegister(); // Resolve the class writeResolveAndLoadClassToReg(classRef, classr); // Release EAX so it can be used by invokeJavaMethod L1AHelper.releaseRegister(eContext, EAX); stackFrame.writePushMethodRef(); os.writePUSH(classr); /* Class */ os.writePUSH(cntr); /* Count */ invokeJavaMethod(context.getAnewarrayMethod()); /* Result is already push on the stack */ // Release cnt.release(eContext); L1AHelper.releaseRegister(eContext, classr); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
final Item result = DoubleItem.createFPUStack();
final Item result = ifac.createFPUStack(JvmType.DOUBLE);
public final void visit_daload() { final IntItem idx = vstack.popInt(); final RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register refr = ref.getRegister(); checkBounds(ref, idx); FPUHelper.ensureStackCapacity(os, eContext, vstack, 1); if (idx.isConstant()) { final int offset = idx.getValue() * 8; os.writeFLD64(refr, offset + arrayDataOffset); } else { final Register idxr = idx.getRegister(); os.writeFLD64(refr, idxr, 8, arrayDataOffset); } // Release ref.release(eContext); idx.release(eContext); // Push result final Item result = DoubleItem.createFPUStack(); vstack.fpuStack.push(result); vstack.push(result); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(DoubleItem.createConst(value));
vstack.push(ifac.createDConst(value));
public final void visit_dconst(double value) { vstack.push(DoubleItem.createConst(value)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(DoubleItem.createLocal(stackFrame.getWideEbpOffset(index)));
vstack.push(ifac.createLocal(JvmType.DOUBLE, stackFrame.getWideEbpOffset(index)));
public final void visit_dload(int index) { vstack.push(DoubleItem.createLocal(stackFrame.getWideEbpOffset(index))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(FloatItem.createConst(value));
vstack.push(ifac.createFConst(value));
public final void visit_fconst(float value) { vstack.push(FloatItem.createConst(value)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(FloatItem.createLocal(stackFrame.getEbpOffset(index)));
vstack.push(ifac.createLocal(JvmType.FLOAT, stackFrame.getEbpOffset(index)));
public final void visit_fload(int index) { vstack.push(FloatItem.createLocal(stackFrame.getEbpOffset(index))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
result = FloatItem.createFPUStack();
result = ifac.createFPUStack(JvmType.FLOAT);
public final void visit_getfield(VmConstFieldRef fieldRef) { fieldRef.resolve(loader); final VmField field = fieldRef.getResolvedVmField(); if (field.isStatic()) { throw new IncompatibleClassChangeError( "getfield called on static field " + fieldRef.getName()); } final VmInstanceField inf = (VmInstanceField) field; final int fieldOffset = inf.getOffset(); final int type = JvmType.SignatureToType(fieldRef.getSignature()); final boolean isfloat = JvmType.isFloat(type); // Pop & load final RefItem ref = vstack.popRef(); ref.load(eContext); final Register refr = ref.getRegister(); // get field final Item result; if (!fieldRef.isWide()) { if (isfloat) { result = FloatItem.createFPUStack(); os.writeFLD32(refr, fieldOffset); vstack.fpuStack.push(result); } else { final WordItem iw = L1AHelper.requestWordRegister(eContext, type, false); os.writeMOV(INTSIZE, iw.getRegister(), refr, fieldOffset); result = iw; } } else { if (isfloat) { result = DoubleItem.createFPUStack(); os.writeFLD64(refr, fieldOffset); vstack.fpuStack.push(result); } else { final DoubleWordItem idw = L1AHelper .requestDoubleWordRegisters(eContext, type); final Register lsb = idw.getLsbRegister(); final Register msb = idw.getMsbRegister(); os.writeMOV(INTSIZE, lsb, refr, fieldOffset + LSB); os.writeMOV(INTSIZE, msb, refr, fieldOffset + MSB); result = idw; } } // Release ref.release(eContext); // Push result vstack.push(result); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
result = DoubleItem.createFPUStack();
result = ifac.createFPUStack(JvmType.DOUBLE);
public final void visit_getfield(VmConstFieldRef fieldRef) { fieldRef.resolve(loader); final VmField field = fieldRef.getResolvedVmField(); if (field.isStatic()) { throw new IncompatibleClassChangeError( "getfield called on static field " + fieldRef.getName()); } final VmInstanceField inf = (VmInstanceField) field; final int fieldOffset = inf.getOffset(); final int type = JvmType.SignatureToType(fieldRef.getSignature()); final boolean isfloat = JvmType.isFloat(type); // Pop & load final RefItem ref = vstack.popRef(); ref.load(eContext); final Register refr = ref.getRegister(); // get field final Item result; if (!fieldRef.isWide()) { if (isfloat) { result = FloatItem.createFPUStack(); os.writeFLD32(refr, fieldOffset); vstack.fpuStack.push(result); } else { final WordItem iw = L1AHelper.requestWordRegister(eContext, type, false); os.writeMOV(INTSIZE, iw.getRegister(), refr, fieldOffset); result = iw; } } else { if (isfloat) { result = DoubleItem.createFPUStack(); os.writeFLD64(refr, fieldOffset); vstack.fpuStack.push(result); } else { final DoubleWordItem idw = L1AHelper .requestDoubleWordRegisters(eContext, type); final Register lsb = idw.getLsbRegister(); final Register msb = idw.getMsbRegister(); os.writeMOV(INTSIZE, lsb, refr, fieldOffset + LSB); os.writeMOV(INTSIZE, msb, refr, fieldOffset + MSB); result = idw; } } // Release ref.release(eContext); // Push result vstack.push(result); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
final Item result = FPUHelper.createFPUStack(type);
final Item result = ifac.createFPUStack(type);
public final void visit_getstatic(VmConstFieldRef fieldRef) { fieldRef.resolve(loader); final int type = JvmType.SignatureToType(fieldRef.getSignature()); final VmStaticField sf = (VmStaticField) fieldRef.getResolvedVmField(); // Initialize if needed if (!sf.getDeclaringClass().isInitialized()) { final X86RegisterPool pool = eContext.getPool(); final Register tmp = L1AHelper.requestRegister(eContext, JvmType.INT, false); writeInitializeClass(fieldRef, tmp); pool.release(tmp); } // Get static field object if (JvmType.isFloat(type)) { final boolean is32bit = !fieldRef.isWide(); helper.writeGetStaticsEntryToFPU(curInstrLabel, sf, is32bit); final Item result = FPUHelper.createFPUStack(type); vstack.fpuStack.push(result); vstack.push(result); } else if (!fieldRef.isWide()) { final WordItem result = L1AHelper.requestWordRegister(eContext, type, false); final Register resultr = result.getRegister(); helper.writeGetStaticsEntry(curInstrLabel, resultr, sf); vstack.push(result); } else { final DoubleWordItem result = L1AHelper.requestDoubleWordRegisters( eContext, type); final Register lsb = result.getLsbRegister(); final Register msb = result.getMsbRegister(); helper.writeGetStaticsEntry64(curInstrLabel, lsb, msb, sf); vstack.push(result); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(IntItem.createConst((byte) v.getValue()));
vstack.push(ifac.createIConst((byte) v.getValue()));
public final void visit_i2b() { final IntItem v = vstack.popInt(); if (v.isConstant()) { vstack.push(IntItem.createConst((byte) v.getValue())); } else { v.loadToBITS8GPR(eContext); final Register r = v.getRegister(); os.writeMOVSX(r, r, BYTESIZE); vstack.push(v); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(IntItem.createConst((char) v.getValue()));
vstack.push(ifac.createIConst((char) v.getValue()));
public final void visit_i2c() { final IntItem v = vstack.popInt(); if (v.isConstant()) { vstack.push(IntItem.createConst((char) v.getValue())); } else { v.load(eContext); final Register r = v.getRegister(); os.writeMOVZX(r, r, WORDSIZE); vstack.push(v); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(LongItem.createConst(v.getValue()));
vstack.push(ifac.createLConst(v.getValue()));
public final void visit_i2l() { final IntItem v = vstack.popInt(); if (v.isConstant()) { vstack.push(LongItem.createConst(v.getValue())); } else { final X86RegisterPool pool = eContext.getPool(); L1AHelper.requestRegister(eContext, EAX); L1AHelper.requestRegister(eContext, EDX); v.loadTo(eContext, EAX); final LongItem result = LongItem.createReg(EAX, EDX); os.writeCDQ(); /* Sign extend EAX -> EDX:EAX */ pool.transferOwnerTo(EAX, result); pool.transferOwnerTo(EDX, result); // We do not release v, because its register (EAX) is re-used in // result // Push result vstack.push(result); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
final LongItem result = LongItem.createReg(EAX, EDX);
final LongItem result = (LongItem)ifac.createReg(JvmType.LONG, EAX, EDX);
public final void visit_i2l() { final IntItem v = vstack.popInt(); if (v.isConstant()) { vstack.push(LongItem.createConst(v.getValue())); } else { final X86RegisterPool pool = eContext.getPool(); L1AHelper.requestRegister(eContext, EAX); L1AHelper.requestRegister(eContext, EDX); v.loadTo(eContext, EAX); final LongItem result = LongItem.createReg(EAX, EDX); os.writeCDQ(); /* Sign extend EAX -> EDX:EAX */ pool.transferOwnerTo(EAX, result); pool.transferOwnerTo(EDX, result); // We do not release v, because its register (EAX) is re-used in // result // Push result vstack.push(result); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(IntItem.createConst((short) v.getValue()));
vstack.push(ifac.createIConst((short) v.getValue()));
public final void visit_i2s() { final IntItem v = vstack.popInt(); if (v.isConstant()) { vstack.push(IntItem.createConst((short) v.getValue())); } else { v.load(eContext); final Register r = v.getRegister(); os.writeMOVSX(r, r, WORDSIZE); vstack.push(v); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(IntItem.createConst(value));
vstack.push(ifac.createIConst(value));
public final void visit_iconst(int value) { vstack.push(IntItem.createConst(value)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(IntItem.createLocal(stackFrame.getEbpOffset(index)));
vstack.push(ifac.createLocal(JvmType.INT, stackFrame.getEbpOffset(index)));
public final void visit_iload(int index) { vstack.push(IntItem.createLocal(stackFrame.getEbpOffset(index))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(IntItem.createConst(-val.getValue()));
vstack.push(ifac.createIConst(-val.getValue()));
public final void visit_ineg() { final IntItem val = vstack.popInt(); val.loadIf(eContext, ~Item.Kind.CONSTANT); if (val.isConstant()) { vstack.push(IntItem.createConst(-val.getValue())); } else { os.writeNEG(val.getRegister()); vstack.push(val); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
final IntItem result = IntItem.createReg(refr);
final IntItem result = (IntItem)ifac.createReg(JvmType.INT, refr);
public final void visit_instanceof(VmConstClass classRef) { // Prepare final X86RegisterPool pool = eContext.getPool(); // Pre-claim ECX L1AHelper.requestRegister(eContext, ECX); // Load reference final RefItem ref = vstack.popRef(); ref.load(eContext); final Register refr = ref.getRegister(); // Allocate tmp registers final Register classr = L1AHelper.requestRegister(eContext, JvmType.INT, false); final Register tmpr = L1AHelper.requestRegister(eContext, JvmType.INT, false); /* Objectref is already on the stack */ writeResolveAndLoadClassToReg(classRef, classr); final Label trueLabel = new Label(this.curInstrLabel + "io-true"); final Label endLabel = new Label(this.curInstrLabel + "io-end"); /* Is instanceof? */ instanceOf(refr, classr, tmpr, trueLabel, false); /* Not instanceof */ //TODO: use setcc instead of jumps os.writeXOR(refr, refr); os.writeJMP(endLabel); os.setObjectRef(trueLabel); os.writeMOV_Const(refr, 1); // Push result os.setObjectRef(endLabel); final IntItem result = IntItem.createReg(refr); pool.transferOwnerTo(refr, result); vstack.push(result); // Release pool.release(classr); pool.release(tmpr); pool.release(ECX); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
final IntItem result = IntItem.createReg(EDX);
final IntItem result = (IntItem)ifac.createReg(JvmType.INT, EDX);
public final void visit_irem() { // Pre-claim result in EDX L1AHelper.requestRegister(eContext, EDX); final IntItem result = IntItem.createReg(EDX); eContext.getPool().transferOwnerTo(EDX, result); final IntItem v2 = vstack.popInt(); final IntItem v1 = vstack.popInt(); // v1 must be in EAX L1AHelper.requestRegister(eContext, EAX, v1); // Load v2.loadIf(eContext, ~Item.Kind.LOCAL); v1.loadTo(eContext, EAX); // Calculate os.writeCDQ(); // EAX -> EDX:EAX if (v2.isLocal()) { os.writeIDIV_EAX(FP, v2.getOffsetToFP()); } else { os.writeIDIV_EAX(v2.getRegister()); } // Result vstack.push(result); // Release v1.release(eContext); v2.release(eContext); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(IntItem.createConst((int) v.getValue()));
vstack.push(ifac.createIConst((int) v.getValue()));
public final void visit_l2i() { final LongItem v = vstack.popLong(); if (v.isConstant()) { vstack.push(IntItem.createConst((int) v.getValue())); } else { final X86RegisterPool pool = eContext.getPool(); v.load(eContext); final Register lsb = v.getLsbRegister(); v.release(eContext); pool.request(lsb); final IntItem result = IntItem.createReg(lsb); pool.transferOwnerTo(lsb, result); vstack.push(result); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
final IntItem result = IntItem.createReg(lsb);
final IntItem result = (IntItem)ifac.createReg(JvmType.INT, lsb);
public final void visit_l2i() { final LongItem v = vstack.popLong(); if (v.isConstant()) { vstack.push(IntItem.createConst((int) v.getValue())); } else { final X86RegisterPool pool = eContext.getPool(); v.load(eContext); final Register lsb = v.getLsbRegister(); v.release(eContext); pool.request(lsb); final IntItem result = IntItem.createReg(lsb); pool.transferOwnerTo(lsb, result); vstack.push(result); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(LongItem.createConst(v));
vstack.push(ifac.createLConst(v));
public final void visit_lconst(long v) { vstack.push(LongItem.createConst(v)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(LongItem.createLocal(stackFrame.getWideEbpOffset(index)));
vstack.push(ifac.createLocal(JvmType.LONG, stackFrame.getWideEbpOffset(index)));
public final void visit_lload(int index) { vstack.push(LongItem.createLocal(stackFrame.getWideEbpOffset(index))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
vstack.push(LongItem.createConst(-v.getValue()));
vstack.push(ifac.createLConst(-v.getValue()));
public final void visit_lneg() { final LongItem v = vstack.popLong(); if (v.isConstant()) { vstack.push(LongItem.createConst(-v.getValue())); } else { // Load val v.load(eContext); final Register lsb = v.getLsbRegister(); final Register msb = v.getMsbRegister(); // Calculate os.writeNEG(msb); // msb := -msb os.writeNEG(lsb); // lsb := -lsb os.writeSBB(msb, 0); // high += borrow // Push vstack.push(v); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
final LongItem result = LongItem.createReg(lsb, msb);
final LongItem result = (LongItem)ifac.createReg(JvmType.LONG, lsb, msb);
public final void visit_lshr() { final IntItem cnt = vstack.popInt(); final LongItem val = vstack.popLong(); final X86RegisterPool pool = eContext.getPool(); // Get cnt into ECX if (!cnt.uses(ECX)) { val.spillIfUsing(eContext, ECX); L1AHelper.requestRegister(eContext, ECX, cnt); cnt.loadTo(eContext, ECX); } // Load val val.load(eContext); final Register lsb = val.getLsbRegister(); final Register msb = val.getMsbRegister(); // Calculate os.writeAND(ECX, 63); os.writeCMP_Const(ECX, 32); final Label gt32Label = new Label(curInstrLabel + "gt32"); final Label endLabel = new Label(curInstrLabel + "end"); os.writeJCC(gt32Label, X86Constants.JAE); // JAE /** ECX < 32 */ os.writeSHRD_CL(lsb, msb); os.writeSAR_CL(msb); os.writeJMP(endLabel); /** ECX >= 32 */ os.setObjectRef(gt32Label); os.writeMOV(INTSIZE, lsb, msb); os.writeSAR(msb, 31); os.writeSAR_CL(lsb); os.setObjectRef(endLabel); // Push final LongItem result = LongItem.createReg(lsb, msb); pool.transferOwnerTo(lsb, result); pool.transferOwnerTo(msb, result); vstack.push(result); // Release cnt.release(eContext); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
final LongItem result = LongItem.createReg(lsb, msb);
final LongItem result = (LongItem)ifac.createReg(JvmType.LONG, lsb, msb);
public final void visit_lushr() { final IntItem cnt = vstack.popInt(); final LongItem val = vstack.popLong(); final X86RegisterPool pool = eContext.getPool(); // Get cnt into ECX if (!cnt.uses(ECX)) { val.spillIfUsing(eContext, ECX); L1AHelper.requestRegister(eContext, ECX, cnt); cnt.loadTo(eContext, ECX); } // Load val val.load(eContext); final Register lsb = val.getLsbRegister(); final Register msb = val.getMsbRegister(); // Calculate os.writeAND(ECX, 63); os.writeCMP_Const(ECX, 32); final Label gt32Label = new Label(curInstrLabel + "gt32"); final Label endLabel = new Label(curInstrLabel + "end"); os.writeJCC(gt32Label, X86Constants.JAE); // JAE /** ECX < 32 */ os.writeSHRD_CL(lsb, msb); os.writeSHR_CL(msb); os.writeJMP(endLabel); /** ECX >= 32 */ os.setObjectRef(gt32Label); os.writeMOV(INTSIZE, lsb, msb); os.writeXOR(msb, msb); os.writeSHR_CL(lsb); os.setObjectRef(endLabel); // Push final LongItem result = LongItem.createReg(lsb, msb); pool.transferOwnerTo(lsb, result); pool.transferOwnerTo(msb, result); vstack.push(result); // Release cnt.release(eContext); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
final int ofs = arrayDataOffset + (i * slotSize);
final int ofs = arrayDataOffset + (i * 4);
public final void visit_multianewarray(VmConstClass clazz, int dimensions) { // flush all vstack items to the stack // all registers are freed vstack.push(eContext); // Create the dimensions array os.writePUSH(10); /* type=int */ os.writePUSH(dimensions); /* elements */ invokeJavaMethod(context.getAllocPrimitiveArrayMethod()); final RefItem dims = vstack.popRef(); final Register dimsr = dims.getRegister(); // Dimension array is now in dimsr // Pop all dimensions (note the reverse order that allocMultiArray // expects) for (int i = 0; i < dimensions; i++) { final int ofs = arrayDataOffset + (i * slotSize); final IntItem v = vstack.popInt(); v.release1(eContext); os.writePOP(dimsr, ofs); } // Allocate tmp register final Register classr = L1AHelper.requestRegister(eContext, JvmType.REFERENCE, false); // Resolve the array class writeResolveAndLoadClassToReg(clazz, classr); // Release dims, because invokeJavaMethod needs EAX dims.release(eContext); // Now call the multianewarrayhelper os.writePUSH(classr); // array-class os.writePUSH(dimsr); // dimensions[] invokeJavaMethod(context.getAllocMultiArrayMethod()); // Result is now on the vstack // Release L1AHelper.releaseRegister(eContext, classr); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
result = FloatItem.createFPUStack();
result = (WordItem)ifac.createFPUStack(JvmType.FLOAT);
private final void waload(int jvmType) { final IntItem idx = vstack.popInt(); final RefItem ref = vstack.popRef(); final int valSize; final int scale; final int resultType; final boolean isfloat = (jvmType == JvmType.FLOAT); switch (jvmType) { case JvmType.BYTE: valSize = BYTESIZE; scale = 1; resultType = JvmType.INT; break; case JvmType.CHAR: case JvmType.SHORT: valSize = WORDSIZE; scale = 2; resultType = JvmType.INT; break; case JvmType.INT: valSize = INTSIZE; scale = 4; resultType = JvmType.INT; break; case JvmType.FLOAT: valSize = INTSIZE; scale = 4; resultType = JvmType.FLOAT; break; case JvmType.REFERENCE: valSize = INTSIZE; scale = 4; resultType = JvmType.REFERENCE; break; default: throw new IllegalArgumentException("Invalid type " + jvmType); } // Create result final WordItem result; final Register resultr; if (isfloat) { result = FloatItem.createFPUStack(); resultr = null; } else { result = L1AHelper.requestWordRegister(eContext, resultType, (valSize == BYTESIZE)); resultr = result.getRegister(); } // Load idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register refr = ref.getRegister(); // Verify checkBounds(ref, idx); if (isfloat) { FPUHelper.ensureStackCapacity(os, eContext, vstack, 1); } // Load data if (idx.isConstant()) { final int offset = idx.getValue() * scale; if (isfloat) { os.writeFLD32(refr, offset + arrayDataOffset); } else { os.writeMOV(valSize, resultr, refr, offset + arrayDataOffset); } } else { final Register idxr = idx.getRegister(); if (isfloat) { os.writeFLD32(refr, idxr, scale, arrayDataOffset); } else { os.writeMOV(valSize, resultr, refr, idxr, scale, arrayDataOffset); } } // Post process switch (jvmType) { case JvmType.BYTE: os.writeMOVSX(resultr, resultr, BYTESIZE); break; case JvmType.CHAR: os.writeMOVZX(resultr, resultr, WORDSIZE); break; case JvmType.SHORT: os.writeMOVSX(resultr, resultr, WORDSIZE); break; } // Release ref.release(eContext); idx.release(eContext); // Push result vstack.push(result); if (isfloat) { vstack.fpuStack.push(result); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
public BasicBlock(int startPC) { this(startPC, -1, false);
public BasicBlock(int startPC, int endPC, boolean startOfExceptionHandler) { this.startPC = startPC; this.endPC = endPC; this.startOfExceptionHandler = startOfExceptionHandler;
public BasicBlock(int startPC) { this(startPC, -1, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/BasicBlock.java/buggy/core/src/core/org/jnode/vm/bytecode/BasicBlock.java
throw new Error("not implemented");
if (solids.size() == 0) return new Rectangle2D.Double(0.0, 0.0, 0.0, 0.0); double xmin; double xmax; double ymin; double ymax; xmin = xmax = ((Segment) solids.elementAt(0)).P1.getX(); ymin = ymax = ((Segment) solids.elementAt(0)).P1.getY(); for (int path = 0; path < solids.size(); path++) { Rectangle2D r = ((Segment) solids.elementAt(path)).getPathBounds(); xmin = Math.min(r.getMinX(), xmin); ymin = Math.min(r.getMinY(), ymin); xmax = Math.max(r.getMaxX(), xmax); ymax = Math.max(r.getMaxY(), ymax);
public Rectangle2D getBounds2D() { // XXX Implement. throw new Error("not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/Area.java/buggy/core/src/classpath/java/java/awt/geom/Area.java
return (new Rectangle2D.Double(xmin, ymin, (xmax - xmin), (ymax - ymin))); }
public Rectangle2D getBounds2D() { // XXX Implement. throw new Error("not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/Area.java/buggy/core/src/classpath/java/java/awt/geom/Area.java
public KeyConfigure(Frame parent, String[] macros, CodePage cp) { super(parent); codePage = cp; macrosList = macros; if (OperatingSystem.isUnix() && !OperatingSystem.isMacOS()) {// if (System.getProperty("os.name").toLowerCase().indexOf("linux") != -1) {// System.out.println("using os " + os); isLinux = true; } try { jbInit(); pack(); } catch(Exception ex) { ex.printStackTrace(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
functions = new JList(lm); functions.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent lse) { if (!lse.getValueIsAdjusting()) { setKeyDescription(functions.getSelectedIndex()); } } }); loadList(LangTool.getString("key.labelKeys")); functions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); JScrollPane functionsScroll = new JScrollPane(functions); JPanel fp = new JPanel(); JComboBox whichKeys = new JComboBox(); whichKeys.addItem(LangTool.getString("key.labelKeys")); whichKeys.addItem(LangTool.getString("key.labelMacros")); whichKeys.addItem(LangTool.getString("key.labelSpecial")); whichKeys.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); loadList((String)cb.getSelectedItem()); } }); fp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("key.labelDesc"))); fp.setLayout(new BoxLayout(fp,BoxLayout.Y_AXIS)); fp.add(whichKeys); fp.add(functionsScroll); strokeDesc.setColumns(30); strokeDesc.setBackground(functions.getBackground()); strokeDesc.setEditable(false); strokeDescAlt.setColumns(30); strokeDescAlt.setBackground(functions.getBackground()); strokeDescAlt.setEditable(false); JPanel dp = new JPanel(); dp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("key.labelMapTo"))); dp.setLayout(new BoxLayout(dp,BoxLayout.Y_AXIS)); JPanel primeKeyPanel = new JPanel(); primeKeyPanel.add(strokeDesc); addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP-Prime", primeKeyPanel,true); addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE-Prime", primeKeyPanel,true); JPanel altKeyPanel = new JPanel(); altKeyPanel.add(strokeDescAlt); addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP-Alt", altKeyPanel,true); addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE-Alt", altKeyPanel,true); dp.add(primeKeyPanel); dp.add(altKeyPanel);
void jbInit() throws Exception { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); mapper = new KeyMapper(); mapper.init(); functions = new JList(lm); // add list selection listener to our functions list so that we // can display the mapped key(s) to the function when a new // function is selected. functions.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent lse) { if (!lse.getValueIsAdjusting()) { setKeyDescription(functions.getSelectedIndex()); } } }); loadList(LangTool.getString("key.labelKeys")); functions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); JScrollPane functionsScroll = new JScrollPane(functions); JPanel fp = new JPanel(); JComboBox whichKeys = new JComboBox(); whichKeys.addItem(LangTool.getString("key.labelKeys")); whichKeys.addItem(LangTool.getString("key.labelMacros")); whichKeys.addItem(LangTool.getString("key.labelSpecial")); whichKeys.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); loadList((String)cb.getSelectedItem()); } }); fp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("key.labelDesc"))); fp.setLayout(new BoxLayout(fp,BoxLayout.Y_AXIS)); fp.add(whichKeys); fp.add(functionsScroll); strokeDesc.setColumns(30); strokeDesc.setBackground(functions.getBackground()); strokeDesc.setEditable(false); strokeDescAlt.setColumns(30); strokeDescAlt.setBackground(functions.getBackground()); strokeDescAlt.setEditable(false); JPanel dp = new JPanel(); dp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("key.labelMapTo"))); dp.setLayout(new BoxLayout(dp,BoxLayout.Y_AXIS)); JPanel primeKeyPanel = new JPanel(); primeKeyPanel.add(strokeDesc); addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP-Prime", primeKeyPanel,true); addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE-Prime", primeKeyPanel,true); JPanel altKeyPanel = new JPanel(); altKeyPanel.add(strokeDescAlt); addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP-Alt", altKeyPanel,true); addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE-Alt", altKeyPanel,true); dp.add(primeKeyPanel); dp.add(altKeyPanel); keyPanel.setLayout(borderLayout); keyPanel.add(fp,BorderLayout.WEST); keyPanel.add(dp,BorderLayout.CENTER); // add the panels to our dialog getContentPane().add(keyPanel,BorderLayout.CENTER); getContentPane().add(options, BorderLayout.SOUTH); // add option buttons to options panel// addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP",options,true);// addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE",options,true); addOptButton(LangTool.getString("key.labelDone","Done"),"DONE",options,true); this.setModal(true); this.setTitle(LangTool.getString("key.title")); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // now show the world what we can do show(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
keyPanel.add(fp,BorderLayout.WEST); keyPanel.add(dp,BorderLayout.CENTER);
keyPanel.add(createFunctionsPanel(),BorderLayout.WEST); keyPanel.add(createMappingPanel(),BorderLayout.CENTER);
void jbInit() throws Exception { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); mapper = new KeyMapper(); mapper.init(); functions = new JList(lm); // add list selection listener to our functions list so that we // can display the mapped key(s) to the function when a new // function is selected. functions.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent lse) { if (!lse.getValueIsAdjusting()) { setKeyDescription(functions.getSelectedIndex()); } } }); loadList(LangTool.getString("key.labelKeys")); functions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); JScrollPane functionsScroll = new JScrollPane(functions); JPanel fp = new JPanel(); JComboBox whichKeys = new JComboBox(); whichKeys.addItem(LangTool.getString("key.labelKeys")); whichKeys.addItem(LangTool.getString("key.labelMacros")); whichKeys.addItem(LangTool.getString("key.labelSpecial")); whichKeys.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); loadList((String)cb.getSelectedItem()); } }); fp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("key.labelDesc"))); fp.setLayout(new BoxLayout(fp,BoxLayout.Y_AXIS)); fp.add(whichKeys); fp.add(functionsScroll); strokeDesc.setColumns(30); strokeDesc.setBackground(functions.getBackground()); strokeDesc.setEditable(false); strokeDescAlt.setColumns(30); strokeDescAlt.setBackground(functions.getBackground()); strokeDescAlt.setEditable(false); JPanel dp = new JPanel(); dp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("key.labelMapTo"))); dp.setLayout(new BoxLayout(dp,BoxLayout.Y_AXIS)); JPanel primeKeyPanel = new JPanel(); primeKeyPanel.add(strokeDesc); addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP-Prime", primeKeyPanel,true); addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE-Prime", primeKeyPanel,true); JPanel altKeyPanel = new JPanel(); altKeyPanel.add(strokeDescAlt); addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP-Alt", altKeyPanel,true); addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE-Alt", altKeyPanel,true); dp.add(primeKeyPanel); dp.add(altKeyPanel); keyPanel.setLayout(borderLayout); keyPanel.add(fp,BorderLayout.WEST); keyPanel.add(dp,BorderLayout.CENTER); // add the panels to our dialog getContentPane().add(keyPanel,BorderLayout.CENTER); getContentPane().add(options, BorderLayout.SOUTH); // add option buttons to options panel// addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP",options,true);// addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE",options,true); addOptButton(LangTool.getString("key.labelDone","Done"),"DONE",options,true); this.setModal(true); this.setTitle(LangTool.getString("key.title")); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // now show the world what we can do show(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
void jbInit() throws Exception { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); mapper = new KeyMapper(); mapper.init(); functions = new JList(lm); // add list selection listener to our functions list so that we // can display the mapped key(s) to the function when a new // function is selected. functions.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent lse) { if (!lse.getValueIsAdjusting()) { setKeyDescription(functions.getSelectedIndex()); } } }); loadList(LangTool.getString("key.labelKeys")); functions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); JScrollPane functionsScroll = new JScrollPane(functions); JPanel fp = new JPanel(); JComboBox whichKeys = new JComboBox(); whichKeys.addItem(LangTool.getString("key.labelKeys")); whichKeys.addItem(LangTool.getString("key.labelMacros")); whichKeys.addItem(LangTool.getString("key.labelSpecial")); whichKeys.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); loadList((String)cb.getSelectedItem()); } }); fp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("key.labelDesc"))); fp.setLayout(new BoxLayout(fp,BoxLayout.Y_AXIS)); fp.add(whichKeys); fp.add(functionsScroll); strokeDesc.setColumns(30); strokeDesc.setBackground(functions.getBackground()); strokeDesc.setEditable(false); strokeDescAlt.setColumns(30); strokeDescAlt.setBackground(functions.getBackground()); strokeDescAlt.setEditable(false); JPanel dp = new JPanel(); dp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("key.labelMapTo"))); dp.setLayout(new BoxLayout(dp,BoxLayout.Y_AXIS)); JPanel primeKeyPanel = new JPanel(); primeKeyPanel.add(strokeDesc); addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP-Prime", primeKeyPanel,true); addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE-Prime", primeKeyPanel,true); JPanel altKeyPanel = new JPanel(); altKeyPanel.add(strokeDescAlt); addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP-Alt", altKeyPanel,true); addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE-Alt", altKeyPanel,true); dp.add(primeKeyPanel); dp.add(altKeyPanel); keyPanel.setLayout(borderLayout); keyPanel.add(fp,BorderLayout.WEST); keyPanel.add(dp,BorderLayout.CENTER); // add the panels to our dialog getContentPane().add(keyPanel,BorderLayout.CENTER); getContentPane().add(options, BorderLayout.SOUTH); // add option buttons to options panel// addOptButton(LangTool.getString("key.labelMap","Map Key"),"MAP",options,true);// addOptButton(LangTool.getString("key.labelRemove","Remove"),"REMOVE",options,true); addOptButton(LangTool.getString("key.labelDone","Done"),"DONE",options,true); this.setModal(true); this.setTitle(LangTool.getString("key.title")); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // now show the world what we can do show(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
final KeyGetter kg = new KeyGetter();
final KeyGetterInterface kg = getMeAKeyProcessor();
private void mapIt() { Object[] message = new Object[1]; JPanel kgp = new JPanel(); final KeyGetter kg = new KeyGetter(); kg.setForeground(Color.blue); message[0] = kgp; String function; if (functions.getSelectedValue() instanceof String) function = (String)functions.getSelectedValue(); else if (functions.getSelectedValue() instanceof Macro) { function = ((Macro)functions.getSelectedValue()).toString(); } else function = ((KeyDescription)functions.getSelectedValue()).toString(); kg.setText(LangTool.getString("key.labelMessage") + function); kgp.add(kg); String[] options = new String[1]; options[0] = LangTool.getString("key.labelClose"); JOptionPane opain = new JOptionPane(message, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, // option type null, options, options[0]); dialog = opain.createDialog(this, getTitle()); // add window listener to the dialog so that we can place focus on the // key getter label instead of default and set the new key value when // the window is closed. dialog.addWindowListener(new WindowAdapter() { boolean gotFocus = false; public void windowClosed(WindowEvent we) { setNewKeyStrokes(kg.keyevent); } public void windowActivated(WindowEvent we) { // Once window gets focus, set initial focus to our KeyGetter // component if (!gotFocus) { kg.grabFocus(); gotFocus = true; } } }); dialog.setVisible(true); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
kg.setDialog(dialog);
private void mapIt() { Object[] message = new Object[1]; JPanel kgp = new JPanel(); final KeyGetter kg = new KeyGetter(); kg.setForeground(Color.blue); message[0] = kgp; String function; if (functions.getSelectedValue() instanceof String) function = (String)functions.getSelectedValue(); else if (functions.getSelectedValue() instanceof Macro) { function = ((Macro)functions.getSelectedValue()).toString(); } else function = ((KeyDescription)functions.getSelectedValue()).toString(); kg.setText(LangTool.getString("key.labelMessage") + function); kgp.add(kg); String[] options = new String[1]; options[0] = LangTool.getString("key.labelClose"); JOptionPane opain = new JOptionPane(message, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, // option type null, options, options[0]); dialog = opain.createDialog(this, getTitle()); // add window listener to the dialog so that we can place focus on the // key getter label instead of default and set the new key value when // the window is closed. dialog.addWindowListener(new WindowAdapter() { boolean gotFocus = false; public void windowClosed(WindowEvent we) { setNewKeyStrokes(kg.keyevent); } public void windowActivated(WindowEvent we) { // Once window gets focus, set initial focus to our KeyGetter // component if (!gotFocus) { kg.grabFocus(); gotFocus = true; } } }); dialog.setVisible(true); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
mapper.removeKeyStroke(mnemonicData[index]); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index]));
String function = mnemonicData[index]; if (altKey) function += KeyStroker.altSuffix; mapper.removeKeyStroke(function); setKeyInformation(function);
private void removeIt() { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); mapper.removeKeyStroke(mnemonicData[index]); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index])); } else { if (macros) { Object o = functions.getSelectedValue(); String name; if (o instanceof Macro) { name = ((Macro)o).getFullName(); } else { name = (String)o; } mapper.removeKeyStroke(name); strokeDesc.setText(mapper.getKeyStrokeDesc( name)); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
strokeDesc.setText(mapper.getKeyStrokeDesc( name));
setKeyInformation(name);
private void removeIt() { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); mapper.removeKeyStroke(mnemonicData[index]); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index])); } else { if (macros) { Object o = functions.getSelectedValue(); String name; if (o instanceof Macro) { name = ((Macro)o).getFullName(); } else { name = (String)o; } mapper.removeKeyStroke(name); strokeDesc.setText(mapper.getKeyStrokeDesc( name)); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue()));
setKeyInformation(k);
private void removeIt() { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); mapper.removeKeyStroke(mnemonicData[index]); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[index])); } else { if (macros) { Object o = functions.getSelectedValue(); String name; if (o instanceof Macro) { name = ((Macro)o).getFullName(); } else { name = (String)o; } mapper.removeKeyStroke(name); strokeDesc.setText(mapper.getKeyStrokeDesc( name)); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
strokeDesc.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()])); strokeDescAlt.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()] + ".alt2"));
setKeyInformation(mnemonicData[kd.getIndex()]);
private void setKeyDescription(int index) { // This try and catch is to fix a problem in JDK1.4-betas try { if (!macros && !special) { KeyDescription kd = (KeyDescription)lm.getElementAt(index); strokeDesc.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()])); strokeDescAlt.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()] + ".alt2")); } else { if (macros) { Object o = lm.getElementAt(index); if (o instanceof String) { System.out.println((String)o); strokeDesc.setText(mapper.getKeyStrokeDesc((String)o)); strokeDescAlt.setText(mapper.getKeyStrokeDesc((String)o + ".alt2")); } else if (o instanceof Macro) { Macro m = (Macro)o; strokeDesc.setText(mapper.getKeyStrokeDesc(m.getFullName())); strokeDescAlt.setText(mapper.getKeyStrokeDesc(m.getFullName() + ".alt2")); } } if (special) { System.out.println((String)lm.getElementAt(index)); String k = parseSpecialCharacter((String)lm.getElementAt(index)); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } } catch (ArrayIndexOutOfBoundsException ar) { System.out.println("ar at index " + index + " - " + ar.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
strokeDesc.setText(mapper.getKeyStrokeDesc((String)o)); strokeDescAlt.setText(mapper.getKeyStrokeDesc((String)o + ".alt2"));
setKeyInformation((String)o);
private void setKeyDescription(int index) { // This try and catch is to fix a problem in JDK1.4-betas try { if (!macros && !special) { KeyDescription kd = (KeyDescription)lm.getElementAt(index); strokeDesc.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()])); strokeDescAlt.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()] + ".alt2")); } else { if (macros) { Object o = lm.getElementAt(index); if (o instanceof String) { System.out.println((String)o); strokeDesc.setText(mapper.getKeyStrokeDesc((String)o)); strokeDescAlt.setText(mapper.getKeyStrokeDesc((String)o + ".alt2")); } else if (o instanceof Macro) { Macro m = (Macro)o; strokeDesc.setText(mapper.getKeyStrokeDesc(m.getFullName())); strokeDescAlt.setText(mapper.getKeyStrokeDesc(m.getFullName() + ".alt2")); } } if (special) { System.out.println((String)lm.getElementAt(index)); String k = parseSpecialCharacter((String)lm.getElementAt(index)); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } } catch (ArrayIndexOutOfBoundsException ar) { System.out.println("ar at index " + index + " - " + ar.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
strokeDesc.setText(mapper.getKeyStrokeDesc(m.getFullName())); strokeDescAlt.setText(mapper.getKeyStrokeDesc(m.getFullName() + ".alt2"));
setKeyInformation(m.getFullName());
private void setKeyDescription(int index) { // This try and catch is to fix a problem in JDK1.4-betas try { if (!macros && !special) { KeyDescription kd = (KeyDescription)lm.getElementAt(index); strokeDesc.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()])); strokeDescAlt.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()] + ".alt2")); } else { if (macros) { Object o = lm.getElementAt(index); if (o instanceof String) { System.out.println((String)o); strokeDesc.setText(mapper.getKeyStrokeDesc((String)o)); strokeDescAlt.setText(mapper.getKeyStrokeDesc((String)o + ".alt2")); } else if (o instanceof Macro) { Macro m = (Macro)o; strokeDesc.setText(mapper.getKeyStrokeDesc(m.getFullName())); strokeDescAlt.setText(mapper.getKeyStrokeDesc(m.getFullName() + ".alt2")); } } if (special) { System.out.println((String)lm.getElementAt(index)); String k = parseSpecialCharacter((String)lm.getElementAt(index)); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } } catch (ArrayIndexOutOfBoundsException ar) { System.out.println("ar at index " + index + " - " + ar.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
strokeDesc.setText(mapper.getKeyStrokeDesc(k));
setKeyInformation(k);
private void setKeyDescription(int index) { // This try and catch is to fix a problem in JDK1.4-betas try { if (!macros && !special) { KeyDescription kd = (KeyDescription)lm.getElementAt(index); strokeDesc.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()])); strokeDescAlt.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()] + ".alt2")); } else { if (macros) { Object o = lm.getElementAt(index); if (o instanceof String) { System.out.println((String)o); strokeDesc.setText(mapper.getKeyStrokeDesc((String)o)); strokeDescAlt.setText(mapper.getKeyStrokeDesc((String)o + ".alt2")); } else if (o instanceof Macro) { Macro m = (Macro)o; strokeDesc.setText(mapper.getKeyStrokeDesc(m.getFullName())); strokeDescAlt.setText(mapper.getKeyStrokeDesc(m.getFullName() + ".alt2")); } } if (special) { System.out.println((String)lm.getElementAt(index)); String k = parseSpecialCharacter((String)lm.getElementAt(index)); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } } catch (ArrayIndexOutOfBoundsException ar) { System.out.println("ar at index " + index + " - " + ar.getMessage()); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
stroke += ".alt2";
stroke += KeyStroker.altSuffix;
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } if (altKey) strokeDescAlt.setText(mapper.getKeyStrokeDesc( stroke)); else strokeDesc.setText(mapper.getKeyStrokeDesc( stroke)); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); strokeDesc.setText(mapper.getKeyStrokeDesc( macro)); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue());// k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
if (altKey) strokeDescAlt.setText(mapper.getKeyStrokeDesc( stroke)); else strokeDesc.setText(mapper.getKeyStrokeDesc( stroke));
setKeyInformation(stroke);
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } if (altKey) strokeDescAlt.setText(mapper.getKeyStrokeDesc( stroke)); else strokeDesc.setText(mapper.getKeyStrokeDesc( stroke)); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); strokeDesc.setText(mapper.getKeyStrokeDesc( macro)); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue());// k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
strokeDesc.setText(mapper.getKeyStrokeDesc( macro));
setKeyInformation(macro);
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } if (altKey) strokeDescAlt.setText(mapper.getKeyStrokeDesc( stroke)); else strokeDesc.setText(mapper.getKeyStrokeDesc( stroke)); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); strokeDesc.setText(mapper.getKeyStrokeDesc( macro)); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue());// k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
if (altKey) k += KeyStroker.altSuffix;
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } if (altKey) strokeDescAlt.setText(mapper.getKeyStrokeDesc( stroke)); else strokeDesc.setText(mapper.getKeyStrokeDesc( stroke)); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); strokeDesc.setText(mapper.getKeyStrokeDesc( macro)); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue());// k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
strokeDesc.setText(mapper.getKeyStrokeDesc(k));
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } if (altKey) strokeDescAlt.setText(mapper.getKeyStrokeDesc( stroke)); else strokeDesc.setText(mapper.getKeyStrokeDesc( stroke)); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); strokeDesc.setText(mapper.getKeyStrokeDesc( macro)); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue());// k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
setKeyInformation(k);
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,isAltGr); } else { mapper.setKeyStroke(stroke,ke); } if (altKey) strokeDescAlt.setText(mapper.getKeyStrokeDesc( stroke)); else strokeDesc.setText(mapper.getKeyStrokeDesc( stroke)); } else { if (macros) { Object o = functions.getSelectedValue(); String macro; if (o instanceof Macro) macro = ((Macro)o).getFullName(); else macro = (String)o; System.out.println(macro); if (isLinux) mapper.setKeyStroke(macro,ke,isAltGr); else mapper.setKeyStroke(macro,ke); strokeDesc.setText(mapper.getKeyStrokeDesc( macro)); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = parseSpecialCharacter((String)functions.getSelectedValue());// k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke(k); if (isLinux) { mapper.setKeyStroke(k,ke,isAltGr); } else { mapper.setKeyStroke(k,ke); } strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/f0a8e10b9cbace1873081b0eff1f43d1e60516b0/KeyConfigure.java/clean/tn5250j/src/org/tn5250j/keyboard/configure/KeyConfigure.java
setText((String)(act.getValue(Action.NAME)));
setText((String) (act.getValue(Action.NAME)));
public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals("enabled")) setEnabled(act.isEnabled()); else if (e.getPropertyName().equals(Action.NAME)) setText((String)(act.getValue(Action.NAME))); else if (e.getPropertyName().equals(Action.SMALL_ICON)) setIcon((Icon)(act.getValue(Action.SMALL_ICON))); else if (e.getPropertyName().equals(Action.SHORT_DESCRIPTION)) setToolTipText((String)(act.getValue(Action.SHORT_DESCRIPTION))); else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) if (act.getValue(Action.MNEMONIC_KEY) != null) setMnemonic(((Integer)(act.getValue(Action.MNEMONIC_KEY))).intValue()); else if (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY)) setActionCommand((String)(act.getValue(Action.ACTION_COMMAND_KEY))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/AbstractButton.java/clean/core/src/classpath/javax/javax/swing/AbstractButton.java
setIcon((Icon)(act.getValue(Action.SMALL_ICON)));
setIcon((Icon) (act.getValue(Action.SMALL_ICON)));
public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals("enabled")) setEnabled(act.isEnabled()); else if (e.getPropertyName().equals(Action.NAME)) setText((String)(act.getValue(Action.NAME))); else if (e.getPropertyName().equals(Action.SMALL_ICON)) setIcon((Icon)(act.getValue(Action.SMALL_ICON))); else if (e.getPropertyName().equals(Action.SHORT_DESCRIPTION)) setToolTipText((String)(act.getValue(Action.SHORT_DESCRIPTION))); else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) if (act.getValue(Action.MNEMONIC_KEY) != null) setMnemonic(((Integer)(act.getValue(Action.MNEMONIC_KEY))).intValue()); else if (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY)) setActionCommand((String)(act.getValue(Action.ACTION_COMMAND_KEY))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/AbstractButton.java/clean/core/src/classpath/javax/javax/swing/AbstractButton.java
setToolTipText((String)(act.getValue(Action.SHORT_DESCRIPTION)));
setToolTipText((String) (act.getValue(Action.SHORT_DESCRIPTION)));
public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals("enabled")) setEnabled(act.isEnabled()); else if (e.getPropertyName().equals(Action.NAME)) setText((String)(act.getValue(Action.NAME))); else if (e.getPropertyName().equals(Action.SMALL_ICON)) setIcon((Icon)(act.getValue(Action.SMALL_ICON))); else if (e.getPropertyName().equals(Action.SHORT_DESCRIPTION)) setToolTipText((String)(act.getValue(Action.SHORT_DESCRIPTION))); else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) if (act.getValue(Action.MNEMONIC_KEY) != null) setMnemonic(((Integer)(act.getValue(Action.MNEMONIC_KEY))).intValue()); else if (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY)) setActionCommand((String)(act.getValue(Action.ACTION_COMMAND_KEY))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/AbstractButton.java/clean/core/src/classpath/javax/javax/swing/AbstractButton.java
setMnemonic(((Integer)(act.getValue(Action.MNEMONIC_KEY))).intValue());
setMnemonic(((Integer) (act.getValue(Action.MNEMONIC_KEY))) .intValue());
public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals("enabled")) setEnabled(act.isEnabled()); else if (e.getPropertyName().equals(Action.NAME)) setText((String)(act.getValue(Action.NAME))); else if (e.getPropertyName().equals(Action.SMALL_ICON)) setIcon((Icon)(act.getValue(Action.SMALL_ICON))); else if (e.getPropertyName().equals(Action.SHORT_DESCRIPTION)) setToolTipText((String)(act.getValue(Action.SHORT_DESCRIPTION))); else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) if (act.getValue(Action.MNEMONIC_KEY) != null) setMnemonic(((Integer)(act.getValue(Action.MNEMONIC_KEY))).intValue()); else if (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY)) setActionCommand((String)(act.getValue(Action.ACTION_COMMAND_KEY))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/AbstractButton.java/clean/core/src/classpath/javax/javax/swing/AbstractButton.java
setActionCommand((String)(act.getValue(Action.ACTION_COMMAND_KEY)));
setActionCommand((String) (act.getValue(Action.ACTION_COMMAND_KEY)));
public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals("enabled")) setEnabled(act.isEnabled()); else if (e.getPropertyName().equals(Action.NAME)) setText((String)(act.getValue(Action.NAME))); else if (e.getPropertyName().equals(Action.SMALL_ICON)) setIcon((Icon)(act.getValue(Action.SMALL_ICON))); else if (e.getPropertyName().equals(Action.SHORT_DESCRIPTION)) setToolTipText((String)(act.getValue(Action.SHORT_DESCRIPTION))); else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) if (act.getValue(Action.MNEMONIC_KEY) != null) setMnemonic(((Integer)(act.getValue(Action.MNEMONIC_KEY))).intValue()); else if (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY)) setActionCommand((String)(act.getValue(Action.ACTION_COMMAND_KEY))); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/AbstractButton.java/clean/core/src/classpath/javax/javax/swing/AbstractButton.java
public byte[] getINodeTableBlock(int blockNo) throws FileSystemException, IOException{
public synchronized byte[] getINodeTableBlock(int blockNo) throws FileSystemException, IOException{
public byte[] getINodeTableBlock(int blockNo) throws FileSystemException, IOException{ if(blockNo < blockCount) return fs.getBlock(firstBlock+blockNo); else throw new FileSystemException("Trying to get block #"+blockNo+ "of an inode table that only has "+blockCount+" blocks"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/INodeTable.java/clean/fs/src/fs/org/jnode/fs/ext2/INodeTable.java
public byte[] getInodeData(int index) throws IOException, FileSystemException{
public synchronized byte[] getInodeData(int index) throws IOException, FileSystemException{
public byte[] getInodeData(int index) throws IOException, FileSystemException{ byte data[] = new byte[INode.INODE_LENGTH]; int indexCopied = 0; while(indexCopied<INode.INODE_LENGTH) { int blockNo = (index*INode.INODE_LENGTH+indexCopied) / blockSize; int blockOffset = (index*INode.INODE_LENGTH+indexCopied) % blockSize; int copyLength = Math.min(blockSize-blockOffset, INode.INODE_LENGTH); System.arraycopy( getINodeTableBlock(blockNo), blockOffset, data, indexCopied, copyLength); indexCopied+=copyLength; } return data; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/INodeTable.java/clean/fs/src/fs/org/jnode/fs/ext2/INodeTable.java
public void writeINodeTableBlock(byte[] data, int blockNo) throws FileSystemException, IOException {
public synchronized void writeINodeTableBlock(byte[] data, int blockNo) throws FileSystemException, IOException {
public void writeINodeTableBlock(byte[] data, int blockNo) throws FileSystemException, IOException { if(blockNo < blockCount) fs.writeBlock(firstBlock+blockNo, data, false); else throw new FileSystemException("Trying to write block #"+blockNo+ "of an inode table that only has "+blockCount+" blocks"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/INodeTable.java/clean/fs/src/fs/org/jnode/fs/ext2/INodeTable.java
public void writeInodeData(int index, byte[] data) throws IOException, FileSystemException {
public synchronized void writeInodeData(int index, byte[] data) throws IOException, FileSystemException {
public void writeInodeData(int index, byte[] data) throws IOException, FileSystemException { int indexCopied = 0; while(indexCopied<INode.INODE_LENGTH) { int blockNo = (index*INode.INODE_LENGTH+indexCopied) / blockSize; int blockOffset = (index*INode.INODE_LENGTH+indexCopied) % blockSize; int copyLength = Math.min(blockSize-blockOffset, INode.INODE_LENGTH); byte[] originalBlock = getINodeTableBlock(blockNo); System.arraycopy( data, indexCopied, originalBlock, blockOffset, copyLength); indexCopied+=copyLength; writeINodeTableBlock(originalBlock, blockNo); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/INodeTable.java/clean/fs/src/fs/org/jnode/fs/ext2/INodeTable.java
}
}
public void writeInodeData(int index, byte[] data) throws IOException, FileSystemException { int indexCopied = 0; while(indexCopied<INode.INODE_LENGTH) { int blockNo = (index*INode.INODE_LENGTH+indexCopied) / blockSize; int blockOffset = (index*INode.INODE_LENGTH+indexCopied) % blockSize; int copyLength = Math.min(blockSize-blockOffset, INode.INODE_LENGTH); byte[] originalBlock = getINodeTableBlock(blockNo); System.arraycopy( data, indexCopied, originalBlock, blockOffset, copyLength); indexCopied+=copyLength; writeINodeTableBlock(originalBlock, blockNo); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/INodeTable.java/clean/fs/src/fs/org/jnode/fs/ext2/INodeTable.java
checkValidInput();
public void insertString(DocumentFilter.FilterBypass bypass, int offset, String text, AttributeSet attributes) throws BadLocationException { super.insertString(bypass, offset, text, attributes); commitIfAllowed(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/20f5673386408fafdc5023d9aa75062c49b110c6/DefaultFormatter.java/clean/core/src/classpath/javax/javax/swing/text/DefaultFormatter.java
checkValidInput();
public void remove(DocumentFilter.FilterBypass bypass, int offset, int length) throws BadLocationException { super.remove(bypass, offset, length); commitIfAllowed(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/20f5673386408fafdc5023d9aa75062c49b110c6/DefaultFormatter.java/clean/core/src/classpath/javax/javax/swing/text/DefaultFormatter.java