CloneSet29


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
34220.993statement_sequence[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
134809
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
234777
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
Next
Last
Clone Instance
1
Line Count
34
Source Line
809
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java

newJarStream.setLevel(0);
//Copy files from old weblogic jar
for (Enumeration e = wlEntries.elements(); e.hasMoreElements();) {
  byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
  int bytesRead;
  InputStream is;
  JarEntry je = (JarEntry) e.nextElement();
  if (je.getCompressedSize() == -1 || je.getCompressedSize() == je.getSize()) {
    newJarStream.setLevel(0);
  }
  else {
    newJarStream.setLevel(JAR_COMPRESS_LEVEL);
  }
  // Update with changed Bean class
  if (replaceEntries.containsKey(je.getName())) {
    log("Updating Bean class from generic Jar " + je.getName(), Project.MSG_VERBOSE);
    // Use the entry from the generic jar
    je = (JarEntry) replaceEntries.get(je.getName());
    is = genericJar.getInputStream(je);
  }
  else {
    //use fle from original weblogic jar
    is = wlJar.getInputStream(je);
  }
  newJarStream.putNextEntry(new JarEntry(je.getName()));
  while ((bytesRead = is.read(buffer)) != -1) {
    newJarStream.write(buffer, 0, bytesRead);
  }
  is.close();
}


First
Previous
Clone Instance
2
Line Count
34
Source Line
777
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java

newJarStream.setLevel(0);
//Copy files from old websphere jar
for (Enumeration e = wasEntries.elements(); e.hasMoreElements();) {
  byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
  int bytesRead;
  InputStream is;
  JarEntry je = (JarEntry) e.nextElement();
  if (je.getCompressedSize() == -1 || je.getCompressedSize() == je.getSize()) {
    newJarStream.setLevel(0);
  }
  else {
    newJarStream.setLevel(JAR_COMPRESS_LEVEL);
  }
  // Update with changed Bean class
  if (replaceEntries.containsKey(je.getName())) {
    log("Updating Bean class from generic Jar " + je.getName(), Project.MSG_VERBOSE);
    // Use the entry from the generic jar
    je = (JarEntry) replaceEntries.get(je.getName());
    is = genericJar.getInputStream(je);
  }
  else {
    //use fle from original websphere jar
    is = wasJar.getInputStream(je);
  }
  newJarStream.putNextEntry(new JarEntry(je.getName()));
  while ((bytesRead = is.read(buffer)) != -1) {
    newJarStream.write(buffer, 0, bytesRead);
  }
  is.close();
}


Clone AbstractionParameter Count: 2Parameter Bindings

newJarStream.setLevel(0);
//Copy files from old weblogic jar
//Copy files from old websphere jar
for (Enumeration e = [[#variable131c23a0]].elements(); e.hasMoreElements();) {
  byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
  int bytesRead;
  InputStream is;
  JarEntry je = (JarEntry) e.nextElement();
  if (je.getCompressedSize() == -1 || je.getCompressedSize() == je.getSize()) {
    newJarStream.setLevel(0);
  }
  else {
    newJarStream.setLevel(JAR_COMPRESS_LEVEL);
  }
  // Update with changed Bean class
  if (replaceEntries.containsKey(je.getName())) {
    log("Updating Bean class from generic Jar " + je.getName(), Project.MSG_VERBOSE);
    // Use the entry from the generic jar
    je = (JarEntry) replaceEntries.get(je.getName());
    is = genericJar.getInputStream(je);
  }
  else {
    //use fle from original weblogic jar
    //use fle from original websphere jar
    is = [[#variablef71d920]].getInputStream(je);
  }
  newJarStream.putNextEntry(new JarEntry(je.getName()));
  while ((bytesRead = is.read(buffer)) != -1) {
    newJarStream.write(buffer, 0, bytesRead);
  }
  is.close();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#131c23a0]]
wlEntries 
12[[#131c23a0]]
wasEntries 
21[[#f71d920]]
wlJar 
22[[#f71d920]]
wasJar