CloneSet8


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
113220.976class_body_declarations[9]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1113141
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/config/Arguments.java
2113145
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/config/gui/LDAPArguments.java
Next
Last
Clone Instance
1
Line Count
113
Source Line
141
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/config/Arguments.java

/**
 * Get a PropertyIterator of the arguments.
 * 
 * @return an iteration of the arguments
 */
public PropertyIterator iterator() {
  return getArguments().iterator();
}

/**
 * Create a string representation of the arguments.
 * 
 * @return the string representation of the arguments
 */
public String toString() {
  StringBuffer str = new StringBuffer();
  PropertyIterator iter = getArguments().iterator();
  while (iter.hasNext()) {
    Argument arg = (Argument) iter.next().getObjectValue();
    final String metaData = arg.getMetaData();
    str.append(arg.getName());
    if (metaData == null) {
      str.append("="); //$NON-NLS-1$
    }
    else {
      str.append(metaData);
    }
    str.append(arg.getValue());
    if (iter.hasNext()) {
      str.append("&"); //$NON-NLS-1$
    }
  }
  return str.toString();
}

/**
 * Remove the specified argument from the list.
 * 
 * @param row
 *            the index of the argument to remove
 */
public void removeArgument(int row) {
  if (row < getArguments().size()) {
    getArguments().remove(row);
  }
}

/**
 * Remove the specified argument from the list.
 * 
 * @param arg
 *            the argument to remove
 */
public void removeArgument(Argument arg) {
  PropertyIterator iter = getArguments().iterator();
  while (iter.hasNext()) {
    Argument item = (Argument) iter.next().getObjectValue();
    if (arg.equals(item)) {
      iter.remove();
    }
  }
}

/**
 * Remove the argument with the specified name.
 * 
 * @param argName
 *            the name of the argument to remove
 */
public void removeArgument(String argName) {
  PropertyIterator iter = getArguments().iterator();
  while (iter.hasNext()) {
    Argument arg = (Argument) iter.next().getObjectValue();
    if (arg.getName().equals(argName)) {
      iter.remove();
    }
  }
}

/**
 * Remove all arguments from the list.
 */
public void removeAllArguments() {
  getArguments().clear();
}

/**
 * Add a new empty argument to the list. The new argument will have the
 * empty string as its name and value, and null metadata.
 */
public void addEmptyArgument() {
  addArgument(new Argument("", "", null));
}

/**
 * Get the number of arguments in the list.
 * 
 * @return the number of arguments
 */
public int getArgumentCount() {
  return getArguments().size();
}

/**
 * Get a single argument.
 * 
 * @param row
 *            the index of the argument to return.
 * @return the argument at the specified index, or null if no argument
 *         exists at that index.
 */
public Argument getArgument(int row) {
  Argument argument = null;
  if (row < getArguments().size()) {
    argument = (Argument) getArguments().get(row).getObjectValue();
  }
  return argument;
}


First
Previous
Clone Instance
2
Line Count
113
Source Line
145
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/config/gui/LDAPArguments.java

/**
 * Get a PropertyIterator of the arguments.
 * 
 * @return an iteration of the arguments
 */
public PropertyIterator iterator() {
  return getArguments().iterator();
}

/**
 * Create a string representation of the arguments.
 * 
 * @return the string representation of the arguments
 */
public String toString() {
  StringBuffer str = new StringBuffer();
  PropertyIterator iter = getArguments().iterator();
  while (iter.hasNext()) {
    LDAPArgument arg = (LDAPArgument) iter.next().getObjectValue();
    final String metaData = arg.getMetaData();
    str.append(arg.getName());
    if (metaData == null) {
      str.append("="); //$NON-NLS$
    }
    else {
      str.append(metaData);
    }
    str.append(arg.getValue());
    if (iter.hasNext()) {
      str.append("&"); //$NON-NLS$
    }
  }
  return str.toString();
}

/**
 * Remove the specified argument from the list.
 * 
 * @param row
 *            the index of the argument to remove
 */
public void removeArgument(int row) {
  if (row < getArguments().size()) {
    getArguments().remove(row);
  }
}

/**
 * Remove the specified argument from the list.
 * 
 * @param arg
 *            the argument to remove
 */
public void removeArgument(LDAPArgument arg) {
  PropertyIterator iter = getArguments().iterator();
  while (iter.hasNext()) {
    LDAPArgument item = (LDAPArgument) iter.next().getObjectValue();
    if (arg.equals(item)) {
      iter.remove();
    }
  }
}

/**
 * Remove the argument with the specified name.
 * 
 * @param argName
 *            the name of the argument to remove
 */
public void removeArgument(String argName) {
  PropertyIterator iter = getArguments().iterator();
  while (iter.hasNext()) {
    LDAPArgument arg = (LDAPArgument) iter.next().getObjectValue();
    if (arg.getName().equals(argName)) {
      iter.remove();
    }
  }
}

/**
 * Remove all arguments from the list.
 */
public void removeAllArguments() {
  getArguments().clear();
}

/**
 * Add a new empty argument to the list. The new argument will have the
 * empty string as its name and value, and null metadata.
 */
public void addEmptyArgument() {
  addArgument(new LDAPArgument("", "", "", null));
}

/**
 * Get the number of arguments in the list.
 * 
 * @return the number of arguments
 */
public int getArgumentCount() {
  return getArguments().size();
}

/**
 * Get a single argument.
 * 
 * @param row
 *            the index of the argument to return.
 * @return the argument at the specified index, or null if no argument
 *         exists at that index.
 */
public LDAPArgument getArgument(int row) {
  LDAPArgument argument = null;
  if (row < getArguments().size()) {
    argument = (LDAPArgument) getArguments().get(row).getObjectValue();
  }
  return argument;
}


Clone AbstractionParameter Count: 2Parameter Bindings

/**
         * Get a PropertyIterator of the arguments.
         * 
         * @return an iteration of the arguments
         */
public PropertyIterator iterator() {
  return getArguments().iterator();
}

/**
         * Create a string representation of the arguments.
         * 
         * @return the string representation of the arguments
         */
public String toString() {
  StringBuffer str = new StringBuffer();
  PropertyIterator iter = getArguments().iterator();
  while (iter.hasNext()) {
     [[#variablee05ece0]] arg = ( [[#variablee05ece0]]) iter.next().getObjectValue();
    final String metaData = arg.getMetaData();
    str.append(arg.getName());
    if (metaData == null) {
      str.append("="); //$NON-NLS$ //$NON-NLS-1$
    }
    else {
      str.append(metaData);
    }
    str.append(arg.getValue());
    if (iter.hasNext()) {
      str.append("&"); //$NON-NLS$ //$NON-NLS-1$
    }
  }
  return str.toString();
}

/**
         * Remove the specified argument from the list.
         * 
         * @param row
         *            the index of the argument to remove
         */
public void removeArgument(int row) {
  if (row < getArguments().size()) {
    getArguments().remove(row);
  }
}

/**
         * Remove the specified argument from the list.
         * 
         * @param arg
         *            the argument to remove
         */
public void removeArgument( [[#variablee05ece0]] arg) {
  PropertyIterator iter = getArguments().iterator();
  while (iter.hasNext()) {
     [[#variablee05ece0]] item = ( [[#variablee05ece0]]) iter.next().getObjectValue();
    if (arg.equals(item)) {
      iter.remove();
    }
  }
}

/**
         * Remove the argument with the specified name.
         * 
         * @param argName
         *            the name of the argument to remove
         */
public void removeArgument(String argName) {
  PropertyIterator iter = getArguments().iterator();
  while (iter.hasNext()) {
     [[#variablee05ece0]] arg = ( [[#variablee05ece0]]) iter.next().getObjectValue();
    if (arg.getName().equals(argName)) {
      iter.remove();
    }
  }
}

/**
         * Remove all arguments from the list.
         */
public void removeAllArguments() {
  getArguments().clear();
}

/**
         * Add a new empty argument to the list. The new argument will have the
         * empty string as its name and value, and null metadata.
         */
public void addEmptyArgument() {
  addArgument(new [[#variablee05ece0]]( [[#variablee05ec80]], "", null));
}

/**
         * Get the number of arguments in the list.
         * 
         * @return the number of arguments
         */
public int getArgumentCount() {
  return getArguments().size();
}

/**
         * Get a single argument.
         * 
         * @param row
         *            the index of the argument to return.
         * @return the argument at the specified index, or null if no argument
         *         exists at that index.
         */
public [[#variablee05ece0]] getArgument(int row) {
   [[#variablee05ece0]] argument = null;
  if (row < getArguments().size()) {
    argument = ( [[#variablee05ece0]]) getArguments().get(row).getObjectValue();
  }
  return argument;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#e05ece0]]
Argument 
12[[#e05ece0]]
LDAPArgument 
21[[#e05ec80]]
"" 
22[[#e05ec80]]
"", ""