Creates a clone of the current automatonEng instance for
iteration alternative purposes.
@return
771871
public AutomatonInstance doClone() {
		AutomatonInstance clone = new AutomatonInstance(this.automatonEng, this.current, this.instanceId, this.safeGuard);
		clone.failed = this.failed;
		clone.transitionCount = this.transitionCount;
		clone.failCount = this.failCount;
		clone.iterateCount = this.iterateCount;
		clone.backtrackCount = this.backtrackCount;
		clone.trace = new LinkedList<>();
		for(StateExploration se:this.trace) {
			clone.trace.add(se.doClone());
		}
		return clone;
	}
556293
public Builder copyBuilder() {
        return GetJobArgs.builder().noHang(noHang).timeout(timeout).withCounters(withCounters);
    }
818499
public function CloneInstance()
	{
		$result = new SpecialChildNodeIterator();
		$result->AssignFrom( $this );
		$result->kind = $this->kind;
		return $result;
	}
992550
public Transformation2D copy() {
		Transformation2D result = new Transformation2D();
		result.xx = xx;
		result.xy = xy;
		result.xd = xd;
		result.yx = yx;
		result.yy = yy;
		result.yd = yd;
		return result;
	}
463974
public SameDiff dup() {
        Cloner cloner = newCloner();
        SameDiff clone = cloner.deepClone(this);
        //TODO don't clone sessions in the first place!
        clone.sessions.clear();
        return clone;
    }
1086693
function () {
            var clone = Base.clone.call(this);

            // Clone "words" array
            var words = clone.words = this.words.slice(0);

            // Clone each X64Word object
            var wordsLength = words.length;
            for (var i = 0; i < wordsLength; i++) {
                words[i] = words[i].clone();
            }

            return clone;
        }
948285
public static JusFragment newInstance() {
		JusFragment fragment = new JusFragment();
		Bundle args = new Bundle();
		fragment.setArguments(args);
		return fragment;
	}
288758
private Geometry cloneRecursively(Geometry geometry) {
		Geometry clone = new Geometry(geometry.geometryType, geometry.srid, geometry.precision);
		if (geometry.getGeometries() != null) {
			Geometry[] geometryClones = new Geometry[geometry.getGeometries().length];
			for (int i = 0; i < geometry.getGeometries().length; i++) {
				geometryClones[i] = cloneRecursively(geometry.getGeometries()[i]);
			}
			clone.setGeometries(geometryClones);
		}
		if (geometry.getCoordinates() != null) {
			Coordinate[] coordinateClones = new Coordinate[geometry.getCoordinates().length];
			for (int i = 0; i < geometry.getCoordinates().length; i++) {
				coordinateClones[i] = (Coordinate) geometry.getCoordinates()[i].clone();
			}
			clone.setCoordinates(coordinateClones);
		}
		return clone;
	}
479852
public ExampleSet copy() {
        ExampleSet copy = new VectorSet();
        for (int i = 0; i < size(); i++)
            copy.add(x(i), y(i), id(i));

        return copy;
    }
912928
public static HyphenatorBuilder getInstance() {

    if (instance == null) {
      synchronized (HyphenatorBuilderImpl.class) {
        if (instance == null) {
          HyphenatorBuilderImpl impl = new HyphenatorBuilderImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
1301701
public static ScriptRunner createRunner() {
		RunnerType t = runner.get();
		
		switch (t) {
		case AUTO:
			if (supportsV8()) {
				return createV8Runner();
			}
			//fall back to JRE
			return createJreRunner();
		
		case JRE:
			return createJreRunner();
		
		case V8:
			return createV8Runner();
		
		default:
			throw new RuntimeException("Invalid runner type");
		}
	}
39171
def clone(self):
        

        p = type(self)(self.id)
        p.hooks = list(self.hooks)
        p.instance = self.instance
        return p
240826
public static <I, O> Example<I, O> create(I input, O output) {
    return new Example<I, O>(input, output);
  }
115084
@SuppressWarnings("unchecked")
    public static <T> T[] cloneArray(T[] original) {
        if (original == null) {
            return null;
        }

        try {
            Class<?> clazz = original.getClass().getComponentType();
            T[] copy = (T[]) Array.newInstance(clazz, original.length);
            if (copy.length != 0) {
                Constructor<T> copyConstructor = (Constructor<T>) clazz.getConstructor(clazz);
                int i = 0;
                for (T t : original) {
                    copy[i++] = copyConstructor.newInstance(t);
                }
            }
            return copy;
        } catch (Exception e) {
            throw new RuntimeException("Cannot copy array. Does its type have a copy-constructor? " + original, e);
        }
    }
1198809
Object cloneReset() throws CloneNotSupportedException {
        // this method exists to enable 100% test coverage
        final StrTokenizer cloned = new StrTokenizer();

        if (this.chars != null) {
            cloned.chars = new char[this.chars.length];
            for (int i = 0; i < this.chars.length; i++) {
                cloned.chars[i] = this.chars[i];
            }
        }
        if (this.tokens == null) {
            cloned.tokens = null;
        } else {
            cloned.tokens = this.getTokenArray();
        }
        cloned.tokenPos = this.tokenPos;
        cloned.emptyAsNull = this.emptyAsNull;
        cloned.ignoreEmptyTokens = this.ignoreEmptyTokens;

        cloned.delimMatcher = this.delimMatcher;
        cloned.quoteMatcher = this.quoteMatcher;
        cloned.ignoredMatcher = this.ignoredMatcher;
        cloned.trimmerMatcher = this.trimmerMatcher;

        cloned.reset();
        return cloned;
    }
388509
public Pattern52 clonePattern() {
        Pattern52 cloned = new Pattern52();
        cloned.setBoundName( getBoundName() );
        cloned.setChildColumns( new ArrayList<ConditionCol52>( getChildColumns() ) );
        cloned.setEntryPointName( getEntryPointName() );
        cloned.setFactType( getFactType() );
        cloned.setNegated( isNegated() );
        cloned.setWindow( getWindow() );
        return cloned;
    }
59050
public TableGenerator<EntityMappings<T>> getOrCreateTableGenerator()
   {
      List<Node> nodeList = childNode.get("table-generator");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new TableGeneratorImpl<EntityMappings<T>>(this, "table-generator", childNode, nodeList.get(0));
      }
      return createTableGenerator();
   }