diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class PermanentGraphImpl < CommitId > implements PermanentGraph < CommitId > , P
}
@ notnull
- public GraphColorManager < CommitId > getGraphColorManager ( ) {
- return myGraphColorManager ;
- }
-
- @ notnull
public Set < Integer > getBranchNodeIds ( ) {
return myBranchNodeIds ;
}
|
vcs log remove unused method
|
<nb> public class AlarmDecoderBinding extends AbstractActiveBinding < AlarmDecoderBindi
}
@ override
+ public void deactivate ( ) {
+ disconnect ( ) ;
+ }
+
+ @ override
public void execute ( ) {
SINGLE
SINGLE
<nb> public class AlarmDecoderBinding extends AbstractActiveBinding < AlarmDecoderBindi
}
} catch ( IOException e ) {
logger . error ( STRING0 , e . getMessage ( ) ) ;
- SINGLE
- m_socket = null ;
- m_port = null ;
+ disconnect ( ) ;
}
logger . debug ( STRING1 ) ;
}
|
Adds deactivate life cycle method so binding can be safely stoppped restarted also cleans up properly when a IOException occurs
|
<nb> public class ReaderPostActions {
public void run ( ) {
ReaderPost serverPost = ReaderPost . fromJson ( jsonObject ) ;
- SINGLE
+ SINGLE
SINGLE
SINGLE
SINGLE
|
Corrected typo in comment
|
<nb> public class Store extends AbstractIndexShardComponent implements Closeable , Ref
public final static class MetadataSnapshot implements Iterable < StoreFileMetaData > , Streamable {
private static final ESLogger logger = Loggers . getLogger ( MetadataSnapshot . class ) ;
private static final Version FIRST_LUCENE_CHECKSUM_VERSION = Version . LUCENE_4_8 ;
- SINGLE
- private static final Version FIRST_ES_CRC32_VERSION = org . elasticsearch . Version . V_1_3_0 . luceneVersion ;
private Map < String , StoreFileMetaData > metadata ;
|
remove dead code
|
<nb> public class MapActivityActions implements DialogProvider {
IntermediatePointsDialog . openIntermediatePointsDialog ( mapActivity ) ;
SINGLE
} else if ( standardId == R . string . context_menu_item_destination_point ) {
- targets . navigateToPoint ( new LatLon ( latitude , longitude ) ,
- true , targets . getIntermediatePoints ( ) . size ( ) ) ;
- IntermediatePointsDialog . openIntermediatePointsDialog ( mapActivity ) ;
+ getMyApplication ( ) . getTargetPointsHelper ( ) . navigateToPoint ( new LatLon ( latitude , longitude ) , true , - NUMBER0 ) ;
+ SINGLE
+ if ( ! routingHelper . isRouteBeingCalculated ( ) && ! routingHelper . isRouteCalculated ( ) ) {
+ getDirections ( null , new LatLon ( latitude , longitude ) , true ) ;
+ }
} else if ( standardId == R . string . context_menu_item_share_location ) {
shareLocation ( latitude , longitude , mapActivity . getMapView ( ) . getZoom ( ) ) ;
} else if ( standardId == R . string . context_menu_item_add_favorite ) {
|
fix small bug
|
<nb> public class GrapesCleaner {
public static void cleanIfNecessary ( ) throws Exception {
File installedJar = new File ( getMavenRepository ( ) , String . format (
- STRING0 ,
- VERSION , VERSION ) ) ;
- File grapesJar = new File (
- getGrapesCache ( ) ,
- String . format (
- STRING1 ,
- VERSION ) ) ;
+ STRING2 , VERSION ,
+ VERSION ) ) ;
+ File grapesJar = new File ( getGrapesCache ( ) , String . format (
+ STRING3 , VERSION ) ) ;
if ( ! VERSION . contains ( STRING4 ) || installedJar . exists ( ) && grapesJar . exists ( )
&& installedJar . lastModified ( ) <= grapesJar . lastModified ( ) ) {
return ;
|
Fix GrapesCleaner to work with renamed artifacts
|
<nb> public class ExpressionAnalyzer
throw new SemanticException ( TYPE_MISMATCH , node , STRING0 , type ) ;
}
expressionTypes . put ( node , type ) ;
- break ;
+ return type ;
case MINUS :
return getOperator ( context , node , OperatorType . NEGATION , node . getValue ( ) ) ;
}
<nb> public class TestBigintOperators
}
@ test
+ public void testUnaryPlus ( )
+ throws Exception
+ {
+ assertFunction ( STRING1 , BIGINT , NUMBER0 ) ;
+ assertFunction ( STRING2 , BIGINT , NUMBER1 ) ;
+ }
+
+ @ test
+ public void testUnaryMinus ( )
+ throws Exception
+ {
+ assertFunction ( STRING3 , BIGINT , - NUMBER0 ) ;
+ assertFunction ( STRING4 , BIGINT , - NUMBER1 ) ;
+ }
+
+ @ test
public void testAdd ( )
throws Exception
{
|
Fix unary operator PLUS
|
<nb> public class Emojicon implements Serializable {
return o instanceof Emojicon && emoji . equals ( ( ( Emojicon ) o ) . emoji ) ;
}
+ @ override
+ public int hashCode ( ) {
+ return emoji . hashCode ( ) ;
+ }
+
public static final String newString ( int codePoint ) {
if ( Character . charCount ( codePoint ) == NUMBER0 ) {
return String . valueOf ( codePoint ) ;
<nb> public class Emojicon implements Serializable {
return new String ( Character . toChars ( codePoint ) ) ;
}
}
- }
+ }
|
Add hashCode method to Emojicon
|
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
import static NAMESPACE ;
+ @ suppresswarnings ( STRING0 )
public class IndexingTests {
@ test
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import static NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ @ suppresswarnings ( STRING0 )
public class SpelDocumentationTests extends AbstractExpressionTests {
static Inventor tesla ;
<nb> public class SpelReproTests extends AbstractExpressionTests {
}
@ test
+ @ suppresswarnings ( STRING0 )
public void SPR12522 ( ) {
SpelExpressionParser parser = new SpelExpressionParser ( ) ;
Expression expression = parser . parseExpression ( STRING1 ) ;
|
Suppress warnings in spring expression tests
|
<nb> public class WorldEdit {
if ( player . getItemInHand ( ) == config . wandItem ) {
if ( session . isToolControlEnabled ( )
&& player . hasPermission ( STRING0 ) ) {
- SINGLE
- if ( clicked . getBlockX ( ) == NUMBER0 && clicked . getBlockY ( ) == NUMBER0
- && clicked . getBlockZ ( ) == NUMBER0 ) {
- return false ;
- }
RegionSelector selector = session . getRegionSelector ( player . getWorld ( ) ) ;
if ( selector . selectPrimary ( clicked ) ) {
|
Removed old workaround from hmod
|
<nb> public class FindForeignKeyConstraintsGeneratorPostgres extends AbstractSqlGener
sb . append ( STRING0 ) ;
sb . append ( STRING1 ) ;
sb . append ( STRING2 ) ;
- sb . append ( STRING3 ) . append ( statement . getBaseTableName ( ) ) . append ( STRING4 ) ;
+ sb . append ( STRING5 ) . append ( statement . getBaseTableName ( ) . toLowerCase ( ) ) . append ( STRING4 ) ;
return new Sql [ ] {
new UnparsedSql ( sb . toString ( ) )
|
modified FindForeignKeyConstraintsGeneratorPostgres to do a case insensitive search
|
<nb> public abstract class OSoftThread extends Thread implements OService {
public void sendShutdown ( ) {
shutdownFlag = true ;
+ interrupt ( ) ;
}
public boolean isShutdownFlag ( ) {
|
Shutdown of OSoftThread now also interrupts the associated thread
|
<nb> public class Cache < K , V > {
COMMENT
COMMENT
public void invalidateAll ( ) {
- Entry < K , V > h = head ;
+ Entry < K , V > h ;
Arrays . stream ( segments ) . forEach ( segment - > segment . segmentLock . writeLock ( ) . lock ( ) ) ;
try ( ReleasableLock ignored = lruLock . acquire ( ) ) {
+ h = head ;
Arrays . stream ( segments ) . forEach ( segment - > segment . map = new HashMap < > ( ) ) ;
Entry < K , V > current = head ;
while ( current != null ) {
|
Preserve copy of head after taking lock on LRU list
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class SpannableStringBuilder implements CharSequence , GetChars , Spannable
COMMENT
COMMENT
@ suppresswarnings ( STRING0 )
- public < T > T [ ] getSpans ( int queryStart , int queryEnd , Class < T > kind ) {
- if ( kind == null || mSpanCount == NUMBER0 ) return ArrayUtils . emptyArray ( kind ) ;
+ public < T > T [ ] getSpans ( int queryStart , int queryEnd , @ nullable Class < T > kind ) {
+ if ( kind == null ) return ( T [ ] ) ArrayUtils . emptyArray ( Object . class ) ;
+ if ( mSpanCount == NUMBER0 ) return ArrayUtils . emptyArray ( kind ) ;
int count = countSpans ( queryStart , queryEnd , kind , treeRoot ( ) ) ;
if ( count == NUMBER0 ) {
return ArrayUtils . emptyArray ( kind ) ;
|
Fix unintentional NPE in SpannableStringBuilder
|
<nb> public class ByteBuddyPluginTest {
. forwardOutput ( )
. buildAndFail ( ) ;
assertThat ( result . getOutput ( ) , containsString ( STRING0 ) ) ;
- throw new AssertionError ( STRING1 ) ;
}
private void createSampleBuildFiles ( ) throws IOException {
|
Removed test assertion
|
<nb> public class AccessibilityManagerService extends IAccessibilityManager . Stub {
if ( ! permissionGranted ) {
return null ;
}
+ if ( mSecurityPolicy . mWindows == null ) {
+ return null ;
+ }
List < AccessibilityWindowInfo > windows = new ArrayList < > ( ) ;
final int windowCount = mSecurityPolicy . mWindows . size ( ) ;
for ( int i = NUMBER0 ; i < windowCount ; i ++ ) {
|
Fix a NPE in AccessiiblityManagerService
|
<nb> public class GLM2 extends Job . ModelJobWithoutClassificationField {
}
lambda = ( i >= lambda . length ) ? new double [ ] { lambda_max } : Arrays . copyOfRange ( lambda , i , lambda . length ) ;
}
+ _currentLambda = lambda [ NUMBER0 ] ;
}
_model = new GLMModel ( GLM2 . this , dest ( ) , _dinfo , _glm , beta_epsilon , alpha [ NUMBER0 ] , lambda_max , ymu , prior ) ;
_model . warnings = warns ;
|
Fixed GLM2 single lambda path
|
<nb> import NAMESPACE ;
try {
return o != null ? o . toString ( ) : null ;
} finally {
- o . dispose ( ) ;
+ if ( o != null ) {
+ o . dispose ( ) ;
+ }
}
}
@ marshalspointer
|
Fixed NPE in NSString AsStringMarshaler toObject
|
<nb> public class RemoteViews implements Parcelable , Filter {
method = methods . get ( mPair ) ;
if ( method == null ) {
try {
- method = klass . getMethod ( methodName , paramType ) ;
+ if ( paramType == null ) {
+ method = klass . getMethod ( methodName ) ;
+ } else {
+ method = klass . getMethod ( methodName , paramType ) ;
+ }
} catch ( NoSuchMethodException ex ) {
throw new ActionException ( STRING0 + klass . getName ( ) + STRING1
+ methodName + getParameters ( paramType ) ) ;
|
Fix crash in app widgets
|
<nb> public class RefsModel {
}
@ nullable
- public Ref refToCommit ( @ notnull Hash hash ) {
+ public ReadOnlyList < Ref > refsToCommit ( @ notnull Hash hash ) {
+ List < Ref > refs = new ArrayList < Ref > ( ) ;
if ( trackedHash . contains ( hash ) ) {
for ( Ref ref : allRefs ) {
if ( ref . getCommitHash ( ) . equals ( hash ) ) {
- return ref ;
+ refs . add ( ref ) ;
}
}
}
- return null ;
+ return ReadOnlyList . newReadOnlyList ( refs ) ;
}
public ReadOnlyList < Ref > localBranches ( ) {
|
fix returned type RefsModel refToCommit
|
<nb> public class TransportSQLActionTest extends SQLTransportIntegrationTest {
assertEquals ( NUMBER0 , response . rows ( ) [ NUMBER1 ] [ NUMBER1 ] ) ;
}
- COMMENT
@ test
public void testGroupByOnSysNodes ( ) throws Exception {
execute ( STRING0 ) ;
<nb> public class TransportSQLActionTest extends SQLTransportIntegrationTest {
execute ( STRING1 ) ;
assertThat ( response . rowCount ( ) , is ( NUMBER0 ) ) ;
}
- COMMENT
@ test
public void testSysCluster ( ) throws Exception {
|
re enabled a test
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
boolean isPowerStandbyOrTransient ( ) {
return mService . isPowerStandbyOrTransient ( ) ;
+ }
void displayOsd ( int messageId ) {
Intent intent = new Intent ( HdmiControlManager . ACTION_OSD_MESSAGE ) ;
|
Fix broken build
|
<nb> public class KeyguardViewManager {
}
private void inflateKeyguardView ( ) {
- if ( mKeyguardView != null ) {
- mKeyguardHost . removeView ( mKeyguardView ) ;
+ View v = mKeyguardHost . findViewById ( R . id . keyguard_host_view ) ;
+ if ( v != null ) {
+ mKeyguardHost . removeView ( v ) ;
}
SINGLE
Slog . d ( TAG , STRING0
|
Keep callback reference from being null
|
<nb> public class MBeanUtils {
name = new ObjectName ( sb . toString ( ) ) ;
return ( name ) ;
} catch ( Exception e ) {
- throw new MalformedObjectNameException
- ( STRING0 + connector + e ) ;
+ MalformedObjectNameException mone =
+ new MalformedObjectNameException
+ ( STRING0 + connector ) ;
+ mone . initCause ( e ) ;
+ throw mone ;
}
}
|
Don t swallow the exception
|
<nb> public class InfoAndProgressPanel extends JPanel implements CustomStatusBarWidge
add ( myRefreshAndInfoPanel , BorderLayout . CENTER ) ;
myProgressIcon . suspend ( ) ;
+ Container iconParent = myProgressIcon . getParent ( ) ;
+ if ( iconParent != null ) {
+ iconParent . remove ( myProgressIcon ) ; SINGLE
+ }
+
myRefreshAndInfoPanel . revalidate ( ) ;
myRefreshAndInfoPanel . repaint ( ) ;
}
|
prevent progress leaks via myProgressIcon
|
<nb> public class GenericAStar {
+ v . getVertex ( ) ) ;
}
- if ( estimate > options . maxWeight || isWorstTimeExceeded ( v , options ) ) {
+ if ( estimate > options . maxWeight ) {
SINGLE
+ if ( _verbose )
+ System . out . println ( STRING0 + estimate ) ;
+ } else if ( isWorstTimeExceeded ( v , options ) ) {
+ SINGLE
+ if ( _verbose )
+ System . out . println ( STRING1 + v . getTime ( ) ) ;
} else {
if ( spt . add ( v ) ) {
pq . insert ( v , estimate ) ;
- }
+ }
}
}
}
|
Add verbose output about exceeding weight and time limits
|
<nb> public class LogNormalizer extends BaseNormalizer < LogDto , LogKey > {
logDoc . put ( LogFields . EXECUTION . field ( ) , dto . getExecutionTime ( ) ) ;
logDoc . put ( LogFields . DATE . field ( ) , dto . getCreatedAt ( ) ) ;
- System . out . println ( STRING0 + KeyValueFormat . parse ( dto . getData ( ) ) ) ;
-
logDoc . put ( LogFields . DETAILS . field ( ) , KeyValueFormat . parse ( dto . getData ( ) ) ) ;
COMMENT
|
fix quality flaw debug available
|
<nb> public class LwjglGraphics implements Graphics {
Display . create ( new PixelFormat ( config . r + config . g + config . b , config . a , config . depth , config . stencil ,
config . samples ) , context ) ;
} catch ( Exception e ) {
- Display . create ( new PixelFormat ( config . r + config . g + config . b , config . a , config . depth , config . stencil ,
- config . samples ) , context ) ;
System . out . println ( STRING0 ) ;
+ throw e ;
}
System . out . println ( STRING1 ) ;
} else {
|
Throw exception if display couldn t be created
|
<nb> public class SettingsBackupAgent extends BackupAgentHelper {
if ( scanAlways != NUMBER0 ) {
Settings . Global . putInt ( cr ,
Settings . Global . WIFI_SCAN_ALWAYS_AVAILABLE , NUMBER0 ) ;
- SINGLE
- try { Thread . sleep ( NUMBER1 ) ; } catch ( InterruptedException e ) { }
}
+ SINGLE
+ try { Thread . sleep ( NUMBER2 ) ; } catch ( InterruptedException e ) { }
if ( restoredSupplicantData != null ) {
restoreWifiSupplicant ( FILE_WIFI_SUPPLICANT ,
restoredSupplicantData , restoredSupplicantData . length ) ;
|
Always give wifi a chance to quiet down during restore
|
<nb> public class KeyguardViewMediator implements KeyguardViewCallback ,
private void handleHide ( ) {
synchronized ( KeyguardViewMediator . this ) {
if ( DEBUG ) Log . d ( TAG , STRING0 ) ;
+ if ( mWakeAndHandOff . isHeld ( ) ) {
+ Log . w ( TAG , STRING1 ) ;
+ return ;
+ }
SINGLE
mRealPowerManager . enableUserActivity ( true ) ;
|
Ignore requests to hide the keyguard if we are in the process of waking up
|
<nb> public class ReconCandidate implements HasFields , Jsonizable {
public Object getField ( String name , Properties bindings ) {
if ( STRING0 . equals ( name ) ) {
- return topicName ;
+ return topicID ;
} else if ( STRING1 . equals ( name ) ) {
return topicGUID ;
} else if ( STRING2 . equals ( name ) ) {
|
recon candidate s id field should return id not name
|
<nb> public final class CookieManager {
SINGLE
SINGLE
- if ( length - index > SECURE_LENGTH
+ if ( length - index >= SECURE_LENGTH
&& cookieString . substring ( index , index + SECURE_LENGTH ) .
equalsIgnoreCase ( SECURE ) ) {
index += SECURE_LENGTH ;
cookie . secure = true ;
+ if ( index == length ) break ;
if ( cookieString . charAt ( index ) == EQUAL ) index ++ ;
continue ;
}
SINGLE
SINGLE
- if ( length - index > HTTP_ONLY_LENGTH
+ if ( length - index >= HTTP_ONLY_LENGTH
&& cookieString . substring ( index ,
index + HTTP_ONLY_LENGTH ) .
equalsIgnoreCase ( HTTP_ONLY ) ) {
index += HTTP_ONLY_LENGTH ;
+ if ( index == length ) break ;
if ( cookieString . charAt ( index ) == EQUAL ) index ++ ;
SINGLE
continue ;
|
Fix a cookie bug
|
<nb> public class TermsStatsFacetBuilder extends AbstractFacetBuilder {
builder . endObject ( ) ;
+ addFilterFacetAndGlobal ( builder , params ) ;
+
builder . endObject ( ) ;
return builder ;
|
add filter and scope parameters when creating terms stats facet
|
<nb> public class GenAidlTest {
@ test
public void testSimpleGenAidlRule ( ) throws IOException {
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
ProjectFilesystem stubFilesystem = FakeProjectFilesystem . createJavaOnlyFilesystem ( ) ;
Files . createDirectories ( stubFilesystem . getRootPath ( ) . resolve ( STRING0 ) ) ;
|
Remove commented out code
|
<nb> public class ClientReplicatedMapProxy < K , V >
extends ClientProxy
implements ReplicatedMap < K , V > {
- private static final Random RANDOM_PARTITION_ID_GENERATOR = new Random ( ) ;
-
protected static final String NULL_KEY_IS_NOT_ALLOWED = STRING0 ;
protected static final String NULL_VALUE_IS_NOT_ALLOWED = STRING1 ;
+ private static final Random RANDOM_PARTITION_ID_GENERATOR = new Random ( ) ;
private static final AtomicIntegerFieldUpdater < ClientReplicatedMapProxy > TARGET_PARTITION_ID_UPDATER =
AtomicIntegerFieldUpdater . newUpdater ( ClientReplicatedMapProxy . class , STRING2 ) ;
|
Fix checkstyle issue in ClientReplicatedMapProxy
|
<nb> public class ExpandableHeaderItem
public ExpandableHeaderItem ( String id ) {
super ( id ) ;
- SINGLE
+ SINGLE
setHidden ( false ) ;
setExpanded ( true ) ;
- setSelectable ( true ) ;
+ setSelectable ( false ) ;
}
@ override
<nb> public abstract class AbstractFlexibleItem < VH extends RecyclerView . ViewHolder >
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Added some comments on item interfaces
|
<nb> public class MainActivity extends ActionBarActivity {
inflater . inflate ( R . menu . menu_main , menu ) ;
MenuItem menuItem = menu . findItem ( R . id . action_opensource ) ;
- menuItem . setIcon ( new IconicsDrawable ( this , FontAwesome . Icon . faw_github ) . actionBarSize ( ) . color ( Color . WHITE ) ) ;
+ menuItem . setIcon ( new IconicsDrawable ( this , FontAwesome . Icon . faw_github ) . actionBar ( ) . color ( Color . WHITE ) ) ;
SINGLE
|
use new actionBar method
|
<nb> public class Http1xTest extends HttpTest {
} ) ;
req1 . end ( ) ;
Consumer < HttpClientRequest > checker = req - > {
- if ( req1 . connection ( ) == req . connection ( ) ) {
- assertSame ( Vertx . currentContext ( ) , c . get ( ) ) ;
- } else {
- SINGLE
- }
+ assertSame ( Vertx . currentContext ( ) , c . get ( ) ) ;
+ assertSame ( req1 . connection ( ) , req . connection ( ) ) ;
} ;
awaitLatch ( req1Latch ) ;
CountDownLatch req2Latch = new CountDownLatch ( NUMBER0 ) ;
|
Fix test after feedback
|
<nb> public abstract class AbstractSockJsIntegrationTests {
this . wac . register ( TestConfig . class , upgradeStrategyConfigClass ( ) ) ;
this . wac . refresh ( ) ;
this . server = createWebSocketTestServer ( ) ;
+ this . server . setup ( ) ;
this . server . deployConfig ( this . wac , this . errorFilter ) ;
this . server . start ( ) ;
this . baseUrl = STRING0 + this . server . getPort ( ) ;
|
Fix failing test
|
<nb> public class Comparing {
}
}
+ public static < T > boolean equal ( T [ ] arr1 , T [ ] arr2 ) {
+ return Arrays . equals ( arr1 , arr2 ) ;
+ }
+
+ public static boolean equal ( CharSequence s1 , CharSequence s2 ) {
+ return equal ( s1 , s2 , false ) ;
+ }
+
+ public static boolean equal ( String arg1 , String arg2 ) {
+ return equal ( arg1 , arg2 , false ) ;
+ }
+
public static boolean equal ( CharSequence s1 , CharSequence s2 , boolean ignoreCase ) {
if ( s1 == s2 ) return true ;
if ( s1 == null || s2 == null ) return false ;
|
add overloads to improve performance
|
<nb> import NAMESPACE ;
import NAMESPACE ;
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 ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TimeoutExchangeTest
@ test
public void testExchangeTimeoutExpiring ( ) throws Exception
{
- startClient ( NUMBER0 ) ;
+ startClient ( NUMBER1 ) ;
- long serverSleep = NUMBER2 ;
+ long serverSleep = NUMBER3 ;
long exchangeTimeout = NUMBER4 ;
CustomContentExchange httpExchange = new CustomContentExchange ( ) ;
|
Adjusted TimeoutExchangeTest timeouts
|
<nb> import NAMESPACE ;
COMMENT
public class FolderComposite extends Composite implements IFolderContainer {
- public static final int MIN_PANE_HEIGHT = NUMBER0 ;
+ public static final int MIN_PANE_HEIGHT = NUMBER1 ;
@ notnull
private final Composite compositePane ;
@ nullable
<nb> public class FolderComposite extends Composite implements IFolderContainer {
e . doit = false ;
return ;
}
-
+ SINGLE
if ( Math . abs ( shift ) > NUMBER2 ) {
- shiftPane ( FolderPane . this , shift ) ;
+ FolderComposite . this . setRedraw ( false ) ;
+ try {
+ shiftPane ( FolderPane . this , shift ) ;
+ } finally {
+ FolderComposite . this . setRedraw ( true ) ;
+ }
}
}
} ) ;
<nb> public class FolderComposite extends Composite implements IFolderContainer {
SINGLE
}
COMMENT
- System . out . println ( shift ) ;
}
private FolderPane getNextFolderPane ( FolderPane pane ) {
|
Folders divider UI
|
<nb>
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Updated the package description
|
<nb> public class DefaultTrustedSocketFactory implements TrustedSocketFactory {
STRING0 , STRING1 , STRING2
} ;
+ protected static final String [ ] BLACKLISTED_PROTOCOLS = {
+ STRING3
+ } ;
+
static {
String [ ] enabledCiphers = null ;
String [ ] supportedProtocols = null ;
<nb> public class DefaultTrustedSocketFactory implements TrustedSocketFactory {
reorder ( enabledCiphers , ORDERED_KNOWN_CIPHERS , BLACKLISTED_CIPHERS ) ;
ENABLED_PROTOCOLS = ( supportedProtocols == null ) ? null :
- reorder ( supportedProtocols , ORDERED_KNOWN_PROTOCOLS , null ) ;
+ reorder ( supportedProtocols , ORDERED_KNOWN_PROTOCOLS , BLACKLISTED_PROTOCOLS ) ;
}
public DefaultTrustedSocketFactory ( Context context ) {
|
Create a protocols blacklist that should work in the same way as the ciphers one does
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
<nb> public class TaskList extends Activity {
} ) ;
fillData ( ) ;
-
- Notifications . showNotification ( this , NUMBER0 , NUMBER1 , STRING0 ) ;
}
@ override
|
Removed debugging code
|
<nb> public final class JournalTool {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Incorporated PR comment
|
<nb> public class SimpleDrawerActivity extends ActionBarActivity {
outState = result . saveInstanceState ( outState ) ;
super . onSaveInstanceState ( outState ) ;
}
+
+ @ override
+ public void onBackPressed ( ) {
+ if ( result != null && result . isDrawerOpen ( ) ) {
+ result . closeDrawer ( ) ;
+ } else {
+ super . onBackPressed ( ) ;
+ }
+ }
+
}
|
add sample how to implement the onBackPressed functionality
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- @ suppresswarnings ( { STRING0 } ) SINGLE
+ @ suppresswarnings ( { STRING0 } ) SINGLE
public final class IterationState {
private static final Logger LOG = Logger . getInstance ( STRING1 ) ;
private final TextAttributes myMergedAttributes = new TextAttributes ( ) ;
|
fixed spelling in comment
|
<nb> public class MiniDrawer {
int identifier = selectedDrawerItem . getIdentifier ( ) ;
SINGLE
- if ( mDrawer != null ) {
- for ( IDrawerItem drawerItem : mDrawerAdapter . getDrawerItems ( ) ) {
- drawerItem . withSetSelected ( drawerItem . getIdentifier ( ) == identifier ) ;
- }
- mDrawerAdapter . notifyDataSetChanged ( ) ;
- }
+ setSelection ( identifier ) ;
return false ;
} else {
<nb> public class MiniDrawer {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void setSelection ( int identifier ) {
+ for ( IDrawerItem drawerItem : mDrawerAdapter . getDrawerItems ( ) ) {
+ drawerItem . withSetSelected ( drawerItem . getIdentifier ( ) == identifier ) ;
+ }
+ mDrawerAdapter . notifyDataSetChanged ( ) ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
add new API method to set the selection of the MiniDrawer
|
<nb>
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class MyApplication extends Application {
final Set < Class < ? > > classes = new HashSet < Class < ? > > ( ) ;
SINGLE
classes . add ( MessageBoardRootResource . class ) ;
- classes . add ( MessageBoardResourceBean . class ) ;
classes . add ( MessageHolderSingletonBean . class ) ;
classes . add ( NotFoundExceptionMapper . class ) ;
classes . add ( MessageWriter . class ) ;
|
fixed validation issue in jersey ejb example
|
<nb> class ActionBarActivityDelegateBase extends ActionBarActivityDelegate
public View onCreatePanelView ( int featureId ) {
View createdPanelView = null ;
- if ( featureId == Window . FEATURE_OPTIONS_PANEL && preparePanel ( ) ) {
+ if ( featureId == Window . FEATURE_OPTIONS_PANEL && mActionMode == null && preparePanel ( ) ) {
createdPanelView = ( View ) getListMenuView ( mActivity ) ;
}
|
Don t show list menu when an action mode is displayed
|
<nb> class InjectorImpl implements Injector {
SINGLE
if ( providedBinding == null ) {
- handleMissingBinding ( this , key ) ;
+ handleMissingBinding ( key ) ;
return invalidBinding ( key ) ;
}
|
I inadvertently passed the wrong source in the compile time refactoring
|
<nb> import static NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import static NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import static NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fixed some issues in the javadoc
|
<nb> public class ServerContainerImpl extends WsWebSocketContainer {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public void deploy ( ServerEndpointConfiguration sec )
<nb> public class ServerContainerImpl extends WsWebSocketContainer {
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix Javadoc warnings
|
<nb> public class AtmosphereFramework implements ServletContextProvider {
public AtmosphereFramework removeAtmosphereHandler ( String mapping ) {
if ( mapping . endsWith ( STRING0 ) ) {
- mapping += STRING1 ;
+ mapping += STRING2 ;
}
if ( mapping . contains ( STRING3 ) ) {
- mapping = mapping . replace ( STRING3 , STRING1 ) ;
+ mapping = mapping . replace ( STRING3 , STRING2 ) ;
}
atmosphereHandlers . remove ( mapping ) ;
|
Fix test regression
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
<nb> public abstract class SentenceAnnotator implements Annotator {
SINGLE
SINGLE
wrapper . shutdownNow ( ) ;
- SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
wrapper = buildWrapper ( annotation ) ;
}
}
|
Add some comments on why the annotator doesn t wait until all child threads are done when they are interrupted
|
<nb> public class ProtoBufInputRowParser implements ByteBufferInputRowParser
@ override
public InputRow parse ( ByteBuffer input )
{
-
+ SINGLE
+ SINGLE
Map < String , Object > theMap = buildStringKeyMap ( input ) ;
return inputRowCreator . parse ( theMap ) ;
|
added comment on a possible protobuf message based in put row optimization
|
<nb> public class OsmandApplication extends Application {
manager . close ( ) ;
}
applicationInitializing = false ;
+ if ( getNavigationService ( ) != null ) {
+ final Intent serviceIntent = new Intent ( this , NavigationService . class ) ;
+ stopService ( serviceIntent ) ;
+ }
SINGLE
System . runFinalizersOnExit ( true ) ;
System . exit ( NUMBER0 ) ;
|
Fix application close suggest to kill background service on close
|
<nb> public class DirectionUtils {
geodeticCalculator = new GeodeticCalculator ( ) ;
}
- private static DirectionUtils getInstance ( ) {
+ private static synchronized DirectionUtils getInstance ( ) {
if ( instance == null ) {
instance = new DirectionUtils ( ) ;
}
<nb> public class DirectionUtils {
COMMENT
COMMENT
COMMENT
- public static double getLastAngle ( Geometry geometry ) {
+ public static synchronized double getLastAngle ( Geometry geometry ) {
LineString line ;
if ( geometry instanceof MultiLineString ) {
line = ( LineString ) geometry . getGeometryN ( geometry . getNumGeometries ( ) - NUMBER0 ) ;
<nb> public class DirectionUtils {
COMMENT
COMMENT
COMMENT
- public static double getFirstAngle ( Geometry geometry ) {
+ public static synchronized double getFirstAngle ( Geometry geometry ) {
LineString line ;
if ( geometry instanceof MultiLineString ) {
line = ( LineString ) geometry . getGeometryN ( NUMBER1 ) ;
|
make directionutils thread safe
|
<nb> public class PreviewTextFragment extends FileFragment {
item . setVisible ( false ) ;
item . setEnabled ( false ) ;
}
+
+ item = menu . findItem ( R . id . action_switch_view ) ;
+ if ( item != null ) {
+ item . setVisible ( false ) ;
+ item . setEnabled ( false ) ;
+ }
}
COMMENT
|
do not show switch menu item on file details preview text video audio
|
<nb> public class Timetable implements Serializable {
if ( adjustedTime == - NUMBER0 ) continue ;
if ( boarding ) {
int depTime = tt . getDepartureTime ( stopIndex ) ;
- if ( depTime < NUMBER1 ) continue ;
+ if ( depTime < NUMBER1 ) continue ; SINGLE
+ SINGLE
+ SINGLE
if ( depTime >= adjustedTime && depTime < bestTime ) {
bestTrip = tt ;
bestTime = depTime ;
<nb> public class Timetable implements Serializable {
LOG . debug ( STRING0 , freq ) ;
if ( boarding ) {
int depTime = freq . nextDepartureTime ( stopIndex , adjustedTime ) ; SINGLE
- if ( depTime < NUMBER1 ) continue ;
+ if ( depTime < NUMBER1 ) continue ;
if ( depTime >= adjustedTime && depTime < bestTime ) {
bestFreq = freq ;
bestTime = depTime ;
|
Add a comment about negative trip times
|
<nb> public class OperationSetBasicInstantMessagingJabberImpl
if ( failedKeepalivePackets == NUMBER0 )
{
logger . error ( STRING0 ) ;
- SINGLE
- jabberProvider
- . reregister ( SecurityAuthority . CONNECTION_FAILED ) ;
+
+ jabberProvider . unregister ( false ) ;
+
+ jabberProvider . fireRegistrationStateChanged (
+ jabberProvider . getRegistrationState ( ) ,
+ RegistrationState . CONNECTION_FAILED ,
+ RegistrationStateChangeEvent . REASON_SERVER_NOT_FOUND ,
+ null ) ;
+
failedKeepalivePackets = NUMBER1 ;
}
}
<nb> public class ProtocolProviderServiceJabberImpl
COMMENT
COMMENT
COMMENT
- private void unregister ( boolean fireEvent )
+ void unregister ( boolean fireEvent )
{
synchronized ( initializationLock )
{
|
Fix jabber keepalive thread to change state and not trigger re registering
|
<nb> import NAMESPACE
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
exclude = { HibernateJpaAutoConfiguration . class ,
JerseyAutoConfiguration . class ,
GroovyTemplateAutoConfiguration . class ,
+ JmxAutoConfiguration . class ,
DataSourceAutoConfiguration . class ,
DataSourceTransactionManagerAutoConfiguration . class ,
MetricsDropwizardAutoConfiguration . class ,
|
Reorganized order of auto config modules
|
<nb>
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class SmackExecutorThreadFactory implements ThreadFactory {
@ override
public Thread newThread ( Runnable runnable ) {
Thread thread = new Thread ( runnable ) ;
- thread . setName ( STRING0 + name + STRING1 + count ++ + STRING2 + connectionCounterValue + STRING3 ) ;
+ thread . setName ( STRING4 + name + STRING1 + count ++ + STRING2 + connectionCounterValue + STRING3 ) ;
thread . setDaemon ( true ) ;
return thread ;
}
|
Shorten Smack s executor service names
|
<nb> public interface EntryProcessor < K , V > extends Serializable {
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
EntryProcessor added information about getBackupProcessor returning null
|
<nb> public class NotifyNotInSynchronizedContextInspection extends ExpressionInspecti
public void visitMethodCallExpression ( @ notnull PsiMethodCallExpression expression ) {
final PsiReferenceExpression methodExpression = expression . getMethodExpression ( ) ;
- if ( methodExpression == null ) {
- return ;
- }
final String methodName = methodExpression . getReferenceName ( ) ;
@ nonnls final String notify = STRING0 ;
@ nonnls final String notifyAll = STRING1 ;
<nb> public class NotifyNotInSynchronizedContextInspection extends ExpressionInspecti
return ;
}
final PsiParameterList paramList = method . getParameterList ( ) ;
- if ( paramList == null ) {
- return ;
- }
final PsiParameter [ ] parameters = paramList . getParameters ( ) ;
final int numParams = parameters . length ;
if ( numParams != NUMBER0 ) {
|
remove unneeded null checks
|
<nb> public class GccToolChain extends AbstractToolChain implements Gcc {
private List < String > gccSwitches ( ) {
switch ( targetPlatform . getArchitecture ( ) ) {
case I386 :
- return args ( STRING0 ) ;
+ return args ( STRING0 , STRING1 ) ;
case AMD64 :
- return args ( STRING2 ) ;
+ return args ( STRING2 , STRING1 ) ;
default :
return args ( ) ;
}
|
Temporarily turn on verbose output for GCC when using an architecture option
|
<nb> public class FunctionRegistry
}
}
- throw new IllegalArgumentException ( format ( STRING0 , name , Joiner . on ( STRING1 ) . join ( parameterTypes ) ) ) ;
+ String parameters = Joiner . on ( STRING1 ) . useForNull ( STRING2 ) . join ( parameterTypes ) ;
+ throw new IllegalArgumentException ( format ( STRING0 , name , parameters ) ) ;
}
public FunctionInfo get ( FunctionHandle handle )
|
Fix NPE for null scalar function arguments
|
<nb> public interface RegisteredService extends Cloneable , Serializable {
COMMENT
COMMENT
boolean matches ( final Service service ) ;
-
COMMENT
COMMENT
<nb> public interface RegisteredService extends Cloneable , Serializable {
AttributeReleasePolicy getAttributeReleasePolicy ( ) ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
URL getLogo ( ) ;
}
|
Fixed typo and updated Javadocs for the logo fields again
|
<nb> public class AudioService extends IAudioService . Stub {
if ( state != AudioSystem . getMasterMute ( ) ) {
AudioSystem . setMasterMute ( state ) ;
SINGLE
- sendMsg ( mAudioHandler , MSG_PERSIST_MASTER_VOLUME_MUTE , NUMBER0 , SENDMSG_REPLACE , state ? NUMBER1
+ sendMsg ( mAudioHandler , MSG_PERSIST_MASTER_VOLUME_MUTE , SENDMSG_REPLACE , state ? NUMBER1
: NUMBER0 , NUMBER0 , null , PERSIST_DELAY ) ;
sendMasterMuteUpdate ( state , AudioManager . FLAG_SHOW_UI ) ;
}
|
Fix the build
|
<nb> public class AddAction implements Runnable {
throw new IllegalArgumentException (
format ( STRING0 , key ) ) ;
}
- if ( ! key . matches ( STRING1 ) ) {
+ if ( ! key . matches ( STRING2 ) ) {
throw new IllegalArgumentException (
- format ( STRING3 , key ) ) ;
+ format ( STRING4 , key ) ) ;
}
}
<nb> public class CreateOrUpdateAction implements Runnable {
throw new IllegalArgumentException (
format ( STRING0 , key ) ) ;
}
- if ( ! key . matches ( STRING1 ) ) {
+ if ( ! key . matches ( STRING2 ) ) {
throw new IllegalArgumentException (
- format ( STRING3 , key ) ) ;
+ format ( STRING4 , key ) ) ;
}
}
|
Updates metadata key name restrictions to match secret name restrictions
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public class MacHelpUtil {
}
static boolean isApplicable ( ) {
- return SystemInfo . isMac && Registry . is ( STRING0 , false ) ;
+ return SystemInfo . isMac && Registry . is ( STRING0 , false ) && ! PlatformUtils . isCidr ( ) && ! PlatformUtils . isCommunity ( ) ;
}
}
|
AC CE don t bundle help
|
<nb> public class ConcurrentLoader implements Loader {
}
private LoaderTask createTask ( ImageWrapper imageWrapper ) {
- return onImageLoadedListener == null ? new LoaderTask ( imageWrapper , loaderSettings ) :
- new LoaderTask ( imageWrapper , loaderSettings , onImageLoadedListener ) ;
+ return onImageLoadedListener == null ? new LoaderTask ( imageWrapper , loaderSettings )
+ : new LoaderTask ( imageWrapper , loaderSettings , onImageLoadedListener ) ;
}
@ override
<nb> public abstract class ImageLoaderBaseActivity extends Activity implements View . O
}
private boolean intentHasAnimation ( ) {
- return getIntent ( ) . hasExtra ( STRING0 ) &&
- getIntent ( ) . getIntExtra ( STRING0 , AnimationHelper . ANIMATION_DISABLED ) != AnimationHelper . ANIMATION_DISABLED ;
+ return getIntent ( ) . hasExtra ( STRING0 ) && getIntent ( ) . getIntExtra ( STRING0 , AnimationHelper . ANIMATION_DISABLED ) != AnimationHelper . ANIMATION_DISABLED ;
}
}
|
Fixing checkstyle reports about OperatorWrapCheck
|
<nb> public final class FunctionRegistry {
COMMENT
COMMENT
COMMENT
- public static boolean isRankingFunction ( String name ) {
+ public static boolean isRankingFunction ( String name ) {
FunctionInfo info = getFunctionInfo ( name ) ;
+ if ( info == null ) {
+ return false ;
+ }
GenericUDAFResolver res = info . getGenericUDAFResolver ( ) ;
- if ( res != null ) {
- WindowFunctionDescription desc =
- AnnotationUtils . getAnnotation ( res . getClass ( ) , WindowFunctionDescription . class ) ;
- if ( desc != null ) {
- return desc . rankingFunction ( ) ;
- }
+ if ( res == null ) {
+ return false ;
}
- return false ;
+ WindowFunctionDescription desc =
+ AnnotationUtils . getAnnotation ( res . getClass ( ) , WindowFunctionDescription . class ) ;
+ return ( desc != null ) && desc . rankingFunction ( ) ;
}
COMMENT
|
NPE in FunctionRegistry affects CBO in negative tests Sergey Shelukhin reviewed by Ashutosh Chauhan
|
<nb> public class AppWidgetHost {
break ;
}
case HANDLE_PROVIDERS_CHANGED : {
- onProvidersChanged ( msg . arg1 ) ;
+ onProvidersChanged ( ) ;
break ;
}
case HANDLE_VIEW_DATA_CHANGED : {
<nb> public class AppWidgetHost {
COMMENT
COMMENT
protected void onProvidersChanged ( ) {
- onProvidersChanged ( mContext . getUserId ( ) ) ;
- }
-
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- protected void onProvidersChanged ( int userId ) {
SINGLE
}
|
Fixing issue where AppWidgetHost onProvidersChanged was not being called
|
<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 class GithubRepository extends BaseRepositoryImpl {
@ override
public CancellableConnection createCancellableConnection ( ) {
return new CancellableConnection ( ) {
+ private final GithubConnection myConnection = new GithubConnection ( getAuthData ( ) , false ) ;
+
@ override
protected void doTest ( ) throws Exception {
- getIssues ( STRING0 , NUMBER0 , false ) ;
+ try {
+ GithubApiUtil . getIssuesQueried ( myConnection , getRepoAuthor ( ) , getRepoName ( ) , STRING0 , false ) ;
+ }
+ catch ( GithubOperationCanceledException ignore ) {
+ }
}
@ override
public void cancel ( ) {
- SINGLE
+ myConnection . abort ( ) ;
}
} ;
}
|
implement abortable connection check
|
<nb> public final class TreeWalker
private final int mTabWidth ;
COMMENT
private final PropertyCacheFile mCache ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
private final GlobalProperties mConfig ;
COMMENT
|
added todo comment about GlobalConfiguration field
|
<nb> public class WebServer {
}
}
+ @ suppresswarnings ( STRING0 )
public class WebServerException extends Exception {
public WebServerException ( String message , Exception clause ) {
|
Add SuppressWarnings serial to an Exception
|
<nb> public class Reader {
}
private static boolean isValidResponse ( Type type ) {
+ if ( type == null ) {
+ return false ;
+ }
final JavaType javaType = TypeFactory . defaultInstance ( ) . constructType ( type ) ;
if ( isVoid ( javaType ) ) {
return false ;
|
Fixed handling of missing responseType when there is a reference
|
<nb> public class LayerDrawable extends Drawable implements Drawable . Callback {
COMMENT
public boolean setDrawableByLayerId ( int id , Drawable drawable ) {
final ChildDrawable [ ] layers = mLayerState . mChildren ;
- if ( drawable != null ) drawable . setCallback ( mCallback ) ;
+ drawable . setCallback ( this ) ;
for ( int i = mLayerState . mNum - NUMBER0 ; i >= NUMBER1 ; i -- ) {
if ( layers [ i ] . mId == id ) {
|
Set a layered drawable s child callback to be the container
|
<nb> class ConnectionThread extends Thread {
COMMENT
public void run ( ) {
android . os . Process . setThreadPriority (
+ android . os . Process . THREAD_PRIORITY_DEFAULT +
android . os . Process . THREAD_PRIORITY_LESS_FAVORABLE ) ;
SINGLE
|
Correctly set the thread priority for ConnectionThreads
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Inventories {
private PokeBank pokebank ;
@ getter
private CandyJar candyjar ;
+ @ getter
+ private PlayerStatsOuterClass . PlayerStats stats ;
private long lastInventoryUpdate = NUMBER0 ;
<nb> public class Inventories {
inventoryItem . getInventoryItemData ( ) . getPokemonFamily ( ) . getCandy ( )
) ;
}
+ if ( inventoryItem . getInventoryItemData ( ) . hasPlayerStats ( ) ) {
+ stats = inventoryItem . getInventoryItemData ( ) . getPlayerStats ( ) ;
+ }
}
lastInventoryUpdate = System . currentTimeMillis ( ) ;
|
Added Player Stats
|
<nb> public class OCommandExecutorSQLLiveSelect extends OCommandExecutorSQLSelect imp
public void onLiveResult ( final ORecordOperation iOp ) {
ODatabaseDocumentInternal oldThreadLocal = ODatabaseRecordThreadLocal . INSTANCE . getIfDefined ( ) ;
- if ( oldThreadLocal == null ) {
- execDb . activateOnCurrentThread ( ) ;
- }
+ execDb . activateOnCurrentThread ( ) ;
+
try {
final OIdentifiable value = iOp . getRecord ( ) ;
<nb> public class OCommandExecutorSQLLiveSelect extends OCommandExecutorSQLSelect imp
} finally {
if ( oldThreadLocal == null ) {
ODatabaseRecordThreadLocal . INSTANCE . remove ( ) ;
+ } else {
+ ODatabaseRecordThreadLocal . INSTANCE . set ( oldThreadLocal ) ;
}
}
final OCommandResultListener listener = request . getResultListener ( ) ;
|
Fix ThreadLocal db on LiveQuery
|
<nb> public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme
log . trace ( ex ) ;
}
}
- execute ( builder . setUrl ( url . toString ( ) ) . build ( ) , future ) ;
+
+ String newUrl = url . toString ( ) ;
+ if ( log . isDebugEnabled ( ) ) {
+ log . debug ( String . format ( STRING0 , newUrl ) ) ;
+ }
+
+ execute ( builder . setUrl ( newUrl ) . build ( ) , future ) ;
return ;
} else {
throw new MaxRedirectException ( STRING1 + config . getMaxRedirects ( ) ) ;
|
Improve logging when a redirect happens
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
remove an unused import
|
<nb> public abstract class TypeIntrospectionBase {
private volatile boolean introspected ;
protected ImmutableList < String > extendedClassesNames ;
protected ImmutableSet < String > implementedInterfacesNames ;
- protected ImmutableList < TypeElement > implementedInterfaceElements ;
protected abstract TypeMirror internalTypeMirror ( ) ;
<nb> public abstract class TypeIntrospectionBase {
FluentIterable < DeclaredType > superIntefaceTypes =
FluentIterable . from ( implementedInterfaces )
. filter ( DeclaredType . class ) ;
-
+ COMMENT
Iterable < TypeElement > superIntefaces =
superIntefaceTypes
. transform ( ToDeclaredTypeElement . FUNCTION )
<nb> public abstract class TypeIntrospectionBase {
superIntefaces = FluentIterable . from ( superIntefaces ) . toSet ( ) ;
implementedInterfaceElements = ImmutableList . copyOf ( superIntefaces ) . reverse ( ) ;
-
+ COMMENT
implementedInterfacesNames = superIntefaceTypes
. transform ( ToNameOfTypeElement . FUNCTION )
. toSet ( ) ;
|
removing unnecessary implementation code
|
<nb> import NAMESPACE ;
COMMENT
public class RandomAccessSparseVector extends AbstractVector {
- private static final int INITIAL_SIZE = NUMBER0 ;
+ private static final int INITIAL_CAPACITY = NUMBER0 ;
private OpenIntDoubleHashMap values ;
<nb> public class RandomAccessSparseVector extends AbstractVector {
}
public RandomAccessSparseVector ( int cardinality ) {
- this ( cardinality , Math . min ( cardinality , INITIAL_SIZE ) ) ; SINGLE
+ this ( cardinality , Math . min ( cardinality , INITIAL_CAPACITY ) ) ; SINGLE
}
- public RandomAccessSparseVector ( int cardinality , int size ) {
+ public RandomAccessSparseVector ( int cardinality , int initialCapacity ) {
super ( cardinality ) ;
- values = new OpenIntDoubleHashMap ( size ) ;
+ values = new OpenIntDoubleHashMap ( initialCapacity ) ;
}
public RandomAccessSparseVector ( Vector other ) {
|
renaming constructor arg in RandomAccessSparseVector for more clarity
|
<nb> public class IconUtil {
}
return ourIconProviders ;
}
- public static Icon markWithError ( Icon baseIcon ) {
- LayeredIcon icon = new LayeredIcon ( NUMBER0 ) ;
- Icon error = IconLoader . getIcon ( STRING0 ) ;
- icon . setIcon ( error , NUMBER1 ) ;
- icon . setIcon ( redden ( baseIcon ) , NUMBER2 , error . getIconWidth ( ) , NUMBER1 ) ;
- return icon ;
- }
+
public static Icon redden ( Icon icon ) {
GraphicsEnvironment ge = GraphicsEnvironment . getLocalGraphicsEnvironment ( ) ;
GraphicsConfiguration gc = ge . getDefaultScreenDevice ( ) . getDefaultConfiguration ( ) ;
|
delete unused icon
|
<nb> public class UISettings extends SimpleModificationTracker implements PersistentS
SystemProperties . getBooleanProperty ( STRING0 , false ) ;
public static void setupFractionalMetrics ( final Graphics2D g2d ) {
- if ( FORCE_USE_FRACTIONAL_METRICS ) {
+ if ( ( SystemInfo . isMac && ! SystemInfo . isAppleJvm ) || FORCE_USE_FRACTIONAL_METRICS ) {
g2d . setRenderingHint ( RenderingHints . KEY_FRACTIONALMETRICS , RenderingHints . VALUE_FRACTIONALMETRICS_ON ) ;
}
}
|
Narrowing fractional metrics usage to non apple jvms on macs only
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
public class LocalSession {
+
+ private static final boolean SHOW_HELP_MESSAGE = false ;
+
public static int MAX_HISTORY_SIZE = NUMBER0 ;
public static int EXPIRATION_GRACE = NUMBER1 ;
<nb> public class LocalSession {
COMMENT
COMMENT
COMMENT
+ @ suppresswarnings ( { STRING0 , STRING1 } )
public void tellVersion ( Actor player ) {
- if ( config . showHelpInfo ) {
+ if ( config . showHelpInfo && SHOW_HELP_MESSAGE ) {
if ( ! beenToldVersion ) {
StyledFragment fragment = new StyledFragment ( Style . GRAY_DARK ) ;
fragment . append ( STRING2 ) ;
|
Disable first time help message for now
|
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+
package NAMESPACE ;
import NAMESPACE ;
|
Add missing license
|
<nb> public class InferenceSession {
@ nullable PsiExpression [ ] args ,
@ nullable PsiElement parent ,
ParameterTypeInferencePolicy policy ) {
- repeatInferencePhases ( ) ;
+ boolean doesNotContainFalseBound = repeatInferencePhases ( ) ;
resolveBounds ( myInferenceVariables . values ( ) , mySiteSubstitutor , false ) ;
final Pair < PsiMethod , PsiCallExpression > pair = getPair ( parent ) ;
if ( pair != null ) {
initReturnTypeConstraint ( pair . first , ( PsiCallExpression ) parent ) ;
- repeatInferencePhases ( ) ;
+ for ( InferenceVariable inferenceVariable : myInferenceVariables . values ( ) ) {
+ inferenceVariable . ignoreInstantiation ( ) ;
+ }
+ doesNotContainFalseBound = repeatInferencePhases ( ) ;
resolveBounds ( myInferenceVariables . values ( ) , mySiteSubstitutor , false ) ;
}
<nb> public class InferenceSession {
for ( InferenceVariable inferenceVariable : myInferenceVariables . values ( ) ) {
inferenceVariable . ignoreInstantiation ( ) ;
}
- proceedWithAdditionalConstraints ( additionalConstraints ) ;
+ doesNotContainFalseBound = proceedWithAdditionalConstraints ( additionalConstraints ) ;
}
}
|
forget old instantiations before reduction need for incorporation
|
<nb> public class ConfigImpl {
|| name . endsWith ( STRING0 ) ) {
ConfigParseable p = source . nameToParseable ( name ) ;
- if ( p != null ) {
- obj = p . parse ( p . options ( ) . setAllowMissing (
- options . getAllowMissing ( ) ) ) ;
- } else {
- obj = SimpleConfigObject . emptyMissing ( SimpleConfigOrigin . newSimple ( name ) ) ;
- }
+ obj = p . parse ( p . options ( ) . setAllowMissing ( options . getAllowMissing ( ) ) ) ;
} else {
ConfigParseable confHandle = source . nameToParseable ( name + STRING1 ) ;
ConfigParseable jsonHandle = source . nameToParseable ( name + STRING2 ) ;
|
remove a check for a null in fromBasename that no longer happens
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Fixed broken import
|
<nb> public class DefaultAgent implements Agent {
if ( this . factory != null ) {
this . factory . release ( ) ;
}
+ PLoggerFactory . unregister ( this . binder ) ;
}
}
|
added PLoggerFactory unregister
|
<nb> public class BackupManager {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class BackupManager {
checkServiceBinder ( ) ;
if ( sService != null ) {
try {
- BackupObserverWrapper observerWrapper =
- new BackupObserverWrapper ( mContext , observer ) ;
+ BackupObserverWrapper observerWrapper = observer == null
+ ? null
+ : new BackupObserverWrapper ( mContext , observer ) ;
return sService . requestBackup ( packages , observerWrapper ) ;
} catch ( RemoteException e ) {
Log . e ( TAG , STRING0 ) ;
|
Fix NPE when null BackupObserver is passed into BackupManager requestBackup
|
<nb> import NAMESPACE ;
import NAMESPACE ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
public class LinearShardSpec implements ShardSpec {
private int partitionNum ;
<nb>
package NAMESPACE ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
public class LinearPartitionChunk < T > implements PartitionChunk < T >
{
private final int chunkNumber ;
|
Remove class level comments auto created by IntelliJ
|
<nb> public class JedisClusterTest extends Assert {
assertEquals ( STRING0 , jc . get ( STRING1 ) ) ;
}
+ @ test ( expected = JedisConnectionException . class )
+ public void testIfPoolConfigAppliesToClusterPools ( ) {
+ GenericObjectPoolConfig config = new GenericObjectPoolConfig ( ) ;
+ config . setMaxTotal ( NUMBER0 ) ;
+ config . setMaxWaitMillis ( NUMBER1 ) ;
+ Set < HostAndPort > jedisClusterNode = new HashSet < HostAndPort > ( ) ;
+ jedisClusterNode . add ( new HostAndPort ( STRING2 , NUMBER2 ) ) ;
+ JedisCluster jc = new JedisCluster ( jedisClusterNode , config ) ;
+ jc . set ( STRING3 , STRING4 ) ;
+ }
+
private static String getNodeServingSlotRange ( String infoOutput ) {
SINGLE
for ( String infoLine : infoOutput . split ( STRING5 ) ) {
|
Added test case for testing if PoolConfig applies to ClusterPools
|
<nb> public class Table implements TableOrView , TableSchema , Closeable {
@ override
public void setString ( long columnIndex , long rowIndex , String value ) {
+ checkImmutable ( ) ;
assertStringValueIsLegal ( columnIndex , value ) ;
nativeSetString ( nativePtr , columnIndex , rowIndex , value ) ;
}
|
Fixed unit test
|
<nb> public final class LRFUEvictor extends EvictorBase {
@ override
public int compare ( Entry < Long , Double > o1 , Entry < Long , Double > o2 ) {
double res = o1 . getValue ( ) - o2 . getValue ( ) ;
- if ( res < NUMBER0 ) {
+ if ( Double . compare ( res , NUMBER0 ) < NUMBER0 ) {
return - NUMBER1 ;
- } else if ( res > NUMBER0 ) {
+ } else if ( Double . compare ( res , NUMBER0 ) > NUMBER0 ) {
return NUMBER1 ;
} else {
return NUMBER0 ;
|
Handle special double values in comparison
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.