buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private static void jj_la1_init_1() {
BasicL.jj_la1_1 = new int[]{ 0 , 0 , 0 , 65536 , 65536 , 0 , 131072 , 16390 , 65536 , 0 , 0 , 0 , 131072 , 540672 , 131072 , 0 , 48 , 48 , 192 , 192 , 16384 , 16390 , 16128 , 16384 , 16128 , 32768 , 16390 , 65536 , 65536 , 0 , 0 , 16384 };
} | private static void jj_la1_init_1() {
BasicL.jj_la1_1 = new int[]{ 0 , 0 , 0 , 65536 , 65536 , 0 , 131072 , 16390 , 65536 , 0 , 0 , 0 , 131072 , 540672 , 131072 , 0 , 16390 , 48 , 48 , 192 , 192 , 16390 , 16128 , 16384 , 16128 , 32768 , 16390 , 65536 , 65536 , 0 , 0 };
} |
private void showToast(final java.lang.String text) {
if (showToastOnRespone) {
((android.app.Activity) (context)).runOnUiThread(new java.lang.Runnable() {
@java.lang.Override
public void run() {
if ((text != null) && ((text.length()) > 0))
android... | private void showToast(final java.lang.String text) {
if (showToastOnRespone) {
if ((context) instanceof android.app.Activity) {
((android.app.Activity) (context)).runOnUiThread(new java.lang.Runnable() {
@java.lang.Override
public void run() {
... |
protected void onResume() {
super.onResume();
boolean isShowWindow = com.dysania.topactivity.SPUtil.isShowWindow(mContext);
mSwShowDetails.setChecked(isShowWindow);
if ((android.os.Build.VERSION.SDK_INT) < (android.os.Build.VERSION_CODES.LOLLIPOP)) {
if (isShowWindow) {
startService(... | protected void onResume() {
super.onResume();
mSwShowDetails.setChecked(com.dysania.topactivity.SPUtil.isShowWindow(mContext));
if (((android.os.Build.VERSION.SDK_INT) >= (android.os.Build.VERSION_CODES.LOLLIPOP)) && ((com.dysania.topactivity.TrackerAccessibilityService.getInstance()) == null)) {
mS... |
public boolean onPreDraw() {
if (!(isInitTextView)) {
return true;
}
textLines = textView.getLineCount();
isExpandNeeded = (textLines) > (expandLines);
isInitTextView = false;
if (isExpandNeeded) {
isShrink = true;
doAnimation(textLines, expandLines, WHAT_ANIMATION_END);
... | public boolean onPreDraw() {
if (!(isInitTextView)) {
return true;
}
textLines = textView.getLineCount();
isExpandNeeded = (textLines) > (expandLines);
isInitTextView = false;
if (isExpandNeeded) {
isShrink = true;
doAnimation(expandLines, expandLines, WHAT_ANIMATION_END)... |
public com.sandbox.runtime.models.SandboxScriptEngine get() {
com.sandbox.runtime.models.SandboxScriptEngine engine = engines.poll();
if (engine == null) {
com.sandbox.runtime.utils.GenericEngineQueue.logger.warn("Had to create engine during processing, engine queue is empty?");
javax.script.Scr... | public com.sandbox.runtime.models.SandboxScriptEngine get() {
com.sandbox.runtime.models.SandboxScriptEngine engine = engines.poll();
if (engine == null) {
javax.script.ScriptEngine scriptEngine = context.getBean(javax.script.ScriptEngine.class);
engine = new com.sandbox.runtime.models.SandboxSc... |
public static void load() {
if (fforganizer.ResourceLoader.loaded)
return ;
if (((fforganizer.networking.ServerService.getListener().isConnected()) && (!(fforganizer.networking.ServerService.getListener().isLoading()))) && (fforganizer.login.Authentication.isLoggedIn())) {
fforganizer.Resou... | public static void load() {
if (fforganizer.ResourceLoader.loaded)
return ;
if (((fforganizer.networking.ServerService.getListener().isConnected()) && (!(fforganizer.networking.ServerService.getListener().isLoading()))) && (fforganizer.login.Authentication.isLoggedIn())) {
fforganizer.Resou... |
public void onProgressChanged(android.widget.SeekBar seekBar, int progress, boolean fromUser) {
if (fromUser) {
android.util.Log.d("Progress", java.lang.String.valueOf(progress));
float newVolume = ((float) (progress)) / 100;
android.util.Log.d("New vol", java.lang.String.valueOf(newVolume))... | public void onProgressChanged(android.widget.SeekBar seekBar, int progress, boolean fromUser) {
if (fromUser) {
float newVolume = ((float) (progress)) / 100;
this.player.setVolumeForSound(((java.lang.String) (seekBar.getTag())), newVolume);
}
} |
public void initView(android.os.Bundle savedInstanceState) {
super.initView(savedInstanceState);
setTitle(R.string.app_name);
mDoubleClickExitHelper = new com.classic.core.utils.DoubleClickExitHelper(mActivity);
checkStoragePermissions();
initTabBar();
com.classic.wages.utils.PgyerUtil.register(... | public void initView(android.os.Bundle savedInstanceState) {
super.initView(savedInstanceState);
setTitle(R.string.app_name);
mDoubleClickExitHelper = new com.classic.core.utils.DoubleClickExitHelper(mActivity);
checkStoragePermissions();
initTabBar(savedInstanceState);
com.classic.wages.utils.P... |
public void update() {
speedX += 0.5 * (Game.Ball.speedIncreasePerFrame);
speedY += 0.5 * (Game.Ball.speedIncreasePerFrame);
Graphics.Vector2f circlePos = circle.getCenter();
circle.move(new Graphics.Vector2f(((float) ((circlePos.x) + (speedX))), ((float) ((circlePos.y) + (speedY)))));
} | public void update() {
speedX += 0.5 * (Game.Ball.speedIncreasePerFrame);
speedY += 0.5 * (Game.Ball.speedIncreasePerFrame);
Graphics.Vector2f circlePos = circle.getCenter();
circle.move(new Graphics.Vector2f(((float) (speedX)), ((float) (speedY))));
} |
public void onClick(android.view.View view) {
switch (view.getId()) {
case R.id.video :
{
java.lang.String message;
if (mIsRecordingVideo) {
message = gcm.play.android.samples.com.gcmquickstart.MainFragment.STOP_RECORDING_MESSAGE;
... | public void onClick(android.view.View view) {
switch (view.getId()) {
case R.id.video :
{
this.mButtonVideo.setEnabled(false);
java.lang.String message;
if (mIsRecordingVideo) {
message = gcm.play.android.samples.com.gcmquicksta... |
public ProcessInfo closest_preceding_finger(int node_id) {
for (int i = 7; i >= 0; i--)
if (this.ft_info[i].contains(this.fingerTable[i].Id))
return this.fingerTable[i];
return this.fingerTable[0];
} | public ProcessInfo closest_preceding_finger(int node_id) {
for (int i = 7; i >= 0; i--)
if (contains(this.fingerTable[i].Id, this.Id, node_id))
return this.fingerTable[i];
return this.fingerTable[0];
} |
public void setModel_withZeroItemsAndLoadingTrue_setsAdapterItemsAndLoading() {
final java.util.List<org.edx.mobile.profiles.BadgeAssertion> items = java.util.Collections.emptyList();
view.setModel(new org.edx.mobile.profiles.UserProfileAccomplishmentsPresenter.ViewModel(items, true));
org.mockito.Mockito.v... | public void setModel_withZeroItemsAndLoadingTrue_setsAdapterItemsAndLoading() {
final java.util.List<org.edx.mobile.profiles.BadgeAssertion> items = java.util.Collections.emptyList();
view.setModel(new org.edx.mobile.profiles.UserProfileAccomplishmentsPresenter.ViewModel(items, true, false));
org.mockito.Mo... |
public static void init(java.lang.String configFile) {
try {
java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
org.radargun.cachewrappers.DCManager.localIp = addr.getHostAddress();
org.radargun.cachewrappers.DCManager.log.warn(("Local Ip is " + (org.radargun.cachewrappers.DCMa... | public static void init(java.lang.String configFile) {
try {
java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
org.radargun.cachewrappers.DCManager.localIp = addr.getHostAddress();
org.radargun.cachewrappers.DCManager.getHashFun();
org.radargun.cachewrappers.DCManager.... |
public static java.lang.String formateDate(int day, int month, int year) {
java.lang.String formatedDate = "";
java.lang.String formatedDay = "";
java.lang.String formatedMonth = "";
if (day < 10)
formatedDay = "0" + day;
else
formatedDay = "" + day;
if (month < 10)
... | public static java.lang.String formateDate(int day, int month, int year) {
java.lang.String formatedDate = "";
java.lang.String formatedDay = "";
java.lang.String formatedMonth = "";
if (day < 10)
formatedDay = "0" + day;
else
formatedDay = "" + day;
if (month < 10)
... |
public final long linecolumn(long pos) {
byteAt(pos);
int offset = ((int) (pos - (this.buffer_offset)));
int count = 0;
int i = offset;
while ((this.buffer[i]) != '\n') {
i--;
count++;
}
return count;
} | public final long linecolumn(long pos) {
byteAt(pos);
int offset = ((int) (pos - (this.buffer_offset)));
int count = 0;
int i = offset;
while ((this.buffer[i]) != '\n') {
i--;
count++;
if (i < 0) {
break;
}
}
return count;
} |
public void drawBackground() {
this.zLevel = -100;
this.drawDefaultBackground();
net.minecraft.client.renderer.GlStateManager.enableAlpha();
net.minecraft.client.renderer.GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
bindTexture(backgroundTexture);
int x = ((width) - (xSize)) / 2;
int y = ((... | public void drawBackground() {
this.zLevel = -100;
this.drawDefaultBackground();
net.minecraft.client.renderer.GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
bindTexture(backgroundTexture);
int x = ((width) - (xSize)) / 2;
int y = ((height) - (ySize)) / 2;
this.zLevel = 0;
drawTexturedMod... |
protected void changePort() {
java.lang.String newPort = ((java.lang.String) (this.portPicker.getSelectedItem()));
if ((newPort != null) && ((newPort.equals("Select a Serial Port")) == false)) {
this.model.setPort(newPort);
this.enableButton.setEnabled(true);
this.calibrateButton.setEnab... | protected void changePort() {
java.lang.String newPort = ((java.lang.String) (this.portPicker.getSelectedItem()));
if ((newPort != null) && ((newPort.equals("Select a Serial Port")) == false)) {
this.model.setPort(newPort);
this.enableButton.setEnabled(true);
this.calibrateButton.setEnab... |
public static java.lang.invoke.CallSite bsm_newBackSpecies(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.String name, java.lang.invoke.MethodType type, java.lang.String owner, java.lang.String genericName) throws java.lang.Throwable {
java.lang.Class<?> frontClass = java.lang.ClassLoader.getSystemClassLoa... | public static java.lang.invoke.CallSite bsm_newBackSpecies(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.invoke.MethodType type, java.lang.String name, java.lang.String owner, java.lang.String genericName) throws java.lang.Throwable {
java.lang.Class<?> frontClass = java.lang.ClassLoader.getSystemClassLoa... |
private void readyScroller() {
if (((scroller) == null) && ((pullTwinkEnable) || (autoLoadingEnable))) {
if ((targetView) instanceof android.support.v7.widget.RecyclerView) {
scroller = android.support.v4.widget.ScrollerCompat.create(getContext(), (scrollInterpolator = getRecyclerDefaultInterpol... | private void readyScroller() {
if (((scroller) == null) && ((pullTwinkEnable) || (autoLoadingEnable))) {
if ((targetView) instanceof android.support.v7.widget.RecyclerView) {
scroller = android.support.v4.widget.ScrollerCompat.create(getContext(), (scrollInterpolator = getRecyclerDefaultInterpol... |
private void initializeView(android.util.AttributeSet attrs, int defStyleAttr) {
if ((attrs != null) && (!(isInEditMode()))) {
final android.content.res.TypedArray attributes = mContext.getTheme().obtainStyledAttributes(attrs, R.styleable.PinCodeView, defStyleAttr, 0);
android.view.LayoutInflater in... | private void initializeView() {
if (!(isInEditMode())) {
android.view.LayoutInflater inflater = ((android.view.LayoutInflater) (mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)));
com.ce.game.screenlocker.view.KeyboardView view = ((com.ce.game.screenlocker.view.KeyboardView) (inflater.infl... |
public org.jLOAF.action.Action getBestRun(java.util.List<org.jLOAF.casebase.ComplexCase> candidateRuns, org.jLOAF.casebase.Case problemRun) {
if ((this.strategy) == null) {
throw new java.lang.RuntimeException("Missing strategy for retrival");
}
org.jLOAF.casebase.ComplexCase.setClassGlobalStrategy(... | public org.jLOAF.action.Action getBestRun(java.util.List<org.jLOAF.casebase.ComplexCase> candidateRuns, org.jLOAF.casebase.Case problemRun) {
if ((this.strategy) == null) {
throw new java.lang.RuntimeException("Missing strategy for retrival");
}
org.jLOAF.casebase.ComplexCase.setClassGlobalStrategy(... |
public me.drton.flightplot.processors.PlotProcessor getProcessorInstance(me.drton.flightplot.ProcessorPreset processorPreset, double skipOut) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException {
java.lang.Class<? ex... | public me.drton.flightplot.processors.PlotProcessor getProcessorInstance(me.drton.flightplot.ProcessorPreset processorPreset, double skipOut) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException {
java.lang.Class<? ex... |
public boolean isValidMove(org.escaperun.game.model.entities.Entity entity, org.escaperun.game.model.Position desiredPosition) {
if (((desiredPosition.x) > (rows)) || ((desiredPosition.y) > (cols)))
return false;
for (org.escaperun.game.model.entities.npc.NPC npc : NPCs) {
if (npc.getCurren... | public boolean isValidMove(org.escaperun.game.model.entities.Entity entity, org.escaperun.game.model.Position desiredPosition) {
if (((desiredPosition.x) > (rows)) || ((desiredPosition.y) > (cols)))
return false;
for (org.escaperun.game.model.entities.npc.NPC npc : NPCs) {
if (npc.getCurren... |
public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
java.lang.String roomNum = ((java.lang.String) (parent.getItemAtPosition(position)));
t.setText(("Item Selected: " + roomNum));
int roomIndex = mP.rooms.indexOf(roomNum);
startPointSet = tru... | public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
if (position != 0) {
java.lang.String roomNum = ((java.lang.String) (parent.getItemAtPosition(position)));
t.setText(("Item Selected: " + roomNum));
int roomIndex = mP.rooms.inde... |
public void createTopic(java.lang.String topic, int clusterId, int numOfPartitions) {
kafka.admin.AdminUtils.createTopic(zkUtils[clusterId], topic, numOfPartitions, 1, new java.util.Properties());
createTopic(topic, zkUtils[clusterId], numOfPartitions);
java.util.List<kafka.server.KafkaServer> servers = new... | public void createTopic(java.lang.String topic, int clusterId, int numOfPartitions) {
createTopic(topic, zkUtils[clusterId], numOfPartitions);
java.util.List<kafka.server.KafkaServer> servers = new java.util.ArrayList<kafka.server.KafkaServer>();
servers.add(kafkaServer[clusterId]);
kafka.utils.TestUtil... |
private void doFindMoveTest(boolean expectMove) {
try {
com.fluxchess.jcpi.models.GenericMove selectedMove = classUnderTest.findMove();
if (expectMove)
assertTrue(selectedMove.equals(expectedMove));
else
assertFalse(selectedMove.equals(expectedMove));
} c... | private void doFindMoveTest(boolean expectMove) {
try {
com.fluxchess.jcpi.models.GenericMove selectedMove = classUnderTest.findMove();
if (expectMove)
assertTrue(selectedMove.equals(expectedMove));
else
assertFalse(selectedMove.equals(expectedMove));
} c... |
private int findSingleCommon(int[] sqList, int[] rowList, int[] colList) throws java.lang.Exception {
if (!(isInitialized)) {
throw new java.lang.Exception("Class not initialized, playfield not set");
}
int[] result = findCommons(sqList, rowList, colList);
if (result != null) {
if ((resu... | public int findSingleCommon(int[] sqList, int[] rowList, int[] colList) throws java.lang.Exception {
if (!(isInitialized)) {
throw new java.lang.Exception("Class not initialized, playfield not set");
}
int[] result = findCommons(sqList, rowList, colList);
if (result != null) {
if ((resul... |
public lab.mars.m2m.m2msmartofficephone.model.Result<java.lang.Boolean> apply(@io.reactivex.annotations.NonNull
retrofit2.Response<lab.mars.m2m.m2msmartofficephone.model.m2m.PrimitiveContentType> admin, @io.reactivex.annotations.NonNull
retrofit2.Response<lab.mars.m2m.m2msmartofficephone.model.m2m.PrimitiveContentType>... | public lab.mars.m2m.m2msmartofficephone.model.Result<java.lang.Boolean> apply(@io.reactivex.annotations.NonNull
retrofit2.Response<lab.mars.m2m.m2msmartofficephone.model.m2m.PrimitiveContentType> admin, @io.reactivex.annotations.NonNull
retrofit2.Response<lab.mars.m2m.m2msmartofficephone.model.m2m.PrimitiveContentType>... |
private void construct() {
this.add(new javafx.geometry.Point3D(1, 0, 1));
this.add(new javafx.geometry.Point3D(2, 0, 1));
this.add(new javafx.geometry.Point3D(0, 0, 0));
this.add(new javafx.geometry.Point3D(0, 0, 1));
this.add(new javafx.geometry.Point3D(0, 0, 2));
} | protected void construct() {
this.add(new javafx.geometry.Point3D(1, 0, 1));
this.add(new javafx.geometry.Point3D(2, 0, 1));
this.add(new javafx.geometry.Point3D(0, 0, 0));
this.add(new javafx.geometry.Point3D(0, 0, 1));
this.add(new javafx.geometry.Point3D(0, 0, 2));
} |
protected void nextLess() {
source.nextChar();
if ((source.getChar()) == '>') {
token = lessGreaterToken;
source.nextChar();
}else
if ((source.getChar()) == '=') {
token = lessEqualToken;
source.nextChar();
}else {
token = lessToken;
... | private void nextLess() {
source.nextChar();
if ((source.getChar()) == '>') {
token = lessGreaterToken;
source.nextChar();
}else
if ((source.getChar()) == '=') {
token = lessEqualToken;
source.nextChar();
}else {
token = lessToken;
... |
private void handleSignInResult(com.google.android.gms.auth.api.signin.GoogleSignInResult result) {
if (result.isSuccess()) {
com.google.android.gms.auth.api.signin.GoogleSignInAccount acct = result.getSignInAccount();
firebaseAuthWithGoogle(acct);
android.content.Intent intent = new android... | private void handleSignInResult(com.google.android.gms.auth.api.signin.GoogleSignInResult result) {
if (result.isSuccess()) {
com.google.android.gms.auth.api.signin.GoogleSignInAccount acct = result.getSignInAccount();
firebaseAuthWithGoogle(acct);
android.content.Intent intent = new android... |
public static void startTracer(java.lang.String ip, int port, java.lang.String serviceName, com.github.kristofa.brave.SpanCollector spanCollector, final com.sina.amp.trace.hunter.TraceFilters traceFilters) {
try {
com.sina.amp.trace.hunter.Hunter.startTracer(ip, port, serviceName, spanCollector, traceFilter... | public static void startTracer(java.lang.String ip, int port, java.lang.String serviceName, com.github.kristofa.brave.SpanCollector spanCollector, final com.sina.amp.trace.hunter.TraceFilters traceFilters) {
try {
com.sina.amp.trace.hunter.Hunter.startTracer(ip, port, serviceName, spanCollector, traceFilter... |
public void sellProperty(edu.ncsu.monopoly.Cell property, int amount) {
property.setOwner(null);
try {
if (property instanceof edu.ncsu.monopoly.PropertyCell) {
properties.remove(property);
}
if (property instanceof edu.ncsu.monopoly.RailRoadCell) {
railroads.remo... | public void sellProperty(edu.ncsu.monopoly.Cell property, int amount) {
property.setOwner(null);
try {
if (property instanceof edu.ncsu.monopoly.PropertyCell) {
properties.remove(property);
}
if (property instanceof edu.ncsu.monopoly.RailRoadCell) {
railroads.remo... |
public void onClick(android.view.View v) {
android.app.Activity parentActivity = getActivity();
if (parentActivity instanceof it.polito.mad.countonme.interfaces.IActionReportBack) {
android.os.Bundle bundle = new android.os.Bundle();
bundle.putString(AppConstants.SHARING_ACTIVITY_KEY, ((java.lan... | public void onClick(android.view.View v) {
android.app.Activity parentActivity = getActivity();
if (parentActivity instanceof it.polito.mad.countonme.interfaces.IActionReportBack) {
android.os.Bundle bundle = new android.os.Bundle();
bundle.putString(AppConstants.SHARING_ACTIVITY_KEY, ((java.lan... |
private void backpropogate(java.util.Stack<Experiment.MTreeNode> stack, double eval, boolean proven) {
Experiment.MTreeNode node = stack.pop();
if (proven) {
node.lower = node.upper = java.lang.Math.round(eval);
for (Experiment.MTreeNode parent : node.parents.keySet()) {
propagateBou... | private void backpropogate(java.util.Stack<Experiment.MTreeNode> stack, double eval, boolean proven) {
Experiment.MTreeNode node = stack.pop();
if (proven) {
node.lower = node.upper = java.lang.Math.round(eval);
for (Experiment.MTreeNode parent : node.parents) {
propagateBound(parent... |
private void updateSpeed() {
float gearmaxspeed = this.getGearMaxSpeed();
float currentspeed = bus.getCurrentSISpeed();
float currentacc = bus.getAcceleration();
float newspeed = java.lang.Math.max(0, java.lang.Math.min((currentspeed + currentacc), gearmaxspeed));
if ((bus.getGearPosition()) == (Bus... | public void updateSpeed() {
float gearmaxspeed = this.getGearMaxSpeed();
float currentspeed = bus.getCurrentSISpeed();
float currentacc = bus.getAcceleration();
float newspeed = java.lang.Math.max(0, java.lang.Math.min((currentspeed + currentacc), gearmaxspeed));
if ((bus.getGearPosition()) == (Bus.... |
private void showSnackbar(java.lang.String message) {
android.support.design.widget.Snackbar.make(parentLayout, "This is main activity", Snackbar.LENGTH_LONG).setAction("CLOSE", new android.view.View.OnClickListener() {
@java.lang.Override
public void onClick(android.view.View view) {
}
... | private void showSnackbar(java.lang.String message) {
android.support.design.widget.Snackbar.make(parentLayout, message, Snackbar.LENGTH_LONG).setAction("CLOSE", new android.view.View.OnClickListener() {
@java.lang.Override
public void onClick(android.view.View view) {
}
}).setActionText... |
private java.lang.String sha256(java.lang.String original) throws java.security.NoSuchAlgorithmException {
java.security.MessageDigest md = java.security.MessageDigest.getInstance("SHA-256");
md.update(original.getBytes());
byte[] digest = md.digest();
return new java.lang.String(org.apache.commons.code... | public static java.lang.String sha256(java.lang.String original) throws java.security.NoSuchAlgorithmException {
java.security.MessageDigest md = java.security.MessageDigest.getInstance("SHA-256");
md.update(original.getBytes());
byte[] digest = md.digest();
return new java.lang.String(org.apache.common... |
public void run() {
super.run();
if (this.isTimepointsGraph) {
this.graphPanel = this.prepareTimepointsGraph(this.maxT);
}else {
this.graphPanel = this.prepareTracksGraph(false);
}
this.updateStatus(true);
} | public void run() {
super.run();
if (this.isTimepointsGraph) {
this.graphPanel = this.prepareTimepointsGraph(this.maxT);
}else {
this.graphPanel = this.prepareTracksGraph(true);
}
this.updateStatus(true);
} |
protected org.eclipse.rdf4j.model.Model getById(java.lang.String prefix, java.lang.String type, java.lang.String id) {
java.lang.String url = (!(id.isEmpty())) ? (((prefix + type) + "/") + id) + "#id" : (prefix + type) + "#id";
return be.belgif.vocab.helpers.QueryHelper.get(repo, be.belgif.vocab.helpers.QueryHe... | protected org.eclipse.rdf4j.model.Model getById(java.lang.String prefix, java.lang.String type, java.lang.String id) {
java.lang.String url = (!(id.isEmpty())) ? (((prefix + type) + "/") + id) + "#id" : (prefix + type) + "#id";
java.lang.System.err.println(url);
return be.belgif.vocab.helpers.QueryHelper.ge... |
private boolean sameEntries(int[] otherArray) {
boolean same = true;
for (int index = 0; index < (bagSize); index++) {
if ((!(contains(bag[index], otherArray))) && (!(contains(otherArray[index], bag)))) {
same = false;
}
}
return same;
} | private boolean sameEntries(int[] otherArray) {
boolean same = true;
for (int index = 0; index < (bagSize); index++) {
if ((!(contains(bag[index], otherArray))) || (!(contains(otherArray[index], bag)))) {
same = false;
}
}
return same;
} |
public void undo() {
if (history.isEmpty()) {
return ;
}
basic.Move move = history.pop();
win = false;
for (int z = 1; z <= (N); z++) {
if ((board[move.s][z]) != 0) {
board[move.s][z] = 0;
return ;
}
}
} | public void undo() {
if (history.isEmpty()) {
return ;
}
basic.Move move = history.pop();
win = false;
for (int z = (N) - 1; z >= 0; z--) {
if ((board[move.s][z]) != 0) {
board[move.s][z] = 0;
return ;
}
}
} |
public void add(seedu.ticktask.model.task.ReadOnlyTask toAdd) throws seedu.ticktask.model.task.exceptions.DuplicateTaskException {
java.util.Objects.requireNonNull(toAdd);
if (contains(toAdd)) {
throw new seedu.ticktask.model.task.exceptions.DuplicateTaskException();
}
if ((toAdd.getTaskType().t... | public void add(seedu.ticktask.model.task.ReadOnlyTask toAdd) throws seedu.ticktask.model.task.exceptions.DuplicateTaskException {
java.util.Objects.requireNonNull(toAdd);
if (contains(toAdd)) {
throw new seedu.ticktask.model.task.exceptions.DuplicateTaskException();
}
if ((toAdd.getTaskType().t... |
public void onSongClick(co.itgen.mginshe.tunecache.Song song, android.view.View view, int pos) {
if (m_serviceIsBound) {
if (!(m_mediaService.getListName().equals("ALL"))) {
m_mediaService.setSongList(m_media.getSongs());
m_mediaService.setListName("ALL");
m_mediaService.... | public void onSongClick(co.itgen.mginshe.tunecache.Song song, android.view.View view, int pos) {
if (m_serviceIsBound) {
if (!(m_mediaService.getListName().equals("ALL"))) {
m_mediaService.setSongList(m_media.getSongs());
m_mediaService.setListName("ALL");
}
m_mediaSe... |
private void initializeVariables() {
complimentsArray = getResources().getStringArray(R.array.compliments_string_array);
complimentsSize = complimentsArray.length;
randomGen = new java.util.Random();
complimentIndex = randomGen.nextInt(complimentsSize);
compliment = complimentsArray[complimentIndex]... | private void initializeVariables() {
complimentsArray = getResources().getStringArray(R.array.compliments_string_array);
complimentsSize = complimentsArray.length;
randomGen = new java.util.Random();
lightColorArray = getResources().getStringArray(R.array.light_colors);
colorsSize = lightColorArray.... |
public org.apache.beam.sdk.values.PCollection<T> apply(final org.apache.beam.sdk.values.PCollection<T> col) {
col.apply(org.apache.beam.sdk.transforms.ParDo.named("Debug.Do").of(new org.apache.beam.sdk.transforms.DoFn<T, T>() {
@java.lang.Override
public void processElement(final org.apache.beam.con... | public org.apache.beam.sdk.values.PCollection<T> apply(final org.apache.beam.sdk.values.PCollection<T> col) {
col.apply("Debug.Do", org.apache.beam.sdk.transforms.ParDo.of(new org.apache.beam.sdk.transforms.DoFn<T, T>() {
@java.lang.Override
public void processElement(final org.apache.beam.contrib.t... |
public void setTrainID(int trainID) {
this.trainID = trainID;
trainName = new me.kk47.modeltrains.math.ScrollingName(net.minecraft.client.resources.I18n.format(((me.kk47.modeltrains.items.trains.TrainRegistry.getTrain(trainID).getUnlocalizedName()) + ".name")), 12);
stack = new net.minecraft.item.ItemStack(... | public void setTrainID(int trainID) {
this.trainID = trainID;
trainName = new me.kk47.modeltrains.math.ScrollingName(net.minecraft.client.resources.I18n.format(((me.kk47.modeltrains.items.trains.TrainRegistry.getTrain(trainID).asItem().getUnlocalizedName()) + ".name")), 12);
stack = new net.minecraft.item.I... |
public static java.awt.Image resize(java.awt.Image img, int height, int width) {
java.awt.Image tempImage = img;
java.awt.image.BufferedImage resized = new java.awt.image.BufferedImage(width, height, java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE);
java.awt.Graphics2D imageGr = ((java.awt.Graphics2D) (resiz... | public static java.awt.Image resize(java.awt.Image img, int height, int width) {
java.awt.Image tempImage = img;
java.awt.image.BufferedImage resized = new java.awt.image.BufferedImage(width, height, java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE);
java.awt.Graphics2D imageGr = ((java.awt.Graphics2D) (resiz... |
public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_step_details);
com.stickyblob.bakingapp.fragments.StepDetailFragment stepDetailFragment = new com.stickyblob.bakingapp.fragments.StepDetailFragment();
android.support.v4.app.... | public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_step_details);
if (savedInstanceState == null) {
com.stickyblob.bakingapp.fragments.StepDetailFragment stepDetailFragment = new com.stickyblob.bakingapp.fragments.StepDet... |
public com.shandong.human.resource.util.Result newsAdd(org.springframework.ui.Model model, com.shandong.human.resource.domain.News news, javax.servlet.http.HttpSession httpSession) {
news.setUserId(10);
java.lang.Integer id = newsService.addNews(news);
if (id > 0) {
return new com.shandong.human.res... | public com.shandong.human.resource.util.Result newsAdd(org.springframework.ui.Model model, com.shandong.human.resource.domain.News news, javax.servlet.http.HttpSession httpSession) {
news.setUserId(10);
java.lang.Integer id = newsService.addNews(news);
if (id >= 0) {
return new com.shandong.human.re... |
public void onSuccess(org.json.JSONObject object) {
try {
currentRide = new io.kuzzle.sdk.core.KuzzleDocument(rideCollection, object);
manageRideProposal();
} catch (java.io.IOException e) {
e.printStackTrace();
} catch (org.json.JSONException e) {
e.printStackTrace();
} ... | public void onSuccess(org.json.JSONObject object) {
try {
currentRide = new io.kuzzle.sdk.core.KuzzleDocument(rideCollection, object);
manageRideProposal();
} catch (java.io.IOException e) {
e.printStackTrace();
} catch (org.json.JSONException e) {
e.printStackTrace();
}
... |
public void setAvroType(java.lang.String avroTypeDesc) {
for (int i = 0; i < (org.inquidia.kettle.plugins.avrooutput.AvroOutputField.avroDescriptions.length); i++) {
if (avroTypeDesc.equalsIgnoreCase(org.inquidia.kettle.plugins.avrooutput.AvroOutputField.avroDescriptions[i])) {
this.avroType = i... | public void setAvroType(java.lang.String avroTypeDesc) {
for (int i = 0; i < (org.inquidia.kettle.plugins.avrooutput.AvroOutputField.avroDescriptions.length); i++) {
if (avroTypeDesc.equalsIgnoreCase(org.inquidia.kettle.plugins.avrooutput.AvroOutputField.avroDescriptions[i])) {
this.avroType = i... |
public void invoke() throws java.lang.Throwable {
java.util.List<models.Admin> lis = Global.dao.findAllByClassName(models.Admin.class.getName());
if ((lis.size()) < 3) {
models.Admin a = new models.Admin("anelroute", "AnelRest15kk");
models.Usuario u = new models.Usuario("Teste", "111.111.111-11... | public void invoke() throws java.lang.Throwable {
java.util.List<models.Admin> lis = Global.dao.findAllByClassName(models.Admin.class.getName());
if ((lis.size()) < 1) {
models.Admin a = new models.Admin("anelroute", "AnelRest15kk");
models.Usuario u = new models.Usuario("Teste", "111.111.111-11... |
protected void onNextButtonClicked() {
CURRENT_PAGE = mViewPager.getCurrentItem();
android.util.Log.d("CURRENT", java.lang.String.valueOf(CURRENT_PAGE));
if (resolveNavigation()) {
stepper.ivb.com.sample.library.stepperFragment current = ((stepper.ivb.com.sample.library.stepperFragment) (fragmentAda... | protected void onNextButtonClicked() {
CURRENT_PAGE = mViewPager.getCurrentItem();
if (resolveNavigation()) {
stepper.ivb.com.sample.library.stepperFragment current = ((stepper.ivb.com.sample.library.stepperFragment) (fragmentAdapter.getItem(CURRENT_PAGE)));
if ((current != null) && (current.onN... |
public java.util.ArrayList<fi.jyu.task3.review.Review> getReviewsList(fi.jyu.task3.movie.Movie movie) {
java.util.ArrayList<fi.jyu.task3.review.Review> list = new java.util.ArrayList<fi.jyu.task3.review.Review>();
for (fi.jyu.task3.review.Review review : reviewsList) {
if ((review.getMovie()) == movie) ... | public java.util.ArrayList<fi.jyu.task3.review.Review> getReviewsList(fi.jyu.task3.movie.Movie movie) {
java.util.ArrayList<fi.jyu.task3.review.Review> list = new java.util.ArrayList<fi.jyu.task3.review.Review>();
for (fi.jyu.task3.review.Review review : reviewsList) {
if ((review != null) && ((review.g... |
public void print(java.lang.String s) {
appendConsole(s, style);
console.setCaretPosition(console.getDocument().getLength());
if ((trayMessageType) != null) {
trayIcon.displayMessage(((s.substring(0, ((s.length()) > 25 ? 25 : s.length()))) + "..."), s, trayMessageType);
}
} | public void print(java.lang.String s) {
appendConsole(s, style);
console.setCaretPosition(console.getDocument().getLength());
if (((trayMessageType) != null) && ((trayIcon) != null)) {
trayIcon.displayMessage(((s.substring(0, ((s.length()) > 25 ? 25 : s.length()))) + "..."), s, trayMessageType);
... |
public static boolean buy(org.bukkit.entity.Player player) {
java.lang.String name = player.getName();
if ((com.codisimus.plugins.chunkown.Econ.economy) != null) {
if (!(com.codisimus.plugins.chunkown.Econ.economy.has(name, com.codisimus.plugins.chunkown.Econ.buyPrice))) {
player.sendMessage... | public static boolean buy(org.bukkit.entity.Player player) {
java.lang.String name = player.getName();
if ((com.codisimus.plugins.chunkown.Econ.economy) != null) {
if (!(com.codisimus.plugins.chunkown.Econ.economy.has(name, com.codisimus.plugins.chunkown.Econ.buyPrice))) {
player.sendMessage... |
public double pow(double x, int n) {
double ret;
if (0 == n) {
ret = 1;
}else
if (n < 0) {
ret = 1.0 / (pow(x, (0 - n)));
}else {
double half = pow(x, (n / 2));
ret = half * half;
if ((n % 2) == 1) {
ret *= x;
... | public double pow(double x, long n) {
double ret;
if (0 == n) {
ret = 1;
}else
if (n < 0) {
ret = 1.0 / (pow(x, (0 - n)));
}else {
double half = pow(x, (n / 2));
ret = half * half;
if ((n % 2) == 1) {
ret *= x;
... |
public void test_build() {
io.nlopez.smartadapters.builders.DefaultBindableLayoutBuilder builder = new io.nlopez.smartadapters.builders.DefaultBindableLayoutBuilder();
int viewType = io.nlopez.smartadapters.utils.Mapper.viewTypeFromViewClass(builder.viewType(mockModel, 0, mapper));
android.view.View bindabl... | public void test_build() {
io.nlopez.smartadapters.builders.DefaultBindableLayoutBuilder builder = new io.nlopez.smartadapters.builders.DefaultBindableLayoutBuilder();
int viewType = mapper.viewTypeFromViewClass(builder.viewType(mockModel, 0, mapper));
android.view.View bindableLayout = builder.build(parent... |
public void step(neutrality.NeutralityModel model, int step, java.util.Optional<java.lang.Double> substep) {
if (step == 0)
super.step(model, step, substep);
double toInvest = getSectorInvestment(model.getMarketInformation((step - 1)));
makeContentInvestment(step, toInvest);
} | public void step(neutrality.NeutralityModel model, int step, java.util.Optional<java.lang.Double> substep) {
if (step == 0) {
super.step(model, step, substep);
}else {
double toInvest = getSectorInvestment(model.getMarketInformation((step - 1)));
makeContentInvestment(step, toInvest);
... |
protected int get_delta(double d) {
if ((is_satisfied()) && ((java.lang.Double.compare(d, 0)) != 0)) {
return 1;
}else {
if ((java.lang.Double.compare(((left_exp.get_value()) + d), c)) != 0) {
return -1;
}else {
return 0;
}
}
} | protected int get_delta(double d) {
if (is_satisfied()) {
return (java.lang.Double.compare(((left_exp.get_value()) + d), c)) != 0 ? 0 : 1;
}else {
return (java.lang.Double.compare(((left_exp.get_value()) + d), c)) != 0 ? -1 : 0;
}
} |
private void pressedNum(javafx.event.ActionEvent event) {
if (!(start)) {
output.setText("");
start = true;
}else {
java.lang.String value = ((javafx.scene.control.Button) (event.getSource())).getText();
output.setText(((output.getText()) + value));
}
} | private void pressedNum(javafx.event.ActionEvent event) {
if (!(start)) {
output.setText("");
start = true;
}
java.lang.String value = ((javafx.scene.control.Button) (event.getSource())).getText();
output.setText(((output.getText()) + value));
} |
private void fixTextviewLayoutSize() {
android.widget.RelativeLayout ll_a = ((android.widget.RelativeLayout) (findViewById(R.id.answer_selector)));
tv_questionIn.setText("TEST\nTEST\nTEST\nTEST\nTEST");
tv_questionOut.setText("TEST\nTEST\nTEST\nTEST\nTEST");
h = tv_questionIn.getHeight();
findViewBy... | private void fixTextviewLayoutSize() {
tv_questionIn.setText("TEST\nTEST\nTEST\nTEST\nTEST");
tv_questionOut.setText("TEST\nTEST\nTEST\nTEST\nTEST");
h = tv_questionIn.getHeight();
findViewById(R.id.rl_question_container).getLayoutParams().height = h;
findViewById(R.id.rl_question_container).request... |
public void readFiles() {
br.ufrn.imd.dao.MusicDAO musicDAO = new br.ufrn.imd.dao.MusicDAO();
musicDAO.setMusics(this.readMusicsFile());
br.ufrn.imd.dao.PlaylistDAO playlistDAO = new br.ufrn.imd.dao.PlaylistDAO();
playlistDAO.setPlaylists(this.readPlaylistsFile());
br.ufrn.imd.dao.UserDAO userDAO = ... | public void readFiles() {
br.ufrn.imd.dao.MusicDAO musicDAO = new br.ufrn.imd.dao.MusicDAO();
musicDAO.setMusics(this.readMusicsFile());
br.ufrn.imd.dao.UserDAO userDAO = new br.ufrn.imd.dao.UserDAO();
userDAO.setUsers(this.readUsersFile());
br.ufrn.imd.dao.PlaylistDAO playlistDAO = new br.ufrn.imd.... |
public javax.ws.rs.core.Response highScoreResults(@javax.ws.rs.PathParam(value = "parameter")
int parameter, @javax.ws.rs.DefaultValue(value = "Login Succesful")
@javax.ws.rs.QueryParam(value = "value")
java.lang.String value, @javax.ws.rs.core.Context
javax.servlet.http.HttpServletRequest request) {
java.lang.Stri... | public javax.ws.rs.core.Response highScoreResults(@javax.ws.rs.PathParam(value = "parameter")
int parameter, @javax.ws.rs.DefaultValue(value = "Login Succesful")
@javax.ws.rs.QueryParam(value = "value")
java.lang.String value) {
java.lang.String listHighScores = getListHighScores(parameter, context);
java.lang.... |
public CheckTypeVisitor.Result infer(com.jetbrains.jetpad.vclang.term.Abstract.BinOpExpression expr, com.jetbrains.jetpad.vclang.typechecking.implicitargs.Expression expectedType) {
com.jetbrains.jetpad.vclang.term.Concrete.Position position = (expr instanceof com.jetbrains.jetpad.vclang.term.Concrete.Expression) ?... | public CheckTypeVisitor.Result infer(com.jetbrains.jetpad.vclang.term.Abstract.BinOpExpression expr, com.jetbrains.jetpad.vclang.typechecking.implicitargs.Expression expectedType) {
com.jetbrains.jetpad.vclang.term.Concrete.Position position = (expr instanceof com.jetbrains.jetpad.vclang.term.Concrete.Expression) ?... |
public net.ukr.bior.Lesson2.HW.L1.Student findStudent(java.lang.String secondName) {
for (int i = 0; i < (gr.length); i++) {
if (gr[i].getSecondName().equals(secondName)) {
return gr[i];
}
}
return null;
} | public net.ukr.bior.Lesson2.HW.L1.Student findStudent(java.lang.String secondName) throws java.lang.NullPointerException {
for (int i = 0; i < (gr.length); i++) {
if ((gr[i]) == null) {
continue;
}
if (gr[i].getSecondName().equals(secondName)) {
return gr[i];
... |
public int[] setGuess(int[] guess) {
if (_masterOrGuesser) {
java.util.ArrayList<java.lang.Integer> a1 = algorithm.guess(_gameBoard[_currentTurn], _pegsBoard[_currentTurn]);
for (int i = 0; i < 4; i++)
_currGuess[i] = a1.get(i);
}else {
super.setGuess(guess);
}
... | public int[] setGuess(int[] guess) {
if (!(_masterOrGuesser)) {
java.util.ArrayList<java.lang.Integer> a1 = algorithm.guess(_gameBoard[_currentTurn], _pegsBoard[_currentTurn]);
for (int i = 0; i < 4; i++)
_currGuess[i] = a1.get(i);
}else {
super.setGuess(guess);
... |
public static int[] toArray(com.jntu.model.BSTNode node, int i, int[] arrayForm) {
if (node == null)
return arrayForm;
arrayForm[i] = node.data;
com.jntu.model.BSTNode.toArray(node.leftNode, ((2 * i) + 1), arrayForm);
com.jntu.model.BSTNode.toArray(node.rightNode, ((2 * i) + 2), arrayForm);... | public static int[] toArray(com.jntu.model.BSTNode node, int i, int[] arrayForm) {
if (node == null)
return arrayForm;
if (i >= (arrayForm.length))
return arrayForm;
arrayForm[i] = node.data;
com.jntu.model.BSTNode.toArray(node.leftNode, ((2 * i) + 1), arrayForm);
com.jntu.... |
public java.lang.String getEvalStatsAlertFilter(java.lang.Long functionId, java.lang.Long startTimeIso, java.lang.Long endTimeIso) throws java.lang.Exception {
org.apache.http.client.methods.HttpPost req = new org.apache.http.client.methods.HttpPost((((((((com.linkedin.thirdeye.anomaly.utils.DetectionResourceHttpUt... | public java.lang.String getEvalStatsAlertFilter(java.lang.Long functionId, java.lang.Long startTime, java.lang.Long endTime) throws java.lang.Exception {
org.apache.http.client.methods.HttpPost req = new org.apache.http.client.methods.HttpPost((((((((com.linkedin.thirdeye.anomaly.utils.DetectionResourceHttpUtils.DE... |
public com.chenenyu.router.IRouter with(android.os.Bundle bundle) {
if ((bundle != null) && (bundle.isEmpty())) {
android.os.Bundle allBundle = mRouteRequest.getExtras();
if (allBundle == null) {
allBundle = new android.os.Bundle();
}
allBundle.putAll(bundle);
mRo... | public com.chenenyu.router.IRouter with(android.os.Bundle bundle) {
if ((bundle != null) && (!(bundle.isEmpty()))) {
android.os.Bundle allBundle = mRouteRequest.getExtras();
if (allBundle == null) {
allBundle = new android.os.Bundle();
}
allBundle.putAll(bundle);
... |
public void update(float dt) {
updateProjectiles(dt);
handleProjectileCollision(dt);
handleGameObjects();
handleContactDamage(dt);
proc.queryInput();
player.update(dt);
updateEnemies(dt);
if ((enemies.isEmpty()) || (player.isDead())) {
game.gameOver();
}
} | public void update(float dt) {
updateProjectiles(dt);
handleProjectileCollision(dt);
handleGameObjects();
handleContactDamage(dt);
proc.queryInput();
player.update(dt);
updateEnemies(dt);
if ((enemies.isEmpty()) || (player.isDead())) {
}
} |
public void sendMessage(java.lang.String message, java.io.DataOutputStream dos) throws java.lang.Exception {
dos.writeUTF((((((Testing3.ClientComm.sender) + ":SEND:") + (Testing3.ClientComm.rcvr)) + ":") + message));
dos.flush();
dos.close();
} | public void sendMessage(java.lang.String message, java.io.DataOutputStream dos) throws java.lang.Exception {
message += "\n";
dos.writeUTF((((((Testing3.ClientComm.sender) + ":SEND:") + (Testing3.ClientComm.rcvr)) + ":") + message));
dos.flush();
dos.close();
} |
public void årligPremie() {
premie = 0;
java.util.Iterator<Forsikring> iterator = forsikringer.iterator();
while (iterator.hasNext()) {
if (iterator.next().getGyldig().equals(true))
premie += iterator.next().getPremie();
}
if (totalkunde)
premie *= 0.9;
} | public void årligPremie() {
premie = 0;
java.util.Iterator<Forsikring> iterator = forsikringer.iterator();
while (iterator.hasNext()) {
premie += iterator.next().getPremie();
}
if (totalkunde)
premie *= 0.9;
} |
public static cz.GravelCZLP.TracerBlocker.Loader getLoaderByVersion(java.lang.String version, cz.GravelCZLP.TracerBlocker.TracerBlocker tracerBlocker, com.comphenix.protocol.ProtocolManager protocolManager) {
for (cz.GravelCZLP.TracerBlocker.Version ver : cz.GravelCZLP.TracerBlocker.Version.values()) {
if (... | public static cz.GravelCZLP.TracerBlocker.Loader getLoaderByVersion(java.lang.String version, cz.GravelCZLP.TracerBlocker.TracerBlocker tracerBlocker, com.comphenix.protocol.ProtocolManager protocolManager) {
for (cz.GravelCZLP.TracerBlocker.Version ver : cz.GravelCZLP.TracerBlocker.Version.values()) {
if (... |
public void addIssue() throws java.io.IOException {
java.lang.System.out.println("addIssue");
javax.faces.context.FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();
context.addMessage(null, new javax.faces.application.FacesMessage(enquirySessionBeanLocal.addNewCaseIssue(caseId, de... | public void addIssue() throws java.io.IOException {
java.lang.System.out.println("addIssue");
javax.faces.context.FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();
context.addMessage(null, new javax.faces.application.FacesMessage(enquirySessionBeanLocal.addNewCaseIssue(caseId, de... |
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == (com.padc.interactive_training.activities.RegisteredCourseDetailActivity.RC_COURSE_FLOW)) {
if (((com.padc.interactive_training.data.mode... | public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == (com.padc.interactive_training.activities.RegisteredCourseDetailActivity.RC_COURSE_FLOW)) {
if ((((com.padc.interactive_training.data.mod... |
public boolean reset() {
if ((proxy) != null) {
try {
proxy.resetProxy();
this.firstNonHmiNone = true;
return true;
} catch (com.smartdevicelink.exception.SdlException e1) {
e1.printStackTrace();
if ((proxy) == null) {
retur... | public boolean reset() {
this.firstNonHmiNone = true;
if ((proxy) != null) {
try {
proxy.resetProxy();
return true;
} catch (com.smartdevicelink.exception.SdlException e1) {
e1.printStackTrace();
if ((proxy) == null) {
return false;... |
private int getFirstStartPos(java.util.List<java.util.List<abra.SAMRecordWrapper>> readsList) {
int minPos = java.lang.Integer.MAX_VALUE;
for (java.util.List<abra.SAMRecordWrapper> reads : readsList) {
if ((reads.get(0).getSamRecord().getAlignmentStart()) < minPos) {
minPos = reads.get(0).ge... | private int getFirstStartPos(java.util.List<java.util.List<abra.SAMRecordWrapper>> readsList) {
int minPos = java.lang.Integer.MAX_VALUE;
for (java.util.List<abra.SAMRecordWrapper> reads : readsList) {
if (((reads.size()) > 0) && ((reads.get(0).getSamRecord().getAlignmentStart()) < minPos)) {
... |
public java.lang.Object getValueAt(int rowIndex, int columnIndex) {
cz.muni.fi.pv168.library.backend.Book book = bookManager.findAllBooks().get(rowIndex);
switch (columnIndex) {
case 0 :
return book.getId();
case 1 :
return book.getName();
case 2 :
ret... | public java.lang.Object getValueAt(int rowIndex, int columnIndex) {
cz.muni.fi.pv168.library.backend.Book book = list.get(rowIndex);
switch (columnIndex) {
case 0 :
return book.getId();
case 1 :
return book.getName();
case 2 :
return book.getAuthor();
... |
public void report(dyvil.tools.parsing.marker.Marker error) {
final boolean isError = error.isError();
if ((!(this.hasSyntaxErrors)) && isError) {
this.hasSyntaxErrors = true;
}
if ((this.reportErrors) || (!isError)) {
super.report(error);
(this.reportedMarkers)++;
}
} | public void report(dyvil.tools.parsing.marker.Marker error) {
final boolean isError = error.isError();
if ((!(this.hasSyntaxErrors)) && isError) {
this.hasSyntaxErrors = true;
}
if ((this.reportErrors) || (!isError)) {
super.report(error);
}
} |
private void resize(int length) {
Item[] temp = ((Item[]) (new java.lang.Object[length]));
for (int i = 0; i < (N); i++) {
temp[i] = array[(((first) + i) % (array.length))];
}
array = temp;
first = 0;
last = (N) - 1;
} | private void resize(int length) {
Item[] temp = ((Item[]) (new java.lang.Object[length]));
for (int i = 0; i < (N); i++) {
temp[i] = array[(((first) + i) % (array.length))];
}
array = temp;
first = 0;
last = N;
} |
public org.springframework.http.ResponseEntity<?> redirectTo(@org.springframework.web.bind.annotation.PathVariable
java.lang.String name, javax.servlet.http.HttpServletRequest request, java.security.Principal currentUser, org.springframework.ui.Model model) {
socialController.setModel(request, currentUser, model);
... | public org.springframework.http.ResponseEntity<?> redirectTo(@org.springframework.web.bind.annotation.PathVariable
java.lang.String name, javax.servlet.http.HttpServletRequest request) {
urlshortener2015.goldenbrown.controller.UrlShortenerControllerWithLogs.logger.info(("Requested redirection with hash " + name));
... |
public boolean equal(Model_Produkt tmp) {
if ((((this.mstrName) == (tmp.mstrName)) && ((this.mintGewicht) == (tmp.mintGewicht))) && ((this.mfltPreis) == (tmp.mfltPreis))) {
mboolequal = true;
return true;
}
mboolequal = false;
this.mstrName = tmp.mstrName;
this.mintGewicht = tmp.mint... | public boolean equal(Model_Produkt tmp) {
if ((((this.mstrName) == (tmp.mstrName)) && ((this.mintGewicht) == (tmp.mintGewicht))) && ((this.mfltPreis) == (tmp.mfltPreis))) {
mboolequal = true;
return true;
}
mboolequal = false;
this.mstrName = tmp.mstrName;
java.lang.System.out.printl... |
public void onClick(android.view.View v) {
android.widget.ImageView previewImageView = ((android.widget.ImageView) (v));
go4.szut.de.nametrainer.database.Member member = ((go4.szut.de.nametrainer.database.Member) (previewImageView.getTag()));
android.content.Intent galleryChooserIntent = new android.content... | public void onClick(android.view.View v) {
android.content.Intent galleryChooserIntent = new android.content.Intent();
galleryChooserIntent.setType("image/*");
galleryChooserIntent.setAction(Intent.ACTION_OPEN_DOCUMENT);
activity.startActivityForResult(android.content.Intent.createChooser(galleryChooser... |
private void addInternal(T node, int replica) {
if (replica == 0) {
items.remove(node);
}else {
hudson.util.ConsistentHash.Point[] points = new hudson.util.ConsistentHash.Point[replica];
java.lang.String seed = hash.hash(node);
for (int i = 0; i < replica; i++)
points... | private synchronized void addInternal(T node, int replica) {
if (replica == 0) {
items.remove(node);
}else {
hudson.util.ConsistentHash.Point[] points = new hudson.util.ConsistentHash.Point[replica];
java.lang.String seed = hash.hash(node);
for (int i = 0; i < replica; i++)
... |
public static void main(java.lang.String[] args) {
BouncingBalls appletClass = new BouncingBalls();
javax.swing.JFrame frame = new javax.swing.JFrame();
frame.setLayout(new java.awt.GridLayout(1, 1));
frame.add(appletClass);
frame.setMinimumSize(new java.awt.Dimension(400, 400));
appletClass.ini... | public static void main(java.lang.String[] args) {
BouncingBalls appletClass = new BouncingBalls();
javax.swing.JFrame frame = new javax.swing.JFrame();
frame.setLayout(new java.awt.GridLayout(1, 1));
frame.add(appletClass);
frame.setMinimumSize(new java.awt.Dimension(400, 400));
frame.setVisibl... |
public static <D extends org.jetbrains.kotlin.resolve.CallableDescriptor> boolean overrides(@org.jetbrains.annotations.NotNull
D f, @org.jetbrains.annotations.NotNull
D g) {
if ((!(f.equals(g))) && (DescriptorEquivalenceForOverrides.INSTANCE.areEquivalent(f.getOriginal(), g.getOriginal())))
return true;
... | public static <D extends org.jetbrains.kotlin.resolve.CallableDescriptor> boolean overrides(@org.jetbrains.annotations.NotNull
D f, @org.jetbrains.annotations.NotNull
D g) {
if ((!(f.equals(g))) && (DescriptorEquivalenceForOverrides.INSTANCE.areEquivalent(f.getOriginal(), g.getOriginal())))
return true;
... |
void receive() {
SOUPmain.getClientlist().add(client);
receivePacket = new java.net.DatagramPacket(new byte[PACKETSIZE], PACKETSIZE);
try {
socket.receive(receivePacket);
} catch (java.lang.Exception e) {
util.o((("Something went wrong by recieve the packet! ... " + e) + "\n"));
}
} | void receive() {
receivePacket = new java.net.DatagramPacket(new byte[PACKETSIZE], PACKETSIZE);
try {
socket.receive(receivePacket);
} catch (java.lang.Exception e) {
util.o((("Something went wrong by recieve the packet! ... " + e) + "\n"));
}
} |
public com.vmware.xenon.common.http.netty.NettyChannelContext getFirstValidHttp2Context(java.lang.String host, int port) {
if (!(this.isHttp2Only)) {
throw new java.lang.IllegalStateException("Internal error: can't get HTTP/2 information about HTTP/1 context");
}
java.lang.String key = com.vmware.xe... | public com.vmware.xenon.common.http.netty.NettyChannelContext getFirstValidHttp2Context(java.lang.String host, int port) {
if (!(this.isHttp2Only)) {
throw new java.lang.IllegalStateException("Internal error: can't get HTTP/2 information about HTTP/1 context");
}
java.lang.String key = com.vmware.xe... |
public int read(byte[] b, int off, int len) throws java.io.IOException {
if (isCancel.get()) {
return -1;
}
int bytes = input.read(b, off, len);
if ((-1) == bytes) {
listener.finished();
return bytes;
}
listener.update(bytes);
return bytes;
} | public int read(byte[] b, int off, int len) throws java.io.IOException {
if (isCancel.get()) {
return -1;
}
int bytes = input.read(b, off, len);
if ((-1) == bytes) {
listener.finished();
}else {
listener.update(bytes);
}
return bytes;
} |
public void onChange(io.realm.RealmResults<eu.marcocattaneo.rememberhere.business.models.ProximityPOI> element) {
noItemsLinear.setVisibility(((element.size()) > 0 ? android.view.View.GONE : android.view.View.VISIBLE));
if ((mAdapter) == null) {
mAdapter = new eu.marcocattaneo.rememberhere.presentation.... | public void onChange(io.realm.RealmResults<eu.marcocattaneo.rememberhere.business.models.ProximityPOI> element) {
noItemsLinear.setVisibility(((element.size()) > 0 ? android.view.View.GONE : android.view.View.VISIBLE));
if ((mAdapter) == null) {
mAdapter = new eu.marcocattaneo.rememberhere.presentation.... |
public void testProcessInputNotDeadGetXY() throws java.lang.Exception {
org.mockito.Mockito.when(input.isMoveDown()).thenReturn(true);
org.mockito.Mockito.when(input.isMoveLeft()).thenReturn(true);
player.processInput();
assertEquals((-(Settings.PLAYER_SPEED)), player.getDx());
assertEquals(0.0, pla... | public void testProcessInputNotDeadGetXY() throws java.lang.Exception {
when(input.isMoveDown()).thenReturn(true);
when(input.isMoveLeft()).thenReturn(true);
player.processInput();
assertEquals((-(Settings.PLAYER_SPEED)), player.getDx());
assertEquals(0.0, player.getDy());
assertEquals(Level.SPR... |
public void setRectF(android.graphics.RectF rectF) {
if ((spriteRectListener) != null)
super.setRectF(spriteRectListener.calculateSpriteRect());
if (((getRectF()) != null) && ((spriteRectListener) != null))
this.center = spriteRectListener.calculateSpriteCenter();
} | public void setRectF(android.graphics.RectF rectF) {
if ((spriteRectListener) != null)
super.setRectF(spriteRectListener.calculateSpriteRect());
else
super.setRectF(rectF);
if (((getRectF()) != null) && ((spriteRectListener) != null))
this.center = spriteRectListener.calculateSp... |
public boolean finishedIndentApp(java.lang.String id) {
com.hlz.webModel.IndentStyle style = new com.hlz.webModel.IndentStyle();
style.setId(java.lang.Integer.valueOf(id));
style.setStyle(1);
com.hlz.entity.Indent indent = dao.updateIndent(style);
messaging.convertAndSend("/topic/style", ("finisheIn... | public boolean finishedIndentApp(java.lang.String id) {
com.hlz.webModel.IndentStyle style = new com.hlz.webModel.IndentStyle();
style.setId(java.lang.Integer.valueOf(id));
style.setStyle(1);
com.hlz.entity.Indent indent = dao.updateIndent(style);
messaging.convertAndSend("/topic/style", id);
ra... |
public org.springframework.http.HttpEntity resortCards(@org.thiki.kanban.card.RequestBody
java.util.List<org.thiki.kanban.card.Card> cards, @org.thiki.kanban.card.PathVariable
java.lang.String boardId, @org.thiki.kanban.card.PathVariable
java.lang.String procedureId, @org.thiki.kanban.card.RequestHeader
java.lang.Strin... | public org.springframework.http.HttpEntity resortCards(@org.thiki.kanban.card.RequestBody
java.util.List<org.thiki.kanban.card.Card> cards, @org.thiki.kanban.card.PathVariable
java.lang.String boardId, @org.thiki.kanban.card.PathVariable
java.lang.String procedureId, @org.thiki.kanban.card.RequestHeader
java.lang.Strin... |
protected org.apache.tinkerpop.gremlin.process.traversal.Traverser.Admin<java.lang.Boolean> processNextStart() throws java.util.NoSuchElementException {
if (this.starts.hasNext()) {
final org.apache.tinkerpop.gremlin.process.traversal.Traverser.Admin<S> s = this.starts.next();
return s.split(java.la... | protected org.apache.tinkerpop.gremlin.process.traversal.Traverser.Admin<java.lang.Boolean> processNextStart() throws java.util.NoSuchElementException {
return this.starts.hasNext() ? this.starts.next().split(java.lang.Boolean.TRUE, this) : this.getTraversal().getTraverserGenerator().generate(java.lang.Boolean.FALS... |
java.util.HashMap<java.lang.String, java.lang.Object> message = new java.util.HashMap<>();
java.util.ArrayList<java.lang.String> arrayList = new java.util.ArrayList<>();
for (Player player : players) {
arrayList.add(player.getPlayerName());
}
message.put("llist", arrayList.toArray());
me... | java.util.HashMap<java.lang.String, java.lang.Object> message = new java.util.HashMap<>();
java.util.ArrayList<java.lang.String> arrayList = new java.util.ArrayList<>();
for (Player player : players) {
arrayList.add(player.getPlayerName());
}
message.put("llist", arrayList);
messageProvi... |
public boolean isSameType(entities.Movable m1, entities.Movable m2) {
if (m2.isPowerDown)
return false;
if ((((m1 == null) || (m2 == null)) || ((m1.typeOne) == null)) || ((m2.typeOne) == null)) {
return false;
}
return (((m1.typeOne) == (m2.typeOne)) && ((m1.typeTwo) == (m2.typeTwo)... | public boolean isSameType(entities.Movable m1, entities.Movable m2) {
if ((((m1 == null) || (m2 == null)) || ((m1.typeOne) == null)) || ((m2.typeOne) == null)) {
return false;
}
if ((m1.isPowerDown) || (m2.isPowerDown))
return false;
return ((m1.typeOne) == (m2.typeOne)) && ((m1.typ... |
public void testIsEmpty() throws java.io.IOException {
try (net.openhft.chronicle.map.ChronicleMap empty = net.openhft.chronicle.engine.map.StatelessChronicleMapTest.newShmIntString(((net.openhft.chronicle.engine.map.StatelessChronicleMapTest.s_port)++))) {
try (net.openhft.chronicle.map.ChronicleMap map = ... | public void testIsEmpty() throws java.io.IOException {
try (net.openhft.chronicle.map.ChronicleMap empty = net.openhft.chronicle.engine.map.StatelessChronicleMapTest.newShmIntString()) {
try (net.openhft.chronicle.map.ChronicleMap map = map5()) {
if (!(empty.isEmpty())) {
java.la... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.