content stringlengths 40 137k |
|---|
"public static CredentialsStorageService getCredentialsStorageService() {\n if (credentialsService == null) {\n credentialsService = ServiceUtils.getService(bundleContext, CredentialsStorageService.class);\n }\n return credentialsService;\n}\n"
|
"public ExecutionResult executeSubsampler(double probability, long timestamp, File input, File output, String jobName, boolean runParallel) throws ProcessExecutionException, InterruptedException, IOException, ConanParameterException {\n SubsamplerV1_0Args ssArgs = new SubsamplerV1_0Args();\n ssArgs.setInputFile(input);\n ssArgs.setOutputFile(output);\n ssArgs.setLogFile(new File(output.getParentFile(), output.getName() + \"String_Node_Str\"));\n ssArgs.setSeed(timestamp);\n ssArgs.setProbability(probability);\n SubsamplerV1_0Process ssProc = new SubsamplerV1_0Process(ssArgs);\n return this.conanExecutorService.executeProcess(ssProc, output.getParentFile(), jobName, 1, 2000, this.conanExecutorService.usingScheduler() ? runParallel : false);\n}\n"
|
"public static void main(String[] args) throws IOException {\n String[] records = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n StringBuilder stringBuilder = new StringBuilder();\n RecordLazyEval recordLazyEval = new RecordLazyEval(record, stringBuilder);\n prettyPrint(recordLazyEval);\n iterateThough(recordLazyEval);\n recordLazyEval = new RecordLazyEval(record2, stringBuilder);\n prettyPrint(recordLazyEval);\n iterateThough(recordLazyEval);\n recordLazyEval = new RecordLazyEval(record3, stringBuilder);\n prettyPrint(recordLazyEval);\n iterateThough(recordLazyEval);\n}\n"
|
"void add(Node n, Context context) {\n if (!cc.continueProcessing()) {\n return;\n }\n if (preserveTypeAnnotations && n.getJSDocInfo() != null) {\n add(JSDocInfoPrinter.print(n.getJSDocInfo()));\n }\n int type = n.getType();\n String opstr = NodeUtil.opToStr(type);\n int childCount = n.getChildCount();\n Node first = n.getFirstChild();\n Node last = n.getLastChild();\n if (opstr != null && first != last) {\n Preconditions.checkState(childCount == 2, \"String_Node_Str\", opstr, childCount);\n int p = NodeUtil.precedence(type);\n Context rhsContext = getContextForNoInOperator(context);\n if (NodeUtil.isAssignmentOp(n) && NodeUtil.isAssignmentOp(last)) {\n addExpr(first, p, context);\n cc.addOp(opstr, true);\n addExpr(last, p, rhsContext);\n } else {\n unrollBinaryOperator(n, type, opstr, context, rhsContext, p, p + 1);\n }\n return;\n }\n cc.startSourceMapping(n);\n switch(type) {\n case Token.TRY:\n {\n Preconditions.checkState(first.getNext().isBlock() && !first.getNext().hasMoreThanOneChild());\n Preconditions.checkState(childCount >= 2 && childCount <= 3);\n add(\"String_Node_Str\");\n add(first, Context.PRESERVE_BLOCK);\n Node catchblock = first.getNext().getFirstChild();\n if (catchblock != null) {\n add(catchblock);\n }\n if (childCount == 3) {\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n add(last, Context.PRESERVE_BLOCK);\n }\n break;\n }\n case Token.CATCH:\n Preconditions.checkState(childCount == 2);\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n add(last, Context.PRESERVE_BLOCK);\n break;\n case Token.THROW:\n Preconditions.checkState(childCount == 1);\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(first);\n cc.endStatement(true);\n break;\n case Token.RETURN:\n add(\"String_Node_Str\");\n if (childCount == 1) {\n cc.maybeInsertSpace();\n add(first);\n } else {\n Preconditions.checkState(childCount == 0);\n }\n cc.endStatement();\n break;\n case Token.VAR:\n if (first != null) {\n add(\"String_Node_Str\");\n addList(first, false, getContextForNoInOperator(context), \"String_Node_Str\");\n }\n break;\n case Token.CONST:\n add(\"String_Node_Str\");\n addList(first, false, getContextForNoInOperator(context), \"String_Node_Str\");\n break;\n case Token.LET:\n add(\"String_Node_Str\");\n addList(first, false, getContextForNoInOperator(context), \"String_Node_Str\");\n break;\n case Token.LABEL_NAME:\n Preconditions.checkState(!n.getString().isEmpty());\n addIdentifier(n.getString());\n break;\n case Token.NAME:\n addIdentifier(n.getString());\n maybeAddOptional(n);\n maybeAddTypeDecl(n);\n if (first != null && !first.isEmpty()) {\n Preconditions.checkState(childCount == 1);\n cc.addOp(\"String_Node_Str\", true);\n if (first.isComma()) {\n addExpr(first, NodeUtil.precedence(Token.ASSIGN), Context.OTHER);\n } else {\n addExpr(first, 0, getContextForNoInOperator(context));\n }\n }\n break;\n case Token.ARRAYLIT:\n add(\"String_Node_Str\");\n addArrayList(first);\n add(\"String_Node_Str\");\n break;\n case Token.ARRAY_PATTERN:\n addArrayPattern(n);\n maybeAddTypeDecl(n);\n break;\n case Token.PARAM_LIST:\n add(\"String_Node_Str\");\n addList(first);\n add(\"String_Node_Str\");\n break;\n case Token.DEFAULT_VALUE:\n add(first);\n maybeAddTypeDecl(n);\n cc.addOp(\"String_Node_Str\", true);\n add(first.getNext());\n break;\n case Token.COMMA:\n Preconditions.checkState(childCount == 2);\n unrollBinaryOperator(n, Token.COMMA, \"String_Node_Str\", context, getContextForNoInOperator(context), 0, 0);\n break;\n case Token.NUMBER:\n Preconditions.checkState(childCount == 0);\n cc.addNumber(n.getDouble());\n break;\n case Token.TYPEOF:\n case Token.VOID:\n case Token.NOT:\n case Token.BITNOT:\n case Token.POS:\n {\n Preconditions.checkState(childCount == 1);\n cc.addOp(NodeUtil.opToStrNoFail(type), false);\n addExpr(first, NodeUtil.precedence(type), Context.OTHER);\n break;\n }\n case Token.NEG:\n {\n Preconditions.checkState(childCount == 1);\n if (n.getFirstChild().isNumber()) {\n cc.addNumber(-n.getFirstChild().getDouble());\n } else {\n cc.addOp(NodeUtil.opToStrNoFail(type), false);\n addExpr(first, NodeUtil.precedence(type), Context.OTHER);\n }\n break;\n }\n case Token.HOOK:\n {\n Preconditions.checkState(childCount == 3);\n int p = NodeUtil.precedence(type);\n Context rhsContext = getContextForNoInOperator(context);\n addExpr(first, p + 1, context);\n cc.addOp(\"String_Node_Str\", true);\n addExpr(first.getNext(), 1, rhsContext);\n cc.addOp(\"String_Node_Str\", true);\n addExpr(last, 1, rhsContext);\n break;\n }\n case Token.REGEXP:\n if (!first.isString() || !last.isString()) {\n throw new Error(\"String_Node_Str\");\n }\n String regexp = regexpEscape(first.getString(), outputCharsetEncoder);\n if (childCount == 2) {\n add(regexp + last.getString());\n } else {\n Preconditions.checkState(childCount == 1);\n add(regexp);\n }\n break;\n case Token.FUNCTION:\n {\n if (n.getClass() != Node.class) {\n throw new Error(\"String_Node_Str\");\n }\n Preconditions.checkState(childCount == 3);\n if (n.isArrowFunction()) {\n addArrowFunction(n, first, last, context);\n } else {\n addFunction(n, first, last, context);\n }\n break;\n }\n case Token.REST:\n add(\"String_Node_Str\");\n add(n.getString());\n maybeAddTypeDecl(n);\n break;\n case Token.SPREAD:\n add(\"String_Node_Str\");\n add(n.getFirstChild());\n break;\n case Token.EXPORT:\n add(\"String_Node_Str\");\n if (n.getBooleanProp(Node.EXPORT_DEFAULT)) {\n add(\"String_Node_Str\");\n }\n if (n.getBooleanProp(Node.EXPORT_ALL_FROM)) {\n add(\"String_Node_Str\");\n Preconditions.checkState(first != null && first.isEmpty());\n } else {\n add(first);\n }\n if (childCount == 2) {\n add(\"String_Node_Str\");\n add(last);\n }\n cc.endStatement();\n break;\n case Token.MODULE:\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n add(last);\n cc.endStatement();\n break;\n case Token.IMPORT:\n add(\"String_Node_Str\");\n Node second = first.getNext();\n if (!first.isEmpty()) {\n add(first);\n if (!second.isEmpty()) {\n cc.listSeparator();\n }\n }\n if (!second.isEmpty()) {\n add(second);\n }\n if (!first.isEmpty() || !second.isEmpty()) {\n add(\"String_Node_Str\");\n }\n add(last);\n cc.endStatement();\n break;\n case Token.EXPORT_SPECS:\n case Token.IMPORT_SPECS:\n add(\"String_Node_Str\");\n for (Node c = first; c != null; c = c.getNext()) {\n if (c != first) {\n cc.listSeparator();\n }\n add(c);\n }\n add(\"String_Node_Str\");\n break;\n case Token.EXPORT_SPEC:\n case Token.IMPORT_SPEC:\n add(first);\n if (first != last) {\n add(\"String_Node_Str\");\n add(last);\n }\n break;\n case Token.IMPORT_STAR:\n add(\"String_Node_Str\");\n add(\"String_Node_Str\");\n add(n.getString());\n break;\n case Token.CLASS:\n {\n Preconditions.checkState(childCount == 3);\n boolean classNeedsParens = (context == Context.START_OF_EXPR);\n if (classNeedsParens) {\n add(\"String_Node_Str\");\n }\n Node name = first;\n Node superClass = first.getNext();\n Node members = last;\n add(\"String_Node_Str\");\n if (!name.isEmpty()) {\n add(name);\n }\n maybeAddGenericTypes(first);\n if (!superClass.isEmpty()) {\n add(\"String_Node_Str\");\n add(superClass);\n }\n Node interfaces = (Node) n.getProp(Node.IMPLEMENTS);\n if (interfaces != null) {\n add(\"String_Node_Str\");\n Node child = interfaces.getFirstChild();\n add(child);\n while ((child = child.getNext()) != null) {\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(child);\n }\n }\n add(members);\n cc.endClass(context == Context.STATEMENT);\n if (classNeedsParens) {\n add(\"String_Node_Str\");\n }\n }\n break;\n case Token.CLASS_MEMBERS:\n case Token.INTERFACE_MEMBERS:\n cc.beginBlock();\n for (Node c = first; c != null; c = c.getNext()) {\n add(c);\n cc.endLine();\n }\n cc.endBlock(false);\n break;\n case Token.ENUM_MEMBERS:\n cc.beginBlock();\n for (Node c = first; c != null; c = c.getNext()) {\n add(c);\n if (c.getNext() != null) {\n add(\"String_Node_Str\");\n }\n cc.endLine();\n }\n cc.endBlock(false);\n break;\n case Token.GETTER_DEF:\n case Token.SETTER_DEF:\n case Token.MEMBER_FUNCTION_DEF:\n case Token.MEMBER_VARIABLE_DEF:\n {\n n.getParent().toStringTree();\n Preconditions.checkState(n.getParent().isObjectLit() || n.getParent().isClassMembers() || n.getParent().isInterfaceMembers() || n.getParent().isRecordType());\n if (n.isStaticMember()) {\n add(\"String_Node_Str\");\n }\n if (!n.isMemberVariableDef() && n.getFirstChild().isGeneratorFunction()) {\n Preconditions.checkState(type == Token.MEMBER_FUNCTION_DEF);\n add(\"String_Node_Str\");\n }\n switch(type) {\n case Token.GETTER_DEF:\n Preconditions.checkState(!first.getChildAtIndex(1).hasChildren());\n add(\"String_Node_Str\");\n break;\n case Token.SETTER_DEF:\n Preconditions.checkState(first.getChildAtIndex(1).hasOneChild());\n add(\"String_Node_Str\");\n break;\n case Token.MEMBER_FUNCTION_DEF:\n case Token.MEMBER_VARIABLE_DEF:\n break;\n }\n String name = n.getString();\n if (n.isMemberVariableDef()) {\n add(n.getString());\n maybeAddOptional(n);\n maybeAddTypeDecl(n);\n if (!n.getParent().isRecordType()) {\n add(\"String_Node_Str\");\n }\n } else {\n Preconditions.checkState(childCount == 1);\n Preconditions.checkState(first.isFunction());\n Preconditions.checkState(first.getFirstChild().getString().isEmpty());\n Node fn = first;\n Node parameters = fn.getChildAtIndex(1);\n Node body = fn.getLastChild();\n if (!n.isQuotedString() && TokenStream.isJSIdentifier(name) && NodeUtil.isLatin(name)) {\n add(name);\n maybeAddGenericTypes(fn.getFirstChild());\n } else {\n double d = getSimpleNumber(name);\n if (!Double.isNaN(d)) {\n cc.addNumber(d);\n } else {\n addJsString(n);\n }\n }\n maybeAddOptional(fn);\n add(parameters);\n maybeAddTypeDecl(fn);\n if (body.isEmpty()) {\n add(\"String_Node_Str\");\n } else {\n add(body, Context.PRESERVE_BLOCK);\n }\n }\n break;\n }\n case Token.SCRIPT:\n case Token.BLOCK:\n {\n if (n.getClass() != Node.class) {\n throw new Error(\"String_Node_Str\");\n }\n boolean preserveBlock = context == Context.PRESERVE_BLOCK;\n if (preserveBlock) {\n cc.beginBlock();\n }\n boolean preferLineBreaks = type == Token.SCRIPT || (type == Token.BLOCK && !preserveBlock && n.getParent() != null && n.getParent().isScript());\n for (Node c = first; c != null; c = c.getNext()) {\n add(c, Context.STATEMENT);\n if (NodeUtil.isNameDeclaration(c)) {\n cc.endStatement();\n }\n if (c.isFunction() || c.isClass()) {\n cc.maybeLineBreak();\n }\n if (preferLineBreaks) {\n cc.notePreferredLineBreak();\n }\n }\n if (preserveBlock) {\n cc.endBlock(cc.breakAfterBlockFor(n, context == Context.STATEMENT));\n }\n break;\n }\n case Token.FOR:\n if (childCount == 4) {\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n if (NodeUtil.isNameDeclaration(first)) {\n add(first, Context.IN_FOR_INIT_CLAUSE);\n } else {\n addExpr(first, 0, Context.IN_FOR_INIT_CLAUSE);\n }\n add(\"String_Node_Str\");\n add(first.getNext());\n add(\"String_Node_Str\");\n add(first.getNext().getNext());\n add(\"String_Node_Str\");\n addNonEmptyStatement(last, getContextForNonEmptyExpression(context), false);\n } else {\n Preconditions.checkState(childCount == 3);\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n add(first.getNext());\n add(\"String_Node_Str\");\n addNonEmptyStatement(last, getContextForNonEmptyExpression(context), false);\n }\n break;\n case Token.FOR_OF:\n Preconditions.checkState(childCount == 3);\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n add(first.getNext());\n add(\"String_Node_Str\");\n addNonEmptyStatement(last, getContextForNonEmptyExpression(context), false);\n break;\n case Token.DO:\n Preconditions.checkState(childCount == 2);\n add(\"String_Node_Str\");\n addNonEmptyStatement(first, Context.OTHER, false);\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n add(last);\n add(\"String_Node_Str\");\n cc.endStatement();\n break;\n case Token.WHILE:\n Preconditions.checkState(childCount == 2);\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n addNonEmptyStatement(last, getContextForNonEmptyExpression(context), false);\n break;\n case Token.EMPTY:\n Preconditions.checkState(childCount == 0);\n break;\n case Token.GETPROP:\n {\n Preconditions.checkState(childCount == 2, \"String_Node_Str\", childCount);\n Preconditions.checkState(last.isString(), \"String_Node_Str\");\n boolean needsParens = (first.isNumber());\n if (needsParens) {\n add(\"String_Node_Str\");\n }\n addExpr(first, NodeUtil.precedence(type), context);\n if (needsParens) {\n add(\"String_Node_Str\");\n }\n if (this.languageMode == LanguageMode.ECMASCRIPT3 && TokenStream.isKeyword(last.getString())) {\n add(\"String_Node_Str\");\n add(last);\n add(\"String_Node_Str\");\n } else {\n add(\"String_Node_Str\");\n addIdentifier(last.getString());\n }\n break;\n }\n case Token.GETELEM:\n Preconditions.checkState(childCount == 2, \"String_Node_Str\", childCount);\n addExpr(first, NodeUtil.precedence(type), context);\n add(\"String_Node_Str\");\n add(first.getNext());\n add(\"String_Node_Str\");\n break;\n case Token.WITH:\n Preconditions.checkState(childCount == 2);\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n addNonEmptyStatement(last, getContextForNonEmptyExpression(context), false);\n break;\n case Token.INC:\n case Token.DEC:\n {\n Preconditions.checkState(childCount == 1);\n String o = type == Token.INC ? \"String_Node_Str\" : \"String_Node_Str\";\n boolean postProp = n.getBooleanProp(Node.INCRDECR_PROP);\n if (postProp) {\n addExpr(first, NodeUtil.precedence(type), context);\n cc.addOp(o, false);\n } else {\n cc.addOp(o, false);\n add(first);\n }\n break;\n }\n case Token.CALL:\n if (isIndirectEval(first) || n.getBooleanProp(Node.FREE_CALL) && NodeUtil.isGet(first)) {\n add(\"String_Node_Str\");\n addExpr(first, NodeUtil.precedence(Token.COMMA), Context.OTHER);\n add(\"String_Node_Str\");\n } else {\n addExpr(first, NodeUtil.precedence(type), context);\n }\n Node args = first.getNext();\n add(\"String_Node_Str\");\n addList(args);\n add(\"String_Node_Str\");\n break;\n case Token.IF:\n boolean hasElse = childCount == 3;\n boolean ambiguousElseClause = context == Context.BEFORE_DANGLING_ELSE && !hasElse;\n if (ambiguousElseClause) {\n cc.beginBlock();\n }\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n if (childCount == 1) {\n break;\n }\n if (hasElse) {\n addNonEmptyStatement(first.getNext(), Context.BEFORE_DANGLING_ELSE, false);\n cc.maybeInsertSpace();\n add(\"String_Node_Str\");\n addNonEmptyStatement(last, getContextForNonEmptyExpression(context), false);\n } else {\n addNonEmptyStatement(first.getNext(), Context.OTHER, false);\n Preconditions.checkState(childCount == 2);\n }\n if (ambiguousElseClause) {\n cc.endBlock();\n }\n break;\n case Token.NULL:\n Preconditions.checkState(childCount == 0);\n cc.addConstant(\"String_Node_Str\");\n break;\n case Token.THIS:\n Preconditions.checkState(childCount == 0);\n add(\"String_Node_Str\");\n break;\n case Token.SUPER:\n Preconditions.checkState(childCount == 0);\n add(\"String_Node_Str\");\n break;\n case Token.YIELD:\n Preconditions.checkState(childCount == 1);\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n if (n.isYieldFor()) {\n add(\"String_Node_Str\");\n }\n addExpr(first, NodeUtil.precedence(type), Context.OTHER);\n break;\n case Token.FALSE:\n Preconditions.checkState(childCount == 0);\n cc.addConstant(\"String_Node_Str\");\n break;\n case Token.TRUE:\n Preconditions.checkState(childCount == 0);\n cc.addConstant(\"String_Node_Str\");\n break;\n case Token.CONTINUE:\n Preconditions.checkState(childCount <= 1);\n add(\"String_Node_Str\");\n if (childCount == 1) {\n if (!first.isLabelName()) {\n throw new Error(\"String_Node_Str\");\n }\n add(\"String_Node_Str\");\n add(first);\n }\n cc.endStatement();\n break;\n case Token.DEBUGGER:\n Preconditions.checkState(childCount == 0);\n add(\"String_Node_Str\");\n cc.endStatement();\n break;\n case Token.BREAK:\n Preconditions.checkState(childCount <= 1);\n add(\"String_Node_Str\");\n if (childCount == 1) {\n if (!first.isLabelName()) {\n throw new Error(\"String_Node_Str\");\n }\n add(\"String_Node_Str\");\n add(first);\n }\n cc.endStatement();\n break;\n case Token.EXPR_RESULT:\n Preconditions.checkState(childCount == 1);\n add(first, Context.START_OF_EXPR);\n cc.endStatement();\n break;\n case Token.NEW:\n add(\"String_Node_Str\");\n int precedence = NodeUtil.precedence(type);\n if (NodeUtil.containsType(first, Token.CALL, NodeUtil.MATCH_NOT_FUNCTION)) {\n precedence = NodeUtil.precedence(first.getType()) + 1;\n }\n addExpr(first, precedence, Context.OTHER);\n Node next = first.getNext();\n if (next != null) {\n add(\"String_Node_Str\");\n addList(next);\n add(\"String_Node_Str\");\n }\n break;\n case Token.STRING_KEY:\n addStringKey(n);\n break;\n case Token.STRING:\n Preconditions.checkState(childCount == 0, \"String_Node_Str\");\n if (n.getBooleanProp(Node.COOKED_STRING)) {\n add(\"String_Node_Str\" + n.getString() + \"String_Node_Str\");\n } else {\n addJsString(n);\n }\n break;\n case Token.DELPROP:\n Preconditions.checkState(childCount == 1);\n add(\"String_Node_Str\");\n add(first);\n break;\n case Token.OBJECTLIT:\n {\n boolean needsParens = (context == Context.START_OF_EXPR);\n if (needsParens) {\n add(\"String_Node_Str\");\n }\n add(\"String_Node_Str\");\n for (Node c = first; c != null; c = c.getNext()) {\n if (c != first) {\n cc.listSeparator();\n }\n Preconditions.checkState(c.isComputedProp() || c.isGetterDef() || c.isSetterDef() || c.isStringKey() || c.isMemberFunctionDef());\n add(c);\n }\n add(\"String_Node_Str\");\n if (needsParens) {\n add(\"String_Node_Str\");\n }\n break;\n }\n case Token.COMPUTED_PROP:\n if (n.getBooleanProp(Node.COMPUTED_PROP_GETTER)) {\n add(\"String_Node_Str\");\n } else if (n.getBooleanProp(Node.COMPUTED_PROP_SETTER)) {\n add(\"String_Node_Str\");\n } else if (last.getBooleanProp(Node.GENERATOR_FN)) {\n add(\"String_Node_Str\");\n }\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n maybeAddTypeDecl(n);\n if (n.getBooleanProp(Node.COMPUTED_PROP_METHOD) || n.getBooleanProp(Node.COMPUTED_PROP_GETTER) || n.getBooleanProp(Node.COMPUTED_PROP_SETTER)) {\n Node function = first.getNext();\n Node params = function.getFirstChild().getNext();\n Node body = function.getLastChild();\n add(params);\n add(body, Context.PRESERVE_BLOCK);\n } else {\n boolean isInClass = n.getParent().getType() == Token.CLASS_MEMBERS;\n Node initializer = first.getNext();\n if (initializer != null) {\n Preconditions.checkState(!isInClass, \"String_Node_Str\");\n cc.addOp(\"String_Node_Str\", false);\n add(initializer);\n } else {\n Preconditions.checkState(n.getBooleanProp(Node.COMPUTED_PROP_VARIABLE));\n }\n if (isInClass) {\n add(\"String_Node_Str\");\n }\n }\n break;\n case Token.OBJECT_PATTERN:\n addObjectPattern(n, context);\n maybeAddTypeDecl(n);\n break;\n case Token.SWITCH:\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n cc.beginBlock();\n addAllSiblings(first.getNext());\n cc.endBlock(context == Context.STATEMENT);\n break;\n case Token.CASE:\n Preconditions.checkState(childCount == 2);\n add(\"String_Node_Str\");\n add(first);\n addCaseBody(last);\n break;\n case Token.DEFAULT_CASE:\n Preconditions.checkState(childCount == 1);\n add(\"String_Node_Str\");\n addCaseBody(first);\n break;\n case Token.LABEL:\n Preconditions.checkState(childCount == 2);\n if (!first.isLabelName()) {\n throw new Error(\"String_Node_Str\");\n }\n add(first);\n add(\"String_Node_Str\");\n if (!last.isBlock()) {\n cc.maybeInsertSpace();\n }\n addNonEmptyStatement(last, getContextForNonEmptyExpression(context), true);\n break;\n case Token.CAST:\n add(\"String_Node_Str\");\n add(first);\n add(\"String_Node_Str\");\n break;\n case Token.TAGGED_TEMPLATELIT:\n add(first, Context.START_OF_EXPR);\n add(first.getNext());\n break;\n case Token.TEMPLATELIT:\n add(\"String_Node_Str\");\n for (Node c = first; c != null; c = c.getNext()) {\n if (c.isString()) {\n add(c.getString());\n } else {\n cc.append(\"String_Node_Str\");\n add(c.getFirstChild(), Context.START_OF_EXPR);\n add(\"String_Node_Str\");\n }\n }\n add(\"String_Node_Str\");\n break;\n case Token.STRING_TYPE:\n add(\"String_Node_Str\");\n break;\n case Token.BOOLEAN_TYPE:\n add(\"String_Node_Str\");\n break;\n case Token.NUMBER_TYPE:\n add(\"String_Node_Str\");\n break;\n case Token.ANY_TYPE:\n add(\"String_Node_Str\");\n break;\n case Token.VOID_TYPE:\n add(\"String_Node_Str\");\n break;\n case Token.NAMED_TYPE:\n add(first);\n break;\n case Token.ARRAY_TYPE:\n addExpr(first, NodeUtil.precedence(Token.ARRAY_TYPE), context);\n add(\"String_Node_Str\");\n break;\n case Token.FUNCTION_TYPE:\n Node returnType = first;\n add(\"String_Node_Str\");\n addList(first.getNext());\n add(\"String_Node_Str\");\n cc.addOp(\"String_Node_Str\", true);\n add(returnType);\n break;\n case Token.UNION_TYPE:\n addList(first, \"String_Node_Str\");\n break;\n case Token.RECORD_TYPE:\n add(\"String_Node_Str\");\n addList(first, false, Context.OTHER, \"String_Node_Str\");\n add(\"String_Node_Str\");\n break;\n case Token.PARAMETERIZED_TYPE:\n add(first);\n add(\"String_Node_Str\");\n addList(first.getNext());\n add(\"String_Node_Str\");\n break;\n case Token.GENERIC_TYPE_LIST:\n add(\"String_Node_Str\");\n addList(first, false, Context.STATEMENT, \"String_Node_Str\");\n add(\"String_Node_Str\");\n break;\n case Token.GENERIC_TYPE:\n addIdentifier(n.getString());\n if (n.hasChildren()) {\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(n.getFirstChild());\n }\n break;\n case Token.INTERFACE:\n {\n Preconditions.checkState(childCount == 3);\n Node name = first;\n Node superTypes = first.getNext();\n Node members = last;\n add(\"String_Node_Str\");\n add(name);\n maybeAddGenericTypes(name);\n if (!superTypes.isEmpty()) {\n add(\"String_Node_Str\");\n Node superType = superTypes.getFirstChild();\n add(superType);\n while ((superType = superType.getNext()) != null) {\n add(\"String_Node_Str\");\n cc.maybeInsertSpace();\n add(superType);\n }\n }\n add(members);\n }\n break;\n case Token.ENUM:\n {\n Preconditions.checkState(childCount == 2);\n Node name = first;\n Node members = last;\n add(\"String_Node_Str\");\n add(name);\n add(members);\n break;\n }\n case Token.TYPE_ALIAS:\n add(\"String_Node_Str\");\n add(n.getString());\n cc.addOp(\"String_Node_Str\", true);\n add(last);\n cc.endStatement();\n break;\n case Token.DECLARE:\n add(\"String_Node_Str\");\n add(first);\n cc.endStatement();\n break;\n default:\n throw new RuntimeException(\"String_Node_Str\" + Token.name(type) + \"String_Node_Str\" + n.toStringTree());\n }\n cc.endSourceMapping(n);\n}\n"
|
"public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n PluginInfo that = (PluginInfo) o;\n return super.equals(that) && Objects.equals(properties, that.properties) && Objects.equals(endpoints, that.endpoints);\n}\n"
|
"private String[] readProblematicLine(SourceFile sourceFile, CategorizedProblem categorizedProblem) {\n Assert.notNull(sourceFile);\n Assert.notNull(categorizedProblem);\n int lineNumber = categorizedProblem.getSourceLineNumber();\n int sourceStart = categorizedProblem.getSourceStart();\n int sourceEnd = categorizedProblem.getSourceEnd();\n try {\n FileInputStream fstream = new FileInputStream(sourceFile.getSourceFile());\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n int lineStart = 0;\n String strLine = \"String_Node_Str\";\n for (int i = 0; i < lineNumber; i++) {\n String newLine = br.readLine();\n lineStart = lineStart + strLine.length();\n if (i + 1 != lineNumber) {\n lineStart = lineStart + 1;\n }\n strLine = newLine;\n }\n in.close();\n StringBuilder underscoreLine = new StringBuilder();\n for (int i = lineStart; i < sourceStart; i++) {\n if (strLine.charAt(i - lineStart) == '\\t') {\n underscoreLine.append('\\t');\n } else {\n underscoreLine.append(' ');\n }\n }\n for (int i = sourceStart; i <= sourceEnd; i++) {\n underscoreLine.append('^');\n }\n return new String[] { strLine, underscoreLine.toString() };\n } catch (Exception e) {\n return new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n }\n}\n"
|
"public void setSourceWithReference(final int queryIndex, final SAMRecord samRecord, final String sourceReference) {\n final String cigarString = samRecord.getCigarString();\n final int position = samRecord.getAlignmentStart();\n refSequence.append(sourceReference);\n final Limits[] limits = getLimits(position, cigarString, null);\n final CharSequence sourceQuery = samRecord.getReadString();\n final CharSequence sourceQual = samRecord.getBaseQualityString();\n final boolean reverseStrand = samRecord.getReadNegativeStrandFlag();\n numEntries = limits.length;\n initializeHelpers();\n for (int i = 0; i < numEntries; i++) {\n final Limits limit = limits[i];\n final int refStartIndex = limit.refStart - position;\n final int refEndIndex = refStartIndex + limit.refEnd - limit.refStart;\n try {\n final CharSequence sourceRef = refSequence.subSequence(refStartIndex, Math.min(refEndIndex, sourceReference.length() - 1));\n helpers.get(i).setSourceWithReference(queryIndex, sourceRef, sourceQuery.subSequence(limit.readStart, limit.readEnd), sourceQual.subSequence(limit.readStart, limit.readEnd), limit.position, reverseStrand);\n } catch (IndexOutOfBoundsException e) {\n System.out.printf(\"String_Node_Str\", refStartIndex, refEndIndex, sourceReference.length(), samRecord.getCigarString(), e);\n }\n }\n}\n"
|
"public void testErrorBatch() throws Exception {\n List<BatchPart> batch = new ArrayList<BatchPart>();\n BatchPart request = BatchQueryPart.method(GET).uri(\"String_Node_Str\").build();\n batch.add(request);\n InputStream body = EntityProvider.writeBatchRequest(batch, BOUNDARY);\n String bodyAsString = StringHelper.inputStreamToString(body, true);\n checkMimeHeaders(bodyAsString);\n checkBoundaryDelimiters(bodyAsString);\n assertTrue(bodyAsString.contains(\"String_Node_Str\"));\n HttpResponse batchResponse = execute(bodyAsString);\n InputStream responseBody = batchResponse.getEntity().getContent();\n String contentType = batchResponse.getFirstHeader(HttpHeaders.CONTENT_TYPE).getValue();\n List<BatchSingleResponse> responses = EntityProvider.parseBatchResponse(responseBody, contentType);\n for (BatchSingleResponse response : responses) {\n assertEquals(\"String_Node_Str\", response.getStatusCode());\n assertEquals(\"String_Node_Str\", response.getStatusInfo());\n }\n}\n"
|
"public static Double getPctOfKeyspace(BigInteger hashWidth) {\n return new BigDecimal(hashWidth).divide(new BigDecimal(maxHash), StreamScalingUtils.PCT_COMPARISON_SCALE, StreamScalingUtils.ROUNDING_MODE).doubleValue();\n}\n"
|
"public void onKey(int primaryCode, Key key, int multiTapIndex, int[] nearByKeyCodes, boolean fromUI) {\n if (DEBUG) {\n Log.d(TAG, \"String_Node_Str\" + primaryCode);\n }\n final InputConnection ic = getCurrentInputConnection();\n switch(primaryCode) {\n case KeyCodes.DELETE_WORD:\n if (ic == null)\n break;\n handleBackword(ic);\n break;\n case KeyCodes.DELETE:\n if (ic == null)\n break;\n if (mInputView != null && mInputView.isShifted() && !mInputView.getKeyboard().isShiftLocked() && ((mDistinctMultiTouch && mShiftKeyState.isMomentary()) || mConfig.useBackword())) {\n handleBackword(ic);\n } else {\n handleDeleteLastCharacter(false);\n }\n break;\n case KeyCodes.CLEAR_INPUT:\n if (ic != null) {\n ic.beginBatchEdit();\n commitTyped(ic);\n ic.deleteSurroundingText(Integer.MAX_VALUE, Integer.MAX_VALUE);\n ic.endBatchEdit();\n }\n break;\n case KeyCodes.SHIFT:\n if ((!mDistinctMultiTouch) || !fromUI)\n handleShift(false);\n break;\n case KeyCodes.CTRL:\n if ((!mDistinctMultiTouch) || !fromUI)\n handleControl(false);\n break;\n case KeyCodes.ARROW_LEFT:\n sendDownUpKeyEvents(KeyEvent.KEYCODE_DPAD_LEFT);\n break;\n case KeyCodes.ARROW_RIGHT:\n sendDownUpKeyEvents(KeyEvent.KEYCODE_DPAD_RIGHT);\n break;\n case KeyCodes.ARROW_UP:\n sendDownUpKeyEvents(KeyEvent.KEYCODE_DPAD_UP);\n break;\n case KeyCodes.ARROW_DOWN:\n sendDownUpKeyEvents(KeyEvent.KEYCODE_DPAD_DOWN);\n break;\n case KeyCodes.MOVE_HOME:\n if (Workarounds.getApiLevel() >= 11) {\n sendDownUpKeyEvents(0x0000007a);\n } else {\n if (ic != null) {\n CharSequence textBefore = ic.getTextBeforeCursor(1024, 0);\n if (!TextUtils.isEmpty(textBefore)) {\n int newPosition = textBefore.length() - 1;\n while (newPosition > 0) {\n char chatAt = textBefore.charAt(newPosition - 1);\n if (chatAt == '\\n' || chatAt == '\\r') {\n break;\n }\n newPosition--;\n }\n if (newPosition < 0)\n newPosition = 0;\n ic.setSelection(newPosition, newPosition);\n }\n }\n }\n break;\n case KeyCodes.MOVE_END:\n if (Workarounds.getApiLevel() >= 11) {\n sendDownUpKeyEvents(0x0000007b);\n } else {\n if (ic != null) {\n CharSequence textAfter = ic.getTextAfterCursor(1024, 0);\n if (!TextUtils.isEmpty(textAfter)) {\n int newPosition = 1;\n while (newPosition < textAfter.length()) {\n char chatAt = textAfter.charAt(newPosition);\n if (chatAt == '\\n' || chatAt == '\\r') {\n break;\n }\n newPosition++;\n }\n if (newPosition > textAfter.length())\n newPosition = textAfter.length();\n try {\n CharSequence textBefore = ic.getTextBeforeCursor(Integer.MAX_VALUE, 0);\n if (!TextUtils.isEmpty(textBefore)) {\n newPosition = newPosition + textBefore.length();\n }\n ic.setSelection(newPosition, newPosition);\n } catch (Throwable e) {\n Log.w(TAG, \"String_Node_Str\", e);\n }\n }\n }\n }\n break;\n case KeyCodes.VOICE_INPUT:\n if (mVoiceRecognitionTrigger != null)\n mVoiceRecognitionTrigger.startVoiceRecognition(getCurrentKeyboard().getDefaultDictionaryLocale());\n break;\n case KeyCodes.CANCEL:\n if (mOptionsDialog == null || !mOptionsDialog.isShowing()) {\n handleClose();\n }\n break;\n case KeyCodes.SETTINGS:\n showOptionsMenu();\n break;\n case KeyCodes.SPLIT_LAYOUT:\n case KeyCodes.MERGE_LAYOUT:\n if (getCurrentKeyboard() != null && mInputView != null) {\n mKeyboardInCondensedMode = KeyCodes.SPLIT_LAYOUT == primaryCode;\n AnyKeyboard currentKeyboard = getCurrentKeyboard();\n setKeyboardStuffBeforeSetToView(currentKeyboard);\n mInputView.setKeyboard(currentKeyboard);\n }\n break;\n case KeyCodes.DOMAIN:\n onText(mConfig.getDomainText());\n break;\n case KeyCodes.QUICK_TEXT:\n QuickTextKey quickTextKey = QuickTextKeyFactory.getCurrentQuickTextKey(this);\n if (mSmileyOnShortPress) {\n if (TextUtils.isEmpty(mOverrideQuickTextText))\n onText(quickTextKey.getKeyOutputText());\n else\n onText(mOverrideQuickTextText);\n } else {\n if (quickTextKey.isPopupKeyboardUsed()) {\n showQuickTextKeyPopupKeyboard(quickTextKey);\n } else {\n showQuickTextKeyPopupList(quickTextKey);\n }\n }\n break;\n case KeyCodes.QUICK_TEXT_POPUP:\n quickTextKey = QuickTextKeyFactory.getCurrentQuickTextKey(this);\n if (quickTextKey.getId().equals(SMILEY_PLUGIN_ID) && !mSmileyOnShortPress) {\n if (TextUtils.isEmpty(mOverrideQuickTextText))\n onText(quickTextKey.getKeyOutputText());\n else\n onText(mOverrideQuickTextText);\n } else {\n if (quickTextKey.isPopupKeyboardUsed()) {\n showQuickTextKeyPopupKeyboard(quickTextKey);\n } else {\n showQuickTextKeyPopupList(quickTextKey);\n }\n }\n break;\n case KeyCodes.MODE_SYMOBLS:\n nextKeyboard(getCurrentInputEditorInfo(), NextKeyboardType.Symbols);\n break;\n case KeyCodes.MODE_ALPHABET:\n if (mKeyboardSwitcher.shouldPopupForLanguageSwitch()) {\n showLanguageSelectionDialog();\n } else\n nextKeyboard(getCurrentInputEditorInfo(), NextKeyboardType.Alphabet);\n break;\n case KeyCodes.UTILITY_KEYBOARD:\n mInputView.openUtilityKeyboard();\n break;\n case KeyCodes.MODE_ALPHABET_POPUP:\n showLanguageSelectionDialog();\n break;\n case KeyCodes.ALT:\n nextAlterKeyboard(getCurrentInputEditorInfo());\n break;\n case KeyCodes.KEYBOARD_CYCLE:\n nextKeyboard(getCurrentInputEditorInfo(), NextKeyboardType.Any);\n break;\n case KeyCodes.KEYBOARD_REVERSE_CYCLE:\n nextKeyboard(getCurrentInputEditorInfo(), NextKeyboardType.PreviousAny);\n break;\n case KeyCodes.KEYBOARD_CYCLE_INSIDE_MODE:\n nextKeyboard(getCurrentInputEditorInfo(), NextKeyboardType.AnyInsideMode);\n break;\n case KeyCodes.KEYBOARD_MODE_CHANGE:\n nextKeyboard(getCurrentInputEditorInfo(), NextKeyboardType.OtherMode);\n break;\n case KeyCodes.CLIPBOARD:\n Clipboard cp = AnyApplication.getFrankenRobot().embody(new Clipboard.ClipboardDiagram(getApplicationContext()));\n CharSequence clipboardText = cp.getText();\n if (!TextUtils.isEmpty(clipboardText)) {\n onText(clipboardText);\n }\n break;\n case KeyCodes.TAB:\n sendTab();\n break;\n case KeyCodes.ESCAPE:\n sendEscape();\n break;\n default:\n if (mKeyboardSwitcher.isRightToLeftMode()) {\n if (primaryCode == (int) ')')\n primaryCode = (int) '(';\n else if (primaryCode == (int) '(')\n primaryCode = (int) ')';\n }\n if (isWordSeparator(primaryCode)) {\n handleSeparator(primaryCode);\n } else {\n if (mInputView != null && mInputView.isControl() && primaryCode >= 32 && primaryCode < 127) {\n int controlCode = primaryCode & 31;\n if (AnyApplication.DEBUG)\n Log.d(TAG, \"String_Node_Str\" + primaryCode + \"String_Node_Str\" + controlCode);\n if (controlCode == 9) {\n sendTab();\n } else {\n ic.commitText(Character.toString((char) controlCode), 1);\n }\n } else {\n handleCharacter(primaryCode, key, multiTapIndex, nearByKeyCodes);\n }\n mJustAddedAutoSpace = false;\n }\n if (mKeyboardSwitcher.isKeyRequireSwitchToAlphabet(primaryCode)) {\n mKeyboardSwitcher.nextKeyboard(getCurrentInputEditorInfo(), NextKeyboardType.Alphabet);\n }\n break;\n }\n}\n"
|
"private void importSchemaFromFile(String fileName) throws Exception {\n InputSource source = null;\n Pattern httpUrl = Pattern.compile(\"String_Node_Str\");\n Matcher match = httpUrl.matcher(fileName);\n if (match.matches()) {\n URL url = new URL(fileName);\n String urlContent = IOUtils.toString(url.openConnection().getInputStream());\n urlContent = urlContent.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n source = new InputSource(IOUtils.toInputStream(urlContent));\n importSchema(source, fileName);\n } else {\n importFromFile(source, fileName);\n }\n}\n"
|
"public void paintOverlay(Graphics2D g) {\n BufferedImage overlay = tileImage;\n if (overlay != null) {\n Point center = findCenter();\n af = AffineTransform.getRotateInstance(rotation);\n af.scale(tileScale, tileScale);\n AffineTransformOp aop = new AffineTransformOp(af, AffineTransformOp.TYPE_BILINEAR);\n g2.drawImage(tileImage, aop, center.x + x_adjust, center.y + y_adjust);\n }\n}\n"
|
"public void addQueryTest() {\n createBaseStream();\n streamOperationService.addQuery(STREAM_NAME_GOOD, \"String_Node_Str\" + STREAM_NAME_GOOD + \"String_Node_Str\" + INFERRED_STREAM_GOOD + \"String_Node_Str\");\n Mockito.verify(streamStatusDao, VerificationModeFactory.times(2)).createInferredStream(Mockito.anyString(), null);\n Assert.assertEquals(2, sm.getStreamDefinitions().size());\n}\n"
|
"private void transferWithExceptions() throws ServletException, IOException, URISyntaxException, JSONException {\n String host, remotePath, user, passphrase;\n int port;\n try {\n JSONObject requestInfo = OrionServlet.readJSONRequest(request);\n host = requestInfo.getString(ProtocolConstants.KEY_HOST);\n remotePath = requestInfo.getString(ProtocolConstants.KEY_PATH);\n port = requestInfo.optInt(ProtocolConstants.KEY_PORT, 22);\n user = requestInfo.getString(ProtocolConstants.KEY_USER_NAME);\n passphrase = requestInfo.getString(ProtocolConstants.KEY_PASSPHRASE);\n } catch (Exception e) {\n handleException(\"String_Node_Str\", e, HttpServletResponse.SC_BAD_REQUEST);\n return;\n }\n File localFile;\n try {\n localFile = localRoot.toLocalFile(EFS.NONE, null);\n } catch (CoreException e) {\n handleException(NLS.bind(\"String_Node_Str\", localRoot.toString()), e, HttpServletResponse.SC_NOT_IMPLEMENTED);\n return;\n }\n SFTPTransferJob job;\n if (TransferServlet.PREFIX_IMPORT.equals(new Path(request.getPathInfo()).segment(0))) {\n job = new SFTPImportJob(localFile, host, port, new Path(remotePath), user, passphrase, options);\n } else {\n job = new SFTPExportJob(localFile, host, port, new Path(remotePath), user, passphrase, options);\n }\n job.schedule();\n TaskInfo task = job.getTask();\n JSONObject result = task.toJSON();\n URI requestLocation = ServletResourceHandler.getURI(request);\n URI taskLocation = new URI(requestLocation.getScheme(), requestLocation.getAuthority(), \"String_Node_Str\" + task.getTaskId(), null, null);\n result.put(ProtocolConstants.KEY_LOCATION, taskLocation);\n response.setHeader(ProtocolConstants.HEADER_LOCATION, taskLocation.toString());\n OrionServlet.writeJSONResponse(request, response, result);\n response.setStatus(HttpServletResponse.SC_CREATED);\n}\n"
|
"public void callOnUncaughtExceptionThrown(Throwable t) {\n try {\n internalRawCallToOnUncaughtExceptionThrown(t);\n } catch (Throwable tw) {\n log.error(\"String_Node_Str\", t);\n log.error(\"String_Node_Str\", tw);\n }\n}\n"
|
"private void addStringArray(String casLabel, String entLabel, JsonObject data, Document doc, List<Element> additionalAttributes) {\n Element root = createElement(casLabel + \"String_Node_Str\", doc);\n if (data.containsField(entLabel)) {\n for (Object item : data.getArray(entLabel)) {\n root.appendChild(createTextElement(casLabel, (String) item, doc));\n }\n }\n additionalAttributes.add(root);\n}\n"
|
"public View getView(int i, View view, ViewGroup viewGroup) {\n if (view == null) {\n view = getActivity().getLayoutInflater().inflate(R.layout.list_item_nearby_beacon, viewGroup, false);\n }\n TextView titleTextView = (TextView) view.findViewById(R.id.title);\n TextView urlTextView = (TextView) view.findViewById(R.id.url);\n TextView descriptionTextView = (TextView) view.findViewById(R.id.description);\n ImageView iconImageView = (ImageView) view.findViewById(R.id.icon);\n String url = getItem(i);\n PwsClient.UrlMetadata urlMetadata = mUrlToUrlMetadata.get(url);\n if (urlMetadata != null) {\n titleTextView.setText(urlMetadata.title);\n urlTextView.setText(urlMetadata.displayUrl);\n descriptionTextView.setText(urlMetadata.description);\n iconImageView.setImageBitmap(urlMetadata.icon);\n } else {\n titleTextView.setText(\"String_Node_Str\");\n iconImageView.setImageDrawable(null);\n urlTextView.setText(url);\n descriptionTextView.setText(R.string.metadata_loading);\n }\n if (mDebugRangingViewEnabled) {\n updateRangingDebugView(url, view);\n view.findViewById(R.id.ranging_debug_container).setVisibility(View.VISIBLE);\n view.findViewById(R.id.metadata_debug_container).setVisibility(View.VISIBLE);\n PwsClient.getInstance(getActivity()).useDevEndpoint();\n } else {\n view.findViewById(R.id.ranging_debug_container).setVisibility(View.GONE);\n view.findViewById(R.id.metadata_debug_container).setVisibility(View.GONE);\n PwsClient.getInstance(getActivity()).useProdEndpoint();\n }\n return view;\n}\n"
|
"protected void calculateDetailHeatMapHeights() {\n hashHeatMapHeights.clear();\n HeatMapWrapper heatMapWrapper = layout.getHeatMapWrapper();\n HashMap<Group, GroupInfo> selectedGroups = heatMapWrapper.getSelectedGroups();\n int totalNumberOfElements = 0;\n int numberOfFocusElements = 0;\n float requestedFocusSpacing = 0;\n float totalHeatMapOverheadSize = 0;\n for (Group group : selectedGroups.keySet()) {\n GLHeatMap heatMap = heatMapWrapper.getHeatMap(group.getGroupIndex());\n int numElements = heatMap.getNumberOfVisibleElements();\n totalNumberOfElements += numElements;\n totalHeatMapOverheadSize += heatMap.getRequiredOverheadSpacing();\n if (heatMap.isForceMinSpacing()) {\n numberOfFocusElements += numElements;\n requestedFocusSpacing = heatMap.getMinSpacing();\n }\n }\n float gapSpace = getDetailHeight() * DETAIL_HEATMAP_SPACING_PORTION_DEFAULT * (selectedGroups.size() - 1);\n detailHeatMapSpacing = getDetailHeight() * DETAIL_HEATMAP_SPACING_PORTION_DEFAULT;\n float availableSpaceForHeatMaps = getDetailHeight() - gapSpace - totalHeatMapOverheadSize;\n float defaultSpacing = availableSpaceForHeatMaps / (float) totalNumberOfElements;\n float minSpacing = defaultSpacing / 10.0f;\n float hmMinSpacing = HeatMapRenderStyle.MIN_SELECTED_FIELD_HEIGHT * 1.5f;\n float resultingFocusSpacing = 0;\n float resultingNormalSpacing = 0;\n int overheadsGranted = 0;\n int elementsInOverhead = 0;\n for (Group group : selectedGroups.keySet()) {\n GLHeatMap heatMap = heatMapWrapper.getHeatMap(group.getGroupIndex());\n int numElements = heatMap.getNumberOfVisibleElements();\n if (numElements * defaultSpacing < hmMinSpacing) {\n overheadsGranted++;\n elementsInOverhead += numElements;\n }\n }\n availableSpaceForHeatMaps -= hmMinSpacing * overheadsGranted - (elementsInOverhead * defaultSpacing);\n defaultSpacing = availableSpaceForHeatMaps / (float) (totalNumberOfElements);\n minSpacing = defaultSpacing / 4;\n if (layout.isUseZoom() && numberOfFocusElements > 0) {\n if (defaultSpacing > requestedFocusSpacing) {\n resultingFocusSpacing = defaultSpacing;\n resultingNormalSpacing = defaultSpacing;\n } else if ((availableSpaceForHeatMaps - (numberOfFocusElements * requestedFocusSpacing)) / (totalNumberOfElements - numberOfFocusElements) > minSpacing) {\n resultingFocusSpacing = requestedFocusSpacing;\n resultingNormalSpacing = (availableSpaceForHeatMaps - resultingFocusSpacing * numberOfFocusElements) / (totalNumberOfElements - numberOfFocusElements);\n } else {\n resultingNormalSpacing = minSpacing;\n resultingFocusSpacing = (availableSpaceForHeatMaps - (totalNumberOfElements - numberOfFocusElements) * resultingNormalSpacing) / numberOfFocusElements;\n }\n } else {\n resultingNormalSpacing = defaultSpacing;\n }\n for (Group group : selectedGroups.keySet()) {\n GLHeatMap heatMap = heatMapWrapper.getHeatMap(group.getGroupIndex());\n int numElements = heatMap.getNumberOfVisibleElements();\n float currentHeatMapOverheadSize = heatMap.getRequiredOverheadSpacing();\n float size = 0;\n if (layout.isUseZoom() && heatMap.isForceMinSpacing()) {\n size = (resultingFocusSpacing * numElements) + currentHeatMapOverheadSize;\n } else {\n size = (resultingNormalSpacing * numElements) + currentHeatMapOverheadSize;\n }\n if (size - currentHeatMapOverheadSize < hmMinSpacing)\n size = hmMinSpacing + currentHeatMapOverheadSize;\n hashHeatMapHeights.put(group.getGroupIndex(), size);\n }\n}\n"
|
"public Answer executeProxyLoadScan(final Command cmd, final long proxyVmId, final String proxyVmName, final String proxyManagementIp, final int cmdPort) {\n String result = null;\n final StringBuffer sb = new StringBuffer();\n sb.append(\"String_Node_Str\").append(proxyManagementIp).append(\"String_Node_Str\" + cmdPort).append(\"String_Node_Str\");\n boolean success = true;\n try {\n final URL url = new URL(sb.toString());\n final URLConnection conn = url.openConnection();\n final InputStream is = conn.getInputStream();\n final BufferedReader reader = new BufferedReader(new InputStreamReader(is, \"String_Node_Str\"));\n final StringBuilder sb2 = new StringBuilder();\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb2.append(line + \"String_Node_Str\");\n }\n result = sb2.toString();\n } catch (final IOException e) {\n success = false;\n } finally {\n try {\n is.close();\n } catch (final IOException e) {\n s_logger.warn(\"String_Node_Str\" + proxyManagementIp);\n success = false;\n }\n }\n } catch (final IOException e) {\n s_logger.warn(\"String_Node_Str\" + proxyManagementIp);\n success = false;\n }\n return new ConsoleProxyLoadAnswer(cmd, proxyVmId, proxyVmName, success, result);\n}\n"
|
"int _deleteSelf(Entity<?> entity, Object obj) {\n if (null != obj) {\n EntityField idnf = entity.getIdentifiedField();\n if (null == idnf) {\n Object[] args = evalArgsByPks(entity, obj);\n if (null != args) {\n Sql sql = sqlMaker.deletex(entity, args);\n execute(sql);\n return sql.getUpdateCount();\n }\n throw DaoException.create(obj, \"String_Node_Str\", \"String_Node_Str\", null);\n }\n if (idnf.isId()) {\n long id = Castors.me().castTo(idnf.getValue(obj), Long.class);\n return delete(obj.getClass(), id);\n } else if (idnf.isName()) {\n String name = idnf.getValue(obj).toString();\n return delete(obj.getClass(), name);\n } else {\n throw DaoException.create(obj, \"String_Node_Str\", \"String_Node_Str\", new Exception(\"String_Node_Str\"));\n }\n }\n return 0;\n}\n"
|
"private void parse(final Document document) throws EoulsanException {\n for (Element e : XMLUtils.getElementsByTagName(document, \"String_Node_Str\")) {\n this.name = XMLUtils.getTagValue(e, \"String_Node_Str\");\n this.description = XMLUtils.getTagValue(e, \"String_Node_Str\");\n this.prefix = XMLUtils.getTagValue(e, \"String_Node_Str\");\n this.oneFilePerAnalysis = Boolean.parseBoolean(XMLUtils.getTagValue(e, \"String_Node_Str\"));\n this.designFieldName = XMLUtils.getTagValue(e, \"String_Node_Str\");\n this.contentType = XMLUtils.getTagValue(e, \"String_Node_Str\");\n this.generatorClassName = XMLUtils.getTagValue(e, \"String_Node_Str\");\n this.checkerClassName = XMLUtils.getTagValue(e, \"String_Node_Str\");\n if (this.designFieldName != null)\n this.dataTypeFromDesignFile = true;\n for (Element generatorElement : XMLUtils.getElementsByTagName(e, \"String_Node_Str\")) {\n final List<String> attributeNames = XMLUtils.getAttributeNames(generatorElement);\n for (String attributeName : attributeNames) this.generatorParameters.add(new Parameter(attributeName, generatorElement.getAttribute(attributeName)));\n }\n final String maxFiles = XMLUtils.getTagValue(e, \"String_Node_Str\");\n try {\n if (maxFiles == null)\n this.maxFilesCount = DEFAULT_MAX_FILES_COUNT;\n else\n this.maxFilesCount = Integer.parseInt(maxFiles);\n } catch (NumberFormatException exp) {\n throw new EoulsanException(\"String_Node_Str\" + this.name + \"String_Node_Str\" + maxFiles);\n }\n List<String> extensions = Utils.newArrayList();\n for (Element e2 : XMLUtils.getElementsByTagName(document, \"String_Node_Str\")) for (Element e3 : XMLUtils.getElementsByTagName(e2, \"String_Node_Str\")) {\n final String defaultAttribute = e3.getAttribute(\"String_Node_Str\");\n if (defaultAttribute != null && \"String_Node_Str\".equals(defaultAttribute.trim().toLowerCase()))\n extensions.add(0, e3.getTextContent().trim());\n else\n extensions.add(e3.getTextContent().trim());\n }\n this.extensions = new LinkedHashSet<String>(extensions).toArray(new String[0]);\n }\n if (this.name == null)\n throw new EoulsanException(\"String_Node_Str\");\n this.name = this.name.trim().toLowerCase();\n if (this.description != null)\n this.description = this.description.trim();\n if (this.contentType == null || \"String_Node_Str\".equals(this.contentType.trim()))\n this.contentType = DEFAULT_CONTENT_TYPE;\n if (this.generatorClassName != null && \"String_Node_Str\".equals(this.generatorClassName.trim()))\n this.generatorClassName = null;\n if (this.checkerClassName != null && \"String_Node_Str\".equals(this.checkerClassName.trim()))\n this.checkerClassName = null;\n if (this.maxFilesCount < 1 || this.maxFilesCount > 2)\n throw new EoulsanException(\"String_Node_Str\" + this.name + \"String_Node_Str\" + this.maxFilesCount);\n}\n"
|
"public static IC2PowerSink createPowerSink(TileEntity tileEntity, IExternalPowerSink externalSink) {\n return powerSinkFactory.apply(tileEntity, externalSink);\n}\n"
|
"public static boolean hasRewardCrafting(Player player) {\n return player.hasPermission(REWARDS_CRAFTING);\n}\n"
|
"public static DirichletState<VectorWritable> createState(String modelFactory, String modelPrototype, int prototypeSize, int numModels, double alpha_0) throws ClassNotFoundException, InstantiationException, IllegalAccessException, SecurityException, NoSuchMethodException, IllegalArgumentException, InvocationTargetException {\n ClassLoader ccl = Thread.currentThread().getContextClassLoader();\n Class<? extends VectorModelDistribution> cl = ccl.loadClass(modelFactory).asSubclass(VectorModelDistribution.class);\n VectorModelDistribution factory = cl.newInstance();\n Class<? extends Vector> vcl = ccl.loadClass(modelPrototype).asSubclass(Vector.class);\n Constructor<? extends Vector> v = vcl.getConstructor(int.class);\n factory.setModelPrototype(new VectorWritable(v.newInstance(prototypeSize)));\n return new DirichletState<VectorWritable>(factory, numModels, alpha_0, 1, 1);\n}\n"
|
"public int removeTraps(ConstantPool constants, ABC abc, int scriptIndex, int classIndex, boolean isStatic, String path) {\n return code.removeTraps(constants, this, abc, scriptIndex, classIndex, isStatic, path);\n}\n"
|
"public void should_FindPostContentsEqual_WhenJsonContentOrderIrrelevant() throws Exception {\n final String requestUrl = String.format(\"String_Node_Str\", STUBS_URL, \"String_Node_Str\");\n final URL jsonContentUrl = StubsPortalTest.class.getResource(\"String_Node_Str\");\n assertThat(jsonContentUrl).isNotNull();\n final String content = StringUtils.inputStreamToString(jsonContentUrl.openStream());\n final HttpRequest request = HttpUtils.constructHttpRequest(HttpMethods.POST, requestUrl, content);\n final HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.setContentType(HEADER_APPLICATION_JSON);\n request.setHeaders(httpHeaders);\n final HttpResponse response = request.execute();\n assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK_200);\n assertThat(response.parseAsString().trim()).isEqualTo(\"String_Node_Str\");\n}\n"
|
"public void onPlayerMove(PlayerMoveEvent e) {\n final Player player = e.getPlayer();\n if (player.isDead()) {\n return;\n }\n if (!player.getWorld().getName().equalsIgnoreCase(Settings.worldName)) {\n return;\n }\n if (player.isOp()) {\n if (!Settings.damageOps) {\n return;\n }\n } else if (VaultHelper.checkPerm(player, Settings.PERMPREFIX + \"String_Node_Str\") || VaultHelper.checkPerm(player, Settings.PERMPREFIX + \"String_Node_Str\")) {\n return;\n }\n if (player.getGameMode().equals(GameMode.CREATIVE)) {\n return;\n }\n final Location playerLoc = player.getLocation();\n final Block block = playerLoc.getBlock();\n if (Settings.rainDamage > 0D && isRaining) {\n Biome biome = playerLoc.getBlock().getBiome();\n if (biome != Biome.DESERT && biome != Biome.DESERT_HILLS && biome != Biome.DESERT_MOUNTAINS && biome != Biome.SAVANNA && biome != Biome.SAVANNA_MOUNTAINS && biome != Biome.SAVANNA_PLATEAU && biome != Biome.SAVANNA_PLATEAU_MOUNTAINS && biome != Biome.MESA && biome != Biome.MESA_BRYCE && biome != Biome.MESA_PLATEAU && biome != Biome.MESA_PLATEAU_FOREST && biome != Biome.MESA_PLATEAU_FOREST_MOUNTAINS && biome != Biome.MESA_PLATEAU_MOUNTAINS && biome != Biome.HELL) {\n boolean hitByRain = true;\n for (int y = playerLoc.getBlockY() + 2; y < playerLoc.getWorld().getMaxHeight(); y++) {\n if (!playerLoc.getWorld().getBlockAt(playerLoc.getBlockX(), y, playerLoc.getBlockZ()).getType().equals(Material.AIR)) {\n hitByRain = false;\n break;\n }\n }\n if (!hitByRain) {\n wetPlayers.remove(player);\n } else {\n boolean acidPotion = false;\n Collection<PotionEffect> activePotions = player.getActivePotionEffects();\n for (PotionEffect s : activePotions) {\n if (s.getType().equals(PotionEffectType.WATER_BREATHING)) {\n acidPotion = true;\n }\n }\n if (acidPotion) {\n wetPlayers.remove(player);\n } else {\n if (!wetPlayers.contains(player)) {\n wetPlayers.add(player);\n new BukkitRunnable() {\n public void run() {\n if (!isRaining || player.isDead()) {\n wetPlayers.remove(player);\n this.cancel();\n } else if (player.getLocation().getWorld().getName().equalsIgnoreCase(Settings.worldName)) {\n Collection<PotionEffect> activePotions = player.getActivePotionEffects();\n for (PotionEffect s : activePotions) {\n if (s.getType().equals(PotionEffectType.WATER_BREATHING)) {\n wetPlayers.remove(player);\n this.cancel();\n return;\n }\n }\n for (int y = player.getLocation().getBlockY() + 2; y < player.getLocation().getWorld().getMaxHeight(); y++) {\n if (!player.getLocation().getWorld().getBlockAt(player.getLocation().getBlockX(), y, player.getLocation().getBlockZ()).getType().equals(Material.AIR)) {\n wetPlayers.remove(player);\n this.cancel();\n return;\n }\n }\n if (Settings.rainDamage > 0D) {\n double health = player.getHealth() - (Settings.rainDamage - Settings.rainDamage * getDamageReduced(player));\n if (health < 0D) {\n health = 0D;\n } else if (health > 20D) {\n health = 20D;\n }\n player.setHealth(health);\n player.getWorld().playSound(playerLoc, Sound.FIZZ, 3F, 3F);\n }\n } else {\n wetPlayers.remove(player);\n this.cancel();\n }\n }\n }.runTaskTimer(plugin, 0L, 20L);\n }\n }\n }\n }\n }\n if (!block.isLiquid() && !head.isLiquid()) {\n return;\n }\n if (playerLoc.getBlockY() < 1) {\n final Vector v = new Vector(player.getVelocity().getX(), 1D, player.getVelocity().getZ());\n player.setVelocity(v);\n }\n if (burningPlayers.contains(player)) {\n return;\n }\n if (Settings.allowSpawnNoAcidWater) {\n if (playerLoc.getBlockY() > Settings.sea_level) {\n if (plugin.getGrid().isAtSpawn(playerLoc)) {\n return;\n }\n }\n }\n if (block.getType().equals(Material.STATIONARY_WATER) || block.getType().equals(Material.WATER)) {\n Entity playersVehicle = player.getVehicle();\n if (playersVehicle != null) {\n if (playersVehicle.getType().equals(EntityType.BOAT)) {\n return;\n }\n }\n Collection<PotionEffect> activePotions = player.getActivePotionEffects();\n for (PotionEffect s : activePotions) {\n if (s.getType().equals(PotionEffectType.WATER_BREATHING)) {\n return;\n }\n }\n burningPlayers.add(player);\n new BukkitRunnable() {\n public void run() {\n if (player.isDead()) {\n burningPlayers.remove(player);\n this.cancel();\n } else if (player.getLocation().getBlock().isLiquid() && player.getLocation().getWorld().getName().equalsIgnoreCase(Settings.worldName)) {\n if (!Settings.acidDamageType.isEmpty()) {\n for (PotionEffectType t : Settings.acidDamageType) {\n if (t.equals(PotionEffectType.BLINDNESS) || t.equals(PotionEffectType.CONFUSION) || t.equals(PotionEffectType.HUNGER) || t.equals(PotionEffectType.SLOW) || t.equals(PotionEffectType.SLOW_DIGGING) || t.equals(PotionEffectType.WEAKNESS)) {\n player.addPotionEffect(new PotionEffect(t, 600, 1));\n } else {\n player.addPotionEffect(new PotionEffect(t, 200, 1));\n }\n }\n }\n if (Settings.acidDamage > 0D) {\n double health = player.getHealth() - (Settings.acidDamage - Settings.acidDamage * getDamageReduced(player));\n if (health < 0D) {\n health = 0D;\n } else if (health > 20D) {\n health = 20D;\n }\n player.setHealth(health);\n player.getWorld().playSound(playerLoc, Sound.FIZZ, 2F, 2F);\n }\n } else {\n burningPlayers.remove(player);\n this.cancel();\n }\n }\n }.runTaskTimer(plugin, 0L, 20L);\n }\n}\n"
|
"public void getImageAsync(PlayableItem item, ImageView imageView) {\n Bitmap image;\n synchronized (cache) {\n image = cache.get(item.getPlayableUri());\n }\n if (image == null && item.hasImage()) {\n ImageLoaderTask imageLoader = new ImageLoaderTask(item, imageView);\n imageLoader.execute();\n } else {\n imageView.setImageBitmap(image);\n imageView.setVisibility(View.VISIBLE);\n }\n}\n"
|
"private boolean insertKey(CharSequence key) {\n int index = idx(key);\n if (Unsafe.arrayGet(keys, index) == null) {\n String sk = key.toString();\n Unsafe.arrayPut(keys, index, sk);\n list.add(sk);\n free--;\n return true;\n } else {\n return !(key == Unsafe.arrayGet(keys, index) || Chars.equals(key, Unsafe.arrayGet(keys, index))) && probeInsert(key, index);\n }\n}\n"
|
"protected void thresholdReached() throws IOException {\n if (prefix != null) {\n outputFile = File.createTempFile(prefix, suffix, directory);\n }\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(outputFile);\n memoryOutputStream.writeTo(fos);\n currentOutputStream = fos;\n memoryOutputStream = null;\n } catch (IOException e) {\n if (fos != null) {\n fos.close();\n }\n throw e;\n }\n}\n"
|
"private static List genModifiers(int modifiers) {\n List modifiersList = new ArrayList();\n if ((modifiers & AccStatic) != 0)\n modifiersList.add(IProgramElement.Modifiers.STATIC);\n if ((modifiers & AccFinal) != 0)\n modifiersList.add(IProgramElement.Modifiers.FINAL);\n if ((modifiers & AccSynchronized) != 0)\n modifiersList.add(IProgramElement.Modifiers.STATIC);\n if ((modifiers & AccVolatile) != 0)\n modifiersList.add(IProgramElement.Modifiers.STATIC);\n if ((modifiers & AccTransient) != 0)\n modifiersList.add(IProgramElement.Modifiers.STATIC);\n if ((modifiers & AccNative) != 0)\n modifiersList.add(IProgramElement.Modifiers.STATIC);\n if ((modifiers & AccAbstract) != 0)\n modifiersList.add(IProgramElement.Modifiers.STATIC);\n return modifiersList;\n}\n"
|
"public Iterable<Centroid> call() {\n UpdatableSearcher searcher = StreamingKMeansUtilsMR.searcherFromConfiguration(conf);\n int numClusters = conf.getInt(StreamingKMeansDriver.ESTIMATED_NUM_MAP_CLUSTERS, 1);\n double estimateDistanceCutoff = conf.getFloat(StreamingKMeansDriver.ESTIMATED_DISTANCE_CUTOFF, StreamingKMeansDriver.INVALID_DISTANCE_CUTOFF);\n Iterator<Centroid> dataPointsIterator = dataPoints.iterator();\n List<Centroid> dataPointsList = Lists.newArrayList();\n if (estimateDistanceCutoff == StreamingKMeansDriver.INVALID_DISTANCE_CUTOFF) {\n List<Centroid> estimatePoints = Lists.newArrayListWithExpectedSize(NUM_ESTIMATE_POINTS);\n while (dataPointsIterator.hasNext() && estimatePoints.size() < NUM_ESTIMATE_POINTS) {\n Centroid centroid = dataPointsIterator.next();\n estimatePoints.add(centroid);\n dataPointsList.add(centroid);\n }\n if (log.isInfoEnabled()) {\n log.info(\"String_Node_Str\", estimatePoints.size());\n }\n estimateDistanceCutoff = ClusteringUtils.estimateDistanceCutoff(estimatePoints, searcher.getDistanceMeasure());\n } else {\n Iterators.addAll(dataPointsList, dataPointsIterator);\n }\n StreamingKMeans streamingKMeans = new StreamingKMeans(searcher, numClusters, estimateDistanceCutoff);\n if (!dataPointsIterator.hasNext()) {\n dataPointsIterator = dataPoints.iterator();\n }\n while (dataPointsIterator.hasNext()) {\n streamingKMeans.cluster(dataPointsIterator.next());\n }\n streamingKMeans.reindexCentroids();\n return streamingKMeans;\n}\n"
|
"public ResourceKey deserialize(final ResourceKey bundleKey, final String stringKey) throws ResourceKeyCreationException {\n throw new ResourceKeyCreationException(Messages.getInstance().getString(\"String_Node_Str\"));\n}\n"
|
"public PlotPanel createPlotPanel(Mondrian mondrian, MFrame plotFrame, DataSet dataSet, JList varNames) {\n int[] indices = varNames.getSelectedIndices();\n PlotPanel barChartsContainer = new PlotPanel();\n plotFrame.setLayout(new GridLayout(1, indices.length));\n int[] vars = WeightCaclulator.getWeightVariable(varNames.getSelectedIndices(), dataSet, mondrian.calcNumCategoricalVars(), mondrian.determineWeightIndex(), null, varNames);\n if (vars.length > 1) {\n int[] passed = new int[vars.length - 1];\n System.arraycopy(vars, 0, passed, 0, vars.length - 1);\n int weight = vars[vars.length - 1];\n return super.createBarChart(mondrian, plotFrame, dataSet, passed, weight);\n } else {\n return super.createBarChart(mondrian, plotFrame, dataSet, vars, vars[0]);\n }\n plotFrame.setLocation(100, 100);\n return barChartsContainer;\n}\n"
|
"public void testFailureWhilstAttemptingToReportError() {\n runNegativeTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" }, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + (GroovyUtils.isAtLeastGroovy(20) ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n}\n"
|
"public Identity saveDeletedByData(Identity identity, Identity doer) {\n IdentityImpl reloadedIdentity = loadForUpdate(identity);\n if (reloadedIdentity != null) {\n reloadedIdentity.setDeletedBy(getDeletedByName(doer));\n reloadedIdentity.setDeletedDate(new Date());\n Collection<String> deletedRoles = new HashSet<>(getRolesSummaryWithResources(reloadedIdentity));\n StringBuilder deletedRoleBuffer = new StringBuilder();\n for (String deletedRole : deletedRoles) {\n if (deletedRoleBuffer.length() > 0)\n deletedRoleBuffer.append(\"String_Node_Str\");\n deletedRoleBuffer.append(deletedRole);\n }\n reloadedIdentity.setDeletedRoles(deletedRoleBuffer.toString());\n reloadedIdentity = dbInstance.getCurrentEntityManager().merge(reloadedIdentity);\n dbInstance.commit();\n }\n return reloadedIdentity;\n}\n"
|
"public void handler(TBase<?, ?> tbase, DatagramPacket datagramPacket) {\n assert (tbase instanceof Span);\n try {\n Span span = (Span) tbase;\n if (logger.isInfoEnabled()) {\n logger.info(\"String_Node_Str\" + span);\n }\n String applicationName = agentIdApplicationIndexDao.selectApplicationName(span.getAgentId());\n if (applicationName == null) {\n logger.warn(\"String_Node_Str\", applicationName);\n return;\n } else {\n logger.info(\"String_Node_Str\", applicationName);\n }\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\", applicationName);\n }\n ServiceType serviceType = ServiceType.parse(span.getServiceType());\n if (serviceType.isTerminal()) {\n traceDao.insertTerminalSpan(applicationName, span);\n terminalStatistics.update(applicationName, span.getServiceName(), serviceType.getCode(), span.getEndPoint(), span.getElapsed());\n } else {\n traceDao.insert(applicationName, span);\n }\n if (span.getParentSpanId() == -1) {\n rootTraceIndexDao.insert(span);\n }\n if (serviceType.isIndexable()) {\n traceIndexDao.insert(span);\n applicationTraceIndexDao.insert(applicationName, span);\n } else {\n logger.debug(\"String_Node_Str\", span);\n }\n } catch (Exception e) {\n logger.warn(\"String_Node_Str\" + e.getMessage(), e);\n }\n}\n"
|
"public void startRequest(MRCRequest rq) {\n try {\n Args rqArgs = (Args) rq.getRequestArgs();\n final VolumeManager vMan = master.getVolumeManager();\n final FileAccessManager faMan = master.getFileAccessManager();\n final Path lp = new Path(rqArgs.linkPath);\n final Path tp = new Path(rqArgs.targetPath);\n if (!lp.getComp(0).equals(tp.getComp(0)))\n throw new UserException(ErrNo.EXDEV, \"String_Node_Str\");\n final VolumeInfo volume = vMan.getVolumeByName(lp.getComp(0));\n final StorageManager sMan = vMan.getStorageManager(volume.getId());\n final PathResolver lRes = new PathResolver(sMan, lp);\n final PathResolver tRes = new PathResolver(sMan, tp);\n faMan.checkSearchPermission(sMan, lRes, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n faMan.checkPermission(FileAccessManager.WRITE_ACCESS, sMan, lRes.getParentDir(), 0, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n lRes.checkIfFileExistsAlready();\n faMan.checkSearchPermission(sMan, tRes, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n tRes.checkIfFileDoesNotExist();\n FileMetadata target = tRes.getFile();\n if (target.isDirectory())\n throw new UserException(ErrNo.EPERM, \"String_Node_Str\");\n faMan.checkPermission(FileAccessManager.WRITE_ACCESS, sMan, target, tRes.getParentDirId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n AtomicDBUpdate update = sMan.createAtomicDBUpdate(master, rq);\n sMan.link(target, lRes.getParentDirId(), lRes.getFileName(), update);\n MRCHelper.updateFileTimes(lRes.getParentsParentId(), lRes.getParentDir(), false, true, true, sMan, update);\n MRCHelper.updateFileTimes(tRes.getParentDirId(), target, false, true, false, sMan, update);\n rq.setData(ReusableBuffer.wrap(JSONParser.writeJSON(null).getBytes()));\n update.execute();\n } catch (UserException exc) {\n Logging.logMessage(Logging.LEVEL_TRACE, this, exc);\n finishRequest(rq, new ErrorRecord(ErrorClass.USER_EXCEPTION, exc.getErrno(), exc.getMessage(), exc));\n } catch (Exception exc) {\n finishRequest(rq, new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR, \"String_Node_Str\", exc));\n }\n}\n"
|
"public void addArrow(UUID gameId, int startX, int startY, int endX, int endY, Color color, Type type) {\n JPanel p = getArrowsPanel(gameId);\n Arrow arrow = new Arrow();\n arrow.setColor(color);\n arrow.setArrowLocation(startX, startY, endX, endY);\n arrow.setBounds(0, 0, Math.max(startX, endX) + 40, Math.max(startY, endY) + 30);\n synchronized (map) {\n p.add(arrow);\n Map<Type, java.util.List<Arrow>> innerMap = map.get(gameId);\n if (innerMap == null) {\n innerMap = new HashMap<Type, List<Arrow>>();\n map.put(gameId, innerMap);\n }\n java.util.List<Arrow> arrows = innerMap.get(type);\n if (arrows == null) {\n arrows = new ArrayList<Arrow>();\n innerMap.put(type, arrows);\n }\n arrows.add(arrow);\n }\n p.revalidate();\n p.repaint();\n}\n"
|
"public AccountInfo getAccountInformation(Account account) throws Exception {\n AccountInfo ai = new AccountInfo(this, account);\n setBrowserExclusive();\n try {\n login(account);\n } catch (PluginException e) {\n ai.setValid(false);\n return ai;\n }\n if (!isPremium()) {\n ai.setValid(false);\n ai.setStatus(\"String_Node_Str\");\n return ai;\n }\n br.getPage(\"String_Node_Str\");\n String points = br.getRegex(Pattern.compile(\"String_Node_Str\", Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);\n if (points != null)\n ai.setPremiumPoints(points);\n String expire = br.getRegex(Pattern.compile(\"String_Node_Str\", Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0);\n ai.setValidUntil(Regex.getMilliSeconds(expire, \"String_Node_Str\", Locale.ENGLISH));\n ai.setTrafficLeft(-1);\n ai.setValid(true);\n return ai;\n}\n"
|
"private void rmNamespace(String ns) {\n String predicateQuery = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + ns + \"String_Node_Str\" + \"String_Node_Str\";\n log.debug(predicateQuery);\n ResultSet propList = this.model.executeSelectQuery(predicateQuery);\n HashSet<Property> propArray = new HashSet<Property>();\n while (propList.hasNext()) {\n propArray.add(ResourceFactory.createProperty(propList.next().getResource(\"String_Node_Str\").getURI()));\n }\n for (Property p : propArray) {\n this.model.getJenaModel().removeAll(null, p, null);\n }\n this.model.getJenaModel().commit();\n log.info(\"String_Node_Str\" + propArray.size() + \"String_Node_Str\");\n}\n"
|
"public int insert(String table, String key, HashMap<String, ByteIterator> values) {\n Mutator mutator = Pelops.createMutator(_host + \"String_Node_Str\" + _port + \"String_Node_Str\" + _keyspace);\n try {\n List<Column> columns = new ArrayList<Column>();\n for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {\n Column col = new Column();\n col.setName(ByteBuffer.wrap(entry.getKey().getBytes(\"String_Node_Str\")));\n col.setValue(ByteBuffer.wrap(entry.getValue().toArray()));\n col.setTimestamp(System.currentTimeMillis());\n columns.add(col);\n }\n mutator.writeColumns(column_family, Bytes.fromUTF8(key), columns);\n mutator.execute(writeConsistencyLevel);\n return Ok;\n } catch (Exception e) {\n logger.error(e);\n return Error;\n }\n}\n"
|
"protected void initialize() {\n getConnection().setInputModel(true);\n this.treePopulator = new TreePopulator(availableXmlTree);\n if (getConnection().getXmlFilePath() != null) {\n fileFieldXml.setText(getConnection().getXmlFilePath().replace(\"String_Node_Str\", \"String_Node_Str\"));\n checkFieldsValue();\n String xmlFilePath = fileFieldXml.getText();\n if (isContextMode()) {\n ContextType contextType = ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection());\n xmlFilePath = TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType, fileFieldXml.getText()));\n }\n if (!new File(xmlFilePath).exists() && getConnection().getFileContent() != null && getConnection().getFileContent().length > 0) {\n initFileContent();\n xmlFilePath = tempXmlXsdPath;\n }\n if (XmlUtil.isXSDFile(xmlFilePath)) {\n try {\n XSDSchema schema = TreeUtil.getXSDSchema(xmlFilePath);\n List<ATreeNode> rootNodes = new XSDPopulationUtil2().getAllRootNodes(schema);\n if (rootNodes.size() > 0) {\n ATreeNode rootNode = getDefaultRootNode(rootNodes);\n if (rootNode != null) {\n List<ATreeNode> treeNodes = new ArrayList<ATreeNode>();\n valid = treePopulator.populateTree(schema, rootNode, treeNodes);\n if (treeNodes.size() > 0) {\n treeNode = treeNodes.get(0);\n }\n } else {\n String xmlPath = getConnection().getSchema().get(0).getAbsoluteXPathQuery();\n if (xmlPath != null && xmlPath.length() > 0) {\n xmlPath = xmlPath.substring(xmlPath.lastIndexOf(\"String_Node_Str\") + 1);\n boolean found = false;\n for (int i = 0; i < rootNodes.size(); i++) {\n ATreeNode node = rootNodes.get(i);\n if (xmlPath.equals(node.getValue())) {\n List<ATreeNode> treeNodes = new ArrayList<ATreeNode>();\n valid = treePopulator.populateTree(schema, node, treeNodes);\n if (treeNodes.size() > 0) {\n treeNode = treeNodes.get(0);\n }\n found = true;\n break;\n }\n }\n if (!found) {\n for (int i = 0; i < rootNodes.size(); i++) {\n ATreeNode node = rootNodes.get(i);\n String[] nodeValue = ((String) node.getValue()).split(\"String_Node_Str\");\n if (nodeValue.length > 1) {\n if (xmlPath.equals(nodeValue[1])) {\n List<ATreeNode> treeNodes = new ArrayList<ATreeNode>();\n valid = treePopulator.populateTree(schema, node, treeNodes);\n if (treeNodes.size() > 0) {\n treeNode = treeNodes.get(0);\n }\n found = true;\n break;\n }\n }\n }\n }\n }\n }\n }\n } catch (Exception e) {\n ExceptionHandler.process(e);\n }\n } else {\n valid = this.treePopulator.populateTree(xmlFilePath, treeNode);\n }\n }\n if (getConnection().getEncoding() != null && !getConnection().getEncoding().equals(\"String_Node_Str\")) {\n encodingCombo.setText(getConnection().getEncoding());\n } else {\n encodingCombo.select(0);\n }\n encodingCombo.clearSelection();\n adaptFormToEditable();\n}\n"
|
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_map);\n this.mMarkerFactory = new MarkerFactory();\n this.mContentResolver = getContentResolver();\n this.mApplication = (EventORamaApplication) getApplication();\n this.mMapView = (MapView) findViewById(R.id.mapview);\n List<Overlay> mapOverlays = mMapView.getOverlays();\n this.mUserOverlay = new UsersOverlay(getResources().getDrawable(R.drawable.map_marker));\n mapOverlays.add(mUserOverlay);\n SharedPreferences settings = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n if (!settings.contains(PREF_LAT_KEY)) {\n mlastLocationFinder = mApplication.getLastLocationFinder(getBaseContext());\n mlastLocationFinder.setChangedLocationListener(oneShotLocationUpdateListener);\n Location bestEffortLocation = mlastLocationFinder.getLastBestLocation(10, System.currentTimeMillis() - 15 * 1000);\n if (bestEffortLocation != null)\n updateMap(bestEffortLocation);\n }\n this.mMapView.setBuiltInZoomControls(true);\n ImageView nav_events = (ImageView) findViewById(R.id.nav_events);\n nav_events.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n Intent intent = new Intent(mContext, EventStreamActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);\n startActivity(intent);\n }\n });\n ImageView nav_people = (ImageView) findViewById(R.id.nav_people);\n nav_people.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n Intent intent = new Intent(mContext, PeopleActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);\n startActivity(intent);\n }\n });\n ImageView nav_location = (ImageView) findViewById(R.id.nav_location);\n nav_location.setSelected(true);\n nav_location.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n }\n });\n}\n"
|
"public void test24getServicePoliciesIfUpdated() throws Exception {\n HttpServletRequest request = Mockito.mock(HttpServletRequest.class);\n String serviceName = \"String_Node_Str\";\n Long lastKnownVersion = 1L;\n String pluginId = \"String_Node_Str\";\n Mockito.doNothing().when(assetMgr).createPluginInfo(serviceName, pluginId, null, 1, 1L, lastKnownVersion, 1, 0);\n ServicePolicies dbServicePolicies = serviceREST.getServicePoliciesIfUpdated(serviceName, lastKnownVersion, 0L, pluginId, request);\n Assert.assertNull(dbServicePolicies);\n}\n"
|
"public Role getRole(String name) {\n return roles.get(name);\n}\n"
|
"public DTMasterParams doCompute(MasterContext<DTMasterParams, DTWorkerParams> context) {\n if (context.isFirstIteration()) {\n return buildInitialMasterParams();\n }\n if (this.cpMasterParams != null) {\n DTMasterParams tmpMasterParams = rebuildRecoverMasterResultDepthList();\n this.cpMasterParams = null;\n if (this.isGBDT) {\n tmpMasterParams.setTrees(trees.subList(trees.size() - 1, trees.size()));\n tmpMasterParams.setTmpTrees(this.trees);\n }\n return tmpMasterParams;\n }\n boolean isFirst = false;\n Map<Integer, NodeStats> nodeStatsMap = null;\n double trainError = 0d, validationError = 0d;\n double weightedTrainCount = 0d, weightedValidationCount = 0d;\n for (DTWorkerParams params : context.getWorkerResults()) {\n if (!isFirst) {\n isFirst = true;\n nodeStatsMap = params.getNodeStatsMap();\n } else {\n Map<Integer, NodeStats> currNodeStatsmap = params.getNodeStatsMap();\n for (Entry<Integer, NodeStats> entry : nodeStatsMap.entrySet()) {\n NodeStats resultNodeStats = entry.getValue();\n mergeNodeStats(resultNodeStats, currNodeStatsmap.get(entry.getKey()));\n }\n }\n trainError += params.getTrainError();\n validationError += params.getValidationError();\n weightedTrainCount += params.getTrainCount();\n weightedValidationCount += params.getValidationCount();\n }\n for (Entry<Integer, NodeStats> entry : nodeStatsMap.entrySet()) {\n NodeStats nodeStats = entry.getValue();\n int treeId = nodeStats.getTreeId();\n Node doneNode = Node.getNode(trees.get(treeId).getNode(), nodeStats.getNodeId());\n Map<Integer, double[]> statistics = nodeStats.getFeatureStatistics();\n List<GainInfo> gainList = new ArrayList<GainInfo>();\n for (Entry<Integer, double[]> gainEntry : statistics.entrySet()) {\n int columnNum = gainEntry.getKey();\n ColumnConfig config = this.columnConfigList.get(columnNum);\n double[] statsArray = gainEntry.getValue();\n GainInfo gainInfo = this.impurity.computeImpurity(statsArray, config);\n if (gainInfo != null) {\n gainList.add(gainInfo);\n }\n }\n GainInfo maxGainInfo = GainInfo.getGainInfoByMaxGain(gainList);\n if (maxGainInfo == null) {\n doneNode.setLeaf(true);\n continue;\n }\n populateGainInfoToNode(treeId, doneNode, maxGainInfo);\n if (this.isLeafWise) {\n boolean isNotSplit = maxGainInfo.getGain() <= 0d;\n if (!isNotSplit) {\n this.toSplitQueue.offer(new TreeNode(treeId, doneNode));\n } else {\n LOG.info(\"String_Node_Str\", doneNode.getId(), treeId);\n }\n } else {\n boolean isLeaf = maxGainInfo.getGain() <= 0d || Node.indexToLevel(doneNode.getId()) == this.maxDepth;\n doneNode.setLeaf(isLeaf);\n splitNodeForLevelWisedTree(isLeaf, treeId, doneNode);\n }\n }\n if (this.isLeafWise) {\n int currSplitIndex = 0;\n while (!toSplitQueue.isEmpty() && currSplitIndex < this.maxBatchSplitSize) {\n TreeNode treeNode = this.toSplitQueue.poll();\n splitNodeForLeafWisedTree(treeNode.getTreeId(), treeNode.getNode());\n }\n }\n Map<Integer, TreeNode> todoNodes = new HashMap<Integer, TreeNode>();\n double averageValidationError = validationError;\n if (this.isGBDT && this.dtEarlyStopDecider != null) {\n this.dtEarlyStopDecider.add(validationError);\n averageValidationError = this.dtEarlyStopDecider.getCurrentAverageValue();\n }\n DTMasterParams masterParams = new DTMasterParams(weightedTrainCount, trainError, weightedValidationCount, averageValidationError);\n if (toDoQueue.isEmpty()) {\n if (this.isGBDT) {\n TreeNode treeNode = this.trees.get(this.trees.size() - 1);\n Node node = treeNode.getNode();\n if (this.trees.size() == this.treeNum + this.existingTreeSize) {\n masterParams.setHalt(true);\n LOG.info(\"String_Node_Str\", context.getCurrentIteration());\n } else if (node.getLeft() == null && node.getRight() == null) {\n masterParams.setHalt(true);\n LOG.warn(\"String_Node_Str\", context.getCurrentIteration());\n } else if (this.dtEarlyStopDecider != null && this.dtEarlyStopDecider.canStop()) {\n masterParams.setHalt(true);\n LOG.info(\"String_Node_Str\", context.getCurrentIteration());\n } else {\n masterParams.setFirstTree(this.trees.size() == 1);\n treeNode.setFeatures(null);\n TreeNode newRootNode = new TreeNode(this.trees.size(), new Node(Node.ROOT_INDEX), this.learningRate);\n LOG.info(\"String_Node_Str\", this.trees.size());\n this.trees.add(newRootNode);\n newRootNode.setFeatures(getSubsamplingFeatures(this.featureSubsetStrategy, this.featureSubsetRate));\n todoNodes.put(0, newRootNode);\n masterParams.setTodoNodes(todoNodes);\n masterParams.setSwitchToNextTree(true);\n }\n } else {\n masterParams.setHalt(true);\n LOG.info(\"String_Node_Str\", context.getCurrentIteration());\n }\n } else {\n int nodeIndexInGroup = 0;\n long currMem = 0L;\n List<Integer> depthList = new ArrayList<Integer>();\n if (this.isGBDT) {\n depthList.add(-1);\n }\n if (isRF) {\n for (int i = 0; i < this.trees.size(); i++) {\n depthList.add(-1);\n }\n }\n while (!toDoQueue.isEmpty() && currMem <= this.maxStatsMemory) {\n TreeNode node = this.toDoQueue.poll();\n int treeId = node.getTreeId();\n int oldDepth = this.isGBDT ? depthList.get(0) : depthList.get(treeId);\n int currDepth = Node.indexToLevel(node.getNode().getId());\n if (currDepth > oldDepth) {\n if (this.isGBDT) {\n depthList.set(0, currDepth);\n } else {\n depthList.set(treeId, currDepth);\n }\n }\n List<Integer> subsetFeatures = getSubsamplingFeatures(this.featureSubsetStrategy, this.featureSubsetRate);\n node.setFeatures(subsetFeatures);\n currMem += getStatsMem(subsetFeatures);\n todoNodes.put(nodeIndexInGroup, node);\n nodeIndexInGroup += 1;\n }\n masterParams.setTreeDepth(depthList);\n masterParams.setTodoNodes(todoNodes);\n masterParams.setSwitchToNextTree(false);\n masterParams.setContinuousRunningStart(false);\n masterParams.setFirstTree(this.trees.size() == 1);\n LOG.info(\"String_Node_Str\", todoNodes.size());\n }\n if (this.isGBDT) {\n if (masterParams.isSwitchToNextTree()) {\n masterParams.setTrees(trees.subList(trees.size() - 2, trees.size()));\n } else {\n masterParams.setTrees(trees.subList(trees.size() - 1, trees.size()));\n }\n }\n if (this.isRF) {\n if (masterParams.getTreeDepth().size() == this.trees.size()) {\n List<TreeNode> todoTrees = new ArrayList<TreeNode>();\n for (int i = 0; i < trees.size(); i++) {\n if (masterParams.getTreeDepth().get(i) >= 0) {\n todoTrees.add(trees.get(i));\n } else {\n todoTrees.add(new TreeNode(i, new Node(Node.INVALID_INDEX), 1d));\n }\n }\n masterParams.setTrees(todoTrees);\n } else {\n masterParams.setTrees(trees);\n }\n }\n if (this.isGBDT) {\n masterParams.setTmpTrees(this.trees);\n }\n doCheckPoint(context, masterParams);\n LOG.info(\"String_Node_Str\", weightedTrainCount, weightedValidationCount, trainError, validationError);\n return masterParams;\n}\n"
|
"private void setHeapSizeAndSplitSize(final List<String> args) {\n if (this.isDebug()) {\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, GuaguaMapReduceConstants.MAPRED_CHILD_JAVA_OPTS, \"String_Node_Str\"));\n } else {\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, GuaguaMapReduceConstants.MAPRED_CHILD_JAVA_OPTS, \"String_Node_Str\"));\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\"));\n }\n if (super.modelConfig.getNormalize().getIsParquet()) {\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, GuaguaConstants.GUAGUA_SPLIT_COMBINABLE, Environment.getProperty(GuaguaConstants.GUAGUA_SPLIT_COMBINABLE, \"String_Node_Str\")));\n } else {\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, GuaguaConstants.GUAGUA_SPLIT_COMBINABLE, Environment.getProperty(GuaguaConstants.GUAGUA_SPLIT_COMBINABLE, \"String_Node_Str\")));\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, GuaguaConstants.GUAGUA_SPLIT_MAX_COMBINED_SPLIT_SIZE, Environment.getProperty(GuaguaConstants.GUAGUA_SPLIT_MAX_COMBINED_SPLIT_SIZE, \"String_Node_Str\")));\n }\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, GuaguaConstants.GUAGUA_MIN_WORKERS_RATIO, 0.97));\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, GuaguaConstants.GUAGUA_MIN_WORKERS_TIMEOUT, 2 * 1000L));\n}\n"
|
"protected void parseRenderOptions() throws Exception {\n assert (mode.equalsIgnoreCase(\"String_Node_Str\"));\n if (results.hasOption('f')) {\n format = results.getOptionValue('f');\n }\n if (results.hasOption('t')) {\n htmlType = results.getOptionValue('t');\n }\n if (results.hasOption('o')) {\n targetFile = results.getOptionValue('o');\n }\n if (results.hasOption('l')) {\n locale = results.getOptionValue('l');\n }\n if (results.hasOption('e')) {\n encoding = results.getOptionValue('e');\n }\n if (results.hasOption('p')) {\n paramPageNumber = results.getOptionValue('p');\n }\n if (paramPageNumber != null) {\n try {\n pageNumber = Long.parseLong(paramPageNumber);\n } catch (NumberFormatException nfe) {\n logger.log(Level.SEVERE, \"String_Node_Str\" + paramPageNumber + \"String_Node_Str\");\n }\n }\n parseParameterOptions();\n}\n"
|
"public static byte[] scrypt(byte[] passwd, byte[] salt, int N, int r, int p, int dkLen, SCryptProgress progressTracker) throws GeneralSecurityException, InterruptedException {\n if (N == 0 || (N & (N - 1)) != 0)\n throw new IllegalArgumentException(\"String_Node_Str\");\n if (N > MAX_VALUE / 128 / r)\n throw new IllegalArgumentException(\"String_Node_Str\");\n if (r > MAX_VALUE / 128 / p)\n throw new IllegalArgumentException(\"String_Node_Str\");\n Mac mac = Mac.getInstance(\"String_Node_Str\");\n mac.init(new SecretKeySpec(passwd, \"String_Node_Str\"));\n byte[] DK = new byte[dkLen];\n byte[] B = new byte[128 * r * p];\n byte[] XY = new byte[256 * r];\n byte[][] V = new byte[N][];\n for (int i = 0; i < N; i++) {\n V[i] = new byte[128 * r];\n }\n int i;\n PBKDF.pbkdf2(mac, salt, 1, B, p * 128 * r);\n for (i = 0; i < p; i++) {\n smix(B, i * 128 * r, r, N, V, XY, progressTracker);\n if (progressTracker != null) {\n progressTracker.setProgressP(i + 1);\n }\n }\n PBKDF.pbkdf2(mac, B, 1, DK, dkLen);\n return DK;\n}\n"
|
"public String mapRbdDevice(KVMPhysicalDisk disk) {\n KVMStoragePool pool = disk.getPool();\n String[] splitPoolImage = disk.getPath().split(\"String_Node_Str\");\n String device = Script.runSimpleBashScript(\"String_Node_Str\" + splitPoolImage[0] + \"String_Node_Str\" + splitPoolImage[1] + \"String_Node_Str\");\n if (device == null) {\n Script.runSimpleBashScript(\"String_Node_Str\" + disk.getPath() + \"String_Node_Str\" + pool.getAuthUserName());\n device = Script.runSimpleBashScript(\"String_Node_Str\" + splitPoolImage[0] + \"String_Node_Str\" + splitPoolImage[1] + \"String_Node_Str\");\n }\n return device;\n}\n"
|
"protected IWizard createWizard() {\n RepositoryNode dbRootNode = RepositoryNodeHelper.getDBConnectionRootNode();\n HadoopClusterConnectionItem hcConnectionItem = HCRepositoryUtil.getHCConnectionItemFromRepositoryNode(node);\n Map<String, String> initMap = new HashMap<String, String>();\n initConnectionParameters(initMap, hcConnectionItem);\n return new DatabaseWizard(PlatformUI.getWorkbench(), true, dbRootNode, getExistingNames(), initMap);\n}\n"
|
"void bindViewHolder(int rowPosition, RowViewHolder holder) {\n final int start = getFirstRowPosition(rowPosition);\n final int startType = mChooserListAdapter.getPositionTargetType(start);\n int end = start + mColumnCount - 1;\n while (mChooserListAdapter.getPositionTargetType(end) != startType && end >= start) {\n end--;\n }\n if (startType == ChooserListAdapter.TARGET_SERVICE) {\n holder.row.setBackgroundColor(getColor(R.color.chooser_service_row_background_color));\n } else {\n holder.row.setBackgroundColor(Color.TRANSPARENT);\n }\n final int oldHeight = holder.row.getLayoutParams().height;\n holder.row.getLayoutParams().height = Math.max(1, (int) (holder.measuredRowHeight * getRowScale(rowPosition)));\n if (holder.row.getLayoutParams().height != oldHeight) {\n holder.row.requestLayout();\n }\n for (int i = 0; i < mColumnCount; i++) {\n final View v = holder.cells[i];\n if (start + i <= end) {\n v.setVisibility(View.VISIBLE);\n holder.itemIndices[i] = start + i;\n mChooserListAdapter.bindView(holder.itemIndices[i], v);\n } else {\n v.setVisibility(View.GONE);\n }\n }\n}\n"
|
"public void testEqualNull() throws Exception {\n FilterDescriptor idFilter = new FilterDescriptor(FilterCondition.AND, \"String_Node_Str\", FilterOperator.EQUAL, null);\n ParamExpression paramExpression = MybatisQueryProvider.getWhereExpression(ProductView.class, idFilter);\n Map<String, Object> queryParams = new HashMap<>();\n queryParams.putAll(paramExpression.getParamMap());\n queryParams.put(\"String_Node_Str\", paramExpression.getExpression());\n ProductView productView = northwindDao.getProductViewsByDynamic(queryParams).stream().findFirst().orElse(null);\n assertEquals(null, productView);\n}\n"
|
"public void changeBackground() {\n if (check) {\n setBackgroundResource(R.drawable.background_checkbox_check);\n LayerDrawable layer = (LayerDrawable) getBackground();\n GradientDrawable shape = (GradientDrawable) layer.findDrawableByLayerId(R.id.shape_bacground);\n shape.setColor(backgroundColor);\n } else {\n if (!isInEditMode()) {\n setBackgroundResource(R.drawable.background_checkbox_uncheck);\n }\n }\n}\n"
|
"public void createReceivers() throws IllegalActionException {\n if (!isOpaque()) {\n String message = \"String_Node_Str\";\n message += \"String_Node_Str\";\n throw new IllegalActionException(this, message);\n }\n int portWidth = getWidth();\n if (portWidth <= 0)\n return;\n if (_localReceiversTable == null) {\n _localReceiversTable = new Hashtable();\n }\n Enumeration relations = linkedRelations();\n while (relations.hasMoreElements()) {\n IORelation relation = (IORelation) relations.nextElement();\n boolean insideLink = isInsideLinked(relation);\n int width = relation.getWidth();\n Receiver[][] result = null;\n if (_localReceiversTable.containsKey(relation)) {\n result = (Receiver[][]) _localReceiversTable.get(relation);\n }\n if ((result == null) || (result.length != width)) {\n result = new Receiver[width][1];\n if (insideLink) {\n for (int i = 0; i < width; i++) {\n result[i][0] = _newInsideReceiver();\n }\n } else {\n for (int i = 0; i < width; i++) {\n result[i][0] = _newReceiver();\n }\n }\n _localReceiversTable.put(relation, result);\n }\n }\n}\n"
|
"public static List<Object[]> data() {\n return Arrays.asList(new Object[][] { { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new AnnotationImpl(13, 8))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new AnnotationImpl(0, 4))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList(((Annotation) new AnnotationImpl(0, 4)), (Annotation) new AnnotationImpl(13, 8))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new DisambiguatedAnnotation(13, 8, \"String_Node_Str\"))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new ScoredDisambigAnnotation(13, 8, \"String_Node_Str\", 0.87))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new AnnotationImpl(3, 4), (Annotation) new ScoredDisambigAnnotation(19, 8, \"String_Node_Str\", 0.87))) } });\n}\n"
|
"public StackObject createCopyOnStack(Game game, Ability source, UUID newControllerId, boolean chooseNewTargets) {\n Ability newAbility = this.copy();\n newAbility.newId();\n StackAbility newStackAbility = new StackAbility(newAbility, newControllerId);\n game.getStack().push(newStackAbility);\n if (chooseNewTargets && newAbility.getTargets().size() > 0) {\n Player controller = game.getPlayer(newControllerId);\n Outcome outcome = newAbility.getEffects().isEmpty() ? Outcome.Detriment : newAbility.getEffects().get(0).getOutcome();\n if (controller.chooseUse(outcome, \"String_Node_Str\", source, game)) {\n newAbility.getTargets().clearChosen();\n newAbility.getTargets().chooseTargets(newAbility.getEffects().get(0).getOutcome(), newControllerId, newAbility, false, game);\n }\n }\n game.fireEvent(new GameEvent(GameEvent.EventType.COPIED_STACKOBJECT, newStackAbility.getId(), this.getId(), newControllerId));\n return newStackAbility;\n}\n"
|
"public boolean isFull() {\n if (bitset.cardinality() * 2 + 1 >= getBitSetSize())\n return true;\n return false;\n}\n"
|
"public boolean hasService(ServiceConfiguration config) {\n return this.services.containsKey(config);\n}\n"
|
"private static DownloadState convertState(DownloadStatus status) {\n switch(status) {\n case SAVING:\n case HASHING:\n if (getTotalSize() > finishingThreshold) {\n return DownloadState.FINISHING;\n } else {\n return DownloadState.DONE;\n }\n case DOWNLOADING:\n case FETCHING:\n case IDENTIFY_CORRUPTION:\n return DownloadState.DOWNLOADING;\n case CONNECTING:\n case RESUMING:\n case INITIALIZING:\n case WAITING_FOR_GNET_RESULTS:\n case QUERYING_DHT:\n case BUSY:\n case WAITING_FOR_CONNECTIONS:\n case ITERATIVE_GUESSING:\n return DownloadState.CONNECTING;\n case COMPLETE:\n return DownloadState.DONE;\n case REMOTE_QUEUED:\n return DownloadState.REMOTE_QUEUED;\n case QUEUED:\n return DownloadState.LOCAL_QUEUED;\n case PAUSED:\n return DownloadState.PAUSED;\n case WAITING_FOR_USER:\n case GAVE_UP:\n return DownloadState.STALLED;\n case ABORTED:\n return DownloadState.CANCELLED;\n case DISK_PROBLEM:\n case CORRUPT_FILE:\n case RECOVERY_FAILED:\n case INVALID:\n return DownloadState.ERROR;\n default:\n return DownloadState.DOWNLOADING;\n }\n}\n"
|
"public static String[] getCustormPatternCategorys() {\n return customCategories;\n}\n"
|
"public void runPrintReads(String input, String output, String ref, String table, String region) throws InterruptedException {\n String[] command = { mem, \"String_Node_Str\", gatk, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", ref, \"String_Node_Str\", input, \"String_Node_Str\", output, \"String_Node_Str\", table, \"String_Node_Str\", region };\n String customArgs = HalvadeConf.getCustomArgs(context.getConfiguration(), \"String_Node_Str\", \"String_Node_Str\");\n long estimatedTime = runProcessAndWait(\"String_Node_Str\", AddCustomArguments(command, customArgs));\n if (context != null)\n context.getCounter(HalvadeCounters.TIME_GATK_PRINT_READS).increment(estimatedTime);\n}\n"
|
"public static boolean save(List<AutoConversionType> beanList, File file) throws Exception {\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n OutputStreamWriter output = null;\n try {\n DocumentBuilder builder = factory.newDocumentBuilder();\n builder.setErrorHandler(new ErrorHandler() {\n public void error(final SAXParseException exception) throws SAXException {\n throw exception;\n }\n public void fatalError(final SAXParseException exception) throws SAXException {\n throw exception;\n }\n public void warning(final SAXParseException exception) throws SAXException {\n throw exception;\n }\n });\n Document document = builder.newDocument();\n Element root = document.createElement(\"String_Node_Str\");\n document.appendChild(root);\n for (int i = 0; i < beans.size(); i++) {\n AutoConversionType bean = beans.get(i);\n Element typeNode = document.createElement(\"String_Node_Str\");\n typeNode.setAttribute(\"String_Node_Str\", bean.getSourceDataType());\n typeNode.setAttribute(\"String_Node_Str\", bean.getTargetDataType());\n typeNode.setAttribute(\"String_Node_Str\", bean.getConversionFunction());\n root.appendChild(typeNode);\n }\n if (document != null) {\n XMLSerializer serializer = new XMLSerializer();\n OutputFormat outputFormat = new OutputFormat();\n outputFormat.setIndenting(true);\n serializer.setOutputFormat(outputFormat);\n output = new OutputStreamWriter(new FileOutputStream(file));\n serializer.setOutputCharStream(output);\n serializer.serialize(document);\n }\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } finally {\n if (output != null) {\n output.close();\n }\n }\n return true;\n}\n"
|
"private void createActions() {\n IActionBars actionBars = getViewSite().getActionBars();\n IToolBarManager toolbarManager = actionBars.getToolBarManager();\n addPrimitiveShapes = new DropdownAction(\"String_Node_Str\");\n addComplexShapes = new DropdownAction(\"String_Node_Str\");\n Action addSphere = new ActionAddShape(this, ShapeType.Sphere);\n addPrimitiveShapes.addAction(addSphere);\n Action addCube = new ActionAddShape(this, ICEShapeType.Cube);\n addPrimitiveShapes.addAction(addCube);\n Action addCylinder = new ActionAddShape(this, ICEShapeType.Cylinder);\n addPrimitiveShapes.addAction(addCylinder);\n Action addTube = new ActionAddShape(this, ICEShapeType.Tube);\n addPrimitiveShapes.addAction(addTube);\n Action addUnion = new ActionAddShape(this, ICEOperatorType.Union);\n addComplexShapes.addAction(addUnion);\n Action addIntersection = new ActionAddShape(this, ICEOperatorType.Intersection);\n addIntersection.setEnabled(false);\n addComplexShapes.addAction(addIntersection);\n Action addComplement = new ActionAddShape(this, ICEOperatorType.Complement);\n addComplement.setEnabled(false);\n addComplexShapes.addAction(addComplement);\n duplicateShapes = new ActionDuplicateShape(this);\n replicateShapes = new ActionReplicateShape(this);\n deleteShape = new ActionDeleteShape(this);\n toolbarManager.add(addPrimitiveShapes);\n toolbarManager.add(addComplexShapes);\n toolbarManager.add(duplicateShapes);\n toolbarManager.add(replicateShapes);\n toolbarManager.add(deleteShape);\n}\n"
|
"public boolean equals(Object o) {\n if (o instanceof TimeBatch) {\n return ((TimeBatch) o).getTimeOut() == timeOut && super.equals(o);\n }\n return super.equals(o);\n}\n"
|
"private void createAggregateSection(Composite composite) {\n new Label(composite, SWT.NONE).setText(FUNCTION);\n cmbFunction = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.horizontalSpan = 3;\n cmbFunction.setLayoutData(gd);\n cmbFunction.setVisibleItemCount(30);\n cmbFunction.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n handleFunctionSelectEvent();\n modifyDialogContent();\n validate();\n }\n });\n paramsComposite = new Composite(composite, SWT.NONE);\n GridData gridData = new GridData(GridData.FILL_HORIZONTAL);\n gridData.horizontalSpan = 4;\n gridData.exclude = true;\n paramsComposite.setLayoutData(gridData);\n GridLayout layout = new GridLayout();\n layout.marginWidth = layout.marginHeight = 0;\n layout.numColumns = 4;\n Layout parentLayout = paramsComposite.getParent().getLayout();\n if (parentLayout instanceof GridLayout)\n layout.horizontalSpacing = ((GridLayout) parentLayout).horizontalSpacing;\n paramsComposite.setLayout(layout);\n new Label(composite, SWT.NONE).setText(FILTER_CONDITION);\n txtFilter = new Text(composite, SWT.BORDER);\n gridData = new GridData(GridData.FILL_HORIZONTAL);\n gridData.horizontalSpan = 2;\n txtFilter.setLayoutData(gridData);\n txtFilter.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n modifyDialogContent();\n }\n });\n createExpressionButton(composite, txtFilter);\n {\n Label lblAggOn = new Label(composite, SWT.NONE);\n lblAggOn.setText(AGGREGATE_ON);\n gridData = new GridData();\n gridData.verticalAlignment = GridData.BEGINNING;\n lblAggOn.setLayoutData(gridData);\n cmbAggOn = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);\n gridData = new GridData(GridData.FILL_HORIZONTAL);\n gridData.horizontalSpan = 3;\n cmbAggOn.setLayoutData(gridData);\n cmbAggOn.setVisibleItemCount(30);\n cmbAggOn.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n modifyDialogContent();\n }\n });\n }\n}\n"
|
"protected boolean isFragPrimaryKey(XPathFragment frag, XMLDirectMapping mapping) {\n if (true) {\n return false;\n }\n Vector<String> pkFieldNames = mapping.getDescriptor().getPrimaryKeyFieldNames();\n if (pkFieldNames != null) {\n if (frag.isAttribute()) {\n return pkFieldNames.contains(ATTRIBUTE + frag.getLocalName());\n }\n return pkFieldNames.contains(frag.getLocalName() + SLASH + TEXT);\n }\n return false;\n}\n"
|
"public static void main(String[] args) {\n String filename = \"String_Node_Str\";\n MazeData data = new MazeData(filename);\n data.print();\n int blockSide = 8;\n int sceneHeight = data.N() * blockSide;\n int sceneWidth = data.M() * blockSide;\n EventQueue.invokeLater(() -> {\n AlgoFrame frame = new AlgoFrame(\"String_Node_Str\", sceneWidth, sceneHeight);\n AlgoVisualizer vis = new AlgoVisualizer(frame, data);\n new Thread(() -> {\n vis.run();\n }).start();\n });\n}\n"
|
"private void _importFMU() {\n try {\n Class basicGraphFrameClass = null;\n try {\n basicGraphFrameClass = Class.forName(\"String_Node_Str\");\n } catch (Throwable throwable) {\n throw new InternalErrorException(null, throwable, \"String_Node_Str\");\n }\n if (basicGraphFrameClass == null) {\n throw new InternalErrorException(null, null, \"String_Node_Str\");\n } else if (!basicGraphFrameClass.isInstance(_frame)) {\n throw new InternalErrorException(\"String_Node_Str\" + _frame + \"String_Node_Str\");\n } else {\n BasicGraphFrame basicGraphFrame = (BasicGraphFrame) _frame;\n Query query = new Query();\n query.setTextWidth(60);\n query.addFileChooser(\"String_Node_Str\", \"String_Node_Str\", _lastLocation, null, basicGraphFrame.getLastDirectory(), true, false, PtolemyQuery.preferredBackgroundColor(_frame), PtolemyQuery.preferredForegroundColor(_frame));\n ComponentDialog dialog = new ComponentDialog(_frame, \"String_Node_Str\", query);\n if (dialog.buttonPressed().equals(\"String_Node_Str\")) {\n _lastLocation = query.getStringValue(\"String_Node_Str\");\n GraphController controller = basicGraphFrame.getJGraph().getGraphPane().getGraphController();\n AbstractBasicGraphModel model = (AbstractBasicGraphModel) controller.getGraphModel();\n NamedObj context = model.getPtolemyModel();\n Rectangle2D bounds = basicGraphFrame.getVisibleCanvasRectangle();\n double x = bounds.getWidth() / 2.0;\n double y = bounds.getHeight() / 2.0;\n String fmuFileName = null;\n fmuFileName = _lastLocation;\n if (fmuFileName.equals(_fmuFileName)) {\n return;\n }\n _fmuFileName = fmuFileName;\n long modificationTime = new File(fmuFileName).lastModified();\n if (_fmuFileModificationTime == modificationTime) {\n return;\n }\n _fmuFileModificationTime = modificationTime;\n FMUImport.importFMU(this, fmuFileName, context, x, y);\n }\n }\n } catch (Exception ex) {\n MessageHandler.error(\"String_Node_Str\", ex);\n }\n}\n"
|
"protected Object readObject() throws IOException {\n short fieldCount = randomAccessFile.readShort();\n if (fieldCount == NULL_VALUE) {\n return null;\n }\n Object[] objects = new Object[fieldCount];\n for (int i = 0; i < objects.length; i++) {\n if (i < fieldReaders.length && fieldReaders[i].getDataType() != fieldWriters[i].getDataType())\n fieldReaders[i].setDataType(fieldWriters[i].getDataType());\n if (i >= fieldReaders.length) {\n objects[i] = fieldReaders[fieldReaders.length - 1].read(randomAccessFile);\n } else {\n objects[i] = fieldReaders[i].read(randomAccessFile);\n }\n }\n return creator.createInstance(objects);\n}\n"
|
"public String sketchPath(String where) {\n if (sketchPath == null) {\n return where;\n }\n try {\n if (new File(where).isAbsolute())\n return where;\n } catch (Exception e) {\n }\n return activity.getFileStreamPath(where).getAbsolutePath();\n}\n"
|
"private static void setDateColumn(ReaderTag tag, String colName, String date) {\n if (tag == null) {\n return;\n }\n String[] args = { tag.getTagName(), Integer.toString(tag.tagType.toInt()) };\n boolean rowExists = SqlUtils.boolForQuery(ReaderDatabase.getReadableDb(), \"String_Node_Str\", args);\n final String sql;\n if (rowExists) {\n sql = \"String_Node_Str\" + colName + \"String_Node_Str\";\n } else {\n sql = \"String_Node_Str\" + colName + \"String_Node_Str\";\n }\n SQLiteStatement stmt = ReaderDatabase.getWritableDb().compileStatement(sql);\n try {\n stmt.bindString(1, date);\n stmt.bindString(2, tag.getTagName());\n stmt.bindLong(3, tag.tagType.toInt());\n stmt.execute();\n } finally {\n SqlUtils.closeStatement(stmt);\n }\n}\n"
|
"public static boolean columnFamilyExist(String columnfamilyName, String keyspaceName) {\n try {\n client.set_keyspace(keyspaceName);\n client.system_add_column_family(new CfDef(keyspaceName, columnfamilyName));\n } catch (InvalidRequestException irex) {\n StringBuilder builder = new StringBuilder(\"String_Node_Str\");\n if (irex.getWhy() != null && irex.getWhy().contains(builder.toString())) {\n return true;\n }\n return false;\n } catch (SchemaDisagreementException e) {\n return false;\n } catch (TException e) {\n return false;\n }\n return true;\n}\n"
|
"public Iterable<FileStatus> getDeletableFiles(Iterable<FileStatus> files) {\n if (conf == null) {\n return files;\n }\n if (checkForFullyBackedUpTables) {\n if (connection == null) {\n return files;\n try (BackupSystemTable tbl = new BackupSystemTable(connection)) {\n fullyBackedUpTables = tbl.getTablesForBackupType(BackupType.FULL);\n } catch (IOException ioe) {\n LOG.error(\"String_Node_Str\", ioe);\n return Collections.emptyList();\n }\n Collections.sort(fullyBackedUpTables);\n }\n final Set<String> hfileRefs;\n try {\n hfileRefs = loadHFileRefs(fullyBackedUpTables);\n } catch (IOException ioe) {\n LOG.error(\"String_Node_Str\", ioe);\n return Collections.emptyList();\n }\n Iterable<FileStatus> deletables = Iterables.filter(files, new Predicate<FileStatus>() {\n public boolean apply(FileStatus file) {\n if (file.getModificationTime() > secondPrevReadFromBackupTbl) {\n return false;\n }\n String hfile = file.getPath().getName();\n boolean foundHFileRef = hfileRefs.contains(hfile);\n return !foundHFileRef;\n }\n });\n return deletables;\n}\n"
|
"public void setup() throws Exception {\n this.videoOutDevice = (VideoOutBMIDevice) BMIDeviceHelper.getDevice(slotId);\n}\n"
|
"public void listen() {\n String threadName = Thread.currentThread().getName();\n try {\n while (!stop) {\n Socket s = serverSocket.accept();\n if (!allow(s)) {\n trace(\"String_Node_Str\");\n s.close();\n } else {\n PgServerThread c = new PgServerThread(s, this);\n running.add(c);\n c.setProcessId(running.size());\n Thread thread = new Thread(c, threadName + \"String_Node_Str\");\n thread.setDaemon(isDaemon);\n thread.setName(threadName + \"String_Node_Str\");\n c.setThread(thread);\n thread.start();\n }\n }\n } catch (Exception e) {\n if (!stop) {\n e.printStackTrace();\n }\n }\n}\n"
|
"public void createDataPreviewTableFromDataMatrix(List<? extends List<String>> dataMatrix) {\n if (dataMatrix == null || dataMatrix.isEmpty())\n return;\n columnSelectionStatus = new ArrayList<>(numColumns);\n for (int i = 0; i < numColumns; i++) {\n columnSelectionStatus.add(true);\n }\n bodyDataProvider = new BodyDataProvider(dataMatrix, numTableColumns);\n buildTable(bodyDataProvider, new ColumnHeaderDataProvider(numTableColumns), new RowHeaderDataProvider(dataMatrix.size()));\n}\n"
|
"public void update(float elapsedTime) {\n ToolManager.setPointedSpatialLabel(spatialSelector.getSpatialLabel());\n ToolManager.setPointedSpatialEntityId(spatialSelector.getEntityId());\n Point2D coord = spatialSelector.getCoord(view.editorRend.gridNode);\n if (coord != null && ModelManager.battlefieldReady && ModelManager.getBattlefield().getMap().isInBounds(coord)) {\n ToolManager.updatePencilsPos(coord);\n view.editorRend.drawPencil();\n }\n guiController.update();\n}\n"
|
"void bindVisibleTaskViews(float targetStackScroll, boolean ignoreTaskOverrides) {\n ArrayList<Task> tasks = mStack.getStackTasks();\n int[] visibleTaskRange = computeVisibleTaskTransforms(mCurrentTaskTransforms, tasks, mStackScroller.getStackScroll(), targetStackScroll, mIgnoreTasks, ignoreTaskOverrides);\n mTmpTaskViewMap.clear();\n List<TaskView> taskViews = getTaskViews();\n int lastFocusedTaskIndex = -1;\n int taskViewCount = taskViews.size();\n for (int i = taskViewCount - 1; i >= 0; i--) {\n TaskView tv = taskViews.get(i);\n Task task = tv.getTask();\n if (mIgnoreTasks.contains(task.key)) {\n continue;\n }\n int taskIndex = mStack.indexOfStackTask(task);\n TaskViewTransform transform = null;\n if (taskIndex != -1) {\n transform = mCurrentTaskTransforms.get(taskIndex);\n }\n if (task.isFreeformTask() || (transform != null && transform.visible)) {\n mTmpTaskViewMap.put(task.key, tv);\n } else {\n if (mTouchExplorationEnabled && Utilities.isDescendentAccessibilityFocused(tv)) {\n lastFocusedTaskIndex = taskIndex;\n resetFocusedTask(task);\n }\n mViewPool.returnViewToPool(tv);\n }\n }\n for (int i = tasks.size() - 1; i >= 0; i--) {\n Task task = tasks.get(i);\n TaskViewTransform transform = mCurrentTaskTransforms.get(i);\n if (mIgnoreTasks.contains(task.key)) {\n continue;\n }\n if (!task.isFreeformTask() && !transform.visible) {\n continue;\n }\n TaskView tv = mTmpTaskViewMap.get(task.key);\n if (tv == null) {\n tv = mViewPool.pickUpViewFromPool(task, task);\n if (task.isFreeformTask()) {\n updateTaskViewToTransform(tv, transform, AnimationProps.IMMEDIATE);\n } else {\n if (transform.rect.top <= mLayoutAlgorithm.mStackRect.top) {\n updateTaskViewToTransform(tv, mLayoutAlgorithm.getBackOfStackTransform(), AnimationProps.IMMEDIATE);\n } else {\n updateTaskViewToTransform(tv, mLayoutAlgorithm.getFrontOfStackTransform(), AnimationProps.IMMEDIATE);\n }\n }\n } else {\n final int taskIndex = mStack.indexOfStackTask(task);\n final int insertIndex = findTaskViewInsertIndex(task, taskIndex);\n if (insertIndex != getTaskViews().indexOf(tv)) {\n detachViewFromParent(tv);\n attachViewToParent(tv, insertIndex, tv.getLayoutParams());\n updateTaskViewsList();\n }\n }\n }\n if (lastFocusedTaskIndex != -1) {\n if (lastFocusedTaskIndex < visibleTaskRange[1]) {\n setFocusedTask(visibleTaskRange[1], false, true);\n } else {\n setFocusedTask(visibleTaskRange[0], false, true);\n }\n }\n}\n"
|
"private void updateWeatherView() {\n WeatherInfo weatherInfo = mWeatherInfo;\n if (WeatherSpider.isEmpty(weatherInfo)) {\n return;\n }\n RealTime realTime = weatherInfo.getRealTime();\n AQI aqi = weatherInfo.getAqi();\n Forecast forecast = weatherInfo.getForecast();\n Index index = weatherInfo.getIndex();\n int type = realTime.getAnimation_type();\n mNormalImageView.setImageBitmap(SystemUtils.readBitMap(mActivity, WeatherIconUtils.getRawNromalBg(type)));\n mBlurredImageView.setImageBitmap(SystemUtils.readBitMap(mActivity, WeatherIconUtils.getRawBlurBg(type)));\n mCurWeatherIV.setImageResource(WeatherIconUtils.getWeatherIcon(type));\n mCurWeatherTV.setText(realTime.getWeather_name());\n mCurFeelsTempTV.setText(realTime.getTemp() + \"String_Node_Str\");\n mCurHighTempTV.setText(forecast.getTmpHigh(1) + \"String_Node_Str\");\n mCurLowTempTV.setText(forecast.getTmpLow(1) + \"String_Node_Str\");\n mCurWeatherCopyTV.setText(TimeUtils.getDay(realTime.getPub_time()) + \"String_Node_Str\");\n mWeatherAdapter.setWeather(realTime, aqi, forecast, index);\n}\n"
|
"public int fill(int idx, ReactantStack incoming, boolean doFill) {\n if (incoming == null) {\n return 0;\n }\n if (!canAddToStack(idx, reactantName)) {\n return 0;\n }\n int amtToAdd = Math.min(amount, getRemainingSpace());\n if (amtToAdd <= 0) {\n return 0;\n }\n if (!doFill) {\n return amtToAdd;\n }\n if (tanks[idx] == null) {\n tanks[idx] = new ReactantStack(reactantName, amtToAdd);\n } else {\n tanks[idx].amount += amtToAdd;\n }\n return amtToAdd;\n}\n"
|
"private static void formatPosition(int pos1, Atom[] ca, int len, StringWriter header1, StringWriter header2) {\n int linePos = len % LINELENGTH;\n if (header1.getBuffer().length() < linePos) {\n for (int i = header1.getBuffer().length(); i < linePos; i++) {\n header1.append(\"String_Node_Str\");\n }\n }\n Atom a = ca[pos1];\n Group g = a.getGroup();\n ResidueNumber residueNumber = g.getResidueNumber();\n pos1 = residueNumber.getSeqNum();\n boolean hasInsertionCode = false;\n if (residueNumber.getInsCode() != null) {\n hasInsertionCode = true;\n }\n if ((pos1 % 10 == 0) && (!hasInsertionCode)) {\n CharSequence display = getPDBPos(a);\n boolean ignoreH1 = false;\n if (header1.getBuffer().length() - 1 > linePos) {\n ignoreH1 = true;\n System.err.println(\"String_Node_Str\" + len + \"String_Node_Str\" + header1.getBuffer().length() + \"String_Node_Str\" + linePos + \"String_Node_Str\" + header1.toString() + \"String_Node_Str\");\n }\n if (!ignoreH1) {\n header1.append(String.format(\"String_Node_Str\", display));\n header2.append(\"String_Node_Str\");\n } else {\n header2.append(\"String_Node_Str\");\n }\n } else if (hasInsertionCode) {\n Character insCode = g.getResidueNumber().getInsCode();\n if (insCode != null)\n header2.append(insCode);\n else {\n header2.append(\"String_Node_Str\");\n }\n } else if (((pos1) % 5) == 0 && len > 5) {\n header2.append(\"String_Node_Str\");\n } else {\n if (len > 0)\n header2.append(\"String_Node_Str\");\n }\n}\n"
|
"public int compare(int arg0, int arg1) {\n checkInterrupt();\n Integer order1 = order.get(array[arg0]);\n Integer order2 = order.get(array[arg1]);\n if (order1 == null || order2 == null) {\n String message = \"String_Node_Str\";\n message += order1 == null ? \"String_Node_Str\" + array[arg0] + \"String_Node_Str\" : \"String_Node_Str\";\n message += order2 == null ? \"String_Node_Str\" + array[arg1] + \"String_Node_Str\" : \"String_Node_Str\";\n throw new RuntimeException(message);\n } else {\n return order1.compareTo(order2);\n }\n}\n"
|
"public void backup() throws IOException {\n EmbeddedGraphDatabase graphDb = Util.startGraphDbInstance(STORE_LOCATION_DIR);\n ((NeoStoreXaDataSource) graphDb.getConfig().getPersistenceModule().getPersistenceManager().getPersistenceSource().getXaDataSource()).keepLogicalLogs(true);\n System.out.println(\"String_Node_Str\");\n tryBackup(neo, BACKUP_LOCATION_DIR, 1);\n Transaction tx = neo.beginTx();\n try {\n addNode(neo);\n tx.success();\n } finally {\n tx.finish();\n }\n System.out.println(\"String_Node_Str\");\n tryBackup(neo, BACKUP_LOCATION_DIR, 2);\n tx = neo.beginTx();\n try {\n addNode(neo);\n tx.success();\n } finally {\n tx.finish();\n }\n System.out.println(\"String_Node_Str\");\n tx = neo.beginTx();\n try {\n addNode(neo);\n System.out.println(\"String_Node_Str\");\n tryBackup(neo, BACKUP_LOCATION_DIR, 3);\n tx.success();\n } finally {\n tx.finish();\n }\n System.out.println(\"String_Node_Str\");\n tryBackup(neo, BACKUP_LOCATION_DIR, 4);\n Util.stopNeo(neo);\n}\n"
|
"public static String getSchemaName(Connection connection) throws SQLException {\n String schema = null;\n try {\n schema = connection.getSchema();\n } catch (Exception | AbstractMethodError e) {\n }\n if (StringUtils.isBlank(schema)) {\n schema = canonicalize(connection, ConfigurationManager.getProperty(\"String_Node_Str\"));\n }\n if (StringUtils.isBlank(schema)) {\n String dbType = getDbType(connection);\n if (dbType.equals(DBMS_POSTGRES)) {\n schema = \"String_Node_Str\";\n } else if (dbType.equals(DBMS_ORACLE)) {\n schema = meta.getUserName();\n } else\n schema = null;\n }\n return schema;\n}\n"
|
"private boolean processDirective(String line) {\n String line2 = line.substring(1);\n if (line2.startsWith(\"String_Node_Str\") || line2.startsWith(\"String_Node_Str\") || line2.startsWith(\"String_Node_Str\")) {\n return false;\n }\n if (line2.equals(\"String_Node_Str\")) {\n if (!areParamsInjected) {\n injectRemainingParams();\n }\n return false;\n }\n if (line2.equals(\"String_Node_Str\")) {\n mOut.append(\"String_Node_Str\").append(currParam++).append(\"String_Node_Str\");\n return false;\n }\n append(line);\n if (line2.equals(\"String_Node_Str\")) {\n return true;\n }\n if (line2.startsWith(\"String_Node_Str\") || line2.equals(\"String_Node_Str\") || line2.startsWith(\"String_Node_Str\") || line2.startsWith(\"String_Node_Str\")) {\n while (true) {\n line2 = nextAndAppend();\n if (line2.startsWith(\"String_Node_Str\")) {\n break;\n }\n }\n }\n return false;\n}\n"
|
"private SyncResult createUser(final SyncDelta delta, final boolean dryRun) throws JobExecutionException {\n final SyncResult result = new SyncResult();\n result.setOperation(Operation.CREATE);\n UserTO userTO = getUserTO(delta.getObject());\n actions.beforeCreate(delta, userTO);\n if (dryRun) {\n result.setUserId(0L);\n result.setUsername(userTO.getUsername());\n result.setStatus(SyncResult.Status.SUCCESS);\n } else {\n try {\n WorkflowResult<Map.Entry<Long, Boolean>> created = wfAdapter.create(userTO, true);\n List<PropagationTask> tasks = propagationManager.getCreateTaskIds(created, userTO.getPassword(), null, ((SyncTask) this.task).getResource().getName());\n propagationManager.execute(tasks);\n userTO = userDataBinder.getUserTO(created.getResult().getKey());\n result.setUserId(created.getResult().getKey());\n result.setUsername(userTO.getUsername());\n result.setStatus(SyncResult.Status.SUCCESS);\n } catch (PropagationException e) {\n LOG.error(\"String_Node_Str\" + delta.getUid().getUidValue(), e);\n } catch (Throwable t) {\n result.setStatus(SyncResult.Status.FAILURE);\n result.setMessage(t.getMessage());\n LOG.error(\"String_Node_Str\" + delta.getUid().getUidValue(), t);\n }\n }\n actions.after(delta, userTO, result);\n return result;\n}\n"
|
"public static Iterator getStyles(ThemeHandle theme, Comparator comparator) {\n List styles = new ArrayList();\n if (theme != null) {\n styles.addAll(theme.getAllStyles());\n } else {\n ModuleHandle module = SessionHandleAdapter.getInstance().getReportDesignHandle();\n if (module instanceof LibraryHandle) {\n styles = new ArrayList();\n theme = ((LibraryHandle) module).getTheme();\n if (theme != null) {\n styles.addAll(theme.getAllStyles());\n }\n }\n }\n Object[] stylesArray = styles.toArray(new Object[styles.size()]);\n if (comparator != null) {\n Arrays.sort(stylesArray, comparator);\n }\n return Arrays.asList(stylesArray).iterator();\n}\n"
|
"public ModelConfiguration clone() {\n final ModelConfiguration c = new ModelConfiguration();\n c.input = input;\n c.min = new HashMap<String, Integer>(min);\n c.max = new HashMap<String, Integer>(max);\n c.config = config.clone();\n c.hierarchies = new HashMap<String, Hierarchy>(hierarchies);\n if (this.containsCriterion(DPresence.class)) {\n c.researchSubset = this.getCriterion(DPresence.class).getSubset().getSet();\n } else if (this.containsCriterion(KMap.class) && this.getCriterion(KMap.class).isAccurate()) {\n c.researchSubset = this.getCriterion(KMap.class).getSubset().getSet();\n } else {\n c.researchSubset = this.researchSubset.clone();\n }\n c.suppressionWeight = this.suppressionWeight;\n c.microAggregationFunctions = new HashMap<String, MicroAggregationFunctionDescription>(microAggregationFunctions);\n c.microAggregationIgnoreMissingData = new HashMap<String, Boolean>(microAggregationIgnoreMissingData);\n c.transformationModes = new HashMap<String, ModelTransformationMode>(transformationModes);\n return c;\n}\n"
|
"private ILaunchConfiguration saveInput() {\n try {\n if (view.getCurrentConfigFileHandle() != null) {\n ModelEditor modelEditor = ((ModelEditor) ModelHelper.getEditorWithModelOpened(view.getCurrentConfigFileHandle()));\n ILaunchConfigurationWorkingCopy configCopy = null;\n if (modelEditor != null) {\n configCopy = modelEditor.getConfig();\n } else {\n configCopy = view.getCurrentConfigFileHandle().getWorkingCopy();\n }\n configCopy.setAttribute(IModelConfigurationConstants.TRACE_EXPLORE_EXPRESSIONS, FormHelper.getSerializedInput(tableViewer));\n ILaunchConfiguration savedConfig = configCopy.doSave();\n return savedConfig;\n }\n } catch (CoreException e) {\n TLCUIActivator.logError(\"String_Node_Str\", e);\n }\n return null;\n}\n"
|
"public String buildSqlSelect(DbMapComponent component, String outputTableName) {\n queryColumnsName = \"String_Node_Str\";\n aliasAlreadyDeclared.clear();\n List<IConnection> outputConnections = (List<IConnection>) component.getOutgoingConnections();\n Map<String, IConnection> nameToOutputConnection = new HashMap<String, IConnection>();\n for (IConnection connection : outputConnections) {\n nameToOutputConnection.put(connection.getUniqueName(), connection);\n }\n ExternalDbMapData data = (ExternalDbMapData) component.getExternalData();\n StringBuilder sb = new StringBuilder();\n List<ExternalDbMapTable> outputTables = data.getOutputTables();\n int lstOutputTablesSize = outputTables.size();\n ExternalDbMapTable outputTable = null;\n for (int i = 0; i < lstOutputTablesSize; i++) {\n ExternalDbMapTable temp = outputTables.get(i);\n if (outputTableName.equals(temp.getName())) {\n outputTable = temp;\n break;\n }\n }\n if (outputTable != null) {\n IConnection connection = nameToOutputConnection.get(outputTable.getName());\n List<IMetadataColumn> columns = new ArrayList<IMetadataColumn>();\n if (connection != null) {\n IMetadataTable metadataTable = connection.getMetadataTable();\n if (metadataTable != null) {\n columns.addAll(metadataTable.getListColumns());\n }\n }\n sb.append(\"String_Node_Str\");\n sb.append(DbMapSqlConstants.SELECT);\n sb.append(DbMapSqlConstants.NEW_LINE);\n List<ExternalDbMapEntry> metadataTableEntries = outputTable.getMetadataTableEntries();\n if (metadataTableEntries != null) {\n int lstSizeOutTableEntries = metadataTableEntries.size();\n for (int i = 0; i < lstSizeOutTableEntries; i++) {\n ExternalDbMapEntry dbMapEntry = metadataTableEntries.get(i);\n String expression = dbMapEntry.getExpression();\n expression = initExpression(component, dbMapEntry);\n expression = addQuoteForSpecialChar(expression, component);\n if (i > 0) {\n sb.append(DbMapSqlConstants.COMMA);\n sb.append(DbMapSqlConstants.SPACE);\n queryColumnsName += DbMapSqlConstants.COMMA + DbMapSqlConstants.SPACE;\n }\n if (expression != null && expression.trim().length() > 0) {\n sb.append(expression);\n queryColumnsName += expression;\n } else {\n sb.append(DbMapSqlConstants.LEFT_COMMENT);\n String str = outputTable.getName() + DbMapSqlConstants.DOT + dbMapEntry.getName();\n sb.append(Messages.getString(\"String_Node_Str\", str));\n sb.append(DbMapSqlConstants.RIGHT_COMMENT);\n }\n }\n }\n sb.append(DbMapSqlConstants.NEW_LINE);\n sb.append(DbMapSqlConstants.FROM);\n List<ExternalDbMapTable> inputTables = data.getInputTables();\n boolean explicitJoin = false;\n int lstSizeInputTables = inputTables.size();\n Map<String, ExternalDbMapTable> nameToInputTable = new HashMap<String, ExternalDbMapTable>();\n for (int i = 0; i < lstSizeInputTables; i++) {\n ExternalDbMapTable inputTable = inputTables.get(i);\n nameToInputTable.put(inputTable.getName(), inputTable);\n IJoinType joinType = language.getJoin(inputTable.getJoinType());\n if (!language.unuseWithExplicitJoin().contains(joinType) && i > 0) {\n explicitJoin = true;\n }\n }\n StringBuilder sbWhere = new StringBuilder();\n boolean isFirstClause = true;\n for (int i = 0; i < lstSizeInputTables; i++) {\n ExternalDbMapTable inputTable = inputTables.get(i);\n if (buildConditions(component, sbWhere, inputTable, false, isFirstClause)) {\n isFirstClause = false;\n }\n }\n sb.append(DbMapSqlConstants.NEW_LINE);\n IJoinType previousJoinType = null;\n for (int i = 0; i < lstSizeInputTables; i++) {\n ExternalDbMapTable inputTable = inputTables.get(i);\n IJoinType joinType = null;\n if (i == 0) {\n joinType = AbstractDbLanguage.JOIN.NO_JOIN;\n } else {\n joinType = language.getJoin(inputTable.getJoinType());\n }\n boolean commaCouldBeAdded = !explicitJoin && i > 0;\n boolean crCouldBeAdded = false;\n if (language.unuseWithExplicitJoin().contains(joinType) && !explicitJoin) {\n buildTableDeclaration(component, sb, inputTable, commaCouldBeAdded, crCouldBeAdded, false);\n } else if (!language.unuseWithExplicitJoin().contains(joinType) && explicitJoin) {\n if (i > 0) {\n if (previousJoinType == null) {\n buildTableDeclaration(component, sb, inputTables.get(i - 1), commaCouldBeAdded, crCouldBeAdded, true);\n previousJoinType = joinType;\n } else {\n sb.append(DbMapSqlConstants.NEW_LINE);\n }\n sb.append(DbMapSqlConstants.SPACE);\n }\n String labelJoinType = joinType.getLabel();\n sb.append(labelJoinType);\n sb.append(DbMapSqlConstants.SPACE);\n if (joinType == AbstractDbLanguage.JOIN.CROSS_JOIN) {\n ExternalDbMapTable nextTable = null;\n if (i < lstSizeInputTables) {\n nextTable = inputTables.get(i);\n buildTableDeclaration(component, sb, nextTable, false, false, true);\n }\n } else {\n buildTableDeclaration(component, sb, inputTable, false, false, true);\n sb.append(DbMapSqlConstants.SPACE);\n sb.append(DbMapSqlConstants.ON);\n sb.append(DbMapSqlConstants.LEFT_BRACKET);\n sb.append(DbMapSqlConstants.SPACE);\n if (!buildConditions(component, sb, inputTable, true, true)) {\n sb.append(DbMapSqlConstants.LEFT_COMMENT);\n sb.append(DbMapSqlConstants.SPACE);\n sb.append(Messages.getString(\"String_Node_Str\"));\n sb.append(DbMapSqlConstants.SPACE);\n sb.append(DbMapSqlConstants.RIGHT_COMMENT);\n }\n sb.append(DbMapSqlConstants.SPACE);\n sb.append(DbMapSqlConstants.RIGHT_BRACKET);\n }\n }\n }\n List<String> whereAddition = new ArrayList<String>();\n List<String> byAddition = new ArrayList<String>();\n List<String> containWhereAddition = new ArrayList<String>();\n List<String> originalWhereAddition = new ArrayList<String>();\n if (outputTable != null) {\n List<ExternalDbMapEntry> customConditionsEntries = outputTable.getCustomConditionsEntries();\n if (customConditionsEntries != null) {\n for (ExternalDbMapEntry entry : customConditionsEntries) {\n String exp = entry.getExpression();\n if (exp != null && !DbMapSqlConstants.EMPTY.equals(exp.trim())) {\n if (containWith(exp, DbMapSqlConstants.GROUP_BY_PATTERN, true) || containWith(exp, DbMapSqlConstants.ORDER_BY_PATTERN, true)) {\n byAddition.add(exp);\n } else if (containWith(exp, DbMapSqlConstants.GROUP_BY_PATTERN, false) || containWith(exp, DbMapSqlConstants.ORDER_BY_PATTERN, false)) {\n containWhereAddition.add(exp);\n } else if (containWith(exp, DbMapSqlConstants.OR, true) || containWith(exp, DbMapSqlConstants.AND, true)) {\n originalWhereAddition.add(exp);\n } else {\n whereAddition.add(exp);\n }\n }\n }\n }\n }\n String whereClauses = sbWhere.toString();\n boolean whereFlag = whereClauses.trim().length() > 0;\n boolean whereAddFlag = !whereAddition.isEmpty();\n boolean whereConntainFlag = !containWhereAddition.isEmpty();\n boolean whereOriginalFlag = !originalWhereAddition.isEmpty();\n if (whereFlag || whereAddFlag || whereConntainFlag || whereOriginalFlag) {\n sb.append(DbMapSqlConstants.NEW_LINE);\n sb.append(DbMapSqlConstants.WHERE);\n }\n if (whereFlag) {\n sb.append(whereClauses);\n }\n if (whereAddFlag) {\n for (int i = 0; i < whereAddition.size(); i++) {\n if (i == 0 && whereFlag || i > 0) {\n sb.append(DbMapSqlConstants.NEW_LINE);\n sb.append(DbMapSqlConstants.SPACE);\n sb.append(DbMapSqlConstants.AND);\n }\n sb.append(DbMapSqlConstants.SPACE);\n sb.append(whereAddition.get(i));\n }\n }\n if (whereOriginalFlag) {\n for (String s : originalWhereAddition) {\n sb.append(DbMapSqlConstants.NEW_LINE);\n sb.append(DbMapSqlConstants.SPACE);\n sb.append(s);\n }\n }\n if (whereConntainFlag) {\n for (int i = 0; i < containWhereAddition.size(); i++) {\n if (i == 0 && (whereFlag || whereAddFlag) || i > 0) {\n sb.append(DbMapSqlConstants.NEW_LINE);\n sb.append(DbMapSqlConstants.SPACE);\n sb.append(DbMapSqlConstants.AND);\n }\n sb.append(DbMapSqlConstants.SPACE);\n sb.append(containWhereAddition.get(i));\n }\n }\n if (!byAddition.isEmpty()) {\n sb.append(DbMapSqlConstants.NEW_LINE);\n for (String s : byAddition) {\n sb.append(s);\n sb.append(DbMapSqlConstants.NEW_LINE);\n }\n }\n }\n List<String> contextList = getContextList(component);\n String sqlQuery = sb.toString();\n boolean haveReplace = false;\n for (String context : contextList) {\n if (sqlQuery.contains(context)) {\n sqlQuery = sqlQuery.replace(context, \"String_Node_Str\" + context + \"String_Node_Str\");\n haveReplace = true;\n }\n if (queryColumnsName.contains(context)) {\n queryColumnsName = queryColumnsName.replace(context, \"String_Node_Str\" + context + \"String_Node_Str\");\n }\n }\n if (!haveReplace) {\n List<String> connContextList = getConnectionContextList(component);\n for (String context : connContextList) {\n if (sqlQuery.contains(context)) {\n sqlQuery = sqlQuery.replace(context, \"String_Node_Str\" + context + \"String_Node_Str\");\n }\n if (queryColumnsName.contains(context)) {\n queryColumnsName = queryColumnsName.replace(context, \"String_Node_Str\" + context + \"String_Node_Str\");\n }\n }\n }\n sqlQuery = handleQuery(sqlQuery);\n queryColumnsName = handleQuery(queryColumnsName);\n return sqlQuery;\n}\n"
|
"public Integer apply(DatasetContext<Table> ctx) throws Exception {\n byte[] tillTimeBytes = Bytes.toBytes(tillTime);\n int deletedColumns = 0;\n Scanner scanner = table.scan(ROW_KEY_PREFIX, ROW_KEY_PREFIX_END);\n try {\n Row row;\n while ((row = scanner.next()) != null) {\n byte[] rowKey = row.getRow();\n String namespacedLogDir = LoggingContextHelper.getNamespacedBaseDir(logBaseDir, getLogPartition(rowKey));\n byte[] maxCol = getMaxKey(row.getColumns());\n for (Map.Entry<byte[], byte[]> entry : row.getColumns().entrySet()) {\n byte[] colName = entry.getKey();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\", Bytes.toString(entry.getValue()), Bytes.toLong(colName));\n }\n if (Bytes.compareTo(colName, tillTimeBytes) < 0 && Bytes.compareTo(colName, maxCol) != 0) {\n callback.handle(locationFactory.create(new URI(Bytes.toString(entry.getValue()))), namespacedLogDir);\n ctx.get().delete(rowKey, colName);\n deletedColumns++;\n }\n }\n }\n } finally {\n scanner.close();\n }\n return deletedColumns;\n}\n"
|
"public Trace disableSampling() {\n checkBeforeTraceObject();\n final Trace metricTrace = createMetricTrace();\n threadLocal.set(metricTrace);\n return metricTrace;\n}\n"
|
"private int getLevelSize(DimLevel[] dimLevel) throws DataException {\n if (dimLevel == null || dimLevel.length == 0) {\n return 0;\n }\n int[] dataType = new int[dimLevel.length];\n for (int i = 0; i < dimLevel.length; i++) {\n DimColumn dimColumn = null;\n if (dimLevel[i].getAttrName() == null)\n dimColumn = new DimColumn(dimLevel[i].getDimensionName(), dimLevel[i].getLevelName(), dimLevel[i].getLevelName());\n else\n dimColumn = new DimColumn(dimLevel[i].getDimensionName(), dimLevel[i].getLevelName(), dimLevel[i].getAttrName());\n ColumnInfo columnInfo = (dataSet4Aggregation.getMetaInfo()).getColumnInfo(dimColumn);\n dataType[i] = columnInfo.getDataType();\n }\n return SizeOfUtil.getObjectSize(dataType);\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj)\n return true;\n }\n if (obj == null) {\n return false;\n }\n if (obj instanceof TmfEditorInput) {\n return fResource.equals(((TmfEditorInput) obj).fResource);\n } else if (obj instanceof IFileEditorInput) {\n return ((IFileEditorInput) obj).getFile().equals(fResource);\n } else if (obj instanceof FileStoreEditorInput) {\n return ((FileStoreEditorInput) obj).getURI().equals(fResource.getRawLocationURI());\n }\n return false;\n}\n"
|
"public boolean execute(ScriptEntry theEntry) throws CommandException {\n boolean hurts = false;\n LivingEntity target = null;\n if (theEntry.getPlayer() == null) {\n target = theEntry.getPlayer();\n }\n Integer amount = null;\n hurt = theEntry.getCommand().equalsIgnoreCase(\"String_Node_Str\");\n for (String thisArg : theEntry.arguments()) {\n if (thisArg.toUpperCase().contains(\"String_Node_Str\")) {\n target = theEntry.getDenizen().getEntity();\n aH.echoDebug(\"String_Node_Str\");\n }\n if (thisArg.toUpperCase().contains(\"String_Node_Str\")) {\n amount = aH.getIntegerModifier(thisArg);\n aH.echoDebug(\"String_Node_Str\" + amount);\n }\n }\n if (target != null) {\n if (hurt) {\n if (amount == null)\n amount = 1;\n target.setHealth(target.getHealth() - amount);\n net.citizensnpcs.util.Util.sendPacketNearby(target.getLocation(), new Packet18ArmAnimation(((CraftEntity) target).getHandle(), 2), 64);\n return true;\n } else {\n if (amount == null)\n amount = target.getMaxHealth() - target.getHealth();\n target.setHealth(target.getHealth() + amount);\n net.citizensnpcs.util.Util.sendPacketNearby(target.getLocation(), new Packet18ArmAnimation(((CraftEntity) target).getHandle(), 6), 64);\n return true;\n }\n }\n return false;\n}\n"
|
"public UpdateOperations<T> set(String fieldExpr, Object value) {\n if (value == null)\n throw new QueryException(\"String_Node_Str\");\n Object dbObj = mapr.toMongoObject(value, true);\n add(\"String_Node_Str\", fieldExpr, dbObj);\n return this;\n}\n"
|
"private void updateItem(IMarker marker) {\n try {\n Assert.isTrue(marker.getType().equals(ProverHelper.OBLIGATION_MARKER), \"String_Node_Str\");\n int id = marker.getAttribute(ProverHelper.OBLIGATION_ID, -1);\n if (id != -1) {\n ExpandItem item = (ExpandItem) items.get(new Integer(id));\n if (!ProverHelper.isInterestingObligation(marker)) {\n if (item != null) {\n removeItem(item);\n }\n return;\n }\n if (item == null) {\n item = new ExpandItem(bar, SWT.None, 0);\n Composite oblWidget = new Composite(bar, SWT.LINE_SOLID);\n GridLayout gl = new GridLayout(1, true);\n gl.marginWidth = 0;\n gl.marginHeight = 0;\n oblWidget.setLayout(gl);\n SourceViewer viewer = new SourceViewer(oblWidget, null, SWT.READ_ONLY | SWT.MULTI | SWT.H_SCROLL);\n viewer.getTextWidget().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n viewer.configure(new ObligationSourceViewerConfiguration());\n viewer.getControl().setFont(JFaceResources.getTextFont());\n fontListener.addControl(viewer.getControl());\n viewers.put(item, viewer);\n item.setControl(oblWidget);\n item.setExpanded(true);\n item.setData(marker);\n viewer.getTextWidget().setData(marker);\n oblWidget.setData(marker);\n item.addListener(SWT.MouseDown, listener);\n viewer.getTextWidget().addListener(SWT.MouseDown, listener);\n oblWidget.addListener(SWT.MouseDown, listener);\n items.put(new Integer(id), item);\n }\n String status = marker.getAttribute(ProverHelper.OBLIGATION_STATUS, \"String_Node_Str\");\n String method = marker.getAttribute(ProverHelper.OBLIGATION_METHOD, \"String_Node_Str\");\n item.setText(\"String_Node_Str\" + id + \"String_Node_Str\" + status + \"String_Node_Str\" + method);\n SourceViewer viewer = (SourceViewer) viewers.get(item);\n Assert.isNotNull(viewer, \"String_Node_Str\");\n String oblString = marker.getAttribute(ProverHelper.OBLIGATION_STRING, \"String_Node_Str\");\n if ((viewer.getDocument() == null || !viewer.getDocument().get().equals(oblString)) && !oblString.isEmpty()) {\n viewer.setDocument(new Document(oblString.trim()));\n StyledText text = viewer.getTextWidget();\n ScrollBar hBar = text.getHorizontalBar();\n item.setHeight(text.getLineHeight() * text.getLineCount() + (hBar != null ? hBar.getSize().y : 0));\n } else {\n viewer.setDocument(new Document(\"String_Node_Str\"));\n item.setHeight(100);\n }\n }\n } catch (CoreException e) {\n e.printStackTrace();\n }\n}\n"
|
"public void setApiAccessCheckers(List<APIChecker> apiAccessCheckers) {\n _apiAccessCheckers = apiAccessCheckers;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.