rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
void setSelectionInterval(int index0, int index1);
void setSelectionInterval(int anchor, int lead);
void setSelectionInterval(int index0, int index1);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/ListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/ListSelectionModel.java
void setSelectionMode(int a);
void setSelectionMode(int mode);
void setSelectionMode(int a);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/ListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/ListSelectionModel.java
protected void resolve() throws PluginException {
protected void resolve(PluginRegistryModel registry) throws PluginException {
protected void resolve() throws PluginException { for (int i = 0; i < libraries.length; i++) { libraries[i].resolve(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a4bc60fa9952eee4e8b6801b3a5736f52717054a/RuntimeModel.java/clean/core/src/core/org/jnode/plugin/model/RuntimeModel.java
libraries[i].resolve();
libraries[i].resolve(registry);
protected void resolve() throws PluginException { for (int i = 0; i < libraries.length; i++) { libraries[i].resolve(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a4bc60fa9952eee4e8b6801b3a5736f52717054a/RuntimeModel.java/clean/core/src/core/org/jnode/plugin/model/RuntimeModel.java
protected void unresolve() throws PluginException {
protected void unresolve(PluginRegistryModel registry) throws PluginException {
protected void unresolve() throws PluginException { for (int i = 0; i < libraries.length; i++) { libraries[i].unresolve(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a4bc60fa9952eee4e8b6801b3a5736f52717054a/RuntimeModel.java/clean/core/src/core/org/jnode/plugin/model/RuntimeModel.java
libraries[i].unresolve();
libraries[i].unresolve(registry);
protected void unresolve() throws PluginException { for (int i = 0; i < libraries.length; i++) { libraries[i].unresolve(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a4bc60fa9952eee4e8b6801b3a5736f52717054a/RuntimeModel.java/clean/core/src/core/org/jnode/plugin/model/RuntimeModel.java
return false;
return all;
private boolean evaluateImpl(Node context, int pos, int len) { Object left = lhs.evaluate(context, pos, len); Object right = rhs.evaluate(context, pos, len); /* * If both objects to be compared are node-sets, then the comparison * will be true if and only if there is a node in the first node-set and * a node in the second node-set such that the result of performing the * comparison on the string-values of the two nodes is true. */ boolean flns = left instanceof Collection; boolean frns = right instanceof Collection; if (flns && frns) { Collection lns = (Collection) left; Collection rns = (Collection) right; boolean all = true; for (Iterator i = lns.iterator(); i.hasNext(); ) { Node ltest = (Node) i.next(); for (Iterator j = rns.iterator(); j.hasNext(); ) { Node rtest = (Node) j.next(); if (ltest == rtest || ltest.equals(rtest)) { // much shorter if (!invert) { return true; } } else if (stringValue(ltest).equals(stringValue(rtest))) { if (!invert) { return true; } } else { all = false; } } } return false; } /* * If one object to be compared is a node-set and the other is a number, * then the comparison will be true if and only if there is a node in * the node-set such that the result of performing the comparison on the * number to be compared and on the result of converting the * string-value of that node to a number using the number function is * true. */ boolean fln = left instanceof Double; boolean frn = right instanceof Double; if ((flns && frn) || (frns && fln)) { Collection ns = flns ? (Collection) left : (Collection) right; double n = fln ? ((Double) left).doubleValue() : ((Double) right).doubleValue(); boolean all = true; for (Iterator i = ns.iterator(); i.hasNext(); ) { Node test = (Node) i.next(); double nn = _number(context, stringValue(test)); if (nn == n) { if (!invert) { return true; } } else { all = false; } } return invert ? all : false; } /* * If one object to be compared is a node-set and the other is a * string, then the comparison will be true if and only if there is a * node in the node-set such that the result of performing the * comparison on the string-value of the node and the other string is * true. */ boolean fls = left instanceof String; boolean frs = right instanceof String; if ((flns && frs) || (frns && fls)) { Collection ns = flns ? (Collection) left : (Collection) right; String s = fls ? (String) left : (String) right; boolean all = true; for (Iterator i = ns.iterator(); i.hasNext(); ) { Node test = (Node) i.next(); if (stringValue(test).equals(s)) { if (!invert) { return true; } } else { all = false; } } return invert ? all : false; } /* * If one object to be compared is a node-set and the other is a * boolean, then the comparison will be true if and only if the result * of performing the comparison on the boolean and on the result of * converting the node-set to a boolean using the boolean function is * true. */ boolean flb = left instanceof Boolean; boolean frb = right instanceof Boolean; if ((flns && frb) || (frns && flb)) { Collection ns = flns ? (Collection) left : (Collection) right; boolean b = flb ? ((Boolean) left).booleanValue() : ((Boolean) right).booleanValue(); return _boolean(context, ns) == b; } /* * If at least one object to be compared is a boolean, then each object * to be compared is converted to a boolean as if by applying the * boolean function. */ if (flb || frb) { boolean lb = flb ? ((Boolean) left).booleanValue() : _boolean(context, left); boolean rb = frb ? ((Boolean) right).booleanValue() : _boolean(context, right); return lb == rb; } /* * Otherwise, if at least one object to be compared is * a number, then each object to be compared is converted to a number as * if by applying the number function. */ if (fln || frn) { double ln = fln ? ((Double) left).doubleValue() : _number(context, left); double rn = frn ? ((Double) right).doubleValue() : _number(context, right); return ln == rn; } /* * Otherwise, both objects to be * compared are converted to strings as if by applying the string * function. */ String ls = fls ? (String) left : _string(context, left); String rs = frs ? (String) right : _string(context, right); return ls.equals(rs); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e81465c8dc08fe3c0a055c4bb1c2588e37b39c25/EqualityExpr.java/clean/core/src/classpath/gnu/gnu/xml/xpath/EqualityExpr.java
AxisInterface axis0 = (AxisInterface) CurrentArray.getAxisList().get(0); AxisInterface axis1 = (AxisInterface) CurrentArray.getAxisList().get(1);
public void action () { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if(DataNodeLevel != 0) return; // now we are ready to read in untagged data (both delimited/formmatted styles) // from the DATABLOCK // Note: unfortunately we are reduced to using regex style matching // instead of a buffer read in formatted reads. Come back and // improve this later if possible. XMLDataIOStyle formatObj = CurrentArray.getXMLDataIOStyle(); if ( formatObj instanceof DelimitedXMLDataIOStyle || formatObj instanceof FormattedXMLDataIOStyle ) { // determine the size of the dataFormat (s) in our dataCube if (CurrentArray.hasFieldAxis()) { // if there is a field axis, then its set to the number of fields FieldAxis fieldAxis = CurrentArray.getFieldAxis(); MaxDataFormatIndex = (fieldAxis.getLength()-1); } else { // its homogeneous MaxDataFormatIndex = 0; } Locator myLocator = CurrentArray.createLocator();AxisInterface axis0 = (AxisInterface) CurrentArray.getAxisList().get(0); AxisInterface axis1 = (AxisInterface) CurrentArray.getAxisList().get(1); CurrentDataFormatIndex = 0; // boolean dataHasSpecialIntegers = false; // set up appropriate instructions for reading if ( formatObj instanceof FormattedXMLDataIOStyle ) {/* $template = $formatObj->_templateNotation(1); $recordSize = $formatObj->bytes(); $data_has_special_integers = $formatObj->hasSpecialIntegers;*/ Log.errorln("FORMATTED DATA READ NOT SUPPORTED"); } else { // snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects( DATABLOCK.toString(), ((DelimitedXMLDataIOStyle) formatObj).getDelimiter(), ((DelimitedXMLDataIOStyle) formatObj).getRepeatable(), ((DelimitedXMLDataIOStyle) formatObj).getRecordTerminator() ); // fire data into dataCube Iterator iter = strValueList.iterator(); while (iter.hasNext()) { DataFormat CurrentDataFormat = DataFormatList[CurrentDataFormatIndex]; // adding data based on what type.. addDataToCurrentArray(myLocator, (String) iter.next(), CurrentDataFormat); // bump up DataFormat appropriately if (MaxDataFormatIndex > 0) { int currentFastAxisCoordinate = myLocator.getAxisLocation(FastestAxis); if ( currentFastAxisCoordinate != LastFastAxisCoordinate ) { LastFastAxisCoordinate = currentFastAxisCoordinate; if (CurrentDataFormatIndex == MaxDataFormatIndex) CurrentDataFormatIndex = 0; else CurrentDataFormatIndex++; } }Log.errorln("Location:["+myLocator.getAxisLocation(axis0)+","+myLocator.getAxisLocation(axis1)+"]"); myLocator.next(); } } } else if ( formatObj instanceof TaggedXMLDataIOStyle ) { // Tagged case: do nothing } else { Log.errorln("ERROR: Completely unknown DATA IO style:"+formatObj.toString() +" aborting read!"); System.exit(-1); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
Log.errorln("Location:["+myLocator.getAxisLocation(axis0)+","+myLocator.getAxisLocation(axis1)+"]");
public void action () { // we stopped reading datanode, lower count by one DataNodeLevel--; // we might still be nested within a data node // if so, return now to accumulate more data within the DATABLOCK if(DataNodeLevel != 0) return; // now we are ready to read in untagged data (both delimited/formmatted styles) // from the DATABLOCK // Note: unfortunately we are reduced to using regex style matching // instead of a buffer read in formatted reads. Come back and // improve this later if possible. XMLDataIOStyle formatObj = CurrentArray.getXMLDataIOStyle(); if ( formatObj instanceof DelimitedXMLDataIOStyle || formatObj instanceof FormattedXMLDataIOStyle ) { // determine the size of the dataFormat (s) in our dataCube if (CurrentArray.hasFieldAxis()) { // if there is a field axis, then its set to the number of fields FieldAxis fieldAxis = CurrentArray.getFieldAxis(); MaxDataFormatIndex = (fieldAxis.getLength()-1); } else { // its homogeneous MaxDataFormatIndex = 0; } Locator myLocator = CurrentArray.createLocator();AxisInterface axis0 = (AxisInterface) CurrentArray.getAxisList().get(0); AxisInterface axis1 = (AxisInterface) CurrentArray.getAxisList().get(1); CurrentDataFormatIndex = 0; // boolean dataHasSpecialIntegers = false; // set up appropriate instructions for reading if ( formatObj instanceof FormattedXMLDataIOStyle ) {/* $template = $formatObj->_templateNotation(1); $recordSize = $formatObj->bytes(); $data_has_special_integers = $formatObj->hasSpecialIntegers;*/ Log.errorln("FORMATTED DATA READ NOT SUPPORTED"); } else { // snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects( DATABLOCK.toString(), ((DelimitedXMLDataIOStyle) formatObj).getDelimiter(), ((DelimitedXMLDataIOStyle) formatObj).getRepeatable(), ((DelimitedXMLDataIOStyle) formatObj).getRecordTerminator() ); // fire data into dataCube Iterator iter = strValueList.iterator(); while (iter.hasNext()) { DataFormat CurrentDataFormat = DataFormatList[CurrentDataFormatIndex]; // adding data based on what type.. addDataToCurrentArray(myLocator, (String) iter.next(), CurrentDataFormat); // bump up DataFormat appropriately if (MaxDataFormatIndex > 0) { int currentFastAxisCoordinate = myLocator.getAxisLocation(FastestAxis); if ( currentFastAxisCoordinate != LastFastAxisCoordinate ) { LastFastAxisCoordinate = currentFastAxisCoordinate; if (CurrentDataFormatIndex == MaxDataFormatIndex) CurrentDataFormatIndex = 0; else CurrentDataFormatIndex++; } }Log.errorln("Location:["+myLocator.getAxisLocation(axis0)+","+myLocator.getAxisLocation(axis1)+"]"); myLocator.next(); } } } else if ( formatObj instanceof TaggedXMLDataIOStyle ) { // Tagged case: do nothing } else { Log.errorln("ERROR: Completely unknown DATA IO style:"+formatObj.toString() +" aborting read!"); System.exit(-1); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
Log.errorln("FOR Start handler not implemented yet.");
for (int i = 0; i < attrs.getLength(); i++) { String name = attrs.getName(i); if (name.equals("axisIdRef") ) { AxisReadOrder.add(AxisObj.get(attrs.getValue(i))); } else Log.warnln("Warning: got weird attribute:"+name+" on for node"); }
public void action (AttributeList attrs) { Log.errorln("FOR Start handler not implemented yet."); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
AxisReadOrder = new ArrayList();
public void action (AttributeList attrs) { // save these for later, when we know what kind of dataIOstyle we got DataIOStyleAttribs = attrs; // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
ArrayList axisList = (ArrayList) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1);
Axis lastAxisObject = (Axis) CurrentArray.getAxisList().get(CurrentArray.getAxisList().size()-1);
public void action (AttributeList attrs) { // grab parent node name String gParentNodeName = getGrandParentNodeName(); // create new object appropriately Unit newunit = new Unit(); newunit.setXMLAttributes(attrs); // determine where this goes and then insert it if( gParentNodeName.equals(XDFNodeName.PARAMETER) ) { newunit = LastParameterObject.addUnit(newunit); } else if ( gParentNodeName.equals(XDFNodeName.FIELD) ) { newunit = LastFieldObject.addUnit(newunit); } else if ( gParentNodeName.equals(XDFNodeName.AXIS) ) { ArrayList axisList = (ArrayList) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); newunit = lastAxisObject.addUnit(newunit); } else if ( gParentNodeName.equals(XDFNodeName.ARRAY) ) { newunit = CurrentArray.addUnit(newunit); } else { Log.warnln("Unknown grandparent object, cant add unit, ignoring."); } LastUnitObject = newunit; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable");
public void action (char buf [], int offset, int len) { String valueListString = new String (buf, offset, len); // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
CurrentValueListParameter.put("isDelimitedCase", "true");
public void action (char buf [], int offset, int len) { String valueListString = new String (buf, offset, len); // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
CurrentValueListParameter = new Hashtable();
public void action (AttributeList attrs) { // 1. grab parent node name String parentNodeName = getParentNodeName(); // 2. try to determine values from attributes (e.g. algorithm method) ArrayList values = getValueListNodeValues(attrs); // 3. IT could be that no values exist because they are stored // in PCDATA rather than as algorithm (treat in char data handler // in this case). if(values.size() > 0 ) { // algoritm case ArrayList valueObjList = new ArrayList(); if( parentNodeName.equals(XDFNodeName.AXIS) ) { // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(lastAxisObject.addAxisValue(value)); } } else if ( parentNodeName.equals(XDFNodeName.VALUEGROUP) ) { /* ValueGroup lastValueGroup = (ValueGroup) CurrentValueGroupList.get(CurrentValueGroupList.size()-1); newvalueGroup = lastValueGroup.addValueGroup(newvalueGroup); */ if ( LastValueGroupParentObject instanceof Parameter ) { Parameter myParamObject = (Parameter) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myParamObject.addValue(value)); } } else if ( LastValueGroupParentObject instanceof Axis ) { // get the last axis Axis myAxisObject = (Axis) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myAxisObject.addAxisValue(value)); } } else { Log.errorln("Error: unknown valueGroupParent "+LastValueGroupParentObject+ " cant treat for "+XDFNodeName.VALUELIST); System.exit(-1); // fatal error, shut down } } else if ( parentNodeName.equals(XDFNodeName.PARAMETER) ) { Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(LastParameterObject.addValue(value)); } } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST); System.exit(-1); // fatal error, shut down } // add these new value objects to all open groups Iterator iter1 = CurrentValueGroupList.iterator(); Iterator iter2 = valueObjList.iterator(); while (iter1.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) iter1.next(); while (iter2.hasNext()) { Value nextValueObj = (Value) iter2.next(); nextValueObj.addToGroup(nextValueGroupObj); } // reset iter2 iter2 = valueObjList.iterator(); } } else { // PCDATA case String delimiter = DefaultValueListDelimiter; String repeatable = DefaultValueListRepeatable; // pickup overriding values from attribute list for (int i = 0; i < attrs.getLength(); i++) { String name = attrs.getName(i); if ( name.equals("delimiter") ) { delimiter = attrs.getValue(i); } else if ( name.equals("repeatable")) { repeatable = attrs.getValue(i); } } CurrentValueListParameter = new Hashtable(); // re-init CurrentValueListParameter.put("parentNode", parentNodeName); CurrentValueListParameter.put("delimiter", delimiter); CurrentValueListParameter.put("repeatable", repeatable); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
ArrayList values = getValueListNodeValues(attrs);
for (int i = 0; i < attrs.getLength(); i++) { if (attrs.getValue(i) != null) CurrentValueListParameter.put(attrs.getName(i), attrs.getValue(i)); } CurrentValueListParameter.put("isDelimitedCase", "false");
public void action (AttributeList attrs) { // 1. grab parent node name String parentNodeName = getParentNodeName(); // 2. try to determine values from attributes (e.g. algorithm method) ArrayList values = getValueListNodeValues(attrs); // 3. IT could be that no values exist because they are stored // in PCDATA rather than as algorithm (treat in char data handler // in this case). if(values.size() > 0 ) { // algoritm case ArrayList valueObjList = new ArrayList(); if( parentNodeName.equals(XDFNodeName.AXIS) ) { // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(lastAxisObject.addAxisValue(value)); } } else if ( parentNodeName.equals(XDFNodeName.VALUEGROUP) ) { /* ValueGroup lastValueGroup = (ValueGroup) CurrentValueGroupList.get(CurrentValueGroupList.size()-1); newvalueGroup = lastValueGroup.addValueGroup(newvalueGroup); */ if ( LastValueGroupParentObject instanceof Parameter ) { Parameter myParamObject = (Parameter) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myParamObject.addValue(value)); } } else if ( LastValueGroupParentObject instanceof Axis ) { // get the last axis Axis myAxisObject = (Axis) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myAxisObject.addAxisValue(value)); } } else { Log.errorln("Error: unknown valueGroupParent "+LastValueGroupParentObject+ " cant treat for "+XDFNodeName.VALUELIST); System.exit(-1); // fatal error, shut down } } else if ( parentNodeName.equals(XDFNodeName.PARAMETER) ) { Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(LastParameterObject.addValue(value)); } } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST); System.exit(-1); // fatal error, shut down } // add these new value objects to all open groups Iterator iter1 = CurrentValueGroupList.iterator(); Iterator iter2 = valueObjList.iterator(); while (iter1.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) iter1.next(); while (iter2.hasNext()) { Value nextValueObj = (Value) iter2.next(); nextValueObj.addToGroup(nextValueGroupObj); } // reset iter2 iter2 = valueObjList.iterator(); } } else { // PCDATA case String delimiter = DefaultValueListDelimiter; String repeatable = DefaultValueListRepeatable; // pickup overriding values from attribute list for (int i = 0; i < attrs.getLength(); i++) { String name = attrs.getName(i); if ( name.equals("delimiter") ) { delimiter = attrs.getValue(i); } else if ( name.equals("repeatable")) { repeatable = attrs.getValue(i); } } CurrentValueListParameter = new Hashtable(); // re-init CurrentValueListParameter.put("parentNode", parentNodeName); CurrentValueListParameter.put("delimiter", delimiter); CurrentValueListParameter.put("repeatable", repeatable); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
if(values.size() > 0 ) { ArrayList valueObjList = new ArrayList(); if( parentNodeName.equals(XDFNodeName.AXIS) ) { List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(lastAxisObject.addAxisValue(value)); } } else if ( parentNodeName.equals(XDFNodeName.VALUEGROUP) ) { /* ValueGroup lastValueGroup = (ValueGroup) CurrentValueGroupList.get(CurrentValueGroupList.size()-1); newvalueGroup = lastValueGroup.addValueGroup(newvalueGroup); */ if ( LastValueGroupParentObject instanceof Parameter ) { Parameter myParamObject = (Parameter) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myParamObject.addValue(value)); } } else if ( LastValueGroupParentObject instanceof Axis ) { Axis myAxisObject = (Axis) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myAxisObject.addAxisValue(value)); } } else { Log.errorln("Error: unknown valueGroupParent "+LastValueGroupParentObject+ " cant treat for "+XDFNodeName.VALUELIST); System.exit(-1); } } else if ( parentNodeName.equals(XDFNodeName.PARAMETER) ) { Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(LastParameterObject.addValue(value)); } } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST); System.exit(-1); } Iterator iter1 = CurrentValueGroupList.iterator(); Iterator iter2 = valueObjList.iterator(); while (iter1.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) iter1.next(); while (iter2.hasNext()) { Value nextValueObj = (Value) iter2.next(); nextValueObj.addToGroup(nextValueGroupObj); } iter2 = valueObjList.iterator(); } } else { String delimiter = DefaultValueListDelimiter; String repeatable = DefaultValueListRepeatable; for (int i = 0; i < attrs.getLength(); i++) { String name = attrs.getName(i); if ( name.equals("delimiter") ) { delimiter = attrs.getValue(i); } else if ( name.equals("repeatable")) { repeatable = attrs.getValue(i); } } CurrentValueListParameter = new Hashtable(); CurrentValueListParameter.put("parentNode", parentNodeName); CurrentValueListParameter.put("delimiter", delimiter); CurrentValueListParameter.put("repeatable", repeatable); }
public void action (AttributeList attrs) { // 1. grab parent node name String parentNodeName = getParentNodeName(); // 2. try to determine values from attributes (e.g. algorithm method) ArrayList values = getValueListNodeValues(attrs); // 3. IT could be that no values exist because they are stored // in PCDATA rather than as algorithm (treat in char data handler // in this case). if(values.size() > 0 ) { // algoritm case ArrayList valueObjList = new ArrayList(); if( parentNodeName.equals(XDFNodeName.AXIS) ) { // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(lastAxisObject.addAxisValue(value)); } } else if ( parentNodeName.equals(XDFNodeName.VALUEGROUP) ) { /* ValueGroup lastValueGroup = (ValueGroup) CurrentValueGroupList.get(CurrentValueGroupList.size()-1); newvalueGroup = lastValueGroup.addValueGroup(newvalueGroup); */ if ( LastValueGroupParentObject instanceof Parameter ) { Parameter myParamObject = (Parameter) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myParamObject.addValue(value)); } } else if ( LastValueGroupParentObject instanceof Axis ) { // get the last axis Axis myAxisObject = (Axis) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myAxisObject.addAxisValue(value)); } } else { Log.errorln("Error: unknown valueGroupParent "+LastValueGroupParentObject+ " cant treat for "+XDFNodeName.VALUELIST); System.exit(-1); // fatal error, shut down } } else if ( parentNodeName.equals(XDFNodeName.PARAMETER) ) { Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(LastParameterObject.addValue(value)); } } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST); System.exit(-1); // fatal error, shut down } // add these new value objects to all open groups Iterator iter1 = CurrentValueGroupList.iterator(); Iterator iter2 = valueObjList.iterator(); while (iter1.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) iter1.next(); while (iter2.hasNext()) { Value nextValueObj = (Value) iter2.next(); nextValueObj.addToGroup(nextValueGroupObj); } // reset iter2 iter2 = valueObjList.iterator(); } } else { // PCDATA case String delimiter = DefaultValueListDelimiter; String repeatable = DefaultValueListRepeatable; // pickup overriding values from attribute list for (int i = 0; i < attrs.getLength(); i++) { String name = attrs.getName(i); if ( name.equals("delimiter") ) { delimiter = attrs.getValue(i); } else if ( name.equals("repeatable")) { repeatable = attrs.getValue(i); } } CurrentValueListParameter = new Hashtable(); // re-init CurrentValueListParameter.put("parentNode", parentNodeName); CurrentValueListParameter.put("delimiter", delimiter); CurrentValueListParameter.put("repeatable", repeatable); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
Log.errorln("setData:["+thisString+"]["+dataLocator.getAxisLocation(FastestAxis)+"]");
private void addDataToCurrentArray ( Locator dataLocator, String thisString, DataFormat CurrentDataFormat ) { // Note that we dont treat binary data at all try { Log.errorln("setData:["+thisString+"]["+dataLocator.getAxisLocation(FastestAxis)+"]"); if ( CurrentDataFormat instanceof StringDataFormat) { CurrentArray.setData(dataLocator, thisString); } else if ( CurrentDataFormat instanceof FixedDataFormat) { Double number = new Double (thisString); CurrentArray.setData(dataLocator, number.doubleValue()); } else if ( CurrentDataFormat instanceof IntegerDataFormat) { Integer number = new Integer (thisString); CurrentArray.setData(dataLocator, number.intValue()); } else if ( CurrentDataFormat instanceof ExponentialDataFormat) { // hurm.. this is a stop-gap. Exponential format needs to be // preserved better than this. -b.t. Double number = new Double (thisString); CurrentArray.setData(dataLocator, number.doubleValue()); } else { Log.warnln("The dataFormat:"+CurrentDataFormat.toString()+" is not allowed in tagged data."); Log.warnln("Unable to setData:["+thisString+"], ignoring request"); } } catch (SetDataException e) { // bizarre error. Cant add data (out of memory??) :P Log.errorln("Unable to setData:["+thisString+"], ignoring request"); Log.printStackTrace(e); } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
private ArrayList getValueListNodeValues (AttributeList attrs) {
private ArrayList getValueListNodeValues () {
private ArrayList getValueListNodeValues (AttributeList attrs) { ArrayList values = new ArrayList(); // parameters for the algorithm int size = DefaultValueListSize; int start = DefaultValueListStart; int step = DefaultValueListStep; // Capture any overridding Valuelist attributes // into algorithm parameters for (int i = 0; i < attrs.getLength(); i++) { String name = attrs.getName(i); if ( name.equals("size") ) { Integer tmp = new Integer (attrs.getValue(i)); size = tmp.intValue(); } else if ( name.equals("step")) { Integer tmp = new Integer (attrs.getValue(i)); step = tmp.intValue(); } else if ( name.equals("start")) { Integer tmp = new Integer (attrs.getValue(i)); start = tmp.intValue(); } else if ( name.equals("delimiter")) { // IF delimiter is defined, then we ARENT using // an algorthm, and should exit here without further ado. return values; } } // do the algorithm to populate the values in the ArrayList int numberOfValues = 0; int currentValue = start; while (numberOfValues < size) { values.add(String.valueOf(currentValue)); currentValue += step; numberOfValues++; } return values; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
int size = DefaultValueListSize; int start = DefaultValueListStart; int step = DefaultValueListStep; for (int i = 0; i < attrs.getLength(); i++) { String name = attrs.getName(i); if ( name.equals("size") ) { Integer tmp = new Integer (attrs.getValue(i)); size = tmp.intValue(); } else if ( name.equals("step")) { Integer tmp = new Integer (attrs.getValue(i)); step = tmp.intValue(); } else if ( name.equals("start")) { Integer tmp = new Integer (attrs.getValue(i)); start = tmp.intValue(); } else if ( name.equals("delimiter")) { return values; } }
int size = Integer.valueOf((String) CurrentValueListParameter.get("size")).intValue(); int start = Integer.valueOf((String) CurrentValueListParameter.get("start")).intValue(); int step = Integer.valueOf((String) CurrentValueListParameter.get("step")).intValue();
private ArrayList getValueListNodeValues (AttributeList attrs) { ArrayList values = new ArrayList(); // parameters for the algorithm int size = DefaultValueListSize; int start = DefaultValueListStart; int step = DefaultValueListStep; // Capture any overridding Valuelist attributes // into algorithm parameters for (int i = 0; i < attrs.getLength(); i++) { String name = attrs.getName(i); if ( name.equals("size") ) { Integer tmp = new Integer (attrs.getValue(i)); size = tmp.intValue(); } else if ( name.equals("step")) { Integer tmp = new Integer (attrs.getValue(i)); step = tmp.intValue(); } else if ( name.equals("start")) { Integer tmp = new Integer (attrs.getValue(i)); start = tmp.intValue(); } else if ( name.equals("delimiter")) { // IF delimiter is defined, then we ARENT using // an algorthm, and should exit here without further ado. return values; } } // do the algorithm to populate the values in the ArrayList int numberOfValues = 0; int currentValue = start; while (numberOfValues < size) { values.add(String.valueOf(currentValue)); currentValue += step; numberOfValues++; } return values; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
endElementHandlerHashtable.put(XDFNodeName.VALUELIST, new valueListEndElementHandlerFunc());
private void initEndHandlerHashtable () { endElementHandlerHashtable.put(XDFNodeName.DATA, new dataEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.FIELDGROUP, new fieldGroupEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.NOTES, new notesEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.PARAMETERGROUP, new parameterGroupEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.READ, new readEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.REPEAT, new repeatEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.TD0, new dataTagEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.TD1, new dataTagEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.TD2, new dataTagEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.TD3, new dataTagEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.TD4, new dataTagEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.TD5, new dataTagEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.TD6, new dataTagEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.TD7, new dataTagEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.TD8, new dataTagEndElementHandlerFunc()); endElementHandlerHashtable.put(XDFNodeName.VALUEGROUP, new valueGroupEndElementHandlerFunc()); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/7042e9fdb436dcb2d51bc0e24c9c0b5ef4038471/SaxDocumentHandler.java/clean/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java
protected ViewListener() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JViewport.java/buggy/core/src/classpath/javax/javax/swing/JViewport.java
boolean changed = (x != getX()) || (y != getY()) || (w != getWidth()) || (h != getHeight());
public void reshape(int x, int y, int w, int h) { boolean changed = (x != getX()) || (y != getY()) || (w != getWidth()) || (h != getHeight()); if (w != getWidth() || h != getHeight()) sizeChanged = true; super.reshape(x, y, w, h); if (changed) { damaged = true; fireStateChanged(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JViewport.java/buggy/core/src/classpath/javax/javax/swing/JViewport.java
if (changed)
if (sizeChanged)
public void reshape(int x, int y, int w, int h) { boolean changed = (x != getX()) || (y != getY()) || (w != getWidth()) || (h != getHeight()); if (w != getWidth() || h != getHeight()) sizeChanged = true; super.reshape(x, y, w, h); if (changed) { damaged = true; fireStateChanged(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JViewport.java/buggy/core/src/classpath/javax/javax/swing/JViewport.java
if (isShowing()) getView().validate();
public void scrollRectToVisible(Rectangle contentRect) { Point pos = getViewPosition(); Rectangle viewBounds = getView().getBounds(); Rectangle portBounds = getBounds(); // FIXME: should validate the view if it is not valid, however // this may cause excessive validation when the containment // hierarchy is being created. // if contentRect is larger than the portBounds, center the view if (contentRect.height > portBounds.height || contentRect.width > portBounds.width) { setViewPosition(new Point(contentRect.x, contentRect.y)); return; } // Y-DIRECTION if (contentRect.y < -viewBounds.y) setViewPosition(new Point(pos.x, contentRect.y)); else if (contentRect.y + contentRect.height > -viewBounds.y + portBounds.height) setViewPosition (new Point(pos.x, contentRect.y - (portBounds.height - contentRect.height))); // X-DIRECTION pos = getViewPosition(); if (contentRect.x < -viewBounds.x) setViewPosition(new Point(contentRect.x, pos.y)); else if (contentRect.x + contentRect.width > -viewBounds.x + portBounds.width) setViewPosition (new Point(contentRect.x - (portBounds.width - contentRect.width), pos.y)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JViewport.java/buggy/core/src/classpath/javax/javax/swing/JViewport.java
if (contentRect.height > portBounds.height || contentRect.width > portBounds.width) { setViewPosition(new Point(contentRect.x, contentRect.y)); return; } if (contentRect.y < -viewBounds.y) setViewPosition(new Point(pos.x, contentRect.y)); else if (contentRect.y + contentRect.height > -viewBounds.y + portBounds.height) setViewPosition (new Point(pos.x, contentRect.y - (portBounds.height - contentRect.height))); pos = getViewPosition(); if (contentRect.x < -viewBounds.x) setViewPosition(new Point(contentRect.x, pos.y)); else if (contentRect.x + contentRect.width > -viewBounds.x + portBounds.width) setViewPosition (new Point(contentRect.x - (portBounds.width - contentRect.width), pos.y));
if (contentRect.y + contentRect.height + viewBounds.y > portBounds.height) pos.y = contentRect.y + contentRect.height - viewBounds.height; if (contentRect.y + viewBounds.y < 0) pos.y = contentRect.y; if (contentRect.x + contentRect.width + viewBounds.x > portBounds.width) pos.x = contentRect.x + contentRect.width - viewBounds.width; if (contentRect.x + viewBounds.x < 0) pos.x = contentRect.x; setViewPosition(pos);
public void scrollRectToVisible(Rectangle contentRect) { Point pos = getViewPosition(); Rectangle viewBounds = getView().getBounds(); Rectangle portBounds = getBounds(); // FIXME: should validate the view if it is not valid, however // this may cause excessive validation when the containment // hierarchy is being created. // if contentRect is larger than the portBounds, center the view if (contentRect.height > portBounds.height || contentRect.width > portBounds.width) { setViewPosition(new Point(contentRect.x, contentRect.y)); return; } // Y-DIRECTION if (contentRect.y < -viewBounds.y) setViewPosition(new Point(pos.x, contentRect.y)); else if (contentRect.y + contentRect.height > -viewBounds.y + portBounds.height) setViewPosition (new Point(pos.x, contentRect.y - (portBounds.height - contentRect.height))); // X-DIRECTION pos = getViewPosition(); if (contentRect.x < -viewBounds.x) setViewPosition(new Point(contentRect.x, pos.y)); else if (contentRect.x + contentRect.width > -viewBounds.x + portBounds.width) setViewPosition (new Point(contentRect.x - (portBounds.width - contentRect.width), pos.y)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JViewport.java/buggy/core/src/classpath/javax/javax/swing/JViewport.java
while (getComponentCount() > 0) {
public void setView(Component v) { while (getComponentCount() > 0) { if (viewListener != null) getView().removeComponentListener(viewListener); //remove(0); } if (v != null) { if (viewListener == null) viewListener = createViewListener(); v.addComponentListener(viewListener); add(v); fireStateChanged(); } revalidate(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JViewport.java/buggy/core/src/classpath/javax/javax/swing/JViewport.java
}
public void setView(Component v) { while (getComponentCount() > 0) { if (viewListener != null) getView().removeComponentListener(viewListener); //remove(0); } if (v != null) { if (viewListener == null) viewListener = createViewListener(); v.addComponentListener(viewListener); add(v); fireStateChanged(); } revalidate(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JViewport.java/buggy/core/src/classpath/javax/javax/swing/JViewport.java
repaint();
public void setView(Component v) { while (getComponentCount() > 0) { if (viewListener != null) getView().removeComponentListener(viewListener); //remove(0); } if (v != null) { if (viewListener == null) viewListener = createViewListener(); v.addComponentListener(viewListener); add(v); fireStateChanged(); } revalidate(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JViewport.java/buggy/core/src/classpath/javax/javax/swing/JViewport.java
super(p, q, g); this.y = y;
this(Registry.RAW_ENCODING_ID, p, q, g, y);
public DSSPublicKey(BigInteger p, BigInteger q, BigInteger g, BigInteger y) { super(p, q, g); this.y = y; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/DSSPublicKey.java/buggy/core/src/classpath/gnu/gnu/java/security/key/dss/DSSPublicKey.java
throw new IllegalArgumentException("format");
throw new IllegalArgumentException("Unsupported encoding format: " + format);
public byte[] getEncoded(int format) { byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new DSSKeyPairRawCodec().encodePublicKey(this); break; default: throw new IllegalArgumentException("format"); } return result; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/DSSPublicKey.java/buggy/core/src/classpath/gnu/gnu/java/security/key/dss/DSSPublicKey.java
public static DSSPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/DSSPublicKey.java/buggy/core/src/classpath/gnu/gnu/java/security/key/dss/DSSPublicKey.java
IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPublicKey) codec.decodePublicKey(k);
return (DSSPublicKey) new DSSKeyPairRawCodec().decodePublicKey(k);
public static DSSPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/DSSPublicKey.java/buggy/core/src/classpath/gnu/gnu/java/security/key/dss/DSSPublicKey.java
else
catch (IllegalArgumentException ignored)
public static DSSPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/DSSPublicKey.java/buggy/core/src/classpath/gnu/gnu/java/security/key/dss/DSSPublicKey.java
throw new IllegalArgumentException("magic");
public static DSSPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/DSSPublicKey.java/buggy/core/src/classpath/gnu/gnu/java/security/key/dss/DSSPublicKey.java
return (DSSPublicKey) new DSSKeyPairX509Codec().decodePublicKey(k);
public static DSSPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/DSSPublicKey.java/buggy/core/src/classpath/gnu/gnu/java/security/key/dss/DSSPublicKey.java
keys.setKey( 29,new Key(KeyEvent.VK_CONTROL ));
keys.setKey(29, new Key((char) 0, KeyEvent.VK_CONTROL));
protected void initKeys(Keys keys) { Key key; keys.setKey( 1,new Key(KeyEvent.VK_ESCAPE)); keys.setKey( 2,new Key('1' ,KeyEvent.VK_1,'+' ,KeyEvent.VK_ADD ,'' ,KeyEvent.VK_UNDEFINED)); keys.setKey( 3,new Key('2' ,KeyEvent.VK_2,'"' ,KeyEvent.VK_QUOTEDBL ,'@' ,KeyEvent.VK_AT)); keys.setKey( 4,new Key('3' ,KeyEvent.VK_3,'*' ,KeyEvent.VK_MULTIPLY ,'#' ,KeyEvent.VK_UNDEFINED)); keys.setKey( 5,new Key('4' ,KeyEvent.VK_4,'' ,'')); keys.setKey( 6,new Key('5' ,KeyEvent.VK_5,'%' ,'')); keys.setKey( 7,new Key('6' ,KeyEvent.VK_6,'&' ,KeyEvent.VK_UNDEFINED ,'' ,KeyEvent.VK_UNDEFINED)); keys.setKey( 8,new Key('7' ,KeyEvent.VK_7,'/' ,KeyEvent.VK_SLASH ,'|' ,KeyEvent.VK_UNDEFINED)); keys.setKey( 9,new Key('8' ,KeyEvent.VK_8,'(' ,KeyEvent.VK_LEFT_PARENTHESIS ,'' ,KeyEvent.VK_UNDEFINED)); keys.setKey( 10,new Key('9' ,KeyEvent.VK_9,')' ,KeyEvent.VK_RIGHT_PARENTHESIS)); keys.setKey( 11,new Key('0' ,KeyEvent.VK_0,'=' ,KeyEvent.VK_EQUALS)); keys.setKey( 12,new Key('\'',KeyEvent.VK_QUOTE ,'?' ,KeyEvent.VK_UNDEFINED , '', KeyEvent.VK_DEAD_ACUTE)); keys.setKey( 13,new Key('^',KeyEvent.VK_DEAD_CIRCUMFLEX ,'`',KeyEvent.VK_DEAD_GRAVE ,'~',KeyEvent.VK_UNDEFINED)); keys.setKey( 14,new Key('\b' ,KeyEvent.VK_BACK_SPACE)); keys.setKey( 15,new Key('\t' ,KeyEvent.VK_TAB)); keys.setKey( 16,new Key('q' ,'Q' ,KeyEvent.VK_Q)); keys.setKey( 17,new Key('w' ,'W' ,KeyEvent.VK_W)); keys.setKey( 18,new Key('e' ,'E' ,'' ,KeyEvent.VK_E)); keys.setKey( 19,new Key('r' ,'R' ,KeyEvent.VK_R)); keys.setKey( 20,new Key('t' ,'T' ,KeyEvent.VK_T)); keys.setKey( 21,new Key('z' ,'Z' ,KeyEvent.VK_Z)); keys.setKey( 22,new Key('u' ,'U' ,KeyEvent.VK_U)); key = keys.getKey(22); key.addDeadKeyChar(KeyEvent.VK_DEAD_DIAERESIS ,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_CIRCUMFLEX,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_ACUTE ,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_GRAVE ,new char[]{'' ,''}); keys.setKey( 23,new Key('i' ,'I' ,KeyEvent.VK_I)); key = keys.getKey(23); key.addDeadKeyChar(KeyEvent.VK_DEAD_DIAERESIS ,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_CIRCUMFLEX,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_ACUTE ,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_GRAVE ,new char[]{'' ,''}); keys.setKey( 24,new Key('o' ,'O' ,KeyEvent.VK_O)); key = keys.getKey(24); key.addDeadKeyChar(KeyEvent.VK_DEAD_DIAERESIS ,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_CIRCUMFLEX,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_ACUTE ,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_GRAVE ,new char[]{'' ,''}); keys.setKey( 25,new Key('p' ,'P' ,KeyEvent.VK_P)); keys.setKey( 26,new Key('' ,'' ,'[' ,KeyEvent.VK_OPEN_BRACKET)); keys.setKey( 27,new Key('' ,KeyEvent.VK_DEAD_DIAERESIS, '!', KeyEvent.VK_EXCLAMATION_MARK,']' ,KeyEvent.VK_CLOSE_BRACKET)); keys.setKey( 28,new Key('\n' ,KeyEvent.VK_ENTER)); keys.setKey( 29,new Key(KeyEvent.VK_CONTROL )); keys.setKey( 30,new Key('a' ,'A' ,'a' ,KeyEvent.VK_A)); key = keys.getKey(30); key.addDeadKeyChar(KeyEvent.VK_DEAD_DIAERESIS ,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_CIRCUMFLEX,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_ACUTE ,new char[]{'' ,''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_GRAVE ,new char[]{'' ,''}); keys.setKey( 31,new Key('s' ,'S' ,KeyEvent.VK_S)); keys.setKey( 32,new Key('d' ,'D' ,KeyEvent.VK_D)); keys.setKey( 33,new Key('f' ,'F' ,KeyEvent.VK_F)); keys.setKey( 34,new Key('g' ,'G' ,KeyEvent.VK_G)); keys.setKey( 35,new Key('h' ,'H' ,KeyEvent.VK_H)); keys.setKey( 36,new Key('j' ,'J' ,KeyEvent.VK_J)); keys.setKey( 37,new Key('k' ,'K' ,KeyEvent.VK_K)); keys.setKey( 38,new Key('l' ,'L' ,KeyEvent.VK_L)); keys.setKey( 39,new Key('' ,'' ,KeyEvent.VK_UNDEFINED)); keys.setKey( 40,new Key('' ,'' ,'{',KeyEvent.VK_BRACELEFT)); keys.setKey( 41,new Key('' ,'')); keys.setKey( 42,new Key(KeyEvent.VK_SHIFT)); keys.setKey( 43,new Key('$' ,KeyEvent.VK_DOLLAR, '' ,KeyEvent.VK_UNDEFINED, '}',KeyEvent.VK_BRACERIGHT)); keys.setKey( 44,new Key('y' ,'Y' ,KeyEvent.VK_Y)); keys.setKey( 45,new Key('x' ,'X' ,KeyEvent.VK_X)); keys.setKey( 46,new Key('c' ,'C' ,KeyEvent.VK_C)); keys.setKey( 47,new Key('v' ,'V' ,KeyEvent.VK_V)); keys.setKey( 48,new Key('b' ,'B' ,KeyEvent.VK_B)); keys.setKey( 49,new Key('n' ,'N' ,KeyEvent.VK_N)); keys.setKey( 50,new Key('m' ,'M' ,KeyEvent.VK_M)); keys.setKey( 51,new Key(',',KeyEvent.VK_COMMA,';',KeyEvent.VK_SEMICOLON)); keys.setKey( 52,new Key('.',KeyEvent.VK_PERIOD,':',KeyEvent.VK_COLON)); keys.setKey( 53,new Key('-',KeyEvent.VK_MINUS,'_',KeyEvent.VK_UNDERSCORE)); keys.setKey( 54,new Key(KeyEvent.VK_SHIFT)); keys.setKey( 55,new Key(KeyEvent.VK_CONTROL)); keys.setKey( 56,new Key(KeyEvent.VK_ALT)); keys.setKey( 57,new Key(' ',KeyEvent.VK_SPACE)); key = keys.getKey(57); key.addDeadKeyChar(KeyEvent.VK_DEAD_DIAERESIS ,new char[]{''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_CIRCUMFLEX,new char[]{'^'}); key.addDeadKeyChar(KeyEvent.VK_DEAD_ACUTE ,new char[]{''}); key.addDeadKeyChar(KeyEvent.VK_DEAD_GRAVE ,new char[]{'`'}); keys.setKey( 58,new Key(KeyEvent.VK_CAPS_LOCK)); keys.setKey( 59,new Key(KeyEvent.VK_F1)); keys.setKey( 60,new Key(KeyEvent.VK_F2)); keys.setKey( 61,new Key(KeyEvent.VK_F3)); keys.setKey( 62,new Key(KeyEvent.VK_F4)); keys.setKey( 63,new Key(KeyEvent.VK_F5)); keys.setKey( 64,new Key(KeyEvent.VK_F6)); keys.setKey( 65,new Key(KeyEvent.VK_F7)); keys.setKey( 66,new Key(KeyEvent.VK_F8)); keys.setKey( 67,new Key(KeyEvent.VK_F9)); keys.setKey( 68,new Key(KeyEvent.VK_F10)); keys.setKey( 69,new Key(KeyEvent.VK_NUM_LOCK)); keys.setKey( 70,new Key(KeyEvent.VK_SCROLL_LOCK)); keys.setKey( 71,new Key('7',KeyEvent.VK_NUMPAD7)); keys.setKey( 72,new Key('8',KeyEvent.VK_NUMPAD8)); keys.setKey( 73,new Key('9',KeyEvent.VK_NUMPAD9)); keys.setKey( 74,new Key('-',KeyEvent.VK_SUBTRACT)); keys.setKey( 75,new Key('4',KeyEvent.VK_NUMPAD4)); keys.setKey( 76,new Key('5',KeyEvent.VK_NUMPAD5)); keys.setKey( 77,new Key('6',KeyEvent.VK_NUMPAD6)); keys.setKey( 78,new Key('+',KeyEvent.VK_ADD)); keys.setKey( 79,new Key('1',KeyEvent.VK_NUMPAD1)); keys.setKey( 80,new Key('2',KeyEvent.VK_NUMPAD2)); keys.setKey( 81,new Key('3',KeyEvent.VK_NUMPAD3)); keys.setKey( 82,new Key('0',KeyEvent.VK_NUMPAD0)); keys.setKey( 83,new Key('.',KeyEvent.VK_DECIMAL)); keys.setKey( 86,new Key('<',KeyEvent.VK_LESS,'>',KeyEvent.VK_GREATER,'\\',KeyEvent.VK_BACK_SLASH)); keys.setKey( 87,new Key(KeyEvent.VK_F11)); keys.setKey( 88,new Key(KeyEvent.VK_F12)); keys.setKey( 96,new Key(KeyEvent.VK_INSERT)); keys.setKey( 97,new Key(KeyEvent.VK_HOME)); keys.setKey( 98,new Key(KeyEvent.VK_PAGE_UP)); keys.setKey( 99,new Key('/',KeyEvent.VK_DIVIDE)); keys.setKey(100,new Key(KeyEvent.VK_PRINTSCREEN)); keys.setKey(101,new Key(KeyEvent.VK_DELETE)); keys.setKey(102,new Key(KeyEvent.VK_END)); keys.setKey(103,new Key(KeyEvent.VK_PAGE_DOWN)); keys.setKey(104,new Key(KeyEvent.VK_UP)); keys.setKey(105,new Key(KeyEvent.VK_SEPARATOR)); keys.setKey(111,new Key('/',KeyEvent.VK_SLASH)); keys.setKey(112,new Key(KeyEvent.VK_CONTROL)); keys.setKey(113,new Key(KeyEvent.VK_LEFT)); keys.setKey(114,new Key(KeyEvent.VK_DOWN)); keys.setKey(115,new Key(KeyEvent.VK_RIGHT)); keys.setKey(116,new Key(KeyEvent.VK_PAUSE)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/316f0ce1c74f95b1e1bb7c1780fbd90cd0f892c6/KeyboardInterpreter_CH_fr.java/buggy/core/src/driver/org/jnode/driver/input/l10n/KeyboardInterpreter_CH_fr.java
Variable var = (Variable) sources.get(0); return var.simplify();
return first.simplify();
public Operand simplify() { int n = sources.size(); if (n == 1) { Variable var = (Variable) sources.get(0); return var.simplify(); } else { Variable first = (Variable) sources.get(0); // We can't use var.simplify() here because the result might // be a constant, which complicates code generation. // sources should contain only Variable instances. first = first.simplifyCopy(); for (int i=1; i<n; i+=1) { Variable var = (Variable) sources.get(i); var = var.simplifyCopy(); AssignQuad assignQuad = var.getAssignQuad(); // This is more efficient than generating phi moves at the end // of the block. Basically all phi sources are merged into the // first. assignQuad.setLHS(first); // This might be in a loop, in which case this variable is live // at least until the end of the loop. This looks tricky, but I // think it's correct. IRBasicBlock block = assignQuad.getBasicBlock().getLastPredecessor(); first.setLastUseAddress(block.getEndPC()-1); } // This is bold assumption that the first phi source was assigned // before any others. I'm not sure if this is always true... return first; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/73a8acca7b333d0ca17760b5347d2ca2b416eede/PhiOperand.java/clean/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java
Variable first = (Variable) sources.get(0);
public Operand simplify() { int n = sources.size(); if (n == 1) { Variable var = (Variable) sources.get(0); return var.simplify(); } else { Variable first = (Variable) sources.get(0); // We can't use var.simplify() here because the result might // be a constant, which complicates code generation. // sources should contain only Variable instances. first = first.simplifyCopy(); for (int i=1; i<n; i+=1) { Variable var = (Variable) sources.get(i); var = var.simplifyCopy(); AssignQuad assignQuad = var.getAssignQuad(); // This is more efficient than generating phi moves at the end // of the block. Basically all phi sources are merged into the // first. assignQuad.setLHS(first); // This might be in a loop, in which case this variable is live // at least until the end of the loop. This looks tricky, but I // think it's correct. IRBasicBlock block = assignQuad.getBasicBlock().getLastPredecessor(); first.setLastUseAddress(block.getEndPC()-1); } // This is bold assumption that the first phi source was assigned // before any others. I'm not sure if this is always true... return first; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/73a8acca7b333d0ca17760b5347d2ca2b416eede/PhiOperand.java/clean/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java
assignQuad.setLHS(first);
public Operand simplify() { int n = sources.size(); if (n == 1) { Variable var = (Variable) sources.get(0); return var.simplify(); } else { Variable first = (Variable) sources.get(0); // We can't use var.simplify() here because the result might // be a constant, which complicates code generation. // sources should contain only Variable instances. first = first.simplifyCopy(); for (int i=1; i<n; i+=1) { Variable var = (Variable) sources.get(i); var = var.simplifyCopy(); AssignQuad assignQuad = var.getAssignQuad(); // This is more efficient than generating phi moves at the end // of the block. Basically all phi sources are merged into the // first. assignQuad.setLHS(first); // This might be in a loop, in which case this variable is live // at least until the end of the loop. This looks tricky, but I // think it's correct. IRBasicBlock block = assignQuad.getBasicBlock().getLastPredecessor(); first.setLastUseAddress(block.getEndPC()-1); } // This is bold assumption that the first phi source was assigned // before any others. I'm not sure if this is always true... return first; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/73a8acca7b333d0ca17760b5347d2ca2b416eede/PhiOperand.java/clean/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java
IRBasicBlock block = assignQuad.getBasicBlock().getLastPredecessor(); first.setLastUseAddress(block.getEndPC()-1);
if (assignQuad != null) { assignQuad.setLHS(first); IRBasicBlock block = assignQuad.getBasicBlock().getLastPredecessor(); first.setLastUseAddress(block.getEndPC()-1); } else { }
public Operand simplify() { int n = sources.size(); if (n == 1) { Variable var = (Variable) sources.get(0); return var.simplify(); } else { Variable first = (Variable) sources.get(0); // We can't use var.simplify() here because the result might // be a constant, which complicates code generation. // sources should contain only Variable instances. first = first.simplifyCopy(); for (int i=1; i<n; i+=1) { Variable var = (Variable) sources.get(i); var = var.simplifyCopy(); AssignQuad assignQuad = var.getAssignQuad(); // This is more efficient than generating phi moves at the end // of the block. Basically all phi sources are merged into the // first. assignQuad.setLHS(first); // This might be in a loop, in which case this variable is live // at least until the end of the loop. This looks tricky, but I // think it's correct. IRBasicBlock block = assignQuad.getBasicBlock().getLastPredecessor(); first.setLastUseAddress(block.getEndPC()-1); } // This is bold assumption that the first phi source was assigned // before any others. I'm not sure if this is always true... return first; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/73a8acca7b333d0ca17760b5347d2ca2b416eede/PhiOperand.java/clean/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java
textComp.addCaretListener(this);
JTextComponent.this.addCaretListener(this); caretDot = getCaretPosition();
public AccessibleJTextComponent() { super(); textComp.addCaretListener(this); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public void caretUpdate(CaretEvent e) throws NotImplementedException { // TODO: fire appropriate event. dot = e.getDot(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
dot = e.getDot();
int dot = e.getDot(); int mark = e.getMark(); if (caretDot != dot) { firePropertyChange(ACCESSIBLE_CARET_PROPERTY, new Integer(caretDot), new Integer(dot)); caretDot = dot; } if (mark != dot) { firePropertyChange(ACCESSIBLE_SELECTION_PROPERTY, null, getSelectedText()); }
public void caretUpdate(CaretEvent e) throws NotImplementedException { // TODO: fire appropriate event. dot = e.getDot(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public void changedUpdate(DocumentEvent e) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
firePropertyChange(ACCESSIBLE_TEXT_PROPERTY, null, new Integer(e.getOffset()));
public void changedUpdate(DocumentEvent e) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
textComp.select(start, end); textComp.cut();
JTextComponent.this.select(start, end); JTextComponent.this.cut();
public void cut(int start, int end) { textComp.select(start, end); textComp.cut(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public boolean doAccessibleAction(int i) throws NotImplementedException { return false; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return false;
boolean ret = false; Action[] actions = getActions(); if (i >= 0 && i < actions.length) { ActionEvent ev = new ActionEvent(JTextComponent.this, ActionEvent.ACTION_PERFORMED, null); actions[i].actionPerformed(ev); ret = true; } return ret;
public boolean doAccessibleAction(int i) throws NotImplementedException { return false; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public int getAccessibleActionCount() throws NotImplementedException { return 0; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return 0;
return getActions().length;
public int getAccessibleActionCount() throws NotImplementedException { return 0; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public String getAccessibleActionDescription(int i) throws NotImplementedException { // TODO: Not implemented fully return super.getAccessibleDescription(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return super.getAccessibleDescription();
String desc = null; Action[] actions = getActions(); if (i >= 0 && i < actions.length) desc = (String) actions[i].getValue(Action.NAME); return desc;
public String getAccessibleActionDescription(int i) throws NotImplementedException { // TODO: Not implemented fully return super.getAccessibleDescription(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public AccessibleStateSet getAccessibleStateSet() throws NotImplementedException { AccessibleStateSet state = super.getAccessibleStateSet(); // TODO: Figure out what state must be added here to the super's state. return state; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
if (isEditable()) state.add(AccessibleState.EDITABLE);
public AccessibleStateSet getAccessibleStateSet() throws NotImplementedException { AccessibleStateSet state = super.getAccessibleStateSet(); // TODO: Figure out what state must be added here to the super's state. return state; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public String getAfterIndex(int part, int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return null;
return getAtIndexImpl(part, index, 1);
public String getAfterIndex(int part, int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public String getAtIndex(int part, int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return null;
return getAtIndexImpl(part, index, 0);
public String getAtIndex(int part, int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public String getBeforeIndex(int part, int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return null;
return getAtIndexImpl(part, index, -1);
public String getBeforeIndex(int part, int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
dot = textComp.getCaretPosition(); return dot;
return JTextComponent.this.getCaretPosition();
public int getCaretPosition() { dot = textComp.getCaretPosition(); return dot; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return textComp.getText().length();
return JTextComponent.this.getText().length();
public int getCharCount() { return textComp.getText().length(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public AttributeSet getCharacterAttribute(int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return null;
AttributeSet atts; if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readLock(); try { Element el = doc.getDefaultRootElement(); while (! el.isLeaf()) { int i = el.getElementIndex(index); el = el.getElement(i); } atts = el.getAttributes(); } finally { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readUnlock(); } return atts;
public AttributeSet getCharacterAttribute(int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public Rectangle getCharacterBounds(int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return null;
Rectangle bounds = null; if (index >= 0 && index < doc.getLength() - 1) { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readLock(); try { TextUI ui = getUI(); if (ui != null) { Rectangle rect = new Rectangle(); Insets insets = getInsets(); rect.x = insets.left; rect.y = insets.top; rect.width = getWidth() - insets.left - insets.right; rect.height = getHeight() - insets.top - insets.bottom; View rootView = ui.getRootView(JTextComponent.this); if (rootView != null) { rootView.setSize(rect.width, rect.height); Shape s = rootView.modelToView(index, Position.Bias.Forward, index + 1, Position.Bias.Backward, rect); if (s != null) bounds = s.getBounds(); } } } catch (BadLocationException ex) { } finally { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readUnlock(); } } return bounds;
public Rectangle getCharacterBounds(int index) throws NotImplementedException { return null; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public int getIndexAtPoint(Point p) throws NotImplementedException { return 0; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return 0;
return viewToModel(p);
public int getIndexAtPoint(Point p) throws NotImplementedException { return 0; // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return textComp.getSelectedText();
return JTextComponent.this.getSelectedText();
public String getSelectedText() { return textComp.getSelectedText(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
if (getSelectedText() == null || (textComp.getText().equals(""))) return 0; return textComp.getSelectionEnd();
return JTextComponent.this.getSelectionEnd();
public int getSelectionEnd() { if (getSelectedText() == null || (textComp.getText().equals(""))) return 0; return textComp.getSelectionEnd(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
if (getSelectedText() == null || (textComp.getText().equals("")))
if (getSelectedText() == null || (JTextComponent.this.getText().equals("")))
public int getSelectionStart() { if (getSelectedText() == null || (textComp.getText().equals(""))) return 0; return textComp.getSelectionStart(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return textComp.getSelectionStart();
return JTextComponent.this.getSelectionStart();
public int getSelectionStart() { if (getSelectedText() == null || (textComp.getText().equals(""))) return 0; return textComp.getSelectionStart(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return textComp.getText(start, end - start);
return JTextComponent.this.getText(start, end - start);
public String getTextRange(int start, int end) { try { return textComp.getText(start, end - start); } catch (BadLocationException ble) { return ""; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public void insertTextAtIndex(int index, String s) throws NotImplementedException { replaceText(index, index, s); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
replaceText(index, index, s);
try { doc.insertString(index, s, null); } catch (BadLocationException ex) { ex.printStackTrace(); }
public void insertTextAtIndex(int index, String s) throws NotImplementedException { replaceText(index, index, s); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public void insertUpdate(DocumentEvent e) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
firePropertyChange(ACCESSIBLE_TEXT_PROPERTY, null, new Integer(e.getOffset()));
public void insertUpdate(DocumentEvent e) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
textComp.setCaretPosition(start); textComp.paste();
JTextComponent.this.setCaretPosition(start); JTextComponent.this.paste();
public void paste(int start) { textComp.setCaretPosition(start); textComp.paste(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public void removeUpdate(DocumentEvent e) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
firePropertyChange(ACCESSIBLE_TEXT_PROPERTY, null, new Integer(e.getOffset()));
public void removeUpdate(DocumentEvent e) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
textComp.select(start, end); textComp.replaceSelection(s);
JTextComponent.this.select(start, end); JTextComponent.this.replaceSelection(s);
public void replaceText(int start, int end, String s) { textComp.select(start, end); textComp.replaceSelection(s); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
textComp.select(start, end);
JTextComponent.this.select(start, end);
public void selectText(int start, int end) { textComp.select(start, end); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public void setAttributes(int start, int end, AttributeSet s) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
if (doc instanceof StyledDocument) { StyledDocument sdoc = (StyledDocument) doc; sdoc.setCharacterAttributes(start, end - start, s, true); }
public void setAttributes(int start, int end, AttributeSet s) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
throws NotImplementedException
public void setTextContents(String s) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
setText(s);
public void setTextContents(String s) throws NotImplementedException { // TODO }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
if (getParent() instanceof JViewport) return getParent().getWidth() > getPreferredSize().width;
boolean res = false;; Container c = getParent(); if (c instanceof JViewport) res = ((JViewport) c).getExtentSize().width > getPreferredSize().width;
public boolean getScrollableTracksViewportWidth() { if (getParent() instanceof JViewport) return getParent().getWidth() > getPreferredSize().width; return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return false;
return res;
public boolean getScrollableTracksViewportWidth() { if (getParent() instanceof JViewport) return getParent().getWidth() > getPreferredSize().width; return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
} finally { if (oldDoc instanceof AbstractDocument) ((AbstractDocument) oldDoc).readUnlock(); }
public void setDocument(Document newDoc) { Document oldDoc = doc; doc = newDoc; firePropertyChange("document", oldDoc, newDoc); revalidate(); repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
public void reset() { spoolName.setEnabled(false); spoolName.setText(""); //select.setSelected(false); all.setSelected(true); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9d37884a41d03e0f09109f25894f74c9df2e594b/SpoolNameTabPanel.java/buggy/tn5250j/src/org/tn5250j/spoolfile/SpoolNameTabPanel.java
screen52.setCursorOff();
screen52.setCursorActive(false);
public final void hostPrint(int aid) { if (screen52.isStatusErrorCode()) { screen52.restoreErrorLine(); screen52.setStatus(screen52.STATUS_ERROR_CODE,screen52.STATUS_VALUE_OFF,null); } screen52.setCursorOff(); screen52.setStatus(screen52.STATUS_SYSTEM,screen52.STATUS_VALUE_ON,null); // From client access ip capture // it seems to use an operation code of 3 and 4 // also note that the flag field that says reserved is being sent as well // with a value of 0x80 // // I have tried with not setting these flags and sending with 3 or 1 // there is no effect and I still get a host print screen. Go figure //0000: 000D 12A0 0000 0400 8003 1407 F6FFEF //0000: 000D 12A0 0000 0400 8001 110E F6FFEF // // Client sends header 000D12A0000004000003####F6FFEF // operation code 3 // row - first ## // column - second ## // F6 - Print Aid Key baosp.write(screen52.getCurrentRow()); baosp.write(screen52.getCurrentCol()); baosp.write(AID_PRINT); // aid key try { writeGDS(0, 3, baosp.toByteArray()); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } baosp.reset(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/be319bbdd8024ad2c91541f2e005828a779a5afe/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
private void parseIncoming() { boolean controlChars = false; byte control0; byte control1; boolean done = false; boolean error = false; try { while (bk.hasNext() && !done) { byte b = bk.getNextByte(); switch (b) { case 0: case 1: break; case CMD_SAVE_SCREEN: // 0x02 2 Save Screen case 3: // 0x03 3 Save Partial Screen// System.out.println("save screen partial"); saveScreen(); break; case ESC: // ESCAPE break; case 7: // audible bell Toolkit.getDefaultToolkit().beep(); bk.getNextByte(); bk.getNextByte(); break; case CMD_WRITE_TO_DISPLAY: // 0x11 17 write to display error = writeToDisplay(true); break; case CMD_RESTORE_SCREEN: // 0x12 18 Restore Screen case 13: // 0x13 19 Restore Partial Screen// System.out.println("restore screen partial"); restoreScreen(); break; case CMD_CLEAR_UNIT_ALTERNATE: // 0x20 32 clear unit alternate int param = bk.getNextByte(); if (param != 0) {// System.out.println(" clear unit alternate error " + Integer.toHexString(param)); sendNegResponse(NR_REQUEST_ERROR,03,01,05, " clear unit alternate not supported"); done = true; } else { if (screen52.getRows() != 27) screen52.setRowsCols(27,132); screen52.clearAll(); } break; case CMD_WRITE_ERROR_CODE: // 0x21 33 Write Error Code writeErrorCode(); error = writeToDisplay(false); break; case CMD_WRITE_ERROR_CODE_TO_WINDOW: // 0x22 34 // Write Error Code to window writeErrorCodeToWindow(); error = writeToDisplay(false); break; case CMD_READ_SCREEN_IMMEDIATE: // 0x62 98 case CMD_READ_SCREEN_TO_PRINT: // 0x66 102 read screen to print readScreen(); break; case CMD_CLEAR_UNIT: // 64 0x40 clear unit if (screen52.getRows() != 24) screen52.setRowsCols(24,80); screen52.clearAll(); break; case CMD_CLEAR_FORMAT_TABLE: // 80 0x50 Clear format table screen52.clearTable(); break; case CMD_READ_INPUT_FIELDS: //0x42 66 read input fields case CMD_READ_MDT_FIELDS: // 0x52 82 read MDT Fields bk.getNextByte(); bk.getNextByte(); readType = b; screen52.goHome();// screen52.setCursorOn(); waitingForInput = true; pendingUnlock = true;// screen52.setKeyboardLocked(false); break; case CMD_READ_MDT_IMMEDIATE_ALT: // 0x53 83 readType = b;// screen52.goHome();// waitingForInput = true;// screen52.setKeyboardLocked(false); readImmediate(readType); break; case CMD_WRITE_STRUCTURED_FIELD: // 243 0xF3 -13 Write structured field writeStructuredField(); break; default: done = true; sendNegResponse(NR_REQUEST_ERROR,03,01,01,"parseIncoming"); break; } if (error) done = true; } } catch (Exception exc) {System.out.println("incoming " + exc.getMessage());}; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/be319bbdd8024ad2c91541f2e005828a779a5afe/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
screen52.setCursorOff();
screen52.setCursorActive(false);
private final void readImmediate(int readType) { if (screen52.isStatusErrorCode()) { screen52.restoreErrorLine(); screen52.setStatus(screen52.STATUS_ERROR_CODE,screen52.STATUS_VALUE_OFF,null); } if (!enhanced) { screen52.setCursorOff(); } screen52.setStatus(screen52.STATUS_SYSTEM,screen52.STATUS_VALUE_ON,null); screen52.setKeyboardLocked(true); pendingUnlock = false; invited = false; screen52.getScreenFields().readFormatTable(baosp,readType,codePage); try { writeGDS(0, 3, baosp.toByteArray()); } catch (IOException ioe) { System.out.println(ioe.getMessage()); baosp.reset(); } baosp.reset(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/be319bbdd8024ad2c91541f2e005828a779a5afe/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
screen52.setCursorOff();
screen52.setCursorActive(false);
public void run () { while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground// me.yield(); pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming();// screen52.setKeyboardLocked(false); pendingUnlock = true; cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); if (!firstScreen) { firstScreen = true; controller.fireSessionChanged(TN5250jConstants.STATE_CONNECTED); signOnSave = screen52.getScreenAsChars(); System.out.println("Signon saved"); } break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try {// SwingUtilities.invokeAndWait(// new Runnable () {// public void run() {// screen52.updateDirty();// }// }// ); screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); exd.printStackTrace(); } if (pendingUnlock && !screen52.isStatusErrorCode()) { screen52.setKeyboardLocked(false); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground// me.yield(); pthread.yield(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/be319bbdd8024ad2c91541f2e005828a779a5afe/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
screen52.setCursorOn();
screen52.setCursorActive(true);
public void run () { while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground// me.yield(); pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming();// screen52.setKeyboardLocked(false); pendingUnlock = true; cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); if (!firstScreen) { firstScreen = true; controller.fireSessionChanged(TN5250jConstants.STATE_CONNECTED); signOnSave = screen52.getScreenAsChars(); System.out.println("Signon saved"); } break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try {// SwingUtilities.invokeAndWait(// new Runnable () {// public void run() {// screen52.updateDirty();// }// }// ); screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); exd.printStackTrace(); } if (pendingUnlock && !screen52.isStatusErrorCode()) { screen52.setKeyboardLocked(false); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground// me.yield(); pthread.yield(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/be319bbdd8024ad2c91541f2e005828a779a5afe/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
screen52.setCursorOn();
screen52.setCursorActive(true);
public void run () { while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground// me.yield(); pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming();// screen52.setKeyboardLocked(false); pendingUnlock = true; cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); if (!firstScreen) { firstScreen = true; controller.fireSessionChanged(TN5250jConstants.STATE_CONNECTED); signOnSave = screen52.getScreenAsChars(); System.out.println("Signon saved"); } break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try {// SwingUtilities.invokeAndWait(// new Runnable () {// public void run() {// screen52.updateDirty();// }// }// ); screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); exd.printStackTrace(); } if (pendingUnlock && !screen52.isStatusErrorCode()) { screen52.setKeyboardLocked(false); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground// me.yield(); pthread.yield(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/be319bbdd8024ad2c91541f2e005828a779a5afe/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
screen52.setCursorOn();
screen52.setCursorActive(true);
public void run () { while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground// me.yield(); pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming();// screen52.setKeyboardLocked(false); pendingUnlock = true; cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); if (!firstScreen) { firstScreen = true; controller.fireSessionChanged(TN5250jConstants.STATE_CONNECTED); signOnSave = screen52.getScreenAsChars(); System.out.println("Signon saved"); } break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try {// SwingUtilities.invokeAndWait(// new Runnable () {// public void run() {// screen52.updateDirty();// }// }// ); screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); exd.printStackTrace(); } if (pendingUnlock && !screen52.isStatusErrorCode()) { screen52.setKeyboardLocked(false); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground// me.yield(); pthread.yield(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/be319bbdd8024ad2c91541f2e005828a779a5afe/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
screen52.setCursorOff();
screen52.setCursorActive(false);
public final boolean sendAidKey(int aid) { if (screen52.isStatusErrorCode()) { screen52.restoreErrorLine(); screen52.setStatus(screen52.STATUS_ERROR_CODE,screen52.STATUS_VALUE_OFF,null); } if (!enhanced) { screen52.setCursorOff(); } screen52.setStatus(screen52.STATUS_SYSTEM,screen52.STATUS_VALUE_ON,null); screen52.setKeyboardLocked(true); pendingUnlock = false; invited = false; baosp.write(screen52.getCurrentRow()); baosp.write(screen52.getCurrentCol()); baosp.write(aid); if (dataIncluded(aid)) screen52.getScreenFields().readFormatTable(baosp,readType,codePage); try { writeGDS(0, 3, baosp.toByteArray()); } catch (IOException ioe) { System.out.println(ioe.getMessage()); baosp.reset(); return false; } baosp.reset(); return true; }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/be319bbdd8024ad2c91541f2e005828a779a5afe/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java
Item(int kind, int offsetToFP) { assertCondition(kind > 0, "Invalid kind"); this.kind = kind; this.offsetToFP = offsetToFP;
protected Item(ItemFactory factory) { this.factory = factory; if (true) { final Vm vm = Vm.getVm(); final String name = getClass().getName(); final Counter cnt = vm.getCounter(name); cnt.inc(); }
Item(int kind, int offsetToFP) { assertCondition(kind > 0, "Invalid kind"); this.kind = kind; this.offsetToFP = offsetToFP; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/Item.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/Item.java