buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void displayLife() {
java.util.Set<thelife.engine.Point> allAliveCells = space.getAllAliveCells();
sceneCells.getChildren().clear();
allAliveCells.stream().filter(sceneScreen::isVisible).map(sceneScreen::toScreenRect).forEach(this::drawCell);
} | public void displayLife() {
java.util.Collection<thelife.engine.Point> allAliveCells = space.getAllAliveCells();
sceneCells.getChildren().clear();
allAliveCells.stream().filter(sceneScreen::isVisible).map(sceneScreen::toScreenRect).forEach(this::drawCell);
} |
public static boolean checkAndAdd(final com.orientechnologies.orient.core.record.impl.ODocument document) {
final java.util.Map<com.orientechnologies.orient.core.record.impl.ODocument, java.lang.Boolean> iMarshalledRecords = com.orientechnologies.orient.core.serialization.serializer.record.OSerializationSetThreadLo... | public static boolean checkAndAdd(final com.orientechnologies.orient.core.record.impl.ODocument document) {
final java.util.Map<com.orientechnologies.orient.core.record.impl.ODocument, java.lang.Boolean> iMarshalledRecords = com.orientechnologies.orient.core.serialization.serializer.record.OSerializationSetThreadLo... |
public java.util.List<com.ymt.testplatform.entity.Testsuite> findAllTestsuitesByApplicationId(java.lang.Integer applicationid, java.lang.Integer departmentid, java.lang.Integer pageSize, java.lang.Integer pageIndex) {
java.lang.String hql = "from Testsuite t where t.del = 0 ";
if (applicationid != null) {
... | public java.util.List<com.ymt.testplatform.entity.Testsuite> findAllTestsuitesByApplicationId(java.lang.Integer applicationid, java.lang.Integer departmentid, java.lang.Integer pageSize, java.lang.Integer pageIndex) {
java.lang.String hql = "from Testsuite t where t.del = 0 ";
if (applicationid != null) {
... |
private int getNextInRing(int direction) {
int peers = (remotePeerHashMap.size()) + 1;
int index = getID();
for (int i = 0; i < (remotePeerHashMap.size()); i++) {
index = (index + direction) % peers;
if (remotePeerHashMap.containsKey(index))
return index;
}
java.... | private int getNextInRing(int direction) {
int peers = (remotePeerHashMap.size()) + 1;
int index = getID();
for (int i = 0; i < (remotePeerHashMap.size()); i++) {
index = (((index + direction) % peers) + peers) % peers;
if (remotePeerHashMap.containsKey(index)) {
return index;
... |
private boolean applyExponentialStrategy(double actualOdd, double playerOddBelief, double playerBeliefDegree, double initialOdd) {
if (actualOdd <= playerOddBelief) {
return true;
}else {
java.util.Random r = new java.util.Random();
int probability = (r.nextInt(99)) + 1;
double i... | private boolean applyExponentialStrategy(double actualOdd, double playerOddBelief, double playerBeliefDegree, double initialOdd) {
if (actualOdd <= playerOddBelief) {
return true;
}else {
java.util.Random r = new java.util.Random();
int probability = (r.nextInt(99)) + 1;
double i... |
public void loadMedias(int page, java.lang.String albumId) {
mCurrentAlbumId = albumId;
if (page == 0) {
mTasksView.clearMedia();
}
android.content.ContentResolver cr = mTasksView.getAppCr();
if (cr == null) {
return ;
}
com.bilibili.boxing.model.BoxingManager.getInstance().l... | public void loadMedias(int page, java.lang.String albumId) {
mCurrentAlbumId = albumId;
if (page == 0) {
mTasksView.clearMedia();
}
android.content.ContentResolver cr = mTasksView.getAppCr();
com.bilibili.boxing.model.BoxingManager.getInstance().loadMedia(cr, page, albumId, mLoadMediaCallbac... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mFragmentManager = getSupportFragmentManager();
com.example.robertduriancik.meteorito.fragments.MeteoriteListFragment meteoriteListFragment = new com.example.robert... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mFragmentManager = getSupportFragmentManager();
com.example.robertduriancik.meteorito.fragments.MeteoriteListFragment meteoriteListFragment = new com.example.robert... |
public boolean isDayOffAllDay() {
return (((com.framgia.wsm.utils.common.StringUtils.isNotBlank(mTextMorning)) && (com.framgia.wsm.utils.common.StringUtils.isNotBlank(mTextAfternoon))) && (!(mTimeIn.equals(mTextMorning)))) && (!(mTimeOut.equals(mTextAfternoon)));
} | public boolean isDayOffAllDay() {
return (((com.framgia.wsm.utils.common.StringUtils.isNotBlank(mTextMorning)) && (com.framgia.wsm.utils.common.StringUtils.isNotBlank(mTextAfternoon))) && (!(mTextMorning.equals(mTimeIn)))) && (!(mTextAfternoon.equals(mTimeOut)));
} |
public static alluxio.client.file.options.CompleteUfsFileOptions defaults() {
alluxio.security.authorization.PermissionStatus ps = alluxio.security.authorization.PermissionStatus.defaults();
try {
ps.setUserFromLoginModule(alluxio.client.ClientContext.getConf()).applyFileUMask(alluxio.client.ClientConte... | public static alluxio.client.file.options.CompleteUfsFileOptions defaults() {
alluxio.security.authorization.PermissionStatus ps = alluxio.security.authorization.PermissionStatus.defaults();
try {
ps.setUserFromLoginModule(alluxio.client.ClientContext.getConf()).applyFileUMask(alluxio.client.ClientConte... |
private java.util.Map<java.lang.String, java.lang.Double> lineToVector(final java.lang.String line) {
final java.util.Map<java.lang.String, java.lang.Double> vector = new java.util.HashMap<java.lang.String, java.lang.Double>();
final java.lang.String vectorData = line.split(">", 2)[1];
for (java.lang.String... | private java.util.Map<java.lang.String, java.lang.Double> lineToVector(final java.lang.String line) {
final java.util.Map<java.lang.String, java.lang.Double> vector = new java.util.HashMap<java.lang.String, java.lang.Double>();
final java.lang.String vectorData = line.split("\t", 2)[1];
for (java.lang.Strin... |
public static void main(java.lang.String[] args) {
java.lang.System.out.println("Morse code program by Andrew Bevelhymer");
if ((args.length) < 1) {
MorseCode.usage();
}
if (args[0].equals("-e")) {
MorseCode.encode();
}else
if (args[0].equals("-d")) {
MorseCode.de... | public static void main(java.lang.String[] args) {
java.lang.System.out.println("Morse code program by Andrew Bevelhymer");
if ((args.length) < 1) {
MorseCode.usage();
}else {
if (args[0].equals("-e")) {
MorseCode.encode();
}else
if (args[0].equals("-d")) {
... |
public void setPathByString(java.lang.String pathString) {
path = new java.util.LinkedList<>();
java.lang.String[] stringPieces = pathString.split("/");
for (int i = (stringPieces.length) - 1; i > 0; i--)
path.add(new it.simonedegiacomi.goboxapi.GBFile(stringPieces[i], true));
this.name = s... | public void setPathByString(java.lang.String pathString) {
path = new java.util.LinkedList<>();
java.lang.String[] stringPieces = pathString.split("/");
for (int i = 0; i < ((stringPieces.length) - 1); i++)
path.add(new it.simonedegiacomi.goboxapi.GBFile(stringPieces[i], true));
this.name =... |
public java.lang.String getVersionName(int version) {
java.lang.String versionName = config.getConfigString(("versions." + version));
if (versionName == null) {
getLogger().severe(("Missing version: versions." + version));
versionName = config.getConfigString("versions.0");
if (versionNa... | public java.lang.String getVersionName(int version) {
java.lang.String versionName = config.getConfigString(("versions." + version));
if ((versionName == null) || (versionName.isEmpty())) {
getLogger().severe(("Missing version: versions." + version));
versionName = config.getConfigString("versio... |
private void sellShares(int numberOfShares) throws net.cs50.finance.models.StockLookupException {
if (numberOfShares > (sharesOwned)) {
throw new java.lang.IllegalArgumentException(("Number to sell exceeds shares owned for stock" + (symbol)));
}
setSharesOwned(((sharesOwned) - numberOfShares));
... | private void sellShares(int numberOfShares) throws net.cs50.finance.models.StockLookupException {
this.symbol = symbol.toUpperCase();
if (numberOfShares > (sharesOwned)) {
throw new java.lang.IllegalArgumentException(("Number to sell exceeds shares owned for stock" + (symbol)));
}
setSharesOwned... |
public void start() {
if (startFlag.compareAndSet(false, true)) {
fireLifeCycleEvent(LifeCyclePhase.BEFORE_START, null);
start0();
fireLifeCycleEvent(LifeCyclePhase.AFTER_START, null);
}else {
com.shinemo.mpush.api.container.AbstractLifeCycle.log.error(("has start:" + (this.getCl... | public void start() {
if (startFlag.compareAndSet(false, true)) {
fireLifeCycleEvent(LifeCyclePhase.BEFORE_START);
start0();
fireLifeCycleEvent(LifeCyclePhase.AFTER_START);
}else {
com.shinemo.mpush.api.container.AbstractLifeCycle.log.error(("has start:" + (this.getClass().getSim... |
public void onClick(android.view.View v) {
int id = v.getId();
switch (id) {
case R.id.link_signup :
{
startActivity(new android.content.Intent(this, com.fimo_pitch.main.SignUpActivity.class));
break;
}
case R.id.loginGG :
{
... | public void onClick(android.view.View v) {
int id = v.getId();
switch (id) {
case R.id.link_signup :
{
startActivity(new android.content.Intent(this, com.fimo_pitch.main.SignUpActivity.class));
break;
}
case R.id.loginGG :
{
... |
public void setLayoutData(de.jwic.base.Control control, de.jwic.controls.layout.TableData layoutData) {
if ((control.getContainer()) != (this)) {
throw new java.lang.IllegalArgumentException("The specified control is not member of this container.");
}
if (control instanceof de.jwic.controls.layout.T... | public void setLayoutData(de.jwic.base.Control control, de.jwic.controls.layout.TableData layoutData) {
if ((control.getContainer()) != (this)) {
throw new java.lang.IllegalArgumentException("The specified control is not member of this container.");
}
allLayoutInfos.put(control.getName(), (layoutDat... |
public Item dequeue() throws java.lang.IndexOutOfBoundsException {
if (isEmpty())
throw new java.lang.IndexOutOfBoundsException("Queue underflow");
Item item = arr[first];
arr[first] = null;
(size)--;
(first)++;
if ((first) == (arr.length))
first = 0;
if ((arr.lengt... | public Item dequeue() throws java.lang.IndexOutOfBoundsException {
if (isEmpty())
throw new java.lang.IndexOutOfBoundsException("Queue underflow");
Item item = arr[first];
arr[first] = null;
(size)--;
(first)++;
if ((first) == (arr.length))
first = 0;
if ((arr.lengt... |
public static org.gradoop.common.model.impl.properties.PropertyValue combine(org.gradoop.common.model.impl.properties.PropertyValue first, org.gradoop.common.model.impl.properties.PropertyValue second) {
java.util.List<org.gradoop.common.model.impl.properties.PropertyValue> values = (first.isList()) ? first.getList... | public static org.gradoop.common.model.impl.properties.PropertyValue combine(org.gradoop.common.model.impl.properties.PropertyValue first, org.gradoop.common.model.impl.properties.PropertyValue second) {
java.util.List<org.gradoop.common.model.impl.properties.PropertyValue> values;
if (first.isList()) {
... |
public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
net.jqwik.newArbitraries.NShrinkResult<?> that = ((net.jqwik.newArbitraries.NShrinkResult<?>) (o));
return (java.util.Objects.equals(shru... | public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
net.jqwik.newArbitraries.NShrinkResult<?> that = ((net.jqwik.newArbitraries.NShrinkResult<?>) (o));
return java.util.Objects.equals(shrun... |
public it.unibo.alchemist.model.interfaces.TimeDistribution<java.lang.Double> createTimeDistribution(final org.apache.commons.math3.random.RandomGenerator rand, final it.unibo.alchemist.model.interfaces.Environment<java.lang.Double> env, final it.unibo.alchemist.model.interfaces.Node<java.lang.Double> node, final java.... | public it.unibo.alchemist.model.interfaces.TimeDistribution<java.lang.Double> createTimeDistribution(final org.apache.commons.math3.random.RandomGenerator rand, final it.unibo.alchemist.model.interfaces.Environment<java.lang.Double> env, final it.unibo.alchemist.model.interfaces.Node<java.lang.Double> node, final java.... |
public synchronized void onPaletteEvent(com.zomato.photofilters.imageprocessors.Filter filter) {
mMainTab.select();
mTabSelectedListener.onTabSelected(mMainTab);
mHandler.removeCallbacks(mTask);
mFrameAdapter.setFilter(filter);
mHistoryAdapter.addHistory();
mFrameAdapter.apply();
mPreview.se... | public synchronized void onPaletteEvent(com.zomato.photofilters.imageprocessors.Filter filter) {
mHandler.removeCallbacks(mTask);
mHistoryAdapter.addHistory();
mFrameAdapter.apply();
mFrameAdapter.setFilter(filter);
mHistoryAdapter.addHistory();
mFrameAdapter.apply();
mPreview.setImageBitmap... |
public void showOnDisplay(java.lang.String number, java.lang.String operation) {
setContentView(R.layout.activity_fullscreen);
android.widget.TextView digitalScreen = ((android.widget.TextView) (findViewById(R.id.textView)));
setTextHeight(digitalScreen);
digitalScreen.setText(number);
android.widge... | public void showOnDisplay(java.lang.String number, java.lang.String operation) {
setContentView(R.layout.activity_fullscreen);
android.widget.TextView digitalScreen = ((android.widget.TextView) (findViewById(R.id.textView)));
android.widget.TextView operationScreen = ((android.widget.TextView) (findViewById... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
handle = new com.app.rahul_zoldyck.MangaWolf.Mysqlhandler(this, null);
all = new java.util.ArrayList<>();
all = handle.getnames();
if ((all) == null) {
... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
handle = new com.app.rahul_zoldyck.MangaWolf.Mysqlhandler(this, null);
all = new java.util.ArrayList<>();
all = handle.getnames();
if ((all.size()) == 0) {
... |
public void sendMessage(final com.hokee.hermes.models.User sender, final com.hokee.hermes.models.Contact recipient, final java.lang.String message) {
final com.hokee.shared.SendMessageInput body = new com.hokee.shared.SendMessageInput();
body.sender = sender.getId();
body.recipient = recipient.getId();
... | public void sendMessage(final com.hokee.hermes.models.User sender, final com.hokee.hermes.models.Contact recipient, final java.lang.String message) {
final com.hokee.shared.SendMessageInput body = new com.hokee.shared.SendMessageInput(sender.getId(), recipient.getId(), message);
org.springframework.http.HttpEnt... |
public java.lang.Object get(int idx) {
int indexmanager = 0;
if ((indexmanager > (this.nodeCount)) || (indexmanager < 0)) {
return null;
}else {
for (Node n = head; n != null; n = n.next) {
if (indexmanager == idx) {
return n.element;
}else {
... | public java.lang.Object get(int idx) {
int indexmanager = 0;
if ((idx > (this.nodeCount)) || (idx < 0)) {
return null;
}else {
for (Node n = head; n != null; n = n.next) {
if (indexmanager == idx) {
return n.element;
}else {
indexmanage... |
public void addRecipe12() {
mocha = new edu.pjatk.inn.coffeemaker.impl.Recipe();
mocha.setName("Mocha");
mocha.setPrice(60);
mocha.setAmtCoffee(3);
mocha.setAmtMilk(2);
mocha.setAmtSugar(2);
mocha.setAmtChocolate(java.lang.Integer.parseInt("a"));
org.junit.Assert.assertFalse(coffeeMaker.... | public void addRecipe12() {
mocha = new edu.pjatk.inn.coffeemaker.impl.Recipe();
mocha.setName("Mocha");
mocha.setPrice(60);
mocha.setAmtCoffee(3);
mocha.setAmtMilk(2);
mocha.setAmtSugar(2);
mocha.setAmtChocolate("a");
org.junit.Assert.assertFalse(coffeeMaker.addRecipe(mocha));
} |
public void afterClosingWeGetAfreshLink() throws java.lang.Exception {
java.net.URI randomURI = getRandomURI();
org.ardulink.core.Link link1 = createConnectionBasedLink(randomURI);
org.ardulink.core.Link link2 = createConnectionBasedLink(randomURI);
org.ardulink.core.convenience.LinksTest.assertAllSameI... | public void afterClosingWeGetAfreshLink() throws java.lang.Exception {
java.net.URI randomURI = getRandomURI();
org.ardulink.core.Link link1 = createConnectionBasedLink(randomURI);
org.ardulink.core.Link link2 = createConnectionBasedLink(randomURI);
org.ardulink.core.convenience.LinksTest.assertAllSameI... |
public java.lang.String toString() {
java.lang.StringBuilder b = new java.lang.StringBuilder();
b.append("\"");
for (int i = 0; i < (props.text.length); i++) {
b.append(props.text[i]);
if ((i + 1) < (props.text.length)) {
b.append('\n');
}
}
b.append('\"');
re... | public java.lang.String toString() {
java.lang.StringBuilder b = new java.lang.StringBuilder();
b.append('\"');
for (int i = 0; i < (props.text.length); i++) {
b.append(props.text[i]);
if ((i + 1) < (props.text.length)) {
b.append('\n');
}
}
b.append('\"');
re... |
public void testDetermineParentsEmpty() {
java.util.HashMap<java.lang.Integer, core.Node> nodeMap = new java.util.HashMap<>();
core.Node n1 = new core.Node(1, "A", 1);
nodeMap.put(1, n1);
core.GraphReducer.determineParents(nodeMap);
org.junit.Assert.assertTrue(((nodeMap.get(1).getParents().size()) =... | public void testDetermineParentsEmpty() {
java.util.HashMap<java.lang.Integer, core.Node> nodeMap = new java.util.HashMap<>();
core.Node n1 = new core.Node(1, "A", 1);
nodeMap.put(1, n1);
core.GraphReducer.determineParents(nodeMap);
assertTrue(((nodeMap.get(1).getParents().size()) == 0));
} |
public static void setImage(final com.facebook.drawee.view.SimpleDraweeView view, final java.lang.String url) {
view.post(new java.lang.Runnable() {
@java.lang.Override
public void run() {
if (url == null) {
view.setImageURI(Uri.EMPTY);
}else {
... | public static void setImage(final com.facebook.drawee.view.SimpleDraweeView view, final java.lang.String url) {
if (url == null) {
view.setImageURI(Uri.EMPTY);
}else {
if ((url.length()) == 0)
view.setImageURI(Uri.EMPTY);
else
view.setImageURI(android.net.Uri.pars... |
public void shouldReturnNullDigestOnDoubleWrites() throws java.io.IOException {
chksumChannel.write(buffers[0], 0);
buffers[0].rewind();
chksumChannel.write(buffers[0], 0);
assertThat(chksumChannel.getChecksum(), org.hamcrest.Matchers.equalTo(null));
} | public void shouldReturnNullDigestOnDoubleWrites() throws java.io.IOException {
chksumChannel.write(buffers[0], 0);
buffers[0].rewind();
chksumChannel.write(buffers[0], 0);
assertThat(chksumChannel.getChecksum(), equalTo(null));
} |
private client.PlayerStatus changeState(client.Card cardPointed) {
if ((cardPointed.getCategory()) == (CardCategory.BASIC)) {
switch (cardPointed.getCardID()) {
case BASIC_APPLE :
handCards.remove(cardPointed);
return PlayerStatus.INIT;
case BASIC_DODG... | private client.PlayerStatus changeState(client.Card cardPointed) {
if ((cardPointed.getCategory()) == (CardCategory.BASIC)) {
switch (cardPointed.getCardID()) {
case BASIC_APPLE :
return PlayerStatus.INIT;
case BASIC_DODGE :
return PlayerStatus.INIT;
... |
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (resultCode) {
case com.demo.MiniMp4Activity.OK :
context.success(data.getStringExtra("path"));
android.widget.Toast.makeText... | public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (resultCode) {
case com.demo.MiniMp4Activity.OK :
if (data != null) {
context.success(data.getStringExtra("path"));
... |
public boolean onItemClick(android.view.View view, int position, com.mikepenz.materialdrawer.model.interfaces.IDrawerItem drawerItem) {
android.util.Log.d("drawer", ((("The drawer is: " + drawerItem) + " position is ") + position));
if (position == 1) {
startMainActivity();
android.util.Log.d("d... | public boolean onItemClick(android.view.View view, int position, com.mikepenz.materialdrawer.model.interfaces.IDrawerItem drawerItem) {
android.util.Log.d("drawer", ((("The drawer is: " + drawerItem) + " position is ") + position));
if (position == 1) {
startMainActivity();
android.util.Log.d("d... |
private java.util.List<java.lang.Integer> getRecipes() {
java.util.ArrayList<java.lang.Integer> recipesList = new java.util.ArrayList<java.lang.Integer>();
java.util.Random random = new java.util.Random();
for (int i = 0; i < (km.barsim.handler.AbstractSFSClientRequestHandler.MAX_RECIPES); i++) {
in... | protected java.util.List<java.lang.Integer> getRecipes() {
java.util.ArrayList<java.lang.Integer> recipesList = new java.util.ArrayList<java.lang.Integer>();
java.util.Random random = new java.util.Random();
for (int i = 0; i < (km.barsim.handler.AbstractSFSClientRequestHandler.MAX_RECIPES); i++) {
... |
@org.junit.jupiter.api.Test
void addConstantToRegister() {
de.attila.chip8emulator.Chip8 parenttest = new de.attila.chip8emulator.Chip8("");
parenttest.setCpuRegister(1, ((byte) (5)));
parenttest.writeToMemory(512, ((byte) (113)));
parenttest.writeToMemory(513, ((byte) (5)));
parenttest.emulateCycle... | @org.junit.jupiter.api.Test
void addConstantToRegister() {
de.attila.chip8emulator.Chip8 parenttest = new de.attila.chip8emulator.Chip8("");
parenttest.setCpuRegister(1, 5);
parenttest.writeToMemory(512, ((byte) (113)));
parenttest.writeToMemory(513, ((byte) (5)));
parenttest.emulateCycle();
org... |
private void getCardByPages() throws java.io.IOException {
minCardPage = calculateMinCardPage();
for (int page = minCardPage; page <= (maxCardPage); page++) {
if (com.thoughtworks.lhli.lovelive_rock.LoveLiveApp.getInstance().isNetworkAvailable()) {
retrofit.Call<com.thoughtworks.lhli.loveliv... | private void getCardByPages() throws java.io.IOException {
for (int page = minCardPage; page <= (maxCardPage); page++) {
if (com.thoughtworks.lhli.lovelive_rock.LoveLiveApp.getInstance().isNetworkAvailable()) {
retrofit.Call<com.thoughtworks.lhli.lovelive_rock.model.MultipleCards> call = com.tho... |
public static boolean isPublicConstructorFactory(com.cinnober.msgcodec.Factory<?> factory) {
if ((factory.getClass()) != (com.cinnober.msgcodec.ConstructorFactory.class)) {
return false;
}
java.lang.reflect.Constructor<?> constructor = ((com.cinnober.msgcodec.ConstructorFactory) (factory)).getConstr... | public static boolean isPublicConstructorFactory(com.cinnober.msgcodec.Factory<?> factory) {
if ((factory.getClass()) != (com.cinnober.msgcodec.ConstructorFactory.class)) {
return false;
}
java.lang.reflect.Constructor<?> constructor = ((com.cinnober.msgcodec.ConstructorFactory<?>) (factory)).getCon... |
public boolean getBooleanProperty(java.lang.String key) {
java.lang.String stringProperty = getStringProperty(key).trim();
return (stringProperty != null) && (((stringProperty.equalsIgnoreCase("true")) || (stringProperty.equalsIgnoreCase("yes"))) || (stringProperty.equals("1")));
} | public boolean getBooleanProperty(java.lang.String key) {
java.lang.String stringProperty = getStringProperty(key);
return (stringProperty != null) && (((stringProperty.trim().equalsIgnoreCase("true")) || (stringProperty.trim().equalsIgnoreCase("yes"))) || (stringProperty.trim().equals("1")));
} |
public static java.lang.String formatPaginationFilePath(java.lang.String rootPath, int index) {
if (index <= 1) {
return (rootPath + (java.io.File.separator)) + "index.html";
}else {
return (((rootPath + (java.io.File.separator)) + "page") + (java.io.File.separator)) + "index.html";
}
} | public static java.lang.String formatPaginationFilePath(java.lang.String rootPath, int index) {
if (index <= 1) {
return (rootPath + (java.io.File.separator)) + "index.html";
}else {
return (((((rootPath + (java.io.File.separator)) + "page") + (java.io.File.separator)) + index) + (java.io.File.s... |
public int random(Random rand, int num1, int num2) {
return (num1 - 1) + ((int) (java.lang.Math.ceil(((rand.nextDouble()) * ((num2 - num1) + 1)))));
} | public int random(java.util.Random rand, int num1, int num2) {
return (num1 - 1) + ((int) (java.lang.Math.ceil(((rand.nextDouble()) * ((num2 - num1) + 1)))));
} |
public static void addLocked(android.content.Context context, anand.android.applockcloneminapi23.views.adapters.modle.AppInfo app) {
java.util.ArrayList<anand.android.applockcloneminapi23.views.adapters.modle.AppInfo> lockedApp = anand.android.applockcloneminapi23.utils.SharedPref.getLocked(context);
if (locked... | public static void addLocked(android.content.Context context, java.lang.String app) {
java.util.List<java.lang.String> lockedApp = anand.android.applockcloneminapi23.utils.SharedPref.getLocked(context);
if (lockedApp == null)
lockedApp = new java.util.ArrayList<java.lang.String>();
lockedApp.ad... |
private int[] expandDimension(int U) {
int i = (U / (this.N)) + 1;
int j = U - ((this.N) * (i - 1));
int[] retarr = new int[]{ i , j };
return retarr;
} | private int[] expandDimension(int U) {
int i = (U / ((this.N) + 1)) + 1;
int j = (U - ((this.N) * (U / (this.N)))) + 1;
int[] retarr = new int[]{ i , j };
return retarr;
} |
public static void writeToErr(java.lang.Exception e, java.lang.String message) {
java.lang.System.err.print((("[" + (java.time.LocalTime.now().toString())) + "] [StreamBot] "));
e.printStackTrace();
if (!(message.isEmpty()))
java.lang.System.err.print(((("[" + (java.time.LocalTime.now().toString()))... | public static void writeToErr(java.lang.Exception e, java.lang.String message) {
java.lang.System.err.print((("[" + (java.time.LocalTime.now().toString())) + "] [StreamBot] "));
e.printStackTrace();
if (!(message.isEmpty()))
java.lang.System.err.println(((("[" + (java.time.LocalTime.now().toString()... |
private void drillbitRegistered(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint dbe) {
java.lang.String key = toKey(dbe);
org.apache.drill.yarn.zk.ZKRegistry.DrillbitTracker tracker = registry.get(key);
if (tracker == null) {
org.apache.drill.yarn.zk.ZKRegistry.LOG.info(("Registratio... | private void drillbitRegistered(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint dbe) {
java.lang.String key = toKey(dbe);
org.apache.drill.yarn.zk.ZKRegistry.DrillbitTracker tracker = registry.get(key);
if (tracker == null) {
org.apache.drill.yarn.zk.ZKRegistry.LOG.info(("Registratio... |
public void TC_05_testVerifyPastAppointmentListVisibility() {
java.lang.System.out.println("Verify that Past Appointment List is visible on Past Appointment Screen");
dashboardpage.onTapDashboardtext();
com.qa.mobileapp.common.GlobalUtil.wait(2);
dashboardpage.onTapMyTasksExpandButton();
com.qa.mobi... | public void TC_05_testVerifyPastAppointmentListVisibility() {
java.lang.System.out.println("Verify that Past Appointment List is visible on Past Appointment Screen");
dashboardpage.onTapDashboardtext();
com.qa.mobileapp.common.GlobalUtil.wait(2);
dashboardpage.onTapMyTasksExpandButton();
com.qa.mobi... |
public void onUpgrade(android.database.sqlite.SQLiteDatabase db, int i, int i1) {
db.execSQL(TblClients.SQL_DROP_TABLE);
db.execSQL(TblStatus.SQL_DROP_TABLE);
db.execSQL(TblMyDebts.SQL_DROP_TABLE);
db.execSQL(TblWhoOwesMe.SQL_DROP_TABLE);
db.execSQL(TblClients.SQL_CREATE_TABEL);
db.execSQL(TblSt... | public void onUpgrade(android.database.sqlite.SQLiteDatabase db, int i, int i1) {
db.execSQL(TblStatus.SQL_DROP_TABLE);
db.execSQL(TblMyDebts.SQL_DROP_TABLE);
db.execSQL(TblWhoOwesMe.SQL_DROP_TABLE);
db.execSQL(TblStatus.SQL_CREATE_TABEL);
db.execSQL(TblMyDebts.SQL_CREATE_TABLE);
db.execSQL(TblW... |
private int getScore(int y, int x, char[][] board) {
board[y][x] = this.player;
if (this.checkIfICanWin(y, x, board)) {
board[y][x] = ' ';
return 10;
}
if (this.checkIfOtherCanWin(y, x, board)) {
board[y][x] = ' ';
return 5;
}
board[y][x] = ' ';
return 0;
} | private int getScore(int y, int x, char[][] board) {
if (this.checkIfICanWin(y, x, board)) {
board[y][x] = ' ';
return 5;
}
if (this.checkIfOtherCanWin(y, x, board)) {
board[y][x] = ' ';
return 10;
}
board[y][x] = ' ';
return 0;
} |
public boolean equals(java.lang.Object obj) {
if ((this) == obj)
return true;
if (obj == null)
return false;
if ((getClass()) != (obj.getClass()))
return false;
org.araqne.logdb.query.command.Join.JoinKeys other = ((org.araqne.logdb.query.command.Join.JoinKeys) (ob... | public boolean equals(java.lang.Object obj) {
if ((this) == obj)
return true;
if (obj == null)
return false;
if ((getClass()) != (obj.getClass()))
return false;
org.araqne.logdb.query.command.Join.JoinKeys other = ((org.araqne.logdb.query.command.Join.JoinKeys) (ob... |
public boolean move(Board board, int xStart, int yStart, int xEnd, int yEnd) {
if ((strategy) == 1) {
return randomMove(board, xStart, yStart, xEnd, yEnd);
}else
if ((strategy) == 2) {
return protectKingMove(board, xStart, yStart, xEnd, yEnd);
}
return false;
} | public boolean move(Board board, int xStart, int yStart, int xEnd, int yEnd) {
if ((strategy) == 1) {
return randomMove(board, xStart, yStart, xEnd, yEnd, null);
}else
if ((strategy) == 2) {
return protectKingMove(board, xStart, yStart, xEnd, yEnd);
}
return false;
} |
public java.lang.String[] getDistinctDesignatorValues(java.lang.String key) {
com.mongodb.DBCollection coll = getDatabase().getCollection("logged_designators");
java.util.List<?> l = coll.distinct(key);
java.lang.String[] out = new java.lang.String[l.size()];
int index = 0;
for (java.lang.Object v :... | public java.lang.Object[] getDistinctDesignatorValues(java.lang.String key) {
com.mongodb.DBCollection coll = getDatabase().getCollection("logged_designators");
java.util.List<?> l = coll.distinct(key);
java.lang.Object[] out = new java.lang.Object[l.size()];
int index = 0;
for (java.lang.Object v :... |
public final model.data.Table doProcess() {
model.data.Table input = getInput();
codesOnCodeTable();
if (input == null) {
throw new java.lang.IllegalStateException("Input is not set");
}
if (input instanceof model.data.CombinedDataTable) {
model.data.CombinedDataTable comb = ((model.... | public final model.data.Table doProcess() {
model.data.Table input = getInput();
codesOnCodeTable();
if (input == null) {
throw new java.lang.IllegalStateException("Input is not set");
}
if (input instanceof model.data.CombinedDataTable) {
model.data.CombinedDataTable comb = ((model.... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_stone);
init();
android.content.IntentFilter intentFilter = new android.content.IntentFilter();
intentFilter.addAction(com.just.stone.service.StoneAccessibilityService... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_stone);
init();
android.content.IntentFilter intentFilter = new android.content.IntentFilter();
intentFilter.addAction(com.just.stone.service.StoneAccessibilityService... |
public void onLoadNextPage(android.view.View view) {
super.onLoadNextPage(view);
com.lnyp.recyclerview.RecyclerViewLoadingFooter.State state = com.lnyp.recyclerview.RecyclerViewStateUtils.getFooterViewState(listJuzi);
if (state == (RecyclerViewLoadingFooter.State.Loading)) {
return ;
}
if (m... | public void onLoadNextPage(android.view.View view) {
super.onLoadNextPage(view);
com.lnyp.recyclerview.RecyclerViewLoadingFooter.State state = com.lnyp.recyclerview.RecyclerViewStateUtils.getFooterViewState(listJuzi);
if (state == (RecyclerViewLoadingFooter.State.Loading)) {
return ;
}
if (m... |
public void paintComponent(java.awt.Graphics g) {
if ((image) == null) {
image = createImage(getSize().width, getSize().height);
graphics2D = ((java.awt.Graphics2D) (image.getGraphics()));
graphics2D.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANT... | public void paintComponent(java.awt.Graphics g) {
super.paintComponent(g);
if ((image) == null) {
image = createImage(getSize().width, getSize().height);
graphics2D = ((java.awt.Graphics2D) (image.getGraphics()));
graphics2D.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java... |
public static java.util.prefs.Preferences getLegacyPreferences14(java.util.prefs.Preferences root) {
try {
if (!(root.nodeExists("org"))) {
return null;
}
root = root.node("org");
if (!(root.nodeExists("micromanager"))) {
return null;
}
return ... | public static java.util.prefs.Preferences getLegacyPreferences14(java.util.prefs.Preferences root) {
try {
if (!(root.nodeExists("org"))) {
return null;
}
root = root.node("org");
if (!(root.nodeExists("micromanager"))) {
return null;
}
return ... |
public void onCreate() {
super.onCreate();
dataSource = new org.melayjaire.boimela.data.BookDataSource(this);
dataSource.open();
android.support.v4.content.LocalBroadcastManager.getInstance(this).registerReceiver(bookUpdateBroadcastReceiver, new android.content.IntentFilter(org.melayjaire.boimela.utils.... | public void onCreate() {
super.onCreate();
dataSource = new org.melayjaire.boimela.data.BookDataSource(this);
dataSource.open();
android.support.v4.content.LocalBroadcastManager.getInstance(this).registerReceiver(bookUpdateBroadcastReceiver, new android.content.IntentFilter(org.melayjaire.boimela.utils.... |
void sendMessage(javafx.event.ActionEvent event) {
java.lang.String message = this.messageView.getText();
if (message != null) {
java.util.Calendar cal = java.util.Calendar.getInstance();
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("HH:mm:ss");
listView.getItems().add... | void sendMessage(javafx.event.ActionEvent event) {
java.lang.String message = this.messageView.getText();
if (message != null) {
java.util.Calendar cal = java.util.Calendar.getInstance();
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("HH:mm:ss");
listView.getItems().add... |
public void done(com.parse.ParseException e) {
if (e == null)
android.util.Log.d("DEBUG", "Successfully created event on Parse");
android.support.design.widget.Snackbar snackbar = android.support.design.widget.Snackbar.make(view, " Event created Successfully!!", Snackbar.LENGTH_LONG).setActionTe... | public void done(com.parse.ParseException e) {
if (e == null)
android.util.Log.d("DEBUG", "Successfully created event on Parse");
com.codepath.qzineat.fragments.HostListFragment hostListFragment = new com.codepath.qzineat.fragments.HostListFragment();
android.support.v4.app.FragmentTransaction ... |
private static double calculateTax(double income) {
double tax = 0.0;
for (double[] T : com.timvisee.hhsbigjava.c3.BigJavaP3_21.TAX_CONFIG) {
tax += ((T[0]) != (-1.0) ? java.lang.Math.min(income, T[0]) : T[0]) * (T[1]);
if ((income -= T[0]) <= 0)
break;
}
return tax;... | private static double calculateTax(double income) {
double tax = 0.0;
for (double[] T : com.timvisee.hhsbigjava.c3.BigJavaP3_21.TAX_CONFIG) {
tax += ((T[0]) != (-1.0) ? java.lang.Math.min(income, T[0]) : income) * (T[1]);
if ((income -= T[0]) <= 0)
break;
}
return ta... |
public void ballMove(double elapsedTime) {
ball.setX(((ball.getX()) + (elapsedTime * (ball_speed_horizontal))));
ball.setY(((ball.getY()) - (elapsedTime * (ball_speed_vertical))));
} | public void ballMove(double elapsedTime) {
ball.setX(((ball.getX()) + (elapsedTime * (ball_speed_horizontal))));
ball.setY(((ball.getY()) + (elapsedTime * (ball_speed_vertical))));
} |
public long[] getSimulcastLayersSSRCs(java.lang.String peerJid) {
mock.util.ConferenceUtility confUtility = getConferenceUtility();
java.lang.String conferenceId = confUtility.getJvbConferenceId();
java.lang.String videoChannelId = confUtility.getParticipantVideoChannelId(peerJid);
java.util.SortedSet<m... | public long[] getSimulcastLayersSSRCs(java.lang.String peerJid) {
mock.util.ConferenceUtility confUtility = getConferenceUtility();
java.lang.String conferenceId = confUtility.getJvbConferenceId();
java.lang.String videoChannelId = confUtility.getParticipantVideoChannelId(peerJid);
java.util.List<mock.u... |
public android.support.v4.widget.DrawerLayout onCreateDrawerLayout() {
if (((findViewById(R.id.app__drawer_layout)) == null) || (((findViewById(R.id.app__drawer_layout)) != null) && (!((findViewById(R.id.app__drawer_layout)) instanceof android.support.v4.widget.DrawerLayout)))) {
throw new java.lang.Illegal... | public android.support.v4.widget.DrawerLayout onCreateDrawerLayout() {
if (((findViewById(R.id.app__drawer_layout)) == null) || (((findViewById(R.id.app__drawer_layout)) != null) && (!((findViewById(R.id.app__drawer_layout)) instanceof android.support.v4.widget.DrawerLayout)))) {
throw new java.lang.Illegal... |
protected static byte[] compressFile(java.io.File file, int algorithm) throws java.io.IOException {
org.bouncycastle.openpgp.PGPCompressedDataGenerator comData = new org.bouncycastle.openpgp.PGPCompressedDataGenerator(algorithm);
try {
java.io.ByteArrayOutputStream bOut = new java.io.ByteArrayOutputStre... | protected static byte[] compressFile(java.io.File file, int algorithm) throws java.io.IOException {
org.bouncycastle.openpgp.PGPCompressedDataGenerator comData = new org.bouncycastle.openpgp.PGPCompressedDataGenerator(algorithm);
java.io.ByteArrayOutputStream bOut = new java.io.ByteArrayOutputStream();
try ... |
public com.tr.rp.core.LanguageElement visitIf_stat(com.tr.rp.parser.DefProgParser.If_statContext ctx) {
com.tr.rp.parser.DefProgParser.BoolexprContext bctx = ctx.boolexpr();
com.tr.rp.expressions.bool.BoolExpression boolExpr = ((com.tr.rp.expressions.bool.BoolExpression) (visit(bctx)));
com.tr.rp.core.DStat... | public com.tr.rp.core.LanguageElement visitIf_stat(com.tr.rp.parser.DefProgParser.If_statContext ctx) {
com.tr.rp.parser.DefProgParser.BoolexprContext bctx = ctx.boolexpr();
com.tr.rp.expressions.bool.BoolExpression boolExpr = ((com.tr.rp.expressions.bool.BoolExpression) (visit(bctx)));
com.tr.rp.core.DStat... |
public void awaitTermination(long timeout) throws java.lang.InterruptedException {
taskGroupRemoveLock.lock();
try {
while (!(this.taskGroupList.isEmpty())) {
taskGroupRemoveCondition.await(timeout, java.util.concurrent.TimeUnit.MILLISECONDS);
}
} finally {
taskGroupRemo... | public void awaitTermination(long timeout) throws java.lang.InterruptedException {
taskGroupRemoveLock.lock();
try {
while (!(taskGroupList.isEmpty())) {
taskGroupRemoveCondition.await(timeout, java.util.concurrent.TimeUnit.MILLISECONDS);
}
} finally {
taskGroupRemoveLoc... |
private void recordExtension(java.lang.String fileName) {
java.lang.String[] tokens = fileName.split("\\.");
if ((tokens.length) > 0) {
java.lang.String extension = tokens[((tokens.length) - 1)];
extensionsFound.add(extension);
}
} | private void recordExtension(java.lang.String fileName) {
java.lang.String[] tokens = fileName.split("\\.");
if ((tokens.length) > 0) {
java.lang.String extension = tokens[((tokens.length) - 1)];
extensionsFound.add(extension.toLowerCase());
}
} |
private void addInternal() {
int originalSize = taskList.size();
int newSize = originalSize + 1;
if ((index) != 0) {
taskList.add(((index) - 1), task);
}else {
taskList.add(task);
}
if ((taskList.size()) == newSize)
addedInternal = true;
} | private void addInternal() {
int originalSize = taskList.size();
int newSize = originalSize + 1;
if ((index) != (-1)) {
taskList.add(((index) - 1), task);
}else {
taskList.add(task);
}
if ((taskList.size()) == newSize)
addedInternal = true;
} |
private void setTeamAttributes(java.lang.Object teamOne, com.amazon.speech.slu.Intent intent, com.amazon.speech.speechlet.Session session) {
if (teamOne == null) {
session.setAttribute("TeamOneName", intent.getSlot("TeamOne").getValue());
currentTeamAttribute = ((java.lang.String) (session.getAttrib... | private void setTeamAttributes(com.amazon.speech.slu.Intent intent, com.amazon.speech.speechlet.Session session) {
if ((session.getAttribute("TeamOneName")) == null) {
session.setAttribute("TeamOneName", intent.getSlot("TeamOne").getValue());
currentTeamAttribute = ((java.lang.String) (session.getAt... |
public void testLoadConfigurationDeprecated() {
try {
@java.lang.SuppressWarnings(value = "deprecation")
final com.puppycrawl.tools.checkstyle.DefaultConfiguration config = ((com.puppycrawl.tools.checkstyle.DefaultConfiguration) (com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(... | public void testLoadConfigurationDeprecated() throws java.lang.Exception {
@java.lang.SuppressWarnings(value = "deprecation")
final com.puppycrawl.tools.checkstyle.DefaultConfiguration config = ((com.puppycrawl.tools.checkstyle.DefaultConfiguration) (com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfi... |
private void encodeByteMap(boolean[] b, int offset) {
int n = 0;
for (int i = 0; i < 32; i++) {
if (b[(offset + i)]) {
n |= 1 << (31 - i);
}
}
encodeInt(n);
} | private void encodeByteMap(boolean[] b, int offset) {
int n = 0;
for (int i = 0; i < 32; i++) {
if (b[(offset + i)]) {
n |= 1 << i;
}
}
encodeInt(n);
} |
public void run() {
if ((i) == (solution.getSolution().size())) {
cancel();
return ;
}
character.setPos(solution.getSolution().get(((i)++)).getState());
setMazeData(maze.getCrossSectionByZ(character.getPos().z));
redraw();
} | public void run() {
if ((i) == (solution.getSolution().size())) {
cancel();
return ;
}
if ((i) == (-1)) {
i = 0;
}
character.setPos(solution.getSolution().get(((i)++)).getState());
setMazeData(maze.getCrossSectionByZ(character.getPos().z));
redraw();
} |
public parking.beans.document.Account registerUser(parking.beans.document.Account user, int number, javax.servlet.http.HttpServletRequest request) throws parking.exceptions.ApplicationException {
parking.beans.document.Account createdAccount = userService.createUser(user, request);
if (java.util.Optional.ofNull... | public parking.beans.document.Account registerUser(parking.beans.document.Account user, java.lang.Integer number, javax.servlet.http.HttpServletRequest request) throws parking.exceptions.ApplicationException {
parking.beans.document.Account createdAccount = userService.createUser(user, request);
if (java.util.O... |
public void testCreateArtWithNullArtType() {
thrown.expect(exceptions.ConstraintViolationException.class);
thrown.expectMessage(org.hamcrest.core.StringStartsWith.startsWith("Validation failed"));
thrown.expectMessage(org.hamcrest.CoreMatchers.containsString("Art type must be provided"));
dto.Art art = ... | public void testCreateArtWithNullArtType() {
thrown.expect(exceptions.ConstraintViolationException.class);
thrown.expectMessage(org.hamcrest.core.StringStartsWith.startsWith("Validation failed"));
thrown.expectMessage(org.hamcrest.CoreMatchers.containsString("Art type must be provided"));
new dto.Art.Ar... |
public void onAudioFocusChange(int focusChange) {
switch (focusChange) {
case android.media.AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK :
if ((mediaPlayer) != null)
mediaPlayer.setVolume(0.2F, 0.2F);
break;
case android.media.AudioManager.AUDI... | public void onAudioFocusChange(int focusChange) {
switch (focusChange) {
case android.media.AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK :
if ((mediaPlayer) != null)
mediaPlayer.setVolume(0.2F, 0.2F);
pause(getCurrentAudio());
break;
... |
public void testBindServiceProfileToCE() throws com.emc.cloud.platform.clientlib.ClientGeneralException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException {
createdServiceProfile = ucsmService.bindSPToComputeElement(com.emc.cloud.ucsm.service.UCSMServiceT... | public void testBindServiceProfileToCE() throws com.emc.cloud.platform.clientlib.ClientGeneralException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException {
createdServiceProfile = ucsmService.bindSPToComputeElement(com.emc.cloud.ucsm.service.UCSMServiceT... |
public void success(retrofit.client.Response jsonElement, retrofit.client.Response response) {
if ((jsonElement != null) && ((jsonElement.getBody()) != null)) {
com.fillr.browsersdk.Fillr.javascriptData = new java.lang.String(((retrofit.mime.TypedByteArray) (jsonElement.getBody())).getBytes());
if (... | public void success(retrofit.client.Response jsonElement, retrofit.client.Response response) {
if ((jsonElement != null) && ((jsonElement.getBody()) != null)) {
com.fillr.browsersdk.Fillr.javascriptData = new java.lang.String(((retrofit.mime.TypedByteArray) (jsonElement.getBody())).getBytes());
if (... |
public java.lang.String getinfo() {
java.lang.String hour = java.lang.String.valueOf(this.hour);
java.lang.String minute = java.lang.String.valueOf(this.hour);
if (((this.hour) / 10) == 0)
hour = "0" + (this.hour);
if (((this.minute) / 10) == 0)
minute = "0" + (this.minute);
... | public java.lang.String getinfo() {
java.lang.String hour = java.lang.String.valueOf(this.hour);
java.lang.String minute = java.lang.String.valueOf(this.minute);
if (((this.hour) / 10) == 0)
hour = "0" + (this.hour);
if (((this.minute) / 10) == 0)
minute = "0" + (this.minute);
... |
public void bindToCoordinates(com.task.vasskob.firebase.model.Coordinates coordinates) {
java.lang.String formattedTime = new java.text.SimpleDateFormat("MM/dd/yyyy_HH:mm:ss", java.util.Locale.US).format(coordinates.recordTime);
recordingTime.setText(formattedTime);
accelerometerData.setText((((((("(" + (co... | private void bindToCoordinates(com.task.vasskob.firebase.model.Coordinates coordinates) {
java.lang.String formattedTime = new java.text.SimpleDateFormat("MM/dd/yyyy_HH:mm:ss", java.util.Locale.US).format(coordinates.recordTime);
recordingTime.setText(formattedTime);
accelerometerData.setText((((((("(" + (c... |
public boolean shouldContinueUponFieldFailure(com.yahoo.elide.security.PermissionManager.CheckMode checkMode, boolean hasDeferredChecks) {
if (!((checkMode == (PermissionManager.CheckMode.ALL)) || (!hasDeferredChecks))) {
log.debug("Continuing on field-level check failure: {} {}", checkMode, hasDeferredChec... | public boolean shouldContinueUponFieldFailure(com.yahoo.elide.security.PermissionManager.CheckMode checkMode, boolean hasDeferredChecks) {
if ((checkMode == (PermissionManager.CheckMode.ALL)) || (!hasDeferredChecks)) {
log.debug("Not continuing on field-level check failure: {} {}", checkMode, hasDeferredChe... |
protected void draw(java.awt.Graphics2D g2d, java.awt.Dimension screenSize) {
centerOfScreen = new java.awt.Dimension(((screenSize.width) / 2), ((screenSize.height) / 2));
java.awt.geom.AffineTransform defaultAffineTransform = new java.awt.geom.AffineTransform();
defaultAffineTransform.translate(getScreenX(... | protected void draw(java.awt.Graphics2D g2d, java.awt.Dimension screenSize) {
centerOfScreen = new java.awt.Dimension(((screenSize.width) / 2), ((screenSize.height) / 2));
java.awt.geom.AffineTransform defaultAffineTransform = new java.awt.geom.AffineTransform();
defaultAffineTransform.translate(getScreenX(... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, @android.support.annotation.Nullable
android.view.ViewGroup container, @android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
android.view.View view = inflater.inflate(R.layout.fragment_managing_existing_products, cont... | public android.view.View onCreateView(android.view.LayoutInflater inflater, @android.support.annotation.Nullable
android.view.ViewGroup container, @android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
android.view.View view = inflater.inflate(R.layout.fragment_managing_existing_products, cont... |
private static double heuristic(Spot a, Spot b) {
int x = (b.getI()) - (a.getI());
int y = (b.getJ()) - (a.getJ());
return x + y;
} | private static double heuristic(Spot a, Spot b) {
int x = (b.getI()) - (a.getI());
int y = (b.getJ()) - (a.getJ());
if (x < 0)
x = -x;
if (y < 0)
y = -y;
return x + y;
} |
public void testCalcularT() throws java.lang.Exception {
util.Grafo g = util.GraphUtils.loadFromTxt("G11_ver");
mbt.modelo.arboles.modificado.Modelo m = new mbt.modelo.arboles.modificado.Modelo(g, 0, 1);
m.solve(new java.io.ByteArrayOutputStream());
org.junit.Assert.assertEquals(m.getSolucion()[0], mbt.... | public void testCalcularT() throws java.lang.Exception {
util.Grafo g = util.GraphUtils.loadFromTxt("G11_ver");
mbt.modelo.arboles.modificado.Modelo m = new mbt.modelo.arboles.modificado.Modelo(g, 0, 1, true);
m.solve(new java.io.ByteArrayOutputStream());
org.junit.Assert.assertEquals(m.getSolucion()[0]... |
public atu.testrecorder.ATUTestRecorder setVideoRecorder() {
objProp = new org.vukfactory.iamone.basic.IAODataReader();
try {
try {
createDirectoryIfNotExists(objProp.getProperty("IAMONE.recording.dir"));
recorder = new atu.testrecorder.ATUTestRecorder(objProp.getProperty("IAMONE... | public atu.testrecorder.ATUTestRecorder setVideoRecorder() {
try {
try {
createDirectoryIfNotExists(objProp.getProperty("IAMONE.recording.dir"));
recorder = new atu.testrecorder.ATUTestRecorder(objProp.getProperty("IAMONE.recording.dir"), objProp.getProperty("IAMONE.recording.fileNam... |
public void checkClick(int button, boolean pressed) {
if (button == 0) {
if ((isEditButtonEnabled()) && (!(forceCameraControls))) {
toolController.doEditToolActivatedPrimary(new com.jme3.math.Vector2f(mouseX, mouseY), pressed, cam);
}
}
if (button == 1) {
if ((isEditButto... | public void checkClick(int button, boolean pressed) {
if ((!(forceCameraControls)) || (!pressed)) {
if (button == 0) {
toolController.doEditToolActivatedPrimary(new com.jme3.math.Vector2f(mouseX, mouseY), pressed, cam);
}
if (button == 1) {
toolController.doEditToolAc... |
protected Course createCourse(java.lang.String courseType, java.lang.String n, java.lang.Double f, java.lang.String u, java.lang.String s, java.lang.String semester, java.lang.Double duration, java.lang.Double credits, java.lang.String certification, java.lang.String instructor) {
SemesterCourse sc = new SemesterCo... | protected Course createCourse(java.lang.String courseType, java.lang.String n, java.lang.Double f, java.lang.String u, java.lang.String s, java.lang.String semester, java.lang.Double duration, java.lang.Double credits, java.lang.String certification, java.lang.String instructor) {
SemesterCourse sc = new SemesterCo... |
private void parseDigitalInput(java.util.List<ch.desm.middleware.app.core.communication.endpoint.ubw32.EndpointUbw32Message> result, java.lang.String[] commandParts, java.lang.String response) {
java.lang.String[] responseParts = response.split(",");
if ((responseParts.length) != 2) {
throw new java.lan... | private void parseDigitalInput(java.util.List<ch.desm.middleware.app.core.communication.endpoint.ubw32.EndpointUbw32Message> result, java.lang.String[] commandParts, java.lang.String response) {
java.lang.String[] responseParts = response.split(",");
if ((responseParts.length) != 2) {
throw new java.lan... |
public void testExtractTimeSeries() {
java.lang.System.out.println("extractTimeSeries");
info.debatty.java.datasets.fish.Dataset dataset = new info.debatty.java.datasets.fish.Dataset();
java.util.LinkedList<info.debatty.java.datasets.fish.Image> images = dataset.getAll();
java.util.List<info.debatty.jav... | public void testExtractTimeSeries() {
java.lang.System.out.println("extractTimeSeries");
info.debatty.java.datasets.fish.Dataset dataset = new info.debatty.java.datasets.fish.Dataset();
java.util.LinkedList<info.debatty.java.datasets.fish.Image> images = dataset.getAll();
java.util.List<info.debatty.jav... |
public static void zombiesAttack(intf.IZombie[] zombies, intf.ISurvivor[] survivors) {
for (int i = 0; (i < (survivors.length)) && (survivors[i].isAlive()); i++) {
for (int z = 0; (z < (zombies.length)) && (zombies[z].isAlive()); z++) {
zombies[z].attack(survivors[i]);
}
}
} | public static void zombiesAttack(intf.IZombie[] zombies, intf.ISurvivor[] survivors) {
for (int i = 0; i < (survivors.length); i++) {
for (int z = 0; z < (zombies.length); z++) {
if ((survivors[i].isAlive()) && (zombies[z].isAlive())) {
zombies[z].attack(survivors[i]);
... |
public void updateProgressBarsForCurrentFolderResults(int recognised, int notRecognised, int notFound) {
int sum = (recognised + notRecognised) + notFound;
setResultToNorthPanel(recognised, sum);
recognisedProgressBar.setMaximum(sum);
notRecognisedProgressBar.setMaximum(sum);
notFoundProgressBar.set... | public void updateProgressBarsForCurrentFolderResults(int recognised, int notRecognised, int notFound) {
int sum = (recognised + notRecognised) + notFound;
setResultToNorthPanel(recognised, notRecognised, notFound);
recognisedProgressBar.setMaximum(sum);
notRecognisedProgressBar.setMaximum(sum);
not... |
public java.lang.String getCleanPattern(org.pentaho.di.core.row.RowMetaInterface data, java.lang.Object[] r, java.lang.String fieldNum, java.lang.String selectedPattern, java.lang.String customCode) throws org.pentaho.di.core.exception.KettleValueException {
java.lang.String replace_pattern = "";
int _intfieldN... | public java.lang.String getCleanPattern(org.pentaho.di.core.row.RowMetaInterface data, java.lang.Object[] r, java.lang.String fieldNum, java.lang.String selectedPattern, java.lang.String customCode) throws org.pentaho.di.core.exception.KettleValueException {
java.lang.String replace_pattern = "";
int _intfieldN... |
public void onError(java.lang.Exception error) {
mDomoticz.AddMobileDevice(UUID, senderId, new nl.hnogames.domoticzapi.Interfaces.MobileDeviceReceiver() {
@java.lang.Override
public void onSuccess() {
if (isAdded())
showSnackbar(mContext.getString(R.string.notification_se... | public void onSuccess() {
mDomoticz.AddMobileDevice(UUID, senderId, new nl.hnogames.domoticzapi.Interfaces.MobileDeviceReceiver() {
@java.lang.Override
public void onSuccess() {
if (isAdded())
showSnackbar(mContext.getString(R.string.notification_settings_pushed));
... |
public void setMemoryFieldText(java.lang.String text) {
java.lang.String memorySize;
if ((text.length()) == 0) {
memorySize = "0";
}else
if ((text.length()) > 9) {
memorySize = text.substring(0, 10);
}else {
memorySize = text;
}
memoryTextFiel... | public void setMemoryFieldText(java.lang.String text) {
java.lang.String memorySize;
if ((text.length()) == 0) {
memorySize = "0";
}else
if ((text.length()) > 9) {
memorySize = text.substring(0, 9);
}else {
memorySize = text;
}
memoryTextField... |
private void runTimeTest(java.util.ArrayList<process.Event> expected) {
org.joda.time.DateTime time = new org.joda.time.DateTime(2012, 1, 10, 10, 50, 0);
myCal.eventsAtTime(time);
java.util.List<process.Event> actual = myCal.getList();
org.junit.Assert.assertTrue(actual.equals(expected));
} | private void runTimeTest(java.util.ArrayList<process.Event> expected) {
org.joda.time.DateTime time = new org.joda.time.DateTime(2012, 1, 10, 10, 50, 0);
java.util.List<process.Event> actual = myCal.eventsAtTime(time).getList();
org.junit.Assert.assertTrue(actual.equals(expected));
} |
public void updateEverything() {
updateHeights();
updateVisibilities();
updateSystemIconsLayoutParams();
updateClickTargets();
updateMultiUserSwitch();
if ((mQSPanel) != null) {
mQSPanel.setExpanded(mExpanded);
}
updateClockScale();
updateAvatarScale();
updateClockLp();
... | public void updateEverything() {
updateHeights();
updateVisibilities();
updateSystemIconsLayoutParams();
updateClickTargets();
updateMultiUserSwitch();
if ((mQSPanel) != null) {
mQSPanel.setExpanded(mExpanded);
}
updateClockScale();
updateAvatarScale();
updateClockLp();
... |
public void setSourcePath(java.util.List<gw.fs.IDirectory> sourcePaths) {
java.util.List<gw.fs.IDirectory> sources = new java.util.ArrayList<>();
sources.addAll(getAdditionalSourceRoots());
sources.addAll(sourcePaths);
_fileRepository.setSourcePath(sources.toArray(new gw.fs.IDirectory[sourcePaths.size()... | public void setSourcePath(java.util.List<gw.fs.IDirectory> sourcePaths) {
java.util.List<gw.fs.IDirectory> sources = new java.util.ArrayList<gw.fs.IDirectory>(sourcePaths);
sources.addAll(getAdditionalSourceRoots());
_fileRepository.setSourcePath(sources.toArray(new gw.fs.IDirectory[sourcePaths.size()]));
} |
public void validate() throws java.lang.InterruptedException {
while (((persistenceProvider) == null) && (!(net.echinopsii.ariane.community.core.directory.base.persistence.iPojo.DirectoryJPAProviderImpl.isConfigurationValid()))) {
net.echinopsii.ariane.community.core.directory.base.persistence.iPojo.Directo... | public void validate() throws java.lang.InterruptedException {
while (((persistenceProvider) == null) || (!(net.echinopsii.ariane.community.core.directory.base.persistence.iPojo.DirectoryJPAProviderImpl.isConfigurationValid()))) {
net.echinopsii.ariane.community.core.directory.base.persistence.iPojo.Directo... |
private void loadBackgroundImage(java.lang.String imageUrl) {
if (isAdded()) {
return ;
}
mTarget = new com.sregg.android.tv.spotifyPlayer.fragments.ArtistsDetailsFragment.BackgroundTarget();
com.squareup.picasso.Picasso.with(getActivity()).load(imageUrl).transform(new com.sregg.android.tv.spoti... | private void loadBackgroundImage(java.lang.String imageUrl) {
if (!(isAdded())) {
return ;
}
mTarget = new com.sregg.android.tv.spotifyPlayer.fragments.ArtistsDetailsFragment.BackgroundTarget();
com.squareup.picasso.Picasso.with(getActivity()).load(imageUrl).transform(new com.sregg.android.tv.sp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.