Program: 44056
Project: 44056
Buggy source:
public OSMZmiany(){
  dc=new DataContainer();
  this.setTitle("String_Node_Str");
  this.addWindowListener(new windowHandler());
  GridBagLayout gbl=new GridBagLayout();
  gbl.rowWeights=new double[]{1.0};
  gbl.columnWeights=new double[]{1.0};
  getContentPane().setLayout(gbl);
  JSplitPane splitPane=new JSplitPane();
  GridBagConstraints gbc_splitPane=new GridBagConstraints();
  gbc_splitPane.fill=GridBagConstraints.BOTH;
  gbc_splitPane.gridx=0;
  gbc_splitPane.gridy=0;
  getContentPane().add(splitPane,gbc_splitPane);
  this.setSize(800,800);
  conf=Configuration.loadFromFile();
  conf.addConfigurationListener(this);
  dc.setNewDataFilter(conf.getSelectedProfile().getMapFilter());
  map=new ZMapWidget(dc);
  map.setSize(400,400);
  Profile p=conf.getSelectedProfile();
  this.profileChanged(p);
  map.addZMapWidgetListener(this);
  splitPane.setLeftComponent(map);
  JPanel panel=new JPanel();
  splitPane.setRightComponent(panel);
  panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
  JTabbedPane tabbedPane=new JTabbedPane(JTabbedPane.TOP);
  JPanel panel_1=new JPanel();
  tabbedPane.addTab("String_Node_Str",null,panel_1,null);
  final JButton btnSetBox=new JButton("String_Node_Str");
  btnSetBox.setBounds(41,127,129,24);
  btnSetBox.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      setBox=true;
    }
  }
);
  JButton btnRemoveBox=new JButton("String_Node_Str");
  btnRemoveBox.setBounds(175,127,118,24);
  btnRemoveBox.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      dc.mapfilter=null;
    }
  }
);
  panel_1.setLayout(null);
  JLabel lblSetBoundary=new JLabel("String_Node_Str");
  lblSetBoundary.setBounds(12,93,101,14);
  panel_1.add(lblSetBoundary);
  panel_1.add(btnRemoveBox);
  panel_1.add(btnSetBox);
  JLabel lblData=new JLabel("String_Node_Str");
  lblData.setBounds(12,244,39,14);
  panel_1.add(lblData);
  JLabel lblDiffUrl=new JLabel("String_Node_Str");
  lblDiffUrl.setBounds(12,270,55,14);
  panel_1.add(lblDiffUrl);
  tfURL=new JTextField();
  tfURL.setBounds(94,270,199,24);
  panel_1.add(tfURL);
  tfURL.setColumns(10);
  JButton btnLoad=new JButton("String_Node_Str");
  btnLoad.setBounds(224,307,69,24);
  btnLoad.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      getData(tfURL.getText());
    }
  }
);
  panel_1.add(btnLoad);
  cbxLiveEdit=new JCheckBox("String_Node_Str");
  cbxLiveEdit.setBounds(11,353,159,22);
  cbxLiveEdit.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      getData();
    }
  }
);
  panel_1.add(cbxLiveEdit);
  JButton btnClear=new JButton("String_Node_Str");
  btnClear.setBounds(224,393,71,24);
  btnClear.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      dc.clear();
    }
  }
);
  panel_1.add(btnClear);
  JButton btAddProfile=new JButton("String_Node_Str");
  btAddProfile.setBounds(198,43,95,24);
  panel_1.add(btAddProfile);
  cbProfiles=new JComboBox(profilesModel);
  cbProfiles.setBounds(100,8,193,23);
  panel_1.add(cbProfiles);
  JLabel label=new JLabel("String_Node_Str");
  label.setBounds(12,12,70,14);
  panel_1.add(label);
  JSeparator separator=new JSeparator();
  separator.setBounds(12,79,351,2);
  panel_1.add(separator);
  JLabel lblPointA=new JLabel("String_Node_Str");
  lblPointA.setBounds(41,163,70,14);
  panel_1.add(lblPointA);
  JLabel lblPointB=new JLabel("String_Node_Str");
  lblPointB.setBounds(43,189,70,14);
  panel_1.add(lblPointB);
  lblBoxB1=new JLabel("String_Node_Str");
  lblBoxB1.setHorizontalAlignment(SwingConstants.RIGHT);
  lblBoxB1.setBounds(123,163,170,14);
  panel_1.add(lblBoxB1);
  lblBoxB2=new JLabel("String_Node_Str");
  lblBoxB2.setHorizontalAlignment(SwingConstants.RIGHT);
  lblBoxB2.setBounds(125,189,168,14);
  panel_1.add(lblBoxB2);
  JSeparator separator_1=new JSeparator();
  separator_1.setBounds(12,230,351,2);
  panel_1.add(separator_1);
  JButton btnEditInP2=new JButton("String_Node_Str");
  btnEditInP2.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      int i=map.getZoom();
      Coordinate c=map.getPosition();
      openURL("String_Node_Str" + c.getLat() + "String_Node_Str"+ c.getLon()+ "String_Node_Str"+ i);
    }
  }
);
  btnEditInP2.setBounds(12,681,158,24);
  panel_1.add(btnEditInP2);
  panel.add(tabbedPane);
  JPanel panel_2=new JPanel();
  tabbedPane.addTab("String_Node_Str",null,panel_2,null);
  panel_2.setLayout(null);
  JButton btnShowSite=new JButton("String_Node_Str");
  btnShowSite.setBounds(154,5,61,24);
  panel_2.add(btnShowSite);
  list=new JList(model);
  list.setBounds(12,41,351,664);
  panel_2.add(list);
  JPanel panel_3=new JPanel();
  tabbedPane.addTab("String_Node_Str",null,panel_3,null);
  panel_3.setLayout(null);
  JLabel lblNode=new JLabel("String_Node_Str");
  lblNode.setBounds(12,12,70,14);
  panel_3.add(lblNode);
  JLabel lblChangeset=new JLabel("String_Node_Str");
  lblChangeset.setBounds(12,38,90,14);
  panel_3.add(lblChangeset);
  JLabel lblUser=new JLabel("String_Node_Str");
  lblUser.setBounds(12,64,70,14);
  panel_3.add(lblUser);
  btChangeset=new JButton("String_Node_Str");
  btChangeset.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      if (!btChangeset.getText().equals("String_Node_Str"))       OSMZmiany.openURL("String_Node_Str" + btChangeset.getText());
    }
  }
);
  btChangeset.setForeground(Color.BLUE);
  btChangeset.setBounds(109,38,120,14);
  panel_3.add(btChangeset);
  btNode=new JButton("String_Node_Str");
  btNode.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      if (!btNode.getText().equals("String_Node_Str"))       OSMZmiany.openURL("String_Node_Str" + btNode.getText());
    }
  }
);
  btNode.setForeground(Color.BLUE);
  btNode.setBounds(109,12,120,14);
  panel_3.add(btNode);
  btUser=new JButton("String_Node_Str");
  btUser.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      if (!btUser.getText().equals("String_Node_Str"))       OSMZmiany.openURL("String_Node_Str" + btUser.getText());
    }
  }
);
  btUser.setForeground(Color.BLUE);
  btUser.setBounds(109,64,120,14);
  panel_3.add(btUser);
  JButton btSelectChangeset=new JButton("String_Node_Str");
  btSelectChangeset.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Node n=map.drawStyle.getSelectedNode();
      if (n != null) {
        map.drawStyle.setSelection(dc.changesets.get(dc.changesetsIndex.get(n.changesetId)));
        map.refrashOverlay();
      }
    }
  }
);
  btSelectChangeset.setBounds(13,116,216,24);
  panel_3.add(btSelectChangeset);
  JButton btnAddUser=new JButton("String_Node_Str");
  btnAddUser.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      if (map.drawStyle.getSelectedNode() != null) {
        conf.getSelectedProfile().addUser(dc.users.get(dc.changesets.get(dc.changesetsIndex.get(map.drawStyle.getSelectedNode().changesetId)).userId));
      }
 else       if (map.drawStyle.getSelectedChangeset() != null) {
        conf.getSelectedProfile().addUser(dc.users.get(dc.changesets.get(dc.changesetsIndex.get(map.drawStyle.getSelectedChangeset().id)).userId));
      }
      reloadUsersList();
    }
  }
);
  btnAddUser.setBounds(109,90,120,14);
  panel_3.add(btnAddUser);
  JPanel panel_4=new JPanel();
  tabbedPane.addTab("String_Node_Str",null,panel_4,null);
  panel_4.setLayout(null);
  usersListType=new JComboBox();
  usersListType.addItemListener(new ItemListener(){
    public void itemStateChanged(    ItemEvent arg0){
      boolean z=false;
      if (usersListType.getSelectedIndex() == 1)       z=true;
      conf.getSelectedProfile().setListType(z);
      reloadUsersList();
      map.refrashOverlay();
    }
  }
);
  usersListType.setModel(new DefaultComboBoxModel(new String[]{"String_Node_Str","String_Node_Str"}));
  usersListType.setBounds(100,12,145,23);
  panel_4.add(usersListType);
  JLabel lblListType=new JLabel("String_Node_Str");
  lblListType.setBounds(12,16,70,14);
  panel_4.add(lblListType);
  JList listUsers=new JList(modelUsers);
  listUsers.setBounds(12,47,233,618);
  panel_4.add(listUsers);
  setVisible(true);
  addWindowListener(new WindowAdapter(){
    public void windowClosing(    WindowEvent e){
      System.exit(0);
    }
  }
);
  refetchTimer=new Timer();
  refetchTimer.scheduleAtFixedRate(new TimerTask(){
    public void run(){
      if (cbxLiveEdit.isSelected()) {
        initChangeStream();
        getData();
      }
    }
  }
,20000,30000);
  reloadProfiles();
  reloadUserType();
  reloadUsersList();
  map.refrashOverlay();
}

Fixed version (ground truth):
public OSMZmiany(){
  dc=new DataContainer();
  this.setTitle("String_Node_Str");
  this.addWindowListener(new windowHandler());
  GridBagLayout gbl=new GridBagLayout();
  gbl.rowWeights=new double[]{1.0};
  gbl.columnWeights=new double[]{1.0};
  getContentPane().setLayout(gbl);
  JSplitPane splitPane=new JSplitPane();
  GridBagConstraints gbc_splitPane=new GridBagConstraints();
  gbc_splitPane.fill=GridBagConstraints.BOTH;
  gbc_splitPane.gridx=0;
  gbc_splitPane.gridy=0;
  getContentPane().add(splitPane,gbc_splitPane);
  this.setSize(800,800);
  conf=Configuration.loadFromFile();
  conf.addConfigurationListener(this);
  dc.setNewDataFilter(conf.getSelectedProfile().getMapFilter());
  map=new ZMapWidget(dc);
  map.setSize(400,400);
  Profile p=conf.getSelectedProfile();
  this.profileChanged(p);
  map.addZMapWidgetListener(this);
  splitPane.setLeftComponent(map);
  JPanel panel=new JPanel();
  splitPane.setRightComponent(panel);
  panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
  JTabbedPane tabbedPane=new JTabbedPane(JTabbedPane.TOP);
  JPanel panel_1=new JPanel();
  tabbedPane.addTab("String_Node_Str",null,panel_1,null);
  final JButton btnSetBox=new JButton("String_Node_Str");
  btnSetBox.setBounds(41,127,129,24);
  btnSetBox.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      setBox=true;
    }
  }
);
  JButton btnRemoveBox=new JButton("String_Node_Str");
  btnRemoveBox.setBounds(175,127,118,24);
  btnRemoveBox.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      dc.mapfilter=null;
    }
  }
);
  panel_1.setLayout(null);
  JLabel lblSetBoundary=new JLabel("String_Node_Str");
  lblSetBoundary.setBounds(12,93,101,14);
  panel_1.add(lblSetBoundary);
  panel_1.add(btnRemoveBox);
  panel_1.add(btnSetBox);
  JLabel lblData=new JLabel("String_Node_Str");
  lblData.setBounds(12,244,39,14);
  panel_1.add(lblData);
  JLabel lblDiffUrl=new JLabel("String_Node_Str");
  lblDiffUrl.setBounds(12,270,55,14);
  panel_1.add(lblDiffUrl);
  tfURL=new JTextField();
  tfURL.setBounds(94,270,199,24);
  panel_1.add(tfURL);
  tfURL.setColumns(10);
  JButton btnLoad=new JButton("String_Node_Str");
  btnLoad.setBounds(224,307,69,24);
  btnLoad.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      getData(tfURL.getText());
    }
  }
);
  panel_1.add(btnLoad);
  cbxLiveEdit=new JCheckBox("String_Node_Str");
  cbxLiveEdit.setBounds(11,353,159,22);
  cbxLiveEdit.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      getData();
    }
  }
);
  panel_1.add(cbxLiveEdit);
  JButton btnClear=new JButton("String_Node_Str");
  btnClear.setBounds(224,393,71,24);
  btnClear.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      dc.clear();
    }
  }
);
  panel_1.add(btnClear);
  JButton btAddProfile=new JButton("String_Node_Str");
  btAddProfile.setBounds(198,43,95,24);
  panel_1.add(btAddProfile);
  cbProfiles=new JComboBox(profilesModel);
  cbProfiles.setBounds(100,8,193,23);
  panel_1.add(cbProfiles);
  JLabel label=new JLabel("String_Node_Str");
  label.setBounds(12,12,70,14);
  panel_1.add(label);
  JSeparator separator=new JSeparator();
  separator.setBounds(12,79,351,2);
  panel_1.add(separator);
  JLabel lblPointA=new JLabel("String_Node_Str");
  lblPointA.setBounds(41,163,70,14);
  panel_1.add(lblPointA);
  JLabel lblPointB=new JLabel("String_Node_Str");
  lblPointB.setBounds(43,189,70,14);
  panel_1.add(lblPointB);
  lblBoxB1=new JLabel("String_Node_Str");
  lblBoxB1.setHorizontalAlignment(SwingConstants.RIGHT);
  lblBoxB1.setBounds(123,163,170,14);
  panel_1.add(lblBoxB1);
  lblBoxB2=new JLabel("String_Node_Str");
  lblBoxB2.setHorizontalAlignment(SwingConstants.RIGHT);
  lblBoxB2.setBounds(125,189,168,14);
  panel_1.add(lblBoxB2);
  JSeparator separator_1=new JSeparator();
  separator_1.setBounds(12,230,351,2);
  panel_1.add(separator_1);
  JButton btnEditInP2=new JButton("String_Node_Str");
  btnEditInP2.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      int i=map.getZoom();
      Coordinate c=map.getPosition();
      openURL("String_Node_Str" + c.getLat() + "String_Node_Str"+ c.getLon()+ "String_Node_Str"+ i);
    }
  }
);
  btnEditInP2.setBounds(12,681,158,24);
  panel_1.add(btnEditInP2);
  JButton btnEditInJosm=new JButton("String_Node_Str");
  btnEditInJosm.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
    }
  }
);
  btnEditInJosm.setBounds(176,681,129,24);
  panel_1.add(btnEditInJosm);
  panel.add(tabbedPane);
  JPanel panel_2=new JPanel();
  tabbedPane.addTab("String_Node_Str",null,panel_2,null);
  panel_2.setLayout(null);
  JButton btnShowSite=new JButton("String_Node_Str");
  btnShowSite.setBounds(154,5,61,24);
  panel_2.add(btnShowSite);
  list=new JList(model);
  list.setBounds(12,41,351,664);
  panel_2.add(list);
  JPanel panel_3=new JPanel();
  tabbedPane.addTab("String_Node_Str",null,panel_3,null);
  panel_3.setLayout(null);
  JLabel lblNode=new JLabel("String_Node_Str");
  lblNode.setBounds(12,12,70,14);
  panel_3.add(lblNode);
  JLabel lblChangeset=new JLabel("String_Node_Str");
  lblChangeset.setBounds(12,38,90,14);
  panel_3.add(lblChangeset);
  JLabel lblUser=new JLabel("String_Node_Str");
  lblUser.setBounds(12,64,70,14);
  panel_3.add(lblUser);
  btChangeset=new JButton("String_Node_Str");
  btChangeset.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      if (!btChangeset.getText().equals("String_Node_Str"))       OSMZmiany.openURL("String_Node_Str" + btChangeset.getText());
    }
  }
);
  btChangeset.setForeground(Color.BLUE);
  btChangeset.setBounds(109,38,120,14);
  panel_3.add(btChangeset);
  btNode=new JButton("String_Node_Str");
  btNode.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      if (!btNode.getText().equals("String_Node_Str"))       OSMZmiany.openURL("String_Node_Str" + btNode.getText());
    }
  }
);
  btNode.setForeground(Color.BLUE);
  btNode.setBounds(109,12,120,14);
  panel_3.add(btNode);
  btUser=new JButton("String_Node_Str");
  btUser.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      if (!btUser.getText().equals("String_Node_Str"))       OSMZmiany.openURL("String_Node_Str" + btUser.getText());
    }
  }
);
  btUser.setForeground(Color.BLUE);
  btUser.setBounds(109,64,120,14);
  panel_3.add(btUser);
  JButton btSelectChangeset=new JButton("String_Node_Str");
  btSelectChangeset.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Node n=map.drawStyle.getSelectedNode();
      if (n != null) {
        map.drawStyle.setSelection(dc.changesets.get(dc.changesetsIndex.get(n.changesetId)));
        map.refrashOverlay();
      }
    }
  }
);
  btSelectChangeset.setBounds(13,116,216,24);
  panel_3.add(btSelectChangeset);
  JButton btnAddUser=new JButton("String_Node_Str");
  btnAddUser.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      if (map.drawStyle.getSelectedNode() != null) {
        conf.getSelectedProfile().addUser(dc.users.get(dc.changesets.get(dc.changesetsIndex.get(map.drawStyle.getSelectedNode().changesetId)).userId));
      }
 else       if (map.drawStyle.getSelectedChangeset() != null) {
        conf.getSelectedProfile().addUser(dc.users.get(dc.changesets.get(dc.changesetsIndex.get(map.drawStyle.getSelectedChangeset().id)).userId));
      }
      reloadUsersList();
    }
  }
);
  btnAddUser.setBounds(109,90,120,14);
  panel_3.add(btnAddUser);
  JPanel panel_4=new JPanel();
  tabbedPane.addTab("String_Node_Str",null,panel_4,null);
  panel_4.setLayout(null);
  usersListType=new JComboBox();
  usersListType.addItemListener(new ItemListener(){
    public void itemStateChanged(    ItemEvent arg0){
      boolean z=false;
      if (usersListType.getSelectedIndex() == 1)       z=true;
      conf.getSelectedProfile().setListType(z);
      reloadUsersList();
      map.refrashOverlay();
    }
  }
);
  usersListType.setModel(new DefaultComboBoxModel(new String[]{"String_Node_Str","String_Node_Str"}));
  usersListType.setBounds(100,12,145,23);
  panel_4.add(usersListType);
  JLabel lblListType=new JLabel("String_Node_Str");
  lblListType.setBounds(12,16,70,14);
  panel_4.add(lblListType);
  JList listUsers=new JList(modelUsers);
  listUsers.setBounds(12,47,233,618);
  panel_4.add(listUsers);
  setVisible(true);
  addWindowListener(new WindowAdapter(){
    public void windowClosing(    WindowEvent e){
      System.exit(0);
    }
  }
);
  refetchTimer=new Timer();
  refetchTimer.scheduleAtFixedRate(new TimerTask(){
    public void run(){
      if (cbxLiveEdit.isSelected()) {
        initChangeStream();
        getData();
      }
    }
  }
,20000,30000);
  reloadProfiles();
  reloadUserType();
  reloadUsersList();
  map.refrashOverlay();
}