id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
22,201
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.*; <BUG>import java.util.stream.Collectors; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class Comm...
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
22,202
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
22,203
private static FGStorageManager instance; private final Logger logger = FoxGuardMain.instance().getLogger();</BUG> private final Set<LoadEntry> loaded = new HashSet<>(); private final Path directory = getDirectory(); private final Map<String, Path> worldDirectories; <BUG>private FGStorageManager() { defaultModifiedMap ...
public final HashMap<IFGObject, Boolean> defaultModifiedMap; private final UserStorageService userStorageService; private final Logger logger = FoxGuardMain.instance().getLogger(); userStorageService = FoxGuardMain.instance().getUserStorage(); defaultModifiedMap = new CacheMap<>((k, m) -> {
22,204
String name = fgObject.getName(); Path singleDir = dir.resolve(name.toLowerCase()); </BUG> boolean shouldSave = fgObject.shouldSave(); if (force || shouldSave) { <BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir); </BUG> constructDirectory(singleDir); try { fg...
UUID owner = fgObject.getOwner(); boolean isOwned = !owner.equals(SERVER_UUID); Optional<User> userOwner = userStorageService.get(owner); String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name; if (fgObject.autoSave()) { Path singleDir = serverDir.resolve(n...
22,205
if (fgObject.autoSave()) { Path singleDir = dir.resolve(name.toLowerCase()); </BUG> boolean shouldSave = fgObject.shouldSave(); if (force || shouldSave) { <BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir); </BUG> constructDirectory(singleDir); try { fgOb...
Path singleDir = serverDir.resolve(name.toLowerCase()); logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
22,206
public synchronized void loadRegionLinks() { logger.info("Loading region links"); try (DB mainDB = DBMaker.fileDB(directory.resolve("regions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen(); linksMap.entrySet().forEach(...
Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey()); if (regionOpt.isPresent()) { IRegion region = regionOpt.get(); logger.info("Loading links for region \"" + region.getName() + "\"");
22,207
public synchronized void loadWorldRegionLinks(World world) { logger.info("Loading world region links for world \"" + world.getName() + "\""); try (DB mainDB = DBMaker.fileDB(worldDirectories.get(world.getName()).resolve("wregions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("l...
Optional<IWorldRegion> regionOpt = FGManager.getInstance().getWorldRegion(world, entry.getKey()); if (regionOpt.isPresent()) { IWorldRegion region = regionOpt.get(); logger.info("Loading links for world region \"" + region.getName() + "\"");
22,208
StringBuilder builder = new StringBuilder(); for (Iterator<IHandler> it = handlers.iterator(); it.hasNext(); ) { builder.append(it.next().getName()); if (it.hasNext()) builder.append(","); } <BUG>return builder.toString(); }</BUG> private final class LoadEntry { public final String name; public final Type type;
public enum Type { REGION, WREGION, HANDLER
22,209
.autoCloseQuotes(true) .leaveFinalAsIs(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream() </BUG> .filter(new StartsWithPredicate(parse.current.token)) .co...
return Stream.of("region", "worldregion", "handler", "controller")
22,210
private static final int KEEP_ALIVE_TIME = 100; private static final TimeUnit KEEP_ALIVE_TIME_UNIT; static { KEEP_ALIVE_TIME_UNIT = TimeUnit.SECONDS; } <BUG>private static final int CORE_POOL_SIZE = 8; private static final int MAXIMUM_POOL_SIZE = 8; </BUG> private final Map<Long, Map<MediaType, ThreadPoolExecutor>> up...
private static final int CORE_POOL_SIZE = 2; private static final int MAXIMUM_POOL_SIZE = 2;
22,211
private static final int MAXIMUM_POOL_SIZE = 8; </BUG> private final Map<Long, Map<MediaType, ThreadPoolExecutor>> updateThreadPools; private static final int unRelatedQueueId = -1; private static final MediaType unrelatedMediaType = MediaType.MEDIA_TYPE_NONE; <BUG>private static int NUMBER_OF_CORES = Runtime.getRuntim...
private static final int KEEP_ALIVE_TIME = 100; private static final TimeUnit KEEP_ALIVE_TIME_UNIT; static { KEEP_ALIVE_TIME_UNIT = TimeUnit.SECONDS; } private static final int CORE_POOL_SIZE = 2; private static final int MAXIMUM_POOL_SIZE = 2; private static int NUMBER_OF_CORES = 2;// Runtime.getRuntime().availablePro...
22,212
EventBus.getDefault().register(this); } public void unregisterEventListeners(){ EventBus.getDefault().unregister(this); } <BUG>public void onEventBackgroundThread(BiblePagingEvent event){ UWPreferenceDataManager.changedToBibleChapter(context, event.mainChapter.getId(), false); UWPreferenceDataManager.changedToBibleChap...
if(event.mainChapter != null) { if(event.secondaryChapter != null) {
22,213
package utils; import android.support.annotation.Nullable; <BUG>import java.io.IOException; import okhttp3.OkHttpClient;</BUG> import okhttp3.Request; import okhttp3.Response; public class URLDownloadUtil {
import java.util.concurrent.TimeUnit; import okhttp3.OkHttpClient;
22,214
DaoSession session = DaoDBHelper.getDaoSession(context); long changingId = (isSecond)? UWPreferenceManager.getSelectedBibleChapter(context) : UWPreferenceManager.getSelectedBibleChapterSecondary(context); BibleChapter activeChapter = BibleChapter.getModelForId(activeChapterId, session); BibleChapter changingChapter = B...
if(changingChapter != null && activeChapter != null) { Book correctChangingBook = changingChapter.getBook().getVersion().getBookForBookSlug(activeChapter.getBook().getSlug(), session);
22,215
package org.apache.cloudstack.network.lb; import java.io.IOException; import java.io.StringReader; <BUG>import java.io.UnsupportedEncodingException; import java.net.URLDecoder;</BUG> import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.KeyPair;
[DELETED]
22,216
import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.ejb.Local; import javax.inject.Inject; <BUG>import org.apache.commons.io.IOUtils; import org.apache.log4j.Logger; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.boun...
[DELETED]
22,217
@DB @Override @ActionEvent(eventType = EventTypes.EVENT_LB_CERT_UPLOAD, eventDescription = "Uploading a certificate to cloudstack", async = false) public SslCertResponse uploadSslCert(UploadSslCertCmd certCmd) { try { <BUG>String cert = URLDecoder.decode(certCmd.getCert(), "UTF-8"); String key = URLDecoder.decode(certC...
String cert = certCmd.getCert(); String key = certCmd.getKey(); String chain = certCmd.getChain(); validate(cert, key, password, chain);
22,218
Long accountId = CallContext.current().getCallingAccount().getId(); Long domainId = CallContext.current().getCallingAccount().getDomainId(); SslCertVO certVO = new SslCertVO(cert, key, password, chain, accountId, domainId, fingerPrint); _sslCertDao.persist(certVO); return createCertResponse(certVO, null); <BUG>} catch ...
} catch (Exception e) { throw new CloudRuntimeException("Error parsing certificate data " + e.getMessage());
22,219
public Certificate parseCertificate(String cert) { PEMReader certPem = new PEMReader(new StringReader(cert)); try { return (Certificate)certPem.readObject(); } catch (Exception e) { <BUG>throw new InvalidParameterValueException("Invalid Certificate format. Expected X509 certificate"); </BUG> } finally { IOUtils.closeQu...
throw new InvalidParameterValueException("Invalid Certificate format. Expected X509 certificate. Failed due to " + e.getMessage());
22,220
TransactionLegacy txn = TransactionLegacy.open("runUploadSslCertWithCAChain"); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); String chainFile = getClass().getResource("/certs/root_chain.crt").getFile(); Stri...
String cert = readFileToString(new File(certFile)); String key = readFileToString(new File(keyFile)); String chain = readFileToString(new File(chainFile)); CertServiceImpl certService = new CertServiceImpl();
22,221
public void runUploadSslCertSelfSignedWithPassword() throws Exception { TransactionLegacy txn = TransactionLegacy.open("runUploadSslCertSelfSignedWithPassword"); String certFile = getClass().getResource("/certs/rsa_self_signed_with_pwd.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_self_signed_wit...
String cert = readFileToString(new File(certFile)); String key = readFileToString(new File(keyFile)); CertServiceImpl certService = new CertServiceImpl();
22,222
@Test public void runUploadSslCertSelfSignedNoPassword() throws Exception { TransactionLegacy txn = TransactionLegacy.open("runUploadSslCertSelfSignedNoPassword"); String certFile = getClass().getResource("/certs/rsa_self_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_self_signed.key").getF...
public void runUploadSslCertSelfSignedWithPassword() throws Exception { TransactionLegacy txn = TransactionLegacy.open("runUploadSslCertSelfSignedWithPassword"); String certFile = getClass().getResource("/certs/rsa_self_signed_with_pwd.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_self_signed_wit...
22,223
Assume.assumeTrue(isOpenJdk() || isJCEInstalled()); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); String chainFile = getClass().getResource("/certs/rsa_self_signed.crt").getFile(); String password = "user"; ...
String cert = readFileToString(new File(certFile)); String key = readFileToString(new File(keyFile)); String chain = readFileToString(new File(chainFile)); CertServiceImpl certService = new CertServiceImpl();
22,224
Assume.assumeTrue(isOpenJdk() || isJCEInstalled()); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); String chainFile = getClass().getResource("/certs/rsa_ca_signed2.crt").getFile(); String password = "user"; <...
String chainFile = getClass().getResource("/certs/rsa_self_signed.crt").getFile(); String cert = readFileToString(new File(certFile)); String key = readFileToString(new File(keyFile)); String chain = readFileToString(new File(chainFile)); CertServiceImpl certService = new CertServiceImpl();
22,225
public void runUploadSslCertNoChain() throws IOException, IllegalAccessException, NoSuchFieldException { Assume.assumeTrue(isOpenJdk() || isJCEInstalled()); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); Stri...
String cert = readFileToString(new File(certFile)); String key = readFileToString(new File(keyFile)); CertServiceImpl certService = new CertServiceImpl();
22,226
@Test public void runUploadSslCertBadPassword() throws IOException, IllegalAccessException, NoSuchFieldException { String certFile = getClass().getResource("/certs/rsa_self_signed_with_pwd.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_self_signed_with_pwd.key").getFile(); String password = "bad_p...
public void runUploadSslCertNoChain() throws IOException, IllegalAccessException, NoSuchFieldException { Assume.assumeTrue(isOpenJdk() || isJCEInstalled()); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); Stri...
22,227
} @Test public void runUploadSslCertBadkeyPair() throws IOException, IllegalAccessException, NoSuchFieldException { String certFile = getClass().getResource("/certs/rsa_self_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_random_pkey.key").getFile(); <BUG>String cert = URLEncoder.encode(read...
public void runUploadSslCertNoChain() throws IOException, IllegalAccessException, NoSuchFieldException { Assume.assumeTrue(isOpenJdk() || isJCEInstalled()); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); Stri...
22,228
} @Test public void runUploadSslCertBadkeyAlgo() throws IOException, IllegalAccessException, NoSuchFieldException { String certFile = getClass().getResource("/certs/rsa_self_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/dsa_self_signed.key").getFile(); <BUG>String cert = URLEncoder.encode(read...
public void runUploadSslCertNoChain() throws IOException, IllegalAccessException, NoSuchFieldException { Assume.assumeTrue(isOpenJdk() || isJCEInstalled()); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); Stri...
22,229
} @Test public void runUploadSslCertExpiredCert() throws IOException, IllegalAccessException, NoSuchFieldException { String certFile = getClass().getResource("/certs/expired_cert.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_self_signed.key").getFile(); <BUG>String cert = URLEncoder.encode(readFi...
public void runUploadSslCertNoChain() throws IOException, IllegalAccessException, NoSuchFieldException { Assume.assumeTrue(isOpenJdk() || isJCEInstalled()); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); Stri...
22,230
} @Test public void runUploadSslCertNotX509() throws IOException, IllegalAccessException, NoSuchFieldException { String certFile = getClass().getResource("/certs/non_x509_pem.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_self_signed.key").getFile(); <BUG>String cert = URLEncoder.encode(readFileTo...
public void runUploadSslCertNoChain() throws IOException, IllegalAccessException, NoSuchFieldException { Assume.assumeTrue(isOpenJdk() || isJCEInstalled()); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); Stri...
22,231
} @Test public void runUploadSslCertBadFormat() throws IOException, IllegalAccessException, NoSuchFieldException { String certFile = getClass().getResource("/certs/bad_format_cert.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_self_signed.key").getFile(); <BUG>String cert = URLEncoder.encode(readF...
public void runUploadSslCertNoChain() throws IOException, IllegalAccessException, NoSuchFieldException { Assume.assumeTrue(isOpenJdk() || isJCEInstalled()); String certFile = getClass().getResource("/certs/rsa_ca_signed.crt").getFile(); String keyFile = getClass().getResource("/certs/rsa_ca_signed.key").getFile(); Stri...
22,232
connection.setRequestMethod("POST"); connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); connection.setRequestProperty("charset", "utf-8"); connection.setRequestProperty("Content-Length", <BUG>"" + Integer.toString(urlParameters.getBytes().length)); </BUG> for (String headerName : mHeade...
"" + Integer.toString(urlParameters.toString().getBytes().length));
22,233
String headerValue = mHeaders.get(headerName); connection.setRequestProperty(headerName, headerValue); } connection.setUseCaches(false); DataOutputStream wr = new DataOutputStream(connection.getOutputStream()); <BUG>wr.writeBytes(urlParameters); </BUG> wr.flush(); wr.close(); InputStream is = connection.getInputStream(...
wr.writeBytes(urlParameters.toString());
22,234
{ JavaMethod javaMethod = (JavaMethod) entity; if ( !ignoreClirr ) { if ( isNewMethodFromLastRevision( javaMethod ) ) <BUG>{ addDefaultSince( sb, indent );</BUG> } } else
DocletTag docletTag = entity.getTags()[i]; tagNames.add( docletTag.getName() ); if ( docletTag.getName().equals( RETURN_TAG ) )
22,235
package com.rackspace.papi.commons.util.io; import java.io.ByteArrayOutputStream; import java.io.IOException; <BUG>import java.io.InputStream; public class RawInputStreamReader {</BUG> private static final RawInputStreamReader INSTANCE = new RawInputStreamReader(); private static final int DEFAULT_INTERNAL_BUFFER_SIZE ...
import java.io.OutputStream; public class RawInputStreamReader {
22,236
public byte[] loadNextEntry(JarInputStream jarInputStream, DeploymentAction packingAction) throws IOException { final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream(); OutputStream outputStreamReference = byteArrayOutput; if (packingAction == DeploymentAction.UNPACK_ENTRY) { outputStreamReference = n...
[DELETED]
22,237
package com.rackspace.papi.commons.config.parser.jaxb; import com.rackspace.papi.commons.config.resource.ConfigurationResource; import com.rackspace.papi.commons.util.pooling.ResourceContext; <BUG>import com.rackspace.papi.commons.util.pooling.ResourceContextException; import javax.xml.bind.Unmarshaller;</BUG> public c...
import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller;
22,238
public class FilterContextManagerImpl implements FilterContextManager { private static final Logger LOG = LoggerFactory.getLogger(PowerFilterChainBuilder.class); private final FilterConfig filterConfig; public FilterContextManagerImpl(FilterConfig filterConfig) { this.filterConfig = filterConfig; <BUG>} public FilterCo...
@Override public FilterContext loadFilterContext(String filterName, Collection<EarClassLoaderContext> loadedApplications) throws ClassNotFoundException {
22,239
import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.os.Handler; <BUG>import android.support.v4.app.NavUtils; import android.support.v7.app.AppCompatActivity;</BUG> import android.support.v7.widget.Toolbar; import android.util.Log; import androi...
import android.support.v4.view.MenuItemCompat; import android.support.v7.app.AppCompatActivity;
22,240
import android.database.ContentObserver; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import android.os.Handler; <BUG>import android.support.v4.app.NavUtils; import android.support.v7.app.AppCompatActivity;</BUG> import android.support.v7.widget.Toolbar; import android.util.Log; imp...
import android.support.v4.view.MenuItemCompat; import android.support.v7.app.AppCompatActivity;
22,241
import android.os.Handler; import android.os.Looper; import android.os.PowerManager; import android.os.PowerManager.WakeLock; import android.preference.PreferenceManager; <BUG>import android.support.design.widget.FloatingActionButton; import android.support.v7.widget.Toolbar;</BUG> import android.util.Log; import andro...
import android.support.v4.view.MenuItemCompat; import android.support.v7.widget.Toolbar;
22,242
mAltitude.setOnCheckedChangeListener(mCheckedChangeListener); mDistance.setOnCheckedChangeListener(mCheckedChangeListener); mCompass.setOnCheckedChangeListener(mCheckedChangeListener); mLocation.setOnCheckedChangeListener(mCheckedChangeListener); builder.setTitle(R.string.dialog_layer_title).setIcon(android.R.drawable....
(android.R.string.ok, null).setView(view);
22,243
public static final String DEVICEPOLICYMANAGERSERVICE = (LOLLIPOP_NEWER) ? "com.android.server.devicepolicy.DevicePolicyManagerService" : "com.android.server.DevicePolicyManagerService"; public static final String INSTALLAPPPROGRESS = "com.android.packageinstaller.InstallAppProgress"; public static final String INSTALL...
public static final String OPENSSLSIGNATURE = "com.android.org.conscrypt.OpenSSLSignature"; public static final String PACKAGEINSTALLERACTIVITY = "com.android.packageinstaller.PackageInstallerActivity";
22,244
package com.projecttango.examples.java.augmentedreality; import com.google.atap.tangoservice.Tango; import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoCameraIntrinsics; import com.google.atap.tangoservice.TangoConfig; <BUG>import com.google.atap.tangoservice.TangoC...
import com.google.atap.tangoservice.TangoErrorException; import com.google.atap.tangoservice.TangoEvent;
22,245
super.onResume(); if (!mIsConnected) { mTango = new Tango(AugmentedRealityActivity.this, new Runnable() { @Override public void run() { <BUG>try { connectTango();</BUG> setupRenderer(); mIsConnected = true; } catch (TangoOutOfDateException e) {
TangoSupport.initialize(); connectTango();
22,246
if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) { mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics); mCameraPoseTimestamp = lastFramePose.timestamp;</BUG> } else { <BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread); }</BUG> } } } @Override
mRenderer.updateRenderCameraPose(lastFramePose); mCameraPoseTimestamp = lastFramePose.timestamp; Log.w(TAG, "Can't get device pose at time: " +
22,247
import org.rajawali3d.materials.Material; import org.rajawali3d.materials.methods.DiffuseMethod; import org.rajawali3d.materials.textures.ATexture; import org.rajawali3d.materials.textures.StreamingTexture; import org.rajawali3d.materials.textures.Texture; <BUG>import org.rajawali3d.math.Matrix4; import org.rajawali3d....
import org.rajawali3d.math.Quaternion; import org.rajawali3d.math.vector.Vector3;
22,248
translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE); translationMoon.setTransformable3D(moon); getCurrentScene().registerAnimation(translationMoon); translationMoon.play(); } <BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) { Pose cameraPose = ScenePoseCalculator.t...
public void updateRenderCameraPose(TangoPoseData cameraPose) { float[] rotation = cameraPose.getRotationAsFloats(); float[] translation = cameraPose.getTranslationAsFloats(); Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]); getCurrentCamera().setRotation(quaternion.conjugate()...
22,249
package com.projecttango.examples.java.helloareadescription; import com.google.atap.tangoservice.Tango; <BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoConfig;</BUG> import com.google.atap.tangoservice.TangoCoordinateFramePair; import com.google.atap.tangos...
import com.google.atap.tangoservice.TangoAreaDescriptionMetaData; import com.google.atap.tangoservice.TangoConfig;
22,250
Bundle bundle = intent.getBundleExtra(Consts.EXTRA_BUNDLE); if (bundle == null) return; String pkg1 = bundle.getString(ShortcutActivity.INTENT_EXTRA_PACKAGE_1); String pkg2 = bundle.getString(ShortcutActivity.INTENT_EXTRA_PACKAGE_2); <BUG>if (pkg1 == null || pkg2 == null || pkg1.isEmpty() || pkg2.isEmpty()) return; el...
if (pkg1 == null || pkg2 == null || pkg1.isEmpty() || pkg2.isEmpty()) { Intent intent1 = bundle.getParcelable(ShortcutActivity.INTENT_EXTRA_1); Intent intent2 = bundle.getParcelable(ShortcutActivity.INTENT_EXTRA_2); if (intent1 == null || intent2 == null) context.startActivity(ShortcutActivity.createShortcutIntent(cont...
22,251
protected void onResume() { if (!isInMultiWindowMode()) startService(new Intent(this, SplitScreenService.class)); super.onResume(); } <BUG>public void thunderbirdsAreGo() { Intent primaryIntent = getPackageManager().getLaunchIntentForPackage(getIntent(). getStringExtra(INTENT_EXTRA_PACKAGE_1));</BUG> primaryIntent.add...
Intent primaryIntent; Intent secondaryIntent; String pkg1 = getIntent().getStringExtra(INTENT_EXTRA_PACKAGE_1); String pkg2 = getIntent().getStringExtra(INTENT_EXTRA_PACKAGE_1); if (pkg1 == null || pkg2 == null || pkg1.isEmpty() || pkg2.isEmpty()) { primaryIntent = getPackageManager().getLaunchIntentForPackage(pkg1);
22,252
import com.liferay.portal.security.permission.PermissionThreadLocal; import com.liferay.portal.security.permission.ResourceActionsUtil; import com.liferay.portal.service.base.ResourcePermissionLocalServiceBaseImpl; import com.liferay.portal.util.PortalUtil; import com.liferay.portal.util.PropsValues; <BUG>import com.li...
import com.liferay.util.dao.orm.CustomSQLUtil; import java.util.ArrayList;
22,253
import static javafx.scene.layout.AnchorPane.setTopAnchor; @ArtifactProviderFor(GriffonView.class) public class Tab1View extends AbstractJavaFXGriffonView { @MVCMember @Nonnull private SampleController controller; @MVCMember @Nonnull private SampleModel model; <BUG>@MVCMember @Nonnull private AppView parentView; @Overr...
private StringProperty uiInput; private StringProperty uiOutput; @Override
22,254
input.setPrefWidth(200.0); Button button = new Button(); button.setPrefWidth(200.0); JavaFXUtils.configure(button, (JavaFXAction) actionFor(controller, "sayHello").getToolkitAction()); Label output = new Label(); <BUG>label.setPrefWidth(360.0); model.inputProperty().bindBidirectional(input.textProperty()); model.outpu...
uiInput = BindingUtils.uiThreadAwareStringProperty(input.textProperty()); uiOutput = BindingUtils.uiThreadAwareStringProperty(output.textProperty()); model.inputProperty().bindBidirectional(uiInput); model.outputProperty().bindBidirectional(uiOutput);
22,255
setLeftAnchor(button, 172.0); setTopAnchor(button, 45.0); setLeftAnchor(output, 14.0); setTopAnchor(output, 80.0); Tab tab = new Tab("Java"); <BUG>tab.setGraphic(new FontAwesomeIcon(FontAwesome.FA_COFFEE)); tab.setClosable(false);</BUG> tab.setContent(anchorPane); parentView.getTabPane().getTabs().add(tab); }
tab.setGraphic(new FontIcon(FontAwesome.COFFEE)); tab.setClosable(false);
22,256
package org.example; import griffon.core.artifact.GriffonView; <BUG>import griffon.javafx.support.fontawesome.FontAwesomeIcon; import griffon.inject.MVCMember; import griffon.metadata.ArtifactProviderFor; import griffon.plugins.fontawesome.FontAwesome; import javafx.fxml.FXML;</BUG> import javafx.scene.Node;
import griffon.javafx.support.BindingUtils; import javafx.beans.property.StringProperty; import javafx.fxml.FXML;
22,257
import org.springframework.statemachine.config.StateMachineConfig; import org.springframework.statemachine.config.StateMachineConfigurerAdapter; import org.springframework.statemachine.config.builders.StateMachineConfigBuilder; import org.springframework.statemachine.config.builders.StateMachineConfigurer; import org.s...
import org.springframework.statemachine.config.model.ConfigurationData;
22,258
import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; <BUG>import org.springframework...
import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotationAttributes;
22,259
import org.springframework.statemachine.config.StateMachineConfig; import org.springframework.statemachine.config.StateMachineConfigurerAdapter; import org.springframework.statemachine.config.StateMachineFactory; import org.springframework.statemachine.config.builders.StateMachineConfigBuilder; import org.springframewo...
import org.springframework.statemachine.config.model.ConfigurationData;
22,260
public class StateMachineFactoryConfiguration<S, E> extends AbstractImportingAnnotationConfiguration<StateMachineConfigBuilder<S, E>, StateMachineConfig<S, E>> { private final StateMachineConfigBuilder<S, E> builder = new StateMachineConfigBuilder<S, E>(); @Override protected BeanDefinition buildBeanDefinition(Annotati...
String enableStateMachineEnclosingClassName = importingClassMetadata.getClassName(); Class<?> enableStateMachineEnclosingClass = ClassUtils.forName(enableStateMachineEnclosingClassName, ClassUtils.getDefaultClassLoader()); BeanDefinitionBuilder beanDefinitionBuilder = BeanDefinitionBuilder
22,261
import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.google.common.collect.Ordering; import java.util.List; <BUG>import eu.davidea.flexibleadapter.FlexibleAdapter; import java8.util.stream.StreamSupport;</BUG> import pl.librus.client.R; import pl.librus.client.api.Read...
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers; import java8.util.stream.StreamSupport;
22,262
import pl.librus.client.datamodel.Announcement; import pl.librus.client.ui.MainActivity; import pl.librus.client.ui.MainApplication; import pl.librus.client.ui.MainFragment; import static java8.util.stream.Collectors.toList; <BUG>public class AnnouncementsFragment extends MainFragment { public AnnouncementsFragment() {...
private View root; public AnnouncementsFragment() {
22,263
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { announcement = (Announcement) getArguments().getSerializable(ARG_ANNOUNCEMENT); author = MainApplication.getData() <BUG>.findByKey(Teacher.class, announcement.addedBy()); }</BUG> } @Override public View o...
.findByKey(Teacher.class, announcement.addedBy()) .blockingGet();
22,264
import android.content.ComponentName; import android.content.Intent; import android.os.Bundle; import com.google.android.gms.gcm.GcmListenerService; import com.google.firebase.analytics.FirebaseAnalytics; <BUG>import java.util.List; import io.requery.Persistable; import java8.util.concurrent.CompletableFuture;</BUG> im...
import io.reactivex.Flowable; import io.reactivex.Single;
22,265
import static pl.librus.client.sql.EntityChange.Type.ADDED; public class LibrusGcmListenerService extends GcmListenerService { private UpdateHelper updateHelper; private Consumer<String> firebaseLogger; private NotificationService notificationService; <BUG>private CompletableFuture<?> reloads; </BUG> @Override public C...
private Flowable<?> reloads;
22,266
import com.google.common.collect.Lists; import org.joda.time.DateTimeConstants; import org.joda.time.LocalDate; import org.joda.time.LocalTime; import java.util.ArrayList; <BUG>import java.util.List; import io.requery.Persistable;</BUG> import java8.util.concurrent.CompletableFuture; import java8.util.stream.StreamSupp...
import io.reactivex.Single; import io.requery.Persistable;
22,267
public class APIClient implements IAPIClient { private final MockEntityRepository repository = new MockEntityRepository(); private final EntityMocks templates = new EntityMocks(); public APIClient(Context _context) { } <BUG>public CompletableFuture<Void> login(String username, String password) { return CompletableFutu...
public Single<String> login(String username, String password) { return Single.just(username); public Single<Timetable> getTimetable(LocalDate weekStart) {
22,268
)); result.get(weekStart.plusDays(1)).add(newArrayList( withLessonNumber(substitutionLesson(), 7) )); result.get(weekStart.plusDays(2)).remove(2); <BUG>return CompletableFuture.completedFuture(result); }</BUG> private ImmutableJsonLesson withLessonNumber(ImmutableJsonLesson lesson, int lessonNo) { List<PlainLesson> pla...
return Single.just(result); }
22,269
</BUG> EntityInfo info = EntityInfos.infoFor(clazz); if (info.single()) { return getObject(info.endpoint(), info.topLevelName(), clazz) <BUG>.thenApply(Lists::newArrayList); </BUG> } else { return getList(info.endpoint(), info.topLevelName(), clazz); } }
.withSubstitutionNote("Zabrakło śledzi") .withOrgTeacher(repository.getList(Teacher.class).get(3).id()) .withOrgSubject(repository.getList(Subject.class).get(3).id()) .withOrgDate(LocalDate.parse("2017-01-01")); public <T extends Persistable> Single<List<T>> getAll(Class<T> clazz) { .map(Lists::newArrayList);
22,270
public Optional<String> getLogin() { return login; } public void setLogin(Optional<String> login) { this.login = login; <BUG>} public Optional<Integer> getRole() { return role; } public void setRole(Optional<Integer> role) { this.role = role;</BUG> }
[DELETED]
22,271
return data; } public void setData(Optional<JsonStringWrapper> data) { this.data = data; } <BUG>public UserRole getRoleEnum() { if(role != null) { return role.map(UserRole::getValueForIndex).orElse(null); } return null; }</BUG> public UserStatus getStatusEnum() {
[DELETED]
22,272
} if (data != null) { result.setData(data.orElse(null)); } result.setStatus(getStatusEnum()); <BUG>result.setRole(getRoleEnum());</BUG> return result; } }
public Optional<String> getGithubLogin() { return githubLogin;
22,273
public boolean hasAccessToNetwork(long networkId) { return allNetworksAvailable || networkIds.contains(networkId); } public boolean hasAccessToDevice(String deviceGuid) { return allDevicesAvailable || deviceGuids.contains(deviceGuid); <BUG>} @Override</BUG> public String getName() { if (user != null) { return user.getL...
public boolean hasFullAccess() { return (allDevicesAvailable && allDevicesAvailable && actions.equals(AvailableActions.getAllHiveActions())); @Override
22,274
@Override public Response handle(Request request) { final ListUserRequest req = (ListUserRequest) request.getBody(); final List<UserVO> users = userDao.list(req.getLogin(), req.getLoginPattern(), <BUG>req.getRole(), req.getStatus(), req.getSortField(), req.getSortOrderAsc(),</BUG> req.getTake(), req.getSkip()); return ...
req.getSortField(), req.getSortOrderAsc(),
22,275
vo.setLogin(dc.getLogin()); vo.setLoginAttempts(dc.getLoginAttempts()); vo.setNetworks(new HashSet<>()); vo.setPasswordHash(dc.getPasswordHash()); vo.setPasswordSalt(dc.getPasswordSalt()); <BUG>vo.setRole(dc.getRole());</BUG> vo.setStatus(dc.getStatus()); } return vo; } }
[DELETED]
22,276
.disableHtmlEscaping() .serializeNulls() .registerTypeAdapterFactory(new OptionalAdapterFactory()) .registerTypeAdapterFactory(new JsonStringWrapperAdapterFactory()) .registerTypeAdapter(Date.class, new TimestampAdapter()) <BUG>.registerTypeAdapter(UserRole.class, new UserRoleAdapter())</BUG> .registerTypeAdapter(UserS...
[DELETED]
22,277
@JsonPolicyDef({USER_PUBLISHED, USERS_LISTED}) private String login; private String passwordHash; private String passwordSalt; private Integer loginAttempts; <BUG>@SerializedName("role") @JsonPolicyDef({USER_PUBLISHED, USERS_LISTED}) private UserRole role;</BUG> @SerializedName("status") @JsonPolicyDef({USER_PUBLISHED,...
[DELETED]
22,278
public String getLogin() { return login; } public void setLogin(String login) { this.login = login; <BUG>} public UserRole getRole() { return role; } public void setRole(UserRole role) { this.role = role;</BUG> }
[DELETED]
22,279
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.Progressable; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AFileSystem extends FileSyste...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
22,280
public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); uri = URI.create(name.getScheme() + "://" + name.getAuthority()); workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri, this.getWorkingDirectory()); <BUG>String accessKey = conf.get(...
String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null)); String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
22,281
} else { accessKey = userInfo; } } AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain( <BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey), new InstanceProfileCredentialsProvider(), new S3AAnonymousAWSCredentialsProvider() );</BUG> bucket = name.getHost();
new BasicAWSCredentialsProvider(accessKey, secretKey), new AnonymousAWSCredentialsProvider()
22,282
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)); </BUG> s3 = new AmazonS3Client(credentials, awsConf); <BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS); partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THR...
new InstanceProfileCredentialsProvider(), new AnonymousAWSCredentialsProvider() bucket = name.getHost(); ClientConfiguration awsConf = new ClientConfiguration(); awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS))); awsConf.setProtocol(conf.g...
22,283
cannedACL = null; } if (!s3.doesBucketExist(bucket)) { throw new IOException("Bucket " + bucket + " does not exist"); } <BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART); long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_...
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART)); long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART...
22,284
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AOutputStream extends OutputStream {</BUG> private OutputStream backupStream; private File backup...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
22,285
this.client = client; this.progress = progress; this.fs = fs; this.cannedACL = cannedACL; this.statistics = statistics; <BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (conf.get(BUFFER_DIR, null) ...
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
22,286
e.printStackTrace(); } filePlayback=null; } @Override <BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); } void initFiles() throws FileNotFoundException {</BUG> if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if needed String samples_str = dataDir ...
@Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; } void initFiles() throws FileNotFoundException {
22,287
public class BufferMonitor extends Thread implements FieldtripBufferMonitor { public static final String TAG = BufferMonitor.class.toString(); private final Context context; private final SparseArray<BufferConnectionInfo> clients = new SparseArray<BufferConnectionInfo>(); private final BufferInfo info; <BUG>private fin...
[DELETED]
22,288
public static final String CLIENT_INFO_TIME = "c_time"; public static final String CLIENT_INFO_WAITTIMEOUT = "c_waitTimeout"; public static final String CLIENT_INFO_CONNECTED = "c_connected"; public static final String CLIENT_INFO_CHANGED = "c_changed"; public static final String CLIENT_INFO_DIFF = "c_diff"; <BUG>publi...
public static final int THREAD_INFO_TYPE = 0;
22,289
package nl.dcc.buffer_bci.bufferclientsservice; import android.os.Parcel; import android.os.Parcelable; <BUG>import nl.dcc.buffer_bci.bufferservicecontroller.C; public class ThreadInfo implements Parcelable {</BUG> public static final Creator<ThreadInfo> CREATOR = new Creator<ThreadInfo>() { @Override public ThreadInfo...
import nl.dcc.buffer_bci.C; public class ThreadInfo implements Parcelable {
22,290
Assert.assertNotNull(namespace); Assert.assertEquals(ID, namespace.get(ID_FIELD).getAsString()); Assert.assertEquals(DISPLAY_NAME, namespace.get(DISPLAY_NAME_FIELD).getAsString()); Assert.assertEquals(DESCRIPTION, namespace.get(DESCRIPTION_FIELD).getAsString()); response = createNamespace(METADATA_EMPTY_DISPLAY_NAME, I...
assertResponseCode(200, response);
22,291
package com.intellij.codeInsight; import com.intellij.JavaTestUtil; import com.intellij.openapi.actionSystem.IdeActions; import com.intellij.openapi.roots.LanguageLevelProjectExtension; import com.intellij.pom.java.LanguageLevel; <BUG>import com.intellij.psi.JavaPsiFacade; import com.intellij.psi.codeStyle.CodeStyleSet...
import com.intellij.psi.codeStyle.CodeStyleManager; import com.intellij.psi.codeStyle.CodeStyleSettings;
22,292
public void testIDEADEV13019() throws Exception { doTestBracesNextLineStyle(); } public void testIDEA25139() throws Exception { doTestBracesNextLineStyle(); <BUG>} private void doTestBracesNextLineStyle() throws Exception {</BUG> CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject()); settings....
public void testBeforeIfRBrace() throws Exception { CodeStyleSettingsManager.getSettings(getProject()).KEEP_SIMPLE_BLOCKS_IN_ONE_LINE = true; doTest(); private void doTestBracesNextLineStyle() throws Exception {
22,293
mafv = Double.valueOf(flds[logMafvColIdx]); if ((time - prevTime) == 0) dVdt = 100.0; else dVdt = Math.abs(((mafv - pmafv) / (time - prevTime)) * 1000.0); <BUG>clol = Integer.valueOf(flds[logClOlStatusColIdx]); </BUG> if (clol == clValue) { afr = Double.valueOf(flds[logAfrColIdx]); load = Double.valueOf(flds[logLoadCol...
clol = (int)Utils.parseValue(flds[logClOlStatusColIdx]);
22,294
afr = (isOl ? Double.valueOf(afrflds[logWbAfrColIdx]) : Double.valueOf(afrflds[logStockAfrColIdx])); rpm = Double.valueOf(flds[logRpmColIdx]); ffb = Double.valueOf(flds[logFfbColIdx]); iat = Double.valueOf(flds[logIatColIdx]); if (clValue != -1) <BUG>clol = Integer.valueOf(flds[logClOlStatusColIdx]); </BUG> boolean fla...
clol = (int)Utils.parseValue(flds[logClOlStatusColIdx]);
22,295
Utils.removeRow(row--, logDataTable); removed = true; } else if (row <= 2 || Math.abs(ppThrottle - throttle) <= thrtlMaxChange2) { trims = Double.valueOf(flds[logAfLearningColIdx]) + Double.valueOf(flds[logAfCorrectionColIdx]); <BUG>if (clValue == Double.valueOf(flds[logClOlStatusColIdx])) { </BUG> afr = Double.valueOf...
if (clValue == (int)Utils.parseValue(flds[logClOlStatusColIdx])) {
22,296
import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import org.apache.log4j.Logger; public class MafScaling { private static final Logger logger = Logger.getLogger(MafScaling.class); <BUG>private static final String Title = "MAF Scaling - v2.2.6"; </BUG> private static final String OLTabNa...
private static final String Title = "MAF Scaling - v2.2.7";
22,297
addLabel(filtersPanel, ++filtrow, olClTransitionSkipRowsLabelText); olClTransitionSkipRowsField = addTextFilter(filtrow, intFmt); addDefaultButton(filtrow, "olcltransit"); } protected void addCLOLStatusFilter() { <BUG>addNote(filtersPanel, ++filtrow, 3, "Filter out data using logged OL/CL status (EcuTek CL: 2, OL: 4, O...
addNote(filtersPanel, ++filtrow, 3, "Filter out data using logged OL/CL status (EcuTek CL: 2, OL: 4, OP2/RR CL: 8, OL: 7, Cobb CL: 0, OL: 1)");
22,298
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
22,299
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
22,300
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);