diff stringlengths 38 1.78k | msg_token stringlengths 9 190 |
|---|---|
<nb> public class MessageView extends K9Activity
final WebSettings webSettings = mMessageContentView . getSettings ( ) ;
webSettings . setSupportZoom ( true ) ;
- webSettings . setBuiltInZoomControls ( true ) ;
+ SINGLE
webSettings . setLayoutAlgorithm ( WebSettings . LayoutAlgorithm . NARROW_COLUMNS ) ;
mAttachments . setVisibility ( View . GONE ) ; | Disable built in zoom controls for now |
<nb> public class MyDatabase extends SQLiteAssetHelper {
SINGLE
SINGLE
SINGLE
-
- SINGLE
- SINGLE
- SINGLE
+
+ SINGLE
+ SINGLE
+
+ SINGLE
+ SINGLE
+ SINGLE
}
public Cursor getEmployees ( ) { | update example comments |
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
- COMMENT
+ COMMENT
COMMENT
- public interface GrBinaryExpression extends GroovyPsiElement {
+ public interface GrBinaryExpression extends UserDataHolderEx , Cloneable , Iconable , PsiElement , NavigationItem , GroovyPsiElement {
+ public String toString ( ) ;
} | Added binary expression interface |
<nb> public class FeedRefreshUpdater {
ApplicationSettings settings = applicationSettingsService . get ( ) ;
int threads = Math . max ( settings . getDatabaseUpdateThreads ( ) , NUMBER0 ) ;
log . info ( STRING0 , threads ) ;
- locks = Striped . lazyWeakLock ( threads ) ;
+ locks = Striped . lazyWeakLock ( threads * NUMBER1 ) ;
pool = new ThreadPoolExecutor ( threads , threads , NUMBER2 ,
TimeUnit . MILLISECONDS ,
queue = new ArrayBlockingQueue < Runnable > ( NUMBER3 * threads ) ) ; | add more locks to the pool |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
-
public class PluginsProjectConfigureActions implements ProjectConfigureAction {
private final Iterable < ProjectConfigureAction > actions ; | Removing unused import |
<nb> public class ClusterLoadBalancerStatusResource {
@ apioperation ( value = STRING0 +
STRING1 )
@ path ( STRING2 )
- public void override ( @ apiparam ( name = STRING3 , value = STRING4 , required = true )
+ public void override ( @ apiparam ( name = STRING3 , value = STRING5 , required = true )
@ pathparam ( STRING3 ) String nodeId ,
@ apiparam ( name = STRING6 ) @ pathparam ( STRING6 ) String status ) throws IOException , NodeNotFoundException {
final Node targetNode = nodeService . byNodeId ( nodeId ) ;
<nb> public class ClusterSystemShutdownResource {
@ apioperation ( value = STRING7 ,
notes = STRING8 +
STRING9 )
- public void shutdown ( @ apiparam ( name = STRING3 , value = STRING4 , required = true )
+ public void shutdown ( @ apiparam ( name = STRING3 , value = STRING10 , required = true )
@ pathparam ( STRING3 ) String nodeId ) throws IOException , NodeNotFoundException {
final Node targetNode = nodeService . byNodeId ( nodeId ) ; | Fix descriptions because cannot copy paste |
<nb> public class RecordContext {
public static final int TYPE_INCLUDE = NUMBER0 ;
public static final int TYPE_EXCLUDE = NUMBER1 ;
public static final int TYPE_IN_SCOPE = NUMBER2 ;
+ public static final int TYPE_INCLUDE_TECH = NUMBER3 ;
+ public static final int TYPE_EXCLUDE_TECH = NUMBER4 ;
public static final int TYPE_AUTH_LOGIN_URL = NUMBER5 ;
public static final int TYPE_AUTH_LOGIN_POST_DATA = NUMBER6 ; | Allow user to specify which technologies apply to a context |
<nb> import NAMESPACE ;
public class TimeBoundaryQuery extends BaseQuery < Result < TimeBoundaryResultValue > >
{
public static final Interval MY_Y2K_INTERVAL = new Interval (
- new DateTime ( Long . MIN_VALUE ) ,
- new DateTime ( Long . MAX_VALUE )
+ new DateTime ( Integer . MIN_VALUE ) ,
+ new DateTime ( Integer . MAX_VALUE )
) ;
public static final String MAX_TIME = STRING0 ;
public static final String MIN_TIME = STRING1 ; | reduce boundaries for time boundary a bit prevent bound errors |
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- COMMENT
- COMMENT
+
public class InventoryScreen extends CoreScreenLayer {
@ in
<nb> public class InventoryScreen extends CoreScreenLayer {
}
@ override
- public void onBindEvent ( BindButtonEvent event ) {
- if ( event instanceof InventoryButton && event . isDown ( ) ) {
- getManager ( ) . closeScreen ( this ) ;
- event . consume ( ) ;
- }
- }
-
- @ override
public boolean isModal ( ) {
return false ;
} | Remove seemingly unneeded method |
<nb> public class Mesh implements Disposable {
COMMENT
public BoundingBox extendBoundingBox ( final BoundingBox out , int offset , int count , final Matrix4 transform ) {
int numIndices = getNumIndices ( ) ;
- if ( offset < NUMBER0 || count < NUMBER1 || offset + count > numIndices ) throw new GdxRuntimeException ( STRING0 ) ;
+ if ( offset < NUMBER0 || count < NUMBER1 || offset + count > numIndices ) throw new GdxRuntimeException ( STRING1 + offset + STRING2 + count + STRING3 + numIndices + STRING4 ) ;
final FloatBuffer verts = vertices . getBuffer ( ) ;
final ShortBuffer index = indices . getBuffer ( ) ; | Add relevant info to the exception |
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb>
COMMENT
COMMENT
COMMENT
+
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb>
COMMENT
COMMENT
COMMENT
+
package NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
COMMENT | Organize imports in Spring MVC Test classes |
<nb> public class MapActivity extends AccessibleActivity implements IMapLocationListe
}
if ( now - lastTimeAutoZooming > NUMBER0 ) {
lastTimeAutoZooming = now ;
- mapView . setZoom ( mapView . getFloatZoom ( ) + zdelta ) ;
- SINGLE
+ float newZoom = Math . round ( ( mapView . getFloatZoom ( ) + zdelta ) * OsmandMapTileView . ZOOM_DELTA ) * OsmandMapTileView . ZOOM_DELTA_1 ;
+ mapView . setZoom ( newZoom ) ;
+ SINGLE
}
}
} | Fix zoom misalignment |
<nb> public class OsmandMapTileView implements IMapDownloaderCallback {
}
gestureDetector . onTouchEvent ( event ) ;
} else {
- gestureDetector . onTouchEvent ( MotionEvent . obtain ( SystemClock . uptimeMillis ( ) , SystemClock . uptimeMillis ( ) + NUMBER0 , MotionEvent . ACTION_CANCEL , FLOAT0 , FLOAT0 , NUMBER1 ) ) ;
+ gestureDetector . onTouchEvent ( MotionEvent . obtain ( SystemClock . uptimeMillis ( ) , SystemClock . uptimeMillis ( ) + NUMBER0 , MotionEvent . ACTION_UP , FLOAT0 , FLOAT0 , NUMBER1 ) ) ;
}
return true ;
} | try action up |
<nb> public final class StringUtils {
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class StringUtils {
}
String clean = pattern . matcher ( name ) . replaceAll ( STRING0 ) ;
clean = SPACE_PAT . matcher ( clean ) . replaceAll ( STRING1 ) ;
+ clean = org . apache . commons . lang . StringUtils . chomp ( clean , STRING2 ) ;
+ clean = org . apache . commons . lang . StringUtils . chomp ( clean , STRING0 ) ;
return clean ;
}
} | Stopped empty typeNames from appearing in output |
<nb> public final class HikariPool implements HikariPoolMBean
{
if ( debug )
{
- LOGGER . error ( STRING0 , e ) ;
+ LOGGER . error ( STRING1 , e . getMessage ( ) , e ) ;
}
else
{
- LOGGER . error ( STRING0 ) ;
+ LOGGER . error ( STRING1 , e . getMessage ( ) ) ;
}
break ;
} | Log exception message when a connection failure occurs |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class NamespaceComparator {
}
public void serialize ( @ notnull JetType type ) {
+ if ( ErrorUtils . isErrorType ( type ) ) {
+ sb . append ( type ) ;
+ return ;
+ }
serialize ( type . getConstructor ( ) . getDeclarationDescriptor ( ) ) ;
if ( ! type . getArguments ( ) . isEmpty ( ) ) {
sb . append ( STRING0 ) ; | Fix rendering of error types |
<nb> public class AsmClassGenerator extends ClassGenerator {
}
protected void createSyntheticStaticFields ( ) {
+ if ( referencedClasses . isEmpty ( ) ) {
+ return ;
+ }
MethodVisitor mv ;
for ( String staticFieldName : referencedClasses . keySet ( ) ) {
SINGLE | Do not generate class method if not necessary |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class LineageMasterTest {
long fileId = NUMBER0 ;
mLineageMaster . createLineage ( Lists . < TachyonURI > newArrayList ( ) ,
Lists . newArrayList ( new TachyonURI ( STRING0 ) ) , mJob ) ;
- mFileSystemMaster . completeFile ( fileId ) ;
- Mockito . verify ( mFileSystemMaster ) . completeFile ( fileId ) ;
+ mFileSystemMaster . completeFile ( fileId , CompleteFileOptions . defaults ( ) ) ;
+ Mockito . verify ( mFileSystemMaster ) . completeFile ( fileId , CompleteFileOptions . defaults ( ) ) ;
}
@ test | Fixing a failing test |
<nb> class SqlCipherConnection extends BaseConnection {
private final SqlCipherMetaData metaData ;
private boolean enteredTransaction ;
- public SqlCipherConnection ( SQLiteDatabase db ) {
+ SqlCipherConnection ( SQLiteDatabase db ) {
if ( db == null ) {
throw new IllegalArgumentException ( STRING0 ) ;
} | Fix visibility warning |
<nb> import NAMESPACE ;
COMMENT
public class ExecutionGraph implements ExecutionListener {
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- private static final class DeamonThreadFactory implements ThreadFactory {
- @ override
- public Thread newThread ( Runnable r ) {
- final Thread thread = new Thread ( r ) ;
- thread . setDaemon ( true ) ;
- return thread ;
- }
- }
+
COMMENT
COMMENT
<nb> public class ExecutionGraph implements ExecutionListener {
this . executorService . execute ( command ) ;
}
- }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ private static final class DeamonThreadFactory implements ThreadFactory {
+ @ override
+ public Thread newThread ( Runnable r ) {
+ final Thread thread = new Thread ( r ) ;
+ thread . setDaemon ( true ) ;
+ return thread ;
+ }
+ }
+ } | Fixed memory leak through anonymous thread factory in ExecutionGraph |
<nb> public class PaymentResource extends JaxRsResourceBase {
@ apioperation ( value = STRING0 )
@ apiresponses ( value = { @ apiresponse ( code = NUMBER0 , message = STRING1 ) } )
public Response captureAuthorizationByExternalKey ( final PaymentTransactionJson json ,
- @ pathparam ( STRING2 ) final String paymentIdStr ,
@ queryparam ( QUERY_PLUGIN_PROPERTY ) final List < String > pluginPropertiesString ,
@ headerparam ( HDR_CREATED_BY ) final String createdBy ,
@ headerparam ( HDR_REASON ) final String reason , | Remove unused paymentId in captureAuthorizationByExternalKey |
<nb> public class PartitionedVertexProgramExecutor < M > {
Preconditions . checkArgument ( vertex instanceof PreloadedVertex ,
STRING0 ) ;
PreloadedVertex v = ( PreloadedVertex ) vertex ;
- v . setAccessCheck ( PreloadedVertex . CLOSEDSTAR_CHECK ) ;
+ v . setAccessCheck ( PreloadedVertex . OPENSTAR_CHECK ) ;
v . addToQueryCache ( VertexProgramScanJob . SYSTEM_PROPS_QUERY , preloaded ) ;
VertexMemoryHandler . Partition < M > vh = new VertexMemoryHandler . Partition < M > ( vertexMemory , v ) ;
v . setPropertyMixing ( vh ) ;
<nb> public class VertexProgramScanJob < M > implements VertexScanJob {
PreloadedVertex v = ( PreloadedVertex ) vertex ;
long vertexId = v . longId ( ) ;
VertexMemoryHandler < M > vh = new VertexMemoryHandler ( vertexMemory , v ) ;
- v . setAccessCheck ( PreloadedVertex . CLOSEDSTAR_CHECK ) ;
+ v . setAccessCheck ( PreloadedVertex . OPENSTAR_CHECK ) ;
if ( idManager . isPartitionedVertex ( vertexId ) ) {
if ( idManager . isCanonicalVertexId ( vertexId ) ) {
EntryList results = v . getFromCache ( SYSTEM_PROPS_QUERY ) ; | GraphComputer requires empty result set be returned for non preloaded data instead of throwing an exception |
<nb> public class PGraphicsAndroid3D extends PGraphics {
PImage [ ] images = faceTextures [ j ] ;
if ( NUMBER0 < numMultitextures ) {
- PApplet . println ( STRING0 ) ;
for ( int t = NUMBER1 ; t < numMultitextures ; t ++ )
if ( images [ t ] != null ) {
PTexture tex = images [ t ] . getTexture ( ) ;
<nb> public class PGraphicsAndroid3D extends PGraphics {
break ;
}
} else if ( images [ NUMBER1 ] != null ) {
- PApplet . println ( STRING1 ) ;
PTexture tex = images [ NUMBER1 ] . getTexture ( ) ;
if ( tex != null ) {
gl . glEnable ( tex . getGLTarget ( ) ) ;
<nb> public class PGraphicsAndroid3D extends PGraphics {
}
if ( NUMBER1 < numTextures ) {
- PApplet . println ( STRING2 ) ;
if ( numTexBuffers < numTextures ) {
addTexBuffers ( numTextures - numTexBuffers ) ;
} | Removed debug printlns |
<nb> public class IndexedSetTest {
Assert . assertEquals ( NUMBER0 , mSet . getByField ( mLongIndex , l ) . size ( ) ) ;
}
}
+
+ @ test
+ public void addTheSameObjectMultipleTimesTest ( ) {
+ for ( int i = NUMBER1 ; i < NUMBER2 ; i ++ ) {
+ Assert . assertEquals ( NUMBER3 , mSet . size ( ) ) ;
+ Assert . assertEquals ( NUMBER2 , mSet . getByField ( mIntIndex , i ) . size ( ) ) ;
+ for ( Pair p : mSet . getByField ( mIntIndex , i ) ) {
+ mSet . add ( p ) ;
+ }
+ Assert . assertEquals ( NUMBER3 , mSet . size ( ) ) ;
+ Assert . assertEquals ( NUMBER2 , mSet . getByField ( mIntIndex , i ) . size ( ) ) ;
+ }
+ }
} | Add test for adding the same object multiple times |
<nb> public class GeoIntentActivity extends OsmandListActivity {
. replaceAll ( STRING0 , STRING1 ) ;
System . out . println ( query ) ;
SINGLE
- String [ ] s = query . substring ( query
- . indexOf ( STRING2 ) + NUMBER0 ) . split ( STRING1 ) ;
+ String [ ] s = query . split ( STRING1 ) ;
elements = new ArrayList < String > ( ) ;
for ( int i = NUMBER1 ; i < s . length ; i ++ ) { | Remove wrong substring |
<nb> public class JmsMessagingTemplate extends AbstractMessagingTemplate < Destination >
}
COMMENT
+ COMMENT
+ COMMENT
+ public JmsTemplate getJmsTemplate ( ) {
+ return jmsTemplate ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class JmsMessagingTemplateTests {
}
@ test
+ public void validateJmsTemplate ( ) {
+ assertSame ( this . jmsTemplate , messagingTemplate . getJmsTemplate ( ) ) ;
+ }
+
+ @ test
public void send ( ) {
Destination destination = new Destination ( ) { } ;
Message < String > message = createTextMessage ( ) ; | Add JmsTemplate accessor in JmsMessagingTemplate |
<nb> public class JglfwInput implements Input {
public boolean isKeyPressed ( int key ) {
if ( key == Input . Keys . ANY_KEY ) return pressedKeys > NUMBER0 ;
+ if ( key == Input . Keys . SYM ) {
+ return glfwGetKey ( app . graphics . window , getJglfwKeyCode ( GLFW_KEY_LEFT_SUPER ) )
+ || glfwGetKey ( app . graphics . window , getJglfwKeyCode ( GLFW_KEY_RIGHT_SUPER ) ) ;
+ }
return glfwGetKey ( app . graphics . window , getJglfwKeyCode ( key ) ) ;
} | Fixed right command key on Mac |
<nb>
package NAMESPACE ;
- import NAMESPACE ;
-
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public class PriorityQueue < E extends Comparable < E > > {
COMMENT
private void growToSize ( int minCapacity ) {
if ( minCapacity < NUMBER0 ) SINGLE
- throw new OutOfMemoryError ( ) ;
+ throw new GdxRuntimeException ( STRING0 ) ;
int oldCapacity = queue . length ;
SINGLE
int newCapacity = ( int ) ( ( oldCapacity < NUMBER1 ) ? ( ( oldCapacity + NUMBER2 ) * CAPACITY_RATIO_HI ) : ( oldCapacity * CAPACITY_RATIO_LOW ) ) ;
if ( newCapacity < NUMBER0 ) SINGLE
newCapacity = Integer . MAX_VALUE ;
if ( newCapacity < minCapacity ) newCapacity = minCapacity ;
- queue = Arrays . copyOf ( queue , newCapacity ) ;
+ Object [ ] newQueue = new Object [ newCapacity ] ;
+ System . arraycopy ( queue , NUMBER0 , newQueue , NUMBER0 , size ) ;
+ queue = newQueue ;
}
} | Fixed GWT compatibility |
<nb> public class OverrideResolver {
throw new AssertionError ( STRING0 + filtering ) ;
}
}
- for ( D otherD : candidates ) {
- CallableDescriptor other = transform . fun ( otherD ) ;
- if ( me . getOriginal ( ) == other . getOriginal ( )
- && OverridingUtil . DEFAULT . isOverridableBy ( other , me , null ) . getResult ( ) == OVERRIDABLE
- && OverridingUtil . DEFAULT . isOverridableBy ( me , other , null ) . getResult ( ) == OVERRIDABLE ) {
- continue outerLoop ;
- }
- }
candidates . add ( meD ) ;
}
<nb> public class OverrideResolver {
return candidates ;
}
- SINGLE
+ COMMENT
+ COMMENT
+ COMMENT
public static < D extends CallableDescriptor > boolean overrides ( @ notnull D f , @ notnull D g ) {
SINGLE
SINGLE | Remove unnecessary loop from OverrideResolver filterOverrides |
<nb> public class BaseAdapterHelper {
COMMENT
COMMENT
public BaseAdapterHelper setChecked ( int viewId , boolean checked ) {
+ View view = retrieveView ( viewId ) ;
SINGLE
if ( view instanceof CompoundButton ) {
( ( CompoundButton ) view ) . setChecked ( checked ) ; | add setOnCheckedChangeListener modify setText params modify setChecked content |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
<nb> public class CheckedTextView extends TextView implements Checkable {
event . getText ( ) . add ( mContext . getString ( R . string . radiobutton_not_selected ) ) ;
}
}
+
+ @ override
+ public void onInitializeAccessibilityNodeInfo ( AccessibilityNodeInfo info ) {
+ super . onInitializeAccessibilityNodeInfo ( info ) ;
+ info . setChecked ( mChecked ) ;
+ }
} | CheckedTextView is missing onInitializeAccessibilityNodeInfo implementation |
<nb> public class TimeLineCursorAdapter extends CursorAdapter {
}
String link = STRING0 ;
- boolean displayPic = ! holder . picUrl . equals ( STRING0 ) && ! holder . picUrl . contains ( STRING1 ) ;
+ boolean displayPic = ! holder . picUrl . equals ( STRING0 ) && holder . playButton . getVisibility ( ) != View . VISIBLE ;
if ( displayPic ) {
link = holder . picUrl ;
} else {
<nb> public class TimelineArrayAdapter extends ArrayAdapter < Status > {
String link ;
- boolean displayPic = ! holder . picUrl . equals ( STRING0 ) && ! holder . picUrl . contains ( STRING1 ) ;
+ boolean displayPic = ! holder . picUrl . equals ( STRING0 ) && holder . playButton . getVisibility ( ) != View . VISIBLE ;
if ( displayPic ) {
link = holder . picUrl ;
} else { | Fix Forgot a few instances of checking for youtube |
<nb> class Stats {
this . cache = cache ;
HandlerThread statsThread = new HandlerThread ( STATS_THREAD_NAME , THREAD_PRIORITY_BACKGROUND ) ;
statsThread . start ( ) ;
- handler = new Handler ( statsThread . getLooper ( ) ) ;
+ handler = new StatsHandler ( statsThread . getLooper ( ) ) ;
}
void bitmapDecoded ( Bitmap bitmap ) { | Use the StatsHandler |
<nb> public class TCPReceiverThread extends Thread {
}
}
} catch ( IOException ioe ) {
- if ( ! idle ) {
+ if ( ! idle ) {
Log . err ( STRING0 ) ;
Log . err ( ioe ) ;
}
+ } catch ( Throwable t ) {
+ Log . err ( STRING1 ) ;
+ Log . err ( t ) ;
} finally {
AutoBuffer . BBP_BIG . free ( _bb ) ;
if ( _chan != null && _chan . isOpen ( ) ) | Added more error logging |
<nb> public class HandlerLibrary {
if ( container == null ) continue ;
try {
- System . out . println ( STRING0 + container . handler . getClass ( ) . getName ( ) ) ;
handled |= container . handle ( node ) ;
} catch ( AnnotationValueDecodeFail fail ) {
fail . owner . setError ( fail . getMessage ( ) , fail . idx ) ; | Removed debug print |
<nb> public class Jsr330Test extends TestCase {
}
static class L {
- @ inject final B b = null ;
+ @ suppresswarnings ( STRING0 )
+ @ inject
+ final B b = null ;
}
static abstract class AbstractM { | Added suppression to javax |
<nb> abstract class VisualCppCompilerArgsTransformer < T extends NativeCompileSpec > imp
args . addAll ( spec . getAllArgs ( ) ) ;
args . add ( STRING0 ) ;
for ( File file : spec . getIncludeRoots ( ) ) {
- args . add ( STRING1 ) ;
- args . add ( file . getAbsolutePath ( ) ) ;
+ args . add ( STRING1 + file . getAbsolutePath ( ) ) ;
}
for ( File file : spec . getSourceFiles ( ) ) {
args . add ( file . getAbsolutePath ( ) ) ; | Fix writing of command line args to file on Visual C |
<nb> public class ConstructorCallExpression extends Expression {
public boolean isUsingAnonymousInnerClass ( ) {
return usesAnonymousInnerClass ;
}
-
- @ deprecated
- public boolean isUsingAnnonymousInnerClass ( ) {
- return isUsingAnonymousInnerClass ( ) ;
- }
} | typo cont d remove deprecated method in trunk |
<nb> public class WXPageActivity extends WXBaseActivity implements IWXRenderListener ,
finish ( ) ;
return true ;
} else if ( id == R . id . action_refresh ) {
+
+ if ( mUri . isHierarchical ( ) && mUri . getQueryParameterNames ( ) != null && mUri . getQueryParameterNames ( ) . contains ( Constants . WEEX_TPL_KEY ) ) {
+ String url = mUri . getQueryParameter ( Constants . WEEX_TPL_KEY ) ;
+ loadWXfromService ( url ) ;
+ return true ;
+ }
+
if ( TextUtils . equals ( mUri . getScheme ( ) , STRING0 ) || TextUtils . equals ( mUri . getScheme ( ) , STRING1 ) ) {
loadWXfromService ( mUri . toString ( ) ) ;
return true ; | android update refresh |
<nb> public class TriStateCheckboxCell < TKey > implements Cell < Boolean >
}
@ override
+ @ suppresswarnings ( STRING0 )
public boolean isEditing ( Context context , Element parent , Boolean value )
{
SINGLE | Suppress unchecked warning |
<nb> public final class AnalyticsTracker {
CREATED_SITE ,
SHARED_ITEM ,
ADDED_SELF_HOSTED_SITE ,
+ SIGNED_IN ,
SIGNED_INTO_JETPACK ,
PERFORMED_JETPACK_SIGN_IN_FROM_STATS_SCREEN ,
STATS_SELECTED_INSTALL_JETPACK ,
<nb> public class AnalyticsTrackerMixpanel implements AnalyticsTracker . Tracker {
instructions = AnalyticsTrackerMixpanelInstructionsForStat .
mixpanelInstructionsForEventName ( STRING0 ) ;
break ;
+ case SIGNED_IN :
+ instructions = AnalyticsTrackerMixpanelInstructionsForStat .
+ mixpanelInstructionsForEventName ( STRING1 ) ;
+ break ;
case SIGNED_INTO_JETPACK :
instructions = AnalyticsTrackerMixpanelInstructionsForStat .
mixpanelInstructionsForEventName ( STRING2 ) ;
<nb> public class WelcomeFragmentSignIn extends NewAccountAbstractPageFragment implem
return ;
}
+ AnalyticsTracker . track ( AnalyticsTracker . Stat . SIGNED_IN ) ;
+
refreshFirstBlogContent ( userBlogList ) ;
if ( mSelfHosted ) { | Added tracking for sign in event |
<nb> class LocalSocketImpl
Os . setsockoptLinger ( fd , OsConstants . SOL_SOCKET , OsConstants . SO_LINGER , linger ) ;
break ;
case SocketOptions . SO_TIMEOUT :
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ SINGLE
+ SINGLE
StructTimeval timeval = StructTimeval . fromMillis ( intValue ) ;
+ Os . setsockoptTimeval ( fd , OsConstants . SOL_SOCKET , OsConstants . SO_RCVTIMEO ,
+ timeval ) ;
Os . setsockoptTimeval ( fd , OsConstants . SOL_SOCKET , OsConstants . SO_SNDTIMEO ,
timeval ) ;
break ; | Fix receive timeout on LocalSocket |
<nb> class CollectionBinding extends AbstractCollectionBinding {
Iterable getIterable ( Object o ) {
if ( o instanceof Set ) {
- SINGLE
- SINGLE
- if ( o instanceof SortedSet ) {
- SINGLE
- return ( Iterable ) o ;
- }
return new TreeSet ( ( Set ) o ) ;
}
return ( Collection ) o ; | sorted list handling reverted due to vague behaviour |
<nb> class LoadingIcon extends JBImageIcon {
}
public boolean imageUpdate ( Image img , int flags , int x , int y , int w , int h ) {
+ if ( myNode instanceof RepositoryNode && ! ( ( RepositoryNode ) myNode ) . isLoading ( ) ) return false ;
if ( ( flags & ( FRAMEBITS | ALLBITS ) ) != NUMBER0 ) {
TreeNode [ ] pathToRoot = myModel . getPathToRoot ( myNode ) ;
if ( pathToRoot != null ) {
<nb> public class RepositoryNode extends CheckedTreeNode implements EditableTreeNode ,
public void stopLoading ( ) {
myLoading . set ( false ) ;
+ myLoadingIcon . setImageObserver ( null ) ;
}
public boolean isLoading ( ) { | do not repaint tree path when loading icon is not visible |
<nb> public class ContentUtilEx extends ContentsUtil {
JComponent component = tabbedContent . getComponent ( ) ;
tabbedContent . removeContent ( component ) ;
contentManager . setSelectedContent ( tabbedContent , true , true ) ;
+ dispose ( component ) ;
return ;
}
}
contentManager . removeContent ( content , true ) ;
}
+ private static void dispose ( @ notnull JComponent component ) {
+ Object disposable = component . getClientProperty ( DISPOSABLE_KEY ) ;
+ if ( disposable != null && disposable instanceof Disposable ) {
+ Disposer . dispose ( ( Disposable ) disposable ) ;
+ }
+ }
+
@ notnull
public static String getFullName ( @ notnull String groupPrefix , @ notnull String tabName ) {
return getFullPrefix ( groupPrefix ) + tabName ; | tabs dispose specific tab when closing |
<nb> public class JettyTest
public void configure ( Binder binder )
{
JsonConfigProvider . bindInstance (
- binder , Key . get ( DruidNode . class , Self . class ) , new DruidNode ( STRING0 , STRING1 , NUMBER0 )
+ binder , Key . get ( DruidNode . class , Self . class ) , new DruidNode ( STRING0 , STRING1 , null )
) ;
binder . bind ( JettyServerInitializer . class ) . to ( JettyServerInit . class ) . in ( LazySingleton . class ) ;
Jerseys . addResource ( binder , SlowResource . class ) ; | use first available port for JettyTest |
<nb> public class CamelLogger {
}
public static void log ( Logger log , LoggingLevel level , Marker marker , String message ) {
+ if ( marker == null ) {
+ log ( log , level , message ) ;
+ }
+
+ SINGLE
switch ( level ) {
case DEBUG :
log . debug ( marker , message ) ;
<nb> public class CamelLogger {
}
public static void log ( Logger log , LoggingLevel level , Marker marker , String message , Throwable th ) {
+ if ( marker == null ) {
+ log ( log , level , message , th ) ;
+ }
+
+ SINGLE
switch ( level ) {
case DEBUG :
log . debug ( marker , message , th ) ; | CamelLogger should only call log with marker if marker is not null |
<nb> public class Table
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
COMMENT
public void snapshot ( String snapshotName )
{
+ assert snapshotName != null ;
for ( ColumnFamilyStore cfStore : columnFamilyStores . values ( ) )
- {
cfStore . snapshot ( snapshotName ) ;
- }
}
COMMENT
<nb> public class StorageProxy implements StorageProxyMBean
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | fix some docstring errors |
<nb> public abstract class AbstractEnvironment implements ConfigurableEnvironment {
return this . propertySources ;
}
- public ConfigurablePropertyResolver getPropertyResolver ( ) {
- return this . propertyResolver ;
- }
-
@ suppresswarnings ( STRING0 )
public Map < String , Object > getSystemEnvironment ( ) {
Map < String , ? > systemEnvironment ;
<nb> package NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Remove AbstractEnvironment getPropertyResolver |
<nb> public class WriteBehindStore extends AbstractMapDataStore < Data , Object > {
}
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
@ override
public Object flush ( Data key , Object value , long now ) { | improve explanation of GOTCHA |
<nb> public class AccessibilityNodeInfo implements Parcelable {
COMMENT
COMMENT
public boolean refresh ( ) {
- return refresh ( false ) ;
+ return refresh ( true ) ;
}
COMMENT | AccessibilityNodeInfo refresh returns a stale state |
<nb> public class Http11NioProcessor implements ActionHook {
keptAlive = true ;
if ( ! inputBuffer . parseHeaders ( ) ) {
openSocket = true ;
- socket . getPoller ( ) . add ( socket ) ;
recycle = false ;
break ;
} | The protocol class will register the socket with the poller for another read event |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class RestBulkAction extends BaseRestHandler {
}
builder . endArray ( ) ;
}
+ } else if ( itemResponse . getResponse ( ) instanceof DeleteResponse ) {
+ DeleteResponse deleteResponse = itemResponse . getResponse ( ) ;
+ builder . field ( Fields . FOUND , ! deleteResponse . isNotFound ( ) ) ;
}
builder . endObject ( ) ;
builder . endObject ( ) ;
<nb> public class RestBulkAction extends BaseRestHandler {
static final XContentBuilderString TOOK = new XContentBuilderString ( STRING0 ) ;
static final XContentBuilderString _VERSION = new XContentBuilderString ( STRING1 ) ;
static final XContentBuilderString MATCHES = new XContentBuilderString ( STRING2 ) ;
+ static final XContentBuilderString FOUND = new XContentBuilderString ( STRING3 ) ;
}
} | Add found field for bulk deletes |
<nb> public class PlayerActivity extends Activity implements SurfaceHolder . Callback ,
public static final int TYPE_MP3 = NUMBER0 ;
public static final int TYPE_FMP4 = NUMBER1 ;
public static final int TYPE_WEBM = NUMBER2 ;
- public static final int TYPE_TS = NUMBER3 ;
- public static final int TYPE_AAC = NUMBER4 ;
- public static final int TYPE_M4A = NUMBER5 ;
+ public static final int TYPE_MKV = NUMBER3 ;
+ public static final int TYPE_TS = NUMBER4 ;
+ public static final int TYPE_AAC = NUMBER5 ;
+ public static final int TYPE_M4A = NUMBER6 ;
public static final String CONTENT_TYPE_EXTRA = STRING0 ;
public static final String CONTENT_ID_EXTRA = STRING1 ;
<nb> import NAMESPACE ;
new Sample ( STRING2 , STRING3
+ STRING4 ,
PlayerActivity . TYPE_TS ) ,
+ new Sample ( STRING5 , STRING6
+ + STRING7 , PlayerActivity . TYPE_MKV ) ,
new Sample ( STRING8 ,
STRING9
+ STRING10 | Add Matroska sample |
<nb> public final class VectorTest extends MahoutTestCase {
FLOAT0 , FLOAT1 , FLOAT2
} ) ;
- assertVectorEquals ( expected , norm , FLOAT3 ) ;
- assertVectorEquals ( expected , norm2 , FLOAT3 ) ;
+ assertVectorEquals ( expected , norm , FLOAT4 ) ;
+ assertVectorEquals ( expected , norm2 , FLOAT4 ) ;
norm = vec1 . logNormalize ( NUMBER0 ) ;
- assertVectorEquals ( expected , norm , FLOAT3 ) ;
+ assertVectorEquals ( expected , norm , FLOAT4 ) ;
norm2 = vec2 . logNormalize ( NUMBER0 ) ;
- assertVectorEquals ( expected , norm2 , FLOAT3 ) ;
+ assertVectorEquals ( expected , norm2 , FLOAT4 ) ;
try {
vec1 . logNormalize ( NUMBER1 ) ; | Relaxed test slightly |
<nb> public abstract class GoRunConfigurationBase < RunningState extends GoRunningState
GoModuleBasedConfiguration configuration = getConfigurationModule ( ) ;
Module module = configuration . getModule ( ) ;
if ( module == null ) {
- throw new ExecutionException ( STRING0 + getName ( ) ) ;
+ throw new ExecutionException ( STRING1 + getName ( ) ) ;
}
return newRunningState ( env , module ) ;
} | Delete erlang error message |
<nb> public class DevToolsDataSourceAutoConfiguration {
private final DataSourceProperties dataSourceProperties ;
- public NonEmbeddedInMemoryDatabaseShutdownExecutor ( DataSource dataSource ,
+ NonEmbeddedInMemoryDatabaseShutdownExecutor ( DataSource dataSource ,
DataSourceProperties dataSourceProperties ) {
this . dataSource = dataSource ;
this . dataSourceProperties = dataSourceProperties ; | Remove redundant public modifier |
<nb> public class ListUtils {
SINGLE
SINGLE
- public static < T > ArrayList < ? extends T > toList ( final T pElement ) {
+ public static < T > ArrayList < ? extends T > toList ( final T pItem ) {
final ArrayList < T > out = new ArrayList < T > ( ) ;
- out . add ( pElement ) ;
+ out . add ( pItem ) ;
+ return out ;
+ }
+
+ public static < T > ArrayList < ? extends T > toList ( final T . . . pItems ) {
+ final ArrayList < T > out = new ArrayList < T > ( ) ;
+ final int itemCount = pItems . length ;
+ for ( int i = NUMBER0 ; i < itemCount ; i ++ ) {
+ out . add ( pItems [ i ] ) ;
+ }
return out ;
} | Added utility function in ListUtils |
<nb> public final class CFMetaData
BytesType . instance ,
DEFAULT_MIN_COMPACTION_THRESHOLD ,
DEFAULT_MAX_COMPACTION_THRESHOLD ,
- DEFAULT_ROW_CACHE_SAVE_PERIOD_IN_SECONDS ,
- DEFAULT_KEY_CACHE_SAVE_PERIOD_IN_SECONDS ,
+ NUMBER0 ,
+ NUMBER0 ,
DEFAULT_MEMTABLE_LIFETIME_IN_MINS ,
memtableThroughPutInMB ,
sizeMemtableOperations ( memtableThroughPutInMB ) , | turn off cache saving nn system CFs |
<nb> public abstract class AbstractWriteAttributeHandler < T > implements OperationStepH
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
protected boolean requiresRuntime ( OperationContext context ) {
- return context . getType ( ) == OperationContext . Type . SERVER ;
+ return context . getType ( ) == OperationContext . Type . SERVER && ! context . isBooting ( ) ;
}
COMMENT | By default don t apply boottime write attribute changes to the runtime |
<nb> public class ApkMojo extends AbstractAndroidMojo
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
private String [ ] excludeJarResources ; | Note pattern syntax |
<nb> public interface IdentityService {
COMMENT
void deleteUserInfo ( String userId , String key ) ;
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
void setUserAccount ( String userId , String userPassword , String accountName , String accountUsername , String accountPassword , Map < String , String > accountDetails ) ;
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
List < String > getUserAccountNames ( String userId ) ;
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
Account getUserAccount ( String userId , String userPassword , String accountName ) ;
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
void deleteUserAccount ( String userId , String accountName ) ;
} | Deprecated account related operations |
<nb> public class ProjectRootConfigurable extends MasterDetailsComponent implements P
public void setSelected ( AnActionEvent e , boolean state ) {
myPlainMode = state ;
+ DefaultMutableTreeNode selection = null ;
+ final TreePath selectionPath = myTree . getSelectionPath ( ) ;
+ if ( selectionPath != null ) {
+ selection = ( DefaultMutableTreeNode ) selectionPath . getLastPathComponent ( ) ;
+ }
final ModifiableModuleModel model = myModulesConfigurator . getModuleModel ( ) ;
final Module [ ] modules = model . getModules ( ) ;
for ( Module module : modules ) {
<nb> public class ProjectRootConfigurable extends MasterDetailsComponent implements P
if ( state ) {
removeModuleGroups ( ) ;
}
+ if ( selection != null ) {
+ TreeUtil . selectInTree ( selection , true , myTree ) ;
+ }
}
private void removeModuleGroups ( ) { | restore selection after group ungroup |
<nb> import NAMESPACE
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public class ViewAttributeBinderFactory {
return binderFactory . create ( view , attribute ) ;
}
- public EventViewAttributeBinder binderFor ( EventViewAttribute < ? , ? > viewAttribute , String attributeName ,
+ public EventViewAttributeBinder binderFor ( final EventViewAttribute < ? , ? > viewAttribute , String attributeName ,
String attributeValue ) {
- return binderFor ( viewAttribute , attributeName , attributeValue ) ;
+ return binderFor ( new EventViewAttributeFactory < Object > ( ) {
+ @ suppresswarnings ( STRING0 )
+ @ override
+ public EventViewAttribute < Object , ViewAddOn > create ( ) {
+ return ( EventViewAttribute < Object , ViewAddOn > ) viewAttribute ;
+ }
+ } , attributeName , attributeValue ) ;
}
public EventViewAttributeBinder binderFor ( EventViewAttributeFactory < ? > factory , String attributeName , | Fixed binderFor calling itself |
<nb> public final class RetryHandlingBlockWorkerClient extends AbstractClient
SINGLE
try {
- mClient . sessionHeartbeat ( mSessionId , mClientMetrics . getHeartbeatData ( ) ) ;
+ mClient . sessionHeartbeat ( mSessionId , null ) ;
} catch ( Exception e ) {
LOG . error ( STRING0 , e ) ;
SINGLE | Fix a merging conflict error |
<nb> public class NodeEnvironment extends AbstractComponent {
if ( locks != null ) {
for ( Lock lock : locks ) {
try {
+ logger . trace ( STRING0 , lock ) ;
lock . release ( ) ;
} catch ( IOException e ) {
- SINGLE
+ logger . trace ( STRING1 , e , lock ) ;
}
}
} | Add logging information for releasing node lock |
<nb> public class UnsignedLongsTest extends TestCase {
SINGLE
}
}
+
+ try {
+ UnsignedLongs . parseUnsignedLong ( STRING0 , NUMBER0 ) ;
+ fail ( ) ;
+ } catch ( NumberFormatException nfe ) {
+ SINGLE
+ }
}
public void testParseLongThrowsExceptionForInvalidRadix ( ) { | Add parsing test that caught a regression in overflow detection |
<nb> public class ColumnFamilyRecordReader extends RecordReader < ByteBuffer , SortedMap
return endOfData ( ) ;
Pair < ByteBuffer , SortedMap < ByteBuffer , IColumn > > next = wideColumns . next ( ) ;
- lastColumn = next . right . values ( ) . iterator ( ) . next ( ) . name ( ) ;
+ lastColumn = next . right . values ( ) . iterator ( ) . next ( ) . name ( ) . duplicate ( ) ;
maybeIncreaseRowCounter ( next ) ;
return next ;
<nb> public class ColumnFamilyRecordReader extends RecordReader < ByteBuffer , SortedMap
if ( this . nextKeyValue ( ) )
{
key . clear ( ) ;
- key . put ( this . getCurrentKey ( ) ) ;
+ key . put ( this . getCurrentKey ( ) . duplicate ( ) ) ;
key . flip ( ) ;
value . clear ( ) ; | Fix row key population with old style mapred interface |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public interface Graph {
void inject ( NetworkService networkService ) ;
void inject ( RxGitHubApp rxGitHubApp ) ;
+ void inject ( UserSettingsStore userSettingsStore ) ;
+ void inject ( NetworkRequestStatusStore networkRequestStatusStore ) ;
+ void inject ( GitHubRepositoryStore gitHubRepositoryStore ) ;
+ void inject ( GitHubRepositorySearchStore gitHubRepositorySearchStore ) ;
+
final class Initializer {
public static Graph init ( Application application ) { | Fix remaining rxbookapp names to rxgithubapp |
<nb> class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
@ override
public boolean onPreDraw ( ) {
getDecor ( ) . getViewTreeObserver ( ) . removeOnPreDrawListener ( this ) ;
- Bundle state = captureSharedElementState ( ) ;
- setSharedElementMatrices ( ) ;
- moveSharedElementsToOverlay ( ) ;
- mResultReceiver . send ( MSG_SHARED_ELEMENT_DESTINATION , state ) ;
+ if ( mResultReceiver != null ) {
+ Bundle state = captureSharedElementState ( ) ;
+ setSharedElementMatrices ( ) ;
+ moveSharedElementsToOverlay ( ) ;
+ mResultReceiver . send ( MSG_SHARED_ELEMENT_DESTINATION , state ) ;
+ }
return true ;
}
} ) ; | Fix NPE in EnterTransitionCoordinator |
<nb> public class OSBTreeBonsaiLocal < K , V > extends ODurableComponent implements OSBTr
try {
OSBTreeBonsaiBucket < K , V > rootBucket = new OSBTreeBonsaiBucket < K , V > ( rootPointer . getDataPointer ( ) ,
this . rootBucketPointer . getPageOffset ( ) , true , keySerializer , valueSerializer , getTrackMode ( ) ) ;
- rootBucket . setKeySerializerId ( keySerializer . getId ( ) ) ;
- rootBucket . setValueSerializerId ( valueSerializer . getId ( ) ) ;
rootBucket . setTreeSize ( NUMBER0 ) ;
super . logPageChanges ( rootBucket , fileId , this . rootBucketPointer . getPageIndex ( ) , true ) ; | remove unnecessary operations from SBTreeBonsai create |
<nb> public abstract class SquidDatabase {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public abstract class SquidDatabase {
}
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Clarify some documentation |
<nb> public class ActionToolbarImpl extends JPanel implements ActionToolbar {
final Window window = SwingUtilities . getWindowAncestor ( this ) ;
if ( window != null ) {
- window . addComponentListener ( new ComponentAdapter ( ) {
+ final ComponentAdapter componentAdapter = new ComponentAdapter ( ) {
public void componentResized ( final ComponentEvent e ) {
hidePopup ( ) ;
}
<nb> public class ActionToolbarImpl extends JPanel implements ActionToolbar {
public void componentHidden ( final ComponentEvent e ) {
hidePopup ( ) ;
}
+ } ;
+ window . addComponentListener ( componentAdapter ) ;
+ Disposer . register ( myPopupToolbar , new Disposable ( ) {
+ public void dispose ( ) {
+ window . removeComponentListener ( componentAdapter ) ;
+ }
} ) ;
}
} | detach component listener |
<nb> public class RnnOutputLayer extends BaseOutputLayer {
@ noargsconstructor
public static class Builder extends BaseOutputLayer . Builder < Builder > {
-
+ protected LossFunction lossFunction = LossFunction . MCXENT ;
+
public Builder ( LossFunction lossFunction ) {
this . lossFunction = lossFunction ;
} | Add default loss for RNNOutput |
<nb> public final class Slice
}
copyMemory ( bytes , BYTE_ARRAY_OFFSET , base , address + index , bytesRead ) ;
remaining -= bytesRead ;
+ index += bytesRead ;
}
return length - remaining ;
}
<nb> public class TestSlice
assertBytesStreams ( Slices . allocate ( size ) , index ) ;
}
}
+ assertBytesStreams ( Slices . allocate ( NUMBER0 * NUMBER1 ) , NUMBER2 ) ;
}
private void assertBytesStreams ( Slice slice , int index ) | Fix bug in Slice setBytes int InputStream int |
<nb> public class PrivacyManager {
value = PrivacyService . getSetting ( new PSetting ( userId , type , name , null ) ) . value ;
}
- if ( value == null )
- value = defaultValue ;
-
SINGLE
key . setValue ( value ) ;
synchronized ( mSettingsCache ) {
<nb> public class PrivacyManager {
Util . bug ( null , ex ) ;
}
+ if ( value == null )
+ value = defaultValue ;
+
long ms = System . currentTimeMillis ( ) - start ;
if ( ! willExpire && ! cSettingLog . equals ( name ) )
Util . log ( null , Log . INFO , String . format ( STRING0 , uid , type , name , value , | Fix settings default |
<nb> public class UltimateRecyclerView extends FrameLayout {
new DividerItemDecoration ( context , DividerItemDecoration . VERTICAL_LIST ) ;
mRecyclerView . addItemDecoration ( itemDecoration ) ;
}
+
COMMENT
COMMENT
COMMENT
<nb> public class UltimateRecyclerView extends FrameLayout {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void setItemAnimator ( RecyclerView . ItemAnimator animator ) {
+ mRecyclerView . setItemAnimator ( animator ) ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public RecyclerView . ItemAnimator getItemAnimator ( ) {
+ return mRecyclerView . getItemAnimator ( ) ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT | add set and get of ItemAnimator |
<nb> public class JdkListConfigurable extends BaseStructureConfigurable {
@ nullable
@ nonnls
public String getHelpTopic ( ) {
- return STRING0 ;
+ final NamedConfigurable selectedConfigurable = getSelectedConfugurable ( ) ;
+ return selectedConfigurable != null ? selectedConfigurable . getHelpTopic ( ) : STRING0 ;
}
@ nonnls | help topics for selected configurable |
<nb> public class DiscoveryClient implements LookupService {
availZones = new String [ NUMBER0 ] ;
availZones [ NUMBER1 ] = STRING0 ;
}
- logger . debug ( STRING1 ,
+ logger . debug ( STRING2 ,
region , Arrays . toString ( availZones ) ) ;
int myZoneOffset = getZoneOffset ( instanceZone , preferSameZone ,
availZones ) ; | Fix logging string |
<nb> public abstract class PersistIce {
SINGLE
protected static final String ROOT ;
- public static final String DEFAULT_ROOT = STRING0 ;
+ public static final String DEFAULT_ROOT = STRING0 ;
private static final String ICE_DIR = STRING1 ;
private static final String LOG_FILENAME = STRING2 ;
private static final URI iceRoot ;
<nb> public abstract class PersistIce {
ROOT = ( H2O . OPT_ARGS . ice_root == null ) ? DEFAULT_ROOT : H2O . OPT_ARGS . ice_root ;
H2O . OPT_ARGS . ice_root = ROOT ;
try {
- iceRoot = new URI ( ROOT + File . separator + ICE_DIR + H2O . API_PORT ) ;
+ String uri = ( ROOT + STRING3 + ICE_DIR + H2O . API_PORT ) . replace ( STRING4 , STRING3 ) ;
+ iceRoot = new URI ( uri ) ;
if ( Schemes . HDFS . equals ( iceRoot . getScheme ( ) ) )
logFile = new File ( DEFAULT_ROOT + File . separator + LOG_FILENAME ) ;
else | Make PersistIce windows friendly |
<nb> public abstract class Dialect implements ConversionContext {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Fix Javadoc typo |
<nb> public class ReaderPost {
}
return tagForDisplay ;
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ private transient long stableId ;
+ public long getStableId ( ) {
+ if ( stableId == NUMBER0 ) {
+ stableId = ( pseudoId != null ? pseudoId . hashCode ( ) : NUMBER0 ) ;
+ }
+ return stableId ;
+ }
+
}
<nb> public class ReaderPostAdapter extends BaseAdapter {
@ override
public long getItemId ( int position ) {
- return position ;
+ return mPosts . get ( position ) . getStableId ( ) ;
}
@ override
public boolean hasStableIds ( ) {
- return false ;
+ return true ;
}
@ override | Added stable IDs to ReaderPostAdapter |
<nb> public class Client implements IConnection {
private final int buffer_size ;
private boolean closing ;
- private Integer messageBatchSize ;
+ private int messageBatchSize ;
private AtomicLong pendings ; | use primitive type int instead of Integer |
<nb> public class UtilsTest {
@ test
public void test_replaceIcons_withDash ( ) {
- test ( STRING0 , STRING1 + fa_adjust . character + STRING1 + fa_adn . character + STRING1 ) ;
+ test ( STRING2 , STRING1 + fa_adjust . character + STRING1 + fa_adn . character + STRING1 ) ;
}
@ test | Fixed tests with new version of FA |
<nb> public final class InputMethodManager {
if ( DEBUG ) Log . v ( TAG , STRING0 + view + STRING1
+ ic + STRING2 + tba + STRING3 + initial ) ;
InputBindResult res = mService . startInput ( mClient ,
- servedContext , tba , initial , mCurMethod == null ) ;
+ servedContext , tba , initial , true ) ;
if ( DEBUG ) Log . v ( TAG , STRING4 + res ) ;
if ( res != null ) {
if ( res . id != null ) {
mBindSequence = res . sequence ;
mCurMethod = res . method ;
- } else {
+ } else if ( mCurMethod == null ) {
SINGLE
if ( DEBUG ) Log . v ( TAG , STRING5 ) ;
return ; | Do not merge Backport a fix for InputMethodManager java |
<nb>
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb>
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ; | remove unuse import |
<nb> public abstract class UnderFileSystem {
COMMENT
private boolean mProvidesStorage = true ;
- private static final Cache CACHE = new Cache ( ) ;
+ private static final Cache UFS_CACHE = new Cache ( ) ;
COMMENT
COMMENT
<nb> public abstract class UnderFileSystem {
Preconditions . checkNotNull ( path ) ;
Preconditions . checkNotNull ( configuration ) ;
- return CACHE . get ( path , ufsConf , configuration ) ;
+ return UFS_CACHE . get ( path , ufsConf , configuration ) ;
}
COMMENT | rename CACHE to UFS_CACHE |
<nb> public class RenderEngine extends TileEntitySpecialRenderer implements IInventor
break ;
}
- tileEntityRenderer . renderEngine . func_98187_b ( texture ) ;
+ bindTextureByName ( texture ) ;
trunk . render ( factor ) ; | Fix Engine model texture binding |
<nb> public class BatchInserterImpl implements BatchInserter
{
PropertyStore propStore = getPropertyStore ( ) ;
PropertyRecord propertyRecord = propStore . getRecord ( propertyId ) ;
- int nextProperty = propertyRecord . getNextProp ( ) ;
+ int nextProperty = - NUMBER0 ;
Map < String , Object > properties = new HashMap < String , Object > ( ) ;
do
{
+ nextProperty = propertyRecord . getNextProp ( ) ;
propStore . makeHeavy ( propertyRecord ) ;
String key = indexHolder . getStringKey (
propertyRecord . getKeyIndexId ( ) ) ; | Fixed bug in get of property chain for batch inserter |
<nb> public class SearchTest {
assertTrue ( instance . parseCmdLine ( new String [ ] { STRING0 , STRING1 } ) ) ;
assertTrue ( instance . search ( ) ) ;
- assertEquals ( NUMBER0 , instance . results . size ( ) ) ;
+ assertEquals ( NUMBER1 , instance . results . size ( ) ) ;
assertTrue ( instance . parseCmdLine ( new String [ ] { STRING0 , STRING2 } ) ) ;
assertTrue ( instance . search ( ) ) ;
- assertEquals ( NUMBER2 , instance . results . size ( ) ) ;
+ assertEquals ( NUMBER0 , instance . results . size ( ) ) ;
assertTrue ( instance . parseCmdLine ( new String [ ] { STRING0 , STRING3 } ) ) ;
assertTrue ( instance . search ( ) ) ; | Updated SearchTest to include new clojure file that matches some searches |
<nb> public class ActionModesNoActionBar extends SherlockActivity {
@ override
protected void onCreate ( Bundle savedInstanceState ) {
- setTheme ( SampleList . THEME ) ; SINGLE
+ int theme = R . style . Theme_Sherlock_NoActionBar ;
+ if ( SampleList . THEME == R . style . Theme_Sherlock_Light || SampleList . THEME == R . style . Theme_Sherlock_Light_DarkActionBar ) {
+ theme = R . style . Theme_Sherlock_Light_NoActionBar ;
+ }
+ setTheme ( theme ) ;
requestWindowFeature ( Window . FEATURE_NO_TITLE ) ;
super . onCreate ( savedInstanceState ) ;
setContentView ( R . layout . action_mode ) ; | Get proper no action bar theme for the no action bar sample |
<nb> public class Runtime {
SINGLE
public void addStepdefScanPath ( String [ ] packages ) {
for ( String packageName : packages ) {
- backends . addAll ( Resources . instantiateSubclasses ( Backend . class , STRING0 , packageName ) ) ;
+ if ( packageName . matches ( STRING1 ) )
+ backends . addAll ( Resources . instantiateSubclasses ( Backend . class , STRING0 , packageName ) ) ;
+ else
+ throw new CucumberException ( STRING2 + packageName ) ;
}
}
} | Added check for package name so it doesn t fail so silently |
<nb> public class InternalEngine extends Engine {
public IndexSearcher newSearcher ( IndexReader reader , IndexReader previousReader ) throws IOException {
IndexSearcher searcher = super . newSearcher ( reader , previousReader ) ;
if ( reader instanceof LeafReader && isMergedSegment ( ( LeafReader ) reader ) ) {
+ SINGLE
+ SINGLE
+ SINGLE
return searcher ;
}
if ( warmer != null ) { | add comment why and when we have a leaf reader in the warmer |
<nb> public class DeploymentGroupTest extends SystemTestBase {
final Map < String , MasterMain > masters = Maps . newHashMap ( ) ;
for ( int i = NUMBER0 ; i < NUMBER1 ; i ++ ) {
final String name = TEST_MASTER + i ;
- masters . put ( name , startDefaultMaster ( STRING0 , name ) ) ;
+ masters . put ( name , startMaster ( STRING1 ,
+ STRING2 ,
+ STRING3 , STRING4 + ( masterPort ( ) + i ) ,
+ STRING5 + ( masterAdminPort ( ) + i ) ,
+ STRING6 , STRING7 ,
+ STRING0 , name ,
+ STRING8 , zk ( ) . connectString ( ) ) ) ;
}
final Map < String , AgentMain > agents = Maps . newLinkedHashMap ( ) ; | Fix multimaster port conflict |
<nb> public class DeltaSession extends StandardSession implements Externalizable , Clus
this . setValid ( true ) ;
this . setPrimarySession ( false ) ;
this . access ( ) ;
- if ( cm . isNotifyListenersOnReplication ( ) ) this . setId ( getIdInternal ( ) ) ;
this . resetDeltaRequest ( ) ;
this . endAccess ( ) ;
}
<nb> public class DeltaSession extends StandardSession implements Externalizable , Clus
COMMENT
COMMENT
public void setIdInternal ( String id ) {
- super . setId ( id ) ;
+ this . id = id ;
resetDeltaRequest ( ) ;
}
<nb> public class DeltaSession extends StandardSession implements Externalizable , Clus
COMMENT
COMMENT
public void setId ( String id ) {
- setIdInternal ( id ) ;
+ super . setId ( id ) ;
+ resetDeltaRequest ( ) ;
} | Make sure that setIdInternal doesn t try to modify the hashmap |
<nb> public class GHServer
GzipHandler gzipHandler = new GzipHandler ( ) ;
gzipHandler . setIncludedMethods ( STRING0 , STRING1 ) ;
SINGLE
- SINGLE
+ SINGLE
SINGLE
gzipHandler . setHandler ( handlers ) ; | add minor comments regarding gzip jetty |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
-
import static NAMESPACE ;
public class JsonObjectDecoderTest {
<nb> public class JsonObjectDecoderTest {
ByteBuf res = ch . readInbound ( ) ;
assertEquals ( object , res . toString ( CharsetUtil . UTF_8 ) ) ;
+ res . release ( ) ;
assertFalse ( ch . finish ( ) ) ;
} | Fix a buffer leak in JsonObjectDecoderTest |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class StatsActivity extends WPActionBarActivity {
if ( getBlogId ( ) == null ) {
final Blog currentBlog = WordPress . getCurrentBlog ( ) ;
SINGLE
- XMLRPCClient xmlrpcClient = new XMLRPCClient ( currentBlog . getUrl ( ) , STRING0 , STRING0 ) ;
+ XMLRPCClientInterface xmlrpcClient = XMLRPCFactory . instantiate ( currentBlog . getUri ( ) , STRING0 , STRING0 ) ;
Map < String , String > args = ApiHelper . blogOptionsXMLRPCParameters ;
Object [ ] params = {
currentBlog . getRemoteBlogId ( ) , currentBlog . getUsername ( ) , currentBlog . getPassword ( ) , args | use XMLRPCFactory instantiate instead of instantiating XMLRPCClient directly |
<nb> public class PhysicsSpace {
return solverNumIterations ;
}
- private static native void setSolverNumIterations ( long physicsSpaceId , int numIterations ) ;
+ private native void setSolverNumIterations ( long physicsSpaceId , int numIterations ) ;
public static native void initNativePhysics ( ) ; | Remove static from method |
<nb> public abstract class PGType {
COMMENT
COMMENT
COMMENT
- public final int writeAsText ( ChannelBuffer buffer , @ nonnull Object value ) {
+ public int writeAsText ( ChannelBuffer buffer , @ nonnull Object value ) {
byte [ ] bytes = encodeAsUTF8Text ( value ) ;
buffer . writeInt ( bytes . length ) ;
buffer . writeBytes ( bytes ) ;
<nb> class VarCharType extends PGType {
}
@ override
+ public int writeAsText ( ChannelBuffer buffer , @ nonnull Object value ) {
+ return writeAsBinary ( buffer , value ) ;
+ }
+
+ @ override
protected byte [ ] encodeAsUTF8Text ( @ nonnull Object value ) {
if ( value instanceof String ) {
return ( ( String ) value ) . getBytes ( StandardCharsets . UTF_8 ) ; | Optimize VarCharType text streaming |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.