To append new value to class total NPath

@param string $sClassName class name
@param int    $iNPath     new value of NPath
547291
public function appendClassTotalNPath($sClassName, $iNPath)
    {
        if (!isset($this->_aStats[$sClassName]['sum']['npath'])) {
            $this->_aStats[$sClassName]['sum']['npath'] = 0;
        }

        $this->_aStats[$sClassName]['sum']['npath'] += $iNPath;
    }
848262
public function appendClassTotalCNN($sClassName, $iCNN)
    {
        if (!isset($this->_aStats[$sClassName]['sum']['cnn'])) {
            $this->_aStats[$sClassName]['sum']['cnn'] = 0;
        }

        $this->_aStats[$sClassName]['sum']['cnn'] += $iCNN;
    }
111387
public function addClass(string $className): void
    {
        if (!is_subclass_of($className, Provider::class, true)) {
            throw new InvalidClassException;
        }

        /** @var string[] $typeList */
        $typeList = $className::getPredefinedList();

        foreach ($typeList as $type) {
            if (isset($this->providerType[$type])) {
                throw new DuplicateSupportedTypeException;
            }
            $this->providerType[$type] = self::PROVIDER_CLASS;
            $this->classes[$type] = $className;
        }
    }
215303
public  function addClassPath($path) {
        if(!is_array($path)) {
            $path = array($path);
        }
        foreach($path as $item) {
            $this->classPaths[] = $item;
        }
    }
888815
private function initPackageClassPhp($path, $packageName)
    {
        $class = $this->getClass($packageName);
        $namespace = $this->getNamespace($packageName);
        $file = $path.'/src/'.$class.'.php';
        if (file_exists($file)) {
            return;
        }
        $code = file_get_contents(__DIR__.'/../../tpl/PackageClass.php.txt');
        $code = str_replace(['%%CLASS%%', '%%NAMESPACE%%'], [$class, $namespace], $code);
        if (!is_dir($path.'/src')) {
            mkdir($path.'/src');
        }
        file_put_contents($file, $code);
    }
500306
public function setClass($className, $classPath) {
		$className = strtolower($className);
		$path = null;
		if(
			// Pure object naming with only lib name and exact class name
			existsPathOf(LIBSDIR.$classPath.'/'.$className.'.php', $path) ||
			// Pure object naming
			existsPathOf(LIBSDIR.$classPath.'.php', $path) ||
			// Old Orpheus naming
			existsPathOf(LIBSDIR.$classPath.'_class.php', $path) ||
			// Full path
			existsPathOf(LIBSDIR.$classPath, $path)
		) {
			$this->classes[$className] = $path;
			
		} else {
			throw new \Exception("ClassLoader : File \"{$classPath}\" of class \"{$className}\" not found.");
		}
		return true;
		
	}
1152877
@Override
    public void trainOnInstanceImpl(Instance inst) {
        if (this.reset == true) {
            this.m_numClasses = inst.numClasses();
            double laplace = this.laplaceCorrectionOption.getValue();
            int numAttributes = inst.numAttributes();

            m_probOfClass = new double[m_numClasses];
            Arrays.fill(m_probOfClass, laplace);

            m_classTotals = new double[m_numClasses];
            Arrays.fill(m_classTotals, laplace * numAttributes);

            m_wordTotalForClass = new DoubleVector[m_numClasses];
            for (int i = 0; i< m_numClasses; i++) {
                //Arrays.fill(wordTotal, laplace);
                m_wordTotalForClass[i] = new DoubleVector();
            }
            this.reset = false;
        }
        // Update classifier
        int classIndex = inst.classIndex();
        int classValue = (int) inst.classValue();//value(classIndex);

        double w = inst.weight();
        m_probOfClass[classValue] += w;

        m_classTotals[classValue] += w * totalSize(inst);
        double total = m_classTotals[classValue];

        for (int i = 0; i < inst.numValues(); i++) {
            int index = inst.index(i);
            if (index != classIndex && !inst.isMissing(i)) {
                //m_wordTotalForClass[index][classValue] += w * inst.valueSparse(i);
                double laplaceCorrection = 0.0;
                if (m_wordTotalForClass[classValue].getValue(index)== 0) {
                    laplaceCorrection = this.laplaceCorrectionOption.getValue();
                }
                m_wordTotalForClass[classValue].addToValue(index, w * inst.valueSparse(i) + laplaceCorrection);
            }
        }
    }
982446
protected function traitPostCopy(
        string $filePath
    ): void {
        $this->findAndReplaceHelper->replaceFieldTraitNamespace($this->traitNamespace, $filePath);
        $this->findAndReplaceHelper->replaceFieldInterfaceNamespace($this->interfaceNamespace, $filePath);
        $this->postCopy($filePath);
    }
798359
function(sHTML, sClassName) {
    var elCell = this._elMsgTd;
    if(lang.isString(sHTML)) {
        elCell.firstChild.innerHTML = sHTML;
    }
    if(lang.isString(sClassName)) {
        Dom.addClass(elCell.firstChild, sClassName);
    }

    // Needed for SDT only
    var elThead = this.getTheadEl();
    var elTable = elThead.parentNode;
    var newWidth = elTable.offsetWidth;
    this._elMsgTbody.parentNode.style.width = this.getTheadEl().parentNode.offsetWidth + "px";

    this._elMsgTbody.style.display = "";

    this.fireEvent("tableMsgShowEvent", {html:sHTML, className:sClassName});
    YAHOO.log("DataTable showing message: " + sHTML, "info", this.toString());
}
526682
static function add_path($prefix)
	{
		spl_autoload_register(

			function ($cn) use ($prefix) {
				$className = ltrim($cn, '\\');
				$fileName = '';
				if ($lastNsPos = strrpos($className, '\\')) {
					$namespace = substr($className, 0, $lastNsPos);
					$className = substr($className, $lastNsPos + 1);
					$fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
				}
				$fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
				$fileName = $prefix . DIRECTORY_SEPARATOR . $fileName;
				if (self::$debug) echo "<div>AUTOLOAD : Considering ($fileName)</div>";
				self::$consider_count++;
				if (self::$consider_count > 500) die("Consider Count Exceeded");
				if (file_exists($fileName)) {
					if (self::$debug) echo "<div>AUTOLOAD: Returning $fileName </div>";
					require $fileName;
					return;
				}
			}
		);
	}
389663
protected function copyFiles($fromPath, $toPath, $namespace)
    {
        // trim paths
        $fromPath = rtrim($fromPath, "/\\");
        $toPath = rtrim($toPath, "/\\");

        // get files recursively
        $filePaths = $this->glob_recursive($fromPath . "/*");

        // generate new files
        $results = [];
        foreach ($filePaths as $file) {

            // skip directories
            if (is_dir($file)) {
                continue;
            }

            // calculate new file path and relative file
            $newFilePath = str_replace($fromPath, $toPath, $file);
            $relativeFile = str_replace($fromPath, "", $file);

            // get file content and replace namespace
            $content = file_get_contents($file);
            $content = str_replace("amnah\\yii2\\user", $namespace, $content);

            // save and store result
            if (file_exists($newFilePath)) {
                $results[$relativeFile] = "File already exists ... skipping";
            } else {
                $result = $this->save($newFilePath, $content);
                $results[$relativeFile] = ($result === true ? "success" : $result);
            }
        }

        print_r($results);
    }
1328652
private void handleAuxClassPathFromFile(String filePath) throws IOException {
        try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) {
            while (true) {
                String s = in.readLine();
                if (s == null) {
                    break;
                }
                project.addAuxClasspathEntry(s);
            }
        }
    }
273934
public function appendClassTotalCrapIndex($sClassName, $iCrapIndex)
    {
        if (!isset($this->_aStats[$sClassName]['sum']['crap'])) {
            $this->_aStats[$sClassName]['sum']['crap'] = 0;
        }
        $this->_aStats[$sClassName]['sum']['crap'] += $iCrapIndex;
    }
1347050
public static void compile(Class<?> cls, File outputPath) {
        if (outputPath == null) {
            throw new NullPointerException("Param 'outputPath' is null.");
        }
        if (!outputPath.isDirectory()) {
            throw new RuntimeException("Param 'outputPath' value should be a path directory. path=" + outputPath);
        }

    }
1253302
public function addDataTypeDefinition($typeName, $typeClass, $classpath = null)
    {
        if (!isset($this->typedefs[$typeName])) {
            Phing::import($typeClass, $classpath);
            $this->typedefs[$typeName] = $typeClass;
            $this->project->log("  +User datatype: $typeName ($typeClass)", Project::MSG_DEBUG);
        } else {
            $this->project->log("Type $typeName ($typeClass) already registered, skipping", Project::MSG_VERBOSE);
        }
    }
13121
static protected function insertValueIntoStructureByPath(array $path, &$target, $value) {
		$segment = array_shift($path);
		if (count($path) > 0) {
			if (!array_key_exists($segment, $target)) {
				$target[$segment] = array();
			}
			self::insertValueIntoStructureByPath($path, $target[$segment], $value);
		} else {
			$target[$segment] = $value;
		}
		ksort($target);
	}
1277410
public function addPath($path, $namespace = null)
    {
        if (! is_dir($path)) {
            throw new Exception\InvalidPathException("Template path '$path' does not exist");
        }

        if (null !== $namespace && ! is_string($namespace)) {
            throw new Exception\InvalidNamespaceException('Namespace must be a string');
        }

        $namespace = $namespace ?: self::DEFAULT_NAMESPACE;
        $path = rtrim((string) $path, '/\\');
        $this->getPath($namespace)->push($path);

        return $this;
    }