nus-yam/ex-repair huggingface dataset:
Program: 46780
Project: 46780
Buggy source:
protected void setDefaultValue(){
  if (useLastInput) {
    String lastUserInput=holder.getExternalSetValue();
    if (lastUserInput != null && !"String_Node_Str".equals(lastUserInput))     historyManager.addHistoryEntry(historyManagerKeyForThisNode + "String_Node_Str" + TemplateNode.LAST_USED_PARAMETER,lastUserInput,new Date(),1);
  }
  String defaultValue=getDefaultValue();
  if (defaultValue != null) {
    holder.setComponentField(defaultValue);
  }
 else {
    holder.setComponentField(null);
  }
}

Fixed version (ground truth):
protected void setDefaultValue(){
  if (useLastInput) {
    String lastUserInput=holder.getExternalSetValue();
    if (lastUserInput != null && !"String_Node_Str".equals(lastUserInput))     historyManager.addHistoryEntry(historyManagerKeyForThisNode + "String_Node_Str" + TemplateNode.LAST_USED_PARAMETER,lastUserInput,new Date(),1);
  }
  String defaultValue=getDefaultValue();
  if (defaultValue != null) {
    holder.setComponentField(defaultValue);
  }
 else {
    holder.setComponentField("String_Node_Str");
  }
}
Program: 46781
Project: 46781
Buggy source:
public void reset(){
  String value=getExternalSetValue();
  if (useHistory)   historyManager.addHistoryEntry(this.templateNode.getName(),value,new Date());
  if (COMBOBOX_PANEL.equals(renderMode)) {
    fillComboBox();
  }
  setDefaultValue();
}

Fixed version (ground truth):
public void reset(){
  String value=getExternalSetValue();
  if (useHistory)   historyManager.addHistoryEntry(historyManagerKeyForThisNode,value,new Date());
  if (COMBOBOX_PANEL.equals(renderMode)) {
    fillComboBox();
  }
  setDefaultValue();
}
Program: 46782
Project: 46782
Buggy source:
private String[] calculateStagingFileSystemForSubmissionLocation(String subLoc){
  int queSepIndex=subLoc.indexOf("String_Node_Str");
  if (queSepIndex < 1) {
    throw new RuntimeException("String_Node_Str");
  }
  String queueName=subLoc.substring(0,queSepIndex);
  String contactString="String_Node_Str";
  if (subLoc.indexOf("String_Node_Str") > 0) {
    contactString=subLoc.substring(subLoc.indexOf("String_Node_Str") + 1,subLoc.indexOf("String_Node_Str"));
  }
 else {
    contactString=subLoc.substring(subLoc.indexOf("String_Node_Str") + 1);
  }
  String siteName=client.getSiteForHost(contactString);
  String[] result=client.getGridFTPServersForQueueAtSite(siteName,queueName);
  return result;
}

Fixed version (ground truth):
private String[] calculateStagingFileSystemForSubmissionLocation(String subLoc){
  int queSepIndex=subLoc.indexOf("String_Node_Str");
  if (queSepIndex < 1) {
    throw new RuntimeException("String_Node_Str" + subLoc);
  }
  String queueName=subLoc.substring(0,queSepIndex);
  String contactString="String_Node_Str";
  if (subLoc.indexOf("String_Node_Str") > 0) {
    contactString=subLoc.substring(subLoc.indexOf("String_Node_Str") + 1,subLoc.indexOf("String_Node_Str"));
  }
 else {
    contactString=subLoc.substring(subLoc.indexOf("String_Node_Str") + 1);
  }
  String siteName=client.getSiteForHost(contactString);
  String[] result=client.getGridFTPServersForQueueAtSite(siteName,queueName);
  return result;
}
Program: 46784
Project: 46784
Buggy source:
/** 
 * @return
 */
protected JButton getAddButtonLocal(){
  if (addButtonLocal == null) {
    addButtonLocal=new JButton();
    addButtonLocal.setText("String_Node_Str");
    addButtonLocal.setToolTipText("String_Node_Str");
    addButtonLocal.setEnabled(false);
  }
  return addButtonLocal;
}

Fixed version (ground truth):
/** 
 * @return
 */
protected JButton getAddButtonLocal(){
  if (addButtonLocal == null) {
    addButtonLocal=new JButton();
    addButtonLocal.addActionListener(new ActionListener(){
      public void actionPerformed(      final ActionEvent e){
        int returnVal=fc.showOpenDialog(SubmissionPanel.this);
        File file=null;
        if (returnVal == JFileChooser.APPROVE_OPTION) {
          file=fc.getSelectedFile();
          myLogger.debug("String_Node_Str" + file.getName() + "String_Node_Str");
        }
 else {
          myLogger.debug("String_Node_Str");
        }
        if (file.exists()) {
          try {
            File newFile=new File(LocalTemplateManagement.TEMPLATE_DIRECTORY,file.getName());
            if (newFile.exists()) {
              int value=JOptionPane.showConfirmDialog(SubmissionPanel.this,"String_Node_Str" + newFile.getName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION);
              if (value == JOptionPane.NO_OPTION) {
                return;
              }
            }
            String localTemplateName=templateManager.addLocalTemplate(file,true);
            localListModel.addElement(localTemplateName);
            calculateLocalTemplateVisibility();
            SubmissionPanel.this.templateManager.addLocalTemplate(file,true);
          }
 catch (          IOException e1) {
            JOptionPane.showMessageDialog(SubmissionPanel.this,"String_Node_Str" + file.toString() + "String_Node_Str"+ e1.getLocalizedMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
          }
        }
 else {
          JOptionPane.showMessageDialog(SubmissionPanel.this,"String_Node_Str" + file.toString() + "String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
        }
      }
    }
);
    addButtonLocal.setText("String_Node_Str");
    addButtonLocal.setToolTipText("String_Node_Str");
  }
  return addButtonLocal;
}
Program: 46787
Project: 46787
Buggy source:
/** 
 * Calculates the name of the mountpoint for a given server and fqan. It does that so the mountpoint looks something like: "ng2.vpac.org (StartUp)". Not sure whether that is the way to go, but it's the best namingscheme I came up with. Asked in the developers mailing list but didn't get any answers that made sense...
 * @param server the hostname
 * @param fqan the VO
 * @return the name of the mountpoint
 */
private String calculateMountPointName(String server,String fqan){
  URI uri=null;
  String hostname=null;
  try {
    uri=new URI(server);
    hostname=uri.getHost();
  }
 catch (  MalformedURIException e) {
    hostname=server;
  }
  String name=hostname + "String_Node_Str" + (fqan.substring(fqan.lastIndexOf("String_Node_Str") + 1) + "String_Node_Str");
  return name;
}

Fixed version (ground truth):
/** 
 * Calculates the name of the mountpoint for a given server and fqan. It does that so the mountpoint looks something like: "ng2.vpac.org (StartUp)". Not sure whether that is the way to go, but it's the best namingscheme I came up with. Asked in the developers mailing list but didn't get any answers that made sense...
 * @param server the hostname
 * @param fqan the VO
 * @return the name of the mountpoint
 */
private String calculateMountPointName(String server,String fqan){
  URI uri=null;
  String hostname=null;
  try {
    uri=new URI(server);
    hostname=uri.getHost();
  }
 catch (  Exception e) {
    hostname=server;
  }
  String name=hostname + "String_Node_Str" + (fqan.substring(fqan.lastIndexOf("String_Node_Str") + 1) + "String_Node_Str");
  return name;
}
Program: 46788
Project: 46788
Buggy source:
public static String getOutputDirectory(Document inputXmlFile){
  String expression="String_Node_Str";
  NodeList resultNodes=null;
  try {
    resultNodes=(NodeList)xpath.evaluate(expression,inputXmlFile,XPathConstants.NODESET);
  }
 catch (  XPathExpressionException e) {
    myLogger.warn("String_Node_Str");
    e.printStackTrace();
    return null;
  }
  String output_path=resultNodes.item(0).getTextContent();
  if (output_path.endsWith("String_Node_Str")) {
    return output_path.substring(0,output_path.length() - 1);
  }
 else {
    return output_path;
  }
}

Fixed version (ground truth):
public static String getOutputDirectory(Document inputXmlFile){
  String expression="String_Node_Str";
  NodeList resultNodes=null;
  try {
    resultNodes=(NodeList)xpath.evaluate(expression,inputXmlFile,XPathConstants.NODESET);
  }
 catch (  XPathExpressionException e) {
    myLogger.warn("String_Node_Str");
    e.printStackTrace();
    return null;
  }
  String output_path=resultNodes.item(0).getTextContent();
  output_path=output_path.trim();
  if (output_path.endsWith("String_Node_Str")) {
    return output_path.substring(0,output_path.length() - 1);
  }
 else {
    return output_path;
  }
}
Program: 46789
Project: 46789
Buggy source:
/** 
 * short test for the graph.java class.
 * @param argc - ignore.
 */
public static void main(String[] argc){
  Graph test=new Graph();
  test.readFile("String_Node_Str");
  test.printMe();
  test.readFile("String_Node_Str");
  test.printMe();
  test.readFile("String_Node_Str");
  test.printMe();
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * short test for the graph.java class.
 * @param argc - ignore.
 */
public static void main(String[] argc){
  Graph test=new Graph();
  Graph test2=new Graph();
  Graph test3=new Graph();
  test.readFile("String_Node_Str");
  test.printMe();
  test2.readFile("String_Node_Str");
  test2.printMe();
  test3.readFile("String_Node_Str");
  test3.printMe();
  System.out.println("String_Node_Str");
}
Program: 46790
Project: 46790
Buggy source:
/** 
 * Outputs the content of this graph to console.
 */
public void printMe(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println(Nodes.toString());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println(Edge.toString());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + StartPt.toString());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + endPt.toString());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  for (int i=0; i < begin.size(); i++) {
    System.out.println("String_Node_Str" + begin.get(i).getX() + "String_Node_Str"+ begin.get(i).getY()+ "String_Node_Str");
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  for (int i=0; i < end.size(); i++) {
    System.out.println("String_Node_Str" + end.get(i).getX() + "String_Node_Str"+ end.get(i).getY()+ "String_Node_Str");
  }
  System.out.println();
  System.out.println("String_Node_Str" + numVisits);
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  for (int i=0; i < begin.size(); i++) {
    System.out.println("String_Node_Str" + begin.get(i).getY() + "String_Node_Str"+ end.get(i).getY()+ "String_Node_Str");
  }
  System.out.println();
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Outputs the content of this graph to console.
 */
public void printMe(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println(Nodes.toString());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println(Edge.toString());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + StartPt.toString());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + endPt.toString());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + begin.size());
  for (int i=0; i < begin.size(); i++) {
    System.out.println("String_Node_Str" + begin.get(i).getX() + "String_Node_Str"+ begin.get(i).getY()+ "String_Node_Str");
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  for (int i=0; i < end.size(); i++) {
    System.out.println("String_Node_Str" + end.get(i).getX() + "String_Node_Str"+ end.get(i).getY()+ "String_Node_Str");
  }
  System.out.println();
  System.out.println("String_Node_Str" + numVisits);
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + begin.size());
  for (int i=0; i < begin.size(); i++) {
    System.out.println("String_Node_Str" + begin.get(i).getY() + "String_Node_Str"+ end.get(i).getY()+ "String_Node_Str");
  }
  System.out.println();
  System.out.println("String_Node_Str");
}
Program: 46792
Project: 46792
Buggy source:
@SuppressWarnings("String_Node_Str") public static void main(String[] args){
  try {
    final PathIF model=new PathIF();
    final Solver solver=new Solver();
    final Bounds b=model.bounds(10);
    final Formula f=model.empty();
    System.out.println(f);
    solver.options().setSolver(SATFactory.DefaultSAT4J);
    System.out.println(System.currentTimeMillis());
    Iterator iterSols=solver.solveAll(f,b);
    System.out.println(System.currentTimeMillis());
    while (iterSols.hasNext()) {
      final Solution s=(Solution)iterSols.next();
      if (s.outcome() == Solution.Outcome.SATISFIABLE || s.outcome() == Solution.Outcome.TRIVIALLY_SATISFIABLE) {
        System.out.println(s);
      }
    }
  }
 catch (  NumberFormatException nfe) {
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void main(String[] args){
  try {
    final SchillerCoryIF model=new SchillerCoryIF();
    final Solver solver=new Solver();
    final Bounds b=model.getbounds(10);
    final Formula f=model.empty();
    System.out.println(f);
    solver.options().setSolver(SATFactory.DefaultSAT4J);
    System.out.println(System.currentTimeMillis());
    Iterator iterSols=solver.solveAll(f,b);
    System.out.println(System.currentTimeMillis());
    while (iterSols.hasNext()) {
      final Solution s=(Solution)iterSols.next();
      if (s.outcome() == Solution.Outcome.SATISFIABLE || s.outcome() == Solution.Outcome.TRIVIALLY_SATISFIABLE) {
        System.out.println(s);
      }
    }
  }
 catch (  NumberFormatException nfe) {
  }
}
Program: 46793
Project: 46793
Buggy source:
public final Formula facts(){
  return null;
}

Fixed version (ground truth):
public final Formula facts(){
  final Variable v=Variable.unary("String_Node_Str");
  final Variable w=Variable.unary("String_Node_Str");
  final Variable e=Variable.unary("String_Node_Str");
  final Variable d=Variable.unary("String_Node_Str");
  final Formula f0=v.join(next).eq(w);
  final Formula f1=v.join(ref).eq(e);
  final Formula f2=w.join(ref).eq(d);
  final Formula f3=d.join(begin).eq(e.join(end));
  final Formula f4=f0.and(f1).and(f2).implies(f3);
  final Formula f5=f4.forAll(v.oneOf(Visit).and(w.oneOf(Visit)).and(e.oneOf(Edge)).and(d.oneOf(Edge)));
  final Formula f6=v.in(w.join(next.reflexiveClosure()));
  final Formula f7=w.in(v.join(next.closure())).not();
  final Formula f8=f6.iff(f7).forAll(v.oneOf(Visit).and(w.oneOf(Visit)));
  final Formula f9=v.join(ref.join(begin)).eq(Start);
  final Formula f10=w.in(v.join(next.reflexiveClosure()));
  final Formula f11=f9.and(f10);
  final Formula f12=f11.forSome(v.oneOf(Visit)).forAll(w.oneOf(Visit));
  final Formula f13=v.join(ref.join(end)).eq(Finish);
  final Formula f14=v.in(w.join(next.reflexiveClosure()));
  final Formula f15=f13.and(f14);
  final Formula f16=f15.forSome(v.oneOf(Visit)).forAll(w.oneOf(Visit));
  return f5.and(f8).and(f12).and(f16);
}
Program: 46795
Project: 46795
Buggy source:
public void configureBasePairBoth(JLabel columnLabel){
  int width_offset=((SequenceViewGUI)_sequenceview).getSeqScroll().getWidth() + 4;
  int charwidth=((SequenceViewGUI)_sequenceview).get_TextArea().getFontMetrics(((SequenceViewGUI)_sequenceview).get_TextArea().getFont()).charWidth('A');
  _logicalCol=width_offset / charwidth;
  if (((SequenceViewGUI)_sequenceview).get_TextArea().getHeight() > ((SequenceViewGUI)_sequenceview).get_TextArea().getVisibleRect().getHeight()) {
    _logicalCol=_logicalCol - 4;
  }
 else {
    _logicalCol=_logicalCol - 2;
  }
  if (_locked) {
    _logicalCol=_logicalCol - 1;
  }
  Integer col=new Integer(_logicalCol);
  columnLabel.setText(col.toString());
  configureBasePairRow();
}

Fixed version (ground truth):
public void configureBasePairBoth(JLabel columnLabel){
  int width_offset=((SequenceViewGUI)_sequenceview).getSeqScroll().getWidth() + 4;
  int charwidth=((SequenceViewGUI)_sequenceview).get_TextArea().getFontMetrics(((SequenceViewGUI)_sequenceview).get_TextArea().getFont()).charWidth('A');
  _logicalCol=width_offset / charwidth;
  if (((SequenceViewGUI)_sequenceview).get_TextArea().getHeight() > ((SequenceViewGUI)_sequenceview).get_TextArea().getVisibleRect().getHeight()) {
    _logicalCol=_logicalCol - 4;
  }
 else {
    _logicalCol=_logicalCol - 2;
  }
  if (_locked) {
    _logicalCol=_logicalCol - 1;
  }
  Integer col=new Integer(_logicalCol);
  columnLabel.setText("String_Node_Str" + col.toString());
  configureBasePairRow();
}
Program: 46797
Project: 46797
Buggy source:
public void switchView(){
  if (_isTC) {
    Component[] components=_tcView.getComponents();
    _sequenceview=new SequenceViewGUI(this);
    _sequenceview.setContentPane((Container)components[1]);
    _sequenceview.setJMenuBar((JMenuBar)components[0]);
    _sequenceview.pack();
    _sequenceview.setTitle(_tcView.getDisplayName());
    _sequenceview.setVisible(true);
    _isTC=false;
    _tcView.close();
  }
 else {
    final JComponent guiContentPane=(JComponent)_sequenceview.getContentPane();
    final JMenuBar menu=_sequenceview.getJMenuBar();
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        _tcView=new TopComponent(){
          @Override public boolean canClose(){
            updateWindowMenus();
            return super.canClose();
          }
        }
;
        _tcView.setLayout(new BorderLayout());
        JScrollPane sp=new JScrollPane(guiContentPane);
        _tcView.add(menu,BorderLayout.NORTH);
        _tcView.add(sp,BorderLayout.CENTER);
        _tcView.setName(_sequenceview.getTitle());
        _tcView.open();
        _tcView.requestActive();
      }
    }
);
    _sequenceview.dispose();
    _isTC=true;
  }
}

Fixed version (ground truth):
public void switchView(){
  if (_isTC) {
    Component[] components=_tcView.getComponents();
    _sequenceview=new SequenceViewGUI(this);
    _sequenceview.setContentPane((Container)components[1]);
    _sequenceview.setJMenuBar((JMenuBar)components[0]);
    _sequenceview.pack();
    _sequenceview.setTitle(_tcView.getName());
    _sequenceview.setVisible(true);
    _isTC=false;
    _tcView.close();
  }
 else {
    final JComponent guiContentPane=(JComponent)_sequenceview.getContentPane();
    final JMenuBar menu=_sequenceview.getJMenuBar();
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        _tcView=new TopComponent(){
          @Override public boolean canClose(){
            updateWindowMenus();
            return super.canClose();
          }
        }
;
        _tcView.setLayout(new BorderLayout());
        JScrollPane sp=new JScrollPane(guiContentPane);
        _tcView.add(menu,BorderLayout.NORTH);
        _tcView.add(sp,BorderLayout.CENTER);
        _tcView.setName(_sequenceview.getTitle());
        _tcView.open();
        _tcView.requestActive();
      }
    }
);
    _sequenceview.dispose();
    _isTC=true;
  }
}
Program: 46799
Project: 46799
Buggy source:
private DatabaseConfig dbConfig(){
  final DatabaseConfig dbConfig=new DatabaseConfig();
  dbConfig.setTransactional(true);
  dbConfig.setAllowCreate(true);
  dbConfig.setSortedDuplicates(true);
  return dbConfig;
}

Fixed version (ground truth):
private DatabaseConfig dbConfig(){
  return new DatabaseConfig().setTransactional(true).setAllowCreate(true).setSortedDuplicates(false).setDeferredWrite(false).setCacheMode(CacheMode.DEFAULT);
}
Program: 46800
Project: 46800
Buggy source:
@PostConstruct public void initDefaultUsers(){
  TransactionTemplate transactionTemplate=new TransactionTemplate(transactionManager);
  transactionTemplate.execute(new TransactionCallback<Object>(){
    @Override public Object doInTransaction(    TransactionStatus status){
      final UserRole userRole=roleDao.save(new UserRole("String_Node_Str"));
      final UserRole adminRole=roleDao.save(new UserRole("String_Node_Str"));
      profileDao.save(new UserProfile("String_Node_Str",Arrays.asList(new UserAccount("String_Node_Str",UserAccount.Kind.NICKNAME)),new HashSet<UserRole>(Arrays.asList(roleDao.findByCode("String_Node_Str"),roleDao.findByCode("String_Node_Str")))));
      return null;
    }
  }
);
}

Fixed version (ground truth):
@PostConstruct public void initDefaultUsers(){
  userService.saveRoles("String_Node_Str","String_Node_Str");
  userService.createProfile("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  userService.createProfile("String_Node_Str","String_Node_Str","String_Node_Str");
}
Program: 46801
Project: 46801
Buggy source:
@RequestMapping("String_Node_Str") public String index(Model model){
  final UserProfile p=new UserProfile();
  model.addAttribute(p);
  log.info("String_Node_Str",p);
  return "String_Node_Str";
}

Fixed version (ground truth):
@RequestMapping("String_Node_Str") public String index(Model model){
  final UserProfile p=new UserProfile("String_Node_Str",Collections.<UserAccount>emptyList(),Collections.<UserRole>emptySet());
  model.addAttribute(p);
  log.info("String_Node_Str",p,helloService.getGreeting("String_Node_Str"));
  return "String_Node_Str";
}
Program: 46802
Project: 46802
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED) public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
  final UserProfile profile=profileDao.findByAccountAlias(username);
  if (profile == null) {
    throw new UsernameNotFoundException("String_Node_Str" + username + "String_Node_Str");
  }
  return new User(username,profile.getPassword(),Arrays.asList(new SimpleGrantedAuthority("String_Node_Str")));
}

Fixed version (ground truth):
@Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
  final UserProfile profile=userService.findProfileByAlias(username);
  if (profile == null) {
    throw new UsernameNotFoundException("String_Node_Str" + username + "String_Node_Str");
  }
  return new User(username,profile.getPassword(),Arrays.asList(new SimpleGrantedAuthority("String_Node_Str")));
}
Program: 46803
Project: 46803
Buggy source:
@Override public String getGreeting(String origin){
  return "String_Node_Str" + origin;
}

Fixed version (ground truth):
@Override @Transactional(readOnly=true) public String getGreeting(String origin){
  final List<UserAccount> accounts=accountDao.findAll();
  return "String_Node_Str" + origin + "String_Node_Str"+ accounts.size()+ "String_Node_Str";
}
Program: 46804
Project: 46804
Buggy source:
/** 
 * limit checking method can be overwritten for growth support
 * @param putIdx
 * @return
 */
protected int checkLimit(final int putIdx){
  if (size(putIdx,getIndex.get()) >= elements.length())   return SIZE_MAXED;
  return SIZE_OK;
}

Fixed version (ground truth):
/** 
 * limit checking method can be overwritten for growth support
 * @param putIdx
 * @return
 */
protected int checkLimit(final int putIdx,final int getIdx){
  if (size(putIdx,getIdx) >= elements.length())   return SIZE_MAXED;
  return SIZE_OK;
}
Program: 46805
Project: 46805
Buggy source:
/** 
 * inner emthod to select index and put object
 * @param elem
 * @return
 */
protected boolean addInner(final E elem){
  int putIdx, loop=0;
  for (; ; ) {
    putIdx=putIndex.get();
    final int checkLimit=checkLimit(putIdx);
    if (checkLimit == SIZE_MAXED)     return false;
 else     if (checkLimit == SIZE_OK && putIndex.compareAndSet(putIdx,putIdx + 1))     break;
    loop=ThreadUtils.yieldCAS(loop);
  }
  final int tarIdx=remainder(putIdx,elements.length());
  while (!elements.compareAndSet(tarIdx,null,elem))   ThreadUtils.yield();
  return true;
}

Fixed version (ground truth):
/** 
 * inner emthod to select index and put object
 * @param elem
 * @return
 */
protected boolean addInner(final E elem){
  int putIdx, getIdx, loop=0;
  for (; ; ) {
    putIdx=putIndex.get();
    final int checkLimit=checkLimit(putIdx,getIdx=getIndex.get());
    if (putIndex.compareAndSet(putIdx,putIdx) && getIndex.compareAndSet(getIdx,getIdx))     if (checkLimit == SIZE_MAXED)     return false;
 else     if (checkLimit == SIZE_OK && putIndex.compareAndSet(putIdx,putIdx + 1))     break;
    loop=ThreadUtils.yieldCAS(loop);
  }
  final int tarIdx=remainder(putIdx,elements.length());
  while (!elements.compareAndSet(tarIdx,null,elem))   ThreadUtils.yield();
  return true;
}
Program: 46806
Project: 46806
Buggy source:
@Override protected int checkLimit(final int putIdx){
  if (super.checkLimit(putIdx) == SIZE_MAXED)   if (elements.length() >= maxCount)   return SIZE_MAXED;
 else   try {
    gro.enter();
synchronized (this) {
      growthInner();
      return RESIZED;
    }
  }
  finally {
    gro.leave();
  }
  return SIZE_OK;
}

Fixed version (ground truth):
@Override protected int checkLimit(final int putIdx,final int getIdx){
  if (super.checkLimit(putIdx,getIdx) == SIZE_MAXED)   if (elements.length() >= maxCount)   return SIZE_MAXED;
 else   try {
    gro.enter();
synchronized (this) {
      growthInner();
      return RESIZED;
    }
  }
  finally {
    gro.leave();
  }
  return SIZE_OK;
}
Program: 46807
Project: 46807
Buggy source:
public R obtain(){
  @SuppressWarnings("String_Node_Str") final R res=(R)pool.take();
  return res != null ? res : newObject();
}

Fixed version (ground truth):
public R obtain(){
  @SuppressWarnings("String_Node_Str") R res=(R)pool.take();
  if (res == null)   res=newObject();
  if (res instanceof IAcquiereSupport)   if (!((IAcquiereSupport)res).getCount().compareAndSet(false,true))   throw new IllegalStateException("String_Node_Str" + this + "String_Node_Str"+ res+ "String_Node_Str");
  return res;
}
Program: 46808
Project: 46808
Buggy source:
public void free(final R entry){
  if (!pool.add(entry))   LOG.warn("String_Node_Str" + this + "String_Node_Str"+ entry+ "String_Node_Str");
}

Fixed version (ground truth):
public void free(final R entry){
  if (entry instanceof IAcquiereSupport)   if (!((IAcquiereSupport)entry).getCount().compareAndSet(true,false))   throw new IllegalStateException("String_Node_Str" + this + "String_Node_Str"+ entry+ "String_Node_Str");
  if (!pool.add(entry))   LOG.warn("String_Node_Str" + this + "String_Node_Str"+ entry+ "String_Node_Str"+ pool.size()+ "String_Node_Str");
}
Program: 46809
Project: 46809
Buggy source:
/** 
 * inner emthod to select index and put object
 * @param elem
 * @return
 */
@Override protected boolean addInner(final Integer elem){
  int putIdx, loop=0;
  for (; ; ) {
    putIdx=putIndex.get();
    final int checkLimit=checkLimit(putIdx);
    if (checkLimit == SIZE_MAXED)     return false;
 else     if (checkLimit == SIZE_OK && putIndex.compareAndSet(putIdx,putIdx + 1))     break;
    loop=ThreadUtils.yieldCAS(loop);
  }
  final int tarIdx=remainder(putIdx,elements.length());
  while (!elements.compareAndSet(tarIdx,null,tarIdx))   ThreadUtils.yield();
  return true;
}

Fixed version (ground truth):
/** 
 * inner emthod to select index and put object
 * @param elem
 * @return
 */
@Override protected boolean addInner(final Integer elem){
  int putIdx, getIdx, loop=0;
  for (; ; ) {
    putIdx=putIndex.get();
    final int checkLimit=checkLimit(putIdx,getIdx=getIndex.get());
    if (putIndex.compareAndSet(putIdx,putIdx) && getIndex.compareAndSet(getIdx,getIdx))     if (checkLimit == SIZE_MAXED)     return false;
 else     if (checkLimit == SIZE_OK && putIndex.compareAndSet(putIdx,putIdx + 1))     break;
    loop=ThreadUtils.yieldCAS(loop);
  }
  final int tarIdx=remainder(putIdx,elements.length());
  while (!elements.compareAndSet(tarIdx,null,tarIdx))   ThreadUtils.yield();
  return true;
}
Program: 46810
Project: 46810
Buggy source:
public Executor(final InterThreads<?> inter){
  inter.start(threadChecker=new ThreadManager(200));
}

Fixed version (ground truth):
public Executor(final InterThreads<?> inter){
  inter.start(threadChecker=new ThreadManager(40));
}
Program: 46811
Project: 46811
Buggy source:
@Override protected void innerRun(){
  if (threadCount == 0 || threadCount < maxAmount && getWorkCount() > threadCount * 0.8f) {
    threadCount++;
    final Thread th=createThread(new Worker());
    th.setDaemon(false);
    th.start();
    if (LOG.isDebugEnabled())     LOG.debug("String_Node_Str" + th + "String_Node_Str");
  }
 else   if (threadCount > coreAmount && getIdleCount() > threadCount * 0.8f) {
    threadCount--;
    exitThreads.incrementAndGet();
  }
}

Fixed version (ground truth):
@Override protected void innerRun(){
  final double frame=0.8d;
  workSum*=frame;
  count*=frame;
  workSum+=getWorkCount() / Math.max(threadCount,1d);
  count++;
  final double workAvr=workSum / count;
  if (LOG.isDebugEnabled())   LOG.debug("String_Node_Str" + workAvr + "String_Node_Str");
  if (threadCount == 0 || threadCount < maxAmount && workAvr > 0.8f) {
    threadCount++;
    final Thread th=createThread(new Worker());
    th.setDaemon(false);
    th.start();
    if (LOG.isDebugEnabled())     LOG.debug("String_Node_Str" + th + "String_Node_Str");
  }
 else   if (threadCount > coreAmount && workAvr < 0.2f) {
    threadCount--;
    exitThreads.incrementAndGet();
  }
}
Program: 46812
Project: 46812
Buggy source:
@Override public final void run(){
  if (!isStoped()) {
    innerRun();
    if (!isStoped() && intervall > 0) {
      next+=intervall;
      tq.add(this);
    }
  }
}

Fixed version (ground truth):
@Override public final void run(){
}
Program: 46813
Project: 46813
Buggy source:
public static InstanceField getField(final String fqn,final Object obj){
  final String[] fields=fqn.split("String_Node_Str");
  Class<?> curClass=obj instanceof Class ? (Class<?>)obj : obj.getClass();
  Object curObject=obj instanceof Class ? null : obj;
  Field curField=null;
  Object lastObject;
  for (  final String field : fields)   try {
    for (int i=0; i < 10; i++)     try {
      curField=curClass.getDeclaredField(field);
      break;
    }
 catch (    final NoSuchFieldException ex) {
      curClass=curClass.getSuperclass();
      if (curClass == null)       throw ex;
    }
    curField.setAccessible(true);
    lastObject=curObject;
    curObject=curField.get(lastObject);
    if (curObject != null)     curClass=curObject.getClass();
  }
 catch (  final NoSuchFieldException e) {
    throw new IllegalArgumentException("String_Node_Str" + field + "String_Node_Str"+ fqn+ "String_Node_Str");
  }
catch (  final IllegalArgumentException e) {
    throw e;
  }
catch (  final IllegalAccessException e) {
    throw new IllegalArgumentException("String_Node_Str" + field + "String_Node_Str"+ fqn+ "String_Node_Str",e);
  }
  return new InstanceField(curField,curObject);
}

Fixed version (ground truth):
public static InstanceField getField(final String fqn,final Object obj){
  final String[] fields=fqn.split("String_Node_Str");
  Class<?> curClass=obj instanceof Class ? (Class<?>)obj : obj.getClass();
  Object curObject=obj instanceof Class ? null : obj;
  Field curField=null;
  Object lastObject=curObject;
  for (  final String field : fields)   try {
    for (int i=0; i < 10; i++)     try {
      curField=curClass.getDeclaredField(field);
      break;
    }
 catch (    final NoSuchFieldException ex) {
      curClass=curClass.getSuperclass();
      if (curClass == null)       throw ex;
    }
    curField.setAccessible(true);
    lastObject=curObject;
    curObject=curField.get(lastObject);
    if (curObject != null)     curClass=curObject.getClass();
  }
 catch (  final NoSuchFieldException e) {
    throw new IllegalArgumentException("String_Node_Str" + field + "String_Node_Str"+ fqn+ "String_Node_Str");
  }
catch (  final IllegalArgumentException e) {
    throw e;
  }
catch (  final IllegalAccessException e) {
    throw new IllegalArgumentException("String_Node_Str" + field + "String_Node_Str"+ fqn+ "String_Node_Str",e);
  }
  return new InstanceField(curField,lastObject);
}
Program: 46814
Project: 46814
Buggy source:
/** 
 * adds an element as long as the maximum size is not reached
 * @param elem
 * @return true on success
 */
public boolean add(final E elem){
  final boolean res=aq.add(elem);
  if (res)   added.call();
  return res;
}

Fixed version (ground truth):
/** 
 * adds an element as long as the maximum size is not reached
 * @param elem
 * @return true on success
 */
public boolean add(final E elem){
  final boolean res=aq.add(elem);
  if (res)   added.call();
 else   LOG.warn("String_Node_Str" + elem + "String_Node_Str");
  return res;
}
Program: 46815
Project: 46815
Buggy source:
/** 
 * increments state and wakes up all waiting threads
 * @return
 */
@Override public boolean call(){
  modCounter.incrementAndGet();
  return wakeAll(tail.get());
}

Fixed version (ground truth):
/** 
 * increments state and wakes up all waiting threads
 * @return
 */
@Override public void call(){
  modCounter.incrementAndGet();
  wakeAll(tail.get());
}
Program: 46816
Project: 46816
Buggy source:
/** 
 * increments state and wakes next waiting thread
 * @return
 */
@Override public boolean call(){
  modCounter.incrementAndGet();
  return wakeNext(tail.get());
}

Fixed version (ground truth):
/** 
 * increments state and wakes next waiting thread
 * @return
 */
@Override public void call(){
  modCounter.incrementAndGet();
  wakeNext(tail.get());
}
Program: 46817
Project: 46817
Buggy source:
/** 
 * wakes up all following waiting threads
 * @param nd
 * @return
 */
protected boolean wakeAll(Slot nd){
  boolean res=false;
  if (nd != null)   for (; nd != null; nd=nd.getNext())   res|=nd.wake();
  return res;
}

Fixed version (ground truth):
/** 
 * wakes up all following waiting threads
 * @param nd
 * @return
 */
protected void wakeAll(Slot nd){
  if (nd != null)   for (; nd != null; nd=nd.getNext())   nd.wake();
}
Program: 46818
Project: 46818
Buggy source:
/** 
 * set waiting state to true
 */
public void setWaiting(){
  waiting.set(true);
}

Fixed version (ground truth):
/** 
 * set waiting state to true
 * @param state
 */
public void setWaiting(final int state){
  waiting.set(state);
}
Program: 46819
Project: 46819
Buggy source:
/** 
 * inner stack context wait method
 * @param state
 * @param nanoTime
 */
private void awaitInner(final int state,final long nanoTime){
  final Thread th=Thread.currentThread();
  final long startTime=System.nanoTime();
  long waitTime=0;
  final Slot sl=enque(th);
  for (; ; ) {
    if (state != getState() || nanoTime >= 0 && (waitTime=nanoTime - (System.nanoTime() - startTime)) <= 0)     break;
    sl.setWaiting();
    if (state != getState())     ;
 else     if (nanoTime < 0)     LockSupport.park(this);
 else     LockSupport.parkNanos(this,waitTime);
    if (!sl.wake())     LockSupport.unpark(th);
    sl.resetWaked();
    LockSupport.park(this);
  }
  dequeue(sl,th);
}

Fixed version (ground truth):
/** 
 * inner stack context wait method
 * @param state
 * @param nTime to wait in nanos
 */
private void awaitInner(final int state,final long nTime){
  final Thread th=Thread.currentThread();
  final long sTime=System.nanoTime();
  long wTime=0;
  final Slot sl=enque(th);
  for (; ; ) {
    if (state != getState())     break;
    if (nTime >= 0 && (wTime=nTime - (System.nanoTime() - sTime)) <= 0)     break;
    sl.setWaiting(state);
    if (nTime < 0)     LockSupport.park(this);
 else     LockSupport.parkNanos(this,wTime);
    sl.setRuning();
  }
  dequeue(sl,th);
}
Program: 46820
Project: 46820
Buggy source:
/** 
 * does some waking behavior
 * @return true on waking at least one thread
 */
public abstract boolean call();

Fixed version (ground truth):
/** 
 * does some waking behavior
 * @return true on waking at least one thread
 */
public abstract void call();
Program: 46821
Project: 46821
Buggy source:
/** 
 * thread can be waked once it doesn't matters if one thread got an stale node
 * @return true when a thread was waked up
 */
public boolean wake(){
  final Thread th=thread.get();
  if (waiting.compareAndSet(true,false)) {
    LockSupport.unpark(th);
    waked.set(true);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * thread can be waked once it doesn't matters if one thread got an stale node
 * @return true when a thread was waked up
 */
public boolean wake(){
  final int state=waiting.get();
  final boolean res=state != 0 && waiting.compareAndSet(state,0);
  LockSupport.unpark(thread.get());
  return res;
}
Program: 46822
Project: 46822
Buggy source:
@Override public void run(){
  for (; ; ) {
    final int run=runs.get();
    final int call=calls.get();
    if (call > 0) {
      if (calls.compareAndSet(call,call - 1))       runGuarded();
    }
 else     if (runs.compareAndSet(run,run - 1))     break;
  }
}

Fixed version (ground truth):
@Override public void run(){
  for (; ; ) {
    final int run=runs.get();
    final int call=calls.get();
    if (call > 0) {
      if (calls.compareAndSet(call,call - 1))       runGuarded();
    }
 else     if (runs.compareAndSet(run,run - 1)) {
      if (LOG.isTraceEnabled())       LOG.trace("String_Node_Str" + runnable + "String_Node_Str"+ runnable.getClass().getSimpleName()+ "String_Node_Str");
      break;
    }
  }
}
Program: 46823
Project: 46823
Buggy source:
public static int getColor(final int r,final int g,final int b,final int a){
  return Math.min(255,Math.max(0,a) & 0xFF) << 24 | Math.min(255,Math.max(0,r) & 0xFF) << 16 | Math.min(255,Math.max(0,g) & 0xFF) << 8 | Math.min(255,Math.max(0,b) & 0xFF) << 0;
}

Fixed version (ground truth):
public static int getColor(final int r,final int g,final int b,final int a){
  return (Math.min(255,Math.max(0,a)) & 0xFF) << 24 | (Math.min(255,Math.max(0,r)) & 0xFF) << 16 | (Math.min(255,Math.max(0,g)) & 0xFF) << 8 | (Math.min(255,Math.max(0,b)) & 0xFF) << 0;
}
Program: 46825
Project: 46825
Buggy source:
public void setChecked(final int index,final E value){
  if (index + 1 - capacity() > 0)   grow(index + 1,false);
  set(index,value);
}

Fixed version (ground truth):
/** 
 * grows if needed
 * @param index
 * @param value
 */
public void setChecked(final int index,final E value){
  if (index + 1 - capacity() > 0)   grow(index + 1,false);
  set(index,value);
}
Program: 46826
Project: 46826
Buggy source:
/** 
 * checks by capacity
 * @param index
 * @return
 */
public E getDirectChecked(final int index){
  return index < capacity() && index >= 0 ? get(index) : null;
}

Fixed version (ground truth):
/** 
 * checks by capacity
 * @param index
 * @return
 */
public E getDirectChecked(final int index){
  return index < capacity() && index >= 0 ? getElements()[index] : null;
}
Program: 46827
Project: 46827
Buggy source:
/** 
 * @return amount of contained elements
 */
@Override public int size(){
  final int putIdx=putIndex.get();
  final int getIdx=getIndex.get();
  if (putIdx < getIdx)   return putIdx + elements.length() - getIdx;
 else   return putIdx - getIdx;
}

Fixed version (ground truth):
private int size(final int putIdx,final int getIdx){
  if (putIdx < getIdx)   return Integer.MAX_VALUE - Math.abs(putIdx - getIdx);
 else   return putIdx - getIdx;
}
Program: 46828
Project: 46828
Buggy source:
/** 
 * whether size == 0
 * @return
 */
@Override public boolean isEmpty(){
  return size() == 0;
}

Fixed version (ground truth):
/** 
 * whether size == 0
 * @return
 */
@Override public boolean isEmpty(){
  return putIndex.get() == getIndex.get();
}
Program: 46829
Project: 46829
Buggy source:
/** 
 * limit checking method can be overwritten for growth support
 * @param nIdx
 * @return
 */
protected int checkLimit(final int nIdx){
  if (nIdx == getIndex.get())   return SIZE_MAXED;
  return SIZE_OK;
}

Fixed version (ground truth):
/** 
 * limit checking method can be overwritten for growth support
 * @param putIdx
 * @return
 */
protected int checkLimit(final int putIdx){
  if (size(putIdx,getIndex.get()) >= elements.length())   return SIZE_MAXED;
  return SIZE_OK;
}
Program: 46830
Project: 46830
Buggy source:
/** 
 * inner emthod to select index and put object
 * @param elem
 * @return
 */
protected boolean addInner(final E elem){
  int putIdx, loop=0;
  for (; ; ) {
    putIdx=putIndex.get();
    final int nIdx=(putIdx + 1) % elements.length();
    final int checkLimit=checkLimit(nIdx);
    if (checkLimit == SIZE_MAXED)     return false;
    if (checkLimit == SIZE_OK && putIndex.compareAndSet(putIdx,nIdx))     break;
    loop=ThreadUtils.yieldCAS(loop);
  }
  while (!elements.compareAndSet(putIdx,null,elem))   ThreadUtils.yield();
  return true;
}

Fixed version (ground truth):
/** 
 * inner emthod to select index and put object
 * @param elem
 * @return
 */
protected boolean addInner(final E elem){
  int putIdx, loop=0;
  for (; ; ) {
    putIdx=putIndex.get();
    final int checkLimit=checkLimit(putIdx);
    if (checkLimit == SIZE_MAXED)     return false;
 else     if (checkLimit == SIZE_OK && putIndex.compareAndSet(putIdx,putIdx + 1))     break;
    loop=ThreadUtils.yieldCAS(loop);
  }
  final int tarIdx=remainder(putIdx,elements.length());
  while (!elements.compareAndSet(tarIdx,null,elem))   ThreadUtils.yield();
  return true;
}
Program: 46831
Project: 46831
Buggy source:
/** 
 * inner method to select next index and retrieve object
 * @return
 */
protected E takeInner(){
  int getIdx, loop=0;
  for (; ; ) {
    getIdx=getIndex.get();
    if (getIdx == putIndex.get())     return null;
    final int nIdx=(getIdx + 1) % elements.length();
    if (getIndex.compareAndSet(getIdx,nIdx))     break;
    loop=ThreadUtils.yieldCAS(loop);
  }
  for (; ; ) {
    final E res=elements.get(getIdx);
    if (res != null && elements.compareAndSet(getIdx,res,null))     return res;
    ThreadUtils.yield();
  }
}

Fixed version (ground truth):
/** 
 * inner method to select next index and retrieve object
 * @return
 */
protected E takeInner(){
  int getIdx, loop=0;
  for (; ; ) {
    getIdx=getIndex.get();
    if (getIdx == putIndex.get())     return null;
    if (getIndex.compareAndSet(getIdx,getIdx + 1))     break;
    loop=ThreadUtils.yieldCAS(loop);
  }
  final int tarIdx=remainder(getIdx,elements.length());
  for (; ; ) {
    final E res=elements.get(tarIdx);
    if (res != null && elements.compareAndSet(tarIdx,res,null))     return res;
    ThreadUtils.yield();
  }
}
Program: 46832
Project: 46832
Buggy source:
/** 
 * @return top element without removing
 */
@Override public E peek(){
  E res=null;
  if (size() > 0) {
    final int length=elements.length();
    final int tidx=(length + putIndex.get() - 1) % length;
    res=elements.get(tidx);
  }
  return res;
}

Fixed version (ground truth):
/** 
 * @return top element without removing
 */
@Override public E peek(){
  E res=null;
  if (size() > 0) {
    final int length=elements.length();
    final int tarIdx=remainder(putIndex.get() - 1,length);
    res=elements.get(tarIdx);
  }
  return res;
}
Program: 46833
Project: 46833
Buggy source:
/** 
 * default
 * @param clazz
 * @param maxCount
 */
public ArrayQueueUnbounded(final Class<E> clazz,final int maxCount){
  super(clazz,Math.min(maxCount + 1,Array.MIN_GROWTH));
  this.maxCount=maxCount + 1;
}

Fixed version (ground truth):
/** 
 * default
 * @param clazz
 * @param maxCount
 */
public ArrayQueueUnbounded(final Class<E> clazz,final int maxCount){
  super(clazz,Math.min(maxCount,Array.MIN_GROWTH));
  this.maxCount=maxCount;
}
Program: 46834
Project: 46834
Buggy source:
@Override protected int checkLimit(final int nIdx){
  if (super.checkLimit(nIdx) == SIZE_MAXED)   if (elements.length() >= maxCount)   return SIZE_MAXED;
 else   try {
    gro.enter();
synchronized (this) {
      growthInner();
      return RESIZED;
    }
  }
  finally {
    gro.leave();
  }
  return SIZE_OK;
}

Fixed version (ground truth):
@Override protected int checkLimit(final int putIdx){
  if (super.checkLimit(putIdx) == SIZE_MAXED)   if (elements.length() >= maxCount)   return SIZE_MAXED;
 else   try {
    gro.enter();
synchronized (this) {
      growthInner();
      return RESIZED;
    }
  }
  finally {
    gro.leave();
  }
  return SIZE_OK;
}
Program: 46836
Project: 46836
Buggy source:
/** 
 * waits until an element is takable
 * @param waitMillis
 * @return
 */
public E take(final long waitMillis){
  try {
    lock.lockInterruptibly();
    E elem=take();
    if (elem == null) {
      empty.signalAll();
      if (waitMillis < 0)       added.await();
 else       added.await(waitMillis,TimeUnit.MILLISECONDS);
      elem=take();
    }
    return elem;
  }
 catch (  final InterruptedException e) {
    if (LOG.isTraceEnabled())     LOG.trace(e.getMessage(),e);
  }
 finally {
    lock.unlock();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * waits until an element is takable
 * @param waitMillis
 * @return
 */
public E take(final long waitMillis){
  try {
    lock.lockInterruptibly();
    E elem=take();
    if (elem == null) {
      empty.signalAll();
      if (waitMillis < 0)       added.await();
 else       added.await(waitMillis,TimeUnit.MILLISECONDS);
      elem=take();
    }
    return elem;
  }
 catch (  final InterruptedException e) {
    if (LOG.isTraceEnabled())     LOG.trace(e.getMessage(),e);
  }
 finally {
    if (lock.isHeldByCurrentThread())     lock.unlock();
  }
  return null;
}
Program: 46837
Project: 46837
Buggy source:
@Override public String toString(){
  return runnable.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + runnable.toString();
}
Program: 46838
Project: 46838
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + run.getClass().getSimpleName() + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + run.getClass() + "String_Node_Str";
}
Program: 46839
Project: 46839
Buggy source:
@Override public String toString(){
  return String.format("String_Node_Str",maxIdx,itIdx,Arrays.toString(elements));
}

Fixed version (ground truth):
@Override public String toString(){
  return String.format("String_Node_Str",maxIdx + 1,itIdx,Arrays.toString(elements));
}
Program: 46840
Project: 46840
Buggy source:
/** 
 * for inner access
 * @param thread
 * @param intervall
 * @param it
 */
protected InterThreadIntervall(final E thread,final int intervall,final IInterThreads<E> it){
  this(thread,intervall,null,it);
}

Fixed version (ground truth):
/** 
 * for inner access, for overwritten innerun, starttime
 * @param thread
 * @param intervall
 * @param it
 */
protected InterThreadIntervall(final E thread,final int intervall,final int startIn,final IInterThreads<E> it){
  this(thread,intervall,startIn,null,it);
}
Program: 46841
Project: 46841
Buggy source:
public RecurringTask(final int intervallMs){
  this.intervallMs=intervallMs;
  nextRun=System.nanoTime();
}

Fixed version (ground truth):
public RecurringTask(final int intervallMs,final int nextMs){
  this.intervallMs=intervallMs;
  nextRun=System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(nextMs);
}