buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public java.lang.String addProductToCart(it.uniroma3.model.Orders cart, it.uniroma3.model.Product product) {
java.lang.System.out.println((("trying to add " + (this.quantity)) + " Product to Cart"));
java.lang.System.out.println(cart.toString());
orderFacade.addProductToCart(cart, product, this.quantity);
... | public java.lang.String addProductToCart(it.uniroma3.model.Orders cart, it.uniroma3.model.Product product) {
java.lang.Integer quantity = 1;
if ((this.quantity) != 0)
quantity = this.quantity;
java.lang.System.out.println((("trying to add " + quantity) + " Product to Cart"));
java.lang.Syst... |
private java.util.List<com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet>> _readIn(com.orangerhymelabs.helenus.persistence.Identifier... ids) {
if (ids == null)
return null;
java.util.List<com.datastax.driver.core.ResultSetFuture> futures = new java.util.ArrayLis... | private java.util.List<com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet>> _readIn(com.orangerhymelabs.helenus.persistence.Identifier... ids) {
if (ids == null)
return null;
java.util.List<com.datastax.driver.core.ResultSetFuture> futures = new java.util.ArrayLis... |
public void saveEmailAddress(android.view.View view) {
senderEmail = senderEmailText.getText().toString();
senderPassword = senderPasswordText.getText().toString();
recepientEmail = recipientEmailText.getText().toString();
startButton.setEnabled(true);
endButton.setEnabled(false);
saveEmailButto... | public void saveEmailAddress(android.view.View view) {
senderEmail = senderEmailText.getText().toString();
senderPassword = senderPasswordText.getText().toString();
recepientEmail = recipientEmailText.getText().toString();
startButton.setEnabled(true);
endButton.setEnabled(false);
saveEmailButto... |
public android.support.v4.app.Fragment getItem(int pos) {
switch (pos) {
default :
{
c.add(java.util.Calendar.DATE, (pos - (lastpos)));
java.lang.System.out.println(c.get(java.util.Calendar.DAY_OF_YEAR));
android.os.Bundle b = new android.os.Bundle... | public android.support.v4.app.Fragment getItem(int pos) {
switch (pos) {
default :
{
c.add(java.util.Calendar.DATE, (pos - (lastpos)));
android.os.Bundle b = new android.os.Bundle();
b.putLong("Date", c.getTimeInMillis());
b.putStri... |
private void addCategory(application.Task task, javafx.scene.layout.HBox hBox) {
java.lang.String category = task.getCategory();
javafx.scene.control.Label lblCategory;
if (!(category.equalsIgnoreCase(Constant.CATEGORY_UNCATEGORISED))) {
lblCategory = new javafx.scene.control.Label(task.getCategory(... | private void addCategory(application.Task task, javafx.scene.layout.HBox hBox) {
java.lang.String category = task.getCategory();
javafx.scene.control.Label lblCategory;
if (!(category.equalsIgnoreCase(Constant.CATEGORY_UNCATEGORISED))) {
lblCategory = new javafx.scene.control.Label(task.getCategory(... |
public void testKeySet() {
java.util.concurrent.ConcurrentHashMap<java.lang.Integer, java.lang.Integer> map = createResizedDS();
java.util.Set<java.lang.Integer> keySet = map.keySet();
org.junit.Assert.assertNotEquals("You are likely running an unchanged JVM", "{0, 2, 3, 4, 5, 6, 7, 8, 9}", keySet.toString(... | public void testKeySet() {
java.util.concurrent.ConcurrentHashMap<java.lang.Integer, java.lang.Integer> map = this.createResizedDS();
java.util.Set<java.lang.Integer> keySet = map.keySet();
org.junit.Assert.assertNotEquals("You are likely running an unchanged JVM", "{0, 2, 3, 4, 5, 6, 7, 8, 9}", keySet.toSt... |
public void onExit(boolean shouldExit) {
if (shouldExit) {
final java.lang.String saveFileName = mAutoSaveManager.getAutoSaveFileName();
paulscode.android.mupen64plusae.jni.CoreInterface.pauseEmulator(true, saveFileName);
mAutoSaveManager.clearOldest();
paulscode.android.mupen64plusa... | public void onExit(boolean shouldExit) {
if (shouldExit) {
mMogaController.exit();
this.finish();
}else
if (!(mDrawerLayout.isDrawerOpen(GravityCompat.START))) {
paulscode.android.mupen64plusae.jni.CoreInterface.resumeEmulator();
}
mWaitingOnConfirmation = fa... |
protected void updateScore(org.ggp.base.player.gamer.statemachine.mctsref.SearchTreeNode<org.ggp.base.player.gamer.statemachine.mctsref.ARRSearchTree> xiChild, double[] playoutResult) {
if ((tree.mSuppressBackProp) || (mStopBackPropHere)) {
tree.mSuppressBackProp = true;
return ;
}
for (int ... | protected void updateScore(org.ggp.base.player.gamer.statemachine.mctsref.SearchTreeNode<org.ggp.base.player.gamer.statemachine.mctsref.ARRSearchTree> xiChild, double[] playoutResult) {
if ((tree.mSuppressBackProp) || (mStopBackPropHere)) {
tree.mSuppressBackProp = true;
return ;
}
(numVisit... |
public void writeRecord(epcc.ed.ac.uk.gcrf_rear.data.DataPoint dataPoint) throws java.io.IOException {
mOutputStream.writeByte(dataPoint.getSensorType().getType());
mOutputStream.writeByte(epcc.ed.ac.uk.gcrf_rear.data.DataStore.VERSION);
mOutputStream.writeLong(dataPoint.getTimestamp());
mOutputStream.w... | public void writeRecord(epcc.ed.ac.uk.gcrf_rear.data.DataPoint dataPoint) throws java.io.IOException {
mOutputStream.writeByte(epcc.ed.ac.uk.gcrf_rear.data.DataStore.VERSION);
mOutputStream.writeByte(dataPoint.getSensorType().getType());
mOutputStream.writeLong(dataPoint.getTimestamp());
mOutputStream.w... |
public <T> T unmarshallUtil(java.lang.String xmlPath, java.lang.Class<T> entityClass) throws java.lang.Exception {
javax.xml.bind.JAXBContext cxt = javax.xml.bind.JAXBContext.newInstance(entityClass);
javax.xml.bind.Unmarshaller unmarshaller = cxt.createUnmarshaller();
java.io.File file = new java.io.File((... | public <T> T unmarshallUtil(java.lang.String xmlPath, java.lang.Class<T> entityClass) throws java.lang.Exception {
javax.xml.bind.JAXBContext cxt = javax.xml.bind.JAXBContext.newInstance(entityClass);
javax.xml.bind.Unmarshaller unmarshaller = cxt.createUnmarshaller();
java.io.File file = new java.io.File(c... |
private static void initializegvSIGDrivers() throws java.lang.Exception {
final java.lang.String fwAndamiDriverPath = "../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/drivers";
final java.io.File baseDriversPath = new java.io.File(fwAndamiDriverPath);
if (!(baseDriversPath.exists())) {
throw new j... | private static void initializegvSIGDrivers() throws java.lang.Exception {
final java.lang.String fwAndamiDriverPath = "../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/drivers";
final java.io.File baseDriversPath = new java.io.File(fwAndamiDriverPath);
if (!(baseDriversPath.exists())) {
throw new j... |
public int minValue() {
int min = ((size) == 0) ? missingValue : java.lang.Integer.MAX_VALUE;
final int[] entries = this.entries;
@uk.co.real_logic.agrona.generation.DoNotSub
final int length = entries.length;
for (@uk.co.real_logic.agrona.generation.DoNotSub
int i = 1; i < length; i += 2) {
... | public int minValue() {
final int missingValue = this.missingValue;
int min = ((size) == 0) ? missingValue : java.lang.Integer.MAX_VALUE;
final int[] entries = this.entries;
@uk.co.real_logic.agrona.generation.DoNotSub
final int length = entries.length;
for (@uk.co.real_logic.agrona.generation.D... |
private javax.swing.JTextField buildComparingField() {
javax.swing.JTextField field = new javax.swing.JTextField(30);
field.setEditable(false);
field.setBorder(javax.swing.BorderFactory.createCompoundBorder(new javax.swing.JTextField().getBorder(), new javax.swing.border.EmptyBorder(3, 3, 3, 3)));
java.... | private javax.swing.JTextField buildComparingField() {
javax.swing.JTextField field = new javax.swing.JTextField();
field.setEditable(false);
field.setBorder(javax.swing.BorderFactory.createCompoundBorder(new javax.swing.JTextField().getBorder(), new javax.swing.border.EmptyBorder(3, 3, 3, 3)));
java.aw... |
public com.epimorphics.lda.restlets.Response requestHandlerAny(@com.epimorphics.lda.restlets.PathParam(value = "path")
java.lang.String pathstub, @com.epimorphics.lda.restlets.Context
javax.servlet.ServletContext config, @com.epimorphics.lda.restlets.Context
com.epimorphics.lda.restlets.UriInfo ui) {
try {
... | public com.epimorphics.lda.restlets.Response requestHandlerAny(@com.epimorphics.lda.restlets.PathParam(value = "path")
java.lang.String pathstub, @com.epimorphics.lda.restlets.Context
javax.servlet.ServletContext config, @com.epimorphics.lda.restlets.Context
com.epimorphics.lda.restlets.UriInfo ui) {
try {
... |
public void onUnRegister(final android.content.Context context, boolean b) {
com.jiang.android.push.utils.L.i("onUnRegister called");
if (b == true) {
if ((com.jiang.android.push.flyme.FlymeReceiver.mPushInterface) != null) {
com.jiang.android.push.utils.JHandler.handler().post(new java.lang... | public void onUnRegister(final android.content.Context context, boolean b) {
com.jiang.android.push.utils.L.i("onUnRegister called");
if (b == true) {
if ((com.jiang.android.push.flyme.FlymeReceiver.mPushInterface) != null) {
com.jiang.android.push.utils.JHandler.handler().post(new java.lang... |
protected java.lang.String doInBackground(java.lang.String... params) {
java.lang.System.out.println("----- ConnectionManager.Sync#doInBackground: Sync in progress");
if (App.PERFORM_UPDATE) {
App.PERFORM_UPDATE = false;
App.conLis.mysql_update();
}
for (int i = 0; i < (entry.size());) {... | protected java.lang.String doInBackground(java.lang.String... params) {
if (App.PERFORM_UPDATE) {
App.PERFORM_UPDATE = false;
App.conLis.mysql_update();
}
for (int i = 0; i < (entry.size());) {
if (entry.get(i).mysql_update()) {
++i;
}
}
syncTask = new fry... |
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
android.widget.TextView t = ((android.widget.TextView) (view.findViewById(R.id.rowText)));
saveMessages();
mCurrentRoom = t.getText().toString();
mCurrentRoomIndex = position;
mTextAdapter.... | public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
android.widget.TextView t = ((android.widget.TextView) (view.findViewById(R.id.rowText)));
saveMessages();
mCurrentRoom = t.getText().toString();
mCurrentRoomIndex = position;
mTextAdapter.... |
public com.chenenyu.router.IRouter with(android.os.PersistableBundle bundle) {
if ((bundle != null) && (bundle.isEmpty())) {
android.os.Bundle allBundle = mRouteRequest.getExtras();
if (allBundle == null) {
allBundle = new android.os.Bundle();
}
allBundle.putAll(bundle);
... | public com.chenenyu.router.IRouter with(android.os.PersistableBundle bundle) {
if ((bundle != null) && (!(bundle.isEmpty()))) {
android.os.Bundle allBundle = mRouteRequest.getExtras();
if (allBundle == null) {
allBundle = new android.os.Bundle();
}
allBundle.putAll(bundle... |
public void importNoTagsTest() {
java.io.File image = new java.io.File(((MapillaryPlugin.directory) + "images/icon16.png"));
org.openstreetmap.josm.plugins.mapillary.MapillaryImportedImage img = MapillaryPlugin.importAction.readNoTags(image, new org.openstreetmap.josm.data.coor.LatLon(0, 0));
assertEquals(0... | public void importNoTagsTest() {
java.io.File image = new java.io.File(((MapillaryPlugin.directory) + "images/icon16.png"));
org.openstreetmap.josm.plugins.mapillary.MapillaryImportedImage img = MapillaryPlugin.importAction.readNoTags(image, new org.openstreetmap.josm.data.coor.LatLon(0, 0));
assertEquals(0... |
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
switch (requestCode) {
case org.wycliffeassociates.translationrecorder.MainMenu.PROJECT_WIZARD_REQUEST :
{
if (resultCode == (RESULT_OK)) {
org.wycliffeassociates.t... | protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
switch (requestCode) {
case org.wycliffeassociates.translationrecorder.MainMenu.PROJECT_WIZARD_REQUEST :
{
if (resultCode == (RESULT_OK)) {
org.wycliffeassociates.t... |
public calculator.Matrix scalarMultiply(int a_scalar, calculator.Matrix a_matrix) {
calculator.Matrix scalarMatrix = new calculator.Matrix(a_matrix);
for (int row = 0; row < (a_matrix.getRows()); row++) {
for (int column = 0; column < (a_matrix.getColumns()); column++) {
calculator.Fraction ... | public calculator.Matrix scalarMultiply(calculator.Fraction a_scalar, calculator.Matrix a_matrix) {
calculator.Matrix scalarMatrix = new calculator.Matrix(a_matrix);
for (int row = 0; row < (a_matrix.getRows()); row++) {
for (int column = 0; column < (a_matrix.getColumns()); column++) {
calc... |
public void writeFile(java.lang.String filePath, java.lang.String[] chargeCodes) throws java.io.IOException {
java.io.File file = new java.io.File(filePath);
java.io.BufferedWriter bw = new java.io.BufferedWriter(new java.io.FileWriter(file, true));
for (java.lang.String string : chargeCodes) {
bw.a... | public void writeFile(java.lang.String filePath, java.lang.String[] chargeCodes) throws java.io.IOException {
java.io.File file = new java.io.File(filePath);
java.io.BufferedWriter bw = null;
try {
bw = new java.io.BufferedWriter(new java.io.FileWriter(file, true));
for (java.lang.String str... |
public final jnnet2.core.ConfusionMatrix count(final double predictedLabel, final double referenceLabel) {
++(multij.tools.Tools.getOrCreate(multij.tools.Tools.getOrCreate(this.data, predictedLabel, ((multij.tools.Factory) (DefaultFactory.TREE_MAP_FACTORY))), referenceLabel, jnnet2.core.ConfusionMatrix.INDIRECT_DOU... | public final jnnet2.core.ConfusionMatrix count(final double predictedLabel, final double referenceLabel) {
++(multij.tools.Tools.getOrCreate(((java.util.Map<java.lang.Double, double[]>) (multij.tools.Tools.getOrCreate(this.data, predictedLabel, ((multij.tools.Factory) (DefaultFactory.TREE_MAP_FACTORY))))), referenc... |
public static org.json.simple.JSONObject toJSON(jo.alexa.sim.data.MatchBean match) {
if (match == null)
return null;
org.json.simple.JSONObject jmatch = new org.json.simple.JSONObject();
jmatch.put("Confidence", match.getConfidence());
jmatch.put("Intent", match.getIntent().getIntent());
... | public static org.json.simple.JSONObject toJSON(jo.alexa.sim.data.MatchBean match) {
if (match == null)
return null;
org.json.simple.JSONObject jmatch = new org.json.simple.JSONObject();
jmatch.put("Confidence", match.getConfidence());
if ((match.getIntent()) != null)
jmatch.put("In... |
public T withName(java.lang.String name) {
this.name = name;
properties.setProperty(org.apache.geode.distributed.ConfigurationProperties.NAME, name);
properties.putIfAbsent(org.apache.geode.distributed.ConfigurationProperties.LOG_FILE, new java.io.File((name + ".log")).getAbsolutePath().toString());
ret... | public T withName(java.lang.String name) {
this.name = name;
properties.setProperty(org.apache.geode.distributed.ConfigurationProperties.NAME, name);
properties.putIfAbsent(org.apache.geode.distributed.ConfigurationProperties.LOG_FILE, new java.io.File((name + ".log")).getAbsolutePath());
return ((T) (t... |
public boolean isValid() {
switch (type) {
case NORMAL :
return (((isRealmClassValid()) && (isFieldDataValid())) && (isTransformerValid())) && (areArgsValid());
case NO_ARG :
case BEGIN_GROUP :
case END_GROUP :
case OR :
return ((isRealmClassValid()) &... | public boolean isValid() {
switch (type) {
case NORMAL :
return (((isRealmClassValid()) && (isFieldDataValid())) && (isTransformerValid())) && (areArgsValid());
case NO_ARG :
case BEGIN_GROUP :
case END_GROUP :
case OR :
return (isRealmClassValid()) &&... |
public static final boolean isNippyCompressed(byte[] bts) {
return (((((bts.length) > 4) && ((bts[0]) == 78)) && ((bts[1]) == 80)) && ((bts[2]) == 89)) && ((bts[3]) == 1);
} | public static final boolean isNippyCompressed(byte[] bts) {
return ((((bts.length) > 3) && ((bts[0]) == 78)) && ((bts[1]) == 80)) && ((bts[2]) == 89);
} |
static double averageScore(java.util.ArrayList<java.lang.Integer> scores) {
double sum = 0;
int n = (scores.size()) - 1;
for (int i = 0; i < n; i++) {
sum += scores.get(i);
}
return sum / n;
} | static double averageScore(java.util.ArrayList<java.lang.Integer> scores) {
double sum = 0;
for (int i = 0; i < (scores.size()); i++) {
sum += scores.get(i);
}
return sum / (scores.size());
} |
public static void shuffle(java.lang.Object[] toShuffle) {
java.util.Random r = new java.util.Random();
int j;
java.lang.Object temp;
for (int i = (toShuffle.length) - 1; i > 0; i--) {
j = r.nextInt(i);
temp = toShuffle[j];
toShuffle[j] = toShuffle[i];
toShuffle[i] = temp... | public static void shuffle(java.lang.Object[] toShuffle) {
java.util.Random r = new java.util.Random();
int j;
java.lang.Object temp;
for (int i = (toShuffle.length) - 1; i > 0; i--) {
j = r.nextInt((i + 1));
temp = toShuffle[j];
toShuffle[j] = toShuffle[i];
toShuffle[i] ... |
private void execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
session = request.getSession();
if ((session.getAttribute("username")) == null)
response.sendRedirect("login.jsp");
else {... | private void execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
session = request.getSession();
if ((session.getAttribute("username")) == null)
response.sendRedirect("login.jsp");
else {... |
static int sequential(int[] A, int K) {
for (int i = 1; i < (A.length); i++)
if ((A[i]) == K)
return i;
return A.length;
} | static int sequential(int[] A, int K) {
for (int i = 0; i < (A.length); i++)
if ((A[i]) == K)
return i;
return A.length;
} |
public java.util.UUID[] findGames() {
java.util.Set<java.util.UUID> keys = games.keySet();
keys.removeIf(( k) -> {
lolsoap.GameInstance game = games.get(k);
return !(game.isGameStarted());
});
return keys.toArray(new java.util.UUID[0]);
} | public java.util.UUID[] findGames() {
java.util.Set<java.util.UUID> keys = new java.util.HashSet<java.util.UUID>(games.keySet());
keys.removeIf(( k) -> {
lolsoap.GameInstance game = games.get(k);
return game.isGameStarted();
});
return keys.toArray(new java.util.UUID[0]);
} |
private java.util.List<org.threeten.bp.LocalDate> getDaysBetweenInReverse(org.threeten.bp.LocalDate from, org.threeten.bp.LocalDate to) {
java.util.List<org.threeten.bp.LocalDate> daysBetween = new java.util.ArrayList<>();
org.threeten.bp.ZonedDateTime fromInUtc = from.atStartOfDay(ZoneOffset.UTC);
org.thre... | private java.util.List<org.threeten.bp.LocalDate> getDaysBetweenInReverse(org.threeten.bp.LocalDate from, org.threeten.bp.LocalDate to) {
java.util.List<org.threeten.bp.LocalDate> daysBetween = new java.util.ArrayList<>();
org.threeten.bp.ZonedDateTime fromInUtc = from.atStartOfDay(ZoneOffset.UTC);
org.thre... |
public boolean apply(lu.zhe.mtgslackbot.card.Card card) {
if ((comparison) == null) {
return false;
}
java.lang.Integer intValue = lu.zhe.mtgslackbot.parsing.Parsing.PROPERTY_FUNCS.get(property).apply(card);
return (intValue != null) && (intValue < (comparison));
} | public boolean apply(lu.zhe.mtgslackbot.card.Card card) {
if ((comparison) == null) {
return false;
}
java.lang.Integer intValue = lu.zhe.mtgslackbot.parsing.Parsing.PROPERTY_FUNCS.get(property).apply(card);
return (intValue != null) && (intValue == (comparison));
} |
public static com.stratio.crossdata.common.logicalplan.Filter createFilter(java.lang.String catalogName, java.lang.String tableName, java.lang.String columnName, com.stratio.crossdata.common.statements.structures.Operator operator, java.lang.Float data, boolean indexed) {
com.stratio.crossdata.common.statements.str... | public static com.stratio.crossdata.common.logicalplan.Filter createFilter(java.lang.String catalogName, java.lang.String tableName, java.lang.String columnName, com.stratio.crossdata.common.statements.structures.Operator operator, java.lang.Float data, boolean indexed) {
com.stratio.crossdata.common.statements.str... |
private void setSourceForPlayer(java.util.List<java.lang.String> details) {
m.nischal.melody.MediaPlayerService.mPlayer.reset();
rx.Subscription sc = rx.Observable.just(details.get(0)).subscribeOn(rx.schedulers.Schedulers.io()).observeOn(rx.android.schedulers.AndroidSchedulers.mainThread()).subscribe(getPathObs... | private void setSourceForPlayer(java.util.List<java.lang.String> details) {
m.nischal.melody.MediaPlayerService.mPlayer.reset();
rx.Subscription sc = rx.Observable.just(details.get(0)).subscribeOn(rx.schedulers.Schedulers.io()).observeOn(rx.android.schedulers.AndroidSchedulers.mainThread()).subscribe(getPathObs... |
private void configureParserByDomain(java.lang.Integer id, java.lang.String url, org.jsoup.nodes.Document doc) {
edu.carleton.comp4601.project.dao.ProductType type = null;
edu.carleton.comp4601.project.dao.Product product = null;
if ((url.contains(retailer.getProductRoot())) && ((retailer.getName()) == (edu... | private void configureParserByDomain(java.lang.Integer id, java.lang.String url, org.jsoup.nodes.Document doc) {
edu.carleton.comp4601.project.dao.ProductType type = null;
edu.carleton.comp4601.project.dao.Product product = null;
if ((url.contains(retailer.getProductRoot())) && ((retailer.getName()) == (edu... |
protected com.example.gintas.weatherthing.Weather doInBackground(java.lang.String... params) {
com.example.gintas.weatherthing.Weather weather = new com.example.gintas.weatherthing.Weather();
java.lang.String data = new com.example.gintas.weatherthing.WeatherHTTPClient().getWeatherData(params[0]);
java.lang... | protected com.example.gintas.weatherthing.Weather doInBackground(java.lang.String... params) {
com.example.gintas.weatherthing.Weather weather = new com.example.gintas.weatherthing.Weather();
java.lang.String data = new com.example.gintas.weatherthing.WeatherHTTPClient().getWeatherData(params[0]);
try {
... |
public java.lang.String switchWeb() {
java.lang.String name = null;
java.util.Set<java.lang.String> set = superdr.getContextHandles();
for (java.lang.String s : set) {
if (!("NATIVE_APP".equals(s))) {
superdr.context(s);
name = superdr.getContext();
break;
... | public java.lang.String switchWeb() {
java.lang.String name = null;
java.util.Set<java.lang.String> set = superdr.getContextHandles();
for (java.lang.String s : set) {
java.lang.System.out.println(s);
if (!("NATIVE_APP".equals(s))) {
superdr.context(s);
name = superdr... |
public void configure() throws java.lang.Exception {
onException(java.lang.Exception.class).handled(true).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(500)).transform(simple("An error occurred: ${exception.message}"));
from(generateJettyEndpoint()).log(LoggingLevel.DEBUG, LOGGER, "Received request...").setEx... | public void configure() throws java.lang.Exception {
onException(java.lang.Exception.class).handled(true).setHeader(Exchange.HTTP_RESPONSE_CODE, constant(500)).transform(simple("An error occurred: ${exception.message}"));
from(generateJettyEndpoint()).log(LoggingLevel.DEBUG, LOGGER, "Received request...").setEx... |
public java.util.Set<java.lang.String> getLocalSamples() {
java.util.Set<java.lang.String> res = new java.util.HashSet<java.lang.String>();
int i = 0;
double cTemp;
for (java.lang.String v : data) {
if (((i++) % (Consts.SAMPLE_BASE)) == 0) {
cTemp = getTemp(v);
sampleTemp... | public java.util.List<java.lang.String> getLocalSamples() {
java.util.List<java.lang.String> res = new java.util.ArrayList<java.lang.String>();
int i = 0;
double cTemp;
for (java.lang.String v : data) {
if (((i++) % (Consts.SAMPLE_BASE)) == 0) {
cTemp = getTemp(v);
sample... |
public java.lang.Object convert(java.lang.Object source, java.lang.Class<?> expect, java.lang.Class<?>[] extension, com.kepler.generic.reflect.analyse.FieldsAnalyser analyser) throws java.lang.Exception {
com.kepler.generic.reflect.convert.Getter getter = super.getter(source, extension[0]);
if ((getter.empty())... | public java.lang.Object convert(java.lang.Object source, java.lang.Class<?> expect, java.lang.Class<?>[] extension, com.kepler.generic.reflect.analyse.FieldsAnalyser analyser) throws java.lang.Exception {
com.kepler.generic.reflect.convert.Getter getter = super.getter(source);
if ((getter.empty()) && (expect.is... |
public void testWebFlowNoIntent() {
org.mockito.Mockito.verify(mockActivity, org.mockito.Mockito.never()).onMDPAuthenticationSuccess(org.mockito.Matchers.any(com.vasco.mydigipass.sdk.MDPResponse.class));
org.powermock.api.mockito.PowerMockito.doReturn(null).when(mockActivity).getIntent();
mydigipass.webFlow... | public void testWebFlowNoIntent() {
org.mockito.Mockito.verify(mockActivity, org.mockito.Mockito.never()).onMDPAuthenticationSuccess(org.mockito.Matchers.any(com.vasco.mydigipass.sdk.MDPResponse.class));
org.mockito.Mockito.doReturn(null).when(mockActivity).getIntent();
mydigipass.webFlow();
} |
public void backspace() {
ru.tesei7.textEditor.editor.document.Line currentLine = document.getCurrentLine();
if ((currentLine.getOffset()) == 0) {
concatLines(currentLine.getPrevious(), currentLine, true);
}else {
currentLine.backspace();
}
} | public void backspace() {
ru.tesei7.textEditor.editor.document.Line currentLine = document.getCurrentLine();
if ((currentLine.getOffset()) == 0) {
concatLines(currentLine.getPrevious(), currentLine);
}else {
currentLine.backspace();
}
} |
public void testSourceSelectionPartnersNull() throws java.lang.Exception {
eu.eexcess.federatedrecommender.sourceselection.AgeSourceSelector ageSourceSelector = new eu.eexcess.federatedrecommender.sourceselection.AgeSourceSelector();
java.util.List<eu.eexcess.dataformats.PartnerBadge> partners = null;
eu.ee... | public void testSourceSelectionPartnersNull() throws java.lang.Exception {
eu.eexcess.federatedrecommender.sourceselection.AgeSourceSelector ageSourceSelector = new eu.eexcess.federatedrecommender.sourceselection.AgeSourceSelector(null);
java.util.List<eu.eexcess.dataformats.PartnerBadge> partners = null;
e... |
public void testReadGeoJSON2() throws java.lang.Exception {
java.sql.Statement stat = org.h2gis.functions.io.geojson.GeojsonImportExportTest.connection.createStatement();
java.sql.ResultSet res = stat.executeQuery("SELECT ST_GeomFromGeoJSON(\'{\"type\":\"LineString\",\"coordinates\":[[1,1],[10,10]]}\')");
r... | public void testReadGeoJSON2() throws java.lang.Exception {
java.sql.Statement stat = org.h2gis.functions.io.geojson.GeojsonImportExportTest.connection.createStatement();
java.sql.ResultSet res = stat.executeQuery("SELECT ST_GeomFromGeoJSON(\'{\"type\":\"LineString\",\"coordinates\":[[1,1],[10,10]]}\')");
r... |
public void handleMessage(android.os.Message msg) {
android.os.IBinder token = ((android.os.IBinder) (msg.obj));
com.lody.virtual.server.am.BroadcastSystem.BroadcastRecord r = mBroadcastRecords.remove(token);
if (r != null) {
com.lody.virtual.helper.utils.VLog.w(com.lody.virtual.server.am.BroadcastS... | public void handleMessage(android.os.Message msg) {
android.os.IBinder token = ((android.os.IBinder) (msg.obj));
com.lody.virtual.server.am.BroadcastSystem.BroadcastRecord r = mBroadcastRecords.remove(token);
if (r != null) {
com.lody.virtual.helper.utils.VLog.w(com.lody.virtual.server.am.BroadcastS... |
public void deleteAttachedObjects(java.lang.Long id) {
java.lang.String query = "DELETE FROM TrackingObject to WHERE to.saleOrder.id = :saleOrder";
entityManager.createQuery(query).setParameter("saleOrder", id).executeUpdate();
java.lang.String deleteMessage = messages.getLabel("stock_track_source_sale_orde... | public void deleteAttachedObjects(java.lang.Long id) {
java.lang.String query = "DELETE FROM TrackingObject to WHERE to.saleOrder.id = :saleOrder";
entityManager.createQuery(query).setParameter("saleOrder", id).executeUpdate();
java.lang.String deleteMessage = messages.getLabel("stock_track_source_sale_orde... |
public void appendTransition(int id, long timestamp, BitVector values) {
java.lang.System.out.println(((((("appendTransition " + id) + " ") + timestamp) + " ") + (values.toString(2))));
VCDLoaderTest.ExpectTraceBuilder.Event event = fEventList.elementAt(((fCurrentEvent)++));
assertEquals(event.fType, VCDLoa... | public void appendTransition(int id, long timestamp, BitVector values) {
java.lang.System.out.println(((((("appendTransition " + id) + " ") + timestamp) + " ") + (values.toString(2))));
VCDLoaderTest.ExpectTraceBuilder.Event event = fEventList.get(((fCurrentEvent)++));
assertEquals(event.fType, VCDLoaderTes... |
public int classRegister(@com.churchsystem.controller.RequestParam(value = com.churchsystem.common.constants.ParamConstant.CHURCH_ID)
java.lang.String churchIdStr, @com.churchsystem.controller.RequestParam(value = com.churchsystem.common.constants.ParamConstant.SUBJECT_ID)
java.lang.String subIdStr, @com.churchsystem.c... | public int classRegister(@com.churchsystem.controller.RequestParam(value = com.churchsystem.common.constants.ParamConstant.CHURCH_ID)
java.lang.String churchIdStr, @com.churchsystem.controller.RequestParam(value = com.churchsystem.common.constants.ParamConstant.SUBJECT_ID)
java.lang.String subIdStr, @com.churchsystem.c... |
public void substIndexEquals() {
com.jetbrains.jetpad.vclang.term.context.binding.Binding x = new com.jetbrains.jetpad.vclang.term.context.binding.TypedBinding("x", Nat());
com.jetbrains.jetpad.vclang.term.expr.Expression expr = Pi(Zero(), Apps(DataCall(Prelude.NAT), Reference(x)));
org.junit.Assert.assertE... | public void substIndexEquals() {
com.jetbrains.jetpad.vclang.term.context.binding.Binding x = new com.jetbrains.jetpad.vclang.term.context.binding.TypedBinding("x", Nat());
com.jetbrains.jetpad.vclang.term.expr.Expression expr = Pi(Zero(), Apps(DataCall(Prelude.NAT), Reference(x)));
org.junit.Assert.assertE... |
private void createMenu() {
javax.swing.JMenuBar menuBar = new javax.swing.JMenuBar();
javax.swing.JMenu arkiv = new javax.swing.JMenu("Arkiv");
javax.swing.JMenuItem menuItem = new javax.swing.JMenuItem("Exit");
arkiv.add(menuItem);
menuBar.add(arkiv);
searchField = new javax.swing.JTextField()... | private void createMenu() {
javax.swing.JMenuBar menuBar = new javax.swing.JMenuBar();
searchField = new javax.swing.JTextField();
menuBar.add(searchField);
searchButton = new javax.swing.JButton("Search");
searchButton.setActionCommand(view.MainFrame.SEARCH);
menuBar.add(searchButton);
setJ... |
public java.util.ArrayList<java.lang.String[]> limit(java.lang.String DBname, java.lang.String Tname, int num) {
java.lang.System.out.println("limit DBMS");
java.util.ArrayList<dbms.Record> records = get_records(DBname, Tname);
java.util.ArrayList<java.lang.String[]> results = new java.util.ArrayList<java.l... | public java.util.ArrayList<java.lang.String[]> limit(java.lang.String DBname, java.lang.String Tname, int num) {
java.util.ArrayList<dbms.Record> records = get_records(DBname, Tname);
java.util.ArrayList<java.lang.String[]> results = new java.util.ArrayList<java.lang.String[]>();
int i = 0;
while ((i < ... |
protected void onDestroy() {
super.onDestroy();
connectFailDialog.setListener(null);
updateDialog.setListener(null);
xWalkView.clearCache(true);
if ((xWalkView) != null) {
xWalkView.onDestroy();
}
} | protected void onDestroy() {
super.onDestroy();
if ((connectFailDialog) != null) {
connectFailDialog.setListener(null);
}
if ((updateDialog) != null) {
updateDialog.setListener(null);
}
xWalkView.clearCache(true);
if ((xWalkView) != null) {
xWalkView.onDestroy();
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = ((android.widget.EditText) (findViewById(R.id.queryGifs)));
gifsList = ((android.support.v7.widget.RecyclerView) (findViewById(R.id.gifsList)));
andr... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = ((android.widget.EditText) (findViewById(R.id.queryGifs)));
gifsList = ((android.support.v7.widget.RecyclerView) (findViewById(R.id.gifsList)));
andr... |
private void initRotationDelta(final net.gini.android.vision.internal.camera.photo.ExifReader exifReader, final java.lang.String userComment) {
java.lang.String rotationDelta = exifReader.getValueForKeyFromUserComment(Exif.USER_COMMENT_ROTATION_DELTA, userComment);
if (rotationDelta != null) {
try {
... | private void initRotationDelta(final java.lang.String userComment) {
java.lang.String rotationDelta = net.gini.android.vision.internal.camera.photo.ExifReader.getValueForKeyFromUserComment(Exif.USER_COMMENT_ROTATION_DELTA, userComment);
if (rotationDelta != null) {
try {
mRotationDelta = jav... |
public void actionPerformed(java.awt.event.ActionEvent arg0) {
java.lang.System.out.println("show distance matrices");
if ((parent) == null) {
java.lang.System.err.println("Not displaying any alignment currently!");
return ;
}
showMatrix(parent.getDisTable1(), "Internal distances for Str... | public void actionPerformed(java.awt.event.ActionEvent arg0) {
java.lang.System.out.println("show distance matrices");
if ((parent) == null) {
java.lang.System.err.println("Not displaying any alignment currently!");
return ;
}
if ((parent.getDisTable1()) != null)
showMatrix(paren... |
public void render(javafx.scene.canvas.GraphicsContext gc) {
if (isDead()) {
return ;
}
getBoundingArea().setRotation(this);
if ((vx) > 0) {
drawRotatedImage(gc, sprite, getBoundingArea(), false);
}else
if ((vx) < 0) {
drawRotatedImage(gc, sprite, getBoundingArea(... | public void render(javafx.scene.canvas.GraphicsContext gc) {
if (isDead()) {
return ;
}
getBoundingArea().setRotation(this);
if ((vx) > 0) {
drawRotatedImage(gc, sprite, getBoundingArea(), false);
}else {
drawRotatedImage(gc, sprite, getBoundingArea(), true);
}
} |
private org.json.JSONArray getPlaylists() {
java.lang.String get = "SELECT * FROM " + (DBTables.Playlist);
org.json.JSONArray playlists = query(get);
for (int i = 0; i < (playlists.length()); i++) {
playlists.getJSONObject(i).put("entries", getPlaylist(playlists.getJSONObject(i).getInt(DBAttributes.... | private org.json.JSONArray getPlaylists() {
java.lang.String get = "SELECT * FROM " + (DBTables.Playlist);
org.json.JSONArray playlists = query(get);
for (int i = 0; i < (playlists.length()); i++) {
playlists.getJSONObject(i).put("entries", getPlaylist(playlists.getJSONObject(i).getInt(DBAttributes.... |
public <T> db.juhaku.juhakudb.filter.Query createWhereClause(db.juhaku.juhakudb.filter.Filter filter) {
db.juhaku.juhakudb.filter.Root<T> root = new db.juhaku.juhakudb.filter.Root();
db.juhaku.juhakudb.filter.Predicates predicates = new db.juhaku.juhakudb.filter.Predicates();
filter.filter(root, predicates)... | public <T> db.juhaku.juhakudb.filter.Query createWhereClause(db.juhaku.juhakudb.filter.Filter filter) {
db.juhaku.juhakudb.filter.Root<T> root = new db.juhaku.juhakudb.filter.Root();
db.juhaku.juhakudb.filter.Predicates predicates = new db.juhaku.juhakudb.filter.Predicates();
filter.filter(root, predicates)... |
public static void findMacros(java.util.List<java.lang.String> macros, java.lang.String str) {
if (str == null)
return ;
for (java.lang.String what : com.xrtb.tools.MacroProcessing.macroList) {
if ((str.indexOf(what)) > (-1)) {
if (macros.contains(what))
return ;... | public static void findMacros(java.util.List<java.lang.String> macros, java.lang.String str) {
if (str == null)
return ;
for (java.lang.String what : com.xrtb.tools.MacroProcessing.macroList) {
if ((str.indexOf(what)) > (-1)) {
if ((macros.contains(what)) == false)
... |
public java.util.Collection<java.lang.String> getURIs() {
java.util.Set<java.lang.String> uris = new java.util.HashSet<java.lang.String>();
if ((delegate) != null) {
uris.addAll(delegate.getURIs());
}
uris.addAll(map.keySet());
return uris;
} | public java.util.Collection<java.lang.String> getURIs() {
java.util.Set<java.lang.String> uris = new java.util.HashSet<java.lang.String>();
if ((delegate) != null) {
uris.addAll(delegate.getURIs());
}
uris.addAll(map.values());
return uris;
} |
public void onPurchaseSuccess(@android.support.annotation.NonNull
co.smartreceipts.android.purchases.model.InAppPurchase inAppPurchase, @android.support.annotation.NonNull
co.smartreceipts.android.purchases.source.PurchaseSource purchaseSource, @android.support.annotation.NonNull
co.smartreceipts.android.purchases.wall... | public void onPurchaseSuccess(@android.support.annotation.NonNull
co.smartreceipts.android.purchases.model.InAppPurchase inAppPurchase, @android.support.annotation.NonNull
co.smartreceipts.android.purchases.source.PurchaseSource purchaseSource, @android.support.annotation.NonNull
co.smartreceipts.android.purchases.wall... |
public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int pos, long id) {
android.util.Log.d("***********", calendarList.get(pos).getId());
editor = sharedpreferences.edit();
editor.putString(PREF_CAL_ID, calendarList.get(pos).getId());
editor.commit();
getData();
... | public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int pos, long id) {
editor = sharedpreferences.edit();
editor.putString(PREF_CAL_ID, calendarList.get(pos).getId());
editor.commit();
getData();
} |
public java.util.List<java.lang.Integer> getPaymentFailureRetryDays(@org.skife.config.Param(value = "dummy")
final org.killbill.billing.callcontext.InternalTenantContext tenantContext) {
final java.lang.reflect.Method method = new java.lang.Object() { }.getClass().getEnclosingMethod();
final java.lang.String... | public java.util.List<java.lang.Integer> getPaymentFailureRetryDays(@org.skife.config.Param(value = "dummy")
final org.killbill.billing.callcontext.InternalTenantContext tenantContext) {
final java.lang.reflect.Method method = new java.lang.Object() { }.getClass().getEnclosingMethod();
final java.lang.String... |
public java.util.List<com.flockathon.chat4u.ChatMessage> getMessages(java.lang.String requestId) {
if (_chatMessageStoreSharedPrefs.contains(requestId)) {
java.lang.String chatMessagesString = _chatMessageStoreSharedPrefs.getString(requestId, "");
java.util.List<com.flockathon.chat4u.ChatMessage> ch... | public java.util.List<com.flockathon.chat4u.ChatMessage> getMessages(java.lang.String requestId) {
if (_chatMessageStoreSharedPrefs.contains(requestId)) {
java.lang.String chatMessagesString = _chatMessageStoreSharedPrefs.getString(requestId, "");
java.util.List<com.flockathon.chat4u.ChatMessage> ch... |
public void setDisplayed(boolean status) {
super.setDisplayed(status);
if ((components) != null)
for (org.jzy3d.plot3d.primitives.AbstractDrawable c : components) {
if ((c != null) && (c instanceof org.jzy3d.plot3d.primitives.AbstractWireframeable))
((org.jzy3d.plot3d.primiti... | public void setDisplayed(boolean status) {
super.setDisplayed(status);
if ((components) != null) {
synchronized(components) {
for (org.jzy3d.plot3d.primitives.AbstractDrawable c : components) {
if ((c != null) && (c instanceof org.jzy3d.plot3d.primitives.AbstractWireframeable... |
public boolean getToggle() {
boolean status = org.firstinspires.ftc.teamcode.statics.ControlParser.button(ctrl);
if ((!(debounce)) && status) {
debounce = true;
}else
if (!status) {
debounce = false;
}
org.firstinspires.ftc.teamcode.debug.Logger.logLine((debounce... | public boolean getToggle() {
boolean status = org.firstinspires.ftc.teamcode.statics.ControlParser.button(ctrl);
if ((!(debounce)) && status) {
debounce = true;
return true;
}else
if (!status) {
debounce = false;
}
return false;
} |
private void createNewTestPlan() throws java.io.IOException {
closeTestPlan();
testPlanCount += 1;
java.nio.file.Path testPlanPath = testPlanDirectory.resolve((("TestPlan-" + (testPlanCount)) + ".json"));
testPlanWriter = new java.io.BufferedWriter(new java.io.FileWriter(testPlanPath.toFile(), true));
} | private void createNewTestPlan() throws java.io.IOException {
if ((testPlanWriter) == null) {
testPlanCount += 1;
java.nio.file.Path testPlanPath = testPlanDirectory.resolve((("TestPlan-" + (testPlanCount)) + ".json"));
testPlanWriter = new java.io.BufferedWriter(new java.io.FileWriter(testP... |
public void report(java.lang.Class fromClass, java.lang.String reason, java.lang.String exceptionMessage) {
if ((com.musenkishi.wally.base.WallyApplication.getDataProviderInstance().getSharedPreferencesDataProviderInstance().hasUserApprovedCrashLogging()) == (com.musenkishi.wally.dataprovider.SharedPreferencesDataP... | public void report(java.lang.Class fromClass, java.lang.String reason, java.lang.String exceptionMessage) {
if ((com.musenkishi.wally.base.WallyApplication.getDataProviderInstance().getSharedPreferencesDataProviderInstance().hasUserApprovedCrashLogging()) == (com.musenkishi.wally.dataprovider.SharedPreferencesDataP... |
public void verifyView_runTest_success() throws java.lang.Exception {
org.mockito.Mockito.when(testConfig.getEnvironment().getExecMode()).thenReturn(ExecMode.RUN_TEST);
org.mockito.Mockito.when(testResultManager.getPersister().loadTargetResults(org.mockito.Matchers.any(com.htmlhifive.pitalium.core.io.PersistMet... | public void verifyView_runTest_success() throws java.lang.Exception {
org.mockito.Mockito.when(testResultManager.getPersister().loadTargetResults(org.mockito.Matchers.any(com.htmlhifive.pitalium.core.io.PersistMetadata.class))).thenReturn(screenshotResult.getTargetResults());
assertionView.verifyView(com.htmlhi... |
public void test_build() {
io.nlopez.smartadapters.builders.AABindableLayoutBuilder builder = new io.nlopez.smartadapters.builders.AABindableLayoutBuilder();
int viewType = io.nlopez.smartadapters.utils.Mapper.viewTypeFromViewClass(builder.viewType(mockModel2, 0, mapper));
android.view.View bindableLayout =... | public void test_build() {
io.nlopez.smartadapters.builders.AABindableLayoutBuilder builder = new io.nlopez.smartadapters.builders.AABindableLayoutBuilder();
int viewType = mapper.viewTypeFromViewClass(builder.viewType(mockModel2, 0, mapper));
android.view.View bindableLayout = builder.build(parent, viewTyp... |
public io.undertow.protocols.alpn.OpenSSLAlpnProvider.OpenSSLALPNMethods run() {
try {
java.lang.Class<?> openSSLEngine = java.lang.Class.forName(io.undertow.protocols.alpn.OpenSSLAlpnProvider.OPENSSL_ENGINE, true, io.undertow.protocols.alpn.OpenSSLAlpnProvider.class.getClassLoader());
java.lang.ref... | public io.undertow.protocols.alpn.OpenSSLAlpnProvider.OpenSSLALPNMethods run() {
try {
java.lang.Class<?> openSSLEngine = java.lang.Class.forName(io.undertow.protocols.alpn.OpenSSLAlpnProvider.OPENSSL_ENGINE, true, io.undertow.protocols.alpn.OpenSSLAlpnProvider.class.getClassLoader());
java.lang.ref... |
public java.lang.String read() {
android.util.Log.d(cn.com.farsight.SerialService.SerialService.TAG, "read()");
if (!(isInitOk))
return "Error:can't find serialdevice";
byte[] data = new byte[128];
int count = cn.com.farsight.SerialService.SerialService._read(data, 128);
java.lang.Strin... | public java.lang.String read() {
android.util.Log.d(cn.com.farsight.SerialService.SerialService.TAG, "read()");
if (!(isInitOk))
return "Error:can't find serialdevice";
byte[] data = new byte[128];
int count = cn.com.farsight.SerialService.SerialService._read(data, 128);
java.lang.Strin... |
public static void main(java.lang.String[] args) {
Robot myRobot = new Robot();
Grid grid = new Grid();
grid.defaultGridPopulate();
RobotActions actions = new RobotActions(myRobot, grid);
actions.findGrid();
actions.turnLine("Left");
} | public static void main(java.lang.String[] args) {
Robot myRobot = new Robot();
Grid grid = new Grid();
RobotActions actions = new RobotActions(myRobot, grid);
actions.findGrid();
actions.turnLine("Left");
} |
public org.springframework.security.oauth2.common.OAuth2AccessToken getOAuth2AccessToken() {
org.springframework.security.oauth2.provider.OAuth2Authentication oAuth2Authentication = ((org.springframework.security.oauth2.provider.OAuth2Authentication) (org.springframework.security.core.context.SecurityContextHolder.... | public org.springframework.security.oauth2.common.OAuth2AccessToken getOAuth2AccessToken() {
if (!((org.springframework.security.core.context.SecurityContextHolder.getContext().getAuthentication()) instanceof org.springframework.security.oauth2.provider.OAuth2Authentication)) {
return null;
}
org.sp... |
protected void sgd(edu.cmu.ml.proppr.util.ParamVector params, edu.cmu.ml.proppr.learn.SRW.SgdExample ex) {
gnu.trove.map.TIntDoubleMap gradient = gradient(params, ex);
for (gnu.trove.iterator.TIntDoubleIterator grad = gradient.iterator(); grad.hasNext();) {
grad.advance();
java.lang.String featu... | protected void sgd(edu.cmu.ml.proppr.util.ParamVector params, edu.cmu.ml.proppr.learn.SRW.SgdExample ex) {
gnu.trove.map.TIntDoubleMap gradient = gradient(params, ex);
for (gnu.trove.iterator.TIntDoubleIterator grad = gradient.iterator(); grad.hasNext();) {
grad.advance();
java.lang.String featu... |
public int getNumPlayers() {
java.lang.Object[] options = new java.lang.Object[]{ 2 , 3 , 4 , 5 , 6 };
int numPlayers = ((int) (javax.swing.JOptionPane.showInputDialog(((javax.swing.JFrame) (this)), "How many players?", "Welcome to Cluedo!", javax.swing.JOptionPane.PLAIN_MESSAGE, null, options, options[0])));
... | public int getNumPlayers() {
java.lang.Object[] options = new java.lang.Object[]{ 2 , 3 , 4 , 5 , 6 };
java.lang.Object numPlayers = javax.swing.JOptionPane.showInputDialog(((javax.swing.JFrame) (this)), "How many players?", "Welcome to Cluedo!", javax.swing.JOptionPane.PLAIN_MESSAGE, null, options, options[0])... |
public void init() {
cppcheck.initCheckerConfig();
if (((com.samsung.sec.dexter.core.util.DexterUtil.getOS()) == (DexterUtil.OS.LINUX)) || ((com.samsung.sec.dexter.core.util.DexterUtil.getOS()) == (DexterUtil.OS.MAC))) {
checkCppcheckPermission();
}
copyCppcheckRunModule();
} | public void init() {
cppcheck.initCheckerConfig();
copyCppcheckRunModule();
if (((com.samsung.sec.dexter.core.util.DexterUtil.getOS()) == (DexterUtil.OS.LINUX)) || ((com.samsung.sec.dexter.core.util.DexterUtil.getOS()) == (DexterUtil.OS.MAC))) {
checkCppcheckPermission();
}
} |
public void openDetail(com.mintminter.simpletwitter.model.Tweet tweet) {
android.content.Intent i = new android.content.Intent(getActivity(), com.mintminter.simpletwitter.activity.DetailActivity.class);
i.putExtra(Util.EXTRA_TWEET, org.parceler.Parcels.wrap(tweet));
i.putExtra(Util.EXTRA_USER, org.parceler.... | public void openDetail(com.mintminter.simpletwitter.model.Tweet tweet) {
android.content.Intent i = new android.content.Intent(getActivity(), com.mintminter.simpletwitter.activity.DetailActivity.class);
i.putExtra(Util.EXTRA_TWEET, org.parceler.Parcels.wrap(tweet));
i.putExtra(Util.EXTRA_USER, org.parceler.... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
if (id == (R.id.action_popular)) {
com.global.oakdays.popularmoviesapp.MainActivity.FILTER = "popular";
}else
if (id == (R.id.action_top_rated)) {
com.global.oakdays.popularmoviesapp.Mai... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
if (id == (R.id.action_popular)) {
com.global.oakdays.popularmoviesapp.MainActivity.FILTER = "popular";
}else
if (id == (R.id.action_top_rated)) {
com.global.oakdays.popularmoviesapp.Mai... |
public void onTeamSelected(com.supercilex.robotscouter.data.model.Team team, boolean addScout) {
com.supercilex.robotscouter.data.util.TeamHelper helper = team.getHelper();
if (com.supercilex.robotscouter.util.ViewUtils.isTabletMode()) {
getSupportFragmentManager().beginTransaction().replace(R.id.scouts... | public void onTeamSelected(com.supercilex.robotscouter.data.model.Team team, boolean addScout) {
com.supercilex.robotscouter.data.util.TeamHelper helper = team.getHelper();
if (com.supercilex.robotscouter.util.ViewUtils.isTabletMode(this)) {
getSupportFragmentManager().beginTransaction().replace(R.id.sc... |
public void onReceive(android.content.Context context, android.content.Intent intent) {
mLoadingDialog.dismiss();
mReviews = ((java.util.ArrayList<robindarby.com.popularmovies.models.Review>) (intent.getSerializableExtra(MovieDetailsService.REVIEWS_INTENT_EXTRA)));
mVideos = ((java.util.ArrayList<robindarby... | public void onReceive(android.content.Context context, android.content.Intent intent) {
getActivity();
mLoadingDialog.dismiss();
mReviews = ((java.util.ArrayList<robindarby.com.popularmovies.models.Review>) (intent.getSerializableExtra(MovieDetailsService.REVIEWS_INTENT_EXTRA)));
mVideos = ((java.util.A... |
public void postEvent(java.lang.Object event) {
java.lang.String parameterTypeName = event.getClass().getCanonicalName();
java.util.List<com.crush.bus.Bus.Bean> beenList = subscribers.get(parameterTypeName);
for (com.crush.bus.Bus.Bean b : beenList) {
try {
b.getM().invoke(b.getO(), even... | public void postEvent(java.lang.Object event) {
java.lang.String parameterTypeName = event.getClass().getCanonicalName();
java.util.List<com.crush.bus.Bus.Bean> beenList = subscribers.get(parameterTypeName);
if (null == beenList)
return ;
for (com.crush.bus.Bus.Bean b : beenList) {
... |
public java.util.List<ru.dsi.bgbilling.modules.inet.accounting.quota.Slice> getSlices() {
java.util.List<ru.dsi.bgbilling.modules.inet.accounting.quota.Slice> result = new java.util.ArrayList<ru.dsi.bgbilling.modules.inet.accounting.quota.Slice>();
ru.dsi.bgbilling.modules.inet.accounting.quota.Slice s;
for... | public java.util.List<ru.dsi.bgbilling.modules.inet.accounting.quota.Slice> getSlices() {
java.util.List<ru.dsi.bgbilling.modules.inet.accounting.quota.Slice> result = new java.util.ArrayList<ru.dsi.bgbilling.modules.inet.accounting.quota.Slice>();
ru.dsi.bgbilling.modules.inet.accounting.quota.Slice s;
syn... |
private void refreshCategories() {
idNameCategoryMap = new java.util.HashMap<>();
idCategoryMap = new java.util.HashMap<>();
java.util.List<com.bionic.edu.entity.DishCategory> dishCategories = dishCategoryService.findAll();
for (com.bionic.edu.entity.DishCategory dc : dishCategories) {
idNameCat... | public void refreshCategories() {
idNameCategoryMap = new java.util.HashMap<>();
idCategoryMap = new java.util.HashMap<>();
java.util.List<com.bionic.edu.entity.DishCategory> dishCategories = dishCategoryService.findAll();
for (com.bionic.edu.entity.DishCategory dc : dishCategories) {
idNameCate... |
public static int computeBitmapSimple(int realPixels, int maxPixels) {
try {
if (realPixels <= maxPixels) {
return 1;
}else {
int scale = 2;
while ((realPixels / (scale * scale)) > maxPixels) {
scale *= 2;
}
return scale;
... | public static int computeBitmapSimple(int realPixels, int maxPixels) {
if (maxPixels <= 0) {
return 1;
}
try {
if (realPixels <= maxPixels) {
return 1;
}else {
int scale = 2;
while ((realPixels / (scale * scale)) > maxPixels) {
scal... |
private static java.util.HashSet<java.lang.Integer> getNonZeroArgs(java.util.HashMap<java.lang.Integer, java.lang.String> prediction, java.util.HashMap<java.lang.String, java.lang.Integer> reverseLabelMap) {
java.util.HashSet<java.lang.Integer> nonZeroArgs = new java.util.HashSet();
for (int key : prediction.ke... | private static java.util.HashSet<java.lang.Integer> getNonZeroArgs(java.util.HashMap<java.lang.Integer, java.lang.String> prediction, java.util.HashMap<java.lang.String, java.lang.Integer> reverseLabelMap) {
java.util.HashSet<java.lang.Integer> nonZeroArgs = new java.util.HashSet();
for (int key : prediction.ke... |
private void clear() {
getTabs().removeAll();
java.lang.String text = "";
javax.swing.JPanel panel = new javax.swing.JPanel(false);
javax.swing.JLabel filler = new javax.swing.JLabel(text);
filler.setHorizontalAlignment(javax.swing.JLabel.CENTER);
panel.setLayout(new java.awt.GridLayout(1, 1));
... | private void clear() {
getTabs().removeAll();
java.lang.String text = "";
javax.swing.JPanel panel = new javax.swing.JPanel(false);
javax.swing.JLabel filler = new javax.swing.JLabel(text);
filler.setHorizontalAlignment(javax.swing.JLabel.CENTER);
panel.setLayout(new java.awt.GridLayout(1, 1));
... |
private void handleContainerClick(net.minecraft.world.World worldIn, net.minecraft.util.BlockPos pos, net.minecraft.entity.player.EntityPlayer playerIn, com.nik7.upgcraft.tileentities.UpgCtileentityFluidTank tank, net.minecraft.item.ItemStack equippedItemStack) {
if (net.minecraftforge.fluids.FluidContainerRegistry... | protected void handleContainerClick(net.minecraft.world.World worldIn, net.minecraft.util.BlockPos pos, net.minecraft.entity.player.EntityPlayer playerIn, com.nik7.upgcraft.tileentities.UpgCtileentityFluidTank tank, net.minecraft.item.ItemStack equippedItemStack) {
if (net.minecraftforge.fluids.FluidContainerRegist... |
public void doActualizaTab(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.semanticwb.portal.api.SWBParamRequest paramRequest) throws java.io.IOException, org.semanticwb.portal.api.SWBResourceException {
response.setContentType(org.semanticwb.process.documentation... | public void doActualizaTab(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.semanticwb.portal.api.SWBParamRequest paramRequest) throws java.io.IOException, org.semanticwb.portal.api.SWBResourceException {
response.setContentType(org.semanticwb.process.documentation... |
public data.Karte getHighestCard(final java.awt.Color farbe) {
data.Karte highestCard = karten.get(0);
for (data.Karte k : karten) {
if ((k.getFarbe().equals(farbe)) && ((k.getNummer()) > 11)) {
if (highestCard == null) {
highestCard = k;
}else
if ... | public data.Karte getHighestCard(final java.awt.Color farbe) {
data.Karte highestCard = null;
for (data.Karte k : karten) {
if ((k.getFarbe().equals(farbe)) && ((k.getNummer()) > 11)) {
if (highestCard == null) {
highestCard = k;
}else
if ((highest... |
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mCenterX = w / 2.0F;
mCenterY = h / 2.0F;
mRadius = w / 2.0F;
mLeft = (getLeft()) + (mBorderWidth);
mTop = (getTop()) + (mBorderWidth);
mRight = (getRight()) - (mBorderWidth);
mBottom ... | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mCenterX = w / 2.0F;
mCenterY = h / 2.0F;
mRadius = w / 2.0F;
mLeft = 0 + (mBorderWidth);
mTop = 0 + (mBorderWidth);
mRight = w - (mBorderWidth);
mBottom = h - (mBorderWidth);
} |
public static org.elasticsearch.common.xcontent.XContentBuilder marshall(io.apiman.manager.api.es.beans.ApiDefinitionBean bean) throws io.apiman.manager.api.core.exceptions.StorageException {
try {
io.apiman.manager.api.es.EsMarshalling.preMarshall(bean);
org.elasticsearch.common.xcontent.XContentBu... | public static org.elasticsearch.common.xcontent.XContentBuilder marshall(io.apiman.manager.api.es.beans.ApiDefinitionBean bean) throws io.apiman.manager.api.core.exceptions.StorageException {
try (org.elasticsearch.common.xcontent.XContentBuilder builder = org.elasticsearch.common.xcontent.XContentFactory.jsonBuild... |
public greycat.struct.DMatrix init(int rows, int columns) {
if ((rows != (_nbRows)) && (columns != (_nbColumns))) {
throw new java.lang.RuntimeException("Bad API usage !");
}
_nbMaxColumn = columns;
this._data = new double[(_nbRows) * (_nbColumns)];
return this;
} | public greycat.struct.DMatrix init(int rows, int columns) {
if ((rows != (_nbRows)) && (columns != (_nbMaxColumn))) {
throw new java.lang.RuntimeException("Bad API usage !");
}
_nbMaxColumn = columns;
_nbColumns = columns;
this._data = new double[(_nbRows) * (_nbMaxColumn)];
return this;... |
public <P, R> void registerOneToMany(java.lang.String method, java.lang.Class<P> pClass, java.lang.Class<R> rClass, java.util.function.BiFunction<java.lang.String, P, java.util.List<R>> biFunction) {
mustNotBeRegistered(method);
methodToCategory.put(method, org.eclipse.che.api.core.jsonrpc.commons.RequestHandle... | public <P, R> void registerOneToMany(java.lang.String method, java.lang.Class<P> pClass, java.lang.Class<R> rClass, java.util.function.BiFunction<java.lang.String, P, java.util.List<R>> biFunction) {
mustNotBeRegistered(method);
methodToCategory.put(method, org.eclipse.che.api.core.jsonrpc.commons.RequestHandle... |
public void openDetail(com.mintminter.simpletwitter.model.Tweet tweet) {
android.content.Intent i = new android.content.Intent(getActivity(), com.mintminter.simpletwitter.activity.DetailActivity.class);
i.putExtra(Util.EXTRA_TWEET, org.parceler.Parcels.wrap(tweet));
i.putExtra(Util.EXTRA_USER, org.parceler.... | public void openDetail(com.mintminter.simpletwitter.model.Tweet tweet) {
android.content.Intent i = new android.content.Intent(getActivity(), com.mintminter.simpletwitter.activity.DetailActivity.class);
i.putExtra(Util.EXTRA_TWEET, org.parceler.Parcels.wrap(tweet));
i.putExtra(Util.EXTRA_USER, org.parceler.... |
private void updateDisplay() {
if (mWholeNumbersSelected) {
mTempoSetting.setText((((int) (mBPM)) + ""));
}else {
mTempoSetting.setText(((((float) ((int) ((mBPM) * 10))) / 10) + ""));
}
if (mMetronomeRunning) {
metronomeStartStop();
metronomeStartStop();
}
} | private void updateDisplay() {
if (mWholeNumbersSelected) {
mTempoSetting.setText((((int) (mBPM)) + ""));
}else {
mTempoSetting.setText(((((float) ((int) ((mBPM) * 10))) / 10) + ""));
}
} |
public org.mindswap.owls.service.Service readService(java.lang.String serviceURI) {
org.mindswap.owls.service.Service service = null;
if ((edu.utep.trustlab.repository.Repository.getRepository()) != null)
serviceURI = edu.utep.trustlab.visko.util.RedirectURI.redirectHack(serviceURI, edu.utep.trustlab.re... | public org.mindswap.owls.service.Service readService(java.lang.String serviceURI) {
org.mindswap.owls.service.Service service = null;
java.net.URI uri = edu.utep.trustlab.visko.util.GetURLContents.getURI(serviceURI);
try {
service = kb.readService(uri);
} catch (java.lang.Exception e) {
... |
public void insertLast(java.lang.Object data) {
ds.doublylinkedlist.Node newNode = new ds.doublylinkedlist.Node();
newNode.data = data;
if (isEmpty()) {
first = newNode;
}else {
last.next = newNode;
newNode.previous = last;
}
last = newNode;
} | public void insertLast(java.lang.Object data) {
ds.doublylinkedlist.Node newNode = new ds.doublylinkedlist.Node();
newNode.data = data;
if (isEmpty()) {
first = newNode;
}else {
last.next = newNode;
newNode.previous = last;
}
last = newNode;
(size)++;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.