nus-yam/ex-repair huggingface dataset:
Program: 85986
Project: 85986
Buggy source:
public void run(){
  try {
    if (shouldConnect) {
      log.info("String_Node_Str" + peer);
      peer.connect();
    }
    peers.add(peer);
    handleNewPeer(peer);
    peer.run();
  }
 catch (  PeerException ex) {
    final Throwable cause=ex.getCause();
    if (cause instanceof SocketTimeoutException) {
      log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
    }
 else     if (cause instanceof ConnectException) {
      log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
    }
 else     if (cause instanceof IOException) {
      log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
    }
 else {
      log.error("String_Node_Str" + peer,ex);
    }
  }
 finally {
    if (!running)     return;
    peer.disconnect();
    if (address != null)     inactives.add(address);
    if (peers.remove(peer))     handlePeerDeath(peer);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    if (shouldConnect) {
      log.info("String_Node_Str" + peer);
      peer.connect();
    }
    peers.add(peer);
    handleNewPeer(peer);
    if (blockUntilRunning == ExecuteBlockMode.WAIT_FOR_STARTUP)     latch.countDown();
    peer.run();
  }
 catch (  PeerException ex) {
    final Throwable cause=ex.getCause();
    if (cause instanceof SocketTimeoutException) {
      log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
    }
 else     if (cause instanceof ConnectException) {
      log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
    }
 else     if (cause instanceof IOException) {
      log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
    }
 else {
      log.error("String_Node_Str" + peer,ex);
    }
  }
 finally {
    if (!running)     return;
    peer.disconnect();
    if (address != null)     inactives.add(address);
    if (peers.remove(peer))     handlePeerDeath(peer);
  }
}
Program: 85987
Project: 85987
Buggy source:
/** 
 * Use this to directly add an already initialized and connected   {@link Peer} object. Normally, you would preferto use  {@link PeerGroup#addAddress(PeerAddress)} and let this object handle construction of the peer for you.This method is useful when you are working closely with the network code (and in unit tests).<p> Note that if this peer group already has the maximum number of peers running (see  {@link PeerGroup#DEFAULT_CONNECTIONS}) then this method will block until other peers are disconnected.<p> Calling this will result in calls to any registered   {@link PeerEventListener}s. Block chain download may occur.
 */
public synchronized void addPeer(Peer peer){
  if (!running)   throw new IllegalStateException("String_Node_Str");
  log.info("String_Node_Str",peer);
  peer.setDownloadData(false);
  executePeer(null,peer,false);
  handleNewPeer(peer);
}

Fixed version (ground truth):
/** 
 * Use this to directly add an already initialized and connected   {@link Peer} object. Normally, you would preferto use  {@link PeerGroup#addAddress(PeerAddress)} and let this object handle construction of the peer for you.This method is useful when you are working closely with the network code (and in unit tests).<p> Note that if this peer group already has the maximum number of peers running (see  {@link PeerGroup#DEFAULT_CONNECTIONS}) then this method will block until other peers are disconnected.<p> Calling this will result in calls to any registered   {@link PeerEventListener}s. Block chain download may occur.
 */
public void addPeer(Peer peer){
synchronized (this) {
    if (!running)     throw new IllegalStateException("String_Node_Str");
    log.info("String_Node_Str",peer);
  }
  executePeer(null,peer,false,ExecuteBlockMode.WAIT_FOR_STARTUP);
}
Program: 85988
Project: 85988
Buggy source:
private void executePeer(final PeerAddress address,final Peer peer,final boolean shouldConnect){
  peerPool.execute(new Runnable(){
    public void run(){
      try {
        if (shouldConnect) {
          log.info("String_Node_Str" + peer);
          peer.connect();
        }
        peers.add(peer);
        handleNewPeer(peer);
        peer.run();
      }
 catch (      PeerException ex) {
        final Throwable cause=ex.getCause();
        if (cause instanceof SocketTimeoutException) {
          log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
        }
 else         if (cause instanceof ConnectException) {
          log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
        }
 else         if (cause instanceof IOException) {
          log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
        }
 else {
          log.error("String_Node_Str" + peer,ex);
        }
      }
 finally {
        if (!running)         return;
        peer.disconnect();
        if (address != null)         inactives.add(address);
        if (peers.remove(peer))         handlePeerDeath(peer);
      }
    }
  }
);
}

Fixed version (ground truth):
private void executePeer(final PeerAddress address,final Peer peer,final boolean shouldConnect,final ExecuteBlockMode blockUntilRunning){
  final CountDownLatch latch=new CountDownLatch(1);
  peerPool.execute(new Runnable(){
    public void run(){
      try {
        if (shouldConnect) {
          log.info("String_Node_Str" + peer);
          peer.connect();
        }
        peers.add(peer);
        handleNewPeer(peer);
        if (blockUntilRunning == ExecuteBlockMode.WAIT_FOR_STARTUP)         latch.countDown();
        peer.run();
      }
 catch (      PeerException ex) {
        final Throwable cause=ex.getCause();
        if (cause instanceof SocketTimeoutException) {
          log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
        }
 else         if (cause instanceof ConnectException) {
          log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
        }
 else         if (cause instanceof IOException) {
          log.info("String_Node_Str" + peer + "String_Node_Str"+ cause.getMessage());
        }
 else {
          log.error("String_Node_Str" + peer,ex);
        }
      }
 finally {
        if (!running)         return;
        peer.disconnect();
        if (address != null)         inactives.add(address);
        if (peers.remove(peer))         handlePeerDeath(peer);
      }
    }
  }
);
  if (blockUntilRunning == ExecuteBlockMode.WAIT_FOR_STARTUP) {
    try {
      latch.await();
    }
 catch (    InterruptedException e) {
    }
  }
}
Program: 85989
Project: 85989
Buggy source:
private void setDownloadPeer(Peer peer){
  if (downloadPeer != null) {
    downloadPeer.setDownloadData(false);
  }
  downloadPeer=peer;
  if (downloadPeer != null) {
    downloadPeer.setDownloadData(true);
  }
}

Fixed version (ground truth):
private synchronized void setDownloadPeer(Peer peer){
  if (downloadPeer != null) {
    downloadPeer.setDownloadData(false);
  }
  downloadPeer=peer;
  if (downloadPeer != null) {
    downloadPeer.setDownloadData(true);
  }
}
Program: 85990
Project: 85990
Buggy source:
/** 
 * Try connecting to a peer.  If we exceed the number of connections, delay and try again.
 */
private void tryNextPeer() throws InterruptedException {
  final PeerAddress address=inactives.take();
  while (true) {
    try {
      Peer peer=new Peer(params,address,blockStore.getChainHead().getHeight(),chain);
      executePeer(address,peer,true);
      break;
    }
 catch (    RejectedExecutionException e) {
    }
catch (    BlockStoreException e) {
      log.error("String_Node_Str",e);
      running=false;
      throw new RuntimeException(e);
    }
    Thread.sleep(connectionDelayMillis);
  }
}

Fixed version (ground truth):
/** 
 * Try connecting to a peer.  If we exceed the number of connections, delay and try again.
 */
private void tryNextPeer() throws InterruptedException {
  final PeerAddress address=inactives.take();
  while (true) {
    try {
      Peer peer=new Peer(params,address,blockStore.getChainHead().getHeight(),chain);
      executePeer(address,peer,true,ExecuteBlockMode.RETURN_IMMEDIATELY);
      break;
    }
 catch (    RejectedExecutionException e) {
    }
catch (    BlockStoreException e) {
      log.error("String_Node_Str",e);
      running=false;
      throw new RuntimeException(e);
    }
    Thread.sleep(connectionDelayMillis);
  }
}
Program: 85991
Project: 85991
Buggy source:
protected synchronized void handleNewPeer(Peer peer){
  log.info("String_Node_Str",peer);
  if (downloadListener != null && downloadPeer == null) {
    log.info("String_Node_Str");
    startBlockChainDownloadFromPeer(peer);
  }
 else   if (downloadPeer == null) {
    setDownloadPeer(peer);
  }
synchronized (peerEventListeners) {
    for (    PeerEventListener listener : peerEventListeners) {
synchronized (listener) {
        listener.onPeerConnected(peer,peers.size());
      }
    }
  }
}

Fixed version (ground truth):
protected synchronized void handleNewPeer(Peer peer){
  log.info("String_Node_Str",peer);
  if (downloadListener != null && downloadPeer == null) {
    log.info("String_Node_Str");
    startBlockChainDownloadFromPeer(peer);
  }
 else   if (downloadPeer == null) {
    setDownloadPeer(peer);
  }
 else {
    peer.setDownloadData(false);
  }
synchronized (peerEventListeners) {
    for (    PeerEventListener listener : peerEventListeners) {
synchronized (listener) {
        listener.onPeerConnected(peer,peers.size());
      }
    }
  }
}
Program: 85992
Project: 85992
Buggy source:
public static byte[] copyOf(byte[] in,int length){
  byte[] out=new byte[length];
  System.arraycopy(in,0,out,0,length);
  return out;
}

Fixed version (ground truth):
public static byte[] copyOf(byte[] in,int length){
  byte[] out=new byte[length];
  System.arraycopy(in,0,out,0,Math.min(length,in.length));
  Arrays.copyOf(in,6);
  return out;
}
Program: 85993
Project: 85993
Buggy source:
protected void parseLite() throws ProtocolException {
  if (length == UNKNOWN_LENGTH) {
    log.warn("String_Node_Str");
    parseTransactions();
    length=cursor - offset;
  }
 else {
    transactionBytesValid=!transactionsParsed || parseRetain && length > 80;
  }
  headerBytesValid=!headerParsed || parseRetain && length >= 80;
}

Fixed version (ground truth):
protected void parseLite() throws ProtocolException {
}
Program: 85994
Project: 85994
Buggy source:
/** 
 * Perform the most minimal parse possible to calculate the length of the message. This is only required for subclasses of ChildClass as root level messages will have their length passed into the constructor. <p/> It is expected that the length field will be set before this method returns.
 * @return
 * @throws ProtocolException
 */
protected abstract void parseLite() throws ProtocolException ;

Fixed version (ground truth):
/** 
 * Perform the most minimal parse possible to calculate the length of the message. This is only required for subclasses of ChildClass as root level messages will have their length passed into the constructor. <p/> Implementations should adhere to the following contract:  If parseLazy = true the 'length' field must be set before returning.  If parseLazy = false the length field must be set either within the parseLite() method OR the parse() method.  The overriding requirement is that length must be set to non UNKNOWN_MESSAGE value by the time the constructor exits.
 * @return
 * @throws ProtocolException
 */
protected abstract void parseLite() throws ProtocolException ;
Program: 85995
Project: 85995
Buggy source:
/** 
 * This should be overridden to extract correct message size in the case of lazy parsing.  Until this method is implemented in a subclass of ChildMessage lazy parsing may have no effect. This default implementation is a safe fall back that will ensure it returns a correct value by parsing the message.
 * @return
 */
int getMessageSize(){
  if (length != UNKNOWN_LENGTH)   return length;
  checkParse();
  if (length != UNKNOWN_LENGTH)   length=cursor - offset;
  return length;
}

Fixed version (ground truth):
/** 
 * This should be overridden to extract correct message size in the case of lazy parsing.  Until this method is implemented in a subclass of ChildMessage lazy parsing may have no effect. This default implementation is a safe fall back that will ensure it returns a correct value by parsing the message.
 * @return
 */
int getMessageSize(){
}
Program: 85996
Project: 85996
Buggy source:
/** 
 * Writes out the given byte buffer to the output stream with the correct opcode prefix 
 */
static void writeBytes(OutputStream os,byte[] buf) throws IOException {
  if (buf.length < OP_PUSHDATA1) {
    os.write(buf.length);
    os.write(buf);
  }
 else   if (buf.length < 256) {
    os.write(OP_PUSHDATA1);
    os.write(buf.length);
    os.write(buf);
  }
 else   if (buf.length < 65536) {
    os.write(OP_PUSHDATA2);
    os.write(0xFF & (buf.length));
    os.write(0xFF & (buf.length >> 8));
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Writes out the given byte buffer to the output stream with the correct opcode prefix 
 */
static void writeBytes(OutputStream os,byte[] buf) throws IOException {
  if (buf.length < OP_PUSHDATA1) {
    os.write(buf.length);
    os.write(buf);
  }
 else   if (buf.length < 256) {
    os.write(OP_PUSHDATA1);
    os.write(buf.length);
    os.write(buf);
  }
 else   if (buf.length < 65536) {
    os.write(OP_PUSHDATA2);
    os.write(0xFF & (buf.length));
    os.write(0xFF & (buf.length >> 8));
    os.write(buf);
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 85997
Project: 85997
Buggy source:
public Thread newThread(Runnable r){
  Thread t=new Thread(group,r,namePrefix + threadNumber.getAndIncrement(),0);
  t.setPriority(Math.max(Thread.MIN_PRIORITY,group.getMaxPriority() - 1));
  t.setDaemon(true);
  return t;
}

Fixed version (ground truth):
public Thread newThread(Runnable r){
  Thread t=new Thread(group,r,namePrefix + threadNumber.getAndIncrement(),0);
  t.setPriority(Math.max(Thread.MIN_PRIORITY,Thread.currentThread().getPriority() - 1));
  t.setDaemon(true);
  return t;
}
Program: 85998
Project: 85998
Buggy source:
/** 
 * Terminates the network connection and stops the message handling loop.
 */
public void disconnect(){
synchronized (this) {
    running=false;
  }
  try {
    conn.shutdown();
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
/** 
 * Terminates the network connection and stops the message handling loop.
 */
public void disconnect(){
synchronized (this) {
    running=false;
  }
  try {
    if (conn != null)     conn.shutdown();
  }
 catch (  IOException e) {
  }
}
Program: 85999
Project: 85999
Buggy source:
/** 
 * Runs in the peers network loop and manages communication with the peer. <p>connect() must be called first
 */
public void run(){
  if (conn == null)   throw new RuntimeException("String_Node_Str");
  running=true;
  try {
    while (true) {
      Message m=conn.readMessage();
      if (m instanceof InventoryMessage) {
        processInv((InventoryMessage)m);
      }
 else       if (m instanceof Block) {
        processBlock((Block)m);
      }
 else       if (m instanceof AddressMessage) {
      }
 else {
        log.warn("String_Node_Str",m);
      }
    }
  }
 catch (  Exception e) {
    if (e instanceof IOException && !running) {
      log.info("String_Node_Str");
    }
 else {
      e.printStackTrace();
    }
  }
  try {
    conn.shutdown();
  }
 catch (  IOException e) {
  }
synchronized (this) {
    running=false;
  }
}

Fixed version (ground truth):
/** 
 * Runs in the peers network loop and manages communication with the peer. <p>connect() must be called first
 * @throws PeerException when there is a temporary problem with the peer and we should retry later
 */
public void run() throws PeerException {
  if (conn == null)   throw new RuntimeException("String_Node_Str");
  running=true;
  try {
    while (true) {
      Message m=conn.readMessage();
      if (m instanceof InventoryMessage) {
        processInv((InventoryMessage)m);
      }
 else       if (m instanceof Block) {
        processBlock((Block)m);
      }
 else       if (m instanceof AddressMessage) {
      }
 else {
        log.warn("String_Node_Str",m);
      }
    }
  }
 catch (  IOException e) {
    disconnect();
    if (!running) {
      log.info("String_Node_Str");
    }
 else {
      throw new PeerException(e);
    }
  }
catch (  ProtocolException e) {
    disconnect();
    throw new PeerException(e);
  }
catch (  RuntimeException e) {
    disconnect();
    log.error("String_Node_Str",e);
    throw e;
  }
  disconnect();
}
Program: 86000
Project: 86000
Buggy source:
/** 
 * @return the number of blocks to get, based on our chain height and the peer reported height
 */
private int getPeerBlocksToGet(){
  int chainHeight=(int)conn.getVersionMessage().bestHeight;
  if (chainHeight <= 0) {
    throw new RuntimeException("String_Node_Str");
  }
  int blocksToGet=chainHeight - blockChain.getChainHead().getHeight();
  return blocksToGet;
}

Fixed version (ground truth):
/** 
 * @return the number of blocks to get, based on our chain height and the peer reported height
 */
private int getPeerBlocksToGet(){
  int chainHeight=(int)conn.getVersionMessage().bestHeight;
  if (chainHeight <= 0) {
    return -1;
  }
  int blocksToGet=chainHeight - blockChain.getChainHead().getHeight();
  return blocksToGet;
}
Program: 86001
Project: 86001
Buggy source:
/** 
 * Connects to the peer.
 */
public void connect(){
  try {
    conn=new NetworkConnection(address,params,bestHeight,60000);
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex);
  }
catch (  ProtocolException ex) {
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Connects to the peer.
 * @throws PeerException when there is a temporary problem with the peer and we should retry later
 */
public void connect() throws PeerException {
  try {
    conn=new NetworkConnection(address,params,bestHeight,60000);
  }
 catch (  IOException ex) {
    throw new PeerException(ex);
  }
catch (  ProtocolException ex) {
    throw new PeerException(ex);
  }
}
Program: 86002
Project: 86002
Buggy source:
public void run(){
  try {
    log.info("String_Node_Str" + peer);
    peer.connect();
    peers.add(peer);
    handleNewPeer(peer);
    log.info("String_Node_Str" + peer);
    peer.run();
  }
 catch (  RuntimeException ex) {
    log.error("String_Node_Str",ex);
  }
 finally {
    try {
      peer.disconnect();
    }
 catch (    RuntimeException ex) {
    }
    inactives.add(address);
    if (peers.remove(peer))     handlePeerDeath(peer);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    log.info("String_Node_Str" + peer);
    peer.connect();
    peers.add(peer);
    handleNewPeer(peer);
    log.info("String_Node_Str" + peer);
    peer.run();
  }
 catch (  PeerException ex) {
    log.error("String_Node_Str",ex);
  }
 finally {
    peer.disconnect();
    inactives.add(address);
    if (peers.remove(peer))     handlePeerDeath(peer);
  }
}
Program: 86003
Project: 86003
Buggy source:
private void tryNextPeer() throws InterruptedException {
  final PeerAddress address=inactives.take();
  while (true) {
    try {
      final Peer peer=new Peer(params,address,blockStore.getChainHead().getHeight(),chain);
      Runnable command=new Runnable(){
        public void run(){
          try {
            log.info("String_Node_Str" + peer);
            peer.connect();
            peers.add(peer);
            handleNewPeer(peer);
            log.info("String_Node_Str" + peer);
            peer.run();
          }
 catch (          RuntimeException ex) {
            log.error("String_Node_Str",ex);
          }
 finally {
            try {
              peer.disconnect();
            }
 catch (            RuntimeException ex) {
            }
            inactives.add(address);
            if (peers.remove(peer))             handlePeerDeath(peer);
          }
        }
      }
;
      peerPool.execute(command);
      break;
    }
 catch (    RejectedExecutionException e) {
    }
catch (    BlockStoreException e) {
      log.error("String_Node_Str",e);
      running=false;
      break;
    }
    Thread.sleep(CONNECTION_DELAY_MILLIS);
  }
}

Fixed version (ground truth):
private void tryNextPeer() throws InterruptedException {
  final PeerAddress address=inactives.take();
  while (true) {
    try {
      final Peer peer=new Peer(params,address,blockStore.getChainHead().getHeight(),chain);
      Runnable command=new Runnable(){
        public void run(){
          try {
            log.info("String_Node_Str" + peer);
            peer.connect();
            peers.add(peer);
            handleNewPeer(peer);
            log.info("String_Node_Str" + peer);
            peer.run();
          }
 catch (          PeerException ex) {
            log.error("String_Node_Str",ex);
          }
 finally {
            peer.disconnect();
            inactives.add(address);
            if (peers.remove(peer))             handlePeerDeath(peer);
          }
        }
      }
;
      peerPool.execute(command);
      break;
    }
 catch (    RejectedExecutionException e) {
    }
catch (    BlockStoreException e) {
      log.error("String_Node_Str",e);
      running=false;
      throw new IOError(e);
    }
    Thread.sleep(CONNECTION_DELAY_MILLIS);
  }
}
Program: 86004
Project: 86004
Buggy source:
public static void main(String[] args) throws Exception {
  System.out.println("String_Node_Str");
  final NetworkParameters params=NetworkParameters.prodNet();
  BlockStore blockStore=new MemoryBlockStore(params);
  BlockChain chain=new BlockChain(params,blockStore);
  final Peer peer=new Peer(params,new PeerAddress(InetAddress.getLocalHost()),chain);
  peer.connect();
  new Thread(new Runnable(){
    public void run(){
      peer.run();
    }
  }
).start();
  Sha256Hash blockHash=new Sha256Hash(args[0]);
  Future<Block> future=peer.getBlock(blockHash);
  System.out.println("String_Node_Str" + blockHash);
  Block block=future.get();
  System.out.println(block);
  peer.disconnect();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  System.out.println("String_Node_Str");
  final NetworkParameters params=NetworkParameters.prodNet();
  BlockStore blockStore=new MemoryBlockStore(params);
  BlockChain chain=new BlockChain(params,blockStore);
  final Peer peer=new Peer(params,new PeerAddress(InetAddress.getLocalHost()),chain);
  peer.connect();
  new Thread(new Runnable(){
    public void run(){
      try {
        peer.run();
      }
 catch (      PeerException e) {
        throw new RuntimeException(e);
      }
    }
  }
).start();
  Sha256Hash blockHash=new Sha256Hash(args[0]);
  Future<Block> future=peer.getBlock(blockHash);
  System.out.println("String_Node_Str" + blockHash);
  Block block=future.get();
  System.out.println(block);
  peer.disconnect();
}
Program: 86005
Project: 86005
Buggy source:
public void run(){
  peer.run();
}

Fixed version (ground truth):
public void run(){
  try {
    peer.run();
  }
 catch (  PeerException e) {
    throw new RuntimeException(e);
  }
}
Program: 86006
Project: 86006
Buggy source:
/** 
 * Adds a coinbase transaction to the block. This exists for unit tests. 
 */
void addCoinbaseTransaction(Address to){
  transactions=new ArrayList<Transaction>();
  Transaction coinbase=new Transaction(params);
  coinbase.inputs.add(new TransactionInput(params,coinbase,new byte[]{(byte)coinbaseCounter++}));
  coinbase.outputs.add(new TransactionOutput(params,coinbase,Utils.toNanoCoins(50,0),to));
  transactions.add(coinbase);
}

Fixed version (ground truth):
/** 
 * Adds a coinbase transaction to the block. This exists for unit tests. 
 */
void addCoinbaseTransaction(byte[] pubKeyTo){
  transactions=new ArrayList<Transaction>();
  Transaction coinbase=new Transaction(params);
  coinbase.inputs.add(new TransactionInput(params,coinbase,new byte[]{(byte)txCounter++}));
  coinbase.outputs.add(new TransactionOutput(params,coinbase,Script.createOutputScript(pubKeyTo)));
  transactions.add(coinbase);
}
Program: 86007
Project: 86007
Buggy source:
/** 
 * For the transactions in the given block, update the txToWalletMap such that each wallet maps to a list of transactions for which it is relevant.
 */
private void scanTransactions(Block block,HashMap<Wallet,List<Transaction>> walletToTxMap) throws VerificationException {
  for (  Transaction tx : block.transactions) {
    try {
      for (      Wallet wallet : wallets) {
        boolean shouldReceive=false;
        for (        TransactionOutput output : tx.outputs) {
          if (output.getScriptPubKey().isSentToIP())           return;
          if (output.isMine(wallet)) {
            shouldReceive=true;
          }
        }
        if (!shouldReceive && !tx.isCoinBase()) {
          for (          TransactionInput i : tx.inputs) {
            byte[] pubkey=i.getScriptSig().getPubKey();
            if (wallet.isPubKeyMine(pubkey)) {
              shouldReceive=true;
            }
          }
        }
        if (!shouldReceive)         continue;
        List<Transaction> txList=walletToTxMap.get(wallet);
        if (txList == null) {
          txList=new LinkedList<Transaction>();
          walletToTxMap.put(wallet,txList);
        }
        txList.add(tx);
      }
    }
 catch (    ScriptException e) {
      log.warn("String_Node_Str" + e.toString());
    }
  }
}

Fixed version (ground truth):
/** 
 * For the transactions in the given block, update the txToWalletMap such that each wallet maps to a list of transactions for which it is relevant.
 */
private void scanTransactions(Block block,HashMap<Wallet,List<Transaction>> walletToTxMap) throws VerificationException {
  for (  Transaction tx : block.transactions) {
    try {
      for (      Wallet wallet : wallets) {
        boolean shouldReceive=false;
        for (        TransactionOutput output : tx.outputs) {
          if (output.getScriptPubKey().isSentToIP())           continue;
          if (output.isMine(wallet)) {
            shouldReceive=true;
            break;
          }
        }
        if (!shouldReceive && !tx.isCoinBase()) {
          for (          TransactionInput i : tx.inputs) {
            byte[] pubkey=i.getScriptSig().getPubKey();
            if (wallet.isPubKeyMine(pubkey)) {
              shouldReceive=true;
            }
          }
        }
        if (!shouldReceive)         continue;
        List<Transaction> txList=walletToTxMap.get(wallet);
        if (txList == null) {
          txList=new LinkedList<Transaction>();
          walletToTxMap.put(wallet,txList);
        }
        txList.add(tx);
      }
    }
 catch (    ScriptException e) {
      log.warn("String_Node_Str" + e.toString());
    }
  }
}
Program: 86008
Project: 86008
Buggy source:
private void connectBlock(StoredBlock newStoredBlock,StoredBlock storedPrev,HashMap<Wallet,List<Transaction>> newTransactions) throws BlockStoreException, VerificationException {
  if (storedPrev.equals(chainHead)) {
    setChainHead(newStoredBlock);
    log.trace("String_Node_Str",chainHead.getHeight());
    if (newTransactions != null)     sendTransactionsToWallet(newStoredBlock,NewBlockType.BEST_CHAIN,newTransactions);
  }
 else {
    boolean haveNewBestChain=newStoredBlock.moreWorkThan(chainHead);
    if (haveNewBestChain) {
      log.info("String_Node_Str");
    }
 else {
      StoredBlock splitPoint=findSplit(newStoredBlock,chainHead);
      String splitPointHash=splitPoint != null ? splitPoint.getHeader().getHashAsString() : "String_Node_Str";
      log.info("String_Node_Str",splitPointHash,newStoredBlock);
    }
    if (newTransactions != null) {
      sendTransactionsToWallet(newStoredBlock,NewBlockType.SIDE_CHAIN,newTransactions);
    }
    if (haveNewBestChain)     handleNewBestChain(newStoredBlock);
  }
}

Fixed version (ground truth):
private void connectBlock(StoredBlock newStoredBlock,StoredBlock storedPrev,HashMap<Wallet,List<Transaction>> newTransactions) throws BlockStoreException, VerificationException {
  if (storedPrev.equals(chainHead)) {
    setChainHead(newStoredBlock);
    log.info("String_Node_Str",chainHead.getHeight());
    if (newTransactions != null)     sendTransactionsToWallet(newStoredBlock,NewBlockType.BEST_CHAIN,newTransactions);
  }
 else {
    boolean haveNewBestChain=newStoredBlock.moreWorkThan(chainHead);
    if (haveNewBestChain) {
      log.info("String_Node_Str");
    }
 else {
      StoredBlock splitPoint=findSplit(newStoredBlock,chainHead);
      String splitPointHash=splitPoint != null ? splitPoint.getHeader().getHashAsString() : "String_Node_Str";
      log.info("String_Node_Str",splitPointHash,newStoredBlock);
    }
    if (newTransactions != null) {
      sendTransactionsToWallet(newStoredBlock,NewBlockType.SIDE_CHAIN,newTransactions);
    }
    if (haveNewBestChain)     handleNewBestChain(newStoredBlock);
  }
}
Program: 86009
Project: 86009
Buggy source:
private static Block createGenesis(NetworkParameters n){
  Block genesisBlock=new Block(n);
  Transaction t=new Transaction(n);
  try {
    byte[] bytes=Hex.decode("String_Node_Str");
    t.inputs.add(new TransactionInput(n,t,bytes));
    ByteArrayOutputStream scriptPubKeyBytes=new ByteArrayOutputStream();
    Script.writeBytes(scriptPubKeyBytes,Hex.decode("String_Node_Str"));
    scriptPubKeyBytes.write(Script.OP_CHECKSIG);
    t.outputs.add(new TransactionOutput(n,scriptPubKeyBytes.toByteArray()));
  }
 catch (  Exception e) {
  }
  genesisBlock.addTransaction(t);
  return genesisBlock;
}

Fixed version (ground truth):
private static Block createGenesis(NetworkParameters n){
  Block genesisBlock=new Block(n);
  Transaction t=new Transaction(n);
  try {
    byte[] bytes=Hex.decode("String_Node_Str");
    t.inputs.add(new TransactionInput(n,t,bytes));
    ByteArrayOutputStream scriptPubKeyBytes=new ByteArrayOutputStream();
    Script.writeBytes(scriptPubKeyBytes,Hex.decode("String_Node_Str"));
    scriptPubKeyBytes.write(Script.OP_CHECKSIG);
    t.outputs.add(new TransactionOutput(n,t,scriptPubKeyBytes.toByteArray()));
  }
 catch (  Exception e) {
  }
  genesisBlock.addTransaction(t);
  return genesisBlock;
}
Program: 86010
Project: 86010
Buggy source:
static byte[] createOutputScript(Address to){
  try {
    ByteArrayOutputStream bits=new ByteArrayOutputStream();
    bits.write(OP_DUP);
    bits.write(OP_HASH160);
    writeBytes(bits,to.getHash160());
    bits.write(OP_EQUALVERIFY);
    bits.write(OP_CHECKSIG);
    return bits.toByteArray();
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Create a script that sends coins directly to the given public key (eg in a coinbase transaction). 
 */
static byte[] createOutputScript(byte[] pubkey){
  try {
    ByteArrayOutputStream bits=new ByteArrayOutputStream();
    writeBytes(bits,pubkey);
    bits.write(OP_CHECKSIG);
    return bits.toByteArray();
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 86011
Project: 86011
Buggy source:
/** 
 * Adds an input to this transaction that imports value from the given output. Note that this input is NOT complete and after every input is added with addInput() and every output is added with addOutput(), signInputs() must be called to finalize the transaction and finish the inputs off. Otherwise it won't be accepted by the network.
 */
public void addInput(TransactionOutput from){
  inputs.add(new TransactionInput(params,this,from));
}

Fixed version (ground truth):
/** 
 * Adds an input directly, with no checking that it's valid. 
 */
public void addInput(TransactionInput input){
  inputs.add(input);
}
Program: 86012
Project: 86012
Buggy source:
/** 
 * Returns a human readable debug string. 
 */
public String toString(){
  if (isCoinBase())   return "String_Node_Str";
  try {
    return "String_Node_Str" + Utils.bytesToHexString(getScriptSig().getPubKey()) + "String_Node_Str"+ getScriptSig().toString();
  }
 catch (  ScriptException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Returns a human readable debug string. 
 */
public String toString(){
  if (isCoinBase())   return "String_Node_Str";
  try {
    return "String_Node_Str" + outpoint + "String_Node_Str"+ Utils.bytesToHexString(getScriptSig().getPubKey())+ "String_Node_Str"+ getScriptSig().toString();
  }
 catch (  ScriptException e) {
    throw new RuntimeException(e);
  }
}
Program: 86013
Project: 86013
Buggy source:
/** 
 * Used only in creation of the genesis blocks and in unit tests. 
 */
TransactionOutput(NetworkParameters params,byte[] scriptBytes){
  super(params);
  this.scriptBytes=scriptBytes;
  this.value=Utils.toNanoCoins(50,0);
  availableForSpending=true;
}

Fixed version (ground truth):
/** 
 * Used only in creation of the genesis blocks and in unit tests. 
 */
TransactionOutput(NetworkParameters params,Transaction parent,byte[] scriptBytes){
  super(params);
  this.scriptBytes=scriptBytes;
  this.value=Utils.toNanoCoins(50,0);
  parentTransaction=parent;
  availableForSpending=true;
}
Program: 86014
Project: 86014
Buggy source:
/** 
 * Construct a peer that handles the given network connection and reads/writes from the given block chain. Note that communication won't occur until you call connect().
 * @param bestHeight our current best chain height, to facilitate downloading
 */
public Peer(NetworkParameters params,PeerAddress address,int bestHeight,BlockChain blockChain){
  this.params=params;
  this.address=address;
  this.bestHeight=bestHeight;
  this.blockChain=blockChain;
  this.pendingGetBlockFutures=new ArrayList<GetDataFuture<Block>>();
  this.eventListeners=new ArrayList<PeerEventListener>();
}

Fixed version (ground truth):
/** 
 * Construct a peer that handles the given network connection and reads/writes from the given block chain. Note that communication won't occur until you call connect().
 */
public Peer(NetworkParameters params,PeerAddress address,BlockChain blockChain){
  this(params,address,0,blockChain);
}
Program: 86015
Project: 86015
Buggy source:
public static void main(String[] args) throws Exception {
  System.out.println("String_Node_Str");
  final NetworkParameters params=NetworkParameters.prodNet();
  NetworkConnection conn=new NetworkConnection(InetAddress.getLocalHost(),params,0,60000);
  BlockStore blockStore=new MemoryBlockStore(params);
  BlockChain chain=new BlockChain(params,blockStore);
  Peer peer=new Peer(params,conn,chain);
  peer.start();
  Sha256Hash blockHash=new Sha256Hash(args[0]);
  Future<Block> future=peer.getBlock(blockHash);
  System.out.println("String_Node_Str" + blockHash);
  Block block=future.get();
  System.out.println(block);
  peer.disconnect();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  System.out.println("String_Node_Str");
  final NetworkParameters params=NetworkParameters.testNet();
  BlockStore blockStore=new MemoryBlockStore(params);
  BlockChain chain=new BlockChain(params,blockStore);
  final Peer peer=new Peer(params,new PeerAddress(InetAddress.getLocalHost()),chain);
  peer.connect();
  new Thread(new Runnable(){
    @Override public void run(){
      peer.run();
    }
  }
).start();
  Sha256Hash blockHash=new Sha256Hash(args[0]);
  Future<Block> future=peer.getBlock(blockHash);
  System.out.println("String_Node_Str" + blockHash);
  Block block=future.get();
  System.out.println(block);
  peer.disconnect();
}
Program: 86016
Project: 86016
Buggy source:
/** 
 * Starts an asynchronous download of the block chain. The chain download is deemed to be complete once we've downloaded the same number of blocks that the peer advertised having in its version handshake message.
 */
public void startBlockChainDownload() throws IOException {
  for (  PeerEventListener listener : eventListeners) {
synchronized (listener) {
      listener.onChainDownloadStarted(this,getPeerBlocksToGet());
    }
  }
  if (getPeerBlocksToGet() > 0) {
    blockChainDownload(Sha256Hash.ZERO_HASH);
  }
}

Fixed version (ground truth):
/** 
 * Starts an asynchronous download of the block chain. The chain download is deemed to be complete once we've downloaded the same number of blocks that the peer advertised having in its version handshake message.
 */
public void startBlockChainDownload() throws IOException {
  if (getPeerBlocksToGet() > 0) {
    for (    PeerEventListener listener : eventListeners) {
synchronized (listener) {
        listener.onChainDownloadStarted(this,getPeerBlocksToGet());
      }
    }
    blockChainDownload(Sha256Hash.ZERO_HASH);
  }
}
Program: 86017
Project: 86017
Buggy source:
public PeerAddress(InetAddress addr,int port,int protocolVersion){
  this.addr=addr;
  this.port=port;
  this.protocolVersion=protocolVersion;
}

Fixed version (ground truth):
public PeerAddress(InetAddress addr,int port,int protocolVersion){
  this.addr=addr;
  this.port=port;
  this.protocolVersion=protocolVersion;
  this.services=BigInteger.ZERO;
}
Program: 86018
Project: 86018
Buggy source:
@Test public void testParseUserList() throws UnknownHostException {
  String[] userList=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  ArrayList<InetSocketAddress> addresses=IrcDiscovery.parseUserList(userList);
  assertEquals("String_Node_Str",2,addresses.size());
  String[] ips=new String[]{"String_Node_Str","String_Node_Str"};
  InetSocketAddress[] decoded=addresses.toArray(new InetSocketAddress[]{});
  for (int i=0; i < decoded.length; i++) {
    String formattedIP=decoded[0].getAddress().getHostAddress() + "String_Node_Str" + ((Integer)decoded[i].getPort()).toString();
    assertEquals("String_Node_Str",ips[0],formattedIP);
  }
}

Fixed version (ground truth):
@Test public void testParseUserList() throws UnknownHostException {
  String[] userList=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  ArrayList<InetSocketAddress> addresses=IrcDiscovery.parseUserList(userList);
  assertEquals("String_Node_Str",2,addresses.size());
  String[] ips=new String[]{"String_Node_Str","String_Node_Str"};
  InetSocketAddress[] decoded=addresses.toArray(new InetSocketAddress[]{});
  for (int i=0; i < decoded.length; i++) {
    String formattedIP=decoded[i].getAddress().getHostAddress() + "String_Node_Str" + ((Integer)decoded[i].getPort()).toString();
    assertEquals("String_Node_Str",ips[i],formattedIP);
  }
}
Program: 86020
Project: 86020
Buggy source:
public static byte[] decode(String input) throws AddressFormatException {
  return decodeToBigInteger(input).toByteArray();
}

Fixed version (ground truth):
public static byte[] decode(String input) throws AddressFormatException {
  byte[] bytes=decodeToBigInteger(input).toByteArray();
  if ((bytes.length > 1) && (bytes[0] == 0) && (bytes[1] < 0)) {
    byte[] tmp=new byte[bytes.length - 1];
    System.arraycopy(bytes,1,tmp,0,bytes.length - 1);
    bytes=tmp;
  }
  return bytes;
}
Program: 86021
Project: 86021
Buggy source:
public void testDecode() throws Exception {
  byte[] testbytes="String_Node_Str".getBytes();
  byte[] actualbytes=Base58.decode("String_Node_Str");
  assertTrue(new String(actualbytes),Arrays.equals(testbytes,actualbytes));
  try {
    Base58.decode("String_Node_Str");
    fail();
  }
 catch (  AddressFormatException e) {
  }
  Base58.decodeChecked("String_Node_Str");
}

Fixed version (ground truth):
public void testDecode() throws Exception {
  byte[] testbytes="String_Node_Str".getBytes();
  byte[] actualbytes=Base58.decode("String_Node_Str");
  assertTrue(new String(actualbytes),Arrays.equals(testbytes,actualbytes));
  try {
    Base58.decode("String_Node_Str");
    fail();
  }
 catch (  AddressFormatException e) {
  }
  Base58.decodeChecked("String_Node_Str");
  Base58.decodeChecked("String_Node_Str");
}
Program: 86022
Project: 86022
Buggy source:
/** 
 * Construct an address from parameters and the standard "human readable" form. Example:<p> <pre>new Address(NetworkParameters.prodNet(), "17kzeh4N8g49GFvdDzSf8PjaPfyoD1MndL");</pre>
 */
public Address(NetworkParameters params,String address) throws AddressFormatException {
  this.params=params;
  this.hash160=strToHash160(address);
}

Fixed version (ground truth):
/** 
 * Construct an address from parameters and the standard "human readable" form. Example:<p> <pre>new Address(NetworkParameters.prodNet(), "17kzeh4N8g49GFvdDzSf8PjaPfyoD1MndL");</pre>
 */
public Address(NetworkParameters params,String address) throws AddressFormatException {
  super(address);
  if (version != params.addressHeader)   throw new AddressFormatException("String_Node_Str" + version + "String_Node_Str"+ params.addressHeader);
}
Program: 86023
Project: 86023
Buggy source:
/** 
 * The (big endian) 20 byte hash that is the core of a BitCoin address. 
 */
public byte[] getHash160(){
}

Fixed version (ground truth):
/** 
 * The (big endian) 20 byte hash that is the core of a BitCoin address. 
 */
public byte[] getHash160(){
  return bytes;
}
Program: 86024
Project: 86024
Buggy source:
public static byte[] decode(String input) throws AddressFormatException {
  byte[] bytes=decodeToBigInteger(input).toByteArray();
  if ((bytes.length > 1) && (bytes[0] == 0) && (bytes[1] < 0)) {
    byte[] tmp=new byte[bytes.length - 1];
    System.arraycopy(bytes,1,tmp,0,bytes.length - 1);
    bytes=tmp;
  }
  return bytes;
}

Fixed version (ground truth):
public static byte[] decode(String input) throws AddressFormatException {
  byte[] bytes=decodeToBigInteger(input).toByteArray();
  boolean stripSignByte=bytes.length > 1 && bytes[0] == 0 && bytes[1] < 0;
  int leadingZeros=0;
  for (int i=0; input.charAt(i) == ALPHABET.charAt(0); i++) {
    leadingZeros++;
  }
  byte[] tmp=new byte[bytes.length - (stripSignByte ? 1 : 0) + leadingZeros];
  System.arraycopy(bytes,stripSignByte ? 1 : 0,tmp,leadingZeros,tmp.length - leadingZeros);
  return tmp;
}
Program: 86025
Project: 86025
Buggy source:
public static void main(String[] args) throws Exception {
  NetworkParameters params=NetworkParameters.prodNet();
  try {
    BigInteger privKey=Base58.decodeToBigInteger(args[0]);
    ECKey key=new ECKey(privKey);
    System.out.println("String_Node_Str" + key.toAddress(params).toString());
    Address destination=new Address(params,args[1]);
    Wallet wallet=new Wallet(params);
    wallet.addKey(key);
    NetworkConnection conn=new NetworkConnection(InetAddress.getLocalHost(),params,0,60000);
    BlockChain chain=new BlockChain(params,wallet,new MemoryBlockStore(params));
    Peer peer=new Peer(params,conn,chain);
    peer.start();
    peer.startBlockChainDownload().await();
    System.out.println("String_Node_Str" + Utils.bitcoinValueToFriendlyString(wallet.getBalance()) + "String_Node_Str");
    wallet.sendCoins(peer,destination,wallet.getBalance());
    Thread.sleep(5000);
    peer.disconnect();
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    System.out.println("String_Node_Str" + "String_Node_Str");
    return;
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  NetworkParameters params=NetworkParameters.prodNet();
  try {
    ECKey key;
    if (args[0].length() == 51) {
      DumpedPrivateKey dumpedPrivateKey=new DumpedPrivateKey(params,args[0]);
      key=dumpedPrivateKey.getKey();
    }
 else {
      BigInteger privKey=Base58.decodeToBigInteger(args[0]);
      key=new ECKey(privKey);
    }
    System.out.println("String_Node_Str" + key.toAddress(params).toString());
    Address destination=new Address(params,args[1]);
    Wallet wallet=new Wallet(params);
    wallet.addKey(key);
    NetworkConnection conn=new NetworkConnection(InetAddress.getLocalHost(),params,0,60000);
    BlockChain chain=new BlockChain(params,wallet,new MemoryBlockStore(params));
    Peer peer=new Peer(params,conn,chain);
    peer.start();
    peer.startBlockChainDownload().await();
    System.out.println("String_Node_Str" + Utils.bitcoinValueToFriendlyString(wallet.getBalance()) + "String_Node_Str");
    wallet.sendCoins(peer,destination,wallet.getBalance());
    Thread.sleep(5000);
    peer.disconnect();
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    System.out.println("String_Node_Str" + "String_Node_Str");
    return;
  }
}
Program: 86027
Project: 86027
Buggy source:
public int getSizeInBytes(){
  if (value < 253)   return 1;
 else   if (value <= 65536)   return 3;
 else   if (value <= 4294967295L)   return 5;
 else   return 9;
}

Fixed version (ground truth):
public int getSizeInBytes(){
  if (isLessThanUnsigned(value,253))   return 1;
 else   if (isLessThanUnsigned(value,65536))   return 3;
 else   if (isLessThanUnsigned(value,4294967296L))   return 5;
 else   return 9;
}
Program: 86028
Project: 86028
Buggy source:
public byte[] encodeBE(){
  if (Utils.isLessThanUnsigned(value,253)) {
    return new byte[]{(byte)value};
  }
 else   if (Utils.isLessThanUnsigned(value,65536)) {
    return new byte[]{(byte)253,(byte)(value),(byte)(value >> 8)};
  }
 else   if (Utils.isLessThanUnsigned(value,4294967295L)) {
    byte[] bytes=new byte[5];
    bytes[0]=(byte)254;
    Utils.uint32ToByteArrayLE(value,bytes,1);
    return bytes;
  }
 else {
    byte[] bytes=new byte[9];
    bytes[0]=(byte)255;
    Utils.uint32ToByteArrayLE(value & 0xFFFFFFFF,bytes,1);
    Utils.uint32ToByteArrayLE(value >> 32,bytes,5);
    return bytes;
  }
}

Fixed version (ground truth):
public byte[] encodeBE(){
  if (isLessThanUnsigned(value,253)) {
    return new byte[]{(byte)value};
  }
 else   if (isLessThanUnsigned(value,65536)) {
    return new byte[]{(byte)253,(byte)(value),(byte)(value >> 8)};
  }
 else   if (isLessThanUnsigned(value,4294967295L)) {
    byte[] bytes=new byte[5];
    bytes[0]=(byte)254;
    Utils.uint32ToByteArrayLE(value,bytes,1);
    return bytes;
  }
 else {
    byte[] bytes=new byte[9];
    bytes[0]=(byte)255;
    Utils.uint32ToByteArrayLE(value,bytes,1);
    Utils.uint32ToByteArrayLE(value >>> 32,bytes,5);
    return bytes;
  }
}
Program: 86030
Project: 86030
Buggy source:
private static void printFinishStatistics(Meter errors,StripedTimeSeries<Long> sts,StripedHistogram sh,String testName){
  File file=new File(testName + "String_Node_Str");
  try (PrintWriter out=new PrintWriter(file)){
    out.println("String_Node_Str" + errors.getCount());
    long millisTime=new Date().getTime();
    long nanoTime=System.nanoTime();
    sts.getRecords().forEach(rec -> out.println(df.format(new Date(TimeUnit.NANOSECONDS.toMillis(nanoTime - rec.timestamp) + millisTime)) + "String_Node_Str" + testName+ "String_Node_Str"+ rec.value+ "String_Node_Str"));
    out.println("String_Node_Str");
    for (int i=0; i <= 100; i++)     out.println(testName + "String_Node_Str" + i+ "String_Node_Str"+ sh.getHistogramData().getValueAtPercentile(i));
    System.out.println("String_Node_Str" + file.getAbsolutePath());
  }
 catch (  FileNotFoundException ex) {
    System.err.println(ex);
  }
}

Fixed version (ground truth):
private static void printFinishStatistics(Meter errors,StripedTimeSeries<Long> sts,StripedHistogram sh,String testName){
  File file=new File(testName + "String_Node_Str");
  try (PrintWriter out=new PrintWriter(file)){
    out.println("String_Node_Str" + errors.getCount());
    long millisTime=new Date().getTime();
    long nanoTime=System.nanoTime();
    sts.getRecords().forEach(rec -> out.println(df.format(new Date(millisTime - TimeUnit.NANOSECONDS.toMillis(nanoTime - rec.timestamp))) + "String_Node_Str" + testName+ "String_Node_Str"+ rec.value+ "String_Node_Str"));
    out.println("String_Node_Str");
    for (int i=0; i <= 100; i++)     out.println(testName + "String_Node_Str" + i+ "String_Node_Str"+ sh.getHistogramData().getValueAtPercentile(i));
    System.out.println("String_Node_Str" + file.getAbsolutePath());
  }
 catch (  FileNotFoundException ex) {
    System.err.println(ex);
  }
}