CloneSet48


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
19230.973method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
119166
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/types/Assertions.java
219215
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/types/Assertions.java
Next
Last
Clone Instance
1
Line Count
19
Source Line
166
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/types/Assertions.java

/**
 * add the assertions to a list in a format suitable
 * for adding to a command line
 * @param commandList the command line to format
 */
public void applyAssertions(List commandList) {
  getProject().log("Applying assertions", Project.MSG_DEBUG);
  Assertions clause = getFinalReference();
  //do the system assertions
  if (Boolean.TRUE.equals(clause.enableSystemAssertions)) {
    getProject().log("Enabling system assertions", Project.MSG_DEBUG);
    commandList.add("-enablesystemassertions");
  }
  else
    if (Boolean.FALSE.equals(clause.enableSystemAssertions)) {
      getProject().log("disabling system assertions", Project.MSG_DEBUG);
      commandList.add("-disablesystemassertions");
    }
  //now any inner assertions
  Iterator it = clause.assertionList.iterator();
  while (it.hasNext()) {
    BaseAssertion assertion = (BaseAssertion) it.next();
    String arg = assertion.toCommand();
    getProject().log("adding assertion " + arg, Project.MSG_DEBUG);
    commandList.add(arg);
  }
}


First
Previous
Clone Instance
2
Line Count
19
Source Line
215
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/types/Assertions.java

/**
 * add the assertions to a list in a format suitable
 * for adding to a command line
 * @param commandIterator list of commands
 */
public void applyAssertions( final ListIterator commandIterator) {
  getProject().log("Applying assertions", Project.MSG_DEBUG);
  Assertions clause = getFinalReference();
  //do the system assertions
  if (Boolean.TRUE.equals(clause.enableSystemAssertions)) {
    getProject().log("Enabling system assertions", Project.MSG_DEBUG);
    commandIterator.add("-enablesystemassertions");
  }
  else
    if (Boolean.FALSE.equals(clause.enableSystemAssertions)) {
      getProject().log("disabling system assertions", Project.MSG_DEBUG);
      commandIterator.add("-disablesystemassertions");
    }
  //now any inner assertions
  Iterator it = clause.assertionList.iterator();
  while (it.hasNext()) {
    BaseAssertion assertion = (BaseAssertion) it.next();
    String arg = assertion.toCommand();
    getProject().log("adding assertion " + arg, Project.MSG_DEBUG);
    commandIterator.add(arg);
  }
}


Clone AbstractionParameter Count: 3Parameter Bindings

/**
     * add the assertions to a list in a format suitable
     * for adding to a command line
     * @param commandIterator list of commands
     */
/**
     * add the assertions to a list in a format suitable
     * for adding to a command line
     * @param commandList the command line to format
     */
public void applyAssertions( [[#variable111f5120]] [[#variablefe5f900]]  [[#variablefdef660]]) {
  getProject().log("Applying assertions", Project.MSG_DEBUG);
  Assertions clause = getFinalReference();
  //do the system assertions
  if (Boolean.TRUE.equals(clause.enableSystemAssertions)) {
    getProject().log("Enabling system assertions", Project.MSG_DEBUG);
     [[#variablefdef660]].add("-enablesystemassertions");
  }
  else
    if (Boolean.FALSE.equals(clause.enableSystemAssertions)) {
      getProject().log("disabling system assertions", Project.MSG_DEBUG);
       [[#variablefdef660]].add("-disablesystemassertions");
    }
  //now any inner assertions
  Iterator it = clause.assertionList.iterator();
  while (it.hasNext()) {
    BaseAssertion assertion = (BaseAssertion) it.next();
    String arg = assertion.toCommand();
    getProject().log("adding assertion " + arg, Project.MSG_DEBUG);
     [[#variablefdef660]].add(arg);
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#111f5120]]
12[[#111f5120]]
final 
21[[#fe5f900]]
List 
22[[#fe5f900]]
ListIterator 
31[[#fdef660]]
commandList 
32[[#fdef660]]
commandIterator