rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
JOptionPane.showMessageDialog(this, message, title, JOptionPane.ERROR_MESSAGE); | JOptionPane.showMessageDialog( this, message, title, JOptionPane.ERROR_MESSAGE); | public void emitError (String title, String message) { JOptionPane.showMessageDialog(this, message, title, JOptionPane.ERROR_MESSAGE); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/IzPanel.java/buggy/src/lib/com/izforge/izpack/installer/IzPanel.java |
ref.clear(); | public synchronized Object borrowObject() throws Exception { assertOpen(); Object obj = null; while(null == obj) { if(_pool.isEmpty()) { if(null == _factory) { throw new NoSuchElementException(); } else { obj = _factory.makeObject(); } } else { SoftReference ref = (SoftReference)(_pool.remove(_pool.size() - 1)); obj = ref.get(); } if(null != _factory && null != obj) { _factory.activateObject(obj); } if (null != _factory && null != obj && !_factory.validateObject(obj)) { _factory.destroyObject(obj); obj = null; } } _numActive++; return obj; } | 50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/40b9df4e3964dca1a138bc158e4a7f7762810677/SoftReferenceObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java |
|
pruneClearedReferences(); | public synchronized void clear() { assertOpen(); if(null != _factory) { Iterator iter = _pool.iterator(); while(iter.hasNext()) { try { Object obj = ((SoftReference)iter.next()).get(); if(null != obj) { _factory.destroyObject(obj); } } catch(Exception e) { // ignore error, keep destroying the rest } } } _pool.clear(); } | 50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/40b9df4e3964dca1a138bc158e4a7f7762810677/SoftReferenceObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java |
|
pruneClearedReferences(); | public synchronized int getNumIdle() { assertOpen(); return _pool.size(); } | 50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/40b9df4e3964dca1a138bc158e4a7f7762810677/SoftReferenceObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java |
|
_pool.add(new SoftReference(obj)); | _pool.add(new SoftReference(obj, refQueue)); | public synchronized void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(!(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { success = false; } } boolean shouldDestroy = !success; _numActive--; if(success) { _pool.add(new SoftReference(obj)); } notifyAll(); // _numActive has changed if(shouldDestroy) { try { _factory.destroyObject(obj); } catch(Exception e) { // ignored } } } | 50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/40b9df4e3964dca1a138bc158e4a7f7762810677/SoftReferenceObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java |
stg.setMapping(waves[w].getFamily(), waves[w].getCurveCoefficient()); | void initStrategies(QuantumDef qd, PixelsStats stats, ChannelBindings[] waves) { QuantumStrategy stg; PixelsGlobalStatsEntry wGlobal; double gMin, gMax; for (int w = 0; w < sizeW; ++w) { stg = QuantumFactory.getStrategy(qd); wGlobal = stats.getGlobalEntry(w); gMin = wGlobal.getGlobalMin(); gMax = wGlobal.getGlobalMax(); stg.setExtent(gMin, gMax); if (wavesStg[w] == null) stg.setWindow(waves[w].getInputStart(), waves[w].getInputEnd()); else stg.setWindow(wavesStg[w].getWindowStart(), wavesStg[w].getWindowEnd()); wavesStg[w] = stg; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/QuantumManager.java/clean/SRC/org/openmicroscopy/shoola/env/rnd/QuantumManager.java |
|
} else if (source == nextButton) | } else if (source == nextButton) | public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == prevButton) { if ((installdata.curPanelNumber > 0)) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); } } else if (source == nextButton) { if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } else if (source == quitButton) exit(); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) | if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)) .isValidated()) | public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == prevButton) { if ((installdata.curPanelNumber > 0)) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); } } else if (source == nextButton) { if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } else if (source == quitButton) exit(); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
} else if (source == quitButton) | } else if (source == quitButton) | public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == prevButton) { if ((installdata.curPanelNumber > 0)) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); } } else if (source == nextButton) { if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } else if (source == quitButton) exit(); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
JOptionPane.showMessageDialog(null, langpack.getString("installer.quit.message"), | JOptionPane.showMessageDialog( null, langpack.getString("installer.quit.message"), | public void windowClosing(WindowEvent e) { // We show an alert anyway if (!installdata.canClose) JOptionPane.showMessageDialog(null, langpack.getString("installer.quit.message"), langpack.getString("installer.warning"), JOptionPane.ERROR_MESSAGE); wipeAborted(); Housekeeper.getInstance().shutDown(0); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
public InstallerFrame(String title, InstallData installdata) throws Exception | public InstallerFrame(String title, InstallData installdata) throws Exception | public InstallerFrame(String title, InstallData installdata) throws Exception { super(title); this.installdata = installdata; this.langpack = installdata.langpack; // Sets the window events handler addWindowListener(new WindowHandler()); // Builds the GUI loadIcons(); loadPanels(); buildGUI(); // We show the frame showFrame(); switchPanel(0); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
public void buildConstraints(GridBagConstraints gbc, int gx, int gy, int gw, int gh, double wx, double wy) | public void buildConstraints( GridBagConstraints gbc, int gx, int gy, int gw, int gh, double wx, double wy) | public void buildConstraints(GridBagConstraints gbc, int gx, int gy, int gw, int gh, double wx, double wy) { gbc.gridx = gx; gbc.gridy = gy; gbc.gridwidth = gw; gbc.gridheight = gh; gbc.weightx = wx; gbc.weighty = wy; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); | glassPane.addMouseListener(new MouseAdapter() { }); glassPane.addMouseMotionListener(new MouseMotionAdapter() { }); glassPane.addKeyListener(new KeyAdapter() { }); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
contentPane.setLayout(new BorderLayout()); | contentPane.setLayout(new BorderLayout()); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); | panelsContainer.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
contentPane.add(panelsContainer,BorderLayout.CENTER); | contentPane.add(panelsContainer, BorderLayout.CENTER); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); | navPanel.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(8, 8, 8, 8), BorderFactory.createTitledBorder( new EtchedLineBorder(), langpack.getString("installer.madewith") + " "))); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); | prevButton = ButtonFactory.createButton( langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); | nextButton = ButtonFactory.createButton( langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
||
quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); | quitButton = ButtonFactory.createButton( langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
contentPane.add(navPanel,BorderLayout.SOUTH); | contentPane.add(navPanel, BorderLayout.SOUTH); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); | imgPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); | imgPanel.add(label, BorderLayout.CENTER); contentPane.add(imgPanel, BorderLayout.WEST); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
} catch (Exception e) | } catch (Exception e) | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
getRootPane().setDefaultButton(nextButton); | getRootPane().setDefaultButton(nextButton); | private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
frame.setLocation((screenSize.width - frameSize.width) / 2, | frame.setLocation( (screenSize.width - frameSize.width) / 2, | public void centerFrame(Window frame) { Dimension frameSize = frame.getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
} else | } else | public void exit() { if (installdata.canClose) { // Everything went well if (installdata.info.getWriteUninstaller()) writeUninstallData(); Housekeeper.getInstance().shutDown(0); } else { // The installation is not over int res = JOptionPane.showConfirmDialog(this, langpack.getString("installer.quit.message"), langpack.getString("installer.quit.title"), JOptionPane.YES_NO_OPTION); if (res == JOptionPane.YES_OPTION) { wipeAborted(); Housekeeper.getInstance().shutDown(0); } } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
int res = JOptionPane.showConfirmDialog(this, langpack.getString("installer.quit.message"), langpack.getString("installer.quit.title"), JOptionPane.YES_NO_OPTION); | int res = JOptionPane.showConfirmDialog( this, langpack.getString("installer.quit.message"), langpack.getString("installer.quit.title"), JOptionPane.YES_NO_OPTION); | public void exit() { if (installdata.canClose) { // Everything went well if (installdata.info.getWriteUninstaller()) writeUninstallData(); Housekeeper.getInstance().shutDown(0); } else { // The installation is not over int res = JOptionPane.showConfirmDialog(this, langpack.getString("installer.quit.message"), langpack.getString("installer.quit.title"), JOptionPane.YES_NO_OPTION); if (res == JOptionPane.YES_OPTION) { wipeAborted(); Housekeeper.getInstance().shutDown(0); } } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
return ResourceManager.getInstance().getInputStream (res); } catch (ResourceNotFoundException e) | return ResourceManager.getInstance().getInputStream(res); } catch (ResourceNotFoundException e) | public InputStream getResource(String res) { try { //System.out.println ("retrieving resource " + res); return ResourceManager.getInstance().getInputStream (res); } catch (ResourceNotFoundException e) { return null; } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); | InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); | private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; XMLElement icon; InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(inXML)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We load the icons Vector children = data.getChildrenNamed("icon"); int size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); icons.put(icon.getAttribute("id"), img); } // We load the Swing-specific icons children = data.getChildrenNamed("sysicon"); size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); UIManager.put(icon.getAttribute("id"), img); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; XMLElement icon; InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(inXML)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We load the icons Vector children = data.getChildrenNamed("icon"); int size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); icons.put(icon.getAttribute("id"), img); } // We load the Swing-specific icons children = data.getChildrenNamed("sysicon"); size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); UIManager.put(icon.getAttribute("id"), img); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
||
} | } | private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; XMLElement icon; InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(inXML)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We load the icons Vector children = data.getChildrenNamed("icon"); int size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); icons.put(icon.getAttribute("id"), img); } // We load the Swing-specific icons children = data.getChildrenNamed("sysicon"); size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); UIManager.put(icon.getAttribute("id"), img); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; | paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = { this, installdata }; | private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; // We load each of them for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel)panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; objectClass = Class.forName("com.izforge.izpack.panels." + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
Panel p = (Panel)panelsOrder.get(i); | Panel p = (Panel) panelsOrder.get(i); | private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; // We load each of them for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel)panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; objectClass = Class.forName("com.izforge.izpack.panels." + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; | if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String) p.className; | private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; // We load each of them for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel)panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; objectClass = Class.forName("com.izforge.izpack.panels." + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); | IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); | protected void switchPanel(int last) { panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton();// if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
unlockNextButton(); } else if (installdata.curPanelNumber == installdata.panels.size() - 1) | unlockNextButton(); } else if (installdata.curPanelNumber == installdata.panels.size() - 1) | protected void switchPanel(int last) { panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton();// if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
} else | } else | protected void switchPanel(int last) { panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton();// if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
catch (Exception e) {} | protected void wipeAborted() { Iterator it; // We check for running unpackers ArrayList unpackers = Unpacker.getRunningInstances(); it = unpackers.iterator(); while (it.hasNext()) { Thread t = (Thread) it.next(); t.interrupt(); // The unpacker process might keep writing stuffs so we wait :-/ try { Thread.sleep(3000, 0); } catch (Exception e) {} } // Wipes them all in 2 stages UninstallData u = UninstallData.getInstance(); it = u.getFilesList().iterator(); if (!it.hasNext()) return; while (it.hasNext()) { String p = (String) it.next(); File f = new File(p); f.delete(); } cleanWipe(new File(installdata.getInstallPath())); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
|
if (outJar == null) return; | if (outJar == null) return; | private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); | BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); | private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
ExecutableFile file = (ExecutableFile)iter.next(); | ExecutableFile file = (ExecutableFile) iter.next(); | private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
} catch (Exception err) | } catch (Exception err) | private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/InstallerFrame.java/buggy/src/lib/com/izforge/izpack/installer/InstallerFrame.java |
dim.width = dim.width - (dim.width / 4); | dim.width -= (dim.width / 4); | public void panelActivate() { // get compilers again (because they might contain variables from former // panels) Iterator it = this.worker.getAvailableCompilers().iterator(); compilerComboBox.removeAllItems(); while (it.hasNext()) compilerComboBox.addItem((String) it.next()); // We clip the panel Dimension dim = parent.getPanelsContainerSize(); dim.width = dim.width - (dim.width / 4); dim.height = 150; setMinimumSize(dim); setMaximumSize(dim); setPreferredSize(dim); parent.lockNextButton(); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/9619b3a25f43787dc92011111668210e06c00c71/CompilePanel.java/buggy/src/lib/com/izforge/izpack/panels/CompilePanel.java |
setDialogType(SAVE_DIALOG); | private void buildGUI() { setFileSelectionMode(FILES_ONLY); setMultiSelectionEnabled(true); DVFilter dvFilter = new DVFilter(); setFileFilter(dvFilter); addChoosableFileFilter(dvFilter); TIFFFilter tiffFilter = new TIFFFilter(); setFileFilter(tiffFilter); addChoosableFileFilter(tiffFilter); setAcceptAllFileFilterUsed(false); setApproveButtonToolTipText( UIUtilities.formatToolTipText("Select Images to import.")); setApproveButtonText("Select images"); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d580e2fe9976d2e5e37d7d8e5111f9608b56cb6d/ImportImageChooser.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/editors/image/ImportImageChooser.java |
|
if(System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { | if(_minEvictableIdleTimeMillis > 0 && System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { | public void run() { CursorableLinkedList.Cursor objcursor = null; CursorableLinkedList.Cursor keycursor = null; Object key = null; while(!_cancelled) { long sleeptime = 0L; synchronized(GenericKeyedObjectPool.this) { sleeptime = _timeBetweenEvictionRunsMillis; } try { Thread.currentThread().sleep(sleeptime); } catch(Exception e) { ; // ignored } try { synchronized(GenericKeyedObjectPool.this) { for(int i=0,m=getNumTests();i<m;i++) { if(_poolMap.size() > 0) { // if we don't have a key cursor, then create one, and close any object cursor if(null == keycursor) { keycursor = _poolList.cursor(); key = null; if(null != objcursor) { objcursor.close(); objcursor = null; } } // if we don't have an object cursor if(null == objcursor) { // if the keycursor has a next value, then use it if(keycursor.hasNext()) { key = keycursor.next(); CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); objcursor = pool.cursor(pool.size()); } else { // else close the key cursor and loop back around if(null != keycursor) { keycursor.close(); keycursor = _poolList.cursor(); if(null != objcursor) { objcursor.close(); objcursor = null; } } continue; } } // if the objcursor has a previous object, then test it if(objcursor.hasPrevious()) { ObjectTimestampPair pair = (ObjectTimestampPair)(objcursor.previous()); if(System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { try { objcursor.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); // if that was the last object for that key, drop that pool if( ((CursorableLinkedList)(_poolMap.get(key))).isEmpty() ) { _poolMap.remove(key); _poolList.remove(key); } } catch(Exception e) { ; // ignored } } else if(_testWhileIdle) { boolean active = false; try { _factory.activateObject(key,pair.value); active = true; } catch(Exception e) { objcursor.remove(); try { _factory.passivateObject(key,pair.value); } catch(Exception ex) { ; // ignored } _factory.destroyObject(key,pair.value); } if(active) { if(!_factory.validateObject(key,pair.value)) { try { objcursor.remove(); _totalIdle--; try { _factory.passivateObject(key,pair.value); } catch(Exception e) { ; // ignored } _factory.destroyObject(key,pair.value); if( ((CursorableLinkedList)(_poolMap.get(key))).isEmpty() ) { _poolMap.remove(key); _poolList.remove(key); } } catch(Exception e) { ; // ignored } } else { try { _factory.passivateObject(key,pair.value); } catch(Exception e) { objcursor.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); if( ((CursorableLinkedList)(_poolMap.get(key))).isEmpty() ) { _poolMap.remove(key); _poolList.remove(key); } } } } } } else { // else the objcursor is done, so close it and loop around if(objcursor != null) { objcursor.close(); objcursor = null; } } } } } } catch(Exception e) { ; // ignored } } if(null != keycursor) { keycursor.close(); } if(null != objcursor) { objcursor.close(); } } | 50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/efc6cc449e39844e28ad04b1b4d5b8ed261445fa/GenericKeyedObjectPool.java/clean/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java |
HashMap vars = new HashMap(); | Properties vars = new Properties(); | private void doSudoCmd() { String pass = passwordField.getText(); File file = null; try { // write file in /tmp file = new File("/tmp/cmd_sudo.sh");// ""c:/temp/run.bat"" FileOutputStream fos = new FileOutputStream(file); fos.write("echo $password | sudo -S ls\nexit $?".getBytes()); // "echo // $password // > // pipo.txt" fos.close(); // execute HashMap vars = new HashMap(); vars.put("password", pass); List oses = new ArrayList(); oses.add(new OsConstraint("unix", null, null, null)); ArrayList plist = new ArrayList(); ParsableFile pf = new ParsableFile(file.getAbsolutePath(), null, null, oses); plist.add(pf); ScriptParser sp = new ScriptParser(plist, new VariableSubstitutor(vars)); sp.parseFiles(); ArrayList elist = new ArrayList(); ExecutableFile ef = new ExecutableFile(file.getAbsolutePath(), ExecutableFile.POSTINSTALL, ExecutableFile.ABORT, oses, false); elist.add(ef); FileExecutor fe = new FileExecutor(elist); int retval = fe.executeFiles(ExecutableFile.POSTINSTALL, this); if (retval == 0) { idata.setVariable("password", pass); isValid = true; } // else is already showing dialog // { // JOptionPane.showMessageDialog(this, "Cannot execute 'sudo' cmd, // check your password", "Error", JOptionPane.ERROR_MESSAGE); // } } catch (Exception e) { // JOptionPane.showMessageDialog(this, "Cannot execute 'sudo' cmd, // check your password", "Error", JOptionPane.ERROR_MESSAGE); e.printStackTrace(); isValid = false; } try { if (file != null && file.exists()) file.delete();// you don't // want the file // with password // tobe arround, // in case of // error } catch (Exception e) { // ignore } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/53934d54deb48548655ceabb6147ed31c66365cd/SudoPanel.java/clean/src/lib/com/izforge/izpack/panels/SudoPanel.java |
String headlineSearchBaseKey = myClassname + d + "headline"; | String headlineSearchBaseKey = myClassname + d + "headline"; | protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/cd2dd47c43f582b185a037233184f1161861cf69/IzPanel.java/clean/src/lib/com/izforge/izpack/installer/IzPanel.java |
if( instanceNumber > -1 ) | if( instanceNumber > -1 ) | protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/cd2dd47c43f582b185a037233184f1161861cf69/IzPanel.java/clean/src/lib/com/izforge/izpack/installer/IzPanel.java |
String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); | String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); | protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/cd2dd47c43f582b185a037233184f1161861cf69/IzPanel.java/clean/src/lib/com/izforge/izpack/installer/IzPanel.java |
if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } | protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/cd2dd47c43f582b185a037233184f1161861cf69/IzPanel.java/clean/src/lib/com/izforge/izpack/installer/IzPanel.java |
|
headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); | headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.LEADING ); | protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/cd2dd47c43f582b185a037233184f1161861cf69/IzPanel.java/clean/src/lib/com/izforge/izpack/installer/IzPanel.java |
GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); | GridBagConstraints gbc = new GridBagConstraints( ); gbc.gridx = 0; gbc.gridy = 0; gbc.gridwidth = 1; gbc.gridheight = 1; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets( 0, 0, 0, 0 ); headLineLabel.setName( HEADLINE ); | protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/cd2dd47c43f582b185a037233184f1161861cf69/IzPanel.java/clean/src/lib/com/izforge/izpack/installer/IzPanel.java |
headLineLabel.setName( HEADLINE ); | protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/cd2dd47c43f582b185a037233184f1161861cf69/IzPanel.java/clean/src/lib/com/izforge/izpack/installer/IzPanel.java |
|
panel.className = xmlPanel.getAttribute("classname"); | String className = xmlPanel.getAttribute("classname"); | protected void addPanels(XMLElement data) throws CompilerException { notifyCompilerListener("addPanels", CompilerListener.BEGIN, data); XMLElement root = requireChildNamed(data, "panels"); // at least one panel is required Vector panels = root.getChildrenNamed("panel"); if (panels.isEmpty()) parseError(root, "<panels> requires a <panel>"); // We process each panel markup Iterator iter = panels.iterator(); while (iter.hasNext()) { XMLElement xmlPanel = (XMLElement) iter.next(); // create the serialized Panel data Panel panel = new Panel(); panel.osConstraints = OsConstraint.getOsList(xmlPanel); panel.className = xmlPanel.getAttribute("classname"); // Panel files come in jars packaged w/ IzPack String jarPath = "bin/panels/" + panel.className + ".jar"; URL url = findIzPackResource(jarPath, "Panel jar file", xmlPanel); // insert into the packager packager.addPanelJar(panel, url); } notifyCompilerListener("addPanels", CompilerListener.END, data); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/d28b4a0f8922435997696d344aa94afcad4e3475/Compiler.java/buggy/src/lib/com/izforge/izpack/compiler/Compiler.java |
String jarPath = "bin/panels/" + panel.className + ".jar"; | String jarPath = "bin/panels/" + className + ".jar"; | protected void addPanels(XMLElement data) throws CompilerException { notifyCompilerListener("addPanels", CompilerListener.BEGIN, data); XMLElement root = requireChildNamed(data, "panels"); // at least one panel is required Vector panels = root.getChildrenNamed("panel"); if (panels.isEmpty()) parseError(root, "<panels> requires a <panel>"); // We process each panel markup Iterator iter = panels.iterator(); while (iter.hasNext()) { XMLElement xmlPanel = (XMLElement) iter.next(); // create the serialized Panel data Panel panel = new Panel(); panel.osConstraints = OsConstraint.getOsList(xmlPanel); panel.className = xmlPanel.getAttribute("classname"); // Panel files come in jars packaged w/ IzPack String jarPath = "bin/panels/" + panel.className + ".jar"; URL url = findIzPackResource(jarPath, "Panel jar file", xmlPanel); // insert into the packager packager.addPanelJar(panel, url); } notifyCompilerListener("addPanels", CompilerListener.END, data); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/d28b4a0f8922435997696d344aa94afcad4e3475/Compiler.java/buggy/src/lib/com/izforge/izpack/compiler/Compiler.java |
String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; | protected void addPanels(XMLElement data) throws CompilerException { notifyCompilerListener("addPanels", CompilerListener.BEGIN, data); XMLElement root = requireChildNamed(data, "panels"); // at least one panel is required Vector panels = root.getChildrenNamed("panel"); if (panels.isEmpty()) parseError(root, "<panels> requires a <panel>"); // We process each panel markup Iterator iter = panels.iterator(); while (iter.hasNext()) { XMLElement xmlPanel = (XMLElement) iter.next(); // create the serialized Panel data Panel panel = new Panel(); panel.osConstraints = OsConstraint.getOsList(xmlPanel); panel.className = xmlPanel.getAttribute("classname"); // Panel files come in jars packaged w/ IzPack String jarPath = "bin/panels/" + panel.className + ".jar"; URL url = findIzPackResource(jarPath, "Panel jar file", xmlPanel); // insert into the packager packager.addPanelJar(panel, url); } notifyCompilerListener("addPanels", CompilerListener.END, data); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/d28b4a0f8922435997696d344aa94afcad4e3475/Compiler.java/buggy/src/lib/com/izforge/izpack/compiler/Compiler.java |
|
if( pos > 0 ) | if( name.length() == pos + className.length() + 6 ) { jis.close(); | private String getFullClassName(URL url, String className) throws Exception { JarInputStream jis = new JarInputStream(url.openStream()); ZipEntry zentry = null; String fullName = null; while ( (zentry = jis.getNextEntry()) != null) { String name = zentry.getName(); int lastPos = name.lastIndexOf(".class"); if( lastPos < 0 ) { continue; // No class file. } name = name.replace('/', '.'); int pos = -1; if( className != null ) { pos = name.indexOf(className); } if( pos > 0 ) // "Main" class found return(name.substring(0, lastPos)); } jis.close(); return( null ); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/d28b4a0f8922435997696d344aa94afcad4e3475/Compiler.java/buggy/src/lib/com/izforge/izpack/compiler/Compiler.java |
} | private String getFullClassName(URL url, String className) throws Exception { JarInputStream jis = new JarInputStream(url.openStream()); ZipEntry zentry = null; String fullName = null; while ( (zentry = jis.getNextEntry()) != null) { String name = zentry.getName(); int lastPos = name.lastIndexOf(".class"); if( lastPos < 0 ) { continue; // No class file. } name = name.replace('/', '.'); int pos = -1; if( className != null ) { pos = name.indexOf(className); } if( pos > 0 ) // "Main" class found return(name.substring(0, lastPos)); } jis.close(); return( null ); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/d28b4a0f8922435997696d344aa94afcad4e3475/Compiler.java/buggy/src/lib/com/izforge/izpack/compiler/Compiler.java |
|
getContentPane().setLayout(new BorderLayout(0, 0)); | private void buildGUI(IconManager im) { getContentPane().setLayout(new BorderLayout(0, 0)); TitlePanel tp = new TitlePanel("Import Image", "Import new images in an existing dataset.", NOTE, im.getIcon(IconManager.IMPORT_IMAGE_BIG)); getContentPane().add(tp, BorderLayout.NORTH); getContentPane().add(chooser, BorderLayout.CENTER); getContentPane().add(selection, BorderLayout.SOUTH); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d580e2fe9976d2e5e37d7d8e5111f9608b56cb6d/ImportImageSelector.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/editors/image/ImportImageSelector.java |
|
str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); | str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); | public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/HelloPanel.java/buggy/src/lib/com/izforge/izpack/panels/HelloPanel.java |
str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } | str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel( str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); | public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/HelloPanel.java/buggy/src/lib/com/izforge/izpack/panels/HelloPanel.java |
centerPanel.add(Box.createVerticalStrut(20)); | JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel( " - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); | public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/HelloPanel.java/buggy/src/lib/com/izforge/izpack/panels/HelloPanel.java |
str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); | str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); | public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/HelloPanel.java/buggy/src/lib/com/izforge/izpack/panels/HelloPanel.java |
public Object getValue(String key, String value) throws NativeLibException | public Object getValue(String key, String value, Object defaultVal) throws NativeLibException | public Object getValue(String key, String value) throws NativeLibException { return (null); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/65829be7fc5a410510ee8132076f9911c480d666/RegistryHandler.java/buggy/src/lib/com/izforge/izpack/util/os/RegistryHandler.java |
public void emitNotification (String message) | public void emitNotification(String message) | public void emitNotification (String message) { // ignore it } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/IzPanel.java/buggy/src/lib/com/izforge/izpack/installer/IzPanel.java |
parent.unlockNextButton(); | public void stopUnpack() { parent.releaseGUI(); parent.lockPrevButton(); parent.unlockNextButton(); installButton.setIcon(parent.icons.getImageIcon("empty")); installButton.setEnabled(false); progressBar.setString(parent.langpack.getString("InstallPanel.finished")); progressBar.setEnabled(false); opLabel.setText(""); opLabel.setEnabled(false); idata.installSuccess = true; idata.canClose = true; validated = true; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/f44bec7600d9f54821d970d3b0bf5bf57378c71d/InstallPanel.java/buggy/src/lib/com/izforge/izpack/panels/InstallPanel.java |
|
if (idata.panels.indexOf(this) != (idata.panels.size() - 1)) parent.unlockNextButton(); | public void stopUnpack() { parent.releaseGUI(); parent.lockPrevButton(); parent.unlockNextButton(); installButton.setIcon(parent.icons.getImageIcon("empty")); installButton.setEnabled(false); progressBar.setString(parent.langpack.getString("InstallPanel.finished")); progressBar.setEnabled(false); opLabel.setText(""); opLabel.setEnabled(false); idata.installSuccess = true; idata.canClose = true; validated = true; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/f44bec7600d9f54821d970d3b0bf5bf57378c71d/InstallPanel.java/buggy/src/lib/com/izforge/izpack/panels/InstallPanel.java |
|
boolean addFile = true; | boolean addFile = !pack.loose; | private void writePacks() throws IOException { sendMsg("Writing Packs ..."); // Map to remember pack number and bytes offsets of back references Map storedFiles = new HashMap(); // First write the serialized files and file metadata data for each pack // while counting bytes. int packNumber = 0; Iterator packIter = packsList.iterator(); while (packIter.hasNext()) { PackInfo packInfo = (PackInfo) packIter.next(); Pack pack = packInfo.getPack(); pack.nbytes = 0; // create a pack specific jar if required JarOutputStream packStream = primaryJarStream; if (packJarsSeparate) { // See installer.Unpacker#getPackAsStream for the counterpart String name = baseFile.getName() + ".pack" + packNumber + ".jar"; packStream = getJarOutputStream(name); } sendMsg("Writing Pack #" + packNumber + " : " + pack.name); // Retrieve the correct output stream ZipEntry entry = new ZipEntry("packs/pack" + packNumber); packStream.putNextEntry(entry); packStream.flush(); // flush before we start counting ByteCountingOutputStream dos = new ByteCountingOutputStream(packStream); ObjectOutputStream objOut = new ObjectOutputStream(dos); // We write the actual pack files long packageBytes = 0; objOut.writeInt(packInfo.getPackFiles().size()); Iterator iter = packInfo.getPackFiles().iterator(); while (iter.hasNext()) { boolean addFile = true; PackFile pf = (PackFile) iter.next(); File file = packInfo.getFile(pf); // use a back reference if file was in previous pack, and in same jar long[] info = (long[]) storedFiles.get(file); if (info != null && ! packJarsSeparate) { pf.setPreviousPackFileRef((int) info[0], info[1]); addFile = false; } objOut.writeObject(pf); // base info objOut.flush(); //make sure it is written if (addFile && ! pf.isDirectory()) { long pos = dos.getByteCount(); //get the position FileInputStream inStream = new FileInputStream(file); long bytesWritten = copyStream(inStream, objOut); if (bytesWritten != pf.length()) throw new IOException("File size mismatch when reading " + file); inStream.close(); storedFiles.put(file, new long[] { packNumber, pos }); } // even if not written, it counts towards pack size pack.nbytes += pf.length(); } // Write out information about parsable files objOut.writeInt(packInfo.getParsables().size()); iter = packInfo.getParsables().iterator(); while (iter.hasNext()) objOut.writeObject(iter.next()); // Write out information about executable files objOut.writeInt(packInfo.getExecutables().size()); iter = packInfo.getExecutables().iterator(); while (iter.hasNext()) objOut.writeObject(iter.next()); // Write out information about updatecheck files objOut.writeInt(packInfo.getUpdateChecks().size()); iter = packInfo.getUpdateChecks().iterator(); while (iter.hasNext()) objOut.writeObject(iter.next()); // Cleanup objOut.flush(); packStream.closeEntry(); // close pack specific jar if required if (packJarsSeparate) packStream.close(); packNumber++; } // Now that we know sizes, write pack metadata to primary jar. primaryJarStream.putNextEntry(new ZipEntry("packs.info")); ObjectOutputStream out = new ObjectOutputStream(primaryJarStream); out.writeInt(packsList.size()); Iterator i = packsList.iterator(); while (i.hasNext()) { PackInfo pack = (PackInfo) i.next(); out.writeObject(pack.getPack()); } out.flush(); primaryJarStream.closeEntry(); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/670d2dce35e3033459b7343ab34ed921bd2331ed/Packager.java/clean/src/lib/com/izforge/izpack/compiler/Packager.java |
match = ((osName.indexOf("mac") > -1) && !(osName.endsWith("x"))); | match = ((osName.indexOf("mac") > -1)); | public boolean matchCurrentSystem() { boolean match = true; String osName = System.getProperty("os.name").toLowerCase(); if ((arch != null) && (arch.length() != 0)) { match = System.getProperty("os.arch").toLowerCase().equals(arch); } if (match && (version != null) && (version.length() != 0)) { match = System.getProperty("os.version").toLowerCase().equals(version); } if (match && (name != null) && (name.length() != 0)) { match = osName.equals(name); } if (match && (family != null)) { if (family.equals("windows")) { match = (osName.indexOf("windows") > -1); } else if (family.equals("mac")) { match = ((osName.indexOf("mac") > -1) && !(osName.endsWith("x"))); } else if (family.equals("unix")) { String pathSep = System.getProperty("path.separator"); match = ( osName.lastIndexOf("unix") > -1 || osName.lastIndexOf("linux") > -1 || osName.lastIndexOf("solaris") > -1 || osName.lastIndexOf("sunos") > -1 || osName.lastIndexOf("aix") > -1 || osName.lastIndexOf("hpux") > -1 || osName.lastIndexOf("hp-ux") > -1 || osName.lastIndexOf("irix") > -1 || osName.lastIndexOf("bsd") > -1 || ((pathSep.equals(":") && (!osName.startsWith("mac") || osName.endsWith("x")))) ); } } return match && ((family != null) || (name != null) || (version != null) || (arch != null)); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/eec0fbaab314c2d79ea8d693ab2becee41090d68/OsConstraint.java/buggy/src/lib/com/izforge/izpack/util/OsConstraint.java |
ds.addDefaultExcludes(); | protected ArrayList getPacks(XMLElement data) throws CompilerException { // Initialisation ArrayList packs = new ArrayList(); XMLElement root = requireChildNamed(data, "packs"); // dummy variable used for values from XML String val; // at least one langpack is required Vector packElements = root.getChildrenNamed("pack"); if (packElements.size() == 0) parseError(root, "<packs> requires a <pack>"); // We process each pack markup int packCounter = 0; Iterator packIter = packElements.iterator(); while (packIter.hasNext()) { XMLElement el = (XMLElement) packIter.next(); // Trivial initialisations Pack pack = new Pack(); pack.number = packCounter++; pack.name = requireAttribute(el, "name"); pack.osConstraints = OsConstraint.getOsList(el); // TODO: unverified pack.required = requireYesNoAttribute(el, "required"); pack.description = requireChildNamed(el, "description").getContent(); pack.preselected = validateYesNoAttribute(el, "preselected", YES); // We get the parsables list Iterator iter = el.getChildrenNamed("parsable").iterator(); while (iter.hasNext()) { XMLElement p = (XMLElement) iter.next(); String target = requireAttribute(p, "targetfile"); String type = p.getAttribute("type", "plain"); String encoding = p.getAttribute("encoding", null); List osList = OsConstraint.getOsList(p); // TODO: unverified pack.parsables.add(new ParsableFile(target, type, encoding, osList)); } // We get the executables list iter = el.getChildrenNamed("executable").iterator(); while (iter.hasNext()) { XMLElement e = (XMLElement) iter.next(); // when to execute this executable int executeOn = ExecutableFile.NEVER; val = e.getAttribute("stage", "never"); if ("postinstall".equalsIgnoreCase(val)) executeOn = ExecutableFile.POSTINSTALL; else if ("uninstall".equalsIgnoreCase(val)) executeOn = ExecutableFile.UNINSTALL; // main class of this executable String executeClass = e.getAttribute("class"); // type of this executable int executeType = ExecutableFile.BIN; val = e.getAttribute("type", "bin"); if ("jar".equalsIgnoreCase(val)) executeType = ExecutableFile.JAR; // what to do if execution fails int onFailure = ExecutableFile.ASK; val = e.getAttribute("failure", "ask"); if ("abort".equalsIgnoreCase(val)) onFailure = ExecutableFile.ABORT; else if ("warn".equalsIgnoreCase(val)) onFailure = ExecutableFile.WARN; // whether to keep the executable after executing it val = e.getAttribute("keep"); boolean keepFile = "true".equalsIgnoreCase(val); // get arguments for this executable ArrayList argList = new ArrayList(); XMLElement args = e.getFirstChildNamed("args"); if (null != args) { argList = new ArrayList(); Iterator argIterator = args.getChildrenNamed("arg").iterator(); while (argIterator.hasNext()) { XMLElement arg = (XMLElement) argIterator.next(); argList.add(requireAttribute(arg, "value")); } } List osList = OsConstraint.getOsList(e); // TODO: unverified String targetfile_attr = requireAttribute(e, "targetfile"); pack.executables.add( new ExecutableFile( targetfile_attr, executeType, executeClass, executeOn, onFailure, argList, osList, keepFile)); } // We get the files list iter = el.getChildrenNamed("file").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String src = requireAttribute(f, "src"); String targetdir = requireAttribute(f, "targetdir"); List osList = OsConstraint.getOsList(f); // TODO: unverified int override = getOverrideValue(f); File file = new File(src); if (! file.isAbsolute()) file = new File(basedir, src); try { addRecursively(file, targetdir, osList, override, pack); } catch (Exception x) { parseError(f, x.getMessage(), x); } } // We get the singlefiles list iter = el.getChildrenNamed("singlefile").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String src = requireAttribute(f, "src"); String target = requireAttribute(f, "target"); List osList = OsConstraint.getOsList(f); // TODO: unverified int override = getOverrideValue(f); File file = new File(src); if (! file.isAbsolute()) file = new File(basedir, src); try { addSingleFile(file, target, osList, override, pack); } catch (CompilerException x) { parseError(f, x.getMessage(), x); } } // We get the fileset list iter = el.getChildrenNamed("fileset").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String dir_attr = requireAttribute(f, "dir"); File dir = new File(dir_attr); if (! dir.isAbsolute()) dir = new File(basedir, dir_attr); if (! dir.isDirectory()) // also tests '.exists()' parseError(f, "Invalid directory 'dir': " + dir); boolean casesensitive = validateYesNoAttribute(f, "casesensitive", YES); String targetdir = requireAttribute(f, "targetdir"); List osList = OsConstraint.getOsList(f); // TODO: unverified int override = getOverrideValue(f); // get includes and excludes Vector xcludesList = null; String[] includes = null; xcludesList = f.getChildrenNamed("include"); if (xcludesList.size() > 0) { includes = new String[xcludesList.size()]; for (int j = 0; j < xcludesList.size(); j++) { XMLElement xclude = (XMLElement) xcludesList.get(j); includes[j] = requireAttribute(xclude, "name"); } } String[] excludes = null; xcludesList = f.getChildrenNamed("exclude"); if (xcludesList.size() > 0) { excludes = new String[xcludesList.size()]; for (int j = 0; j < xcludesList.size(); j++) { XMLElement xclude = (XMLElement) xcludesList.get(j); excludes[j] = requireAttribute(xclude, "name"); } } // scan and add fileset DirectoryScanner ds = new DirectoryScanner(); ds.setIncludes(includes); ds.setExcludes(excludes); ds.setBasedir(dir); ds.setCaseSensitive(casesensitive); ds.scan(); String[] files = ds.getIncludedFiles(); String[] dirs = ds.getIncludedDirectories(); // Directory scanner has done recursion, add files and directories for (int i = 0; i < files.length; ++i) { try { File file = new File(dir, files[i]); String target = new File(targetdir, files[i]).getPath(); addSingleFile(file, target, osList, override, pack); } catch (Exception x) { parseError(f, x.getMessage(), x); } } for (int i = 0; i < dirs.length; ++i) { try { // can't add empty dirs so from target dir, append temp file name File target = new File(targetdir, dirs[i]); target = new File(target, keepDirFile.getName()); addSingleFile(keepDirFile, target.getPath(), osList, override, pack); } catch (Exception x) { parseError(f, x.getMessage(), x); } } } // get the updatechecks list iter = el.getChildrenNamed("updatecheck").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String casesensitive = f.getAttribute("casesensitive"); // get includes and excludes ArrayList includesList = new ArrayList(); ArrayList excludesList = new ArrayList(); Iterator include_it = f.getChildrenNamed("include").iterator(); while (include_it.hasNext()) { XMLElement inc_el = (XMLElement) include_it.next(); includesList.add(requireAttribute(inc_el, "name")); } Iterator exclude_it = f.getChildrenNamed("exclude").iterator(); while (exclude_it.hasNext()) { XMLElement excl_el = (XMLElement) exclude_it.next(); excludesList.add(requireAttribute(excl_el, "name")); } pack.updatechecks.add( new UpdateCheck(includesList, excludesList, casesensitive)); } // We add the pack packs.add(pack); } if (packs.isEmpty()) parseError(root, "<packs> requires a <pack>"); // We return the ArrayList return packs; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/a33c48991a272bfa7088a2354246291e534596c0/Compiler.java/clean/src/lib/com/izforge/izpack/compiler/Compiler.java |
|
public AutomatedInstallData() { availablePacks = new ArrayList(); selectedPacks = new ArrayList(); panels = new ArrayList(); panelsOrder = new ArrayList(); xmlData = new XMLElement("AutomatedInstallation"); variableValueMap = new VariableValueMapImpl(); attributes = new HashMap(); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6822c9086a6716a2c03b2ad638f19542678f38a5/AutomatedInstallData.java/buggy/src/lib/com/izforge/izpack/installer/AutomatedInstallData.java |
||
public String getVariable(String var) { return variableValueMap.getVariable(var); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6822c9086a6716a2c03b2ad638f19542678f38a5/AutomatedInstallData.java/buggy/src/lib/com/izforge/izpack/installer/AutomatedInstallData.java |
||
public void setVariable(String var, String val) { variableValueMap.setVariable(var, val); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6822c9086a6716a2c03b2ad638f19542678f38a5/AutomatedInstallData.java/buggy/src/lib/com/izforge/izpack/installer/AutomatedInstallData.java |
||
element_re.append("[^" + File.separator + "]*"); | element_re.append("[^").append(File.separator).append("]*"); | private List preparePatterns(ArrayList list, RECompiler recompiler) { ArrayList result = new ArrayList(); for (Iterator iter = list.iterator(); iter.hasNext();) { String element = (String) iter.next(); if ((element != null) && (element.length() > 0)) { // substitute variables in the pattern element = this.vs.substitute(element, "plain"); // check whether the pattern is absolute or relative File f = new File(element); // if it is relative, make it absolute and prepend the // installation path // (this is a bit dangerous...) if (!f.isAbsolute()) { element = new File(this.absolute_installpath, element).toString(); } // now parse the element and construct a regular expression from // it // (we have to parse it one character after the next because // every // character should only be processed once - it's not possible // to get this // correct using regular expression replacing) StringBuffer element_re = new StringBuffer(); int lookahead = -1; int pos = 0; while (pos < element.length()) { char c; if (lookahead != -1) { c = (char) lookahead; lookahead = -1; } else c = element.charAt(pos++); switch (c) { case '/': { element_re.append(File.separator); break; } // escape backslash and dot case '\\': case '.': { element_re.append("\\"); element_re.append(c); break; } case '*': { if (pos == element.length()) { element_re.append("[^" + File.separator + "]*"); break; } lookahead = element.charAt(pos++); // check for "**" if (lookahead == '*') { element_re.append(".*"); // consume second star lookahead = -1; } else { element_re.append("[^" + File.separator + "]*"); // lookahead stays there } break; } default: { element_re.append(c); break; } } // switch } // make sure that the whole expression is matched element_re.append('$'); // replace \ by \\ and create a RE from the result try { result.add(new RE(recompiler.compile(element_re.toString()))); } catch (RESyntaxException e) { this.handler.emitNotification("internal error: pattern \"" + element + "\" produced invalid RE \"" + f.getPath() + "\""); } } } return result; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/9619b3a25f43787dc92011111668210e06c00c71/Unpacker.java/buggy/src/lib/com/izforge/izpack/installer/Unpacker.java |
element_re.append("[^" + File.separator + "]*"); | element_re.append("[^").append(File.separator).append("]*"); | private List preparePatterns(ArrayList list, RECompiler recompiler) { ArrayList result = new ArrayList(); for (Iterator iter = list.iterator(); iter.hasNext();) { String element = (String) iter.next(); if ((element != null) && (element.length() > 0)) { // substitute variables in the pattern element = this.vs.substitute(element, "plain"); // check whether the pattern is absolute or relative File f = new File(element); // if it is relative, make it absolute and prepend the // installation path // (this is a bit dangerous...) if (!f.isAbsolute()) { element = new File(this.absolute_installpath, element).toString(); } // now parse the element and construct a regular expression from // it // (we have to parse it one character after the next because // every // character should only be processed once - it's not possible // to get this // correct using regular expression replacing) StringBuffer element_re = new StringBuffer(); int lookahead = -1; int pos = 0; while (pos < element.length()) { char c; if (lookahead != -1) { c = (char) lookahead; lookahead = -1; } else c = element.charAt(pos++); switch (c) { case '/': { element_re.append(File.separator); break; } // escape backslash and dot case '\\': case '.': { element_re.append("\\"); element_re.append(c); break; } case '*': { if (pos == element.length()) { element_re.append("[^" + File.separator + "]*"); break; } lookahead = element.charAt(pos++); // check for "**" if (lookahead == '*') { element_re.append(".*"); // consume second star lookahead = -1; } else { element_re.append("[^" + File.separator + "]*"); // lookahead stays there } break; } default: { element_re.append(c); break; } } // switch } // make sure that the whole expression is matched element_re.append('$'); // replace \ by \\ and create a RE from the result try { result.add(new RE(recompiler.compile(element_re.toString()))); } catch (RESyntaxException e) { this.handler.emitNotification("internal error: pattern \"" + element + "\" produced invalid RE \"" + f.getPath() + "\""); } } } return result; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/9619b3a25f43787dc92011111668210e06c00c71/Unpacker.java/buggy/src/lib/com/izforge/izpack/installer/Unpacker.java |
if (langpack != null && !(pack.id == null || pack.id.equals(""))) | if (langpack != null && !(pack.id == null || "".equals(pack.id))) | public void run() { addToInstances(); try { // // Initialisations FileOutputStream out = null; ArrayList parsables = new ArrayList(); ArrayList executables = new ArrayList(); ArrayList updatechecks = new ArrayList(); List packs = idata.selectedPacks; int npacks = packs.size(); handler.startAction("Unpacking", npacks); udata = UninstallData.getInstance(); // Custom action listener stuff --- load listeners ---- List[] customActions = getCustomActions(); // Custom action listener stuff --- beforePacks ---- informListeners(customActions, InstallerListener.BEFORE_PACKS, idata, new Integer( npacks), handler); // We unpack the selected packs for (int i = 0; i < npacks; i++) { // We get the pack stream int n = idata.allPacks.indexOf(packs.get(i)); // Custom action listener stuff --- beforePack ---- informListeners(customActions, InstallerListener.BEFORE_PACK, packs.get(i), new Integer(npacks), handler); ObjectInputStream objIn = new ObjectInputStream(getPackAsStream(n)); // We unpack the files int nfiles = objIn.readInt(); // We get the internationalized name of the pack final Pack pack = ((Pack) packs.get(i)); String stepname = pack.name;// the message to be passed to the // installpanel if (langpack != null && !(pack.id == null || pack.id.equals(""))) { final String name = langpack.getString(pack.id); if (name != null && !name.equals("")) { stepname = name; } } handler.nextStep(stepname, i + 1, nfiles); for (int j = 0; j < nfiles; j++) { // We read the header PackFile pf = (PackFile) objIn.readObject(); if (OsConstraint.oneMatchesCurrentSystem(pf.osConstraints())) { // We translate & build the path String path = IoHelper.translatePath(pf.getTargetPath(), vs); File pathFile = new File(path); File dest = pathFile; if (!pf.isDirectory()) dest = pathFile.getParentFile(); if (!dest.exists()) { // If there are custom actions which would be called // at // creating a directory, create it recursively. List fileListeners = customActions[customActions.length - 1]; if (fileListeners != null && fileListeners.size() > 0) mkDirsWithEnhancement(dest, pf, customActions); else // Create it in on step. { if (!dest.mkdirs()) { handler.emitError("Error creating directories", "Could not create directory\n" + dest.getPath()); handler.stopAction(); return; } } } if (pf.isDirectory()) continue; // Custom action listener stuff --- beforeFile ---- informListeners(customActions, InstallerListener.BEFORE_FILE, pathFile, pf, null); // We add the path to the log, udata.addFile(path); handler.progress(j, path); // if this file exists and should not be overwritten, // check // what to do if ((pathFile.exists()) && (pf.override() != PackFile.OVERRIDE_TRUE)) { boolean overwritefile = false; // don't overwrite file if the user said so if (pf.override() != PackFile.OVERRIDE_FALSE) { if (pf.override() == PackFile.OVERRIDE_TRUE) { overwritefile = true; } else if (pf.override() == PackFile.OVERRIDE_UPDATE) { // check mtime of involved files // (this is not 100% perfect, because the // already existing file might // still be modified but the new installed // is just a bit newer; we would // need the creation time of the existing // file or record with which mtime // it was installed...) overwritefile = (pathFile.lastModified() < pf.lastModified()); } else { int def_choice = -1; if (pf.override() == PackFile.OVERRIDE_ASK_FALSE) def_choice = AbstractUIHandler.ANSWER_NO; if (pf.override() == PackFile.OVERRIDE_ASK_TRUE) def_choice = AbstractUIHandler.ANSWER_YES; int answer = handler.askQuestion(idata.langpack .getString("InstallPanel.overwrite.title") + " - " + pathFile.getName(), idata.langpack .getString("InstallPanel.overwrite.question") + pathFile.getAbsolutePath(), AbstractUIHandler.CHOICES_YES_NO, def_choice); overwritefile = (answer == AbstractUIHandler.ANSWER_YES); } } if (!overwritefile) { if (!pf.isBackReference() && !((Pack) packs.get(i)).loose) objIn.skip(pf.length()); continue; } } // We copy the file out = new FileOutputStream(pathFile); byte[] buffer = new byte[5120]; long bytesCopied = 0; InputStream pis = objIn; if (pf.isBackReference()) { InputStream is = getPackAsStream(pf.previousPackNumber); pis = new ObjectInputStream(is); // must wrap for blockdata use by objectstream // (otherwise strange result) // skip on underlaying stream (for some reason not // possible on ObjectStream) is.skip(pf.offsetInPreviousPack - 4); // but the stream header is now already read (== 4 // bytes) } else if (((Pack) packs.get(i)).loose) { pis = new FileInputStream(pf.sourcePath); } while (bytesCopied < pf.length()) { if (performInterrupted()) { // Interrupt was initiated; perform it. out.close(); if (pis != objIn) pis.close(); return; } int maxBytes = (int) Math.min(pf.length() - bytesCopied, buffer.length); int bytesInBuffer = pis.read(buffer, 0, maxBytes); if (bytesInBuffer == -1) throw new IOException("Unexpected end of stream"); out.write(buffer, 0, bytesInBuffer); bytesCopied += bytesInBuffer; } // Cleanings out.close(); if (pis != objIn) pis.close(); // Set file modification time if specified if (pf.lastModified() >= 0) pathFile.setLastModified(pf.lastModified()); // Custom action listener stuff --- afterFile ---- informListeners(customActions, InstallerListener.AFTER_FILE, pathFile, pf, null); } else { if (!pf.isBackReference()) objIn.skip(pf.length()); } } // Load information about parsable files int numParsables = objIn.readInt(); for (int k = 0; k < numParsables; k++) { ParsableFile pf = (ParsableFile) objIn.readObject(); pf.path = IoHelper.translatePath(pf.path, vs); parsables.add(pf); } // Load information about executable files int numExecutables = objIn.readInt(); for (int k = 0; k < numExecutables; k++) { ExecutableFile ef = (ExecutableFile) objIn.readObject(); ef.path = IoHelper.translatePath(ef.path, vs); if (null != ef.argList && !ef.argList.isEmpty()) { String arg = null; for (int j = 0; j < ef.argList.size(); j++) { arg = (String) ef.argList.get(j); arg = IoHelper.translatePath(arg, vs); ef.argList.set(j, arg); } } executables.add(ef); if (ef.executionStage == ExecutableFile.UNINSTALL) { udata.addExecutable(ef); } } // Custom action listener stuff --- uninstall data ---- handleAdditionalUninstallData(udata, customActions); // Load information about updatechecks int numUpdateChecks = objIn.readInt(); for (int k = 0; k < numUpdateChecks; k++) { UpdateCheck uc = (UpdateCheck) objIn.readObject(); updatechecks.add(uc); } objIn.close(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPack ---- informListeners(customActions, InstallerListener.AFTER_PACK, packs.get(i), new Integer(i), handler); } // We use the scripts parser ScriptParser parser = new ScriptParser(parsables, vs); parser.parseFiles(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We use the file executor FileExecutor executor = new FileExecutor(executables); if (executor.executeFiles(ExecutableFile.POSTINSTALL, handler) != 0) handler.emitError("File execution failed", "The installation was not completed"); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We put the uninstaller (it's not yet complete...) putUninstaller(); // update checks _after_ uninstaller was put, so we don't delete it performUpdateChecks(updatechecks); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPacks ---- informListeners(customActions, InstallerListener.AFTER_PACKS, idata, handler, null); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // The end :-) handler.stopAction(); } catch (Exception err) { // TODO: finer grained error handling with useful error messages handler.stopAction(); handler.emitError("An error occured", err.toString()); err.printStackTrace(); } finally { removeFromInstances(); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/9619b3a25f43787dc92011111668210e06c00c71/Unpacker.java/buggy/src/lib/com/izforge/izpack/installer/Unpacker.java |
if (name != null && !name.equals("")) | if (name != null && !"".equals(name)) | public void run() { addToInstances(); try { // // Initialisations FileOutputStream out = null; ArrayList parsables = new ArrayList(); ArrayList executables = new ArrayList(); ArrayList updatechecks = new ArrayList(); List packs = idata.selectedPacks; int npacks = packs.size(); handler.startAction("Unpacking", npacks); udata = UninstallData.getInstance(); // Custom action listener stuff --- load listeners ---- List[] customActions = getCustomActions(); // Custom action listener stuff --- beforePacks ---- informListeners(customActions, InstallerListener.BEFORE_PACKS, idata, new Integer( npacks), handler); // We unpack the selected packs for (int i = 0; i < npacks; i++) { // We get the pack stream int n = idata.allPacks.indexOf(packs.get(i)); // Custom action listener stuff --- beforePack ---- informListeners(customActions, InstallerListener.BEFORE_PACK, packs.get(i), new Integer(npacks), handler); ObjectInputStream objIn = new ObjectInputStream(getPackAsStream(n)); // We unpack the files int nfiles = objIn.readInt(); // We get the internationalized name of the pack final Pack pack = ((Pack) packs.get(i)); String stepname = pack.name;// the message to be passed to the // installpanel if (langpack != null && !(pack.id == null || pack.id.equals(""))) { final String name = langpack.getString(pack.id); if (name != null && !name.equals("")) { stepname = name; } } handler.nextStep(stepname, i + 1, nfiles); for (int j = 0; j < nfiles; j++) { // We read the header PackFile pf = (PackFile) objIn.readObject(); if (OsConstraint.oneMatchesCurrentSystem(pf.osConstraints())) { // We translate & build the path String path = IoHelper.translatePath(pf.getTargetPath(), vs); File pathFile = new File(path); File dest = pathFile; if (!pf.isDirectory()) dest = pathFile.getParentFile(); if (!dest.exists()) { // If there are custom actions which would be called // at // creating a directory, create it recursively. List fileListeners = customActions[customActions.length - 1]; if (fileListeners != null && fileListeners.size() > 0) mkDirsWithEnhancement(dest, pf, customActions); else // Create it in on step. { if (!dest.mkdirs()) { handler.emitError("Error creating directories", "Could not create directory\n" + dest.getPath()); handler.stopAction(); return; } } } if (pf.isDirectory()) continue; // Custom action listener stuff --- beforeFile ---- informListeners(customActions, InstallerListener.BEFORE_FILE, pathFile, pf, null); // We add the path to the log, udata.addFile(path); handler.progress(j, path); // if this file exists and should not be overwritten, // check // what to do if ((pathFile.exists()) && (pf.override() != PackFile.OVERRIDE_TRUE)) { boolean overwritefile = false; // don't overwrite file if the user said so if (pf.override() != PackFile.OVERRIDE_FALSE) { if (pf.override() == PackFile.OVERRIDE_TRUE) { overwritefile = true; } else if (pf.override() == PackFile.OVERRIDE_UPDATE) { // check mtime of involved files // (this is not 100% perfect, because the // already existing file might // still be modified but the new installed // is just a bit newer; we would // need the creation time of the existing // file or record with which mtime // it was installed...) overwritefile = (pathFile.lastModified() < pf.lastModified()); } else { int def_choice = -1; if (pf.override() == PackFile.OVERRIDE_ASK_FALSE) def_choice = AbstractUIHandler.ANSWER_NO; if (pf.override() == PackFile.OVERRIDE_ASK_TRUE) def_choice = AbstractUIHandler.ANSWER_YES; int answer = handler.askQuestion(idata.langpack .getString("InstallPanel.overwrite.title") + " - " + pathFile.getName(), idata.langpack .getString("InstallPanel.overwrite.question") + pathFile.getAbsolutePath(), AbstractUIHandler.CHOICES_YES_NO, def_choice); overwritefile = (answer == AbstractUIHandler.ANSWER_YES); } } if (!overwritefile) { if (!pf.isBackReference() && !((Pack) packs.get(i)).loose) objIn.skip(pf.length()); continue; } } // We copy the file out = new FileOutputStream(pathFile); byte[] buffer = new byte[5120]; long bytesCopied = 0; InputStream pis = objIn; if (pf.isBackReference()) { InputStream is = getPackAsStream(pf.previousPackNumber); pis = new ObjectInputStream(is); // must wrap for blockdata use by objectstream // (otherwise strange result) // skip on underlaying stream (for some reason not // possible on ObjectStream) is.skip(pf.offsetInPreviousPack - 4); // but the stream header is now already read (== 4 // bytes) } else if (((Pack) packs.get(i)).loose) { pis = new FileInputStream(pf.sourcePath); } while (bytesCopied < pf.length()) { if (performInterrupted()) { // Interrupt was initiated; perform it. out.close(); if (pis != objIn) pis.close(); return; } int maxBytes = (int) Math.min(pf.length() - bytesCopied, buffer.length); int bytesInBuffer = pis.read(buffer, 0, maxBytes); if (bytesInBuffer == -1) throw new IOException("Unexpected end of stream"); out.write(buffer, 0, bytesInBuffer); bytesCopied += bytesInBuffer; } // Cleanings out.close(); if (pis != objIn) pis.close(); // Set file modification time if specified if (pf.lastModified() >= 0) pathFile.setLastModified(pf.lastModified()); // Custom action listener stuff --- afterFile ---- informListeners(customActions, InstallerListener.AFTER_FILE, pathFile, pf, null); } else { if (!pf.isBackReference()) objIn.skip(pf.length()); } } // Load information about parsable files int numParsables = objIn.readInt(); for (int k = 0; k < numParsables; k++) { ParsableFile pf = (ParsableFile) objIn.readObject(); pf.path = IoHelper.translatePath(pf.path, vs); parsables.add(pf); } // Load information about executable files int numExecutables = objIn.readInt(); for (int k = 0; k < numExecutables; k++) { ExecutableFile ef = (ExecutableFile) objIn.readObject(); ef.path = IoHelper.translatePath(ef.path, vs); if (null != ef.argList && !ef.argList.isEmpty()) { String arg = null; for (int j = 0; j < ef.argList.size(); j++) { arg = (String) ef.argList.get(j); arg = IoHelper.translatePath(arg, vs); ef.argList.set(j, arg); } } executables.add(ef); if (ef.executionStage == ExecutableFile.UNINSTALL) { udata.addExecutable(ef); } } // Custom action listener stuff --- uninstall data ---- handleAdditionalUninstallData(udata, customActions); // Load information about updatechecks int numUpdateChecks = objIn.readInt(); for (int k = 0; k < numUpdateChecks; k++) { UpdateCheck uc = (UpdateCheck) objIn.readObject(); updatechecks.add(uc); } objIn.close(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPack ---- informListeners(customActions, InstallerListener.AFTER_PACK, packs.get(i), new Integer(i), handler); } // We use the scripts parser ScriptParser parser = new ScriptParser(parsables, vs); parser.parseFiles(); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We use the file executor FileExecutor executor = new FileExecutor(executables); if (executor.executeFiles(ExecutableFile.POSTINSTALL, handler) != 0) handler.emitError("File execution failed", "The installation was not completed"); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // We put the uninstaller (it's not yet complete...) putUninstaller(); // update checks _after_ uninstaller was put, so we don't delete it performUpdateChecks(updatechecks); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // Custom action listener stuff --- afterPacks ---- informListeners(customActions, InstallerListener.AFTER_PACKS, idata, handler, null); if (performInterrupted()) { // Interrupt was initiated; perform it. return; } // The end :-) handler.stopAction(); } catch (Exception err) { // TODO: finer grained error handling with useful error messages handler.stopAction(); handler.emitError("An error occured", err.toString()); err.printStackTrace(); } finally { removeFromInstances(); } } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/9619b3a25f43787dc92011111668210e06c00c71/Unpacker.java/buggy/src/lib/com/izforge/izpack/installer/Unpacker.java |
String resNamePrifix = "HTMLLicencePanel.licence"; | String resNamePrifix = "/res/HTMLLicencePanel.licence"; | private URL loadLicence() { URL retVal = null; String resNamePrifix = "HTMLLicencePanel.licence"; String resName = resNamePrifix + "_" + idata.localeISO3; retVal = getClass().getResource(resName); if (null == retVal ) { retVal = getClass().getResource(resNamePrifix); } return retVal; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/f5d284ac59e86db8dfd60282104f2d8ce8a6f3c1/HTMLLicencePanel.java/clean/src/lib/com/izforge/izpack/panels/HTMLLicencePanel.java |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _factory.destroyObject(obj); return; } | public void returnObject(Object obj) throws Exception { boolean success = true; if(!(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { success = false; | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _factory.destroyObject(obj); return; } } } _pool.add(new SoftReference(obj)); } | 50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/6d5eb8fcfd40a356f848c407c2429f711b97c0f4/SoftReferenceObjectPool.java/clean/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java |
_pool.add(new SoftReference(obj)); | boolean shouldDestroy = !success; synchronized(this) { _numActive--; if(success) { _pool.add(new SoftReference(obj)); } notifyAll(); } if(shouldDestroy) { try { _factory.destroyObject(obj); } catch(Exception e) { } } | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _factory.destroyObject(obj); return; } } } _pool.add(new SoftReference(obj)); } | 50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/6d5eb8fcfd40a356f848c407c2429f711b97c0f4/SoftReferenceObjectPool.java/clean/src/java/org/apache/commons/pool/impl/SoftReferenceObjectPool.java |
securitySystem = (SecuritySystem) applicationContext.getBean("securitySystem"); | protected void onSetUp() throws Exception { factory = new ServiceFactory( (OmeroContext) applicationContext ); iQuery = (LocalQuery) factory.getQueryService(); iUpdate = (LocalUpdate) factory.getUpdateService(); iAdmin = (LocalAdmin) factory.getAdminService(); iAnalysis = factory.getAnalysisService(); iPojos = factory.getPojosService(); iPixels = factory.getPixelsService(); eContext = (EventContext) applicationContext.getBean("eventContext"); loginRoot(); data = new OMEData(); data.setDataSource((DataSource) applicationContext.getBean("dataSource")); DataSource dataSource = (DataSource) applicationContext.getBean("dataSource"); jdbcTemplate = (JdbcTemplate) applicationContext.getBean("jdbcTemplate"); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/AbstractManagedContextTest.java/clean/components/server/test/ome/server/itests/AbstractManagedContextTest.java |
|
public ServiceFactory( OmeroContext context ){ this.ctx = context; | public ServiceFactory(){ if ( getDefaultContext() != null ) { this.ctx = OmeroContext.getInstance(getDefaultContext()); } | public ServiceFactory( OmeroContext context ){ this.ctx = context; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/725d5581a5805696002bff1ec2ecb359495503f5/ServiceFactory.java/buggy/components/common/src/ome/system/ServiceFactory.java |
servant.addCodomainMap(mapCtx); | servant.setChannelWindow(w, start, end); | public void doCall() { servant.addCodomainMap(mapCtx); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
public int getDefaultT() { return rndDefCopy.getDefaultT(); } | public int getDefaultT() { return rndDefCopy.getDefaultT(); } | public int getDefaultT() { return rndDefCopy.getDefaultT(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
public int getDefaultZ() { return rndDefCopy.getDefaultZ(); } | public int getDefaultZ() { return rndDefCopy.getDefaultZ(); } | public int getDefaultZ() { return rndDefCopy.getDefaultZ(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
public int getModel() { return rndDefCopy.getModel(); } | public int getModel() { return rndDefCopy.getModel(); } | public int getModel() { return rndDefCopy.getModel(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
servant.removeCodomainMap(mapCtx); | servant.setActive(w, active); | public void doCall() { servant.removeCodomainMap(mapCtx); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
setQuantumStrategy(QuantumFactory.LINEAR, 1.0, QuantumFactory.DEPTH_8BIT); setCodomainInterval(0, QuantumFactory.DEPTH_8BIT); ChannelBindings[] cb = rndDefCopy.getChannelBindings(); PixelsStats stats = servant.getPixelsStats(); for (int i = 0; i < cb.length; i++) resetDefaultsChannel(i, stats); rndDefCopy.remove(); setModel(RenderingDef.GS); MethodCall mCall = new MethodCall() { public void doCall() { servant.resetDefaults(); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); | setQuantumStrategy(QuantumFactory.DEPTH_8BIT, QuantumFactory.NOISE_REDUCTION); setCodomainInterval(0, QuantumFactory.DEPTH_8BIT); ChannelBindings[] cb = rndDefCopy.getChannelBindings(); PixelsStats stats = servant.getPixelsStats(); for (int i = 0; i < cb.length; i++) resetDefaultsChannel(i, stats); rndDefCopy.remove(); setModel(RenderingDef.GS); MethodCall mCall = new MethodCall() { public void doCall() { servant.resetDefaults(); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); | public void resetDefaults() { setQuantumStrategy(QuantumFactory.LINEAR, 1.0, QuantumFactory.DEPTH_8BIT); setCodomainInterval(0, QuantumFactory.DEPTH_8BIT); ChannelBindings[] cb = rndDefCopy.getChannelBindings(); PixelsStats stats = servant.getPixelsStats(); for (int i = 0; i < cb.length; i++) resetDefaultsChannel(i, stats); rndDefCopy.remove(); setModel(RenderingDef.GS); MethodCall mCall = new MethodCall() { public void doCall() { servant.resetDefaults(); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
servant.resetDefaults(); | servant.updateCodomainMap(mapCtx); | public void doCall() { servant.resetDefaults(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
servant.saveCurrentSettings(); | servant.addCodomainMap(mapCtx); | public void doCall() { servant.saveCurrentSettings(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
servant.setActive(w, active); } | servant.setQuantizationMap(w, family, coefficient); } | public void doCall() { servant.setActive(w, active); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
servant.setChannelWindow(w, start, end); } | servant.setQuantumStrategy(bitResolution, b); } | public void doCall() { servant.setChannelWindow(w, start, end); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, start, end, qd.bitResolution); rndDefCopy.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rndDefCopy.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } MethodCall mCall = new MethodCall() { public void doCall() { servant.setCodomainInterval(start, end); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); | QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(qd.pixelType, start, end, qd.bitResolution, qd.noiseReduction); rndDefCopy.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rndDefCopy.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } MethodCall mCall = new MethodCall() { public void doCall() { servant.setCodomainInterval(start, end); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); | public void setCodomainInterval(final int start, final int end) { //TODO: this might go well w/ our copy, but then throw an exception //in the servant. We need a future. QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, start, end, qd.bitResolution); rndDefCopy.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rndDefCopy.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } MethodCall mCall = new MethodCall() { public void doCall() { servant.setCodomainInterval(start, end); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
servant.setCodomainInterval(start, end); } | servant.setDefaultT(t); } | public void doCall() { servant.setCodomainInterval(start, end); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
public void setQuantumStrategy(final int family, final double coefficient, final int bitResolution) | public void setQuantumStrategy(final int bitResolution, final boolean b) | public void setQuantumStrategy(final int family, final double coefficient, final int bitResolution) { //TODO: this might go well w/ our copy, but then throw an exception //in the servant. We need a future. QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rndDefCopy.setQuantumDef(newQd); MethodCall mCall = new MethodCall() { public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rndDefCopy.setQuantumDef(newQd); MethodCall mCall = new MethodCall() { public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); | QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(qd.pixelType, qd.cdStart, qd.cdEnd, bitResolution, b); rndDefCopy.setQuantumDef(newQd); MethodCall mCall = new MethodCall() { public void doCall() { servant.setQuantumStrategy(bitResolution, b); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); | public void setQuantumStrategy(final int family, final double coefficient, final int bitResolution) { //TODO: this might go well w/ our copy, but then throw an exception //in the servant. We need a future. QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rndDefCopy.setQuantumDef(newQd); MethodCall mCall = new MethodCall() { public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
servant.setQuantumStrategy(family, coefficient, bitResolution); } | servant.setDefaultZ(z); } | public void doCall() { servant.setQuantumStrategy(family, coefficient, bitResolution); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
servant.setRGBA(w, red, green, blue, alpha); } | servant.setCodomainInterval(start, end); } | public void doCall() { servant.setRGBA(w, red, green, blue, alpha); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.