conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
@API(help = "Number of columns picked at each split") final int mtries;
@API(help = "Sample rate") final float sample_rate;
@API(help = "Seed") final long seed;
public DRFModel(Key key, Key dataKey, Key testKey, String names[], String domains[][], String[] cmDomain, int ntrees, int max_depth, int min_rows, int nbins, int mtries, float sample_rate, long seed) {
super(key,dataKey,testKey,names,domains,cmDomain,ntrees, max_depth, min_rows, nbins);
=======
@API(help = "Number of columns picked at each split", json=true) final int mtries;
@API(help = "Sample rate", json=true) final float sample_rate;
@API(help = "Seed", json=true) final long seed;
public DRFModel(Key key, Key dataKey, Key testKey, String names[], String domains[][], int ntrees, int max_depth, int min_rows, int nbins, int mtries, float sample_rate, long seed) {
super(key,dataKey,testKey,names,domains,ntrees, max_depth, min_rows, nbins);
>>>>>>>
@API(help = "Number of columns picked at each split") final int mtries;
@API(help = "Sample rate") final float sample_rate;
@API(help = "Seed") final long seed;
public DRFModel(Key key, Key dataKey, Key testKey, String names[], String domains[][], String[] cmDomain, int ntrees, int max_depth, int min_rows, int nbins, int mtries, float sample_rate, long seed) {
super(key,dataKey,testKey,names,domains,cmDomain,ntrees, max_depth, min_rows, nbins);
<<<<<<<
@Override protected void logStart() {
Log.info("Starting DRF model build...");
super.logStart();
Log.info(" mtry defined: " + mtries);
Log.info(" mtry computed: " + _mtry);
Log.info(" sample_rate: " + sample_rate);
Log.info(" seed: " + _seed);
Log.info(" importance: " + importance);
}
=======
>>>>>>> |
<<<<<<<
public double getd( long i ) { return elem2BV(elem2ChunkIdx(i)).atd(i); }
=======
public double getd( long i ) { throw H2O.unimpl(); }
public boolean isNA( long i ) { return elem2BV(elem2ChunkIdx(i)).isNA(i); }
>>>>>>>
public double getd( long i ) { return elem2BV(elem2ChunkIdx(i)).atd(i); }
public boolean isNA( long i ) { return elem2BV(elem2ChunkIdx(i)).isNA(i); } |
<<<<<<<
@Override protected void registered() {
super.registered();
Argument c = find("ignored_cols_by_name");
Argument r = find("response");
int ci = _arguments.indexOf(c);
int ri = _arguments.indexOf(r);
_arguments.set(ri, c);
_arguments.set(ci, r);
}
@Override protected void logStart() {
super.logStart();
if (response == null) {
Log.info(" response: null");
}
else {
String arg = input("response");
assert arg != null;
Log.info(" response: " + arg);
}
}
@Override protected void init() {
super.init();
// Doing classification only right now...
if( !response.isEnum() ) response.asEnum();
=======
@API(help="Do Classification or regression", filter=myClassFilter.class)
public boolean classification = false;
class myClassFilter extends DoClassBoolean { myClassFilter() { super("source"); } }
>>>>>>>
@Override protected void registered() {
super.registered();
Argument c = find("ignored_cols_by_name");
Argument r = find("response");
int ci = _arguments.indexOf(c);
int ri = _arguments.indexOf(r);
_arguments.set(ri, c);
_arguments.set(ci, r);
}
@Override protected void logStart() {
super.logStart();
if (response == null) {
Log.info(" response: null");
}
else {
String arg = input("response");
assert arg != null;
Log.info(" response: " + arg);
}
}
@Override protected void init() {
super.init();
// Doing classification only right now...
if( !response.isEnum() ) response.asEnum();
@API(help="Do Classification or regression", filter=myClassFilter.class)
public boolean classification = false;
class myClassFilter extends DoClassBoolean { myClassFilter() { super("source"); } } |
<<<<<<<
@API(help = "Compute variable importance (true/false).", filter = Default.class )
protected boolean importance = false; // compute variable importance
// Overall prediction Mean Squared Error as I add trees
transient protected double _errs[];
=======
>>>>>>>
@API(help = "Compute variable importance (true/false).", filter = Default.class )
protected boolean importance = false; // compute variable importance |
<<<<<<<
private Split( int col, int bin, boolean equal, long n0, long n1, double mse0, double mse1, float preds0[], float preds1[] ) {
_col = col;
_bin = bin;
_equal = equal;
_nrows = new long[] { n0, n1 };
_mses = new double[] { mse0, mse1 };
_preds = new float[][] { preds0, preds1 };
correctDistro(preds0);
correctDistro(preds1);
assert checkDistro( _preds );
}
// Return a Split with a float distr
public static Split make( int col, int bin, boolean equal, long n0, long n1, double mse0, double mse1, float f0[], float f1[] ) {
return new Split(col,bin,equal,n0,n1,mse0,mse1,f0,f1);
}
// Convert a double distribution to a float distribution
public static Split make( int col, int bin, boolean equal, long n0, long n1, double mse0, double mse1, double preds0[], float f1[] ) {
float f0[] = new float[f1.length];
if( preds0 != null )
for( int i=0; i<f1.length; i++ )
f0[i] = (float)preds0[i];
return make(col,bin,equal,n0,n1,mse0,mse1,f0,f1);
=======
Split( int col, int bin, boolean equal, double se0, double se1, long n0, long n1 ) {
_col = col; _bin = bin; _equal = equal;
_n0 = n0; _n1 = n1; _se0 = se0; _se1 = se1;
>>>>>>>
Split( int col, int bin, boolean equal, double se0, double se1, long n0, long n1 ) {
_col = col; _bin = bin; _equal = equal;
_n0 = n0; _n1 = n1; _se0 = se0; _se1 = se1;
<<<<<<<
// nodeType: (from lsb):
// 2 bits ( 1,2) skip-tree-size-size,
// 1 bit ( 4) operator flag (0 -> <, 1 -> == ),
// 1 bit ( 8) left leaf flag,
// 1 bit (16) left leaf type flag,
// 1 bit (32) right leaf flag,
// 1 bit (64) right leaf type flag
=======
// nodeType: (from lsb):
// 2 bits ( 1,2) skip-tree-size-size,
// 1 bit ( 4) operator flag (0 --> <, 1 --> == ),
// 1 bit ( 8) left leaf flag,
// 1 bit (16) left leaf type flag, (unused)
// 1 bit (32) right leaf flag,
// 1 bit (64) right leaf type flag (unused)
>>>>>>>
// nodeType: (from lsb):
// 2 bits ( 1,2) skip-tree-size-size,
// 1 bit ( 4) operator flag (0 --> <, 1 --> == ),
// 1 bit ( 8) left leaf flag,
// 1 bit (16) left leaf type flag, (unused)
// 1 bit (32) right leaf flag,
// 1 bit (64) right leaf type flag (unused)
<<<<<<<
private float[] scoreLeaf(AutoBuffer ab, float preds[], int ymin, boolean big) {
if( !big ) // Small leaf?
preds[ymin+(_nclass < 256 ? ab.get1() : ab.get2())] += 1.0f;
else // Big leaf
for( int i = 0; i < _nclass; ++i )
preds[ymin+i] += ab.get4f();
return preds;
}
=======
private float scoreLeaf( AutoBuffer ab ) { return ab.get4f(); }
>>>>>>>
private float scoreLeaf( AutoBuffer ab ) { return ab.get4f(); }
<<<<<<<
// Due to roundoff error, we often get "ugly" distributions. Correct where obvious.
static void correctDistro( float fs[] ) {
if( fs == null ) return;
double sum=0;
int max=0;
for( int i=0; i<fs.length; i++ ) {
sum += fs[i];
if( fs[i] > max ) max = i;
}
if( Double.isNaN(sum) ) return; // Assume this is intended
if( sum < 0.5 ) { // GBM: expect 0.0 distro
assert Math.abs(sum)<0.0001 : Arrays.toString(fs);// Really busted?
if( sum != 0.0 ) { // Not a 0.0?
sum /= fs.length; // Recenter the distro around 0
for( int i=0; i<fs.length; i++ )
fs[i] -= sum;
}
} else { // DRF: expect 1.0 distro
assert Math.abs(sum-1.0)<0.0001 : Arrays.toString(fs);// Really busted?
if( fs[max] >= 1.0 ) { // If max class >= 1.0, force a clean distro
Arrays.fill(fs,0); // All zeros, except the 1.0
fs[max] = 1.0f; //
} else // Else adjust the max to clean out error
fs[max] += 1.0-sum;
}
sum=0;
for( float f : fs ) sum+=f;
assert Math.abs((sum < 0.5 ? 0 : 1)-sum)<0.000001 : Arrays.toString(fs);
}
static boolean checkDistro( float[/*class*/] fs ) {
float sum=0;
for( float f : fs ) sum += f;
if( Math.abs(sum-(sum < 0.5 ? 0.0 : 1.0)) > 0.00001 ) {
System.out.println("crap distro: "+Arrays.toString(fs)+"="+sum);
return false;
}
return true;
}
static boolean checkDistro( float[/*split*/][/*class*/] fss ) {
for( float fs[] : fss )
if( fs != null && !checkDistro(fs) ) return false;
return true;
}
=======
>>>>>>> |
<<<<<<<
=======
import com.google.gson.JsonObject;
>>>>>>>
import com.google.gson.JsonObject;
<<<<<<<
=======
@Override
protected JsonObject toJSON() {
JsonObject jo = super.toJSON();
jo.addProperty("mtry_computed", _mtry);
return jo;
}
>>>>>>>
@Override
protected JsonObject toJSON() {
JsonObject jo = super.toJSON();
jo.addProperty("mtry_computed", _mtry);
return jo;
} |
<<<<<<<
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
=======
import static water.util.Utils.difference;
import static water.util.Utils.isEmpty;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
>>>>>>>
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
<<<<<<<
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.HashMap;
import static water.util.Utils.difference;
import static water.util.Utils.isEmpty;
=======
>>>>>>>
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.HashMap;
import static water.util.Utils.difference;
import static water.util.Utils.isEmpty; |
<<<<<<<
sc==null ? null : (_nclass>1? new ConfusionMatrix(sc._cm):null),
varimp,
varimpSD,
sc==null ? null : (_nclass==2 ? toCMArray(sc._cms) : null)
);
=======
sc==null ? null : (_nclass>1 ? new ConfusionMatrix(sc._cm) : null),
sc==null ? null : (_nclass==2 ? makeAUC(toCMArray(sc._cms), ModelUtils.DEFAULT_THRESHOLDS) : null)
);
>>>>>>>
sc==null ? null : (_nclass>1? new ConfusionMatrix(sc._cm):null),
varimp,
varimpSD,
sc==null ? null : (_nclass==2 ? makeAUC(toCMArray(sc._cms), ModelUtils.DEFAULT_THRESHOLDS) : null)
);
<<<<<<<
protected abstract TM makeModel( TM model, double err, ConfusionMatrix cm, float[] varimp, float[] varimpSD, ConfusionMatrix[] auccms);
=======
protected abstract TM makeModel( TM model, double err, ConfusionMatrix cm, water.api.AUC validAUC);
>>>>>>>
protected abstract TM makeModel( TM model, double err, ConfusionMatrix cm, float[] varimp, float[] varimpSD, water.api.AUC validAUC); |
<<<<<<<
Interop.register(new RGLM());
=======
Interop.register(new KmeansScore());
>>>>>>>
Interop.register(new RGLM());
Interop.register(new KmeansScore()); |
<<<<<<<
String RESTEASY_GZIP_MAX_INPUT = "resteasy.gzip.max.input";
=======
String RESTEASY_SECURE_RANDOM_MAX_USE = "resteasy.secure.random.max.use";
>>>>>>>
String RESTEASY_GZIP_MAX_INPUT = "resteasy.gzip.max.input";
String RESTEASY_SECURE_RANDOM_MAX_USE = "resteasy.secure.random.max.use"; |
<<<<<<<
List<TileData<Double>> data = _pyramidIO.readTiles(_pyramidId,
_serializer,
Collections.singleton(index), null);
=======
List<TileData<Double>> data = null;
if (null != _serializer) {
data = _pyramidIO.readTiles(_pyramidId, _serializer, Collections.singleton(index));
} else {
List<TileData<List<Double>>> rawData = _pyramidIO.readTiles(_pyramidId, _bucketSerializer, Collections.singleton(index));
data = new ArrayList<>();
for (TileData<List<Double>> tile: rawData) {
data.add(new DenseTileSliceView<Double>(tile, 0));
}
}
>>>>>>>
List<TileData<Double>> data = null;
if (null != _serializer) {
data = _pyramidIO.readTiles(_pyramidId, _serializer, Collections.singleton(index), null);
} else {
List<TileData<List<Double>>> rawData = _pyramidIO.readTiles(_pyramidId, _bucketSerializer, Collections.singleton(index), null);
data = new ArrayList<>();
for (TileData<List<Double>> tile: rawData) {
data.add(new DenseTileSliceView<Double>(tile, 0));
}
} |
<<<<<<<
public <PT> PT getPropertyValue (ConfigurationProperty<PT> property) {
if (!super.getPropertyValue(property).equals(property.getDefaultValue())) {
return super.getPropertyValue(property); // Give precedence to overrides in server config
} else if (LAYER_MAXIMUM.equals(property)) {
=======
public <PT> PT getPropertyValue (ConfigurationProperty<PT> property) throws ConfigurationException {
if (LAYER_MAXIMUM.equals(property)) {
>>>>>>>
public <PT> PT getPropertyValue (ConfigurationProperty<PT> property) throws ConfigurationException {
if (!super.getPropertyValue(property).equals(property.getDefaultValue())) {
return super.getPropertyValue(property); // Give precedence to overrides in server config
} else if (LAYER_MAXIMUM.equals(property)) { |
<<<<<<<
@RequiresApi(api = Build.VERSION_CODES.M)
private void checkPermissions() {
final String[] permissionsForRequest = getPermissionsForRequest();
if (permissionsForRequest.length > 0) {
activity.requestPermissions(permissionsForRequest, PERMISSION_REQUEST_CODE);
} else {
successListener.onSuccess();
=======
if (successListener != null && failureListener != null && neverAskAgainListener != null) {
activity.requestPermissions(permissions, PERMISSION_REQUEST_CODE);
} else
throw new RuntimeException("OnPermissionSuccessListener or OnPermissionFailureListener not implemented. Use methods: onSuccess and onFailure");
} else if(successListener != null) {
successListener.run();
>>>>>>>
/**
* Request only those permissions that are not granted.
* If all are granted, the success method is triggered
*/
@RequiresApi(api = Build.VERSION_CODES.M)
private void checkPermissions() {
final String[] permissionsForRequest = getPermissionsForRequest();
if (permissionsForRequest.length > 0) {
activity.requestPermissions(permissionsForRequest, PERMISSION_REQUEST_CODE);
} else {
successListener.run();
<<<<<<<
private String[] getPermissionsForRequest() {
List<String> permissionsForRequest = new ArrayList<>();
for (String permission : permissions) {
if (isPermissionNotGranted(permission)) {
permissionsForRequest.add(permission);
}
}
return permissionsForRequest.toArray(new String[permissionsForRequest.size()]);
}
public interface OnPermissionSuccessListener {
void onSuccess();
}
public interface OnPermissionNewerAskAgainListener {
void onNewerAskAgain();
}
public interface OnPermissionFailureListener {
void onFailure();
}
=======
>>>>>>> |
<<<<<<<
import com.redhat.ceylon.compiler.typechecker.tree.Tree.AndOp;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.BinaryOperatorExpression;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Element;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.ElementOrRange;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.ElementRange;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Exists;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Expression;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.IndexExpression;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.InvocationExpression;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.NamedArgument;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Nonempty;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.OrOp;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Outer;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.PositionalArgumentList;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.QualifiedMemberExpression;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.SequenceEnumeration;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.SequencedArgument;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.StringLiteral;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Super;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Term;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.This;
=======
>>>>>>>
<<<<<<<
private JCExpression transformNamedInvocation(final InvocationExpression ce) {
ListBuffer<JCVariableDecl> vars = ListBuffer.lb();
ListBuffer<JCExpression> args = ListBuffer.lb();
=======
// Named invocation
private JCExpression transformNamedInvocation(final Tree.InvocationExpression ce) {
final ListBuffer<JCVariableDecl> args = ListBuffer.lb();
final ListBuffer<JCExpression> names = ListBuffer.lb();
>>>>>>>
// Named invocation
private JCExpression transformNamedInvocation(final Tree.InvocationExpression ce) {
ListBuffer<JCVariableDecl> vars = ListBuffer.lb();
ListBuffer<JCExpression> args = ListBuffer.lb();
<<<<<<<
private JCExpression transformPositionalInvocation(InvocationExpression ce) {
ListBuffer<JCVariableDecl> vars = null;
ListBuffer<JCExpression> args = new ListBuffer<JCExpression>();
=======
// Positional invocation
private JCExpression transformPositionalInvocation(Tree.InvocationExpression ce) {
final ListBuffer<JCExpression> args = new ListBuffer<JCExpression>();
>>>>>>>
// Positional invocation
private JCExpression transformPositionalInvocation(Tree.InvocationExpression ce) {
ListBuffer<JCVariableDecl> vars = null;
ListBuffer<JCExpression> args = new ListBuffer<JCExpression>();
<<<<<<<
JCExpression boxed;
// then, box the remaining passed arguments
if (numDeclared -1 == numPassed) {
// box as Empty
boxed = makeEmpty();
} else {
// box with an ArraySequence<T>
List<Expression> x = List.<Expression>nil();
for (int ii = numDeclared - 1; ii < numPassed; ii++) {
=======
int numDeclared = declaredParams.size();
java.util.List<Tree.PositionalArgument> passedArguments = positional.getPositionalArguments();
int numPassed = passedArguments.size();
Parameter lastDeclaredParam = declaredParams.isEmpty() ? null : declaredParams.get(declaredParams.size() - 1);
if (lastDeclaredParam != null
&& lastDeclaredParam.isSequenced()
&& positional.getEllipsis() == null) {// foo(sequence...) syntax => no need to box
// => call to a varargs method
isVarargs = true;
// first, append the normal args
for (int ii = 0; ii < numDeclared - 1; ii++) {
>>>>>>>
JCExpression boxed;
// then, box the remaining passed arguments
if (numDeclared -1 == numPassed) {
// box as Empty
boxed = makeEmpty();
} else {
// box with an ArraySequence<T>
List<Tree.Expression> x = List.<Tree.Expression>nil();
for (int ii = numDeclared - 1; ii < numPassed; ii++) {
<<<<<<<
x = x.append(arg.getExpression());
=======
args.append(transformArg(arg.getExpression(), arg.getParameter(), isRaw, typeArgumentModels));
}
JCExpression boxed;
// then, box the remaining passed arguments
if (numDeclared -1 == numPassed) {
// box as Empty
boxed = makeEmpty();
} else {
// box with an ArraySequence<T>
List<Tree.Expression> x = List.<Tree.Expression>nil();
for (int ii = numDeclared - 1; ii < numPassed; ii++) {
Tree.PositionalArgument arg = positional.getPositionalArguments().get(ii);
x = x.append(arg.getExpression());
}
boxed = makeSequenceRaw(x);
>>>>>>>
x = x.append(arg.getExpression()); |
<<<<<<<
=======
case CeylonParser.EQEQ:
{
// FIXME: op0 and op1 are evaluated twice. If these have side-
// effects, this is a nasty bug.
JCExpression op0 = convertExpression(operands[0]);
JCExpression op1 = convertExpression(operands[1]);
JCExpression rhs = at(op).Conditional(
at(op).Binary(JCTree.NE, op1,
make.Literal(TypeTags.BOT, null)),
make.Literal(TypeTags.BOOLEAN, 0),
make.Literal(TypeTags.BOOLEAN, 1));
rhs = at(op).Apply(null, makeSelect(makeIdent(syms.ceylonBooleanType), "instance"), List.of(rhs));
JCExpression lhs = at(op).Apply(null,
at(op).Select(op0, names.fromString("operatorEqual")),
List.of(op1));
JCTree.JCBinary cond = at(op).Binary(JCTree.NE, op0,
make.Literal(TypeTags.BOT, null));
JCExpression expr = at(op).Conditional(cond, lhs, rhs);
return expr;
}
>>>>>>> |
<<<<<<<
private LazyValue makeToplevelAttribute(ClassMirror classMirror) {
LazyValue value = new LazyValue(classMirror, this);
=======
protected Declaration makeToplevelAttribute(ClassMirror classMirror) {
Value value = new LazyValue(classMirror, this);
>>>>>>>
protected LazyValue makeToplevelAttribute(ClassMirror classMirror) {
LazyValue value = new LazyValue(classMirror, this);
<<<<<<<
private LazyMethod makeToplevelMethod(ClassMirror classMirror) {
=======
protected Declaration makeToplevelMethod(ClassMirror classMirror) {
>>>>>>>
protected LazyMethod makeToplevelMethod(ClassMirror classMirror) {
<<<<<<<
private LazyClass makeLazyClass(ClassMirror classMirror, Class superClass, MethodMirror constructor, boolean forTopLevelObject) {
LazyClass klass = new LazyClass(classMirror, this, superClass, constructor, forTopLevelObject);
klass.setAnonymous(classMirror.getAnnotation(CEYLON_OBJECT_ANNOTATION) != null);
=======
protected Class makeLazyClass(ClassMirror classMirror, Class superClass, MethodMirror constructor, boolean forTopLevelObject) {
Class klass = new LazyClass(classMirror, this, superClass, constructor, forTopLevelObject);
>>>>>>>
protected LazyClass makeLazyClass(ClassMirror classMirror, Class superClass, MethodMirror constructor, boolean forTopLevelObject) {
LazyClass klass = new LazyClass(classMirror, this, superClass, constructor, forTopLevelObject);
klass.setAnonymous(classMirror.getAnnotation(CEYLON_OBJECT_ANNOTATION) != null);
<<<<<<<
private LazyInterface makeLazyInterface(ClassMirror classMirror) {
LazyInterface iface = new LazyInterface(classMirror, this);
=======
protected Interface makeLazyInterface(ClassMirror classMirror) {
Interface iface = new LazyInterface(classMirror, this);
>>>>>>>
protected LazyInterface makeLazyInterface(ClassMirror classMirror) {
LazyInterface iface = new LazyInterface(classMirror, this);
<<<<<<<
public void logDuplicateModuleError(Module module, Module loadedModule) {
logError("Trying to import or compile two different versions of the same module: "+
module.getNameAsString()+" ("+module.getVersion()+" and "+loadedModule.getVersion()+")");
}
=======
public void setupSourceFileObjects(List<?> treeHolders) {
}
>>>>>>>
public void logDuplicateModuleError(Module module, Module loadedModule) {
logError("Trying to import or compile two different versions of the same module: "+
module.getNameAsString()+" ("+module.getVersion()+" and "+loadedModule.getVersion()+")");
public void setupSourceFileObjects(List<?> treeHolders) {
} |
<<<<<<<
import com.redhat.ceylon.compiler.typechecker.tree.Tree.SwitchStatement;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Switched;
=======
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Variable;
>>>>>>>
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Switched;
import com.redhat.ceylon.compiler.typechecker.tree.Tree.Variable;
<<<<<<<
private ProducedType switchExpressionType(Tree.SwitchStatement stmt) {
Switched sw = stmt.getSwitchClause().getSwitched();
if (sw.getExpression() != null) {
return sw.getExpression().getTypeModel();
} else if (sw.getVariable() != null) {
return sw.getVariable().getType().getTypeModel();
}
throw new BugException("Switch should have expression or variable");
}
=======
protected JCBlock transformElseClauseBlock(Tree.ElseClause elseClause, String tmpVar, Tree.Term outerExpression){
return make().Block(0, transformElseClause(elseClause, tmpVar, outerExpression));
}
protected List<JCStatement> transformElseClause(Tree.ElseClause elseClause, String tmpVar, Tree.Term outerExpression){
if(elseClause.getBlock() != null)
return transformBlock(elseClause.getBlock());
if(elseClause.getExpression() != null)
return evaluateAndAssign(tmpVar, elseClause.getExpression(), outerExpression);
return List.<JCStatement>of(make().Exec(makeErroneous(elseClause, "Only block or expression allowed")));
}
protected JCBlock transformCaseClauseBlock(Tree.CaseClause caseClause, String tmpVar, Tree.Term outerExpression){
return make().Block(0, transformCaseClause(caseClause, tmpVar, outerExpression));
}
protected List<JCStatement> transformCaseClause(Tree.CaseClause caseClause, String tmpVar, Tree.Term outerExpression){
if(caseClause.getBlock() != null)
return transformBlock(caseClause.getBlock());
if(caseClause.getExpression() != null)
return evaluateAndAssign(tmpVar, caseClause.getExpression(), outerExpression);
return List.<JCStatement>of(make().Exec(makeErroneous(caseClause, "Only block or expression allowed")));
}
>>>>>>>
protected JCBlock transformElseClauseBlock(Tree.ElseClause elseClause, String tmpVar, Tree.Term outerExpression){
return make().Block(0, transformElseClause(elseClause, tmpVar, outerExpression));
}
protected List<JCStatement> transformElseClause(Tree.ElseClause elseClause, String tmpVar, Tree.Term outerExpression){
if(elseClause.getBlock() != null)
return transformBlock(elseClause.getBlock());
if(elseClause.getExpression() != null)
return evaluateAndAssign(tmpVar, elseClause.getExpression(), outerExpression);
return List.<JCStatement>of(make().Exec(makeErroneous(elseClause, "Only block or expression allowed")));
}
protected JCBlock transformCaseClauseBlock(Tree.CaseClause caseClause, String tmpVar, Tree.Term outerExpression){
return make().Block(0, transformCaseClause(caseClause, tmpVar, outerExpression));
}
protected List<JCStatement> transformCaseClause(Tree.CaseClause caseClause, String tmpVar, Tree.Term outerExpression){
if(caseClause.getBlock() != null)
return transformBlock(caseClause.getBlock());
if(caseClause.getExpression() != null)
return evaluateAndAssign(tmpVar, caseClause.getExpression(), outerExpression);
return List.<JCStatement>of(make().Exec(makeErroneous(caseClause, "Only block or expression allowed")));
}
protected ProducedType switchExpressionType(Tree.SwitchClause switchClause) {
Switched sw = switchClause.getSwitched();
if (sw.getExpression() != null) {
return sw.getExpression().getTypeModel();
} else if (sw.getVariable() != null) {
return sw.getVariable().getType().getTypeModel();
}
throw new BugException("Switch should have expression or variable");
}
<<<<<<<
protected boolean hasVariable(Tree.SwitchStatement stmt) {
return stmt.getSwitchClause().getSwitched().getVariable() != null;
}
protected Expression getSwitchExpression(Tree.SwitchStatement stmt) {
Switched sw = stmt.getSwitchClause().getSwitched();
if (sw.getExpression() != null) {
return sw.getExpression();
} else if (sw.getVariable() != null) {
return sw.getVariable().getSpecifierExpression().getExpression();
}
throw new BugException("Switch should have expression or variable");
}
protected ProducedType getSwitchExpressionType(Tree.SwitchStatement stmt) {
return switchExpressionType(stmt);
=======
protected ProducedType getSwitchExpressionType(Tree.SwitchClause switchClause) {
return switchClause.getExpression().getTypeModel();
>>>>>>>
protected boolean hasVariable(Tree.SwitchClause switchClause) {
return switchClause.getSwitched().getVariable() != null;
}
protected Expression getSwitchExpression(Tree.SwitchClause switchClause) {
Switched sw = switchClause.getSwitched();
if (sw.getExpression() != null) {
return sw.getExpression();
} else if (sw.getVariable() != null) {
return sw.getVariable().getSpecifierExpression().getExpression();
}
throw new BugException("Switch should have expression or variable");
}
protected ProducedType getSwitchExpressionType(Tree.SwitchClause switchClause) {
return switchExpressionType(switchClause);
<<<<<<<
getSwitchExpression(stmt),
=======
switchClause.getExpression(),
>>>>>>>
getSwitchExpression(switchClause),
<<<<<<<
getSwitchExpressionType(stmt));
JCVariableDecl selector;
JCIdent ident;
if (hasVariable(stmt)) {
String name = stmt.getSwitchClause().getSwitched().getVariable().getIdentifier().getText();
selector = makeVar(name, makeJavaType(getSwitchExpressionType(stmt)), switchExpr);
ident = naming.makeQuotedIdent(name);
JCStatement sw = transformSwitch(stmt, ident);
return at(stmt).Block(0, List.of(selector, sw));
} else {
return transformSwitch(stmt, switchExpr);
}
=======
getSwitchExpressionType(switchClause));
return transformSwitch(switchClause, caseList, tmpVar, outerExpression, switchExpr);
>>>>>>>
getSwitchExpressionType(switchClause));
JCVariableDecl selector;
JCIdent ident;
if (hasVariable(switchClause)) {
String name = switchClause.getSwitched().getVariable().getIdentifier().getText();
selector = makeVar(name, makeJavaType(getSwitchExpressionType(switchClause)), switchExpr);
ident = naming.makeQuotedIdent(name);
JCStatement sw = transformSwitch(switchClause, caseList, tmpVar, outerExpression, switchExpr);
return at(node).Block(0, List.of(selector, sw));
} else {
return transformSwitch(switchClause, caseList, tmpVar, outerExpression, switchExpr);
}
<<<<<<<
public JCStatement transformSwitch(SwitchStatement stmt) {
JCExpression selectorExpr = expressionGen().transformExpression(getSwitchExpression(stmt), BoxingStrategy.BOXED, getSwitchExpressionType(stmt));
JCVariableDecl selector;
JCIdent ident;
if (hasVariable(stmt)) {
String name = stmt.getSwitchClause().getSwitched().getVariable().getIdentifier().getText();
selector = makeVar(name, makeJavaType(getSwitchExpressionType(stmt)), selectorExpr);
ident = naming.makeQuotedIdent(name);
} else {
Naming.SyntheticName selectorAlias = naming.alias("sel");
selector = makeVar(selectorAlias, makeJavaType(getSwitchExpressionType(stmt)), selectorExpr);
ident = selectorAlias.makeIdent();
}
=======
public JCStatement transformSwitch(Node node, Tree.SwitchClause switchClause, Tree.SwitchCaseList caseList,
String tmpVar, Tree.Term outerExpression) {
ProducedType switchExpressionType = getSwitchExpressionType(switchClause);
ProducedType switchDefiniteExpressionType = getDefiniteSwitchExpressionType(switchClause);
JCExpression selectorExpr = expressionGen().transformExpression(switchClause.getExpression(), BoxingStrategy.BOXED, switchExpressionType);
Naming.SyntheticName selectorAlias = naming.alias("sel");
JCVariableDecl selector = makeVar(selectorAlias, makeJavaType(switchExpressionType), selectorExpr);
>>>>>>>
public JCStatement transformSwitch(Node node, Tree.SwitchClause switchClause, Tree.SwitchCaseList caseList,
String tmpVar, Tree.Term outerExpression) {
ProducedType switchExpressionType = getSwitchExpressionType(switchClause);
ProducedType switchDefiniteExpressionType = getDefiniteSwitchExpressionType(switchClause);
JCExpression selectorExpr = expressionGen().transformExpression(getSwitchExpression(switchClause), BoxingStrategy.BOXED, getSwitchExpressionType(switchClause));
JCVariableDecl selector;
JCIdent ident;
if (hasVariable(switchClause)) {
String name = switchClause.getSwitched().getVariable().getIdentifier().getText();
selector = makeVar(name, makeJavaType(switchExpressionType), selectorExpr);
ident = naming.makeQuotedIdent(name);
} else {
Naming.SyntheticName selectorAlias = naming.alias("sel");
selector = makeVar(selectorAlias, makeJavaType(switchExpressionType), selectorExpr);
ident = selectorAlias.makeIdent();
}
<<<<<<<
JCStatement switch_ = new Switch().transformSwitch(stmt,
expressionGen().applyErasureAndBoxing(ident,
getDefiniteSwitchExpressionType(stmt),
=======
JCStatement switch_ = new Switch().transformSwitch(switchClause, caseList, tmpVar, outerExpression,
expressionGen().applyErasureAndBoxing(selectorAlias.makeIdent(),
switchDefiniteExpressionType,
>>>>>>>
JCStatement switch_ = new Switch().transformSwitch(switchClause, caseList, tmpVar, outerExpression,
expressionGen().applyErasureAndBoxing(ident,
switchDefiniteExpressionType,
<<<<<<<
ifElse = make().If(make().Binary(JCTree.EQ, ident, makeNull()),
transform(caseClause.getBlock()),
=======
ifElse = make().If(make().Binary(JCTree.EQ, selectorAlias.makeIdent(), makeNull()),
transformCaseClauseBlock(caseClause, tmpVar, outerExpression),
>>>>>>>
ifElse = make().If(make().Binary(JCTree.EQ, ident, makeNull()),
transformCaseClauseBlock(caseClause, tmpVar, outerExpression),
<<<<<<<
JCExpression selectorExpr = expressionGen().transformExpression(getSwitchExpression(stmt), bs, getSwitchExpressionType(stmt));
Naming.SyntheticName selectorAlias = naming.alias("sel");
=======
JCExpression selectorExpr = expressionGen().transformExpression(switchClause.getExpression(), bs, switchExpressionType);
>>>>>>>
JCExpression selectorExpr = expressionGen().transformExpression(getSwitchExpression(switchClause), bs, switchExpressionType);
<<<<<<<
ProducedType exprType = switchExpressionType(stmt);
=======
ProducedType exprType = switchClause.getExpression().getTypeModel();
>>>>>>>
ProducedType exprType = switchExpressionType(switchClause); |
<<<<<<<
if (model != null
&& Decl.isToplevel(model)
=======
serialization(klass, objectClassBuilder);
TypeDeclaration decl = model.getType().getDeclaration();
if (Decl.isToplevel(model)
>>>>>>>
serialization(klass, objectClassBuilder);
if (model != null
&& Decl.isToplevel(model) |
<<<<<<<
assertBug659ShowInheritedMembers(destDir);
=======
assertSequencedParameter(destDir);
>>>>>>>
assertBug659ShowInheritedMembers(destDir);
assertSequencedParameter(destDir);
<<<<<<<
assertBug659ShowInheritedMembers(destDir);
=======
assertSequencedParameter(destDir);
>>>>>>>
assertBug659ShowInheritedMembers(destDir);
assertSequencedParameter(destDir);
<<<<<<<
private void assertBug659ShowInheritedMembers(File destDir) throws IOException {
assertMatchInFile(destDir, "class_StubClass.html",
Pattern.compile("Show inherited methods"));
assertMatchInFile(destDir, "class_StubClass.html",
Pattern.compile("<a href='interface_StubInterface.html#defaultDeprecatedMethodFromStubInterface'>defaultDeprecatedMethodFromStubInterface</a>"));
assertMatchInFile(destDir, "class_StubClass.html",
Pattern.compile("<a href='interface_StubInterface.html#formalMethodFromStubInterface'>formalMethodFromStubInterface</a>"));
}
=======
private void assertSequencedParameter(File destDir) throws IOException {
assertMatchInFile(destDir, "class_StubClass.html",
Pattern.compile("<code>methodWithSequencedParameter\\(Integer... numbers\\)</code>"));
}
>>>>>>>
private void assertBug659ShowInheritedMembers(File destDir) throws IOException {
assertMatchInFile(destDir, "class_StubClass.html",
Pattern.compile("Show inherited methods"));
assertMatchInFile(destDir, "class_StubClass.html",
Pattern.compile("<a href='interface_StubInterface.html#defaultDeprecatedMethodFromStubInterface'>defaultDeprecatedMethodFromStubInterface</a>"));
assertMatchInFile(destDir, "class_StubClass.html",
Pattern.compile("<a href='interface_StubInterface.html#formalMethodFromStubInterface'>formalMethodFromStubInterface</a>"));
}
private void assertSequencedParameter(File destDir) throws IOException {
assertMatchInFile(destDir, "class_StubClass.html",
Pattern.compile("<code>methodWithSequencedParameter\\(Integer... numbers\\)</code>"));
} |
<<<<<<<
.klass(this, false, "module_", null)
=======
.klass(this, "module", null)
>>>>>>>
.klass(this, "module_", null)
<<<<<<<
.klass(this, false, "package_", null)
=======
.klass(this, "$package", null)
>>>>>>>
.klass(this, "package_", null) |
<<<<<<<
@Test
public void testSwitchInlineVar(){
compareWithJavaSource("swtch/SwitchInlineVar");
}
=======
@Test
public void testSwitchNarrowedElse(){
compile("swtch/FooBar.ceylon");
compareWithJavaSource("swtch/SwitchNarrowedElse");
}
>>>>>>>
@Test
public void testSwitchInlineVar(){
compareWithJavaSource("swtch/SwitchInlineVar");
}
@Test
public void testSwitchNarrowedElse(){
compile("swtch/FooBar.ceylon");
compareWithJavaSource("swtch/SwitchNarrowedElse");
} |
<<<<<<<
JCExpression n = make(expr).Literal(lit.value.longValue());
result = make(expr).Apply (null, makeSelect("ceylon", "Natural", "instance"),
=======
JCExpression n = make.Literal(lit.value.longValue());
result = at(expr).Apply (null, makeSelect("ceylon", "Integer", "instance"),
>>>>>>>
JCExpression n = make.Literal(lit.value.longValue());
result = at(expr).Apply (null, makeSelect("ceylon", "Natural", "instance"), |
<<<<<<<
if ((sendFeeDto.getSendFeeCount().get() >= lastFeePayingSendCount) &&
!((lastFeePayingSendingCountOptional.isPresent()) && (lastFeePayingSendCount - 1 == lastFeePayingSendingCountOptional.get()))) {
=======
if ((sendFeeDto.getSendFeeCount().get() >= sendCount) &&
!((lastFeePayingSendingCountOptional.isPresent()) && (sendCount - 1 == lastFeePayingSendingCountOptional.get()))) {
>>>>>>>
if ((sendFeeDto.getSendFeeCount().get() >= lastFeePayingSendCount) &&
!((lastFeePayingSendingCountOptional.isPresent()) && (lastFeePayingSendCount - 1 == lastFeePayingSendingCountOptional.get()))) {
<<<<<<<
log.debug("Wallet at end of calculateFeeState = " + wallet.toString(false, false, true, null));
log.debug("The wallet has currentNumberOfSends = " + currentNumberOfSends);
log.debug("The wallet owes a GROSS total of " + grossFeeToBePaid + " satoshi in fees");
log.debug("The wallet had paid a total of " + feePaid + " satoshi in fees");
log.debug("The wallet owes a NET total of " + netFeeToBePaid + " satoshi in fees");
=======
log.debug("The wallet has currentNumberOfSends = {}", currentNumberOfSends);
log.debug("The wallet owes a GROSS total of {} satoshi in fees", grossFeeToBePaid);
log.debug("The wallet had paid a total of {} satoshi in fees", feePaid);
log.debug("The wallet owes a NET total of {} satoshi in fees", netFeeToBePaid);
>>>>>>>
log.debug("Wallet at end of calculateFeeState = " + wallet.toString(false, false, true, null));
log.debug("The wallet has currentNumberOfSends = {}", currentNumberOfSends);
log.debug("The wallet owes a GROSS total of {} satoshi in fees", grossFeeToBePaid);
log.debug("The wallet had paid a total of {} satoshi in fees", feePaid);
log.debug("The wallet owes a NET total of {} satoshi in fees", netFeeToBePaid);
<<<<<<<
log.debug("The last fee address sent any fee was = '" + lastFeePayingSendAddressOptional.get() + "'. The lastFeePayingSendCount then was " + lastFeePayingSendingCountOptional.toString());
=======
log.debug("The last fee address sent any fee was = '{}'. The sendCount then was {}.", lastFeePayingSendAddressOptional.get(), lastFeePayingSendingCountOptional.toString());
>>>>>>>
log.debug("The last fee address sent any fee was = '{}'. The sendCount then was {}.", lastFeePayingSendAddressOptional.get(), lastFeePayingSendingCountOptional.toString()); |
<<<<<<<
LabelDecorator.applyWrappingLabel(transactionConstructionStatusSummary, Languages.safeText(CoreMessageKey.CHANGE_PASSWORD_WORKING));
transactionConstructionStatusDetail.setText("");
transactionBroadcastStatusSummary.setText("");
transactionBroadcastStatusDetail.setText("");
=======
SwingUtilities.invokeLater(
new Runnable() {
@Override
public void run() {
LabelDecorator.applyWrappingLabel(transactionConstructionStatusSummary, Languages.safeText(CoreMessageKey.CHANGE_PASSWORD_WORKING));
transactionConstructionStatusDetail.setText("");
transactionBroadcastStatusSummary.setText("");
transactionBroadcastStatusDetail.setText("");
}
});
>>>>>>>
public void run() {
LabelDecorator.applyWrappingLabel(transactionConstructionStatusSummary, Languages.safeText(CoreMessageKey.CHANGE_PASSWORD_WORKING));
transactionConstructionStatusDetail.setText("");
transactionBroadcastStatusSummary.setText("");
transactionBroadcastStatusDetail.setText("");
<<<<<<<
if (getWizardModel().isBIP70()) {
getNextButton().requestFocusInWindow();
} else {
getFinishButton().requestFocusInWindow();
}
// Check for report message from hardware wallet
LabelDecorator.applyReportMessage(reportStatusLabel, getWizardModel().getReportMessageKey(), getWizardModel().getReportMessageStatus());
if (getWizardModel().getReportMessageKey().isPresent() && !getWizardModel().getReportMessageStatus()) {
// Hardware wallet report indicates cancellation
transactionConstructionStatusSummary.setVisible(false);
transactionConstructionStatusDetail.setVisible(false);
} else {
// Transaction must be progressing in some manner
if (lastTransactionCreationEvent != null) {
onTransactionCreationEvent(lastTransactionCreationEvent);
lastTransactionCreationEvent = null;
}
if (lastBitcoinSendingEvent != null) {
onBitcoinSendingEvent(lastBitcoinSendingEvent);
lastBitcoinSendingEvent = null;
}
if (lastBitcoinSendProgressEvent != null) {
onBitcoinSendProgressEvent(lastBitcoinSendProgressEvent);
lastBitcoinSendProgressEvent = null;
}
if (lastBitcoinSentEvent != null) {
onBitcoinSentEvent(lastBitcoinSentEvent);
lastBitcoinSentEvent = null;
}
}
=======
SwingUtilities.invokeLater(
new Runnable() {
@Override
public void run() {
if (getWizardModel().isBIP70()) {
getNextButton().requestFocusInWindow();
} else {
getFinishButton().requestFocusInWindow();
}
// Check for report message from hardware wallet
LabelDecorator.applyReportMessage(reportStatusLabel, getWizardModel().getReportMessageKey(), getWizardModel().getReportMessageStatus());
if (getWizardModel().getReportMessageKey().isPresent() && !getWizardModel().getReportMessageStatus()) {
// Hardware wallet report indicates cancellation
transactionConstructionStatusSummary.setVisible(false);
transactionConstructionStatusDetail.setVisible(false);
} else {
// Transaction must be progressing in some manner
if (lastTransactionCreationEvent != null) {
onTransactionCreationEvent(lastTransactionCreationEvent);
lastTransactionCreationEvent = null;
}
if (lastBitcoinSendingEvent != null) {
onBitcoinSendingEvent(lastBitcoinSendingEvent);
lastBitcoinSendingEvent = null;
}
if (lastBitcoinSendProgressEvent != null) {
onBitcoinSendProgressEvent(lastBitcoinSendProgressEvent);
lastBitcoinSendProgressEvent = null;
}
if (getWizardModel().getLastBitcoinSentEvent() != null) {
onBitcoinSentEvent(getWizardModel().getLastBitcoinSentEvent());
}
}
}
});
>>>>>>>
if (getWizardModel().isBIP70()) {
getNextButton().requestFocusInWindow();
} else {
getFinishButton().requestFocusInWindow();
}
// Check for report message from hardware wallet
LabelDecorator.applyReportMessage(reportStatusLabel, getWizardModel().getReportMessageKey(), getWizardModel().getReportMessageStatus());
if (getWizardModel().getReportMessageKey().isPresent() && !getWizardModel().getReportMessageStatus()) {
// Hardware wallet report indicates cancellation
transactionConstructionStatusSummary.setVisible(false);
transactionConstructionStatusDetail.setVisible(false);
} else {
// Transaction must be progressing in some manner
if (lastTransactionCreationEvent != null) {
onTransactionCreationEvent(lastTransactionCreationEvent);
lastTransactionCreationEvent = null;
}
if (lastBitcoinSendingEvent != null) {
onBitcoinSendingEvent(lastBitcoinSendingEvent);
lastBitcoinSendingEvent = null;
}
if (lastBitcoinSendProgressEvent != null) {
onBitcoinSendProgressEvent(lastBitcoinSendProgressEvent);
lastBitcoinSendProgressEvent = null;
}
if (getWizardModel().getLastBitcoinSentEvent() != null) {
onBitcoinSentEvent(getWizardModel().getLastBitcoinSentEvent());
}
}
}
<<<<<<<
new Runnable() {
@Override
public void run() {
double progress = bitcoinSendProgressEvent.getProgress();
if (0 < progress && progress < 0.4) {
// bullhorn-quarter
Icon icon = Images.newBullhornQuarterIcon();
transactionBroadcastStatusSummary.setIcon(icon);
} else {
if (0.4 <= progress && progress < 0.6) {
// bullhorn-half
Icon icon = Images.newBullhornHalfIcon();
transactionBroadcastStatusSummary.setIcon(icon);
} else {
if (0.6 <= progress && progress < 1.0) {
// bullhorn-three-quarters
Icon icon = Images.newBullhornThreeQuartersIcon();
transactionBroadcastStatusSummary.setIcon(icon);
=======
new Runnable() {
@Override
public void run() {
double progress = bitcoinSendProgressEvent.getProgress();
if (0 < progress && progress < 0.4) {
// bullhorn-quarter
Icon icon = Images.newBullhornQuarterIcon();
transactionBroadcastStatusSummary.setIcon(icon);
} else {
if (0.4 <= progress && progress < 0.6) {
// bullhorn-half
Icon icon = Images.newBullhornHalfIcon();
transactionBroadcastStatusSummary.setIcon(icon);
} else {
if (0.6 <= progress && progress < 1.0) {
// bullhorn-three-quarters
Icon icon = Images.newBullhornThreeQuartersIcon();
transactionBroadcastStatusSummary.setIcon(icon);
}
}
}
>>>>>>>
new Runnable() {
@Override
public void run() {
double progress = bitcoinSendProgressEvent.getProgress();
if (0 < progress && progress < 0.4) {
// bullhorn-quarter
Icon icon = Images.newBullhornQuarterIcon();
transactionBroadcastStatusSummary.setIcon(icon);
} else {
if (0.4 <= progress && progress < 0.6) {
// bullhorn-half
Icon icon = Images.newBullhornHalfIcon();
transactionBroadcastStatusSummary.setIcon(icon);
} else {
if (0.6 <= progress && progress < 1.0) {
// bullhorn-three-quarters
Icon icon = Images.newBullhornThreeQuartersIcon();
transactionBroadcastStatusSummary.setIcon(icon);
}
}
} |
<<<<<<<
import org.multibit.hd.ui.views.components.renderers.AmountBTCTableCellRenderer;
import org.multibit.hd.ui.views.components.renderers.PaymentTypeTableCellRenderer;
import org.multibit.hd.ui.views.components.renderers.RAGStatusTableCellRenderer;
import org.multibit.hd.ui.views.components.renderers.TrailingJustifiedDateTableCellRenderer;
=======
import org.multibit.hd.ui.views.components.renderers.AmountBTCRenderer;
import org.multibit.hd.ui.views.components.renderers.PaymentTypeRenderer;
import org.multibit.hd.ui.views.components.renderers.RAGStatusRenderer;
import org.multibit.hd.ui.views.components.renderers.TrailingJustifiedDateRenderer;
import org.multibit.hd.ui.views.components.tables.PaymentTableModel;
>>>>>>>
import org.multibit.hd.ui.views.components.renderers.AmountBTCTableCellRenderer;
import org.multibit.hd.ui.views.components.renderers.PaymentTypeTableCellRenderer;
import org.multibit.hd.ui.views.components.renderers.RAGStatusTableCellRenderer;
import org.multibit.hd.ui.views.components.renderers.TrailingJustifiedDateTableCellRenderer;
import org.multibit.hd.ui.views.components.tables.PaymentTableModel;
<<<<<<<
public static DefaultTableCellRenderer newRAGStatusRenderer() {
return new RAGStatusTableCellRenderer();
=======
public static DefaultTableCellRenderer newRAGStatusRenderer(PaymentTableModel paymentTableModel) {
return new RAGStatusRenderer(paymentTableModel);
>>>>>>>
public static DefaultTableCellRenderer newRAGStatusRenderer(PaymentTableModel paymentTableModel) {
return new RAGStatusTableCellRenderer(paymentTableModel); |
<<<<<<<
stone("dark_pearl_ore", 3, 6, MaterialColor.OBSIDIAN),
darkPearl("dark_pearl_block", 3, 6, MaterialColor.BLACK),
stone("archaic_ore", 3, 6, MaterialColor.OBSIDIAN),
glass("archaic_glass"),
glassPanel("archaic_glass_pane")
=======
stone("dark_pearl_ore", 3, 3, MaterialColor.OBSIDIAN),
darkPearl("dark_pearl_block", 4, 6, MaterialColor.BLACK),
ore("tenebrum_ore", 3, 3, MaterialColor.OBSIDIAN, 1),
metal("tenebrum_block", 5, 6, MaterialColor.GREEN_TERRACOTTA, 1)
>>>>>>>
stone("dark_pearl_ore", 3, 6, MaterialColor.OBSIDIAN),
darkPearl("dark_pearl_block", 3, 6, MaterialColor.BLACK),
stone("archaic_ore", 3, 6, MaterialColor.OBSIDIAN),
glass("archaic_glass"),
glassPanel("archaic_glass_pane")
ore("tenebrum_ore", 3, 3, MaterialColor.OBSIDIAN, 1),
metal("tenebrum_block", 5, 6, MaterialColor.GREEN_TERRACOTTA, 1)
<<<<<<<
item(DARK_PEARL_BLOCK, MnItemCategory.MINERAL_BLOCKS, MnItemGroup.BLOCKS),
item(ARCHAIC_ORE, MnItemCategory.ORES, MnItemGroup.BLOCKS),
item(ARCHAIC_GLASS, MnItemCategory.UNCATEGORIZED, MnItemGroup.BLOCKS),
item(ARCHAIC_GLASS_PANE, MnItemCategory.UNCATEGORIZED, MnItemGroup.BLOCKS)
=======
item(DARK_PEARL_BLOCK, MnItemCategory.MINERAL_BLOCKS, MnItemGroup.BLOCKS),
item(TENEBRUM_ORE, MnItemCategory.ORES, MnItemGroup.BLOCKS),
item(TENEBRUM_BLOCK, MnItemCategory.MINERAL_BLOCKS, MnItemGroup.BLOCKS)
>>>>>>>
item(DARK_PEARL_BLOCK, MnItemCategory.MINERAL_BLOCKS, MnItemGroup.BLOCKS),
item(ARCHAIC_ORE, MnItemCategory.ORES, MnItemGroup.BLOCKS),
item(ARCHAIC_GLASS, MnItemCategory.UNCATEGORIZED, MnItemGroup.BLOCKS),
item(ARCHAIC_GLASS_PANE, MnItemCategory.UNCATEGORIZED, MnItemGroup.BLOCKS)
item(TENEBRUM_ORE, MnItemCategory.ORES, MnItemGroup.BLOCKS),
item(TENEBRUM_BLOCK, MnItemCategory.MINERAL_BLOCKS, MnItemGroup.BLOCKS) |
<<<<<<<
} else if (o.getClass() == BigDecimal.class) {
stmt.setBigDecimal(count, (BigDecimal)o);
}
=======
paramtext = paramtext + "::"+o;
}else if (o.getClass() == Long.class) {
stmt.setLong(count, (Long) o);
paramtext = paramtext + "::"+o;
} else {
logger.error("Parameter " + p + " is of type " + o.getClass().getName() + " which is not supported");
}
>>>>>>>
} else if (o.getClass() == BigDecimal.class) {
stmt.setBigDecimal(count, (BigDecimal)o);
paramtext = paramtext + "::"+o;
}else if (o.getClass() == Long.class) {
stmt.setLong(count, (Long) o);
paramtext = paramtext + "::"+o;
} else {
logger.error("Parameter " + p + " is of type " + o.getClass().getName() + " which is not supported");
} |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
import org.hibernate.param.ParameterSpecification;
import org.hibernate.persister.collection.CollectionPropertyNames;
import org.hibernate.internal.util.collections.ArrayHelper;
>>>>>>>
<<<<<<<
import org.hibernate.util.ArrayHelper;
import org.jboss.logging.Logger;
=======
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>>
import org.jboss.logging.Logger; |
<<<<<<<
=======
import org.hibernate.internal.util.collections.ArrayHelper;
import org.hibernate.testing.junit.RequiresDialect;
>>>>>>>
import org.hibernate.internal.util.collections.ArrayHelper;
<<<<<<<
import org.hibernate.testing.junit.RequiresDialect;
import org.hibernate.util.ArrayHelper;
=======
>>>>>>>
import org.hibernate.testing.junit.RequiresDialect; |
<<<<<<<
=======
import org.hibernate.internal.util.StringHelper;
>>>>>>>
<<<<<<<
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.param.CollectionFilterKeyParameterSpecification;
>>>>>>>
import org.jboss.logging.Logger; |
<<<<<<<
import org.hibernate.HibernateLogger;
import org.hibernate.util.DTDEntityResolver;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.xml.DTDEntityResolver;
>>>>>>>
import org.hibernate.HibernateLogger;
import org.hibernate.internal.util.xml.DTDEntityResolver;
import org.jboss.logging.Logger; |
<<<<<<<
=======
import org.hibernate.HibernateException;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.NamingStrategy;
import org.hibernate.internal.util.collections.ArrayHelper;
import org.hibernate.internal.util.ReflectHelper;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.FileSet;
>>>>>>> |
<<<<<<<
=======
import org.hibernate.engine.jdbc.spi.SqlStatementLogger;
import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
import org.hibernate.service.jdbc.dialect.spi.DialectFactory;
>>>>>>>
<<<<<<<
import org.hibernate.internal.util.jdbc.TypeInfo;
import org.hibernate.internal.util.jdbc.TypeInfoExtracter;
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
import org.hibernate.service.jdbc.dialect.spi.DialectFactory;
=======
>>>>>>>
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
import org.hibernate.service.jdbc.dialect.spi.DialectFactory;
<<<<<<<
import org.hibernate.util.ReflectHelper;
import org.jboss.logging.Logger;
=======
>>>>>>>
import org.jboss.logging.Logger; |
<<<<<<<
import org.hibernate.util.ConfigHelper;
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.ConfigHelper;
import org.hibernate.internal.util.StringHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URL;
import java.util.Properties;
>>>>>>>
import org.hibernate.internal.util.ConfigHelper;
import org.hibernate.internal.util.StringHelper;
import org.jboss.logging.Logger; |
<<<<<<<
=======
import java.io.Reader;
>>>>>>> |
<<<<<<<
import java.io.IOException;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.naming.NamingException;
import javax.naming.Reference;
import javax.naming.StringRefAddr;
import javax.transaction.TransactionManager;
=======
>>>>>>>
import java.io.IOException;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.naming.NamingException;
import javax.naming.Reference;
import javax.naming.StringRefAddr;
<<<<<<<
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SQLExceptionHelper;
=======
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
>>>>>>>
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
<<<<<<<
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
=======
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
import org.hibernate.service.jta.platform.spi.JtaPlatform;
>>>>>>>
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
import org.hibernate.service.jta.platform.spi.JtaPlatform;
<<<<<<<
import org.hibernate.util.CollectionHelper;
import org.hibernate.util.EmptyIterator;
import org.hibernate.util.ReflectHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.collections.EmptyIterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.naming.NamingException;
import javax.naming.Reference;
import javax.naming.StringRefAddr;
import java.io.IOException;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
>>>>>>>
import org.jboss.logging.Logger;
<<<<<<<
if ( settings.getTransactionManagerLookup()!=null ) {
LOG.debugf("Obtaining JTA TransactionManager");
transactionManager = settings.getTransactionManagerLookup().getTransactionManager(properties);
}
else {
if ( settings.getTransactionFactory().isTransactionManagerRequired() ) {
throw new HibernateException("The chosen transaction strategy requires access to the JTA TransactionManager");
}
transactionManager = null;
}
=======
>>>>>>>
<<<<<<<
else if ( "jta".equals( impl ) ) {
if (settings.getTransactionFactory().areCallbacksLocalToHibernateTransactions()) LOG.autoFlushWillNotWork();
=======
if ( "jta".equals( impl ) ) {
if ( ! transactionFactory().compatibleWithJtaSynchronization() ) {
log.warn( "JTASessionContext being used with JdbcTransactionFactory; auto-flush will not operate correctly with getCurrentSession()" );
}
>>>>>>>
if ( "jta".equals( impl ) ) {
if ( ! transactionFactory().compatibleWithJtaSynchronization() ) {
LOG.autoFlushWillNotWork();
} |
<<<<<<<
import org.hibernate.type.Type;
import org.hibernate.util.StringHelper;
import antlr.collections.AST;
=======
import org.hibernate.internal.util.StringHelper;
import org.hibernate.HibernateException;
>>>>>>>
import org.hibernate.internal.util.StringHelper;
import org.hibernate.type.Type;
import antlr.collections.AST; |
<<<<<<<
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.StringHelper;
>>>>>>>
import org.jboss.logging.Logger; |
<<<<<<<
=======
import org.hibernate.internal.util.collections.ArrayHelper;
>>>>>>>
import org.hibernate.internal.util.collections.ArrayHelper; |
<<<<<<<
import org.hibernate.util.ReflectHelper;
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.internal.util.StringHelper;
>>>>>>>
import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.internal.util.StringHelper;
import org.jboss.logging.Logger; |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
package org.hibernate.jdbc;
=======
package org.hibernate.jdbc;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.hibernate.StaleStateException;
import org.hibernate.HibernateException;
import org.hibernate.engine.ExecuteUpdateResultCheckStyle;
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
import org.hibernate.exception.GenericJDBCException;
>>>>>>>
package org.hibernate.jdbc;
<<<<<<<
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, Expectations.class.getName());
=======
private static final Logger log = LoggerFactory.getLogger( Expectations.class );
private static SqlExceptionHelper sqlExceptionHelper = new SqlExceptionHelper();
>>>>>>>
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, Expectations.class.getName());
private static SqlExceptionHelper sqlExceptionHelper = new SqlExceptionHelper(); |
<<<<<<<
=======
import org.hibernate.internal.util.config.ConfigurationHelper;
import org.hibernate.internal.util.ReflectHelper;
>>>>>>> |
<<<<<<<
import org.hibernate.util.ConfigHelper;
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>>
import org.jboss.logging.Logger; |
<<<<<<<
import java.util.Map;
=======
>>>>>>>
import java.util.Map; |
<<<<<<<
import org.hibernate.ejb.EntityManagerLogger;
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.StringHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>>
import org.hibernate.ejb.EntityManagerLogger;
import org.hibernate.internal.util.StringHelper;
import org.jboss.logging.Logger; |
<<<<<<<
import org.hibernate.proxy.HibernateProxy;
=======
import org.hibernate.internal.util.SerializationHelper;
>>>>>>>
import org.hibernate.internal.util.SerializationHelper;
import org.hibernate.proxy.HibernateProxy;
<<<<<<<
import org.hibernate.util.SerializationHelper;
=======
import org.hibernate.proxy.HibernateProxy;
>>>>>>> |
<<<<<<<
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.StringHelper;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
>>>>>>>
import org.hibernate.internal.util.StringHelper;
import org.jboss.logging.Logger; |
<<<<<<<
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SQLExceptionHelper;
import org.hibernate.engine.jdbc.spi.SQLStatementLogger;
import org.hibernate.internal.util.jdbc.TypeInfo;
=======
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
import org.hibernate.engine.jdbc.spi.SqlStatementLogger;
import org.hibernate.engine.jdbc.spi.JdbcServices;
>>>>>>>
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
import org.hibernate.engine.jdbc.spi.SqlStatementLogger; |
<<<<<<<
=======
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException;
import org.hibernate.JDBCException;
import org.hibernate.engine.jdbc.internal.proxy.ProxyBuilder;
import org.hibernate.engine.jdbc.spi.ConnectionObserver;
import org.hibernate.engine.jdbc.spi.JdbcResourceRegistry;
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.LogicalConnectionImplementor;
import org.hibernate.engine.jdbc.spi.NonDurableConnectionObserver;
import org.hibernate.engine.transaction.spi.TransactionContext;
import org.hibernate.internal.util.collections.CollectionHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>>
<<<<<<<
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException;
import org.hibernate.HibernateLogger;
import org.hibernate.JDBCException;
import org.hibernate.engine.jdbc.spi.ConnectionObserver;
import org.hibernate.engine.jdbc.spi.JdbcResourceRegistry;
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.LogicalConnectionImplementor;
import org.hibernate.jdbc.BorrowedConnectionProxy;
import org.hibernate.stat.StatisticsImplementor;
import org.jboss.logging.Logger;
=======
>>>>>>>
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.HibernateException;
import org.hibernate.HibernateLogger;
import org.hibernate.JDBCException;
import org.hibernate.engine.jdbc.internal.proxy.ProxyBuilder;
import org.hibernate.engine.jdbc.spi.ConnectionObserver;
import org.hibernate.engine.jdbc.spi.JdbcResourceRegistry;
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.LogicalConnectionImplementor;
import org.hibernate.engine.jdbc.spi.NonDurableConnectionObserver;
import org.hibernate.engine.transaction.spi.TransactionContext;
import org.hibernate.internal.util.collections.CollectionHelper;
import org.jboss.logging.Logger;
<<<<<<<
releaseBorrowedConnection();
LOG.trace("Closing logical connection");
=======
releaseProxies();
jdbcResourceRegistry.close();
>>>>>>>
releaseProxies();
jdbcResourceRegistry.close();
<<<<<<<
}
=======
observers.clear();
}
>>>>>>>
observers.clear();
}
<<<<<<<
} else if (borrowedConnection != null) LOG.debugf("Skipping aggressive release due to borrowed connection");
=======
}
>>>>>>>
}
<<<<<<<
/**
* Manually reconnect the underlying JDBC Connection. Should be called at
* some point after manualDisconnect().
* <p/>
* This form is used for user-supplied connections.
*/
public void reconnect(Connection suppliedConnection) {
if (isClosed) throw new IllegalStateException("cannot manually reconnect because logical connection is already closed");
if ( isUserSuppliedConnection ) {
if (suppliedConnection == null) throw new IllegalArgumentException("cannot reconnect a null user-supplied connection");
else if (suppliedConnection == physicalConnection) LOG.reconnectingConnectedConnection();
else if (physicalConnection != null) throw new IllegalArgumentException(
"cannot reconnect to a new user-supplied connection because currently connected; must disconnect before reconnecting.");
=======
@Override
public void manualReconnect(Connection suppliedConnection) {
if ( isClosed ) {
throw new IllegalStateException( "cannot manually reconnect because logical connection is already closed" );
}
if ( !isUserSuppliedConnection ) {
throw new IllegalStateException( "cannot manually reconnect unless Connection was originally supplied" );
}
else {
if ( suppliedConnection == null ) {
throw new IllegalArgumentException( "cannot reconnect a null user-supplied connection" );
}
else if ( suppliedConnection == physicalConnection ) {
log.debug( "reconnecting the same connection that is already connected; should this connection have been disconnected?" );
}
else if ( physicalConnection != null ) {
throw new IllegalArgumentException(
"cannot reconnect to a new user-supplied connection because currently connected; must disconnect before reconnecting."
);
}
>>>>>>>
@Override
public void manualReconnect(Connection suppliedConnection) {
if ( isClosed ) {
throw new IllegalStateException( "cannot manually reconnect because logical connection is already closed" );
}
if ( !isUserSuppliedConnection ) {
throw new IllegalStateException( "cannot manually reconnect unless Connection was originally supplied" );
}
else {
if ( suppliedConnection == null ) {
throw new IllegalArgumentException( "cannot reconnect a null user-supplied connection" );
}
else if ( suppliedConnection == physicalConnection ) {
LOG.debug("reconnecting the same connection that is already connected; should this connection have been disconnected?");
}
else if ( physicalConnection != null ) {
throw new IllegalArgumentException(
"cannot reconnect to a new user-supplied connection because currently connected; must disconnect before reconnecting."
);
}
<<<<<<<
else {
if (suppliedConnection != null) throw new IllegalStateException("unexpected user-supplied connection");
LOG.debugf("Called reconnect() with null connection (not user-supplied)");
=======
}
@Override
public boolean isAutoCommit() {
if ( !isOpen() || ! isPhysicallyConnected() ) {
return true;
}
try {
return getConnection().getAutoCommit();
}
catch (SQLException e) {
throw jdbcServices.getSqlExceptionHelper().convert( e, "could not inspect JDBC autocommit mode" );
}
}
@Override
public void notifyObserversStatementPrepared() {
for ( ConnectionObserver observer : observers ) {
observer.statementPrepared();
>>>>>>>
}
@Override
public boolean isAutoCommit() {
if ( !isOpen() || ! isPhysicallyConnected() ) {
return true;
}
try {
return getConnection().getAutoCommit();
}
catch (SQLException e) {
throw jdbcServices.getSqlExceptionHelper().convert( e, "could not inspect JDBC autocommit mode" );
}
}
@Override
public void notifyObserversStatementPrepared() {
for ( ConnectionObserver observer : observers ) {
observer.statementPrepared(); |
<<<<<<<
=======
import org.hibernate.dialect.PostgreSQLDialect;
>>>>>>> |
<<<<<<<
import org.hibernate.util.ReflectHelper;
import org.jboss.logging.Logger;
import com.mchange.v2.c3p0.DataSources;
=======
import org.hibernate.internal.util.ReflectHelper;
>>>>>>>
import org.jboss.logging.Logger;
import com.mchange.v2.c3p0.DataSources; |
<<<<<<<
=======
import org.hibernate.engine.LoadQueryInfluencers;
import org.hibernate.internal.util.collections.ArrayHelper;
>>>>>>>
import org.hibernate.internal.util.collections.ArrayHelper;
<<<<<<<
import org.hibernate.util.ArrayHelper;
import org.jboss.logging.Logger;
=======
>>>>>>>
import org.jboss.logging.Logger;
<<<<<<<
persister,
ArrayHelper.join(
collectionPersister.getKeyColumnNames(),
=======
persister,
ArrayHelper.join(
collectionPersister.getKeyColumnNames(),
>>>>>>>
persister,
ArrayHelper.join(
collectionPersister.getKeyColumnNames(),
<<<<<<<
),
1,
LockMode.NONE,
factory,
=======
),
1,
LockMode.NONE,
factory,
>>>>>>>
),
1,
LockMode.NONE,
factory, |
<<<<<<<
=======
import org.hibernate.internal.util.ReflectHelper;
>>>>>>> |
<<<<<<<
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
=======
>>>>>>>
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set; |
<<<<<<<
=======
import org.hibernate.engine.loading.LoadContexts;
import org.hibernate.internal.util.collections.IdentityMap;
import org.hibernate.pretty.MessageHelper;
>>>>>>>
<<<<<<<
import org.hibernate.util.IdentityMap;
import org.hibernate.util.MarkerObject;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.MarkerObject;
>>>>>>>
import org.jboss.logging.Logger; |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
import java.io.Serializable;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Properties;
=======
>>>>>>>
import java.io.Serializable;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Properties;
<<<<<<<
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.TransactionHelper;
=======
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.jdbc.internal.FormatStyle;
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SqlStatementLogger;
>>>>>>>
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.jdbc.internal.FormatStyle;
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SqlStatementLogger;
<<<<<<<
import org.hibernate.jdbc.util.FormatStyle;
=======
import org.hibernate.jdbc.ReturningWork;
>>>>>>>
import org.hibernate.jdbc.ReturningWork;
<<<<<<<
import org.jboss.logging.Logger;
=======
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Properties;
>>>>>>>
import org.jboss.logging.Logger;
<<<<<<<
public class MultipleHiLoPerTableGenerator
extends TransactionHelper
implements PersistentIdentifierGenerator, Configurable {
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class,
MultipleHiLoPerTableGenerator.class.getName());
=======
public class MultipleHiLoPerTableGenerator implements PersistentIdentifierGenerator, Configurable {
private static final Logger log = LoggerFactory.getLogger( MultipleHiLoPerTableGenerator.class );
>>>>>>>
public class MultipleHiLoPerTableGenerator implements PersistentIdentifierGenerator, Configurable {
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class,
MultipleHiLoPerTableGenerator.class.getName()); |
<<<<<<<
import java.util.Map;
import org.hibernate.util.StringHelper;
=======
import org.hibernate.internal.util.StringHelper;
>>>>>>>
import java.util.Map;
import org.hibernate.internal.util.StringHelper; |
<<<<<<<
=======
import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.testing.junit.functional.FunctionalTestCase;
>>>>>>>
import org.hibernate.internal.util.ReflectHelper; |
<<<<<<<
import java.io.Serializable;
import java.util.List;
import java.util.Map;
=======
>>>>>>>
import java.io.Serializable;
import java.util.List;
import java.util.Map; |
<<<<<<<
import org.jboss.logging.Logger;
=======
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.jdbc.LobCreationContext;
import org.hibernate.engine.transaction.spi.TransactionContext;
import org.hibernate.event.EventSource;
>>>>>>>
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.jdbc.LobCreationContext;
import org.hibernate.engine.transaction.spi.TransactionContext;
import org.hibernate.event.EventSource;
import org.jboss.logging.Logger; |
<<<<<<<
=======
import org.hibernate.internal.util.SerializationHelper;
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite;
>>>>>>>
import org.hibernate.internal.util.SerializationHelper;
<<<<<<<
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite;
import org.hibernate.util.SerializationHelper;
=======
>>>>>>>
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite; |
<<<<<<<
=======
import org.hibernate.Hibernate;
import org.hibernate.JDBCException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.criterion.Restrictions;
import org.hibernate.test.annotations.TestCase;
>>>>>>>
<<<<<<<
import org.hibernate.Hibernate;
import org.hibernate.JDBCException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.criterion.Restrictions;
import org.hibernate.test.annotations.TestCase;
=======
>>>>>>>
import org.hibernate.Hibernate;
import org.hibernate.JDBCException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.criterion.Restrictions;
import org.hibernate.test.annotations.TestCase; |
<<<<<<<
import javax.transaction.TransactionManager;
import org.hibernate.ConnectionReleaseMode;
=======
import java.sql.Connection;
>>>>>>>
import org.hibernate.ConnectionReleaseMode;
<<<<<<<
=======
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
import org.hibernate.proxy.EntityNotFoundDelegate;
import org.hibernate.engine.query.QueryPlanCache;
import org.hibernate.engine.profile.FetchProfile;
import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.persister.entity.EntityPersister;
>>>>>>>
<<<<<<<
import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.proxy.EntityNotFoundDelegate;
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
=======
import org.hibernate.service.spi.ServiceRegistry;
>>>>>>>
import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.proxy.EntityNotFoundDelegate;
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
import org.hibernate.service.spi.ServiceRegistry; |
<<<<<<<
import javax.persistence.ManyToOne;
=======
import javax.persistence.SecondaryTable;
>>>>>>>
import javax.persistence.ManyToOne;
import javax.persistence.SecondaryTable; |
<<<<<<<
=======
import java.util.Iterator;
import java.util.Collection;
import org.hibernate.internal.util.collections.IdentityMap;
>>>>>>> |
<<<<<<<
=======
import org.hibernate.dialect.Dialect;
>>>>>>> |
<<<<<<<
import org.hibernate.util.StringHelper;
import antlr.SemanticException;
import antlr.collections.AST;
=======
import org.hibernate.internal.util.StringHelper;
import java.util.List;
>>>>>>>
import antlr.SemanticException;
import antlr.collections.AST; |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
>>>>>>>
<<<<<<<
import org.hibernate.persister.PersisterClassProvider;
=======
>>>>>>> |
<<<<<<<
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.StringHelper;
>>>>>>>
import org.hibernate.internal.util.StringHelper;
import org.jboss.logging.Logger; |
<<<<<<<
package org.hibernate.test.insertordering;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import junit.framework.Test;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.engine.jdbc.batch.internal.BatchBuilder;
import org.hibernate.engine.jdbc.batch.internal.BatchingBatch;
import org.hibernate.engine.jdbc.batch.spi.Batch;
import org.hibernate.engine.jdbc.spi.SQLExceptionHelper;
import org.hibernate.engine.jdbc.spi.SQLStatementLogger;
import org.hibernate.jdbc.Expectation;
import org.hibernate.testing.junit.functional.FunctionalTestCase;
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite;
=======
package org.hibernate.test.insertordering;
import junit.framework.Test;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.engine.jdbc.batch.internal.BatchBuilderImpl;
import org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator;
import org.hibernate.engine.jdbc.batch.internal.BatchingBatch;
import org.hibernate.engine.jdbc.batch.spi.Batch;
import org.hibernate.engine.jdbc.batch.spi.BatchKey;
import org.hibernate.engine.jdbc.spi.JdbcCoordinator;
import org.hibernate.test.common.JournalingBatchObserver;
import org.hibernate.testing.junit.functional.FunctionalTestCase;
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
>>>>>>>
package org.hibernate.test.insertordering;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import junit.framework.Test;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.engine.jdbc.batch.internal.BatchBuilderImpl;
import org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator;
import org.hibernate.engine.jdbc.batch.internal.BatchingBatch;
import org.hibernate.engine.jdbc.batch.spi.Batch;
import org.hibernate.engine.jdbc.batch.spi.BatchKey;
import org.hibernate.engine.jdbc.spi.JdbcCoordinator;
import org.hibernate.testing.junit.functional.FunctionalTestCase;
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite; |
<<<<<<<
package org.hibernate.test.jpa.lock;
import junit.framework.Test;
import org.hibernate.LockMode;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.dialect.HSQLDialect;
import org.hibernate.test.jpa.AbstractJPATest;
import org.hibernate.test.jpa.Item;
import org.hibernate.test.jpa.MyEntity;
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite;
import org.hibernate.util.ReflectHelper;
=======
package org.hibernate.test.jpa.lock;
import junit.framework.Test;
import org.hibernate.LockMode;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.dialect.HSQLDialect;
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite;
import org.hibernate.test.jpa.AbstractJPATest;
import org.hibernate.test.jpa.Item;
import org.hibernate.test.jpa.MyEntity;
import org.hibernate.internal.util.ReflectHelper;
>>>>>>>
package org.hibernate.test.jpa.lock;
import junit.framework.Test;
import org.hibernate.LockMode;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.dialect.HSQLDialect;
import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.test.jpa.AbstractJPATest;
import org.hibernate.test.jpa.Item;
import org.hibernate.test.jpa.MyEntity;
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite; |
<<<<<<<
import org.hibernate.util.ComparableComparator;
import org.infinispan.transaction.tm.BatchModeTransactionManager;
=======
import javax.transaction.TransactionManager;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
>>>>>>>
import org.infinispan.transaction.tm.BatchModeTransactionManager; |
<<<<<<<
import org.hibernate.util.ReflectHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.ReflectHelper;
>>>>>>>
import org.jboss.logging.Logger; |
<<<<<<<
=======
import org.hibernate.internal.util.StringHelper;
import org.hibernate.dialect.Dialect;
import org.hibernate.classic.Session;
>>>>>>> |
<<<<<<<
=======
import org.hibernate.engine.LoadQueryInfluencers;
import org.hibernate.internal.util.collections.ArrayHelper;
>>>>>>>
import org.hibernate.internal.util.collections.ArrayHelper; |
<<<<<<<
import org.hibernate.util.ArrayHelper;
import org.hibernate.util.CollectionHelper;
import org.hibernate.util.ConfigHelper;
import org.hibernate.util.JoinedIterator;
import org.hibernate.util.ReflectHelper;
import org.hibernate.util.SerializationHelper;
import org.hibernate.util.StringHelper;
import org.hibernate.util.XMLHelper;
import org.hibernate.util.xml.MappingReader;
import org.hibernate.util.xml.Origin;
import org.hibernate.util.xml.OriginImpl;
import org.hibernate.util.xml.XmlDocument;
import org.hibernate.util.xml.XmlDocumentImpl;
import org.jboss.logging.Logger;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
=======
import org.hibernate.internal.util.collections.ArrayHelper;
import org.hibernate.internal.util.collections.CollectionHelper;
import org.hibernate.internal.util.collections.JoinedIterator;
import org.hibernate.internal.util.xml.Origin;
import org.hibernate.internal.util.xml.XmlDocument;
import org.hibernate.internal.util.xml.XmlDocumentImpl;
>>>>>>>
import org.jboss.logging.Logger;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource; |
<<<<<<<
import org.hibernate.util.ReflectHelper;
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.ReflectHelper;
>>>>>>>
import org.jboss.logging.Logger; |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.HibernateLogger;
import org.hibernate.engine.jdbc.spi.SQLExceptionHelper;
import org.hibernate.engine.jdbc.spi.SQLStatementLogger;
import org.hibernate.jdbc.Expectation;
import org.jboss.logging.Logger;
=======
import org.hibernate.HibernateException;
import org.hibernate.engine.jdbc.batch.spi.BatchKey;
import org.hibernate.engine.jdbc.spi.JdbcCoordinator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Map;
>>>>>>>
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Map;
import org.hibernate.HibernateException;
import org.hibernate.HibernateLogger;
import org.hibernate.engine.jdbc.batch.spi.BatchKey;
import org.hibernate.engine.jdbc.spi.JdbcCoordinator;
import org.jboss.logging.Logger;
<<<<<<<
LOG.sqlExceptionEscapedProxy(e);
throw getSqlExceptionHelper().convert( e, "could not perform addBatch", sql );
=======
log.debug( "sqlexception escaped proxy", e );
throw sqlExceptionHelper().convert( e, "could not perform addBatch", currentStatementSql );
>>>>>>>
LOG.debugf( "SQLException escaped proxy", e );
throw sqlExceptionHelper().convert( e, "could not perform addBatch", currentStatementSql );
<<<<<<<
/**
* {@inheritDoc}
*/
@Override
protected void doExecuteBatch() {
if (maxBatchPosition == 0) LOG.debugf("No batched statements to execute");
=======
@Override
protected void doExecuteBatch() {
if ( batchPosition == 0 ) {
log.debug( "no batched statements to execute" );
}
>>>>>>>
@Override
protected void doExecuteBatch() {
if ( batchPosition == 0 ) {
LOG.debugf("No batched statements to execute");
}
<<<<<<<
private void executeStatements() {
for ( Map.Entry<String,PreparedStatement> entry : getStatements().entrySet() ) {
final String sql = entry.getKey();
final PreparedStatement statement = entry.getValue();
final List<Expectation> expectations = expectationsBySql.get( sql );
if ( batchSize < expectations.size() ) {
throw new IllegalStateException(
"Number of expectations [" + expectations.size() +
"] is greater than batch size [" + batchSize +
"] for statement [" + sql +
"]"
);
}
if ( expectations.size() > 0 ) {
LOG.debugf("Executing with batch of size %s: %s", expectations.size(), sql);
executeStatement( sql, statement, expectations );
expectations.clear();
} else LOG.debugf("Skipped executing because batch size is 0: %s", sql);
=======
private void performExecution() {
try {
for ( Map.Entry<String,PreparedStatement> entry : getStatements().entrySet() ) {
try {
final PreparedStatement statement = entry.getValue();
checkRowCounts( statement.executeBatch(), statement );
}
catch ( SQLException e ) {
log.debug( "sqlexception escaped proxy", e );
throw sqlExceptionHelper().convert( e, "could not perform addBatch", entry.getKey() );
}
}
>>>>>>>
private void performExecution() {
try {
for ( Map.Entry<String,PreparedStatement> entry : getStatements().entrySet() ) {
try {
final PreparedStatement statement = entry.getValue();
checkRowCounts( statement.executeBatch(), statement );
}
catch ( SQLException e ) {
LOG.debugf( "SQLException escaped proxy", e );
throw sqlExceptionHelper().convert( e, "could not perform addBatch", entry.getKey() );
}
}
<<<<<<<
catch ( SQLException e ) {
LOG.sqlExceptionEscapedProxy(e);
throw getSqlExceptionHelper()
.convert( e, "could not execute statement: " + sql );
=======
finally {
batchPosition = 0;
>>>>>>>
finally {
batchPosition = 0; |
<<<<<<<
=======
import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.mapping.PersistentClass;
>>>>>>>
import org.hibernate.internal.util.ReflectHelper;
<<<<<<<
import org.hibernate.mapping.PersistentClass;
import org.hibernate.util.ReflectHelper;
import org.jboss.logging.Logger;
=======
>>>>>>>
import org.hibernate.mapping.PersistentClass;
import org.jboss.logging.Logger; |
<<<<<<<
import org.hibernate.util.XMLHelper;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotSupportedException;
=======
>>>>>>>
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotSupportedException; |
<<<<<<<
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.Collections;
import java.util.List;
=======
import antlr.RecognitionException;
import antlr.collections.AST;
>>>>>>>
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.Collections;
import java.util.List;
<<<<<<<
import org.hibernate.engine.transaction.IsolatedWork;
import org.hibernate.engine.transaction.Isolater;
=======
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
>>>>>>>
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
<<<<<<<
import org.hibernate.util.JDBCExceptionReporter;
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
import antlr.RecognitionException;
import antlr.collections.AST;
=======
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.Collections;
import java.util.List;
>>>>>>>
import org.jboss.logging.Logger;
import antlr.RecognitionException;
import antlr.collections.AST;
<<<<<<<
catch( Exception e ) {
LOG.debugf("Unable to create temporary id table [%s]", e.getMessage());
}
}
};
if ( shouldIsolateTemporaryTableDDL() ) {
if ( getFactory().getSettings().isDataDefinitionInTransactionSupported() ) {
Isolater.doIsolatedWork( work, session );
=======
>>>>>>>
<<<<<<<
catch( Exception e ) {
LOG.unableToDropTemporaryIdTable(e.getMessage());
=======
catch( Throwable ignore ) {
// ignore
>>>>>>>
catch( Throwable ignore ) {
// ignore |
<<<<<<<
import org.hibernate.param.CollectionFilterKeyParameterSpecification;
=======
import org.hibernate.internal.util.collections.ArrayHelper;
>>>>>>>
import org.hibernate.internal.util.StringHelper;
import org.hibernate.internal.util.collections.ArrayHelper;
import org.hibernate.param.CollectionFilterKeyParameterSpecification;
<<<<<<<
import org.hibernate.util.ArrayHelper;
import org.hibernate.util.StringHelper;
import org.jboss.logging.Logger;
=======
import org.hibernate.internal.util.StringHelper;
>>>>>>>
import org.jboss.logging.Logger; |
<<<<<<<
=======
import org.hibernate.MappingException;
>>>>>>>
<<<<<<<
import org.hibernate.engine.SessionFactoryImplementor;
=======
import org.hibernate.internal.util.collections.CollectionHelper;
>>>>>>>
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.internal.util.collections.CollectionHelper; |
<<<<<<<
=======
import org.hibernate.internal.util.SerializationHelper;
import org.hibernate.internal.util.collections.JoinedIterator;
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
>>>>>>>
<<<<<<<
import org.hibernate.util.JoinedIterator;
import org.hibernate.util.SerializationHelper;
=======
import org.hibernate.proxy.HibernateProxy;
>>>>>>>
<<<<<<<
s.disconnect();
s.reconnect();
=======
>>>>>>> |
<<<<<<<
=======
import org.hibernate.engine.SessionImplementor;
import org.hibernate.envers.RevisionType;
>>>>>>>
<<<<<<<
import org.hibernate.envers.RevisionType;
=======
import org.hibernate.type.IntegerType;
>>>>>>>
import org.hibernate.engine.SessionImplementor;
import org.hibernate.envers.RevisionType;
import org.hibernate.type.IntegerType; |
<<<<<<<
import java.lang.reflect.Method;
import org.hibernate.util.ReflectHelper;
=======
import org.hibernate.internal.util.ReflectHelper;
>>>>>>>
import java.lang.reflect.Method;
import org.hibernate.internal.util.ReflectHelper; |
<<<<<<<
import org.hibernate.engine.query.sql.NativeSQLQuerySpecification;
=======
import org.hibernate.engine.transaction.spi.TransactionContext;
import org.hibernate.engine.transaction.spi.TransactionEnvironment;
import java.io.Serializable;
import java.util.List;
>>>>>>>
import org.hibernate.engine.query.sql.NativeSQLQuerySpecification;
import org.hibernate.engine.transaction.spi.TransactionContext;
import org.hibernate.engine.transaction.spi.TransactionEnvironment; |
<<<<<<<
import com.tagtraum.perf.gcviewer.model.GCResource;
=======
import com.tagtraum.perf.gcviewer.util.NumberParser;
>>>>>>>
import com.tagtraum.perf.gcviewer.model.GCResource;
import com.tagtraum.perf.gcviewer.util.NumberParser; |
<<<<<<<
import com.tagtraum.perf.gcviewer.model.GCResource;
import com.tagtraum.perf.gcviewer.util.ParsePosition;
=======
import com.tagtraum.perf.gcviewer.util.ParseInformation;
>>>>>>>
import com.tagtraum.perf.gcviewer.model.GCResource;
import com.tagtraum.perf.gcviewer.util.ParseInformation;
<<<<<<<
private Date firstDateStamp = null;
public DataReaderSun1_6_0(GCResource gcResource, InputStream in, GcLogType gcLogType) throws UnsupportedEncodingException {
super(gcResource, in, gcLogType);
=======
public DataReaderSun1_6_0(InputStream in, GcLogType gcLogType) throws UnsupportedEncodingException {
super(in, gcLogType);
>>>>>>>
public DataReaderSun1_6_0(GCResource gcResource, InputStream in, GcLogType gcLogType) throws UnsupportedEncodingException {
super(gcResource, in, gcLogType); |
<<<<<<<
package com.tagtraum.perf.gcviewer.imp;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.util.logging.Level;
import com.tagtraum.perf.gcviewer.model.AbstractGCEvent;
import com.tagtraum.perf.gcviewer.model.GCEvent;
import com.tagtraum.perf.gcviewer.model.GCModel;
import com.tagtraum.perf.gcviewer.model.GCResource;
import com.tagtraum.perf.gcviewer.util.ParseInformation;
/**
* Parses -verbose:gc output from Sun JDK 1.3.1.
*
* Date: Jan 30, 2002
* Time: 5:15:44 PM
* @author <a href="mailto:[email protected]">Hendrik Schreiber</a>
*/
public class DataReaderSun1_3_1 extends AbstractDataReaderSun implements DataReader {
private int count;
public DataReaderSun1_3_1(GCResource gcResource, InputStream in, GcLogType gcLogType) throws UnsupportedEncodingException {
super(gcResource, in, gcLogType);
}
public GCModel read() throws IOException {
if (getLogger().isLoggable(Level.INFO)) getLogger().info("Reading Sun 1.3.1 format...");
try {
count = 0;
GCModel model = new GCModel(true);
model.setFormat(GCModel.Format.SUN_VERBOSE_GC);
List<StringBuilder> lineStack = new ArrayList<StringBuilder>();
int i;
StringBuilder line = null;
while ((i = in.read()) != -1) {
char c = (char) i;
if (c == '[') {
if (line != null) lineStack.add(line); // push
line = new StringBuilder(64);
}
else if (c == ']') {
try {
model.add(parseLine(line.toString(), null));
}
catch (ParseException e) {
if (getLogger().isLoggable(Level.WARNING)) getLogger().log(Level.WARNING, e.getMessage(), e);
e.printStackTrace();
}
if (!lineStack.isEmpty()) {
line = lineStack.remove(lineStack.size() - 1); // pop
}
}
else {
if (line != null) line.append(c);
}
}
return model;
}
finally {
if (in != null) try {
in.close();
}
catch (IOException ioe) {
}
if (getLogger().isLoggable(Level.INFO)) getLogger().info("Done reading.");
}
}
protected AbstractGCEvent<GCEvent> parseLine(String line, ParseInformation pos) throws ParseException {
AbstractGCEvent<GCEvent> event = new GCEvent();
try {
event.setTimestamp(count);
count++;
StringTokenizer st = new StringTokenizer(line, " ,->()K\r\n");
String token = st.nextToken();
if (token.equals("Full") && st.nextToken().equals("GC")) {
event.setType(AbstractGCEvent.Type.FULL_GC);
}
else if (token.equals("Inc") && st.nextToken().equals("GC")) {
event.setType(AbstractGCEvent.Type.INC_GC);
}
else if (token.equals("GC")) {
event.setType(AbstractGCEvent.Type.GC);
}
else {
throw new ParseException("Error parsing entry: " + line);
}
setMemoryAndPauses((GCEvent)event, line);
// debug
//System.out.println("Parsed: " + event);
//System.out.println("Real : [" + line + "]");
return event;
}
catch (RuntimeException rte) {
final ParseException parseException = new ParseException("Error parsing entry: " + line + ", " + rte.toString());
parseException.initCause(rte);
throw parseException;
}
}
}
=======
package com.tagtraum.perf.gcviewer.imp;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.tagtraum.perf.gcviewer.model.AbstractGCEvent;
import com.tagtraum.perf.gcviewer.model.GCEvent;
import com.tagtraum.perf.gcviewer.model.GCModel;
import com.tagtraum.perf.gcviewer.util.ParseInformation;
/**
* Parses -verbose:gc output from Sun JDK 1.3.1.
*
* Date: Jan 30, 2002
* Time: 5:15:44 PM
* @author <a href="mailto:[email protected]">Hendrik Schreiber</a>
*/
public class DataReaderSun1_3_1 extends AbstractDataReaderSun implements DataReader {
private static Logger LOG = Logger.getLogger(DataReaderSun1_3_1.class.getName());
private int count;
public DataReaderSun1_3_1(InputStream in, GcLogType gcLogType) throws UnsupportedEncodingException {
super(in, gcLogType);
}
public GCModel read() throws IOException {
if (LOG.isLoggable(Level.INFO)) LOG.info("Reading Sun 1.3.1 format...");
try {
count = 0;
GCModel model = new GCModel();
model.setFormat(GCModel.Format.SUN_VERBOSE_GC);
List<StringBuilder> lineStack = new ArrayList<StringBuilder>();
int i;
StringBuilder line = null;
while ((i = in.read()) != -1) {
char c = (char) i;
if (c == '[') {
if (line != null) lineStack.add(line); // push
line = new StringBuilder(64);
} else if (c == ']') {
try {
model.add(parseLine(line.toString(), null));
} catch (ParseException e) {
if (LOG.isLoggable(Level.WARNING)) LOG.log(Level.WARNING, e.getMessage(), e);
System.out.println(e.getMessage());
}
if (!lineStack.isEmpty()) {
line = lineStack.remove(lineStack.size() - 1); // pop
}
} else {
if (line != null) line.append(c);
}
}
return model;
} finally {
if (in != null) try {
in.close();
} catch (IOException ioe) {
}
if (LOG.isLoggable(Level.INFO)) LOG.info("Done reading.");
}
}
protected AbstractGCEvent<GCEvent> parseLine(String line, ParseInformation pos) throws ParseException {
AbstractGCEvent<GCEvent> event = new GCEvent();
try {
event.setTimestamp(count);
count++;
StringTokenizer st = new StringTokenizer(line, " ,->()K\r\n");
String token = st.nextToken();
if (token.equals("Full") && st.nextToken().equals("GC")) {
event.setType(AbstractGCEvent.Type.FULL_GC);
} else if (token.equals("Inc") && st.nextToken().equals("GC")) {
event.setType(AbstractGCEvent.Type.INC_GC);
} else if (token.equals("GC")) {
event.setType(AbstractGCEvent.Type.GC);
} else {
throw new ParseException("Error parsing entry: " + line);
}
setMemoryAndPauses((GCEvent)event, line);
// debug
//System.out.println("Parsed: " + event);
//System.out.println("Real : [" + line + "]");
return event;
} catch (RuntimeException rte) {
final ParseException parseException = new ParseException("Error parsing entry: " + line + ", " + rte.toString());
parseException.initCause(rte);
throw parseException;
}
}
}
>>>>>>>
package com.tagtraum.perf.gcviewer.imp;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.util.logging.Level;
import com.tagtraum.perf.gcviewer.model.AbstractGCEvent;
import com.tagtraum.perf.gcviewer.model.GCEvent;
import com.tagtraum.perf.gcviewer.model.GCModel;
import com.tagtraum.perf.gcviewer.model.GCResource;
import com.tagtraum.perf.gcviewer.util.ParseInformation;
/**
* Parses -verbose:gc output from Sun JDK 1.3.1.
*
* Date: Jan 30, 2002
* Time: 5:15:44 PM
* @author <a href="mailto:[email protected]">Hendrik Schreiber</a>
*/
public class DataReaderSun1_3_1 extends AbstractDataReaderSun implements DataReader {
private int count;
public DataReaderSun1_3_1(GCResource gcResource, InputStream in, GcLogType gcLogType) throws UnsupportedEncodingException {
super(gcResource, in, gcLogType);
}
public GCModel read() throws IOException {
if (getLogger().isLoggable(Level.INFO)) getLogger().info("Reading Sun 1.3.1 format...");
try {
count = 0;
GCModel model = new GCModel();
model.setFormat(GCModel.Format.SUN_VERBOSE_GC);
List<StringBuilder> lineStack = new ArrayList<StringBuilder>();
int i;
StringBuilder line = null;
while ((i = in.read()) != -1) {
char c = (char) i;
if (c == '[') {
if (line != null) lineStack.add(line); // push
line = new StringBuilder(64);
}
else if (c == ']') {
try {
model.add(parseLine(line.toString(), null));
}
catch (ParseException e) {
if (getLogger().isLoggable(Level.WARNING)) getLogger().log(Level.WARNING, e.getMessage(), e);
e.printStackTrace();
}
if (!lineStack.isEmpty()) {
line = lineStack.remove(lineStack.size() - 1); // pop
}
}
else {
if (line != null) line.append(c);
}
}
return model;
}
finally {
if (in != null) try {
in.close();
}
catch (IOException ioe) {
}
if (getLogger().isLoggable(Level.INFO)) getLogger().info("Done reading.");
}
}
protected AbstractGCEvent<GCEvent> parseLine(String line, ParseInformation pos) throws ParseException {
AbstractGCEvent<GCEvent> event = new GCEvent();
try {
event.setTimestamp(count);
count++;
StringTokenizer st = new StringTokenizer(line, " ,->()K\r\n");
String token = st.nextToken();
if (token.equals("Full") && st.nextToken().equals("GC")) {
event.setType(AbstractGCEvent.Type.FULL_GC);
}
else if (token.equals("Inc") && st.nextToken().equals("GC")) {
event.setType(AbstractGCEvent.Type.INC_GC);
}
else if (token.equals("GC")) {
event.setType(AbstractGCEvent.Type.GC);
}
else {
throw new ParseException("Error parsing entry: " + line);
}
setMemoryAndPauses((GCEvent)event, line);
// debug
//System.out.println("Parsed: " + event);
//System.out.println("Real : [" + line + "]");
return event;
}
catch (RuntimeException rte) {
final ParseException parseException = new ParseException("Error parsing entry: " + line + ", " + rte.toString());
parseException.initCause(rte);
throw parseException;
}
}
} |
<<<<<<<
registerLootTable(MnBlocks.ARCHAIC_ORE, block -> droppingItemWithFortune(block, MnItems.ARCHAIC_SHARD));
registerSilkTouch(MnBlocks.ARCHAIC_GLASS);
registerSilkTouch(MnBlocks.ARCHAIC_GLASS_PANE);
=======
registerDropSelfLootTable(MnBlocks.TENEBRUM_ORE);
registerDropSelfLootTable(MnBlocks.TENEBRUM_BLOCK);
>>>>>>>
registerLootTable(MnBlocks.ARCHAIC_ORE, block -> droppingItemWithFortune(block, MnItems.ARCHAIC_SHARD));
registerSilkTouch(MnBlocks.ARCHAIC_GLASS);
registerSilkTouch(MnBlocks.ARCHAIC_GLASS_PANE);
registerDropSelfLootTable(MnBlocks.TENEBRUM_ORE);
registerDropSelfLootTable(MnBlocks.TENEBRUM_BLOCK); |
<<<<<<<
=======
private static Logger LOG = Logger.getLogger(AbstractDataReaderSun.class.getName());
>>>>>>>
<<<<<<<
=======
/** the reader accessing the log file */
protected BufferedReader in;
>>>>>>>
<<<<<<<
}
=======
}
>>>>>>>
}
<<<<<<<
=======
>>>>>>>
<<<<<<<
final GCEvent event) throws ParseException {
=======
final GCEvent event) throws ParseException {
>>>>>>>
final GCEvent event) throws ParseException {
<<<<<<<
getLogger().warning("input stream does not support marking!");
}
=======
LOG.warning("input stream does not support marking!");
}
>>>>>>>
getLogger().warning("input stream does not support marking!");
}
<<<<<<<
if (getLogger().isLoggable(Level.FINE)) getLogger().fine("Skipping detail event because of " + e);
=======
if (LOG.isLoggable(Level.FINE)) LOG.fine("Skipping detail event because of " + e);
>>>>>>>
if (getLogger().isLoggable(Level.FINE)) getLogger().fine("Skipping detail event because of " + e); |
<<<<<<<
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.StringTokenizer;
import java.util.logging.Level;
import com.tagtraum.perf.gcviewer.model.AbstractGCEvent;
import com.tagtraum.perf.gcviewer.model.AbstractGCEvent.Type;
import com.tagtraum.perf.gcviewer.model.GCEvent;
import com.tagtraum.perf.gcviewer.model.GCModel;
import com.tagtraum.perf.gcviewer.model.GCResource;
=======
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.tagtraum.perf.gcviewer.model.AbstractGCEvent;
import com.tagtraum.perf.gcviewer.model.AbstractGCEvent.Type;
import com.tagtraum.perf.gcviewer.model.GCEvent;
import com.tagtraum.perf.gcviewer.model.GCModel;
import com.tagtraum.perf.gcviewer.util.NumberParser;
>>>>>>>
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.StringTokenizer;
import java.util.logging.Level;
import com.tagtraum.perf.gcviewer.model.AbstractGCEvent;
import com.tagtraum.perf.gcviewer.model.AbstractGCEvent.Type;
import com.tagtraum.perf.gcviewer.model.GCEvent;
import com.tagtraum.perf.gcviewer.model.GCModel;
import com.tagtraum.perf.gcviewer.model.GCResource;
import com.tagtraum.perf.gcviewer.util.NumberParser; |
<<<<<<<
import com.tagtraum.perf.gcviewer.model.GCResource;
=======
import com.tagtraum.perf.gcviewer.util.NumberParser;
>>>>>>>
import com.tagtraum.perf.gcviewer.model.GCResource;
import com.tagtraum.perf.gcviewer.util.NumberParser; |
<<<<<<<
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.tagtraum.perf.gcviewer.ctrl.GCViewerGuiController;
=======
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
>>>>>>>
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.tagtraum.perf.gcviewer.ctrl.GCViewerGuiController;
<<<<<<<
import com.tagtraum.perf.gcviewer.model.GCResource;
import com.tagtraum.perf.gcviewer.view.SimpleChartRenderer;
=======
/**
* Main class of GCViewer. Parses command line parameters if there are any and either remains
* in command line mode or starts the gui (depending on parameters).
*/
>>>>>>>
import com.tagtraum.perf.gcviewer.model.GCResource;
import com.tagtraum.perf.gcviewer.view.SimpleChartRenderer;
/**
* Main class of GCViewer. Parses command line parameters if there are any and either remains
* in command line mode or starts the gui (depending on parameters).
*/
<<<<<<<
public static void main(final String[] args) throws InvocationTargetException, InterruptedException {
if (args.length > 3) {
=======
if (argsParser.getArgumentCount() > 3) {
>>>>>>>
if (argsParser.getArgumentCount() > 3) { |
<<<<<<<
DataReader dataReader = null;
long nextPos = 0;
String chunkOfLastLine = null;
int attemptCount = 0;
while (attemptCount < MAX_ATTEMPT_COUNT) {
in.mark(FOUR_KB + (int) nextPos);
if (nextPos > 0) {
long skipped = in.skip(nextPos);
if (skipped != nextPos) {
break;
}
}
byte[] buf = new byte[ONE_KB * 3];
int length = in.read(buf);
in.reset();
if (length <= 0) {
break;
}
nextPos += length;
String s = new String(buf, 0, length, "ASCII");
if (chunkOfLastLine != null && chunkOfLastLine.length() > 0) {
s = chunkOfLastLine + s;
}
dataReader = getDataReaderBySample(s, in);
if (dataReader != null) {
break;
}
int index = s.lastIndexOf('\n');
if (index >= 0) {
chunkOfLastLine = s.substring(index + 1, s.length());
} else {
chunkOfLastLine = "";
}
attemptCount++;
}
if (dataReader == null) {
if (LOG.isLoggable(Level.SEVERE)) LOG.severe(localStrings.getString("datareaderfactory_instantiation_failed"));
throw new IOException(localStrings.getString("datareaderfactory_instantiation_failed"));
}
return dataReader;
}
private DataReader getDataReaderBySample(String s, InputStream in) throws IOException {
if (s.indexOf("[memory ] ") != -1) {
if ((s.indexOf("[memory ] [YC") != -1) ||(s.indexOf("[memory ] [OC") != -1)) {
=======
in.mark(FOUR_KB);
byte[] buf = new byte[ONE_KB * 3];
int length = in.read(buf);
in.reset();
String s = new String(buf, 0, length, "ASCII");
// if there is a [memory ] somewhere in the first chunk of the logs, it is JRockit
if (s.indexOf("[memory ]") != -1) {
// JRockit 1.5 and 1.6 logs look like: [memory ][Tue Nov 13 08:39:01 2012][01684] [OC#1]
if ((s.indexOf("[YC#") != -1) ||(s.indexOf("[OC#") != -1)) {
>>>>>>>
DataReader dataReader = null;
long nextPos = 0;
String chunkOfLastLine = null;
int attemptCount = 0;
while (attemptCount < MAX_ATTEMPT_COUNT) {
in.mark(FOUR_KB + (int) nextPos);
if (nextPos > 0) {
long skipped = in.skip(nextPos);
if (skipped != nextPos) {
break;
}
}
byte[] buf = new byte[ONE_KB * 3];
int length = in.read(buf);
in.reset();
if (length <= 0) {
break;
}
nextPos += length;
String s = new String(buf, 0, length, "ASCII");
if (chunkOfLastLine != null && chunkOfLastLine.length() > 0) {
s = chunkOfLastLine + s;
}
dataReader = getDataReaderBySample(s, in);
if (dataReader != null) {
break;
}
int index = s.lastIndexOf('\n');
if (index >= 0) {
chunkOfLastLine = s.substring(index + 1, s.length());
} else {
chunkOfLastLine = "";
}
attemptCount++;
}
if (dataReader == null) {
if (LOG.isLoggable(Level.SEVERE)) LOG.severe(localStrings.getString("datareaderfactory_instantiation_failed"));
throw new IOException(localStrings.getString("datareaderfactory_instantiation_failed"));
}
return dataReader;
}
private DataReader getDataReaderBySample(String s, InputStream in) throws IOException {
// if there is a [memory ] somewhere in the first chunk of the logs, it is JRockit
if (s.indexOf("[memory ] ") != -1) {
// JRockit 1.5 and 1.6 logs look like: [memory ][Tue Nov 13 08:39:01 2012][01684] [OC#1]
if ((s.indexOf("[YC#") != -1) ||(s.indexOf("[OC#") != -1)) { |
<<<<<<<
=======
private static final Logger IMP_LOGGER = Logger.getLogger("com.tagtraum.perf.gcviewer.imp");
private static final Logger DATA_READER_FACTORY_LOGGER = Logger.getLogger("com.tagtraum.perf.gcviewer.DataReaderFactory");
private final DateTimeFormatter dateTimeFormatter = AbstractDataReaderSun.DATE_TIME_FORMATTER;
>>>>>>>
private final DateTimeFormatter dateTimeFormatter = AbstractDataReaderSun.DATE_TIME_FORMATTER;
<<<<<<<
GCResource gcResource = new GCResource("byteArray");
gcResource.getLogger().addHandler(handler);
SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
=======
IMP_LOGGER.addHandler(handler);
DATA_READER_FACTORY_LOGGER.addHandler(handler);
>>>>>>>
GCResource gcResource = new GCResource("byteArray");
gcResource.getLogger().addHandler(handler); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.