conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
import gyro.parser.antlr4.BeamParser;
import org.antlr.v4.runtime.ParserRuleContext;
=======
import gyro.parser.antlr4.GyroParser;
>>>>>>>
import org.antlr.v4.runtime.ParserRuleContext;
import gyro.parser.antlr4.GyroParser;
<<<<<<<
} else if (cc.equals(BeamParser.StringExpressionContext.class)) {
node = new StringExpressionNode((BeamParser.StringExpressionContext) context);
=======
} else if (cc.equals(GyroParser.ResourceReferenceContext.class)) {
return new ResourceReferenceNode((GyroParser.ResourceReferenceContext) context);
} else if (cc.equals(GyroParser.LiteralStringContext.class)) {
return new LiteralStringNode((GyroParser.LiteralStringContext) context);
>>>>>>>
} else if (cc.equals(GyroParser.ResourceReferenceContext.class)) {
node = new ResourceReferenceNode((GyroParser.ResourceReferenceContext) context);
} else if (cc.equals(GyroParser.LiteralStringContext.class)) {
node = new LiteralStringNode((GyroParser.LiteralStringContext) context);
<<<<<<<
node = sec != null
? new StringExpressionNode(sec)
: new StringNode(StringUtils.strip(svc.STRING_LITERAL().getText(), "'"));
=======
} else if (cc.equals(GyroParser.ValueReferenceContext.class)) {
return new ValueReferenceNode((GyroParser.ValueReferenceContext) context);
>>>>>>>
} else if (cc.equals(GyroParser.ValueReferenceContext.class)) {
node = new ValueReferenceNode((GyroParser.ValueReferenceContext) context);
<<<<<<<
node = new StringNode(context.getText());
=======
return new LiteralStringNode(context.getText());
>>>>>>>
node = new LiteralStringNode(context.getText()); |
<<<<<<<
return createClient(clientClass, null);
}
protected <T extends SdkClient> T createClient(Class<T> clientClass, Region region) {
=======
return createClient(clientClass, null, null);
}
protected <T extends SdkClient> T createClient(Class<T> clientClass, String region, String endpoint) {
>>>>>>>
return createClient(clientClass, null);
}
protected <T extends SdkClient> T createClient(Class<T> clientClass, Region region) {
return createClient(clientClass, null, null);
}
protected <T extends SdkClient> T createClient(Class<T> clientClass, String region, String endpoint) {
<<<<<<<
builder.region(region != null ? region : Region.of(credentials.getRegion()));
=======
builder.region(Region.of(region != null ? region : credentials.getRegion()));
>>>>>>>
builder.region(Region.of(region != null ? region : credentials.getRegion())); |
<<<<<<<
public void addSuperclass(final String superclassName, final HashMap<String, ClassInfo> classNameToClassInfo) {
if (superclassName != null && !"java.lang.Object".equals(superclassName)) {
=======
public void addSuperclass(final String superclassName, final Map<String, ClassInfo> classNameToClassInfo) {
if (superclassName != null && !superclassName.equals("java.lang.Object")) {
>>>>>>>
public void addSuperclass(final String superclassName, final Map<String, ClassInfo> classNameToClassInfo) {
if (superclassName != null && !"java.lang.Object".equals(superclassName)) { |
<<<<<<<
package org.open2jam.gui;
/*
* SkinConfiguration.java
*
* Created on 14-mar-2011, 12:06:38
*/
=======
package org.open2jam.gui;
>>>>>>>
package org.open2jam.gui;
<<<<<<<
import org.open2jam.util.Logger;
=======
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
>>>>>>>
import org.open2jam.util.Logger;
import javax.swing.DefaultComboBoxModel;
<<<<<<<
private static final URL resources_xml = SkinConfiguration.class.getResource("/resources/resources.xml");
=======
private static final URL resources_xml = SkinConfiguration.class.getResource("/resources/resources.xml");
static final Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
>>>>>>>
private static final URL resources_xml = SkinConfiguration.class.getResource("/resources/resources.xml");
<<<<<<<
=======
skinH = checker.getBaseH();
skinW = checker.getBaseW();
System.out.println(skinW+" "+skinH);
>>>>>>>
skinH = checker.getBaseH();
skinW = checker.getBaseW();
System.out.println(skinW+" "+skinH); |
<<<<<<<
setBPM(chart.getBPM());
=======
>>>>>>>
<<<<<<<
=======
setBPM(chart.getBPM());
>>>>>>>
setBPM(chart.getBPM());
<<<<<<<
else {
combo_entity.resetNumber();
//computeScore(judge);//TODO: why are we computing the score again ???
}
ne.setState(NoteEntity.State.LN_HOLD);
}else{
combo_entity.resetNumber();
ne.setState(NoteEntity.State.TO_KILL);
note_channels.get(ne.getChannel()).removeFirst();
=======
else {
if(judge.equals("JUDGMENT_GOOD"))combo_entity.incNumber(); //because of the pills
else combo_entity.resetNumber();
score_entity.addNumber(computeScore(judge));
}
if(ne instanceof LongNoteEntity)ne.setState(NoteEntity.State.TO_KILL);
else ne.setAlive(false);
} else {
combo_entity.resetNumber();
ne.setState(NoteEntity.State.TO_KILL);
>>>>>>>
else {
if(judge.equals("JUDGMENT_GOOD"))combo_entity.incNumber(); //because of the pills
else combo_entity.resetNumber();
}
if(ne instanceof LongNoteEntity)ne.setState(NoteEntity.State.TO_KILL);
else ne.setAlive(false);
} else {
combo_entity.resetNumber();
ne.setState(NoteEntity.State.TO_KILL);
note_channels.get(ne.getChannel()).removeFirst();
<<<<<<<
note_channels.get(ne.getChannel()).removeFirst();
break;
case TO_KILL: // this is the "garbage collector", it just removes the notes off window
if(ne.isAlive() && ne.getY() >= window.getResolutionHeight())
{
// kill it
ne.setAlive(false);
}
break;
case NOT_JUDGED: // you missed it (no keyboard input)
if(ne.isAlive()
&& ((ne instanceof LongNoteEntity && ne.getStartY() >= judgmentArea()) //needed by the ln head
|| (ne.getY() >= judgmentArea())))
{
if(judgment_entity != null)judgment_entity.setAlive(false);
judgment_entity = (JudgmentEntity) skin.getEntityMap().get("EFFECT_"+MISS_JUDGE).copy();
entities_matrix.add(judgment_entity);
note_counter.get(MISS_JUDGE).incNumber();
combo_entity.resetNumber();
computeScore(MISS_JUDGE, ne.getHit());
note_channels.get(ne.getChannel()).removeFirst();
ne.setState(NoteEntity.State.TO_KILL);
}
=======
>>>>>>>
<<<<<<<
computeScore(MISS_JUDGE, ne.getHit());
=======
score_entity.addNumber(computeScore(MISS_JUDGE));
update_screen_info(MISS_JUDGE);
>>>>>>>
update_screen_info(MISS_JUDGE,ne.getHit()); |
<<<<<<<
ranking_entity.addNumber(computeRanking(judge));
if(judge.equals("JUDGMENT_COOL"))
jamcombo_counter += 2;
else if(judge.equals("JUDGMENT_GOOD"))
jamcombo_counter++;
else
{
jamcombo_counter = 0;
jamcombo_entity.resetNumber();
}
if(ne.getHit() > 0) // TODO: compare with MISS ?
=======
if(!judge.equals(MISS_JUDGE))
>>>>>>>
ranking_entity.addNumber(computeRanking(judge));
if(judge.equals("JUDGMENT_COOL"))
jamcombo_counter += 2;
else if(judge.equals("JUDGMENT_GOOD"))
jamcombo_counter++;
else
{
jamcombo_counter = 0;
jamcombo_entity.resetNumber();
}
if(!judge.equals(MISS_JUDGE)) |
<<<<<<<
private static final String TEST_STREAM1 = "com.tesco.basket";
private Server server;
private Client client;
@Before
public void before() throws Exception {
log.trace("in before");
server = new ServerImpl(new ServerOptions());
CompletableFuture<Void> cfStart = server.start();
cfStart.get();
client = new ClientImpl();
}
@After
public void after() throws Exception {
log.trace("in after");
client.close().get();
server.stop().get();
}
=======
>>>>>>>
<<<<<<<
Async async = context.async();
SubDescriptor descriptor = new SubDescriptor().setChannel(TEST_STREAM1);
=======
SubDescriptor descriptor = new SubDescriptor().setChannel(TEST_CHANNEL_1);
>>>>>>>
Async async = context.async();
SubDescriptor descriptor = new SubDescriptor().setChannel(TEST_CHANNEL_1); |
<<<<<<<
public void testSimpleFunction() {
SubDescriptor descriptor = new SubDescriptor().setStreamName(TEST_STREAM1);
=======
public void testSimpleFunction(TestContext context) throws Exception {
SubDescriptor descriptor = new SubDescriptor().setChannel(TEST_STREAM1);
>>>>>>>
public void testSimpleFunction() throws Exception {
SubDescriptor descriptor = new SubDescriptor().setChannel(TEST_STREAM1); |
<<<<<<<
import com.tesco.mewbase.client.QueryResponse;
import com.tesco.mewbase.client.QueryResult;
=======
import com.tesco.mewbase.doc.DocReadStream;
import com.tesco.mewbase.log.LogReadStream;
>>>>>>>
import com.tesco.mewbase.doc.DocReadStream;
<<<<<<<
import java.util.function.Consumer;
=======
import java.util.function.Function;
>>>>>>>
import java.util.function.Function;
<<<<<<<
public CompletableFuture<QueryResponse> findMatching(String binderName, BsonObject matcher, Consumer<QueryResult> resultHandler) {
=======
public CompletableFuture<Boolean> delete(String binderName, String id) {
Binder binder = getOrCreateBinder(binderName);
CompletableFuture<Boolean> cfResult = new CompletableFuture<>();
cfResult.complete(binder.delete(id));
return cfResult;
}
@Override
public DocReadStream getMatching(String binderName, Function<BsonObject, Boolean> matcher) {
return null;
}
@Override
public CompletableFuture<Void> createBinder(String binderName) {
>>>>>>>
public CompletableFuture<Boolean> delete(String binderName, String id) {
Binder binder = getOrCreateBinder(binderName);
CompletableFuture<Boolean> cfResult = new CompletableFuture<>();
cfResult.complete(binder.delete(id));
return cfResult;
}
@Override
public DocReadStream getMatching(String binderName, Function<BsonObject, Boolean> matcher) {
return null;
}
@Override
public CompletableFuture<Void> createBinder(String binderName) { |
<<<<<<<
public ConnectionImpl(ServerImpl server, NetSocket netSocket, Context context) {
netSocket.handler(new Codec(this).recordParser());
=======
public ConnectionImpl(ServerImpl server, TransportConnection transportConnection, Context context, DocManager docManager) {
Protocol protocol = new Protocol(this);
RecordParser recordParser = protocol.recordParser();
transportConnection.handler(recordParser::handle);
>>>>>>>
public ConnectionImpl(ServerImpl server, TransportConnection transportConnection, Context context, DocManager docManager) {
Protocol protocol = new Protocol(this);
RecordParser recordParser = protocol.recordParser();
transportConnection.handler(recordParser::handle);
<<<<<<<
Long startPos = frame.getLong(Codec.SUBSCRIBE_STARTPOS);
Long startTimestamp = frame.getLong(Codec.SUBSCRIBE_STARTTIMESTAMP);
String durableID = frame.getString(Codec.SUBSCRIBE_DURABLEID);
BsonObject matcher = frame.getBsonObject(Codec.SUBSCRIBE_MATCHER);
SubDescriptor subDescriptor =
new SubDescriptor().setStartPos(startPos).setStartTimestamp(startTimestamp).setDurableID(durableID)
.setMatcher(matcher).setChannel(channel);
=======
Long startSeq = frame.getLong(Protocol.SUBSCRIBE_STARTPOS);
Long startTimestamp = frame.getLong(Protocol.SUBSCRIBE_STARTTIMESTAMP);
String durableID = frame.getString(Protocol.SUBSCRIBE_DURABLEID);
BsonObject matcher = frame.getBsonObject(Protocol.SUBSCRIBE_MATCHER);
SubDescriptor subDescriptor = new SubDescriptor().setStartPos(startSeq == null ? -1 : startSeq).setStartTimestamp(startTimestamp)
.setMatcher(matcher).setDurableID(durableID).setChannel(channel);
>>>>>>>
Long startSeq = frame.getLong(Protocol.SUBSCRIBE_STARTPOS);
Long startTimestamp = frame.getLong(Protocol.SUBSCRIBE_STARTTIMESTAMP);
String durableID = frame.getString(Protocol.SUBSCRIBE_DURABLEID);
BsonObject matcher = frame.getBsonObject(Protocol.SUBSCRIBE_MATCHER);
SubDescriptor subDescriptor = new SubDescriptor().setStartPos(startSeq == null ? -1 : startSeq).setStartTimestamp(startTimestamp)
.setMatcher(matcher).setDurableID(durableID).setChannel(channel);
<<<<<<<
resp.put(Codec.RESPONSE_OK, true);
resp.put(Codec.SUBRESPONSE_SUBID, subID);
writeResponse(Codec.SUBRESPONSE_FRAME, resp, getWriteSeq());
logger.trace("Subscribed channel: {} startSeq {}", channel, startPos);
}
@Override
public void handleSubClose(BsonObject frame) {
handleCloseUnsubscribeSub(frame, false);
=======
resp.put(Protocol.RESPONSE_OK, true);
resp.put(Protocol.SUBRESPONSE_SUBID, subID);
writeResponse(Protocol.SUBRESPONSE_FRAME, resp, getWriteSeq());
logger.trace("Subscribed channel: {} startSeq {}", channel, startSeq);
>>>>>>>
resp.put(Protocol.RESPONSE_OK, true);
resp.put(Protocol.SUBRESPONSE_SUBID, subID);
writeResponse(Protocol.SUBRESPONSE_FRAME, resp, getWriteSeq());
logger.trace("Subscribed channel: {} startSeq {}", channel, startSeq);
}
@Override
public void handleSubClose(BsonObject frame) {
handleCloseUnsubscribeSub(frame, false);
<<<<<<<
Integer subID = frame.getInteger(Codec.ACKEV_SUBID);
=======
String subID = frame.getString(Protocol.ACKEV_SUBID);
>>>>>>>
Integer subID = frame.getInteger(Protocol.ACKEV_SUBID);
<<<<<<<
int queryID = frame.getInteger(Codec.QUERY_QUERYID);
String docID = frame.getString(Codec.QUERY_DOCID);
String binder = frame.getString(Codec.QUERY_BINDER);
BsonObject matcher = frame.getBsonObject(Codec.QUERY_MATCHER);
DocManager docManager = server().docManager();
=======
int queryID = frame.getInteger(Protocol.QUERY_QUERYID);
String docID = frame.getString(Protocol.QUERY_DOCID);
String binder = frame.getString(Protocol.QUERY_BINDER);
BsonObject matcher = frame.getBsonObject(Protocol.QUERY_MATCHER);
>>>>>>>
int queryID = frame.getInteger(Protocol.QUERY_QUERYID);
String docID = frame.getString(Protocol.QUERY_DOCID);
String binder = frame.getString(Protocol.QUERY_BINDER);
BsonObject matcher = frame.getBsonObject(Protocol.QUERY_MATCHER);
DocManager docManager = server().docManager(); |
<<<<<<<
import com.tesco.mewbase.auth.impl.NoAuthAuthProvider;
import com.tesco.mewbase.auth.MewbaseAuthProvider;
import com.tesco.mewbase.log.impl.file.FileLogManagerOptions;
=======
>>>>>>>
import com.tesco.mewbase.auth.impl.NoAuthAuthProvider;
import com.tesco.mewbase.auth.MewbaseAuthProvider;
<<<<<<<
private MewbaseAuthProvider authProvider = new NoAuthAuthProvider();
=======
public static final String DEFAULT_LOG_DIR = "mewlog";
public static final int DEFAULT_MAX_LOG_CHUNK_SIZE = 4 * 10 * 1024 * 1024;
public static final int DEFAULT_PREALLOCATE_SIZE = 0;
public static final int DEFAULT_MAX_RECORD_SIZE = 4 * 1024 * 1024;
public static final int DEFAULT_READ_BUFFER_SIZE = 4 * 1024;
private String logDir = DEFAULT_LOG_DIR;
private int maxLogChunkSize = DEFAULT_MAX_LOG_CHUNK_SIZE;
private int preallocateSize = DEFAULT_PREALLOCATE_SIZE;
private int maxRecordSize = DEFAULT_MAX_RECORD_SIZE;
private int readBufferSize = DEFAULT_READ_BUFFER_SIZE;
>>>>>>>
private MewbaseAuthProvider authProvider = new NoAuthAuthProvider();
public static final String DEFAULT_LOG_DIR = "mewlog";
public static final int DEFAULT_MAX_LOG_CHUNK_SIZE = 4 * 10 * 1024 * 1024;
public static final int DEFAULT_PREALLOCATE_SIZE = 0;
public static final int DEFAULT_MAX_RECORD_SIZE = 4 * 1024 * 1024;
public static final int DEFAULT_READ_BUFFER_SIZE = 4 * 1024;
private String logDir = DEFAULT_LOG_DIR;
private int maxLogChunkSize = DEFAULT_MAX_LOG_CHUNK_SIZE;
private int preallocateSize = DEFAULT_PREALLOCATE_SIZE;
private int maxRecordSize = DEFAULT_MAX_RECORD_SIZE;
private int readBufferSize = DEFAULT_READ_BUFFER_SIZE;
<<<<<<<
public MewbaseAuthProvider getAuthProvider() {
return authProvider;
}
public ServerOptions setAuthProvider(MewbaseAuthProvider authProvider) {
this.authProvider = authProvider;
return this;
}
=======
public String getLogDir() {
return logDir;
}
public ServerOptions setLogDir(String logDir) {
this.logDir = logDir;
return this;
}
public int getMaxLogChunkSize() {
return maxLogChunkSize;
}
public ServerOptions setMaxLogChunkSize(int maxLogChunkSize) {
this.maxLogChunkSize = maxLogChunkSize;
return this;
}
public int getMaxRecordSize() {
return maxRecordSize;
}
public ServerOptions setMaxRecordSize(int maxRecordSize) {
this.maxRecordSize = maxRecordSize;
return this;
}
public int getPreallocateSize() {
return preallocateSize;
}
public ServerOptions setPreallocateSize(int preallocateSize) {
this.preallocateSize = preallocateSize;
return this;
}
public int getReadBufferSize() {
return readBufferSize;
}
public ServerOptions setReadBufferSize(int readBufferSize) {
this.readBufferSize = readBufferSize;
return this;
}
>>>>>>>
public MewbaseAuthProvider getAuthProvider() {
return authProvider;
}
public ServerOptions setAuthProvider(MewbaseAuthProvider authProvider) {
this.authProvider = authProvider;
return this;
}
public String getLogDir() {
return logDir;
}
public ServerOptions setLogDir(String logDir) {
this.logDir = logDir;
return this;
}
public int getMaxLogChunkSize() {
return maxLogChunkSize;
}
public ServerOptions setMaxLogChunkSize(int maxLogChunkSize) {
this.maxLogChunkSize = maxLogChunkSize;
return this;
}
public int getMaxRecordSize() {
return maxRecordSize;
}
public ServerOptions setMaxRecordSize(int maxRecordSize) {
this.maxRecordSize = maxRecordSize;
return this;
}
public int getPreallocateSize() {
return preallocateSize;
}
public ServerOptions setPreallocateSize(int preallocateSize) {
this.preallocateSize = preallocateSize;
return this;
}
public int getReadBufferSize() {
return readBufferSize;
}
public ServerOptions setReadBufferSize(int readBufferSize) {
this.readBufferSize = readBufferSize;
return this;
}
<<<<<<<
result = 31 * result + (authProvider != null ? authProvider.hashCode() : 0);
=======
result = 31 * result + maxLogChunkSize;
result = 31 * result + preallocateSize;
result = 31 * result + maxRecordSize;
result = 31 * result + readBufferSize;
>>>>>>>
result = 31 * result + (authProvider != null ? authProvider.hashCode() : 0);
result = 31 * result + (logDir != null ? logDir.hashCode() : 0);
result = 31 * result + maxLogChunkSize;
result = 31 * result + preallocateSize;
result = 31 * result + maxRecordSize;
result = 31 * result + readBufferSize; |
<<<<<<<
CompletableFuture[] all = new CompletableFuture[procs + (channels != null ? channels.length : 0) + 1 +
(binders != null ? binders.length : 0) + SYSTEM_BINDERS.length];
for (int i = 0; i < procs; i++) {
NetServer netServer = vertx.createNetServer(serverOptions.getNetServerOptions());
netServer.connectHandler(this::connectHandler);
CompletableFuture<Void> cf = new CompletableFuture<>();
netServer.listen(serverOptions.getNetServerOptions().getPort(),
serverOptions.getNetServerOptions().getHost(), ar -> {
if (ar.succeeded()) {
cf.complete(null);
} else {
cf.completeExceptionally(ar.cause());
}
});
netServers.add(netServer);
all[i] = cf;
}
=======
CompletableFuture[] all = new CompletableFuture[1 + (channels != null ? channels.length : 0) + 1 +
(binders != null ? binders.length : 0)];
int i = 0;
>>>>>>>
CompletableFuture[] all = new CompletableFuture[1 + (channels != null ? channels.length : 0) + 1 +
(binders != null ? binders.length : 0) + SYSTEM_BINDERS.length];
int i = 0;
<<<<<<<
all[procs++] = docManager.start();
// Start the system binders
for (String systemBinder: SYSTEM_BINDERS) {
all[procs++] = docManager.createBinder(systemBinder);
}
=======
all[i++] = docManager.start();
>>>>>>>
all[i++] = docManager.start();
// Start the system binders
for (String binder: SYSTEM_BINDERS) {
all[i++] = docManager.createBinder(binder);
}
<<<<<<<
private void connectHandler(NetSocket socket) {
ConnectionImpl conn = new ConnectionImpl(this, socket, Vertx.currentContext());
connections.add(conn);
}
=======
>>>>>>>
<<<<<<<
protected DocManager docManager() {
return docManager;
}
=======
private CompletableFuture<Void> startTransports() {
// For now just net transport
Transport transport = new NetTransport(vertx, serverOptions);
transports.add(transport);
transport.connectHandler(this::connectHandler);
return transport.start();
}
private void connectHandler(TransportConnection transportConnection) {
connections.add(new ConnectionImpl(this, transportConnection, Vertx.currentContext(), docManager));
}
private CompletableFuture<Void> stopTransports() {
CompletableFuture[] all = new CompletableFuture[transports.size()];
int i = 0;
for (Transport transport: transports) {
all[i++] = transport.stop();
}
transports.clear();
return CompletableFuture.allOf(all);
}
>>>>>>>
protected DocManager docManager() {
return docManager;
}
private CompletableFuture<Void> startTransports() {
// For now just net transport
Transport transport = new NetTransport(vertx, serverOptions);
transports.add(transport);
transport.connectHandler(this::connectHandler);
return transport.start();
}
private void connectHandler(TransportConnection transportConnection) {
connections.add(new ConnectionImpl(this, transportConnection, Vertx.currentContext(), docManager));
}
private CompletableFuture<Void> stopTransports() {
CompletableFuture[] all = new CompletableFuture[transports.size()];
int i = 0;
for (Transport transport: transports) {
all[i++] = transport.stop();
}
transports.clear();
return CompletableFuture.allOf(all);
} |
<<<<<<<
import cc.hyperium.internal.addons.AddonBootstrap;
import cc.hyperium.internal.addons.AddonManifest;
=======
import cc.hyperium.handlers.handlers.chat.GeneralChatHandler;
>>>>>>>
import cc.hyperium.handlers.handlers.chat.GeneralChatHandler;
import cc.hyperium.internal.addons.AddonBootstrap;
import cc.hyperium.internal.addons.AddonManifest;
<<<<<<<
import cc.hyperium.utils.JsonHolder;
=======
import cc.hyperium.network.LoginReplyHandler;
>>>>>>>
import cc.hyperium.network.LoginReplyHandler;
import cc.hyperium.utils.JsonHolder; |
<<<<<<<
import cc.hyperium.GuiStyle;
import cc.hyperium.Hyperium;
import static cc.hyperium.config.Category.ANIMATIONS;
import static cc.hyperium.config.Category.CHROMAHUD;
import static cc.hyperium.config.Category.COSMETICS;
import static cc.hyperium.config.Category.GENERAL;
import static cc.hyperium.config.Category.HYPIXEL;
import static cc.hyperium.config.Category.IMPROVEMENTS;
import static cc.hyperium.config.Category.INTEGRATIONS;
import static cc.hyperium.config.Category.MISC;
import static cc.hyperium.config.Category.REACH;
import static cc.hyperium.config.Category.SPOTIFY;
import static cc.hyperium.config.Category.UTILITIES;
import static cc.hyperium.config.Category.VANILLA_ENHANCEMENTS;
=======
import cc.hyperium.GuiStyle;
import cc.hyperium.Hyperium;
>>>>>>>
import cc.hyperium.GuiStyle;
import cc.hyperium.Hyperium;
<<<<<<<
@ConfigOpt
@ToggleSetting(name = "Multi-byte input (Input fix)", category = VANILLA_ENHANCEMENTS, mods = true)
public static boolean INPUT_FIX = false;
=======
@ConfigOpt
@ToggleSetting(name = "Multi-byte input (Input fix)", category = VANILLA_ENCHANTMENTS, mods = true)
public static boolean INPUT_FIX = false;
>>>>>>>
@ConfigOpt
@ToggleSetting(name = "Multi-byte input (Input fix)", category = VANILLA_ENHANCEMENTS, mods = true)
public static boolean INPUT_FIX = false;
<<<<<<<
@ToggleSetting(name = "Send guild welcome message", category = INTEGRATIONS)
public static boolean SEND_GUILD_WELCOME_MESSAGE = true;
@ConfigOpt
public static boolean AUTO_DAB_ENABLED = false;
@ConfigOpt
public static int AUTO_DAB_LENGTH = 5;
@ConfigOpt
public static boolean AUTO_DAB_THIRD_PERSON = true;
@ConfigOpt
public static boolean AUTO_NICO = false;
@ConfigOpt
@ToggleSetting(name = "Item Physics", category = GENERAL)
public static boolean ITEM_PHYSIC_ENABLED = false;
@ConfigOpt
// @ToggleSetting(name = "Gui Font", category = GENERAL)
public static String GUI_FONT = "Roboto Condensed";
=======
@ToggleSetting(name = "Send guild welcome message", category = INTEGRATIONS)
public static boolean SEND_GUILD_WELCOME_MESSAGE = true;
@ConfigOpt
public static boolean AUTO_DAB_ENABLED = false;
@ConfigOpt
public static int AUTO_DAB_LENGTH = 5;
@ConfigOpt
public static boolean AUTO_DAB_THIRD_PERSON = true;
@ConfigOpt
public static boolean AUTO_NICO = false;
@ConfigOpt
@ToggleSetting(name = "Show Browser", category = IMPROVEMENTS)
public static boolean SHOW_BROWSER = false;
@ConfigOpt
@ToggleSetting(name = "Item Physics", mods = true, category = ITEM_PHYSIC)
public static boolean ITEM_PHYSIC_ENABLED = false;
@ConfigOpt
public static long TOTAL_PLAYTIME = 0;
@ConfigOpt
@SelectorSetting(name = "Main Menu Server", category = GENERAL, items = {
"HYPIXEL",
"HIVE",
"MINEPLEX",
"CUBECRAFT",
"MINESAGA",
"SKYCADE"
})
public static String MAIN_MENU_SERVER = "HYPIXEL";
>>>>>>>
@ToggleSetting(name = "Send guild welcome message", category = INTEGRATIONS)
public static boolean SEND_GUILD_WELCOME_MESSAGE = true;
@ConfigOpt
public static boolean AUTO_DAB_ENABLED = false;
@ConfigOpt
public static int AUTO_DAB_LENGTH = 5;
@ConfigOpt
public static boolean AUTO_DAB_THIRD_PERSON = true;
@ConfigOpt
public static boolean AUTO_NICO = false;
@ConfigOpt
@ToggleSetting(name = "Item Physics", category = GENERAL)
public static boolean ITEM_PHYSIC_ENABLED = false;
@ConfigOpt
// @ToggleSetting(name = "Gui Font", category = GENERAL)
public static String GUI_FONT = "Roboto Condensed";
@ConfigOpt
@ToggleSetting(name = "Show Browser", category = IMPROVEMENTS)
public static boolean SHOW_BROWSER = false; |
<<<<<<<
private final KeystrokesMod keystrokesMod;
private final TimeChanger timeChanger;
private final SkinChangerMod skinChanger;
private final ToggleChatMod toggleChat;
private final UtilitiesMod utilities;
private final Levelhead levelhead;
private final ChromaHUD chromaHUD;
private final Autotip autotip;
private final AutoGG autogg;
private final HGames hgames;
private final GlintColorizer glintcolorizer;
private final BlockOverlay blockOverlay;
private final SpotifyControls spotifyControls;
private final MotionBlurMod motionBlur;
private final OldAnimations oldanimations;
private final AutofriendMod autofriend;
private final PlayTime playTime;
private final FortniteCompassMod fncompass;
private final TabToggleMod tabToggle;
private final OMGItsASk1er omgItsASk1er;
private final ItemPhysicMod itemPhysicMod;
=======
private final KeystrokesMod keystrokesMod;
private final TimeChanger timeChanger;
private final SkinChangerMod skinChanger;
private final ToggleChatMod toggleChat;
private final UtilitiesMod utilities;
private final Levelhead levelhead;
private final ChromaHUD chromaHUD;
private final Autotip autotip;
private final AutoGG autogg;
private final HGames hgames;
private final GlintColorizer glintcolorizer;
private final BlockOverlay blockOverlay;
private final SpotifyControls spotifyControls;
private final MotionBlurMod motionBlur;
private final OldAnimations oldanimations;
private final AutofriendMod autofriend;
private final PlayTime playTime;
private final FortniteCompassMod fncompass;
private final TabToggleMod tabToggle;
>>>>>>>
private final KeystrokesMod keystrokesMod;
private final TimeChanger timeChanger;
private final SkinChangerMod skinChanger;
private final ToggleChatMod toggleChat;
private final UtilitiesMod utilities;
private final Levelhead levelhead;
private final ChromaHUD chromaHUD;
private final Autotip autotip;
private final AutoGG autogg;
private final HGames hgames;
private final GlintColorizer glintcolorizer;
private final BlockOverlay blockOverlay;
private final SpotifyControls spotifyControls;
private final MotionBlurMod motionBlur;
private final OldAnimations oldanimations;
private final AutofriendMod autofriend;
private final PlayTime playTime;
private final FortniteCompassMod fncompass;
private final TabToggleMod tabToggle;
private final ItemPhysicMod itemPhysicMod;
<<<<<<<
public ItemPhysicMod getItemPhysicMod() {
return itemPhysicMod;
}
public OMGItsASk1er getOMGItsASk1er() {
return omgItsASk1er;
}
=======
>>>>>>>
public ItemPhysicMod getItemPhysicMod() {
return itemPhysicMod;
} |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
if (Settings.STATIC_FOV) {
ci.setReturnValue(1.0F);
=======
if (GeneralSetting.staticFovEnabled) {
if (Minecraft.getMinecraft().thePlayer.isSprinting() && GeneralSetting.staticFovSprintModifier)
ci.setReturnValue((float)(1.0 * ((Minecraft.getMinecraft().thePlayer.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() / (double)Minecraft.getMinecraft().thePlayer.capabilities.getWalkSpeed() + 1.0D) / 2.0D)));
else
ci.setReturnValue(1.0F);
>>>>>>>
if (Settings.STATIC_FOV) {
if (Minecraft.getMinecraft().thePlayer.isSprinting() && GeneralSetting.staticFovSprintModifier)
ci.setReturnValue((float)(1.0 * ((Minecraft.getMinecraft().thePlayer.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() / (double)Minecraft.getMinecraft().thePlayer.capabilities.getWalkSpeed() + 1.0D) / 2.0D)));
else
ci.setReturnValue(1.0F); |
<<<<<<<
registerChatHandler(new FriendRequestChatHandler());
registerChatHandler(new PartyInviteChatHandler());
=======
registerChatHandler(new WinTrackingChatHandler());
>>>>>>>
registerChatHandler(new WinTrackingChatHandler());
registerChatHandler(new FriendRequestChatHandler());
registerChatHandler(new PartyInviteChatHandler()); |
<<<<<<<
private final KeystrokesMod keystrokesMod;
private final TimeChanger timeChanger;
private final SkinChangerMod skinChanger;
private final ToggleChatMod toggleChat;
private final UtilitiesMod utilities;
private final Levelhead levelhead;
private final KillScreenshot killScreenshot;
private final ChromaHUD chromaHUD;
private final Autotip autotip;
private final AutoGG autogg;
private final AutoTPA autoTPA;
private final HGames hgames;
private final GlintColorizer glintcolorizer;
private final BlockOverlay blockOverlay;
private final SpotifyControls spotifyControls;
private final MotionBlurMod motionBlur;
private final OldAnimations oldanimations;
private final AutofriendMod autofriend;
private final PlayTime playTime;
private final FortniteCompassMod fncompass;
private final TabToggleMod tabToggle;
private final OMGItsASk1er omgItsASk1er;
private final ItemPhysicMod itemPhysicMod;
=======
private final KeystrokesMod keystrokesMod;
private final TimeChanger timeChanger;
private final SkinChangerMod skinChanger;
private final ToggleChatMod toggleChat;
private final UtilitiesMod utilities;
private final Levelhead levelhead;
private final ChromaHUD chromaHUD;
private final Autotip autotip;
private final AutoGG autogg;
private final HGames hgames;
private final GlintColorizer glintcolorizer;
private final BlockOverlay blockOverlay;
private final SpotifyControls spotifyControls;
private final MotionBlurMod motionBlur;
private final OldAnimations oldanimations;
private final AutofriendMod autofriend;
private final PlayTime playTime;
private final FortniteCompassMod fncompass;
private final TabToggleMod tabToggle;
private final OMGItsASk1er omgItsASk1er;
>>>>>>>
private final KeystrokesMod keystrokesMod;
private final TimeChanger timeChanger;
private final SkinChangerMod skinChanger;
private final ToggleChatMod toggleChat;
private final UtilitiesMod utilities;
private final Levelhead levelhead;
private final ChromaHUD chromaHUD;
private final Autotip autotip;
private final AutoGG autogg;
private final HGames hgames;
private final GlintColorizer glintcolorizer;
private final BlockOverlay blockOverlay;
private final SpotifyControls spotifyControls;
private final MotionBlurMod motionBlur;
private final OldAnimations oldanimations;
private final AutofriendMod autofriend;
private final PlayTime playTime;
private final FortniteCompassMod fncompass;
private final TabToggleMod tabToggle;
private final OMGItsASk1er omgItsASk1er;
private final ItemPhysicMod itemPhysicMod;
<<<<<<<
this.omgItsASk1er = (OMGItsASk1er) new OMGItsASk1er().init();
this.itemPhysicMod = (ItemPhysicMod) new ItemPhysicMod().init();
}
=======
public TimeChanger getTimeChanger() {
return timeChanger;
}
>>>>>>>
public TimeChanger getTimeChanger() {
return timeChanger;
} |
<<<<<<<
import co.cask.coopr.client.ProvisionerClient;
import co.cask.coopr.client.TenantClient;
=======
import co.cask.coopr.codec.json.guice.CodecModules;
>>>>>>>
import co.cask.coopr.client.ProvisionerClient;
import co.cask.coopr.client.TenantClient;
import co.cask.coopr.codec.json.guice.CodecModules; |
<<<<<<<
import cc.hyperium.handlers.handlers.ApiDataHandler;
import cc.hyperium.handlers.handlers.BroadcastEvents;
import cc.hyperium.handlers.handlers.CommandQueue;
import cc.hyperium.handlers.handlers.FlipHandler;
import cc.hyperium.handlers.handlers.FontRendererData;
import cc.hyperium.handlers.handlers.GameDataTracking;
import cc.hyperium.handlers.handlers.GuiDisplayHandler;
import cc.hyperium.handlers.handlers.HyperiumNetwork;
import cc.hyperium.handlers.handlers.HypixelDetector;
import cc.hyperium.handlers.handlers.LocationHandler;
import cc.hyperium.handlers.handlers.OtherConfigOptions;
import cc.hyperium.handlers.handlers.RenderPlayerAsBlock;
import cc.hyperium.handlers.handlers.SettingsHandler;
import cc.hyperium.handlers.handlers.StatusHandler;
import cc.hyperium.handlers.handlers.TimeTrackHandler;
import cc.hyperium.handlers.handlers.ValueHandler;
=======
import cc.hyperium.handlers.handlers.*;
>>>>>>>
import cc.hyperium.handlers.handlers.ApiDataHandler;
import cc.hyperium.handlers.handlers.BroadcastEvents;
import cc.hyperium.handlers.handlers.CommandQueue;
import cc.hyperium.handlers.handlers.FlipHandler;
import cc.hyperium.handlers.handlers.FontRendererData;
import cc.hyperium.handlers.handlers.GameDataTracking;
import cc.hyperium.handlers.handlers.GuiDisplayHandler;
import cc.hyperium.handlers.handlers.HyperiumNetwork;
import cc.hyperium.handlers.handlers.HypixelDetector;
import cc.hyperium.handlers.handlers.LocationHandler;
import cc.hyperium.handlers.handlers.OtherConfigOptions;
import cc.hyperium.handlers.handlers.RenderPlayerAsBlock;
import cc.hyperium.handlers.handlers.SettingsHandler;
import cc.hyperium.handlers.handlers.StatusHandler;
import cc.hyperium.handlers.handlers.TimeTrackHandler;
import cc.hyperium.handlers.handlers.ValueHandler;
import cc.hyperium.handlers.handlers.*;
<<<<<<<
private FortniteHypeDance fortniteHypeDance;
private SettingsHandler settingsHandler;
private BroadcastEvents broadcastEvents;
=======
private StatsHandler statsHandler;
private BroadcastEvents broadcastEvents;
private HypixelValueTracking hypixelValueTracking;
>>>>>>>
private StatsHandler statsHandler;
private BroadcastEvents broadcastEvents;
private HypixelValueTracking hypixelValueTracking;
private FortniteHypeDance fortniteHypeDance;
private SettingsHandler settingsHandler;
private BroadcastEvents broadcastEvents;
<<<<<<<
public SettingsHandler getSettingsHandler() {
return settingsHandler;
}
public FortniteHypeDance getFortniteHypeDance() {
return fortniteHypeDance;
=======
public HypixelValueTracking getHypixelValueTracking() {
return hypixelValueTracking;
}
public HypixelGuiAugmenter getHypixelGuiAugmenter() {
return hypixelGuiAugmenter;
}
public StatsHandler getStatsHandler() {
return statsHandler;
>>>>>>>
public HypixelValueTracking getHypixelValueTracking() {
return hypixelValueTracking;
}
public HypixelGuiAugmenter getHypixelGuiAugmenter() {
return hypixelGuiAugmenter;
}
public StatsHandler getStatsHandler() {
return statsHandler;
public SettingsHandler getSettingsHandler() {
return settingsHandler;
}
public FortniteHypeDance getFortniteHypeDance() {
return fortniteHypeDance; |
<<<<<<<
import cc.hyperium.mods.browser.HyperiumProgressListener;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
=======
import cc.hyperium.mods.browser.HyperiumProgressListener;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
>>>>>>>
import cc.hyperium.mods.browser.HyperiumProgressListener;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
<<<<<<<
if (!fileListing.exists()) {
fileListing.mkdirs();
}
=======
if (!fileListing.exists())
fileListing.mkdirs();
>>>>>>>
if (!fileListing.exists()) {
fileListing.mkdirs();
}
<<<<<<<
libs.add(
System.getProperty("sun.arch.data.model").equals("64") ? "d3dcompiler_47.dll"
: "d3dcompiler_43.dll");
// libs.add("libGLESv2.dll");
// libs.add("libEGL.dll");
libs.add("jawt");
libs.add("libcef");
libs.add("chrome_elf");
// libs.add("jcef.dll");
=======
libs.add(
System.getProperty("sun.arch.data.model").equals("64") ? "d3dcompiler_47.dll"
: "d3dcompiler_43.dll");
libs.add("libGLESv2.dll");
libs.add("libEGL.dll");
libs.add("libcef.dll");
libs.add("jcef.dll");
>>>>>>>
libs.add("jawt");
libs.add("libcef");
libs.add("chrome_elf"); |
<<<<<<<
import cc.hyperium.utils.ChatUtil;
=======
import com.mojang.authlib.GameProfile;
>>>>>>>
import com.mojang.authlib.GameProfile;
import cc.hyperium.utils.ChatUtil; |
<<<<<<<
import cc.hyperium.handlers.handlers.particle.ParticleAuraHandler;
=======
import cc.hyperium.handlers.handlers.mixin.LayerDeadmau5HeadHandler;
>>>>>>>
import cc.hyperium.handlers.handlers.particle.ParticleAuraHandler;
import cc.hyperium.handlers.handlers.mixin.LayerDeadmau5HeadHandler; |
<<<<<<<
import io.dwak.holohackernews.app.preferences.LocalDataManager;
=======
import io.dwak.holohackernews.app.preferences.UserPreferenceManager;
>>>>>>>
import io.dwak.holohackernews.app.preferences.LocalDataManager;
import io.dwak.holohackernews.app.preferences.UserPreferenceManager; |
<<<<<<<
@Test
public void testGetMethodNoParamCall() throws Exception
{
long expected = System.currentTimeMillis();
Method method = System.class.getMethod("currentTimeMillis");
Object invoke = method.invoke(null);
Long toExpect = (Long)invoke;
assertTrue(toExpect >= expected);
}
=======
@Test
public void testSupportStaticFieldAnnotationType() throws Exception
{
final Class<?> c= SameSystem.class;
final Field[] fields= c.getDeclaredFields();
for (final Field f : fields)
{
if (f.getName() == "mSameStaticMember")
{
return;
}
}
fail();
}
@Test
public void testSupportSetField() throws Exception
{
final Class<?> c= SameSystem.class;
final SameSystem sameSystem = new SameSystem();
{
final Field field= c.getDeclaredField("mSameStaticMember");
assertNotNull(field);
assertTrue(Modifier.isStatic(field.getModifiers()));
final SameStaticMember sameStaticMember = new SameStaticMember();
sameStaticMember.mVal = 123;
field.set(sameSystem, sameStaticMember);
}
{
final Field field= c.getDeclaredField("mSameMember");
assertNotNull(field);
assertFalse(Modifier.isStatic(field.getModifiers()));
final SameMember sameMember = new SameMember();
sameMember.mVal = 234;
field.set(sameSystem, sameMember);
}
assertNotNull(sameSystem.mSameStaticMember);
assertNotNull(sameSystem.mSameMember);
assertEquals(sameSystem.mSameStaticMember.mVal, 123);
assertEquals(sameSystem.mSameMember.mVal, 234);
{
final SameSystem sameSystemTemp = new SameSystem();
sameSystemTemp.mSameStaticMember = new SameStaticMember();
sameSystemTemp.mSameStaticMember.mVal = 543;
assertEquals(sameSystem.mSameStaticMember.mVal, 543);
}
}
>>>>>>>
@Test
public void testGetMethodNoParamCall() throws Exception
{
long expected = System.currentTimeMillis();
Method method = System.class.getMethod("currentTimeMillis");
Object invoke = method.invoke(null);
Long toExpect = (Long)invoke;
assertTrue(toExpect >= expected);
}
@Test
public void testSupportStaticFieldAnnotationType() throws Exception
{
final Class<?> c= SameSystem.class;
final Field[] fields= c.getDeclaredFields();
for (final Field f : fields)
{
if (f.getName() == "mSameStaticMember")
{
return;
}
}
fail();
}
@Test
public void testSupportSetField() throws Exception
{
final Class<?> c= SameSystem.class;
final SameSystem sameSystem = new SameSystem();
{
final Field field= c.getDeclaredField("mSameStaticMember");
assertNotNull(field);
assertTrue(Modifier.isStatic(field.getModifiers()));
final SameStaticMember sameStaticMember = new SameStaticMember();
sameStaticMember.mVal = 123;
field.set(sameSystem, sameStaticMember);
}
{
final Field field= c.getDeclaredField("mSameMember");
assertNotNull(field);
assertFalse(Modifier.isStatic(field.getModifiers()));
final SameMember sameMember = new SameMember();
sameMember.mVal = 234;
field.set(sameSystem, sameMember);
}
assertNotNull(sameSystem.mSameStaticMember);
assertNotNull(sameSystem.mSameMember);
assertEquals(sameSystem.mSameStaticMember.mVal, 123);
assertEquals(sameSystem.mSameMember.mVal, 234);
{
final SameSystem sameSystemTemp = new SameSystem();
sameSystemTemp.mSameStaticMember = new SameStaticMember();
sameSystemTemp.mSameStaticMember.mVal = 543;
assertEquals(sameSystem.mSameStaticMember.mVal, 543);
}
} |
<<<<<<<
Terms terms = leafReader.terms(fieldName);
assertThat(terms.size(), is(7L));
=======
Terms terms = fields.terms(fieldName);
assertThat(terms.size(), is(4L));
>>>>>>>
Terms terms = leafReader.terms(fieldName);
assertThat(terms.size(), is(4L)); |
<<<<<<<
if (!UpdateHelper.shouldUpdate(oldEntity, newEntity, entity))
continue;
=======
if (!UpdateHelper.shouldUpdate(oldEntity, newEntity, entity)) continue;
>>>>>>>
if (!UpdateHelper.shouldUpdate(oldEntity, newEntity, entity))
continue;
<<<<<<<
// Pause time should be > now in oozie. So, add offset to pause time to
// account for time difference between ivory host and oozie host
// set to the next minute. Since time is rounded off, it will be always
// less than oozie server time
// ensure that we are setting it to the next minute.
Date endTime = new Date(System.currentTimeMillis() + 60000);
=======
//Pause time should be > now in oozie. So, add offset to pause time to account for time difference between ivory host and oozie host
//set to the next minute. Since time is rounded off, it will be always less than oozie server time
//ensure that we are setting it to the next minute.
Date endTime = new Date(System.currentTimeMillis() + 70000);
>>>>>>>
// Pause time should be > now in oozie. So, add offset to pause time to
// account for time difference between ivory host and oozie host
// set to the next minute. Since time is rounded off, it will be always
// less than oozie server time
// ensure that we are setting it to the next minute.
Date endTime = new Date(System.currentTimeMillis() + 70000); |
<<<<<<<
import org.apache.ivory.entity.v0.SchemaHelper;
=======
import org.apache.ivory.logging.LogProvider;
import org.apache.ivory.resource.InstancesResult.Instance;
>>>>>>>
import org.apache.ivory.entity.v0.SchemaHelper;
import org.apache.ivory.logging.LogProvider;
import org.apache.ivory.resource.InstancesResult.Instance;
<<<<<<<
=======
public InstancesResult getLogs(String type, String entity, String startStr,
String endStr, String colo, String runId){
try {
// TODO getStatus does all validations and filters clusters
InstancesResult result = getStatus(type, entity, startStr, endStr,
colo);
LogProvider logProvider = new LogProvider();
Entity entityObject = EntityUtil.getEntity(type, entity);
for (Instance instance : result.getInstances()) {
logProvider.populateLogUrls(entityObject, instance, runId);
}
return result;
} catch (Exception e) {
LOG.error("Failed to get logs for instances", e);
throw IvoryWebException.newInstanceException(e,
Response.Status.BAD_REQUEST);
}
}
>>>>>>>
public InstancesResult getLogs(String type, String entity, String startStr,
String endStr, String colo, String runId){
try {
// TODO getStatus does all validations and filters clusters
InstancesResult result = getStatus(type, entity, startStr, endStr,
colo);
LogProvider logProvider = new LogProvider();
Entity entityObject = EntityUtil.getEntity(type, entity);
for (Instance instance : result.getInstances()) {
logProvider.populateLogUrls(entityObject, instance, runId);
}
return result;
} catch (Exception e) {
LOG.error("Failed to get logs for instances", e);
throw IvoryWebException.newInstanceException(e,
Response.Status.BAD_REQUEST);
}
} |
<<<<<<<
private static String topicName;
private static Connection connection;
private AbstractProcessInstanceManager processInstanceManager = new ProcessInstanceManagerProxy();
=======
private String topicName;
private Connection connection;
private ProcessInstanceManager processInstanceManager = new ProcessInstanceManager();
>>>>>>>
private String topicName;
private Connection connection;
private AbstractProcessInstanceManager processInstanceManager = new ProcessInstanceManagerProxy(); |
<<<<<<<
if(!input.isOptional()) {
if (coord.getDatasets() == null)
coord.setDatasets(new DATASETS());
if (coord.getInputEvents() == null)
coord.setInputEvents(new INPUTEVENTS());
SYNCDATASET syncdataset = createDataSet(input.getFeed(), cluster, input.getName());
coord.getDatasets().getDatasetOrAsyncDataset().add(syncdataset);
DATAIN datain = createDataIn(input);
coord.getInputEvents().getDataIn().add(datain);
}
String inputExpr = getELExpression("dataIn('" + input.getName() + "', '" + input.getPartition() + "')");
=======
SYNCDATASET syncdataset = createDataSet(input.getFeed(), cluster, input.getName(), LocationType.DATA);
if (coord.getDatasets() == null)
coord.setDatasets(new DATASETS());
coord.getDatasets().getDatasetOrAsyncDataset().add(syncdataset);
DATAIN datain = new DATAIN();
datain.setName(input.getName());
datain.setDataset(input.getName());
datain.setStartInstance(getELExpression(input.getStart()));
datain.setEndInstance(getELExpression(input.getEnd()));
if (coord.getInputEvents() == null)
coord.setInputEvents(new INPUTEVENTS());
coord.getInputEvents().getDataIn().add(datain);
String inputExpr;
if(input.getPartition() != null)
inputExpr = getELExpression("dataIn('" + input.getName() + "', '" + input.getPartition() + "')");
else
inputExpr = getELExpression("coord:dataIn('" + input.getName() + "')");
>>>>>>>
if(!input.isOptional()) {
if (coord.getDatasets() == null)
coord.setDatasets(new DATASETS());
if (coord.getInputEvents() == null)
coord.setInputEvents(new INPUTEVENTS());
SYNCDATASET syncdataset = createDataSet(input.getFeed(), cluster, input.getName(), LocationType.DATA);
coord.getDatasets().getDatasetOrAsyncDataset().add(syncdataset);
DATAIN datain = createDataIn(input);
coord.getInputEvents().getDataIn().add(datain);
}
String inputExpr = getELExpression("dataIn('" + input.getName() + "', '" + input.getPartition() + "')");
<<<<<<<
SYNCDATASET syncdataset = createDataSet(output.getFeed(), cluster, output.getName());
=======
SYNCDATASET syncdataset = createDataSet(output.getFeed(), cluster, output.getName(),LocationType.DATA);
if (coord.getDatasets() == null)
coord.setDatasets(new DATASETS());
>>>>>>>
SYNCDATASET syncdataset = createDataSet(output.getFeed(), cluster, output.getName(),LocationType.DATA);
<<<<<<<
=======
// stats and meta paths
createOutputEvent(output.getFeed(),output.getName(), cluster, "stats",
LocationType.STATS, coord, props, output.getInstance());
createOutputEvent(output.getFeed(),output.getName(), cluster, "meta",
LocationType.META, coord, props,output.getInstance());
createOutputEvent(output.getFeed(),output.getName(), cluster, "tmp",
LocationType.TMP, coord, props,output.getInstance());
>>>>>>>
// stats and meta paths
createOutputEvent(output.getFeed(),output.getName(), cluster, "stats",
LocationType.STATS, coord, props, output.getInstance());
createOutputEvent(output.getFeed(),output.getName(), cluster, "meta",
LocationType.META, coord, props,output.getInstance());
createOutputEvent(output.getFeed(),output.getName(), cluster, "tmp",
LocationType.TMP, coord, props,output.getInstance());
<<<<<<<
private DATAOUT createDataOut(Output output) {
DATAOUT dataout = new DATAOUT();
dataout.setName(output.getName());
dataout.setDataset(output.getName());
dataout.setInstance(getELExpression(output.getInstance()));
return dataout;
}
private DATAIN createDataIn(Input input) {
DATAIN datain = new DATAIN();
datain.setName(input.getName());
datain.setDataset(input.getName());
datain.setStartInstance(getELExpression(input.getStart()));
datain.setEndInstance(getELExpression(input.getEnd()));
return datain;
}
=======
private void createOutputEvent(String feed, String name, Cluster cluster,
String type, LocationType locType, COORDINATORAPP coord,
Map<String, String> props, String instance)
throws IvoryException {
SYNCDATASET dataset = createDataSet(feed, cluster,name+type,
locType);
coord.getDatasets().getDatasetOrAsyncDataset().add(dataset);
DATAOUT dataout = new DATAOUT();
if (coord.getOutputEvents() == null)
coord.setOutputEvents(new OUTPUTEVENTS());
dataout.setName(name+type);
dataout.setDataset(name+type);
dataout.setInstance(getELExpression(instance));
coord.getOutputEvents().getDataOut().add(dataout);
String outputExpr = "${coord:dataOut('" + name+type+ "')}";
props.put(name+"."+type, outputExpr);
}
>>>>>>>
private DATAOUT createDataOut(Output output) {
DATAOUT dataout = new DATAOUT();
dataout.setName(output.getName());
dataout.setDataset(output.getName());
dataout.setInstance(getELExpression(output.getInstance()));
return dataout;
}
private DATAIN createDataIn(Input input) {
DATAIN datain = new DATAIN();
datain.setName(input.getName());
datain.setDataset(input.getName());
datain.setStartInstance(getELExpression(input.getStart()));
datain.setEndInstance(getELExpression(input.getEnd()));
return datain;
}
private void createOutputEvent(String feed, String name, Cluster cluster,
String type, LocationType locType, COORDINATORAPP coord,
Map<String, String> props, String instance)
throws IvoryException {
SYNCDATASET dataset = createDataSet(feed, cluster,name+type,
locType);
coord.getDatasets().getDatasetOrAsyncDataset().add(dataset);
DATAOUT dataout = new DATAOUT();
if (coord.getOutputEvents() == null)
coord.setOutputEvents(new OUTPUTEVENTS());
dataout.setName(name+type);
dataout.setDataset(name+type);
dataout.setInstance(getELExpression(instance));
coord.getOutputEvents().getDataOut().add(dataout);
String outputExpr = "${coord:dataOut('" + name+type+ "')}";
props.put(name+"."+type, outputExpr);
}
<<<<<<<
private SYNCDATASET createDataSet(String feedName, Cluster cluster, String datasetName) throws IvoryException {
Feed feed = EntityUtil.getEntity(EntityType.FEED, feedName);
=======
private SYNCDATASET createDataSet(String feedName, Cluster cluster, String datasetName, LocationType locationType) throws IvoryException {
Feed feed = (Feed) EntityUtil.getEntity(EntityType.FEED, feedName);
>>>>>>>
private SYNCDATASET createDataSet(String feedName, Cluster cluster, String datasetName, LocationType locationType) throws IvoryException {
Feed feed = (Feed) EntityUtil.getEntity(EntityType.FEED, feedName); |
<<<<<<<
import org.openl.rules.workspace.dtr.DesignTimeRepository;
=======
import org.openl.rules.webstudio.web.repository.deployment.DeploymentManifestBuilder;
>>>>>>>
import org.openl.rules.webstudio.web.repository.deployment.DeploymentManifestBuilder;
import org.openl.rules.workspace.dtr.DesignTimeRepository;
<<<<<<<
DesignTimeRepository designRepo,
String rulesPath,
String deploymentPath) {
=======
Repository designRepo,
String rulesPath,
String deploymentPath,
String username) {
>>>>>>>
DesignTimeRepository designRepo,
String rulesPath,
String deploymentPath,
String username) {
<<<<<<<
projectIterator = getProjectIterator(repository, projectName, version);
=======
DeploymentManifestBuilder manifestBuilder = new DeploymentManifestBuilder()
.setBuiltBy(username)
.setBuildNumber(pd.getProjectVersion().getRevision())
.setImplementationTitle(projectName);
projectIterator = getProjectIterator(projectName, version, manifestBuilder);
>>>>>>>
DeploymentManifestBuilder manifestBuilder = new DeploymentManifestBuilder()
.setBuiltBy(username)
.setBuildNumber(pd.getProjectVersion().getRevision())
.setImplementationTitle(projectName);
projectIterator = getProjectIterator(repository, projectName, version, manifestBuilder);
<<<<<<<
private Iterator<FileItem> getProjectIterator(Repository baseRepo, String projectName, String version) {
=======
private Iterator<FileItem> getProjectIterator(String projectName, String version, DeploymentManifestBuilder manifestBuilder) {
>>>>>>>
private Iterator<FileItem> getProjectIterator(Repository baseRepo, String projectName, String version, DeploymentManifestBuilder manifestBuilder) {
<<<<<<<
if (baseRepo.supports().folders()) {
=======
if (designRepo.supports().folders()) {
if (designRepo.supports().branches()) {
manifestBuilder.setBranchName(((BranchRepository) designRepo).getBranch());
}
>>>>>>>
if (baseRepo.supports().folders()) {
if (baseRepo.supports().branches()) {
manifestBuilder.setBranchName(((BranchRepository) designRepo).getBranch());
}
<<<<<<<
return new FolderIterator(repository, files);
=======
//find and remove old manifest file from deployment
String srcManFileName = srcProjectPath + JarFile.MANIFEST_NAME;
Iterator<FileData> it = files.iterator();
while (it.hasNext()) {
FileData f = it.next();
if (srcManFileName.equals(f.getName())) {
it.remove();
break;
}
}
return new FolderIterator(files, projectName, manifestBuilder.build());
>>>>>>>
//find and remove old manifest file from deployment
String srcManFileName = srcProjectPath + JarFile.MANIFEST_NAME;
Iterator<FileData> it = files.iterator();
while (it.hasNext()) {
FileData f = it.next();
if (srcManFileName.equals(f.getName())) {
it.remove();
break;
}
}
return new FolderIterator(repository, files, projectName, manifestBuilder.build());
<<<<<<<
private FolderIterator(Repository baseRepo, List<FileData> files) {
this.baseRepo = baseRepo;
=======
private FolderIterator(List<FileData> files, String projectName, Manifest manifest) throws IOException {
>>>>>>>
private FolderIterator(Repository baseRepo, List<FileData> files, String projectName, Manifest manifest) throws IOException {
this.baseRepo = baseRepo; |
<<<<<<<
String message = String.format("Unknown table type '%s'", type);
log.debug(message);
=======
String message = String.format("Unknown table type '%s'", tableSyntaxNodeType);
LOG.debug(message);
>>>>>>>
String message = String.format("Unknown table type '%s'", tableSyntaxNodeType);
log.debug(message); |
<<<<<<<
public class CachingArgumentsCloner extends OpenLCloner {
private static ThreadLocal<CachingArgumentsCloner> instance = new ThreadLocal<>();
=======
public class CachingArgumentsCloner extends OpenLArgumentsCloner {
private static final ThreadLocal<CachingArgumentsCloner> instance = new ThreadLocal<>();
>>>>>>>
public class CachingArgumentsCloner extends OpenLCloner {
private static final ThreadLocal<CachingArgumentsCloner> instance = new ThreadLocal<>(); |
<<<<<<<
=======
import org.openl.rules.webstudio.web.repository.deployment.DeploymentOutputStream;
import org.openl.rules.webstudio.web.servlet.RulesUserSession;
import org.openl.rules.webstudio.web.util.Constants;
import org.openl.rules.webstudio.web.util.WebStudioUtils;
import org.openl.rules.workspace.uw.UserWorkspace;
>>>>>>>
import org.openl.rules.webstudio.web.repository.deployment.DeploymentOutputStream; |
<<<<<<<
import org.openl.rules.calc.SpreadsheetBoundNode;
import org.openl.rules.calc.SpreadsheetResultOpenClass;
=======
>>>>>>>
import org.openl.rules.calc.SpreadsheetResultOpenClass;
<<<<<<<
private String csrBeansPackage;
private SpreadsheetResultOpenClass spreadsheetResultOpenClass;
=======
>>>>>>>
private SpreadsheetResultOpenClass spreadsheetResultOpenClass;
<<<<<<<
this.csrBeansPackage = getCsrBeansPackage(bindingContext);
=======
>>>>>>> |
<<<<<<<
public WebStudio() {
this(FacesUtils.getSession());
}
=======
if (!initialized) {
workspacePath = systemConfigManager.getStringProperty("workspace.local.home");
projectResolver = RulesProjectResolver.loadProjectResolverFromClassPath();
projectResolver.setWorkspace(workspacePath);
updateSystemProperties = systemConfigManager.getBooleanProperty(SystemSettingsBean.UPDATE_SYSTEM_PROPERTIES);
}
>>>>>>>
public WebStudio() {
this(FacesUtils.getSession());
}
<<<<<<<
=======
public boolean init(HttpSession session) {
UserWorkspace userWorkspace = WebStudioUtils.getUserWorkspace(session);
if (userWorkspace == null) {
return false;
}
workspacePath = userWorkspace.getLocalWorkspace().getLocation().getAbsolutePath();
projectResolver = RulesProjectResolver.loadProjectResolverFromClassPath();
projectResolver.setWorkspace(workspacePath);
updateSystemProperties = systemConfigManager.getBooleanProperty(SystemSettingsBean.UPDATE_SYSTEM_PROPERTIES);
return true;
}
>>>>>>> |
<<<<<<<
if (NameChecker.checkName(folderName)) {
AProjectFolder folder = (AProjectFolder) projectArtefact;
try {
AProjectFolder addedFolder = folder.addFolder(folderName);
repositoryTreeState.addNodeToTree(repositoryTreeState.getSelectedNode(), addedFolder);
resetStudioModel();
} catch (ProjectException e) {
log.error("Failed to create folder '" + folderName + "'.", e);
errorMessage = e.getMessage();
}
} else {
errorMessage = "Folder name '" + folderName + "' is invalid. " + NameChecker.BAD_NAME_MSG;
=======
if(folderName != null && !folderName.isEmpty()){
if (NameChecker.checkName(folderName)){
if(!NameChecker.checkIsFolderPresent((AProjectFolder) projectArtefact, folderName)){
AProjectFolder folder = (AProjectFolder) projectArtefact;
try {
AProjectFolder addedFolder = folder.addFolder(folderName);
repositoryTreeState.addNodeToTree(repositoryTreeState.getSelectedNode(), addedFolder);
resetStudioModel();
} catch (ProjectException e) {
LOG.error("Failed to create folder '" + folderName + "'.", e);
errorMessage = e.getMessage();
}
} else {
errorMessage = "Folder name '" + folderName + "' is invalid. " + NameChecker.FOLDER_EXISTS;
}
} else {
errorMessage = "Folder name '" + folderName + "' is invalid. " + NameChecker.BAD_NAME_MSG;
}
} else {
errorMessage = "Folder name '" + folderName + "' is invalid. " + NameChecker.FOLDER_NAME_EMPTY;
>>>>>>>
if(folderName != null && !folderName.isEmpty()){
if (NameChecker.checkName(folderName)){
if(!NameChecker.checkIsFolderPresent((AProjectFolder) projectArtefact, folderName)){
AProjectFolder folder = (AProjectFolder) projectArtefact;
try {
AProjectFolder addedFolder = folder.addFolder(folderName);
repositoryTreeState.addNodeToTree(repositoryTreeState.getSelectedNode(), addedFolder);
resetStudioModel();
} catch (ProjectException e) {
log.error("Failed to create folder '" + folderName + "'.", e);
errorMessage = e.getMessage();
}
} else {
errorMessage = "Folder name '" + folderName + "' is invalid. " + NameChecker.FOLDER_EXISTS;
}
} else {
errorMessage = "Folder name '" + folderName + "' is invalid. " + NameChecker.BAD_NAME_MSG;
}
} else {
errorMessage = "Folder name '" + folderName + "' is invalid. " + NameChecker.FOLDER_NAME_EMPTY; |
<<<<<<<
import co.cask.coopr.shell.command.GetProviderTypeCommand;
=======
import co.cask.coopr.shell.command.GetProvisionerCommand;
>>>>>>>
import co.cask.coopr.shell.command.GetProviderTypeCommand;
import co.cask.coopr.shell.command.GetProvisionerCommand;
<<<<<<<
import co.cask.coopr.shell.command.ListAllAutomatorTypesCommand;
import co.cask.coopr.shell.command.ListAllProviderTypesCommand;
import co.cask.coopr.shell.command.ListAutomatorTypeResourcesCommand;
=======
import co.cask.coopr.shell.command.GetTenantCommand;
>>>>>>>
import co.cask.coopr.shell.command.GetTenantCommand;
import co.cask.coopr.shell.command.ListAllAutomatorTypesCommand;
import co.cask.coopr.shell.command.ListAllProviderTypesCommand;
import co.cask.coopr.shell.command.ListAutomatorTypeResourcesCommand;
<<<<<<<
import co.cask.coopr.shell.command.RecallAutomatorTypeResourcesCommand;
import co.cask.coopr.shell.command.RecallProviderTypeResourcesCommand;
=======
import co.cask.coopr.shell.command.ListTenantsCommand;
>>>>>>>
import co.cask.coopr.shell.command.ListTenantsCommand;
import co.cask.coopr.shell.command.RecallAutomatorTypeResourcesCommand;
import co.cask.coopr.shell.command.RecallProviderTypeResourcesCommand;
<<<<<<<
getClusterCommandSet(injector),
getPluginCommandSet(injector)
=======
getClusterCommandSet(injector),
getTenantCommandSet(injector),
getProvisionerCommandSet(injector)
>>>>>>>
getClusterCommandSet(injector),
getPluginCommandSet(injector),
getTenantCommandSet(injector),
getProvisionerCommandSet(injector)
<<<<<<<
private static co.cask.common.cli.CommandSet<Command> getPluginCommandSet(Injector injector) {
List<Command> commands = ImmutableList.of(
injector.getInstance(DeleteAutomatorTypeResourcesCommand.class),
injector.getInstance(DeleteProviderTypeResourcesCommand.class),
injector.getInstance(GetAutomatorTypeCommand.class),
injector.getInstance(GetProviderTypeCommand.class),
injector.getInstance(ListAllAutomatorTypesCommand.class),
injector.getInstance(ListAllProviderTypesCommand.class),
injector.getInstance(ListAutomatorTypeResourcesCommand.class),
injector.getInstance(ListProviderTypeResourcesCommand.class),
injector.getInstance(RecallAutomatorTypeResourcesCommand.class),
injector.getInstance(RecallProviderTypeResourcesCommand.class),
injector.getInstance(StageAutomatorTypeResourcesCommand.class),
injector.getInstance(StageProviderTypeResourcesCommand.class),
injector.getInstance(SyncPluginCommand.class)
);
return new co.cask.common.cli.CommandSet<Command>(commands);
}
=======
private static co.cask.common.cli.CommandSet<Command> getTenantCommandSet(Injector injector) {
List<Command> commands = ImmutableList.of(
injector.getInstance(DeleteTenantCommand.class),
injector.getInstance(GetTenantCommand.class),
injector.getInstance(ListTenantsCommand.class)
);
return new co.cask.common.cli.CommandSet<Command>(commands);
}
private static co.cask.common.cli.CommandSet<Command> getProvisionerCommandSet(Injector injector) {
List<Command> commands = ImmutableList.of(
injector.getInstance(GetProvisionerCommand.class),
injector.getInstance(ListProvisionersCommand.class)
);
return new co.cask.common.cli.CommandSet<Command>(commands);
}
>>>>>>>
private static co.cask.common.cli.CommandSet<Command> getPluginCommandSet(Injector injector) {
List<Command> commands = ImmutableList.of(
injector.getInstance(DeleteAutomatorTypeResourcesCommand.class),
injector.getInstance(DeleteProviderTypeResourcesCommand.class),
injector.getInstance(GetAutomatorTypeCommand.class),
injector.getInstance(GetProviderTypeCommand.class),
injector.getInstance(ListAllAutomatorTypesCommand.class),
injector.getInstance(ListAllProviderTypesCommand.class),
injector.getInstance(ListAutomatorTypeResourcesCommand.class),
injector.getInstance(ListProviderTypeResourcesCommand.class),
injector.getInstance(RecallAutomatorTypeResourcesCommand.class),
injector.getInstance(RecallProviderTypeResourcesCommand.class),
injector.getInstance(StageAutomatorTypeResourcesCommand.class),
injector.getInstance(StageProviderTypeResourcesCommand.class),
injector.getInstance(SyncPluginCommand.class)
);
return new co.cask.common.cli.CommandSet<Command>(commands);
}
private static co.cask.common.cli.CommandSet<Command> getTenantCommandSet(Injector injector) {
List<Command> commands = ImmutableList.of(
injector.getInstance(DeleteTenantCommand.class),
injector.getInstance(GetTenantCommand.class),
injector.getInstance(ListTenantsCommand.class)
);
return new co.cask.common.cli.CommandSet<Command>(commands);
}
private static co.cask.common.cli.CommandSet<Command> getProvisionerCommandSet(Injector injector) {
List<Command> commands = ImmutableList.of(
injector.getInstance(GetProvisionerCommand.class),
injector.getInstance(ListProvisionersCommand.class)
);
return new co.cask.common.cli.CommandSet<Command>(commands);
} |
<<<<<<<
@Override
public void copyDDProject(ADeploymentProject project, String name) throws ProjectException {
=======
public void copyDDProject(ADeploymentProject project, String name, String comment) throws ProjectException {
>>>>>>>
@Override
public void copyDDProject(ADeploymentProject project, String name, String comment) throws ProjectException {
<<<<<<<
.user(getUser())
.lockEngine(deploymentsLockEngine)
.build();
newProject.getFileData().setComment(Comments.copiedFrom(project.getName()));
=======
.user(getUser())
.lockEngine(deploymentsLockEngine)
.build();
newProject.getFileData().setComment(comment);
>>>>>>>
.user(getUser())
.lockEngine(deploymentsLockEngine)
.build();
newProject.getFileData().setComment(comment);
<<<<<<<
@Override
public void uploadLocalProject(String name) throws ProjectException {
=======
public void uploadLocalProject(String name, String projectFolder, String comment) throws ProjectException {
>>>>>>>
@Override
public void uploadLocalProject(String name, String projectFolder, String comment) throws ProjectException { |
<<<<<<<
.setImplementationTitle(projectName);
projectIterator = getProjectIterator(repository, projectName, version, manifestBuilder);
=======
.setImplementationTitle(projectName)
.setImplementationVersion(resolveProjectVersion(projectName, version));
projectIterator = getProjectIterator(projectName, version, manifestBuilder);
>>>>>>>
.setImplementationTitle(projectName)
.setImplementationVersion(resolveProjectVersion(projectName, version));
projectIterator = getProjectIterator(repository, projectName, version, manifestBuilder); |
<<<<<<<
return selectedProject.isCheckedOut() /*&& selectedProject.isModified()*/ && isGranted(PRIVILEGE_EDIT_PROJECTS);
=======
return selectedProject.isOpenedForEditing() /*&& selectedProject.isModified()*/ && isGranted(PRIVILEGE_EDIT);
>>>>>>>
return selectedProject.isOpenedForEditing() /*&& selectedProject.isModified()*/ && isGranted(PRIVILEGE_EDIT_PROJECTS);
<<<<<<<
return (project.isCheckedOut() && isGranted(PRIVILEGE_EDIT_PROJECTS));
=======
return (project.isOpenedForEditing() && isGranted(PRIVILEGE_EDIT));
>>>>>>>
return (project.isOpenedForEditing() && isGranted(PRIVILEGE_EDIT_PROJECTS));
<<<<<<<
return !getSelectedProject().isCheckedOut() && isGranted(PRIVILEGE_DEPLOY_PROJECTS);
=======
return !getSelectedProject().isOpenedForEditing() && isGranted(PRIVILEGE_DEPLOY);
>>>>>>>
return !getSelectedProject().isOpenedForEditing() && isGranted(PRIVILEGE_DEPLOY_PROJECTS); |
<<<<<<<
mutationArray.add(getMutationDataMap(mutation, geneticProfile, countMap,cnaDataMap, cosmic));
=======
mutationArray.add(getMutationDataMap(
mutation, geneticProfile, cancerStudy, countMap, cosmic, clinicalDataMap));
>>>>>>>
mutationArray.add(getMutationDataMap(
mutation, geneticProfile, cancerStudy, countMap, cnaDataMap, cosmic, clinicalDataMap));
<<<<<<<
Map<String,Map<String,String>> cnaDataMap,
Map<Long, Set<CosmicMutationFrequency>> cosmic) throws DaoException
=======
Map<Long, Set<CosmicMutationFrequency>> cosmic,
Map<String, ClinicalData> clinicalDataMap) throws DaoException
>>>>>>>
Map<String,Map<String,String>> cnaDataMap,
Map<Long, Set<CosmicMutationFrequency>> cosmic,
Map<String, ClinicalData> clinicalDataMap) throws DaoException |
<<<<<<<
* Construct an ImportExtendedMutationData with a germline whitelist.
* Filter mutations according to the 2 argument MutationFilter().
*/
public ImportExtendedMutationData( File mutationFile,
int geneticProfileId,
ProgressMonitor pMonitor,
boolean acceptRemainingMutationsBool,
String germlineWhiteListFile ) {
this( mutationFile, geneticProfileId, pMonitor,
acceptRemainingMutationsBool, germlineWhiteListFile, (String[]) null );
}
/**
=======
>>>>>>>
<<<<<<<
=======
* <p>
*
* @param mutationFile
* @param geneticProfileId
* @param pMonitor
* @param germline_white_list_file Optional germline whitelist containing Gene symbols; null if not provided.
>>>>>>>
<<<<<<<
boolean acceptRemainingMutationsBool,
String germlineWhiteListFile,
String... listOfSomaticWhitelists ) {
=======
String germline_white_list_file) throws IllegalArgumentException {
>>>>>>>
String germline_white_list_file) throws IllegalArgumentException {
<<<<<<<
myMutationFilter = new MutationFilter(
acceptRemainingMutationsBool,
germlineWhiteListFile,
listOfSomaticWhitelists );
=======
myMutationFilter = new MutationFilter(germline_white_list_file);
>>>>>>>
myMutationFilter = new MutationFilter(germline_white_list_file); |
<<<<<<<
@RequestAttribute(required = false, value = "interceptedGenePanelSampleMolecularIdentifiers") List<SampleMolecularIdentifier> interceptedGenePanelSampleMolecularIdentifiers,
=======
@Valid @RequestAttribute(required = false, value = "interceptedGenePanelMultipleStudyFilter") GenePanelMultipleStudyFilter interceptedGenePanelMultipleStudyFilter,
>>>>>>>
@Valid @RequestAttribute(required = false, value = "interceptedGenePanelSampleMolecularIdentifiers") List<SampleMolecularIdentifier> interceptedGenePanelSampleMolecularIdentifiers, |
<<<<<<<
public static int CELL_HEIGHT = 21; // if this changes, ALTERATION_HEIGHT in raphaeljs-oncoprint.js should change
private static String PERCENT_ALTERED_COLUMN_HEADING = "Total\\naltered"; // if new line is removed, raphaeljs-oncoprint.js - drawOncoPrintHeaderForSummaryTab & drawOncoPrintHeaderForCrossCancerSummary should change
private static String COPY_NUMBER_ALTERATION_FOOTNOTE = "Copy number alterations are putative.";
private static String CASE_SET_DESCRIPTION_LABEL = "Case Set: "; // if this changes, CASE_SET_DESCRIPTION_LABEL in raphaeljs-oncoprint.js should change
=======
public static int CELL_HEIGHT = 18; // if this changes, ALTERATION_HEIGHT in raphaeljs-oncoprint.js should change
private static String PERCENT_ALTERED_COLUMN_HEADING = "Total\\naltered"; // if new line is removed, raphaeljs-oncoprint.js - drawOncoPrintHeaderForSummaryTab & drawOncoPrintHeaderForCrossCancerSummary should change
private static String COPY_NUMBER_ALTERATION_FOOTNOTE = "Copy number alterations are putative.";
private static String CASE_SET_DESCRIPTION_LABEL = "Case Set: "; // if this changes, CASE_SET_DESCRIPTION_LABEL in raphaeljs-oncoprint.js should change
private static String CUSTOMIZE_ONCOPRINT_TOOLTIP = "Adjust the features and dimensions of the OncoPrint.";
private static String REMOVE_PADDING_TOOLTIP = "When this is set, whitespace between genomic alterations is removed.";
private static String SCALING_ONCOPRINT_INDICATOR = "Scaling OncoPrint...";
private static String ADD_PADDING_ONCOPRINT_INDICATOR = "Adding Whitespace...";
private static String REMOVE_PADDING_ONCOPRINT_INDICATOR = "Removing Whitespace...";
private static String REMOVE_UNALTERED_CASES_INDICATOR = "Removing Unaltered Cases...";
private static String ADD_UNALTERED_CASES_INDICATOR = "Adding Unaltered Cases...";
private static String UNSORT_SAMPLES_INDICATOR = "Unsorting Samples...";
private static String SORT_SAMPLES_INDICATOR = "Sorting Samples...";
>>>>>>>
public static int CELL_HEIGHT = 21; // if this changes, ALTERATION_HEIGHT in raphaeljs-oncoprint.js should change
private static String PERCENT_ALTERED_COLUMN_HEADING = "Total\\naltered"; // if new line is removed, raphaeljs-oncoprint.js - drawOncoPrintHeaderForSummaryTab & drawOncoPrintHeaderForCrossCancerSummary should change
private static String COPY_NUMBER_ALTERATION_FOOTNOTE = "Copy number alterations are putative.";
private static String CASE_SET_DESCRIPTION_LABEL = "Case Set: "; // if this changes, CASE_SET_DESCRIPTION_LABEL in raphaeljs-oncoprint.js should change
private static String CUSTOMIZE_ONCOPRINT_TOOLTIP = "Adjust the features and dimensions of the OncoPrint.";
private static String REMOVE_PADDING_TOOLTIP = "When this is set, whitespace between genomic alterations is removed.";
private static String SCALING_ONCOPRINT_INDICATOR = "Scaling OncoPrint...";
private static String ADD_PADDING_ONCOPRINT_INDICATOR = "Adding Whitespace...";
private static String REMOVE_PADDING_ONCOPRINT_INDICATOR = "Removing Whitespace...";
private static String REMOVE_UNALTERED_CASES_INDICATOR = "Removing Unaltered Cases...";
private static String ADD_UNALTERED_CASES_INDICATOR = "Adding Unaltered Cases...";
private static String UNSORT_SAMPLES_INDICATOR = "Unsorting Samples...";
private static String SORT_SAMPLES_INDICATOR = "Sorting Samples...";
<<<<<<<
public static String makeOncoPrint(String cancerTypeID,
String geneList,
ProfileData mergedProfile,
ArrayList<ExtendedMutation> mutationList,
ArrayList<CaseList> caseSets,
String caseSetId,
double zScoreThreshold,
double rppaScoreThreshold,
=======
public static String makeOncoPrint(String cancerTypeID,
String geneList,
ProfileData mergedProfile,
ArrayList<ExtendedMutation> mutationList,
ArrayList<CaseList> caseSets,
String caseSetId,
double zScoreThreshold,
>>>>>>>
public static String makeOncoPrint(String cancerTypeID,
String geneList,
ProfileData mergedProfile,
ArrayList<ExtendedMutation> mutationList,
ArrayList<CaseList> caseSets,
String caseSetId,
double zScoreThreshold,
double rppaScoreThreshold,
<<<<<<<
GeneticEvent sortedMatrix[][] = ConvertProfileDataToGeneticEvents.convert
(dataSummary, listOfGeneNames,
theOncoPrintSpecParserOutput.getTheOncoPrintSpecification(), zScoreThreshold, rppaScoreThreshold);
GeneticEvent unsortedMatrix[][] = ConvertProfileDataToGeneticEvents.convert
(dataSummary, listOfGeneNames,
theOncoPrintSpecParserOutput.getTheOncoPrintSpecification(), zScoreThreshold, rppaScoreThreshold);
=======
GeneticEvent sortedMatrix[][] = ConvertProfileDataToGeneticEvents.convert
(dataSummary, listOfGeneNames,
theOncoPrintSpecParserOutput.getTheOncoPrintSpecification(), zScoreThreshold);
GeneticEvent unsortedMatrix[][] = ConvertProfileDataToGeneticEvents.convert
(dataSummary, listOfGeneNames,
theOncoPrintSpecParserOutput.getTheOncoPrintSpecification(), zScoreThreshold);
>>>>>>>
GeneticEvent sortedMatrix[][] = ConvertProfileDataToGeneticEvents.convert
(dataSummary, listOfGeneNames,
theOncoPrintSpecParserOutput.getTheOncoPrintSpecification(), zScoreThreshold, rppaScoreThreshold);
GeneticEvent unsortedMatrix[][] = ConvertProfileDataToGeneticEvents.convert
(dataSummary, listOfGeneNames,
theOncoPrintSpecParserOutput.getTheOncoPrintSpecification(), zScoreThreshold, rppaScoreThreshold);
<<<<<<<
MRNAsortOrder.add(EnumSet.of(MRNA.NORMAL, MRNA.NOTSHOWN));
ArrayList<EnumSet<RPPA>> RPPAsortOrder = new ArrayList<EnumSet<RPPA>>();
RPPAsortOrder.add(EnumSet.of(RPPA.UPREGULATED));
RPPAsortOrder.add(EnumSet.of(RPPA.DOWNREGULATED));
// combined because these are represented by the same color in the OncoPrint
RPPAsortOrder.add(EnumSet.of(RPPA.NORMAL, RPPA.NOTSHOWN));
=======
MRNAsortOrder.add(EnumSet.of(MRNA.NORMAL, MRNA.NOTSHOWN));
>>>>>>>
MRNAsortOrder.add(EnumSet.of(MRNA.NORMAL, MRNA.NOTSHOWN));
ArrayList<EnumSet<RPPA>> RPPAsortOrder = new ArrayList<EnumSet<RPPA>>();
RPPAsortOrder.add(EnumSet.of(RPPA.UPREGULATED));
RPPAsortOrder.add(EnumSet.of(RPPA.DOWNREGULATED));
// combined because these are represented by the same color in the OncoPrint
RPPAsortOrder.add(EnumSet.of(RPPA.NORMAL, RPPA.NOTSHOWN));
<<<<<<<
sortedMatrix = (GeneticEvent[][]) sorter.sort(sortedMatrix);
writeOncoPrint(out, cancerTypeID, unsortedMatrix, sortedMatrix,
dataSummary, mutationMap, caseSets, caseSetId,
theOncoPrintSpecParserOutput.getTheOncoPrintSpecification(),
forSummaryTab);
// outta here
return out.toString();
}
=======
sortedMatrix = (GeneticEvent[][]) sorter.sort(sortedMatrix);
writeOncoPrint(out, cancerTypeID, unsortedMatrix, sortedMatrix,
dataSummary, mutationMap, caseSets, caseSetId,
theOncoPrintSpecParserOutput.getTheOncoPrintSpecification(),
forSummaryTab);
// outta here
return out.toString();
}
>>>>>>>
sortedMatrix = (GeneticEvent[][]) sorter.sort(sortedMatrix);
writeOncoPrint(out, cancerTypeID, unsortedMatrix, sortedMatrix,
dataSummary, mutationMap, caseSets, caseSetId,
theOncoPrintSpecParserOutput.getTheOncoPrintSpecification(),
forSummaryTab);
// outta here
return out.toString();
} |
<<<<<<<
String singleStudyId = (String) request.getAttribute(CANCER_STUDY_ID);
if (inputStudySampleMap.keySet().size() == 1 && inputStudySampleMap.containsKey(singleStudyId)) { // single study
=======
String decodedGeneList = URLDecoder.decode(geneList, "UTF-8");
// retrieve samples
Map<String, Set<String>> inputStudySampleMap = cohortDetails.getStudySampleMap();
if (inputStudySampleMap.keySet().size() == 1 && !cohortDetails.getIsVirtualStudy()) { // single study
>>>>>>>
String decodedGeneList = URLDecoder.decode(geneList, "UTF-8");
String singleStudyId = (String) request.getAttribute(CANCER_STUDY_ID);
if (inputStudySampleMap.keySet().size() == 1 && inputStudySampleMap.containsKey(singleStudyId)) { // single study |
<<<<<<<
Converter converter =
(Converter)ClassLoader.getInstance(datatypeMetadata.getConverterClassName(), args);
converter.createStagingFile(portalMetadata, cancerStudyMetadata, datatypeMetadata, dataMatrices.toArray(new DataMatrix[0]));
=======
Converter converter;
try {
converter = (Converter)ClassLoader.getInstance(datatypeMetadata.getConverterClassName(), args);
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
continue;
}
converter.createStagingFile(portalMetadata, cancerStudyMetadata, datatypeMetadata, dataMatrices);
>>>>>>>
Converter converter;
try {
converter = (Converter)ClassLoader.getInstance(datatypeMetadata.getConverterClassName(), args);
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
continue;
}
converter.createStagingFile(portalMetadata, cancerStudyMetadata, datatypeMetadata, dataMatrices.toArray(new DataMatrix[0])); |
<<<<<<<
/**
* Return svg xml as it is for downloading
*
* @param response
* @param xml
* @throws ServletException
* @throws IOException
*/
private void convertToSVG(HttpServletResponse response, String xml) throws ServletException, IOException {
=======
private void convertToSVG(HttpServletResponse response, String xml, String filename)
throws ServletException, IOException {
>>>>>>>
/**
* Return svg xml as it is for downloading
*
* @param response
* @param xml
* @throws ServletException
* @throws IOException
*/
private void convertToSVG(HttpServletResponse response, String xml, String filename)
throws ServletException, IOException { |
<<<<<<<
public static final String ONCOKB_URL = "oncokb.url";
public static final String PATIENT_VIEW_MDACC_HEATMAP_META_URL = "mdacc.heatmap.meta.url";
public static final String PATIENT_VIEW_MDACC_HEATMAP_URL = "mdacc.heatmap.patient.url";
public static final String STUDY_VIEW_MDACC_HEATMAP_URL = "mdacc.heatmap.study.url";
public static final String STUDY_VIEW_MDACC_HEATMAP_META_URL = "mdacc.heatmap.study.meta.url";
=======
public static final String ONCOKB_API_URL = "oncokb.api.url";
public static final String SHOW_ONCOKB = "show.oncokb";
>>>>>>>
public static final String PATIENT_VIEW_MDACC_HEATMAP_META_URL = "mdacc.heatmap.meta.url";
public static final String PATIENT_VIEW_MDACC_HEATMAP_URL = "mdacc.heatmap.patient.url";
public static final String STUDY_VIEW_MDACC_HEATMAP_URL = "mdacc.heatmap.study.url";
public static final String STUDY_VIEW_MDACC_HEATMAP_META_URL = "mdacc.heatmap.study.meta.url";
public static final String ONCOKB_API_URL = "oncokb.api.url";
public static final String SHOW_ONCOKB = "show.oncokb"; |
<<<<<<<
=======
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
>>>>>>>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
<<<<<<<
Set<Sample> samples = new HashSet<Sample>();
Set<String> sampleIds = new HashSet<String>();
if (sampleIdsStr!=null) {
for (String sampleId : sampleIdsStr.split(" +")) {
Sample _sample = DaoSample.getSampleByCancerStudyAndSampleId(cancerStudy.getInternalId(), sampleId);
if (_sample != null) {
samples.add(_sample);
sampleIds.add(_sample.getStableId());
=======
Set<Case> cases = new HashSet<Case>();
Set<String> sampleIdSet = new HashSet<String>();
if (caseIdsStr!=null) {
for (String caseId : caseIdsStr.split(" +")) {
Case _case = DaoCase.getCase(caseId, cancerStudy.getInternalId());
if (_case != null) {
cases.add(_case);
sampleIdSet.add(_case.getCaseId());
>>>>>>>
Set<Sample> samples = new HashSet<Sample>();
Set<String> sampleIdSet = new HashSet<String>();
if (sampleIdsStr!=null) {
for (String sampleId : sampleIdsStr.split(" +")) {
Sample _sample = DaoSample.getSampleByCancerStudyAndSampleId(cancerStudy.getInternalId(), sampleId);
if (_sample != null) {
samples.add(_sample);
sampleIdSet.add(_sample.getStableId());
<<<<<<<
Patient patient = DaoPatient.getPatientByCancerStudyAndPatientId(cancerStudy.getInternalId(), patientId);
if (patient != null) {
for (Sample sample : DaoSample.getSamplesByPatientId(patient.getInternalId())) {
if (sample != null) {
samples.add(sample);
sampleIds.add(sample.getStableId());
}
=======
List<String> samples = DaoClinicalData.getCaseIdsByAttribute(
cancerStudy.getInternalId(), PATIENT_ID_ATTR_NAME, patientId);
for (String sample : samples) {
Case _case = DaoCase.getCase(sample, cancerStudy.getInternalId());
if (_case != null) {
cases.add(_case);
sampleIdSet.add(_case.getCaseId());
>>>>>>>
Patient patient = DaoPatient.getPatientByCancerStudyAndPatientId(cancerStudy.getInternalId(), patientId);
if (patient != null) {
for (Sample sample : DaoSample.getSamplesByPatientId(patient.getInternalId())) {
if (sample != null) {
samples.add(sample);
sampleIdSet.add(sample.getStableId());
}
<<<<<<<
request.setAttribute(SAMPLE_ID, sampleIds);
=======
List<String> sampleIds = new ArrayList<String>(sampleIdSet);
sortSampleIds(cancerStudy.getInternalId(), patientIdsStr, sampleIds);
request.setAttribute(CASE_ID, sampleIds);
>>>>>>>
int patientId = samples.iterator().next().getInternalPatientId();
List<String> sampleIds = new ArrayList<String>(sampleIdSet);
sortSampleIds(cancerStudy.getInternalId(), patientId, sampleIds);
request.setAttribute(SAMPLE_ID, sampleIds);
<<<<<<<
String firstSampleId = sampleIds.iterator().next();
Sample firstSample = DaoSample.getSampleByCancerStudyAndSampleId(cancerStudy.getInternalId(), firstSampleId);
=======
String firstSampleId = sampleIds.get(0);
>>>>>>>
String firstSampleId = sampleIds.get(0);
Sample firstSample = DaoSample.getSampleByCancerStudyAndSampleId(cancerStudy.getInternalId(), firstSampleId);
<<<<<<<
Set<String> samples = (Set<String>)request.getAttribute(SAMPLE_ID);
=======
List<String> cases = (List<String>)request.getAttribute(CASE_ID);
>>>>>>>
List<String> samples = (List<String>)request.getAttribute(SAMPLE_ID);
<<<<<<<
String sampleId = samples.iterator().next();
=======
String caseId = cases.get(0);
request.setAttribute("num_tumors", 1);
>>>>>>>
String sampleId = samples.get(0);
request.setAttribute("num_tumors", 1); |
<<<<<<<
=======
@Cacheable(cacheNames = "GeneralRepositoryCache", condition = "@cacheEnabledConfig.getEnabled()")
>>>>>>>
@Cacheable(cacheNames = "GeneralRepositoryCache", condition = "@cacheEnabledConfig.getEnabled()")
<<<<<<<
=======
@Cacheable(cacheNames = "GeneralRepositoryCache", condition = "@cacheEnabledConfig.getEnabled()")
>>>>>>>
@Cacheable(cacheNames = "GeneralRepositoryCache", condition = "@cacheEnabledConfig.getEnabled()")
<<<<<<<
List<GeneMolecularAlteration> getGeneMolecularAlterationsInMultipleMolecularProfiles(List<String> molecularProfileIds,
List<Integer> entrezGeneIds, String projection);
List<GenesetMolecularAlteration> getGenesetMolecularAlterations(String molecularProfileId,
List<String> genesetIds, String projection);
List<TreatmentMolecularAlteration> getTreatmentMolecularAlterations(String molecularProfileId,
List<String> treatmentIds, String projection);
=======
@Cacheable(cacheNames = "GeneralRepositoryCache", condition = "@cacheEnabledConfig.getEnabled()")
List<GeneMolecularAlteration> getGeneMolecularAlterationsInMultipleMolecularProfiles(List<String> molecularProfileIds,
List<Integer> entrezGeneIds,
String projection);
@Cacheable(cacheNames = "GeneralRepositoryCache", condition = "@cacheEnabledConfig.getEnabled()")
List<GenesetMolecularAlteration> getGenesetMolecularAlterations(String molecularProfileId, List<String> genesetIds,
String projection);
>>>>>>>
@Cacheable(cacheNames = "GeneralRepositoryCache", condition = "@cacheEnabledConfig.getEnabled()")
List<GeneMolecularAlteration> getGeneMolecularAlterationsInMultipleMolecularProfiles(List<String> molecularProfileIds,
List<Integer> entrezGeneIds,
String projection);
@Cacheable(cacheNames = "GeneralRepositoryCache", condition = "@cacheEnabledConfig.getEnabled()")
List<GenesetMolecularAlteration> getGenesetMolecularAlterations(String molecularProfileId, List<String> genesetIds,
String projection);
@Cacheable(cacheNames = "GeneralRepositoryCache", condition = "@cacheEnabledConfig.getEnabled()")
List<TreatmentMolecularAlteration> getTreatmentMolecularAlterations(String molecularProfileId,
List<String> treatmentIds, String projection); |
<<<<<<<
request.setAttribute(HAS_SEGMENT_DATA, Boolean.FALSE); // by default; in case return false;
String caseIdsStr = request.getParameter(CASE_ID);
if (caseIdsStr == null || caseIdsStr.isEmpty()) {
request.setAttribute(ERROR, "Please specify at least one case ID. ");
return false;
}
String[] patientIds = caseIdsStr.split(" +");
String cancerStudyId = (String) request.getAttribute(QueryBuilder.CANCER_STUDY_ID);
=======
String caseId = (String) request.getAttribute(PATIENT_ID);
String cancerStudyId = (String) request.getAttribute(QueryBuilder.CANCER_STUDY_ID);
// by default; in case return false;
request.setAttribute(HAS_SEGMENT_DATA, Boolean.FALSE);
request.setAttribute(HAS_ALLELE_FREQUENCY_DATA, Boolean.FALSE);
Case _case = null;
CancerStudy cancerStudy = null;
>>>>>>>
// by default; in case return false;
request.setAttribute(HAS_SEGMENT_DATA, Boolean.FALSE);
request.setAttribute(HAS_ALLELE_FREQUENCY_DATA, Boolean.FALSE);
String caseIdsStr = request.getParameter(CASE_ID);
if (caseIdsStr == null || caseIdsStr.isEmpty()) {
request.setAttribute(ERROR, "Please specify at least one case ID. ");
return false;
}
String[] patientIds = caseIdsStr.split(" +");
String cancerStudyId = (String) request.getAttribute(QueryBuilder.CANCER_STUDY_ID);
<<<<<<<
request.setAttribute(CASE_ID, StringUtils.join(sampleIds, " "));
=======
>>>>>>>
request.setAttribute(CASE_ID, StringUtils.join(sampleIds, " "));
<<<<<<<
request.setAttribute(PATIENT_CASE_OBJ, cases);
=======
request.setAttribute(PATIENT_CASE_OBJ, _case);
>>>>>>>
request.setAttribute(PATIENT_CASE_OBJ, cases);
<<<<<<<
.segmentDataExistForCancerStudy(cancerStudy.getInternalId()));
=======
.segmentDataExistForCase(cancerStudy.getInternalId(), caseId));
request.setAttribute(HAS_ALLELE_FREQUENCY_DATA,
hasAlleleFrequencyData(cancerStudy, caseId, cancerStudy.getMutationProfile(_case.getCaseId())));
>>>>>>>
.segmentDataExistForCancerStudy(cancerStudy.getInternalId()));
request.setAttribute(HAS_ALLELE_FREQUENCY_DATA, patientIds.length>1 ? Boolean.FALSE :
hasAlleleFrequencyData(cancerStudy, patientIds[0], cancerStudy.getMutationProfile(patientIds[0]))); |
<<<<<<<
ArrayList<ArrayList<String>> oncotreeMatrix;
ArrayList<ArrayList<String>> oncotreePropertyMatrix;
=======
ArrayList<ArrayList<String>> tumorTypesMatrix;
ArrayList<ArrayList<String>> tcgaTumorTypesMatrix;
>>>>>>>
ArrayList<ArrayList<String>> oncotreeMatrix;
ArrayList<ArrayList<String>> oncotreePropertyMatrix;
ArrayList<ArrayList<String>> tcgaTumorTypesMatrix; |
<<<<<<<
public static final Set<String> NON_CASE_IDS = new HashSet<String>(
Arrays.asList("miRNA", "LOCUS", "ID", "GENE SYMBOL", "ENTREZ_GENE_ID", "HUGO_SYMBOL", "LOCUS ID", "CYTOBAND", "COMPOSITE.ELEMENT.REF"));
=======
public static final String MUTATION_CASE_LIST_META_HADER = "sequenced_samples";
public static final Set<String> NON_CASE_IDS = new HashSet<String>(
Arrays.asList("ENTREZ_GENE_ID","HUGO_SYMBOL","LOCUS ID","CYTOBAND"));
>>>>>>>
public static final Set<String> NON_CASE_IDS = new HashSet<String>(
Arrays.asList("miRNA", "LOCUS", "ID", "GENE SYMBOL", "ENTREZ_GENE_ID", "HUGO_SYMBOL", "LOCUS ID", "CYTOBAND", "COMPOSITE.ELEMENT.REF"));
public static final String MUTATION_CASE_LIST_META_HADER = "sequenced_samples"; |
<<<<<<<
import org.mskcc.cbio.portal.html.special_gene.SpecialGeneFactory;
=======
import org.mskcc.cbio.portal.util.ExtendedMutationUtil;
>>>>>>>
import org.mskcc.cbio.portal.html.special_gene.SpecialGeneFactory;
import org.mskcc.cbio.portal.util.ExtendedMutationUtil;
<<<<<<<
import org.mskcc.cbio.portal.util.SkinUtil;
=======
import org.mskcc.cbio.cgds.model.ExtendedMutation;
import java.util.ArrayList;
import java.util.HashMap;
>>>>>>>
import org.mskcc.cbio.portal.util.SkinUtil; |
<<<<<<<
=======
import com.continuuity.loom.common.conf.Configuration;
import com.continuuity.loom.common.conf.Constants;
import com.continuuity.loom.common.conf.guice.ConfigurationModule;
import com.continuuity.loom.common.queue.guice.QueueModule;
import com.continuuity.loom.common.queue.internal.TimeoutTrackingQueue;
>>>>>>>
import com.continuuity.loom.common.conf.Configuration;
import com.continuuity.loom.common.conf.Constants;
import com.continuuity.loom.common.conf.guice.ConfigurationModule;
import com.continuuity.loom.common.queue.guice.QueueModule;
<<<<<<<
=======
import com.google.inject.Key;
import com.google.inject.name.Names;
>>>>>>> |
<<<<<<<
public static int CELL_HEIGHT = 21; // if this changes, ALTERATION_HEIGHT in raphaeljs-oncoprint.js should change
private static String PERCENT_ALTERED_COLUMN_HEADING = "Total\\naltered";
=======
public static int CELL_HEIGHT = 18; // if this changes, ALTERATION_HEIGHT in raphaeljs-oncoprint.js should change
private static String PERCENT_ALTERED_COLUMN_HEADING = "Total\\naltered"; // if new line is removed, raphaeljs-oncoprint.js - drawOncoPrintHeaderForSummaryTab & drawOncoPrintHeaderForCrossCancerSummary should change
>>>>>>>
public static int CELL_HEIGHT = 21; // if this changes, ALTERATION_HEIGHT in raphaeljs-oncoprint.js should change
private static String PERCENT_ALTERED_COLUMN_HEADING = "Total\\naltered"; // if new line is removed, raphaeljs-oncoprint.js - drawOncoPrintHeaderForSummaryTab & drawOncoPrintHeaderForCrossCancerSummary should change |
<<<<<<<
HttpResponse response = doPost("/clusters", gson.toJson(clusterCreateRequest), USER1_HEADERS);
assertResponseStatus(response, HttpResponseStatus.OK);
=======
HttpResponse response = doPost("/v1/loom/clusters", gson.toJson(clusterCreateRequest), USER1_HEADERS);
assertResponseStatus(response, expectedStatus);
if (expectedStatus == HttpResponseStatus.BAD_REQUEST) {
return;
}
>>>>>>>
HttpResponse response = doPost("/clusters", gson.toJson(clusterCreateRequest), USER1_HEADERS);
assertResponseStatus(response, expectedStatus);
if (expectedStatus == HttpResponseStatus.BAD_REQUEST) {
return;
} |
<<<<<<<
"stdout", "stderr", 0, null, null, null);
assertResponseStatus(doPost("/v1/loom/tasks/finish", gson.toJson(finishRequest)), HttpResponseStatus.FORBIDDEN);
=======
"stdout", "stderr", 0, null, null);
assertResponseStatus(doPost("/tasks/finish", gson.toJson(finishRequest)), HttpResponseStatus.FORBIDDEN);
>>>>>>>
"stdout", "stderr", 0, null, null, null);
assertResponseStatus(doPost("/tasks/finish", gson.toJson(finishRequest)), HttpResponseStatus.FORBIDDEN); |
<<<<<<<
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
=======
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.HashSet;
>>>>>>>
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
<<<<<<<
String patientSetId = httpServletRequest.getParameter("case_set_id");
String patientIdsKey = httpServletRequest.getParameter("case_ids_key");
=======
String caseSetId = httpServletRequest.getParameter("case_set_id");
String caseIdsKey = httpServletRequest.getParameter("case_ids_key");
//So far only accept single data type
String dataType = httpServletRequest.getParameter("data_type");
>>>>>>>
String patientSetId = httpServletRequest.getParameter("case_set_id");
String patientIdsKey = httpServletRequest.getParameter("case_ids_key");
//So far only accept single data type
String dataType = httpServletRequest.getParameter("data_type");
<<<<<<<
_result.put("case_id", clinicalData.getStableId());
if (clinicalData.getOverallSurvivalMonths() == null) {
_result.put("os_months", "NA");
} else {
_result.put("os_months", clinicalData.getOverallSurvivalMonths());
}
String osStatus = clinicalData.getOverallSurvivalStatus();
if(osStatus == null || osStatus.length() == 0) {
_result.put("os_status", "NA");
} else if (osStatus.equalsIgnoreCase("DECEASED")) {
_result.put("os_status", "1");
} else if(osStatus.equalsIgnoreCase("LIVING")) {
_result.put("os_status", "0");
}
if (clinicalData.getDiseaseFreeSurvivalMonths() == null) {
_result.put("dfs_months", "NA");
} else {
_result.put("dfs_months", clinicalData.getDiseaseFreeSurvivalMonths());
}
String dfsStatus = clinicalData.getDiseaseFreeSurvivalStatus();
if(dfsStatus == null || dfsStatus.length() == 0) {
_result.put("dfs_status", "NA");
}else if (dfsStatus.equalsIgnoreCase("Recurred/Progressed") || dfsStatus.equalsIgnoreCase("Recurred")) {
_result.put("dfs_status", "1");
} else if(dfsStatus.equalsIgnoreCase("DiseaseFree")) {
_result.put("dfs_status", "0");
=======
_result.put("case_id", clinicalData.getCaseId());
if (dataType.equalsIgnoreCase("os")) {
if (clinicalData.getOverallSurvivalMonths() == null) {
_result.put("months", "NA");
} else {
_result.put("months", clinicalData.getOverallSurvivalMonths());
}
String osStatus = clinicalData.getOverallSurvivalStatus();
if(osStatus == null || osStatus.length() == 0) {
_result.put("status", "NA");
} else if (osStatus.equalsIgnoreCase("DECEASED")) {
_result.put("status", "1");
} else if(osStatus.equalsIgnoreCase("LIVING")) {
_result.put("status", "0");
}
} else if (dataType.equalsIgnoreCase("dfs")) {
if (clinicalData.getDiseaseFreeSurvivalMonths() == null) {
_result.put("months", "NA");
} else {
_result.put("months", clinicalData.getDiseaseFreeSurvivalMonths());
}
String dfsStatus = clinicalData.getDiseaseFreeSurvivalStatus();
if(dfsStatus == null || dfsStatus.length() == 0) {
_result.put("status", "NA");
}else if (dfsStatus.equalsIgnoreCase("Recurred/Progressed") || dfsStatus.equalsIgnoreCase("Recurred")) {
_result.put("status", "1");
} else if(dfsStatus.equalsIgnoreCase("DiseaseFree")) {
_result.put("status", "0");
}
>>>>>>>
_result.put("case_id", clinicalData.getStableId());
if (dataType.equalsIgnoreCase("os")) {
if (clinicalData.getOverallSurvivalMonths() == null) {
_result.put("months", "NA");
} else {
_result.put("months", clinicalData.getOverallSurvivalMonths());
}
String osStatus = clinicalData.getOverallSurvivalStatus();
if(osStatus == null || osStatus.length() == 0) {
_result.put("status", "NA");
} else if (osStatus.equalsIgnoreCase("DECEASED")) {
_result.put("status", "1");
} else if(osStatus.equalsIgnoreCase("LIVING")) {
_result.put("status", "0");
}
} else if (dataType.equalsIgnoreCase("dfs")) {
if (clinicalData.getDiseaseFreeSurvivalMonths() == null) {
_result.put("months", "NA");
} else {
_result.put("months", clinicalData.getDiseaseFreeSurvivalMonths());
}
String dfsStatus = clinicalData.getDiseaseFreeSurvivalStatus();
if(dfsStatus == null || dfsStatus.length() == 0) {
_result.put("status", "NA");
}else if (dfsStatus.equalsIgnoreCase("Recurred/Progressed") || dfsStatus.equalsIgnoreCase("Recurred")) {
_result.put("status", "1");
} else if(dfsStatus.equalsIgnoreCase("DiseaseFree")) {
_result.put("status", "0");
} |
<<<<<<<
this.swissprotIsAccession = false;
=======
this.genePanel = genePanel;
>>>>>>>
this.swissprotIsAccession = false;
this.genePanel = genePanel; |
<<<<<<<
private Map<Long, Map<String,Object>> getMrnaContext(Sample sample, List<ExtendedMutation> mutations,
=======
private Map<Long, String> getCnaContext(String caseId, List<ExtendedMutation> mutations,
String cnaProfileId) throws DaoException {
Map<Long, String> mapGeneCna = new HashMap<Long, String>();
DaoGeneticAlteration daoGeneticAlteration = DaoGeneticAlteration.getInstance();
for (ExtendedMutation mutEvent : mutations) {
long gene = mutEvent.getEntrezGeneId();
if (mapGeneCna.containsKey(gene)) {
continue;
}
String cna = daoGeneticAlteration.getGeneticAlteration(
DaoGeneticProfile.getGeneticProfileByStableId(cnaProfileId).getGeneticProfileId(),
caseId, gene);
mapGeneCna.put(gene, cna);
}
return mapGeneCna;
}
private Map<Long, Map<String,Object>> getMrnaContext(String caseId, List<ExtendedMutation> mutations,
>>>>>>>
private Map<Long, String> getCnaContext(Sample sample, List<ExtendedMutation> mutations,
String cnaProfileId) throws DaoException {
Map<Long, String> mapGeneCna = new HashMap<Long, String>();
DaoGeneticAlteration daoGeneticAlteration = DaoGeneticAlteration.getInstance();
for (ExtendedMutation mutEvent : mutations) {
long gene = mutEvent.getEntrezGeneId();
if (mapGeneCna.containsKey(gene)) {
continue;
}
String cna = daoGeneticAlteration.getGeneticAlteration(
DaoGeneticProfile.getGeneticProfileByStableId(cnaProfileId).getGeneticProfileId(),
sample.getInternalId(), gene);
mapGeneCna.put(gene, cna);
}
return mapGeneCna;
}
private Map<Long, Map<String,Object>> getMrnaContext(Sample sample, List<ExtendedMutation> mutations,
<<<<<<<
DaoGeneOptimized daoGeneOptimized) throws ServletException {
Sample sample = DaoSample.getSampleById(mutation.getSampleId());
=======
String cna, DaoGeneOptimized daoGeneOptimized) throws ServletException {
>>>>>>>
String cna, DaoGeneOptimized daoGeneOptimized) throws ServletException {
Sample sample = DaoSample.getSampleById(mutation.getSampleId()); |
<<<<<<<
import javax.servlet.ServletConfig;
=======
import javax.servlet.ServletConfig;
>>>>>>>
import javax.servlet.ServletConfig;
<<<<<<<
@Autowired
private MutationRepository mutationRepository;
@Autowired
private MutationModelConverter mutationModelConverter;
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,
config.getServletContext());
}
=======
// class which process access control to cancer studies
private AccessControl accessControl;
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
accessControl = SpringUtil.getAccessControl();
}
>>>>>>>
@Autowired
private MutationRepository mutationRepository;
@Autowired
private MutationModelConverter mutationModelConverter;
// class which process access control to cancer studies
private AccessControl accessControl;
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
accessControl = SpringUtil.getAccessControl();
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,
config.getServletContext());
} |
<<<<<<<
assertEquals (new Double(79.04), patientData.getAgeAtDiagnosis());
assertEquals ("1:DECEASED", patientData.getOverallSurvivalStatus());
assertEquals ("1:Recurred/Progressed", patientData.getDiseaseFreeSurvivalStatus());
assertEquals (new Double(43.8), patientData.getOverallSurvivalMonths());
assertEquals (new Double(15.05), patientData.getDiseaseFreeSurvivalMonths());
assertEquals (new Integer(1), patientData.getSampleCount());
=======
assertEquals (Double.valueOf(79.04), patientData.getAgeAtDiagnosis());
assertEquals ("DECEASED", patientData.getOverallSurvivalStatus());
assertEquals ("Recurred/Progressed", patientData.getDiseaseFreeSurvivalStatus());
assertEquals (Double.valueOf(43.8), patientData.getOverallSurvivalMonths());
assertEquals (Double.valueOf(15.05), patientData.getDiseaseFreeSurvivalMonths());
assertEquals (Integer.valueOf(1), patientData.getSampleCount());
>>>>>>>
assertEquals (Double.valueOf(79.04), patientData.getAgeAtDiagnosis());
assertEquals ("1:DECEASED", patientData.getOverallSurvivalStatus());
assertEquals ("1:Recurred/Progressed", patientData.getDiseaseFreeSurvivalStatus());
assertEquals (Double.valueOf(43.8), patientData.getOverallSurvivalMonths());
assertEquals (Double.valueOf(15.05), patientData.getDiseaseFreeSurvivalMonths());
assertEquals (Integer.valueOf(1), patientData.getSampleCount());
<<<<<<<
assertEquals (new Double(55.53), patientData.getAgeAtDiagnosis());
assertEquals ("0:LIVING", patientData.getOverallSurvivalStatus());
assertEquals ("0:DiseaseFree", patientData.getDiseaseFreeSurvivalStatus());
assertEquals (new Double(49.02), patientData.getOverallSurvivalMonths());
assertEquals (new Double(49.02), patientData.getDiseaseFreeSurvivalMonths());
assertEquals (new Integer(1), patientData.getSampleCount());
=======
assertEquals (Double.valueOf(55.53), patientData.getAgeAtDiagnosis());
assertEquals ("LIVING", patientData.getOverallSurvivalStatus());
assertEquals ("DiseaseFree", patientData.getDiseaseFreeSurvivalStatus());
assertEquals (Double.valueOf(49.02), patientData.getOverallSurvivalMonths());
assertEquals (Double.valueOf(49.02), patientData.getDiseaseFreeSurvivalMonths());
assertEquals (Integer.valueOf(1), patientData.getSampleCount());
>>>>>>>
assertEquals (Double.valueOf(55.53), patientData.getAgeAtDiagnosis());
assertEquals ("0:LIVING", patientData.getOverallSurvivalStatus());
assertEquals ("0:DiseaseFree", patientData.getDiseaseFreeSurvivalStatus());
assertEquals (Double.valueOf(49.02), patientData.getOverallSurvivalMonths());
assertEquals (Double.valueOf(49.02), patientData.getDiseaseFreeSurvivalMonths());
assertEquals (Integer.valueOf(1), patientData.getSampleCount()); |
<<<<<<<
=======
public enum GeneticEntityType {
GENE, GENESET
}
>>>>>>>
<<<<<<<
private String geneticEntityName;
@NotNull
private EntityType geneticEntityType;
=======
private GeneticEntityType geneticEntityType;
>>>>>>>
private EntityType geneticEntityType;
<<<<<<<
public String getGeneticEntityName() {
return geneticEntityName;
}
public void setGeneticEntityName(String geneticEntityName) {
this.geneticEntityName = geneticEntityName;
}
public EntityType getGeneticEntityType() {
=======
public GeneticEntityType getGeneticEntityType() {
>>>>>>>
public void setGeneticEntityId(String geneticEntityId) {
this.geneticEntityId = geneticEntityId;
}
public EntityType getGeneticEntityType() { |
<<<<<<<
case "cancerHotSpots":
URL = "http://cancerhotspots.org/api/hotspots/single/";
break;
default:
URL = "";
break;
}
//If request method is GET, include query string
if (method.equals(HttpMethod.GET) && request.getQueryString() != null){
URL += "?" + request.getQueryString();
}
URI uri = new URI(URL);
ResponseEntity<String> responseEntity =
restTemplate.exchange(uri, method, new HttpEntity<String>(body), String.class);
return responseEntity.getBody();
=======
case "oncokbAccess":
URL = oncokbURL + "access";
break;
case "oncokbSummary":
URL = oncokbURL + "summary.json";
break;
default:
URL = "";
break;
}
//If request method is GET, include query string
if (method.equals(HttpMethod.GET) && request.getQueryString() != null){
URL += "?" + request.getQueryString();
}
return respProxy(URL, method, body, response);
>>>>>>>
case "cancerHotSpots":
URL = "http://cancerhotspots.org/api/hotspots/single/";
break;
case "oncokbAccess":
URL = oncokbURL + "access";
break;
case "oncokbSummary":
URL = oncokbURL + "summary.json";
break;
default:
URL = "";
break;
}
//If request method is GET, include query string
if (method.equals(HttpMethod.GET) && request.getQueryString() != null){
URL += "?" + request.getQueryString();
}
return respProxy(URL, method, body, response);
<<<<<<<
private JSONObject requestParamsToJSON(HttpServletRequest req) {
JSONObject jsonObj = new JSONObject();
Map<String, String[]> params = req.getParameterMap();
for (Map.Entry<String, String[]> entry : params.entrySet()) {
String v[] = entry.getValue();
Object o = (v.length == 1) ? v[0] : v;
jsonObj.put(entry.getKey(), o);
=======
private String respProxy(String url, HttpMethod method, Object body, HttpServletResponse response) throws IOException {
try {
RestTemplate restTemplate = new RestTemplate();
URI uri = new URI(url);
ResponseEntity<String> responseEntity =
restTemplate.exchange(uri, method, new HttpEntity<>(body), String.class);
return responseEntity.getBody();
}catch (Exception exception) {
String errorMessage = "Unexpected error: " + exception.getLocalizedMessage();
response.sendError(503, errorMessage);
return errorMessage;
}
>>>>>>>
private String respProxy(String url, HttpMethod method, Object body, HttpServletResponse response) throws IOException {
try {
RestTemplate restTemplate = new RestTemplate();
URI uri = new URI(url);
ResponseEntity<String> responseEntity =
restTemplate.exchange(uri, method, new HttpEntity<>(body), String.class);
return responseEntity.getBody();
}catch (Exception exception) {
String errorMessage = "Unexpected error: " + exception.getLocalizedMessage();
response.sendError(503, errorMessage);
return errorMessage;
}
<<<<<<<
HttpServletRequest request, HttpServletResponse response) throws URISyntaxException
{
RestTemplate restTemplate = new RestTemplate();
URI uri = new URI(bitlyURL + request.getQueryString());
ResponseEntity<String> responseEntity =
restTemplate.exchange(uri, method, new HttpEntity<String>(body), String.class);
return responseEntity.getBody();
}
@RequestMapping(value="/session-service/{type}", method = RequestMethod.POST)
public @ResponseBody Map addSessionService(@PathVariable String type, @RequestBody JSONObject body, HttpMethod method,
HttpServletRequest request, HttpServletResponse response) throws URISyntaxException
{
RestTemplate restTemplate = new RestTemplate();
URI uri = new URI(sessionServiceURL + type);
// returns {"id":"5799648eef86c0e807a2e965"}
// using HashMap because converter is MappingJackson2HttpMessageConverter (Jackson 2 is on classpath)
// was String when default converter StringHttpMessageConverter was used
ResponseEntity<HashMap> responseEntity =
restTemplate.exchange(uri, method, new HttpEntity<JSONObject>(body), HashMap.class);
return responseEntity.getBody();
}
@RequestMapping(value="/jsmol/{pdbFile}")
public @ResponseBody String getJSMolURL(@PathVariable String pdbFile,
@RequestBody String body, HttpMethod method,
HttpServletRequest request, HttpServletResponse response) throws URISyntaxException
{
RestTemplate restTemplate = new RestTemplate();
URI uri = new URI(pdbDatabaseURL + pdbFile + ".pdb");
ResponseEntity<String> responseEntity =
restTemplate.exchange(uri, method, new HttpEntity<String>(body), String.class);
return responseEntity.getBody();
=======
HttpServletRequest request, HttpServletResponse response) throws URISyntaxException, IOException {
return respProxy(bitlyURL + request.getQueryString(), method, body, response);
>>>>>>>
HttpServletRequest request, HttpServletResponse response) throws URISyntaxException, IOException
{
return respProxy(bitlyURL + request.getQueryString(), method, body, response);
}
@RequestMapping(value="/session-service/{type}", method = RequestMethod.POST)
public @ResponseBody Map addSessionService(@PathVariable String type, @RequestBody JSONObject body, HttpMethod method,
HttpServletRequest request, HttpServletResponse response) throws URISyntaxException
{
RestTemplate restTemplate = new RestTemplate();
URI uri = new URI(sessionServiceURL + type);
// returns {"id":"5799648eef86c0e807a2e965"}
// using HashMap because converter is MappingJackson2HttpMessageConverter (Jackson 2 is on classpath)
// was String when default converter StringHttpMessageConverter was used
ResponseEntity<HashMap> responseEntity =
restTemplate.exchange(uri, method, new HttpEntity<JSONObject>(body), HashMap.class);
return responseEntity.getBody(); |
<<<<<<<
if (sampleIds == null) {
sql = "SELECT `SAMPLE_ID`, count(DISTINCT `MUTATION_EVENT_ID`) FROM mutation"
+ " WHERE `GENETIC_PROFILE_ID`=" + profileId
+ " GROUP BY `SAMPLE_ID`";
=======
if (caseIds==null) {
sql = "SELECT `CASE_ID`, `MUTATION_COUNT` FROM mutation_count"
+ " WHERE `GENETIC_PROFILE_ID`=" + profileId;
>>>>>>>
if (sampleIds==null) {
sql = "SELECT `SAMPLE_ID`, `MUTATION_COUNT` FROM mutation_count"
+ " WHERE `GENETIC_PROFILE_ID`=" + profileId;
<<<<<<<
sql = "SELECT `SAMPLE_ID`, count(DISTINCT `MUTATION_EVENT_ID`) FROM mutation"
=======
sql = "SELECT `CASE_ID`, `MUTATION_COUNT` FROM mutation_count"
>>>>>>>
sql = "SELECT `SAMPLE_ID`, `MUTATION_COUNT` FROM mutation_count"
<<<<<<<
+ " AND `SAMPLE_ID` IN ('"
+ StringUtils.join(sampleIds,"','")
+ "') GROUP BY `SAMPLE_ID`";
=======
+ " AND `CASE_ID` IN ('"
+ StringUtils.join(caseIds,"','")
+ "')";
>>>>>>>
+ " AND `SAMPLE_ID` IN ('"
+ StringUtils.join(sampleIds,"','")
+ "')"; |
<<<<<<<
private static final Base64.Decoder BASE64_DECODER = Base64.getDecoder();
public static final int SAMPLE_MAX_PAGE_SIZE = 100000;
private static final String SAMPLE_DEFAULT_PAGE_SIZE = "100000";
=======
public static final int SAMPLE_MAX_PAGE_SIZE = 10000000;
private static final String SAMPLE_DEFAULT_PAGE_SIZE = "10000000";
>>>>>>>
private static final Base64.Decoder BASE64_DECODER = Base64.getDecoder();
public static final int SAMPLE_MAX_PAGE_SIZE = 10000000;
private static final String SAMPLE_DEFAULT_PAGE_SIZE = "10000000"; |
<<<<<<<
String patient = (String)request.getAttribute(PATIENT_ID);
CancerStudy cancerStudy = (CancerStudy)request.getAttribute(CANCER_STUDY);
Patient clinicalData = DaoClinicalData.getSurvivalData(cancerStudy.getInternalId(),patient);
Map<String,ClinicalData> clinicalFreeForms = getClinicalFreeform(cancerStudy.getInternalId(),patient);
request.setAttribute(CLINICAL_DATA, clinicalData);
// patient info
StringBuilder patientInfo = new StringBuilder();
String gender = guessClinicalData(clinicalFreeForms, new String[]{"gender"});
if (gender==null) {
gender = inferGenderFromCancerType(cancerStudy.getTypeOfCancerId());
}
if (gender!=null) {
patientInfo.append(gender);
}
Double age = clinicalData ==null?null: clinicalData.getAgeAtDiagnosis();
if (age!=null) {
if (gender!=null) {
patientInfo.append(", ");
}
patientInfo.append(age.intValue()).append(" years old");
}
request.setAttribute(PATIENT_INFO, patientInfo.toString());
// disease info
StringBuilder diseaseInfo = new StringBuilder();
diseaseInfo.append("<a href=\"study.do?cancer_study_id=")
.append(cancerStudy.getCancerStudyStableId()).append("\">")
.append(cancerStudy.getName())
.append("</a>");
String state = guessClinicalData(clinicalFreeForms,
new String[]{"disease state"});
if (state!=null) {
String strState = state;
if (state.equals("Metastatic")) {
strState = "<font color='red'>"+state+"</font>";
} else if (state.equals("Primary")) {
strState = "<font color='green'>"+state+"</font>";
}
diseaseInfo.append(", ").append(strState);
if (state.equals("Metastatic")) {
String loc = guessClinicalData(clinicalFreeForms,
new String[]{"tumor location"});
if (loc!=null) {
diseaseInfo.append(", Tumor location: ").append(loc);
}
}
}
String gleason = guessClinicalData(clinicalFreeForms,
new String[]{"gleason score","overall_gleason_score"});
if (gleason!=null) {
diseaseInfo.append(", Gleason: ").append(gleason);
}
=======
Set<Case> cases = (Set<Case>)request.getAttribute(PATIENT_CASE_OBJ);
>>>>>>>
Set<String> cases = (Set<String>)request.getAttribute(CASE_ID);
<<<<<<<
request.setAttribute(DISEASE_INFO, diseaseInfo.toString());
// patient status
String oss = clinicalData ==null?null: clinicalData.getOverallSurvivalStatus();
String dfss = clinicalData ==null?null: clinicalData.getDiseaseFreeSurvivalStatus();
Double osm = clinicalData ==null?null: clinicalData.getOverallSurvivalMonths();
Double dfsm = clinicalData ==null?null: clinicalData.getDiseaseFreeSurvivalMonths();
StringBuilder patientStatus = new StringBuilder();
if (oss!=null && !oss.equalsIgnoreCase("unknown")) {
patientStatus.append("<font color='")
.append(oss.equalsIgnoreCase("Living")||oss.equalsIgnoreCase("Alive") ? "green":"red")
.append("'>")
.append(oss)
.append("</font>");
if (osm!=null) {
patientStatus.append(" (").append(osm.intValue()).append(" months)");
}
}
if (dfss!=null && !dfss.equalsIgnoreCase("unknown")) {
if (patientStatus.length()!=0) {
patientStatus.append(", ");
}
patientStatus.append("<font color='")
.append(dfss.equalsIgnoreCase("DiseaseFree") ? "green":"red")
.append("'>")
.append(dfss)
.append("</font>");
if (dfsm!=null) {
patientStatus.append(" (").append(dfsm.intValue()).append(" months)");
}
}
request.setAttribute(PATIENT_STATUS, patientStatus.toString());
=======
>>>>>>>
<<<<<<<
private String inferGenderFromCancerType(String typeOfCancerId) {
if (typeOfCancerId.equals("ucec")) {
return "FEMALE";
}
if (typeOfCancerId.equals("ov")) {
return "FEMALE";
}
if (typeOfCancerId.equals("cesc")) {
return "FEMALE";
}
// if (typeOfCancerId.equals("prad")) {
// return "MALE";
// }
return null;
}
private String guessClinicalData(Map<String,ClinicalData> clinicalFreeForms,
String[] paramName) {
for (String name : paramName) {
ClinicalData form = clinicalFreeForms.get(name.toLowerCase());
if (form!=null) {
return form.getAttrVal();
}
=======
private String getTissueImageIframeUrl(String cancerStudyId, String caseId) {
if (!caseId.toUpperCase().startsWith("TCGA-")) {
return null;
>>>>>>>
private String getTissueImageIframeUrl(String cancerStudyId, String caseId) {
if (!caseId.toUpperCase().startsWith("TCGA-")) {
return null; |
<<<<<<<
private static int port;
private static String base;
protected static HandlerServer handlerServer;
protected static TrackingQueue balancerQueue;
=======
private static int externalPort;
private static int internalPort;
private static String externalBase;
private static String internalBase;
protected static ExternalHandlerServer externalHandlerServer;
protected static InternalHandlerServer internalHandlerServer;
protected static ElementsTrackingQueue balancerQueue;
>>>>>>>
protected static TrackingQueue balancerQueue;
private static int externalPort;
private static int internalPort;
private static String externalBase;
private static String internalBase;
protected static ExternalHandlerServer externalHandlerServer;
protected static InternalHandlerServer internalHandlerServer;
<<<<<<<
balancerQueue = injector.getInstance(Key.get(TrackingQueue.class, Names.named(Constants.Queue.WORKER_BALANCE)));
provisionerQueues = queueService.getQueueGroup(QueueType.PROVISIONER);
clusterQueues = queueService.getQueueGroup(QueueType.CLUSTER);
solverQueues = queueService.getQueueGroup(QueueType.SOLVER);
jobQueues = queueService.getQueueGroup(QueueType.JOB);
callbackQueues = queueService.getQueueGroup(QueueType.CALLBACK);
handlerServer = injector.getInstance(HandlerServer.class);
handlerServer.startAndWait();
port = handlerServer.getBindAddress().getPort();
=======
balancerQueue = injector.getInstance(
Key.get(ElementsTrackingQueue.class, Names.named(Constants.Queue.WORKER_BALANCE)));
provisionerQueues = injector.getInstance(Key.get(QueueGroup.class, Names.named(Constants.Queue.PROVISIONER)));
clusterQueues = injector.getInstance(Key.get(QueueGroup.class, Names.named(Constants.Queue.CLUSTER)));
solverQueues = injector.getInstance(Key.get(QueueGroup.class, Names.named(Constants.Queue.SOLVER)));
jobQueues = injector.getInstance(Key.get(QueueGroup.class, Names.named(Constants.Queue.JOB)));
callbackQueues = injector.getInstance(Key.get(QueueGroup.class, Names.named(Constants.Queue.CALLBACK)));
internalHandlerServer = injector.getInstance(InternalHandlerServer.class);
internalHandlerServer.startAndWait();
internalPort = internalHandlerServer.getBindAddress().getPort();
externalHandlerServer = injector.getInstance(ExternalHandlerServer.class);
externalHandlerServer.startAndWait();
externalPort = externalHandlerServer.getBindAddress().getPort();
>>>>>>>
balancerQueue = injector.getInstance(Key.get(TrackingQueue.class, Names.named(Constants.Queue.WORKER_BALANCE)));
provisionerQueues = queueService.getQueueGroup(QueueType.PROVISIONER);
clusterQueues = queueService.getQueueGroup(QueueType.CLUSTER);
solverQueues = queueService.getQueueGroup(QueueType.SOLVER);
jobQueues = queueService.getQueueGroup(QueueType.JOB);
callbackQueues = queueService.getQueueGroup(QueueType.CALLBACK);
internalHandlerServer = injector.getInstance(InternalHandlerServer.class);
internalHandlerServer.startAndWait();
internalPort = internalHandlerServer.getBindAddress().getPort();
externalHandlerServer = injector.getInstance(ExternalHandlerServer.class);
externalHandlerServer.startAndWait();
externalPort = externalHandlerServer.getBindAddress().getPort(); |
<<<<<<<
import org.mskcc.cbio.portal.model.converter.MutationModelConverter;
=======
import org.mskcc.cbio.portal.util.AccessControl;
>>>>>>>
import org.mskcc.cbio.portal.model.converter.MutationModelConverter;
import org.mskcc.cbio.portal.util.AccessControl;
<<<<<<<
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
=======
import org.mskcc.cbio.portal.util.SpringUtil;
>>>>>>>
import org.mskcc.cbio.portal.util.SpringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.support.SpringBeanAutowiringSupport; |
<<<<<<<
"An error occurred while trying to connect to the database.", xdebug);
}
=======
"An error occurred while trying to connect to the database.", xdebug);
} catch (ProtocolException e) {
xdebug.logMsg(this, "Got Protocol Exception " + e.getMessage());
forwardToErrorPage(request, response,
"An error occurred while trying to authenticate.", xdebug);
}
>>>>>>>
"An error occurred while trying to connect to the database.", xdebug);
} catch (ProtocolException e) {
xdebug.logMsg(this, "Got Protocol Exception " + e.getMessage());
forwardToErrorPage(request, response,
"An error occurred while trying to authenticate.", xdebug);
}
<<<<<<<
=======
private void setCancerStudyMetaData(HttpServletRequest request) throws DaoException, ProtocolException {
request.setAttribute(CANCER_STUDY_META_DATA_KEY_STRING, DaoCaseProfile.metaData(accessControl.getCancerStudies()));
}
>>>>>>>
private void setCancerStudyMetaData(HttpServletRequest request) throws DaoException, ProtocolException {
request.setAttribute(CANCER_STUDY_META_DATA_KEY_STRING, DaoCaseProfile.metaData(accessControl.getCancerStudies()));
}
<<<<<<<
=======
// other cases with the same patient id
Map<String,String> attrMap = clinicalData.get(caseId);
if (attrMap!=null) {
String patientId = attrMap.get(PATIENT_ID_ATTR_NAME);
if (patientId != null) {
List<String> samples = DaoClinicalData.getCaseIdsByAttribute(
cancerStudy.getInternalId(), PATIENT_ID_ATTR_NAME, patientId);
if (samples.size()>1) {
request.setAttribute(PATIENT_ID_ATTR_NAME, patientId);
}
}
}
>>>>>>> |
<<<<<<<
public static List<CnaEvent> getCnaEvents(List<Integer> sampleIds, int profileId) throws DaoException {
=======
public static List<CnaEvent> getCnaEvents(String[] caseIds, int profileId, Collection<Short> cnaLevels) throws DaoException {
>>>>>>>
public static List<CnaEvent> getCnaEvents(List<Integer> sampleIds, int profileId, Collection<Short> cnaLevels) throws DaoException {
<<<<<<<
+ " AND sample_cna_event.CNA_EVENT_ID=cna_event.CNA_EVENT_ID"
+ " AND SAMPLE_ID in ('"+StringUtils.join(sampleIds, "','")+"')");
=======
+ " AND case_cna_event.CNA_EVENT_ID=cna_event.CNA_EVENT_ID"
+ " AND ALTERATION IN (" + StringUtils.join(cnaLevels,",") + ")"
+ " AND CASE_ID in ('"+StringUtils.join(caseIds, "','")+"')");
>>>>>>>
+ " AND sample_cna_event.CNA_EVENT_ID=cna_event.CNA_EVENT_ID"
+ " AND ALTERATION IN (" + StringUtils.join(cnaLevels,",") + ")"
+ " AND SAMPLE_ID in ('"+StringUtils.join(sampleIds, "','")+"')"); |
<<<<<<<
DaoGeneticProfileSamples daoGeneticProfileSamples = new DaoGeneticProfileSamples();
daoGeneticProfileSamples.addGeneticProfileSamples(geneticProfileId, orderedSampleList);
=======
DaoGeneticProfileCases.addGeneticProfileCases(geneticProfileId, orderedCaseList);
>>>>>>>
DaoGeneticProfileSamples.addGeneticProfileSamples(geneticProfileId, orderedSampleList);
<<<<<<<
if (geneticProfile!=null
&& geneticProfile.getGeneticAlterationType() == GeneticAlterationType.COPY_NUMBER_ALTERATION
&& geneticProfile.showProfileInAnalysisTab()) {
storeCna(genes.get(0).getEntrezGeneId(), orderedSampleList, values);
=======
if (discritizedCnaProfile) {
long entrezGeneId = genes.get(0).getEntrezGeneId();
int n = values.length;
if (n==0)
System.out.println();
int i = values[0].equals(""+entrezGeneId) ? 1:0;
for (; i<n; i++) {
if (values[i].equals(GeneticAlterationType.AMPLIFICATION)
// || values[i].equals(GeneticAlterationType.GAIN)
// || values[i].equals(GeneticAlterationType.ZERO)
// || values[i].equals(GeneticAlterationType.HEMIZYGOUS_DELETION)
|| values[i].equals(GeneticAlterationType.HOMOZYGOUS_DELETION)) {
CnaEvent cnaEvent = new CnaEvent(orderedCaseList.get(i), geneticProfileId, entrezGeneId, Short.parseShort(values[i]));
if (existingCnaEvents.containsKey(cnaEvent.getEvent())) {
cnaEvent.setEventId(existingCnaEvents.get(cnaEvent.getEvent()).getEventId());
DaoCnaEvent.addCaseCnaEvent(cnaEvent, false);
} else {
cnaEvent.setEventId(++cnaEventId);
DaoCnaEvent.addCaseCnaEvent(cnaEvent, true);
existingCnaEvents.put(cnaEvent.getEvent(), cnaEvent.getEvent());
}
}
}
>>>>>>>
if (discritizedCnaProfile) {
long entrezGeneId = genes.get(0).getEntrezGeneId();
int n = values.length;
if (n==0)
System.out.println();
int i = values[0].equals(""+entrezGeneId) ? 1:0;
for (; i<n; i++) {
if (values[i].equals(GeneticAlterationType.AMPLIFICATION)
// || values[i].equals(GeneticAlterationType.GAIN)
// || values[i].equals(GeneticAlterationType.ZERO)
// || values[i].equals(GeneticAlterationType.HEMIZYGOUS_DELETION)
|| values[i].equals(GeneticAlterationType.HOMOZYGOUS_DELETION)) {
CnaEvent cnaEvent = new CnaEvent(orderedSampleList.get(i), geneticProfileId, entrezGeneId, Short.parseShort(values[i]));
if (existingCnaEvents.containsKey(cnaEvent.getEvent())) {
cnaEvent.setEventId(existingCnaEvents.get(cnaEvent.getEvent()).getEventId());
DaoCnaEvent.addCaseCnaEvent(cnaEvent, false);
} else {
cnaEvent.setEventId(++cnaEventId);
DaoCnaEvent.addCaseCnaEvent(cnaEvent, true);
existingCnaEvents.put(cnaEvent.getEvent(), cnaEvent.getEvent());
}
}
}
<<<<<<<
private void storeCna(long entrezGeneId, ArrayList<Integer> samples, String[] values) throws DaoException {
int n = values.length;
if (n==0)
System.out.println();
int i = values[0].equals(""+entrezGeneId) ? 1:0;
for (; i<n; i++) {
if (values[i].equals(GeneticAlterationType.AMPLIFICATION) ||
values[i].equals(GeneticAlterationType.HOMOZYGOUS_DELETION)) {
CnaEvent event = new CnaEvent(samples.get(i), geneticProfileId, entrezGeneId, Short.parseShort(values[i]));
DaoCnaEvent.addCaseCnaEvent(event);
}
}
}
=======
>>>>>>> |
<<<<<<<
=======
@Override
public Collection<TumorTypeMetadata> getTumorTypeMetadata(String tumorType) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public String[] getTumorTypesToDownload() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<DatatypeMetadata> getDatatypeMetadata(String datatype) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<DatatypeMetadata> getDatatypeMetadata(PortalMetadata portalMetadata, CancerStudyMetadata cancerStudyMetadata) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public String[] getDatatypesToDownload(DataSourcesMetadata dataSourcesMetadata) throws Exception {
return null;
}
@Override
public Collection<DatatypeMetadata> getFileDatatype(DataSourcesMetadata dataSourcesMetadata, String filename) throws Exception {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<CaseIDFilterMetadata> getCaseIDFilterMetadata(String filterName) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<CaseListMetadata> getCaseListMetadata(String caseListFilename) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<ClinicalAttributesNamespace> getClinicalAttributesNamespace(String clinicalAttributesNamespaceColumnHeader) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<ClinicalAttributesMetadata> getClinicalAttributesMetadata(String clinicalAttributeColumnHeader) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Map<String, ClinicalAttributesMetadata> getClinicalAttributesMetadata(Collection<String> externalColumnHeaders) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void importBCRClinicalAttributes(Collection<BCRDictEntry> bcrs) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void flagMissingClinicalAttributes(String cancerStudy, String tumorType, Collection<String> missingAttributeColumnHeaders) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<PortalMetadata> getPortalMetadata(String portalName) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<ReferenceMetadata> getReferenceMetadata(String referenceType) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<DataSourcesMetadata> getDataSourcesMetadata(String dataSource) {
DataSourcesMetadata meta1 = new DataSourcesMetadata(new String[]{"foundation", "/tmp/foundation",
"TRUE", "foundationFetcher"});
DataSourcesMetadata meta2 = new DataSourcesMetadata(new String[]{"darwin", "/tmp/darwin", "TRUE", "darwinFetcher"});
if (dataSource.equalsIgnoreCase("foundation")) {
return Lists.newArrayList(meta1);
}
if (dataSource.equalsIgnoreCase("darwin")) {
return Lists.newArrayList(meta2);
}
return Lists.newArrayList();
}
@Override
public Collection<CancerStudyMetadata> getAllCancerStudyMetadata() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<CancerStudyMetadata> getCancerStudyMetadata(String portalName) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public CancerStudyMetadata getCancerStudyMetadataByName(String cancerStudyName) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<FoundationMetadata> getFoundationMetadata() {
FoundationMetadata meta1 = new FoundationMetadata(new String[]{"lcll/mskcc/foundation", "13-156;13-079"});
FoundationMetadata meta2 = new FoundationMetadata(new String[]{"dlbc/mskcc/foundation", "13-158;13-081",
"RD0345;RD0351;RD0354;RD0355;RD0374;RD0375;RD0376;RD0377;RD0378;RD0383;RD0384;TRF031674;TRF031934",
"unknown"});
FoundationMetadata meta3 = new FoundationMetadata(new String[]{"mds_aml/mskcc/foundation", "13-157;13-080"});
FoundationMetadata meta4 = new FoundationMetadata(new String[]{"dlbcl/mskcc/foundation", "13-159;13-082"});
FoundationMetadata meta5 = new FoundationMetadata(new String[]{"aml-all/mskcc/foundation", "13-160;13-083"});
FoundationMetadata meta6 = new FoundationMetadata(new String[]{"dac-atra_mds/mskcc/foundation", "13-161;13-084"});
FoundationMetadata meta7 = new FoundationMetadata(new String[]{"jak2-neg_mpn/mskcc/foundation", "13-162;13-085"});
FoundationMetadata meta8 = new FoundationMetadata(new String[]{"post-mpn_aml/mskcc/foundation", "13-163;13-086"});
FoundationMetadata meta9 = new FoundationMetadata(new String[]{"carfilzomib-mm/mskcc/foundation", "13-164;13-087"});
FoundationMetadata meta10 = new FoundationMetadata(new String[]{"lymphoma/mskcc/foundation", "CLINICAL-HEME-COMPLETE;CLINICAL-T7"});
return Lists.newArrayList(meta1, meta2,meta3,meta4,meta5,meta6,meta7,meta8,meta9, meta10);
}
@Override
public List<String> findCancerStudiesBySubstring(String substring) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Collection<IcgcMetadata> getIcgcMetadata() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void updateCancerStudyAttributes(String cancerStudy, Map<String,String> properties) {
throw new UnsupportedOperationException();
}
@Override
public void insertCancerStudyAttributes(Map<String,String> properties) {
throw new UnsupportedOperationException();
}
}
>>>>>>> |
<<<<<<<
times.add(time);
=======
if(max<time){
max=time;
}
if(min>time){
min=time;
}
>>>>>>>
times.add(time);
if(max<time){
max=time;
}
if(min>time){
min=time;
}
<<<<<<<
st.getDeviation(),
=======
st.max,
st.min,
st.deviation,
>>>>>>>
st.getDeviation(),
st.max,
st.min,
<<<<<<<
sb.append(String.format(format,"deviation",totalStat.getDeviation()));
=======
sb.append(String.format(format,"max",totalStat.max));
sb.append(String.format(format,"min",totalStat.min));
sb.append(String.format(format,"deviation",totalStat.deviation));
>>>>>>>
sb.append(String.format(format,"deviation",totalStat.getDeviation()));
sb.append(String.format(format,"max",totalStat.max));
sb.append(String.format(format,"min",totalStat.min)); |
<<<<<<<
if (toextract <= 0) {
stack.setCount(0);
} else {
stack.setCount(toextract);
}
=======
stack = stack.copy();
ItemStackTools.setStackSize(stack, toextract);
>>>>>>>
stack = stack.copy();
if (toextract <= 0) {
stack.setCount(0);
} else {
stack.setCount(toextract);
}
<<<<<<<
if (toinsert <= 0) {
stack.setCount(0);
} else {
stack.setCount(toinsert);
}
=======
stack = stack.copy();
ItemStackTools.setStackSize(stack, toinsert);
>>>>>>>
stack = stack.copy();
if (toinsert <= 0) {
stack.setCount(0);
} else {
stack.setCount(toinsert);
}
<<<<<<<
if (toinsert <= 0) {
stack.setCount(0);
} else {
stack.setCount(toinsert);
}
=======
stack = stack.copy();
ItemStackTools.setStackSize(stack, toinsert);
>>>>>>>
stack = stack.copy();
if (toinsert <= 0) {
stack.setCount(0);
} else {
stack.setCount(toinsert);
}
<<<<<<<
if (toinsert <= 0) {
stack.setCount(0);
} else {
stack.setCount(toinsert);
}
=======
stack = stack.copy();
ItemStackTools.setStackSize(stack, toinsert);
>>>>>>>
stack = stack.copy();
if (toinsert <= 0) {
stack.setCount(0);
} else {
stack.setCount(toinsert);
}
<<<<<<<
if (toinsert <= 0) {
stack.setCount(0);
} else {
stack.setCount(toinsert);
}
=======
stack = stack.copy();
ItemStackTools.setStackSize(stack, toinsert);
>>>>>>>
stack = stack.copy();
if (toinsert <= 0) {
stack.setCount(0);
} else {
stack.setCount(toinsert);
} |
<<<<<<<
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.boot.testsupport.BuildOutput;
=======
>>>>>>>
import org.springframework.boot.testsupport.BuildOutput;
<<<<<<<
new File(this.buildOutput.getTestResourcesLocation(),
"empty-templates/empty-directory").mkdirs();
load(BaseConfiguration.class,
"spring.thymeleaf.prefix:classpath:/empty-templates/empty-directory/");
=======
new File("target/test-classes/templates/empty-directory").mkdir();
this.contextRunner
.withPropertyValues(
"spring.thymeleaf.prefix:classpath:/templates/empty-directory/")
.run((context) -> this.output
.expect(not(containsString("Cannot find template location"))));
>>>>>>>
new File(this.buildOutput.getTestResourcesLocation(),
"empty-templates/empty-directory").mkdirs();
this.contextRunner.withPropertyValues(
"spring.thymeleaf.prefix:classpath:/empty-templates/empty-directory/")
.run((context) -> this.output
.expect(not(containsString("Cannot find template location"))));
<<<<<<<
@Configuration(proxyBeanMethods = false)
@Import(BaseConfiguration.class)
=======
@Configuration
>>>>>>>
@Configuration(proxyBeanMethods = false)
<<<<<<<
@Configuration(proxyBeanMethods = false)
@Import(BaseConfiguration.class)
=======
@Configuration
>>>>>>>
@Configuration(proxyBeanMethods = false) |
<<<<<<<
void getVehicleWhenRequestingHtmlShouldReturnMakeAndModel() throws Exception {
given(this.userVehicleService.getVehicleDetails("sboot"))
.willReturn(new VehicleDetails("Honda", "Civic"));
this.mvc.perform(get("/sboot/vehicle.html").accept(MediaType.TEXT_HTML))
.andExpect(status().isOk())
=======
public void getVehicleWhenRequestingHtmlShouldReturnMakeAndModel() throws Exception {
given(this.userVehicleService.getVehicleDetails("sboot")).willReturn(new VehicleDetails("Honda", "Civic"));
this.mvc.perform(get("/sboot/vehicle.html").accept(MediaType.TEXT_HTML)).andExpect(status().isOk())
>>>>>>>
void getVehicleWhenRequestingHtmlShouldReturnMakeAndModel() throws Exception {
given(this.userVehicleService.getVehicleDetails("sboot")).willReturn(new VehicleDetails("Honda", "Civic"));
this.mvc.perform(get("/sboot/vehicle.html").accept(MediaType.TEXT_HTML)).andExpect(status().isOk())
<<<<<<<
void getVehicleWhenUserNotFoundShouldReturnNotFound() throws Exception {
given(this.userVehicleService.getVehicleDetails("sboot"))
.willThrow(new UserNameNotFoundException("sboot"));
=======
public void getVehicleWhenUserNotFoundShouldReturnNotFound() throws Exception {
given(this.userVehicleService.getVehicleDetails("sboot")).willThrow(new UserNameNotFoundException("sboot"));
>>>>>>>
void getVehicleWhenUserNotFoundShouldReturnNotFound() throws Exception {
given(this.userVehicleService.getVehicleDetails("sboot")).willThrow(new UserNameNotFoundException("sboot")); |
<<<<<<<
import com.continuuity.loom.cluster.Cluster;
=======
import com.continuuity.loom.admin.TenantSpecification;
>>>>>>>
import com.continuuity.loom.admin.TenantSpecification;
import com.continuuity.loom.cluster.Cluster;
<<<<<<<
import java.util.List;
=======
import java.util.List;
import java.util.Map;
>>>>>>>
import java.util.List;
import java.util.Map;
<<<<<<<
=======
import java.util.UUID;
>>>>>>>
import java.util.UUID; |
<<<<<<<
assertThat(ReflectionTestUtils.getField(getRollingPolicy(), "maxFileSize")
.toString()).isEqualTo("10 MB");
assertThat(getRollingPolicy().getMaxHistory()).isEqualTo(7);
=======
assertThat(ReflectionTestUtils.getField(getRollingPolicy(), "maxFileSize").toString()).isEqualTo("10 MB");
assertThat(getRollingPolicy().getMaxHistory()).isEqualTo(CoreConstants.UNBOUND_HISTORY);
>>>>>>>
assertThat(ReflectionTestUtils.getField(getRollingPolicy(), "maxFileSize").toString()).isEqualTo("10 MB");
assertThat(getRollingPolicy().getMaxHistory()).isEqualTo(7);
<<<<<<<
String fileContents = contentOf(new File(tmpDir() + "/spring.log"));
=======
String fileContents = FileCopyUtils.copyToString(new FileReader(new File(tmpDir() + "/spring.log")));
>>>>>>>
String fileContents = contentOf(new File(tmpDir() + "/spring.log"));
<<<<<<<
this.logger.warn("Expected exception",
new RuntimeException("Expected", new RuntimeException("Cause")));
String fileContents = contentOf(new File(tmpDir() + "/spring.log"));
=======
this.logger.warn("Expected exception", new RuntimeException("Expected", new RuntimeException("Cause")));
String fileContents = FileCopyUtils.copyToString(new FileReader(new File(tmpDir() + "/spring.log")));
>>>>>>>
this.logger.warn("Expected exception", new RuntimeException("Expected", new RuntimeException("Cause")));
String fileContents = contentOf(new File(tmpDir() + "/spring.log"));
<<<<<<<
private String getLineWithText(File file, String outputSearch) {
return getLineWithText(contentOf(file), outputSearch);
=======
private String getLineWithText(File file, String outputSearch) throws Exception {
return getLineWithText(FileCopyUtils.copyToString(new FileReader(file)), outputSearch);
>>>>>>>
private String getLineWithText(File file, String outputSearch) {
return getLineWithText(contentOf(file), outputSearch); |
<<<<<<<
import com.continuuity.loom.layout.ClusterCreateRequest;
=======
import com.continuuity.loom.http.ClusterConfigureRequest;
import com.continuuity.loom.layout.ClusterRequest;
>>>>>>>
import com.continuuity.loom.http.ClusterConfigureRequest;
import com.continuuity.loom.layout.ClusterCreateRequest;
<<<<<<<
.registerTypeAdapter(ClusterCreateRequest.class, new ClusterCreateRequestCodec())
=======
.registerTypeAdapter(ClusterRequest.class, new ClusterRequestCodec())
.registerTypeAdapter(ClusterConfigureRequest.class, new ClusterConfigureRequestCodec())
>>>>>>>
.registerTypeAdapter(ClusterCreateRequest.class, new ClusterCreateRequestCodec())
.registerTypeAdapter(ClusterConfigureRequest.class, new ClusterConfigureRequestCodec()) |
<<<<<<<
if (this.maxHttpPostSize > 0) {
customizeMaxHttpPostSize(factory, this.maxHttpPostSize);
=======
if (serverProperties.getMaxHttpPostSize() != 0) {
customizeMaxHttpPostSize(factory, serverProperties.getMaxHttpPostSize());
>>>>>>>
if (this.maxHttpPostSize != 0) {
customizeMaxHttpPostSize(factory, this.maxHttpPostSize); |
<<<<<<<
=======
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(ManagementContextAutoConfiguration.class,
ServletManagementContextAutoConfiguration.class));
>>>>>>>
<<<<<<<
=======
public void managementServerPortShouldBeIgnoredForNonEmbeddedServer() {
this.contextRunner.withPropertyValues("management.server.port=8081").run((context) -> {
assertThat(context.getStartupFailure()).isNull();
assertThat(this.output.toString()).contains("Could not start embedded management container on "
+ "different port (management endpoints are still available through JMX)");
});
}
@Test
>>>>>>>
<<<<<<<
contextRunner.withPropertyValues("server.port=0", "management.server.port=0").run(
(context) -> assertThat(tomcatStartedOccurencesIn(this.output.toString()))
.isEqualTo(2));
}
private int tomcatStartedOccurencesIn(String output) {
int matches = 0;
Matcher matcher = Pattern.compile("Tomcat started on port").matcher(output);
while (matcher.find()) {
matches++;
}
return matches;
=======
contextRunner.withPropertyValues("management.server.port=8081")
.run((context) -> assertThat(this.output.toString())
.doesNotContain("Could not start embedded management container on "
+ "different port (management endpoints are still available through JMX)"));
>>>>>>>
contextRunner.withPropertyValues("server.port=0", "management.server.port=0")
.run((context) -> assertThat(tomcatStartedOccurencesIn(this.output.toString())).isEqualTo(2));
}
private int tomcatStartedOccurencesIn(String output) {
int matches = 0;
Matcher matcher = Pattern.compile("Tomcat started on port").matcher(output);
while (matcher.find()) {
matches++;
}
return matches; |
<<<<<<<
* @author Robert Thornton
* @since 1.1.2
=======
>>>>>>>
* @author Robert Thornton |
<<<<<<<
import com.continuuity.loom.common.queue.Element;
import com.continuuity.loom.common.queue.internal.TimeoutTrackingQueue;
=======
import com.continuuity.loom.codec.json.JsonSerde;
>>>>>>>
<<<<<<<
private static Gson GSON = jsonSerde.getGson();
private static TimeoutTrackingQueue solverQueue;
private static TimeoutTrackingQueue clusterQueue;
=======
private static Gson GSON = new JsonSerde().getGson();
private static QueueGroup solverQueues;
private static QueueGroup clusterQueues;
>>>>>>>
private static Gson GSON = jsonSerde.getGson();
private static QueueGroup solverQueues;
private static QueueGroup clusterQueues; |
<<<<<<<
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase())
.jsonPath("path").isEqualTo(("/")).jsonPath("message")
.isEqualTo("Expected!").jsonPath("exception").doesNotExist()
.jsonPath("trace").doesNotExist();
this.outputCapture.expect(Matchers.allOf(
containsString("500 Server Error for HTTP GET \"/\""),
containsString("java.lang.IllegalStateException: Expected!")));
=======
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase()).jsonPath("path").isEqualTo(("/"))
.jsonPath("message").isEqualTo("Expected!").jsonPath("exception").doesNotExist().jsonPath("trace")
.doesNotExist();
this.output.expect(
allOf(containsString("Failed to handle request [GET /]"), containsString("IllegalStateException")));
>>>>>>>
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase()).jsonPath("path").isEqualTo(("/"))
.jsonPath("message").isEqualTo("Expected!").jsonPath("exception").doesNotExist().jsonPath("trace")
.doesNotExist();
this.outputCapture.expect(Matchers.allOf(containsString("500 Server Error for HTTP GET \"/\""),
containsString("java.lang.IllegalStateException: Expected!")));
<<<<<<<
this.outputCapture.expect(Matchers.allOf(
containsString("500 Server Error for HTTP GET \"/\""),
containsString("java.lang.IllegalStateException: Expected!")));
=======
this.output.expect(
allOf(containsString("Failed to handle request [GET /]"), containsString("IllegalStateException")));
>>>>>>>
this.outputCapture.expect(Matchers.allOf(containsString("500 Server Error for HTTP GET \"/\""),
containsString("java.lang.IllegalStateException: Expected!")));
<<<<<<<
this.contextRunner.withPropertyValues("server.error.include-exception=true")
.run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context)
.build();
client.get().uri("/badRequest").exchange().expectStatus()
.isBadRequest().expectBody().jsonPath("status")
.isEqualTo("400").jsonPath("error")
.isEqualTo(HttpStatus.BAD_REQUEST.getReasonPhrase())
.jsonPath("exception")
.isEqualTo(ResponseStatusException.class.getName());
});
=======
this.contextRunner.withPropertyValues("server.error.include-exception=true").run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context).build();
client.get().uri("/badRequest").exchange().expectStatus().isBadRequest().expectBody().jsonPath("status")
.isEqualTo("400").jsonPath("error").isEqualTo(HttpStatus.BAD_REQUEST.getReasonPhrase())
.jsonPath("exception").isEqualTo(ResponseStatusException.class.getName());
this.output.expect(not(containsString("ResponseStatusException")));
});
>>>>>>>
this.contextRunner.withPropertyValues("server.error.include-exception=true").run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context).build();
client.get().uri("/badRequest").exchange().expectStatus().isBadRequest().expectBody().jsonPath("status")
.isEqualTo("400").jsonPath("error").isEqualTo(HttpStatus.BAD_REQUEST.getReasonPhrase())
.jsonPath("exception").isEqualTo(ResponseStatusException.class.getName());
});
<<<<<<<
this.contextRunner
.withPropertyValues("spring.mustache.prefix=classpath:/unknown/",
"server.error.include-stacktrace=always")
.run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context)
.build();
String body = client.get().uri("/").accept(MediaType.TEXT_HTML)
.exchange().expectStatus()
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR).expectHeader()
.contentType(MediaType.TEXT_HTML).expectBody(String.class)
.returnResult().getResponseBody();
assertThat(body).contains("Whitelabel Error Page")
.contains("<div>Expected!</div>").contains(
"<div style='white-space:pre-wrap;'>java.lang.IllegalStateException");
});
=======
this.contextRunner.withPropertyValues("spring.mustache.prefix=classpath:/unknown/").run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context).build();
String body = client.get().uri("/").accept(MediaType.TEXT_HTML).exchange().expectStatus()
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR).expectHeader().contentType(MediaType.TEXT_HTML)
.expectBody(String.class).returnResult().getResponseBody();
assertThat(body).contains("Whitelabel Error Page").contains("<div>Expected!</div>");
this.output.expect(
allOf(containsString("Failed to handle request [GET /]"), containsString("IllegalStateException")));
});
>>>>>>>
this.contextRunner.withPropertyValues("spring.mustache.prefix=classpath:/unknown/",
"server.error.include-stacktrace=always").run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context).build();
String body = client.get().uri("/").accept(MediaType.TEXT_HTML).exchange().expectStatus()
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR).expectHeader().contentType(MediaType.TEXT_HTML)
.expectBody(String.class).returnResult().getResponseBody();
assertThat(body).contains("Whitelabel Error Page").contains("<div>Expected!</div>")
.contains("<div style='white-space:pre-wrap;'>java.lang.IllegalStateException");
});
<<<<<<<
this.contextRunner
.withPropertyValues("spring.mustache.prefix=classpath:/unknown/")
.run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context)
.build();
String body = client.get().uri("/html").accept(MediaType.TEXT_HTML)
.exchange().expectStatus()
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR).expectHeader()
.contentType(MediaType.TEXT_HTML).expectBody(String.class)
.returnResult().getResponseBody();
assertThat(body).contains("Whitelabel Error Page")
.doesNotContain("<script>").contains("<script>");
});
=======
this.contextRunner.withPropertyValues("spring.mustache.prefix=classpath:/unknown/").run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context).build();
String body = client.get().uri("/html").accept(MediaType.TEXT_HTML).exchange().expectStatus()
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR).expectHeader().contentType(MediaType.TEXT_HTML)
.expectBody(String.class).returnResult().getResponseBody();
assertThat(body).contains("Whitelabel Error Page").doesNotContain("<script>").contains("<script>");
this.output.expect(allOf(containsString("Failed to handle request [GET /html]"),
containsString("IllegalStateException")));
});
>>>>>>>
this.contextRunner.withPropertyValues("spring.mustache.prefix=classpath:/unknown/").run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context).build();
String body = client.get().uri("/html").accept(MediaType.TEXT_HTML).exchange().expectStatus()
.isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR).expectHeader().contentType(MediaType.TEXT_HTML)
.expectBody(String.class).returnResult().getResponseBody();
assertThat(body).contains("Whitelabel Error Page").doesNotContain("<script>").contains("<script>");
});
<<<<<<<
WebTestClient client = WebTestClient.bindToApplicationContext(context)
.build();
assertThatExceptionOfType(RuntimeException.class)
.isThrownBy(
() -> client.get().uri("/commit").exchange().expectStatus())
.withCauseInstanceOf(IllegalStateException.class)
.withMessageContaining("already committed!");
=======
WebTestClient client = WebTestClient.bindToApplicationContext(context).build();
this.thrown.expectCause(instanceOf(IllegalStateException.class));
this.thrown.expectMessage("already committed!");
client.get().uri("/commit").exchange().expectStatus();
>>>>>>>
WebTestClient client = WebTestClient.bindToApplicationContext(context).build();
assertThatExceptionOfType(RuntimeException.class)
.isThrownBy(() -> client.get().uri("/commit").exchange().expectStatus())
.withCauseInstanceOf(IllegalStateException.class).withMessageContaining("already committed!");
<<<<<<<
return exchange.getResponse().setComplete().then(
Mono.error(new IllegalStateException("already committed!")));
=======
return exchange.getResponse().writeWith(Mono.empty())
.then(Mono.error(new IllegalStateException("already committed!")));
>>>>>>>
return exchange.getResponse().setComplete()
.then(Mono.error(new IllegalStateException("already committed!"))); |
<<<<<<<
private String uri = "http://example.com";
=======
@Rule
public ExpectedException thrown = ExpectedException.none();
private String uri = "https://example.com";
>>>>>>>
private String uri = "https://example.com";
<<<<<<<
"Request URI expected:</hello> was:<http://example.com/bad>"));
assertThatExceptionOfType(AssertionError.class)
.isThrownBy(() -> this.manager.validateRequest(request))
.withMessageContaining("Request URI expected:<http://example.com/hello>");
=======
"Request URI expected:</hello> was:<https://example.com/bad>"));
this.thrown.expect(AssertionError.class);
this.thrown.expectMessage("Request URI expected:<https://example.com/hello>");
this.manager.validateRequest(request);
>>>>>>>
"Request URI expected:</hello> was:<https://example.com/bad>"));
assertThatExceptionOfType(AssertionError.class)
.isThrownBy(() -> this.manager.validateRequest(request))
.withMessageContaining("Request URI expected:<https://example.com/hello>");
<<<<<<<
assertThatExceptionOfType(AssertionError.class).isThrownBy(
() -> restTemplate.getForEntity("http://spring.io/hello", String.class))
.withMessageContaining(
"expected:<http://example.com/hello> but was:<http://spring.io/hello>");
=======
this.thrown.expect(AssertionError.class);
this.thrown.expectMessage(
"expected:<https://example.com/hello> but was:<https://spring.io/hello>");
restTemplate.getForEntity("https://spring.io/hello", String.class);
>>>>>>>
assertThatExceptionOfType(AssertionError.class).isThrownBy(
() -> restTemplate.getForEntity("https://spring.io/hello", String.class))
.withMessageContaining(
"expected:<https://example.com/hello> but was:<https://spring.io/hello>"); |
<<<<<<<
public void loadClassWhenFilteredOnPackageShouldThrowClassNotFound()
throws Exception {
try (FilteredClassLoader classLoader = new FilteredClassLoader(
FilteredClassLoaderTests.class.getPackage().getName())) {
assertThatExceptionOfType(ClassNotFoundException.class)
.isThrownBy(() -> classLoader.loadClass(getClass().getName()));
}
=======
public void loadClassWhenFilteredOnPackageShouldThrowClassNotFound() throws Exception {
FilteredClassLoader classLoader = new FilteredClassLoader(
FilteredClassLoaderTests.class.getPackage().getName());
this.thrown.expect(ClassNotFoundException.class);
classLoader.loadClass(getClass().getName());
classLoader.close();
>>>>>>>
public void loadClassWhenFilteredOnPackageShouldThrowClassNotFound() throws Exception {
try (FilteredClassLoader classLoader = new FilteredClassLoader(
FilteredClassLoaderTests.class.getPackage().getName())) {
assertThatExceptionOfType(ClassNotFoundException.class)
.isThrownBy(() -> classLoader.loadClass(getClass().getName()));
}
<<<<<<<
try (FilteredClassLoader classLoader = new FilteredClassLoader(
FilteredClassLoaderTests.class)) {
assertThatExceptionOfType(ClassNotFoundException.class)
.isThrownBy(() -> classLoader.loadClass(getClass().getName()));
=======
try (FilteredClassLoader classLoader = new FilteredClassLoader(FilteredClassLoaderTests.class)) {
this.thrown.expect(ClassNotFoundException.class);
classLoader.loadClass(getClass().getName());
>>>>>>>
try (FilteredClassLoader classLoader = new FilteredClassLoader(FilteredClassLoaderTests.class)) {
assertThatExceptionOfType(ClassNotFoundException.class)
.isThrownBy(() -> classLoader.loadClass(getClass().getName())); |
<<<<<<<
LogFileWebEndpoint endpoint(Environment environment) {
return new LogFileWebEndpoint(environment);
=======
public LogFileWebEndpoint endpoint(Environment environment) {
return new LogFileWebEndpoint(LogFile.get(environment), null);
>>>>>>>
LogFileWebEndpoint endpoint(Environment environment) {
return new LogFileWebEndpoint(LogFile.get(environment), null); |
<<<<<<<
public ErrorWebFluxAutoConfiguration(ServerProperties serverProperties) {
=======
private final ApplicationContext applicationContext;
private final ResourceProperties resourceProperties;
private final List<ViewResolver> viewResolvers;
private final ServerCodecConfigurer serverCodecConfigurer;
public ErrorWebFluxAutoConfiguration(ServerProperties serverProperties, ResourceProperties resourceProperties,
ObjectProvider<ViewResolver> viewResolversProvider, ServerCodecConfigurer serverCodecConfigurer,
ApplicationContext applicationContext) {
>>>>>>>
public ErrorWebFluxAutoConfiguration(ServerProperties serverProperties) {
<<<<<<<
=======
this.applicationContext = applicationContext;
this.resourceProperties = resourceProperties;
this.viewResolvers = viewResolversProvider.orderedStream().collect(Collectors.toList());
this.serverCodecConfigurer = serverCodecConfigurer;
>>>>>>>
<<<<<<<
public ErrorWebExceptionHandler errorWebExceptionHandler(
ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
ObjectProvider<ViewResolver> viewResolvers,
ServerCodecConfigurer serverCodecConfigurer,
ApplicationContext applicationContext) {
DefaultErrorWebExceptionHandler exceptionHandler = new DefaultErrorWebExceptionHandler(
errorAttributes, resourceProperties, this.serverProperties.getError(),
applicationContext);
exceptionHandler.setViewResolvers(
viewResolvers.orderedStream().collect(Collectors.toList()));
exceptionHandler.setMessageWriters(serverCodecConfigurer.getWriters());
exceptionHandler.setMessageReaders(serverCodecConfigurer.getReaders());
=======
public ErrorWebExceptionHandler errorWebExceptionHandler(ErrorAttributes errorAttributes) {
DefaultErrorWebExceptionHandler exceptionHandler = new DefaultErrorWebExceptionHandler(errorAttributes,
this.resourceProperties, this.serverProperties.getError(), this.applicationContext);
exceptionHandler.setViewResolvers(this.viewResolvers);
exceptionHandler.setMessageWriters(this.serverCodecConfigurer.getWriters());
exceptionHandler.setMessageReaders(this.serverCodecConfigurer.getReaders());
>>>>>>>
public ErrorWebExceptionHandler errorWebExceptionHandler(ErrorAttributes errorAttributes,
ResourceProperties resourceProperties, ObjectProvider<ViewResolver> viewResolvers,
ServerCodecConfigurer serverCodecConfigurer, ApplicationContext applicationContext) {
DefaultErrorWebExceptionHandler exceptionHandler = new DefaultErrorWebExceptionHandler(errorAttributes,
resourceProperties, this.serverProperties.getError(), applicationContext);
exceptionHandler.setViewResolvers(viewResolvers.orderedStream().collect(Collectors.toList()));
exceptionHandler.setMessageWriters(serverCodecConfigurer.getWriters());
exceptionHandler.setMessageReaders(serverCodecConfigurer.getReaders()); |
<<<<<<<
void testStaticResource() {
ResponseEntity<String> entity = this.restTemplate
.getForEntity("/css/application.css", String.class);
=======
public void testStaticResource() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/css/application.css", String.class);
>>>>>>>
void testStaticResource() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/css/application.css", String.class);
<<<<<<<
void testPublicResource() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/public.txt",
String.class);
=======
public void testPublicResource() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/public.txt", String.class);
>>>>>>>
void testPublicResource() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/public.txt", String.class);
<<<<<<<
void testClassResource() {
ResponseEntity<String> entity = this.restTemplate
.getForEntity("/application.properties", String.class);
=======
public void testClassResource() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application.properties", String.class);
>>>>>>>
void testClassResource() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application.properties", String.class); |
<<<<<<<
for (Class<? extends ServletContextInitializer> initializerType : this.initializerTypes) {
for (Entry<String, ? extends ServletContextInitializer> initializerBean : getOrderedBeansOfType(
beanFactory, initializerType)) {
addServletContextInitializerBean(initializerBean.getKey(),
initializerBean.getValue(), beanFactory);
}
=======
for (Entry<String, ServletContextInitializer> initializerBean : getOrderedBeansOfType(beanFactory,
ServletContextInitializer.class)) {
addServletContextInitializerBean(initializerBean.getKey(), initializerBean.getValue(), beanFactory);
>>>>>>>
for (Class<? extends ServletContextInitializer> initializerType : this.initializerTypes) {
for (Entry<String, ? extends ServletContextInitializer> initializerBean : getOrderedBeansOfType(beanFactory,
initializerType)) {
addServletContextInitializerBean(initializerBean.getKey(), initializerBean.getValue(), beanFactory);
}
<<<<<<<
logger.trace("Added existing " + type.getSimpleName() + " initializer bean '"
+ beanName + "'; order=" + order + ", resource="
+ resourceDescription);
=======
ServletContextInitializerBeans.logger.debug("Added existing " + type.getSimpleName() + " initializer bean '"
+ beanName + "'; order=" + order + ", resource=" + resourceDescription);
>>>>>>>
logger.trace("Added existing " + type.getSimpleName() + " initializer bean '" + beanName + "'; order="
+ order + ", resource=" + resourceDescription);
<<<<<<<
private <T, B extends T> void addAsRegistrationBean(ListableBeanFactory beanFactory,
Class<T> type, Class<B> beanType, RegistrationBeanAdapter<T> adapter) {
List<Map.Entry<String, B>> entries = getOrderedBeansOfType(beanFactory, beanType,
this.seen);
for (Entry<String, B> entry : entries) {
String beanName = entry.getKey();
B bean = entry.getValue();
if (this.seen.add(bean)) {
=======
private <T, B extends T> void addAsRegistrationBean(ListableBeanFactory beanFactory, Class<T> type,
Class<B> beanType, RegistrationBeanAdapter<T> adapter) {
List<Map.Entry<String, B>> beans = getOrderedBeansOfType(beanFactory, beanType, this.seen);
for (Entry<String, B> bean : beans) {
if (this.seen.add(bean.getValue())) {
int order = getOrder(bean.getValue());
String beanName = bean.getKey();
>>>>>>>
private <T, B extends T> void addAsRegistrationBean(ListableBeanFactory beanFactory, Class<T> type,
Class<B> beanType, RegistrationBeanAdapter<T> adapter) {
List<Map.Entry<String, B>> entries = getOrderedBeansOfType(beanFactory, beanType, this.seen);
for (Entry<String, B> entry : entries) {
String beanName = entry.getKey();
B bean = entry.getValue();
if (this.seen.add(bean)) {
<<<<<<<
RegistrationBean registration = adapter.createRegistrationBean(beanName,
bean, entries.size());
int order = getOrder(bean);
=======
RegistrationBean registration = adapter.createRegistrationBean(beanName, bean.getValue(), beans.size());
>>>>>>>
RegistrationBean registration = adapter.createRegistrationBean(beanName, bean, entries.size());
int order = getOrder(bean);
<<<<<<<
if (logger.isTraceEnabled()) {
logger.trace(
"Created " + type.getSimpleName() + " initializer for bean '"
+ beanName + "'; order=" + order + ", resource="
+ getResourceDescription(beanName, beanFactory));
=======
if (ServletContextInitializerBeans.logger.isDebugEnabled()) {
ServletContextInitializerBeans.logger.debug(
"Created " + type.getSimpleName() + " initializer for bean '" + beanName + "'; order="
+ order + ", resource=" + getResourceDescription(beanName, beanFactory));
>>>>>>>
if (logger.isTraceEnabled()) {
logger.trace("Created " + type.getSimpleName() + " initializer for bean '" + beanName + "'; order="
+ order + ", resource=" + getResourceDescription(beanName, beanFactory));
<<<<<<<
private <T> List<Entry<String, T>> getOrderedBeansOfType(
ListableBeanFactory beanFactory, Class<T> type, Set<?> excludes) {
=======
private <T> List<Entry<String, T>> getOrderedBeansOfType(ListableBeanFactory beanFactory, Class<T> type,
Set<?> excludes) {
Comparator<Entry<String, T>> comparator = (o1, o2) -> AnnotationAwareOrderComparator.INSTANCE
.compare(o1.getValue(), o2.getValue());
>>>>>>>
private <T> List<Entry<String, T>> getOrderedBeansOfType(ListableBeanFactory beanFactory, Class<T> type,
Set<?> excludes) { |
<<<<<<<
=======
import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.factory.config.BeanDefinition;
>>>>>>>
import org.springframework.beans.factory.config.BeanDefinition;
<<<<<<<
=======
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
>>>>>>>
import static org.junit.Assert.assertThat;
<<<<<<<
=======
@Test
public void httpMapperPropertiesAreNotAppliedWhenNotConfigured() throws Exception {
this.context.register(JacksonObjectMapperConfig.class,
HttpMessageConvertersAutoConfiguration.class);
this.context.refresh();
MappingJackson2HttpMessageConverter converter = this.context
.getBean(MappingJackson2HttpMessageConverter.class);
assertNull(new DirectFieldAccessor(converter).getPropertyValue("prettyPrint"));
}
@Test
public void httpMapperPropertiesAreAppliedWhenConfigured() throws Exception {
this.context.register(JacksonObjectMapperConfig.class,
HttpMessageConvertersAutoConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context,
"http.mappers.jsonPrettyPrint:true");
this.context.refresh();
MappingJackson2HttpMessageConverter converter = this.context
.getBean(MappingJackson2HttpMessageConverter.class);
assertTrue((Boolean) new DirectFieldAccessor(converter)
.getPropertyValue("prettyPrint"));
}
@Test
public void typeConstrainedConverterDoesNotPreventAutoConfigurationOfJacksonConverter()
throws Exception {
this.context.register(JacksonObjectMapperBuilderConfig.class,
TypeConstrainedConverterConfiguration.class,
HttpMessageConvertersAutoConfiguration.class);
this.context.refresh();
BeanDefinition beanDefinition = this.context
.getBeanDefinition("mappingJackson2HttpMessageConverter");
assertThat(beanDefinition.getFactoryBeanName(),
is(equalTo(MappingJackson2HttpMessageConverterConfiguration.class
.getName())));
}
@Test
public void typeConstrainedConverterFromSpringDataDoesNotPreventAutoConfigurationOfJacksonConverter()
throws Exception {
this.context.register(JacksonObjectMapperBuilderConfig.class,
RepositoryRestMvcConfiguration.class,
HttpMessageConvertersAutoConfiguration.class);
this.context.refresh();
BeanDefinition beanDefinition = this.context
.getBeanDefinition("mappingJackson2HttpMessageConverter");
assertThat(beanDefinition.getFactoryBeanName(),
is(equalTo(MappingJackson2HttpMessageConverterConfiguration.class
.getName())));
}
>>>>>>>
@Test
public void typeConstrainedConverterDoesNotPreventAutoConfigurationOfJacksonConverter()
throws Exception {
this.context.register(JacksonObjectMapperBuilderConfig.class,
TypeConstrainedConverterConfiguration.class,
HttpMessageConvertersAutoConfiguration.class);
this.context.refresh();
BeanDefinition beanDefinition = this.context
.getBeanDefinition("mappingJackson2HttpMessageConverter");
assertThat(beanDefinition.getFactoryBeanName(),
is(equalTo(MappingJackson2HttpMessageConverterConfiguration.class
.getName())));
}
@Test
public void typeConstrainedConverterFromSpringDataDoesNotPreventAutoConfigurationOfJacksonConverter()
throws Exception {
this.context.register(JacksonObjectMapperBuilderConfig.class,
RepositoryRestMvcConfiguration.class,
HttpMessageConvertersAutoConfiguration.class);
this.context.refresh();
Map<String, MappingJackson2HttpMessageConverter> beansOfType = this.context
.getBeansOfType(MappingJackson2HttpMessageConverter.class);
System.out.println(beansOfType);
BeanDefinition beanDefinition = this.context
.getBeanDefinition("mappingJackson2HttpMessageConverter");
assertThat(beanDefinition.getFactoryBeanName(),
is(equalTo(MappingJackson2HttpMessageConverterConfiguration.class
.getName())));
} |
<<<<<<<
void resourceConfigIsCustomizedWithResourceConfigCustomizerBean() {
this.contextRunner.withUserConfiguration(CustomizerConfiguration.class).run((context) -> {
assertThat(context).hasSingleBean(ResourceConfig.class);
ResourceConfig config = context.getBean(ResourceConfig.class);
ResourceConfigCustomizer customizer = context.getBean(ResourceConfigCustomizer.class);
verify(customizer).customize(config);
});
}
@Test
void jerseyApplicationPathIsAutoConfiguredWhenNeeded() {
=======
public void jerseyApplicationPathIsAutoConfiguredWhenNeeded() {
>>>>>>>
void jerseyApplicationPathIsAutoConfiguredWhenNeeded() {
<<<<<<<
@Configuration(proxyBeanMethods = false)
static class CustomizerConfiguration {
@Bean
ResourceConfigCustomizer resourceConfigCustomizer() {
return mock(ResourceConfigCustomizer.class);
}
}
=======
>>>>>>> |
<<<<<<<
void testCss() {
ResponseEntity<String> entity = this.restTemplate
.getForEntity("/css/bootstrap.min.css", String.class);
=======
public void testCss() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/css/bootstrap.min.css", String.class);
>>>>>>>
void testCss() {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/css/bootstrap.min.css", String.class); |
<<<<<<<
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.util.concurrent.DefaultEventExecutor;
=======
import io.netty.channel.unix.Errors.NativeIoException;
>>>>>>>
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.channel.unix.Errors.NativeIoException;
import io.netty.util.concurrent.DefaultEventExecutor;
<<<<<<<
@Override
public boolean shutDownGracefully() {
return this.shutdown.shutDownGracefully();
}
boolean inGracefulShutdown() {
return this.shutdown.isShuttingDown();
}
=======
private boolean isPermissionDenied(Throwable bindExceptionCause) {
try {
if (bindExceptionCause instanceof NativeIoException) {
return ((NativeIoException) bindExceptionCause).expectedErr() == ERROR_NO_EACCES;
}
}
catch (Throwable ex) {
}
return false;
}
>>>>>>>
private boolean isPermissionDenied(Throwable bindExceptionCause) {
try {
if (bindExceptionCause instanceof NativeIoException) {
return ((NativeIoException) bindExceptionCause).expectedErr() == ERROR_NO_EACCES;
}
}
catch (Throwable ex) {
}
return false;
}
@Override
public boolean shutDownGracefully() {
return this.shutdown.shutDownGracefully();
}
boolean inGracefulShutdown() {
return this.shutdown.isShuttingDown();
} |
<<<<<<<
private final Gson gson;
=======
private final QueueGroup callbackQueues;
private final QueueGroup jobQueues;
>>>>>>>
private final Gson gson;
private final QueueGroup callbackQueues;
private final QueueGroup jobQueues;
<<<<<<<
ClusterStoreService clusterStoreService,
JsonSerde jsonSerde) {
=======
ClusterStoreService clusterStoreService,
@Named(Constants.Queue.CALLBACK) QueueGroup callbackQueues,
@Named(Constants.Queue.JOB) QueueGroup jobQueues) {
>>>>>>>
ClusterStoreService clusterStoreService,
JsonSerde jsonSerde,
@Named(Constants.Queue.CALLBACK) QueueGroup callbackQueues,
@Named(Constants.Queue.JOB) QueueGroup jobQueues) {
<<<<<<<
this.gson = jsonSerde.getGson();
=======
this.callbackQueues = callbackQueues;
this.jobQueues = jobQueues;
>>>>>>>
this.gson = jsonSerde.getGson();
this.callbackQueues = callbackQueues;
this.jobQueues = jobQueues;
<<<<<<<
CallbackData callbackData = gson.fromJson(element.getValue(), CallbackData.class);
=======
CallbackData callbackData = GSON.fromJson(gElement.getElement().getValue(), CallbackData.class);
>>>>>>>
CallbackData callbackData = gson.fromJson(gElement.getElement().getValue(), CallbackData.class); |
<<<<<<<
public JmxEndpointDiscoverer jmxAnnotationEndpointDiscoverer(
ParameterValueMapper parameterValueMapper,
ObjectProvider<OperationInvokerAdvisor> invokerAdvisors,
ObjectProvider<EndpointFilter<ExposableJmxEndpoint>> filters) {
=======
public JmxEndpointDiscoverer jmxAnnotationEndpointDiscoverer(ParameterValueMapper parameterValueMapper,
ObjectProvider<Collection<OperationInvokerAdvisor>> invokerAdvisors,
ObjectProvider<Collection<EndpointFilter<ExposableJmxEndpoint>>> filters) {
>>>>>>>
public JmxEndpointDiscoverer jmxAnnotationEndpointDiscoverer(ParameterValueMapper parameterValueMapper,
ObjectProvider<OperationInvokerAdvisor> invokerAdvisors,
ObjectProvider<EndpointFilter<ExposableJmxEndpoint>> filters) {
<<<<<<<
invokerAdvisors.orderedStream().collect(Collectors.toList()),
filters.orderedStream().collect(Collectors.toList()));
=======
invokerAdvisors.getIfAvailable(Collections::emptyList), filters.getIfAvailable(Collections::emptyList));
>>>>>>>
invokerAdvisors.orderedStream().collect(Collectors.toList()),
filters.orderedStream().collect(Collectors.toList()));
<<<<<<<
EndpointObjectNameFactory objectNameFactory = new DefaultEndpointObjectNameFactory(
this.properties, environment, mBeanServer, contextId);
=======
EndpointObjectNameFactory objectNameFactory = new DefaultEndpointObjectNameFactory(this.properties, mBeanServer,
contextId);
>>>>>>>
EndpointObjectNameFactory objectNameFactory = new DefaultEndpointObjectNameFactory(this.properties, environment,
mBeanServer, contextId); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.