nus-yam/ex-repair huggingface dataset:
Program: 173931
Project: 173931
Buggy source:
public static boolean startCompany(String playerName,String companyName,StockSpace startSpace){
  Player player=Game.getPlayerManager().getPlayerByName(playerName);
  PublicCompany company=(PublicCompany)Game.getCompanyManager().getPublicCompany(companyName);
  if (player.getCash() >= startSpace.getPrice() * 2) {
    company.setParPrice(startSpace);
    company.setClosed(false);
    Bank.transferCash(player,company,startSpace.getPrice() * 2);
    return true;
  }
 else   return false;
}

Fixed version (ground truth):
public static boolean startCompany(String playerName,String companyName,StockSpace startSpace){
  Player player=Game.getPlayerManager().getPlayerByName(playerName);
  PublicCompany company=(PublicCompany)Game.getCompanyManager().getPublicCompany(companyName);
  Certificate cert=(Certificate)Bank.getIpo().getCertificates().get(0);
  if (player.getCash() >= (startSpace.getPrice() * 2)) {
    company.setParPrice(startSpace);
    company.setClosed(false);
    int price=startSpace.getPrice() * (cert.getShare() / company.getShareUnit());
    Bank.transferCash(player,company,price);
    return true;
  }
 else   return false;
}
Program: 173932
Project: 173932
Buggy source:
public void actionPerformed(ActionEvent arg0){
  try {
    String companySelected=companyStatus.getCompanySelected();
    CompanyManager cm=(CompanyManager)Game.getCompanyManager();
    PublicCompany co=(PublicCompany)cm.getPublicCompany(companySelected);
    StockMarket stockMarket=(StockMarket)Game.getStockMarket();
    if (arg0.getActionCommand().equalsIgnoreCase("String_Node_Str")) {
      Player p;
      PublicCompany c;
      int[] x;
      if (playerStatus.getPlayerSelected() == null && companyStatus.getCompanySelected() == null) {
        x=certStatus.findLabelPosition(certStatus.getSelectedLabel());
        p=(Player)Game.getPlayerManager().getPlayersArrayList().get(x[1] - 1);
        c=(PublicCompany)Game.getCompanyManager().getAllPublicCompanies().get(x[0] - 1);
      }
 else {
        p=Game.getPlayerManager().getPlayerByName(playerStatus.getPlayerSelected());
        c=(PublicCompany)Game.getCompanyManager().getPublicCompany(companyStatus.getCompanySelected());
      }
      if (p.hasBoughtStockThisTurn()) {
        JOptionPane.showMessageDialog(this,"String_Node_Str");
        return;
      }
      try {
        p.buyShare((Certificate)c.getPortfolio().getNextAvailableCertificate(c));
      }
 catch (      NullPointerException e) {
        companyStatus.setCompanySelected(c.getName());
        playerStatus.setPlayerSelected(p.getName());
        startCompany();
      }
      playerStatus.setPlayerSelected(null);
      companyStatus.setCompanySelected(null);
      repaint();
    }
  }
 catch (  NullPointerException e) {
    JOptionPane.showMessageDialog(this,"String_Node_Str");
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent arg0){
  if (arg0.getActionCommand().equalsIgnoreCase("String_Node_Str")) {
    buyButtonClicked();
  }
}
Program: 173933
Project: 173933
Buggy source:
private void startCompany(){
  String companySelected=companyStatus.getCompanySelected();
  CompanyManager cm=(CompanyManager)Game.getCompanyManager();
  StockMarket stockMarket=(StockMarket)Game.getStockMarket();
  PublicCompany co=(PublicCompany)cm.getPublicCompany(companySelected);
  if (companyStatus.getCompanySelected() != null && playerStatus.getPlayerSelected() != null) {
    StockSpace sp=(StockSpace)JOptionPane.showInputDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE,null,stockMarket.getStartSpaces().toArray(),stockMarket.getStartSpaces().get(0));
    PublicCompany.startCompany(playerStatus.getPlayerSelected(),companyStatus.getCompanySelected(),sp);
    Player player=Game.getPlayerManager().getPlayerByName(playerStatus.getPlayerSelected());
    player.buyShare((Certificate)co.getCertificates().get(0));
    StockChart.refreshStockPanel();
  }
 else   JOptionPane.showMessageDialog(this,"String_Node_Str" + "String_Node_Str","String_Node_Str",JOptionPane.OK_OPTION);
}

Fixed version (ground truth):
private void startCompany(){
  StockMarket stockMarket=(StockMarket)Game.getStockMarket();
  if (companyStatus.getCompanySelected() != null && playerStatus.getPlayerSelected() != null) {
    StockSpace sp=(StockSpace)JOptionPane.showInputDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE,null,stockMarket.getStartSpaces().toArray(),stockMarket.getStartSpaces().get(0));
    PublicCompany.startCompany(playerStatus.getPlayerSelected(),companyStatus.getCompanySelected(),sp);
    Player player=Game.getPlayerManager().getPlayerByName(playerStatus.getPlayerSelected());
    player.buyShare((Certificate)company.getCertificates().get(0));
    StockChart.refreshStockPanel();
  }
 else   JOptionPane.showMessageDialog(this,"String_Node_Str" + "String_Node_Str","String_Node_Str",JOptionPane.OK_OPTION);
}
Program: 173934
Project: 173934
Buggy source:
public void refreshStatus(){
  companyStatus.refreshPanel();
  playerStatus.refreshPanel();
  certStatus.refreshPanel();
  updateStatus();
  this.pack();
  System.out.println(this.getWidth() + "String_Node_Str" + this.getHeight());
}

Fixed version (ground truth):
public void refreshStatus(){
  companyStatus.refreshPanel();
  playerStatus.refreshPanel();
  certStatus.refreshPanel();
  updateStatus();
  this.pack();
  System.out.println("String_Node_Str" + this.getWidth() + "String_Node_Str"+ this.getHeight());
}
Program: 173935
Project: 173935
Buggy source:
/** 
 * @param share
 * @throws NullPointerException if company hasn't started yet. UI needs to handle this.
 */
public void buyShare(Certificate share) throws NullPointerException {
  if (hasBoughtStockThisTurn)   return;
  for (int i=0; i < companiesSoldThisTurn.size(); i++) {
    if (share.company.getName().equalsIgnoreCase(companiesSoldThisTurn.get(i).toString()))     return;
  }
  if (portfolio.getCertificates().size() >= playerCertificateLimit)   return;
  try {
    getPortfolio().buyCertificate(share,share.getPortfolio(),share.getCompany().getCurrentPrice().getPrice());
  }
 catch (  NullPointerException e) {
    throw e;
  }
  Game.getPlayerManager().setBoughtStockLast(this);
  hasBoughtStockThisTurn=true;
}

Fixed version (ground truth):
public void buyShare(Certificate share) throws NullPointerException {
  try {
    buyShare(share,share.getCompany().getCurrentPrice().getPrice());
  }
 catch (  NullPointerException e) {
    throw e;
  }
}
Program: 173936
Project: 173936
Buggy source:
public static boolean startCompany(String playerName,String companyName,StockSpace startSpace){
  Player player=Game.getPlayerManager().getPlayerByName(playerName);
  PublicCompany company=(PublicCompany)Game.getCompanyManager().getPublicCompany(companyName);
  Certificate cert=(Certificate)Bank.getIpo().getCertificates().get(0);
  if (player.getCash() >= (startSpace.getPrice() * 2)) {
    company.setParPrice(startSpace);
    company.setClosed(false);
    int price=startSpace.getPrice() * (cert.getShare() / company.getShareUnit());
    Bank.transferCash(player,company,price);
    return true;
  }
 else   return false;
}

Fixed version (ground truth):
public static boolean startCompany(String playerName,String companyName,StockSpace startSpace){
  Player player=Game.getPlayerManager().getPlayerByName(playerName);
  PublicCompany company=(PublicCompany)Game.getCompanyManager().getPublicCompany(companyName);
  Certificate cert=(Certificate)Bank.getIpo().getCertificates().get(0);
  if (player.getCash() >= (startSpace.getPrice() * (cert.getShare() / company.getShareUnit()))) {
    company.setParPrice(startSpace);
    company.setClosed(false);
    int price=startSpace.getPrice() * (cert.getShare() / company.getShareUnit());
    player.buyShare(cert,price);
    return true;
  }
 else   return false;
}
Program: 173937
Project: 173937
Buggy source:
private void startCompany(){
  StockMarket stockMarket=(StockMarket)Game.getStockMarket();
  if (companyStatus.getCompanySelected() != null && playerStatus.getPlayerSelected() != null) {
    StockSpace sp=(StockSpace)JOptionPane.showInputDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE,null,stockMarket.getStartSpaces().toArray(),stockMarket.getStartSpaces().get(0));
    PublicCompany.startCompany(playerStatus.getPlayerSelected(),companyStatus.getCompanySelected(),sp);
    Player player=Game.getPlayerManager().getPlayerByName(playerStatus.getPlayerSelected());
    player.buyShare((Certificate)company.getCertificates().get(0));
    StockChart.refreshStockPanel();
  }
 else   JOptionPane.showMessageDialog(this,"String_Node_Str" + "String_Node_Str","String_Node_Str",JOptionPane.OK_OPTION);
}

Fixed version (ground truth):
private void startCompany(){
  StockMarket stockMarket=(StockMarket)Game.getStockMarket();
  if (companyStatus.getCompanySelected() != null && playerStatus.getPlayerSelected() != null) {
    StockSpace sp=(StockSpace)JOptionPane.showInputDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE,null,stockMarket.getStartSpaces().toArray(),stockMarket.getStartSpaces().get(0));
    PublicCompany.startCompany(playerStatus.getPlayerSelected(),companyStatus.getCompanySelected(),sp);
    StockChart.refreshStockPanel();
  }
 else   JOptionPane.showMessageDialog(this,"String_Node_Str" + "String_Node_Str","String_Node_Str",JOptionPane.OK_OPTION);
}
Program: 173939
Project: 173939
Buggy source:
public void mouseClicked(MouseEvent arg0){
  StockTest.StockUITest();
}

Fixed version (ground truth):
public void mouseClicked(MouseEvent arg0){
  System.out.println("String_Node_Str");
  StockTest.StockUITest();
}
Program: 173940
Project: 173940
Buggy source:
private void initialize(){
  gc=new GridBagConstraints();
  optionsPane=new JPanel();
  playersPane=new JPanel();
  buttonPane=new JPanel();
  newButton=new JButton("String_Node_Str");
  this.setLayout(new GridBagLayout());
  this.setTitle("String_Node_Str");
  this.setPreferredSize(new Dimension(300,400));
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  playersPane.add(new JLabel("String_Node_Str"));
  playersPane.setBorder(BorderFactory.createLoweredBevelBorder());
  optionsPane.add(new JLabel("String_Node_Str"));
  optionsPane.setBorder(BorderFactory.createLoweredBevelBorder());
  buttonPane.add(newButton);
  buttonPane.addMouseListener(this);
  buttonPane.setBorder(BorderFactory.createLoweredBevelBorder());
}

Fixed version (ground truth):
private void initialize(){
  gc=new GridBagConstraints();
  optionsPane=new JPanel();
  playersPane=new JPanel();
  buttonPane=new JPanel();
  newButton=new JButton("String_Node_Str");
  loadButton=new JButton("String_Node_Str");
  this.setLayout(new GridBagLayout());
  this.setTitle("String_Node_Str");
  this.setPreferredSize(new Dimension(300,400));
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  playersPane.add(new JLabel("String_Node_Str"));
  playersPane.setBorder(BorderFactory.createLoweredBevelBorder());
  optionsPane.add(new JLabel("String_Node_Str"));
  optionsPane.setBorder(BorderFactory.createLoweredBevelBorder());
  newButton.addMouseListener(this);
  buttonPane.add(newButton);
  buttonPane.add(loadButton);
  buttonPane.setBorder(BorderFactory.createLoweredBevelBorder());
}
Program: 173941
Project: 173941
Buggy source:
public static void NewGame(String gameName,ArrayList playerNames){
  initialise(gameName);
  companyManager=(CompanyManagerI)getCompanyManager();
  companyList=(ArrayList)companyManager.getAllPublicCompanies();
  stockMarket=(StockMarket)getStockMarket();
  players=new Player[playerNames.size()];
  for (int i=0; i < playerNames.size(); i++) {
    players[i]=new Player(playerNames.get(i).toString());
  }
  Player.initPlayers(players);
}

Fixed version (ground truth):
public static void NewGame(String gameName,ArrayList playerNames){
  initialise(gameName);
  companyManager=getCompanyManager();
  companyList=(ArrayList)companyManager.getAllPublicCompanies();
  stockMarket=getStockMarket();
  playerManager=getPlayerManager(playerNames);
}
Program: 173942
Project: 173942
Buggy source:
public void sellShare(Stock share){
}

Fixed version (ground truth):
public int sellShare(Certificate share){
  Portfolio.sellCertificate(share,portfolio,share.getCompany().getCurrentPrice().getPrice());
  return 1;
}
Program: 173943
Project: 173943
Buggy source:
public void buyShare(Stock share){
}

Fixed version (ground truth):
public int buyShare(Certificate share){
  if (hasBoughtStockThisTurn)   return 0;
  for (int i=0; i < companiesSoldThisTurn.size(); i++) {
    if (share.company.getName().equalsIgnoreCase(companiesSoldThisTurn.get(i).toString()))     return 0;
  }
  if (portfolio.getCertificates().size() >= playerCertificateLimit)   return 0;
  share.getPortfolio().buyCertificate(share,this.portfolio,share.getCompany().getCurrentPrice().getPrice());
  Game.getPlayerManager().setBoughtStockLast(this);
  hasBoughtStockThisTurn=true;
  return 1;
}
Program: 173944
Project: 173944
Buggy source:
private void populateStockPanel(){
  game.StockPrice[][] market=modelChart.getStockChart();
  stockGrid.setColumns(market[0].length);
  stockGrid.setRows(market.length);
  for (int x=0; x < market.length; x++) {
    for (int y=0; y < market.length; y++) {
      JTextField foo;
      try {
        foo=new JTextField(Integer.toString(market[x][y].getPrice()));
      }
 catch (      NullPointerException e) {
        foo=new JTextField("String_Node_Str");
        foo.setBorder(null);
      }
      try {
        setStockBGColor(market[x][y].getColour(),foo);
      }
 catch (      NullPointerException e) {
        foo.setBackground(Color.WHITE);
      }
      foo.setEditable(false);
      stockPanel.add(foo);
    }
  }
}

Fixed version (ground truth):
private void populateStockPanel(){
  game.StockPrice[][] market=modelChart.getStockChart();
  stockGrid.setColumns(market[0].length);
  stockGrid.setRows(market.length);
  for (int x=0; x < market.length; x++) {
    for (int y=0; y < market[0].length; y++) {
      JTextField foo;
      try {
        foo=new JTextField(Integer.toString(market[x][y].getPrice()));
      }
 catch (      NullPointerException e) {
        foo=new JTextField("String_Node_Str");
        foo.setBorder(null);
      }
      try {
        setStockBGColor(market[x][y].getColour(),foo);
      }
 catch (      NullPointerException e) {
        foo.setBackground(Color.WHITE);
      }
      foo.setEditable(false);
      stockPanel.add(foo);
    }
  }
}
Program: 173945
Project: 173945
Buggy source:
public void print(boolean printable){
  httpClientBase.print(printable);
}

Fixed version (ground truth):
public static void print(boolean printable){
  httpClientBase.print(printable);
}
Program: 173946
Project: 173946
Buggy source:
public void print(boolean printable){
  if (printable) {
    if (-1 == client.networkInterceptors().indexOf(networkInterceptor)) {
      client=client.newBuilder().addNetworkInterceptor(networkInterceptor).build();
    }
  }
 else {
    client.networkInterceptors().remove(networkInterceptor);
  }
}

Fixed version (ground truth):
public void print(boolean printable){
  if (printable) {
    if (-1 == client.networkInterceptors().indexOf(networkInterceptor)) {
      client=client.newBuilder().addNetworkInterceptor(networkInterceptor).build();
    }
  }
 else {
  }
}
Program: 173947
Project: 173947
Buggy source:
public static void addUseAsBaseType(Class<?> clazz){
  USE_AS_BASE_TYPES.add(clazz);
}

Fixed version (ground truth):
public static void addUseAsBaseType(Class<?> clazz){
  if (null == clazz) {
    throw new NullPointerException();
  }
  if (!isBaseType(clazz)) {
    USE_AS_BASE_TYPES.add(clazz);
  }
}
Program: 173948
Project: 173948
Buggy source:
public static boolean isUseAsBaseType(Class<?> clazz){
  if (null == clazz) {
    throw new NullPointerException();
  }
  return USE_AS_BASE_TYPES.contains(clazz);
}

Fixed version (ground truth):
public static boolean isUseAsBaseType(Class<?> clazz){
  if (null == clazz) {
    throw new NullPointerException();
  }
  return isBaseType(clazz) || USE_AS_BASE_TYPES.contains(clazz);
}
Program: 173949
Project: 173949
Buggy source:
/** 
 * Make sure there is #no cycle reference# in the from parameter
 * @param < T > the type of source object
 * @param from the object to be clone (make sure no cycle reference in the object)
 * @return the clone object
 */
public static <T>T deepClone(T from){
  if (null == from) {
    return null;
  }
  try {
    Class<?> clazz=from.getClass();
    if (clazz.isArray()) {
      int length=Array.getLength(from);
      @SuppressWarnings("String_Node_Str") T clone=(T)Array.newInstance(from.getClass().getComponentType(),length);
      for (int i=0; i < length; i++) {
        Array.set(clone,i,deepClone(Array.get(from,i)));
      }
      return clone;
    }
 else     if (isBaseType(clazz) || isUseAsBaseType(clazz)) {
      return from;
    }
 else {
      @SuppressWarnings("String_Node_Str") T clone=(T)clazz.newInstance();
      BeanCopier copier=getCopier(clazz,clazz);
      copier.copy(from,clone,new Converter(){
        @Override public Object convert(        Object value,        @SuppressWarnings("String_Node_Str") Class target,        Object context){
          return deepClone(value);
        }
      }
);
      return clone;
    }
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + from.getClass().getCanonicalName() + "String_Node_Str"+ from,e);
  }
}

Fixed version (ground truth):
/** 
 * Make sure there is #no cycle reference# in the from parameter
 * @param < T > the type of source object
 * @param from the object to be clone (make sure no cycle reference in the object)
 * @return the clone object
 */
public static <T>T deepClone(T from){
  if (null == from) {
    return null;
  }
  try {
    Class<?> clazz=from.getClass();
    if (clazz.isArray()) {
      int length=Array.getLength(from);
      @SuppressWarnings("String_Node_Str") T clone=(T)Array.newInstance(from.getClass().getComponentType(),length);
      for (int i=0; i < length; i++) {
        Array.set(clone,i,deepClone(Array.get(from,i)));
      }
      return clone;
    }
 else     if (isBaseType(clazz) || isUseAsBaseType(clazz)) {
      return from;
    }
 else {
      @SuppressWarnings("String_Node_Str") T clone=(T)clazz.newInstance();
      BeanCopier copier=getCopier(clazz,clazz);
      copier.copy(from,clone,new Converter(){
        @Override public Object convert(        Object value,        @SuppressWarnings("String_Node_Str") Class target,        Object context){
          return deepClone(value);
        }
      }
);
      return clone;
    }
  }
 catch (  Throwable t) {
    throw new RuntimeException("String_Node_Str" + from.getClass().getCanonicalName() + "String_Node_Str"+ from,t);
  }
}
Program: 173950
Project: 173950
Buggy source:
public static void addBaseType(Class<?> clazz){
  BASE_TYPES.add(clazz);
}

Fixed version (ground truth):
public static void addBaseType(Class<?> clazz){
  if (null == clazz) {
    throw new NullPointerException();
  }
  BASE_TYPES.add(clazz);
}
Program: 173952
Project: 173952
Buggy source:
/** 
 * Test for   {@link Arrays#isEmpty(java.lang.Object[])}.
 */
@Test public void testIsEmptyObject(){
  final Object[] emptyArray=new Object[]{};
  final Object[] notEmptyArray=new Object[]{new String("String_Node_Str")};
  assertTrue(Arrays.isEmpty((Object[])null));
  assertTrue(Arrays.isEmpty(emptyArray));
  assertFalse(Arrays.isEmpty(notEmptyArray));
}

Fixed version (ground truth):
/** 
 * Test for {Arrays#isEmpty(java.lang.Object[])}.
 */
@Test public void testIsEmptyObject(){
  final Object[] emptyArray=new Object[]{};
  final Object[] notEmptyArray=new Object[]{new String("String_Node_Str")};
  assertTrue(Arrays.isEmpty((Object[])null));
  assertTrue(Arrays.isEmpty(emptyArray));
  assertFalse(Arrays.isEmpty(notEmptyArray));
}
Program: 173955
Project: 173955
Buggy source:
/** 
 * Test for   {@link Arrays#isNotEmpty(java.lang.Object[])}.
 */
@Test public void testIsNotEmptyObject(){
  final Object[] emptyArray=new Object[]{};
  final Object[] notEmptyArray=new Object[]{new String("String_Node_Str")};
  assertFalse(Arrays.isNotEmpty((Object[])null));
  assertFalse(Arrays.isNotEmpty(emptyArray));
  assertTrue(Arrays.isNotEmpty(notEmptyArray));
}

Fixed version (ground truth):
/** 
 * Test for {Arrays#isNotEmpty(java.lang.Object[])}.
 */
@Test public void testIsNotEmptyObject(){
  final Object[] emptyArray=new Object[]{};
  final Object[] notEmptyArray=new Object[]{new String("String_Node_Str")};
  assertFalse(Arrays.isNotEmpty((Object[])null));
  assertFalse(Arrays.isNotEmpty(emptyArray));
  assertTrue(Arrays.isNotEmpty(notEmptyArray));
}
Program: 173956
Project: 173956
Buggy source:
/** 
 * Test for   {@link Strings#isMixedCase(CharSequence)}.
 */
@Test public void testIsMixedCase(){
  assertFalse(Strings.isMixedCase(null));
  assertFalse(Strings.isMixedCase(Strings.EMPTY));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Test for {Strings#isMixedCase(CharSequence)}.
 */
@Test public void testIsMixedCase(){
  assertFalse(Strings.isMixedCase(null));
  assertFalse(Strings.isMixedCase(Strings.EMPTY));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertFalse(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
  assertTrue(Strings.isMixedCase("String_Node_Str"));
}
Program: 173957
Project: 173957
Buggy source:
/** 
 * Tests   {@link Strings#toString(byte[],String)}
 * @throws java.io.UnsupportedEncodingException because the method under test max throw it
 * @see Strings#toString(byte[],String)
 */
@Test public void testToString() throws UnsupportedEncodingException {
  final String expectedString="String_Node_Str";
  byte[] expectedBytes=expectedString.getBytes(Charset.defaultCharset());
  assertArrayEquals(expectedBytes,expectedString.getBytes());
  assertEquals(expectedString,Strings.toEncodedString(expectedBytes,null));
  assertEquals(expectedString,Strings.toEncodedString(expectedBytes,Charset.forName(System.getProperty("String_Node_Str"))));
  final String encoding="String_Node_Str";
  expectedBytes=expectedString.getBytes(Charset.forName(encoding));
  assertEquals(expectedString,Strings.toEncodedString(expectedBytes,Charset.forName(encoding)));
}

Fixed version (ground truth):
/** 
 * Tests {Strings#toString(byte[], String)}
 * @throws java.io.UnsupportedEncodingException because the method under test max throw it
 */
@Test public void testToString() throws UnsupportedEncodingException {
  final String expectedString="String_Node_Str";
  byte[] expectedBytes=expectedString.getBytes(Charset.defaultCharset());
  assertArrayEquals(expectedBytes,expectedString.getBytes());
  assertEquals(expectedString,Strings.toEncodedString(expectedBytes,null));
  assertEquals(expectedString,Strings.toEncodedString(expectedBytes,Charset.forName(System.getProperty("String_Node_Str"))));
  final String encoding="String_Node_Str";
  expectedBytes=expectedString.getBytes(Charset.forName(encoding));
  assertEquals(expectedString,Strings.toEncodedString(expectedBytes,Charset.forName(encoding)));
}
Program: 173958
Project: 173958
Buggy source:
/** 
 * Test for   {@link Strings#isAllUpperCase(CharSequence)}.
 */
@Test public void testIsAllUpperCase(){
  assertFalse(Strings.isAllUpperCase(null));
  assertFalse(Strings.isAllUpperCase(Strings.EMPTY));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertTrue(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Test for {Strings#isAllUpperCase(CharSequence)}.
 */
@Test public void testIsAllUpperCase(){
  assertFalse(Strings.isAllUpperCase(null));
  assertFalse(Strings.isAllUpperCase(Strings.EMPTY));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertTrue(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
  assertFalse(Strings.isAllUpperCase("String_Node_Str"));
}
Program: 173959
Project: 173959
Buggy source:
/** 
 * Test for   {@link Strings#isAllLowerCase(CharSequence)}.
 */
@Test public void testIsAllLowerCase(){
  assertFalse(Strings.isAllLowerCase(null));
  assertFalse(Strings.isAllLowerCase(Strings.EMPTY));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertTrue(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Test for {Strings#isAllLowerCase(CharSequence)}.
 */
@Test public void testIsAllLowerCase(){
  assertFalse(Strings.isAllLowerCase(null));
  assertFalse(Strings.isAllLowerCase(Strings.EMPTY));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertTrue(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
  assertFalse(Strings.isAllLowerCase("String_Node_Str"));
}
Program: 173960
Project: 173960
Buggy source:
/** 
 * A sanity check for   {@link Strings#EMPTY}.
 */
@Test public void testEMPTY(){
  assertNotNull(Strings.EMPTY);
  assertEquals("String_Node_Str",Strings.EMPTY);
  assertEquals(0,Strings.EMPTY.length());
}

Fixed version (ground truth):
/** 
 * A sanity check for {Strings#EMPTY}.
 */
@Test public void testEMPTY(){
  assertNotNull(Strings.EMPTY);
  assertEquals("String_Node_Str",Strings.EMPTY);
  assertEquals(0,Strings.EMPTY.length());
}
Program: 173963
Project: 173963
Buggy source:
/** 
 * Returns the hash code of a non-  {@code null} argument and 0 for a {@code null} argument.
 * @param o an object
 * @return the hash code of a non-{@code null} argument and 0 for a {@code null} argument
 * @see Object#hashCode
 */
public static <T>int hashCode(T o){
  if (null == o || !o.getClass().isArray()) {
    return java.util.Objects.hashCode(o);
  }
 else {
    String canonicalName=o.getClass().getCanonicalName();
    if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((int[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((short[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((long[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((float[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((double[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((boolean[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((char[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((byte[])o);
    }
 else {
      return java.util.Arrays.hashCode((Object[])o);
    }
  }
}

Fixed version (ground truth):
/** 
 * Returns the hash code of a non-  {@code null} argument and 0 for a {@code null} argument.
 * @param o an object
 * @return the hash code of a non-{@code null} argument and 0 for a {@code null} argument
 * @see Object#hashCode
 */
public static <T>int hashCode(T o){
  if (null == o || !o.getClass().isArray()) {
    return java.util.Objects.hashCode(o);
  }
 else {
    String canonicalName=o.getClass().getCanonicalName();
    if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((int[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((short[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((long[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((float[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((double[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((boolean[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((char[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((byte[])o);
    }
 else {
      return java.util.Arrays.deepHashCode((Object[])o);
    }
  }
}
Program: 173964
Project: 173964
Buggy source:
/** 
 * Make sure there is #no cycle reference# in the from parameter
 * @param < T > the type of source object
 * @param from the object to be clone (make sure no cycle reference in the object)
 * @return the clone object
 */
public static <T>T deepClone(T from){
  if (null == from) {
    return null;
  }
  try {
    Class<?> clazz=from.getClass();
    if (clazz.isArray()) {
      int length=Array.getLength(from);
      @SuppressWarnings("String_Node_Str") T clone=(T)Array.newInstance(from.getClass().getComponentType(),length);
      for (int i=0; i < length; i++) {
        Array.set(clone,i,deepClone(Array.get(from,i)));
      }
      return clone;
    }
 else     if (isBaseType(clazz)) {
      return from;
    }
 else {
      @SuppressWarnings("String_Node_Str") T clone=(T)clazz.newInstance();
      BeanCopier copier=getCopier(clazz,clazz);
      copier.copy(from,clone,new Converter(){
        @Override public Object convert(        Object value,        @SuppressWarnings("String_Node_Str") Class target,        Object context){
          return deepClone(value);
        }
      }
);
      return clone;
    }
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + from.getClass().getCanonicalName() + "String_Node_Str"+ from,e);
  }
}

Fixed version (ground truth):
/** 
 * Make sure there is #no cycle reference# in the from parameter
 * @param < T > the type of source object
 * @param from the object to be clone (make sure no cycle reference in the object)
 * @return the clone object
 */
public static <T>T deepClone(T from){
  if (null == from) {
    return null;
  }
  try {
    Class<?> clazz=from.getClass();
    if (clazz.isArray()) {
      int length=Array.getLength(from);
      @SuppressWarnings("String_Node_Str") T clone=(T)Array.newInstance(from.getClass().getComponentType(),length);
      for (int i=0; i < length; i++) {
        Array.set(clone,i,deepClone(Array.get(from,i)));
      }
      return clone;
    }
 else     if (isBaseType(clazz) || isUseAsBaseType(clazz)) {
      return from;
    }
 else {
      @SuppressWarnings("String_Node_Str") T clone=(T)clazz.newInstance();
      BeanCopier copier=getCopier(clazz,clazz);
      copier.copy(from,clone,new Converter(){
        @Override public Object convert(        Object value,        @SuppressWarnings("String_Node_Str") Class target,        Object context){
          return deepClone(value);
        }
      }
);
      return clone;
    }
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + from.getClass().getCanonicalName() + "String_Node_Str"+ from,e);
  }
}
Program: 173965
Project: 173965
Buggy source:
/** 
 * Returns   {@code true} if the arguments are deeply equal to each other and {@code false} otherwise.Two  {@code null} values are deeply equal. If both arguments are arrays, the algorithm in {@link java.util.Arrays#deepEquals(Object[],Object[]) java.util.Arrays.deepEquals}is used to determine equality. Otherwise, equality is determined by using the   {@link Object#equals equals} method of the first argument.
 * @param a an object
 * @param b an object to be compared with {@code a} for deep equality
 * @return {@code true} if the arguments are deeply equal to each other and {@code false} otherwise
 * @see java.util.Arrays#deepEquals(Object[],Object[])
 * @see java.util.Objects#equals(Object,Object)
 */
public static boolean deepEquals(Object a,Object b){
  return java.util.Objects.deepEquals(a,b);
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the arguments are deeply equal to each other and {@code false} otherwise.Two  {@code null} values are deeply equal. If both arguments are arrays, the algorithm in {@link java.util.Arrays#deepEquals(Object[],Object[]) java.util.Arrays.deepEquals} is used to determine equality. Otherwise, equality is determined by using the {@link Object#equals equals} method of thefirst argument.
 * @param a an object
 * @param b an object to be compared with {@code a} for deep equality
 * @return {@code true} if the arguments are deeply equal to each other and {@code false} otherwise
 * @see java.util.Arrays#deepEquals(Object[],Object[])
 * @see java.util.Objects#equals(Object,Object)
 */
public static boolean deepEquals(Object a,Object b){
  return java.util.Objects.deepEquals(a,b);
}
Program: 173966
Project: 173966
Buggy source:
public static boolean isWrapperType(Class<?> clazz){
  return WRAPPER_TYPES.contains(clazz);
}

Fixed version (ground truth):
public static boolean isWrapperType(Class<?> clazz){
  if (null == clazz) {
    throw new NullPointerException();
  }
  return WRAPPER_TYPES.contains(clazz);
}
Program: 173967
Project: 173967
Buggy source:
/** 
 * Returns the hash code of a non-  {@code null} argument and 0 for a {@code null} argument.
 * @param o an object
 * @return the hash code of a non-{@code null} argument and 0 for a {@code null} argument
 * @see Object#hashCode
 */
public static int hashCode(Object o){
  return java.util.Objects.hashCode(o);
}

Fixed version (ground truth):
/** 
 * Returns the hash code of a non-  {@code null} argument and 0 for a {@code null} argument.
 * @param o an object
 * @return the hash code of a non-{@code null} argument and 0 for a {@code null} argument
 * @see Object#hashCode
 */
public static <T>int hashCode(T o){
  if (null == o || !o.getClass().isArray()) {
    return java.util.Objects.hashCode(o);
  }
 else {
    String canonicalName=o.getClass().getCanonicalName();
    if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((int[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((short[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((long[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((float[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((double[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((boolean[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((char[])o);
    }
 else     if (canonicalName.equals("String_Node_Str")) {
      return java.util.Arrays.hashCode((byte[])o);
    }
 else {
      return java.util.Arrays.hashCode((Object[])o);
    }
  }
}
Program: 173968
Project: 173968
Buggy source:
/** 
 * Make sure there is #no cycle reference# in the from parameter
 * @param < T > the type of source object
 * @param from the object to be clone (make sure no cycle reference in the object)
 * @return the clone object
 */
public static <T>T deepClone(T from){
  try {
    if (null == from) {
      return null;
    }
    BeanCopier copier=getCopier(from.getClass(),from.getClass());
    if (from.getClass().isArray()) {
      int length=Array.getLength(from);
      @SuppressWarnings("String_Node_Str") T clone=(T)Array.newInstance(from.getClass().getComponentType(),length);
      for (int i=0; i < length; i++) {
        Array.set(clone,i,deepClone(Array.get(from,i)));
      }
      return clone;
    }
 else     if (isWrapperType(from.getClass())) {
      return from;
    }
 else {
      @SuppressWarnings("String_Node_Str") T clone=(T)from.getClass().newInstance();
      copier.copy(from,clone,new Converter(){
        @Override public Object convert(        Object pojo,        @SuppressWarnings("String_Node_Str") Class fieldType,        Object fieldName){
          return deepClone(pojo);
        }
      }
);
      return clone;
    }
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Make sure there is #no cycle reference# in the from parameter
 * @param < T > the type of source object
 * @param from the object to be clone (make sure no cycle reference in the object)
 * @return the clone object
 */
public static <T>T deepClone(T from){
  if (null == from) {
    return null;
  }
  try {
    Class<?> clazz=from.getClass();
    if (clazz.isArray()) {
      int length=Array.getLength(from);
      @SuppressWarnings("String_Node_Str") T clone=(T)Array.newInstance(from.getClass().getComponentType(),length);
      for (int i=0; i < length; i++) {
        Array.set(clone,i,deepClone(Array.get(from,i)));
      }
      return clone;
    }
 else     if (isBaseType(clazz)) {
      return from;
    }
 else {
      @SuppressWarnings("String_Node_Str") T clone=(T)clazz.newInstance();
      BeanCopier copier=getCopier(clazz,clazz);
      copier.copy(from,clone,new Converter(){
        @Override public Object convert(        Object value,        @SuppressWarnings("String_Node_Str") Class target,        Object context){
          return deepClone(value);
        }
      }
);
      return clone;
    }
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + from.getClass().getCanonicalName() + "String_Node_Str"+ from,e);
  }
}
Program: 173969
Project: 173969
Buggy source:
@Test public void testDeepClone(){
  byte b=1;
  b=Objects.deepClone(b);
  byte[] bytes=Objects.deepClone(new byte[10]);
  Array.getLength(bytes);
  Assert.assertTrue(10 == bytes.length);
  int[] ints=Objects.deepClone(new int[10]);
  Assert.assertTrue(10 == ints.length);
  PoJo pojo=new PoJo();
  pojo.setIn(0);
  ints[0]=1;
  pojo.setIns(ints);
  pojo.setObjs(new Object[10]);
  pojo.setStr("String_Node_Str");
  pojo.setStrs(new String[3]);
  bytes[9]=10;
  pojo.setBytes(bytes);
  pojo.getBytes()[2]=1;
  Assert.assertFalse(pojo == Objects.deepClone(pojo));
  Assert.assertTrue(0 == pojo.getIn());
  Assert.assertTrue(1 == pojo.getIns()[0]);
  Assert.assertTrue("String_Node_Str".equals(pojo.getStr()));
  Assert.assertTrue(10 == pojo.getBytes()[9]);
}

Fixed version (ground truth):
@Test public void testDeepClone(){
  BeanCopier bc=BeanCopier.create(String.class,String.class,false);
  String str=null;
  bc.copy("String_Node_Str",str,null);
  Assert.assertTrue(String.class.equals("String_Node_Str".getClass()));
  Assert.assertTrue(Objects.isBaseType("String_Node_Str".getClass()));
  Assert.assertTrue(Objects.isBaseType(String.class));
  Assert.assertTrue(Objects.isBaseType(Date.class));
  Assert.assertFalse(Objects.isWrapperType("String_Node_Str".getClass()));
  Assert.assertTrue(Objects.isWrapperType(new Boolean(false).getClass()));
  byte b=1;
  b=Objects.deepClone(b);
  byte[] bytes=Objects.deepClone(new byte[10]);
  Array.getLength(bytes);
  Assert.assertTrue(10 == bytes.length);
  int[] ints=Objects.deepClone(new int[10]);
  Assert.assertTrue(10 == ints.length);
  PoJo pojo=new PoJo();
  pojo.setIn(0);
  ints[0]=1;
  pojo.setIns(ints);
  pojo.setObjs(new Object[10]);
  pojo.setStr("String_Node_Str");
  pojo.setStrs(new String[3]);
  bytes[9]=10;
  pojo.setBytes(bytes);
  pojo.getBytes()[2]=1;
  Assert.assertFalse(pojo == Objects.deepClone(pojo));
  Assert.assertTrue(0 == pojo.getIn());
  Assert.assertTrue(1 == pojo.getIns()[0]);
  Assert.assertTrue("String_Node_Str".equals(pojo.getStr()));
  Assert.assertTrue(10 == pojo.getBytes()[9]);
  Assert.assertTrue(Objects.deepClone("String_Node_Str").equals("String_Node_Str"));
  String[] strs=Objects.deepClone(new String[]{"String_Node_Str","String_Node_Str"});
  Assert.assertTrue(strs[0].equals("String_Node_Str"));
}
Program: 173970
Project: 173970
Buggy source:
public static ObjectTextConvertor custom(final Encoding encoding,final String separate,final String linkbreak,final boolean withname,final String associate){
  return new ObjectTextConvertor(encoding,separate,linkbreak,withname,associate);
}

Fixed version (ground truth):
public static ObjectTextConvertor custom(final Encoding encoding,final Character separate,final String linkbreak,final boolean withname,final Character associate){
  return new ObjectTextConvertor(encoding,separate,linkbreak,withname,associate);
}
Program: 173973
Project: 173973
Buggy source:
public ObjectTextConvertor(Encoding encoding,String separate,String linebreak,boolean withname,String... associate){
  this.encoding=encoding;
  this.separate=separate;
  if (withname) {
    if (null == associate || null == associate[0] || 0 == associate[0].length()) {
      this.associate=associate[0];
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    this.associate=null;
  }
  this.linebreak=linebreak;
  this.baseTypeConvertor=new BaseTypeObjectStringConvertor(encoding);
  this.withname=withname;
}

Fixed version (ground truth):
public ObjectTextConvertor(Encoding encoding,Character separator,String linebreak,boolean withname,Character... associator){
  this.encoding=encoding;
  this.separator=separator;
  if (withname) {
    if (null == associator || null == associator[0]) {
      this.associator=associator[0];
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    this.associator=null;
  }
  this.linebreak=linebreak;
  this.baseTypeConvertor=new BaseTypeObjectStringConvertor(encoding);
  this.withname=withname;
}
Program: 173974
Project: 173974
Buggy source:
@Test public void testText() throws ReflectiveOperationException {
  TextPoJo pojo=new TextPoJo();
  pojo.setF1("String_Node_Str");
  pojo.setF3("String_Node_Str");
  String text=Objects.Text.toString(pojo);
  System.out.println(text);
}

Fixed version (ground truth):
@Test public void testText() throws ReflectiveOperationException {
  TextPoJo pojo=new TextPoJo();
  pojo.setF1("String_Node_Str");
  pojo.setF3("String_Node_Str");
  String text=Objects.Text.toString(pojo);
  System.out.println(text);
  TextPoJo pojo2=Objects.Text.toObject(text,TextPoJo.class);
  System.out.println(pojo2.getF1());
  System.out.println(pojo2.getF3());
  Assert.assertTrue(pojo2.getF1() == pojo2.getF1() && pojo2.getF1().equals("String_Node_Str"));
  Assert.assertTrue(pojo2.getF3() == pojo2.getF3() && pojo2.getF3().equals("String_Node_Str"));
}
Program: 173975
Project: 173975
Buggy source:
@Test public void test() throws Exception {
  Map map=new HashMap();
  Urls.parseParameters(map,null);
  String text1="String_Node_Str";
  Map<String,String> m=new HashMap<String,String>();
  Urls.parseParameters(m,text1);
  System.out.println(m.get("String_Node_Str").toString());
  System.out.println(m.get("String_Node_Str").toString());
  System.out.println(Urls.buildQueryData(m));
  Urls.parseParameters(m,text1,null);
}

Fixed version (ground truth):
@Test public void test() throws Exception {
  Map map=new HashMap();
  Urls.parseParameters(map,null);
  String text1="String_Node_Str";
  Map<String,String> m=new HashMap<String,String>();
  Urls.parseParameters(m,text1);
  System.out.println(m.get("String_Node_Str").toString());
  System.out.println(m.get("String_Node_Str").toString());
  System.out.println(Urls.buildQueryData(m));
  thrown.expect(NullPointerException.class);
  thrown.expectMessage("String_Node_Str");
  Urls.parseParameters(m,text1,null);
}
Program: 173976
Project: 173976
Buggy source:
@SuppressWarnings("String_Node_Str") public String getPreferredPrefix(String namespaceUri,String suggestion,boolean requirePrefix){
  String prefix=nspref.get(namespaceUri);
  if (prefix != null) {
    return prefix;
  }
  if (namespaceUri.equals(WellKnownNamespace.XML_SCHEMA_INSTANCE))   return "String_Node_Str";
  if (namespaceUri.equals(WellKnownNamespace.XML_SCHEMA))   return "String_Node_Str";
  if (namespaceUri.equals(WellKnownNamespace.XML_MIME_URI))   return "String_Node_Str";
  return suggestion;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public String getPreferredPrefix(String namespaceUri,String suggestion,boolean requirePrefix){
  String prefix=nspref.get(namespaceUri);
  if (prefix != null) {
    return prefix;
  }
  return suggestion;
}
Program: 173977
Project: 173977
Buggy source:
/** 
 * Convert from object to XML string
 */
public String toString(final Object obj) throws JAXBException {
  JAXBContext cachedContext=getCachedContext(obj.getClass());
  Marshaller marshaller=cachedContext.createMarshaller();
  try {
    marshaller.setProperty(Marshaller.JAXB_ENCODING,encoding.getCode());
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,formatted);
    if (Strings.isEmpty(headers)) {
      marshaller.setProperty(Marshaller.JAXB_FRAGMENT,fragment);
    }
 else {
      marshaller.setProperty("String_Node_Str",headers);
    }
    if (null != namespacePrefixMapper) {
      System.out.println("String_Node_Str");
      NamespacePrefixMapper mapper=new DefaultNamespacePrefixMapper(namespacePrefixMapper);
      marshaller.setProperty("String_Node_Str",mapper);
    }
  }
 catch (  PropertyException e) {
    throw new JAXBException(e);
  }
catch (  IllegalArgumentException e) {
    throw new JAXBException(e);
  }
  StringWriter writer=new StringWriter();
  marshaller.marshal(obj,writer);
  return writer.toString();
}

Fixed version (ground truth):
/** 
 * Convert from object to XML string
 */
public String toString(final Object obj) throws JAXBException {
  JAXBContext cachedContext=getCachedContext(obj.getClass());
  Marshaller marshaller=cachedContext.createMarshaller();
  StringWriter writer=new StringWriter();
  try {
    marshaller.setProperty(Marshaller.JAXB_ENCODING,encoding.getCode());
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,formatted);
    if (Strings.isEmpty(headers)) {
      marshaller.setProperty(Marshaller.JAXB_FRAGMENT,fragment);
    }
 else {
      marshaller.setProperty(Marshaller.JAXB_FRAGMENT,true);
      writer.write(headers);
    }
    if (null != namespacePrefixMapper) {
      NamespacePrefixMapper mapper=new DefaultNamespacePrefixMapper(namespacePrefixMapper);
      marshaller.setProperty("String_Node_Str",mapper);
    }
  }
 catch (  PropertyException e) {
    throw new JAXBException(e);
  }
catch (  IllegalArgumentException e) {
    throw new JAXBException(e);
  }
  marshaller.marshal(obj,writer);
  return writer.toString();
}