nus-yam/ex-repair huggingface dataset:
Program: 35236
Project: 35236
Buggy source:
@Override public void mouseClicked(MouseEvent me){
  if (me.getButton() == 3) {
    int tabNr=((TabbedPaneUI)getUI()).tabForCoordinate(MyTabbedPane.this,me.getX(),me.getY());
    if (tabNr == 0) {
      JPopupMenu menu=new JPopupMenu();
      for (      ClassNode cn : jbm.lastSelectedEntries.keySet()) {
        String item=cn.name;
        MethodNode mn=jbm.lastSelectedEntries.get(cn);
        if (mn != null) {
          item+="String_Node_Str" + mn.name;
        }
        if (item.length() > 128) {
          item="String_Node_Str" + item.substring(item.length() - 128);
        }
        JMenuItem remove=new JMenuItem(item);
        remove.addActionListener(new ActionListener(){
          public void actionPerformed(          ActionEvent e){
            if (mn != null) {
              jbm.selectMethod(cn,mn);
            }
 else {
              jbm.selectClass(cn);
            }
          }
        }
);
        menu.add(remove);
      }
      menu.show(jbm,(int)jbm.getMousePosition().getX(),(int)jbm.getMousePosition().getY());
    }
  }
}

Fixed version (ground truth):
@Override public void mouseClicked(MouseEvent me){
  if (me.getButton() == 3) {
    int tabNr=((TabbedPaneUI)getUI()).tabForCoordinate(MyTabbedPane.this,me.getX(),me.getY());
    if (tabNr == 0) {
      JPopupMenu menu=new JPopupMenu();
      for (      ClassNode cn : JByteMod.lastSelectedTreeEntries.keySet()) {
        String item=cn.name;
        MethodNode mn=JByteMod.lastSelectedTreeEntries.get(cn);
        if (mn != null) {
          item+="String_Node_Str" + mn.name;
        }
        if (item.length() > 128) {
          item="String_Node_Str" + item.substring(item.length() - 128);
        }
        JMenuItem remove=new JMenuItem(item);
        remove.addActionListener(new ActionListener(){
          public void actionPerformed(          ActionEvent e){
            if (mn != null) {
              jbm.selectMethod(cn,mn);
            }
 else {
              jbm.selectClass(cn);
            }
          }
        }
);
        menu.add(remove);
      }
      menu.show(jbm,(int)jbm.getMousePosition().getX(),(int)jbm.getMousePosition().getY());
    }
  }
}
Program: 35237
Project: 35237
Buggy source:
public void selectMethod(ClassNode cn,MethodNode mn){
  int index=this.getSelectedIndex();
  if (this.getTitleAt(index).equals(analysis)) {
    cfp.generateList();
  }
  this.classSelected=false;
}

Fixed version (ground truth):
public void selectMethod(ClassNode cn,MethodNode mn){
  int index=this.getSelectedIndex();
  if (this.getTitleAt(index).equals("String_Node_Str")) {
    dt.decompile(cn,false);
  }
  if (this.getTitleAt(index).equals(analysis)) {
    cfp.generateList();
  }
  this.classSelected=false;
}
Program: 35238
Project: 35238
Buggy source:
public Options(){
  if (propFile.exists()) {
    System.out.println("String_Node_Str");
    try {
      Files.lines(propFile.toPath()).forEach(l -> {
        String[] split=l.split("String_Node_Str");
        String[] def=split[0].split("String_Node_Str");
        try {
          bools.add(new Option(def[0],split[1],Type.valueOf(def[1]),def[2]));
        }
 catch (        Exception e) {
          System.err.println("String_Node_Str" + l);
        }
      }
);
      if (bools.isEmpty()) {
        System.err.println("String_Node_Str");
        this.initWithDefaults();
        this.save();
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else {
    System.out.println("String_Node_Str");
    this.initWithDefaults();
    this.save();
  }
}

Fixed version (ground truth):
public Options(){
  if (propFile.exists()) {
    System.out.println("String_Node_Str");
    try {
      Files.lines(propFile.toPath()).forEach(l -> {
        String[] split=l.split("String_Node_Str");
        String[] def=split[0].split("String_Node_Str");
        try {
          bools.add(new Option(def[0],split[1],Type.valueOf(def[1]),def[2]));
        }
 catch (        Exception e) {
          System.err.println("String_Node_Str" + l);
        }
      }
);
      for (int i=0; i < bools.size(); i++) {
        Option o1=bools.get(i);
        Option o2=defaults.get(i);
        if (o1 == null || o2 == null || !o1.getName().equals(o2)) {
          JOptionPane.showMessageDialog(null,"String_Node_Str");
          this.initWithDefaults();
          this.save();
          return;
        }
      }
      if (bools.isEmpty()) {
        System.err.println("String_Node_Str");
        this.initWithDefaults();
        this.save();
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else {
    System.out.println("String_Node_Str");
    this.initWithDefaults();
    this.save();
  }
}
Program: 35239
Project: 35239
Buggy source:
public Option get(String name){
  for (  Option o : bools) {
    if (o.getName().equalsIgnoreCase(name)) {
      return o;
    }
  }
  throw new RuntimeException("String_Node_Str" + name);
}

Fixed version (ground truth):
public Option get(String name){
  for (  Option o : bools) {
    if (o.getName().equalsIgnoreCase(name)) {
      return o;
    }
  }
  JOptionPane.showMessageDialog(null,"String_Node_Str" + name + "String_Node_Str");
  this.initWithDefaults();
  this.save();
  for (  Option o : bools) {
    if (o.getName().equalsIgnoreCase(name)) {
      return o;
    }
  }
  throw new RuntimeException("String_Node_Str" + name);
}
Program: 35240
Project: 35240
Buggy source:
private void initWithDefaults(){
  bools=Arrays.asList(new Option("String_Node_Str",false,Type.BOOLEAN),new Option("String_Node_Str",false,Type.BOOLEAN),new Option("String_Node_Str",false,Type.BOOLEAN),new Option("String_Node_Str","String_Node_Str",Type.STRING,"String_Node_Str"),new Option("String_Node_Str","String_Node_Str",Type.STRING,"String_Node_Str"));
}

Fixed version (ground truth):
private void initWithDefaults(){
  bools=new ArrayList<>();
  bools.addAll(defaults);
}
Program: 35241
Project: 35241
Buggy source:
private JScrollPane initializePanel(){
  JPanel mainPanel=new JPanel();
  JPanel leftText=new JPanel();
  JPanel rightInput=new JPanel();
  int size=Array.getLength(array);
  mainPanel.setLayout(new BorderLayout(15,15));
  leftText.setLayout(new GridLayout(size,1));
  rightInput.setLayout(new GridLayout(size,1));
  mainPanel.setBorder(BorderFactory.createEmptyBorder(10,20,10,20));
  for (int i=0; i < size; i++) {
    Object o=Array.get(array,i);
    if (hasNoChilds(o.getClass())) {
      try {
        rightInput.add(wrap(o,ClassDialogue.this.getComponent(o.getClass(),o)));
      }
 catch (      IllegalArgumentException|IllegalAccessException e) {
        e.printStackTrace();
      }
    }
 else     if (isSpecial(o.getClass().getName(),o.getClass())) {
      rightInput.add(wrap(o,getSpecial(o,o.getClass().getName(),o.getClass())));
    }
 else {
      JButton edit=new JButton("String_Node_Str");
      edit.addActionListener(e -> {
        try {
          ClassDialogue dialogue=ClassDialogue.this.init(o);
          dialogue.open();
        }
 catch (        Exception ex) {
          ex.printStackTrace();
        }
      }
);
      rightInput.add(wrap(o,edit));
    }
    leftText.add(new JLabel(formatText("String_Node_Str" + i + "String_Node_Str"+ o.getClass().getSimpleName()+ "String_Node_Str")));
  }
  mainPanel.add(leftText,BorderLayout.WEST);
  mainPanel.add(rightInput,BorderLayout.EAST);
  return new JScrollPane(mainPanel);
}

Fixed version (ground truth):
private JScrollPane initializePanel(){
  JPanel mainPanel=new JPanel();
  JPanel leftText=new JPanel();
  JPanel rightInput=new JPanel();
  int size=Array.getLength(array);
  mainPanel.setLayout(new BorderLayout(15,15));
  leftText.setLayout(new GridLayout(size,1));
  rightInput.setLayout(new GridLayout(size,1));
  mainPanel.setBorder(BorderFactory.createEmptyBorder(10,20,10,20));
  for (int i=0; i < size; i++) {
    Object o=Array.get(array,i);
    if (isSpecial(o.getClass().getName(),o.getClass())) {
      rightInput.add(wrap(o,getSpecial(o,o.getClass().getName(),o.getClass())));
    }
 else     if (hasNoChilds(o.getClass())) {
      try {
        rightInput.add(wrap(o,ClassDialogue.this.getComponent(o.getClass(),o)));
      }
 catch (      IllegalArgumentException|IllegalAccessException e) {
        e.printStackTrace();
      }
    }
 else {
      JButton edit=new JButton("String_Node_Str");
      edit.addActionListener(e -> {
        try {
          ClassDialogue dialogue=ClassDialogue.this.init(o);
          dialogue.open();
        }
 catch (        Exception ex) {
          ex.printStackTrace();
        }
      }
);
      rightInput.add(wrap(o,edit));
    }
    leftText.add(new JLabel(formatText("String_Node_Str" + i + "String_Node_Str"+ o.getClass().getSimpleName()+ "String_Node_Str")));
  }
  mainPanel.add(leftText,BorderLayout.WEST);
  mainPanel.add(rightInput,BorderLayout.EAST);
  return new JScrollPane(mainPanel);
}
Program: 35242
Project: 35242
Buggy source:
protected Object getSpecialValue(Object object,Class<?> type,Object object3,WrappedPanel wp){
  return null;
}

Fixed version (ground truth):
protected Object getSpecialValue(Object object,String name,Class<?> type,Object object3,WrappedPanel wp){
  return null;
}
Program: 35243
Project: 35243
Buggy source:
public boolean open(){
  JScrollPane jscp=initializePanel();
  JPanel panel=(JPanel)jscp.getViewport().getView();
  JPanel rightInput=(JPanel)panel.getComponent(1);
  if (JOptionPane.showConfirmDialog(null,jscp,"String_Node_Str",JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
    int i=0;
    for (    Component c : rightInput.getComponents()) {
      WrappedPanel wp=(WrappedPanel)c;
      Object o=wp.getObject();
      if (o != null) {
        Component child=wp.getComponent(0);
        if (hasNoChilds(o.getClass())) {
          try {
            Array.set(array,i,getValue(o.getClass(),child));
          }
 catch (          IllegalArgumentException e) {
            e.printStackTrace();
          }
        }
 else         if (isSpecial(o.getClass().getName(),o.getClass())) {
          Array.set(array,i,getSpecialValue(object,o.getClass(),o,wp));
        }
 else {
          Array.set(array,i,o);
        }
      }
      i++;
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean open(){
  JScrollPane jscp=initializePanel();
  JPanel panel=(JPanel)jscp.getViewport().getView();
  JPanel rightInput=(JPanel)panel.getComponent(1);
  if (JOptionPane.showConfirmDialog(null,jscp,"String_Node_Str",JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
    int i=0;
    for (    Component c : rightInput.getComponents()) {
      WrappedPanel wp=(WrappedPanel)c;
      Object o=wp.getObject();
      if (o != null) {
        Component child=wp.getComponent(0);
        if (isSpecial(o.getClass().getName(),o.getClass())) {
          Array.set(array,i,getSpecialValue(object,o.getClass().getName(),o.getClass(),o,wp));
        }
 else         if (hasNoChilds(o.getClass())) {
          Array.set(array,i,getValue(o.getClass(),child));
        }
 else {
          Array.set(array,i,o);
        }
      }
      i++;
    }
    return true;
  }
  return false;
}
Program: 35244
Project: 35244
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected Object getSpecialValue(Object object,Class<?> type,Object o,WrappedPanel wp){
  if (o != null && o.equals("String_Node_Str")) {
    JComboBox<String> opcode=(JComboBox<String>)wp.getComponent(0);
    AbstractInsnNode ain=(AbstractInsnNode)object;
    ain.setOpcode(OpUtils.getOpcodeIndex(String.valueOf(opcode.getSelectedItem()).toUpperCase()));
    return null;
  }
 else   if (type.getName().equals(LabelNode.class.getName())) {
    JComboBox<LabelNode> label=(JComboBox<LabelNode>)wp.getComponent(0);
    return label.getSelectedItem();
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected Object getSpecialValue(Object object,String name,Class<?> type,Object o,WrappedPanel wp){
  if (o != null && o.equals("String_Node_Str")) {
    JComboBox<String> opcode=(JComboBox<String>)wp.getComponent(0);
    AbstractInsnNode ain=(AbstractInsnNode)object;
    ain.setOpcode(OpUtils.getOpcodeIndex(String.valueOf(opcode.getSelectedItem()).toUpperCase()));
    return null;
  }
 else   if (type.getName().equals(LabelNode.class.getName())) {
    JComboBox<LabelNode> label=(JComboBox<LabelNode>)wp.getComponent(0);
    return label.getSelectedItem();
  }
 else   if (name.equals("String_Node_Str") && type.getName().equals(int.class.getName())) {
    System.out.println(o);
    JComboBox<String> label=(JComboBox<String>)wp.getComponent(0);
    return label.getSelectedIndex() + 1;
  }
  return null;
}
Program: 35245
Project: 35245
Buggy source:
@Override protected boolean isSpecial(String name,Class<?> type){
  return type.getName().equals(LabelNode.class.getName());
}

Fixed version (ground truth):
@Override protected boolean isSpecial(String name,Class<?> type){
  return type.getName().equals(LabelNode.class.getName()) || (name.equals("String_Node_Str") && type.getName().equals(int.class.getName()));
}
Program: 35246
Project: 35246
Buggy source:
@Override protected Component getSpecial(Object o,String name,Class<?> type){
  if (type.getName().equals(LabelNode.class.getName())) {
    ArrayList<LabelNode> ln=new ArrayList<>();
    for (    AbstractInsnNode nod : mn.instructions.toArray()) {
      if (nod instanceof LabelNode) {
        ln.add((LabelNode)nod);
      }
    }
    JComboBox<LabelNode> jcb=new JComboBox<>(ln.toArray(new LabelNode[0]));
    jcb.setSelectedItem(o);
    return jcb;
  }
  return null;
}

Fixed version (ground truth):
@Override protected Component getSpecial(Object o,String name,Class<?> type){
  if (type.getName().equals(LabelNode.class.getName())) {
    ArrayList<LabelNode> ln=new ArrayList<>();
    for (    AbstractInsnNode nod : mn.instructions.toArray()) {
      if (nod instanceof LabelNode) {
        ln.add((LabelNode)nod);
      }
    }
    JComboBox<LabelNode> jcb=new JComboBox<>(ln.toArray(new LabelNode[0]));
    jcb.setSelectedItem(o);
    return jcb;
  }
 else   if (name.equals("String_Node_Str")) {
    JComboBox<String> jcb=new JComboBox<>(handles);
    jcb.setSelectedIndex(((int)o) - 1);
    return jcb;
  }
  return null;
}
Program: 35247
Project: 35247
Buggy source:
private void analyzeName(String name,ArrayList<NameObfType> names){
  boolean none=true;
  if (name.length() > 32) {
    names.add(NameObfType.LONG_LETTERS);
    none=false;
  }
  if (!asciiEncoder.canEncode(name)) {
    names.add(NameObfType.HIGH_CHAR);
    none=false;
  }
  if (keywords.contains(name)) {
    names.add(NameObfType.JAVA_KEYWORD);
    none=false;
  }
 else   if (windir.contains(name.toLowerCase())) {
    names.add(NameObfType.INVALID_WINDIR);
    none=false;
  }
  if (none) {
    names.add(NameObfType.NONE);
  }
}

Fixed version (ground truth):
private void analyzeName(String name,ArrayList<NameObfType> names){
  boolean none=true;
  String sname=name.substring(name.lastIndexOf('/') + 1);
  if (sname.length() > 32) {
    names.add(NameObfType.LONG_LETTERS);
    none=false;
  }
 else   if (sname.length() <= 2) {
    names.add(NameObfType.SHORT_LETTERS);
    none=false;
  }
  if (!asciiEncoder.canEncode(sname)) {
    names.add(NameObfType.HIGH_CHAR);
    none=false;
  }
  if (keywords.contains(sname)) {
    names.add(NameObfType.JAVA_KEYWORD);
    none=false;
  }
 else   if (windir.contains(sname.toLowerCase())) {
    names.add(NameObfType.INVALID_WINDIR);
    none=false;
  }
  if (none) {
    names.add(NameObfType.NONE);
  }
}
Program: 35248
Project: 35248
Buggy source:
/** 
 * Load .jar file
 */
public void loadFile(File input){
  String ap=input.getAbsolutePath();
  if (ap.endsWith("String_Node_Str")) {
    try {
      this.file=new JarArchive(this,input);
    }
 catch (    Throwable e) {
      new ErrorDisplay(e);
    }
  }
 else   if (ap.endsWith("String_Node_Str")) {
    try {
      this.file=new JarArchive(ASMUtils.getNode(Files.readAllBytes(input.toPath())));
      this.refreshTree();
    }
 catch (    Throwable e) {
      new ErrorDisplay(e);
    }
  }
 else {
    new ErrorDisplay(new UnsupportedOperationException(res.getResource("String_Node_Str")));
  }
}

Fixed version (ground truth):
/** 
 * Load .jar or .class file
 */
public void loadFile(File input){
  String ap=input.getAbsolutePath();
  if (ap.endsWith("String_Node_Str")) {
    try {
      this.file=new JarArchive(this,input);
    }
 catch (    Throwable e) {
      new ErrorDisplay(e);
    }
  }
 else   if (ap.endsWith("String_Node_Str")) {
    try {
      this.file=new JarArchive(ASMUtils.getNode(Files.readAllBytes(input.toPath())));
      this.refreshTree();
    }
 catch (    Throwable e) {
      new ErrorDisplay(e);
    }
  }
 else {
    new ErrorDisplay(new UnsupportedOperationException(res.getResource("String_Node_Str")));
  }
}
Program: 35250
Project: 35250
Buggy source:
public static void setDefaults(){
  UIDefaults defaults=UIManager.getLookAndFeelDefaults();
  defaults.put("String_Node_Str",new Color(0xFF01D328));
}

Fixed version (ground truth):
public static void setDefaults(){
  UIDefaults defaults=UIManager.getLookAndFeelDefaults();
  defaults.put("String_Node_Str",new Color(0xFF01D328));
  Object o=UIManager.get("String_Node_Str");
  Class<?> c=o.getClass();
  try {
    Field f=c.getDeclaredField("String_Node_Str");
    f.setAccessible(true);
    f.set(o,new Color(0xFF01D328));
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 35251
Project: 35251
Buggy source:
public void selectMethod(ClassNode cn,MethodNode mn){
  this.currentNode=cn;
  OpUtils.clearLabelCache();
  sp.selectMethod(cn,mn);
  if (!clist.loadInstructions(mn)) {
    clist.setSelectedIndex(-1);
  }
  tcblist.addNodes(cn,mn);
  lvplist.addNodes(cn,mn);
  dp.setText("String_Node_Str");
  tabbedPane.selectClass(cn);
}

Fixed version (ground truth):
public void selectMethod(ClassNode cn,MethodNode mn){
  this.currentNode=cn;
  sp.selectMethod(cn,mn);
  if (!clist.loadInstructions(mn)) {
    clist.setSelectedIndex(-1);
  }
  tcblist.addNodes(cn,mn);
  lvplist.addNodes(cn,mn);
  dp.setText("String_Node_Str");
  tabbedPane.selectClass(cn);
}
Program: 35254
Project: 35254
Buggy source:
public boolean loadInstructions(MethodNode m){
  this.currentMethod=m;
  this.currentClass=null;
  DefaultListModel<InstrEntry> lm=new DefaultListModel<InstrEntry>();
  editor.setText(m.name + m.desc);
  ArrayList<InstrEntry> entries=new ArrayList<>();
  for (  AbstractInsnNode i : m.instructions) {
    InstrEntry entry=new InstrEntry(m,i);
    lm.addElement(entry);
    entries.add(entry);
  }
  this.setModel(lm);
  if (adressList != null) {
    adressList.updateAdr();
  }
  return true;
}

Fixed version (ground truth):
public boolean loadInstructions(MethodNode m){
  OpUtils.clearLabelCache();
  this.currentMethod=m;
  this.currentClass=null;
  DefaultListModel<InstrEntry> lm=new DefaultListModel<InstrEntry>();
  editor.setText(m.name + m.desc);
  ArrayList<InstrEntry> entries=new ArrayList<>();
  for (  AbstractInsnNode i : m.instructions) {
    InstrEntry entry=new InstrEntry(m,i);
    lm.addElement(entry);
    entries.add(entry);
  }
  this.setModel(lm);
  if (adressList != null) {
    adressList.updateAdr();
  }
  return true;
}
Program: 35255
Project: 35255
Buggy source:
public static int getLabelIndex(AbstractInsnNode ain){
  if (labelCache.containsKey(ain)) {
    return labelCache.get(ain);
  }
  int index=0;
  while (ain.getPrevious() != null) {
    ain=ain.getPrevious();
    if (ain instanceof LabelNode) {
      index+=1;
    }
  }
  labelCache.put(ain,index);
  return index;
}

Fixed version (ground truth):
public static int getLabelIndex(AbstractInsnNode ain){
  if (labelCache.containsKey(ain)) {
    return labelCache.get(ain);
  }
  int index=0;
  AbstractInsnNode node=ain;
  while (node.getPrevious() != null) {
    node=node.getPrevious();
    if (node instanceof LabelNode) {
      index+=1;
    }
  }
  labelCache.put(ain,index);
  return index;
}
Program: 35256
Project: 35256
Buggy source:
public static void main(final String[] args) throws IOException, SQLException {
  CoordinatorRegistryCenter regCenter=setUpRegistryCenter();
  DataSource dataSource=OrchestrationMasterSlaveDataSourceFactory.createDataSource(createDataSourceMap(),crateMasterSlaveRuleConfig(),new OrchestrationConfiguration("String_Node_Str",regCenter,false));
  createTable(dataSource);
  insertData(dataSource);
  printSimpleSelect(dataSource);
  System.out.println("String_Node_Str");
  printGroupBy(dataSource);
  System.out.println("String_Node_Str");
  printHintSimpleSelect(dataSource);
  dropTable(dataSource);
}

Fixed version (ground truth):
public static void main(final String[] args) throws IOException, SQLException {
  CoordinatorRegistryCenter regCenter=setUpRegistryCenter();
  DataSource dataSource=OrchestrationMasterSlaveDataSourceFactory.createDataSource(createDataSourceMap(),crateMasterSlaveRuleConfig(),new OrchestrationConfiguration("String_Node_Str",regCenter,false),new HashMap<String,Object>());
  createTable(dataSource);
  insertData(dataSource);
  printSimpleSelect(dataSource);
  System.out.println("String_Node_Str");
  printGroupBy(dataSource);
  System.out.println("String_Node_Str");
  printHintSimpleSelect(dataSource);
  dropTable(dataSource);
}
Program: 35257
Project: 35257
Buggy source:
private static DataSource getMasterSlaveDataSource() throws SQLException {
  MasterSlaveRuleConfiguration masterSlaveRuleConfig=new MasterSlaveRuleConfiguration();
  masterSlaveRuleConfig.setName("String_Node_Str");
  masterSlaveRuleConfig.setMasterDataSourceName("String_Node_Str");
  masterSlaveRuleConfig.setSlaveDataSourceNames(Arrays.asList("String_Node_Str","String_Node_Str"));
  return MasterSlaveDataSourceFactory.createDataSource(createDataSourceMap(),masterSlaveRuleConfig);
}

Fixed version (ground truth):
private static DataSource getMasterSlaveDataSource() throws SQLException {
  MasterSlaveRuleConfiguration masterSlaveRuleConfig=new MasterSlaveRuleConfiguration();
  masterSlaveRuleConfig.setName("String_Node_Str");
  masterSlaveRuleConfig.setMasterDataSourceName("String_Node_Str");
  masterSlaveRuleConfig.setSlaveDataSourceNames(Arrays.asList("String_Node_Str","String_Node_Str"));
  return MasterSlaveDataSourceFactory.createDataSource(createDataSourceMap(),masterSlaveRuleConfig,new HashMap<String,Object>());
}
Program: 35260
Project: 35260
Buggy source:
/** 
 * set video uri
 * @param uri uri
 * @return VideoInfo
 */
public VideoInfo setUri(Uri uri){
  if (lastUri != null && !lastUri.equals(uri)) {
    PlayerManager.getInstance().releaseByFingerprint(lastFingerprint);
  }
  this.uri=uri;
  this.lastUri=this.uri;
  return this;
}

Fixed version (ground truth):
/** 
 * set video uri
 * @param uri uri
 * @return VideoInfo
 */
public VideoInfo setUri(Uri uri){
  if (lastUri != null && !lastUri.equals(uri)) {
    PlayerManager.getInstance().releaseByFingerprint(fingerprint);
  }
  this.uri=uri;
  this.lastUri=this.uri;
  return this;
}
Program: 35261
Project: 35261
Buggy source:
@Override protected void onPostExecute(Void results){
  mProgressDialog.dismiss();
  if (mSuAvailable) {
    if (isRead && canRead()) {
      ((Activity)mContext).findViewById(mLoadButtonId).performClick();
    }
 else     if (canWrite()) {
      ((Activity)mContext).findViewById(mStoreButtonId).performClick();
    }
  }
 else {
    AlertDialog.Builder builder=new AlertDialog.Builder(mContext).setTitle(R.string.note).setMessage(R.string.require_failed_message).setCancelable(true);
    mAlertDialog=builder.create();
    mAlertDialog.show();
  }
}

Fixed version (ground truth):
@Override protected void onPostExecute(Void results){
  mProgressDialog.dismiss();
  if (mSuAvailable) {
    if (isRead && canRead()) {
      try {
        ((Activity)mContext).findViewById(mLoadButtonId).performClick();
      }
 catch (      NullPointerException e) {
        ((Activity)mContext).findViewById(R.id.details_load_button).performClick();
      }
    }
 else     if (canWrite()) {
      try {
        ((Activity)mContext).findViewById(mStoreButtonId).performClick();
      }
 catch (      NullPointerException e) {
        ((Activity)mContext).findViewById(R.id.details_store_button).performClick();
      }
    }
  }
 else {
    AlertDialog.Builder builder=new AlertDialog.Builder(mContext).setTitle(R.string.note).setMessage(R.string.require_failed_message).setCancelable(true);
    mAlertDialog=builder.create();
    mAlertDialog.show();
  }
}
Program: 35262
Project: 35262
Buggy source:
private StepInfo(){
  ROOT_CMD=new String[]{"String_Node_Str" + STEP_INFO};
  mCryptor=new Cryptor(sKey.getBytes());
  mStepInfo=null;
}

Fixed version (ground truth):
private StepInfo(){
  ROOT_CMD=new String[]{"String_Node_Str" + STEP_INFO};
  mCryptor=new Cryptor(sKey.getBytes());
  mStepInfo=null;
  mLoadButtonId=R.id.qq_load_button;
  mStoreButtonId=R.id.qq_store_button;
}
Program: 35263
Project: 35263
Buggy source:
@Override public void reMoveIfNeeded(float velocity){
  View target=(View)animator.getTarget();
  if (target != null) {
    Rect targetRect=new Rect();
    target.getHitRect(targetRect);
    float scale;
    if (maxScale < target.getScaleX()) {
      scale=maxScale;
    }
 else     if (target.getScaleX() < 1) {
      scale=1;
    }
 else {
      scale=target.getScaleX();
    }
    float horizontalDiff=(target.getWidth() * scale - target.getWidth()) / 2;
    if (restrictionRect.left < targetRect.left) {
      cancel();
      spring.setStartVelocity(velocity).animateToFinalPosition(restrictionRect.left + horizontalDiff);
    }
 else     if (targetRect.right < restrictionRect.right) {
      cancel();
      spring.setStartVelocity(velocity).animateToFinalPosition(restrictionRect.right - target.getWidth() - horizontalDiff);
    }
  }
}

Fixed version (ground truth):
@Override public void reMoveIfNeeded(float velocity){
  View target=(View)animator.getTarget();
  if (target != null) {
    Rect targetRect=new Rect();
    target.getHitRect(targetRect);
    float scale;
    Rect afterRect;
    if (maxScale < target.getScaleX()) {
      scale=maxScale;
      int heightDiff=(int)((targetRect.height() - targetRect.height() * (maxScale / target.getScaleY())) / 2);
      int widthDiff=(int)((targetRect.width() - targetRect.width() * (maxScale / target.getScaleY())) / 2);
      afterRect=new Rect(targetRect.left + widthDiff,targetRect.top + heightDiff,targetRect.right - widthDiff,targetRect.bottom - heightDiff);
    }
 else     if (target.getScaleX() < 1) {
      scale=1;
      int heightDiff=(target.getHeight() - targetRect.height()) / 2;
      int widthDiff=(target.getWidth() - targetRect.width()) / 2;
      afterRect=new Rect(targetRect.left + widthDiff,targetRect.top + heightDiff,targetRect.right - widthDiff,targetRect.bottom - heightDiff);
    }
 else {
      scale=target.getScaleX();
      afterRect=targetRect;
    }
    float horizontalDiff=(target.getWidth() * scale - target.getWidth()) / 2;
    if (restrictionRect.left < afterRect.left) {
      cancel();
      spring.setStartVelocity(velocity).animateToFinalPosition(restrictionRect.left + horizontalDiff);
    }
 else     if (afterRect.right < restrictionRect.right) {
      cancel();
      spring.setStartVelocity(velocity).animateToFinalPosition(restrictionRect.right - target.getWidth() - horizontalDiff);
    }
  }
}
Program: 35264
Project: 35264
Buggy source:
@Override public void reMoveIfNeeded(float velocity){
  View target=(View)animator.getTarget();
  if (target != null) {
    Rect targetRect=new Rect();
    target.getHitRect(targetRect);
    float scale;
    if (maxScale < target.getScaleY()) {
      scale=maxScale;
    }
 else     if (target.getScaleY() < 1) {
      scale=1;
    }
 else {
      scale=target.getScaleY();
    }
    float verticalDiff=(target.getHeight() * scale - target.getHeight()) / 2;
    if (restrictionRect.top < targetRect.top) {
      cancel();
      spring.setStartVelocity(velocity).animateToFinalPosition(restrictionRect.top + verticalDiff);
    }
 else     if (targetRect.bottom < restrictionRect.bottom) {
      cancel();
      spring.setStartVelocity(velocity).animateToFinalPosition(restrictionRect.bottom - target.getHeight() - verticalDiff);
    }
  }
}

Fixed version (ground truth):
@Override public void reMoveIfNeeded(float velocity){
  View target=(View)animator.getTarget();
  if (target != null) {
    Rect targetRect=new Rect();
    target.getHitRect(targetRect);
    float scale;
    Rect afterRect;
    if (maxScale < target.getScaleY()) {
      scale=maxScale;
      int heightDiff=(int)((targetRect.height() - targetRect.height() * (maxScale / target.getScaleY())) / 2);
      int widthDiff=(int)((targetRect.width() - targetRect.width() * (maxScale / target.getScaleY())) / 2);
      afterRect=new Rect(targetRect.left + widthDiff,targetRect.top + heightDiff,targetRect.right - widthDiff,targetRect.bottom - heightDiff);
    }
 else     if (target.getScaleY() < 1) {
      scale=1;
      int heightDiff=(target.getHeight() - targetRect.height()) / 2;
      int widthDiff=(target.getWidth() - targetRect.width()) / 2;
      afterRect=new Rect(targetRect.left + widthDiff,targetRect.top + heightDiff,targetRect.right - widthDiff,targetRect.bottom - heightDiff);
    }
 else {
      scale=target.getScaleY();
      afterRect=targetRect;
    }
    float verticalDiff=(target.getHeight() * scale - target.getHeight()) / 2;
    if (restrictionRect.top < afterRect.top) {
      cancel();
      spring.setStartVelocity(velocity).animateToFinalPosition(restrictionRect.top + verticalDiff);
    }
 else     if (afterRect.bottom < restrictionRect.bottom) {
      cancel();
      spring.setStartVelocity(velocity).animateToFinalPosition(restrictionRect.bottom - target.getHeight() - verticalDiff);
    }
  }
}
Program: 35266
Project: 35266
Buggy source:
public void setState(State state){
  this.state=state;
  if (state == State.ENABLED || state == State.DISABLED_USER) {
    lastError=null;
    disabledUntil=null;
    disabledLevel=0;
  }
}

Fixed version (ground truth):
public void setState(State state){
  this.state=state;
}
Program: 35267
Project: 35267
Buggy source:
public SafeConfig(BaseConfig baseConfig){
  this.authType=baseConfig.getAuth().getAuthType();
  this.dereferer=baseConfig.getMain().getDereferer().orElse("String_Node_Str");
  this.searching=new SafeSearchingConfig(baseConfig.getSearching());
  this.downloading=new SafeDownloadingConfig(baseConfig.getDownloading());
  this.logging=new SafeLoggingConfig(baseConfig.getMain().getLogging());
  this.indexers=baseConfig.getIndexers().stream().map(SafeIndexerConfig::new).collect(Collectors.toList());
  this.categoriesConfig=new SafeCategoriesConfig(baseConfig.getCategoriesConfig());
  this.showNews=baseConfig.getMain().isShowNews();
}

Fixed version (ground truth):
public SafeConfig(BaseConfig baseConfig){
  this.authType=baseConfig.getAuth().getAuthType();
  this.dereferer=baseConfig.getMain().getDereferer().orElse("String_Node_Str");
  this.searching=new SafeSearchingConfig(baseConfig.getSearching());
  this.downloading=new SafeDownloadingConfig(baseConfig.getDownloading());
  this.logging=new SafeLoggingConfig(baseConfig.getMain().getLogging());
  this.indexers=baseConfig.getIndexers().stream().map(indexerConfig -> new SafeIndexerConfig(indexerConfig,baseConfig)).collect(Collectors.toList());
  this.categoriesConfig=new SafeCategoriesConfig(baseConfig.getCategoriesConfig());
  this.showNews=baseConfig.getMain().isShowNews();
}
Program: 35268
Project: 35268
Buggy source:
public SafeIndexerConfig(IndexerConfig indexerConfig){
  this.name=indexerConfig.getName();
  this.configComplete=indexerConfig.isConfigComplete();
  this.preselect=indexerConfig.isPreselect();
  this.state=indexerConfig.getState().name();
  this.categories=indexerConfig.getEnabledCategories();
  this.showOnSearch=indexerConfig.isShowOnSearch();
  this.enabledForSearchSource=indexerConfig.getEnabledForSearchSource().name();
  this.searchModuleType=indexerConfig.getSearchModuleType().name();
}

Fixed version (ground truth):
public SafeIndexerConfig(IndexerConfig indexerConfig,BaseConfig baseConfig){
  this.name=indexerConfig.getName();
  this.preselect=indexerConfig.isPreselect();
  this.categories=indexerConfig.getEnabledCategories();
  this.showOnSearch=indexerConfig.isEligibleForInternalSearch(baseConfig.getSearching().isIgnoreTemporarilyDisabled());
  this.enabledForSearchSource=indexerConfig.getEnabledForSearchSource().name();
  this.searchModuleType=indexerConfig.getSearchModuleType().name();
}
Program: 35269
Project: 35269
Buggy source:
protected void handleSuccess(IndexerApiAccessType accessType,Long responseTime){
  getConfig().setState(IndexerConfig.State.ENABLED);
  configProvider.getBaseConfig().saveSafe();
  saveApiAccess(accessType,responseTime,IndexerAccessResult.SUCCESSFUL,true);
}

Fixed version (ground truth):
protected void handleSuccess(IndexerApiAccessType accessType,Long responseTime){
  getConfig().setState(IndexerConfig.State.ENABLED);
  getConfig().setLastError(null);
  getConfig().setDisabledUntil(null);
  getConfig().setDisabledLevel(0);
  configProvider.getBaseConfig().saveInternal();
  saveApiAccess(accessType,responseTime,IndexerAccessResult.SUCCESSFUL,true);
}
Program: 35270
Project: 35270
Buggy source:
protected void handleIndexerAccessException(IndexerAccessException e,IndexerApiAccessType accessType){
  boolean disablePermanently=false;
  IndexerAccessResult apiAccessResult;
  String message=e.getMessage();
  if (e instanceof IndexerAuthException) {
    error("String_Node_Str");
    disablePermanently=true;
    apiAccessResult=IndexerAccessResult.AUTH_ERROR;
  }
 else   if (e instanceof IndexerErrorCodeException) {
    error(message);
    apiAccessResult=IndexerAccessResult.API_ERROR;
  }
 else   if (e instanceof IndexerUnreachableException) {
    message=e.getCause() != null ? e.getCause().getMessage() : e.getMessage();
    error(message);
    apiAccessResult=IndexerAccessResult.CONNECTION_ERROR;
  }
 else {
    saveApiAccess(accessType,null,IndexerAccessResult.HYDRA_ERROR,false);
    return;
  }
  handleFailure(e.getMessage(),disablePermanently,accessType,null,apiAccessResult);
}

Fixed version (ground truth):
protected void handleIndexerAccessException(IndexerAccessException e,IndexerApiAccessType accessType){
  boolean disablePermanently=false;
  IndexerAccessResult apiAccessResult;
  String message=e.getMessage();
  if (e instanceof IndexerAuthException) {
    error("String_Node_Str");
    disablePermanently=true;
    apiAccessResult=IndexerAccessResult.AUTH_ERROR;
  }
 else   if (e instanceof IndexerErrorCodeException) {
    error(message);
    apiAccessResult=IndexerAccessResult.API_ERROR;
  }
 else   if (e instanceof IndexerUnreachableException) {
    message=e.getCause() != null ? e.getCause().getMessage() : e.getMessage();
    error(message);
    apiAccessResult=IndexerAccessResult.CONNECTION_ERROR;
  }
 else {
    saveApiAccess(accessType,null,IndexerAccessResult.HYDRA_ERROR,true);
    error("String_Node_Str" + e.getMessage());
    return;
  }
  handleFailure(e.getMessage(),disablePermanently,accessType,null,apiAccessResult);
}
Program: 35271
Project: 35271
Buggy source:
protected void handleFailure(String reason,Boolean disablePermanently,IndexerApiAccessType accessType,Long responseTime,IndexerAccessResult accessResult){
  if (disablePermanently) {
    getLogger().warn("String_Node_Str",indexer.getName());
    getConfig().setState(IndexerConfig.State.DISABLED_SYSTEM);
  }
 else {
    getConfig().setState(IndexerConfig.State.DISABLED_SYSTEM_TEMPORARY);
    getConfig().setDisabledLevel(getConfig().getDisabledLevel() + 1);
    long minutesToAdd=DISABLE_PERIODS.get(Math.min(DISABLE_PERIODS.size() - 1,getConfig().getDisabledLevel()));
    getConfig().setDisabledUntil(Instant.now().plus(minutesToAdd,ChronoUnit.MINUTES).toEpochMilli());
    getLogger().warn("String_Node_Str",indexer.getName(),getConfig().getDisabledUntil());
  }
  getConfig().setLastError(reason);
  configProvider.getBaseConfig().saveSafe();
  saveApiAccess(accessType,responseTime,accessResult,false);
}

Fixed version (ground truth):
protected void handleFailure(String reason,Boolean disablePermanently,IndexerApiAccessType accessType,Long responseTime,IndexerAccessResult accessResult){
  if (disablePermanently) {
    getLogger().warn("String_Node_Str",indexer.getName());
    getConfig().setState(IndexerConfig.State.DISABLED_SYSTEM);
  }
 else {
    getConfig().setState(IndexerConfig.State.DISABLED_SYSTEM_TEMPORARY);
    getConfig().setDisabledLevel(getConfig().getDisabledLevel() + 1);
    long minutesToAdd=DISABLE_PERIODS.get(Math.min(DISABLE_PERIODS.size() - 1,getConfig().getDisabledLevel()));
    Instant disabledUntil=Instant.now().plus(minutesToAdd,ChronoUnit.MINUTES);
    getConfig().setDisabledUntil(disabledUntil.toEpochMilli());
    getLogger().warn("String_Node_Str",indexer.getName(),disabledUntil,getConfig().getDisabledLevel());
  }
  getConfig().setLastError(reason);
  configProvider.getBaseConfig().saveInternal();
  saveApiAccess(accessType,responseTime,accessResult,false);
}
Program: 35272
Project: 35272
Buggy source:
protected List<IndexerStatus> getSortedStatuses(){
  return configProvider.getBaseConfig().getIndexers().stream().sorted(Comparator.comparing(IndexerConfig::getState).thenComparing(o -> o.getName().toLowerCase())).map(x -> new IndexerStatus(x.getName(),x.getState().name(),x.getDisabledLevel(),(x.getDisabledUntil() == null ? null : Instant.ofEpochMilli(x.getDisabledUntil())),x.getLastError().orElse(null))).collect(Collectors.toList());
}

Fixed version (ground truth):
protected List<IndexerStatus> getSortedStatuses(){
  return configProvider.getBaseConfig().getIndexers().stream().sorted(Comparator.comparing(IndexerConfig::getState).thenComparing(o -> o.getName().toLowerCase())).map(x -> new IndexerStatus(x.getName(),x.getState().name(),x.getDisabledLevel(),(x.getDisabledUntil() == null ? null : Instant.ofEpochMilli(x.getDisabledUntil())),x.getLastError())).collect(Collectors.toList());
}
Program: 35273
Project: 35273
Buggy source:
private List<CheckCapsResponse> checkCaps(CapsCheckRequest.CheckType checkType){
  List<IndexerConfig> configsToCheck=configProvider.getBaseConfig().getIndexers().stream().filter(x -> {
    return x.getState() == IndexerConfig.State.ENABLED && x.isConfigComplete() && (checkType == CheckType.ALL || !x.isAllCapsChecked());
  }
).collect(Collectors.toList());
  logger.info("String_Node_Str",configsToCheck.stream().map(IndexerConfig::getName).collect(Collectors.joining("String_Node_Str")));
  if (configsToCheck.isEmpty()) {
    return Collections.emptyList();
  }
  ExecutorService executor=Executors.newFixedThreadPool(configsToCheck.size());
  List<CheckCapsResponse> responses=new ArrayList<>();
  try {
    List<Future<CheckCapsResponse>> futures=executor.invokeAll(configsToCheck.stream().map(x -> (Callable<CheckCapsResponse>)() -> checkCaps(x)).collect(Collectors.toList()));
    for (    Future<CheckCapsResponse> future : futures) {
      try {
        responses.add(future.get());
      }
 catch (      ExecutionException e) {
        logger.error("String_Node_Str",e);
      }
    }
  }
 catch (  InterruptedException e) {
    logger.error("String_Node_Str",e);
  }
  return responses;
}

Fixed version (ground truth):
private List<CheckCapsResponse> checkCaps(CapsCheckRequest.CheckType checkType){
  List<IndexerConfig> configsToCheck=configProvider.getBaseConfig().getIndexers().stream().filter(x -> {
    return x.getState() == IndexerConfig.State.ENABLED && x.isConfigComplete() && (checkType == CheckType.ALL || !x.isAllCapsChecked());
  }
).collect(Collectors.toList());
  logger.info("String_Node_Str",configsToCheck.stream().map(IndexerConfig::getName).collect(Collectors.joining("String_Node_Str")));
  if (configsToCheck.isEmpty()) {
    return Collections.emptyList();
  }
  ExecutorService executor=Executors.newFixedThreadPool(configsToCheck.size());
  List<CheckCapsResponse> responses=new ArrayList<>();
  try {
    List<Future<CheckCapsResponse>> futures=executor.invokeAll(configsToCheck.stream().map(x -> (Callable<CheckCapsResponse>)() -> checkCaps(x)).collect(Collectors.toList()));
    for (    Future<CheckCapsResponse> future : futures) {
      try {
        responses.add(future.get());
      }
 catch (      ExecutionException e) {
        logger.error("String_Node_Str",e);
      }
    }
  }
 catch (  InterruptedException e) {
    logger.error("String_Node_Str",e);
  }
 finally {
    executor.shutdown();
  }
  return responses;
}
Program: 35274
Project: 35274
Buggy source:
protected ResponseEntity<?> getNzb(NewznabParameters params) throws MissingParameterException, UnknownErrorException {
  if (Strings.isNullOrEmpty(params.getId())) {
    throw new MissingParameterException("String_Node_Str");
  }
  DownloadResult downloadResult=null;
  try {
    downloadResult=fileHandler.getFileByGuid(Long.valueOf(params.getId()),configProvider.getBaseConfig().getSearching().getNzbAccessType(),SearchSource.API);
  }
 catch (  InvalidSearchResultIdException e) {
    return ResponseEntity.ok().contentType(MediaType.APPLICATION_XML).body("String_Node_Str");
  }
  if (!downloadResult.isSuccessful()) {
    throw new UnknownErrorException(downloadResult.getError());
  }
  return downloadResult.getAsResponseEntity();
}

Fixed version (ground truth):
protected ResponseEntity<?> getNzb(NewznabParameters params) throws MissingParameterException, UnknownErrorException {
  if (Strings.isNullOrEmpty(params.getId())) {
    throw new MissingParameterException("String_Node_Str");
  }
  DownloadResult downloadResult;
  try {
    downloadResult=fileHandler.getFileByGuid(Long.valueOf(params.getId()),configProvider.getBaseConfig().getSearching().getNzbAccessType(),SearchSource.API);
  }
 catch (  InvalidSearchResultIdException e) {
    return ResponseEntity.ok().contentType(MediaType.APPLICATION_XML).body("String_Node_Str");
  }
  if (!downloadResult.isSuccessful()) {
    throw new UnknownErrorException(downloadResult.getError());
  }
  return downloadResult.getAsResponseEntity();
}
Program: 35278
Project: 35278
Buggy source:
@Transactional public MigrationResult migrateFromFiles(String settingsFile,String databaseFile,boolean doMigrateDatabase){
  logger.info("String_Node_Str",settingsFile,databaseFile);
  Map<String,String> migrationData=new HashMap<>();
  migrationData.put("String_Node_Str",databaseFile);
  migrationData.put("String_Node_Str",String.valueOf(doMigrateDatabase));
  try {
    migrationData.put("String_Node_Str",new String(Files.readAllBytes(new File(settingsFile).toPath())));
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return MigrationResult.requirementsNotMet("String_Node_Str" + e);
  }
  MigrationResult migrationResult=new MigrationResult();
  migrationResult.setConfigMigrated(false);
  migrationResult.setDatabaseMigrated(false);
  if (!new File(databaseFile).exists()) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
 else   if (!new File(settingsFile).exists()) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
  return startMigration(migrationData);
}

Fixed version (ground truth):
@Transactional public MigrationResult migrateFromFiles(String settingsFile,String databaseFile,boolean doMigrateDatabase){
  logger.info("String_Node_Str",settingsFile,databaseFile);
  if (doMigrateDatabase && databaseFile == null) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
  if (settingsFile == null) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
  Map<String,String> migrationData=new HashMap<>();
  migrationData.put("String_Node_Str",databaseFile);
  migrationData.put("String_Node_Str",String.valueOf(doMigrateDatabase));
  try {
    migrationData.put("String_Node_Str",new String(Files.readAllBytes(new File(settingsFile).toPath())));
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return MigrationResult.requirementsNotMet("String_Node_Str" + e);
  }
  MigrationResult migrationResult=new MigrationResult();
  migrationResult.setConfigMigrated(false);
  migrationResult.setDatabaseMigrated(false);
  if (doMigrateDatabase && !new File(databaseFile).exists()) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
 else   if (!new File(settingsFile).exists()) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
  return startMigration(migrationData);
}
Program: 35279
Project: 35279
Buggy source:
@Secured({"String_Node_Str"}) @RequestMapping(value="String_Node_Str",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_VALUE) public MigrationResult migrateFromFiles(@RequestParam(name="String_Node_Str") String settingsFile,@RequestParam(name="String_Node_Str") String dbFile,@RequestParam(name="String_Node_Str") boolean doMigrateDatabase) throws IOException {
  messages.clear();
  return migration.migrateFromFiles(settingsFile,dbFile,doMigrateDatabase);
}

Fixed version (ground truth):
@Secured({"String_Node_Str"}) @RequestMapping(value="String_Node_Str",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_VALUE) public MigrationResult migrateFromFiles(@RequestParam(name="String_Node_Str") String settingsFile,@RequestParam(name="String_Node_Str",required=false) String dbFile,@RequestParam(name="String_Node_Str") boolean doMigrateDatabase) throws IOException {
  messages.clear();
  return migration.migrateFromFiles(settingsFile,dbFile,doMigrateDatabase);
}
Program: 35280
Project: 35280
Buggy source:
@RequestMapping(value="String_Node_Str") public String delete() throws Exception {
  migration.migrateFromUrl("String_Node_Str");
  return "String_Node_Str";
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str") public String delete() throws Exception {
  migration.migrateFromUrl("String_Node_Str",true);
  return "String_Node_Str";
}
Program: 35281
Project: 35281
Buggy source:
@Transactional public MigrationResult migrateFromFiles(String settingsFile,String databaseFile){
  logger.info("String_Node_Str",settingsFile,databaseFile);
  Map<String,String> migrationData=new HashMap<>();
  migrationData.put("String_Node_Str",databaseFile);
  try {
    migrationData.put("String_Node_Str",new String(Files.readAllBytes(new File(settingsFile).toPath())));
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return MigrationResult.requirementsNotMet("String_Node_Str" + e);
  }
  MigrationResult migrationResult=new MigrationResult();
  migrationResult.setConfigMigrated(false);
  migrationResult.setDatabaseMigrated(false);
  if (!new File(databaseFile).exists()) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
 else   if (!new File(settingsFile).exists()) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
  return startMigration(migrationData);
}

Fixed version (ground truth):
@Transactional public MigrationResult migrateFromFiles(String settingsFile,String databaseFile,boolean doMigrateDatabase){
  logger.info("String_Node_Str",settingsFile,databaseFile);
  Map<String,String> migrationData=new HashMap<>();
  migrationData.put("String_Node_Str",databaseFile);
  migrationData.put("String_Node_Str",String.valueOf(doMigrateDatabase));
  try {
    migrationData.put("String_Node_Str",new String(Files.readAllBytes(new File(settingsFile).toPath())));
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return MigrationResult.requirementsNotMet("String_Node_Str" + e);
  }
  MigrationResult migrationResult=new MigrationResult();
  migrationResult.setConfigMigrated(false);
  migrationResult.setDatabaseMigrated(false);
  if (!new File(databaseFile).exists()) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
 else   if (!new File(settingsFile).exists()) {
    return MigrationResult.requirementsNotMet("String_Node_Str");
  }
  return startMigration(migrationData);
}