conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
import static com.github.javaparser.ParseStart.CLASS_BODY;
import static com.github.javaparser.Providers.provider;
import static com.github.javaparser.utils.TestUtils.assertProblems;
=======
import static com.github.javaparser.utils.Utils.EOL;
>>>>>>>
import static com.github.javaparser.ParseStart.CLASS_BODY;
import static com.github.javaparser.Providers.provider;
import static com.github.javaparser.utils.TestUtils.assertProblems;
import static com.github.javaparser.utils.Utils.EOL; |
<<<<<<<
import com.github.javaparser.ast.Modifier;
=======
import com.github.javaparser.ast.AccessSpecifier;
import com.github.javaparser.ast.Node;
>>>>>>>
import com.github.javaparser.ast.Modifier;
import com.github.javaparser.ast.Node;
<<<<<<<
.filter(f -> f.declaringType().equals(this) || f.accessSpecifier() != Modifier.Keyword.PRIVATE)
.collect(Collectors.toList());
=======
.filter(f -> f.declaringType().equals(this) || f.accessSpecifier() != AccessSpecifier.PRIVATE)
.collect(Collectors.toList());
>>>>>>>
.filter(f -> f.declaringType().equals(this) || f.accessSpecifier() != Modifier.Keyword.PRIVATE)
.collect(Collectors.toList()); |
<<<<<<<
public Integer visit(final ModuleRequiresStmt n, final Void arg) {
return (n.getModifiers().accept(this, arg)) * 31 + (n.getName().accept(this, arg)) * 31 + (n.getComment().isPresent() ? n.getComment().get().accept(this, arg) : 0);
=======
public Integer visit(final ModuleRequiresDirective n, final Void arg) {
return (n.getModifiers().hashCode()) * 31 + (n.getName().accept(this, arg)) * 31 + (n.getComment().isPresent() ? n.getComment().get().accept(this, arg) : 0);
>>>>>>>
public Integer visit(final ModuleRequiresDirective n, final Void arg) {
return (n.getModifiers().accept(this, arg)) * 31 + (n.getName().accept(this, arg)) * 31 + (n.getComment().isPresent() ? n.getComment().get().accept(this, arg) : 0); |
<<<<<<<
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.List;
=======
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.EnumSet;
import java.util.List;
>>>>>>>
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.EnumSet;
import java.util.List;
<<<<<<<
import com.github.javaparser.ast.AccessSpecifier;
import com.github.javaparser.ast.TypeParameter;
=======
import com.github.javaparser.ast.AccessSpecifier;
import com.github.javaparser.ast.DocumentableNode;
import com.github.javaparser.ast.NamedNode;
import com.github.javaparser.ast.NodeWithModifiers;
import com.github.javaparser.ast.TypeParameter;
import com.github.javaparser.ast.TypedNode;
>>>>>>>
import com.github.javaparser.ast.AccessSpecifier;
import com.github.javaparser.ast.TypeParameter;
<<<<<<<
private int modifiers;
=======
private EnumSet<Modifier> modifiers = EnumSet.noneOf(Modifier.class);
>>>>>>>
private EnumSet<Modifier> modifiers = EnumSet.noneOf(Modifier.class);
<<<<<<<
}
public MethodDeclaration(final int modifiers, final Type type, final String name) {
setModifiers(modifiers);
setType(type);
setName(name);
}
public MethodDeclaration(final int modifiers, final Type type, final String name,
final List<Parameter> parameters) {
setModifiers(modifiers);
setType(type);
setName(name);
setParameters(parameters);
}
public MethodDeclaration(final int modifiers, final List<AnnotationExpr> annotations,
final List<TypeParameter> typeParameters, final Type type, final String name,
final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_,
final BlockStmt body) {
super(annotations);
setModifiers(modifiers);
setTypeParameters(typeParameters);
setType(type);
setName(name);
setParameters(parameters);
setArrayCount(arrayCount);
setThrows(throws_);
setBody(body);
}
/**
* @deprecated prefer using Range objects.
*/
@Deprecated
public MethodDeclaration(final int beginLine, final int beginColumn, final int endLine, final int endColumn,
final int modifiers, final List<AnnotationExpr> annotations,
final List<TypeParameter> typeParameters, final Type type, final String name,
final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_,
final BlockStmt body) {
this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, typeParameters,
type, name, parameters, arrayCount, throws_, body);
}
public MethodDeclaration(Range range,
final int modifiers, final List<AnnotationExpr> annotations,
final List<TypeParameter> typeParameters, final Type type, final String name,
final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_,
final BlockStmt body) {
super(range, annotations);
setModifiers(modifiers);
setTypeParameters(typeParameters);
setType(type);
setName(name);
setParameters(parameters);
setArrayCount(arrayCount);
setThrows(throws_);
setBody(body);
}
@Override
public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) {
return v.visit(this, arg);
}
@Override
public <A> void accept(final VoidVisitor<A> v, final A arg) {
v.visit(this, arg);
}
public int getArrayCount() {
return arrayCount;
}
@Override
public BlockStmt getBody() {
return body;
}
/**
* Return the modifiers of this member declaration.
*
* @see ModifierSet
* @return modifiers
*/
@Override
public int getModifiers() {
return modifiers;
}
@Override
public String getName() {
return name.getName();
}
=======
}
public MethodDeclaration(final EnumSet<Modifier> modifiers, final Type type, final String name) {
setModifiers(modifiers);
setType(type);
setName(name);
}
public MethodDeclaration(final EnumSet<Modifier> modifiers, final Type type, final String name,
final List<Parameter> parameters) {
setModifiers(modifiers);
setType(type);
setName(name);
setParameters(parameters);
}
public MethodDeclaration(final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations,
final List<TypeParameter> typeParameters, final Type type, final String name,
final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_, final BlockStmt body) {
super(annotations);
setModifiers(modifiers);
setTypeParameters(typeParameters);
setType(type);
setName(name);
setParameters(parameters);
setArrayCount(arrayCount);
setThrows(throws_);
setBody(body);
}
/**
* @deprecated prefer using Range objects.
*/
@Deprecated
public MethodDeclaration(final int beginLine, final int beginColumn, final int endLine, final int endColumn,
final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations,
final List<TypeParameter> typeParameters, final Type type, final String name,
final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_, final BlockStmt body) {
this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, typeParameters, type, name, parameters, arrayCount, throws_, body);
}
public MethodDeclaration(Range range,
final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations,
final List<TypeParameter> typeParameters, final Type type, final String name,
final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_, final BlockStmt body) {
super(range, annotations);
setModifiers(modifiers);
setTypeParameters(typeParameters);
setType(type);
setName(name);
setParameters(parameters);
setArrayCount(arrayCount);
setThrows(throws_);
setBody(body);
}
@Override public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) {
return v.visit(this, arg);
}
@Override public <A> void accept(final VoidVisitor<A> v, final A arg) {
v.visit(this, arg);
}
public int getArrayCount() {
return arrayCount;
}
public BlockStmt getBody() {
return body;
}
/**
* Return the modifiers of this member declaration.
*
* @see ModifierSet
* @return modifiers
*/
@Override
public EnumSet<Modifier> getModifiers() {
return modifiers;
}
@Override
public String getName() {
return name.getName();
}
>>>>>>>
}
public MethodDeclaration(final EnumSet<Modifier> modifiers, final Type type, final String name) {
setModifiers(modifiers);
setType(type);
setName(name);
}
public MethodDeclaration(final EnumSet<Modifier> modifiers, final Type type, final String name,
final List<Parameter> parameters) {
setModifiers(modifiers);
setType(type);
setName(name);
setParameters(parameters);
}
public MethodDeclaration(final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations,
final List<TypeParameter> typeParameters, final Type type, final String name,
final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_,
final BlockStmt body) {
super(annotations);
setModifiers(modifiers);
setTypeParameters(typeParameters);
setType(type);
setName(name);
setParameters(parameters);
setArrayCount(arrayCount);
setThrows(throws_);
setBody(body);
}
/**
* @deprecated prefer using Range objects.
*/
@Deprecated
public MethodDeclaration(final int beginLine, final int beginColumn, final int endLine, final int endColumn,
final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations,
final List<TypeParameter> typeParameters, final Type type, final String name,
final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_,
final BlockStmt body) {
this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, typeParameters,
type, name, parameters, arrayCount, throws_, body);
}
public MethodDeclaration(Range range,
final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations,
final List<TypeParameter> typeParameters, final Type type, final String name,
final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_,
final BlockStmt body) {
super(range, annotations);
setModifiers(modifiers);
setTypeParameters(typeParameters);
setType(type);
setName(name);
setParameters(parameters);
setArrayCount(arrayCount);
setThrows(throws_);
setBody(body);
}
@Override
public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) {
return v.visit(this, arg);
}
@Override
public <A> void accept(final VoidVisitor<A> v, final A arg) {
v.visit(this, arg);
}
public int getArrayCount() {
return arrayCount;
}
@Override
public BlockStmt getBody() {
return body;
}
/**
* Return the modifiers of this member declaration.
*
* @see ModifierSet
* @return modifiers
*/
@Override
public EnumSet<Modifier> getModifiers() {
return modifiers;
}
@Override
public String getName() {
return name.getName();
}
<<<<<<<
@Override
public MethodDeclaration setModifiers(final int modifiers) {
this.modifiers = modifiers;
return this;
}
=======
public void setModifiers(final EnumSet<Modifier> modifiers) {
this.modifiers = modifiers;
}
>>>>>>>
@Override
public MethodDeclaration setModifiers(final EnumSet<Modifier> modifiers) {
this.modifiers = modifiers;
return this;
}
<<<<<<<
if (ModifierSet.isStatic(getModifiers())) {
=======
if (getModifiers().contains(Modifier.STATIC)) {
>>>>>>>
if (getModifiers().contains(Modifier.STATIC)) {
<<<<<<<
if (ModifierSet.isAbstract(getModifiers())) {
=======
if (getModifiers().contains(Modifier.ABSTRACT)) {
>>>>>>>
if (getModifiers().contains(Modifier.ABSTRACT)) {
<<<<<<<
if (ModifierSet.isFinal(getModifiers())) {
=======
if (getModifiers().contains(Modifier.FINAL)) {
>>>>>>>
if (getModifiers().contains(Modifier.FINAL)) {
<<<<<<<
if (ModifierSet.isNative(getModifiers())) {
=======
if (getModifiers().contains(Modifier.NATIVE)) {
>>>>>>>
if (getModifiers().contains(Modifier.NATIVE)) {
<<<<<<<
if (ModifierSet.isSynchronized(getModifiers())) {
=======
if (getModifiers().contains(Modifier.SYNCHRONIZED)) {
>>>>>>>
if (getModifiers().contains(Modifier.SYNCHRONIZED)) { |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ForEachStmt n, final Object arg) {
=======
public Visitable visit(final ForeachStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ForEachStmt n, final Object arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleRequiresDirective n, final Object arg) {
NodeList<Modifier> modifiers = cloneList(n.getModifiers(), arg);
=======
public Visitable visit(final ModuleRequiresStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleRequiresDirective n, final Object arg) {
NodeList<Modifier> modifiers = cloneList(n.getModifiers(), arg);
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleExportsDirective n, final Object arg) {
=======
public Visitable visit(final ModuleExportsStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleExportsDirective n, final Object arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleProvidesDirective n, final Object arg) {
=======
public Visitable visit(final ModuleProvidesStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleProvidesDirective n, final Object arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleUsesDirective n, final Object arg) {
=======
public Visitable visit(final ModuleUsesStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleUsesDirective n, final Object arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleOpensDirective n, final Object arg) {
=======
public Visitable visit(final ModuleOpensStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleOpensDirective n, final Object arg) { |
<<<<<<<
@Override
public List<R> visit(final TextBlockLiteralExpr n, final A arg) {
List<R> result = new ArrayList<>();
List<R> tmp;
if (n.getComment().isPresent()) {
tmp = n.getComment().get().accept(this, arg);
if (tmp != null)
result.addAll(tmp);
}
return result;
}
=======
@Override
public List<R> visit(final YieldStmt n, final A arg) {
List<R> result = new ArrayList<>();
List<R> tmp;
{
tmp = n.getExpression().accept(this, arg);
if (tmp != null)
result.addAll(tmp);
}
if (n.getComment().isPresent()) {
tmp = n.getComment().get().accept(this, arg);
if (tmp != null)
result.addAll(tmp);
}
return result;
}
>>>>>>>
@Override
public List<R> visit(final YieldStmt n, final A arg) {
List<R> result = new ArrayList<>();
List<R> tmp;
{
tmp = n.getExpression().accept(this, arg);
if (tmp != null)
result.addAll(tmp);
}
if (n.getComment().isPresent()) {
tmp = n.getComment().get().accept(this, arg);
if (tmp != null)
result.addAll(tmp);
}
return result;
}
@Override
public List<R> visit(final TextBlockLiteralExpr n, final A arg) {
List<R> result = new ArrayList<>();
List<R> tmp;
if (n.getComment().isPresent()) {
tmp = n.getComment().get().accept(this, arg);
if (tmp != null)
result.addAll(tmp);
}
return result;
} |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.ModifierVisitorGenerator")
public Visitable visit(final ForEachStmt n, final A arg) {
=======
public Visitable visit(final ForeachStmt n, final A arg) {
>>>>>>>
public Visitable visit(final ForEachStmt n, final A arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.ModifierVisitorGenerator")
public Visitable visit(final ModuleRequiresDirective n, final A arg) {
=======
public Visitable visit(final ModuleRequiresStmt n, final A arg) {
>>>>>>>
public Visitable visit(final ModuleRequiresDirective n, final A arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.ModifierVisitorGenerator")
public Visitable visit(final ModuleExportsDirective n, final A arg) {
=======
public Visitable visit(final ModuleExportsStmt n, final A arg) {
>>>>>>>
public Visitable visit(final ModuleExportsDirective n, final A arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.ModifierVisitorGenerator")
public Visitable visit(final ModuleProvidesDirective n, final A arg) {
=======
public Visitable visit(final ModuleProvidesStmt n, final A arg) {
>>>>>>>
public Visitable visit(final ModuleProvidesDirective n, final A arg) { |
<<<<<<<
import static com.github.javaparser.JavaParser.parseExpression;
=======
import static com.github.javaparser.utils.Utils.EOL;
>>>>>>>
import static com.github.javaparser.JavaParser.parseExpression;
import static com.github.javaparser.utils.Utils.EOL;
<<<<<<<
CompilationUnit unit = parse("public class Example {\n" +
" public static void example() {\n" +
" boolean swapped;\n" +
" swapped=false;\n" +
" swapped=false;\n" +
" }\n" +
"}\n");
=======
CompilationUnit unit = JavaParser.parse(String.format("public class Example {%1$s" +
" public static void example() {%1$s" +
" boolean swapped;%1$s" +
" swapped=false;%1$s" +
" swapped=false;%1$s" +
" }%1$s" +
"}%1$s", EOL));
>>>>>>>
CompilationUnit unit = parse(String.format("public class Example {%1$s" +
" public static void example() {%1$s" +
" boolean swapped;%1$s" +
" swapped=false;%1$s" +
" swapped=false;%1$s" +
" }%1$s" +
"}%1$s", EOL)); |
<<<<<<<
moduleRequiresStmtMetaModel.modifiersPropertyMetaModel = new PropertyMetaModel(moduleRequiresStmtMetaModel, "modifiers", com.github.javaparser.ast.Modifier.class, Optional.of(modifierMetaModel), false, false, true, false, false);
moduleRequiresStmtMetaModel.getDeclaredPropertyMetaModels().add(moduleRequiresStmtMetaModel.modifiersPropertyMetaModel);
moduleRequiresStmtMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleRequiresStmtMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleRequiresStmtMetaModel.getDeclaredPropertyMetaModels().add(moduleRequiresStmtMetaModel.namePropertyMetaModel);
moduleExportsStmtMetaModel.moduleNamesPropertyMetaModel = new PropertyMetaModel(moduleExportsStmtMetaModel, "moduleNames", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, true, false, false);
moduleExportsStmtMetaModel.getDeclaredPropertyMetaModels().add(moduleExportsStmtMetaModel.moduleNamesPropertyMetaModel);
moduleExportsStmtMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleExportsStmtMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleExportsStmtMetaModel.getDeclaredPropertyMetaModels().add(moduleExportsStmtMetaModel.namePropertyMetaModel);
moduleProvidesStmtMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleProvidesStmtMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleProvidesStmtMetaModel.getDeclaredPropertyMetaModels().add(moduleProvidesStmtMetaModel.namePropertyMetaModel);
moduleProvidesStmtMetaModel.withPropertyMetaModel = new PropertyMetaModel(moduleProvidesStmtMetaModel, "with", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, true, false, false);
moduleProvidesStmtMetaModel.getDeclaredPropertyMetaModels().add(moduleProvidesStmtMetaModel.withPropertyMetaModel);
moduleUsesStmtMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleUsesStmtMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleUsesStmtMetaModel.getDeclaredPropertyMetaModels().add(moduleUsesStmtMetaModel.namePropertyMetaModel);
moduleOpensStmtMetaModel.moduleNamesPropertyMetaModel = new PropertyMetaModel(moduleOpensStmtMetaModel, "moduleNames", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, true, false, false);
moduleOpensStmtMetaModel.getDeclaredPropertyMetaModels().add(moduleOpensStmtMetaModel.moduleNamesPropertyMetaModel);
moduleOpensStmtMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleOpensStmtMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleOpensStmtMetaModel.getDeclaredPropertyMetaModels().add(moduleOpensStmtMetaModel.namePropertyMetaModel);
=======
moduleRequiresDirectiveMetaModel.modifiersPropertyMetaModel = new PropertyMetaModel(moduleRequiresDirectiveMetaModel, "modifiers", com.github.javaparser.ast.Modifier.class, Optional.empty(), false, false, false, true, false);
moduleRequiresDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleRequiresDirectiveMetaModel.modifiersPropertyMetaModel);
moduleRequiresDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleRequiresDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleRequiresDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleRequiresDirectiveMetaModel.namePropertyMetaModel);
moduleExportsDirectiveMetaModel.moduleNamesPropertyMetaModel = new PropertyMetaModel(moduleExportsDirectiveMetaModel, "moduleNames", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, true, false, false);
moduleExportsDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleExportsDirectiveMetaModel.moduleNamesPropertyMetaModel);
moduleExportsDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleExportsDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleExportsDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleExportsDirectiveMetaModel.namePropertyMetaModel);
moduleProvidesDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleProvidesDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleProvidesDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleProvidesDirectiveMetaModel.namePropertyMetaModel);
moduleProvidesDirectiveMetaModel.withPropertyMetaModel = new PropertyMetaModel(moduleProvidesDirectiveMetaModel, "with", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, true, false, false);
moduleProvidesDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleProvidesDirectiveMetaModel.withPropertyMetaModel);
moduleUsesDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleUsesDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleUsesDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleUsesDirectiveMetaModel.namePropertyMetaModel);
moduleOpensDirectiveMetaModel.moduleNamesPropertyMetaModel = new PropertyMetaModel(moduleOpensDirectiveMetaModel, "moduleNames", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, true, false, false);
moduleOpensDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleOpensDirectiveMetaModel.moduleNamesPropertyMetaModel);
moduleOpensDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleOpensDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleOpensDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleOpensDirectiveMetaModel.namePropertyMetaModel);
>>>>>>>
moduleRequiresDirectiveMetaModel.modifiersPropertyMetaModel = new PropertyMetaModel(moduleRequiresDirectiveMetaModel, "modifiers", com.github.javaparser.ast.Modifier.class, Optional.of(modifierMetaModel), false, false, true, false, false);
moduleRequiresDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleRequiresDirectiveMetaModel.modifiersPropertyMetaModel);
moduleRequiresDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleRequiresDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleRequiresDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleRequiresDirectiveMetaModel.namePropertyMetaModel);
moduleExportsDirectiveMetaModel.moduleNamesPropertyMetaModel = new PropertyMetaModel(moduleExportsDirectiveMetaModel, "moduleNames", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, true, false, false);
moduleExportsDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleExportsDirectiveMetaModel.moduleNamesPropertyMetaModel);
moduleExportsDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleExportsDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleExportsDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleExportsDirectiveMetaModel.namePropertyMetaModel);
moduleProvidesDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleProvidesDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleProvidesDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleProvidesDirectiveMetaModel.namePropertyMetaModel);
moduleProvidesDirectiveMetaModel.withPropertyMetaModel = new PropertyMetaModel(moduleProvidesDirectiveMetaModel, "with", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, true, false, false);
moduleProvidesDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleProvidesDirectiveMetaModel.withPropertyMetaModel);
moduleUsesDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleUsesDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleUsesDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleUsesDirectiveMetaModel.namePropertyMetaModel);
moduleOpensDirectiveMetaModel.moduleNamesPropertyMetaModel = new PropertyMetaModel(moduleOpensDirectiveMetaModel, "moduleNames", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, true, false, false);
moduleOpensDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleOpensDirectiveMetaModel.moduleNamesPropertyMetaModel);
moduleOpensDirectiveMetaModel.namePropertyMetaModel = new PropertyMetaModel(moduleOpensDirectiveMetaModel, "name", com.github.javaparser.ast.expr.Name.class, Optional.of(nameMetaModel), false, false, false, false, false);
moduleOpensDirectiveMetaModel.getDeclaredPropertyMetaModels().add(moduleOpensDirectiveMetaModel.namePropertyMetaModel); |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.EqualsVisitorGenerator")
public Boolean visit(final ForEachStmt n, final Visitable arg) {
final ForEachStmt n2 = (ForEachStmt) arg;
=======
public Boolean visit(final ForeachStmt n, final Visitable arg) {
final ForeachStmt n2 = (ForeachStmt) arg;
>>>>>>>
public Boolean visit(final ForEachStmt n, final Visitable arg) {
final ForEachStmt n2 = (ForEachStmt) arg;
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.EqualsVisitorGenerator")
public Boolean visit(final ModuleRequiresDirective n, final Visitable arg) {
final ModuleRequiresDirective n2 = (ModuleRequiresDirective) arg;
=======
public Boolean visit(final ModuleRequiresStmt n, final Visitable arg) {
final ModuleRequiresStmt n2 = (ModuleRequiresStmt) arg;
>>>>>>>
public Boolean visit(final ModuleRequiresDirective n, final Visitable arg) {
final ModuleRequiresDirective n2 = (ModuleRequiresDirective) arg;
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.EqualsVisitorGenerator")
public Boolean visit(final ModuleExportsDirective n, final Visitable arg) {
final ModuleExportsDirective n2 = (ModuleExportsDirective) arg;
=======
public Boolean visit(final ModuleExportsStmt n, final Visitable arg) {
final ModuleExportsStmt n2 = (ModuleExportsStmt) arg;
>>>>>>>
public Boolean visit(final ModuleExportsDirective n, final Visitable arg) {
final ModuleExportsDirective n2 = (ModuleExportsDirective) arg;
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.EqualsVisitorGenerator")
public Boolean visit(final ModuleProvidesDirective n, final Visitable arg) {
final ModuleProvidesDirective n2 = (ModuleProvidesDirective) arg;
=======
public Boolean visit(final ModuleProvidesStmt n, final Visitable arg) {
final ModuleProvidesStmt n2 = (ModuleProvidesStmt) arg;
>>>>>>>
public Boolean visit(final ModuleProvidesDirective n, final Visitable arg) {
final ModuleProvidesDirective n2 = (ModuleProvidesDirective) arg; |
<<<<<<<
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.List;
=======
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.EnumSet;
import java.util.List;
>>>>>>>
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.List;
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.EnumSet;
import java.util.List;
<<<<<<<
import com.github.javaparser.ast.nodeTypes.NodeWithJavaDoc;
import com.github.javaparser.ast.nodeTypes.NodeWithName;
import com.github.javaparser.ast.nodeTypes.NodeWithMembers;
import com.github.javaparser.ast.nodeTypes.NodeWithModifiers;
=======
>>>>>>>
import com.github.javaparser.ast.nodeTypes.NodeWithJavaDoc;
import com.github.javaparser.ast.nodeTypes.NodeWithName;
import com.github.javaparser.ast.nodeTypes.NodeWithMembers;
import com.github.javaparser.ast.nodeTypes.NodeWithModifiers;
<<<<<<<
int modifiers, String name,
List<BodyDeclaration<?>> members) {
=======
EnumSet<Modifier> modifiers, String name,
List<BodyDeclaration> members) {
>>>>>>>
EnumSet<Modifier> modifiers, String name,
List<BodyDeclaration<?>> members) {
<<<<<<<
int modifiers, String name,
List<BodyDeclaration<?>> members) {
=======
EnumSet<Modifier> modifiers, String name,
List<BodyDeclaration> members) {
>>>>>>>
EnumSet<Modifier> modifiers, String name,
List<BodyDeclaration<?>> members) {
<<<<<<<
int modifiers, String name,
List<BodyDeclaration<?>> members) {
=======
EnumSet<Modifier> modifiers, String name,
List<BodyDeclaration> members) {
>>>>>>>
EnumSet<Modifier> modifiers, String name,
List<BodyDeclaration<?>> members) {
<<<<<<<
@SuppressWarnings("unchecked")
@Override
public T setModifiers(int modifiers) {
=======
public final void setModifiers(EnumSet<Modifier> modifiers) {
>>>>>>>
@SuppressWarnings("unchecked")
@Override
public T setModifiers(EnumSet<Modifier> modifiers) { |
<<<<<<<
public Boolean visit(final ModuleRequiresStmt n, final Visitable arg) {
final ModuleRequiresStmt n2 = (ModuleRequiresStmt) arg;
if (!nodesEquals(n.getModifiers(), n2.getModifiers()))
=======
public Boolean visit(final ModuleRequiresDirective n, final Visitable arg) {
final ModuleRequiresDirective n2 = (ModuleRequiresDirective) arg;
if (!objEquals(n.getModifiers(), n2.getModifiers()))
>>>>>>>
public Boolean visit(final ModuleRequiresDirective n, final Visitable arg) {
final ModuleRequiresDirective n2 = (ModuleRequiresDirective) arg;
if (!nodesEquals(n.getModifiers(), n2.getModifiers())) |
<<<<<<<
import static com.github.javaparser.utils.CodeGenerationUtils.fileInPackageRelativePath;
import static com.github.javaparser.utils.CodeGenerationUtils.packageAbsolutePath;
import static com.github.javaparser.utils.SourceRoot.Callback.Result.SAVE;
=======
import static com.github.javaparser.utils.CodeGenerationUtils.fileInPackageRelativePath;
import static com.github.javaparser.utils.CodeGenerationUtils.packageAbsolutePath;
>>>>>>>
import static com.github.javaparser.utils.CodeGenerationUtils.fileInPackageRelativePath;
import static com.github.javaparser.utils.CodeGenerationUtils.packageAbsolutePath;
import static com.github.javaparser.utils.SourceRoot.Callback.Result.SAVE;
import static com.github.javaparser.utils.CodeGenerationUtils.fileInPackageRelativePath;
import static com.github.javaparser.utils.CodeGenerationUtils.packageAbsolutePath;
<<<<<<<
/**
* The path that was passed in the constructor.
*/
public Path getRoot() {
return root;
}
=======
public JavaParser getJavaParser() {
return javaParser;
}
public SourceRoot setJavaParser(JavaParser javaParser) {
this.javaParser = javaParser;
return this;
}
>>>>>>>
/**
* The path that was passed in the constructor.
*/
public Path getRoot() {
return root;
}
public JavaParser getJavaParser() {
return javaParser;
}
public SourceRoot setJavaParser(JavaParser javaParser) {
this.javaParser = javaParser;
return this;
} |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentHashCodeVisitorGenerator")
public Integer visit(final ForEachStmt n, final Void arg) {
=======
public Integer visit(final ForeachStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ForEachStmt n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentHashCodeVisitorGenerator")
public Integer visit(final ModuleRequiresDirective n, final Void arg) {
=======
public Integer visit(final ModuleRequiresStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleRequiresDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentHashCodeVisitorGenerator")
public Integer visit(final ModuleExportsDirective n, final Void arg) {
=======
public Integer visit(final ModuleExportsStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleExportsDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentHashCodeVisitorGenerator")
public Integer visit(final ModuleProvidesDirective n, final Void arg) {
=======
public Integer visit(final ModuleProvidesStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleProvidesDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentHashCodeVisitorGenerator")
public Integer visit(final ModuleUsesDirective n, final Void arg) {
=======
public Integer visit(final ModuleUsesStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleUsesDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentHashCodeVisitorGenerator")
public Integer visit(final ModuleOpensDirective n, final Void arg) {
=======
public Integer visit(final ModuleOpensStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleOpensDirective n, final Void arg) { |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorWithDefaultsGenerator")
public R visit(final ForEachStmt n, final A arg) {
=======
public R visit(final ForeachStmt n, final A arg) {
>>>>>>>
public R visit(final ForEachStmt n, final A arg) { |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentEqualsVisitorGenerator")
public Boolean visit(final ForEachStmt n, final Visitable arg) {
final ForEachStmt n2 = (ForEachStmt) arg;
=======
public Boolean visit(final ForeachStmt n, final Visitable arg) {
final ForeachStmt n2 = (ForeachStmt) arg;
>>>>>>>
public Boolean visit(final ForEachStmt n, final Visitable arg) {
final ForEachStmt n2 = (ForEachStmt) arg;
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentEqualsVisitorGenerator")
public Boolean visit(final ModuleRequiresDirective n, final Visitable arg) {
final ModuleRequiresDirective n2 = (ModuleRequiresDirective) arg;
=======
public Boolean visit(final ModuleRequiresStmt n, final Visitable arg) {
final ModuleRequiresStmt n2 = (ModuleRequiresStmt) arg;
>>>>>>>
public Boolean visit(final ModuleRequiresDirective n, final Visitable arg) {
final ModuleRequiresDirective n2 = (ModuleRequiresDirective) arg;
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentEqualsVisitorGenerator")
public Boolean visit(final ModuleExportsDirective n, final Visitable arg) {
final ModuleExportsDirective n2 = (ModuleExportsDirective) arg;
=======
public Boolean visit(final ModuleExportsStmt n, final Visitable arg) {
final ModuleExportsStmt n2 = (ModuleExportsStmt) arg;
>>>>>>>
public Boolean visit(final ModuleExportsDirective n, final Visitable arg) {
final ModuleExportsDirective n2 = (ModuleExportsDirective) arg;
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentEqualsVisitorGenerator")
public Boolean visit(final ModuleProvidesDirective n, final Visitable arg) {
final ModuleProvidesDirective n2 = (ModuleProvidesDirective) arg;
=======
public Boolean visit(final ModuleProvidesStmt n, final Visitable arg) {
final ModuleProvidesStmt n2 = (ModuleProvidesStmt) arg;
>>>>>>>
public Boolean visit(final ModuleProvidesDirective n, final Visitable arg) {
final ModuleProvidesDirective n2 = (ModuleProvidesDirective) arg; |
<<<<<<<
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
=======
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.EnumSet;
>>>>>>>
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.EnumSet;
<<<<<<<
import com.github.javaparser.ast.AccessSpecifier;
import com.github.javaparser.ast.TypeParameter;
=======
import com.github.javaparser.ast.AccessSpecifier;
import com.github.javaparser.ast.DocumentableNode;
import com.github.javaparser.ast.NamedNode;
import com.github.javaparser.ast.NodeWithModifiers;
import com.github.javaparser.ast.TypeParameter;
>>>>>>>
import com.github.javaparser.ast.AccessSpecifier;
import com.github.javaparser.ast.TypeParameter;
<<<<<<<
public ConstructorDeclaration(int modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters,
String name, List<Parameter> parameters, List<ReferenceType> throws_,
BlockStmt block) {
=======
public ConstructorDeclaration(EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
String name, List<Parameter> parameters, List<ReferenceType> throws_, BlockStmt block) {
>>>>>>>
public ConstructorDeclaration(EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
String name, List<Parameter> parameters, List<ReferenceType> throws_,
BlockStmt block) {
<<<<<<<
@Override
public ConstructorDeclaration setModifiers(int modifiers) {
=======
public void setModifiers(EnumSet<Modifier> modifiers) {
>>>>>>>
@Override
public ConstructorDeclaration setModifiers(EnumSet<Modifier> modifiers) { |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentEqualsVisitorGenerator")
public Boolean visit(final ForEachStmt n, final Visitable arg) {
final ForEachStmt n2 = (ForEachStmt) arg;
=======
public Boolean visit(final ForeachStmt n, final Visitable arg) {
final ForeachStmt n2 = (ForeachStmt) arg;
>>>>>>>
public Boolean visit(final ForEachStmt n, final Visitable arg) {
final ForEachStmt n2 = (ForEachStmt) arg;
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.NoCommentEqualsVisitorGenerator")
public Boolean visit(final ModuleProvidesDirective n, final Visitable arg) {
final ModuleProvidesDirective n2 = (ModuleProvidesDirective) arg;
=======
public Boolean visit(final ModuleProvidesStmt n, final Visitable arg) {
final ModuleProvidesStmt n2 = (ModuleProvidesStmt) arg;
>>>>>>>
public Boolean visit(final ModuleProvidesDirective n, final Visitable arg) {
final ModuleProvidesDirective n2 = (ModuleProvidesDirective) arg; |
<<<<<<<
} else if (msgItem.mLocked) {
mRightStatusIndicator.setImageResource(R.drawable.ic_lock_message_sms);
mRightStatusIndicator.setVisibility(View.VISIBLE);
=======
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.PENDING) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_pending);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.FAILED) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_not_delivered);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.RECEIVED) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_delivered);
mRightStatusIndicator.setVisibility(View.VISIBLE);
>>>>>>>
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.PENDING) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_pending);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.FAILED) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_not_delivered);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.RECEIVED) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_delivered);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mLocked) {
mRightStatusIndicator.setImageResource(R.drawable.ic_lock_message_sms); |
<<<<<<<
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.PENDING) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_pending);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.FAILED) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_not_delivered);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.RECEIVED) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_delivered);
mRightStatusIndicator.setVisibility(View.VISIBLE);
=======
} else if (msgItem.mLocked) {
mRightStatusIndicator.setImageResource(R.drawable.ic_lock_message_sms);
mRightStatusIndicator.setVisibility(View.VISIBLE);
>>>>>>>
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.PENDING) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_pending);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.FAILED) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_not_delivered);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mDeliveryStatus == MessageItem.DeliveryStatus.RECEIVED) {
mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_delivered);
mRightStatusIndicator.setVisibility(View.VISIBLE);
} else if (msgItem.mLocked) {
mRightStatusIndicator.setImageResource(R.drawable.ic_lock_message_sms);
mRightStatusIndicator.setVisibility(View.VISIBLE); |
<<<<<<<
// DateUtils does this for you, but it ultimately makes the call to the slow
// DateFormat.is24HourFormat() method that we cache the result of, so
// override that for now until is24HourFormat() is made to be fast.
if (get24HourMode(context)) {
format_flags |= DateUtils.FORMAT_24HOUR;
} else {
format_flags |= DateUtils.FORMAT_12HOUR;
}
=======
>>>>>>>
// DateUtils does this for you, but it ultimately makes the call to the slow
// DateFormat.is24HourFormat() method that we cache the result of, so
// override that for now until is24HourFormat() is made to be fast.
if (get24HourMode(context)) {
format_flags |= DateUtils.FORMAT_24HOUR;
} else {
format_flags |= DateUtils.FORMAT_12HOUR;
} |
<<<<<<<
import android.util.Log;
import android.widget.Toast;
=======
>>>>>>>
import android.util.Log;
import android.widget.Toast;
<<<<<<<
private static Intent getAppIntent() {
Intent appIntent = new Intent(Intent.ACTION_MAIN, Threads.CONTENT_URI);
appIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
return appIntent;
}
private static void updateDeliveryNotification(
Context context,
boolean isNew,
CharSequence message,
long timeMillis) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
if (!sp.getBoolean(
MessagingPreferenceActivity.NOTIFICATION_ENABLED, true))
return;
if (isNew) {
Toast toast = Toast.makeText(context, message, (int)timeMillis);
toast.show();
}
}
=======
>>>>>>>
private static void updateDeliveryNotification(
Context context,
boolean isNew,
CharSequence message,
long timeMillis) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
if (!sp.getBoolean(
MessagingPreferenceActivity.NOTIFICATION_ENABLED, true))
return;
if (isNew) {
Toast toast = Toast.makeText(context, message, (int)timeMillis);
toast.show();
}
} |
<<<<<<<
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
=======
>>>>>>>
import android.view.KeyEvent; |
<<<<<<<
mConversation.setRecipients(recipients);
=======
mConversation.setRecipients(recipients); // resets the threadId to zero
>>>>>>>
mConversation.setRecipients(recipients); // resets the threadId to zero
<<<<<<<
=======
// Begin -------- debug code
if (LogTag.VERBOSE) {
Log.i(TAG, "##### send #####");
Log.i(TAG, " mConversation (beginning of send): " + mConversation.toString());
Log.i(TAG, " recipientsInUI: " + recipientsInUI);
}
// End -------- debug code
>>>>>>>
<<<<<<<
=======
// Begin -------- debug code
String newRecipients = mConversation.getRecipients().serialize();
if (!TextUtils.isEmpty(recipientsInUI) && !newRecipients.equals(recipientsInUI)) {
if (LogTag.SEVERE_WARNING) {
LogTag.warnPossibleRecipientMismatch("send() after newRecipients changed from "
+ recipientsInUI + " to " + newRecipients, mActivity);
dumpWorkingRecipients();
} else {
Log.w(TAG, "send() after newRecipients changed from "
+ recipientsInUI + " to " + newRecipients);
}
}
// End -------- debug code
>>>>>>>
<<<<<<<
// Make sure we are still using the correct thread ID for our
// recipient set.
=======
long origThreadId = conv.getThreadId();
// Make sure we are still using the correct thread ID for our recipient set.
>>>>>>>
long origThreadId = conv.getThreadId();
// Make sure we are still using the correct thread ID for our recipient set. |
<<<<<<<
import com.pushtorefresh.storio.operation.MapFunc;
import com.pushtorefresh.storio.operation.internal.MapSomethingToExecuteAsBlocking;
import com.pushtorefresh.storio.operation.internal.OnSubscribeExecuteAsBlocking;
=======
import com.pushtorefresh.storio.util.EnvironmentUtil;
>>>>>>>
import com.pushtorefresh.storio.operation.internal.MapSomethingToExecuteAsBlocking;
import com.pushtorefresh.storio.operation.internal.OnSubscribeExecuteAsBlocking; |
<<<<<<<
private Casting casting = new DefaultCasting();
=======
private int headerStart;
>>>>>>>
private Casting casting = new DefaultCasting();
private int headerStart;
<<<<<<<
private Casting casting = new DefaultCasting();
=======
private int headerStart = 0;
private int skip = 0;
>>>>>>>
private Casting casting = new DefaultCasting();
private int headerStart = 0;
private int skip = 0;
<<<<<<<
public PoijiOptions build() {
return new PoijiOptions()
.setSkip(skip)
.setPassword(password)
.setPreferNullOverDefault(preferNullOverDefault)
.setDatePattern(datePattern)
.setDateTimeFormatter(dateTimeFormatter)
.setSheetIndex(sheetIndex)
.setIgnoreHiddenSheets(ignoreHiddenSheets)
.setTrimCellValue(trimCellValue)
.setDateRegex(dateRegex)
.setDateLenient(dateLenient).setCasting(casting);
=======
/**
* Skip a number of rows after the header row. The header row is not counted.
*
* @param skip ignored row number after the header row
* @return builder itself
*/
public static PoijiOptionsBuilder settings(int skip) {
if (skip < 0) {
throw new PoijiException("Skip index must be greater than or equal to 0");
}
return new PoijiOptionsBuilder(skip);
>>>>>>>
/**
* Skip a number of rows after the header row. The header row is not counted.
*
* @param skip ignored row number after the header row
* @return builder itself
*/
public static PoijiOptionsBuilder settings(int skip) {
if (skip < 0) {
throw new PoijiException("Skip index must be greater than or equal to 0");
}
return new PoijiOptionsBuilder(skip);
}
public static PoijiOptionsBuilder settings() {
return new PoijiOptionsBuilder();
}
/**
* set a date time formatter, default date time formatter is "dd/M/yyyy"
* for java.time.LocalDate
*
* @param dateTimeFormatter date time formatter
* @return this
*/
public PoijiOptionsBuilder dateTimeFormatter(DateTimeFormatter dateTimeFormatter) {
this.dateTimeFormatter = dateTimeFormatter;
return this;
}
/**
* set date pattern, default date format is "dd/M/yyyy" for
* java.util.Date
*
* @param datePattern date time formatter
* @return this
*/
public PoijiOptionsBuilder datePattern(String datePattern) {
this.datePattern = datePattern;
return this;
}
/**
* set whether or not to use null instead of default values for Integer,
* Double, Float, Long, String and java.util.Date types.
*
* @param preferNullOverDefault boolean
* @return this
*/
public PoijiOptionsBuilder preferNullOverDefault(boolean preferNullOverDefault) {
this.preferNullOverDefault = preferNullOverDefault;
return this;
<<<<<<<
/**
* Use a custom casting implementation
*
* @param casting custom casting implementation
* @return this
*/
public PoijiOptionsBuilder withCasting(Casting casting) {
this.casting = casting;
return this;
}
=======
/**
* This is to set the row which the unmarshall will
* use to start reading header titles, incase the
* header is not in row 0.
*
* @param headerStart an index number of the excel header to start reading header
* @return this
*/
public PoijiOptionsBuilder headerStart(int headerStart) {
if (headerStart < 0) {
throw new PoijiException("Header index must be greater than or equal to 0");
}
this.headerStart = headerStart;
return this;
}
>>>>>>>
/**
* Use a custom casting implementation
*
* @param casting custom casting implementation
* @return this
*/
public PoijiOptionsBuilder withCasting(Casting casting) {
this.casting = casting;
return this;
}
/**
* This is to set the row which the unmarshall will
* use to start reading header titles, incase the
* header is not in row 0.
*
* @param headerStart an index number of the excel header to start reading header
* @return this
*/
public PoijiOptionsBuilder headerStart(int headerStart) {
if (headerStart < 0) {
throw new PoijiException("Header index must be greater than or equal to 0");
}
this.headerStart = headerStart;
return this;
} |
<<<<<<<
import cucumber.junit.Cucumber;
=======
>>>>>>>
import cucumber.junit.Cucumber; |
<<<<<<<
@NameToken(NameTokens.DETAIL_MANUFACTURER)
@UseGatekeeper(LoggedInGatekeeper.class)
=======
@NameToken(NameTokens.detailManufacturer)
>>>>>>>
@NameToken(NameTokens.DETAIL_MANUFACTURER) |
<<<<<<<
import com.gwtplatform.dispatch.client.gin.DispatchAsyncModule;
import com.gwtplatform.dispatch.shared.SecurityCookie;
=======
import com.gwtplatform.dispatch.rpc.client.gin.RpcDispatchAsyncModule;
>>>>>>>
import com.gwtplatform.dispatch.rpc.client.gin.RpcDispatchAsyncModule;
import com.gwtplatform.dispatch.shared.SecurityCookie;
<<<<<<<
// Security Cookie
bindConstant().annotatedWith(SecurityCookie.class).to(COOKIE_NAME);
=======
bind(ResourceLoader.class).asEagerSingleton();
>>>>>>>
// Security Cookie
bindConstant().annotatedWith(SecurityCookie.class).to(COOKIE_NAME);
bind(ResourceLoader.class).asEagerSingleton(); |
<<<<<<<
public class LoginPresenter extends Presenter<LoginPresenter.MyView, LoginPresenter.MyProxy>
implements LoginUiHandlers {
=======
public class LoginPresenter extends Presenter<LoginPresenter.MyView, LoginPresenter.MyProxy> implements
LoginUiHandlers {
>>>>>>>
public class LoginPresenter extends Presenter<LoginPresenter.MyView, LoginPresenter.MyProxy>
implements LoginUiHandlers {
<<<<<<<
LoginPresenter(EventBus eventBus,
MyView view,
MyProxy proxy,
PlaceManager placeManager,
DispatchAsync dispatchAsync,
CurrentUser currentUser,
LoginMessages messages) {
=======
public LoginPresenter(
EventBus eventBus,
MyView view, MyProxy proxy,
PlaceManager placeManager,
DispatchAsync dispatchAsync,
SessionService sessionService,
CurrentUser currentUser,
LoginMessages messages) {
>>>>>>>
LoginPresenter(EventBus eventBus,
MyView view,
MyProxy proxy,
PlaceManager placeManager,
DispatchAsync dispatchAsync,
SessionService sessionService,
CurrentUser currentUser,
LoginMessages messages) { |
<<<<<<<
public Response getAverageRatings() {
List<RatingDto> ratingDtos = Rating.createDto(ratingDao.getAll());
List<ManufacturerRatingDto> averageCarRatings = reportService.getAverageCarRatings(ratingDtos);
return Response.ok(averageCarRatings).build();
=======
public GetResults<ManufacturerRatingDto> getAverageRatings() {
List<Rating> ratings = ratingDao.getAll();
List<RatingDto> ratingDtos = Rating.createDto(ratings);
List<ManufacturerRatingDto> manufacturerRatingDtos = reportService.getAverageCarRatings(ratingDtos);
return new GetResults<ManufacturerRatingDto>(manufacturerRatingDtos);
>>>>>>>
public Response getAverageRatings() {
List<Rating> ratings = ratingDao.getAll();
List<RatingDto> ratingDtos = Rating.createDto(ratings);
List<ManufacturerRatingDto> averageCarRatings = reportService.getAverageCarRatings(ratingDtos);
return Response.ok(averageCarRatings).build(); |
<<<<<<<
/**
* @return the default value
*/
public long getDefault() {
return defaultValue;
}
=======
>>>>>>>
/**
* @return the default value
*/
public long getDefault() {
return defaultValue;
} |
<<<<<<<
import android.support.v4.graphics.ColorUtils;
=======
import android.support.v4.graphics.ColorUtils;
import android.text.TextUtils;
>>>>>>>
import android.support.v4.graphics.ColorUtils;
import android.support.v4.graphics.ColorUtils;
import android.text.TextUtils;
<<<<<<<
private int[] mColors = new int[]{
0xffe62a10, 0xffe91e63, 0xff9c27b0, 0xff673ab7, 0xff3f51b5,
0xff5677fc, 0xff03a9f4, 0xff00bcd4, 0xff009688, 0xff259b24,
0xff8bc34a, 0xffcddc39, 0xffffeb3b, 0xffffc107, 0xffff9800, 0xffff5722};
=======
private int[] mColors = new int[]{0xffe62a10, 0xffe91e63, 0xff9c27b0, 0xff673ab7, 0xff3f51b5,
0xff5677fc, 0xff03a9f4, 0xff00bcd4, 0xff009688, 0xff259b24,
0xff8bc34a, 0xffcddc39, 0xffffeb3b, 0xffffc107, 0xffff9800, 0xffff5722};
>>>>>>>
private int[] mColors = new int[]{0xffe62a10, 0xffe91e63, 0xff9c27b0, 0xff673ab7, 0xff3f51b5,
0xff5677fc, 0xff03a9f4, 0xff00bcd4, 0xff009688, 0xff259b24,
0xff8bc34a, 0xffcddc39, 0xffffeb3b, 0xffffc107, 0xffff9800, 0xffff5722};
<<<<<<<
=======
itemData = itemData.trim();
vh.tvText.setVisibility(View.VISIBLE);
vh.ivImage.setVisibility(View.VISIBLE);
vh.tvText.setText(itemData);
Glide.with(vh.ivImage.getContext())
.load(itemData)
.fitCenter()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.listener(new RequestListener<String, GlideDrawable>() {
@Override
public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) {
vh.ivImage.setVisibility(View.INVISIBLE);
vh.tvText.setVisibility(View.VISIBLE);
return false;
}
@Override
public boolean onResourceReady(GlideDrawable resource, String model, Target<GlideDrawable> target, boolean isFromMemoryCache, boolean isFirstResource) {
vh.ivImage.setVisibility(View.VISIBLE);
vh.tvText.setVisibility(View.INVISIBLE);
return false;
}
})
.into(vh.ivImage);
>>>>>>>
itemData = itemData.trim();
vh.tvText.setVisibility(View.VISIBLE);
vh.ivImage.setVisibility(View.VISIBLE);
vh.tvText.setText(itemData);
Glide.with(vh.ivImage.getContext())
.load(itemData)
.fitCenter()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.listener(new RequestListener<String, GlideDrawable>() {
@Override
public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) {
vh.ivImage.setVisibility(View.INVISIBLE);
vh.tvText.setVisibility(View.VISIBLE);
return false;
}
@Override
public boolean onResourceReady(GlideDrawable resource, String model, Target<GlideDrawable> target, boolean isFromMemoryCache, boolean isFirstResource) {
vh.ivImage.setVisibility(View.VISIBLE);
vh.tvText.setVisibility(View.INVISIBLE);
return false;
}
})
.into(vh.ivImage);
<<<<<<<
switch (column) {
case COLUMN_DATE_OF_BIRTH:
case COLUMN_PHOTO:
case COLUMN_FOOTBALL_TEAM:
return 300;
case COLUMN_NAME:
return 400;
case COLUMN_POSITION:
return 200;
default:
return 100;
}
=======
return 200;
>>>>>>>
return 200; |
<<<<<<<
private static final int SHADOW_THICK = 25;
=======
private static final String EXTRA_STATE_SUPER = "EXTRA_STATE_SUPER";
private static final String EXTRA_STATE_VIEW_GROUP = "EXTRA_STATE_VIEW_GROUP";
>>>>>>>
private static final String EXTRA_STATE_SUPER = "EXTRA_STATE_SUPER";
private static final String EXTRA_STATE_VIEW_GROUP = "EXTRA_STATE_VIEW_GROUP";
private static final int SHADOW_THICK = 25;
<<<<<<<
private final TableManager mManager = new TableManager();
=======
private TableManager mManager;
>>>>>>>
private TableManager mManager;
<<<<<<<
private final Rect mVisibleArea = new Rect();
=======
private Rect mVisibleArea;
>>>>>>>
private Rect mVisibleArea;
<<<<<<<
/**
* Helps work with row' or column' shadows.
*/
private ShadowHelper mShadowHelper;
=======
private boolean mIsHeaderFixed;
/**
* Instant state
*/
@Nullable
private TableInstanceSaver mSaver;
>>>>>>>
/**
* Helps work with row' or column' shadows.
*/
private ShadowHelper mShadowHelper;
private boolean mIsHeaderFixed;
/**
* Instant state
*/
@Nullable
private TableInstanceSaver mSaver;
<<<<<<<
if (holder.isDragging()) {
View leftShadow = mShadowHelper.getLeftShadow();
View rightShadow = mShadowHelper.getRightShadow();
if (leftShadow != null) {
int shadowRight = left - mState.getScrollX();
leftShadow.layout(Math.max(mManager.getHeaderRowWidth(), shadowRight - SHADOW_THICK),
0, shadowRight, mSettings.getLayoutHeight());
leftShadow.bringToFront();
}
if (rightShadow != null) {
int shadowLeft = left + mManager.getColumnWidth(holder.getColumnIndex()) - mState.getScrollX();
rightShadow.layout(Math.max(mManager.getHeaderRowWidth(), shadowLeft),
0, shadowLeft + SHADOW_THICK, mSettings.getLayoutHeight());
rightShadow.bringToFront();
}
}
=======
//noinspection ResourceType
>>>>>>>
if (holder.isDragging()) {
View leftShadow = mShadowHelper.getLeftShadow();
View rightShadow = mShadowHelper.getRightShadow();
if (leftShadow != null) {
int shadowRight = left - mState.getScrollX();
leftShadow.layout(Math.max(mManager.getHeaderRowWidth(), shadowRight - SHADOW_THICK),
0, shadowRight, mSettings.getLayoutHeight());
leftShadow.bringToFront();
}
if (rightShadow != null) {
int shadowLeft = left + mManager.getColumnWidth(holder.getColumnIndex()) - mState.getScrollX();
rightShadow.layout(Math.max(mManager.getHeaderRowWidth(), shadowLeft),
0, shadowLeft + SHADOW_THICK, mSettings.getLayoutHeight());
rightShadow.bringToFront();
}
}
//noinspection ResourceType
<<<<<<<
if (holder.isDragging()) {
View topShadow = mShadowHelper.getTopShadow();
View bottomShadow = mShadowHelper.getBottomShadow();
if (topShadow != null) {
int shadowTop = top - mState.getScrollY();
topShadow.layout(0,
Math.max(mManager.getHeaderColumnHeight(), shadowTop - SHADOW_THICK),
mSettings.getLayoutWidth(),
shadowTop);
topShadow.bringToFront();
}
if (bottomShadow != null) {
int shadowBottom = top - mState.getScrollY() + mManager.getRowHeight(holder.getRowIndex());
bottomShadow.layout(
0,
Math.max(mManager.getHeaderColumnHeight(), shadowBottom),
mSettings.getLayoutWidth(),
shadowBottom + SHADOW_THICK);
bottomShadow.bringToFront();
}
}
view.layout(0,
=======
//noinspection ResourceType
view.layout(left,
>>>>>>>
if (holder.isDragging()) {
View topShadow = mShadowHelper.getTopShadow();
View bottomShadow = mShadowHelper.getBottomShadow();
if (topShadow != null) {
int shadowTop = top - mState.getScrollY();
topShadow.layout(0,
Math.max(mManager.getHeaderColumnHeight(), shadowTop - SHADOW_THICK),
mSettings.getLayoutWidth(),
shadowTop);
topShadow.bringToFront();
}
if (bottomShadow != null) {
int shadowBottom = top - mState.getScrollY() + mManager.getRowHeight(holder.getRowIndex());
bottomShadow.layout(
0,
Math.max(mManager.getHeaderColumnHeight(), shadowBottom),
mSettings.getLayoutWidth(),
shadowBottom + SHADOW_THICK);
bottomShadow.bringToFront();
}
}
//noinspection ResourceType
view.layout(left,
<<<<<<<
mShadowHelper.addLeftShadow(this);
mShadowHelper.addRightShadow(this);
return true;
=======
>>>>>>>
mShadowHelper.addLeftShadow(this);
mShadowHelper.addRightShadow(this);
return true;
<<<<<<<
mShadowHelper.addTopShadow(this);
mShadowHelper.addBottomShadow(this);
return true;
=======
>>>>>>>
mShadowHelper.addTopShadow(this);
mShadowHelper.addBottomShadow(this);
return true; |
<<<<<<<
import android.content.Context;
=======
import android.support.annotation.NonNull;
>>>>>>>
import android.content.Context;
import android.support.annotation.NonNull;
<<<<<<<
public static void showNotImplementedYet(final Context context) {
showToast(context, context.getString(R.string.not_implemented_yet));
}
public static void showToast(final Context context, final String message) {
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
=======
// Calculates the number of days between epoch == 0 (Jan 1, 1970) and now
public static int getDaysSinceEpoch() {
return getEpoch().numDaysFrom(DateTime.forInstant(new Date().getTime(), TimeZone.getDefault())) + 1;
}
@NonNull
public static DateTime getEpoch() {
return DateTime.forInstant(0, TimeZone.getDefault());
}
>>>>>>>
public static void showNotImplementedYet(final Context context) {
showToast(context, context.getString(R.string.not_implemented_yet));
}
public static void showToast(final Context context, final String message) {
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
// Calculates the number of days between epoch == 0 (Jan 1, 1970) and now
public static int getDaysSinceEpoch() {
return getEpoch().numDaysFrom(DateTime.forInstant(new Date().getTime(), TimeZone.getDefault())) + 1;
}
@NonNull
public static DateTime getEpoch() {
return DateTime.forInstant(0, TimeZone.getDefault());
} |
<<<<<<<
private static final String TS_VALID_HOSTS = "valid_hosts";
=======
private static final String TS_INSTALL_PY_DEP_PER_MODEL = "install_py_dep_per_model";
>>>>>>>
private static final String TS_VALID_HOSTS = "valid_hosts";
private static final String TS_INSTALL_PY_DEP_PER_MODEL = "install_py_dep_per_model";
<<<<<<<
+ prop.getProperty(TS_PREFER_DIRECT_BUFFER, "false")
+ "\nValid host Urls: "
+ getValidHosts();
=======
+ prop.getProperty(TS_PREFER_DIRECT_BUFFER, "false")
+ "\nCustom python dependency for model allowed: "
+ prop.getProperty(TS_INSTALL_PY_DEP_PER_MODEL, "false");
>>>>>>>
+ prop.getProperty(TS_PREFER_DIRECT_BUFFER, "false")
+ "\nValid host Urls: "
+ getValidHosts()
+ "\nCustom python dependency for model allowed: "
+ prop.getProperty(TS_INSTALL_PY_DEP_PER_MODEL, "false"); |
<<<<<<<
assertEquals(commands.get(2).toString(), "{'command'='sudo sh -c \"echo -e 'localhost' >> /etc/puppet/autosign.conf\"', 'agent'='LocalAgent'}");
assertEquals(commands.get(3).toString(), format("{'command'='yum clean all', 'agent'='LocalAgent'}"));
assertEquals(commands.get(4).toString(), format("{'command'='if [ \"`yum list installed | grep puppetlabs-release`\" == \"\" ]; then sudo yum -y -q install null; fi', 'agent'='{'host'='localhost', 'port'='22', 'user'='%s', 'identity'='[~/.ssh/id_rsa]'}'}", SYSTEM_USER_NAME));
assertEquals(commands.get(5).toString(), format("{'command'='sudo yum -y -q install null', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}", SYSTEM_USER_NAME));
assertEquals(commands.get(6).toString(), format("{'command'='sudo systemctl enable puppet', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}", SYSTEM_USER_NAME));
assertTrue(commands.get(7).toString().matches(format("\\{'command'='sudo cp /etc/puppet/puppet.conf /etc/puppet/puppet.conf.back ; sudo cp /etc/puppet/puppet.conf /etc/puppet/puppet.conf.back.[0-9]+ ; ', 'agent'='\\{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='\\[~/.ssh/id_rsa\\]'\\}'\\}", SYSTEM_USER_NAME)),
commands.get(7).toString());
assertEquals(commands.get(8).toString(), format("{'command'='sudo sed -i 's/\\[main\\]/\\[main\\]\\n server = null\\n runinterval = 420\\n configtimeout = 600\\n/g' /etc/puppet/puppet.conf', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}", SYSTEM_USER_NAME));
assertEquals(commands.get(9).toString(), format("{'command'='sudo sed -i 's/\\[agent\\]/\\[agent\\]\\n show_diff = true\\n pluginsync = true\\n report = true\\n default_schedules = false\\n certname = localhost\\n/g' /etc/puppet/puppet.conf', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}", SYSTEM_USER_NAME));
assertEquals(commands.get(10).toString(), format("{'command'='sudo systemctl start puppet', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}", SYSTEM_USER_NAME));
assertEquals(commands.get(11).toString(), format("{'command'='doneState=\"Installing\"; testFile=\"/home/codenvy/codenvy-tomcat/logs/catalina.out\"; while [ \"${doneState}\" != \"Installed\" ]; do if sudo test -f ${testFile}; then doneState=\"Installed\"; fi; sleep 30; done', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}", SYSTEM_USER_NAME));
assertEquals(commands.get(12).toString(), format("{'command'='sudo puppet agent --onetime --ignorecache --no-daemonize --no-usecacheonfailure --no-splay; exit 0;', 'agent'='{'host'='127.0.0.1', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}", SYSTEM_USER_NAME));
assertEquals(commands.get(13).toString(), format("{'command'='testFile=\"/home/codenvy/codenvy-data/conf/general.properties\"; while true; do if sudo grep \"test_runner_node_url$\" ${testFile}; then break; fi; sleep 5; done; sleep 15; # delay to involve into start of rebooting api server', 'agent'='{'host'='127.0.0.1', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}", SYSTEM_USER_NAME));
assertEquals(commands.get(14).toString(), "Wait until artifact 'mockCdecArtifact' becomes alive");
=======
assertTrue(commands.get(2).toString().matches("\\{'command'='sudo cp /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP
+ " /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP + ".back ; "
+ "sudo cp /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP
+ " /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP + ".back.[0-9]+ ; "
+ "', 'agent'='LocalAgent'\\}"));
assertEquals(commands.get(3).toString(),
"{'command'='sudo cat /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP + " " +
"| sed ':a;N;$!ba;s/\\n/~n/g' " +
"| sed 's|$additional_runners *= *\"[^\"]*\"|$additional_runners = \"test_runner_node_url\"|g' " +
"| sed 's|~n|\\n|g' > tmp.tmp " +
"&& sudo mv tmp.tmp /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP + "', 'agent'='LocalAgent'}");
assertEquals(commands.get(4).toString(),
"{'command'='sudo sh -c \"echo -e 'localhost' >> /etc/puppet/autosign.conf\"', 'agent'='LocalAgent'}");
assertEquals(commands.get(5).toString(), format("{'command'='yum clean all', 'agent'='LocalAgent'}"));
assertEquals(commands.get(6).toString(),
format("{'command'='yum list installed | grep puppetlabs-release.noarch; if [ $? -ne 0 ]; then sudo yum -y -q install null; fi', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(7).toString(),
format("{'command'='sudo yum -y -q install null', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(8).toString(),
format("{'command'='sudo systemctl enable puppet', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertTrue(commands.get(9).toString().matches(
format("\\{'command'='sudo cp /etc/puppet/puppet.conf /etc/puppet/puppet.conf.back ; sudo cp /etc/puppet/puppet.conf /etc/puppet/puppet.conf.back.[0-9]+ ; ', 'agent'='\\{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='\\[~/.ssh/id_rsa\\]'\\}'\\}",
SYSTEM_USER_NAME)),
commands.get(9).toString());
assertEquals(commands.get(10).toString(),
format("{'command'='sudo sed -i 's/\\[main\\]/\\[main\\]\\n server = null\\n runinterval = 420\\n configtimeout = 600\\n/g' /etc/puppet/puppet.conf', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(11).toString(),
format("{'command'='sudo sed -i 's/\\[agent\\]/\\[agent\\]\\n show_diff = true\\n pluginsync = true\\n report = true\\n default_schedules = false\\n certname = localhost\\n/g' /etc/puppet/puppet.conf', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(12).toString(),
format("{'command'='sudo systemctl start puppet', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(13).toString(),
format("{'command'='doneState=\"Installing\"; testFile=\"/home/codenvy/codenvy-tomcat/logs/catalina.out\"; while [ \"${doneState}\" != \"Installed\" ]; do if sudo test -f ${testFile}; then doneState=\"Installed\"; fi; sleep 30; done', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(14).toString(),
format("{'command'='sudo puppet agent --onetime --ignorecache --no-daemonize --no-usecacheonfailure --no-splay; exit 0;', 'agent'='{'host'='127.0.0.1', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(15).toString(),
format("{'command'='testFile=\"/home/codenvy/codenvy-data/conf/general.properties\"; while true; do if sudo grep \"test_runner_node_url$\" ${testFile}; then break; fi; sleep 5; done; sleep 15; # delay to involve into start of rebooting api server', 'agent'='{'host'='127.0.0.1', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(16).toString(), "Wait until artifact 'mockCdecArtifact' becomes alive");
>>>>>>>
assertTrue(commands.get(2).toString().matches("\\{'command'='sudo cp /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP
+ " /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP + ".back ; "
+ "sudo cp /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP
+ " /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP + ".back.[0-9]+ ; "
+ "', 'agent'='LocalAgent'\\}"));
assertEquals(commands.get(3).toString(),
"{'command'='sudo cat /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP + " " +
"| sed ':a;N;$!ba;s/\\n/~n/g' " +
"| sed 's|$additional_runners *= *\"[^\"]*\"|$additional_runners = \"test_runner_node_url\"|g' " +
"| sed 's|~n|\\n|g' > tmp.tmp " +
"&& sudo mv tmp.tmp /etc/puppet/" + Config.MULTI_SERVER_BASE_CONFIG_PP + "', 'agent'='LocalAgent'}");
assertEquals(commands.get(4).toString(),
"{'command'='sudo sh -c \"echo -e 'localhost' >> /etc/puppet/autosign.conf\"', 'agent'='LocalAgent'}");
assertEquals(commands.get(5).toString(), format("{'command'='yum clean all', 'agent'='LocalAgent'}"));
assertEquals(commands.get(6).toString(),
format("{'command'='if [ \"`yum list installed | grep puppetlabs-release`\" == \"\" ]; then sudo yum -y -q install null; fi', 'agent'='{'host'='localhost', 'port'='22', 'user'='%s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(7).toString(),
format("{'command'='sudo yum -y -q install null', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(8).toString(),
format("{'command'='sudo systemctl enable puppet', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertTrue(commands.get(9).toString().matches(
format("\\{'command'='sudo cp /etc/puppet/puppet.conf /etc/puppet/puppet.conf.back ; sudo cp /etc/puppet/puppet.conf /etc/puppet/puppet.conf.back.[0-9]+ ; ', 'agent'='\\{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='\\[~/.ssh/id_rsa\\]'\\}'\\}",
SYSTEM_USER_NAME)),
commands.get(9).toString());
assertEquals(commands.get(10).toString(),
format("{'command'='sudo sed -i 's/\\[main\\]/\\[main\\]\\n server = null\\n runinterval = 420\\n configtimeout = 600\\n/g' /etc/puppet/puppet.conf', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(11).toString(),
format("{'command'='sudo sed -i 's/\\[agent\\]/\\[agent\\]\\n show_diff = true\\n pluginsync = true\\n report = true\\n default_schedules = false\\n certname = localhost\\n/g' /etc/puppet/puppet.conf', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(12).toString(),
format("{'command'='sudo systemctl start puppet', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(13).toString(),
format("{'command'='doneState=\"Installing\"; testFile=\"/home/codenvy/codenvy-tomcat/logs/catalina.out\"; while [ \"${doneState}\" != \"Installed\" ]; do if sudo test -f ${testFile}; then doneState=\"Installed\"; fi; sleep 30; done', 'agent'='{'host'='localhost', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(14).toString(),
format("{'command'='sudo puppet agent --onetime --ignorecache --no-daemonize --no-usecacheonfailure --no-splay; exit 0;', 'agent'='{'host'='127.0.0.1', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(15).toString(),
format("{'command'='testFile=\"/home/codenvy/codenvy-data/conf/general.properties\"; while true; do if sudo grep \"test_runner_node_url$\" ${testFile}; then break; fi; sleep 5; done; sleep 15; # delay to involve into start of rebooting api server', 'agent'='{'host'='127.0.0.1', 'port'='22', 'user'='%1$s', 'identity'='[~/.ssh/id_rsa]'}'}",
SYSTEM_USER_NAME));
assertEquals(commands.get(16).toString(), "Wait until artifact 'mockCdecArtifact' becomes alive"); |
<<<<<<<
import com.codenvy.im.request.Request;
import com.codenvy.im.response.Response;
import com.codenvy.im.response.ResponseCode;
import com.codenvy.im.service.InstallationManagerService;
import com.codenvy.im.service.UserCredentials;
import org.fusesource.jansi.Ansi;
=======
import com.codenvy.im.restlet.InstallationManagerService;
import com.codenvy.im.restlet.RestletClientFactory;
import com.codenvy.im.user.UserCredentials;
import org.restlet.ext.jackson.JacksonRepresentation;
import org.restlet.ext.jaxrs.internal.exceptions.IllegalPathException;
import org.restlet.ext.jaxrs.internal.exceptions.MissingAnnotationException;
>>>>>>>
import com.codenvy.im.request.Request;
import com.codenvy.im.response.Response;
import com.codenvy.im.response.ResponseCode;
import com.codenvy.im.service.InstallationManagerService;
import com.codenvy.im.service.UserCredentials;
import org.fusesource.jansi.Ansi;
<<<<<<<
import java.io.InputStreamReader;
import java.net.ConnectException;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;
=======
>>>>>>>
import java.io.InputStreamReader;
import java.net.ConnectException;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;
<<<<<<<
import static com.codenvy.im.utils.InjectorBootstrap.INJECTOR;
import static org.fusesource.jansi.Ansi.Color.GREEN;
import static org.fusesource.jansi.Ansi.Color.RED;
import static org.fusesource.jansi.Ansi.ansi;
=======
>>>>>>>
import static com.codenvy.im.utils.InjectorBootstrap.INJECTOR;
import static org.fusesource.jansi.Ansi.Color.GREEN;
import static org.fusesource.jansi.Ansi.Color.RED;
import static org.fusesource.jansi.Ansi.ansi;
<<<<<<<
service = INJECTOR.getInstance(InstallationManagerService.class);
=======
try {
installationManagerProxy = RestletClientFactory.createServiceProxy(InstallationManagerService.class);
} catch (MissingAnnotationException | IllegalPathException e) {
throw new IllegalStateException("Can't initialize proxy service", e);
}
try {
console = new Console(isInteractive());
} catch (IOException e) {
throw new IllegalStateException(e);
}
>>>>>>>
service = INJECTOR.getInstance(InstallationManagerService.class);
try {
console = new Console(isInteractive());
} catch (IOException e) {
throw new IllegalStateException(e);
}
<<<<<<<
protected void printError(Exception ex) {
if (isConnectionException(ex)) {
printError("It is impossible to connect to Installation Manager Service. It might be stopped or it is starting up right now, " +
"please retry a bit later.");
} else {
printError(Response.valueOf(ex).toJson());
}
}
protected boolean isConnectionException(Exception e) {
Throwable cause = e.getCause();
return cause != null && cause.getClass().getCanonicalName().equals(ConnectException.class.getCanonicalName());
}
protected void printError(String message) {
print(ansi().fg(RED).a(message).newline().reset(), false);
}
protected void printError(String message, boolean suppressCodenvyPrompt) {
print(ansi().fg(RED).a(message).newline().reset(), suppressCodenvyPrompt);
}
protected void printProgress(int percents) {
printProgress(createProgressBar(percents));
}
protected void printProgress(String message) {
System.out.print(ansi().saveCursorPosition().a(message).restorCursorPosition());
System.out.flush();
}
private String createProgressBar(int percent) {
StringBuilder bar = new StringBuilder("[");
for (int i = 0; i < 50; i++) {
if (i < (percent / 2)) {
bar.append("=");
} else if (i == (percent / 2)) {
bar.append(">");
} else {
bar.append(" ");
}
}
bar.append("] ").append(percent).append("% ");
return bar.toString();
}
protected void cleanCurrentLine() {
System.out.print(ansi().eraseLine(Ansi.Erase.ALL));
System.out.flush();
}
protected void cleanLineAbove() {
System.out.print(ansi().a(ansi().cursorUp(1).eraseLine(Ansi.Erase.ALL)));
System.out.flush();
}
protected void printLn(String message) {
print(message);
System.out.println();
}
protected void print(String message, boolean suppressCodenvyPrompt) {
if (!isInteractive() && !suppressCodenvyPrompt) {
printCodenvyPrompt();
}
System.out.print(message);
System.out.flush();
}
protected void print(String message) {
if (!isInteractive()) {
printCodenvyPrompt();
}
System.out.print(message);
System.out.flush();
}
private void print(Ansi ansi, boolean suppressCodenvyPrompt) {
if (!isInteractive() && !suppressCodenvyPrompt) {
printCodenvyPrompt();
}
System.out.print(ansi);
System.out.flush();
}
protected void printCodenvyPrompt() {
final String lightBlue = '\u001b' + "[94m";
System.out.print(ansi().a(lightBlue + "[CODENVY] ").reset()); // light blue
}
protected void printResponse(Object response) throws JsonParseException {
if (response instanceof Exception) {
printError((Exception)response);
return;
}
Response responseObj = Response.fromJson(response.toString());
if (responseObj.getStatus() != ResponseCode.OK) {
printErrorAndExitIfNotInteractive(response);
} else {
printLn(response.toString());
}
}
protected void printSuccess(String message, boolean suppressCodenvyPrompt) {
print(ansi().fg(GREEN).a(message).newline().reset(), suppressCodenvyPrompt);
}
protected void printSuccess(String message) {
print(ansi().fg(GREEN).a(message).newline().reset(), false);
}
/** @return "true" only if only user typed line equals "y". */
protected boolean askUser(String prompt) throws IOException {
print(prompt + " [y/N] ");
String userAnswer = readLine();
return userAnswer != null && userAnswer.equalsIgnoreCase("y");
}
/** @return line typed by user */
protected String readLine() throws IOException {
return doReadLine(null);
}
protected String readPassword() throws IOException {
return doReadLine('*');
}
private String doReadLine(@Nullable Character mask) throws IOException {
if (isInteractive()) {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(session.getKeyboard(), Charset.defaultCharset()))) {
return reader.readLine();
}
} else {
return new ConsoleReader().readLine(mask);
}
}
protected void pressAnyKey(String prompt) throws IOException {
print(prompt);
session.getKeyboard().read();
}
// protected String extractUrl(String )
=======
>>>>>>>
<<<<<<<
protected Request initRequest(String artifactName, String version) {
return new Request()
.setArtifactName(artifactName)
.setVersion(version)
.setUserCredentials(getCredentials());
}
protected Request initRequest() {
return new Request().setUserCredentials(getCredentials());
}
=======
>>>>>>>
protected Request initRequest(String artifactName, String version) {
return new Request()
.setArtifactName(artifactName)
.setVersion(version)
.setUserCredentials(getCredentials());
}
protected Request initRequest() {
return new Request().setUserCredentials(getCredentials());
} |
<<<<<<<
import com.codenvy.analytics.datamodel.LongValueData;
import com.codenvy.analytics.datamodel.ValueData;
import com.codenvy.analytics.datamodel.ValueDataUtil;
import com.codenvy.analytics.metrics.CalculatedMetric;
import com.codenvy.analytics.metrics.Context;
=======
import com.codenvy.analytics.metrics.AbstractLongValueResulted;
import com.codenvy.analytics.metrics.Expandable;
>>>>>>>
import com.codenvy.analytics.datamodel.LongValueData;
import com.codenvy.analytics.datamodel.ValueData;
import com.codenvy.analytics.datamodel.ValueDataUtil;
import com.codenvy.analytics.metrics.CalculatedMetric;
import com.codenvy.analytics.metrics.Context;
import com.codenvy.analytics.metrics.Expandable;
<<<<<<<
public class CodeCompletions extends CalculatedMetric {
=======
public class CodeCompletions extends AbstractLongValueResulted implements Expandable {
>>>>>>>
public class CodeCompletions extends CalculatedMetric implements Expandable {
<<<<<<<
super(MetricType.CODE_COMPLETIONS, new MetricType[]{MetricType.CODE_COMPLETIONS_BASED_ON_EVENT,
MetricType.CODE_COMPLETIONS_BASED_ON_IDE_USAGES});
}
@Override
public ValueData getValue(Context context) throws IOException {
LongValueData value1 = ValueDataUtil.getAsLong(basedMetric[0], context);
LongValueData value2 = ValueDataUtil.getAsLong(basedMetric[1], context);
return LongValueData.valueOf(value1.getAsLong() + value2.getAsLong());
}
@Override
public Class<? extends ValueData> getValueDataClass() {
return LongValueData.class;
=======
super(MetricType.CODE_COMPLETIONS, PROJECT_ID);
>>>>>>>
super(MetricType.CODE_COMPLETIONS, new MetricType[]{MetricType.CODE_COMPLETIONS_BASED_ON_EVENT,
MetricType.CODE_COMPLETIONS_BASED_ON_IDE_USAGES});
}
@Override
public ValueData getValue(Context context) throws IOException {
LongValueData value1 = ValueDataUtil.getAsLong(basedMetric[0], context);
LongValueData value2 = ValueDataUtil.getAsLong(basedMetric[1], context);
return value1.add(value2);
}
@Override
public Class<? extends ValueData> getValueDataClass() {
return LongValueData.class; |
<<<<<<<
=======
@Override
public String[] getTrackedFields() {
return new String[]{WS,
USER,
USER_COMPANY,
DOMAIN,
TIME,
SESSION_ID,
DATE,
END_TIME,
LOGOUT_INTERVAL};
}
@Override
public ValueData postComputation(ValueData valueData, Context clauses) throws IOException {
List<ValueData> list2Return = new ArrayList<>();
for (ValueData items : ((ListValueData)valueData).getAll()) {
MapValueData prevItems = (MapValueData)items;
Map<String, ValueData> items2Return = new HashMap<>(prevItems.getAll());
long delta = ValueDataUtil.treatAsLong(items2Return.get(TIME));
// replace empty session_id field on explanation message
if (items2Return.get(SESSION_ID).getAsString().isEmpty() && delta == 0) {
items2Return.put(SESSION_ID, StringValueData.valueOf(EMPTY_SESSION_MESSAGE));
}
list2Return.add(new MapValueData(items2Return));
}
return new ListValueData(list2Return);
}
@Override
public String getDescription() {
return "Users' sessions";
}
>>>>>>>
@Override
public String[] getTrackedFields() {
return new String[]{WS,
USER,
USER_COMPANY,
DOMAIN,
TIME,
SESSION_ID,
DATE,
END_TIME,
LOGOUT_INTERVAL};
}
@Override
public ValueData postComputation(ValueData valueData, Context clauses) throws IOException {
List<ValueData> list2Return = new ArrayList<>();
for (ValueData items : ((ListValueData)valueData).getAll()) {
MapValueData prevItems = (MapValueData)items;
Map<String, ValueData> items2Return = new HashMap<>(prevItems.getAll());
long delta = ValueDataUtil.treatAsLong(items2Return.get(TIME));
// replace empty session_id field on explanation message
if (items2Return.get(SESSION_ID).getAsString().isEmpty() && delta == 0) {
items2Return.put(SESSION_ID, StringValueData.valueOf(EMPTY_SESSION_MESSAGE));
}
list2Return.add(new MapValueData(items2Return));
}
return new ListValueData(list2Return);
}
@Override
public String getDescription() {
return "Users' sessions";
} |
<<<<<<<
import java.util.Collections;
import java.util.HashMap;
=======
>>>>>>>
<<<<<<<
accountCollection.createIndex(new BasicDBObject("id", 1), new BasicDBObject("unique", true));
accountCollection.createIndex(new BasicDBObject("name", 1));
accountCollection.createIndex(new BasicDBObject("attributes.name", 1).append("attributes.value", 1));
subscriptionCollection = db.getCollection(subscriptionCollectionName);
subscriptionCollection.createIndex(new BasicDBObject("id", 1), new BasicDBObject("unique", true));
subscriptionCollection.createIndex(new BasicDBObject("accountId", 1));
subscriptionCollection.createIndex(new BasicDBObject("state", 1));
subscriptionCollection.createIndex(new BasicDBObject("serviceId", 1));
subscriptionCollection.createIndex(new BasicDBObject("nextBillingDate", 1));
subscriptionCollection.createIndex(new BasicDBObject("trialEndDate", 1));
subscriptionCollection.createIndex(new BasicDBObject("endDate", 1));
=======
accountCollection.ensureIndex(new BasicDBObject("id", 1), new BasicDBObject("unique", true));
accountCollection.ensureIndex(new BasicDBObject("name", 1));
accountCollection.ensureIndex(new BasicDBObject("attributes.name", 1).append("attributes.value", 1));
>>>>>>>
accountCollection.createIndex(new BasicDBObject("id", 1), new BasicDBObject("unique", true));
accountCollection.createIndex(new BasicDBObject("name", 1));
accountCollection.createIndex(new BasicDBObject("attributes.name", 1).append("attributes.value", 1));
<<<<<<<
* Converts database object to subscription ready-to-use object
*/
static Subscription toSubscription(Object dbObject) {
final BasicDBObject basicSubscriptionObj = (BasicDBObject)dbObject;
@SuppressWarnings("unchecked") //properties is always Map of Strings
final Map<String, String> properties = new HashMap<>((Map<String, String>)basicSubscriptionObj.get("properties"));
Subscription subscription = new Subscription().withId(basicSubscriptionObj.getString("id"))
.withAccountId(basicSubscriptionObj.getString("accountId"))
.withServiceId(basicSubscriptionObj.getString("serviceId"))
.withPlanId(basicSubscriptionObj.getString("planId"))
.withProperties(properties)
.withTrialStartDate(basicSubscriptionObj.getDate("trialStartDate"))
.withTrialEndDate(basicSubscriptionObj.getDate("trialEndDate"))
.withStartDate(basicSubscriptionObj.getDate("startDate"))
.withEndDate(basicSubscriptionObj.getDate("endDate"))
.withBillingStartDate(basicSubscriptionObj.getDate("billingStartDate"))
.withBillingEndDate(basicSubscriptionObj.getDate("billingEndDate"))
.withNextBillingDate(basicSubscriptionObj.getDate("nextBillingDate"))
.withBillingContractTerm(basicSubscriptionObj.containsField("billingContractTerm") ?
basicSubscriptionObj.getInt("billingContractTerm") :
null)
.withBillingCycle(basicSubscriptionObj.containsField("billingCycle") ?
basicSubscriptionObj.getInt("billingCycle") :
null)
.withDescription(basicSubscriptionObj.getString("description"))
.withUsePaymentSystem(basicSubscriptionObj.containsField("usePaymentSystem") ?
basicSubscriptionObj.getBoolean("usePaymentSystem") :
null);
final String state = basicSubscriptionObj.getString("state");
if (state != null) {
subscription.setState(SubscriptionState.valueOf(state));
}
final String billingCycleType = basicSubscriptionObj.getString("billingCycleType");
if (billingCycleType != null) {
subscription.setBillingCycleType(BillingCycleType.valueOf(billingCycleType));
}
return subscription;
}
/**
=======
>>>>>>> |
<<<<<<<
import com.codenvy.im.utils.che.AccountUtils;
=======
import com.codenvy.im.system.PasswordManager;
import com.codenvy.im.utils.AccountUtils;
>>>>>>>
import com.codenvy.im.utils.che.AccountUtils;
import com.codenvy.im.system.PasswordManager; |
<<<<<<<
public void testAuthenticationRequiredProperty() throws IOException, JsonParseException {
when(mockTransport.doGetRequest("/repository/properties/installation-manager/1.0.1"))
=======
public void testAuthenticationRequiredProperty() throws IOException {
when(mockTransport.doGet("/repository/properties/installation-manager/1.0.1"))
>>>>>>>
public void testAuthenticationRequiredProperty() throws IOException, JsonParseException {
when(mockTransport.doGet("/repository/properties/installation-manager/1.0.1"))
<<<<<<<
public void testSubsctiptionProperty() throws IOException, JsonParseException {
when(mockTransport.doGetRequest("/repository/properties/installation-manager/1.0.1"))
=======
public void testSubsctiptionProperty() throws IOException {
when(mockTransport.doGet("/repository/properties/installation-manager/1.0.1"))
>>>>>>>
public void testSubsctiptionProperty() throws IOException, JsonParseException {
when(mockTransport.doGet("/repository/properties/installation-manager/1.0.1")) |
<<<<<<<
import com.codenvy.im.utils.Commons;
=======
import com.codenvy.im.saas.SaasAccountServiceProxy;
import com.codenvy.im.saas.SaasAuthServiceProxy;
import com.codenvy.im.saas.SaasUserCredentials;
>>>>>>>
import com.codenvy.im.saas.SaasAccountServiceProxy;
import com.codenvy.im.saas.SaasAuthServiceProxy;
import com.codenvy.im.saas.SaasUserCredentials;
import com.codenvy.im.utils.Commons; |
<<<<<<<
import java.lang.reflect.Type;
=======
import java.io.OutputStream;
>>>>>>>
import java.io.OutputStream;
import java.lang.reflect.Type;
<<<<<<<
/** Translates JSON to object. TODO add test */
@Nullable
public static <T> T fromJson(String json, Class<T> clazz) throws JsonParseException {
return JsonHelper.fromJson(json, clazz, null);
}
/** Translates JSON to object. TODO add test */
@Nullable
public static <T> T fromJson(String json, Class<T> clazz, Type type) throws JsonParseException {
return JsonHelper.fromJson(json, clazz, type);
}
/** Translates object to JSON without null fields and with order defined by @JsonPropertyOrder annotation above the class. TODO add test */
public static String toJson(Object obj) {
try {
return jsonWriter.writeValueAsString(obj);
} catch (JsonProcessingException e) {
return null;
}
=======
/** Translates DTO object to JSON. */
public static <DTO> String toJson(DTO dtoInterface) {
return DtoFactory.getInstance().toJson(dtoInterface);
}
/** Translates JSON to object. */
public static <T> T fromJson(String json, Class<T> t) {
return gson.fromJson(json, t);
>>>>>>>
/** Translates JSON to object. */
@Nullable
public static <T> T fromJson(String json, Class<T> clazz) throws JsonParseException {
return JsonHelper.fromJson(json, clazz, null);
}
/** Translates JSON to object. TODO add test */
@Nullable
public static <T> T fromJson(String json, Class<T> clazz, Type type) throws JsonParseException {
return JsonHelper.fromJson(json, clazz, type);
}
/** Translates object to JSON without null fields and with order defined by @JsonPropertyOrder annotation above the class. TODO add test */
public static String toJson(Object obj) {
try {
return jsonWriter.writeValueAsString(obj);
} catch (JsonProcessingException e) {
return null;
} |
<<<<<<<
=======
import java.io.IOException;
import java.nio.file.Paths;
import org.quartz.SchedulerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.codenvy.cdec.artifacts.InstallManagerArtifact;
import com.codenvy.cdec.im.InstallationManagerApplication;
>>>>>>>
import java.io.IOException;
import org.quartz.SchedulerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.codenvy.cdec.im.InstallationManagerApplication;
<<<<<<<
import org.quartz.SchedulerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.rmi.AlreadyBoundException;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
=======
>>>>>>> |
<<<<<<<
import com.codenvy.api.workspace.server.dao.WorkspaceDao;
import com.codenvy.dto.server.DtoFactory;
=======
>>>>>>>
import com.codenvy.api.workspace.server.dao.WorkspaceDao; |
<<<<<<<
* @build jdk.testlibrary.* Agent BadAgent RedefineAgent Application Shutdown RedefineDummy
=======
* @run build Agent BadAgent RedefineAgent Application Shutdown RedefineDummy RunnerUtil
>>>>>>>
* @build jdk.testlibrary.* Agent BadAgent RedefineAgent Application Shutdown RedefineDummy RunnerUtil |
<<<<<<<
String json = transport.doGetRequest(combinePaths(updateEndpoint, "repository/info/" + NAME)); // TODO needs authentication on https://codenvy.com/update/repository/info/cdec to avoid IOException
=======
// TODO if absent? WTF TO DO?
String json = transport.doGetRequest(combinePaths(updateEndpoint, "repository/info/" + NAME));
>>>>>>>
// TODO if absent? WTF TO DO?
String json = transport.doGetRequest(combinePaths(updateEndpoint, "repository/info/" + NAME)); // TODO needs authentication on https://codenvy.com/update/repository/info/cdec to avoid IOException |
<<<<<<<
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.startsWith;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
=======
>>>>>>>
<<<<<<<
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
=======
>>>>>>> |
<<<<<<<
import com.codenvy.im.artifacts.ArtifactProperties;
=======
>>>>>>>
<<<<<<<
// TODO test
public List<String> getInstallInfo(Artifact artifact, String version, InstallOptions options) throws IOException {
return installer.getInstallInfo(artifact, options);
}
/** {@inheritDoc} */
@Override
public void install(String authToken, Artifact artifact, String version, InstallOptions options) throws IOException {
Map<Artifact, SortedMap<Version, Path>> downloadedArtifacts = getDownloadedArtifacts();
Version v = Version.valueOf(version);
if (downloadedArtifacts.containsKey(artifact) && downloadedArtifacts.get(artifact).containsKey(v)) {
Path pathToBinaries = downloadedArtifacts.get(artifact).get(v);
if (artifact.isInstallable(v, authToken)) {
installer.install(artifact, Version.valueOf(version), options);
=======
public void install(String authToken, Artifact artifact, Version version, InstallOptions options) throws IOException, CommandException {
SortedMap<Version, Path> downloadedVersions = artifact.getDownloadedVersions(downloadDir, updateEndpoint, transport);
if (downloadedVersions.containsKey(version)) {
Path pathToBinaries = downloadedVersions.get(version);
if (artifact.isInstallable(version, authToken)) {
artifact.install(pathToBinaries, options);
>>>>>>>
public List<String> getInstallInfo(Artifact artifact, Version version, InstallOptions options) throws IOException {
return installer.getInstallInfo(artifact, options);
}
/** {@inheritDoc} */
@Override
public void install(String authToken, Artifact artifact, Version version, InstallOptions options) throws IOException {
Map<Artifact, SortedMap<Version, Path>> downloadedArtifacts = getDownloadedArtifacts();
if (downloadedArtifacts.containsKey(artifact) && downloadedArtifacts.get(artifact).containsKey(version)) {
Path pathToBinaries = downloadedArtifacts.get(artifact).get(version);
if (artifact.isInstallable(version, authToken)) {
installer.install(artifact, version, options); |
<<<<<<<
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
=======
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.when;
>>>>>>>
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.when;
<<<<<<<
public void init() throws Exception {
initMocks();
installationManagerService = new InstallationManagerServiceImpl(mockInstallationManager, transport, new DownloadDescriptorHolder());
=======
public void init() {
MockitoAnnotations.initMocks(this);
installationManagerService =
new InstallationManagerServiceImpl(mockInstallationManager, mockTransport, new DownloadDescriptorHolder());
>>>>>>>
public void init() throws Exception {
installationManagerService = new InstallationManagerServiceImpl(mockInstallationManager, mockTransport, new DownloadDescriptorHolder());
MockitoAnnotations.initMocks(this);
<<<<<<<
public void initMocks() throws Exception {
mockInstallationManager = mock(InstallationManagerImpl.class);
transport = mock(HttpTransport.class);
installManagerArtifact = ArtifactFactory.createArtifact(InstallManagerArtifact.NAME);
cdecArtifact = ArtifactFactory.createArtifact(CDECArtifact.NAME);
testCredentials = new UserCredentials(TEST_TOKEN, "accountId");
}
=======
>>>>>>>
<<<<<<<
" \"message\" : \"'cdec' artifact not found\",\n" +
" \"status\" : \"ERROR\"\n" +
=======
" \"artifacts\" : [ ],\n" +
" \"status\" : \"OK\"\n" +
>>>>>>>
" \"artifacts\" : [ ],\n" +
" \"status\" : \"OK\"\n" + |
<<<<<<<
} catch (ReflectiveOperationException | SecurityException ex) {
throw newInternalError(ex);
=======
} catch (ReflectiveOperationException ex) {
throw new InternalError(ex);
>>>>>>>
} catch (ReflectiveOperationException ex) {
throw newInternalError(ex); |
<<<<<<<
import com.codenvy.im.managers.Config;
=======
import com.codenvy.im.response.Response;
>>>>>>>
import com.codenvy.im.response.Response;
import com.codenvy.im.managers.Config; |
<<<<<<<
infos.add(new ArtifactInfo(artToDownload, verToDownload, Status.FAILURE));
=======
LOG.error(exp.getMessage(), exp);
infos.add(new ArtifactInfoEx(artToDownload, verToDownload, Status.FAILURE));
>>>>>>>
LOG.error(exp.getMessage(), exp);
infos.add(new ArtifactInfo(artToDownload, verToDownload, Status.FAILURE));
<<<<<<<
=======
public String install(JacksonRepresentation<UserCredentials> userCredentialsRep) throws IOException {
UserCredentials userCredentials = userCredentialsRep.getObject();
String token = userCredentials.getToken();
Map<Artifact, String> updates = manager.getUpdates(token);
List<ArtifactInfo> infos = new ArrayList<>();
for (Map.Entry<Artifact, String> entry : updates.entrySet()) {
Artifact artifact = entry.getKey();
String version = entry.getValue();
try {
doInstall(artifact, version, token);
infos.add(new ArtifactInfoEx(artifact, version, Status.SUCCESS));
} catch (Exception e) {
LOG.error(e.getMessage(), e);
infos.add(new ArtifactInfoEx(artifact, version, Status.FAILURE));
return new Response.Builder().withStatus(ERROR).withMessage(e.getMessage()).withArtifacts(infos).build().toJson();
}
}
return new Response.Builder().withStatus(ResponseCode.OK).withArtifacts(infos).build().toJson();
}
/** {@inheritDoc} */
@Override
>>>>>>>
<<<<<<<
Artifact artifact = createArtifact(artifactName);
=======
artifact = createArtifact(artifactName);
toInstallVersion = version != null ? version : manager.getUpdates(token).get(artifact);
} catch (Exception e) {
LOG.error(e.getMessage(), e);
return Response.valueOf(e).toJson();
}
>>>>>>>
Artifact artifact = createArtifact(artifactName);
<<<<<<<
return new Response.Builder().withStatus(ERROR).withMessage(e.getMessage()).build().toJson();
=======
LOG.error(e.getMessage(), e);
ArtifactInfo info = new ArtifactInfoEx(artifactName, toInstallVersion, Status.FAILURE);
return new Response.Builder().withStatus(ERROR).withMessage(e.getMessage()).withArtifact(info).build().toJson();
>>>>>>>
LOG.error(e.getMessage(), e);
return new Response.Builder().withStatus(ERROR).withMessage(e.getMessage()).build().toJson(); |
<<<<<<<
@Test
public void testCheckRemoteUpdate() throws Exception {
doTest("im-download/test-check-remote-update.sh");
}
@Test
public void testDownloadAllUpdates() throws Exception {
doTest("im-download/test-download-all-updates.sh");
}
@Test
public void testGetListOfDownloadedArtifacts() throws Exception {
doTest("im-download/test-get-list-of-downloaded-artifacts.sh");
}
@Test
public void testDownloadUnknownArtifact() throws Exception {
doTest("im-download/test-download-unknown-artifact.sh");
}
@Test
public void testDownloadUnknownVersion() throws Exception {
doTest("im-download/test-download-unknown-version.sh");
}
=======
@Test
public void testInstallSingleNodeAndChangePassword() throws Exception {
doTest("test-install-single-node-and-change-password.sh");
}
@Test
public void testUpdateSingleNode() throws Exception {
doTest("test-update-single-node.sh");
}
@Test
public void testInstallUpdateImCliClient() throws Exception {
doTest("test-install-update-im-cli-client.sh");
}
>>>>>>>
@Test
public void testInstallSingleNodeAndChangePassword() throws Exception {
doTest("test-install-single-node-and-change-password.sh");
}
@Test
public void testUpdateSingleNode() throws Exception {
doTest("test-update-single-node.sh");
}
@Test
public void testInstallUpdateImCliClient() throws Exception {
doTest("test-install-update-im-cli-client.sh");
}
@Test
public void testCheckRemoteUpdate() throws Exception {
doTest("im-download/test-check-remote-update.sh");
}
@Test
public void testDownloadAllUpdates() throws Exception {
doTest("im-download/test-download-all-updates.sh");
}
@Test
public void testGetListOfDownloadedArtifacts() throws Exception {
doTest("im-download/test-get-list-of-downloaded-artifacts.sh");
}
@Test
public void testDownloadUnknownArtifact() throws Exception {
doTest("im-download/test-download-unknown-artifact.sh");
}
@Test
public void testDownloadUnknownVersion() throws Exception {
doTest("im-download/test-download-unknown-version.sh");
} |
<<<<<<<
import com.codenvy.analytics.metrics.*;
=======
import com.codenvy.analytics.metrics.AbstractListValueResulted;
import com.codenvy.analytics.metrics.Context;
import com.codenvy.analytics.metrics.MetricType;
>>>>>>>
import com.codenvy.analytics.metrics.AbstractListValueResulted;
import com.codenvy.analytics.metrics.Context;
import com.codenvy.analytics.metrics.MetricType;
<<<<<<<
=======
import static com.codenvy.analytics.metrics.users.UsersStatisticsList.*;
>>>>>>>
<<<<<<<
=======
// @Override
// protected ValueData postComputation(ValueData valueData, Map<String, String> clauses) throws IOException {
// String wsName = MetricFilter.WS.get(clauses);
//
// if (wsName != null) {
// int wsMemberCount = getWsUserCount(wsName);
//
// List<ValueData> value = new ArrayList<>();
// ListValueData listValueData = (ListValueData)valueData;
//
// for (ValueData items : listValueData.getAll()) {
// MapValueData prevItems = (MapValueData)items;
// Map<String, ValueData> newItems = new HashMap<>(prevItems.getAll());
//
// // add workspace user number
// newItems.put(USERS, LongValueData.valueOf(wsMemberCount));
//
// value.add(new MapValueData(newItems));
// }
//
// return new ListValueData(value);
//
// } else {
// return valueData;
// }
// }
//
//
// private int getWsUserCount(String wsName) throws IOException {
// try {
// WorkspaceManager workspaceManager = organizationClient.getWorkspaceManager();
// return workspaceManager.getWorkspaceMembers(wsName).size();
// } catch (OrganizationServiceException e) {
// throw new IOException(e);
// }
// }
>>>>>>> |
<<<<<<<
@Test
public void testInstallWithInstallOptions() throws Exception {
final Path testPathToBinaries = Paths.get("target/download/cdec/3.0.0/file1");
=======
@Test(expectedExceptions = UnsupportedOperationException.class, expectedExceptionsMessageRegExp = "CDEC installation is not supported yet.")
public void testInstallCDECArtifact() throws Exception {
>>>>>>>
@Test
public void testInstallWithInstallOptions() throws Exception {
final Path testPathToBinaries = Paths.get("target/download/cdec/3.0.0/file1");
<<<<<<<
when(transport.doGetRequest("update/endpoint/repository/installationinfo/" + CDECArtifact.NAME, testCredentials.getToken()))
.thenReturn("{\"version\":\"2.10.4\"}");
=======
when(transport.doGet("update/endpoint/repository/installationinfo/" + CDECArtifact.NAME, testCredentials.getToken()))
.thenReturn("{version:2.10.4}");
>>>>>>>
when(transport.doGet("update/endpoint/repository/installationinfo/" + CDECArtifact.NAME, testCredentials.getToken()))
.thenReturn("{version:2.10.4}");
when(transport.doGet("update/endpoint/repository/installationinfo/" + CDECArtifact.NAME, testCredentials.getToken()))
.thenReturn("{\"version\":\"2.10.4\"}");
<<<<<<<
when(transport.doGetRequest(endsWith("repository/properties/" + InstallManagerArtifact.NAME))).thenReturn("{\"version\":\"1.0.1\"}");
when(transport.doGetRequest(endsWith("repository/properties/" + CDECArtifact.NAME))).thenReturn("{\"version\":\"2.10.5\"}");
=======
when(transport.doGet(endsWith("repository/properties/" + InstallManagerArtifact.NAME))).thenReturn("{version:1.0.1}");
when(transport.doGet(endsWith("repository/properties/" + CDECArtifact.NAME))).thenReturn("{version:2.10.5}");
>>>>>>>
when(transport.doGet(endsWith("repository/properties/" + InstallManagerArtifact.NAME))).thenReturn("{\"version\":\"1.0.1\"}");
when(transport.doGet(endsWith("repository/properties/" + CDECArtifact.NAME))).thenReturn("{\"version\":\"2.10.5\"}");
<<<<<<<
doReturn("{\"file\":\"file1\", \"md5\":\"d41d8cd98f00b204e9800998ecf8427e\"}").when(transport).doGetRequest(endsWith("cdec/1.0.1"));
doReturn("{\"file\":\"file2\", \"md5\":\"d41d8cd98f00b204e9800998ecf8427e\"}").when(transport).doGetRequest(endsWith("cdec/1.0.2"));
=======
doReturn("{file:file1, md5=d41d8cd98f00b204e9800998ecf8427e}").when(transport).doGet(endsWith("cdec/1.0.1"));
doReturn("{file:file2, md5=d41d8cd98f00b204e9800998ecf8427e}").when(transport).doGet(endsWith("cdec/1.0.2"));
>>>>>>>
doReturn("{\"file\":\"file1\", \"md5\":\"d41d8cd98f00b204e9800998ecf8427e\"}").when(transport).doGet(endsWith("cdec/1.0.1"));
doReturn("{\"file\":\"file2\", \"md5\":\"d41d8cd98f00b204e9800998ecf8427e\"}").when(transport).doGet(endsWith("cdec/1.0.2"));
<<<<<<<
doReturn("{\"file\":\"file1\", \"md5\":\"a\"}").when(transport).doGetRequest(endsWith("cdec/1.0.1"));
=======
doReturn("{file:file1, md5=a}").when(transport).doGet(endsWith("cdec/1.0.1"));
>>>>>>>
doReturn("{\"file\":\"file1\", \"md5\":\"a\"}").when(transport).doGet(endsWith("cdec/1.0.1"));
<<<<<<<
doReturn("{\"file\":\"file1\", \"md5\":\"a\"}").when(transport).doGetRequest(endsWith("cdec"));
=======
doReturn("{file:file1, md5=a}").when(transport).doGet(endsWith("cdec"));
>>>>>>>
doReturn("{\"file\":\"file1\", \"md5\":\"a\"}").when(transport).doGet(endsWith("cdec")); |
<<<<<<<
if (SpigotUtils.isSpigotServer()){
SpigotUtils.sendMessage(player, text, ChatColor.GREEN + "Click to copy", json, SpigotUtils.Action.SUGGEST);
=======
if (UhcCore.isSpigotServer()){
SpigotUtils.sendMessage(player, text, ChatColor.GREEN + "Click to copy", json);
>>>>>>>
if (UhcCore.isSpigotServer()){
SpigotUtils.sendMessage(player, text, ChatColor.GREEN + "Click to copy", json, SpigotUtils.Action.SUGGEST); |
<<<<<<<
// Fast Mode, mob-loot
enableMobLoots = cfg.getBoolean("fast-mode.mob-loot.enable",false);
mobLoots = new HashMap<EntityType,MobLootConfiguration>();
ConfigurationSection allMobLootsSection = cfg.getConfigurationSection("fast-mode.mob-loot.loots");
if(allMobLootsSection != null){
for(String mobLootSectionName : allMobLootsSection.getKeys(false)){
ConfigurationSection mobLootSection = allMobLootsSection.getConfigurationSection(mobLootSectionName);
BlockLootConfiguration mobLootConfig = new BlockLootConfiguration();
if(mobLootConfig.parseConfiguration(mobLootSection)){
blockLoots.put(mobLootConfig.getMaterial(),mobLootConfig);
=======
// Fast Mode, block-loot
enableBlockLoots = cfg.getBoolean("fast-mode.block-loot.enable",false);
blockLoots = new HashMap<Material,BlockLootConfiguration>();
ConfigurationSection allBlockLootsSection = cfg.getConfigurationSection("fast-mode.block-loot.loots");
if(allBlockLootsSection != null){
for(String blockLootSectionName : allBlockLootsSection.getKeys(false)){
ConfigurationSection blockLootSection = allBlockLootsSection.getConfigurationSection(blockLootSectionName);
BlockLootConfiguration blockLootConfig = new BlockLootConfiguration();
if(blockLootConfig.parseConfiguration(blockLootSection)){
blockLoots.put(blockLootConfig.getMaterial(),blockLootConfig);
}
}
}
// Fast Mode, mob-loot
enableMobLoots = cfg.getBoolean("fast-mode.mob-loot.enable",false);
mobLoots = new HashMap<EntityType,MobLootConfiguration>();
ConfigurationSection allMobLootsSection = cfg.getConfigurationSection("fast-mode.mob-loot.loots");
if(allMobLootsSection != null){
for(String mobLootSectionName : allMobLootsSection.getKeys(false)){
ConfigurationSection mobLootSection = allMobLootsSection.getConfigurationSection(mobLootSectionName);
MobLootConfiguration mobLootConfig = new MobLootConfiguration();
if(mobLootConfig.parseConfiguration(mobLootSection)){
mobLoots.put(mobLootConfig.getEntityType(),mobLootConfig);
}
>>>>>>>
// Fast Mode, mob-loot
enableMobLoots = cfg.getBoolean("fast-mode.mob-loot.enable",false);
mobLoots = new HashMap<EntityType,MobLootConfiguration>();
ConfigurationSection allMobLootsSection = cfg.getConfigurationSection("fast-mode.mob-loot.loots");
if(allMobLootsSection != null){
for(String mobLootSectionName : allMobLootsSection.getKeys(false)){
ConfigurationSection mobLootSection = allMobLootsSection.getConfigurationSection(mobLootSectionName);
MobLootConfiguration mobLootConfig = new MobLootConfiguration();
if(mobLootConfig.parseConfiguration(mobLootSection)){
mobLoots.put(mobLootConfig.getEntityType(),mobLootConfig); |
<<<<<<<
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;
=======
>>>>>>>
<<<<<<<
View view = fragment.getView();//R.id.l_container_count_view
=======
View view = FragmentUtils.findViewById(fragment, R.id.l_container_count_view);
>>>>>>>
View view = FragmentUtils.findViewById(fragment, R.id.l_container_count_view); |
<<<<<<<
=======
Map<String, String> attributes = new HashMap<>();
msgStruct.getAttributes().forEach((name, attribute) -> attributes.put(name, Objects.toString(attribute.getCastValue())));
>>>>>>>
<<<<<<<
msgStruct.getFields(),
msgStruct.getAttributes());
=======
msgStruct.getFields().values(),
attributes);
>>>>>>>
msgStruct.getFields().values(),
msgStruct.getAttributes()); |
<<<<<<<
try(IActionReport embeddedReport = report
.createEmbeddedReport("GROUP: " + passedCountForGroup + " passed from " + groupTags.size(), "#" + i)) {
printString = "<table><tr><td></td><td>group:</td><td>" + msgGroups.get(i).toString() + "</td><tr></table>";
embeddedReport.createMessage(StatusType.PASSED, MessageLevel.INFO, printString);
embeddedReport.createVerification(StatusType.PASSED,
=======
try (IGroupReport groupReport = report
.createActionGroup("GROUP: " + passedCountForGroup + " passed from " + groupTags.size(), "#" + i)) {
printString = "<table><tr><td></td><td>group:</td><td>" + msgGroups.get(i) + "</td><tr></table>";
groupReport.createMessage(StatusType.PASSED, MessageLevel.INFO, printString);
groupReport.createVerification(StatusType.PASSED,
>>>>>>>
try(IActionReport embeddedReport = report
.createEmbeddedReport("GROUP: " + passedCountForGroup + " passed from " + groupTags.size(), "#" + i)) {
printString = "<table><tr><td></td><td>group:</td><td>" + msgGroups.get(i) + "</td><tr></table>";
embeddedReport.createMessage(StatusType.PASSED, MessageLevel.INFO, printString);
embeddedReport.createVerification(StatusType.PASSED,
<<<<<<<
try(IActionReport embeddedReport = report
.createEmbeddedReport("GROUP: " + passedCountForGroup + " passed from " + groupTags.size(), "#" + i)) {
printString = "<table><tr><td></td><td>group:</td><td width='80%'>" + msgGroups.get(i).toString()
=======
try (IGroupReport groupReport = report
.createActionGroup("GROUP: " + passedCountForGroup + " passed from " + groupTags.size(), "#" + i)) {
printString = "<table><tr><td></td><td>group:</td><td width='80%'>" + msgGroups.get(i)
>>>>>>>
try(IActionReport embeddedReport = report
.createEmbeddedReport("GROUP: " + passedCountForGroup + " passed from " + groupTags.size(), "#" + i)) {
printString = "<table><tr><td></td><td>group:</td><td width='80%'>" + msgGroups.get(i) |
<<<<<<<
@Override
public Future<?> addService(ServiceDescription serviceDescription, IServiceNotifyListener notifyListener) {
=======
@Override
public void addDefaultService(ServiceDescription serviceDescription, IServiceNotifyListener exceptionListener) {
serviceDescription = serviceDescription.clone();
String serviceName = serviceDescription.getName();
try {
lock.writeLock().lock();
if(defaultServices.putIfAbsent(serviceName, serviceDescription) != null) {
throw new StorageException("Default service already exists: " + serviceName);
}
for(String environment : envStorage.list()) {
if(services.containsKey(new ServiceName(environment, serviceName))) {
continue;
}
ServiceDescription clonedDescription = serviceDescription.clone();
clonedDescription.setEnvironment(environment);
addServiceWithoutNewThread(clonedDescription, exceptionListener);
}
} catch(Exception e) {
defaultServices.remove(serviceName);
exceptionNotify(exceptionListener, e);
throw new ServiceException(e.getMessage(), e);
} finally {
lock.writeLock().unlock();
}
}
@Override
public void removeDefaultService(String serviceName, IServiceNotifyListener exceptionListener) {
try {
lock.writeLock().lock();
if(defaultServices.remove(serviceName) == null) {
throw new StorageException("Default service does not exist: " + serviceName);
}
} catch(Exception e) {
exceptionNotify(exceptionListener, e);
throw new ServiceException(e.getMessage(), e);
} finally {
lock.writeLock().unlock();
}
}
@Override
public Future<?> addService(final ServiceDescription serviceDescription, final IServiceNotifyListener notifyListener) {
>>>>>>>
@Override
public void addDefaultService(ServiceDescription serviceDescription, IServiceNotifyListener exceptionListener) {
serviceDescription = serviceDescription.clone();
String serviceName = serviceDescription.getName();
try {
lock.writeLock().lock();
if(defaultServices.putIfAbsent(serviceName, serviceDescription) != null) {
throw new StorageException("Default service already exists: " + serviceName);
}
for(String environment : envStorage.list()) {
if(services.containsKey(new ServiceName(environment, serviceName))) {
continue;
}
ServiceDescription clonedDescription = serviceDescription.clone();
clonedDescription.setEnvironment(environment);
addServiceWithoutNewThread(clonedDescription, exceptionListener);
}
} catch(Exception e) {
defaultServices.remove(serviceName);
exceptionNotify(exceptionListener, e);
throw new ServiceException(e.getMessage(), e);
} finally {
lock.writeLock().unlock();
}
}
@Override
public void removeDefaultService(String serviceName, IServiceNotifyListener exceptionListener) {
try {
lock.writeLock().lock();
if(defaultServices.remove(serviceName) == null) {
throw new StorageException("Default service does not exist: " + serviceName);
}
} catch(Exception e) {
exceptionNotify(exceptionListener, e);
throw new ServiceException(e.getMessage(), e);
} finally {
lock.writeLock().unlock();
}
}
@Override
public Future<?> addService(ServiceDescription serviceDescription, IServiceNotifyListener notifyListener) { |
<<<<<<<
import java.util.*;
import java.util.stream.Collectors;
=======
import java.util.List;
import java.util.Map;
>>>>>>>
import java.util.*;
import java.util.stream.Collectors;
import java.util.Map;
<<<<<<<
import org.apache.commons.lang3.StringUtils;
import org.hibernate.QueryTimeoutException;
=======
import org.apache.commons.lang3.builder.ToStringBuilder;
>>>>>>>
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.QueryTimeoutException;
<<<<<<<
public List<String> getEnumeratedValues() {
return enumeratedValues;
}
public boolean hasEnumeratedValues() {
return !enumeratedValues.isEmpty();
}
public List<String> completeEnumeratedValues(String query) {
return StringUtils.isNotEmpty(query)
? enumeratedValues.stream().filter(value -> StringUtils.containsIgnoreCase(value, query)).collect(Collectors.toList())
: enumeratedValues;
}
=======
public String getFinalValue() {
if(environment != null && variableSet != null && variable != null) {
return variableSet.getOrDefault(variable, getValue());
}
return getValue();
}
>>>>>>>
public String getFinalValue() {
if(environment != null && variableSet != null && variable != null) {
return variableSet.getOrDefault(variable, getValue());
}
return getValue();
}
public List<String> getEnumeratedValues() {
return enumeratedValues;
}
public boolean hasEnumeratedValues() {
return !enumeratedValues.isEmpty();
}
public List<String> completeEnumeratedValues(String query) {
return StringUtils.isNotEmpty(query)
? enumeratedValues.stream().filter(value -> StringUtils.containsIgnoreCase(value, query)).collect(Collectors.toList())
: enumeratedValues;
} |
<<<<<<<
this.severalEdit = new EnvironmentNode(Type.SERVICE, new ServiceDescription(), "Services", null, Collections.emptyList(), false, null, null, null,
new ArrayList<>(), null, null);
=======
this.severalEdit = new EnvironmentNode(Type.SERVICE, new ServiceDescription(), "Services", null, false, null, null, null, null, null,
new ArrayList<>(), null, null);
>>>>>>>
this.severalEdit = new EnvironmentNode(Type.SERVICE, new ServiceDescription(), "Services", null, Collections.emptyList(), false, null, null, null, null, null,
new ArrayList<>(), null, null);
<<<<<<<
toClone.getDescription(), toClone.getEnumeratedValues(), toClone.isServiceParamRequired(), toClone.getInputMask(),
toClone.getValue(), toClone.getParamClassType(), null, null, null));
=======
toClone.getDescription(), toClone.isServiceParamRequired(), toClone.getInputMask(),
toClone.getValue(), toClone.getVariable(), toClone.getVariableSet(), toClone.getParamClassType(), null, null, toClone.getEnvironment()));
>>>>>>>
toClone.getDescription(), toClone.getEnumeratedValues(), toClone.isServiceParamRequired(), toClone.getInputMask(),
toClone.getValue(), toClone.getVariable(), toClone.getVariableSet(), toClone.getParamClassType(), null, null, toClone.getEnvironment()));
<<<<<<<
"HandlerClassName", "", Collections.emptyList(), false, null, sd.getServiceHandlerClassName(), String.class, null,
=======
"HandlerClassName", "", false, null, sd.getServiceHandlerClassName(), null, null, String.class, null,
>>>>>>>
"HandlerClassName", "", Collections.emptyList(), false, null, sd.getServiceHandlerClassName(), null, null, String.class, null,
<<<<<<<
EnvironmentNode paramNode = new EnvironmentNode(
EnvironmentNode.Type.PARAMETER,
sd,
name,
proxy.getParameterDescription(name),
proxy.getEnumeratedValues(name),
proxy.checkRequiredParameter(name),
proxy.getParameterMask(name),
proxy.getParameterValue(name),
proxy.getParameterType(name),
null, notifyListener, null);
=======
EnvironmentNode paramNode = new EnvironmentNode(EnvironmentNode.Type.PARAMETER, sd, name,
proxy.getParameterDescription(name), proxy.checkRequiredParameter(name), proxy.getParameterMask(name),
proxy.getParameterValue(name), variables.get(name), variableSet, proxy.getParameterType(name), null, notifyListener, serviceName.getEnvironment());
>>>>>>>
EnvironmentNode paramNode = new EnvironmentNode(
EnvironmentNode.Type.PARAMETER,
sd,
name,
proxy.getParameterDescription(name),
proxy.getEnumeratedValues(name),
proxy.checkRequiredParameter(name),
proxy.getParameterMask(name),
proxy.getParameterValue(name),
variables.get(name),
variableSet,
proxy.getParameterType(name),
null,
notifyListener,
serviceName.getEnvironment());
<<<<<<<
EnvironmentNode.Type.SERVICE, sd, sd.getName(), "",
Collections.emptyList(), false, null, null, null, params,
=======
EnvironmentNode.Type.SERVICE, sd, sd.getName(), "", false, null, null, null, null, null, params,
>>>>>>>
EnvironmentNode.Type.SERVICE, sd, sd.getName(), "", Collections.emptyList(), false, null, null, null, null, null, params, |
<<<<<<<
=======
public static final ParseException INVALID_Q_VALUE = new ParseException("Value of 'q' should start either from 0 or 1");
public static final ParseException ENCODE_NEGATIVE_VALUE = new ParseException("Trying to encode value that is less than 0");
public static final ParseException DECODE_NEGATIVE_VALUE = new ParseException("Trying to decode negative value");
private static final String ENCODING = "UTF-8";
>>>>>>>
public static final ParseException INVALID_Q_VALUE = new ParseException("Value of 'q' should start either from 0 or 1");
public static final ParseException ENCODE_NEGATIVE_VALUE = new ParseException("Trying to encode value that is less than 0");
public static final ParseException DECODE_NEGATIVE_VALUE = new ParseException("Trying to decode negative value");
private static final String ENCODING = "UTF-8";
<<<<<<<
public static String urlDecode(String string, String enc) throws ParseException {
try {
return URLDecoder.decode(string, enc);
} catch (UnsupportedEncodingException e) {
throw new UnknownFormatException(HttpUtils.class, "Can't encode with supplied encoding: " + enc, e);
}
}
=======
/**
* Encodes non-negative decimal value into bytes and puts these bytes into an array starting from specified position.
*
* @param array array that will hold encoded bytes
* @param pos position from which encoded bytes will be put into array
* @param value non-negative decimal value to be encoded
* @return number of bytes that were put into array
* @throws ParseException if value to be encoded is negative
*/
public static int encodeUnsignedDecimal(byte[] array, int pos, long value) throws ParseException {
if (value < 0) {
throw ENCODE_NEGATIVE_VALUE;
}
return encodeDecimal(array, pos, value);
}
/**
* Decodes non-negative {@code int} value from byte array starting from specified position, with given length.
*
* @param array array that stores bytes to be decoded
* @param pos position from which to start decoding
* @param len number of bytes to be decoded
* @return {@code int} value of number that has been encoded
* @throws ParseException in case decoded value is out of bounds of type {@code int}, is negative, or in case
* decimal value has been inproperly encoded
*/
public static int decodeUnsignedInt(byte[] array, int pos, int len) throws ParseException {
int offsetLeft = trimOffsetLeft(array, pos, len);
if (array[offsetLeft] == (byte) '-') {
throw DECODE_NEGATIVE_VALUE;
}
;
pos += offsetLeft;
len -= offsetLeft;
len -= trimOffsetRight(array, pos, len);
return decodeInt(array, pos, len);
}
/**
* Decodes non-negative {@code long} value from byte array starting from specified position, with given length
*
* @param array array that stores bytes to be decoded
* @param pos position from which to start decoding
* @param len number of bytes to be decoded
* @return {@code long} value of number that has been encoded
* @throws ParseException in case decoded value is out of bounds of type {@code long}, is negative, or in case
* decimal value has been inproperly encoded
*/
public static long decodeUnsignedLong(byte[] array, int pos, int len) throws ParseException {
int offsetLeft = trimOffsetLeft(array, pos, len);
if (array[offsetLeft] == (byte) '-') {
throw DECODE_NEGATIVE_VALUE;
}
pos += offsetLeft;
len -= offsetLeft;
len -= trimOffsetRight(array, pos, len);
>>>>>>>
public static String urlDecode(String string, String enc) throws ParseException {
try {
return URLDecoder.decode(string, enc);
} catch (UnsupportedEncodingException e) {
throw new UnknownFormatException(HttpUtils.class, "Can't encode with supplied encoding: " + enc, e);
}
}
/**
* Encodes non-negative decimal value into bytes and puts these bytes into an array starting from specified position.
*
* @param array array that will hold encoded bytes
* @param pos position from which encoded bytes will be put into array
* @param value non-negative decimal value to be encoded
* @return number of bytes that were put into array
* @throws ParseException if value to be encoded is negative
*/
public static int encodeUnsignedDecimal(byte[] array, int pos, long value) throws ParseException {
if (value < 0) {
throw ENCODE_NEGATIVE_VALUE;
}
return encodeDecimal(array, pos, value);
}
/**
* Decodes non-negative {@code int} value from byte array starting from specified position, with given length.
*
* @param array array that stores bytes to be decoded
* @param pos position from which to start decoding
* @param len number of bytes to be decoded
* @return {@code int} value of number that has been encoded
* @throws ParseException in case decoded value is out of bounds of type {@code int}, is negative, or in case
* decimal value has been inproperly encoded
*/
public static int decodeUnsignedInt(byte[] array, int pos, int len) throws ParseException {
int offsetLeft = trimOffsetLeft(array, pos, len);
if (array[offsetLeft] == (byte) '-') {
throw DECODE_NEGATIVE_VALUE;
}
pos += offsetLeft;
len -= offsetLeft;
len -= trimOffsetRight(array, pos, len);
return decodeInt(array, pos, len);
}
/**
* Decodes non-negative {@code long} value from byte array starting from specified position, with given length
*
* @param array array that stores bytes to be decoded
* @param pos position from which to start decoding
* @param len number of bytes to be decoded
* @return {@code long} value of number that has been encoded
* @throws ParseException in case decoded value is out of bounds of type {@code long}, is negative, or in case
* decimal value has been inproperly encoded
*/
public static long decodeUnsignedLong(byte[] array, int pos, int len) throws ParseException {
int offsetLeft = trimOffsetLeft(array, pos, len);
if (array[offsetLeft] == (byte) '-') {
throw DECODE_NEGATIVE_VALUE;
}
pos += offsetLeft;
len -= offsetLeft;
len -= trimOffsetRight(array, pos, len); |
<<<<<<<
buf.recycle();
if (inspector != null) inspector.onReceiveError(e);
closeWithError(e);
return;
=======
>>>>>>>
if (inspector != null) inspector.onReceiveError(e);
<<<<<<<
if (inspector != null) inspector.onSendError(e);
closeWithError(e);
return;
=======
>>>>>>>
if (inspector != null) inspector.onSendError(e); |
<<<<<<<
checkSeriesOfferings(serieses, request);
=======
Collection<Series> duplicated = checkAndGetDuplicatedtSeries(serieses, request);
>>>>>>>
checkSeriesOfferings(serieses, request);
Collection<Series> duplicated = checkAndGetDuplicatedtSeries(serieses, request);
<<<<<<<
private void checkSeriesOfferings(List<Series> serieses, GetObservationRequest request) {
boolean allSeriesWithOfferings = true;
for (Series series : serieses) {
allSeriesWithOfferings = !series.hasOffering() ? false : allSeriesWithOfferings;
}
if (allSeriesWithOfferings) {
request.setOfferings(Lists.<String>newArrayList());
}
}
=======
private Collection<Series> checkAndGetDuplicatedtSeries(List<Series> serieses, GetObservationRequest request) {
if (!request.isCheckForDuplicity()) {
return Sets.newHashSet();
}
Set<Series> single = Sets.newHashSet();
Set<Series> duplicated = Sets.newHashSet();
for (Series series : serieses) {
if (!single.isEmpty()) {
if (isDuplicatedSeries(series, single)) {
duplicated.add(series);
}
} else {
single.add(series);
}
}
return duplicated;
}
private boolean isDuplicatedSeries(Series series, Set<Series> serieses) {
for (Series s : serieses) {
if (series.hasSameObservationIdentifier(s)) {
return true;
}
}
return false;
}
private Collection<SeriesObservation> checkObservationsForDuplicity(Collection<SeriesObservation> seriesObservations, GetObservationRequest request) {
if (!request.isCheckForDuplicity()) {
return seriesObservations;
}
Collection<SeriesObservation> checked = Lists.newArrayList();
Set<Series> serieses = Sets.newHashSet();
Set<Series> duplicated = Sets.newHashSet();
for (SeriesObservation seriesObservation : seriesObservations) {
if (serieses.isEmpty()) {
serieses.add(seriesObservation.getSeries());
} else {
if (!serieses.contains(seriesObservation.getSeries()) && !duplicated.contains(seriesObservation)
&& isDuplicatedSeries(seriesObservation.getSeries(), serieses)) {
duplicated.add(seriesObservation.getSeries());
}
}
if (serieses.contains(seriesObservation.getSeries()) || (duplicated.contains(seriesObservation.getSeries())
&& seriesObservation.getOfferings().size() == 1)) {
checked.add(seriesObservation);
}
}
return checked;
}
>>>>>>>
private void checkSeriesOfferings(List<Series> serieses, GetObservationRequest request) {
boolean allSeriesWithOfferings = true;
for (Series series : serieses) {
allSeriesWithOfferings = !series.isSetOffering() ? false : allSeriesWithOfferings;
}
if (allSeriesWithOfferings) {
request.setOfferings(Lists.<String>newArrayList());
}
}
private Collection<Series> checkAndGetDuplicatedtSeries(List<Series> serieses, GetObservationRequest request) {
if (!request.isCheckForDuplicity()) {
return Sets.newHashSet();
}
Set<Series> single = Sets.newHashSet();
Set<Series> duplicated = Sets.newHashSet();
for (Series series : serieses) {
if (!single.isEmpty()) {
if (isDuplicatedSeries(series, single)) {
duplicated.add(series);
}
} else {
single.add(series);
}
}
return duplicated;
}
private boolean isDuplicatedSeries(Series series, Set<Series> serieses) {
for (Series s : serieses) {
if (series.hasSameObservationIdentifier(s)) {
return true;
}
}
return false;
}
private Collection<SeriesObservation<?>> checkObservationsForDuplicity(Collection<SeriesObservation<?>> seriesObservations, GetObservationRequest request) {
if (!request.isCheckForDuplicity()) {
return seriesObservations;
}
Collection<SeriesObservation<?>> checked = Lists.newArrayList();
Set<Series> serieses = Sets.newHashSet();
Set<Series> duplicated = Sets.newHashSet();
for (SeriesObservation<?> seriesObservation : seriesObservations) {
if (serieses.isEmpty()) {
serieses.add(seriesObservation.getSeries());
} else {
if (!serieses.contains(seriesObservation.getSeries()) && !duplicated.contains(seriesObservation)
&& isDuplicatedSeries(seriesObservation.getSeries(), serieses)) {
duplicated.add(seriesObservation.getSeries());
}
}
if (serieses.contains(seriesObservation.getSeries()) || (duplicated.contains(seriesObservation.getSeries())
&& seriesObservation.getOfferings().size() == 1)) {
checked.add(seriesObservation);
}
}
return checked;
} |
<<<<<<<
@SuppressWarnings("unchecked")
@RunWith(DatakernelRunner.class)
public final class AggregationChunkerTest {
=======
@SuppressWarnings({"unchecked", "rawtypes"})
public class AggregationChunkerTest {
>>>>>>>
@SuppressWarnings({"unchecked", "rawtypes"})
@RunWith(DatakernelRunner.class)
public final class AggregationChunkerTest { |
<<<<<<<
=======
import io.global.ot.chat.operations.ChatOperation;
import io.global.ot.chat.operations.Utils;
>>>>>>>
<<<<<<<
import static io.global.chat.Utils.MESSAGE_OPERATION_CODEC;
import static io.global.chat.chatroom.messages.MessagesOTSystem.createOTSystem;
import static java.lang.Boolean.parseBoolean;
import static java.util.Arrays.asList;
=======
import static io.datakernel.di.module.Modules.combine;
import static io.datakernel.di.module.Modules.override;
import static io.global.ot.chat.operations.ChatOperation.OPERATION_CODEC;
import static io.global.ot.chat.operations.Utils.DIFF_TO_STRING;
>>>>>>>
import static io.datakernel.di.module.Modules.combine;
import static io.datakernel.di.module.Modules.override;
import static io.global.chat.Utils.MESSAGE_OPERATION_CODEC;
<<<<<<<
public static final int CONTENT_MAX_LENGTH = 10;
public static final Function<MessageOperation, String> DIFF_TO_STRING = op -> {
Message message = op.getMessage();
String author = message.getAuthor();
String allContent = message.getContent();
String content = allContent.length() > CONTENT_MAX_LENGTH ?
(allContent.substring(0, CONTENT_MAX_LENGTH) + "...") :
allContent;
return (op.isTombstone() ? "-" : "+") + '[' + author + ':' + content + ']';
};
=======
public static final String DEFAULT_STATIC_PATH = "/build";
>>>>>>>
public static final String DEFAULT_STATIC_PATH = "/build";
public static final int CONTENT_MAX_LENGTH = 10;
public static final Function<MessageOperation, String> DIFF_TO_STRING = op -> {
Message message = op.getMessage();
String author = message.getAuthor();
String allContent = message.getContent();
String content = allContent.length() > CONTENT_MAX_LENGTH ?
(allContent.substring(0, CONTENT_MAX_LENGTH) + "...") :
allContent;
return (op.isTombstone() ? "-" : "+") + '[' + author + ':' + content + ']';
};
<<<<<<<
new OTCommonModule<MessageOperation>() {
@Override
protected void configure() {
bind(new TypeLiteral<StructuredCodec<MessageOperation>>() {}).toInstance(MESSAGE_OPERATION_CODEC);
bind(new TypeLiteral<Function<MessageOperation, String>>() {}).toInstance(DIFF_TO_STRING);
bind(new TypeLiteral<OTSystem<MessageOperation>>() {}).toInstance(createOTSystem());
}
},
override(new GlobalNodesModule())
.with(new ExampleCommonModule())
=======
new OTCommonModule<ChatOperation>() {{
bind(new Key<StructuredCodec<ChatOperation>>() {}).toInstance(OPERATION_CODEC);
bind(new Key<Function<ChatOperation, String>>() {}).toInstance(DIFF_TO_STRING);
bind(new Key<OTSystem<ChatOperation>>() {}).to(Utils::createOTSystem);
}},
override(new GlobalNodesModule(), new ExampleCommonModule())
>>>>>>>
new OTCommonModule<MessageOperation>() {{
bind(new Key<StructuredCodec<MessageOperation>>() {}).toInstance(MESSAGE_OPERATION_CODEC);
bind(new Key<Function<MessageOperation, String>>() {}).toInstance(DIFF_TO_STRING);
bind(new Key<OTSystem<MessageOperation>>() {}).toInstance(MessagesOTSystem.createOTSystem());
}},
override(new GlobalNodesModule(), new ExampleCommonModule()) |
<<<<<<<
private final RoutingServlet servlet = RoutingServlet.create().with("/ot/*", getServlet());
=======
private static final CurrentTimeProvider now = SteppingCurrentTimeProvider.create(10, 10);
private final MiddlewareServlet servlet = MiddlewareServlet.create().with("/ot", getServlet());
>>>>>>>
private static final CurrentTimeProvider now = SteppingCurrentTimeProvider.create(10, 10);
private final RoutingServlet servlet = RoutingServlet.create().with("/ot/*", getServlet()); |
<<<<<<<
urlParams.put(REPORT_TYPE_PARAM, query.getReportType().toString().toLowerCase());
String url = this.url + "/" + "?" + HttpUtils.urlQueryString(urlParams);
=======
String url = this.url + "/" + "?" + HttpUtils.renderQueryString(urlParams);
>>>>>>>
urlParams.put(REPORT_TYPE_PARAM, query.getReportType().toString().toLowerCase());
String url = this.url + "/" + "?" + HttpUtils.renderQueryString(urlParams); |
<<<<<<<
=======
import io.datakernel.bytebuf.ByteBuf;
import io.datakernel.codegen.utils.DefiningClassLoader;
>>>>>>>
import io.datakernel.codegen.utils.DefiningClassLoader;
<<<<<<<
=======
import io.datakernel.stream.StreamConsumer;
import io.datakernel.stream.StreamProducer;
import io.datakernel.stream.StreamProducers;
>>>>>>>
import io.datakernel.stream.StreamProducer;
import io.datakernel.stream.StreamProducers; |
<<<<<<<
import static org.junit.Assert.fail;
import java.awt.List;
import java.util.ArrayList;
=======
import org.openqa.selenium.*;
>>>>>>>
import static org.junit.Assert.fail;
import java.awt.List;
import java.util.ArrayList;
import org.openqa.selenium.*;
<<<<<<<
import org.openqa.selenium.By.ById;
//import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
=======
>>>>>>>
import org.openqa.selenium.By.ById;
<<<<<<<
public void selectRepo(String[] repoUsed) throws Exception {
if (repoUsed[0].contains("all")){
checkRepositoryPosition(dispatcher);
checkRepositoryPosition(userAgent);
checkRepositoryPosition(platform);
}else {
waitingLoading();
uncheckAllRepo();
for (int i=0;i<repoUsed.length;i++){
if (repoUsed[i].contains("dispatcher")){
checkRepositoryPosition(dispatcher);
}
if (repoUsed[i].contains("userAgent")){
checkRepositoryPosition(userAgent);
}
if (repoUsed[i].contains("platform")){
checkRepositoryPosition(platform);
}
}
}
}
public void checkRepositoryPosition(WebElement object) throws InterruptedException{
if (!object.isSelected()){
object.click();
}
=======
public void createIssue(String titleTxt, String descTxt, String repoName) throws Exception {
openModelCreateIssue();
setIssueTitle(titleTxt);
setIssueDesc(descTxt);
selectProjects(repoName);
clickbtnCreateIssue();
}
public void selectRepo(String repoName) throws Exception {
waitingLoading();
WebDriverWait wait = new WebDriverWait(this.driver, 10);
Select select=new Select(wait.until(ExpectedConditions.elementToBeClickable(filterRepo)));
select.selectByVisibleText(repoName);
waitingLoading();
>>>>>>>
public void createIssue(String titleTxt, String descTxt, String repoName) throws Exception {
openModelCreateIssue();
setIssueTitle(titleTxt);
setIssueDesc(descTxt);
selectProjects(repoName);
clickbtnCreateIssue();
}
public void selectRepo(String[] repoUsed) throws Exception {
if (repoUsed[0].contains("all")){
checkRepositoryPosition(dispatcher);
checkRepositoryPosition(userAgent);
checkRepositoryPosition(platform);
}else {
waitingLoading();
uncheckAllRepo();
for (int i=0;i<repoUsed.length;i++){
if (repoUsed[i].contains("dispatcher")){
checkRepositoryPosition(dispatcher);
}
if (repoUsed[i].contains("userAgent")){
checkRepositoryPosition(userAgent);
}
if (repoUsed[i].contains("platform")){
checkRepositoryPosition(platform);
}
}
}
}
public void checkRepositoryPosition(WebElement object) throws InterruptedException{
if (!object.isSelected()){
object.click();
}
<<<<<<<
public void clicOutsideForm() throws Exception {
outsideModal.click();
}
=======
>>>>>>>
public void clicOutsideForm() throws Exception {
outsideModal.click();
}
<<<<<<<
Thread.sleep(1000);
return createBtn.isDisplayed();
=======
waitingLoading();
return btnCreateIssue.isDisplayed();
>>>>>>>
Thread.sleep(1000);
return btnCreateIssue.isDisplayed();
<<<<<<<
// GET ID
// public void getId() throws Exception {
// System.out.println("HERE1!!!!");
//WORKING FIRST POSITION String id=driver.findElement(By.xpath("//*[@class='issue list-group-item test_issues_kanboard']")).getAttribute("id");
// String id=driver.findElement(By.xpath().getAttribute("id");
// System.out.println("ID FOUND WAS: "+id);
// }
public WebElement toWebElement(String str) throws InterruptedException{
WebElement weAux = null;
if (str == "dispatcher"){
weAux = driver.findElement(By.cssSelector("header > span:nth-of-type(3) > label > i"));
}
else if (str == "platform"){
weAux = driver.findElement(By.cssSelector("header > span:nth-of-type(2) > label > i"));
}
else if (str == "userAgent"){
weAux = driver.findElement(By.cssSelector("header > span:nth-of-type(1) > label > i"));
}
return weAux;
=======
public boolean frameCreateIssueDisplayed(){
return driver.findElement(By.cssSelector("div[class=modal-content]")).isDisplayed();
}
public void waitingFrameCreateIssueOpen() throws InterruptedException{
boolean regex = frameCreateIssueDisplayed();
int timeout=0;
while(!regex||timeout>=30){
WebDriverWait wait = new WebDriverWait(this.driver, 30);
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[class=modal-content]")));;
regex = element.isDisplayed();
timeout++;
}
}
public void waitingFrameCreateIssueClose() throws InterruptedException{
// boolean regex = frameCreateIssueDisplayed();
// int timeout=0;
// while(regex||timeout>=30){
// WebDriverWait wait = new WebDriverWait(this.driver, 30);
// regex = wait.until(ExpectedConditions.not(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[class=modal-content]"))));;
// timeout++;
// }
}
>>>>>>>
public boolean frameCreateIssueDisplayed(){
return driver.findElement(By.cssSelector("div[class=modal-content]")).isDisplayed();
}
public void waitingFrameCreateIssueOpen() throws InterruptedException{
boolean regex = frameCreateIssueDisplayed();
int timeout=0;
while(!regex||timeout>=30){
WebDriverWait wait = new WebDriverWait(this.driver, 30);
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[class=modal-content]")));;
regex = element.isDisplayed();
timeout++;
}
}
public void waitingFrameCreateIssueClose() throws InterruptedException{
// boolean regex = frameCreateIssueDisplayed();
// int timeout=0;
// while(regex||timeout>=30){
// WebDriverWait wait = new WebDriverWait(this.driver, 30);
// regex = wait.until(ExpectedConditions.not(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[class=modal-content]"))));;
// timeout++;
// }
}
// GET ID
// public void getId() throws Exception {
// System.out.println("HERE1!!!!");
//WORKING FIRST POSITION String id=driver.findElement(By.xpath("//*[@class='issue list-group-item test_issues_kanboard']")).getAttribute("id");
// String id=driver.findElement(By.xpath().getAttribute("id");
// System.out.println("ID FOUND WAS: "+id);
// }
public WebElement toWebElement(String str) throws InterruptedException{
WebElement weAux = null;
if (str == "dispatcher"){
weAux = driver.findElement(By.cssSelector("header > span:nth-of-type(3) > label > i"));
}
else if (str == "platform"){
weAux = driver.findElement(By.cssSelector("header > span:nth-of-type(2) > label > i"));
}
else if (str == "userAgent"){
weAux = driver.findElement(By.cssSelector("header > span:nth-of-type(1) > label > i"));
}
return weAux; |
<<<<<<<
public <T> StreamProducer<T> chunkReader(String aggregationId, List<String> keys, List<String> fields,
Class<T> recordClass, long id) {
logger.info("Reading chunk #" + id);
=======
public <T> StreamProducer<T> chunkReader(String aggregationId, List<String> keys, List<String> fields, Class<T> recordClass, long id) {
>>>>>>>
public <T> StreamProducer<T> chunkReader(String aggregationId, List<String> keys, List<String> fields,
Class<T> recordClass, long id) {
logger.info("Reading chunk #" + id);
<<<<<<<
final StreamBinarySerializer<T> serializer = new StreamBinarySerializer<>(eventloop, bufferSerializer,
StreamBinarySerializer.MAX_SIZE, StreamBinarySerializer.MAX_SIZE, 1000, false);
final StreamLZ4Compressor compressor = StreamLZ4Compressor.fastCompressor(eventloop);
final StreamFileWriter writer = StreamFileWriter.createFile(eventloop, executorService, path(id));
asyncExecutor.submit(new AsyncTask() {
@Override
public void execute(CompletionCallback callback) {
producer.streamTo(serializer.getInput());
serializer.getOutput().streamTo(compressor.getInput());
compressor.getOutput().streamTo(writer);
writer.setFlushCallback(callback);
}
}, callback);
=======
StreamBinarySerializer<T> serializer = new StreamBinarySerializer<>(eventloop, bufferSerializer, StreamBinarySerializer.MAX_SIZE, StreamBinarySerializer.MAX_SIZE, 1000, false);
StreamLZ4Compressor compressor = StreamLZ4Compressor.fastCompressor(eventloop);
StreamFileWriter writer = StreamFileWriter.createFile(eventloop, executorService, path(id), false, true);
serializer.getOutput().streamTo(compressor.getInput());
compressor.getOutput().streamTo(writer);
writer.setFlushCallback(callback);
return serializer.getInput();
>>>>>>>
final StreamBinarySerializer<T> serializer = new StreamBinarySerializer<>(eventloop, bufferSerializer,
StreamBinarySerializer.MAX_SIZE, StreamBinarySerializer.MAX_SIZE, 1000, false);
final StreamLZ4Compressor compressor = StreamLZ4Compressor.fastCompressor(eventloop);
final StreamFileWriter writer = StreamFileWriter.createFile(eventloop, executorService, path(id), false, true);
asyncExecutor.submit(new AsyncTask() {
@Override
public void execute(CompletionCallback callback) {
producer.streamTo(serializer.getInput());
serializer.getOutput().streamTo(compressor.getInput());
compressor.getOutput().streamTo(writer);
writer.setFlushCallback(callback);
}
}, callback); |
<<<<<<<
import io.datakernel.di.annotation.Provides;
import io.datakernel.di.module.AbstractModule;
import io.datakernel.di.module.Module;
import io.datakernel.eventloop.Eventloop;
=======
import io.datakernel.di.annotation.Named;
import io.datakernel.di.annotation.Provides;
import io.datakernel.di.module.Module;
>>>>>>>
import io.datakernel.di.annotation.Provides;
import io.datakernel.di.module.Module;
import io.datakernel.eventloop.Eventloop;
<<<<<<<
import io.global.common.PrivKey;
import io.global.common.PubKey;
import io.global.common.RawServerId;
import io.global.common.SignedData;
import io.global.common.api.AnnounceData;
import io.global.common.api.AnnouncementStorage;
import io.global.common.api.DiscoveryService;
import io.global.common.discovery.HttpDiscoveryService;
import io.global.common.discovery.LocalDiscoveryService;
import io.global.common.stub.InMemorySharedKeyStorage;
=======
import io.global.LocalNodeCommonModule;
import io.global.fs.api.CheckpointPosStrategy;
import io.global.fs.api.GlobalFsNode;
>>>>>>>
import io.global.LocalNodeCommonModule;
<<<<<<<
import java.math.BigInteger;
import java.net.InetSocketAddress;
import java.util.concurrent.Executor;
=======
import java.util.concurrent.ExecutorService;
>>>>>>>
import java.util.concurrent.Executor;
<<<<<<<
import static io.datakernel.config.ConfigConverters.getExecutor;
import static io.datakernel.config.ConfigConverters.ofInetSocketAddress;
=======
import static io.datakernel.config.ConfigConverters.getExecutor;
import static io.datakernel.config.ConfigConverters.ofLong;
>>>>>>>
import static io.datakernel.config.ConfigConverters.getExecutor;
<<<<<<<
@Provides
Config config() {
return Config.create()
.with("node.serverId", DEFAULT_SERVER_ID)
.with("fs.storage", DEFAULT_FS_STORAGE)
.with("app.http.staticPath", DEFAULT_STATIC_PATH)
.with("app.http.listenAddresses", DEFAULT_LISTEN_ADDRESS)
.overrideWith(ofClassPathProperties(PROPERTIES_FILE, true))
.overrideWith(ofProperties(System.getProperties()).getChild("config"));
}
=======
>>>>>>>
@Provides
Config config() {
return Config.create()
.with("node.serverId", DEFAULT_SERVER_ID)
.with("fs.storage", DEFAULT_FS_STORAGE)
.with("app.http.staticPath", DEFAULT_STATIC_PATH)
.with("app.http.listenAddresses", DEFAULT_LISTEN_ADDRESS)
.overrideWith(ofClassPathProperties(PROPERTIES_FILE, true))
.overrideWith(ofProperties(System.getProperties()).getChild("config"));
} |
<<<<<<<
@Test
public void testEchoUdpServer() throws IOException {
DatagramChannel serverDatagramChannel = createDatagramChannel(DatagramSocketSettings.create(), SERVER_ADDRESS, null);
AsyncUdpSocketImpl serverSocket = AsyncUdpSocketImpl.create(Eventloop.getCurrentEventloop(), serverDatagramChannel);
serverSocket.setEventHandler(new AsyncUdpSocket.EventHandler() {
=======
private AsyncUdpSocketImpl getEchoServerUdpSocket(DatagramChannel serverChannel) {
AsyncUdpSocketImpl socket = AsyncUdpSocketImpl.create(eventloop, serverChannel);
socket.setEventHandler(new EventHandler() {
>>>>>>>
@Test
public void testEchoUdpServer() throws IOException {
DatagramChannel serverDatagramChannel = createDatagramChannel(DatagramSocketSettings.create(), SERVER_ADDRESS, null);
AsyncUdpSocketImpl serverSocket = AsyncUdpSocketImpl.create(Eventloop.getCurrentEventloop(), serverDatagramChannel);
serverSocket.setEventHandler(new EventHandler() {
<<<<<<<
DatagramChannel clientDatagramChannel = createDatagramChannel(DatagramSocketSettings.create(), null, null);
AsyncUdpSocketImpl clientSocket = AsyncUdpSocketImpl.create(Eventloop.getCurrentEventloop(), clientDatagramChannel);
clientSocket.setEventHandler(new AsyncUdpSocket.EventHandler() {
=======
private AsyncUdpSocketImpl getClientUdpSocket(DatagramChannel clientChannel) {
AsyncUdpSocketImpl socket = AsyncUdpSocketImpl.create(eventloop, clientChannel);
socket.setEventHandler(new EventHandler() {
>>>>>>>
DatagramChannel clientDatagramChannel = createDatagramChannel(DatagramSocketSettings.create(), null, null);
AsyncUdpSocketImpl clientSocket = AsyncUdpSocketImpl.create(Eventloop.getCurrentEventloop(), clientDatagramChannel);
clientSocket.setEventHandler(new EventHandler() {
<<<<<<<
clientSocket.register();
=======
return socket;
}
@Rule
public ByteBufRule byteBufRule = new ByteBufRule();
@Test
public void testEchoUdpServer() {
eventloop.post(() -> {
try {
// server
DatagramChannel serverChannel = createDatagramChannel(DatagramSocketSettings.create(), SERVER_ADDRESS, null);
AsyncUdpSocketImpl serverConnection = getEchoServerUdpSocket(serverChannel);
serverConnection.register();
// client
DatagramChannel clientChannel = createDatagramChannel(DatagramSocketSettings.create(), null, null);
AsyncUdpSocketImpl clientConnection = getClientUdpSocket(clientChannel);
clientConnection.register();
} catch (IOException e) {
throw new AssertionError(e);
}
});
eventloop.run();
>>>>>>>
clientSocket.register(); |
<<<<<<<
public void onResult(DeleteResponse response) {
HttpResponse res = HttpResponse.ok200();
=======
protected void onResult(DeleteResponse response) {
HttpResponse res = HttpResponse.create();
>>>>>>>
protected void onResult(DeleteResponse response) {
HttpResponse res = HttpResponse.ok200(); |
<<<<<<<
public final class ReportingTest {
=======
@SuppressWarnings("rawtypes")
public class ReportingTest {
>>>>>>>
@SuppressWarnings("rawtypes")
public final class ReportingTest {
<<<<<<<
=======
private DataSource dataSource;
>>>>>>>
<<<<<<<
new AbstractMap.SimpleEntry<>("date", ofLocalDate(LocalDate.parse("2000-01-01"))),
new AbstractMap.SimpleEntry<>("advertiser", ofInt()),
new AbstractMap.SimpleEntry<>("campaign", ofInt()),
new AbstractMap.SimpleEntry<>("banner", ofInt()),
new AbstractMap.SimpleEntry<>("affiliate", ofInt()),
new AbstractMap.SimpleEntry<>("site", ofString())));
=======
new SimpleEntry<>("date", ofLocalDate(LocalDate.parse("2000-01-01"))),
new SimpleEntry<>("advertiser", ofInt()),
new SimpleEntry<>("campaign", ofInt()),
new SimpleEntry<>("banner", ofInt()),
new SimpleEntry<>("affiliate", ofInt()),
new SimpleEntry<>("site", ofString())));
>>>>>>>
new SimpleEntry<>("date", ofLocalDate(LocalDate.parse("2000-01-01"))),
new SimpleEntry<>("advertiser", ofInt()),
new SimpleEntry<>("campaign", ofInt()),
new SimpleEntry<>("banner", ofInt()),
new SimpleEntry<>("affiliate", ofInt()),
new SimpleEntry<>("site", ofString())));
<<<<<<<
new AbstractMap.SimpleEntry<>("date", ofLocalDate(LocalDate.parse("2000-01-01"))),
new AbstractMap.SimpleEntry<>("advertiser", ofInt()),
new AbstractMap.SimpleEntry<>("campaign", ofInt()),
new AbstractMap.SimpleEntry<>("banner", ofInt())));
=======
new SimpleEntry<>("date", ofLocalDate(LocalDate.parse("2000-01-01"))),
new SimpleEntry<>("advertiser", ofInt()),
new SimpleEntry<>("campaign", ofInt()),
new SimpleEntry<>("banner", ofInt())));
>>>>>>>
new SimpleEntry<>("date", ofLocalDate(LocalDate.parse("2000-01-01"))),
new SimpleEntry<>("advertiser", ofInt()),
new SimpleEntry<>("campaign", ofInt()),
new SimpleEntry<>("banner", ofInt())));
<<<<<<<
new AbstractMap.SimpleEntry<>("date", ofLocalDate(LocalDate.parse("2000-01-01"))),
new AbstractMap.SimpleEntry<>("affiliate", ofInt()),
new AbstractMap.SimpleEntry<>("site", ofString())));
=======
new SimpleEntry<>("date", ofLocalDate(LocalDate.parse("2000-01-01"))),
new SimpleEntry<>("affiliate", ofInt()),
new SimpleEntry<>("site", ofString())));
>>>>>>>
new SimpleEntry<>("date", ofLocalDate(LocalDate.parse("2000-01-01"))),
new SimpleEntry<>("affiliate", ofInt()),
new SimpleEntry<>("site", ofString())));
<<<<<<<
new AbstractMap.SimpleEntry<>("impressions", sum(ofLong())),
new AbstractMap.SimpleEntry<>("clicks", sum(ofLong())),
new AbstractMap.SimpleEntry<>("conversions", sum(ofLong())),
new AbstractMap.SimpleEntry<>("revenue", sum(ofDouble())),
new AbstractMap.SimpleEntry<>("eventCount", count(ofInt())),
new AbstractMap.SimpleEntry<>("minRevenue", min(ofDouble())),
new AbstractMap.SimpleEntry<>("maxRevenue", max(ofDouble())),
new AbstractMap.SimpleEntry<>("uniqueUserIdsCount", hyperLogLog(1024)),
new AbstractMap.SimpleEntry<>("errors", sum(ofLong()))));
=======
new SimpleEntry<>("impressions", sum(ofLong())),
new SimpleEntry<>("clicks", sum(ofLong())),
new SimpleEntry<>("conversions", sum(ofLong())),
new SimpleEntry<>("revenue", sum(ofDouble())),
new SimpleEntry<>("eventCount", count(ofInt())),
new SimpleEntry<>("minRevenue", min(ofDouble())),
new SimpleEntry<>("maxRevenue", max(ofDouble())),
new SimpleEntry<>("uniqueUserIdsCount", hyperLogLog(1024)),
new SimpleEntry<>("errors", sum(ofLong()))));
>>>>>>>
new SimpleEntry<>("impressions", sum(ofLong())),
new SimpleEntry<>("clicks", sum(ofLong())),
new SimpleEntry<>("conversions", sum(ofLong())),
new SimpleEntry<>("revenue", sum(ofDouble())),
new SimpleEntry<>("eventCount", count(ofInt())),
new SimpleEntry<>("minRevenue", min(ofDouble())),
new SimpleEntry<>("maxRevenue", max(ofDouble())),
new SimpleEntry<>("uniqueUserIdsCount", hyperLogLog(1024)),
new SimpleEntry<>("errors", sum(ofLong()))));
<<<<<<<
.withClassLoaderCache(CubeClassLoaderCache.create(classLoader, 5))
.initialize(cube -> DIMENSIONS_CUBE.forEach(cube::addDimension))
.initialize(cube -> MEASURES.forEach(cube::addMeasure))
.withRelation("campaign", "advertiser")
.withRelation("banner", "campaign")
.withRelation("site", "affiliate")
.withAttribute("advertiser.name", new AdvertiserResolver())
.withComputedMeasure("ctr", percent(measure("clicks"), measure("impressions")))
.withComputedMeasure("uniqueUserPercent", percent(div(measure("uniqueUserIdsCount"), measure("eventCount"))))
.withComputedMeasure("errorsPercent", percent(div(measure("errors"), measure("impressions"))))
.withAggregation(id("advertisers")
.withDimensions(DIMENSIONS_ADVERTISERS_AGGREGATION.keySet())
.withMeasures(MEASURES.keySet())
.withPredicate(and(notEq("advertiser", EXCLUDE_ADVERTISER), notEq("campaign", EXCLUDE_CAMPAIGN), notEq("banner", EXCLUDE_BANNER))))
.withAggregation(id("affiliates")
.withDimensions(DIMENSIONS_AFFILIATES_AGGREGATION.keySet())
.withMeasures(MEASURES.keySet())
.withPredicate(and(notEq("affiliate", 0), notEq("site", EXCLUDE_SITE))))
.withAggregation(id("daily")
.withDimensions(DIMENSIONS_DATE_AGGREGATION.keySet())
.withMeasures(MEASURES.keySet()));
DataSource dataSource = dataSource("test.properties");
=======
.withClassLoaderCache(CubeClassLoaderCache.create(classLoader, 5))
.initialize(cube -> DIMENSIONS_CUBE.forEach(cube::addDimension))
.initialize(cube -> MEASURES.forEach(cube::addMeasure))
.withRelation("campaign", "advertiser")
.withRelation("banner", "campaign")
.withRelation("site", "affiliate")
.withAttribute("advertiser.name", new AdvertiserResolver())
.withComputedMeasure("ctr", percent(measure("clicks"), measure("impressions")))
.withComputedMeasure("uniqueUserPercent", percent(div(measure("uniqueUserIdsCount"), measure("eventCount"))))
.withComputedMeasure("errorsPercent", percent(div(measure("errors"), measure("impressions"))))
.withAggregation(id("advertisers")
.withDimensions(DIMENSIONS_ADVERTISERS_AGGREGATION.keySet())
.withMeasures(MEASURES.keySet())
.withPredicate(and(notEq("advertiser", EXCLUDE_ADVERTISER), notEq("campaign", EXCLUDE_CAMPAIGN), notEq("banner", EXCLUDE_BANNER))))
.withAggregation(id("affiliates")
.withDimensions(DIMENSIONS_AFFILIATES_AGGREGATION.keySet())
.withMeasures(MEASURES.keySet())
.withPredicate(and(notEq("affiliate", 0), notEq("site", EXCLUDE_SITE))))
.withAggregation(id("daily")
.withDimensions(DIMENSIONS_DATE_AGGREGATION.keySet())
.withMeasures(MEASURES.keySet()));
dataSource = dataSource("test.properties");
>>>>>>>
.withClassLoaderCache(CubeClassLoaderCache.create(classLoader, 5))
.initialize(cube -> DIMENSIONS_CUBE.forEach(cube::addDimension))
.initialize(cube -> MEASURES.forEach(cube::addMeasure))
.withRelation("campaign", "advertiser")
.withRelation("banner", "campaign")
.withRelation("site", "affiliate")
.withAttribute("advertiser.name", new AdvertiserResolver())
.withComputedMeasure("ctr", percent(measure("clicks"), measure("impressions")))
.withComputedMeasure("uniqueUserPercent", percent(div(measure("uniqueUserIdsCount"), measure("eventCount"))))
.withComputedMeasure("errorsPercent", percent(div(measure("errors"), measure("impressions"))))
.withAggregation(id("advertisers")
.withDimensions(DIMENSIONS_ADVERTISERS_AGGREGATION.keySet())
.withMeasures(MEASURES.keySet())
.withPredicate(and(notEq("advertiser", EXCLUDE_ADVERTISER), notEq("campaign", EXCLUDE_CAMPAIGN), notEq("banner", EXCLUDE_BANNER))))
.withAggregation(id("affiliates")
.withDimensions(DIMENSIONS_AFFILIATES_AGGREGATION.keySet())
.withMeasures(MEASURES.keySet())
.withPredicate(and(notEq("affiliate", 0), notEq("site", EXCLUDE_SITE))))
.withAggregation(id("daily")
.withDimensions(DIMENSIONS_DATE_AGGREGATION.keySet())
.withMeasures(MEASURES.keySet()));
DataSource dataSource = dataSource("test.properties");
<<<<<<<
logManager,
new LogItemSplitter(cube),
"testlog",
singletonList("partitionA"),
cubeDiffLogOTState);
=======
logManager,
new LogItemSplitter(cube),
"testlog",
asList("partitionA"),
cubeDiffLogOTState);
>>>>>>>
logManager,
new LogItemSplitter(cube),
"testlog",
singletonList("partitionA"),
cubeDiffLogOTState);
<<<<<<<
.withListenPort(SERVER_PORT)
.withAcceptOnce();
=======
.withListenAddress(new InetSocketAddress("localhost", SERVER_PORT))
.withAcceptOnce();
>>>>>>>
.withListenPort(SERVER_PORT)
.withAcceptOnce();
<<<<<<<
AsyncHttpClient httpClient = AsyncHttpClient.create(eventloop)
.withNoKeepAlive();
cubeHttpClient = CubeHttpClient.create(eventloop, httpClient, "http://127.0.0.1:" + SERVER_PORT)
.withAttribute("date", LocalDate.class)
.withAttribute("advertiser", int.class)
.withAttribute("campaign", int.class)
.withAttribute("banner", int.class)
.withAttribute("affiliate", int.class)
.withAttribute("site", String.class)
.withAttribute("advertiser.name", String.class)
.withMeasure("impressions", long.class)
.withMeasure("clicks", long.class)
.withMeasure("conversions", long.class)
.withMeasure("revenue", double.class)
.withMeasure("errors", long.class)
.withMeasure("eventCount", int.class)
.withMeasure("minRevenue", double.class)
.withMeasure("maxRevenue", double.class)
.withMeasure("ctr", double.class)
.withMeasure("uniqueUserIdsCount", int.class)
.withMeasure("uniqueUserPercent", double.class)
.withMeasure("errorsPercent", double.class);
=======
httpClient = AsyncHttpClient.create(eventloop)
.withNoKeepAlive();
cubeHttpClient = CubeHttpClient.create(httpClient, "http://127.0.0.1:" + SERVER_PORT)
.withAttribute("date", LocalDate.class)
.withAttribute("advertiser", int.class)
.withAttribute("campaign", int.class)
.withAttribute("banner", int.class)
.withAttribute("affiliate", int.class)
.withAttribute("site", String.class)
.withAttribute("advertiser.name", String.class)
.withMeasure("impressions", long.class)
.withMeasure("clicks", long.class)
.withMeasure("conversions", long.class)
.withMeasure("revenue", double.class)
.withMeasure("errors", long.class)
.withMeasure("eventCount", int.class)
.withMeasure("minRevenue", double.class)
.withMeasure("maxRevenue", double.class)
.withMeasure("ctr", double.class)
.withMeasure("uniqueUserIdsCount", int.class)
.withMeasure("uniqueUserPercent", double.class)
.withMeasure("errorsPercent", double.class);
>>>>>>>
AsyncHttpClient httpClient = AsyncHttpClient.create(eventloop)
.withNoKeepAlive();
cubeHttpClient = CubeHttpClient.create(httpClient, "http://127.0.0.1:" + SERVER_PORT)
.withAttribute("date", LocalDate.class)
.withAttribute("advertiser", int.class)
.withAttribute("campaign", int.class)
.withAttribute("banner", int.class)
.withAttribute("affiliate", int.class)
.withAttribute("site", String.class)
.withAttribute("advertiser.name", String.class)
.withMeasure("impressions", long.class)
.withMeasure("clicks", long.class)
.withMeasure("conversions", long.class)
.withMeasure("revenue", double.class)
.withMeasure("errors", long.class)
.withMeasure("eventCount", int.class)
.withMeasure("minRevenue", double.class)
.withMeasure("maxRevenue", double.class)
.withMeasure("ctr", double.class)
.withMeasure("uniqueUserIdsCount", int.class)
.withMeasure("uniqueUserPercent", double.class)
.withMeasure("errorsPercent", double.class);
<<<<<<<
assertEquals(set("date"), new HashSet<>(queryResult.getSortedBy()));
=======
assertEquals(set("date"), set(queryResult.getSortedBy()));
}
@SafeVarargs
private static <T> Set<T> set(T... values) {
return Arrays.stream(values).collect(toSet());
}
private static <T> Set<T> set(Collection<T> values) {
return new HashSet<>(values);
>>>>>>>
assertEquals(set("date"), new HashSet<>(queryResult.getSortedBy()));
<<<<<<<
assertNull(null, records.get(0).get("advertiser.name"));
=======
assertNull(records.get(0).get("advertiser.name"));
>>>>>>>
assertNull(records.get(0).get("advertiser.name"));
<<<<<<<
assertEquals("first", records.get(0).get("advertiser.name"));
assertNull(records.get(1).get("advertiser.name"));
assertEquals("third", records.get(2).get("advertiser.name"));
=======
assertEquals("first", (String) records.get(0).get("advertiser.name"));
assertNull(records.get(1).get("advertiser.name"));
assertEquals("third", (String) records.get(2).get("advertiser.name"));
>>>>>>>
assertEquals("first", records.get(0).get("advertiser.name"));
assertNull(records.get(1).get("advertiser.name"));
assertEquals("third", records.get(2).get("advertiser.name"));
<<<<<<<
new HashSet<>(queryResult.getMeasures()));
=======
set(queryResult.getMeasures()));
>>>>>>>
new HashSet<>(queryResult.getMeasures()));
<<<<<<<
assertEquals(resultByDate.getAttributes().size(), 1);
=======
assertEquals(1, resultByDate.getAttributes().size());
>>>>>>>
assertEquals(1, resultByDate.getAttributes().size()); |
<<<<<<<
eventloop.postLater(() -> {
try {
DatagramChannel datagramChannel = createDatagramChannel(DatagramSocketSettings.create(), null, null);
AsyncUdpSocketImpl udpSocket = AsyncUdpSocketImpl.create(eventloop, datagramChannel);
dnsClientConnection = DnsClientConnection.create(eventloop, udpSocket);
udpSocket.setEventHandler(dnsClientConnection);
udpSocket.register();
} catch (IOException e) {
e.printStackTrace();
fail();
=======
eventloop.postLater(new Runnable() {
@Override
public void run() {
try {
DatagramChannel datagramChannel = createDatagramChannel(DatagramSocketSettings.create(), null, null);
AsyncUdpSocketImpl udpSocket = AsyncUdpSocketImpl.create(eventloop, datagramChannel);
dnsClientConnection = DnsClientConnection.create(eventloop, udpSocket, null);
udpSocket.setEventHandler(dnsClientConnection);
udpSocket.register();
} catch (IOException e) {
e.printStackTrace();
fail();
}
}
});
eventloop.postLater(new Runnable() {
@Override
public void run() {
dnsClientConnection.resolve4("www.github.com", DNS_SERVER_ADDRESS, TIMEOUT, new DnsResolveCallback());
>>>>>>>
eventloop.postLater(() -> {
try {
DatagramChannel datagramChannel = createDatagramChannel(DatagramSocketSettings.create(), null, null);
AsyncUdpSocketImpl udpSocket = AsyncUdpSocketImpl.create(eventloop, datagramChannel);
dnsClientConnection = DnsClientConnection.create(eventloop, udpSocket, null);
udpSocket.setEventHandler(dnsClientConnection);
udpSocket.register();
} catch (IOException e) {
e.printStackTrace();
fail(); |
<<<<<<<
import static io.datakernel.util.Preconditions.*;
import static java.util.Collections.emptyMap;
=======
import static io.datakernel.util.Preconditions.checkArgument;
>>>>>>>
import static io.datakernel.util.Preconditions.*;
import static java.util.Collections.emptyMap;
<<<<<<<
@Override
public int compareTo(OTCommit o) {
return Long.compare(this.level, o.level);
}
=======
>>>>>>>
@Override
public int compareTo(OTCommit o) {
return Long.compare(this.level, o.level);
} |
<<<<<<<
public final class AggregationGroupReducer<C, T, K extends Comparable> extends AbstractStreamConsumer<T> implements StreamConsumer<T>, StreamDataAcceptor<T> {
=======
import static io.datakernel.util.Preconditions.checkNotNull;
public final class AggregationGroupReducer<T> extends AbstractStreamConsumer<T> implements StreamConsumerWithResult<T, List<AggregationChunk>>, StreamDataReceiver<T> {
>>>>>>>
import static io.datakernel.util.Preconditions.checkNotNull;
public final class AggregationGroupReducer<C, T, K extends Comparable> extends AbstractStreamConsumer<T> implements StreamConsumer<T>, StreamDataAcceptor<T> {
<<<<<<<
public AggregationGroupReducer(AggregationChunkStorage<C> storage,
AggregationStructure aggregation, List<String> measures,
Class<T> recordClass, PartitionPredicate<T> partitionPredicate,
Function<T, K> keyFunction, Aggregate<T, Object> aggregate,
int chunkSize, DefiningClassLoader classLoader) {
this.storage = storage;
this.measures = measures;
this.partitionPredicate = partitionPredicate;
this.recordClass = recordClass;
this.keyFunction = keyFunction;
this.aggregate = aggregate;
=======
public AggregationGroupReducer(AggregationChunkStorage storage,
AggregationStructure aggregation, List<String> measures,
Class<?> recordClass, PartitionPredicate<T> partitionPredicate,
Function<T, Comparable<?>> keyFunction, Aggregate aggregate,
int chunkSize, DefiningClassLoader classLoader) {
this.storage = checkNotNull(storage, "Cannot create AggregationGroupReducer with AggregationChunkStorage that is null");
this.measures = checkNotNull(measures, "Cannot create AggregationGroupReducer with measures that is null");
this.partitionPredicate = checkNotNull(partitionPredicate, "Cannot create AggregationGroupReducer with PartitionPredicate that is null");
this.recordClass = (Class<T>) checkNotNull(recordClass, "Cannot create AggregationGroupReducer with recordClass that is null");
this.keyFunction = checkNotNull(keyFunction, "Cannot create AggregationGroupReducer with keyFunction that is null");
this.aggregate = checkNotNull(aggregate, "Cannot create AggregationGroupReducer with Aggregate that is null");
>>>>>>>
public AggregationGroupReducer(AggregationChunkStorage<C> storage,
AggregationStructure aggregation, List<String> measures,
Class<T> recordClass, PartitionPredicate<T> partitionPredicate,
Function<T, K> keyFunction, Aggregate<T, Object> aggregate,
int chunkSize, DefiningClassLoader classLoader) {
this.storage = checkNotNull(storage, "Cannot create AggregationGroupReducer with AggregationChunkStorage that is null");
this.measures = checkNotNull(measures, "Cannot create AggregationGroupReducer with measures that is null");
this.partitionPredicate = checkNotNull(partitionPredicate, "Cannot create AggregationGroupReducer with PartitionPredicate that is null");
this.recordClass = (Class<T>) checkNotNull(recordClass, "Cannot create AggregationGroupReducer with recordClass that is null");
this.keyFunction = checkNotNull(keyFunction, "Cannot create AggregationGroupReducer with keyFunction that is null");
this.aggregate = checkNotNull(aggregate, "Cannot create AggregationGroupReducer with Aggregate that is null"); |
<<<<<<<
@FindBy(id="issueTitle")
WebElement title;
=======
//Coluna de Issues
@FindBy(how = How.ID, using = "0-backlog")
WebElement columnBacklog;
>>>>>>>
//Coluna de Issues
@FindBy(how = How.ID, using = "0-backlog")
WebElement columnBacklog;
<<<<<<<
=======
/**
* input value at element IssueTitle
*/
public void setIssueTitle(String value) {
waitingObject(issueTitle);
issueTitle.clear();
issueTitle.click();
issueTitle.sendKeys(value);
}
/**
* input value at element DescIssue
*/
public void setIssueDesc(String value) {
waitingObject(issueDesc);
issueDesc.clear();
issueDesc.click();
issueDesc.sendKeys(value);
}
public void createIssue(String titleTxt, String descTxt, String repoName) throws Exception {
waitingObject(openModalIssueBtn);
openModalIssueBtn.click();
setIssueTitle(titleTxt);
setIssueDesc(descTxt);
selectProjects(repoName);
createBtn.click();
waitingLoading();
}
>>>>>>>
/**
* input value at element IssueTitle
*/
public void setIssueTitle(String value) {
waitingObject(issueTitle);
issueTitle.clear();
issueTitle.click();
issueTitle.sendKeys(value);
}
/**
* input value at element DescIssue
*/
public void setIssueDesc(String value) {
waitingObject(issueDesc);
issueDesc.clear();
issueDesc.click();
issueDesc.sendKeys(value);
}
public void createIssue(String titleTxt, String descTxt, String repoName) throws Exception {
waitingObject(openModalIssueBtn);
openModalIssueBtn.click();
setIssueTitle(titleTxt);
setIssueDesc(descTxt);
selectProjects(repoName);
createBtn.click();
waitingLoading();
}
<<<<<<<
Integer repoId = null;
// WAIT LOAD OPTIONS
Thread.sleep(2000);
// CREATE LIST BASED IN THE WEBELEMENTS
//Select se = new Select(driver.findElement(By.id("filter-repo")));
Select se = new Select(filterRepo);
List<WebElement> l = se.getOptions();
// CREATE ARRAY WITH WEBELEMENT OPTIONS
ArrayList<String> actual_role = new ArrayList<String>( );
for (int a = 0; a < l.size(); a++){
String varA = l.get(a).getAttribute("value");
actual_role.add(varA);
}
// FIND INDEX BASED THE VALUE
if(actual_role.contains(repoName)) {
repoId = actual_role.indexOf(repoName);
repoId++; // FIX THE DIFFERENCE OF INDEX
}
// SELECT THE OPTION
driver.findElement(By.xpath("//select[@id='filter-repo']/option["+repoId+"]")).click();
Thread.sleep(1000);
=======
waitingLoading();
WebDriverWait wait = new WebDriverWait(this.driver, 10);
Select select=new Select(wait.until(ExpectedConditions.elementToBeClickable(filterRepo)));
select.selectByVisibleText(repoName);
waitingLoading();
>>>>>>>
waitingLoading();
WebDriverWait wait = new WebDriverWait(this.driver, 10);
Select select=new Select(wait.until(ExpectedConditions.elementToBeClickable(filterRepo)));
select.selectByVisibleText(repoName);
waitingLoading();
<<<<<<<
public void createIssue(String titleTxt, String descTxt, String project) throws Exception {
openModalIssueBtn.click();
title.sendKeys(titleTxt);
desc.sendKeys(descTxt);
selectProjects(project);
createBtn.click();
}
public void OpenModal() throws Exception {
openModalIssueBtn.click();
}
public Integer getCount(String column) throws Exception {
Thread.sleep(2000);
=======
public Integer getCount(String column) throws Exception {
waitingLoading();
>>>>>>>
public void OpenModal() throws Exception {
openModalIssueBtn.click();
}
public Integer getCount(String column) throws Exception {
waitingLoading();
<<<<<<<
public String isGithub() throws Exception{
String result = advancedOptions.getAttribute("href");
return result;
}
public void clickAdvanced() throws Exception{
advancedOptions.click();
}
public String chooseProject () throws Exception {
String [] listProjects = new String[3];
listProjects[0] = "user-agent";
listProjects[1] = "dispatcher";
listProjects[2] = "platform";
int index = RandomUtils.nextInt(0, 2);
return (listProjects[index]);
}
public boolean checkTitleFrame(String title) {
return driver.findElement(By.linkText(title)).isDisplayed();
}
public boolean isGithub(String validateGit) {
return driver.findElement(By.name(validateGit)).isDisplayed();
}
public void createIssueTitle(String titleTxt) throws Exception {
openModalIssueBtn.click();
title.sendKeys(titleTxt);
createBtn.click();
}
// GET ID
// public void getId() throws Exception {
// System.out.println("HERE1!!!!");
//WORKING FIRST POSITION String id=driver.findElement(By.xpath("//*[@class='issue list-group-item test_issues_kanboard']")).getAttribute("id");
// String id=driver.findElement(By.xpath().getAttribute("id");
// System.out.println("ID FOUND WAS: "+id);
// }
=======
/**
* waiting load issues!
* @throws InterruptedException
*/
public void waitingLoading() throws InterruptedException{
int timeout=0;
while(driver.findElement(By.id("loading")).getAttribute("class").contains("loading")||timeout==10){
Thread.sleep(100);
timeout++;
}
}
/**
* waiting status element
*/
public void waitingObject(WebElement object) {
boolean regex = object.isEnabled();
while(!regex){
WebDriverWait wait = new WebDriverWait(this.driver, 30);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(object));
regex = element.isEnabled();
}
}
>>>>>>>
public String isGithub() throws Exception{
String result = advancedOptions.getAttribute("href");
return result;
}
public void clickAdvanced() throws Exception{
advancedOptions.click();
}
public String chooseProject () throws Exception {
String [] listProjects = new String[3];
listProjects[0] = "user-agent";
listProjects[1] = "dispatcher";
listProjects[2] = "platform";
int index = RandomUtils.nextInt(0, 2);
return (listProjects[index]);
}
public boolean checkTitleFrame(String title) {
return driver.findElement(By.linkText(title)).isDisplayed();
}
public boolean isGithub(String validateGit) {
return driver.findElement(By.name(validateGit)).isDisplayed();
}
public void createIssueTitle(String titleTxt) throws Exception {
openModalIssueBtn.click();
setIssueTitle(titleTxt);
createBtn.click();
}
/**
* waiting load issues!
* @throws InterruptedException
*/
public void waitingLoading() throws InterruptedException{
int timeout=0;
while(driver.findElement(By.id("loading")).getAttribute("class").contains("loading")||timeout==10){
Thread.sleep(100);
timeout++;
}
}
/**
* waiting status element
*/
public void waitingObject(WebElement object) {
boolean regex = object.isEnabled();
while(!regex){
WebDriverWait wait = new WebDriverWait(this.driver, 30);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(object));
regex = element.isEnabled();
}
}
// GET ID
// public void getId() throws Exception {
// System.out.println("HERE1!!!!");
//WORKING FIRST POSITION String id=driver.findElement(By.xpath("//*[@class='issue list-group-item test_issues_kanboard']")).getAttribute("id");
// String id=driver.findElement(By.xpath().getAttribute("id");
// System.out.println("ID FOUND WAS: "+id);
// } |
<<<<<<<
import org.openqa.selenium.*;
=======
import static org.junit.Assert.fail;
import java.awt.List;
import java.util.ArrayList;
import org.apache.commons.lang3.RandomUtils;
import org.openqa.selenium.By;
//import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
>>>>>>>
import org.openqa.selenium.*;
import org.apache.commons.lang3.RandomUtils;
import org.openqa.selenium.By;
<<<<<<<
=======
@FindBy(css="div#myModal > div")
WebElement outsideModal;
>>>>>>>
@FindBy(css="div#myModal > div")
WebElement outsideModal;
<<<<<<<
=======
@FindBy(linkText="Advanced options")
WebElement advancedOptions;
>>>>>>>
@FindBy(linkText="Advanced options")
WebElement advancedOptions;
<<<<<<<
/**
* click at element CreateIssue
*/
public void openModelCreateIssue() throws Exception {
=======
public void createIssue(String titleTxt, String descTxt, String repoName) throws Exception {
waitingObject(openModalIssueBtn);
openModalIssueBtn.click();
setIssueTitle(titleTxt);
setIssueDesc(descTxt);
selectProjects(repoName);
createBtn.click();
>>>>>>>
/**
* click at element CreateIssue
*/
public void openModelCreateIssue() throws Exception {
<<<<<<<
=======
public void clicOutsideForm() throws Exception {
outsideModal.click();
}
>>>>>>>
<<<<<<<
waitingLoading();
return btnCreateIssue.isDisplayed();
=======
Thread.sleep(1000);
return createBtn.isDisplayed();
>>>>>>>
waitingLoading();
return btnCreateIssue.isDisplayed();
<<<<<<<
public boolean frameCreateIssueDisplayed(){
return driver.findElement(By.cssSelector("div[class=modal-content]")).isDisplayed();
}
public void waitingFrameCreateIssueOpen() throws InterruptedException{
boolean regex = frameCreateIssueDisplayed();
int timeout=0;
while(!regex||timeout>=30){
WebDriverWait wait = new WebDriverWait(this.driver, 30);
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[class=modal-content]")));;
regex = element.isDisplayed();
timeout++;
}
}
public void waitingFrameCreateIssueClose() throws InterruptedException{
// boolean regex = frameCreateIssueDisplayed();
// int timeout=0;
// while(regex||timeout>=30){
// WebDriverWait wait = new WebDriverWait(this.driver, 30);
// regex = wait.until(ExpectedConditions.not(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[class=modal-content]"))));;
// timeout++;
// }
}
=======
// GET ID
// public void getId() throws Exception {
// System.out.println("HERE1!!!!");
//WORKING FIRST POSITION String id=driver.findElement(By.xpath("//*[@class='issue list-group-item test_issues_kanboard']")).getAttribute("id");
// String id=driver.findElement(By.xpath().getAttribute("id");
// System.out.println("ID FOUND WAS: "+id);
// }
>>>>>>>
public boolean frameCreateIssueDisplayed(){
return driver.findElement(By.cssSelector("div[class=modal-content]")).isDisplayed();
}
public void waitingFrameCreateIssueOpen() throws InterruptedException{
boolean regex = frameCreateIssueDisplayed();
int timeout=0;
while(!regex||timeout>=30){
WebDriverWait wait = new WebDriverWait(this.driver, 30);
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[class=modal-content]")));;
regex = element.isDisplayed();
timeout++;
}
}
public void waitingFrameCreateIssueClose() throws InterruptedException{
// boolean regex = frameCreateIssueDisplayed();
// int timeout=0;
// while(regex||timeout>=30){
// WebDriverWait wait = new WebDriverWait(this.driver, 30);
// regex = wait.until(ExpectedConditions.not(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[class=modal-content]"))));;
// timeout++;
// }
} |
<<<<<<<
List<LogItem> queryResult2 = queryResultConsumer2.getList();
for (LogItem logItem : queryResult2) {
assertEquals(logItem.clicks, map2.get(logItem.date).longValue());
=======
for (LogItem logItem : queryResultBeforeConsolidation) {
assertEquals(logItem.clicks, map.remove(logItem.date).longValue());
>>>>>>>
List<LogItem> queryResult2 = queryResultConsumer2.getList();
for (LogItem logItem : queryResult2) {
assertEquals(logItem.clicks, map.remove(logItem.date).longValue()); |
<<<<<<<
StreamConsumers.ToList<Object> consumer = StreamConsumers.toList(eventloop);
StreamProducer queryResultProducer = queryRawStream(newArrayList(queryDimensions), newArrayList(resultStoredMeasures),
=======
StreamConsumers.ToList consumer = StreamConsumers.toList(eventloop);
StreamProducer queryResultProducer = queryRawStream(newArrayList(resultDimensions), newArrayList(resultStoredMeasures),
>>>>>>>
StreamConsumers.ToList<Object> consumer = StreamConsumers.toList(eventloop);
StreamProducer queryResultProducer = queryRawStream(newArrayList(resultDimensions), newArrayList(resultStoredMeasures),
<<<<<<<
tasks.add(() -> {
final SettableStage<Void> stage = SettableStage.create();
Utils.resolveAttributes(results, resolverContainer.resolver,
resolverContainer.dimensions, attributes,
(Class) resultClass, queryClassLoader, AsyncCallbacks.completionToStage(stage));
return stage;
=======
tasks.add(new AsyncRunnable() {
@Override
public void run(CompletionCallback callback) {
Utils.resolveAttributes(results, resolverContainer.resolver,
resolverContainer.dimensions, attributes,
fullySpecifiedDimensions,
(Class) resultClass, queryClassLoader, callback);
}
>>>>>>>
tasks.add(() -> {
final SettableStage<Void> stage = SettableStage.create();
Utils.resolveAttributes(results, resolverContainer.resolver,
resolverContainer.dimensions, attributes,
fullySpecifiedDimensions, (Class) resultClass, queryClassLoader, AsyncCallbacks.completionToStage(stage));
return stage; |
<<<<<<<
=======
@Override
protected void onResult(DnsQueryResult result) {
if (!timeouter.isCancelled() && !timeouter.isComplete()) {
timeouter.cancel();
if (inspector != null) inspector.onDnsQueryResult(domainName, result);
callback.setResult(result);
}
}
@Override
protected void onException(Exception e) {
if (!timeouter.isCancelled() && !timeouter.isComplete()) {
if (e instanceof AsyncTimeoutException) {
e = new DnsException(domainName, ResponseErrorCode.TIMED_OUT);
}
timeouter.cancel();
if (inspector != null) inspector.onDnsQueryError(domainName, e);
callback.setException(e);
}
}
};
Set<ResultCallback<DnsQueryResult>> callbacks = resultHandlers.get(domainName);
if (callbacks == null) {
callbacks = new HashSet<>();
resultHandlers.put(domainName, callbacks);
}
callbacks.add(callbackWithTimeout);
>>>>>>>
<<<<<<<
socket.read();
return stage;
=======
socket.receive();
>>>>>>>
socket.receive();
return stage; |
<<<<<<<
if (isClosed()) return Promise.ofException(CLOSE_EXCEPTION);
=======
>>>>>>> |
<<<<<<<
private ActivityFlowSupport(Flow flow, StateParceler parceler) {
=======
private ActivityFlowSupport(Flow flow, Flow.Dispatcher dispatcher, Parceler parceler) {
>>>>>>>
private ActivityFlowSupport(Flow flow, Flow.Dispatcher dispatcher, StateParceler parceler) {
<<<<<<<
Intent intent, Bundle savedInstanceState, StateParceler parceler, Backstack defaultBackstack) {
=======
Intent intent, Bundle savedInstanceState, Parceler parceler, Backstack defaultBackstack,
Flow.Dispatcher dispatcher) {
>>>>>>>
Intent intent, Bundle savedInstanceState, StateParceler parceler, Backstack defaultBackstack,
Flow.Dispatcher dispatcher) { |
<<<<<<<
List<String> dimensions = getListOfStrings(gson, request.getParameter("dimensions"));
List<String> measures = getListOfStrings(gson, request.getParameter("measures"));
=======
final Stopwatch sw = Stopwatch.createStarted();
List<String> dimensions = getListOfStringsFromJsonArray(gson, request.getParameter("dimensions"));
List<String> measures = getListOfStringsFromJsonArray(gson, request.getParameter("measures"));
>>>>>>>
final Stopwatch sw = Stopwatch.createStarted();
List<String> dimensions = getListOfStrings(gson, request.getParameter("dimensions"));
List<String> measures = getListOfStrings(gson, request.getParameter("measures")); |
<<<<<<<
import io.global.kv.GlobalKvDriver;
import io.global.kv.LocalGlobalKvNode;
=======
import io.global.kv.GlobalKvNodeImpl;
>>>>>>>
import io.global.kv.GlobalKvDriver;
import io.global.kv.GlobalKvNodeImpl;
<<<<<<<
GlobalFsDriver globalFsDriver(GlobalFsNode node, Config config) {
return GlobalFsDriver.create(node, CheckpointPosStrategy.of(config.get(ofLong(), "app.checkpointOffset", 16384L)));
}
@Provides
<K, V> GlobalKvDriver<K, V> globalKvDriver(GlobalKvNode node, StructuredCodec<K> keyCodec, StructuredCodec<V> valueCodec) {
return GlobalKvDriver.create(node, keyCodec, valueCodec);
}
@Provides
<T> StructuredCodec<T> codecProvider(Key<T> reifiedT, CodecFactory codecs) {
return codecs.get(reifiedT.getType());
}
@Provides
=======
GlobalPmNode globalPmNode(Config config, RawServerId serverId, DiscoveryService discoveryService, Function<RawServerId, GlobalPmNode> factory, MessageStorage storage) {
return GlobalPmNodeImpl.create(serverId, discoveryService, factory, storage)
.initialize(ofAbstractGlobalNode(config.getChild("pm")));
}
@Provides
>>>>>>>
GlobalPmNode globalPmNode(Config config, RawServerId serverId, DiscoveryService discoveryService, Function<RawServerId, GlobalPmNode> factory, MessageStorage storage) {
return GlobalPmNodeImpl.create(serverId, discoveryService, factory, storage)
.initialize(ofAbstractGlobalNode(config.getChild("pm")));
}
@Provides
GlobalFsDriver globalFsDriver(GlobalFsNode node, Config config) {
return GlobalFsDriver.create(node, CheckpointPosStrategy.of(config.get(ofLong(), "app.checkpointOffset", 16384L)));
}
@Provides
<K, V> GlobalKvDriver<K, V> globalKvDriver(GlobalKvNode node, StructuredCodec<K> keyCodec, StructuredCodec<V> valueCodec) {
return GlobalKvDriver.create(node, keyCodec, valueCodec);
}
@Provides
<T> StructuredCodec<T> codecProvider(Key<T> reifiedT, CodecFactory codecs) {
return codecs.get(reifiedT.getType());
}
@Provides
<<<<<<<
@Named("Nodes")
AsyncServlet servlet(RawServerServlet otServlet, @Named("fs") AsyncServlet fsServlet, @Named("kv") AsyncServlet kvServlet) {
=======
AsyncServlet servlet(RawServerServlet otServlet, @Named("fs") AsyncServlet fsServlet,
@Named("kv") AsyncServlet kvServlet, @Named("pm") AsyncServlet pmServlet) {
>>>>>>>
@Named("Nodes")
AsyncServlet servlet(RawServerServlet otServlet, @Named("fs") AsyncServlet fsServlet,
@Named("kv") AsyncServlet kvServlet, @Named("pm") AsyncServlet pmServlet) {
<<<<<<<
.map("/ot/*", otServlet)
.map("/fs/*", fsServlet)
.map("/kv/*", kvServlet);
=======
.with("/ot/*", otServlet)
.with("/fs/*", fsServlet)
.with("/kv/*", kvServlet)
.with("/pm/*", pmServlet);
>>>>>>>
.map("/ot/*", otServlet)
.map("/fs/*", fsServlet)
.map("/kv/*", kvServlet)
.map("/pm/*", pmServlet);
<<<<<<<
CommitStorage commitStorage(Eventloop eventloop, Config config, Executor executor) {
return CommitStorageRocksDb.create(executor, eventloop, config.get("ot.storage"));
=======
@Named("pm")
AsyncServlet pmServlet(GlobalPmNode node) {
return GlobalPmNodeServlet.create(node);
}
@Provides
CommitStorage commitStorage(Eventloop eventloop, Config config) {
return CommitStorageRocksDb.create(eventloop, config.get("ot.storage"));
>>>>>>>
@Named("pm")
AsyncServlet pmServlet(GlobalPmNode node) {
return GlobalPmNodeServlet.create(node);
}
@Provides
CommitStorage commitStorage(Eventloop eventloop, Config config, Executor executor) {
return CommitStorageRocksDb.create(executor, eventloop, config.get("ot.storage")); |
<<<<<<<
public static <K, D> OTStateManager<K, D> create(Eventloop eventloop, OTAlgorithms<K, D> algorithms, OTState<D> state) {
return new OTStateManager<>(eventloop, algorithms, state);
=======
public static <K, D> OTStateManager<K, D> create(Eventloop eventloop, OTAlgorithms<K, D> otAlgorithms, OTState<D> state) {
checkArgument(eventloop != null, "Cannot create OTStateManager with Eventloop that is null");
checkArgument(otAlgorithms != null, "Cannot create OTStateManager with OTAlgorithms that is null");
checkArgument(state != null, "Cannot create OTStateManager with OTState that is null");
return new OTStateManager<>(eventloop, otAlgorithms, state);
>>>>>>>
public static <K, D> OTStateManager<K, D> create(Eventloop eventloop, OTAlgorithms<K, D> algorithms, OTState<D> state) {
checkArgument(eventloop != null, "Cannot create OTStateManager with Eventloop that is null");
checkArgument(algorithms != null, "Cannot create OTStateManager with OTAlgorithms that is null");
checkArgument(state != null, "Cannot create OTStateManager with OTState that is null");
return new OTStateManager<>(eventloop, algorithms, state);
<<<<<<<
" workingDiffs:" + workingDiffs.size() +
" fetchedRevision=" + fetchedRevision +
" fetchedDiffs:" + (fetchedDiffs != null ? fetchedDiffs.size() : null) +
" pendingCommits:" + pendingCommits.size() +
=======
" fetchedRevision=" + fetchedRevision +
" fetchedDiffs:" + (fetchedDiffs != null ? fetchedDiffs.size() : null) +
" workingDiffs:" + (workingDiffs != null ? workingDiffs.size() : null) +
" pendingCommits:" + (pendingCommits != null ? pendingCommits.size() : null) +
>>>>>>>
" workingDiffs:" + (workingDiffs != null ? workingDiffs.size() : null) +
" fetchedRevision=" + fetchedRevision +
" fetchedDiffs:" + (fetchedDiffs != null ? fetchedDiffs.size() : null) +
" pendingCommits:" + (pendingCommits != null ? pendingCommits.size() : null) + |
<<<<<<<
AsyncServlet action = request -> {
ByteBuf msg = ByteBufStrings.wrapUtf8("Executed: " + request.getPath());
return SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(msg));
=======
AsyncServlet action = new AsyncServlet() {
@Override
public void serve(HttpRequest request, ResultCallback<HttpResponse> callback) {
ByteBuf msg = ByteBufStrings.wrapUtf8("Executed: " + request.getPath());
callback.setResult(HttpResponse.ofCode(200).withBody(msg));
request.recycleBufs();
}
>>>>>>>
AsyncServlet action = request -> {
ByteBuf msg = ByteBufStrings.wrapUtf8("Executed: " + request.getPath());
request.recycleBufs();
return SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(msg));
<<<<<<<
eventloop.run();
=======
request5.recycleBufs();
request6.recycleBufs();
>>>>>>>
eventloop.run();
request5.recycleBufs();
request6.recycleBufs();
<<<<<<<
AsyncServlet action = request -> {
ByteBuf msg = ByteBufStrings.wrapUtf8("Executed: " + request.getPath());
return SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(msg));
=======
AsyncServlet action = new AsyncServlet() {
@Override
public void serve(HttpRequest request, ResultCallback<HttpResponse> callback) {
ByteBuf msg = ByteBufStrings.wrapUtf8("Executed: " + request.getPath());
callback.setResult(HttpResponse.ofCode(200).withBody(msg));
request.recycleBufs();
}
>>>>>>>
AsyncServlet action = request -> {
ByteBuf msg = ByteBufStrings.wrapUtf8("Executed: " + request.getPath());
request.recycleBufs();
return SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(msg));
<<<<<<<
eventloop.run();
=======
request5.recycleBufs();
request6.recycleBufs();
>>>>>>>
eventloop.run();
request5.recycleBufs();
request6.recycleBufs();
<<<<<<<
AsyncServlet action = request -> {
ByteBuf msg = ByteBufStrings.wrapUtf8("Executed: " + request.getPath());
return SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(msg));
=======
AsyncServlet action = new AsyncServlet() {
@Override
public void serve(HttpRequest request, ResultCallback<HttpResponse> callback) {
ByteBuf msg = ByteBufStrings.wrapUtf8("Executed: " + request.getPath());
callback.setResult(HttpResponse.ofCode(200).withBody(msg));
request.recycleBufs();
}
>>>>>>>
AsyncServlet action = request -> {
ByteBuf msg = ByteBufStrings.wrapUtf8("Executed: " + request.getPath());
request.recycleBufs();
return SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(msg));
<<<<<<<
main.serve(request).whenComplete(assertResult("SHALL NOT BE EXECUTED", 500));
eventloop.run();
=======
main.serve(request, callback("SHALL NOT BE EXECUTED", 500));
request.recycleBufs();
>>>>>>>
main.serve(request).whenComplete(assertResult("SHALL NOT BE EXECUTED", 500));
eventloop.run();
request.recycleBufs();
<<<<<<<
AsyncServlet printParameters = request -> {
String body = request.getUrlParameter("id")
+ " " + request.getUrlParameter("uid")
+ " " + request.getUrlParameter("eid");
ByteBuf bodyByteBuf = ByteBufStrings.wrapUtf8(body);
final HttpResponse httpResponse = HttpResponse.ofCode(200).withBody(bodyByteBuf);
request.recycleBufs();
return SettableStage.immediateStage(httpResponse);
=======
AsyncServlet printParameters = new AsyncServlet() {
@Override
public void serve(HttpRequest request, ResultCallback<HttpResponse> callback) {
String body = request.getPathParameter("id")
+ " " + request.getPathParameter("uid")
+ " " + request.getPathParameter("eid");
ByteBuf bodyByteBuf = ByteBufStrings.wrapUtf8(body);
callback.setResult(HttpResponse.ofCode(200).withBody(bodyByteBuf));
request.recycleBufs();
}
>>>>>>>
AsyncServlet printParameters = request -> {
String body = request.getPathParameter("id")
+ " " + request.getPathParameter("uid")
+ " " + request.getPathParameter("eid");
ByteBuf bodyByteBuf = ByteBufStrings.wrapUtf8(body);
final HttpResponse httpResponse = HttpResponse.ofCode(200).withBody(bodyByteBuf);
request.recycleBufs();
return SettableStage.immediateStage(httpResponse);
<<<<<<<
AsyncServlet servlet = request -> SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("All OK")));
=======
AsyncServlet servlet = new AsyncServlet() {
@Override
public void serve(HttpRequest request, ResultCallback<HttpResponse> callback) {
callback.setResult(HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("All OK")));
request.recycleBufs();
}
};
>>>>>>>
AsyncServlet servlet = request -> {
request.recycleBufs();
return SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("All OK")));
};
<<<<<<<
AsyncServlet servlet = request -> SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("Should not execute")));
=======
AsyncServlet servlet = new AsyncServlet() {
@Override
public void serve(HttpRequest request, ResultCallback<HttpResponse> callback) {
callback.setResult(HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("Should not execute")));
request.recycleBufs();
}
};
>>>>>>>
AsyncServlet servlet = request -> {
request.recycleBufs();
return SettableStage.immediateStage(HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("Should not execute")));
};
<<<<<<<
main.serve(HttpRequest.post(TEMPLATE + "/a/123/b/d")).whenComplete(assertResult("", 405));
eventloop.run();
=======
HttpRequest request = HttpRequest.post(TEMPLATE + "/a/123/b/d");
main.serve(request, callback("", 405));
request.recycleBufs();
>>>>>>>
final HttpRequest request = HttpRequest.post(TEMPLATE + "/a/123/b/d");
main.serve(request).whenComplete(assertResult("", 405));
eventloop.run();
request.recycleBufs();
<<<<<<<
AsyncServlet servlet = request -> SettableStage.immediateStage(
HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("Should not execute")));
AsyncServlet fallback = request -> SettableStage.immediateStage(
HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("Fallback executed")));
=======
AsyncServlet servlet = new AsyncServlet() {
@Override
public void serve(HttpRequest request, ResultCallback<HttpResponse> callback) {
callback.setResult(HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("Should not execute")));
request.recycleBufs();
}
};
AsyncServlet fallback = new AsyncServlet() {
@Override
public void serve(HttpRequest request, ResultCallback<HttpResponse> callback) {
callback.setResult(HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("Fallback executed")));
request.recycleBufs();
}
};
>>>>>>>
AsyncServlet servlet = request -> {
request.recycleBufs();
return SettableStage.immediateStage(
HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("Should not execute")));
};
AsyncServlet fallback = request -> {
request.recycleBufs();
return SettableStage.immediateStage(
HttpResponse.ofCode(200).withBody(ByteBufStrings.wrapUtf8("Fallback executed")));
}; |
<<<<<<<
return stateManager.pull().thenCompose($_ -> stateManager.commitAndPush());
=======
return stateManager.pull().thenCompose($2 -> stateManager.commitAndPush().thenApply(k -> null));
>>>>>>>
return stateManager.pull().thenCompose($_ -> stateManager.commitAndPush().thenApply(k -> null)); |
<<<<<<<
import io.global.ot.api.GlobalOTNode.HeadsInfo;
import org.jetbrains.annotations.Nullable;
=======
>>>>>>>
import org.jetbrains.annotations.Nullable; |
<<<<<<<
/** @deprecated Use {@link #from(android.os.Parcelable, StateParceler)}. */
@Deprecated
public static Backstack from(Parcelable parcelable, final Parceler parceler) {
return from(parcelable, new DeprecatedParcelerAdapter(parceler));
}
/** Get a {@link Parcelable} of this backstack using the supplied {@link StateParceler}. */
public Parcelable getParcelable(StateParceler parceler) {
=======
private final Deque<Entry> backstack;
/** Get a {@link Parcelable} of this backstack using the supplied {@link Parceler}. */
public Parcelable getParcelable(Parceler parceler) {
>>>>>>>
private final Deque<Entry> backstack;
/** @deprecated Use {@link #from(android.os.Parcelable, StateParceler)}. */
@Deprecated
public static Backstack from(Parcelable parcelable, final Parceler parceler) {
return from(parcelable, new DeprecatedParcelerAdapter(parceler));
}
/** Get a {@link Parcelable} of this backstack using the supplied {@link StateParceler}. */
public Parcelable getParcelable(StateParceler parceler) {
<<<<<<<
/** @deprecated Use {@link #getParcelable(StateParceler)}. */
@Deprecated
public Parcelable getParcelable(Parceler parceler) {
return getParcelable(new DeprecatedParcelerAdapter(parceler));
}
=======
/**
* Get a {@link Parcelable} of this backstack using the supplied {@link Parceler}, filtered
* by the supplied {@link Filter}.
*
* The filter is invoked on each state in the stack in reverse order
*
* @return null if all states are filtered out.
*/
public Parcelable getParcelable(Parceler parceler, Filter filter) {
Bundle backstackBundle = new Bundle();
ArrayList<Bundle> entryBundles = new ArrayList<>(backstack.size());
Iterator<Entry> it = backstack.descendingIterator();
while (it.hasNext()) {
Entry entry = it.next();
if (filter.apply(entry.state)) {
entryBundles.add(entry.getBundle(parceler));
}
}
Collections.reverse(entryBundles);
backstackBundle.putParcelableArrayList("ENTRIES", entryBundles);
return backstackBundle;
}
>>>>>>>
/**
* Get a {@link Parcelable} of this backstack using the supplied {@link Parceler}, filtered
* by the supplied {@link Filter}.
*
* The filter is invoked on each state in the stack in reverse order
*
* @return null if all states are filtered out.
*/
public Parcelable getParcelable(StateParceler parceler, Filter filter) {
Bundle backstackBundle = new Bundle();
ArrayList<Bundle> entryBundles = new ArrayList<>(backstack.size());
Iterator<Entry> it = backstack.descendingIterator();
while (it.hasNext()) {
Entry entry = it.next();
if (filter.apply(entry.state)) {
entryBundles.add(entry.getBundle(parceler));
}
}
Collections.reverse(entryBundles);
backstackBundle.putParcelableArrayList("ENTRIES", entryBundles);
return backstackBundle;
}
/** @deprecated Use {@link #getParcelable(StateParceler)}. */
@Deprecated
public Parcelable getParcelable(Parceler parceler) {
return getParcelable(new DeprecatedParcelerAdapter(parceler));
} |
<<<<<<<
import com.google.common.collect.Iterables;
import com.google.common.collect.Ordering;
=======
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Iterables;
import com.google.common.collect.Multimap;
import com.google.common.collect.Ordering;
>>>>>>>
import com.google.common.collect.Iterables;
import com.google.common.collect.Ordering;
<<<<<<<
import static com.google.common.collect.Iterables.*;
=======
import static com.google.common.collect.Iterables.all;
import static com.google.common.collect.Iterables.filter;
>>>>>>>
import static com.google.common.collect.Iterables.*;
<<<<<<<
public <T> CompletionStage<CubeDiff> consume(StreamProducer<T> producer,
Class<T> inputClass, Map<String, String> dimensionFields, Map<String, String> measureFields,
final AggregationPredicate dataPredicate) {
=======
public <T> StreamConsumer<T> consumer(Class<T> inputClass, Map<String, String> dimensionFields, Map<String, String> measureFields,
final AggregationPredicate dataPredicate,
final ResultCallback<Multimap<String, AggregationChunk>> callback) {
>>>>>>>
public <T> CompletionStage<CubeDiff> consume(StreamProducer<T> producer,
Class<T> inputClass, Map<String, String> dimensionFields, Map<String, String> measureFields,
final AggregationPredicate dataPredicate) {
<<<<<<<
List<AggregationContainer> compatibleAggregations = getCompatibleAggregationsForQuery(dimensions, storedMeasures, where);
return queryRawStream(dimensions, storedMeasures, where, resultClass, queryClassLoader, compatibleAggregations);
}
=======
List<AggregationContainer> compatibleAggregations = getCompatibleAggregationsForQuery(dimensions, storedMeasures, where);
return queryRawStream(dimensions, storedMeasures, where, resultClass, queryClassLoader, compatibleAggregations);
}
>>>>>>>
List<AggregationContainer> compatibleAggregations = getCompatibleAggregationsForQuery(dimensions, storedMeasures, where);
return queryRawStream(dimensions, storedMeasures, where, resultClass, queryClassLoader, compatibleAggregations);
}
<<<<<<<
// TODO: 14.06.17 introduce new query plan
=======
>>>>>>>
<<<<<<<
List<AggregationContainer> getCompatibleAggregationsForQuery(List<String> dimensions,
List<String> storedMeasures,
AggregationPredicate where) {
where = where.simplify();
List<String> allDimensions = newArrayList(concat(dimensions, where.getDimensions()));
List<AggregationContainer> compatibleAggregations = new ArrayList<>();
for (AggregationContainer aggregationContainer : aggregations.values()) {
if (!all(allDimensions, in(aggregationContainer.aggregation.getKeys())))
continue;
List<String> compatibleMeasures = newArrayList(filter(storedMeasures, in(aggregationContainer.measures)));
if (compatibleMeasures.isEmpty())
continue;
AggregationPredicate intersection = AggregationPredicates.and(where, aggregationContainer.predicate).simplify();
if (!intersection.equals(where))
continue;
compatibleAggregations.add(aggregationContainer);
}
return compatibleAggregations;
}
static class AggregationContainerWithScore implements Comparable<AggregationContainerWithScore> {
=======
List<AggregationContainer> getCompatibleAggregationsForQuery(Collection<String> dimensions,
Collection<String> storedMeasures,
AggregationPredicate where) {
where = where.simplify();
Set<String> allDimensions = new LinkedHashSet<>(dimensions);
allDimensions.addAll(where.getDimensions());
List<AggregationContainer> compatibleAggregations = new ArrayList<>();
for (AggregationContainer aggregationContainer : aggregations.values()) {
if (!all(allDimensions, in(aggregationContainer.aggregation.getKeys())))
continue;
List<String> compatibleMeasures = newArrayList(filter(storedMeasures, in(aggregationContainer.measures)));
if (compatibleMeasures.isEmpty())
continue;
AggregationPredicate intersection = AggregationPredicates.and(where, aggregationContainer.predicate).simplify();
if (!intersection.equals(where))
continue;
compatibleAggregations.add(aggregationContainer);
}
return compatibleAggregations;
}
static class AggregationContainerWithScore implements Comparable<AggregationContainerWithScore> {
>>>>>>>
List<AggregationContainer> getCompatibleAggregationsForQuery(Collection<String> dimensions,
Collection<String> storedMeasures,
AggregationPredicate where) {
where = where.simplify();
List<String> allDimensions = newArrayList(concat(dimensions, where.getDimensions()));
List<AggregationContainer> compatibleAggregations = new ArrayList<>();
for (AggregationContainer aggregationContainer : aggregations.values()) {
if (!all(allDimensions, in(aggregationContainer.aggregation.getKeys())))
continue;
List<String> compatibleMeasures = newArrayList(filter(storedMeasures, in(aggregationContainer.measures)));
if (compatibleMeasures.isEmpty())
continue;
AggregationPredicate intersection = AggregationPredicates.and(where, aggregationContainer.predicate).simplify();
if (!intersection.equals(where))
continue;
compatibleAggregations.add(aggregationContainer);
}
return compatibleAggregations;
}
static class AggregationContainerWithScore implements Comparable<AggregationContainerWithScore> {
<<<<<<<
return accumulator;
});
}
return reducer.getResult().thenApply(CubeDiff::of);
}
private List<String> getAllParents(String dimension) {
ArrayList<String> chain = new ArrayList<>();
chain.add(dimension);
=======
}
});
}
private List<String> getAllParents(String dimension) {
ArrayList<String> chain = new ArrayList<>();
chain.add(dimension);
>>>>>>>
return accumulator;
});
}
return reducer.getResult().thenApply(CubeDiff::of);
}
private List<String> getAllParents(String dimension) {
ArrayList<String> chain = new ArrayList<>();
chain.add(dimension);
<<<<<<<
return chain;
}
public Set<Long> getAllChunks() {
Set<Long> chunks = new HashSet<>();
for (AggregationContainer container : aggregations.values()) {
chunks.addAll(container.aggregation.getState().getChunks().keySet());
}
return chunks;
=======
return chain;
>>>>>>>
return chain;
}
public Set<Long> getAllChunks() {
Set<Long> chunks = new HashSet<>();
for (AggregationContainer container : aggregations.values()) {
chunks.addAll(container.aggregation.getState().getChunks().keySet());
}
return chunks;
<<<<<<<
List<AggregationContainer> compatibleAggregations = newArrayList();
Set<String> queryDimensions = newLinkedHashSet();
Set<String> queryMeasures = newLinkedHashSet();
=======
List<AggregationContainer> compatibleAggregations = newArrayList();
>>>>>>>
List<AggregationContainer> compatibleAggregations = newArrayList();
<<<<<<<
List<String> measures = query.getMeasures();
compatibleAggregations = getCompatibleAggregationsForQuery(newArrayList(concat(queryDimensions)), measures, queryPredicate);
=======
>>>>>>>
<<<<<<<
recordScheme = createRecordScheme();
if (ReportType.METADATA == query.getReportType()) {
resultCallback.setResult(QueryResult.createForMetadata(recordScheme,
compatibleAggregations.isEmpty() ? Collections.<String>emptyList() : newArrayList(resultAttributes),
compatibleAggregations.isEmpty() ? Collections.<String>emptyList() : newArrayList(resultMeasures)));
return;
}
=======
recordScheme = createRecordScheme();
if (ReportType.METADATA == query.getReportType()) {
resultCallback.setResult(QueryResult.createForMetadata(recordScheme,
recordAttributes,
recordMeasures));
return;
}
>>>>>>>
recordScheme = createRecordScheme();
if (ReportType.METADATA == query.getReportType()) {
resultCallback.setResult(QueryResult.createForMetadata(recordScheme,
recordAttributes,
recordMeasures));
return;
}
<<<<<<<
StreamProducer queryResultProducer = queryRawStream(newArrayList(queryDimensions), newArrayList(resultStoredMeasures),
queryPredicate, resultClass, queryClassLoader, compatibleAggregations);
=======
StreamProducer queryResultProducer = queryRawStream(newArrayList(resultDimensions), newArrayList(resultStoredMeasures),
queryPredicate, resultClass, queryClassLoader, compatibleAggregations);
>>>>>>>
StreamProducer queryResultProducer = queryRawStream(newArrayList(resultDimensions), newArrayList(resultStoredMeasures),
queryPredicate, resultClass, queryClassLoader, compatibleAggregations);
<<<<<<<
dimensions = getAllParents(attribute);
dimensions.removeAll(fullySpecifiedDimensions);
queryDimensions.add(attribute);
queryDimensions.add(attribute);
=======
dimensions = getAllParents(attribute);
>>>>>>>
dimensions = getAllParents(attribute); |
<<<<<<<
@Override
public void addCookies(@NotNull List<HttpCookie> cookies) {
if (CHECK) checkState(!isRecycled());
headers.add(COOKIE, new HttpHeaderValueOfSimpleCookies(cookies));
}
@Override
public void addCookie(@NotNull HttpCookie cookie) {
addCookies(singletonList(cookie));
}
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>>
<<<<<<<
if (CHECK) checkState(!isRecycled());
=======
>>>>>>> |
<<<<<<<
=======
@Override
public void onSerializationError(RpcMessage message, @NotNull Throwable e) {
if (isClosed()) return;
logger.error("Serialization error: {} for data {}", address, message.getData(), e);
rpcClient.getLastProtocolError().recordException(e, address);
activeRequests.remove(message.getCookie()).accept(null, e);
}
private void addIntoInitialBuffer(RpcMessage msg) {
initialBuffer.add(msg);
}
>>>>>>>
@Override
public void onSerializationError(RpcMessage message, @NotNull Throwable e) {
if (isClosed()) return;
logger.error("Serialization error: {} for data {}", address, message.getData(), e);
rpcClient.getLastProtocolError().recordException(e, address);
activeRequests.remove(message.getCookie()).accept(null, e);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.