Program: 61970
Project: 61970
Buggy source:
public ActionPanel(){
  DefaultSyntaxKit.initKit();
  editor=new LineMarkedEditorPane();
  editor.setEditable(false);
  decompiledEditor=new LineMarkedEditorPane();
  decompiledEditor.setEditable(false);
  searchPanel=new JPanel(new FlowLayout());
  JButton prevSearchButton=new JButton(View.getIcon("String_Node_Str"));
  prevSearchButton.setMargin(new Insets(3,3,3,3));
  prevSearchButton.addActionListener(this);
  prevSearchButton.setActionCommand("String_Node_Str");
  JButton nextSearchButton=new JButton(View.getIcon("String_Node_Str"));
  nextSearchButton.setMargin(new Insets(3,3,3,3));
  nextSearchButton.addActionListener(this);
  nextSearchButton.setActionCommand("String_Node_Str");
  JButton cancelSearchButton=new JButton(View.getIcon("String_Node_Str"));
  cancelSearchButton.setMargin(new Insets(3,3,3,3));
  cancelSearchButton.addActionListener(this);
  cancelSearchButton.setActionCommand("String_Node_Str");
  searchPos=new JLabel("String_Node_Str");
  searchForLabel=new JLabel(translate("String_Node_Str").replace("String_Node_Str","String_Node_Str"));
  searchPanel.add(searchForLabel);
  searchPanel.add(prevSearchButton);
  searchPanel.add(new JLabel("String_Node_Str"));
  searchPanel.add(searchPos);
  searchPanel.add(nextSearchButton);
  searchPanel.add(cancelSearchButton);
  JButton graphButton=new JButton(View.getIcon("String_Node_Str"));
  graphButton.setActionCommand("String_Node_Str");
  graphButton.addActionListener(this);
  graphButton.setToolTipText(translate("String_Node_Str"));
  graphButton.setMargin(new Insets(3,3,3,3));
  hexButton=new JToggleButton(View.getIcon("String_Node_Str"));
  hexButton.setActionCommand("String_Node_Str");
  hexButton.addActionListener(this);
  hexButton.setToolTipText(translate("String_Node_Str"));
  hexButton.setMargin(new Insets(3,3,3,3));
  hexOnlyButton=new JToggleButton(View.getIcon("String_Node_Str"));
  hexOnlyButton.setActionCommand("String_Node_Str");
  hexOnlyButton.addActionListener(this);
  hexOnlyButton.setToolTipText(translate("String_Node_Str"));
  hexOnlyButton.setMargin(new Insets(3,3,3,3));
  hexOnlyButton.setVisible(false);
  topButtonsPan=new JPanel();
  topButtonsPan.setLayout(new BoxLayout(topButtonsPan,BoxLayout.X_AXIS));
  topButtonsPan.add(graphButton);
  topButtonsPan.add(hexButton);
  topButtonsPan.add(hexOnlyButton);
  JPanel panCode=new JPanel(new BorderLayout());
  panCode.add(new JScrollPane(editor),BorderLayout.CENTER);
  panCode.add(topButtonsPan,BorderLayout.NORTH);
  JPanel panB=new JPanel();
  panB.setLayout(new BorderLayout());
  asmLabel.setHorizontalAlignment(SwingConstants.CENTER);
  panB.add(asmLabel,BorderLayout.NORTH);
  panB.add(panCode,BorderLayout.CENTER);
  JPanel buttonsPan=new JPanel();
  buttonsPan.setLayout(new FlowLayout());
  buttonsPan.add(editButton);
  buttonsPan.add(saveButton);
  buttonsPan.add(cancelButton);
  editButton.setMargin(new Insets(3,3,3,10));
  saveButton.setMargin(new Insets(3,3,3,10));
  cancelButton.setMargin(new Insets(3,3,3,10));
  JPanel decButtonsPan=new JPanel(new FlowLayout());
  decButtonsPan.add(editDecompiledButton);
  decButtonsPan.add(experimentalLabel);
  decButtonsPan.add(saveDecompiledButton);
  decButtonsPan.add(cancelDecompiledButton);
  editDecompiledButton.setMargin(new Insets(3,3,3,10));
  saveDecompiledButton.setMargin(new Insets(3,3,3,10));
  cancelDecompiledButton.setMargin(new Insets(3,3,3,10));
  panB.add(buttonsPan,BorderLayout.SOUTH);
  saveButton.addActionListener(this);
  saveButton.setActionCommand("String_Node_Str");
  editButton.addActionListener(this);
  editButton.setActionCommand("String_Node_Str");
  cancelButton.addActionListener(this);
  cancelButton.setActionCommand("String_Node_Str");
  saveButton.setVisible(false);
  cancelButton.setVisible(false);
  saveDecompiledButton.addActionListener(this);
  saveDecompiledButton.setActionCommand("String_Node_Str");
  editDecompiledButton.addActionListener(this);
  editDecompiledButton.setActionCommand("String_Node_Str");
  cancelDecompiledButton.addActionListener(this);
  cancelDecompiledButton.setActionCommand("String_Node_Str");
  saveDecompiledButton.setVisible(false);
  cancelDecompiledButton.setVisible(false);
  JPanel decPanel=new JPanel(new BorderLayout());
  decPanel.add(new JScrollPane(decompiledEditor),BorderLayout.CENTER);
  decPanel.add(searchPanel,BorderLayout.NORTH);
  searchPanel.setVisible(false);
  JPanel panA=new JPanel();
  panA.setLayout(new BorderLayout());
  panA.add(decPanel,BorderLayout.CENTER);
  panA.add(decLabel,BorderLayout.NORTH);
  panA.add(decButtonsPan,BorderLayout.SOUTH);
  decLabel.setHorizontalAlignment(SwingConstants.CENTER);
  setLayout(new BorderLayout());
  add(splitPane=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panA,panB),BorderLayout.CENTER);
  splitPane.setResizeWeight(0.5);
  splitPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY,new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent pce){
      Configuration.setConfig("String_Node_Str",pce.getNewValue());
    }
  }
);
  editor.setContentType("String_Node_Str");
  editor.setFont(new Font("String_Node_Str",Font.PLAIN,editor.getFont().getSize()));
  decompiledEditor.setContentType("String_Node_Str");
  decompiledEditor.setFont(new Font("String_Node_Str",Font.PLAIN,decompiledEditor.getFont().getSize()));
  editor.addCaretListener(new CaretListener(){
    @Override public void caretUpdate(    CaretEvent e){
      if (ignoreCarret) {
        return;
      }
      if (editMode || editDecompiledMode) {
        return;
      }
      editor.getCaret().setVisible(true);
      int pos=editor.getCaretPosition();
      Highlighting lastH=null;
      for (      Highlighting h : disassembledHilights) {
        if (pos < h.startPos) {
          break;
        }
        lastH=h;
      }
      String ofs=lastH == null ? "String_Node_Str" : lastH.getPropertyString("String_Node_Str");
      Highlighting h2=Highlighting.search(decompiledHilights,"String_Node_Str",ofs);
      if (h2 != null) {
        ignoreCarret=true;
        decompiledEditor.setCaretPosition(h2.startPos);
        decompiledEditor.getCaret().setVisible(true);
        ignoreCarret=false;
      }
    }
  }
);
  decompiledEditor.addCaretListener(new CaretListener(){
    @Override public void caretUpdate(    CaretEvent e){
      if (ignoreCarret) {
        return;
      }
      if (editMode || editDecompiledMode) {
        return;
      }
      decompiledEditor.getCaret().setVisible(true);
      int pos=decompiledEditor.getCaretPosition();
      System.out.println("String_Node_Str" + pos);
      Highlighting h=Highlighting.search(decompiledHilights,pos);
      if (h != null) {
        Highlighting h2=Highlighting.search(disassembledHilights,"String_Node_Str",h.getPropertyString("String_Node_Str"));
        if (h2 != null) {
          ignoreCarret=true;
          if (h2.startPos > 0 && h2.startPos < editor.getText().length()) {
            editor.setCaretPosition(h2.startPos);
          }
          editor.getCaret().setVisible(true);
          ignoreCarret=false;
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public ActionPanel(){
  DefaultSyntaxKit.initKit();
  editor=new LineMarkedEditorPane();
  editor.setEditable(false);
  decompiledEditor=new LineMarkedEditorPane();
  decompiledEditor.setEditable(false);
  searchPanel=new JPanel(new FlowLayout());
  JButton prevSearchButton=new JButton(View.getIcon("String_Node_Str"));
  prevSearchButton.setMargin(new Insets(3,3,3,3));
  prevSearchButton.addActionListener(this);
  prevSearchButton.setActionCommand("String_Node_Str");
  JButton nextSearchButton=new JButton(View.getIcon("String_Node_Str"));
  nextSearchButton.setMargin(new Insets(3,3,3,3));
  nextSearchButton.addActionListener(this);
  nextSearchButton.setActionCommand("String_Node_Str");
  JButton cancelSearchButton=new JButton(View.getIcon("String_Node_Str"));
  cancelSearchButton.setMargin(new Insets(3,3,3,3));
  cancelSearchButton.addActionListener(this);
  cancelSearchButton.setActionCommand("String_Node_Str");
  searchPos=new JLabel("String_Node_Str");
  searchForLabel=new JLabel(translate("String_Node_Str").replace("String_Node_Str","String_Node_Str"));
  searchPanel.add(searchForLabel);
  searchPanel.add(prevSearchButton);
  searchPanel.add(new JLabel("String_Node_Str"));
  searchPanel.add(searchPos);
  searchPanel.add(nextSearchButton);
  searchPanel.add(cancelSearchButton);
  JButton graphButton=new JButton(View.getIcon("String_Node_Str"));
  graphButton.setActionCommand("String_Node_Str");
  graphButton.addActionListener(this);
  graphButton.setToolTipText(translate("String_Node_Str"));
  graphButton.setMargin(new Insets(3,3,3,3));
  hexButton=new JToggleButton(View.getIcon("String_Node_Str"));
  hexButton.setActionCommand("String_Node_Str");
  hexButton.addActionListener(this);
  hexButton.setToolTipText(translate("String_Node_Str"));
  hexButton.setMargin(new Insets(3,3,3,3));
  hexOnlyButton=new JToggleButton(View.getIcon("String_Node_Str"));
  hexOnlyButton.setActionCommand("String_Node_Str");
  hexOnlyButton.addActionListener(this);
  hexOnlyButton.setToolTipText(translate("String_Node_Str"));
  hexOnlyButton.setMargin(new Insets(3,3,3,3));
  hexOnlyButton.setVisible(false);
  topButtonsPan=new JPanel();
  topButtonsPan.setLayout(new BoxLayout(topButtonsPan,BoxLayout.X_AXIS));
  topButtonsPan.add(graphButton);
  topButtonsPan.add(hexButton);
  topButtonsPan.add(hexOnlyButton);
  JPanel panCode=new JPanel(new BorderLayout());
  panCode.add(new JScrollPane(editor),BorderLayout.CENTER);
  panCode.add(topButtonsPan,BorderLayout.NORTH);
  JPanel panB=new JPanel();
  panB.setLayout(new BorderLayout());
  asmLabel.setHorizontalAlignment(SwingConstants.CENTER);
  panB.add(asmLabel,BorderLayout.NORTH);
  panB.add(panCode,BorderLayout.CENTER);
  JPanel buttonsPan=new JPanel();
  buttonsPan.setLayout(new FlowLayout());
  buttonsPan.add(editButton);
  buttonsPan.add(saveButton);
  buttonsPan.add(cancelButton);
  editButton.setMargin(new Insets(3,3,3,10));
  saveButton.setMargin(new Insets(3,3,3,10));
  cancelButton.setMargin(new Insets(3,3,3,10));
  JPanel decButtonsPan=new JPanel(new FlowLayout());
  decButtonsPan.add(editDecompiledButton);
  decButtonsPan.add(experimentalLabel);
  decButtonsPan.add(saveDecompiledButton);
  decButtonsPan.add(cancelDecompiledButton);
  editDecompiledButton.setMargin(new Insets(3,3,3,10));
  saveDecompiledButton.setMargin(new Insets(3,3,3,10));
  cancelDecompiledButton.setMargin(new Insets(3,3,3,10));
  panB.add(buttonsPan,BorderLayout.SOUTH);
  saveButton.addActionListener(this);
  saveButton.setActionCommand("String_Node_Str");
  editButton.addActionListener(this);
  editButton.setActionCommand("String_Node_Str");
  cancelButton.addActionListener(this);
  cancelButton.setActionCommand("String_Node_Str");
  saveButton.setVisible(false);
  cancelButton.setVisible(false);
  saveDecompiledButton.addActionListener(this);
  saveDecompiledButton.setActionCommand("String_Node_Str");
  editDecompiledButton.addActionListener(this);
  editDecompiledButton.setActionCommand("String_Node_Str");
  cancelDecompiledButton.addActionListener(this);
  cancelDecompiledButton.setActionCommand("String_Node_Str");
  saveDecompiledButton.setVisible(false);
  cancelDecompiledButton.setVisible(false);
  JPanel decPanel=new JPanel(new BorderLayout());
  decPanel.add(new JScrollPane(decompiledEditor),BorderLayout.CENTER);
  decPanel.add(searchPanel,BorderLayout.NORTH);
  searchPanel.setVisible(false);
  JPanel panA=new JPanel();
  panA.setLayout(new BorderLayout());
  panA.add(decPanel,BorderLayout.CENTER);
  panA.add(decLabel,BorderLayout.NORTH);
  panA.add(decButtonsPan,BorderLayout.SOUTH);
  decLabel.setHorizontalAlignment(SwingConstants.CENTER);
  setLayout(new BorderLayout());
  add(splitPane=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panA,panB),BorderLayout.CENTER);
  splitPane.setResizeWeight(0.5);
  splitPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY,new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent pce){
      Configuration.setConfig("String_Node_Str",pce.getNewValue());
    }
  }
);
  editor.setContentType("String_Node_Str");
  editor.setFont(new Font("String_Node_Str",Font.PLAIN,editor.getFont().getSize()));
  decompiledEditor.setContentType("String_Node_Str");
  decompiledEditor.setFont(new Font("String_Node_Str",Font.PLAIN,decompiledEditor.getFont().getSize()));
  editor.addCaretListener(new CaretListener(){
    @Override public void caretUpdate(    CaretEvent e){
      if (ignoreCarret) {
        return;
      }
      if (editMode || editDecompiledMode) {
        return;
      }
      editor.getCaret().setVisible(true);
      int pos=editor.getCaretPosition();
      Highlighting lastH=null;
      for (      Highlighting h : disassembledHilights) {
        if (pos < h.startPos) {
          break;
        }
        lastH=h;
      }
      String ofs=lastH == null ? "String_Node_Str" : lastH.getPropertyString("String_Node_Str");
      Highlighting h2=Highlighting.search(decompiledHilights,"String_Node_Str",ofs);
      if (h2 != null) {
        ignoreCarret=true;
        decompiledEditor.setCaretPosition(h2.startPos);
        decompiledEditor.getCaret().setVisible(true);
        ignoreCarret=false;
      }
    }
  }
);
  decompiledEditor.addCaretListener(new CaretListener(){
    @Override public void caretUpdate(    CaretEvent e){
      if (ignoreCarret) {
        return;
      }
      if (editMode || editDecompiledMode) {
        return;
      }
      decompiledEditor.getCaret().setVisible(true);
      int pos=decompiledEditor.getCaretPosition();
      Highlighting h=Highlighting.search(decompiledHilights,pos);
      if (h != null) {
        Highlighting h2=Highlighting.search(disassembledHilights,"String_Node_Str",h.getPropertyString("String_Node_Str"));
        if (h2 != null) {
          ignoreCarret=true;
          if (h2.startPos > 0 && h2.startPos < editor.getText().length()) {
            editor.setCaretPosition(h2.startPos);
          }
          editor.getCaret().setVisible(true);
          ignoreCarret=false;
        }
      }
    }
  }
);
}