rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
protected void setScreenAttr(int pos, int attr) {
|
protected void setScreenAttr(int pos, int attr, boolean isAttr) {
|
protected void setScreenAttr(int pos, int attr) { screenAttr[pos] = (char)attr; screenGUI[pos] = initChar; disperseAttribute(pos,attr); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9211cfab1f37086bbce829089c9aac4ad469fc4e/ScreenPlanes.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/ScreenPlanes.java
|
disperseAttribute(pos,attr);
|
protected void setScreenAttr(int pos, int attr) { screenAttr[pos] = (char)attr; screenGUI[pos] = initChar; disperseAttribute(pos,attr); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9211cfab1f37086bbce829089c9aac4ad469fc4e/ScreenPlanes.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/ScreenPlanes.java
|
|
System.arraycopy(screen,0,fieldExtended,0,screenSize); System.arraycopy(screen,0,screenField,0,screenSize);
|
if (initArray == null) { initArray = new char[screenSize]; System.arraycopy(screen,0,initArray,0,screenSize); } System.arraycopy(initArray,0,fieldExtended,0,screenSize); System.arraycopy(initArray,0,screenField,0,screenSize);
|
protected void initalizePlanes () { for (int y = 0;y < screenSize; y++) { setScreenCharAndAttr(y,initChar,initAttr,false); screenGUI[y] = NO_GUI; screenIsChanged[y] = false; } // here we will just copy a plane that has already been initialized // onto the other planes using arraycopy which will be faster. I hope. System.arraycopy(screen,0,fieldExtended,0,screenSize); System.arraycopy(screen,0,screenField,0,screenSize); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9211cfab1f37086bbce829089c9aac4ad469fc4e/ScreenPlanes.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/ScreenPlanes.java
|
protected boolean isInField(int pos, boolean chgToField) { ScreenField sf; for (int x = 0;x < sizeFields; x++) { sf = screenFields[x]; if (sf.withinField(pos)) { if (chgToField) { if (!currentField.equals(sf)) currentModified = false; currentField = sf; } return true; } } return false;
|
protected boolean isInField(int pos) { return isInField(pos,true);
|
protected boolean isInField(int pos, boolean chgToField) { ScreenField sf; for (int x = 0;x < sizeFields; x++) { sf = screenFields[x]; if (sf.withinField(pos)) { if (chgToField) { if (!currentField.equals(sf)) currentModified = false; currentField = sf; } return true; } } return false; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/b6d33292e408bd1059e92d2d1f24f4d77a81098c/ScreenFields.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/ScreenFields.java
|
initArray = null;
|
protected void setSize(int newSize) { int oldRows = numRows; screenSize = newSize; numCols = 80; switch (newSize) { case 24: numRows = 24; break; case 27: numRows = 27; numCols = 132; break; } // this is used here when size changes setErrorLine(numRows); screenSize = numRows * numCols; screen = new char[screenSize]; screenAttr = new char[screenSize]; screenIsAttr = new char[screenSize]; screenGUI = new char[screenSize]; screenColor = new char[screenSize]; screenExtended = new char[screenSize]; fieldExtended = new char[screenSize]; screenIsChanged = new boolean[screenSize]; screenField = new char[screenSize]; initalizePlanes(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9211cfab1f37086bbce829089c9aac4ad469fc4e/ScreenPlanes.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/ScreenPlanes.java
|
|
throw new BAD_OPERATION("Policy expected");
|
BAD_OPERATION bad = new BAD_OPERATION("Policy expected"); bad.minor = Minor.Any; throw bad;
|
public static Policy extract(Any any) { try { PolicyHolder h = (PolicyHolder) any.extract_Streamable(); return h.value; } catch (ClassCastException ex) { throw new BAD_OPERATION("Policy expected"); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PolicyHelper.java/clean/core/src/classpath/org/org/omg/CORBA/PolicyHelper.java
|
private void createExternalProgramsPanel() { // create external options panel JPanel externalPrograms = new JPanel(); // define layout externalPanel.setLayout(new BorderLayout()); externalPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 10, 5)); externalPrograms.setLayout(new AlignLayout(3,5,5)); externalPrograms.setBorder(BorderFactory.createTitledBorder( LangTool.getString("external.title"))); externalPrograms.add(new JLabel(LangTool.getString("external.http"))); browser = new JTextField(30); if (props.containsKey("emul.protocol.http")) { browser.setText(props.getProperty("emul.protocol.http")); } externalPrograms.add(browser); externalPrograms.add(new JButton("...")); externalPrograms.add(new JLabel(LangTool.getString("external.mailto"))); mailer = new JTextField(30); if (props.containsKey("emul.protocol.mailto")) { mailer.setText(props.getProperty("emul.protocol.mailto")); } externalPrograms.add(mailer); externalPrograms.add(new JButton("...")); externalPanel.add(externalPrograms, BorderLayout.NORTH); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void createExternalProgramsPanel() { // create external options panel JPanel externalPrograms = new JPanel(); // define layout externalPanel.setLayout(new BorderLayout()); externalPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 10, 5)); externalPrograms.setLayout(new AlignLayout(3,5,5)); externalPrograms.setBorder(BorderFactory.createTitledBorder( LangTool.getString("external.title"))); externalPrograms.add(new JLabel(LangTool.getString("external.http"))); browser = new JTextField(30); if (props.containsKey("emul.protocol.http")) { browser.setText(props.getProperty("emul.protocol.http")); } externalPrograms.add(browser); externalPrograms.add(new JButton("...")); externalPrograms.add(new JLabel(LangTool.getString("external.mailto"))); mailer = new JTextField(30); if (props.containsKey("emul.protocol.mailto")) { mailer.setText(props.getProperty("emul.protocol.mailto")); } externalPrograms.add(mailer); externalPrograms.add(new JButton("...")); externalPanel.add(externalPrograms, BorderLayout.NORTH); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void createExternalProgramsPanel() { // create external options panel JPanel externalPrograms = new JPanel(); // define layout externalPanel.setLayout(new BorderLayout()); externalPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 10, 5)); externalPrograms.setLayout(new AlignLayout(3,5,5)); externalPrograms.setBorder(BorderFactory.createTitledBorder( LangTool.getString("external.title"))); externalPrograms.add(new JLabel(LangTool.getString("external.http"))); browser = new JTextField(30); if (props.containsKey("emul.protocol.http")) { browser.setText(props.getProperty("emul.protocol.http")); } externalPrograms.add(browser); externalPrograms.add(new JButton("...")); externalPrograms.add(new JLabel(LangTool.getString("external.mailto"))); mailer = new JTextField(30); if (props.containsKey("emul.protocol.mailto")) { mailer.setText(props.getProperty("emul.protocol.mailto")); } externalPrograms.add(mailer); externalPrograms.add(new JButton("...")); externalPanel.add(externalPrograms, BorderLayout.NORTH); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void createExternalProgramsPanel() { // create external options panel JPanel externalPrograms = new JPanel(); // define layout externalPanel.setLayout(new BorderLayout()); externalPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 10, 5)); externalPrograms.setLayout(new AlignLayout(3,5,5)); externalPrograms.setBorder(BorderFactory.createTitledBorder( LangTool.getString("external.title"))); externalPrograms.add(new JLabel(LangTool.getString("external.http"))); browser = new JTextField(30); if (props.containsKey("emul.protocol.http")) { browser.setText(props.getProperty("emul.protocol.http")); } externalPrograms.add(browser); externalPrograms.add(new JButton("...")); externalPrograms.add(new JLabel(LangTool.getString("external.mailto"))); mailer = new JTextField(30); if (props.containsKey("emul.protocol.mailto")) { mailer.setText(props.getProperty("emul.protocol.mailto")); } externalPrograms.add(mailer); externalPrograms.add(new JButton("...")); externalPanel.add(externalPrograms, BorderLayout.NORTH); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void createLoggingPanel(){ loggingPanel.setLayout(new GridBagLayout()); // levelPanel levelPanel = new JPanel(new GridBagLayout()); TitledBorder tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Level")); tb.setTitleJustification(TitledBorder.CENTER); levelPanel.setBorder(tb); // Create the Checkboxes // The translation section is called ... // #Logging Literals // Search and translate into the message property-files ButtonGroup levelGroup = new ButtonGroup(); intOFF = new JRadioButton(LangTool.getString("logscr.Off")); intOFF.setSelected(true); intOFF.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intOFF_itemStateChanged(e); } }); intDEBUG = new JRadioButton(LangTool.getString("logscr.Debug")); intINFO = new JRadioButton(LangTool.getString("logscr.Info")); intWARN = new JRadioButton(LangTool.getString("logscr.Warn")); intERROR = new JRadioButton(LangTool.getString("logscr.Error")); intFATAL = new JRadioButton(LangTool.getString("logscr.Fatal")); // add the interface options to the group control levelGroup.add(intOFF); levelGroup.add(intDEBUG); levelGroup.add(intINFO); levelGroup.add(intWARN); levelGroup.add(intERROR); levelGroup.add(intFATAL); // add the levelPanel components gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); levelPanel.add(intOFF, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intDEBUG, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intINFO, gbc); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intWARN, gbc); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intERROR, gbc); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); levelPanel.add(intFATAL, gbc); appenderPanel = new JPanel(new GridBagLayout()); tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Appender")); tb.setTitleJustification(TitledBorder.CENTER); appenderPanel.setBorder(tb); ButtonGroup appenderGroup = new ButtonGroup(); intConsole = new JRadioButton(LangTool.getString("logscr.Console")); intConsole.setSelected(true); intConsole.setEnabled(false); intConsole.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intConsole_itemStateChanged(e); } }); intFile = new JRadioButton(LangTool.getString("logscr.File")); intFile.setEnabled(false); intBoth = new JRadioButton(LangTool.getString("logscr.Both")); intBoth.setEnabled(false); appenderGroup.add(intConsole); appenderGroup.add(intFile); appenderGroup.add(intBoth); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); appenderPanel.add(intConsole, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); appenderPanel.add(intFile, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); appenderPanel.add(intBoth, gbc); // add the pannels to the mainpanel gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 10, 10, 20); loggingPanel.add(levelPanel, gbc); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 20, 10, 10); loggingPanel.add(appenderPanel, gbc); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void createLoggingPanel(){ loggingPanel.setLayout(new GridBagLayout()); // levelPanel levelPanel = new JPanel(new GridBagLayout()); TitledBorder tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Level")); tb.setTitleJustification(TitledBorder.CENTER); levelPanel.setBorder(tb); // Create the Checkboxes // The translation section is called ... // #Logging Literals // Search and translate into the message property-files ButtonGroup levelGroup = new ButtonGroup(); intOFF = new JRadioButton(LangTool.getString("logscr.Off")); intOFF.setSelected(true); intOFF.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intOFF_itemStateChanged(e); } }); intDEBUG = new JRadioButton(LangTool.getString("logscr.Debug")); intINFO = new JRadioButton(LangTool.getString("logscr.Info")); intWARN = new JRadioButton(LangTool.getString("logscr.Warn")); intERROR = new JRadioButton(LangTool.getString("logscr.Error")); intFATAL = new JRadioButton(LangTool.getString("logscr.Fatal")); // add the interface options to the group control levelGroup.add(intOFF); levelGroup.add(intDEBUG); levelGroup.add(intINFO); levelGroup.add(intWARN); levelGroup.add(intERROR); levelGroup.add(intFATAL); // add the levelPanel components gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); levelPanel.add(intOFF, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intDEBUG, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intINFO, gbc); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intWARN, gbc); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intERROR, gbc); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); levelPanel.add(intFATAL, gbc); appenderPanel = new JPanel(new GridBagLayout()); tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Appender")); tb.setTitleJustification(TitledBorder.CENTER); appenderPanel.setBorder(tb); ButtonGroup appenderGroup = new ButtonGroup(); intConsole = new JRadioButton(LangTool.getString("logscr.Console")); intConsole.setSelected(true); intConsole.setEnabled(false); intConsole.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intConsole_itemStateChanged(e); } }); intFile = new JRadioButton(LangTool.getString("logscr.File")); intFile.setEnabled(false); intBoth = new JRadioButton(LangTool.getString("logscr.Both")); intBoth.setEnabled(false); appenderGroup.add(intConsole); appenderGroup.add(intFile); appenderGroup.add(intBoth); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); appenderPanel.add(intConsole, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); appenderPanel.add(intFile, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); appenderPanel.add(intBoth, gbc); // add the pannels to the mainpanel gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 10, 10, 20); loggingPanel.add(levelPanel, gbc); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 20, 10, 10); loggingPanel.add(appenderPanel, gbc); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void createLoggingPanel(){ loggingPanel.setLayout(new GridBagLayout()); // levelPanel levelPanel = new JPanel(new GridBagLayout()); TitledBorder tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Level")); tb.setTitleJustification(TitledBorder.CENTER); levelPanel.setBorder(tb); // Create the Checkboxes // The translation section is called ... // #Logging Literals // Search and translate into the message property-files ButtonGroup levelGroup = new ButtonGroup(); intOFF = new JRadioButton(LangTool.getString("logscr.Off")); intOFF.setSelected(true); intOFF.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intOFF_itemStateChanged(e); } }); intDEBUG = new JRadioButton(LangTool.getString("logscr.Debug")); intINFO = new JRadioButton(LangTool.getString("logscr.Info")); intWARN = new JRadioButton(LangTool.getString("logscr.Warn")); intERROR = new JRadioButton(LangTool.getString("logscr.Error")); intFATAL = new JRadioButton(LangTool.getString("logscr.Fatal")); // add the interface options to the group control levelGroup.add(intOFF); levelGroup.add(intDEBUG); levelGroup.add(intINFO); levelGroup.add(intWARN); levelGroup.add(intERROR); levelGroup.add(intFATAL); // add the levelPanel components gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); levelPanel.add(intOFF, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intDEBUG, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intINFO, gbc); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intWARN, gbc); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intERROR, gbc); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); levelPanel.add(intFATAL, gbc); appenderPanel = new JPanel(new GridBagLayout()); tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Appender")); tb.setTitleJustification(TitledBorder.CENTER); appenderPanel.setBorder(tb); ButtonGroup appenderGroup = new ButtonGroup(); intConsole = new JRadioButton(LangTool.getString("logscr.Console")); intConsole.setSelected(true); intConsole.setEnabled(false); intConsole.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intConsole_itemStateChanged(e); } }); intFile = new JRadioButton(LangTool.getString("logscr.File")); intFile.setEnabled(false); intBoth = new JRadioButton(LangTool.getString("logscr.Both")); intBoth.setEnabled(false); appenderGroup.add(intConsole); appenderGroup.add(intFile); appenderGroup.add(intBoth); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); appenderPanel.add(intConsole, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); appenderPanel.add(intFile, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); appenderPanel.add(intBoth, gbc); // add the pannels to the mainpanel gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 10, 10, 20); loggingPanel.add(levelPanel, gbc); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 20, 10, 10); loggingPanel.add(appenderPanel, gbc); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void createLoggingPanel(){ loggingPanel.setLayout(new GridBagLayout()); // levelPanel levelPanel = new JPanel(new GridBagLayout()); TitledBorder tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Level")); tb.setTitleJustification(TitledBorder.CENTER); levelPanel.setBorder(tb); // Create the Checkboxes // The translation section is called ... // #Logging Literals // Search and translate into the message property-files ButtonGroup levelGroup = new ButtonGroup(); intOFF = new JRadioButton(LangTool.getString("logscr.Off")); intOFF.setSelected(true); intOFF.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intOFF_itemStateChanged(e); } }); intDEBUG = new JRadioButton(LangTool.getString("logscr.Debug")); intINFO = new JRadioButton(LangTool.getString("logscr.Info")); intWARN = new JRadioButton(LangTool.getString("logscr.Warn")); intERROR = new JRadioButton(LangTool.getString("logscr.Error")); intFATAL = new JRadioButton(LangTool.getString("logscr.Fatal")); // add the interface options to the group control levelGroup.add(intOFF); levelGroup.add(intDEBUG); levelGroup.add(intINFO); levelGroup.add(intWARN); levelGroup.add(intERROR); levelGroup.add(intFATAL); // add the levelPanel components gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); levelPanel.add(intOFF, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intDEBUG, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intINFO, gbc); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intWARN, gbc); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intERROR, gbc); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); levelPanel.add(intFATAL, gbc); appenderPanel = new JPanel(new GridBagLayout()); tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Appender")); tb.setTitleJustification(TitledBorder.CENTER); appenderPanel.setBorder(tb); ButtonGroup appenderGroup = new ButtonGroup(); intConsole = new JRadioButton(LangTool.getString("logscr.Console")); intConsole.setSelected(true); intConsole.setEnabled(false); intConsole.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intConsole_itemStateChanged(e); } }); intFile = new JRadioButton(LangTool.getString("logscr.File")); intFile.setEnabled(false); intBoth = new JRadioButton(LangTool.getString("logscr.Both")); intBoth.setEnabled(false); appenderGroup.add(intConsole); appenderGroup.add(intFile); appenderGroup.add(intBoth); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); appenderPanel.add(intConsole, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); appenderPanel.add(intFile, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); appenderPanel.add(intBoth, gbc); // add the pannels to the mainpanel gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 10, 10, 20); loggingPanel.add(levelPanel, gbc); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 20, 10, 10); loggingPanel.add(appenderPanel, gbc); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
switch (logLevel) { case TN5250jLogger.OFF: intOFF.setSelected(true); break; case TN5250jLogger.DEBUG: intDEBUG.setSelected(true); break; case TN5250jLogger.INFO: intINFO.setSelected(true); break; case TN5250jLogger.WARN: intWARN.setSelected(true); break; case TN5250jLogger.ERROR: intERROR.setSelected(true); break; case TN5250jLogger.FATAL: intFATAL.setSelected(true); break; default: intINFO.setSelected(true); }
|
private void createLoggingPanel(){ loggingPanel.setLayout(new GridBagLayout()); // levelPanel levelPanel = new JPanel(new GridBagLayout()); TitledBorder tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Level")); tb.setTitleJustification(TitledBorder.CENTER); levelPanel.setBorder(tb); // Create the Checkboxes // The translation section is called ... // #Logging Literals // Search and translate into the message property-files ButtonGroup levelGroup = new ButtonGroup(); intOFF = new JRadioButton(LangTool.getString("logscr.Off")); intOFF.setSelected(true); intOFF.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intOFF_itemStateChanged(e); } }); intDEBUG = new JRadioButton(LangTool.getString("logscr.Debug")); intINFO = new JRadioButton(LangTool.getString("logscr.Info")); intWARN = new JRadioButton(LangTool.getString("logscr.Warn")); intERROR = new JRadioButton(LangTool.getString("logscr.Error")); intFATAL = new JRadioButton(LangTool.getString("logscr.Fatal")); // add the interface options to the group control levelGroup.add(intOFF); levelGroup.add(intDEBUG); levelGroup.add(intINFO); levelGroup.add(intWARN); levelGroup.add(intERROR); levelGroup.add(intFATAL); // add the levelPanel components gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); levelPanel.add(intOFF, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intDEBUG, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intINFO, gbc); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intWARN, gbc); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intERROR, gbc); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); levelPanel.add(intFATAL, gbc); appenderPanel = new JPanel(new GridBagLayout()); tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Appender")); tb.setTitleJustification(TitledBorder.CENTER); appenderPanel.setBorder(tb); ButtonGroup appenderGroup = new ButtonGroup(); intConsole = new JRadioButton(LangTool.getString("logscr.Console")); intConsole.setSelected(true); intConsole.setEnabled(false); intConsole.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intConsole_itemStateChanged(e); } }); intFile = new JRadioButton(LangTool.getString("logscr.File")); intFile.setEnabled(false); intBoth = new JRadioButton(LangTool.getString("logscr.Both")); intBoth.setEnabled(false); appenderGroup.add(intConsole); appenderGroup.add(intFile); appenderGroup.add(intBoth); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); appenderPanel.add(intConsole, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); appenderPanel.add(intFile, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); appenderPanel.add(intBoth, gbc); // add the pannels to the mainpanel gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 10, 10, 20); loggingPanel.add(levelPanel, gbc); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 20, 10, 10); loggingPanel.add(appenderPanel, gbc); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
|
private void createLoggingPanel(){ loggingPanel.setLayout(new GridBagLayout()); // levelPanel levelPanel = new JPanel(new GridBagLayout()); TitledBorder tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Level")); tb.setTitleJustification(TitledBorder.CENTER); levelPanel.setBorder(tb); // Create the Checkboxes // The translation section is called ... // #Logging Literals // Search and translate into the message property-files ButtonGroup levelGroup = new ButtonGroup(); intOFF = new JRadioButton(LangTool.getString("logscr.Off")); intOFF.setSelected(true); intOFF.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intOFF_itemStateChanged(e); } }); intDEBUG = new JRadioButton(LangTool.getString("logscr.Debug")); intINFO = new JRadioButton(LangTool.getString("logscr.Info")); intWARN = new JRadioButton(LangTool.getString("logscr.Warn")); intERROR = new JRadioButton(LangTool.getString("logscr.Error")); intFATAL = new JRadioButton(LangTool.getString("logscr.Fatal")); // add the interface options to the group control levelGroup.add(intOFF); levelGroup.add(intDEBUG); levelGroup.add(intINFO); levelGroup.add(intWARN); levelGroup.add(intERROR); levelGroup.add(intFATAL); // add the levelPanel components gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); levelPanel.add(intOFF, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intDEBUG, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intINFO, gbc); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intWARN, gbc); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); levelPanel.add(intERROR, gbc); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); levelPanel.add(intFATAL, gbc); appenderPanel = new JPanel(new GridBagLayout()); tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Appender")); tb.setTitleJustification(TitledBorder.CENTER); appenderPanel.setBorder(tb); ButtonGroup appenderGroup = new ButtonGroup(); intConsole = new JRadioButton(LangTool.getString("logscr.Console")); intConsole.setSelected(true); intConsole.setEnabled(false); intConsole.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { intConsole_itemStateChanged(e); } }); intFile = new JRadioButton(LangTool.getString("logscr.File")); intFile.setEnabled(false); intBoth = new JRadioButton(LangTool.getString("logscr.Both")); intBoth.setEnabled(false); appenderGroup.add(intConsole); appenderGroup.add(intFile); appenderGroup.add(intBoth); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(20, 20, 5, 20); appenderPanel.add(intConsole, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 5, 20); appenderPanel.add(intFile, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 20, 20, 20); appenderPanel.add(intBoth, gbc); // add the pannels to the mainpanel gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 10, 10, 20); loggingPanel.add(levelPanel, gbc); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 20, 10, 10); loggingPanel.add(appenderPanel, gbc); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
intConsole_itemStateChanged(e);
|
intDEBUG_itemStateChanged(e);
|
public void itemStateChanged(ItemEvent e) { intConsole_itemStateChanged(e); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
TN5250jLogFactory.setLogLevels(TN5250jLogger.OFF);
|
private void intOFF_itemStateChanged(ItemEvent e) { if (!intOFF.isSelected() && TN5250jLogFactory.isLog4j()) { intConsole.setEnabled(true); intFile.setEnabled(true); intBoth.setEnabled(true); } else { intConsole.setEnabled(false); intConsole.setSelected(true); intFile.setEnabled(false); intBoth.setEnabled(false); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
|
void jbInit() throws Exception { // make it non resizable setResizable(false); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create sessions panel createSessionsPanel(); // create emulator options panel createEmulatorOptionsPanel(); // create the button options createButtonOptions(); JTabbedPane optionTabs = new JTabbedPane(); optionTabs.addChangeListener(this); optionTabs.addTab(LangTool.getString("ss.labelConnections"), sessionPanel); optionTabs.addTab(LangTool.getString("ss.labelOptions1"), emulOptPanel); createLoggingPanel(); optionTabs.addTab(LangTool.getString("ss.labelLogging"), loggingPanel); createAccessPanel(); optionTabs.addTab(LangTool.getString("ss.labelOptions2"), accessPanel); // create external programs panel createExternalProgramsPanel(); optionTabs.addTab(LangTool.getString("ss.labelExternal"), externalPanel); // add the panels to our dialog getContentPane().add(optionTabs, BorderLayout.CENTER); getContentPane().add(options, BorderLayout.SOUTH); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation( (screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // set default selection value as the first row or default session if (sessions.getRowCount() > 0) { int selInterval = 0; for (int x = 0; x < sessions.getRowCount(); x++) { if (((Boolean) ctm.getValueAt(x, 2)).booleanValue()) selInterval = x; } sessions.getSelectionModel().setSelectionInterval( selInterval, selInterval); } // Oh man what a pain in the ass. Had to add a window listener to request // focus of the sessions list. addWindowListener(new WindowAdapter() { public void windowOpened(WindowEvent e) { SwingUtilities.invokeLater(new Runnable() { public void run() { sessions.requestFocus(); } }); } }); // now show the world what we and they can do this.setVisible(true); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void saveProps() { setOptionAccess(); setExternalPrograms(); ConfigureFactory.getInstance().saveSettings( ConfigureFactory.SESSIONS, "------ Session Information --------"); OptionAccessFactory.getInstance().reload(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
setLogLevel();
|
private void saveProps() { setOptionAccess(); setExternalPrograms(); ConfigureFactory.getInstance().saveSettings( ConfigureFactory.SESSIONS, "------ Session Information --------"); OptionAccessFactory.getInstance().reload(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
|
private void setExternalPrograms() { // set the external browser program to use if (browser.getText().trim().length() > 0) { props.setProperty("emul.protocol.http", browser.getText().trim()); } else { props.remove("emul.protocol.http"); } // set the external mailer program to use if (mailer.getText().trim().length() > 0) { props.setProperty("emul.protocol.mailto", mailer.getText().trim()); } else { props.remove("emul.protocol.mailto"); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void setExternalPrograms() { // set the external browser program to use if (browser.getText().trim().length() > 0) { props.setProperty("emul.protocol.http", browser.getText().trim()); } else { props.remove("emul.protocol.http"); } // set the external mailer program to use if (mailer.getText().trim().length() > 0) { props.setProperty("emul.protocol.mailto", mailer.getText().trim()); } else { props.remove("emul.protocol.mailto"); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void setExternalPrograms() { // set the external browser program to use if (browser.getText().trim().length() > 0) { props.setProperty("emul.protocol.http", browser.getText().trim()); } else { props.remove("emul.protocol.http"); } // set the external mailer program to use if (mailer.getText().trim().length() > 0) { props.setProperty("emul.protocol.mailto", mailer.getText().trim()); } else { props.remove("emul.protocol.mailto"); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void setExternalPrograms() { // set the external browser program to use if (browser.getText().trim().length() > 0) { props.setProperty("emul.protocol.http", browser.getText().trim()); } else { props.remove("emul.protocol.http"); } // set the external mailer program to use if (mailer.getText().trim().length() > 0) { props.setProperty("emul.protocol.mailto", mailer.getText().trim()); } else { props.remove("emul.protocol.mailto"); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void setExternalPrograms() { // set the external browser program to use if (browser.getText().trim().length() > 0) { props.setProperty("emul.protocol.http", browser.getText().trim()); } else { props.remove("emul.protocol.http"); } // set the external mailer program to use if (mailer.getText().trim().length() > 0) { props.setProperty("emul.protocol.mailto", mailer.getText().trim()); } else { props.remove("emul.protocol.mailto"); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
private void setExternalPrograms() { // set the external browser program to use if (browser.getText().trim().length() > 0) { props.setProperty("emul.protocol.http", browser.getText().trim()); } else { props.remove("emul.protocol.http"); } // set the external mailer program to use if (mailer.getText().trim().length() > 0) { props.setProperty("emul.protocol.mailto", mailer.getText().trim()); } else { props.remove("emul.protocol.mailto"); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/68d8dfc1742dcfed0fb2d02fb4111f791863bc9c/Connect.java/buggy/tn5250j/src/org/tn5250j/Connect.java
|
||
protected AccessibleJColorChooser() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JColorChooser.java/clean/core/src/classpath/javax/javax/swing/JColorChooser.java
|
||
static void makeModal(JDialog dialog) { try { synchronized (dialog) { while (dialog.isVisible()) dialog.wait(); } } catch (InterruptedException e) { } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JColorChooser.java/clean/core/src/classpath/javax/javax/swing/JColorChooser.java
|
||
listener = new DefaultExceptionListener();
|
listener = DefaultExceptionListener.INSTANCE;
|
public void setExceptionListener(ExceptionListener listener) { // uses a default implementation when null if (listener == null) { listener = new DefaultExceptionListener(); } exceptionListener = listener; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/XMLDecoder.java/clean/core/src/classpath/java/java/beans/XMLDecoder.java
|
ClassLoader cl = security.getCallingClassLoader();
|
ClassLoader cl = VMStackWalker.getCallingClassLoader();
|
public static ResourceBundle getBundle(String baseName) { ClassLoader cl = security.getCallingClassLoader(); if (cl == null) cl = ClassLoader.getSystemClassLoader(); return getBundle(baseName, Locale.getDefault(), cl); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d7e10284742ade2934a1d2f7548145b029098f79/ResourceBundle.java/buggy/core/src/classpath/java/java/util/ResourceBundle.java
|
static ClassLoader currentClassLoader (SecurityManager sm) {
|
static ClassLoader currentClassLoader() {
|
static ClassLoader currentClassLoader (SecurityManager sm) { // TODO implement me return null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/56dc0570f561e04fb8f40dd73aa56adc1ae59765/VMObjectInputStream.java/clean/core/src/classpath/vm/java/io/VMObjectInputStream.java
|
protected void installDefaults(JTree tree)
|
protected void installDefaults()
|
protected void installDefaults(JTree tree) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
|
protected void uninstallDefaults(JTree tree)
|
protected void uninstallDefaults()
|
protected void uninstallDefaults(JTree tree) { tree.setFont(null); tree.setForeground(null); tree.setBackground(null); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
|
setPropertiesFromAttributes();
|
StyleSheet ss = getStyleSheet(); attributes = ss.getViewAttributes(this); preferenceChanged(null, true, true);
|
public void changedUpdate(DocumentEvent e, Shape a, ViewFactory f) { super.changedUpdate(e, a, f); setPropertiesFromAttributes(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/InlineView.java/buggy/core/src/classpath/javax/javax/swing/text/html/InlineView.java
|
return super.getAttributes();
|
if (attributes == null) { StyleSheet ss = getStyleSheet(); attributes = ss.getViewAttributes(this); } return attributes;
|
public AttributeSet getAttributes() { // FIXME: Implement this. return super.getAttributes(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/InlineView.java/buggy/core/src/classpath/javax/javax/swing/text/html/InlineView.java
|
protected void setPropertiesFromAttributes() { // FIXME: Implement this. super.setPropertiesFromAttributes(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/InlineView.java/buggy/core/src/classpath/javax/javax/swing/text/html/InlineView.java
|
||
AttributeSet atts = getAttributes(); Object o = atts.getAttribute(CSS.Attribute.TEXT_DECORATION); boolean b = false; if (o != null && o.toString().contains("underline")) b = true; setUnderline(b); b = false; if (o != null && o.toString().contains("line-through")) b = true; setStrikeThrough(b); o = atts.getAttribute(CSS.Attribute.VERTICAL_ALIGN); b = false; if (o != null && o.toString().contains("sub")) b = true; setSubscript(b); b = false; if (o != null && o.toString().contains("sup")) b = true; setSuperscript(b);
|
protected void setPropertiesFromAttributes() { // FIXME: Implement this. super.setPropertiesFromAttributes(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/InlineView.java/buggy/core/src/classpath/javax/javax/swing/text/html/InlineView.java
|
|
protected AccessibleJRootPane() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JRootPane.java/buggy/core/src/classpath/javax/javax/swing/JRootPane.java
|
||
protected RootLayout() { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JRootPane.java/buggy/core/src/classpath/javax/javax/swing/JRootPane.java
|
||
public void addLayoutComponent(Component comp, Object constraints) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JRootPane.java/buggy/core/src/classpath/javax/javax/swing/JRootPane.java
|
||
public void invalidateLayout(Container target) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JRootPane.java/buggy/core/src/classpath/javax/javax/swing/JRootPane.java
|
||
public void removeLayoutComponent(Component comp) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JRootPane.java/buggy/core/src/classpath/javax/javax/swing/JRootPane.java
|
||
public void mouseMoved(MouseEvent e) { }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java
|
||
final String diffFileName = pkg + ".diff";
|
final String diffFileName = pkg + ".pkgdiff";
|
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map vmFiles = scanJavaFiles(vmDirs); final Map classpathFiles = scanJavaFiles(classpathDirs); final TreeSet allFiles = new TreeSet(); final Map packageDiffs = new TreeMap(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; for (Iterator i = allFiles.iterator(); i.hasNext(); ) { final String name = (String)i.next(); final JavaFile cpFile = (JavaFile)classpathFiles.get(name); final JavaFile vmFile = (JavaFile)vmFiles.get(name); if (!vmFiles.containsKey(name)) { reportMissing(out, cpFile.getClassName(), "classpath", getFlags(cpFile)); missingInCp++; } else if (!classpathFiles.containsKey(name)) { reportMissing(out, vmFile.getClassName(), "vm", 0); missingInVm++; } else { final String diffFileName = vmFile.getClassName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getClassName(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Iterator i = packageDiffs.entrySet().iterator(); i.hasNext(); ) { final Map.Entry entry = (Map.Entry)i.next(); final String pkg = (String)entry.getKey(); final String diff = (String)entry.getValue(); final String diffFileName = pkg + ".diff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b7da2a9e0b7f6114dc26aa1a146ce8e5bf67dc40/CompareTask.java/buggy/builder/src/builder/org/jnode/ant/taskdefs/classpath/CompareTask.java
|
g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1);
|
g.drawLine(x + 1, y + 1, x + w - 3, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1); g.setColor(shadow); g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); g.setColor(darkShadow); g.drawLine(x, y + h, x + w, y + h); g.drawLine(x + w, y, x + w, y + h); g.setColor(saved); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1);
|
g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2);
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1); g.setColor(shadow); g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); g.setColor(darkShadow); g.drawLine(x, y + h, x + w, y + h); g.drawLine(x + w, y, x + w, y + h); g.setColor(saved); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
g.drawLine(x, y + h, x + w, y + h); g.drawLine(x + w, y, x + w, y + h);
|
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1);
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1); g.setColor(shadow); g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); g.setColor(darkShadow); g.drawLine(x, y + h, x + w, y + h); g.drawLine(x + w, y, x + w, y + h); g.setColor(saved); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
}
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1); g.setColor(shadow); g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); g.setColor(darkShadow); g.drawLine(x, y + h, x + w, y + h); g.drawLine(x + w, y, x + w, y + h); g.setColor(saved); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicArrowButton.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicArrowButton.java
|
|
{ }
|
{ }
|
Graphics(){}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/clean/core/src/classpath/java/java/awt/Graphics.java
|
{
|
{
|
public void finalize(){ dispose();}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/clean/core/src/classpath/java/java/awt/Graphics.java
|
}
|
}
|
public void finalize(){ dispose();}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/clean/core/src/classpath/java/java/awt/Graphics.java
|
{
|
{
|
public Rectangle getClipRect(){ return getClipBounds();}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/clean/core/src/classpath/java/java/awt/Graphics.java
|
}
|
}
|
public Rectangle getClipRect(){ return getClipBounds();}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/clean/core/src/classpath/java/java/awt/Graphics.java
|
{
|
{
|
public String toString(){ return getClass ().getName () + "[font=" + getFont () + ",color=" + getColor () + "]";}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/clean/core/src/classpath/java/java/awt/Graphics.java
|
}
|
}
|
public String toString(){ return getClass ().getName () + "[font=" + getFont () + ",color=" + getColor () + "]";}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/clean/core/src/classpath/java/java/awt/Graphics.java
|
protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); // Set color for selected text. g.setColor(selectedColor); g.setColor(Color.BLACK); // Initialize buffer for faster drawing of all characters. int len = p1 - p0; char[] buffer = new char[len]; for (int index = 0; index < len; ++index) buffer[index] = ch; // Draw echo charaters. g.drawChars(buffer, 0, len, x, y); // Return new x position right of all drawn characters. return x + len * metrics.charWidth(ch); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/PasswordView.java/clean/core/src/classpath/javax/javax/swing/text/PasswordView.java
|
||
int len = p1 - p0; char[] buffer = new char[len]; for (int index = 0; index < len; ++index) buffer[index] = ch; g.drawChars(buffer, 0, len, x, y); return x + len * metrics.charWidth(ch);
|
for (int index = p0; index < p1; ++index) x = drawEchoCharacter(g, x, y, ch); return x;
|
protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); // Set color for selected text. g.setColor(selectedColor); g.setColor(Color.BLACK); // Initialize buffer for faster drawing of all characters. int len = p1 - p0; char[] buffer = new char[len]; for (int index = 0; index < len; ++index) buffer[index] = ch; // Draw echo charaters. g.drawChars(buffer, 0, len, x, y); // Return new x position right of all drawn characters. return x + len * metrics.charWidth(ch); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/PasswordView.java/clean/core/src/classpath/javax/javax/swing/text/PasswordView.java
|
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); Segment segment = new Segment(); // Set color for unselected text. g.setColor(unselectedColor); g.setColor(Color.BLACK); // Initialize buffer for faster drawing of all characters. p1--; getDocument().getText(p0, p1 - p0, segment); int len = segment.toString().length(); char[] buffer = new char[len]; for (int index = 0; index < len; ++index) buffer[index] = ch; y += getPreferredSpan(Y_AXIS)/2; // Draw echo charaters. g.drawChars(buffer, 0, len, x, y); // Return new x position right of all drawn characters. return x + (len * metrics.charWidth(ch)); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/PasswordView.java/clean/core/src/classpath/javax/javax/swing/text/PasswordView.java
|
||
Segment segment = new Segment();
|
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); Segment segment = new Segment(); // Set color for unselected text. g.setColor(unselectedColor); g.setColor(Color.BLACK); // Initialize buffer for faster drawing of all characters. p1--; getDocument().getText(p0, p1 - p0, segment); int len = segment.toString().length(); char[] buffer = new char[len]; for (int index = 0; index < len; ++index) buffer[index] = ch; y += getPreferredSpan(Y_AXIS)/2; // Draw echo charaters. g.drawChars(buffer, 0, len, x, y); // Return new x position right of all drawn characters. return x + (len * metrics.charWidth(ch)); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/PasswordView.java/clean/core/src/classpath/javax/javax/swing/text/PasswordView.java
|
|
p1--; getDocument().getText(p0, p1 - p0, segment); int len = segment.toString().length(); char[] buffer = new char[len]; for (int index = 0; index < len; ++index) buffer[index] = ch; y += getPreferredSpan(Y_AXIS)/2; g.drawChars(buffer, 0, len, x, y); return x + (len * metrics.charWidth(ch));
|
for (int index = p0; index < p1; ++index) x = drawEchoCharacter(g, x, y, ch); return x;
|
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); Segment segment = new Segment(); // Set color for unselected text. g.setColor(unselectedColor); g.setColor(Color.BLACK); // Initialize buffer for faster drawing of all characters. p1--; getDocument().getText(p0, p1 - p0, segment); int len = segment.toString().length(); char[] buffer = new char[len]; for (int index = 0; index < len; ++index) buffer[index] = ch; y += getPreferredSpan(Y_AXIS)/2; // Draw echo charaters. g.drawChars(buffer, 0, len, x, y); // Return new x position right of all drawn characters. return x + (len * metrics.charWidth(ch)); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/PasswordView.java/clean/core/src/classpath/javax/javax/swing/text/PasswordView.java
|
void clean (ObjID[] ids, long sequenceNum, VMID vmid, boolean strong)
|
void clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong)
|
void clean (ObjID[] ids, long sequenceNum, VMID vmid, boolean strong) throws RemoteException;
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/DGC.java/clean/core/src/classpath/java/java/rmi/dgc/DGC.java
|
Lease dirty (ObjID[] ids, long sequenceNum, Lease lease)
|
Lease dirty(ObjID[] ids, long sequenceNum, Lease lease)
|
Lease dirty (ObjID[] ids, long sequenceNum, Lease lease) throws RemoteException;
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/DGC.java/clean/core/src/classpath/java/java/rmi/dgc/DGC.java
|
int size = listeners.size();
|
Vector lc = new Vector(listeners); int size = lc.size();
|
private synchronized void fireCursorChanged(int update) { int startRow = getRow(lastPos); int startCol = getCol(lastPos); if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenChanged(update,startRow,startCol,startRow,startCol); } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d2b319744e3e1d707233832b1541e2e41c522ba6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
(ScreenListener)listeners.elementAt(i);
|
(ScreenListener)lc.elementAt(i);
|
private synchronized void fireCursorChanged(int update) { int startRow = getRow(lastPos); int startCol = getCol(lastPos); if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenChanged(update,startRow,startCol,startRow,startCol); } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d2b319744e3e1d707233832b1541e2e41c522ba6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
private void fireScreenChanged(int which, int startRow, int startCol, int endRow, int endCol) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenChanged(1,startRow,startCol,endRow,endCol); } } dirtyScreen.setBounds(lenScreen,0,0,0); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d2b319744e3e1d707233832b1541e2e41c522ba6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
int size = listeners.size();
|
Vector lc = new Vector(listeners); int size = lc.size();
|
private void fireScreenChanged(int which, int startRow, int startCol, int endRow, int endCol) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenChanged(1,startRow,startCol,endRow,endCol); } } dirtyScreen.setBounds(lenScreen,0,0,0); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d2b319744e3e1d707233832b1541e2e41c522ba6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
ScreenListener target = (ScreenListener)listeners.elementAt(i);
|
ScreenListener target = (ScreenListener)lc.elementAt(i);
|
private void fireScreenChanged(int which, int startRow, int startCol, int endRow, int endCol) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenChanged(1,startRow,startCol,endRow,endCol); } } dirtyScreen.setBounds(lenScreen,0,0,0); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d2b319744e3e1d707233832b1541e2e41c522ba6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
int size = listeners.size();
|
Vector lc = new Vector(listeners); int size = lc.size();
|
private void fireScreenSizeChanged() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenSizeChanged(numRows,numCols); } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d2b319744e3e1d707233832b1541e2e41c522ba6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
(ScreenListener)listeners.elementAt(i);
|
(ScreenListener)lc.elementAt(i);
|
private void fireScreenSizeChanged() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenSizeChanged(numRows,numCols); } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d2b319744e3e1d707233832b1541e2e41c522ba6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
indent = dealWithClosingGroupNodes(containedObj, outputstream, indent);
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { //while writing out, attribHash should not be changed synchronized (attribHash) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString;/* // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); }*/ // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated?/* if ( nodeNameString.equals(Specification.getInstance().getXDFStructureNodeName()) && !XMLDeclAttribs.isEmpty() ) nodeNameString = Specification.getInstance().getXDFRootNodeName();*/ writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " " + item.get("name") + "=\""); // this slows things down, should we use? //writeOutAttribute(outputstream, (String) item.get("value")); writeOut(outputstream, (String) item.get("value")); writeOut(outputstream, "\"" ); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((Specification.getInstance().isPrettyXDFOutput()) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent + Specification.getInstance().getPrettyXDFOutputIndentation()); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (Specification.getInstance().isPrettyXDFOutput() && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (nodeNameString != null) { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } } if (Specification.getInstance().isPrettyXDFOutput() && nodeNameString != null) writeOut(outputstream, Constants.NEW_LINE); }//synchronize }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/b9991f56fbf493dbbc47d39befdb391d9f0b05be/BaseObject.java/clean/src/gov/nasa/gsfc/adc/xdf/BaseObject.java
|
|
indent = dealWithClosingGroupNodes(containedObj, outputstream, indent);
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { //while writing out, attribHash should not be changed synchronized (attribHash) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString;/* // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); }*/ // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated?/* if ( nodeNameString.equals(Specification.getInstance().getXDFStructureNodeName()) && !XMLDeclAttribs.isEmpty() ) nodeNameString = Specification.getInstance().getXDFRootNodeName();*/ writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " " + item.get("name") + "=\""); // this slows things down, should we use? //writeOutAttribute(outputstream, (String) item.get("value")); writeOut(outputstream, (String) item.get("value")); writeOut(outputstream, "\"" ); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((Specification.getInstance().isPrettyXDFOutput()) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent + Specification.getInstance().getPrettyXDFOutputIndentation()); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (Specification.getInstance().isPrettyXDFOutput() && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (nodeNameString != null) { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } } if (Specification.getInstance().isPrettyXDFOutput() && nodeNameString != null) writeOut(outputstream, Constants.NEW_LINE); }//synchronize }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/b9991f56fbf493dbbc47d39befdb391d9f0b05be/BaseObject.java/clean/src/gov/nasa/gsfc/adc/xdf/BaseObject.java
|
|
public Lease(VMID id, long duration) {
|
public Lease(VMID id, long duration) {
|
public Lease(VMID id, long duration) { vmid = id; value = duration;}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/Lease.java/clean/core/src/classpath/java/java/rmi/dgc/Lease.java
|
}
|
}
|
public Lease(VMID id, long duration) { vmid = id; value = duration;}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/Lease.java/clean/core/src/classpath/java/java/rmi/dgc/Lease.java
|
public VMID getVMID() {
|
public VMID getVMID() {
|
public VMID getVMID() { return (vmid);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/Lease.java/clean/core/src/classpath/java/java/rmi/dgc/Lease.java
|
}
|
}
|
public VMID getVMID() { return (vmid);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/Lease.java/clean/core/src/classpath/java/java/rmi/dgc/Lease.java
|
public long getValue() {
|
public long getValue() {
|
public long getValue() { return (value);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/Lease.java/clean/core/src/classpath/java/java/rmi/dgc/Lease.java
|
}
|
}
|
public long getValue() { return (value);}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/Lease.java/clean/core/src/classpath/java/java/rmi/dgc/Lease.java
|
public String toString() {
|
public String toString() {
|
public String toString() { return ("[" + vmid.toString() + ", " + Long.toString(value) + "]");}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/Lease.java/clean/core/src/classpath/java/java/rmi/dgc/Lease.java
|
}
|
}
|
public String toString() { return ("[" + vmid.toString() + ", " + Long.toString(value) + "]");}
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/Lease.java/clean/core/src/classpath/java/java/rmi/dgc/Lease.java
|
"MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()),
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getControlDisabled()), "Label.foreground", new ColorUIResource(getSystemTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.font", getControlTextFont(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.font", getControlTextFont(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/MetalLookAndFeel.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalLookAndFeel.java
|
|
private static final void checkTag(int value_tag) { if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff) && value_tag != vt_NULL && value_tag != vt_INDIRECTION ) throw new MARSHAL("Invalid value record, unsupported header tag: " + value_tag ); }
|
static void checkTag(int value_tag) { if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff) && value_tag != vt_NULL && value_tag != vt_INDIRECTION) { MARSHAL m = new MARSHAL("Invalid value record, unsupported header tag: " + value_tag + " (0x" + Integer.toHexString(value_tag) + ")"); m.minor = Minor.ValueHeaderTag; throw m; } if ((value_tag & vf_MULTIPLE_IDS) != 0 && (value_tag & vf_ID) == 0) { MARSHAL m = new MARSHAL("Invalid value record header flag combination (0x" + Integer.toHexString(value_tag) + ")"); m.minor = Minor.ValueHeaderFlags; throw m; } }
|
private static final void checkTag(int value_tag) { if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff) && value_tag != vt_NULL && value_tag != vt_INDIRECTION ) throw new MARSHAL("Invalid value record, unsupported header tag: " + value_tag ); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
private static Object read_instance(InputStream input, Object value, int value_tag, Object helper )
|
static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase)
|
private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; // Read all chunks. int chunk_size = input.read_long(); if (chunk_size < 0) throw new MARSHAL("Invalid first chunk size " + chunk_size); byte[] r = new byte[ chunk_size ]; while (chunk_size > 0) { if (r.length < chunk_size) r = new byte[ chunk_size + 256 ]; n = 0; reading: while (n < chunk_size) n += input.read(r, n, r.length - n); // Read the size of the next chunk. chunk_size = input.read_long(); // If the value is non negative, there is more than one chunk. // Accumulate chunks in the buffer. // The last chunk (or the only chunk, if only one chunk is // present) is not written in the buffer. It is stored in the // array r, avoiding unnecessary buffer operations. if (chunk_size > 0) { bout = new ByteArrayOutputStream(2 * chunk_size); bout.write(r, 0, chunk_size); } } if (bout != null) { // More than one chunk was present. // Add the last chunk. bout.write(r, 0, n); input = new noHeaderInput(bout.toByteArray()); } else { // Only one chunk was present. input = new noHeaderInput(r); } } else { if (input instanceof cdrBufInput) { // Highly probable case. input = new noHeaderInput(((cdrBufInput) input).buffer.getBuffer()); } else { cdrBufOutput bout = new cdrBufOutput(); int c; while ((c = input.read()) >= 0) bout.write((byte) c); input = new noHeaderInput(bout.buffer.toByteArray()); } } } catch (IOException ex) { MARSHAL m = new MARSHAL("Unable to read chunks"); m.initCause(ex); throw m; } // The user-defines io operations are implemented. if (value instanceof CustomMarshal) { CustomMarshal marsh = (CustomMarshal) value; try { marsh.unmarshal((DataInputStream) input); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else // The IDL-generated io operations are implemented. if (value instanceof Streamable) { ((Streamable) value)._read(input); } else if (helper instanceof BoxedValueHelper) value = ((BoxedValueHelper) helper).read_value(input); else if (helper instanceof ValueFactory) value = ((ValueFactory) helper).read_value((org.omg.CORBA_2_3.portable.InputStream) input); else // Stating the interfaces that the USER should use. throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue or CustomValue." ); // The negative end of state marker is expected from OMG standard. // If the chunking is used, this marker is already extracted. if ((value_tag & vf_CHUNKING) == 0) { int eor = input.read_long(); if (eor >= 0) throw new MARSHAL("End of state marker has an invalid value " + eor); } return value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
ByteArrayOutputStream bout = null; int n = -1;
|
cdrBufOutput output = createBuffer(input, 1024); readNestedValue(value_tag, input, output, -1); cdrBufInput ci = new cdrBufInput(output.buffer.getBuffer()); ci.setRunTime(output.getRunTime());
|
private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; // Read all chunks. int chunk_size = input.read_long(); if (chunk_size < 0) throw new MARSHAL("Invalid first chunk size " + chunk_size); byte[] r = new byte[ chunk_size ]; while (chunk_size > 0) { if (r.length < chunk_size) r = new byte[ chunk_size + 256 ]; n = 0; reading: while (n < chunk_size) n += input.read(r, n, r.length - n); // Read the size of the next chunk. chunk_size = input.read_long(); // If the value is non negative, there is more than one chunk. // Accumulate chunks in the buffer. // The last chunk (or the only chunk, if only one chunk is // present) is not written in the buffer. It is stored in the // array r, avoiding unnecessary buffer operations. if (chunk_size > 0) { bout = new ByteArrayOutputStream(2 * chunk_size); bout.write(r, 0, chunk_size); } } if (bout != null) { // More than one chunk was present. // Add the last chunk. bout.write(r, 0, n); input = new noHeaderInput(bout.toByteArray()); } else { // Only one chunk was present. input = new noHeaderInput(r); } } else { if (input instanceof cdrBufInput) { // Highly probable case. input = new noHeaderInput(((cdrBufInput) input).buffer.getBuffer()); } else { cdrBufOutput bout = new cdrBufOutput(); int c; while ((c = input.read()) >= 0) bout.write((byte) c); input = new noHeaderInput(bout.buffer.toByteArray()); } } } catch (IOException ex) { MARSHAL m = new MARSHAL("Unable to read chunks"); m.initCause(ex); throw m; } // The user-defines io operations are implemented. if (value instanceof CustomMarshal) { CustomMarshal marsh = (CustomMarshal) value; try { marsh.unmarshal((DataInputStream) input); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else // The IDL-generated io operations are implemented. if (value instanceof Streamable) { ((Streamable) value)._read(input); } else if (helper instanceof BoxedValueHelper) value = ((BoxedValueHelper) helper).read_value(input); else if (helper instanceof ValueFactory) value = ((ValueFactory) helper).read_value((org.omg.CORBA_2_3.portable.InputStream) input); else // Stating the interfaces that the USER should use. throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue or CustomValue." ); // The negative end of state marker is expected from OMG standard. // If the chunking is used, this marker is already extracted. if ((value_tag & vf_CHUNKING) == 0) { int eor = input.read_long(); if (eor >= 0) throw new MARSHAL("End of state marker has an invalid value " + eor); } return value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
int chunk_size = input.read_long(); if (chunk_size < 0) throw new MARSHAL("Invalid first chunk size " + chunk_size); byte[] r = new byte[ chunk_size ]; while (chunk_size > 0) { if (r.length < chunk_size) r = new byte[ chunk_size + 256 ]; n = 0; reading: while (n < chunk_size) n += input.read(r, n, r.length - n); chunk_size = input.read_long(); if (chunk_size > 0) { bout = new ByteArrayOutputStream(2 * chunk_size); bout.write(r, 0, chunk_size); } } if (bout != null) { bout.write(r, 0, n); input = new noHeaderInput(bout.toByteArray()); } else { input = new noHeaderInput(r); }
|
input = new noHeaderInput(ci, input);
|
private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; // Read all chunks. int chunk_size = input.read_long(); if (chunk_size < 0) throw new MARSHAL("Invalid first chunk size " + chunk_size); byte[] r = new byte[ chunk_size ]; while (chunk_size > 0) { if (r.length < chunk_size) r = new byte[ chunk_size + 256 ]; n = 0; reading: while (n < chunk_size) n += input.read(r, n, r.length - n); // Read the size of the next chunk. chunk_size = input.read_long(); // If the value is non negative, there is more than one chunk. // Accumulate chunks in the buffer. // The last chunk (or the only chunk, if only one chunk is // present) is not written in the buffer. It is stored in the // array r, avoiding unnecessary buffer operations. if (chunk_size > 0) { bout = new ByteArrayOutputStream(2 * chunk_size); bout.write(r, 0, chunk_size); } } if (bout != null) { // More than one chunk was present. // Add the last chunk. bout.write(r, 0, n); input = new noHeaderInput(bout.toByteArray()); } else { // Only one chunk was present. input = new noHeaderInput(r); } } else { if (input instanceof cdrBufInput) { // Highly probable case. input = new noHeaderInput(((cdrBufInput) input).buffer.getBuffer()); } else { cdrBufOutput bout = new cdrBufOutput(); int c; while ((c = input.read()) >= 0) bout.write((byte) c); input = new noHeaderInput(bout.buffer.toByteArray()); } } } catch (IOException ex) { MARSHAL m = new MARSHAL("Unable to read chunks"); m.initCause(ex); throw m; } // The user-defines io operations are implemented. if (value instanceof CustomMarshal) { CustomMarshal marsh = (CustomMarshal) value; try { marsh.unmarshal((DataInputStream) input); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else // The IDL-generated io operations are implemented. if (value instanceof Streamable) { ((Streamable) value)._read(input); } else if (helper instanceof BoxedValueHelper) value = ((BoxedValueHelper) helper).read_value(input); else if (helper instanceof ValueFactory) value = ((ValueFactory) helper).read_value((org.omg.CORBA_2_3.portable.InputStream) input); else // Stating the interfaces that the USER should use. throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue or CustomValue." ); // The negative end of state marker is expected from OMG standard. // If the chunking is used, this marker is already extracted. if ((value_tag & vf_CHUNKING) == 0) { int eor = input.read_long(); if (eor >= 0) throw new MARSHAL("End of state marker has an invalid value " + eor); } return value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
input = new noHeaderInput(((cdrBufInput) input).buffer.getBuffer());
|
input = new noHeaderInput((cdrBufInput) input, null); } else if (input instanceof noHeaderInput) { ((noHeaderInput) input).subsequentCalls = false;
|
private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; // Read all chunks. int chunk_size = input.read_long(); if (chunk_size < 0) throw new MARSHAL("Invalid first chunk size " + chunk_size); byte[] r = new byte[ chunk_size ]; while (chunk_size > 0) { if (r.length < chunk_size) r = new byte[ chunk_size + 256 ]; n = 0; reading: while (n < chunk_size) n += input.read(r, n, r.length - n); // Read the size of the next chunk. chunk_size = input.read_long(); // If the value is non negative, there is more than one chunk. // Accumulate chunks in the buffer. // The last chunk (or the only chunk, if only one chunk is // present) is not written in the buffer. It is stored in the // array r, avoiding unnecessary buffer operations. if (chunk_size > 0) { bout = new ByteArrayOutputStream(2 * chunk_size); bout.write(r, 0, chunk_size); } } if (bout != null) { // More than one chunk was present. // Add the last chunk. bout.write(r, 0, n); input = new noHeaderInput(bout.toByteArray()); } else { // Only one chunk was present. input = new noHeaderInput(r); } } else { if (input instanceof cdrBufInput) { // Highly probable case. input = new noHeaderInput(((cdrBufInput) input).buffer.getBuffer()); } else { cdrBufOutput bout = new cdrBufOutput(); int c; while ((c = input.read()) >= 0) bout.write((byte) c); input = new noHeaderInput(bout.buffer.toByteArray()); } } } catch (IOException ex) { MARSHAL m = new MARSHAL("Unable to read chunks"); m.initCause(ex); throw m; } // The user-defines io operations are implemented. if (value instanceof CustomMarshal) { CustomMarshal marsh = (CustomMarshal) value; try { marsh.unmarshal((DataInputStream) input); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else // The IDL-generated io operations are implemented. if (value instanceof Streamable) { ((Streamable) value)._read(input); } else if (helper instanceof BoxedValueHelper) value = ((BoxedValueHelper) helper).read_value(input); else if (helper instanceof ValueFactory) value = ((ValueFactory) helper).read_value((org.omg.CORBA_2_3.portable.InputStream) input); else // Stating the interfaces that the USER should use. throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue or CustomValue." ); // The negative end of state marker is expected from OMG standard. // If the chunking is used, this marker is already extracted. if ((value_tag & vf_CHUNKING) == 0) { int eor = input.read_long(); if (eor >= 0) throw new MARSHAL("End of state marker has an invalid value " + eor); } return value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
input = new noHeaderInput(bout.buffer.toByteArray());
|
input = new noHeaderInput( (cdrBufInput) bout.create_input_stream(), input);
|
private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; // Read all chunks. int chunk_size = input.read_long(); if (chunk_size < 0) throw new MARSHAL("Invalid first chunk size " + chunk_size); byte[] r = new byte[ chunk_size ]; while (chunk_size > 0) { if (r.length < chunk_size) r = new byte[ chunk_size + 256 ]; n = 0; reading: while (n < chunk_size) n += input.read(r, n, r.length - n); // Read the size of the next chunk. chunk_size = input.read_long(); // If the value is non negative, there is more than one chunk. // Accumulate chunks in the buffer. // The last chunk (or the only chunk, if only one chunk is // present) is not written in the buffer. It is stored in the // array r, avoiding unnecessary buffer operations. if (chunk_size > 0) { bout = new ByteArrayOutputStream(2 * chunk_size); bout.write(r, 0, chunk_size); } } if (bout != null) { // More than one chunk was present. // Add the last chunk. bout.write(r, 0, n); input = new noHeaderInput(bout.toByteArray()); } else { // Only one chunk was present. input = new noHeaderInput(r); } } else { if (input instanceof cdrBufInput) { // Highly probable case. input = new noHeaderInput(((cdrBufInput) input).buffer.getBuffer()); } else { cdrBufOutput bout = new cdrBufOutput(); int c; while ((c = input.read()) >= 0) bout.write((byte) c); input = new noHeaderInput(bout.buffer.toByteArray()); } } } catch (IOException ex) { MARSHAL m = new MARSHAL("Unable to read chunks"); m.initCause(ex); throw m; } // The user-defines io operations are implemented. if (value instanceof CustomMarshal) { CustomMarshal marsh = (CustomMarshal) value; try { marsh.unmarshal((DataInputStream) input); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else // The IDL-generated io operations are implemented. if (value instanceof Streamable) { ((Streamable) value)._read(input); } else if (helper instanceof BoxedValueHelper) value = ((BoxedValueHelper) helper).read_value(input); else if (helper instanceof ValueFactory) value = ((ValueFactory) helper).read_value((org.omg.CORBA_2_3.portable.InputStream) input); else // Stating the interfaces that the USER should use. throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue or CustomValue." ); // The negative end of state marker is expected from OMG standard. // If the chunking is used, this marker is already extracted. if ((value_tag & vf_CHUNKING) == 0) { int eor = input.read_long(); if (eor >= 0) throw new MARSHAL("End of state marker has an invalid value " + eor); } return value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
if (value instanceof CustomMarshal) { CustomMarshal marsh = (CustomMarshal) value; try { marsh.unmarshal((DataInputStream) input); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._read(input); } else if (helper instanceof BoxedValueHelper) value = ((BoxedValueHelper) helper).read_value(input); else if (helper instanceof ValueFactory) value = ((ValueFactory) helper).read_value((org.omg.CORBA_2_3.portable.InputStream) input); else throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue or CustomValue." ); if ((value_tag & vf_CHUNKING) == 0) { int eor = input.read_long(); if (eor >= 0) throw new MARSHAL("End of state marker has an invalid value " + eor); } return value;
|
return readValue(input, position, value, helper, id, ids, codebase);
|
private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; // Read all chunks. int chunk_size = input.read_long(); if (chunk_size < 0) throw new MARSHAL("Invalid first chunk size " + chunk_size); byte[] r = new byte[ chunk_size ]; while (chunk_size > 0) { if (r.length < chunk_size) r = new byte[ chunk_size + 256 ]; n = 0; reading: while (n < chunk_size) n += input.read(r, n, r.length - n); // Read the size of the next chunk. chunk_size = input.read_long(); // If the value is non negative, there is more than one chunk. // Accumulate chunks in the buffer. // The last chunk (or the only chunk, if only one chunk is // present) is not written in the buffer. It is stored in the // array r, avoiding unnecessary buffer operations. if (chunk_size > 0) { bout = new ByteArrayOutputStream(2 * chunk_size); bout.write(r, 0, chunk_size); } } if (bout != null) { // More than one chunk was present. // Add the last chunk. bout.write(r, 0, n); input = new noHeaderInput(bout.toByteArray()); } else { // Only one chunk was present. input = new noHeaderInput(r); } } else { if (input instanceof cdrBufInput) { // Highly probable case. input = new noHeaderInput(((cdrBufInput) input).buffer.getBuffer()); } else { cdrBufOutput bout = new cdrBufOutput(); int c; while ((c = input.read()) >= 0) bout.write((byte) c); input = new noHeaderInput(bout.buffer.toByteArray()); } } } catch (IOException ex) { MARSHAL m = new MARSHAL("Unable to read chunks"); m.initCause(ex); throw m; } // The user-defines io operations are implemented. if (value instanceof CustomMarshal) { CustomMarshal marsh = (CustomMarshal) value; try { marsh.unmarshal((DataInputStream) input); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else // The IDL-generated io operations are implemented. if (value instanceof Streamable) { ((Streamable) value)._read(input); } else if (helper instanceof BoxedValueHelper) value = ((BoxedValueHelper) helper).read_value(input); else if (helper instanceof ValueFactory) value = ((ValueFactory) helper).read_value((org.omg.CORBA_2_3.portable.InputStream) input); else // Stating the interfaces that the USER should use. throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue or CustomValue." ); // The negative end of state marker is expected from OMG standard. // If the chunking is used, this marker is already extracted. if ((value_tag & vf_CHUNKING) == 0) { int eor = input.read_long(); if (eor >= 0) throw new MARSHAL("End of state marker has an invalid value " + eor); } return value; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
write(output, value, ObjectCreator.toIDL(value.getClass().getName()));
|
write(output, value, value.getClass());
|
public static void write(OutputStream output, Serializable value) { // Write null if this is a null value. if (value == null) output.write_long(vt_NULL); else write(output, value, ObjectCreator.toIDL(value.getClass().getName())); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper )
|
static void write_instance(OutputStream output, Serializable value, Object ids, BoxedValueHelper helper)
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
int value_tag = vt_VALUE_TAG | vf_ID;
|
gnuValueStream rout = null; gnuRuntime runtime = null; try { if (output instanceof gnuValueStream) { int position; rout = (gnuValueStream) output; runtime = rout.getRunTime(); if (runtime == null) { runtime = new gnuRuntime(null, value); rout.setRunTime(runtime); rout.getRunTime().objectWritten(value, position = rout.getPosition()); } else if (runtime.target == value) { if (!writeSelf(output, value)) throw new InternalError("Recursive helper call for " + value.getClass().getName()); return; } else { position = runtime.isWrittenAt(value); if (position >= 0) { output.write_long(vt_INDIRECTION); output.write_long(position - rout.getPosition()); return; } else { runtime.objectWritten(value, position = rout.getPosition()); } } } int value_tag = vt_VALUE_TAG; if (ids instanceof String) value_tag |= vf_ID; else if (ids instanceof String[]) value_tag |= vf_MULTIPLE_IDS | vf_ID; int chunkSizeLocation;
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
cdrBufOutput out = null;
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
|
out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out;
|
outObj = output;
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
output.write_string(id);
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
|
if (helper instanceof BoxedValueHelper)
|
if ((value_tag & vf_MULTIPLE_IDS) != 0) write_string_array(output, (String[]) ids); else if ((value_tag & vf_ID) != 0) write_string(output, (String) ids); if (USE_CHUNKING)
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
((BoxedValueHelper) helper).write_value(outObj, value);
|
output.write_long(0x55555555); chunkSizeLocation = rout.getPosition() - INT_SIZE;
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
if (value instanceof CustomMarshal)
|
chunkSizeLocation = -1; writeValue(outObj, value, helper); if (USE_CHUNKING)
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex);
|
int chunkSize = rout.getPosition() - chunkSizeLocation - INT_SIZE; int current = rout.getPosition(); rout.seek(chunkSizeLocation); output.write_long(chunkSize); rout.seek(current); output.write_long(-1);
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
else if (value instanceof Streamable) { ((Streamable) value)._write(outObj);
|
finally { if (runtime != null) runtime.target = null;
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
else { boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true;
|
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use // a codebase. int value_tag = vt_VALUE_TAG | vf_ID; OutputStream outObj; cdrBufOutput out = null; if (USE_CHUNKING) { out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; value_tag |= vf_CHUNKING; } else outObj = output; output.write_long(value_tag); output.write_string(id); if (helper instanceof BoxedValueHelper) { ((BoxedValueHelper) helper).write_value(outObj, value); } else // User defince write method is present. if (value instanceof CustomMarshal) { try { ((CustomMarshal) value).marshal((DataOutputStream) outObj); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._write(outObj); } else { // Try to find helper via class loader. boolean ok = false; try { Class helperClass = Class.forName(ObjectCreator.toHelperName(id)); // It will be the helper for the encapsulated boxed value, not the // for the global boxed value type itself. Method write = helperClass.getMethod("write", new Class[] { org.omg.CORBA.portable.OutputStream.class, value.getClass() } ); write.invoke(null, new Object[] { outObj, value }); ok = true; } catch (Exception ex) { ok = false; } // Stating the interfaces that the USER should use. if (!ok) throw new MARSHAL("The " + value.getClass().getName() + " must implement either StreamableValue" + " or CustomValue." ); } if (USE_CHUNKING) { output.write_long(out.buffer.size()); try { out.buffer.writeTo(output); } catch (IOException ex) { MARSHAL m = new MARSHAL(); m.initCause(ex); throw m; } } // The end of record marker, required by OMG standard. output.write_long(-1); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/Vio.java/buggy/core/src/classpath/gnu/gnu/CORBA/CDR/Vio.java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.