buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void getValuedConceptsTest() throws eionet.meta.service.ServiceException {
org.junit.Assert.assertEquals("Concept size is not 4", vocabularyService.getConceptsWithElementValue(1, 1).size(), 4);
org.junit.Assert.assertEquals("Concept size is not 1", vocabularyService.getConceptsWithElementValue(5, 1).size... | public void getValuedConceptsTest() throws eionet.meta.service.ServiceException {
assertEquals("Concept size is not 4", vocabularyService.getConceptsWithElementValue(1, 1).size(), 4);
assertEquals("Concept size is not 1", vocabularyService.getConceptsWithElementValue(5, 1).size(), 1);
assertEquals("Concept ... |
public void OnDrag(com.mygdx.game.InputManager.TouchData td) {
if (cM.getPlayer().isInOrbit()) {
java.lang.System.out.println(td.getDeltaSwipe());
cM.addTranslation(new com.badlogic.gdx.math.Vector2((-(td.getDeltaSwipe().x)), td.getDeltaSwipe().y));
}
} | public void OnDrag(com.mygdx.game.InputManager.TouchData td) {
if (cM.getPlayer().isInOrbit()) {
cM.addTranslation(new com.badlogic.gdx.math.Vector2((-(td.getDeltaSwipe().x)), td.getDeltaSwipe().y));
}
} |
public static java.lang.String encodeURL(java.lang.String url) {
try {
return java.net.URLEncoder.encode(url, com.liferay.util.SystemProperties.get(com.liferay.util.Http.FILE_ENCODING));
} catch (java.io.UnsupportedEncodingException uee) {
com.dotmarketing.util.Logger.error(com.liferay.util.Http... | public static java.lang.String encodeURL(java.lang.String url) {
try {
return null == url ? StringPool.BLANK : java.net.URLEncoder.encode(url, com.liferay.util.SystemProperties.get(com.liferay.util.Http.FILE_ENCODING));
} catch (java.io.UnsupportedEncodingException uee) {
com.dotmarketing.util.L... |
public static int numFilledSlots(net.minecraft.inventory.IInventory inv) {
int num = 0;
for (int i = 0; i < (inv.getSizeInventory()); i++) {
if (((inv.getStackInSlot(i)) != null) && ((inv.getStackInSlot(i).getCount()) == (inv.getStackInSlot(i).getMaxStackSize())))
num++;
}
r... | public static int numFilledSlots(net.minecraft.inventory.IInventory inv) {
int num = 0;
for (int i = 0; i < (inv.getSizeInventory()); i++) {
if ((!(inv.getStackInSlot(i).isEmpty())) && ((inv.getStackInSlot(i).getCount()) == (inv.getStackInSlot(i).getMaxStackSize())))
num++;
}
... |
public void addMedia(java.lang.String mediaName) {
if ((getIdForMedia(mediaName)) != (-1)) {
android.util.Log.e("addMedia", "media already exists!");
return ;
}
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
android.content.ContentValues values = new android.cont... | public boolean addMedia(java.lang.String mediaName) {
if ((getIdForMedia(mediaName)) != (-1)) {
android.util.Log.e("addMedia", "media already exists!");
return false;
}
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
android.content.ContentValues values = new andr... |
public java.lang.String toString() {
return new java.lang.StringBuilder(super.toString()).append("\n\t").append("SUPPORT PRETERM OPERATIONS:").append("\n\t").append("MINIMAL PERIOD BEFORE CHANGE: ").append(getMinDurationForChange()).append(" DAYS").append("\n\t").append("MAX SUMM TO TAKE PER MONTH: ").append(getMax... | public java.lang.String toString() {
return new java.lang.StringBuilder(super.toString()).append("\n\t").append("SUPPORT PRETERM OPERATIONS:").append("\n\t").append("MINIMAL PERIOD BEFORE CHANGE: ").append(getMinDurationForChange()).append(" DAYS").append("\n\t").append("MAX SUMM TO TAKE PER MONTH: ").append(getMax... |
protected void checkLCurly() {
final com.puppycrawl.tools.checkstyle.api.DetailAST lcurly = getLCurly();
final int lcurlyPos = expandedTabsColumnNo(lcurly);
if (((lcurly == null) || (curlyLevel().accept(lcurlyPos))) || (!(startsLine(lcurly)))) {
return ;
}
logError(lcurly, "lcurly", lcurlyPo... | protected void checkLCurly() {
final com.puppycrawl.tools.checkstyle.api.DetailAST lcurly = getLCurly();
final int lcurlyPos = expandedTabsColumnNo(lcurly);
if ((curlyLevel().accept(lcurlyPos)) || (!(startsLine(lcurly)))) {
return ;
}
logError(lcurly, "lcurly", lcurlyPos);
} |
protected java.util.Map<com.github.dtrunk90.thymeleaf.jawr.processor.element.impl.Attr, java.lang.Object> getOptionalAttributes() {
return java.util.Collections.unmodifiableMap(new java.util.HashMap<com.github.dtrunk90.thymeleaf.jawr.processor.element.impl.Attr, java.lang.Object>() {
{
put(Attr.... | protected java.util.Map<com.github.dtrunk90.thymeleaf.jawr.processor.element.impl.Attr, java.lang.Object> getOptionalAttributes() {
return java.util.Collections.unmodifiableMap(new java.util.HashMap<com.github.dtrunk90.thymeleaf.jawr.processor.element.impl.Attr, java.lang.Object>() {
{
put(Attr.... |
public com.vn.dailycookapp.cache.user.CompactUserInfo getInfoByEmail(java.lang.String email) throws org.dao.DAOException {
java.lang.String id = emailMap.get(email);
if (id == null) {
org.entity.User user = org.dao.UserDAO.getInstance().getUserInfoByEmail(email);
if ((user != null) && (user.getR... | public com.vn.dailycookapp.cache.user.CompactUserInfo getInfoByEmail(java.lang.String email) throws org.dao.DAOException {
java.lang.String id = emailMap.get(email);
if (id == null) {
org.entity.User user = org.dao.UserDAO.getInstance().getUserInfoByEmail(email);
if ((user != null) && (user.getR... |
private void sendBufferToClients() {
synchronized(messagePacket) {
if ((messagePacket.size()) > 0) {
totalEventsCount += messagePacket.size();
java.lang.System.out.println(("Total sent:" + (totalEventsCount)));
for (int i = 0; i < (clientList.size()); i++) {
... | private void sendBufferToClients() {
synchronized(messagePacket) {
if ((messagePacket.size()) > 0) {
totalEventsCount += messagePacket.size();
for (int i = 0; i < (clientList.size()); i++) {
clientList.get(i).sendMessagePacket(messagePacket);
}
}
... |
private rx.Observable<io.reactivex.netty.protocol.http.client.HttpClientResponse<O>> _writeContentRaw(rx.Observable rawContent, boolean hasTrailers) {
final io.reactivex.netty.protocol.http.client.internal.RawRequest<I, O> r = io.reactivex.netty.protocol.http.client.internal.RawRequest.create(rawRequest.getHeaders(... | private io.reactivex.netty.protocol.http.client.internal.HttpClientRequestImpl<I, O> _writeContentRaw(rx.Observable rawContent, boolean hasTrailers) {
final io.reactivex.netty.protocol.http.client.internal.RawRequest<I, O> r = io.reactivex.netty.protocol.http.client.internal.RawRequest.create(rawRequest.getHeaders(... |
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 v = inflater.inflate(R.layout.tab_analysis, container, false);
android... | 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 v = inflater.inflate(R.layout.tab_analysis, container, false);
android... |
public void noFilePattern() throws java.io.IOException {
configure(null, null);
org.junit.Assert.assertThat(scannerPlugin.accepts(fileResource, "test.txt", DefaultScope.NONE), org.hamcrest.CoreMatchers.equalTo(true));
org.junit.Assert.assertThat(scannerPlugin.accepts(fileResource, "test.xml", DefaultScope.N... | public void noFilePattern() throws java.io.IOException {
configure(null, null);
org.junit.Assert.assertThat(scannerPlugin.accepts(fileResource, "test.txt", DefaultScope.NONE), org.hamcrest.CoreMatchers.equalTo(false));
org.junit.Assert.assertThat(scannerPlugin.accepts(fileResource, "test.xml", DefaultScope.... |
public void onClick(android.view.View v) {
if (((!(isKoma)) && (checker)) || (akhir)) {
inputText.setText("0.");
isKoma = true;
}else {
inputText.setText(((inputText.getText()) + "."));
isKoma = true;
}
cekk = true;
akhir = false;
isKuadrat = false;
isAkar = f... | public void onClick(android.view.View v) {
if (((!(isKoma)) && (checker)) || (akhir)) {
inputText.setText("0.");
isKoma = true;
}else
if (!(isKoma)) {
inputText.setText(((inputText.getText()) + "."));
isKoma = true;
}
cekk = true;
akhir = fals... |
public void run() {
testGroupListAdapter.addItem(0, testGroup);
if (testGroupCountBefore == 0) {
refreshDrawerViews();
}else {
if ((testGroupListLayout.findFirstCompletelyVisibleItemPosition()) == 0) {
testGroupListLayout.scrollToPosition(0);
}
}
} | public void run() {
testGroupListAdapter.addItem(0, testGroup);
if (testGroupCountBefore == 0) {
refreshDrawerViews();
}else
if ((testGroupListLayout.findFirstCompletelyVisibleItemPosition()) == 0) {
testGroupListLayout.scrollToPosition(0);
}
} |
public com.trcgames.dbSynchronizer.database.DBFolder getDBFolder(java.lang.String key) {
com.trcgames.dbSynchronizer.database.DBFolder folder = ((com.trcgames.dbSynchronizer.database.DBFolder) (getData(key, com.trcgames.dbSynchronizer.database.DBFolder.class, null)));
if (folder == null) {
folder = new ... | public com.trcgames.dbSynchronizer.database.DBFolder getDBFolder(java.lang.String key) {
com.trcgames.dbSynchronizer.database.DBFolder folder = ((com.trcgames.dbSynchronizer.database.DBFolder) (getData(key, com.trcgames.dbSynchronizer.database.DBFolder.class, null)));
if (folder == null) {
folder = new ... |
public void onDismiss() {
visible = false;
mapActivity.getMapView().setMapPositionX(0);
mapActivity.getMapView().refreshMap();
net.osmand.plus.helpers.AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_route_land_left_margin), false);
net.osmand.plus.helpers.AndroidUiHelper.updateVis... | public void onDismiss() {
visible = false;
mapActivity.getMapView().setMapPositionX(0);
mapActivity.getMapView().refreshMap();
net.osmand.plus.helpers.AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_route_land_left_margin), false);
net.osmand.plus.helpers.AndroidUiHelper.updateVis... |
public void whenResetForgottenPassword_userServiceThrowsInvalidException_returnsUnauthorized() throws java.lang.Exception {
com.e451.rest.domains.user.ResetForgottenPasswordRequest request = new com.e451.rest.domains.user.ResetForgottenPasswordRequest("first", "last", "username", "guid");
org.mockito.Mockito.do... | public void whenResetForgottenPassword_userServiceThrowsInvalidException_returnsUnauthorized() throws java.lang.Exception {
com.e451.rest.domains.user.ResetForgottenPasswordRequest request = new com.e451.rest.domains.user.ResetForgottenPasswordRequest("username", "guid");
org.mockito.Mockito.doThrow(new com.e45... |
private void addInfo() {
java.awt.GridBagConstraints gbc = chatty.gui.components.userinfo.Util.makeGbc(0, 7, 3, 1);
gbc.insets = new java.awt.Insets((-8), 5, 0, 5);
add(panel2, gbc);
revalidate();
owner.finishDialog();
infoAdded = true;
} | private void addInfo() {
if (infoAdded) {
return ;
}
java.awt.GridBagConstraints gbc = chatty.gui.components.userinfo.Util.makeGbc(0, 7, 3, 1);
gbc.insets = new java.awt.Insets((-8), 5, 0, 5);
add(panel2, gbc);
revalidate();
owner.finishDialog();
infoAdded = true;
} |
public void startWifiGame(android.view.View view) {
android.content.Intent intent = new android.content.Intent(this, group5.battleship.src.views.WifiManagerActivity.class);
intent.putExtra("NAME", playername.getText().toString());
intent.putExtra("WIFI", true);
startActivity(intent);
} | public void startWifiGame(android.view.View view) {
intent = new android.content.Intent(this, group5.battleship.src.views.WifiManagerActivity.class);
intent.putExtra("NAME", playername.getText().toString());
intent.putExtra("WIFI", true);
startActivity(intent);
} |
public void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.fragment_thing_list, menu);
android.view.MenuItem subtitleItem = menu.findItem(R.id.menu_item_show_subtitle);
if ((mSubtitleVisible) && (subtit... | public void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.fragment_thing_list, menu);
android.view.MenuItem subtitleItem = menu.findItem(R.id.menu_item_show_subtitle);
if (mSubtitleVisible) {
s... |
public void testIt() throws java.lang.Exception {
final com.puppycrawl.tools.checkstyle.DefaultConfiguration checkConfig = createCheckConfig(com.puppycrawl.tools.checkstyle.checks.coding.EqualsHashCodeCheck.class);
final java.lang.String[] expected = new java.lang.String[]{ "57:9: " + (getCheckMessage(com.puppy... | public void testIt() throws java.lang.Exception {
final com.puppycrawl.tools.checkstyle.DefaultConfiguration checkConfig = createCheckConfig(com.puppycrawl.tools.checkstyle.checks.coding.EqualsHashCodeCheck.class);
final java.lang.String[] expected = new java.lang.String[]{ "94:13: " + (getCheckMessage(com.pupp... |
public void run() {
try {
de.uni_hannover.sra.minimax_simulator.Main.getWorkspace().openProject(file);
initProjectGUI();
} catch (de.uni_hannover.sra.minimax_simulator.io.ProjectImportException e) {
de.uni_hannover.sra.minimax_simulator.Main.getWorkspace().closeProject();
de.uni_... | public void run() {
try {
de.uni_hannover.sra.minimax_simulator.Main.getWorkspace().openProject(file);
initProjectGUI();
} catch (de.uni_hannover.sra.minimax_simulator.io.ProjectImportException e) {
closeProject();
de.uni_hannover.sra.minimax_simulator.ui.UI.invokeInFAT(new java.... |
public void setInput(Jama.Matrix[] input) {
this.input = input;
padInput(padding);
for (int i = 0; i < (filters.length); i++) {
filters[i] = new Filter(filterSize, input.length);
}
} | public void setInput(Jama.Matrix[] input) {
this.input = input;
padInput(padding);
if ((filters[0]) == null) {
for (int i = 0; i < (filters.length); i++) {
filters[i] = new Filter(filterSize, input.length);
}
}
} |
private java.io.File detectPrivateHome(java.lang.String defaultPrivateHomeName) {
final java.lang.String defaultPrivateHomePath = com.civilizer.config.Configurator.getDefaultPrivateHomePath(defaultPrivateHomeName);
final java.lang.String privateHomePathByRuntimeArg = java.lang.System.getProperty(AppOptions.PRIV... | private java.io.File detectPrivateHome(java.lang.String defaultPrivateHomeName) {
final java.lang.String defaultPrivateHomePath = com.civilizer.config.Configurator.getDefaultPrivateHomePath(defaultPrivateHomeName);
final java.lang.String privateHomePathByRuntimeArg = java.lang.System.getProperty(AppOptions.PRIV... |
private boolean startMediaPlayerByFilePath(java.lang.String path) {
if (!(path.isEmpty())) {
try {
mediaPlayer.setDataSource(path);
mediaPlayer.prepare();
if (mediaPlayer.isPlaying()) {
mediaPlayer.stop();
}
mediaPlayer.start();
... | private boolean startMediaPlayerByFilePath(java.lang.String path) {
if ((path != null) && (!(path.isEmpty()))) {
try {
mediaPlayer.setDataSource(path);
mediaPlayer.prepare();
if (mediaPlayer.isPlaying()) {
mediaPlayer.stop();
}
medi... |
public java.awt.Rectangle getRightBounds() {
return new java.awt.Rectangle(((int) (x)), (((int) (y)) / 2), (((int) (width)) - 2), (((int) (height)) / 2));
} | public java.awt.Rectangle getRightBounds() {
return new java.awt.Rectangle((((int) (x)) + (((int) (height)) - 2)), ((int) (y)), 2, ((int) (height)));
} |
public static org.wso2.carbon.apimgt.api.model.APIStore getExternalAPIStore(java.lang.String apiStoreName, int tenantId) throws org.wso2.carbon.apimgt.api.APIManagementException {
java.util.Set<org.wso2.carbon.apimgt.api.model.APIStore> externalAPIStoresConfig = org.wso2.carbon.apimgt.impl.utils.APIUtil.getExternal... | public static org.wso2.carbon.apimgt.api.model.APIStore getExternalAPIStore(java.lang.String apiStoreName, int tenantId) throws org.wso2.carbon.apimgt.api.APIManagementException {
java.util.Set<org.wso2.carbon.apimgt.api.model.APIStore> externalAPIStoresConfig = org.wso2.carbon.apimgt.impl.utils.APIUtil.getExternal... |
protected java.util.Map<java.lang.Integer, java.lang.Integer> createResizedDS(int start, int maxSize) {
java.util.Map<java.lang.Integer, java.lang.Integer> map = new java.util.HashMap<>();
for (int i = start; i < maxSize; i++)
map.put(i, i);
for (int i = start + 10; i < maxSize; i++)
ma... | protected java.util.Map<java.lang.Integer, java.lang.Integer> createResizedDS(int start, int maxSize) {
java.util.Map<java.lang.Integer, java.lang.Integer> map = new java.util.HashMap<>();
for (int i = start; i < maxSize; i++) {
map.put(i, i);
}
for (int i = start + 10; i < maxSize; i++) {
... |
public Ticket peekMin() {
int indexOfLargest = 0;
for (int x = 0; x < (_queue.size()); x++) {
if ((_queue.get(x).compareTo(_queue.get(indexOfLargest))) > 0) {
indexOfLargest = x;
}
}
return _queue.get(indexOfLargest);
} | public Ticket peekMin() {
int indexOfLargest = 0;
for (int x = 0; x < (_queue.size()); x++) {
if ((_queue.get(x).compareTo(_queue.get(indexOfLargest))) == 0) {
indexOfLargest = x;
}
}
return _queue.get(indexOfLargest);
} |
public void readGraphWithVariableTest() {
org.s1ck.gdl.GDLLoader loader = getLoaderFromGDLString("g[()]");
validateCollectionSizes(loader, 1, 1, 0);
validateCacheSizes(loader, 1, 1, 0);
assertTrue("graph not cached", loader.getGraphCache().containsKey("g"));
org.s1ck.gdl.model.Graph g = loader.getGr... | public void readGraphWithVariableTest() {
org.s1ck.gdl.GDLLoader loader = getLoaderFromGDLString("g[()]");
validateCollectionSizes(loader, 1, 1, 0);
validateCacheSizes(loader, 1, 0, 0);
assertTrue("graph not cached", loader.getGraphCache().containsKey("g"));
org.s1ck.gdl.model.Graph g = loader.getGr... |
public java.awt.image.BufferedImage[] OldGIFtoFrames(java.lang.String fileLocation) throws java.io.IOException {
File gif = new File(fileLocation);
javax.imageio.ImageReader reader = new GIFImageReader(new GIFImageReaderSpi());
reader.setInput(javax.imageio.ImageIO.createImageInputStream(gif));
java.awt... | public java.awt.image.BufferedImage[] OldGIFtoFrames(java.lang.String fileLocation) throws java.io.IOException {
java.io.File gif = new java.io.File(fileLocation);
javax.imageio.ImageReader reader = new GIFImageReader(new GIFImageReaderSpi());
reader.setInput(javax.imageio.ImageIO.createImageInputStream(gif... |
public void onClick(android.view.View v) {
colleges.remove(i);
notifyDataSetChanged();
h.post(new java.lang.Runnable() {
@java.lang.Override
public void run() {
java.lang.String id = "" + position;
com.example.setup.finalproject.DBQueries.deleteRow(fragment.db, id);
... | public void onClick(android.view.View v) {
final java.lang.String remove = colleges.get(position);
colleges.remove(i);
notifyDataSetChanged();
h.post(new java.lang.Runnable() {
@java.lang.Override
public void run() {
com.example.setup.finalproject.DBQueries.deleteRow(fragment... |
private java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> collectQualifiers(final java.lang.reflect.Field field) {
final java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> qualifiers = new java.util.HashSet<>();
for (java.lang.annotation.Annotation an : field.getDe... | private java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> collectQualifiers(final java.lang.reflect.Field field) {
final java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> result = new java.util.HashSet<>();
for (java.lang.annotation.Annotation an : field.getDeclar... |
private void startFindNearestNodesService() {
int permissionCheck = android.support.v4.content.ContextCompat.checkSelfPermission(this.getActivity(), Manifest.permission.ACCESS_FINE_LOCATION);
if (permissionCheck == (android.content.pm.PackageManager.PERMISSION_GRANTED)) {
android.content.Intent intent =... | private void startFindNearestNodesService() {
int permissionCheck = android.support.v4.content.ContextCompat.checkSelfPermission(this.getActivity(), Manifest.permission.ACCESS_FINE_LOCATION);
if (permissionCheck == (android.content.pm.PackageManager.PERMISSION_GRANTED)) {
android.content.Intent intent =... |
public static pw.phylame.ycl.value.Pair<java.lang.Integer, java.lang.Integer> split(@lombok.NonNull
java.lang.String path) {
int extpos = (path.length()) - 1;
int seppos;
char ch;
for (seppos = extpos; seppos >= 0; --seppos) {
ch = path.charAt(seppos);
if (ch == '.') {
extpos... | public static pw.phylame.ycl.value.Pair<java.lang.Integer, java.lang.Integer> split(@lombok.NonNull
java.lang.String path) {
int extpos = path.length();
int seppos;
char ch;
for (seppos = extpos - 1; seppos >= 0; --seppos) {
ch = path.charAt(seppos);
if (ch == '.') {
extpos =... |
void getPubSpkr(java.io.OutputStream outputStream, java.lang.String givenName) throws java.io.IOException, java.lang.InterruptedException, javax.sound.sampled.LineUnavailableException {
int micInt = MicList.getSelectedIndex();
int speakerInt = SpeakerList.getSelectedIndex();
javax.sound.sampled.TargetDataLi... | void getPubSpkr(java.io.OutputStream outputStream) throws java.io.IOException, java.lang.InterruptedException, javax.sound.sampled.LineUnavailableException {
int micInt = MicList.getSelectedIndex();
int speakerInt = SpeakerList.getSelectedIndex();
javax.sound.sampled.TargetDataLine mic = getMic(micInt);
... |
protected void onProgressUpdate(java.lang.String... values) {
super.onProgressUpdate(values);
getDictionariesActivity.updateProgressBar(java.lang.Integer.parseInt(values[0]), java.lang.Integer.parseInt(values[1]));
setTopTextWhileExtracting(values[2], values[3]);
} | protected void onProgressUpdate(java.lang.String... values) {
super.onProgressUpdate(values);
getDictionariesActivity.updateProgressBar(java.lang.Integer.parseInt(values[0]), java.lang.Integer.parseInt(values[1]));
getDictionariesActivity.setTopTextWhileExtracting(values[2], values[3]);
} |
public void onClick(android.view.View v) {
switch (v.getId()) {
case R.id.ma_openurl :
presenter.openUrlClicked(((java.lang.String) (obtainedTextView.getText())));
break;
case R.id.toolbar_button :
presenter.toolbarButtonClicked(ua.frg.qr.utils.Settings.getFPrefix... | public void onClick(android.view.View v) {
switch (v.getId()) {
case R.id.toolbar_button :
presenter.toolbarButtonClicked(ua.frg.qr.utils.Settings.getFPrefix(context), ua.frg.qr.utils.Settings.getFSufix(context), ua.frg.qr.utils.Settings.getBPrefix(context), ua.frg.qr.utils.Settings.getBSufix(co... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
android.view.View view = inflater.inflate(R.layout.fragment_main, null);
recyclerView = ((com.jude.easyrecyclerview.EasyRecyclerView) (view.findViewById(R.id.easy... | public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
android.view.View view = inflater.inflate(R.layout.fragment_main, container, false);
recyclerView = ((com.jude.easyrecyclerview.EasyRecyclerView) (view.findViewBy... |
private <TYPE> TYPE invoke(java.lang.reflect.Method method, java.lang.Object... args) {
try {
return ((TYPE) (method.invoke(implementationObject, args)));
} catch (java.lang.IllegalAccessException e) {
throw new java.lang.RuntimeException(e);
} catch (java.lang.reflect.InvocationTargetExcept... | private <TYPE> TYPE invoke(java.lang.reflect.Method method, java.lang.Object... args) {
try {
return ((TYPE) (method.invoke(implementationObject, args)));
} catch (java.lang.IllegalAccessException e) {
throw new java.lang.RuntimeException(e);
} catch (java.lang.reflect.InvocationTargetExcept... |
public double slopeTo(Point that) {
if ((this.compareTo(that)) == 0)
return java.lang.Double.NEGATIVE_INFINITY;
if ((this.y) == (that.y))
return java.lang.Double.POSITIVE_INFINITY;
return ((double) ((that.y) - (this.y))) / ((double) ((that.x) - (this.x)));
} | public double slopeTo(Point that) {
if ((this.compareTo(that)) == 0)
return java.lang.Double.NEGATIVE_INFINITY;
if ((this.x) == (that.x))
return java.lang.Double.POSITIVE_INFINITY;
return ((double) ((that.y) - (this.y))) / ((double) ((that.x) - (this.x)));
} |
protected void onCreate(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
component = com.lazysoul.kotlinwithandroid.injection.components.DaggerActivityComponent.builder().applicationComponent(getApplicationComponet()).activityModule(new com.lazysou... | protected void onCreate(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
component = com.lazysoul.kotlinwithandroid.injection.components.DaggerActivityComponent.builder().applicationComponent(getApplicationComponet()).activityModule(new com.lazysou... |
public static double generateRandomRangeDouble(double min, double max) {
if (min > max) {
double tmp = min;
min = max;
max = tmp;
}else
if (min == max) {
return min;
}
return min + ((Utilities.random.nextDouble()) * ((max - min) + 1));
} | public static double generateRandomRangeDouble(double min, double max) {
if (min > max) {
double tmp = min;
min = max;
max = tmp;
}else
if (min == max) {
return min;
}
return min + ((Utilities.random.nextDouble()) * (max - min));
} |
private void addDelay(eu.siacs.conversations.xmpp.stanzas.MessagePacket packet, long timestamp) {
final java.text.SimpleDateFormat mDateFormat = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", java.util.Locale.US);
mDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
eu.siacs.conve... | public void addDelay(eu.siacs.conversations.xmpp.stanzas.MessagePacket packet, long timestamp) {
final java.text.SimpleDateFormat mDateFormat = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", java.util.Locale.US);
mDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
eu.siacs.conver... |
private void connectionLost() {
com.smartdevicelink.transport.MultiplexBluetoothTransport.listening = false;
android.os.Message msg = mHandler.obtainMessage(SdlRouterService.MESSAGE_TOAST);
android.os.Bundle bundle = new android.os.Bundle();
bundle.putString(com.smartdevicelink.transport.MultiplexBlueto... | private void connectionLost() {
android.os.Message msg = mHandler.obtainMessage(SdlRouterService.MESSAGE_TOAST);
android.os.Bundle bundle = new android.os.Bundle();
bundle.putString(com.smartdevicelink.transport.MultiplexBluetoothTransport.TOAST, "Device connection was lost");
msg.setData(bundle);
c... |
public boolean detectCollision(java.util.ArrayList<game.character.Character> data) {
java.util.ArrayList<game.character.Character> moving = data;
boolean collision = false;
int length = moving.size();
for (int i = 0; i < length; i++) {
game.character.Character character = moving.get(i);
... | public boolean detectCollision(java.util.ArrayList<game.character.Character> data) {
java.util.ArrayList<game.character.Character> moving = data;
boolean collision = false;
int length = moving.size();
for (int i = 0; i < length; i++) {
game.character.Character character = moving.get(i);
... |
private static boolean isMeet(test.model.Horse firstHorse, test.model.Horse secondHorse) {
boolean result = false;
if (((firstHorse.getHorizontalCoordinates()) == (secondHorse.getHorizontalCoordinates())) || ((firstHorse.getVerticalCoordinates()) == (secondHorse.getVerticalCoordinates()))) {
result = tr... | private static boolean isMeet(test.model.Horse firstHorse, test.model.Horse secondHorse) {
boolean result = false;
if (((firstHorse.getHorizontalCoordinates()) == (secondHorse.getHorizontalCoordinates())) && ((firstHorse.getVerticalCoordinates()) == (secondHorse.getVerticalCoordinates()))) {
result = tr... |
public void onClick(android.view.View v) {
if ((mSelectedPosition) != (-1)) {
getChildAt(mSelectedPosition).setSelected(false);
getChildAt(potsition).setSelected(true);
}
mSelectedPosition = potsition;
if ((onItemClickListener) != null) {
onItemClickListener.onItemClick(view, pot... | public void onClick(android.view.View v) {
if ((mSelectedPosition) != (-1)) {
getChildAt(mSelectedPosition).setSelected(false);
getChildAt(position).setSelected(true);
}
mSelectedPosition = position;
if ((onItemClickListener) != null) {
onItemClickListener.onItemClick(view, posit... |
if ((mNextPath) >= (mPaths.length)) {
mConnection.disconnect();
return ;
}
java.lang.String mimeType = ((mMimeTypes) != null) ? mMimeTypes[mNextPath] : null;
mConnection.scanFile(mPaths[mNextPath], mimeType);
(mNextPath)++;
} | if ((mNextPath) >= (mPaths.length)) {
mConnection.disconnect();
mConnection = null;
return ;
}
java.lang.String mimeType = ((mMimeTypes) != null) ? mMimeTypes[mNextPath] : null;
mConnection.scanFile(mPaths[mNextPath], mimeType);
(mNextPath)++;
} |
public void removeSetUp() {
this.remove(this.c1);
this.remove(this.gameField1);
this.add(this.gameField2, java.awt.BorderLayout.CENTER);
this.gameField1.updateSize();
this.gameField2.updateSize();
this.repaint();
} | public void removeSetUp() {
this.remove(this.c1);
this.remove(this.gameField1);
this.repaint();
this.add(this.gameField2, java.awt.BorderLayout.CENTER);
this.gameField1.updateSize();
this.gameField2.updateSize();
this.repaint();
} |
protected void onPostExecute(java.lang.String s) {
super.onPostExecute(s);
if (s != null) {
dialog.dismiss();
android.widget.Toast.makeText(context, ((context.getString(R.string.storage)) + s), Toast.LENGTH_LONG).show();
((android.app.Activity) (context)).finish();
}else {
an... | protected void onPostExecute(java.lang.String s) {
super.onPostExecute(s);
dialog.dismiss();
if (s != null) {
android.widget.Toast.makeText(context, ((context.getString(R.string.storage)) + s), Toast.LENGTH_LONG).show();
((android.app.Activity) (context)).finish();
}else {
androi... |
public org.gephi.graph.api.Edge getEdge(org.gephi.graph.api.Node node1, org.gephi.graph.api.Node node2, int type) {
graphStore.autoReadLock();
try {
org.gephi.graph.store.EdgeImpl edge = graphStore.edgeStore.get(node1, node1, type);
if (view.containsEdge(edge)) {
return edge;
... | public org.gephi.graph.api.Edge getEdge(org.gephi.graph.api.Node node1, org.gephi.graph.api.Node node2, int type) {
graphStore.autoReadLock();
try {
org.gephi.graph.store.EdgeImpl edge = graphStore.edgeStore.get(node1, node2, type);
if ((edge != null) && (view.containsEdge(edge))) {
... |
public boolean startsright(char c) {
Set<java.lang.Integer> s = new Set<java.lang.Integer>();
s.addElement(start());
freeSteps(s);
for (int i = 0; i < (s.size()); i++)
for (int j = 0; j < (getSize()); j++)
if ((getEdge(s.getElement(i), j)) == c)
return true;
... | public int startsright(char c) {
Set<java.lang.Integer> s = new Set<java.lang.Integer>();
s.addElement(start());
freeSteps(s);
for (int i = 0; i < (s.size()); i++)
for (int j = 0; j < (getSize()); j++)
if ((getEdge(s.getElement(i), j)) == c)
return j;
... |
public void actionPerformed(java.awt.event.ActionEvent e) {
int confirmation = javax.swing.JOptionPane.showConfirmDialog(null, "Are you sure to logout?", "Logout", javax.swing.JOptionPane.YES_NO_OPTION);
if (confirmation == 0) {
cards.show(cardPanel, "Welcome");
buttonPanel.setVisible(false);
... | public void actionPerformed(java.awt.event.ActionEvent e) {
int confirmation = javax.swing.JOptionPane.showConfirmDialog(null, "Are you sure to logout?", "Logout", javax.swing.JOptionPane.YES_NO_OPTION);
if (confirmation == 0) {
cards.show(cardPanel, "Welcome");
buttonPanel.setVisible(false);
... |
public static java.io.BufferedReader getReader(java.io.File file) throws java.io.IOException {
edu.umass.ciir.fws.utility.Utility.info(("!!open file: " + (file.getAbsolutePath())));
java.io.FileInputStream stream = new java.io.FileInputStream(file);
if (file.getName().endsWith(".gz")) {
return new j... | public static java.io.BufferedReader getReader(java.io.File file) throws java.io.IOException {
java.io.FileInputStream stream = new java.io.FileInputStream(file);
if (file.getName().endsWith(".gz")) {
return new java.io.BufferedReader(new java.io.InputStreamReader(new java.util.zip.GZIPInputStream(strea... |
public void test026() {
org.formulachess.engine.ChessEngine model = new org.formulachess.engine.ChessEngine(java.util.Locale.getDefault(), "r2q1r2/p1pb1kpQ/3pR3/1p1n4/4pP2/8/PP2B1PP/6K1 b - f3 0 0");
long[] moves = model.allMoves();
assertEquals(org.formulachess.engine.tests.TestAllMoves.WRONG_SIZE, 31, mov... | public void test026() {
java.lang.String position = "r2q1r2/p1pb1kpQ/3pR3/1p1n4/4pP2/8/PP2B1PP/6K1 b - f3 0 0";
org.formulachess.engine.ChessEngine model = new org.formulachess.engine.ChessEngine(java.util.Locale.getDefault(), position);
long[] moves = model.allMoves();
assertEquals(org.formulachess.eng... |
protected void onPostExecute(java.lang.String s) {
java.util.HashMap<java.lang.String, java.lang.String> directionsList = null;
com.creativeminds.stealthpatrolling.DataParser parser = new com.creativeminds.stealthpatrolling.DataParser();
directionsList = parser.parseDirections(s);
duration = directionsL... | protected void onPostExecute(java.lang.String s) {
java.util.HashMap<java.lang.String, java.lang.String> directionsList = null;
com.creativeminds.stealthpatrolling.DataParser parser = new com.creativeminds.stealthpatrolling.DataParser();
directionsList = parser.parseDirections(s);
duration = directionsL... |
public boolean compareBuildings(Domain.Building b1, Domain.Building b2) {
boolean equals;
equals = b1.getBuildingName().equals(b2.getBuildingName());
if ((((b1.getBuildingSize()) != (b2.getBuildingSize())) || ((b1.getBuildingYear()) != (b2.getBuildingYear()))) || ((b1.getListOfRooms()) != (b2.getListOfRooms... | public boolean compareBuildings(Domain.Building b1, Domain.Building b2) {
boolean equals;
equals = b1.getBuildingName().equals(b2.getBuildingName());
if (((b1.getBuildingSize()) != (b2.getBuildingSize())) || ((b1.getBuildingYear()) != (b2.getBuildingYear()))) {
equals = false;
}
return equal... |
public void destroyBuilding() {
if (building.isEmpty()) {
java.lang.System.out.println("Kein Geb�ude Vorhanden");
return ;
}
int index = (building.size()) - 1;
gameUC.Building b = building.get(index);
building.remove(index);
freeSlots += b.needSlots();
} | public boolean destroyBuilding() {
if (building.isEmpty()) {
java.lang.System.out.println("Kein Geb�ude Vorhanden");
return false;
}
int index = (building.size()) - 1;
gameUC.Building b = building.get(index);
building.remove(index);
freeSlots += b.needSlots();
return true;
} |
public void run() {
if ((toast) != null) {
toast.cancel();
}
if ((artists.size()) == 0) {
displayToast();
}
adapterSearchResults.clear();
simpleArtists.clear();
for (kaaes.spotify.webapi.android.models.Artist artist : artists) {
simpleArtists.add(new com.dkulon.spotif... | public void run() {
if ((toast) != null) {
toast.cancel();
}
if ((artists.size()) == 0) {
displayToast();
}
adapterSearchResults.clear();
simpleArtists.clear();
for (kaaes.spotify.webapi.android.models.Artist artist : artists) {
simpleArtists.add(new com.dkulon.spotif... |
public void whenResetForgottenPassword_returnsOK() throws java.lang.Exception {
com.e451.rest.domains.user.ResetForgottenPasswordRequest request = new com.e451.rest.domains.user.ResetForgottenPasswordRequest("first", "last", "username", "guid");
org.mockito.Mockito.doNothing().when(userService).resetForgottenPa... | public void whenResetForgottenPassword_returnsOK() throws java.lang.Exception {
com.e451.rest.domains.user.ResetForgottenPasswordRequest request = new com.e451.rest.domains.user.ResetForgottenPasswordRequest("username", "guid");
org.mockito.Mockito.doNothing().when(userService).resetForgottenPassword(request);
... |
public void setOpaqueAndCutout() {
block.cutout = false;
block.opaque = false;
for (java.lang.String textureName : blockModel.textures.values()) {
if ((textureName.startsWith("modbuilder:")) && (hasTransparency(textureName))) {
block.cutout = true;
block.opaque = true;
... | public void setOpaqueAndCutout() {
block.cutout = false;
block.opaque = true;
for (java.lang.String textureName : blockModel.textures.values()) {
if ((textureName.startsWith("modbuilder:")) && (hasTransparency(textureName))) {
block.cutout = true;
block.opaque = false;
... |
public static java.lang.String[] getDataFileNames(boolean includeLast) {
int maxID = com.adsamcik.signalcollector.Setting.getPreferences(com.adsamcik.signalcollector.DataStore.context).getInt(com.adsamcik.signalcollector.DataStore.KEY_FILE_ID, 0);
if (!includeLast)
maxID--;
java.lang.String[] f... | public static java.lang.String[] getDataFileNames(boolean includeLast) {
int maxID = com.adsamcik.signalcollector.Setting.getPreferences(com.adsamcik.signalcollector.DataStore.context).getInt(com.adsamcik.signalcollector.DataStore.KEY_FILE_ID, (-1));
if (!includeLast)
maxID--;
java.lang.String[... |
public static boolean isBanglaAvailable() {
java.util.Locale[] locales = java.util.Locale.getAvailableLocales();
for (java.util.Locale locale : locales) {
if (locale.getDisplayName().toLowerCase().contains("bengali")) {
return true;
}
}
return false;
} | private static boolean isBanglaAvailable() {
java.util.Locale[] locales = java.util.Locale.getAvailableLocales();
for (java.util.Locale locale : locales) {
if (locale.getDisplayName().toLowerCase().contains("bengali")) {
return true;
}
}
return false;
} |
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if ((refreshView) != null) {
refreshView = view.findViewById(R.id.refresh);
}
if ((fetchNextView) != null) {
fetchNextView = view.findViewById(R.id.fet... | public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if ((refreshView) == null) {
refreshView = view.findViewById(R.id.refresh);
}
if ((fetchNextView) == null) {
fetchNextView = view.findViewById(R.id.fet... |
private ca.rmen.nounours.data.Image getRandomImage(ca.rmen.nounours.data.Image fromImage) {
java.util.Map<java.lang.String, ca.rmen.nounours.data.Image> images = getImages();
java.util.List<ca.rmen.nounours.data.Image> allAdjacentImages = fromImage.getAllAdjacentImages();
if ((allAdjacentImages.size()) == 0... | private ca.rmen.nounours.data.Image getRandomImage(ca.rmen.nounours.data.Image fromImage) {
java.util.List<ca.rmen.nounours.data.Image> allAdjacentImages = fromImage.getAllAdjacentImages();
if ((allAdjacentImages.size()) == 0)
return null;
int toImageNumber = random.nextInt(allAdjacentImages.si... |
public java.lang.String translateToString() throws prism.PrismException {
java.lang.String prismModelString = null;
try {
prismModelString = pepa.compiler.Main.compile(("" + (modelFile)));
} catch (prism.pepa e) {
if ((modelFile) != null) {
modelFile.delete();
modelFi... | public java.lang.String translateToString() throws prism.PrismException {
java.lang.String prismModelString = null;
try {
prismModelString = pepa.compiler.Main.compile(("" + (modelFile)));
} catch (prism.pepa e) {
throw new prism.PrismException(("Could not import PEPA model:\n" + (e.getMessa... |
private void processScanResult(android.bluetooth.le.ScanResult result) {
if (((result.getDevice().getName()) == null) || (!(result.getDevice().getName().startsWith("SLBeacon")))) {
return ;
}
java.lang.String macAddress = result.getDevice().getAddress();
resultsReporter.reportBleScan(result.getR... | private void processScanResult(android.bluetooth.le.ScanResult result) {
if (((result.getDevice().getName()) == null) || (!(result.getDevice().getName().startsWith("SLBeacon")))) {
return ;
}
java.lang.String macAddress = result.getDevice().getAddress();
resultsReporter.reportBleScan(result.getR... |
private int discretize(float value, float[] cp) {
if (cp == null)
return 0;
int ipoint = java.util.Arrays.binarySearch(cp, value);
if (ipoint != (-1))
return ipoint;
else
return 0;
} | private int discretize(float value, java.lang.Float[] cp) {
if (cp == null)
return 0;
int ipoint = java.util.Arrays.binarySearch(cp, value);
if (ipoint < 0)
return (java.lang.Math.abs(ipoint)) - 1;
else
return ipoint;
} |
private void login() {
boolean validUserName = false;
while (!validUserName) {
java.lang.System.out.println("Please enter user name to log in: ");
myUserName = myScanner.next();
if (true) {
validUserName = true;
chooseUserTypeMenuView();
}else {
... | private void login() {
boolean validUserName = false;
while (!validUserName) {
java.lang.System.out.print("Please enter user name to log in: ");
myUserName = myScanner.next();
java.lang.System.out.println();
if (true) {
validUserName = true;
}else {
... |
public void onModuleCreate(android.content.Context context, android.os.Bundle savedInstanceState) {
super.onModuleCreate(context, savedInstanceState);
if (context instanceof android.support.v7.app.ActionBarActivity) {
throw new java.lang.IllegalStateException("Toolbar module must be used just on ActionB... | public void onModuleCreate(android.content.Context context, android.os.Bundle savedInstanceState) {
super.onModuleCreate(context, savedInstanceState);
if (!(context instanceof android.support.v7.app.ActionBarActivity)) {
throw new java.lang.IllegalStateException("Toolbar module must be used just on Acti... |
private it.unibz.inf.ontop.r2rml.OBDAMappingAxiom getMapping(eu.optique.api.mapping.TriplesMap tm) throws java.lang.Exception {
java.lang.String sourceQuery = r2rmlParser.getSQLQuery(tm);
java.util.List<it.unibz.inf.ontop.r2rml.Function> body = getMappingTripleAtoms(tm);
it.unibz.inf.ontop.r2rml.OBDAMapping... | private it.unibz.inf.ontop.r2rml.OBDAMappingAxiom getMapping(eu.optique.api.mapping.TriplesMap tm) throws java.lang.Exception {
java.lang.String sourceQuery = r2rmlParser.getSQLQuery(tm).trim();
java.util.List<it.unibz.inf.ontop.r2rml.Function> body = getMappingTripleAtoms(tm);
it.unibz.inf.ontop.r2rml.OBDA... |
public long setDouble(long flags, int key, double value) {
if (key == (K_DELAY)) {
delayEncoder.setDoubleValue(flags, value);
}else {
throw new java.lang.UnsupportedOperationException((("Unknown key " + key) + " for double value."));
}
return flags;
} | public long setDouble(long flags, int key, double value) {
if (key == (K_DELAY)) {
flags = delayEncoder.setDoubleValue(flags, value);
}else {
throw new java.lang.UnsupportedOperationException((("Unknown key " + key) + " for double value."));
}
return flags;
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if ((findViewById(R.id.movie_detail_container)) != null) {
com.morxander.popularmovies.MainActivity.mTwoPane = true;
if (savedInstanceState == null) {
... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if ((findViewById(R.id.movie_detail_container)) != null) {
com.morxander.popularmovies.MainActivity.mTwoPane = true;
getSupportFragmentManager().beginTr... |
private void handleSuperPowers() {
if (((botsKilled) == 1) && (!(showSuperPowers))) {
showSuperPowers = true;
superPowerTimer = 600;
oldDamage = damage;
damage = 100;
++(botsKilled);
java.lang.System.out.println(("Damage " + (damage)));
}
if (showSuperPowers)
... | private void handleSuperPowers() {
if (((botsKilled) == 1) && (!(showSuperPowers))) {
showSuperPowers = true;
superPowerTimer = 600;
oldDamage = damage;
damage = 100;
++(botsKilled);
java.lang.System.out.println(("Damage " + (damage)));
}
if (showSuperPowers)
... |
public RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) {
final android.view.View view = inflater.inflate(R.layout.newslist_itemlayout, parent, false);
view.setOnClickListener(new android.view.View.OnClickListener() {
@java.lang.Override
public void onClick... | public RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) {
if (viewType == 1) {
final android.view.View view = inflater.inflate(R.layout.newslist_itemlayout, parent, false);
view.setOnClickListener(new android.view.View.OnClickListener() {
@java.lang... |
protected void execute(final domainapp.fixture.scenarios.ExecutionContext ec) {
for (domainapp.dom.communicatie.Communicatie communicatie : communicatieRepository.alleCommunicaties()) {
if (communicatie.getAfzender().equals("klant")) {
if ((communicatie.getKlant().getEmail()) != null) {
... | protected void execute(final domainapp.fixture.scenarios.ExecutionContext ec) {
for (domainapp.dom.communicatie.Communicatie communicatie : communicatieRepository.alleCommunicaties()) {
if ((communicatie.getAfzender().equals("klant")) || ((communicatie.getAfzender()) == null)) {
if ((communicati... |
protected com.haulmont.yarg.formatters.impl.Row findNextRowForFirstRender(com.haulmont.yarg.formatters.impl.Range templateRange, java.util.List<com.haulmont.yarg.formatters.impl.Row> resultSheetRows) {
java.util.Collection<com.haulmont.yarg.formatters.impl.Range> templateNeighbours = rangeVerticalIntersections.get(... | protected com.haulmont.yarg.formatters.impl.Row findNextRowForFirstRender(com.haulmont.yarg.formatters.impl.Range templateRange, java.util.List<com.haulmont.yarg.formatters.impl.Row> resultSheetRows) {
java.util.Collection<com.haulmont.yarg.formatters.impl.Range> templateNeighbours = rangeVerticalIntersections.get(... |
public static void removeAndClose(java.lang.String nameServerAddress, java.lang.String group) {
if (group == null) {
group = org.apache.rocketmq.logappender.common.ProducerInstance.DEFAULT_GROUP;
}
java.lang.String genKey = org.apache.rocketmq.logappender.common.ProducerInstance.genKey(nameServerAdd... | public static void removeAndClose(java.lang.String nameServerAddress, java.lang.String group) {
if (group == null) {
group = org.apache.rocketmq.logappender.common.ProducerInstance.DEFAULT_GROUP;
}
java.lang.String genKey = org.apache.rocketmq.logappender.common.ProducerInstance.genKey(nameServerAdd... |
private net.openhft.chronicle.map.Work get(net.openhft.lang.io.Bytes reader, net.openhft.chronicle.map.TcpReplicator.TcpSocketChannelEntryWriter writer, final long sizeLocation, long transactionId) {
bytesMap.output = writer;
try {
map.get(reader);
} catch (java.lang.Throwable e) {
return se... | private net.openhft.chronicle.map.Work get(net.openhft.lang.io.Bytes reader, net.openhft.chronicle.map.TcpReplicator.TcpSocketChannelEntryWriter writer, final long sizeLocation, long transactionId) {
bytesMap.output = writer;
try {
bytesMap.get(reader);
} catch (java.lang.Throwable e) {
retu... |
if (nonTimeAxisMaxCurrent.isSelected()) {
return nonTimeAxisMaxCurrentValue.getValue().floatValue();
}else
if (nonTimeAxisMaxManual.isSelected()) {
double result = 1.0;
try {
result = nonTimeAxisMaxManualValue.getDoubleValue().floatValue();
} c... | if (nonTimeAxisMaxCurrent.isSelected()) {
return nonTimeAxisMaxCurrentValue.getValue().floatValue();
}else
if (nonTimeAxisMaxManual.isSelected()) {
double result = 1.0;
try {
result = nonTimeAxisMaxManualValue.getDoubleValue().floatValue();
} c... |
private void drawAxis(java.awt.Graphics2D graph, int biWidth, int biHeight) {
graph.setStroke(axisStroke);
graph.setColor(axisColor);
graph.draw(new java.awt.geom.Line2D.Double((biWidth / 2), 0, (biWidth / 2), biHeight));
graph.draw(new java.awt.geom.Line2D.Double(0, (biHeight / 2), biWidth, (biHeight /... | private void drawAxis(java.awt.Graphics2D graph, int biWidth, int biHeight) {
if ((axisStroke) != null)
graph.setStroke(axisStroke);
graph.setColor(axisColor);
graph.draw(new java.awt.geom.Line2D.Double((biWidth / 2), 0, (biWidth / 2), biHeight));
graph.draw(new java.awt.geom.Line2D.Double(... |
public void testReachedLimit() {
com.amazon.dao.APIKeyCache akc = com.amazon.dao.APIKeyCache.getInstance();
com.amazon.keys.APIKey k = akc.getNewKey();
org.junit.Assert.assertFalse(akc.reachedLimit("/", k.getStringKey()));
k.getCalls().put("/", 60);
org.junit.Assert.assertTrue(akc.reachedLimit("/", ... | public void testReachedLimit() {
com.amazon.dao.APIKeyCache akc = com.amazon.dao.APIKeyCache.getInstance();
com.amazon.keys.APIKey k = akc.getNewKey();
org.junit.Assert.assertFalse(akc.reachedLimit("/", k.getStringKey()));
org.junit.Assert.assertTrue(akc.reachedLimit("/", k.getStringKey()));
} |
public ai.subut.kurjun.model.identity.RelationObject createRelationObject(java.lang.String objectId, int objectType) {
try {
ai.subut.kurjun.model.identity.RelationObject relationObject = new ai.subut.kurjun.core.dao.model.identity.RelationObjectEntity();
if (com.google.common.base.Strings.isNullOrE... | public ai.subut.kurjun.model.identity.RelationObject createRelationObject(java.lang.String objectId, int objectType) {
ai.subut.kurjun.model.identity.RelationObject relationObject = null;
try {
relationObject = new ai.subut.kurjun.core.dao.model.identity.RelationObjectEntity();
if (com.google.co... |
public static boolean restartLoader(by.istin.android.xcore.fragment.CursorLoaderFragmentHelper.ICursorLoaderFragmentHelper cursorLoaderFragment) {
if ((cursorLoaderFragment.getUri()) != null) {
android.support.v4.app.LoaderManager lm = cursorLoaderFragment.getSupportLoaderManager();
by.istin.android... | public static boolean restartLoader(final by.istin.android.xcore.fragment.CursorLoaderFragmentHelper.ICursorLoaderFragmentHelper cursorLoaderFragment) {
if (((cursorLoaderFragment.getUri()) != null) && ((cursorLoaderFragment.getActivity()) != null)) {
android.support.v4.app.LoaderManager lm = cursorLoaderFr... |
private int getWin() {
if ((freeSpaces) != 0) {
return EMPTY;
}
if ((blackScore) > (whiteScore)) {
return BLACK;
}
if ((whiteScore) > (blackScore)) {
return WHITE;
}else {
return DEAD;
}
} | public int getWin() {
if ((freeSpaces) != 0) {
return EMPTY;
}
if ((blackScore) > (whiteScore)) {
return BLACK;
}
if ((whiteScore) > (blackScore)) {
return WHITE;
}else {
return DEAD;
}
} |
public void calcaRes() {
switch (AccelSettings.scale) {
case 2 :
AccelSettings.aRes = SENSITIVITY_ACCELEROMETER_2;
break;
case 4 :
AccelSettings.aRes = SENSITIVITY_ACCELEROMETER_4;
break;
case 8 :
AccelSettings.aRes = SENSITIVITY_AC... | private void calcaRes() {
switch (AccelSettings.scale) {
case 2 :
AccelSettings.aRes = SENSITIVITY_ACCELEROMETER_2;
break;
case 4 :
AccelSettings.aRes = SENSITIVITY_ACCELEROMETER_4;
break;
case 8 :
AccelSettings.aRes = SENSITIVITY_A... |
private void destroyLines() {
int line = 0;
for (int row = 0; row < (wall.length); row++) {
if (isRowFull(row))
deleteRow(row);
line++;
}
this.lines += line;
this.score += xtq.game.tetris.Tetris.SCORE_TABLE[line];
} | private void destroyLines() {
int line = 0;
for (int row = 0; row < (wall.length); row++) {
if (isRowFull(row)) {
deleteRow(row);
line++;
}
}
this.lines += line;
this.score += xtq.game.tetris.Tetris.SCORE_TABLE[line];
} |
public org.apache.airavata.gfac.core.cluster.RawCommandInfo getJobIdMonitorCommand(java.lang.String jobName, java.lang.String userName) {
return new org.apache.airavata.gfac.core.cluster.RawCommandInfo(((((((this.installedPath) + (jMCommands.get(JobManagerCommand.JOB_MONITORING))) + " -n ") + jobName) + " -u ") + u... | public org.apache.airavata.gfac.core.cluster.RawCommandInfo getJobIdMonitorCommand(java.lang.String jobName, java.lang.String userName) {
return new org.apache.airavata.gfac.core.cluster.RawCommandInfo(((((((this.installedPath) + (jMCommands.get(JobManagerCommand.JOB_MONITORING).trim())) + " -n ") + jobName) + " -u... |
protected void afterHookedMethod(pk.qwerty12.nfclockscreenoffenabler.MethodHookParam param) throws java.lang.Throwable {
java.lang.String fieldName;
if (currentapiVersion < (android.os.Build.VERSION_CODES.JELLY_BEAN_MR1)) {
fieldName = "mKeyguardScreenCallback";
}else {
fieldName = "mCallbac... | protected void afterHookedMethod(pk.qwerty12.nfclockscreenoffenabler.MethodHookParam param) throws java.lang.Throwable {
try {
pk.qwerty12.nfclockscreenoffenabler.NFCLockScreenOffEnabler.mKeyguardSecurityCallbackInstance = de.robv.android.xposed.XposedHelpers.getObjectField(param.thisObject, "mCallback");
... |
private void findWordInString(com.nordstrom.core.wordchecker.dto.GameWord word, java.lang.String stringToSearch, int rowIndex, com.nordstrom.core.wordchecker.dto.LetterGrid.Orientation orientation) {
int index;
while ((index = stringToSearch.indexOf(word.getValue())) > 0) {
word.addLocation(new com.nord... | private void findWordInString(com.nordstrom.core.wordchecker.dto.GameWord word, java.lang.String stringToSearch, int rowIndex, com.nordstrom.core.wordchecker.dto.LetterGrid.Orientation orientation) {
int index;
while ((index = stringToSearch.indexOf(word.getValue())) >= 0) {
word.addLocation(new com.nor... |
public void creaJPanelIntro() {
removeAll();
revalidate();
repaint();
setBackground(java.awt.Color.decode("#B3E5FC"));
settaBottone(introGame, "introGame", mediator);
settaBottone(introInfo, "introInfo", mediator);
settaBottone(introContatti, "introContatti", mediator);
settaBottone(intr... | public void creaJPanelIntro() {
removeAll();
revalidate();
repaint();
settaBottone(introGame, "introGame", mediator);
settaBottone(introInfo, "introInfo", mediator);
settaBottone(introContatti, "introContatti", mediator);
settaBottone(introEsci, "introEsci", mediator);
} |
private void setSettings() throws java.sql.SQLException {
spAge.setSelection(ageAdapter.getPosition(kvr.getKeyValue("userAge").getString(0)));
spProf.setSelection(ageAdapter.getPosition(kvr.getKeyValue("userProf").getString(0)));
} | private void setSettings() throws java.sql.SQLException {
spAge.setSelection(ageAdapter.getPosition(kvr.getKeyValue("userAge").getString(1)));
spProf.setSelection(ageAdapter.getPosition(kvr.getKeyValue("userProf").getString(1)));
} |
public void run(final boolean timeout) throws java.lang.InterruptedException {
final com.spotify.helios.agent.RetryScheduler retryScheduler = retryIntervalPolicy.newScheduler();
while (isAlive()) {
try {
update();
return ;
} catch (org.apache.zookeeper.KeeperException e) ... | public void run(final boolean timeout) throws java.lang.InterruptedException {
final com.spotify.helios.agent.RetryScheduler retryScheduler = retryIntervalPolicy.newScheduler();
while (isAlive()) {
try {
update();
return ;
} catch (java.lang.Exception e) {
syn... |
public void act() {
boolean willMove = canMove();
if ((isEnd) == true) {
if ((hasShown) == false) {
java.lang.String msg = (stepCount.toString()) + " steps";
javax.swing.JOptionPane.showMessageDialog(null, msg);
hasShown = true;
}
}else
if (willMov... | public void act() {
boolean willMove = canMove();
if (isEnd) {
if (!(hasShown)) {
java.lang.String msg = (stepCount.toString()) + " steps";
javax.swing.JOptionPane.showMessageDialog(null, msg);
hasShown = true;
}
}else
if (willMove) {
m... |
public static java.util.List<java.io.File> list(java.io.File file) {
if (!(file.isDirectory()))
Homework.indexing.files.add(file);
java.io.File[] children = file.listFiles();
for (java.io.File child : children) {
Homework.indexing.list(child);
}
return Homework.indexing.files;
} | public static java.util.List<java.io.File> list(java.io.File file) {
if (!(file.isDirectory()))
Homework.indexing.files.add(file);
else {
java.io.File[] children = file.listFiles();
for (java.io.File child : children) {
Homework.indexing.list(child);
}
}
retur... |
public void updateValue(double value) {
double adjusted = value * (scale);
if ((lastValue) == adjusted)
return ;
lastValue = adjusted;
if (com.simsilica.lemur.input.InputMapper.log.isTraceEnabled())
com.simsilica.lemur.input.InputMapper.log.trace(((("Value changed for:" + (function)... | public void updateValue(double value) {
double adjusted = value * (scale);
if ((lastValue) == adjusted)
return ;
lastValue = adjusted;
if (com.simsilica.lemur.input.InputMapper.log.isTraceEnabled())
com.simsilica.lemur.input.InputMapper.log.trace(((("Value changed for:" + (function)... |
public static android.database.Cursor fetchCarouselCurrentEvents() {
java.lang.String whereIn = com.untappedkegg.rally.AppState.SOURCE_RALLY_AMERICA;
final java.util.Set<java.lang.String> feeds = com.untappedkegg.rally.AppState.getSettings().getStringSet("event_feeds", null);
if (feeds != null) {
fo... | public static android.database.Cursor fetchCarouselCurrentEvents() {
java.lang.String whereIn = ("'" + (com.untappedkegg.rally.AppState.SOURCE_RALLY_AMERICA)) + "'";
final java.util.Set<java.lang.String> feeds = com.untappedkegg.rally.AppState.getSettings().getStringSet("event_feeds", null);
if (feeds != nu... |
protected void onHandleIntent(android.content.Intent intent) {
android.os.Bundle extras = intent.getExtras();
com.google.android.gms.gcm.GoogleCloudMessaging gcm = com.google.android.gms.gcm.GoogleCloudMessaging.getInstance(this);
java.lang.String messageType = gcm.getMessageType(intent);
if (!(extras.i... | protected void onHandleIntent(android.content.Intent intent) {
android.os.Bundle extras = intent.getExtras();
com.google.android.gms.gcm.GoogleCloudMessaging gcm = com.google.android.gms.gcm.GoogleCloudMessaging.getInstance(this);
java.lang.String messageType = gcm.getMessageType(intent);
if ((extras !=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.