buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
static short bitReverse(int value) {
return ((short) (((((net.sf.zipme.DeflaterHuffman.bit4Reverse.charAt((value & 15))) << 12) | ((net.sf.zipme.DeflaterHuffman.bit4Reverse.charAt(((value >> 4) & 15))) << 8)) | ((net.sf.zipme.DeflaterHuffman.bit4Reverse.charAt(((value >> 8) & 15))) << 4)) | (net.sf.zipme.DeflaterHu... | static short bitReverse(int value) {
return ((short) (((((net.sf.zipme.DeflaterHuffman.bit4Reverse[(value & 15)]) << 12) | ((net.sf.zipme.DeflaterHuffman.bit4Reverse[((value >> 4) & 15)]) << 8)) | ((net.sf.zipme.DeflaterHuffman.bit4Reverse[((value >> 8) & 15)]) << 4)) | (net.sf.zipme.DeflaterHuffman.bit4Reverse[(va... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
com.example.pustikom.adapterplay.user.StudentList students;
switch (item.getItemId()) {
case R.id.createDummyItem :
students = populateStudentDummies();
new com.example.pustikom.adapterplay.StudentActivity.DataSyn... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
com.example.pustikom.adapterplay.user.StudentList students;
switch (item.getItemId()) {
case R.id.createDummyItem :
students = populateStudentDummies();
new com.example.pustikom.adapterplay.StudentActivity.DataSyn... |
private org.bson.BasicBSONObject addEntry(java.lang.Object[] key) {
org.bson.types.BasicBSONList lst = ((org.bson.types.BasicBSONList) (model.unencrypted.get("e")));
org.bson.BasicBSONObject entry = new org.bson.BasicBSONObject();
org.bson.types.BasicBSONList idxkey = new org.bson.types.BasicBSONList();
... | protected org.bson.BasicBSONObject addEntry(java.lang.Object[] key) {
org.bson.types.BasicBSONList lst = ((org.bson.types.BasicBSONList) (model.unencrypted.get("e")));
org.bson.BasicBSONObject entry = new org.bson.BasicBSONObject();
org.bson.types.BasicBSONList idxkey = new org.bson.types.BasicBSONList();
... |
public static void saveBitmapToFile(android.graphics.Bitmap imageBitmap) {
java.io.FileOutputStream out = null;
try {
out = new java.io.FileOutputStream(al.ahgitdevelopment.municion.FragmentMainActivity.fileImagePath);
imageBitmap.compress(Bitmap.CompressFormat.JPEG, 70, out);
} catch (java.... | static void saveBitmapToFile(android.graphics.Bitmap imageBitmap) {
java.io.FileOutputStream out = null;
try {
out = new java.io.FileOutputStream(al.ahgitdevelopment.municion.FragmentMainActivity.fileImagePath);
imageBitmap.compress(Bitmap.CompressFormat.JPEG, 70, out);
} catch (java.lang.Ex... |
public static void quit() {
agentgui.core.application.Application.stopAgentGUI();
java.lang.System.out.println(agentgui.core.application.Language.translate("Programmende... "));
agentgui.core.application.Application.setLogFileWriter(null);
agentgui.core.application.Application.setShutdownThread(null);
... | public static void quit() {
if ((agentgui.core.application.Application.stopAgentGUI()) == false)
return ;
java.lang.System.out.println(agentgui.core.application.Language.translate("Programmende... "));
agentgui.core.application.Application.setLogFileWriter(null);
agentgui.core.application.A... |
public nl.esciencecenter.xenon.filesystems.Path getExpectedWorkingDirectory() {
java.lang.String baseDir = null;
try {
baseDir = nl.esciencecenter.xenon.utils.LocalFileSystemUtils.getLocalRootlessPath(java.lang.System.getProperty("user.dir"));
} catch (nl.esciencecenter.xenon.InvalidLocationExceptio... | public nl.esciencecenter.xenon.filesystems.Path getExpectedWorkingDirectory() {
java.lang.String baseDir = nl.esciencecenter.xenon.utils.LocalFileSystemUtils.getLocalRootlessPath(java.lang.System.getProperty("user.dir"));
if (baseDir == null) {
throw new java.lang.RuntimeException("User dir property not... |
public void addTab(easy.view.tab.IEasyTabItem tabItem) {
android.view.View view = tabItem.getView();
view.setClickable(true);
view.setFocusableInTouchMode(true);
easy.view.gesture.EasyGesture.addTapGesture(view, new easy.view.tab.EasyTabHost.SimpleTabSelectListener(mSelectListener, mTabWidget.getChildCo... | public void addTab(easy.view.tab.IEasyTabItem tabItem) {
android.view.View view = tabItem.getView();
view.setClickable(true);
view.setFocusableInTouchMode(true);
easy.view.gesture.EasyGesture.addTapGesture(view, new easy.view.tab.EasyTabHost.SimpleTabSelectListener(mSelectListener, mTabWidget.getChildCo... |
private short become_leader() {
if ((node_type) != (com.price.msg_cluster.MsgClusterNode.NodeType.NONE)) {
com.price.msg_cluster.MsgClusterCmnDef.format_error("This Node[%s] type is NOT NONE", local_ip);
return MsgClusterCmnDef.RET_FAILURE_INCORRECT_OPERATION;
}
short ret = MsgClusterCmnDef.... | private short become_leader() {
if ((node_type) != (com.price.msg_cluster.MsgClusterNode.NodeType.NONE)) {
com.price.msg_cluster.MsgClusterCmnDef.format_error("This Node[%s] type is NOT NONE", local_ip);
return MsgClusterCmnDef.RET_FAILURE_INCORRECT_OPERATION;
}
short ret = MsgClusterCmnDef.... |
private static void writeOutgoingPacket(javax.servlet.http.HttpServletResponse resp) throws java.io.IOException {
java.io.OutputStream outputStream = resp.getOutputStream();
final org.apache.nifi.remote.protocol.DataPacket packet = new org.apache.nifi.remote.client.http.TestHttpClient.DataPacketBuilder().conten... | private static void writeOutgoingPacket(java.io.OutputStream outputStream) throws java.io.IOException {
final org.apache.nifi.remote.protocol.DataPacket packet = new org.apache.nifi.remote.client.http.TestHttpClient.DataPacketBuilder().contents("Example contents from server.").attr("Server attr 1", "Server attr 1 v... |
Alg.TreeDecomposition.Bag findNum(java.lang.Integer n) {
if (n == (num)) {
return this;
}else {
for (Alg.TreeDecomposition.Bag b : children) {
Alg.TreeDecomposition.Bag c = b.findNum(n);
if (c != null) {
return c;
}
}
}
return n... | Alg.TreeDecomposition.Bag findNum(java.lang.Integer n) {
if (n.equals(num)) {
return this;
}else {
for (Alg.TreeDecomposition.Bag b : children) {
Alg.TreeDecomposition.Bag c = b.findNum(n);
if (c != null) {
return c;
}
}
}
retur... |
public void onCompleted(java.lang.Exception e, final com.koushikdutta.ion.ImageViewBitmapInfo result) {
loaded = true;
progress.setVisibility(View.GONE);
if (e != null) {
return ;
}
initImageCallback(post, imageCallback);
if ((result.getBitmapInfo()) != null) {
bitmapCacheKeys.ad... | public void onCompleted(java.lang.Exception e, final com.koushikdutta.ion.ImageViewBitmapInfo result) {
loaded = true;
progress.setVisibility(View.GONE);
if (e != null) {
return ;
}
initImageCallback(position, post, imageCallback);
if ((result.getBitmapInfo()) != null) {
bitmapCa... |
public static void printTree(TreeNode root) {
if (root == null) {
return ;
}
if ((root.left) != null) {
TreeNode.printTree(root.left);
}else
if (root != null) {
java.lang.System.out.print(((root.val) + " "));
}
if ((root.right) != null) {
Tree... | public static void printTree(TreeNode root) {
if (root == null) {
return ;
}
if ((root.left) != null) {
TreeNode.printTree(root.left);
}
java.lang.System.out.print(((root.val) + " "));
if ((root.right) != null) {
TreeNode.printTree(root.right);
}
} |
private void prepareForParse() {
structureDescription = new core.parser.StructureDescription();
int typesNum = 7;
sizes = new java.util.HashMap<>(typesNum);
sizes.put(1, 2);
sizes.put(2, 4);
sizes.put(3, 3);
sizes.put(4, 5);
sizes.put(5, 7);
sizes.put(6, 6);
sizes.put(7, 5);
} | private void prepareForParse() {
structureDescription = new core.parser.StructureDescription();
int typesNum = 7;
sizes = new java.util.HashMap<>(typesNum);
sizes.put(1, 2);
sizes.put(2, 4);
sizes.put(3, 3);
sizes.put(4, 5);
sizes.put(5, 7);
sizes.put(6, 6);
sizes.put(7, 6);
} |
private static float downloadNewUpdatefile(java.lang.String http) {
try {
de.drk.akrd.Update.downloadFile(http, "updatedata.xml");
} catch (java.lang.Exception ex) {
try {
java.net.URL url = new java.net.URL(http);
de.drk.akrd.UtilityBox.getInstance().displayErrorPopup("D... | private static boolean downloadNewUpdatefile(java.lang.String http) {
try {
de.drk.akrd.Update.downloadFile(http, "updatedata.xml");
return true;
} catch (java.lang.Exception ex) {
try {
java.net.URL url = new java.net.URL(http);
} catch (java.net.MalformedURLExceptio... |
public static play.mvc.Result runSnapshot(java.lang.String snapshotId) throws java.lang.Exception {
org.ats.jmeter.models.JMeterScript snapshot = controllers.test.JMeterScriptHelper.getJMeterScriptById(snapshotId);
models.test.TestProjectModel project = controllers.test.TestProjectHelper.getProjectById(snapshot... | public static play.mvc.Result runSnapshot(java.lang.String snapshotId) throws java.lang.Exception {
org.ats.jmeter.models.JMeterScript snapshot = controllers.test.JMeterScriptHelper.getJMeterScriptById(snapshotId);
models.test.TestProjectModel project = controllers.test.TestProjectHelper.getProjectById(snapshot... |
public IntermediateCode searchCodeGlobal(java.lang.String eval) {
for (IntermediateCode ic : tableCodes) {
java.lang.System.out.println(("Label: " + (ic.getLabel())));
java.lang.String label = ic.getLabel().substring(0, ic.getLabel().indexOf("_"));
if (ic.isGlobal()) {
if (label.... | public IntermediateCode searchCodeGlobal(java.lang.String eval) {
for (IntermediateCode ic : tableCodes) {
java.lang.String label = ic.getLabel().substring(0, ic.getLabel().indexOf("_"));
if (ic.isGlobal()) {
if (label.equals(eval)) {
return ic;
}
}
... |
public void handleMessage(final android.os.Message msg) {
final int what = msg.what;
final cgeo.geocaching.maps.CGeoMap map = mapRef.get();
if (map == null) {
return ;
}
switch (what) {
case cgeo.geocaching.maps.CGeoMap.UPDATE_TITLE :
map.setTitle();
map.setSu... | public void handleMessage(final android.os.Message msg) {
final cgeo.geocaching.maps.CGeoMap map = mapRef.get();
if (map == null) {
return ;
}
final int what = msg.what;
switch (what) {
case cgeo.geocaching.maps.CGeoMap.UPDATE_TITLE :
map.setTitle();
map.setSu... |
public void showBottomBar() {
if ((activeFragment) == null) {
return ;
}
android.util.Log.e(rs.ftn.pma.tourismobile.activities.MainActivity.TAG, ("show in main bb: " + ((activeFragment) instanceof rs.ftn.pma.tourismobile.util.IBottomBarView)));
android.util.Log.e(rs.ftn.pma.tourismobile.activiti... | public void showBottomBar() {
if ((activeFragment) == null) {
return ;
}
android.util.Log.e(rs.ftn.pma.tourismobile.activities.MainActivity.TAG, ("show in main bb: " + ((activeFragment) instanceof rs.ftn.pma.tourismobile.util.IBottomBarView)));
if ((activeFragment) instanceof rs.ftn.pma.tourismo... |
@butterknife.OnClick(value = R.id.button_update)
void onUpdateButtonClicked() {
java.util.List<co.infinum.testapp.models.Item> newList = new java.util.ArrayList<>();
newList.add(new co.infinum.testapp.models.Item(1, "Car"));
newList.add(new co.infinum.testapp.models.Item(2, "Plane"));
newList.add(new co... | @butterknife.OnClick(value = R.id.button_update)
void onUpdateButtonClicked() {
java.util.List<co.infinum.testapp.models.Item> newList = new java.util.ArrayList<>();
newList.add(new co.infinum.testapp.models.Item(1, "Car"));
newList.add(new co.infinum.testapp.models.Item(2, "Plane"));
newList.add(new co... |
public static boolean isValid(int number, int size) {
int digit;
for (int i = 0; i < (size - 1); i++) {
digit = number % 10;
number = number / 10;
if (digit <= (number % 10))
return false;
}
return true;
} | public static boolean isValid(int number, int size) {
int digit;
if (number < ((java.lang.Math.pow(10, (size - 1))) - 1)) {
return false;
}
for (int i = 0; i < (size - 1); i++) {
digit = number % 10;
number = number / 10;
if (digit <= (number % 10))
return fal... |
static synchronized void removeSession(org.zoodb.internal.server.SessionManager sm) {
if (!(org.zoodb.internal.server.SessionFactory.sessions.remove(sm))) {
throw org.zoodb.internal.util.DBLogger.newFatalInternal(("Server session not found for: " + (sm.getPath())));
}
if ((org.zoodb.internal.server.... | static void removeSession(org.zoodb.internal.server.SessionManager sm) {
synchronized(org.zoodb.internal.server.SessionFactory.sessions) {
if (!(org.zoodb.internal.server.SessionFactory.sessions.remove(sm))) {
throw org.zoodb.internal.util.DBLogger.newFatalInternal(("Server session not found for... |
public void play(java.util.ArrayList<com.example.manuelsanchez.spotifystreamer.model.ArtistTopTrackItem> topTrackItems, int trackIndex) {
if ((((tracks) == null) || (!(isTrackCurrentlyPlaying(tracks, trackIndex)))) || (playbackState.equals(PlaybackState.IDLE))) {
tracks = topTrackItems;
currentIndex... | public void play(java.util.ArrayList<com.example.manuelsanchez.spotifystreamer.model.ArtistTopTrackItem> topTrackItems, int trackIndex) {
if ((((tracks) == null) || (!(isTrackCurrentlyPlaying(tracks, trackIndex)))) || (playbackState.equals(PlaybackState.IDLE))) {
tracks = topTrackItems;
currentIndex... |
public void onPause() {
if ((layout) != null) {
if ((Build.VERSION.SDK_INT) < (Build.VERSION_CODES.JELLY_BEAN)) {
layout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
}else {
layout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
com.da... | public void onPause() {
if ((layout) != null) {
if ((Build.VERSION.SDK_INT) < (Build.VERSION_CODES.JELLY_BEAN)) {
layout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
}else {
layout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
com.da... |
protected void onPostExecute(java.lang.String result) {
swipeRefreshLayout.setRefreshing(false);
if (result == null) {
android.widget.Toast.makeText(getActivity(), "No Server Update", Toast.LENGTH_SHORT).show();
}else {
java.util.ArrayList<fhtw.bsa2.gafert_steiner.ue4_restservice.bloodpressu... | protected void onPostExecute(java.lang.String result) {
swipeRefreshLayout.setRefreshing(false);
java.util.ArrayList<fhtw.bsa2.gafert_steiner.ue4_restservice.bloodpressure.BloodPressure> mListElements = fhtw.bsa2.gafert_steiner.ue4_restservice.bloodpressure.BloodpressureParser.parseJsonString(result);
if (m... |
public static void validateContext(sun.java2d.pipe.hw.AccelSurface srcData, sun.java2d.pipe.hw.AccelSurface dstData, sun.java2d.pipe.Region clip, java.awt.Composite comp, java.awt.geom.AffineTransform xform, java.awt.Paint paint, sun.java2d.SunGraphics2D sg2d, int flags) {
sun.java2d.pipe.BufferedContext d3dc = dst... | public static void validateContext(sun.java2d.pipe.hw.AccelSurface srcData, sun.java2d.pipe.hw.AccelSurface dstData, sun.java2d.pipe.Region clip, java.awt.Composite comp, java.awt.geom.AffineTransform xform, java.awt.Paint paint, sun.java2d.SunGraphics2D sg2d, int flags) {
sun.java2d.pipe.BufferedContext context = ... |
protected javafx.scene.control.Skin<?> createDefaultSkin() {
dependencies.material_components.IconButtonSkin skin = new dependencies.material_components.IconButtonSkin(this);
skin.setIcon(icon);
skin.setIcon(iconBackground);
iconBackground.setVisible(false);
dependencies.material_components.utils.Ri... | protected javafx.scene.control.Skin<?> createDefaultSkin() {
dependencies.material_components.IconButtonSkin skin = new dependencies.material_components.IconButtonSkin(this);
if ((icon) != null) {
skin.setIcon(icon);
}
if ((iconBackground) != null) {
skin.setIcon(iconBackground);
... |
private void suppressMultipleLogs(boolean isState, java.util.concurrent.atomic.AtomicBoolean wasState, java.lang.String positive, java.lang.String negative) {
if (isState) {
if (!(wasState.get()))
android.util.Log.d(de.fuberlin.service.NetworkService.LOG_TAG, positive);
wasState... | private void suppressMultipleLogs(boolean isState, java.util.concurrent.atomic.AtomicBoolean wasState, java.lang.String positive, java.lang.String negative) {
if (isState)
if (isState) {
if (!(wasState.get()))
android.util.Log.d(de.fuberlin.service.NetworkService.LOG_TAG, positiv... |
public void onStart() {
super.onStart();
if (!(btAdapter.isEnabled())) {
android.content.Intent enableIntent = new android.content.Intent(android.bluetooth.BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableIntent, johmphot.card.bluetooth.MultiplayerGameActivity.REQUEST_ENABLE... | public void onStart() {
super.onStart();
if (!(btAdapter.isEnabled())) {
android.content.Intent enableIntent = new android.content.Intent(android.bluetooth.BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableIntent, johmphot.card.bluetooth.MultiplayerGameActivity.REQUEST_ENABLE... |
private java.util.TreeSet<java.lang.String> getInstance(java.lang.String filePath) throws java.io.IOException {
if ((guesswords.Dictionary.legalWords) == null) {
guesswords.Dictionary.legalWords = new java.util.TreeSet<>();
java.io.FileReader file = new java.io.FileReader(filePath);
java.io.... | private java.util.Set<java.lang.String> getInstance(java.lang.String filePath) throws java.io.IOException {
if ((guesswords.Dictionary.legalWords) == null) {
guesswords.Dictionary.legalWords = new java.util.TreeSet<>();
java.io.FileReader file = new java.io.FileReader(filePath);
java.io.Buff... |
public void onVideoSizeChanged(final android.media.MediaPlayer mp, final int width, final int height) {
int index = java.util.Arrays.binarySearch(mediaPlayers, mp);
videoSizeCalculators[index].setVideoSize(mp.getVideoWidth(), mp.getVideoHeight());
if ((mRenderer) != null) {
mRenderer.setVideoSize(wi... | public void onVideoSizeChanged(final android.media.MediaPlayer mp, final int width, final int height) {
int index = java.util.Arrays.binarySearch(mediaPlayers, mp);
videoSizeCalculators[index].setVideoSize(mp.getVideoWidth(), mp.getVideoHeight());
if ((mRenderer) != null) {
mRenderer.setVideoSize(in... |
private java.util.List<java.lang.Object> buildSolutionSection(@android.support.annotation.NonNull
java.lang.String title, @android.support.annotation.NonNull
com.jane.antonio.pishuvalko.models.SolutionStorage solutionStorage, @android.support.annotation.NonNull
java.util.List<com.jane.antonio.pishuvalko.models.Writable... | private java.util.List<java.lang.Object> buildSolutionSection(@android.support.annotation.NonNull
java.lang.String title, @android.support.annotation.NonNull
com.jane.antonio.pishuvalko.models.SolutionStorage solutionStorage, @android.support.annotation.NonNull
java.util.List<com.jane.antonio.pishuvalko.models.Writable... |
private void getExtraArguments() {
android.os.Bundle aBundle = getArguments();
if (aBundle != null) {
mQuestion = aBundle.getParcelable(MultiPageFragment.EXTRAS_QUESTION);
mCurrentPosition = aBundle.getInt(MultiPageFragment.EXTRAS_POSITION);
isNPS = mQuestion.questionTags.contains(com.ge... | private void getExtraArguments() {
android.os.Bundle aBundle = getArguments();
if (aBundle != null) {
mQuestion = aBundle.getParcelable(MultiPageFragment.EXTRAS_QUESTION);
mCurrentPosition = aBundle.getInt(MultiPageFragment.EXTRAS_POSITION);
if ((mQuestion.questionTags) != null)
... |
private java.lang.Object copy(final com.orientechnologies.orient.core.record.impl.ODocument document, final java.lang.Object[] iFieldNames) {
final com.orientechnologies.orient.core.record.impl.ODocument doc = document.copy();
com.orientechnologies.orient.core.record.ORecordInternal.setIdentity(doc, ORecordId.E... | private java.lang.Object copy(final com.orientechnologies.orient.core.record.impl.ODocument document, final java.lang.Object[] iFieldNames) {
final com.orientechnologies.orient.core.record.impl.ODocument doc = document.copy();
for (java.lang.Object iFieldName : iFieldNames) {
if (iFieldName != null) {
... |
public static org.openpnp.spi.Feeder findFeeder(org.openpnp.spi.Machine machine, org.openpnp.model.Part part) throws java.lang.Exception {
for (org.openpnp.spi.Feeder feeder : machine.getFeeders()) {
if (((feeder.getPart()) == part) && (feeder.isEnabled())) {
return feeder;
}
}
t... | public static org.openpnp.spi.Feeder findFeeder(org.openpnp.spi.Machine machine, org.openpnp.model.Part part) throws java.lang.Exception {
for (org.openpnp.spi.Feeder feeder : machine.getFeeders()) {
if (((feeder.getPart()) == part) && (feeder.isEnabled())) {
return feeder;
}
}
t... |
private double cmpWeight(util.his_algorithm.splay_tree.SplayNode v, pipeline.post.Hit e_i, pipeline.post.Hit[] sequence, pipeline.post.HitRun_Rater scorer, pipeline.post.mode_one.Alignment_Generator_inParallel.Frame_Direction dir, java.io.RandomAccessFile rafSAM, java.io.RandomAccessFile rafDAA, java.lang.String readID... | private double cmpWeight(util.his_algorithm.splay_tree.SplayNode v, pipeline.post.Hit e_i, pipeline.post.Hit[] sequence, pipeline.post.HitRun_Rater scorer, pipeline.post.mode_one.Alignment_Generator_inParallel.Frame_Direction dir, java.io.RandomAccessFile rafSAM, java.io.RandomAccessFile rafDAA, java.lang.String readID... |
public static double sigmoid(double input) {
if ((input <= 10) || (input >= 10))
return java.lang.Math.signum(input);
return 1.0F / (1.0F + (evolv.io.util.MathUtil.fastExp((-input))));
} | public static double sigmoid(double input) {
if ((input <= (-10)) || (input >= 10))
return java.lang.Math.signum(input);
return 1.0F / (1.0F + (evolv.io.util.MathUtil.fastExp((-input))));
} |
public static org.eclipse.cdt.dsf.service.DsfSession startDsfSession(org.eclipse.tracecompass.tmf.core.trace.ITmfTrace trace) {
final org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor dsfExecutor = new org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor(org.eclipse.tracecompass.internal.dsf.core.DsfTraceSessionManage... | public static org.eclipse.cdt.dsf.service.DsfSession startDsfSession(org.eclipse.tracecompass.tmf.core.trace.ITmfTrace trace) {
org.eclipse.cdt.dsf.service.DsfSession session = org.eclipse.tracecompass.internal.dsf.core.DsfTraceSessionManager.fTraceToSessionMap.get(trace);
if (session != null) {
return ... |
public void enterFunction(@org.antlr.v4.runtime.misc.NotNull
wich.parser.WichParser.FunctionContext ctx) {
wich.semantics.type.WFunctionSymbol f = new wich.semantics.type.WFunctionSymbol(ctx.ID().getText());
ctx.scope = f;
f.setEnclosingScope(currentScope);
currentScope.define(f);
if ((ctx.type()) !... | public void enterFunction(@org.antlr.v4.runtime.misc.NotNull
wich.parser.WichParser.FunctionContext ctx) {
wich.semantics.type.WFunctionSymbol f = new wich.semantics.type.WFunctionSymbol(ctx.ID().getText());
ctx.scope = f;
f.setEnclosingScope(currentScope);
currentScope.define(f);
if ((ctx.type()) !... |
this.battle = battle;
this.seenWild = seenWild;
this.battle.setBaseWeather(weather);
this.battle.setTerrainType(terrain, true);
battleAnimationTime = gui.view.map.BattleState.BATTLE_INTRO_ANIMATION_LIFESPAN;
battleImageSlideLeft = null;
battleImageSlideRight = null;
if (battle.isWildBatt... | this.battle = battle;
this.seenWild = seenWild;
battleAnimationTime = gui.view.map.BattleState.BATTLE_INTRO_ANIMATION_LIFESPAN;
battleImageSlideLeft = null;
battleImageSlideRight = null;
if (battle.isWildBattle()) {
SoundPlayer.soundPlayer.playMusic(SoundTitle.WILD_POKEMON_BATTLE);
}... |
private com.google.common.collect.Multimap<com.sun.source.tree.ImportTree, com.google.errorprone.bugpatterns.WildcardImport.TypeToImport> groupImports(com.google.common.collect.ImmutableList<com.sun.source.tree.ImportTree> wildcardImports, java.util.Set<com.google.errorprone.bugpatterns.WildcardImport.TypeToImport> typ... | private com.google.common.collect.Multimap<com.sun.source.tree.ImportTree, com.google.errorprone.bugpatterns.WildcardImport.TypeToImport> groupImports(com.google.common.collect.ImmutableList<com.sun.source.tree.ImportTree> wildcardImports, java.util.Set<com.google.errorprone.bugpatterns.WildcardImport.TypeToImport> typ... |
public void isSinglePage_retrunsTrue_whenPageContainsAllEntries() {
uk.gov.register.presentation.resource.Pagination pagination = new uk.gov.register.presentation.resource.Pagination("/entries", java.util.Optional.of(1L), java.util.Optional.of(100L), 99);
assertThat(pagination.isSinglePage(), org.hamcrest.Match... | public void isSinglePage_retrunsTrue_whenPageContainsAllEntries() {
uk.gov.register.presentation.resource.Pagination pagination = new uk.gov.register.presentation.resource.Pagination(java.util.Optional.of(1L), java.util.Optional.of(100L), 99);
assertThat(pagination.isSinglePage(), org.hamcrest.Matchers.equalTo(... |
public void hideLoadingScreen() {
java.lang.System.out.println("Attempting to hide the loading screen");
if ((loadingScreenImage) != null) {
java.lang.System.out.println("Attempting to hide the loading screen part 2");
if ((currentPanel) != null) {
java.lang.System.out.println("Attem... | public void hideLoadingScreen() {
if ((loadingScreenImage) != null) {
if ((currentPanel) != null) {
java.awt.Component[] comps = currentPanel.getComponents();
for (java.awt.Component c : comps) {
}
}
loadingScreenImage.setVisible(false);
}
} |
public byte getPetIndex(client.inventory.MaplePet pet) {
petLock.lock();
try {
for (byte i = 0; i < 3; i++) {
if ((pets[i]) != null) {
if ((pets[i].getUniqueId()) == (pet.getUniqueId())) {
return i;
}
}
}
return ... | public byte getPetIndex(client.inventory.MaplePet pet) {
petLock.lock();
try {
for (byte i = 0; i < (pets.length); i++) {
if ((pets[i]) != null) {
if ((pets[i].getUniqueId()) == (pet.getUniqueId())) {
return i;
}
}
}
... |
public int compare(java.lang.String o1, java.lang.String o2) {
long num1 = java.lang.Long.parseLong(o1.split("\\s+|\\t+")[1]);
long num2 = java.lang.Long.parseLong(o2.split("\\s+|\\t+")[1]);
if (num1 == num2)
return 0;
else
if (num1 > num2)
return 1;
else
... | public int compare(java.lang.String o1, java.lang.String o2) {
long num1 = java.lang.Long.parseLong(o1.split("\\s+|\\t+")[1]);
long num2 = java.lang.Long.parseLong(o2.split("\\s+|\\t+")[1]);
if (num1 == num2)
return 0;
else
if (num1 < num2)
return 1;
else
... |
app.zxtune.Log.d(app.zxtune.fs.amp.Database.TAG, "queryAuthors(filter=%s)", handleFilter);
final java.lang.String selection = (handleFilter.equals(Catalog.NON_LETTER_FILTER)) ? ("SUBSTR(" + (app.zxtune.fs.amp.Database.Tables.Authors.Fields.handle)) + ", 1, 1) NOT BETWEEN 'A' AND 'Z' COLLATE NOCASE" : (((app.zxt... | app.zxtune.Log.d(app.zxtune.fs.amp.Database.TAG, "queryAuthors(filter=%s)", handleFilter);
final java.lang.String selection = (handleFilter.equals(Catalog.NON_LETTER_FILTER)) ? ("SUBSTR(" + (app.zxtune.fs.amp.Database.Tables.Authors.Fields.handle)) + ", 1, 1) NOT BETWEEN 'A' AND 'Z' COLLATE NOCASE" : (((app.zxt... |
public void onClick(android.view.View v) {
if (!(mBasicThread.isAlive())) {
mBasicThread.pause();
mBasicThread.shut();
}
if (!(mSongThread.isAlive())) {
mSongThread.pause();
mSongThread.shut();
}
} | public void onClick(android.view.View v) {
if (mBasicThread.isAlive()) {
mBasicThread.pause();
mBasicThread.shut();
}
if (mSongThread.isAlive()) {
mSongThread.pause();
mSongThread.shut();
}
} |
private java.lang.String trimLeft(java.lang.String str) {
int i = 0;
char[] ch = str.toCharArray();
while (java.lang.Character.isWhitespace(ch[i])) {
i++;
}
return str.substring(i);
} | private java.lang.String trimLeft(java.lang.String str) {
int i = 0;
char[] ch = str.toCharArray();
while ((java.lang.Character.isWhitespace(ch[i])) && (i < ((ch.length) - 1))) {
i++;
}
return str.substring(i);
} |
public void run() {
java.lang.System.out.println("ARP recieving service started");
while (!(this.isCloseRequested())) {
jpcap.packet.ARPPacket packet = ((jpcap.packet.ARPPacket) (this.getNextBlockingPacket()));
if (packet == null) {
return ;
}
byte[] senderMac = packe... | public void run() {
java.lang.System.out.println("ARP recieving service started");
while (!(this.isCloseRequested())) {
jpcap.packet.ARPPacket packet = ((jpcap.packet.ARPPacket) (this.getNextBlockingPacket()));
if (packet == null) {
return ;
}
byte[] senderMac = packe... |
protected void createGroup(java.lang.String title) {
android.widget.LinearLayout layout = ((android.widget.LinearLayout) (android.view.LayoutInflater.from(parent.getContext()).inflate(R.layout.empty_component_group, null)));
parent.addView(layout);
parent = layout;
android.widget.TextView titleView = ne... | protected void createGroup(java.lang.String title) {
android.widget.LinearLayout layout = ((android.widget.LinearLayout) (android.view.LayoutInflater.from(parent.getContext()).inflate(R.layout.empty_component_group, parent, false)));
parent.addView(layout);
parent = layout;
android.widget.TextView title... |
public void modify() {
if ((mPhoto.getJpeg()) == null) {
return ;
}
mPhoto.updateRotationDeltaBy(((mRotationDegrees) - (mPhoto.getRotationForDisplay())));
mPhoto.setRotationForDisplay(mRotationDegrees);
mPhoto.updateExif();
} | public void modify() {
if ((mPhoto.getJpeg()) == null) {
return ;
}
synchronized(mPhoto) {
mPhoto.updateRotationDeltaBy(((mRotationDegrees) - (mPhoto.getRotationForDisplay())));
mPhoto.setRotationForDisplay(mRotationDegrees);
mPhoto.updateExif();
}
} |
public void qFunction() {
getMax();
currentNetQVal = calcNewPrevQVal();
out.println(("prevQVal " + (currentNetQVal)));
double[] Ycalc = new double[0];
Ycalc[0] = previousNetQVal;
double expectedYVal = currentNetQVal;
runBackProp(currentStateActionVector, expectedYVal, Ycalc, flagActivation);... | public void qFunction() {
getMax();
currentNetQVal = calcNewPrevQVal();
out.println(("prevQVal " + (currentNetQVal)));
double[] Ycalc = new double[1];
Ycalc[0] = previousNetQVal;
double expectedYVal = currentNetQVal;
runBackProp(currentStateActionVector, expectedYVal, Ycalc, flagActivation);... |
private net.sourceforge.cobertura.dsl.Arguments buildReportingArguments(final java.io.File baseDirectory, final java.io.File destinationDirectory, final java.io.File baseDataFile) {
getLog().debug("Building Cobertura report generation arguments");
final net.sourceforge.cobertura.dsl.ArgumentsBuilder builder = n... | private net.sourceforge.cobertura.dsl.Arguments buildReportingArguments(final java.io.File baseDirectory, final java.io.File destinationDirectory, final java.io.File baseDataFile) {
getLog().debug("Building Cobertura report generation arguments");
final net.sourceforge.cobertura.dsl.ArgumentsBuilder builder = n... |
private boolean handleMockLocation() {
if ((((Build.VERSION.SDK_INT) <= 23) && (!(Settings.Secure.getString(getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION).equals("0")))) || (((Build.VERSION.SDK_INT) > 23) && (currentLocation.isFromMockProvider()))) {
mockLocationDetected();
return true;
... | private boolean handleMockLocation() {
if ((((Build.VERSION.SDK_INT) <= 23) && (!("0".equals(Settings.Secure.getString(getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION))))) || ((((Build.VERSION.SDK_INT) > 23) && ((currentLocation) != null)) && (currentLocation.isFromMockProvider()))) {
mockLocation... |
private float findAvailableSeed() {
if ((usedSeeds_) == null)
return -1;
int i = 0;
while (usedSeeds_[seedStack_[i].objA_][seedStack_[i].objB_]) {
i++;
if (i >= (seedStack_.length))
return -1;
}
row_ = seedStack_[i].objB_;
column_ = seedStack_[i... | private float findAvailableSeed() {
if ((usedSeeds_) == null)
return -1;
int i = 0;
while (usedSeeds_[seedStack_.get(i).objA_][seedStack_.get(i).objB_]) {
i++;
if (i >= (seedStack_.size()))
return -1;
}
row_ = seedStack_.get(i).objB_;
column_ = ... |
public void onItemClick(android.widget.AdapterView parent, android.view.View v, int position, long id) {
com.worldtreeinc.leaves.Event event = eventsListAdapter.getCurrentEvent(position);
android.content.Intent intent = new android.content.Intent(activity.getApplicationContext(), com.worldtreeinc.leaves.EventDe... | public void onItemClick(android.widget.AdapterView parent, android.view.View v, int position, long id) {
com.worldtreeinc.leaves.Event event = eventsListAdapter.getCurrentEvent(position);
android.content.Intent intent = new android.content.Intent(activity.getApplicationContext(), com.worldtreeinc.leaves.EventDe... |
public static java.lang.String getCadena(java.lang.String clave) {
if (clave == null)
return null;
java.lang.String ret = null;
try {
ret = com.kalos.recursos.Recursos.recursos.getString(clave);
} catch (java.util.MissingResourceException e) {
}
if (ret == null)
thro... | public static java.lang.String getCadena(java.lang.String clave) {
java.lang.String ret = null;
try {
ret = com.kalos.recursos.Recursos.recursos.getString(clave);
} catch (java.util.MissingResourceException e) {
}
if (ret == null)
throw new java.util.MissingResourceException(("no se ... |
public cn.momia.common.api.http.MomiaHttpResponse get(@org.springframework.web.bind.annotation.PathVariable(value = "coid")
long courseId, @org.springframework.web.bind.annotation.RequestParam
java.lang.String pos, @org.springframework.web.bind.annotation.RequestParam(required = false, defaultValue = "" + (Course.ShowT... | public cn.momia.common.api.http.MomiaHttpResponse get(@org.springframework.web.bind.annotation.PathVariable(value = "coid")
long courseId, @org.springframework.web.bind.annotation.RequestParam
java.lang.String pos, @org.springframework.web.bind.annotation.RequestParam(required = false, defaultValue = "" + (Course.ShowT... |
private java.util.Collection<com.spinn3r.artemis.resource_finder.references.ResourceReference> findResources(java.lang.String element, java.util.regex.Pattern pattern) throws java.io.IOException {
java.util.List<com.spinn3r.artemis.resource_finder.references.ResourceReference> result = new java.util.ArrayList<>();
... | private java.util.Collection<com.spinn3r.artemis.resource_finder.references.ResourceReference> findResources(java.io.File file, java.util.regex.Pattern pattern) throws java.io.IOException {
java.util.List<com.spinn3r.artemis.resource_finder.references.ResourceReference> result = new java.util.ArrayList<>();
if ... |
private com.health.Table deleteLastLines(final com.health.Table table, final com.health.input.InputDescriptor config) {
int deletions = config.getIgnoreLast();
int size = table.size();
java.util.List<com.health.Record> tab = table.getRecords();
while (deletions > 0) {
table.removeRecord(tab.get(... | private com.health.Table deleteLastLines(final com.health.Table table, final com.health.input.InputDescriptor config) {
int deletions = config.getIgnoreLast();
int size = (table.size()) - 1;
java.util.List<com.health.Record> tab = table.getRecords();
while (deletions > 0) {
table.removeRecord(ta... |
public static boolean deckExists(java.lang.String deckName) {
for (java.io.File f : skylordtools.card.utils.Deck.getDeckFiles()) {
java.lang.String fileName = f.getName();
if (deckName.equals(fileName.substring(0, (((fileName.length()) - (skylordtools.card.utils.Deck.Extension.length())) - 1)).repla... | public static boolean deckExists(java.lang.String deckName) {
for (java.io.File f : skylordtools.card.utils.Deck.getDeckFiles()) {
java.lang.String fileName = f.getName();
if (deckName.equals(fileName.substring(0, (((fileName.length()) - (skylordtools.card.utils.Deck.Extension.length())) - 1)))) {
... |
private com.google.gerrit.server.change.PostReviewers.Addition addAssigneeAsCC(com.google.gerrit.server.change.ChangeResource rsrc, java.lang.String assignee) throws com.google.gerrit.extensions.restapi.RestApiException, com.google.gwtorm.server.OrmException, java.io.IOException {
com.google.gerrit.extensions.api.c... | private com.google.gerrit.server.change.PostReviewers.Addition addAssigneeAsCC(com.google.gerrit.server.change.ChangeResource rsrc, java.lang.String assignee) throws com.google.gerrit.extensions.restapi.RestApiException, com.google.gwtorm.server.OrmException, java.io.IOException {
com.google.gerrit.extensions.api.c... |
public void parse(java.lang.String field, net.anei.cadpage.parsers.MsgInfo.Data data) {
int pt = field.indexOf(' ');
if (pt < 0)
abort();
data.strCode = field.substring(0, pt);
data.strCall = field.substring((pt + 1)).trim();
} | public void parse(java.lang.String field, net.anei.cadpage.parsers.MsgInfo.Data data) {
int pt = field.indexOf(' ');
if (pt >= 0) {
data.strCode = field.substring(0, pt);
field = field.substring((pt + 1)).trim();
}
super.parse(field, data);
} |
if (!(org.wordpress.android.ui.posts.PostUtils.shouldPublishImmediatelyOptionBeAvailable(postModel))) {
return false;
}
java.util.Date pubDate = org.wordpress.android.util.DateTimeUtils.dateFromIso8601(postModel.getDateCreated());
java.util.Date now = new java.util.Date();
return !(pubDate.a... | if (!(org.wordpress.android.ui.posts.PostUtils.shouldPublishImmediatelyOptionBeAvailable(postModel))) {
return false;
}
java.util.Date pubDate = org.wordpress.android.util.DateTimeUtils.dateFromIso8601(postModel.getDateCreated());
java.util.Date now = new java.util.Date();
return (pubDate ==... |
private void pushPlainValue(de.fosd.typechef.featureexpr.FeatureExpr ctx, java.lang.Integer value, boolean isRef) {
resize();
if (ctx.equivalentTo(stackCTX)) {
slots[(++(size))] = new gov.nasa.jpf.vm.va.One(new gov.nasa.jpf.vm.va.Entry(value, isRef));
}else {
slots[(++(size))] = gov.nasa.jpf... | private void pushPlainValue(de.fosd.typechef.featureexpr.FeatureExpr ctx, int value, boolean isRef) {
resize();
if (ctx.equivalentTo(stackCTX)) {
slots[(++(size))] = new gov.nasa.jpf.vm.va.One(new gov.nasa.jpf.vm.va.Entry(value, isRef));
}else {
slots[(++(size))] = gov.nasa.jpf.vm.va.ChoiceF... |
void refreshSchedule(int subgroup) {
ru.bsuirhelper.android.ui.SchedulePagerAdapter adapter = new ru.bsuirhelper.android.ui.SchedulePagerAdapter(getSupportFragmentManager(), mGroupId, 1);
int position = mPager.getCurrentItem();
mPager.setAdapter(new ru.bsuirhelper.android.ui.SchedulePagerAdapter(getSupportF... | void refreshSchedule(int subgroup) {
ru.bsuirhelper.android.ui.SchedulePagerAdapter adapter = new ru.bsuirhelper.android.ui.SchedulePagerAdapter(getSupportFragmentManager(), mGroupId, 1);
int position = mPager.getCurrentItem();
mPager.setAdapter(new ru.bsuirhelper.android.ui.SchedulePagerAdapter(getSupportF... |
private void changeLine(java.io.File file, int lineIndex, int endDate) throws java.io.IOException {
java.io.BufferedWriter output = new java.io.BufferedWriter(new java.io.FileWriter(file, true));
output.append(((((((((MainActivity.name_arr[s_item]) + "^`") + (MainActivity.description_arr[s_item])) + "^`") + (Ma... | private void changeLine(java.io.File file, int lineIndex, int endDate) throws java.io.IOException {
java.io.BufferedWriter output = new java.io.BufferedWriter(new java.io.FileWriter(file, true));
output.append((((((((((MainActivity.name_arr[s_item]) + "^`") + (MainActivity.description_arr[s_item])) + "^`") + "^... |
protected void onResume() {
boolean newTheme = android.preference.PreferenceManager.getDefaultSharedPreferences(this).getBoolean("theme", false);
if ((currentTheme) != newTheme) {
android.content.Intent intent = getIntent();
finish();
startActivity(intent);
}
super.onResume();
} | protected void onResume() {
boolean newTheme = android.preference.PreferenceManager.getDefaultSharedPreferences(this).getBoolean("theme", true);
if ((currentTheme) != newTheme) {
android.content.Intent intent = getIntent();
finish();
startActivity(intent);
}
super.onResume();
} |
public void start() {
if ((!(opened)) || (started))
return ;
rtpReceiver.startSession();
rtspControl.play();
while ((rtspControl.getState()) != (edu.tfnrc.rtsp.RtspConstants.PLAYING)) {
}
videoStartTime = android.os.SystemClock.uptimeMillis();
started = true;
android.util.L... | public void start() {
if ((!(opened)) || (started))
return ;
rtpReceiver.startSession();
rtspControl.play();
while ((rtspControl.getState()) != (edu.tfnrc.rtsp.RtspConstants.PLAYING)) {
}
videoStartTime = android.os.SystemClock.uptimeMillis();
started = true;
} |
public com.topie.campus.common.utils.Result page(java.lang.Integer pageNum, java.lang.Integer pageSize) {
java.lang.Integer userId = com.topie.campus.security.utils.SecurityUtil.getCurrentUserId();
com.topie.campus.common.SimplePageInfo<com.topie.campus.core.model.Student> students = studentService.findByLeadRo... | public com.topie.campus.common.utils.Result page(java.lang.Integer pageNum, java.lang.Integer pageSize) {
java.lang.Integer userId = com.topie.campus.security.utils.SecurityUtil.getCurrentUserId();
com.topie.campus.common.SimplePageInfo<com.topie.campus.core.model.Student> students = studentService.findByLeadRo... |
public void run() {
if ((callback) != null) {
callback.onStart(java.lang.Thread.currentThread());
}
com.lzh.easythread.Tools.resetThread(java.lang.Thread.currentThread(), name, callback);
proxy.run();
if ((callback) != null) {
callback.onCompleted(java.lang.Thread.currentThread());
... | public void run() {
com.lzh.easythread.Tools.resetThread(java.lang.Thread.currentThread(), name, callback);
if ((callback) != null) {
callback.onStart(java.lang.Thread.currentThread());
}
if ((proxy) != null) {
proxy.run();
}
if ((callback) != null) {
callback.onCompleted... |
public java.lang.String encodeScriptEvents(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) {
java.lang.StringBuilder events = new java.lang.StringBuilder();
events.append("var events = ");
org.richfaces.renderkit.ScriptOptions options = new org.richfaces.renderkit.Scri... | public java.lang.String encodeScriptEvents(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) {
java.lang.StringBuilder events = new java.lang.StringBuilder();
events.append("var events = ");
org.richfaces.renderkit.ScriptOptions options = new org.richfaces.renderkit.Scri... |
public void onRecordingError(final java.lang.String s, java.lang.Exception e) {
android.util.Log.e("Rewind", "Error", e);
android.os.Handler h = new android.os.Handler(getMainLooper());
h.post(new java.lang.Runnable() {
@java.lang.Override
public void run() {
android.widget.Toast... | public void onRecordingError(final java.lang.String s, java.lang.Exception e) {
android.util.Log.e("Rewind", "Error", e);
android.os.Handler h = new android.os.Handler(getMainLooper());
h.post(new java.lang.Runnable() {
@java.lang.Override
public void run() {
android.widget.Toast... |
public void insertColumn(java.lang.String columnFamily, java.lang.String rowKey, org.apache.cassandra.thrift.Column column) throws java.io.UnsupportedEncodingException, org.apache.cassandra.thrift.InvalidRequestException, org.apache.cassandra.thrift.TimedOutException, org.apache.cassandra.thrift.UnavailableException, o... | public void insertColumn(java.lang.String columnFamily, java.lang.String rowKey, org.apache.cassandra.thrift.Column column) throws java.io.UnsupportedEncodingException, org.apache.cassandra.thrift.InvalidRequestException, org.apache.cassandra.thrift.TimedOutException, org.apache.cassandra.thrift.UnavailableException, o... |
private android.graphics.Bitmap invert(android.graphics.Bitmap original) {
android.graphics.ColorMatrix Cmat = new android.graphics.ColorMatrix(new float[]{ -1 , 0 , 0 , 0 , 255 , 0 , -1 , 0 , 0 , 255 , 0 , 0 , -1 , 0 , 255 , 0 , 0 , 0 , 1 , 0 });
return this.process(original, Cmat);
} | public android.graphics.Bitmap invert(android.graphics.Bitmap original) {
android.graphics.ColorMatrix Cmat = new android.graphics.ColorMatrix(new float[]{ -1 , 0 , 0 , 0 , 255 , 0 , -1 , 0 , 0 , 255 , 0 , 0 , -1 , 0 , 255 , 0 , 0 , 0 , 1 , 0 });
return this.process(original, Cmat);
} |
public java.lang.CharSequence getPageTitle(int position) {
switch (position) {
case 1 :
{
return mContext.getString(R.string.now_playing);
}
case 2 :
{
return mContext.getString(R.string.artists);
}
case 3 :
... | public java.lang.CharSequence getPageTitle(int position) {
if (position == 1) {
return mContext.getString(R.string.now_playing);
}
if (position == 2) {
return mContext.getString(R.string.artists);
}else {
return mContext.getString(R.string.favourites);
}
} |
public void onEvent(kz.voxpopuli.voxapplication.network.wrappers.comments.article.ArticleCommentsWrapper wrapper) {
if ((wrapper.getArcticleComments().size()) > 0) {
comments.addAll(wrapper.getArcticleComments());
commentsAdapter.notifyDataSetChanged();
refreshLayout.setRefreshing(false);
... | public void onEvent(kz.voxpopuli.voxapplication.network.wrappers.comments.article.ArticleCommentsWrapper wrapper) {
if ((wrapper.getArcticleComments().size()) > 0) {
comments.addAll(wrapper.getArcticleComments());
commentsAdapter.notifyDataSetChanged();
}
refreshLayout.setRefreshing(false);
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
com.google.firebase.auth.FirebaseAuth auth = com.google.firebase.auth.FirebaseAuth.getInstance();
android.content.Intent intent;
if ((auth.getCurrentUser()) =... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
com.google.firebase.auth.FirebaseAuth auth = com.google.firebase.auth.FirebaseAuth.getInstance();
android.content.Intent intent;
if ((auth.getCurrentUser()) == null) {
startActivityForResult(com.f... |
public static boolean isGF(java.lang.String word) throws java.io.IOException {
if ((utils.GFBF.GFLexicon.isEmpty()) || (utils.GFBF.BFLexicon.isEmpty()))
utils.GFBF.intializeLexicon();
if (utils.GFBF.GFLexicon.contains(word))
return true;
return false;
} | public static boolean isGF(java.lang.String word) throws java.io.IOException {
if ((utils.GFBF.GFLexicon.isEmpty()) || (utils.GFBF.BFLexicon.isEmpty()))
utils.GFBF.intializeLexicon();
if ((utils.GFBF.GFLexicon.contains(word)) && (!(utils.GFBF.BFLexicon.contains(word))))
return true;
... |
public double share(Genome g) {
double sum = 0.1;
for (int i = 0; i < (genome.size()); i++) {
double dist = dist(genome.get(i), g);
if (dist < (distThreshold)) {
sum++;
}
}
return sum;
} | public double share(Genome g) {
double sum = 0;
for (int i = 0; i < (genome.size()); i++) {
double dist = dist(genome.get(i), g);
if (dist < (distThreshold)) {
sum++;
}
}
return sum;
} |
public void setModeDehumid(boolean modeDehumid) {
int mask = 1 << 1;
int tempRegister = modbusSlave.getResgister(((edu.ncku.uscc.util.DataStoreManager.ADDR_STATUS) + (offset)));
if (modeDehumid) {
tempRegister |= mask;
}else {
mask = ~mask;
mask &= 255;
tempRegister &= ma... | public void setModeDehumid(boolean modeDehumid) {
final int mask = 1 << 1;
int tempRegister = modbusSlave.getResgister(((edu.ncku.uscc.util.DataStoreManager.ADDR_STATUS) + (offset)));
if (modeDehumid) {
tempRegister |= mask;
}else {
tempRegister &= mask;
}
modbusSlave.setRegister... |
public boolean updateTODO(java.lang.String id, java.lang.String addr, java.lang.String msg, boolean bStatus) {
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
android.content.ContentValues cv = new android.content.ContentValues();
cv.put("addr", addr);
cv.put("msg", msg);
jav... | public boolean updateTODO(java.lang.String id, java.lang.String addr, java.lang.String msg, boolean bStatus) {
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
android.content.ContentValues cv = new android.content.ContentValues();
cv.put("addr", addr);
cv.put("msg", msg);
jav... |
private int includeLeafLevel(fi.thl.pivot.model.FilterablePivot.IncludeStrategy strategy, int level, int index) {
for (@java.lang.SuppressWarnings(value = "unused")
fi.thl.pivot.model.DimensionNode node : strategy.get(level)) {
if (shouldFilter(strategy, level, index)) {
++index;
}el... | private int includeLeafLevel(fi.thl.pivot.model.FilterablePivot.IncludeStrategy strategy, int level, int index) {
for (@java.lang.SuppressWarnings(value = "unused")
fi.thl.pivot.model.DimensionNode node : strategy.get(level)) {
if (shouldFilter(strategy, level, index)) {
++index;
}el... |
private void checkAddressInCart(javax.servlet.http.HttpSession session) {
rsvier.cart.Cart cart = ((rsvier.cart.Cart) (session.getAttribute("cart")));
if ((cart.getDeliveryAdress()) == null) {
cart.setDeliveryAdress(new rsvier.address.Address());
session.setAttribute("cart", cart);
}
} | private void checkAddressInCart(javax.servlet.http.HttpSession session) {
rsvier.cart.Cart cart = ((rsvier.cart.Cart) (session.getAttribute("cart")));
if ((cart.getDeliveryAdress()) == null) {
cart.setDeliveryAdress(new rsvier.address.Address());
}
} |
public void init() {
db = android.database.sqlite.SQLiteDatabase.openOrCreateDatabase("/data/data/com.example.newsapp/newss.db", null);
delete();
try {
db.execSQL("create table news(id text primary key, tag text, sim_json text, com_json text, star text, read text)");
} catch (java.lang.Exception... | public void init() {
db = android.database.sqlite.SQLiteDatabase.openOrCreateDatabase("/data/data/com.example.newsapp/newss.db", null);
try {
db.execSQL("create table news(id text primary key, tag text, sim_json text, com_json text, star text, read text)");
} catch (java.lang.Exception e) {
}
... |
protected void driveMotor(int speed) {
speed = convertMotorVal(speed);
if (speed != (previousSpeed)) {
previousSpeed = speed;
if (!(zeroUsedPrev)) {
speed = 0;
zeroUsedPrev = True;
}
}
mqtt.write(("motor|Speed:" + speed));
motor.write(speed);
} | protected void driveMotor(int speed) {
speed = convertMotorVal(speed);
if (speed != (previousSpeed)) {
previousSpeed = speed;
if (!(zeroUsedPrev)) {
speed = 0;
zeroUsedPrev = true;
}
}
mqtt.write(("motor|Speed:" + speed));
motor.write(speed);
} |
void stop() {
stpe.shutdown();
if ((master) != null) {
try {
master.destroy();
link.masters.remove(master);
} catch (java.lang.Exception e) {
modbus.ModbusConnection.LOGGER.debug(("error destroying last master" + (e.getMessage())));
}
statnode.... | void stop() {
if ((master) != null) {
try {
master.destroy();
link.masters.remove(master);
} catch (java.lang.Exception e) {
modbus.ModbusConnection.LOGGER.debug(("error destroying last master" + (e.getMessage())));
}
master = null;
removeC... |
public void printError(java.lang.String errorMessage, org.usfirst.frc.team339.Utils.ErrorMessage.PrintsTo PrintsTo) {
this.rioTime = this.getDate();
this.matchTime = Hardware.driverStation.getMatchTime();
if ((PrintsTo == (org.usfirst.frc.team339.Utils.ErrorMessage.PrintsTo.driverStation)) || (PrintsTo == (... | public void printError(java.lang.String errorMessage, org.usfirst.frc.team339.Utils.ErrorMessage.PrintsTo PrintsTo) {
rioTime = getDate();
matchTime = Hardware.driverStation.getMatchTime();
if ((PrintsTo == (org.usfirst.frc.team339.Utils.ErrorMessage.PrintsTo.driverStation)) || (PrintsTo == (org.usfirst.frc... |
private org.programmatori.domotica.own.plugin.system.Value getVersion() {
java.lang.String firmware = null;
try {
firmware = org.programmatori.domotica.own.sdk.config.Config.getInstance().getNode("system.version");
} catch (java.lang.Exception e) {
}
if (firmware == null) {
firmware ... | private org.programmatori.domotica.own.plugin.system.Value getVersion() {
java.lang.String firmware = null;
try {
firmware = org.programmatori.domotica.own.sdk.config.Config.getInstance().getNode("system.version");
} catch (java.lang.Exception e) {
}
if (firmware == null) {
firmware ... |
private org.springframework.web.servlet.ModelAndView getModel(org.springframework.web.servlet.ModelAndView mv, java.lang.String out) {
if ((org.apache.commons.lang.StringUtils.isNotEmpty(out)) && (out.equalsIgnoreCase("out"))) {
mv.addObject("title", "出库");
mv.addObject("isout", true);
}else {
... | private org.springframework.web.servlet.ModelAndView getModel(org.springframework.web.servlet.ModelAndView mv, boolean out) {
if (out) {
mv.addObject("title", "出库");
mv.addObject("isout", true);
}else {
mv.addObject("title", "入库");
mv.addObject("isout", false);
}
return m... |
public void search() {
ltd = new java.util.ArrayList();
lc = new java.util.ArrayList();
if (type.equals("tend")) {
ltd = sb.findTenderers(keyWord);
}else {
lc = sb.findContractors(keyWord, 0, null, null, "ALPHABETICAL");
}
} | public void search() {
ltd = new java.util.ArrayList();
lc = new java.util.ArrayList();
if (type.equals("tend")) {
ltd = sb.findTenderers(keyWord);
}else {
lc = sb.findContractors(keyWord, 0, null, null, "ALPHABETICAL");
}
message = null;
} |
public void onConnectionLost() {
logger.debug("Bridge connection lost. Updating thing status to OFFLINE.");
previousOnline = false;
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR);
for (org.eclipse.smarthome.core.thing.Thing thing : org.openhab.binding.max.internal.handl... | public void onConnectionLost() {
logger.debug("Bridge connection lost. Updating thing status to OFFLINE.");
previousOnline = false;
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR);
for (org.eclipse.smarthome.core.thing.Thing thing : getThing().getThings()) {
org.... |
public void acceptOnlyConcreteEmbeddedOrRuntimeImpliedDependenciesAfterTraversingExtension() throws java.lang.Exception {
final org.commonjava.maven.atlas.graph.rel.ExtensionRelationship plugin = new org.commonjava.maven.atlas.graph.rel.ExtensionRelationship(from, root, src, 0);
final org.commonjava.maven.atlas... | public void acceptOnlyConcreteEmbeddedOrRuntimeImpliedDependenciesAfterTraversingExtension() throws java.lang.Exception {
final org.commonjava.maven.atlas.graph.rel.ExtensionRelationship plugin = new org.commonjava.maven.atlas.graph.rel.ExtensionRelationship(from, root, src, 0);
final org.commonjava.maven.atlas... |
public void onActivityCreated(android.os.Bundle savedInstanceState) {
mHotView.initializeHotSwipeRefreshLayout();
mHotView.initializeHotNetworkingErrorImageView();
mHotView.initializeHotRecyclerView();
mHotView.hideHotSwipeRefreshLayout();
mHotView.showHotProgressBar();
mHotView.hideNetworkingEr... | public void onActivityCreated(android.os.Bundle savedInstanceState) {
mHotView.initializeHotSwipeRefreshLayout();
mHotView.initializeHotNetworkingErrorImageView();
mHotView.initializeHotRecyclerView();
mHotView.hideHotSwipeRefreshLayout();
mHotView.hideNetworkingErrorImageView();
if (savedInstan... |
public void setWalkableCells(maze.Cell[] walkableCells) {
int i;
for (i = 0; i < (cells.length); i++) {
this.cells[((walkableCells[i].getX()) - 1)][((walkableCells[i].getY()) - 1)] = walkableCells[i];
}
} | public void setWalkableCells(maze.Cell[] walkableCells) {
int i;
for (i = 0; i < (walkableCells.length); i++) {
this.cells[((walkableCells[i].getX()) - 1)][((walkableCells[i].getY()) - 1)] = walkableCells[i];
}
} |
public boolean isAt(java.time.LocalDateTime time) {
if (!(daysOfSale.contains(time.getDayOfWeek()))) {
return false;
}
return (fromDayTime.isBefore(time.toLocalTime())) && (fromDayTime.plus(duration).isAfter(time.toLocalTime()));
} | public boolean isAt(java.time.LocalDateTime time) {
if (((daysOfSale) == null) || (!(daysOfSale.contains(time.getDayOfWeek())))) {
return false;
}
return (fromDayTime.isBefore(time.toLocalTime())) && (fromDayTime.plus(duration).isAfter(time.toLocalTime()));
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lvItems = ((android.widget.ListView) (findViewById(R.id.lvItems)));
readItems();
itemsAdapter = new android.widget.ArrayAdapter<java.lang.String>(this, android.... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lvItems = ((android.widget.ListView) (findViewById(R.id.lvItems)));
readItems();
itemsAdapter = new android.widget.ArrayAdapter(this, android.R.layout.simple_li... |
private void removeOtherImageAndParents(org.ovirt.engine.core.compat.Guid imageId, org.ovirt.engine.core.compat.Guid lastParent) {
org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.RestoreFromSnapshotCommand.getDiskImageDao().getSnapshotById(imageId);
org.ovirt.en... | private void removeOtherImageAndParents(org.ovirt.engine.core.compat.Guid imageId, org.ovirt.engine.core.compat.Guid lastParent) {
org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.RestoreFromSnapshotCommand.getDiskImageDao().getSnapshotById(imageId);
org.ovirt.en... |
public void unloadParcel() {
java.util.LinkedList<courier.Parcel> carryingCopy = ((java.util.LinkedList<courier.Parcel>) (carrying.clone()));
for (courier.Parcel p : carryingCopy) {
if (p.destination.equals(currStation)) {
pickOut(p);
(map.parcelArrivedTotal)++;
if ((... | public void unloadParcel() {
java.util.LinkedList<courier.Parcel> carryingCopy = ((java.util.LinkedList<courier.Parcel>) (carrying.clone()));
for (courier.Parcel p : carryingCopy) {
if (p.destination.equals(currStation)) {
pickOut(p);
(map.parcelArrivedTotal)++;
if ((... |
public co.rsk.net.sync.SyncStatus newPeerStatus(co.rsk.net.NodeID peerID, co.rsk.net.Status status, java.util.Set<java.lang.Runnable> finishedWaitingForPeersCallbacks) {
if (knownPeers.isKnownPeer(peerID)) {
return this;
}
knownPeers.registerPeer(peerID).setStatus(status);
finishedWaitingForPeer... | public co.rsk.net.sync.SyncStatus newPeerStatus(co.rsk.net.NodeID peerID, co.rsk.net.Status status, java.util.Set<java.lang.Runnable> finishedWaitingForPeersCallbacks) {
if (knownPeers.isKnownPeer(peerID)) {
return this;
}
knownPeers.registerPeer(peerID).setStatus(status);
finishedWaitingForPeer... |
private static boolean closeEnough(java.lang.Double value, java.lang.String rel, java.lang.String entity) {
rel = rel.split("&")[0];
java.util.ArrayList<java.lang.Double> goldValues = main.java.iitb.neo.goldDB.GoldDB.getGoldDBValue(entity, rel, main.java.iitb.neo.training.algorithm.lpercp.GoldDbInference.K);
... | private static boolean closeEnough(java.lang.Double value, java.lang.String rel, java.lang.String entity) {
rel = rel.split("&")[0];
java.util.ArrayList<java.lang.Double> goldValues = main.java.iitb.neo.goldDB.GoldDB.getGoldDBValue(entity, rel, main.java.iitb.neo.training.algorithm.lpercp.GoldDbInference.K);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.