nus-yam/ex-repair huggingface dataset:
Program: 54989
Project: 54989
Buggy source:
/** 
 */
public Factory(){
  try {
    if (this.context == null)     this.context=JAXBContext.newInstance("String_Node_Str");
    if (this.unmarshaller == null)     this.unmarshaller=this.context.createUnmarshaller();
  }
 catch (  JAXBException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 */
public Factory(){
  try {
    if (this.context == null)     this.context=JAXBContext.newInstance("String_Node_Str");
  }
 catch (  JAXBException e) {
    e.printStackTrace();
  }
}
Program: 54990
Project: 54990
Buggy source:
/** 
 */
public Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  return new SardineImpl(this,username,password,sslSocketFactory);
}

Fixed version (ground truth):
/** 
 */
public Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory,HttpRoutePlanner routePlanner) throws SardineException {
  return new SardineImpl(this,username,password,sslSocketFactory,routePlanner);
}
Program: 54991
Project: 54991
Buggy source:
/** 
 * If you want to use custom HTTPS settings with Sardine, this allows you to pass in a SSLSocketFactory.
 * @see <a href="http://hc.apache.org/httpcomponents-client/httpclient/xref/org/apache/http/conn/ssl/SSLSocketFactory.html">SSLSocketFactory</a>
 */
public static Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  return Factory.instance().begin(username,password,sslSocketFactory);
}

Fixed version (ground truth):
/** 
 * Useful for when you need to define a http proxy
 */
public static Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory,HttpRoutePlanner routePlanner) throws SardineException {
  return Factory.instance().begin(username,password,sslSocketFactory);
}
Program: 54992
Project: 54992
Buggy source:
/** 
 * Main constructor.
 */
public SardineImpl(Factory factory,String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  HttpProtocolParams.setUserAgent(params,"String_Node_Str" + Version.getSpecification());
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  if (sslSocketFactory != null)   schemeRegistry.register(new Scheme("String_Node_Str",sslSocketFactory,443));
 else   schemeRegistry.register(new Scheme("String_Node_Str",SSLSocketFactory.getSocketFactory(),443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if ((username != null) && (password != null))   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}

Fixed version (ground truth):
/** 
 * Main constructor.
 */
public SardineImpl(Factory factory,String username,String password,SSLSocketFactory sslSocketFactory,HttpRoutePlanner routePlanner) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  HttpProtocolParams.setUserAgent(params,"String_Node_Str" + Version.getSpecification());
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  if (sslSocketFactory != null)   schemeRegistry.register(new Scheme("String_Node_Str",sslSocketFactory,443));
 else   schemeRegistry.register(new Scheme("String_Node_Str",SSLSocketFactory.getSocketFactory(),443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if (routePlanner != null)   this.client.setRoutePlanner(routePlanner);
  if ((username != null) && (password != null))   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}
Program: 54993
Project: 54993
Buggy source:
/** 
 */
public SardineException(String msg,String url,int statusCode,String responsePhrase,Exception initCause){
  super(msg);
  this.url=url;
  this.statusCode=statusCode;
  this.responsePhrase=responsePhrase;
  if (initCause != null)   this.initCause(initCause);
}

Fixed version (ground truth):
/** 
 */
public SardineException(String msg,String url,int statusCode,String responsePhrase,Exception initCause){
  super(msg + responsePhrase != null ? "String_Node_Str" + responsePhrase : "String_Node_Str" + "String_Node_Str" + statusCode);
  this.url=url;
  this.statusCode=statusCode;
  this.responsePhrase=responsePhrase;
  if (initCause != null)   this.initCause(initCause);
}
Program: 54994
Project: 54994
Buggy source:
/** 
 */
public Sardine begin(String username,String password) throws SardineException {
  return new SardineImpl(this,username,password);
}

Fixed version (ground truth):
/** 
 */
public Sardine begin(String username,String password,KeyStore trustStore) throws SardineException {
  return new SardineImpl(this,username,password);
}
Program: 54995
Project: 54995
Buggy source:
/** 
 * Pass in a HTTP Auth username/password for being used with all connections
 */
public static Sardine begin(String username,String password) throws SardineException {
  return Factory.instance().begin(username,password);
}

Fixed version (ground truth):
/** 
 * Pass in a HTTP Auth username/password for being used with all connections and a KeyStore.
 */
public static Sardine begin(String username,String password,KeyStore trustStore) throws SardineException {
  return Factory.instance().begin(username,password,trustStore);
}
Program: 54996
Project: 54996
Buggy source:
/** 
 */
public SardineImpl(Factory factory,String username,String password) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  SSLSocketFactory sf;
  try {
    SSLContext context=SSLContext.getDefault();
    sf=new SSLSocketFactory(context);
  }
 catch (  NoSuchAlgorithmException e) {
    throw new SardineException(e);
  }
  sf.setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  schemeRegistry.register(new Scheme("String_Node_Str",sf,443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if ((username != null) && (password != null))   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}

Fixed version (ground truth):
/** 
 */
public SardineImpl(Factory factory,String username,String password,KeyStore trustStore) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  schemeRegistry.register(new Scheme("String_Node_Str",this.getSSLSocketFactory(trustStore),443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if ((username != null) && (password != null))   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}
Program: 54998
Project: 54998
Buggy source:
/** 
 * Uses webdav put to move a url to another
 */
public void move(String sourceUrl,String destinationUrl) throws SardineException ;

Fixed version (ground truth):
/** 
 * Move a url to from source to destination.
 */
public void move(String sourceUrl,String destinationUrl) throws SardineException ;
Program: 54999
Project: 54999
Buggy source:
/** 
 * Uses webdav to create a directory using url
 */
public void createDirectory(String url) throws SardineException ;

Fixed version (ground truth):
/** 
 * Uses webdav to create a directory at the specified url
 */
public void createDirectory(String url) throws SardineException ;
Program: 55000
Project: 55000
Buggy source:
/** 
 * Uses webdav put to delete url
 */
public void delete(String url) throws SardineException ;

Fixed version (ground truth):
/** 
 * Delete a resource at the specified url
 */
public void delete(String url) throws SardineException ;
Program: 55002
Project: 55002
Buggy source:
/** 
 */
public SardineImpl(Factory factory,String username,String password){
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if (username != null && password != null)   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}

Fixed version (ground truth):
/** 
 */
public SardineImpl(Factory factory,String username,String password){
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if ((username != null) && (password != null))   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}
Program: 55003
Project: 55003
Buggy source:
public HttpMove(String sourceUrl,String destinationUrl){
  super(sourceUrl);
  this.setHeader("String_Node_Str",destinationUrl);
}

Fixed version (ground truth):
public HttpMove(String sourceUrl,String destinationUrl) throws SardineException {
  super();
  this.setHeader("String_Node_Str",destinationUrl);
  this.setURI(URI.create(sourceUrl));
  if (sourceUrl.endsWith("String_Node_Str") && !destinationUrl.endsWith("String_Node_Str"))   throw new SardineException("String_Node_Str",destinationUrl);
}
Program: 55004
Project: 55004
Buggy source:
/** 
 * Is the status code 2xx
 */
public static boolean isGoodResponse(int statusCode){
  return (statusCode >= 200 && statusCode <= 299);
}

Fixed version (ground truth):
/** 
 * Is the status code 2xx
 */
public static boolean isGoodResponse(int statusCode){
  return ((statusCode >= 200) && (statusCode <= 299));
}
Program: 55006
Project: 55006
Buggy source:
public HttpPropFind(String url){
  super(url);
  this.setDepth(1);
}

Fixed version (ground truth):
public HttpPropFind(String url){
  super();
  this.setDepth(1);
  this.setURI(URI.create(url));
}
Program: 55007
Project: 55007
Buggy source:
/** 
 * Is the status code < 200 || > 299
 */
public static boolean isGoodResponse(int statusCode){
  return (statusCode < 200 || statusCode > 299);
}

Fixed version (ground truth):
/** 
 * Is the status code 2xx
 */
public static boolean isGoodResponse(int statusCode){
  return (statusCode >= 200 && statusCode <= 299);
}
Program: 55008
Project: 55008
Buggy source:
/** 
 * Uses webdav put to send data to a server
 */
public void put(String url,byte[] data) throws SardineException ;

Fixed version (ground truth):
/** 
 * Uses webdav put to send data to a server
 */
public void put(String url,InputStream dataStream) throws SardineException ;
Program: 55009
Project: 55009
Buggy source:
public void put(String url,byte[] data) throws SardineException {
  HttpPut put=new HttpPut(url);
  ByteArrayEntity entity=new ByteArrayEntity(data);
  put.setEntity(entity);
  HttpResponse response=this.executeWrapper(put);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}

Fixed version (ground truth):
public void put(String url,InputStream dataStream) throws SardineException {
  HttpPut put=new HttpPut(url);
  InputStreamEntity entity=new InputStreamEntity(dataStream,-1);
  put.setEntity(entity);
  HttpResponse response=this.executeWrapper(put);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}
Program: 55012
Project: 55012
Buggy source:
public InputStream getInputStream(String url) throws IOException {
  HttpGet get=new HttpGet(url);
  HttpResponse response=this.client.execute(get);
  int statusCode=response.getStatusLine().getStatusCode();
  if (!SardineUtil.isGoodResponse(statusCode))   throw new IOException("String_Node_Str" + statusCode + "String_Node_Str"+ url);
  return response.getEntity().getContent();
}

Fixed version (ground truth):
public InputStream getInputStream(String url) throws IOException {
  HttpGet get=new HttpGet(url);
  HttpResponse response=this.client.execute(get);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new IOException("String_Node_Str" + statusLine.getStatusCode() + "String_Node_Str"+ statusLine.getReasonPhrase()+ "String_Node_Str"+ url);
  return response.getEntity().getContent();
}
Program: 55013
Project: 55013
Buggy source:
/** 
 * Uses webdav put to move a url to another
 */
public void move(String sourceUrl,String destinationUrl) throws IOException ;

Fixed version (ground truth):
/** 
 * Uses webdav put to move a url to another
 */
public void move(String sourceUrl,String destinationUrl) throws SardineException ;
Program: 55014
Project: 55014
Buggy source:
/** 
 * Gets a directory listing.
 */
public List<DavResource> getResources(String url) throws IOException ;

Fixed version (ground truth):
/** 
 * Gets a directory listing.
 */
public List<DavResource> getResources(String url) throws SardineException ;
Program: 55015
Project: 55015
Buggy source:
/** 
 * Uses HttpGet to get an input stream for a url
 */
public InputStream getInputStream(String url) throws IOException ;

Fixed version (ground truth):
/** 
 * Uses HttpGet to get an input stream for a url
 */
public InputStream getInputStream(String url) throws SardineException ;
Program: 55016
Project: 55016
Buggy source:
/** 
 * Uses webdav put to delete url
 */
public void delete(String url) throws IOException ;

Fixed version (ground truth):
/** 
 * Uses webdav put to delete url
 */
public void delete(String url) throws SardineException ;
Program: 55017
Project: 55017
Buggy source:
/** 
 * Uses webdav put to send data to a server
 */
public void put(String url,byte[] data) throws IOException ;

Fixed version (ground truth):
/** 
 * Uses webdav put to send data to a server
 */
public void put(String url,byte[] data) throws SardineException ;
Program: 55018
Project: 55018
Buggy source:
public void move(String sourceUrl,String destinationUrl) throws IOException {
  HttpMove move=new HttpMove(sourceUrl,destinationUrl);
  HttpResponse response=this.client.execute(move);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new IOException("String_Node_Str" + statusLine.getStatusCode() + "String_Node_Str"+ statusLine.getReasonPhrase());
}

Fixed version (ground truth):
public void move(String sourceUrl,String destinationUrl) throws SardineException {
  HttpMove move=new HttpMove(sourceUrl,destinationUrl);
  HttpResponse response=this.executeWrapper(move);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException("String_Node_Str" + sourceUrl + "String_Node_Str"+ destinationUrl,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}
Program: 55020
Project: 55020
Buggy source:
public InputStream getInputStream(String url) throws IOException {
  HttpGet get=new HttpGet(url);
  HttpResponse response=this.client.execute(get);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new IOException("String_Node_Str" + statusLine.getStatusCode() + "String_Node_Str"+ statusLine.getReasonPhrase()+ "String_Node_Str"+ url);
  return response.getEntity().getContent();
}

Fixed version (ground truth):
public InputStream getInputStream(String url) throws SardineException {
  HttpGet get=new HttpGet(url);
  HttpResponse response=this.executeWrapper(get);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  try {
    return response.getEntity().getContent();
  }
 catch (  IOException ex) {
    throw new SardineException(ex);
  }
}
Program: 55021
Project: 55021
Buggy source:
public void delete(String url) throws IOException {
  HttpDelete delete=new HttpDelete(url);
  HttpResponse response=this.client.execute(delete);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new IOException("String_Node_Str" + statusLine.getStatusCode() + "String_Node_Str"+ statusLine.getReasonPhrase());
}

Fixed version (ground truth):
public void delete(String url) throws SardineException {
  HttpDelete delete=new HttpDelete(url);
  HttpResponse response=this.executeWrapper(delete);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}
Program: 55022
Project: 55022
Buggy source:
public void put(String url,byte[] data) throws IOException {
  HttpPut put=new HttpPut(url);
  ByteArrayEntity entity=new ByteArrayEntity(data);
  put.setEntity(entity);
  HttpResponse response=this.client.execute(put);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new IOException("String_Node_Str" + statusLine.getStatusCode() + "String_Node_Str"+ statusLine.getReasonPhrase());
}

Fixed version (ground truth):
public void put(String url,byte[] data) throws SardineException {
  HttpPut put=new HttpPut(url);
  ByteArrayEntity entity=new ByteArrayEntity(data);
  put.setEntity(entity);
  HttpResponse response=this.executeWrapper(put);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}
Program: 55023
Project: 55023
Buggy source:
private boolean existsExternal(String channel){
  String channelPartial="String_Node_Str";
  String[] parts=channel.split("String_Node_Str");
  if (externalChannels.contains(channelPartial))   return true;
  for (  String part : parts) {
    if (channelPartial.isEmpty())     channelPartial+=part;
 else     channelPartial+="String_Node_Str" + part;
    if (externalChannels.contains(channelPartial))     return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean existsExternal(String channel){
  if (channel.equals(LISTEN_CHAN))   return true;
  String channelPartial="String_Node_Str";
  String[] parts=channel.split("String_Node_Str");
  if (externalChannels.contains(channelPartial))   return true;
  for (  String part : parts) {
    if (channelPartial.isEmpty())     channelPartial+=part;
 else     channelPartial+="String_Node_Str" + part;
    if (externalChannels.contains(channelPartial))     return true;
  }
  return false;
}
Program: 55024
Project: 55024
Buggy source:
private void publishChannels(int delay){
  new Thread(new Runnable(){
    public void run(){
      Log.w(TAG,"String_Node_Str");
      publish(LISTEN_CHAN,WearScriptConnection.this.groupDevice,channelsValue());
      try {
        Thread.sleep(500);
      }
 catch (      InterruptedException e) {
      }
    }
  }
).start();
}

Fixed version (ground truth):
private void publishChannels(int delay){
  new Thread(new Runnable(){
    public void run(){
      Log.w(TAG,"String_Node_Str");
      Log.d(TAG,"String_Node_Str" + channelsValue());
      publish(LISTEN_CHAN,WearScriptConnection.this.groupDevice,channelsValue());
      try {
        Thread.sleep(500);
      }
 catch (      InterruptedException e) {
      }
    }
  }
).start();
}
Program: 55025
Project: 55025
Buggy source:
public void publish(String channel,byte[] outBytes){
  if (client == null || !exists(channel) && !channel.equals(LISTEN_CHAN))   return;
  if (outBytes != null) {
    onReceiveDispatch(channel,outBytes,null);
    if (existsExternal(channel))     client.send(outBytes);
  }
}

Fixed version (ground truth):
public void publish(String channel,byte[] outBytes){
  if (client == null || !exists(channel)) {
    Log.d(TAG,String.format("String_Node_Str",channel,client != null,outBytes != null));
    return;
  }
  if (outBytes != null) {
    onReceiveDispatch(channel,outBytes,null);
    if (existsExternal(channel))     client.send(outBytes);
  }
}
Program: 55026
Project: 55026
Buggy source:
private GlassDevice(){
  mBluetoothAdapter=BluetoothAdapter.getDefaultAdapter();
  if (mBluetoothAdapter == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  if (!mBluetoothAdapter.isEnabled()) {
    Log.e(TAG,"String_Node_Str");
  }
  mac=findMac();
  if (mac == null || mac.length() < 1)   throw new RuntimeException("String_Node_Str");
  Log.d(TAG,"String_Node_Str" + mac);
  BluetoothDevice bluetoothDevice=mBluetoothAdapter.getRemoteDevice(mac);
  try {
    mSocket=bluetoothDevice.createRfcommSocketToServiceRecord(SECURE_UUID);
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str",e);
    return;
  }
  mBluetoothAdapter.cancelDiscovery();
  try {
    mSocket.connect();
    Log.i(TAG,"String_Node_Str");
  }
 catch (  IOException connectException) {
    Log.e(TAG,"String_Node_Str");
    try {
      mSocket.close();
    }
 catch (    IOException closeException) {
    }
    return;
  }
}

Fixed version (ground truth):
private GlassDevice(){
  mBluetoothAdapter=BluetoothAdapter.getDefaultAdapter();
  Log.d(TAG,"String_Node_Str");
  if (mBluetoothAdapter == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  if (!mBluetoothAdapter.isEnabled()) {
    Log.e(TAG,"String_Node_Str");
  }
  mac=findMac();
  if (mac == null || mac.length() < 1)   throw new RuntimeException("String_Node_Str");
  Log.d(TAG,"String_Node_Str" + mac);
  BluetoothDevice bluetoothDevice=mBluetoothAdapter.getRemoteDevice(mac);
  try {
    mSocket=bluetoothDevice.createRfcommSocketToServiceRecord(SECURE_UUID);
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str",e);
    return;
  }
  mBluetoothAdapter.cancelDiscovery();
  try {
    mSocket.connect();
    Log.i(TAG,"String_Node_Str");
  }
 catch (  IOException connectException) {
    Log.e(TAG,"String_Node_Str");
    try {
      mSocket.close();
    }
 catch (    IOException closeException) {
    }
    return;
  }
}
Program: 55027
Project: 55027
Buggy source:
public void setup(){
  if (isSetup)   return;
  isSetup=true;
  mBluetoothAdapter=BluetoothAdapter.getDefaultAdapter();
  if (mBluetoothAdapter == null) {
    return;
  }
  if (!mBluetoothAdapter.isEnabled()) {
    Log.w(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
public void setup(){
  if (isSetup) {
    log();
    return;
  }
  isSetup=true;
  mBluetoothAdapter=BluetoothAdapter.getDefaultAdapter();
  log();
  if (mBluetoothAdapter == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  if (!mBluetoothAdapter.isEnabled()) {
    Log.w(TAG,"String_Node_Str");
  }
}
Program: 55028
Project: 55028
Buggy source:
public void pairWithDevice(String address){
  BluetoothDevice device=findBondedDevice(address);
  if (device == null) {
    Log.e(TAG,"String_Node_Str" + address);
    return;
  }
  device.fetchUuidsWithSdp();
  if (device.getUuids() == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  for (  ParcelUuid uid : device.getUuids()) {
    Log.d(TAG,"String_Node_Str" + uid.toString());
  }
  ParcelUuid uuid=device.getUuids()[0];
  Log.d(TAG,"String_Node_Str" + uuid.toString());
  Log.d(TAG,"String_Node_Str");
  try {
    mSockets.put(device.getAddress(),device.createInsecureRfcommSocketToServiceRecord(uuid.getUuid()));
  }
 catch (  IOException e2) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  try {
    mSockets.get(device.getAddress()).connect();
  }
 catch (  IOException e3) {
    mSockets.remove(device.getAddress());
    Log.e(TAG,"String_Node_Str");
    return;
  }
  Log.d(TAG,"String_Node_Str");
}

Fixed version (ground truth):
public void pairWithDevice(String address){
  mBluetoothAdapter.cancelDiscovery();
  BluetoothDevice device=findBondedDevice(address);
  if (device == null) {
    Log.e(TAG,"String_Node_Str" + address);
    return;
  }
  device.fetchUuidsWithSdp();
  if (device.getUuids() == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  for (  ParcelUuid uid : device.getUuids()) {
    Log.d(TAG,"String_Node_Str" + uid.toString());
  }
  ParcelUuid uuid=device.getUuids()[0];
  Log.d(TAG,"String_Node_Str" + uuid.toString());
  Log.d(TAG,"String_Node_Str");
  try {
    mSockets.put(device.getAddress(),device.createInsecureRfcommSocketToServiceRecord(uuid.getUuid()));
  }
 catch (  IOException e2) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  try {
    mSockets.get(device.getAddress()).connect();
  }
 catch (  IOException e3) {
    mSockets.remove(device.getAddress());
    Log.e(TAG,"String_Node_Str");
    return;
  }
  Log.d(TAG,"String_Node_Str");
}
Program: 55029
Project: 55029
Buggy source:
@Override public void onPause(){
  Log.i(TAG,"String_Node_Str");
  isForeground=false;
  getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
  if (bs != null) {
    ((CameraManager)bs.getManager(CameraManager.class)).pauseBackground();
  }
  super.onPause();
}

Fixed version (ground truth):
@Override public void onPause(){
  Log.i(TAG,"String_Node_Str");
  isForeground=false;
  getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
  if (bs != null) {
    CameraManager cm=((CameraManager)bs.getManager(CameraManager.class));
    if (cm != null)     cm.pauseBackground();
  }
  super.onPause();
}
Program: 55030
Project: 55030
Buggy source:
public static byte[] encode(Object... data){
  List<Value> out=new ArrayList<Value>();
  for (  Object i : data) {
    Class c=i.getClass();
    if (c.equals(String.class))     out.add(ValueFactory.createRawValue((String)i));
 else     if (c.equals(Double.class))     out.add(ValueFactory.createFloatValue((Double)i));
 else     if (Value.class.isAssignableFrom(c))     out.add((Value)i);
 else {
      Log.e(TAG,"String_Node_Str" + c);
      return null;
    }
  }
  try {
    return msgpack.write(out);
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str");
  }
  return null;
}

Fixed version (ground truth):
public static byte[] encode(Object... data){
  List<Value> out=new ArrayList<Value>();
  for (  Object i : data) {
    Class c=i.getClass();
    if (c.equals(String.class))     out.add(ValueFactory.createRawValue((String)i));
 else     if (c.equals(Double.class))     out.add(ValueFactory.createFloatValue((Double)i));
 else     if (Value.class.isAssignableFrom(c))     out.add((Value)i);
 else     if (c.equals(Boolean.class))     out.add(ValueFactory.createBooleanValue((Boolean)i));
 else {
      Log.e(TAG,"String_Node_Str" + c);
      return null;
    }
  }
  try {
    return msgpack.write(out);
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str");
  }
  return null;
}
Program: 55031
Project: 55031
Buggy source:
public void connect(URI uri){
synchronized (this) {
    if (shutdown) {
      Log.w(TAG,"String_Node_Str");
      return;
    }
    Log.i(TAG,uri.toString());
    if (uri.equals(this.uri) && connected) {
      onConnect();
      return;
    }
    this.uri=uri;
    List<BasicNameValuePair> extraHeaders=Arrays.asList();
    Log.i(TAG,"String_Node_Str");
    if (client != null)     client.disconnect();
    client=new WebSocketClient(uri,new LocalListener(),extraHeaders);
    reconnect();
  }
}

Fixed version (ground truth):
public void connect(URI uri){
  Log.d(TAG,"String_Node_Str");
synchronized (this) {
    if (shutdown) {
      Log.w(TAG,"String_Node_Str");
      return;
    }
    Log.i(TAG,uri.toString());
    if (uri.equals(this.uri) && connected) {
      onConnect();
      return;
    }
    this.uri=uri;
    List<BasicNameValuePair> extraHeaders=Arrays.asList();
    Log.i(TAG,"String_Node_Str");
    if (client != null)     client.disconnect();
    client=new WebSocketClient(uri,new LocalListener(),extraHeaders);
    reconnect();
  }
}
Program: 55032
Project: 55032
Buggy source:
private void handleMessage(byte[] message) throws IOException {
  String channel="String_Node_Str";
  List<Value> input=msgpack.read(message,tList(TValue));
  channel=input.get(0).asRawValue().getString();
  Log.d(TAG,String.format("String_Node_Str",channel));
  if (channel.equals(LISTEN_CHAN)) {
    String d=input.get(1).asRawValue().getString();
    Value[] channels=input.get(2).asArrayValue().getElementArray();
    setDeviceChannels(d,channels);
  }
  if (scriptChannels.contains(channel)) {
    Log.i(TAG,"String_Node_Str" + channel);
    WearScriptConnection.this.onReceive(channel,message,input);
  }
}

Fixed version (ground truth):
private void handleMessage(byte[] message) throws IOException {
  String channel="String_Node_Str";
  List<Value> input=msgpack.read(message,tList(TValue));
  channel=input.get(0).asRawValue().getString();
  Log.d(TAG,String.format("String_Node_Str",channel));
  if (channel.equals(LISTEN_CHAN)) {
    String d=input.get(1).asRawValue().getString();
    Value[] channels=input.get(2).asArrayValue().getElementArray();
    setDeviceChannels(d,channels);
  }
  String channelPart=null;
  for (  String part : channel.split("String_Node_Str")) {
    if (channelPart == null) {
      channelPart=part;
    }
 else {
      channelPart+="String_Node_Str" + part;
    }
    if (scriptChannels.contains(channelPart)) {
      Log.i(TAG,"String_Node_Str" + channel);
      WearScriptConnection.this.onReceive(channel,message,input);
      break;
    }
  }
}
Program: 55033
Project: 55033
Buggy source:
public TreeSet<String> channelsInternal(){
  return externalChannels;
}

Fixed version (ground truth):
public TreeSet<String> channelsInternal(){
  return scriptChannels;
}
Program: 55034
Project: 55034
Buggy source:
private Value listValue(Iterable<String> channels){
  ArrayList<Value> channelsArray=new ArrayList<Value>();
  for (  String c : channels)   channelsArray.add(ValueFactory.createRawValue(c));
  return ValueFactory.createArrayValue(channelsArray.toArray(new Value[channelsArray.size()]));
}

Fixed version (ground truth):
public static Value listValue(Iterable<String> channels){
  ArrayList<Value> channelsArray=new ArrayList<Value>();
  for (  String c : channels)   channelsArray.add(ValueFactory.createRawValue(c));
  return ValueFactory.createArrayValue(channelsArray.toArray(new Value[channelsArray.size()]));
}
Program: 55035
Project: 55035
Buggy source:
private void setDeviceChannels(String device,Value[] channels){
synchronized (this) {
    ArrayList<String> channelsArray=new ArrayList();
    for (    Value channel : channels)     channelsArray.add(channel.asRawValue().getString());
    deviceToChannels.put(device,channelsArray);
    TreeSet<String> externalChannelsNew=new TreeSet<String>();
    for (    ArrayList<String> deviceChannels : deviceToChannels.values())     for (    String channel : deviceChannels)     externalChannelsNew.add(channel);
    externalChannels=externalChannelsNew;
    for (    String c : externalChannels)     Log.d(TAG,"String_Node_Str" + c);
  }
}

Fixed version (ground truth):
private void setDeviceChannels(String device,Value[] channels){
synchronized (this) {
    ArrayList<String> channelsArray=new ArrayList();
    for (    Value channel : channels)     channelsArray.add(channel.asRawValue().getString());
    deviceToChannels.put(device,channelsArray);
    TreeSet<String> externalChannelsNew=new TreeSet<String>();
    for (    ArrayList<String> deviceChannels : deviceToChannels.values())     for (    String channel : deviceChannels)     externalChannelsNew.add(channel);
    externalChannels=externalChannelsNew;
  }
}
Program: 55036
Project: 55036
Buggy source:
public void reset(){
synchronized (this) {
    for (    String channel : connection.channelsInternal()) {
      unregisterCallback(channel);
    }
    connection.unsubscribe(connection.channelsInternal());
    connection.subscribe(connection.group());
    connection.subscribe(connection.groupDevice());
    connection.subscribe(GIST_LIST_SYNC_CHAN);
    connection.subscribe(GIST_GET_SYNC_CHAN);
  }
  super.reset();
}

Fixed version (ground truth):
public void reset(){
synchronized (this) {
    for (    String channel : connection.channelsInternal()) {
      unregisterCallback(channel);
    }
    connection.unsubscribe(new TreeSet<String>(connection.channelsInternal()));
    testChannels=new TreeSet<String>();
    String testChannel="String_Node_Str" + connection.groupDevice();
    testChannels.add(testChannel);
    connection.subscribe(testChannel);
    connection.subscribe(connection.group());
    connection.subscribe(connection.groupDevice());
    connection.subscribe(GIST_LIST_SYNC_CHAN);
    connection.subscribe(GIST_GET_SYNC_CHAN);
  }
  super.reset();
}
Program: 55038
Project: 55038
Buggy source:
protected void makeCall(String key,String data){
  Log.d(TAG,jsCallbacks.toString());
  if (!jsCallbacks.containsKey(key)) {
    Log.d(TAG,"String_Node_Str");
    return;
  }
  String url=buildCallbackString(key,data);
  Utils.eventBusPost(new JsCall(url));
}

Fixed version (ground truth):
protected void makeCall(String key,String data){
  Log.d(TAG,jsCallbacks.toString());
  if (!jsCallbacks.containsKey(key)) {
    Log.d(TAG,"String_Node_Str" + key);
    return;
  }
  String url=buildCallbackString(key,data);
  Utils.eventBusPost(new JsCall(url));
}
Program: 55039
Project: 55039
Buggy source:
public void data(int type,String name,String values){
  Log.i(TAG,"String_Node_Str");
  DataPoint dp=new DataPoint(name,type,System.currentTimeMillis() / 1000.,System.nanoTime());
  for (  Double p : (List<Double>)JSONValue.parse(values)) {
    dp.addValue(p);
  }
  bs.handleSensor(dp,null);
}

Fixed version (ground truth):
public void data(int type,String name,String values){
  Log.i(TAG,"String_Node_Str");
  DataPoint dp=new DataPoint(name,type,System.currentTimeMillis() / 1000.,System.nanoTime());
  JSONArray valuesArray=(JSONArray)JSONValue.parse(values);
  for (  Object j : valuesArray) {
    try {
      dp.addValue((Double)j);
    }
 catch (    ClassCastException e) {
      dp.addValue(((Long)j).doubleValue());
    }
  }
  bs.handleSensor(dp,null);
}
Program: 55040
Project: 55040
Buggy source:
public void data(int type,String name,String values){
  Log.i(TAG,"String_Node_Str");
  DataPoint dp=new DataPoint(name,type,System.currentTimeMillis() / 1000.,System.nanoTime());
  for (  Double p : (List<Double>)JSONValue.parse(values)) {
    dp.addValue(p);
  }
  bs.handleSensor(dp,null);
}

Fixed version (ground truth):
public void data(int type,String name,String values){
  Log.i(TAG,"String_Node_Str");
  DataPoint dp=new DataPoint(name,type,System.currentTimeMillis() / 1000.,System.nanoTime());
  JSONArray valuesArray=(JSONArray)JSONValue.parse(values);
  for (  Object j : valuesArray) {
    try {
      dp.addValue((Double)j);
    }
 catch (    ClassCastException e) {
      dp.addValue(((Long)j).doubleValue());
    }
  }
  bs.handleSensor(dp,null);
}
Program: 55041
Project: 55041
Buggy source:
public void startDefaultScript(){
  byte[] defaultScriptArray=LoadData("String_Node_Str","String_Node_Str");
  if (defaultScriptArray == null) {
    runScript("String_Node_Str");
  }
 else {
    runScript(new String(defaultScriptArray));
  }
}

Fixed version (ground truth):
public void startDefaultScript(){
  runScript("String_Node_Str");
}
Program: 55044
Project: 55044
Buggy source:
public void onServiceConnected(ComponentName className,IBinder service){
  Log.i(TAG,"String_Node_Str");
  bs=((BackgroundService.LocalBinder)service).getService();
  if (bs.activity != null) {
    MainActivity activity=bs.activity.get();
    if (activity != null)     activity.finish();
  }
  bs.activity=new WeakReference<MainActivity>(MainActivity.this);
  if (bs.webview != null) {
    ViewGroup parentViewGroup=(ViewGroup)bs.webview.getParent();
    if (parentViewGroup != null)     parentViewGroup.removeAllViews();
    bs.updateActivityView();
    return;
  }
  byte[] wsUrlArray=bs.LoadData("String_Node_Str","String_Node_Str");
  if (wsUrlArray == null) {
    bs.say("String_Node_Str");
    finish();
    return;
  }
  bs.reset();
  bs.wsUrl=(new String(wsUrlArray)).trim();
  if (extra != null) {
    bs.runScriptUrl(extra);
  }
 else {
    bs.startDefaultScript();
  }
}

Fixed version (ground truth):
public void onServiceConnected(ComponentName className,IBinder service){
  Log.i(TAG,"String_Node_Str");
  bs=((BackgroundService.LocalBinder)service).getService();
  if (bs.activity != null) {
    MainActivity activity=bs.activity.get();
    if (activity != null)     activity.finish();
  }
  bs.activity=new WeakReference<MainActivity>(MainActivity.this);
  if (bs.webview != null && extra == null) {
    ViewGroup parentViewGroup=(ViewGroup)bs.webview.getParent();
    if (parentViewGroup != null)     parentViewGroup.removeAllViews();
    bs.updateActivityView();
    return;
  }
  byte[] wsUrlArray=bs.LoadData("String_Node_Str","String_Node_Str");
  if (wsUrlArray == null) {
    bs.say("String_Node_Str");
    finish();
    return;
  }
  bs.reset();
  bs.wsUrl=(new String(wsUrlArray)).trim();
  if (extra != null) {
    Log.i(TAG,"String_Node_Str");
    bs.runScriptUrl(extra);
  }
 else {
    Log.i(TAG,"String_Node_Str");
    bs.startDefaultScript();
  }
}
Program: 55045
Project: 55045
Buggy source:
SocketClient(URI uri,SocketListener listener,String callback){
  this.listener=listener;
  this.uri=uri;
  List<BasicNameValuePair> extraHeaders=Arrays.asList();
  client=new WebSocketClient(uri,new LocalListener(listener),extraHeaders);
}

Fixed version (ground truth):
SocketClient(URI uri,SocketListener listener,String callback){
  this.listener=listener;
  this.uri=uri;
  this.callback=callback;
  List<BasicNameValuePair> extraHeaders=Arrays.asList();
  client=new WebSocketClient(uri,new LocalListener(listener),extraHeaders);
}
Program: 55046
Project: 55046
Buggy source:
public void saveDataPacket(final Mat frame){
  final JSONArray curSensorBuffer=sensorBuffer;
  final JSONArray curWifiBuffer=wifiBuffer;
  final Double Tsave=new Double(System.currentTimeMillis() / 1000.);
  sensorBuffer=new JSONArray();
  wifiBuffer=new JSONArray();
  JSONObject data=new JSONObject();
  if (frame != null) {
    Log.i(TAG,"String_Node_Str" + frame.size().toString());
    MatOfByte jpgFrame=new MatOfByte();
    Highgui.imencode("String_Node_Str",frame,jpgFrame);
    final byte[] out=jpgFrame.toArray();
    data.put("String_Node_Str",Base64.encodeToString(out,Base64.NO_WRAP));
  }
  if (!curSensorBuffer.isEmpty())   data.put("String_Node_Str",curSensorBuffer);
  if (!wifiBuffer.isEmpty())   data.put("String_Node_Str",wifiBuffer);
  data.put("String_Node_Str",Tsave);
  data.put("String_Node_Str",new Double(System.currentTimeMillis() / 1000.));
  data.put("String_Node_Str",glassID);
  data.put("String_Node_Str","String_Node_Str");
  final String dataStr=data.toJSONString();
  if (dataLocal) {
    SaveData(dataStr.getBytes(),"String_Node_Str",true,"String_Node_Str");
  }
  if (dataRemote) {
    remoteImageCount++;
    if (clientConnected())     client.send(dataStr);
  }
}

Fixed version (ground truth):
public void saveDataPacket(final Mat frame){
  final JSONArray curSensorBuffer=sensorBuffer;
  final JSONArray curWifiBuffer=wifiBuffer;
  final Double Tsave=new Double(System.currentTimeMillis() / 1000.);
  sensorBuffer=new JSONArray();
  wifiBuffer=new JSONArray();
  JSONObject data=new JSONObject();
  if (frame != null) {
    Log.i(TAG,"String_Node_Str" + frame.size().toString());
    MatOfByte jpgFrame=new MatOfByte();
    Highgui.imencode("String_Node_Str",frame,jpgFrame);
    final byte[] out=jpgFrame.toArray();
    data.put("String_Node_Str",Base64.encodeToString(out,Base64.NO_WRAP));
  }
  if (!curSensorBuffer.isEmpty())   data.put("String_Node_Str",curSensorBuffer);
  if (!wifiBuffer.isEmpty())   data.put("String_Node_Str",wifiBuffer);
  data.put("String_Node_Str",Tsave);
  data.put("String_Node_Str",new Double(System.currentTimeMillis() / 1000.));
  data.put("String_Node_Str",glassID);
  data.put("String_Node_Str","String_Node_Str");
  final String dataStr=data.toJSONString();
  if (dataLocal) {
    SaveData(dataStr.getBytes(),"String_Node_Str",true,"String_Node_Str");
  }
  if (dataRemote) {
    if (frame != null)     remoteImageCount++;
    if (clientConnected())     client.send(dataStr);
  }
}
Program: 55048
Project: 55048
Buggy source:
@Override public void flatMap(Tuple3<Tuple1<String>,Tuple1<Integer>,Tuple2<Long,Long>> value,Collector<Tuple3<Tuple1<String>,Tuple1<Integer>,Tuple2<Long,Long>>> out) throws Exception {
}

Fixed version (ground truth):
@Override public void flatMap(Tuple2<A,B> value,Collector<Tuple2<C,D>> out) throws Exception {
}
Program: 55049
Project: 55049
Buggy source:
public FSDataInputStreamWrapper(final FSDataInputStream stream,final int len){
  this.stream=stream;
  this.len=len;
  this.pos=0;
}

Fixed version (ground truth):
public FSDataInputStreamWrapper(FSDataInputStream stream,long len){
  this.stream=stream;
  this.len=len;
  this.pos=0;
}
Program: 55050
Project: 55050
Buggy source:
/** 
 * Applies a GroupReduce transformation on a non-grouped   {@link DataSet}.<br/> The transformation calls a   {@link GroupReduceFunction} once with the full DataSet.The GroupReduceFunction can iterate over all elements of the DataSet and emit any number of output elements including none.
 * @param reducer The GroupReduceFunction that is applied on the DataSet.
 * @return A GroupReduceOperator that represents the reduced DataSet.
 * @see GroupReduceFunction
 * @see GroupReduceOperator
 * @see DataSet
 */
public <R>ReduceGroupOperator<T,R> reduceGroup(GroupReduceFunction<T,R> reducer){
  return new ReduceGroupOperator<T,R>(this,reducer);
}

Fixed version (ground truth):
/** 
 * Applies a GroupReduce transformation on a non-grouped   {@link DataSet}.<br/> The transformation calls a   {@link GroupReduceFunction} once with the full DataSet.The GroupReduceFunction can iterate over all elements of the DataSet and emit any number of output elements including none.
 * @param reducer The GroupReduceFunction that is applied on the DataSet.
 * @return A GroupReduceOperator that represents the reduced DataSet.
 * @see GroupReduceFunction
 * @see GroupReduceOperator
 * @see DataSet
 */
public <R>ReduceGroupOperator<T,R> reduceGroup(GroupReduceFunction<T,R> reducer){
  if (reducer == null) {
    throw new NullPointerException("String_Node_Str");
  }
  return new ReduceGroupOperator<T,R>(this,reducer);
}
Program: 55051
Project: 55051
Buggy source:
/** 
 * Applies a Map transformation on a   {@link DataSet}.<br/> The transformation calls a   {@link MapFunction} for each element of the DataSet.Each MapFunction call returns exactly one element.
 * @param mapper The MapFunction that is called for each element of the DataSet.
 * @return A MapOperator that represents the transformed DataSet.
 * @see MapFunction
 * @see MapOperator
 * @see DataSet
 */
public <R>MapOperator<T,R> map(MapFunction<T,R> mapper){
  return new MapOperator<T,R>(this,mapper);
}

Fixed version (ground truth):
/** 
 * Applies a Map transformation on a   {@link DataSet}.<br/> The transformation calls a   {@link MapFunction} for each element of the DataSet.Each MapFunction call returns exactly one element.
 * @param mapper The MapFunction that is called for each element of the DataSet.
 * @return A MapOperator that represents the transformed DataSet.
 * @see MapFunction
 * @see MapOperator
 * @see DataSet
 */
public <R>MapOperator<T,R> map(MapFunction<T,R> mapper){
  if (mapper == null) {
    throw new NullPointerException("String_Node_Str");
  }
  return new MapOperator<T,R>(this,mapper);
}
Program: 55052
Project: 55052
Buggy source:
/** 
 * Applies a Reduce transformation on a non-grouped   {@link DataSet}.<br/> The transformation consecutively calls a   {@link ReduceFunction} until only a single element remains which is the result of the transformation. A ReduceFunction combines two elements into one new element of the same type.
 * @param reducer The ReduceFunction that is applied on the DataSet.
 * @return A ReduceOperator that represents the reduced DataSet.
 * @see ReduceFunction
 * @see ReduceOperator
 * @see DataSet
 */
public ReduceOperator<T> reduce(ReduceFunction<T> reducer){
  return new ReduceOperator<T>(this,reducer);
}

Fixed version (ground truth):
/** 
 * Applies a Reduce transformation on a non-grouped   {@link DataSet}.<br/> The transformation consecutively calls a   {@link ReduceFunction} until only a single element remains which is the result of the transformation. A ReduceFunction combines two elements into one new element of the same type.
 * @param reducer The ReduceFunction that is applied on the DataSet.
 * @return A ReduceOperator that represents the reduced DataSet.
 * @see ReduceFunction
 * @see ReduceOperator
 * @see DataSet
 */
public ReduceOperator<T> reduce(ReduceFunction<T> reducer){
  if (reducer == null) {
    throw new NullPointerException("String_Node_Str");
  }
  return new ReduceOperator<T>(this,reducer);
}
Program: 55053
Project: 55053
Buggy source:
/** 
 * Applies a FlatMap transformation on a   {@link DataSet}.<br/> The transformation calls a   {@link FlatMapFunction} for each element of the DataSet.Each FlatMapFunction call can return any number of elements including none.
 * @param flatMapper The FlatMapFunction that is called for each element of the DataSet. 
 * @return A FlatMapOperator that represents the transformed DataSet.
 * @see FlatMapFunction
 * @see FlatMapOperator
 * @see DataSet
 */
public <R>FlatMapOperator<T,R> flatMap(FlatMapFunction<T,R> flatMapper){
  return new FlatMapOperator<T,R>(this,flatMapper);
}

Fixed version (ground truth):
/** 
 * Applies a FlatMap transformation on a   {@link DataSet}.<br/> The transformation calls a   {@link FlatMapFunction} for each element of the DataSet.Each FlatMapFunction call can return any number of elements including none.
 * @param flatMapper The FlatMapFunction that is called for each element of the DataSet. 
 * @return A FlatMapOperator that represents the transformed DataSet.
 * @see FlatMapFunction
 * @see FlatMapOperator
 * @see DataSet
 */
public <R>FlatMapOperator<T,R> flatMap(FlatMapFunction<T,R> flatMapper){
  if (flatMapper == null) {
    throw new NullPointerException("String_Node_Str");
  }
  return new FlatMapOperator<T,R>(this,flatMapper);
}