CloneSet35


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
80220.988class_body_declarations[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
18261
E:/TSE/Projects-CloneDR/columba-1.4-src/core/src/main/java/org/columba/core/base/IPCHelper.java
28057
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/spam/spamassassin/IPCHelper.java
Next
Last
Clone Instance
1
Line Count
82
Source Line
61
Source File
E:/TSE/Projects-CloneDR/columba-1.4-src/core/src/main/java/org/columba/core/base/IPCHelper.java

public void send(String in) throws Exception {
  inputStream.write(in.getBytes());
  inputStream.flush();
  inputStream.close();
}

public void send(InputStream in) throws Exception {
  StreamUtils.streamCopy(in, inputStream);
  inputStream.flush();
  inputStream.close();
}

public int waitFor() throws Exception {
  int exitVal = p.waitFor();
  return exitVal;
}

/**
     * 
     * return error
     * 
     * @return
     * @throws Exception
     */
public String getErrorString() throws Exception {
  String str = errorStream.getBuffer();
  return str;
}

/**
     * 
     * return output
     * 
     * @return
     * @throws Exception
     */
public String getOutputString() throws Exception {
  String str = outputStream.getBuffer();
  return str;
}

/*
     * wait for stream threads to die
     * 
     */
public void waitForThreads() throws Exception {
  outputStream.join();
  errorStream.join();
}

public class StreamThread extends Thread {
  InputStream is;

  StringBuffer buf;

  public StreamThread(InputStream theInputStream) {
    this.is = theInputStream;
    buf = new StringBuffer();
  }

  @Override public void run() {
    try {
      InputStreamReader isr = new InputStreamReader(is);
      BufferedReader br = new BufferedReader(isr);
      String line = null;
      while ((line = br.readLine()) != null) {
        LOG.info(">" + line); //$NON-NLS-1$
        buf.append(line + "\n"); //$NON-NLS-1$
      }
    }
    catch (IOException
           ioe) {
      ioe.printStackTrace();
    }
  }

  public String getBuffer() {
    return buf.toString();
  }
}


First
Previous
Clone Instance
2
Line Count
80
Source Line
57
Source File
E:/TSE/Projects-CloneDR/columba-1.4-src/mail/src/main/java/org/columba/mail/spam/spamassassin/IPCHelper.java

public void send(String in) throws Exception {
  inputStream.write(in.getBytes());
  inputStream.flush();
  inputStream.close();
}

public void send(InputStream in) throws Exception {
  StreamUtils.streamCopy(in, inputStream);
  inputStream.flush();
  inputStream.close();
}

public int waitFor() throws Exception {
  int exitVal = p.waitFor();
  return exitVal;
}

/**
 *
 * return error
 *
 * @return @throws
 *         Exception
 */
public String getErrorString() throws Exception {
  String str = errorStream.getBuffer();
  return str;
}

/**
 *
 * return output
 *
 * @return @throws
 *         Exception
 */
public String getOutputString() throws Exception {
  String str = outputStream.getBuffer();
  return str;
}

/*
 * wait for stream threads to die
 *
 */
public void waitForThreads() throws Exception {
  outputStream.join();
  errorStream.join();
}

public class StreamThread extends Thread {
  InputStream is;

  StringBuffer buf;

  public StreamThread(InputStream is) {
    this.is = is;
    buf = new StringBuffer();
  }

  public void run() {
    try {
      InputStreamReader isr = new InputStreamReader(is);
      BufferedReader br = new BufferedReader(isr);
      String line = null;
      while ((line = br.readLine()) != null) {
        LOG.info(">" + line); //$NON-NLS-1$
        buf.append(line + "\n");
      }
    }
    catch (IOException
           ioe) {
      ioe.printStackTrace();
    }
  }

  public String getBuffer() {
    return buf.toString();
  }
}


Clone AbstractionParameter Count: 2Parameter Bindings

public void send(String in) throws Exception {
  inputStream.write(in.getBytes());
  inputStream.flush();
  inputStream.close();
}

public void send(InputStream in) throws Exception {
  StreamUtils.streamCopy(in, inputStream);
  inputStream.flush();
  inputStream.close();
}

public int waitFor() throws Exception {
  int exitVal = p.waitFor();
  return exitVal;
}

/**
     *
     * return error
     *
     * @return @throws
     *         Exception
     */
/**
         * 
         * return error
         * 
         * @return
         * @throws Exception
         */
public String getErrorString() throws Exception {
  String str = errorStream.getBuffer();
  return str;
}

/**
     *
     * return output
     *
     * @return @throws
     *         Exception
     */
/**
         * 
         * return output
         * 
         * @return
         * @throws Exception
         */
public String getOutputString() throws Exception {
  String str = outputStream.getBuffer();
  return str;
}

/*
     * wait for stream threads to die
     *
     */
/*
         * wait for stream threads to die
         * 
         */
public void waitForThreads() throws Exception {
  outputStream.join();
  errorStream.join();
}

public class StreamThread extends Thread {
  InputStream is;

  StringBuffer buf;

  public StreamThread(InputStream  [[#variablef318a60]]) {
    this.is = [[#variablef318a60]];
    buf = new StringBuffer();
  }

   [[#variablef316080]]void run() {
    try {
      InputStreamReader isr = new InputStreamReader(is);
      BufferedReader br = new BufferedReader(isr);
      String line = null;
      while ((line = br.readLine()) != null) {
        LOG.info(">" + line); //$NON-NLS-1$
        buf.append(line + "\n"); //$NON-NLS-1$
      }
    }
    catch (IOException
           ioe) {
      ioe.printStackTrace();
    }
  }

  public String getBuffer() {
    return buf.toString();
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#f318a60]]
theInputStream 
12[[#f318a60]]
is 
21[[#f316080]]
@Override public 
22[[#f316080]]
public