CHECKSTYLE IGNORE LINE: ExecutableStatementCount
484198
private void process(int[] srcImage, int[] dstImage, int x, int y)
    {
        final int a = getSourcePixel(srcImage, x - 1, y - 1);
        final int b = getSourcePixel(srcImage, x, y - 1);
        final int c = getSourcePixel(srcImage, x + 1, y - 1);
        final int d = getSourcePixel(srcImage, x - 1, y);
        final int e = getSourcePixel(srcImage, x, y);
        final int f = getSourcePixel(srcImage, x + 1, y);
        final int g = getSourcePixel(srcImage, x - 1, y + 1);
        final int h = getSourcePixel(srcImage, x, y + 1);
        final int i = getSourcePixel(srcImage, x + 1, y + 1);
        int e0 = e;
        int e1 = e;
        int e2 = e;
        int e3 = e;
        int e4 = e;
        int e5 = e;
        int e6 = e;
        int e7 = e;
        int e8 = e;

        if (b != h && d != f)
        {
            e0 = computeE0(b, d, e);
            e1 = computeE1(a, b, c, d, e, f);
            e2 = computeE2(b, e, f);
            e3 = computeE3(a, b, d, e, g, h);
            e4 = e;
            e5 = computeE5(b, c, e, f, h, i);
            e6 = computeE6(d, e, h);
            e7 = computeE7(d, e, f, g, h, i);
            e8 = computeE8(e, f, h);
        }

        setDestPixel(dstImage, x * SCALE, y * SCALE, e0);
        setDestPixel(dstImage, x * SCALE + 1, y * SCALE, e1);
        setDestPixel(dstImage, x * SCALE + 2, y * SCALE, e2);
        setDestPixel(dstImage, x * SCALE, y * SCALE + 1, e3);
        setDestPixel(dstImage, x * SCALE + 1, y * SCALE + 1, e4);
        setDestPixel(dstImage, x * SCALE + 2, y * SCALE + 1, e5);
        setDestPixel(dstImage, x * SCALE, y * SCALE + 2, e6);
        setDestPixel(dstImage, x * SCALE + 1, y * SCALE + 2, e7);
        setDestPixel(dstImage, x * SCALE + 2, y * SCALE + 2, e8);
    }
535529
def _exec_check_pointers(executable):
    
    oparams = []
    pmembers = {}
    xassigns = map(lambda x: x.lower().strip(), executable.external_assignments())

    def add_offense(pname, member):
        """Adds the specified member as an offender under the specified parameter."""
        if pname not in oparams:
            oparams.append(pname)
        if pname not in pmembers:
            pmembers[pname] = [member]
        else:
            pmembers[pname].append(member)

    def check_buried(executable, pname, member):
        """Checks whether the member has its value changed by one of the dependency
        subroutines in the executable.
        """
        for d in executable.dependencies:
            if pname in d.argnames:
                pindex = d.argnames.index(pname)
                dtarget = d.target
                if dtarget is not None:
                    mparam = dtarget.ordered_parameters[pindex]
            
    for pname, param in executable.parameters.items():
        if param.direction == "(out)" and param.is_custom:
            utype = param.customtype
            if utype is None:
                continue
            for mname, member in utype.members.items():
                key = "{}%{}".format(pname, mname).lower().strip()
                if key not in xassigns:
                    #We also need to check the dependency calls to other, buried subroutines.
                    compname = "{}%{}".format(pname, mname).lower()
                    if executable.changed(compname) is None:
                        add_offense(pname, member)
                    
    return (oparams, pmembers)
174032
private void checkC() throws DatatypeException, IOException {
        if (context.length() == 0) {
            appendToContext(current);
        }
        current = reader.read();
        appendToContext(current);
        skipSpaces();
        boolean expectNumber = true;

        for (;;) {
            switch (current) {
                default:
                    if (expectNumber)
                        reportNonNumber('C', current);
                    return;

                case '+':
                case '-':
                case '.':
                case '0':
                case '1':
                case '2':
                case '3':
                case '4':
                case '5':
                case '6':
                case '7':
                case '8':
                case '9':
                    break;
            }

            checkArg('C', "x1 coordinate");
            skipCommaSpaces();
            checkArg('C', "y1 coordinate");
            skipCommaSpaces();
            checkArg('C', "x2 coordinate");
            skipCommaSpaces();
            checkArg('C', "y2 coordinate");
            skipCommaSpaces();
            checkArg('C', "x coordinate");
            skipCommaSpaces();
            checkArg('C', "y coordinate");

            expectNumber = skipCommaSpaces2();
        }
    }
1276119
function checkForSemicolonForVariableDeclaration(node) {
				var ancestors = context.getAncestors(),
					parentIndex = ancestors.length - 1,
					parent = ancestors[parentIndex];

				if ((parent.type !== "ForStatement" || parent.init !== node) &&
					(!/^For(?:In|Of)Statement/.test(parent.type) || parent.left !== node)
				) {
					checkForSemicolon(node);
				}
			}
145144
private String utfIncludeCheck(String line, Boolean addatsign)
	{
		String checked = "";
		boolean start = false;

		for (int i = 0; i < line.length(); i++)
		{
			if (isOneByte(line.substring(i, i + 1)))
			{
				if (start)
				{
					start = false;
					checked += (addatsign ? useJPNFont ? fontEnd
							+ LST_ESCAPE_END : "" : fontEnd)
							+ line.substring(i, i + 1);
				} else
				{
					checked += line.substring(i, i + 1);
				}
			} else
			{
				if (!start)
				{
					checked += (addatsign ? useJPNFont ? LST_ESCAPE_BEGIN : ""
							: "")
							+ (useJPNFont ? docFont : "")
							+ line.substring(i, i + 1);
					start = true;
				} else
				{
					checked += line.substring(i, i + 1);
				}
			}
		}
		if (start)
		{
			checked += addatsign ? useJPNFont ? fontEnd + LST_ESCAPE_END : ""
					: fontEnd;
		}
		return checked;
	}
1026121
@Override
	public int countByC_S(long CProductId, int status) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_C_S;

		Object[] finderArgs = new Object[] { CProductId, status };

		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);

		if (count == null) {
			StringBundler query = new StringBundler(3);

			query.append(_SQL_COUNT_CPDEFINITION_WHERE);

			query.append(_FINDER_COLUMN_C_S_CPRODUCTID_2);

			query.append(_FINDER_COLUMN_C_S_STATUS_2);

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(CProductId);

				qPos.add(status);

				count = (Long)q.uniqueResult();

				finderCache.putResult(finderPath, finderArgs, count);
			}
			catch (Exception e) {
				finderCache.removeResult(finderPath, finderArgs);

				throw processException(e);
			}
			finally {
				closeSession(session);
			}
		}

		return count.intValue();
	}
801114
public void updateChecksums(File featureDir, ChecksumData checksumData) {

        Collection<File> csFiles = new ArrayList<File>();
        File featureChecksumsDir = new File(featureDir, "checksums");
        getCheckSumFiles(featureChecksumsDir, csFiles);
        File libFeaturesChecksumsDir = new File(Utils.getInstallDir(), "lib/features/checksums");
        if (libFeaturesChecksumsDir.getAbsoluteFile().equals(featureChecksumsDir.getAbsoluteFile())) {
            File libPlatformChecksumsDir = new File(Utils.getInstallDir(), "lib/platform/checksums");
            getCheckSumFiles(libPlatformChecksumsDir, csFiles);
        }

        Properties existingChecksums = initChecksumProps(checksumData.existingChecksums);

        // Update existing cs files to new checksum
        for (File csFile : csFiles) {
            Properties csprops = loadChecksumFile(csFile);
            boolean modified = false;
            for (Entry<Object, Object> csEntry : csprops.entrySet()) {
                Object k = csEntry.getKey();
                if (checksumData.newChecksums.containsKey(k)) {
                    Object newChecksum = checksumData.newChecksums.get(k);
                    if (!csEntry.getValue().equals(newChecksum)) {
                        csprops.put(k, newChecksum);
                        modified = true;
                    }
                }
                if (!checksumData.isIgnoredCSFile(csFile) && existingChecksums.containsKey(k)) {
                    existingChecksums.put(k, csEntry.getValue());
                }
            }
            if (modified) {
                saveChecksumFile(csFile, csprops, " for new checksum.");
            }
        }

        // Update the new cs files to existing checksum
        for (Entry<String, Set<String>> entry : checksumData.existingChecksums.entrySet()) {
            String f = entry.getKey();
            File csFile = new File(featureChecksumsDir, f + ".cs");
            if (csFile.exists()) {
                Properties csprops = loadChecksumFile(csFile);
                boolean modified = false;
                for (String s : entry.getValue()) {
                    if (csprops.containsKey(s) && existingChecksums.containsKey(s)) {
                        String cs = (String) existingChecksums.get(s);
                        if (cs != null && !cs.isEmpty()) {
                            csprops.put(s, cs);
                            modified = true;
                        }
                    }
                }
                if (modified) {
                    saveChecksumFile(csFile, csprops, " for exising checksum.");
                }
            }
        }
    }
123454
Statement getCachedStatement(String keyPrefix, String sql) {
        String key = keyPrefix + sql;

        Statement candidate = m_previousCatalogStmts.get(key);
        if (candidate == null) {
            ++m_stmtCacheMisses;
            return null;
        }

        // check that no underlying tables have been modified since the proc had been compiled
        String[] tablesTouched = candidate.getTablesread().split(",");
        for (String tableName : tablesTouched) {
            if (isDirtyTable(tableName)) {
                ++m_stmtCacheMisses;
                return null;
            }
        }
        tablesTouched = candidate.getTablesupdated().split(",");
        for (String tableName : tablesTouched) {
            if (isDirtyTable(tableName)) {
                ++m_stmtCacheMisses;
                return null;
            }
        }

        ++m_stmtCacheHits;
        // easy debugging stmt
        //printStmtCacheStats();
        return candidate;
    }
510122
private void executeStatement(String statement) throws SQLException {
		logger.entering(CLASSNAME, "executeStatement", statement);

		Connection conn = getConnection();
		PreparedStatement ps = null;

		ps = conn.prepareStatement(statement);
		ps.executeUpdate();

		cleanupConnection(conn, ps);
		logger.exiting(CLASSNAME, "executeStatement");
	}
774637
private void getFKStatement(StringBuffer a) {

        if (!getName().isReservedName()) {
            a.append(Tokens.T_CONSTRAINT).append(' ');
            a.append(getName().statementName);
            a.append(' ');
        }

        a.append(Tokens.T_FOREIGN).append(' ').append(Tokens.T_KEY);

        int[] col = getRefColumns();

        getColumnList(getRef(), col, col.length, a);
        a.append(' ').append(Tokens.T_REFERENCES).append(' ');
        a.append(getMain().getName().getSchemaQualifiedStatementName());

        col = getMainColumns();

        getColumnList(getMain(), col, col.length, a);

        if (getDeleteAction() != Constraint.NO_ACTION) {
            a.append(' ').append(Tokens.T_ON).append(' ').append(
                Tokens.T_DELETE).append(' ');
            a.append(getDeleteActionString());
        }

        if (getUpdateAction() != Constraint.NO_ACTION) {
            a.append(' ').append(Tokens.T_ON).append(' ').append(
                Tokens.T_UPDATE).append(' ');
            a.append(getUpdateActionString());
        }
    }
853892
static int execSql(SQLiteDatabase db, String label, String finalSql, Object[] argArray) throws SQLException {
		try {
			db.execSQL(finalSql, argArray);
		} catch (android.database.SQLException e) {
			throw SqlExceptionUtil.create("Problems executing " + label + " Android statement: " + finalSql, e);
		}
		int result;
		SQLiteStatement stmt = null;
		try {
			// ask sqlite how many rows were just changed
			stmt = db.compileStatement("SELECT CHANGES()");
			result = (int) stmt.simpleQueryForLong();
		} catch (android.database.SQLException e) {
			// ignore the exception and just return 1 if it failed
			result = 1;
		} finally {
			if (stmt != null) {
				stmt.close();
			}
		}
		logger.trace("executing statement {} changed {} rows: {}", label, result, finalSql);
		return result;
	}
869754
def exec_ignore_code(command, options = {}, &block)
      options = (options || {}).merge(retrieve_exit_code: false, on_non_zero_exit_code: :ignore)
      exec command, options, &block
    end
547306
def line_is_executable(line: str) -> bool:
    """"""

    if line_is_comment(line):
        return False

    if re.match(RE_TYPE_NAMES, line):
        return False

    for exp in EXECUTABLE_CODE_START:
        if re.match(exp, line) != None:
            return True

    return False
266688
function toStatement(node, ignore) {
  if (t.isStatement(node)) {
    return node;
  }

  var mustHaveId = false;
  var newType;

  if (t.isClass(node)) {
    mustHaveId = true;
    newType = "ClassDeclaration";
  } else if (t.isFunction(node)) {
    mustHaveId = true;
    newType = "FunctionDeclaration";
  } else if (t.isAssignmentExpression(node)) {
    return t.expressionStatement(node);
  }

  if (mustHaveId && !node.id) {
    newType = false;
  }

  if (!newType) {
    if (ignore) {
      return false;
    } else {
      throw new Error("cannot turn " + node.type + " to a statement");
    }
  }

  node.type = newType;

  return node;
}
15936
void markCommandDone(ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey, boolean executionStarted) {
        HystrixThreadEventStream.getInstance().executionDone(executionResult, commandKey, threadPoolKey);
        if (executionStarted) {
            concurrentExecutionCount.decrementAndGet();
        }
    }
684204
def action_verify_checksum(self, ids):
        """"""
        try:
            count = 0
            for file_id in ids:
                f = FileInstance.query.filter_by(
                    id=uuid.UUID(file_id)).one_or_none()
                if f is None:
                    raise ValueError(_("Cannot find file instance."))
                verify_checksum.delay(file_id)
                count += 1
            if count > 0:
                flash(_('Fixity check(s) sent to queue.'), 'success')
        except Exception as exc:
            if not self.handle_view_exception(exc):
                raise
            current_app.logger.exception(str(exc))  # pragma: no cover
            flash(_('Failed to run fixity checks.'),
                  'error')
447040
def _py_code_clean(lines, tab, executable):
    
    count = 0
    allparams = executable.ordered_parameters
    if type(executable).__name__ == "Function":
        allparams = allparams + [executable]
        
    for p in allparams:
        value = _py_clean(p, tab)
        if value is not None:
            count += 1
            lines.append(value)
            
    return count