diff stringlengths 38 1.78k | msg_token stringlengths 9 190 |
|---|---|
<nb> public class WelcomeActivity extends ThemeableActivity implements ICacheWordSubs
@ override
+ protected void onDestroy ( ) {
+ super . onDestroy ( ) ;
+
+ if ( mCacheWord != null )
+ mCacheWord . disconnect ( ) ;
+ }
+
+ @ override
protected void onResume ( ) {
super . onResume ( ) ; | make sure we disconnected cacheword when welcomeactivity is destroyed |
<nb> public class JUnit3IdeaTestRunner extends TestRunner implements IdeaTestRunner {
myListeners = listeners ;
try {
Test suite = TestRunnerUtil . getTestSuite ( this , args ) ;
+ if ( suite == null ) return - NUMBER0 ;
TestResult result = doRun ( suite ) ;
if ( ! result . wasSuccessful ( ) ) {
return - ... | suppress runners NPE |
<nb> public class TipUIUtil {
private static void updateImages ( StringBuffer text , Class providerClass ) {
final boolean dark = UIUtil . isUnderDarcula ( ) ;
final boolean retina = UIUtil . isRetina ( ) ;
- if ( ! dark && ! retina ) {
- return ;
- }
+ SINGLE
+ SINGLE
+ SINGLE
String suffix = STR... | Some html contains wrong width and height for images |
<nb> public class RajawaliActivity extends Activity {
protected boolean mMultisamplingEnabled = false ;
protected boolean mUsesCoverageAa ;
private RajawaliRenderer mRajRenderer ;
+ protected boolean checkOpenGLVersion = true ;
@ override
public void onCreate ( Bundle savedInstanceState ) {
<nb> public ... | Made OpenGL ES version checking optional |
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class WeakCacheTest {
SINGLE
break ;
}
+ if ( ( i + NUMBER0 ) % NUMBER1 == NUMBER2 ) {
+ SINGLE
+ System . gc ( ) ;
+ }
}
assertTrue ( cache . getSize ( ) < N ) ;
} | Invoking GC to prevent WeakCacheTest shouldDemonstrateObjectsBeingCollectedAsNeeded from failing when there is a lot of free memory available |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> import NAMESPACE ;
)
public class ShortcutPromoterManager implements ApplicationComponent , AnActionListener , ExportableApplicationComponent ,
PersistentStateComponent < Elem... | ShortcutPromoterManager must not save defaults and use ordered map |
<nb> import NAMESPACE ;
import NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public class CycleDetection {
private static Set < Graph . Vertex < Integer > > visitedVerticies = new HashSet < Graph . Vertex < Integer > > ( ) ; | Added a header to the cycle detection class |
<nb> public class UIWebServer {
COMMENT
public UIWebServer ( String serverName , InetSocketAddress address , MasterInfo masterInfo ,
TachyonConf conf ) {
+ Preconditions . checkNotNull ( serverName , STRING0 ) ;
+ Preconditions . checkNotNull ( address , STRING1 ) ;
+ Preconditions . checkNotNull ( masterIn... | Add additional preconditions to UIWebServer |
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class LogInterceptor extends CommandInterceptor {
private static Logger log = Logger . getLogger ( LogInterceptor . class . getName ( ) ) ;
public < T > T execute ( Command < T > command ) {
+ if ( ! ... | added guard to log interceptor to speed up runtime when log level is FINE |
<nb> public class TextView extends View implements ViewTreeObserver . OnPreDrawListener
return ;
}
}
-
+
SINGLE
SINGLE
SINGLE
<nb> public class TextView extends View implements ViewTreeObserver . OnPreDrawListener
if ( imm != null && imm . isActive ( this ) ) {
imm . hideSoftInputFromWindow ( getW... | TextViews keep focus after Done |
<nb> public class EnglishGrammaticalStructureTest extends TestCase {
STRING0 ,
STRING1 ,
STRING2 ,
+ STRING3 ,
+ SINGLE
+ SINGLE
+ SINGLE
+ STRING4 ,
SINGLE
SINGLE
<nb> public class EnglishGrammaticalStructureTest extends TestCase {
STRING5 +
STRING6 ,
+ STRING7 +
+ STRING8 +
+ STRIN... | Add a test for Davi McClosky s tree |
<nb> public class Tool {
public static Option [ ] optionDefs = {
new Option ( STRING0 , STRING1 , OptionArgType . STRING , STRING2 ) ,
- new Option ( STRING3 , STRING4 , OptionArgType . STRING , STRING5 ) ,
+ new Option ( STRING3 , STRING4 , OptionArgType . STRING , STRING6 ) ,
new Option ( STRING7 , STRING... | fix help msg slightly |
<nb> public abstract class BetterHttpRequest {
protected BetterHttpResponse handleResponse ( HttpResponse response ) throws IOException {
int status = response . getStatusLine ( ) . getStatusCode ( ) ;
- if ( expectedStatusCodes != null && ! expectedStatusCodes . contains ( status ) ) {
+ if ( expectedStatusC... | Added check for empty expectedStatusCodes in handleResponse to accept any response codes by default |
<nb> public class GeneratePredictions2 extends Request2 {
@ api ( help = STRING0 , required = true , filter = Default . class )
Model model ;
-
- @ api ( help = STRING1 , required = true , filter = Default . class )
- Frame data ;
+
+ @ api ( help = STRING1 , required = true , filter = dataFilter . clas... | GeneratePredictions2 now uses a FrameKey for the data set to predict on |
<nb> public final class SerDeUtils
{
BinaryDecoder dec = DIRECT_DECODERS . createBinaryDecoder ( ByteBufferUtil . getArray ( bytes ) , null ) ;
SpecificDatumReader < T > reader = new SpecificDatumReader < T > ( writer ) ;
- reader . setExpected ( ob . getSchema ( ) ) ;
+ SINGLE
+ reader . setExpected ( writ... | use the writer schema and not the current schema when deserializing |
<nb> public class HighlightPhase implements SearchHitPhase {
for ( SearchContextHighlight . Field field : context . highlight ( ) . fields ( ) ) {
FieldMapper mapper = documentMapper . mappers ( ) . smartNameFieldMapper ( field . field ( ) ) ;
if ( mapper == null ) {
- throw new SearchException ( context . shar... | Don t fail search if highlight field is missing for a specific type |
<nb> public final class ContactsContract {
public static final String CONTENT_ITEM_TYPE = STRING0 ;
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- public static final String DELAY_STARRED_UPDATE = STRING1 ;
-
- COMMENT
- CO... | Remove query parameters for delaying group updates |
<nb> public enum ShardRoutingState {
case NUMBER0 :
return RELOCATING ;
default :
- throw new ElasticSearchIllegalStateException ( STRING0 + value + STRING1 ) ;
+ throw new ElasticSearchIllegalStateException ( STRING2 + value + STRING1 ) ;
}
}
} | Fix exception message |
<nb> public final class MetadataUtil
if ( value == null ) {
throw new NullPointerException ( format ( STRING0 , name ) ) ;
}
- checkArgument ( value . equals ( value . toLowerCase ( ENGLISH ) ) , STRING1 , name ) ;
+ checkArgument ( value . equals ( value . toLowerCase ( ENGLISH ) ) , STRING2 , name , value )... | Improve debug error message |
<nb> public interface Configuration {
COMMENT
COMMENT
COMMENT
- Set < EntityStateListener > getEntityStateListener ( ) ;
+ Set < EntityStateListener > getEntityStateListeners ( ) ;
COMMENT
COMMENT
<nb> public class EntityDataStore < T > implements BlockingEntityStore < T > {
entityListeners . add ( ... | Fix getEntityStateListeners name |
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
protected final String contentType ;
protected final long contentLength ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public abstract InputStream getContent ( ) ... | Add comment for ParseHttpBody |
<nb> public class WordPressDB {
public static final String COLUMN_NAME_VIDEO_PRESS_SHORTCODE = STRING0 ;
public static final String COLUMN_NAME_UPLOAD_STATE = STRING1 ;
- private static final int DATABASE_VERSION = NUMBER0 ;
+ private static final int DATABASE_VERSION = NUMBER1 ;
private static final Stri... | Upgrade DB version number and drop Simperium DB on upgrading |
<nb> public class JSType {
}
public JSType substituteGenerics ( Map < String , JSType > concreteTypes ) {
- if ( isTop ( ) || isUnknown ( ) ) {
+ if ( isTop ( ) || isUnknown ( )
+ || objs == null && typeVar == null ) {
return this ;
}
ImmutableSet < ObjectType > newObjs = null ; | NEW TYPE INFERENCE Allocate fewer types in JSType substituteGenerics |
<nb> public class MemoryTest extends TestCase {
private static Object staticObjectField ;
+ private static class ConstructionException extends RuntimeException { }
+
private static class ConstructorThrowsType {
static int dealloced = NUMBER0 ;
ConstructorThrowsType ( ) {
- throw new RuntimeExcepti... | Fixes catch clauses so that they don t also catch assertions thrown by fail |
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> final class SecurityUtils {
}
} ) ;
} catch ( PrivilegedActionException pae ) {
- Throwable th = pae . getCause ( ) ;
- if ( th instanceof Error ) {
- throw ( Error ) th ;
- }
- if... | Fix exc handling |
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
+ @ ignore
@ elasticsearchintegrationtest.clusterscope ( scope = ElasticsearchIntegrationTest . Scope . TEST , ... | Temporarily ignore RoutingBackwardCompatibilityUponUpgradeTests |
<nb> abstract public class GraphView extends LinearLayout {
paint . setColor ( graphViewStyle . getHorizontalLabelsColor ( ) ) ;
if ( horLabelsToShow > NUMBER0 && ( hors / horLabelsToShow ) > NUMBER0 ) {
- if ( i % ( hors / horLabelsToShow ) == NUMBER0 )
+ if ( i % ( hors / horLabelsToShow ) == NUMBER1 )
ca... | Add a method that returns the bar chart canvas left offset in px |
<nb> public class ServerAdministrationTest {
COMMENT
COMMENT
@ test
- public void api_ws_shortcut ( ) throws Exception {
+ public void api_ws_shortcut ( ) throws IOException {
HttpClient httpclient = new DefaultHttpClient ( ) ;
try {
HttpGet get = new HttpGet ( orchestrator . getServer ( ) . getUrl ( ) ... | Remove unused throw clauses |
<nb> public class XActivityRestriction extends Activity {
@ override
protected List < XApplicationInfo > doInBackground ( String . . . params ) {
- return XApplicationInfo . getXApplicationList ( XActivityRestriction . this , params [ NUMBER0 ] ) ;
+ mRestrictionName = params [ NUMBER0 ] ;
+ return XApplica... | Fix recent bug in XActivityRestriction |
<nb> public class SquidDatabaseTest extends DatabaseTestCase {
throw new RuntimeException ( e ) ;
}
}
+
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE... | Add a commented out unit test for testing a wide range of identifier characters against sqlite |
<nb> public class SimpleDiffViewer extends TwosideTextDiffViewer {
}
e . getPresentation ( ) . setIcon ( getIcon ( side ) ) ;
+ e . getPresentation ( ) . setVisible ( true ) ;
e . getPresentation ( ) . setEnabled ( isSomeChangeSelected ( side ) ) ;
} | restore action visibility |
<nb> import NAMESPACE ;
COMMENT
COMMENT
public final class DefaultJvmTestOperationDescriptor extends DefaultTestOperationDescriptor implements JvmTestOperationDescriptor {
-
private final JvmTestKind jvmTestKind ;
private final String suiteName ;
private final String className ;
private final String met... | Removed unused field |
<nb> public class GraphHopper implements GraphHopperAPI
{
ensureNotLoaded ( ) ;
this . encodingManager = em ;
+ if ( em . needsTurnCostsSupport ( ) )
+ traversalMode = TraversalMode . EDGE_BASED_2DIR ;
+
return this ;
}
<nb> public class GraphHopper implements GraphHopperAPI
SINGLE
osmReaderWayP... | change default traversal to edge traversal if encodingmanager needs turn cost support |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ; | fix compile error |
<nb> public class ConvertViolationsToIssues implements DatabaseMigration {
private static class ViolationHandler extends AbstractListHandler < Map < String , Object > > {
private static final String SQL ;
static {
- StringBuilder sb = new StringBuilder ( STRING0 +
- STRING1 +
- STRING2 +
+ StringBuilder s... | Fix line length in ConvertViolationsToIssues |
<nb> public class ConfigureKotlinLibraryNotificationProvider implements EditorNotific
VirtualFile baseDir = myProject . getBaseDir ( ) ;
if ( baseDir != null ) {
- myPathField . setText ( baseDir . getPath ( ) + File . separatorChar + STRING0 ) ;
+ myPathField . setText ( baseDir . getPath ( ) . replace ( STR... | Fixed bad path separators in Local Kotlin Runtime Path |
<nb> public class DegreeGridNEDTileSource implements NEDTileSource {
ostream . close ( ) ;
istream . close ( ) ;
} catch ( S3ServiceException e ) {
+ path . deleteOnExit ( ) ;
throw new RuntimeException ( e ) ;
} catch ( ServiceException e ) {
+ path . deleteOnExit ( ) ;
throw new RuntimeException ( e )... | delete files where downloads fail |
<nb> class ActionBarDrawerToggleHoneycomb {
}
public static Drawable getThemeUpIndicator ( Activity activity ) {
- final ActionBar actionBar = activity . getActionBar ( ) ;
- final Context context ;
- if ( actionBar != null ) {
- context = actionBar . getThemedContext ( ) ;
- } else {
- context = acti... | Fix HC support lib drawer toggle |
<nb> public class GroovyPageCompiledScriptSource implements GroovyPageScriptSource {
COMMENT
COMMENT
COMMENT
- @ override
public boolean isPublic ( ) {
return isPublic ;
}
<nb> public class GroovyPageResourceScriptSource extends ResourceScriptSource impleme
COMMENT
COMMENT
COMMENT
- @ override
... | Removing Override from interface method impl |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ConfirmUserCreationActivity extends AlertActivity
}
final String message ;
SINGLE
- boolean cantCreateUser = mUserManager . hasUserRestric... | Don t allow user creation intent to work on non admin users |
<nb> public class GlobalToolbar extends Toolbar
addLeftWidget ( deployButton ) ;
}
- SINGLE
- ProjectPopupMenu projectMenu = new ProjectPopupMenu ( sessionInfo ,
- commands_ ) ;
- addRightWidget ( projectMenu . getToolbarButton ( ) ) ;
-
SINGLE
if ( ! StringUtil . isNullOrEmpty (
sessionInfo . get... | move go to project dir button to the left of the project menu |
<nb> public class ChooseCallAccountPopupMenu
telephonyContact . getPreferredProtocolProvider ( opSetClass ) ,
telephonyContact . getPreferredProtocol ( opSetClass ) ) ;
- int providersCount = providers . size ( ) ;
-
- if ( providers == null || providersCount <= NUMBER0 )
+ if ( providers == null || provi... | Check the providers size after verifying that we actually have providers |
<nb> public class TraitASTTransformation extends AbstractASTTransformation {
}
Expression leftTransform = super . transform ( leftExpression ) ;
Expression rightTransform = super . transform ( rightExpression ) ;
- Expression ret = new BinaryExpression ( leftTransform , operation , rightTransform ) ;
+ Expres... | Fixed visit of declaration expressions in trait |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class MixinEventPlayerPlaceBlock extends MixinEventBlock impleme
@ inject ( method = STRING0 , at = @ at ( STRING1 ) )
public void onCon... | Don t create a snapshot for client side BlockEvent PlaceEvent |
<nb> public class JavaExamples_run_mission
catch ( Exception e )
{
System . err . println ( STRING0 + e . getMessage ( ) ) ;
- System . out . println ( agent_host . getUsage ( ) ) ;
+ System . err . println ( agent_host . getUsage ( ) ) ;
System . exit ( NUMBER0 ) ;
}
if ( agent_host . receivedArgument ... | Also send usage message to stderr |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class IoTDiscoveryManager extends Manager {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT... | Fix NPE in IoTDiscoveryManager |
<nb> public class SmtpTransport extends Transport
SINGLE
executeSimpleCommand ( null ) ;
- String localHost = STRING0 ;
- try
- {
- InetAddress localAddress = InetAddress . getLocalHost ( ) ;
- if ( ! localAddress . isLoopbackAddress ( ) )
- {
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- localHost ... | Use a real hostname rather than localhost localdomain |
<nb> public class LonesomeInterfaceController extends BaseController {
private ServerNodes serverNodes ;
public Result index ( ) {
- if ( ! serverNodes . isDisconnected ( ) ) {
+ if ( serverNodes . isConnected ( ) ) {
return redirect ( routes . DashboardController . index ( ) ) ;
}
return ok ( views . h... | fix disconnected check and rename the method |
<nb> public class RetransmitHandler
COMMENT
public void onNak ( final int termOffset )
{
- SINGLE
- SINGLE
- if ( retransmitActionPool . size ( ) > NUMBER0 && null == activeRetransmitByTermOffsetMap . get ( termOffset ) )
+ if ( ! retransmitActionPool . isEmpty ( ) && null == activeRetransmitByTermOffsetM... | Simplify logic to remove need for comments |
<nb> public final class LocalProperties implements Cloneable {
if ( ordering != null ) {
ArrayList < Integer > involvedIndexes = ordering . getInvolvedIndexes ( ) ;
for ( int i = NUMBER0 ; i < involvedIndexes . size ( ) ; i ++ ) {
- if ( node . isFieldKept ( input , i ) == false ) {
+ if ( node . isFieldKept ... | fixed bug in order property propagation of Pact compiler |
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ControlFlowBuilder extends GroovyRecursiveElementVisitor {
addNodeAndCheckPending ( throwInstruction ) ;
interrupt... | prevent SOE during groovy control flow building |
<nb>
package NAMESPACE ;
import static NAMESPACE ;
+ import static NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class HttpServletRequestAdapter implements Request {
@ suppres... | Tweaked some generic code to avoid mysterious host specific compile error |
<nb> public final class FileSystemMasterTest {
@ test
public void createFileWithTtlTest ( ) throws Exception {
CreateFileOptions options =
- CreateFileOptions . defaults ( ) . setBlockSizeBytes ( Constants . KB ) . setRecursive ( true ) . setTtl ( NUMBER0 ) ;
+ CreateFileOptions . defaults ( ) . setBlockSizeB... | Fix flaky test |
<nb> import NAMESPACE ;
COMMENT
COMMENT
@ gwtincompatible ( STRING0 )
- abstract class AbstractCommandLineRunner < A extends Compiler ,
+ public abstract class AbstractCommandLineRunner < A extends Compiler ,
B extends CompilerOptions > {
static final DiagnosticType OUTPUT_SAME_AS_INPUT_ERROR = Diagnostic... | Make AbstractCommandLineRunner public so it s possible |
<nb> public class Cell {
@ suppresswarnings ( STRING0 )
public static class MissingBuildFileException extends BuildTargetException {
public MissingBuildFileException ( BuildTarget buildTarget , BuckConfig buckConfig ) {
- super ( String . format ( STRING1 ,
+ super ( String . format ( STRING2 ,
buildTarget ... | Fix incorrect error message |
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
SINGLE
SINGLE
@ gwtcompatible ( emulated = true )
- @ gwtscriptonly
public final class Gwt... | Make GwtPlatform available to server side applications |
<nb> public class Picasso {
if ( response == null ) {
return null ;
}
+ result = decodeStream ( response . stream , request . bitmapOptions ) ;
} finally {
if ( response != null && response . stream != null ) {
try {
<nb> public class Picasso {
}
}
}
-
- result = decodeStream ( response . stre... | Fix stream decoding |
<nb>
COMMENT
COMMENT
COMMENT
- package NAMESPACE ;
+ package NAMESPACE ;
import NAMESPACE ; | Move TypeInformation to stratosphere core |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
<nb>
- package NAMESPACE ;
+ package NAMESPACE ;
COMMENT
... | re align resource implememantation and auth scheme to remove cycle |
<nb> public final class PrefixListTest {
@ test
public void toStringTest ( ) {
- PrefixList prefixList = new PrefixList ( STRING0 , STRING1 ) ;
+ PrefixList prefixList = new PrefixList ( null , STRING1 ) ;
+ Assert . assertEquals ( prefixList . toString ( ) , STRING0 ) ;
+
+ prefixList = new PrefixList ... | add test case when input prefixes is null |
<nb> public class CDMAPhone extends PhoneBase {
CdmaCallTracker mCT ;
CdmaSMSDispatcher mSMS ;
CdmaServiceStateTracker mSST ;
- RuimFileHandler mRuimFileHandler ;
RuimRecords mRuimRecords ;
RuimCard mRuimCard ;
ArrayList < CdmaMmiCode > mPendingMmis = new ArrayList < CdmaMmiCode > ( ) ; | Remove unused mRuimFileHandler reference from CDMAPhone |
<nb> public class ExpandHelper implements Gefingerpoken {
mResizedView = null ;
mWatchingForPull = false ;
}
- mInitialTouchY = ev . getY ( ) ;
- mInitialTouchX = ev . getX ( ) ;
+ mInitialTouchY = ev . getRawY ( ) ;
+ mInitialTouchX = ev . getRawX ( ) ;
break ;
case MotionEvent . ACTION_CANCEL :
... | Fixed a bug where expanding by touch wasn t possible |
<nb> public class ShadowActivity extends ShadowContextWrapper {
return window ;
}
+ public void setWindow ( TestWindow wind ) {
+ window = wind ;
+ }
+
@ implementation
public void runOnUiThread ( Runnable action ) {
Robolectric . getUiThreadScheduler ( ) . post ( action ) ; | Add setWindow to ShadowActivity |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class DefaultRoboModule extends AbstractModule {
mapSystemSericeClassToName . put ( SensorManager . class , Context . SENSOR_SERVIC... | Add download manager to DefaulRoboModule bindings |
<nb> public class DbOpenHelper extends SQLiteOpenHelper {
sqLiteDatabase . execSQL ( STRING0 + TAG_INDEX_NAME ) ;
onCreate ( sqLiteDatabase ) ;
}
+
+ @ override
+ public void onDowngrade ( SQLiteDatabase sqLiteDatabase , int oldVersion , int newVersion ) {
+ onUpgrade ( sqLiteDatabase , oldVersion , newVe... | On downgrade drop the tables instead of throwing an exception |
<nb> public class HistoricDetailQueryImpl extends AbstractQuery < HistoricDetailQuery ,
return this ;
}
- @ override
public HistoricDetailQuery excludeTaskDetails ( ) {
this . excludeTaskRelated = true ;
return this ; | Removed Override annotation |
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class MapConfigReadOnly extends MapConfig {
throw new UnsupportedOperationException ( STRING0 + getName ( ) ) ;
}
+ @ override
+ public MapConfig setMapEvictionPolicy ( MapEvi... | Overrides setMapEvictionPolicy for MapConfigReadOnly class |
<nb> public final class BluetoothGattServer implements BluetoothProfile {
List < BluetoothGattDescriptor > temp_descs = temp_char . getDescriptors ( ) ;
List < BluetoothGattDescriptor > svc_descs = svc_char . getDescriptors ( ) ;
for ( int j = NUMBER0 ; j < svc_descs . size ( ) ; j ++ ) {
- temp_descs . get ( i... | Fix bad index usage |
<nb> public abstract class IncrementalTestCase extends TestCase {
@ override
protected void setUp ( ) throws Exception {
- baseDir = STRING0 + File . separator + STRING1 + File . separator ;
+ baseDir = STRING2 + File . separator + STRING1 + File . separator ;
for ( int i = NUMBER0 ; ; i ++ ) {
final Fi... | Fixed incremental tests in JPS |
<nb> public class DisUnityWindow extends javax . swing . JFrame {
public void openFile ( File file ) {
try {
+ SINGLE
+ SINGLE
if ( AssetBundleUtils . isAssetBundle ( file . toPath ( ) ) ) {
ReturnType result = new DialogBuilder ( )
. question ( )
<nb> public class DisUnityWindow extends javax . swing... | Added some comments |
<nb> public class Dictionaries {
COMMENT
COMMENT
COMMENT
- SINGLE
private void loadGenderNumber ( String file , String neutralWordsFile ) {
try {
getWordsFromFile ( neutralWordsFile , neutralWords , false ) ; | Remove an obsolete comment |
<nb> public class MapEntryIterator < K , V > implements Iterator < java . util . Map . Entry < K , V
}
public K getKey ( ) {
- SINGLE
return key ;
}
public V getValue ( ) {
- SINGLE
return value ;
}
<nb> public class MapEntrySetIterator < K , V > implements Iterator < java . util . Map . Entry... | Removed TODO comments |
<nb> public class PrivacyService {
AlertDialog alertDialog = builder . create ( ) ;
alertDialog . getWindow ( ) . setType ( WindowManager . LayoutParams . TYPE_PHONE ) ;
alertDialog . getWindow ( ) . addFlags ( WindowManager . LayoutParams . FLAG_NOT_FOCUSABLE ) ;
+ alertDialog . getWindow ( ) . setSoftInputMod... | Explicitly set soft input mode for on demand dialog again |
<nb> public class Bytes extends BSON {
return NULL ;
}
- SINGLE
- SINGLE
- SINGLE
-
if ( o instanceof Integer
|| o instanceof Short
|| o instanceof Byte | Removed outdated TODO |
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public interface ExcludeRuleConverter {
- Exclude convertExcludeRule ( String configuration , org . gradle . api . artifacts . ExcludeRule excludeRule ) ;
+ Exclude convertExcludeRule ( String configuration , ExcludeRule excludeR... | Replaced qualified name with import |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class MockPsiManager extends PsiManagerEx {
}
@ override
+ public void setAssertOnFileLoadingFilter ( @ notnull VirtualFileFi... | add new method in MockPsiManager java |
<nb> public abstract class AbstractCommandViewAttribute implements CommandViewAttribu
if ( noArgsCommand == null )
{
throw new IllegalArgumentException ( STRING0 + commandName + STRING1 + commandName + STRING2 + getAcceptedParameterTypesDescription ( )
- + STRING3 + presentationModelAdapter . getClass ( ) . get... | Improved error message when a function could not be found |
<nb> final class AioServerSocketChannelConfig extends DefaultChannelConfig
}
@ override
- @ suppresswarnings ( STRING0 )
public < T > T getOption ( ChannelOption < T > option ) {
if ( option == SO_RCVBUF ) {
return ( T ) Integer . valueOf ( getReceiveBufferSize ( ) ) ; | Remove a unnecessary annotation |
<nb> public final class GsmDataConnectionTracker extends DataConnectionTracker {
apnContext . setState ( State . IDLE ) ;
apnContext . setApnSetting ( null ) ;
- mPhone . notifyDataConnection ( apnContext . getReason ( ) , apnContext . getApnType ( ) ) ;
-
SINGLE
if ( apnContext . getPendingAction ( ) == ... | Fix merge issue Set enabled state before notification is sent out |
<nb> public enum Message {
GEOCODE_TO_NOT_FOUND ( NUMBER0 ) ,
GEOCODE_FROM_TO_NOT_FOUND ( NUMBER1 ) ,
TOO_CLOSE ( NUMBER2 ) ,
+ LOCATION_NOT_ACCESSIBLE ( NUMBER3 ) ,
GEOCODE_FROM_AMBIGUOUS ( NUMBER4 ) ,
GEOCODE_TO_AMBIGUOUS ( NUMBER5 ) , | Define missing value in enum |
<nb> import NAMESPACE ;
public final class QuartzHelper {
- public static final Logger LOG = LoggerFactory . getLogger ( QuartzEndpoint . class ) ;
+ public static final Logger LOG = LoggerFactory . getLogger ( QuartzHelper . class ) ;
private QuartzHelper ( ) {
+ SINGLE
}
public static String get... | Fix logger initialization in QuartzHelper to the right class in order |
<nb> public class RenderTank extends TileEntitySpecialRenderer {
}
SINGLE
- SINGLE
- int color = liquid . getFluid ( ) . getColor ( liquid ) ;
+ int color ;
+ if ( tank . getWorldObj ( ) . isRemote ) {
+ color = tank . tank . colorRenderCache ;
+ } else {
+ color = liquid . getFluid ( ) . getColor (... | Only use the liquid s method when dealing with the server tile |
<nb> public class LoginManager {
if ( ! started ) {
FacebookException exception = new FacebookException (
- STRING0 ) ;
+ STRING1
+ + STRING2 ) ;
logCompleteLogin ( LoginClient . Result . Code . ERROR , null , exception ) ;
this . pendingLoginRequest = null ;
throw exception ; | correct the login class name in the log line |
<nb> import NAMESPACE ;
summary = STRING0 ,
explanation =
STRING1
- + STRING2
- + STRING3 ,
+ + STRING4
+ + STRING5 ,
category = JDK ,
maturity = EXPERIMENTAL ,
severity = WARNING | Add a couple of missing spaces in the ClassCanBeStatic description |
<nb> public class RFScore extends Request {
response . addProperty ( MODEL_KEY , _modelKey . originalValue ( ) ) ;
response . addProperty ( CLASS , _classCol . value ( ) ) ;
response . addProperty ( NUM_TREES , model . _totalTrees ) ;
+ response . addProperty ( OOBEE , NUMBER0 ) ;
if ( _weights . specified ( ... | Explicitly disabling oobee from RFScore page |
<nb> public class MultiValuesMap < K , V > {
}
public void remove ( K key , V value ) {
- if ( myBaseMap . get ( key ) == null ) return ;
+ if ( ! myBaseMap . containsKey ( key ) ) return ;
final Collection < V > values = myBaseMap . get ( key ) ;
values . remove ( value ) ;
if ( values . isEmpty ( ) ) ... | reverted incorrect change |
<nb> public class WelcomeFrame extends JFrame implements IdeFrame {
Disposer . dispose ( myScreen ) ;
- SINGLE
- ourInstance = null ;
+ resetInstance ( ) ;
}
private static void saveLocation ( Rectangle location ) { | set global instance to null in one place |
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
if ( myUserDa... | default disposable parent for popups to avoid assertion |
<nb> public abstract class AbstractSlideExpandableListAdapter extends WrapperListAdap
COMMENT
private ViewGroup parent ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- private int scrollAnimationDuration = NUMBER0 ;
-
-
private boolean froyoOrAbove ;
public AbstractSlideExpandableListAdapter ( List... | Reusing getAnimationDuration for animation duration |
<nb> public class WebView extends AbsoluteLayout
getContext ( ) . getSystemService ( Context . INPUT_METHOD_SERVICE ) ;
if ( isTextView ) {
+ if ( mWebTextView == null ) return ;
+
imm . showSoftInput ( mWebTextView , NUMBER0 ) ;
SINGLE
SINGLE | Add a null checking to avoid crash |
<nb> final class ObjcActionsBuilder {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
@ checkreturnvalue
- public ExtraLinkArgs prependWith ( Iterable < String > extraLinkArgs ) {
+ public ExtraLinkArgs prependedWith ( Iterable < String > extraLinkArgs ) {
return new ExtraLinkArgs ( Iterables . conc... | Fixed an inconsistency |
<nb> public class WindowManagerService extends IWindowManager . Stub
SINGLE
if ( DEBUG_WALLPAPER_LIGHT || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE ) {
Slog . v ( TAG , STRING0 + wallpaper
- + STRING1 + oldIndex + STRING2 + NUMBER0 ) ;
+ + STRING1 + oldIndex + STRING2 + foundI ) ;
}
- windows . add ( NU... | Restore wallpaper positioning between apps |
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public class ReenteringLazyValueComputationException extends RuntimeException {
<nb> public class ReenteringLazyValueComputationException extends RuntimeException {
@ notnull
@ override
public synchronized Thro... | Make ReenteringLazyValueComputationException debuggable in tests internal mode |
<nb> public interface TelephonyProperties
COMMENT
COMMENT
static final String PROPERTY_SIM_COUNT = STRING0 ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ static final String PROPERTY_DBG_IMS_VOLTE_ENABLE = STRING1 ;
+
+ static final int PROPERTY_DBG_IMS_VOLTE_ENABLE_DEAFULT ... | Added debug system property to enable disable IMS VoLTE VT |
<nb> public class MongoConstructorsTest {
}
@ test
+ @ suppresswarnings ( STRING0 )
public void shouldSaveDefaultReadPreference ( ) throws UnknownHostException {
Mongo mongo = new MongoClient ( ) ;
try {
<nb> public class MongoConstructorsTest {
}
@ test
+ @ suppresswarnings ( STRING0 )
public... | Suppress deprecation warnings in MongoConstructorsTest |
<nb> public class BootstrapAuthenticatorActivity extends ActionBarAccountAuthenticato
protected void finishLogin ( ) {
final Account account = new Account ( email , Constants . Auth . BOOTSTRAP_ACCOUNT_TYPE ) ;
+ authToken = token ;
+
if ( requestNewAccount ) {
accountManager . addAccountExplicitly ( acco... | storing up the authToken to AccountManager |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class GridCaptionPanel extends JPanel implements ComponentSelectionListen
final ArrayList < RadComponent > selection = FormEditingUtil . getSelectedCo... | tweak selected container detection in GridCaptionPanel |
<nb> public abstract class MvcFramework {
}
@ nullable
- protected GeneralCommandLine getCreationCommandLine ( Module module ) {
- String message = STRING0 + getDisplayName ( ) + STRING1 + module . getName ( ) + STRING2 ;
- final int result = Messages . showDialog ( module . getProject ( ) , message , STRIN... | grails move getCreationCommandLine down to GrailsFramework |
<nb> public class LastActivityManager extends Manager {
return lastActivityManager ;
}
- private long lastMessageSent ;
+ private volatile long lastMessageSent ;
private boolean enabled = false ;
COMMENT
<nb> public class LastActivityManager extends Manager {
COMMENT
COMMENT
private void resetId... | Use volatile instead of synchronized |
<nb>
package NAMESPACE ;
- import NAMESPACE ;
-
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
-
- import NAMESPACE ;
public class Context { | remove unused imports |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.