buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void remove(org.phoenixframework.channels.Channel channel) {
synchronized(channels) {
for (final java.util.Iterator chanIter = channels.iterator(); chanIter.hasNext();) {
if ((chanIter.next()) == channel) {
chanIter.remove();
break;
}
}
... | public void remove(org.phoenixframework.channels.Channel channel) {
synchronized(channels) {
for (final java.util.Iterator chanIter = channels.values().iterator(); chanIter.hasNext();) {
if ((chanIter.next()) == channel) {
chanIter.remove();
break;
}
... |
protected void onPostExecute(android.graphics.drawable.Drawable result) {
android.widget.ImageView v = v_.get();
if ((v != null) && ((v.getTag()) == (this))) {
v.setImageDrawable(result);
v.setTag(null);
}
} | protected void onPostExecute(android.graphics.drawable.Drawable result) {
android.widget.ImageView v = v_.get();
if ((v != null) && ((v.getTag()) == (this))) {
v.setTag(null);
v.setImageDrawable(result);
}
} |
public void print(java.lang.String text, Log.LOGLEVEL priority) {
Log.statusWindow.setTitle(text);
if ((priority.value) <= (Log.loglevel.value)) {
java.lang.String temp = ((((formatter.format(new java.util.Date())) + "\t") + (priority.toString())) + "\t") + text;
java.lang.System.out.println(tem... | public void print(java.lang.String text, Log.LOGLEVEL priority) {
if ((priority.value) <= (Log.loglevel.value)) {
Log.statusWindow.setTitle(text);
java.lang.String temp = ((((formatter.format(new java.util.Date())) + "\t") + (priority.toString())) + "\t") + text;
java.lang.System.out.println... |
public org.springframework.http.ResponseEntity<java.lang.Iterable<com.gl.planesAndAirfileds.domain.Plane>> getPlaneList() {
planeDaoService.save();
java.lang.Iterable<com.gl.planesAndAirfileds.domain.Plane> planes = planeDaoService.getAllPlanes();
if (planes == null) {
return new org.springframework... | public org.springframework.http.ResponseEntity<java.lang.Iterable<com.gl.planesAndAirfileds.domain.Plane>> getPlaneList() {
java.lang.Iterable<com.gl.planesAndAirfileds.domain.Plane> planes = planeDaoService.getAllPlanes();
if (planes == null) {
return new org.springframework.http.ResponseEntity<java.la... |
private boolean validateIdentityData(java.lang.String fanExternalName, byte[] fanImageBytes, com.bitdubai.fermat_art_api.all_definition.enums.ArtExternalPlatform externalPlatform) {
if (fanExternalName.isEmpty())
return false;
if ((externalPlatformID) == null)
return false;
if (fan... | private boolean validateIdentityData(java.lang.String fanExternalName, byte[] fanImageBytes, com.bitdubai.fermat_art_api.all_definition.enums.ArtExternalPlatform externalPlatform) {
if (fanExternalName.isEmpty())
return false;
if (fanImageBytes == null)
return false;
if ((fanImageB... |
void setChannel(de.christinecoenen.code.zapp.model.ChannelModel channel) {
logo.setImageResource(channel.getDrawableId());
logo.setContentDescription(channel.getName());
if ((channel.getSubtitle()) == null) {
subtitle.setVisibility(View.GONE);
}else {
subtitle.setText(channel.getSubtitle... | void setChannel(de.christinecoenen.code.zapp.model.ChannelModel channel) {
this.channel = channel;
logo.setImageResource(channel.getDrawableId());
logo.setContentDescription(channel.getName());
if ((channel.getSubtitle()) == null) {
subtitle.setVisibility(View.GONE);
}else {
subtitle... |
public boolean isOrExtends(com.parsleyj.tool.ToolClass type) {
com.parsleyj.tool.ToolClass tmp = type;
while (tmp != null) {
if (java.util.Objects.equals(this.getId(), tmp.getId()))
return true;
tmp = tmp.getParentClass();
}
return false;
} | public boolean isOrExtends(com.parsleyj.tool.ToolClass type) {
com.parsleyj.tool.ToolClass tmp = this;
while (tmp != null) {
if (java.util.Objects.equals(type.getId(), tmp.getId()))
return true;
tmp = tmp.getParentClass();
}
return false;
} |
public void drawScreen(int par1, int par2, float par3) {
super.drawScreen(par1, par2, par3);
this.oldMouseX = ((float) (par1));
this.oldMouseY = ((float) (par2));
} | public void drawScreen(int par1, int par2, float par3) {
this.oldMouseX = ((float) (par1));
this.oldMouseY = ((float) (par2));
super.drawScreen(par1, par2, par3);
} |
public void night() throws java.lang.Exception {
com.samusia.organization.testTask.logic.GetTime getTime = new com.samusia.organization.testTask.logic.GetTime();
java.time.LocalTime today = java.time.LocalTime.of(4, 0);
java.lang.String time = getTime.getTime(today);
if (java.util.Locale.getDefault().ge... | public void night() throws java.lang.Exception {
java.time.LocalTime today = java.time.LocalTime.of(4, 0);
java.lang.String time = getTime.getTime(today);
if (java.util.Locale.getDefault().getLanguage().equals("ru")) {
junit.framework.Assert.assertEquals("Доброй ночи, Мир!", time);
}else
... |
public void startRequest() {
boolean flag = false;
for (int i = 0; i < (mRequestPermission.length); i++) {
if ((android.content.pm.PackageManager.PERMISSION_DENIED) == (activity.checkCallingOrSelfPermission(mRequestPermission[i]))) {
flag = true;
break;
}
}
if (!f... | boolean startRequest() {
boolean flag = false;
for (int i = 0; i < (mRequestPermission.length); i++) {
if ((android.content.pm.PackageManager.PERMISSION_DENIED) == (activity.checkCallingOrSelfPermission(mRequestPermission[i]))) {
flag = true;
break;
}
}
if (!flag)... |
public java.lang.String getUnlocalizedName(net.minecraft.item.ItemStack stack) {
io.github.mc_umod.enumtype.EnumTypeBaseStuff type = io.github.mc_umod.enumtype.EnumTypeBaseStuff.byMetadata(stack.getMetadata());
if ((block) instanceof io.github.mc_umod.item.block.BlockOres) {
return "tile.ore" + (type.ge... | public java.lang.String getUnlocalizedName(net.minecraft.item.ItemStack stack) {
io.github.mc_umod.enumtype.EnumTypeBaseStuff type = io.github.mc_umod.enumtype.EnumTypeBaseStuff.byMetadata(stack.getMetadata());
java.lang.System.out.println(type.name());
if ((block) instanceof io.github.mc_umod.item.block.Bl... |
public void enableDeleteLocalFolderItem() {
if ((mDeleteLocalFolderItem) == null)
return ;
try {
mDeleteLocalFolderItem.setEnabled(((mAccount.countLocalFolders()) > 0));
} catch (com.fsck.k9.mail.MessagingException e) {
mDeleteLocalFolderItem.setEnabled(false);
android.u... | public void enableDeleteLocalFolderItem() {
if ((mDeleteLocalFolderItem) == null)
return ;
try {
if ((mAccount) != null)
mDeleteLocalFolderItem.setEnabled(((mAccount.countLocalFolders()) > 0));
} catch (com.fsck.k9.mail.MessagingException e) {
mDeleteLocalFo... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Name = ((android.widget.EditText) (findViewById(R.id.editText)));
Pass = ((android.widget.EditText) (findViewById(R.id.editText2)));
helper = new com.example.sq... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Name = ((android.widget.EditText) (findViewById(R.id.editText)));
Pass = ((android.widget.EditText) (findViewById(R.id.editText2)));
helper = new com.example.sq... |
public boolean removePacketInfo(int input) {
PacketInfo tempy = head;
PacketInfo prev = null;
if (tempy == null) {
return false;
}
while (tempy != null) {
if ((tempy.seq) == input) {
if (tempy == (head)) {
head = head.next;
return true;
... | public boolean removePacketInfo(int input) {
PacketInfo tempy = head;
PacketInfo prev = null;
if (tempy == null) {
return false;
}
while (tempy != null) {
if ((tempy.seq) == input) {
if (tempy == (head)) {
head = head.next;
(size)--;
... |
private double min(double[] array) {
for (int j = 0; j < 4; j++) {
for (int k = j + 1; k < 4; k++) {
if ((array[j]) < (array[k])) {
double temp;
temp = array[j];
array[j] = array[k];
array[k] = temp;
}
}
}
... | private double min(double[] array) {
for (int j = 0; j < (array.length); j++) {
for (int k = j + 1; k < 4; k++) {
if ((array[j]) > (array[k])) {
double temp;
temp = array[j];
array[j] = array[k];
array[k] = temp;
}
... |
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
javax.servlet.http.HttpSession session = request.getSession();
session.setAttribute("bookId", request.getParameter("id"));
sessio... | protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
javax.servlet.http.HttpSession session = request.getSession();
session.setAttribute("bookId", request.getParameter("bookId"));
se... |
public org.openedit.Data loadData(org.openedit.Data inHit) {
if (inHit instanceof org.entermediadb.asset.Category) {
return inHit;
}
org.entermediadb.elasticsearch.categories.ElasticCategory data = ((org.entermediadb.elasticsearch.categories.ElasticCategory) (createNewData()));
data.setPropertie... | public org.openedit.Data loadData(org.openedit.Data inHit) {
if (inHit instanceof org.entermediadb.asset.Category) {
return inHit;
}
org.entermediadb.elasticsearch.categories.ElasticCategory data = ((org.entermediadb.elasticsearch.categories.ElasticCategory) (createNewData()));
data.setPropertie... |
public java.lang.String getGroupDetails(@com.togather.controllers.PathVariable(name = "id")
long id, org.springframework.ui.Model model) {
java.lang.Iterable<com.togather.models.User> searchResults = usersDao.findAll();
java.lang.Iterable<com.togather.models.User> members = groupsDao.findOne(id).getMembers();
... | public java.lang.String getGroupDetails(@com.togather.controllers.PathVariable(name = "id")
long id, org.springframework.ui.Model model) {
java.lang.Iterable<com.togather.models.User> members = groupsDao.findOne(id).getMembers();
model.addAttribute("id", id);
model.addAttribute("members", members);
mode... |
public void writeToStream(java.io.DataOutput out) throws java.io.IOException {
if (((m_name) != null) && (!(m_name.isEmpty()))) {
out.writeShort(m_name.length());
out.write(m_name.getBytes());
}
} | public void writeToStream(java.io.DataOutput out) throws java.io.IOException {
if (((m_name) != null) && (!(m_name.isEmpty()))) {
out.writeShort(m_name.length());
out.write(m_name.getBytes());
}else {
out.writeShort(0);
}
} |
public void add(br.com.riselabs.cotonet.model.beans.DeveloperNode dev) {
if ((this.devs) == null) {
this.devs = new java.util.HashMap<java.lang.Integer, br.com.riselabs.cotonet.model.beans.DeveloperNode>();
}
this.devs.put(this.devs.size(), dev);
} | public void add(br.com.riselabs.cotonet.model.beans.DeveloperNode dev) {
if ((this.devs) == null) {
this.devs = new java.util.HashMap<java.lang.Integer, br.com.riselabs.cotonet.model.beans.DeveloperNode>();
}
this.devs.put(((this.devs.size()) + 1), dev);
} |
public void addListenerForKeyTableChange(final java.lang.String className, final de.cismet.belis.gui.widget.KeyTableListener listener) {
java.util.Collection<de.cismet.belis.gui.widget.KeyTableListener> listeners = keyTableListeners.get(className.toLowerCase());
if (listeners == null) {
listeners = new ... | public void addListenerForKeyTableChange(final java.lang.String className, final de.cismet.belis.gui.widget.KeyTableListener listener) {
java.util.Collection<de.cismet.belis.gui.widget.KeyTableListener> listeners = keyTableListeners.get(className.toLowerCase());
if (listeners == null) {
listeners = new ... |
protected void onStop() {
super.onStop();
LocationServices.FusedLocationApi.removeLocationUpdates(lostApiClient, this);
if (lostApiClient.isConnected()) {
lostApiClient.unregisterConnectionCallbacks(this);
lostApiClient.disconnect();
}
mapView.onStop();
} | protected void onStop() {
super.onStop();
if (lostApiClient.isConnected()) {
LocationServices.FusedLocationApi.removeLocationUpdates(lostApiClient, this);
lostApiClient.unregisterConnectionCallbacks(this);
lostApiClient.disconnect();
}
mapView.onStop();
} |
public void onPost(by.superteam.loliboo.ProcessingStatus processStatus, java.lang.String s) {
try {
board = new org.json.JSONObject(s);
} catch (org.json.JSONException e) {
e.printStackTrace();
}
android.widget.TextView name = new android.widget.TextView(this);
try {
name.set... | public void onPost(by.superteam.loliboo.ProcessingStatus processStatus, java.lang.String s) {
try {
board = new org.json.JSONObject(s);
} catch (org.json.JSONException e) {
e.printStackTrace();
}
try {
name.setText(board.get("Name").toString());
} catch (org.json.JSONExceptio... |
public void onCreate(android.os.Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
overridePendingTransition(R.anim.null_anim, R.anim... | public void onCreate(android.os.Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
overridePendingTransition(R.anim.null_anim, R.anim... |
public static java.util.List<java.lang.String> getResourceFiles(java.lang.String path) throws java.io.IOException {
java.util.List<java.lang.String> filenames = new java.util.ArrayList<>();
try (java.io.InputStream in = io.tetrapod.core.utils.Util.getResourceAsStream(path);java.io.BufferedReader br = new java.i... | public static java.util.List<java.lang.String> getResourceFiles(java.lang.Class<?> context, java.lang.String path) throws java.io.IOException {
java.util.List<java.lang.String> filenames = new java.util.ArrayList<>();
try (java.io.InputStream in = io.tetrapod.core.utils.Util.getResourceAsStream(context, path);j... |
public static void main(java.lang.String[] args) {
com.github.chrishantha.sample.highcpu.App app = new com.github.chrishantha.sample.highcpu.App();
final com.beust.jcommander.JCommander jcmdr = new com.beust.jcommander.JCommander(app);
jcmdr.setProgramName(com.github.chrishantha.sample.highcpu.App.class.get... | public static void main(java.lang.String[] args) {
com.github.chrishantha.sample.highcpu.App app = new com.github.chrishantha.sample.highcpu.App();
final com.beust.jcommander.JCommander jcmdr = new com.beust.jcommander.JCommander(app);
jcmdr.setProgramName(com.github.chrishantha.sample.highcpu.App.class.get... |
public boolean tryReadLock() {
int[] stamp = new int[1];
V value = lock.get(stamp);
if (((stamp[0]) & 1) == 1) {
return false;
}
return lock.compareAndSet(value, value, stamp[0], ((stamp[0]) + 2));
} | public boolean tryReadLock() {
int[] stamp = new int[1];
V value = lock.get(stamp);
if ((stamp[0]) == 1) {
return false;
}
return lock.compareAndSet(value, value, stamp[0], ((stamp[0]) + 2));
} |
public void actionPerformed(java.awt.event.ActionEvent e) {
view.setColor(view.BLACK);
if ((selectedShape) != null) {
if ((view.getShapeType()) == (Type.select)) {
model.modifyShape(previousShapeState, x, y, width, height, java.awt.Color.BLACK, view.getFilledCheckBox().isSelected(), java.lan... | public void actionPerformed(java.awt.event.ActionEvent e) {
view.setColor(view.BLACK);
if ((selectedShape) != null) {
if ((view.getShapeType()) == (Type.select)) {
model.modifyShape(selectedShape, x, y, width, height, java.awt.Color.BLACK, view.getFilledCheckBox().isSelected(), java.lang.Int... |
public winter.views.project.ProjectNodeView addNewFile(java.nio.file.Path path) {
winter.models.projects.ProjectModel fileProjectModel = new winter.models.projects.ProjectModelImpl(path);
winter.views.project.ProjectController fileProjectController = new winter.views.project.FileProjectController(fileProjectMod... | public winter.views.project.ProjectNodeView addNewFile(java.nio.file.Path path) {
winter.models.projects.ProjectModel fileProjectModel = new winter.models.projects.ProjectModelImpl(path);
winter.views.project.ProjectController fileProjectController = new winter.views.project.FileProjectController(fileProjectMod... |
public java.lang.String summarize(java.lang.String text) {
java.util.List<java.lang.String> frequentWords = frequentWords(text.toLowerCase());
java.util.List<java.lang.String> sentences = breakIntoSentences(text);
sentences.stream().forEach(( sentence) -> com.newsgists.app.LuhnAutoAbstracter.LOG.info(senten... | public java.lang.String summarize(java.lang.String text) {
java.util.List<java.lang.String> frequentWords = frequentWords(text.toLowerCase());
java.util.List<java.lang.String> sentences = breakIntoSentences(text);
java.util.Map<java.lang.String, java.lang.Double> sentenceScores = scoreSentences(sentences, f... |
public void sectionChanged(int id) {
for (model.Section s : sections) {
if ((s.getID()) == id) {
if (useController) {
controller.receiveSectionEvent(id);
}
java.lang.System.out.println("Section changing");
s.setTrainOn((!(s.getTrainOn())));
... | public void sectionChanged(int id) {
for (model.Section s : sections) {
if ((s.getID()) == id) {
if (useController) {
controller.receiveSectionEvent(id);
}
s.setTrainOn((!(s.getTrainOn())));
}
}
} |
public static DaoMaster.DevOpenHelper getDB(android.content.Context context) {
android.content.SharedPreferences prefs = android.preference.PreferenceManager.getDefaultSharedPreferences(context);
boolean firstTime = prefs.getBoolean("FIRST_TIME", true);
if (firstTime) {
if (com.noandroid.familyconta... | public static DaoMaster.DevOpenHelper getDB(android.content.Context context) {
android.content.SharedPreferences prefs = android.preference.PreferenceManager.getDefaultSharedPreferences(context);
boolean firstTime = prefs.getBoolean("FIRST_TIME", true);
if (firstTime) {
if (com.noandroid.familyconta... |
protected void handleException(org.neo4j.shell.Output out, org.neo4j.kernel.impl.query.QueryExecutionKernelException exception, long startTime) throws java.rmi.RemoteException {
out.println((((now()) - startTime) + " ms"));
out.println();
out.println(("WARNING: " + (exception.getMessage())));
} | private void handleException(org.neo4j.shell.Output out, org.neo4j.kernel.impl.query.QueryExecutionKernelException exception, long startTime) throws java.rmi.RemoteException {
out.println((((now()) - startTime) + " ms"));
out.println();
out.println(("WARNING: " + (exception.getMessage())));
} |
private float getIdleTransientPullStrainValue(int maxFoldTime, long time) {
int foldTime = (maxFoldTime * (mStartFoldingPullStrain)) / (com.mishiranu.dashchan.widget.PullableWrapper.PullView.MAX_STRAIN);
float value = java.lang.Math.min((((float) (time - (mTimeStateStart))) / foldTime), 1.0F);
return ((1.0F... | private float getIdleTransientPullStrainValue(int maxFoldTime, long time) {
int foldTime = (maxFoldTime * (mStartFoldingPullStrain)) / (com.mishiranu.dashchan.widget.PullableWrapper.PullView.MAX_STRAIN);
if (foldTime <= 0)
return 0.0F;
float value = java.lang.Math.min((((float) (time - (mTimeSt... |
private void deleteProcess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
try {
int employeeId = parameterValueAsInt(request, 2);
com.lftechnology.batch7crud.controller.EmployeeController.em... | private void deleteProcess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
try {
int employeeId = parameterValueAsInt(request, 2);
com.lftechnology.batch7crud.controller.EmployeeController.em... |
private void freeBuffer() {
if ((currentBuffer) != null) {
currentBuffer.close();
currentBuffer = null;
state = (state) & (~(io.undertow.conduits.DeflatingStreamSinkConduit.FLUSHING_BUFFER));
}
if ((deflater) != null) {
pooledObject.close();
}
} | private void freeBuffer() {
if ((currentBuffer) != null) {
currentBuffer.close();
currentBuffer = null;
state = (state) & (~(io.undertow.conduits.DeflatingStreamSinkConduit.FLUSHING_BUFFER));
}
if ((deflater) != null) {
pooledObject.close();
deflater = null;
}
} |
public void setActiveButtons() {
if ((radonsoft.radoncalc.fragments.converter.valueIDInt) == 3) {
switch (radonsoft.radoncalc.fragments.converter.spinner1.getSelectedItemPosition()) {
case 0 :
buttonsActivator = 0;
break;
case 1 :
butto... | public void setActiveButtons() {
if ((radonsoft.radoncalc.fragments.converter.valueIDInt) == 3) {
switch (radonsoft.radoncalc.fragments.converter.spinner1.getSelectedItemPosition()) {
case 0 :
buttonsActivator = 0;
break;
case 1 :
butto... |
public void mouseClicked(java.awt.event.MouseEvent e) {
if (net.drawnum.scanner.hasNextLine()) {
java.lang.String temp = net.drawnum.scanner.nextLine();
java.lang.String[] lst = net.drawnum.scanner.nextLine().split(",");
for (int a = 0; a < 784; a++) {
net.drawnum.doublst[a] = ja... | public void mouseClicked(java.awt.event.MouseEvent e) {
if (net.drawnum.scanner.hasNextLine()) {
java.lang.String[] lst = net.drawnum.scanner.nextLine().split(",");
for (int a = 0; a < 784; a++) {
net.drawnum.doublst[a] = java.lang.Integer.parseInt(lst[(a + 1)]);
}
window... |
public boolean onLongClick(android.view.View v) {
if (android.preference.PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("pref_alt", true)) {
android.os.Vibrator vi = ((android.os.Vibrator) (getActivity().getSystemService(MainActivity.VIBRATOR_SERVICE)));
vi.vibrate(10);
... | public boolean onLongClick(android.view.View v) {
if (!(doubleTap)) {
if (android.preference.PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("pref_alt", true)) {
android.os.Vibrator vi = ((android.os.Vibrator) (getActivity().getSystemService(MainActivity.VIBRATOR_SERVICE)... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
switch (id) {
case R.id.action_profile :
{
android.content.Intent intent = new android.content.Intent(this, com.sarahehabm.carbcalculator.profile.ProfileActivity.class);
... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
switch (id) {
case R.id.action_profile :
{
android.content.Intent intent = new android.content.Intent(this, com.sarahehabm.carbcalculator.profile.ProfileActivity.class);
... |
private void stopScan() {
if ((mBinder) != null) {
mBinder.setScanningState(false);
}
if (mIsScanning) {
android.util.Log.v(Utils.TAG, "Stopping scan");
mProgressHandler.removeCallbacks(mBleScannerTimeoutRunnable);
final no.nordicsemi.android.support.v18.scanner.BluetoothLeSc... | private void stopScan() {
if ((mBinder) != null) {
mBinder.setScanningState(false);
}
if (mIsScanning) {
android.util.Log.v(Utils.TAG, "Stopping scan");
final no.nordicsemi.android.support.v18.scanner.BluetoothLeScannerCompat scanner = no.nordicsemi.android.support.v18.scanner.Blueto... |
private void validateMobColumnFamily(org.apache.hadoop.hbase.TableName tableName, byte[] columnFamily) throws java.io.IOException {
org.apache.hadoop.hbase.HTableDescriptor htd = getTableDescriptor(tableName);
org.apache.hadoop.hbase.HColumnDescriptor family = htd.getFamily(columnFamily);
if ((family == nul... | private void validateMobColumnFamily(org.apache.hadoop.hbase.TableName tableName, byte[] columnFamily) throws java.io.IOException {
org.apache.hadoop.hbase.HTableDescriptor htd = getTableDescriptor(tableName);
org.apache.hadoop.hbase.HColumnDescriptor family = htd.getFamily(columnFamily);
if ((family == nul... |
public void pauseGame() {
this.paused = true;
this.application.getInputManager().setCursorVisible(true);
this.thief.stop();
this.thief.getCamera().setEnabled(false);
for (singlePlayer.model.NodeCharacter enemy : enemies)
((singlePlayer.model.NodeEnemy) (enemy)).pauseIntelligence();
} | public void pauseGame() {
this.paused = true;
this.application.getInputManager().setCursorVisible(true);
this.thief.getCamera().setEnabled(false);
this.thief.stop();
for (singlePlayer.model.NodeCharacter enemy : enemies)
((singlePlayer.model.NodeEnemy) (enemy)).pauseIntelligence();
} |
public void onNext(io.nya.powerlyrics.model.Track track) {
if ((mCurrentTrack.id) == (track.id)) {
mApp.mCurrentTrackSubject.onNext(track);
}
if ((mPlayStatus.status) == (PowerampAPI.Status.TRACK_PLAYING)) {
createNotification();
}
} | public void onNext(io.nya.powerlyrics.model.Track track) {
if ((mCurrentTrack.id) == (track.id)) {
mCurrentTrack = track;
mApp.mCurrentTrackSubject.onNext(track);
}
if ((mPlayStatus.status) == (PowerampAPI.Status.TRACK_PLAYING)) {
createNotification();
}
} |
public java.lang.Integer countHistorySubmit(java.lang.String teacherId) {
org.hibernate.criterion.DetachedCriteria dc = org.hibernate.criterion.DetachedCriteria.forClass(edu.ynu.entity.ProjectEntity.class);
java.lang.String[] status = new java.lang.String[]{ "已立项" , "待加入采购计划" , "待采购" , "采购完成" };
dc.add(org.... | public java.lang.Integer countHistorySubmit(java.lang.String teacherId) {
org.hibernate.criterion.DetachedCriteria dc = org.hibernate.criterion.DetachedCriteria.forClass(edu.ynu.entity.ProjectEntity.class);
java.lang.String[] status = new java.lang.String[]{ "已立项" , "待采购" , "采购完成" };
dc.add(org.hibernate.cr... |
public void onClick(android.view.View v) {
messageBody = messageBodyField.getText().toString();
if (messageBody.isEmpty()) {
android.widget.Toast.makeText(getApplicationContext(), "Please enter a message", Toast.LENGTH_LONG).show();
return ;
}
messageService.sendMessage(recipientId, mess... | private void sendMessage() {
messageBody = messageBodyField.getText().toString();
if (messageBody.isEmpty()) {
android.widget.Toast.makeText(this, "Please enter a message", Toast.LENGTH_LONG).show();
return ;
}
messageService.sendMessage(recipientId, messageBody);
messageBodyField.se... |
private static java.lang.String executeAdd(java.lang.String userCommand) {
boolean isSuccess = true;
tasknote.shared.TaskObject taskObject = tasknote.parser.Parser.parseAdd(userCommand);
try {
} catch (java.lang.Exception e) {
isSuccess = false;
}
tasknote.logic.TaskNoteControl.command =... | private static java.lang.String executeAdd(java.lang.String userCommand) {
boolean isSuccess = true;
tasknote.shared.TaskObject taskObject = tasknote.parser.Parser.parseAdd(userCommand, true);
try {
} catch (java.lang.Exception e) {
isSuccess = false;
}
tasknote.logic.TaskNoteControl.com... |
public void processEventsFromFolder(java.lang.String eventsFolder) {
if (configuration.Configuration.single_event_processing)
processEventsFromFolderSingleThread(eventsFolder);
else {
long createWorkTime = java.lang.System.currentTimeMillis();
if ((configuration.Configuration.multiple_ev... | public void processEventsFromFolder(java.lang.String eventsFolder) {
if (configuration.Configuration.single_event_processing)
processEventsFromFolderSingleThread(eventsFolder);
else {
long createWorkTime = java.lang.System.currentTimeMillis();
if ((configuration.Configuration.multiple_ev... |
public void testCheckSenderPartyTrustDisabled() throws java.lang.Exception {
final java.security.cert.X509Certificate certificate = pkiUtil.createCertificate(java.math.BigInteger.ONE, null);
new mockit.Expectations() {
{
domibusProperties.getProperty(TrustSenderInterceptor.DOMIBUS_SENDER_TRU... | public void testCheckSenderPartyTrustDisabled() throws java.lang.Exception {
final java.security.cert.X509Certificate certificate = pkiUtil.createCertificate(java.math.BigInteger.ONE, null);
new mockit.Expectations() {
{
domibusProperties.getProperty(TrustSenderInterceptor.DOMIBUS_SENDER_TRU... |
public java.lang.String toString() {
java.lang.StringBuilder output = new java.lang.StringBuilder();
for (int i = (this.roomCount) - 1; i >= 0; i--) {
Exercise3_IteratorsAndComparators.Problem08_PetClinic.models.Pet pet = rooms[i];
if (pet == null) {
output.append("null");
}e... | public java.lang.String toString() {
java.lang.StringBuilder output = new java.lang.StringBuilder();
for (int i = 0; i < (this.roomCount); i++) {
Exercise3_IteratorsAndComparators.Problem08_PetClinic.models.Pet pet = rooms[i];
if (pet == null) {
output.append("null");
}else {... |
public void book() throws jello.rest.IllegalRequestResource {
app.Booking b = new app.Booking();
b.product = this.getKey();
com.google.appengine.api.users.UserService userService = com.google.appengine.api.users.UserServiceFactory.getUserService();
if (userService.isUserLoggedIn()) {
b.userId = ... | public void book() throws jello.rest.IllegalRequestResource {
app.Booking b = new app.Booking();
b.product = this.getKey();
com.google.appengine.api.users.UserService userService = com.google.appengine.api.users.UserServiceFactory.getUserService();
if (userService.isUserLoggedIn()) {
b.key = (us... |
public void run() {
java.lang.System.out.println("Task Listener started!");
while (!(incoming.isClosed())) {
java.lang.System.out.println("Looping...");
try {
com.potatoes.cultivation.networking.Protocol protocol = ((com.potatoes.cultivation.networking.Protocol) (in.readObject()));
... | public void run() {
java.lang.System.out.println("Task Listener started!");
while (!(incoming.isClosed())) {
java.lang.System.out.println("Looping...");
try {
com.potatoes.cultivation.networking.Protocol protocol = ((com.potatoes.cultivation.networking.Protocol) (in.readObject()));
... |
public void onComplete(@android.support.annotation.NonNull
com.google.android.gms.tasks.Task<com.google.firebase.auth.AuthResult> task) {
android.util.Log.d(LOG_TAG, ("signInWithCredential:onComplete:" + (task.isSuccessful())));
if (!(task.isSuccessful())) {
goToLobbyActivity();
android.util.Log... | public void onComplete(@android.support.annotation.NonNull
com.google.android.gms.tasks.Task<com.google.firebase.auth.AuthResult> task) {
android.util.Log.d(LOG_TAG, ("signInWithCredential:onComplete:" + (task.isSuccessful())));
if (task.isSuccessful()) {
goToLobbyActivity();
android.util.Log.i(... |
public static junit.framework.Test suite() {
junit.framework.TestSuite suite = new junit.framework.TestSuite();
if (!(org.eclipse.jface.util.Util.isMac())) {
suite.addTest(org.eclipse.team.tests.ccvs.core.cvsresources.AllTestsCVSResources.suite());
suite.addTest(org.eclipse.team.tests.ccvs.core.... | public static junit.framework.Test suite() {
junit.framework.TestSuite suite = new junit.framework.TestSuite();
if (org.eclipse.jface.util.Util.isMac())
return suite;
suite.addTest(org.eclipse.team.tests.ccvs.core.cvsresources.AllTestsCVSResources.suite());
suite.addTest(org.eclipse.team.te... |
private void connectAndAskForPermission() {
if (!(cl.smartcities.isci.transportinspector.positionProvider.PositionProvider.getInstance().register(this, this, locationRequest))) {
android.support.v4.app.ActivityCompat.requestPermissions(this, new java.lang.String[]{ Manifest.permission.ACCESS_COARSE_LOCATION... | private void connectAndAskForPermission() {
if (!(cl.smartcities.isci.transportinspector.positionProvider.PositionProvider.getInstance().register(this, this, locationRequest))) {
android.support.v4.app.ActivityCompat.requestPermissions(this, new java.lang.String[]{ Manifest.permission.ACCESS_COARSE_LOCATION... |
protected void doExecute() {
if ((walker) instanceof org.dbflute.erflute.editor.model.diagram_contents.element.node.ermodel.WalkerGroup) {
final org.dbflute.erflute.editor.model.diagram_contents.element.node.ermodel.WalkerGroup group = ((org.dbflute.erflute.editor.model.diagram_contents.element.node.ermodel... | protected void doExecute() {
if ((walker) instanceof org.dbflute.erflute.editor.model.diagram_contents.element.node.ermodel.WalkerGroup) {
final org.dbflute.erflute.editor.model.diagram_contents.element.node.ermodel.WalkerGroup group = ((org.dbflute.erflute.editor.model.diagram_contents.element.node.ermodel... |
public java.lang.String saveVideo(@com.codecool.volunti.controller.RequestBody
com.codecool.volunti.model.OrganisationVideo editedOrganisationVideo, java.security.Principal principal) {
log.info("saveVideo() method called ...");
com.codecool.volunti.model.User user = userService.getByEmail(principal.getName());... | public java.lang.String saveVideo(@com.codecool.volunti.controller.RequestBody
com.codecool.volunti.model.OrganisationVideo editedOrganisationVideo, java.security.Principal principal) {
log.info("saveVideo() method called ...");
com.codecool.volunti.model.User user = userService.getByEmail(principal.getName());... |
private boolean checkDistance(com.google.android.gms.maps.model.LatLng markerPoint) {
double distance = java.lang.Math.sqrt(((java.lang.Math.pow(((myLoc.latitude) - (markerPoint.latitude)), 2)) + (java.lang.Math.pow(((myLoc.longitude) - (markerPoint.longitude)), 2))));
boolean result = (maxDistance) >= distance... | private boolean checkDistance(com.google.android.gms.maps.model.LatLng markerPoint) {
double distance = java.lang.Math.sqrt(((java.lang.Math.pow(((myLoc.latitude) - (markerPoint.latitude)), 2)) + (java.lang.Math.pow(((myLoc.longitude) - (markerPoint.longitude)), 2))));
return (maxDistance) >= distance;
} |
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
if (resultCode != (android.app.Activity.RESULT_OK)) {
return ;
}
if (requestCode == (com.bignerdranch.android.geoquiz.QuizActivity.REQUEST_CODE_CHEAT)) {
if (data == null) {
}else {
... | protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
if (resultCode != (android.app.Activity.RESULT_OK)) {
return ;
}
if (requestCode == (com.bignerdranch.android.geoquiz.QuizActivity.REQUEST_CODE_CHEAT)) {
if (data == null) {
return ;
... |
public double[][] tranMatrix(double[][] matrix, int row, int col) {
double[][] ret = new double[col][row];
for (int i = 0; i < row; i++)
for (int j = 0; j < col; j++) {
ret[i][j] = matrix[j][i];
}
return ret;
} | public double[][] tranMatrix(double[][] matrix, int row, int col) {
double[][] ret = new double[col][row];
for (int i = 0; i < row; i++)
for (int j = 0; j < col; j++) {
ret[j][i] = matrix[i][j];
}
return ret;
} |
public boolean equals(final java.lang.Object o) {
if ((this) == o) {
return true;
}
if (!(o instanceof org.ccci.idm.user.Dn)) {
return false;
}
final org.ccci.idm.user.Dn dn = ((org.ccci.idm.user.Dn) (o));
return components.equals(dn.components);
} | public boolean equals(final java.lang.Object o) {
if ((this) == o) {
return true;
}
if (!(o instanceof org.ccci.idm.user.Dn)) {
return false;
}
return (getClass().equals(o.getClass())) && (components.equals(((org.ccci.idm.user.Dn) (o)).components));
} |
protected java.lang.String encrypt(byte[] content) {
java.lang.String result = null;
try {
javax.crypto.Cipher aesCipher = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
aesCipher.init(javax.crypto.Cipher.ENCRYPT_MODE, skey_spec_, org.shadowmask.core.mask.rules.AESCipher.ivspec_);
... | protected java.lang.String encrypt(byte[] content) {
java.lang.String result = null;
try {
javax.crypto.Cipher aesCipher = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
aesCipher.init(javax.crypto.Cipher.ENCRYPT_MODE, skey_spec_, org.shadowmask.core.mask.rules.AESCipher.ivspec_);
... |
private boolean siteCanPercolate(int i, int j) {
if (isOpen(i, j)) {
i -= i;
j -= j;
int site = (i * (gridBounds)) + j;
return uf.connected(virtualBottomSite, site);
}
return false;
} | private boolean siteCanPercolate(int i, int j) {
if (isOpen(i, j)) {
i -= 1;
j -= 1;
int site = (i * (gridBounds)) + j;
return uf.connected(virtualBottomSite, site);
}
return false;
} |
public void run() {
if ((list.size()) != 0) {
org.greenrobot.eventbus.EventBus.getDefault().post(new cn.edu.jxnu.awesome_campus.event.EventModel<cn.edu.jxnu.awesome_campus.model.home.CourseTableModel>(cn.edu.jxnu.awesome_campus.event.EVENT.COURSE_TABLE_LOAD_CACHE_SUCCESS, list));
}else {
org.gre... | public void run() {
if (!(list.isEmpty())) {
org.greenrobot.eventbus.EventBus.getDefault().post(new cn.edu.jxnu.awesome_campus.event.EventModel<cn.edu.jxnu.awesome_campus.model.home.CourseTableModel>(cn.edu.jxnu.awesome_campus.event.EVENT.COURSE_TABLE_LOAD_CACHE_SUCCESS, list));
}else {
org.gree... |
public boolean newVideo(java.lang.String id) {
if (forceNewVideo) {
forceNewVideo = false;
return true;
}
if (!(oldVideoIds.contains(id))) {
oldVideoIds.remove(0);
oldVideoIds.add(id);
return true;
}
return false;
} | public boolean newVideo(java.lang.String id) {
if (forceNewVideo) {
forceNewVideo = false;
return true;
}
if (!(oldVideoIds.contains(id))) {
oldVideoIds.remove(((oldVideoIds.size()) - 1));
oldVideoIds.add(0, id);
return true;
}
return false;
} |
protected void onClickUser(android.view.View view) {
android.content.Intent intent = com.foursquare.android.nativeoauth.FoursquareOAuth.getConnectIntent(this, com.elmexicano.lsteamer.xlocation.MainActivity.CLIENT_ID);
if (com.foursquare.android.nativeoauth.FoursquareOAuth.isPlayStoreIntent(intent)) {
co... | public void onClickUser(android.view.View view) {
android.content.Intent intent = com.foursquare.android.nativeoauth.FoursquareOAuth.getConnectIntent(this, com.elmexicano.lsteamer.xlocation.MainActivity.CLIENT_ID);
if (com.foursquare.android.nativeoauth.FoursquareOAuth.isPlayStoreIntent(intent)) {
com.e... |
public com.cidic.design.model.ResultModel resetLoginUserPwd(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @org.springframework.web.bind.annotation.RequestParam
java.lang.String email, @org.springframework.web.bind.annotation.RequestParam
java.lang.String newPwd) {
r... | public com.cidic.design.model.ResultModel resetLoginUserPwd(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @org.springframework.web.bind.annotation.RequestParam
java.lang.String newPwd) {
resultModel = new com.cidic.design.model.ResultModel();
try {
userS... |
public void run() {
while (true) {
mainGamePanel.update();
this.repaint();
fruitGenerator.update();
snake.update();
if (controller.isStarted()) {
snakeView.update();
controller.applyRules(snake, fruitGenerator, snakeView, fruitGroupView);
}
... | public void run() {
while (true) {
mainGamePanel.update();
this.repaint();
fruitGenerator.update();
snake.update();
if (controller.isStarted()) {
snakeView.update();
fruitGroupView.update();
controller.applyRules(snake, fruitGenerator, snak... |
private void initData() {
{
android.view.View view1;
android.view.View view2;
android.view.LayoutInflater inflater = getLayoutInflater();
view1 = inflater.inflate(R.layout.acttivty_welcome, null);
view2 = inflater.inflate(R.layout.activty_gohomepage, null);
mLaunchVie... | private void initData() {
{
android.view.LayoutInflater inflater = getLayoutInflater();
view1 = inflater.inflate(R.layout.acttivty_welcome, null);
view2 = inflater.inflate(R.layout.activty_gohomepage, null);
mLaunchViews.add(view1);
mLaunchViews.add(view2);
}
} |
public static double sumOfAdjacentNumbers(java.lang.String string, int startPos, int iterations) {
double result = 1;
for (int i = 0; i < iterations; i++) {
result = result * (string.charAt((startPos + i)));
}
return result;
} | public static double sumOfAdjacentNumbers(java.lang.String string, int startPos, int iterations) {
double result = 1;
for (int i = 0; i < iterations; i++) {
result = result * (string.charAt((startPos + i)));
java.lang.System.out.print(string.charAt((startPos + i)));
}
return result;
} |
public cs361Project.Run getRun(int runNumber) {
if ((runNumber < 0) || (runNumber >= (runList.size()))) {
java.lang.System.out.println("Invalid run number!");
return null;
}else
return this.getRunList().get(runNumber);
} | public cs361Project.Run getRun(int runNumber) {
if ((runNumber < 0) || (runNumber >= (runList.size()))) {
java.lang.System.out.println("Invalid run number!");
return null;
}else
return this.getRunList().get((runNumber - 1));
} |
public T removeFront() {
if ((count) == 0)
throw new java.util.NoSuchElementException();
T temp = front.getValue();
front = front.getNext();
if ((--(count)) > 0)
front.prev = null;
else {
front = rear = null;
}
return temp;
} | public T removeFront() {
java.lang.System.out.println(count);
if ((count) == 0)
throw new java.util.NoSuchElementException();
T temp = front.getValue();
front = front.getNext();
if ((--(count)) > 0)
front.prev = null;
else {
front = rear = null;
}
return temp... |
public static void main(java.lang.String[] args) {
int[] a = new int[]{ 5 , 3 , 6 , 4 , 8 , 3 , 6 , 3 , 7 , 22 , 5 , 3 };
edu.evansdaniel.collections.SortingUtils.qs(a, 0, ((a.length) / 2));
for (int i = 0; i < (a.length); i++) {
java.lang.System.out.print(((a[i]) + " "));
}
} | public static void main(java.lang.String[] args) {
int[] a = new int[]{ 5 , 3 , 6 , 4 , 8 , 3 , 6 , 3 , 7 , 22 , 5 , 3 };
edu.evansdaniel.collections.SortingUtils.qs(a, 0, ((a.length) - 1));
for (int i = 0; i < (a.length); i++) {
java.lang.System.out.print(((a[i]) + " "));
}
} |
public static java.lang.String getSDKLocation() throws org.eclipse.core.runtime.CoreException {
java.lang.String sdkLocation = org.eclipse.core.runtime.Platform.getPreferencesService().getString(org.eclipse.thym.wp.core.WPCore.THYM_UI_ID, WPConstants.WINDOWS_PHONE_SDK_LOCATION_PREF, null, null);
if (sdkLocation... | public static java.lang.String getSDKLocation() throws org.eclipse.core.runtime.CoreException {
java.lang.String sdkLocation = org.eclipse.core.runtime.Platform.getPreferencesService().getString(org.eclipse.thym.wp.core.WPCore.THYM_UI_ID, WPConstants.WINDOWS_PHONE_SDK_LOCATION_PREF, null, null);
if (sdkLocation... |
public synchronized void update() throws java.io.IOException, org.eclipse.jgit.api.errors.GitAPIException {
this.sessionModel.getCurrentRepoHelper().updateModel();
elegit.UpdateModel updates = this.getChanges();
if (!(updates.hasChanges()))
return ;
this.addCommitsToTree(updates.getCommitsT... | public synchronized void update() throws java.io.IOException, org.eclipse.jgit.api.errors.GitAPIException {
this.sessionModel.getCurrentRepoHelper().updateModel();
elegit.UpdateModel updates = this.getChanges();
if (!(updates.hasChanges()))
return ;
this.addCommitsToTree(updates.getCommitsT... |
public void startClientLobby(java.lang.String addr, java.lang.String name) {
android.content.Intent mServiceIntent = new android.content.Intent(this, com.semaphore_soft.apps.cypher.networking.ClientService.class);
mServiceIntent.setData(android.net.Uri.parse(NetworkConstants.SETUP_CLIENT));
mServiceIntent.p... | public void startClientLobby(java.lang.String addr, java.lang.String name) {
this.name = name;
android.content.Intent mServiceIntent = new android.content.Intent(this, com.semaphore_soft.apps.cypher.networking.ClientService.class);
mServiceIntent.setData(android.net.Uri.parse(NetworkConstants.SETUP_CLIENT))... |
public ge.gov.tbilisi.map.databeans.ResponseBodyWrapper handleException(javax.servlet.http.HttpServletRequest request, java.lang.Exception exp) {
java.lang.String errMsg = ge.gov.msda.tbilisimap.utils.exception.ExceptionUtils.getExceptionUserText(exp);
if (exp instanceof java.sql.SQLException) {
java.sq... | public ge.gov.tbilisi.map.databeans.ResponseBodyWrapper handleException(javax.servlet.http.HttpServletRequest request, java.lang.Exception exp) {
java.lang.String errMsg = ge.gov.msda.tbilisimap.utils.exception.ExceptionUtils.getExceptionUserText(exp);
if (exp instanceof java.sql.SQLException) {
java.sq... |
public java.lang.Object report(org.nlogo.api.Argument[] args, org.nlogo.api.Context context) throws org.nlogo.api.ExtensionException, org.nlogo.api.LogoException {
java.lang.String str = args[0].getString();
if (!(Bitstring.is10(str))) {
throw new org.nlogo.api.ExtensionException((("String \"" + str) + ... | public java.lang.Object report(org.nlogo.api.Argument[] args, org.nlogo.api.Context context) throws org.nlogo.api.ExtensionException, org.nlogo.api.LogoException {
java.lang.String str = args[0].get().toString();
if (!(Bitstring.is10(str))) {
throw new org.nlogo.api.ExtensionException((("String \"" + st... |
public void sendMessage(java.nio.channels.SocketChannel source, jauhararifin.common.buffer.Buffer message) {
if (source == null)
throw new java.lang.NullPointerException("Source channel cannot null");
if (message == null)
throw new java.lang.NullPointerException("Message cannot null");
... | public void sendMessage(java.nio.channels.SocketChannel source, jauhararifin.common.buffer.Buffer message) {
if (source == null)
throw new java.lang.NullPointerException("Source channel cannot null");
if (message == null)
throw new java.lang.NullPointerException("Message cannot null");
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_info);
this.bind_buttons();
text = ((android.widget.TextView) (findViewById(R.id.textView2)));
text.setMovementMetho... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_info);
this.bind_buttons();
text = ((android.widget.TextView) (findViewById(R.id.textView2)));
text.setMovementMetho... |
public void reverse() {
int i;
int j;
for (i = 0; i < 8; j++)
for (j = 0; j < 8; j++) {
if ((s[i][j]) == 0)
continue;
s[i][j] = 3 - (s[i][j]);
}
} | public void reverse() {
int i;
int j;
for (i = 0; i < 8; i++)
for (j = 0; j < 8; j++) {
if ((s[i][j]) == 0)
continue;
s[i][j] = 3 - (s[i][j]);
}
} |
public java.lang.String toString() {
com.github.taffy128s.tlcdbms.DataRecord[] records = ((com.github.taffy128s.tlcdbms.DataRecord[]) (mTable.toArray()));
java.lang.StringBuilder stringBuilder = new java.lang.StringBuilder();
stringBuilder.append(mTablename).append("\n");
for (com.github.taffy128s.tlcdb... | public java.lang.String toString() {
java.lang.Object[] records = mTable.toArray();
java.lang.StringBuilder stringBuilder = new java.lang.StringBuilder();
stringBuilder.append(mTablename).append("\n");
for (java.lang.Object record : records) {
stringBuilder.append(record.toString());
}
r... |
public static boolean updateStudentState(models.User user) {
helper.HMSAccessor hms = new helper.HMSAccessor();
if (hms.identifyUser(user.getEmail())) {
user.setStudent(true);
user.setyID(hms.getResults().get("ynumber"));
user.setMatNR(hms.getResults().get("matnumber"));
return t... | public static boolean updateStudentState(models.User user) {
helper.HMSAccessor hms = new helper.HMSAccessor();
if (hms.identifyUser(user.getEmail())) {
user.setStudent(true);
user.setMatNR(hms.getResults().get("matnumber"));
return true;
}
return false;
} |
public void onClick(android.view.View v) {
android.content.Context context = getContext();
com.google.android.gms.location.places.ui.PlacePicker.IntentBuilder builder = new com.google.android.gms.location.places.ui.PlacePicker.IntentBuilder();
android.app.Activity settingsActivity = ((com.example.android.su... | public void onClick(android.view.View v) {
android.content.Context context = getContext();
com.google.android.gms.location.places.ui.PlacePicker.IntentBuilder builder = new com.google.android.gms.location.places.ui.PlacePicker.IntentBuilder();
android.app.Activity settingsActivity = ((com.example.android.su... |
public wr.leetcode.algo.binary_tree_upside_down.Solution.TreeNode UpsideDownBinaryTree(wr.leetcode.algo.binary_tree_upside_down.Solution.TreeNode root) {
wr.leetcode.algo.binary_tree_upside_down.Solution.TreeNode curr = new wr.leetcode.algo.binary_tree_upside_down.Solution.TreeNode();
wr.leetcode.algo.binary_tr... | public wr.leetcode.algo.binary_tree_upside_down.Solution.TreeNode UpsideDownBinaryTree(wr.leetcode.algo.binary_tree_upside_down.Solution.TreeNode root) {
wr.leetcode.algo.binary_tree_upside_down.Solution.TreeNode curr = new wr.leetcode.algo.binary_tree_upside_down.Solution.TreeNode((-1));
wr.leetcode.algo.binar... |
public boolean onCreateOptionsMenu(android.view.Menu menu) {
android.view.MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_tik_button, menu);
menuItemTik = menu.findItem(R.id.action_tik);
if (!(isLocationInitialized))
menuItemTik.setVisible(false);
return true;
} | public boolean onCreateOptionsMenu(android.view.Menu menu) {
android.view.MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_tik_button, menu);
menuItemTik = menu.findItem(R.id.action_tik);
if (!(isLocationInitialized))
menuItemTik.setVisible(false);
else
menuIte... |
public static void main(java.lang.String[] args) {
java.util.List<Coordinate<java.lang.Double>> test = ParseData.PD(args[0], true);
java.lang.System.out.println(((">> The parsed data has " + (test.size())) + " entries."));
java.lang.System.out.println(">> The parsed data contains:");
List_ops.print_coor... | public static void main(java.lang.String[] args) {
java.util.List<Coordinate<java.lang.Double>> test = ParseData.PD(args[0], false);
java.lang.System.out.println(((">> The parsed data has " + (test.size())) + " entries."));
java.lang.System.out.println(">> The parsed data contains:");
List_ops.print_coo... |
public void compete() {
if ((currentEvent) == null) {
java.lang.System.out.println("hello");
currentEvent = Event.NONE;
}
switch (currentEvent) {
case CYCLING :
cyclingComponent.Cycle();
break;
case RUNNING :
runningComponent.Run();
... | public void compete() {
if ((currentEvent) == null) {
java.lang.System.out.println("hello");
}
switch (currentEvent) {
case CYCLING :
cyclingComponent.Cycle();
break;
case RUNNING :
runningComponent.Run();
break;
case SWIMMING :... |
public void testRegionIsFoundWithMafGreaterThanEquals() {
java.lang.String chr = "11";
int start = 189000;
int end = 190000;
org.opencb.biodata.models.feature.Region region = new org.opencb.biodata.models.feature.Region(chr, start, end);
java.util.List<org.opencb.biodata.models.feature.Region> regio... | public void testRegionIsFoundWithMafGreaterThanEquals() {
java.lang.String chr = "11";
int start = 189000;
int end = 190000;
org.opencb.biodata.models.feature.Region region = new org.opencb.biodata.models.feature.Region(chr, start, end);
java.util.List<org.opencb.biodata.models.feature.Region> regio... |
public void onConnected() {
if (!(myBlueTooth.hasSupport())) {
android.widget.Toast.makeText(getActivity(), "Bluetooth LE is not supported", Toast.LENGTH_SHORT).show();
getActivity().finish();
}else {
addPreferencesFromResource(R.xml.pref_settings_general);
setPreferenceBluetooth... | public void onConnected() {
if (!(myBlueTooth.hasSupport())) {
android.widget.Toast.makeText(getActivity(), "Bluetooth LE is not supported", Toast.LENGTH_SHORT).show();
getActivity().finish();
}else {
addPreferencesFromResource(R.xml.pref_settings_general);
setPreferenceScreenDev... |
public java.util.List<edu.uci.eecs.wukong.framework.model.Component> getReplicatedComponent() {
java.util.List<edu.uci.eecs.wukong.framework.model.Component> components = new java.util.ArrayList<edu.uci.eecs.wukong.framework.model.Component>();
for (edu.uci.eecs.wukong.framework.model.Component component : comp... | public java.util.List<edu.uci.eecs.wukong.framework.model.Component> getReplicatedComponent() {
java.util.List<edu.uci.eecs.wukong.framework.model.Component> components = new java.util.ArrayList<edu.uci.eecs.wukong.framework.model.Component>();
for (edu.uci.eecs.wukong.framework.model.Component component : this... |
public void testFilmInstanceIsCreatedForFilmsFormat() {
com.metabroadcast.atlas.glycerin.model.Episode tli = new com.metabroadcast.atlas.glycerin.model.Episode();
tli.setPid("b012cl84");
tli.setTitle("Destiny");
tli.setProgrammeFormats(filmFormatsType());
org.atlasapi.media.entity.Item extracted = e... | public void testFilmInstanceIsCreatedForFilmsFormat() {
com.metabroadcast.atlas.glycerin.model.Episode tli = new com.metabroadcast.atlas.glycerin.model.Episode();
tli.setPid("b012cl84");
tli.setTitle("Destiny");
tli.setProgrammeFormats(filmFormatsType());
org.atlasapi.media.entity.Item extracted = e... |
super.stop();
for (State s : states) {
s.reset_first_time();
s.stop();
}
begin.reset_first_time();
begin.stop();
end.reset_first_time();
end.run();
end.stop();
update_actual(null);
reset_state_timer();
this.status = Status.INACTIVE;
if (debug)
java... | super.stop();
for (State s : states) {
s.reset_first_time();
s.stop();
}
begin.reset_first_time();
begin.stop();
end.reset_first_time();
end.stop();
update_actual(null);
reset_state_timer();
this.status = Status.INACTIVE;
if (debug)
java.lang.System.ou... |
public void actionPerformed(java.awt.event.ActionEvent e) {
flags.hideAllFlags();
bombs.setBombs();
bombs.printBombGrid();
emptySquares = ((MyPanel.TOTAL_COLUMNS) * (MyPanel.TOTAL_ROWS)) - (bombs.getNumberOfBombs());
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
col... | public void actionPerformed(java.awt.event.ActionEvent e) {
flags.hideAllFlags();
bombs.setBombs();
bombs.printBombGrid();
emptySquares = ((MyPanel.TOTAL_COLUMNS) * (MyPanel.TOTAL_ROWS)) - (bombs.getNumberOfBombs());
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
col... |
public com.theironyard.entities.User createUser(@com.theironyard.controllers.RequestBody
com.theironyard.entities.User newUser, javax.servlet.http.HttpSession session) throws java.lang.Exception {
com.theironyard.entities.User user = users.findByUserName(newUser.getUserName());
if (user == null) {
user ... | public java.lang.String createUser(@com.theironyard.controllers.RequestBody
com.theironyard.entities.User newUser, javax.servlet.http.HttpSession session) throws java.lang.Exception {
com.theironyard.entities.User user = users.findByUserName(newUser.getUserName());
if (user == null) {
user = new com.the... |
public void addSearchData(java.lang.Object searchData) {
if (searchData != null) {
com.google.gwt.user.client.Window.alert(("Received search results!: \n" + (searchData.toString())));
searchResultsStore = new com.extjs.gxt.ui.client.store.ListStore<org.sigmah.shared.dto.search.SearchResultsDTO>();
... | public void addSearchData(java.lang.Object searchData) {
if (searchData != null) {
searchResultsStore = new com.extjs.gxt.ui.client.store.ListStore<org.sigmah.shared.dto.search.SearchResultsDTO>();
for (java.lang.Object object : ((java.util.ArrayList) (searchData))) {
searchResultsStore.... |
protected void onPostExecute(java.lang.String result) {
if (result == "Failed") {
android.widget.Toast.makeText(getApplicationContext(), "No Connection to Database", Toast.LENGTH_LONG).show();
startActivity(new android.content.Intent(this, com.example.dennis.nerdquiz.MainActivity.class));
fi... | protected void onPostExecute(java.lang.String result) {
if (result.equals("Failed")) {
android.widget.Toast.makeText(getApplicationContext(), "No Connection to Database", Toast.LENGTH_LONG).show();
startActivity(new android.content.Intent(this, com.example.dennis.nerdquiz.MainActivity.class));
... |
public void removeSingleContactTest() throws java.lang.InterruptedException {
de.qabel.core.config.Contact testContactRemoveSingle = contactFactory.create();
java.lang.Thread actorThread = new java.lang.Thread(testActor);
actorThread.start();
testActor.removeContacts(testContactRemoveSingle.getKeyIdenti... | public void removeSingleContactTest() throws java.lang.InterruptedException {
de.qabel.core.config.Contact testContactRemoveSingle = contactFactory.create();
testActor.removeContacts(testContactRemoveSingle.getKeyIdentifier());
actorThread.join();
org.junit.Assert.assertFalse(contacts.getContacts().cont... |
protected void loadPlugins() {
pickingPlugin = new edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin<model.Vertex, model.Edge>();
animatedPickingPlugin = new edu.uci.ics.jung.visualization.control.AnimatedPickingGraphMousePlugin<model.Vertex, model.Edge>();
editingPlugin = new control.MyEditing... | protected void loadPlugins() {
pickingPlugin = new edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin<model.Vertex, model.Edge>();
editingPlugin = new control.MyEditingGraphMousePlugin<model.Vertex, model.Edge>(vertexFactory, edgeFactory);
annotatingPlugin = new edu.uci.ics.jung.visualization.an... |
public void run() {
final android.animation.ObjectAnimator animScrollToTop = android.animation.ObjectAnimator.ofInt(scrollView, "scrollY", scrollView.getBottom());
animScrollToTop.setDuration(500);
animScrollToTop.start();
setTitleText(getString(R.string.no_source_found));
websiteView.setText(R.stri... | public void run() {
final android.animation.ObjectAnimator animScrollToTop = android.animation.ObjectAnimator.ofInt(scrollView, "scrollY", scrollView.getBottom());
animScrollToTop.setDuration(500);
animScrollToTop.start();
setTitleText(getString(R.string.no_source_found));
websiteView.setText(R.stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.