diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class PyClassImpl extends PyPresentableElementImpl < PyClassStub > implement
}
}
}
+ SINGLE
+ else if ( expression instanceof PySubscriptionExpression ) {
+ final PySubscriptionExpression subscriptionExpr = ( PySubscriptionExpression ) expression ;
+ return subscriptionExpr . getOperand ( ) ;
+ }
return expression ;
}
|
transform subscription expressions into operands in superclasses list
|
<nb> class NetworkCatalogActions extends NetworkTreeActions {
url ,
new ExpandCatalogRunnable ( handler , tree , false )
) ;
- NetworkView . Instance ( ) . openTree ( activity , tree , url ) ;
}
private void doSignOut ( NetworkBaseActivity activity , NetworkCatalogTree tree ) {
|
Reload bug fix do not start additional activities for reloaded catalog
|
<nb> public final class NonBlockingSocketWriter extends AbstractHandler implements Ru
return bytesPending ;
}
- @ probe ( name = STRING0 , level = DEBUG )
+ @ probe ( name = STRING0 )
private long idleTimeMs ( ) {
return max ( currentTimeMillis ( ) - lastWriteTime , NUMBER0 ) ;
}
|
non blocking socket reader idle time probe now on info instead of debug
|
<nb> public final class Settings {
COMMENT
COMMENT
COMMENT
- public static final String GMAIL_NUM_RETRY_UPHILL_OP = STRING0 ;
+ public static final String GMAIL_NUM_RETRY_UPHILL_OP = STRING1 ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final String GMAIL_WAIT_TIME_RETRY_UPHILL_OP =
+ STRING2 ;
COMMENT
COMMENT
|
Add a new setting for controling how much time to wait before discarding uphill operations
|
<nb> public class Flyway {
}
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- @ deprecated
- public void init ( SchemaVersion version , String description ) throws FlywayException {
- performSetup ( ) ;
-
- MetaDataTable metaDataTable = createMetaDataTable ( ) ;
- new DbInit ( transactionTemplate , metaDataTable ) . init ( version , description ) ;
- }
-
- COMMENT
COMMENT
COMMENT
private MetaDataTable createMetaDataTable ( ) {
|
Removed deprecated Flyway init version description method
|
<nb> public class Socks5TestProxy {
COMMENT
private int port = NUMBER0 ;
+ private boolean startupComplete ;
+
COMMENT
COMMENT
COMMENT
<nb> public class Socks5TestProxy {
COMMENT
COMMENT
public Socket getSocket ( String digest ) {
+ synchronized ( this ) {
+ if ( ! startupComplete ) {
+ try {
+ wait ( NUMBER1 ) ;
+ } catch ( InterruptedException e ) {
+ e . printStackTrace ( ) ;
+ } finally {
+ if ( ! startupComplete ) {
+ throw new IllegalStateException ( STRING0 ) ;
+ }
+ }
+ }
+ }
return this . connectionMap . get ( digest ) ;
}
<nb> public class Socks5TestProxy {
SINGLE
establishConnection ( socket ) ;
+ synchronized ( this ) {
+ startupComplete = true ;
+ notify ( ) ;
+ }
}
catch ( SocketException e ) {
COMMENT
|
Wait for Socks5TestProxy initialization
|
<nb> public class CrshPropertiesTests {
binder . bind ( new MutablePropertyValues ( Collections . singletonMap ( STRING0 ,
STRING1 ) ) ) ;
assertFalse ( binder . getBindingResult ( ) . hasErrors ( ) ) ;
- assertEquals ( NUMBER0 , props . getConfigPathPatterns ( ) . length , NUMBER0 ) ;
+ assertEquals ( NUMBER0 , props . getConfigPathPatterns ( ) . length ) ;
Assert . assertArrayEquals ( new String [ ] { STRING2 , STRING3 } , props . getConfigPathPatterns ( ) ) ;
}
<nb> public class CrshPropertiesTests {
binder . bind ( new MutablePropertyValues ( Collections . singletonMap ( STRING4 ,
STRING1 ) ) ) ;
assertFalse ( binder . getBindingResult ( ) . hasErrors ( ) ) ;
- assertEquals ( NUMBER0 , props . getDisabledPlugins ( ) . length , NUMBER0 ) ;
+ assertEquals ( NUMBER0 , props . getDisabledPlugins ( ) . length ) ;
assertArrayEquals ( new String [ ] { STRING2 , STRING3 } , props . getDisabledPlugins ( ) ) ;
}
|
Fix test assertion
|
<nb> public class TileBuilder extends TileBuildCraft implements IBuilderInventory , IP
new Position ( previous . i + FLOAT0 , previous . j + FLOAT0 , previous . k + FLOAT0 ) ,
new Position ( b . i + FLOAT0 , b . j + FLOAT0 , b . k + FLOAT0 ) ) ;
- laser . setTexture ( STRING0 ) ;
+ laser . setTexture ( DefaultProps . TEXTURE_PATH_ENTITIES + STRING1 ) ;
worldObj . spawnEntityInWorld ( laser ) ;
pathLasers . add ( laser ) ;
}
<nb> public class TilePathMarker extends TileMarker {
new Position ( pathMarker . xCoord + FLOAT0 , pathMarker . yCoord + FLOAT0 , pathMarker . zCoord + FLOAT0 ) ) ;
laser . show ( ) ;
- laser . setTexture ( STRING2 ) ;
+ laser . setTexture ( DefaultProps . TEXTURE_PATH_ENTITIES + STRING1 ) ;
worldObj . spawnEntityInWorld ( laser ) ;
connect ( pathMarker , laser ) ;
|
Fixed a couple texture paths
|
<nb> public class CodeItem extends Item < CodeItem > {
protected int placeItem ( int offset ) {
offset += NUMBER0 + encodedInstructions . length ;
if ( tries != null && tries . length > NUMBER1 ) {
- if ( encodedInstructions . length % NUMBER2 == NUMBER3 ) {
- offset ++ ;
+ if ( encodedInstructions . length % NUMBER4 != NUMBER1 ) {
+ offset += NUMBER2 ;
}
offset += tries . length * NUMBER5 ;
int encodedCatchHandlerBaseOffset = offset ;
+ offset += Leb128Utils . unsignedLeb128Size ( encodedCatchHandlers . length ) ;
for ( EncodedCatchHandler encodedCatchHandler : encodedCatchHandlers ) {
- offset += encodedCatchHandler . place ( offset , encodedCatchHandlerBaseOffset ) ;
+ offset = encodedCatchHandler . place ( offset , encodedCatchHandlerBaseOffset ) ;
}
}
return offset ;
|
Fixed size calculation in placeItem
|
<nb> public class CaseLiteralExpression < T > extends LiteralExpression < T > {
@ override
public String render ( RenderingContext renderingContext ) {
+ SINGLE
+ SINGLE
+ SINGLE
+ if ( getJavaType ( ) == Boolean . class && Boolean . class . isInstance ( getLiteral ( ) ) ) {
+ return super . render ( renderingContext ) ;
+ }
+
SINGLE
return CastFunction . CAST_NAME + STRING0 +
super . render ( renderingContext ) +
|
case when in criteria always casts resulting object which fails on mysql with boolean
|
<nb> public class SlidingPaneLayout extends ViewGroup {
}
private void onPanelDragged ( int newLeft ) {
+ if ( mSlideableView == null ) {
+ SINGLE
+ mSlideOffset = NUMBER0 ;
+ return ;
+ }
+
final LayoutParams lp = ( LayoutParams ) mSlideableView . getLayoutParams ( ) ;
final int leftBound = getPaddingLeft ( ) + lp . leftMargin ;
|
Fix a layout crash bug in SlidingPaneLayout
|
<nb> public final class System {
} - * / ;
private static native double currentTimeMillis0 ( ) COMMENT
- COMMENT
+ COMMENT
COMMENT ;
COMMENT
|
Don t create garbage in System currentMillis
|
<nb> class SQLTable extends AbstractTable < Record > {
private final QueryPart delegate ;
public SQLTable ( QueryPart delegate ) {
- super ( STRING0 ) ;
+ super ( delegate . toString ( ) ) ;
this . delegate = delegate ;
}
|
Making SQLTable pass on tables name to AbstractTable in a similar name how SQLField does it
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class DefaultTaskClassInfoStore implements TaskClassInfoStore {
@ override
public TaskClassInfo getTaskClassInfo ( Class < ? extends Task > type ) {
- SINGLE
- SINGLE
- if ( type . getName ( ) . endsWith ( STRING0 ) ) {
- type = Cast . uncheckedCast ( type . getSuperclass ( ) ) ;
- }
TaskClassInfo taskClassInfo = classInfos . get ( type ) ;
if ( taskClassInfo == null ) {
taskClassInfo = new TaskClassInfo ( ) ;
|
Remove unnecessary code
|
<nb> public class TemporaryJobBuilder {
this . reportWriter = reportWriter ;
}
- public TemporaryJobBuilder name ( final String jobName ) {
- this . builder . setName ( jobName ) ;
- return this ;
- }
-
public TemporaryJobBuilder version ( final String jobVersion ) {
this . builder . setVersion ( jobVersion ) ;
return this ;
<nb> public class TemporaryJobBuilder {
waitPorts . clear ( ) ;
}
- boolean success = false ;
if ( this . hosts . isEmpty ( ) ) {
if ( isNullOrEmpty ( hostFilter ) ) {
hostFilter = env . get ( STRING0 ) ;
<nb> public class TemporaryJobs implements TestRule {
}
}
- if ( config . hasPath ( STRING1 ) ) {
- builder . name ( config . getString ( STRING1 ) ) ;
- }
if ( config . hasPath ( STRING2 ) ) {
builder . version ( config . getString ( STRING2 ) ) ;
}
|
Remove name method from TempJobs
|
<nb> abstract class VpnService < E extends VpnProfile > {
synchronized void onDisconnect ( boolean cleanUpServices ) {
try {
+ Log . d ( TAG , STRING0 ) ;
mState = VpnState . DISCONNECTING ;
broadcastConnectivity ( VpnState . DISCONNECTING ) ;
mNotification . showDisconnect ( ) ;
<nb> abstract class VpnService < E extends VpnProfile > {
synchronized ( VpnService . this ) {
if ( mState == VpnState . CONNECTING ) {
Log . d ( TAG , STRING1 ) ;
+ mError = newConnectingError (
+ new IOException ( STRING2 ) ) ;
onError ( ) ;
}
}
|
Throw a connecting exception when timed out
|
<nb> public class GitCrlfDialog extends DialogWrapper {
@ override
protected Action [ ] createActions ( ) {
- return new Action [ ] { getOKAction ( ) , getCancelAction ( ) , new DialogWrapperExitAction ( STRING0 , DONT_SET ) } ;
+ return new Action [ ] { getHelpAction ( ) , getOKAction ( ) , getCancelAction ( ) , new DialogWrapperExitAction ( STRING0 , DONT_SET ) } ;
}
@ override
<nb> public class GitCrlfDialog extends DialogWrapper {
return myDontWarn . isSelected ( ) ;
}
+ @ nullable
+ @ override
+ protected String getHelpId ( ) {
+ return STRING1 ;
+ }
+
}
|
add help action
|
<nb> public class ForgeWorldEdit {
checkNotNull ( jar ) ;
checkNotNull ( name ) ;
- String path = STRING0 + name ;
+ String path = STRING1 + name ;
File targetFile = new File ( getWorkingDir ( ) , name ) ;
Closer closer = Closer . create ( ) ;
|
Forge Add slash to location of defaults folder to allow locating of worldedit properties file
|
<nb> public class MasterClientTest {
masterClient . connect ( ) ;
Assert . assertTrue ( masterClient . isConnected ( ) ) ;
Assert . assertTrue ( masterClient . getFileStatus ( - NUMBER0 , STRING0 ) != null ) ;
+ masterClient . close ( ) ;
}
@ test ( timeout = NUMBER1 , expected = FileNotFoundException . class )
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
public class CommonUtilsTest {
@ test
|
improve unit tests
|
<nb> 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 ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
public class XmppConnection extends ImConnection implements CallbackHandler {
<nb> public class XmppConnection extends ImConnection implements CallbackHandler {
}
- BrowserCompatHostnameVerifier hostVerifier = new BrowserCompatHostnameVerifier ( ) ;
- mConfig . setHostnameVerifier ( trustManager . wrapHostnameVerifier ( hostVerifier ) ) ;
+
+ mConfig . setHostnameVerifier ( trustManager . wrapHostnameVerifier ( HttpsURLConnection . getDefaultHostnameVerifier ( ) ) ) ;
mConfig . setCustomSSLContext ( sslContext ) ;
|
remove dependency on Apache HTTPClient hostname verifier
|
<nb> public abstract class Resource implements ResourceFactory , Closeable
}
}
- return newResource ( url ) ;
+ return newResource ( url , useCaches ) ;
}
COMMENT
|
Resource newResource String res boolean useCache does not use useCache argument
|
<nb> public class CliParser {
throw e ;
}
- this . command = ( CliCommand ) options . get ( STRING0 ) ;
+ this . command = options . get ( STRING0 ) ;
final String username = options . getString ( globalArgs . usernameArg . getDest ( ) ) ;
this . username = ( username == null ) ? cliConfig . getUsername ( ) : username ;
this . json = equal ( options . getBoolean ( globalArgs . jsonArg . getDest ( ) ) , true ) ;
<nb> public class Utils {
}
public static HeliosClient getClient ( final Target target , final PrintStream err ,
- final String username ) {
+ final String username ) {
List < URI > endpoints = Collections . emptyList ( ) ;
try {
|
Fix minor code format and style
|
<nb> public class WebAppContext extends ServletContextHandler implements WebAppClassL
STRING0 , SINGLE
STRING1 , SINGLE
STRING2 , SINGLE
- STRING3 , SINGLE
+ STRING3 , SINGLE
+ STRING4 , SINGLE
STRING5 , SINGLE
STRING6 SINGLE
} ;
|
Expose Decorator in default serverClasses list
|
<nb> public class SessionManager extends BasicModule {
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public void sendServerMessage ( String subject , String body ) {
sendServerMessage ( null , subject , body ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public void sendServerMessage ( JID address , String subject , String body ) {
Message packet = createServerMessage ( subject , body ) ;
try {
<nb> public class SessionManager extends BasicModule {
userBroadcast ( address . getNode ( ) , packet ) ;
}
else {
- router . route ( packet ) ;
+ ClientSession session = getSession ( address ) ;
+ if ( session != null ) {
+ session . process ( packet ) ;
+ }
}
}
catch ( UnauthorizedException e ) {
|
Modified sendServerMessage so that it only sends messages to active user sessions
|
<nb> public class JmsProducer extends DefaultProducer {
if ( exchange . hasOut ( ) ) {
JmsMessage out = ( JmsMessage ) exchange . getOut ( ) ;
try {
- if ( out != null ) {
+ if ( out != null && out . getJmsMessage ( ) != null ) {
out . setMessageId ( out . getJmsMessage ( ) . getJMSMessageID ( ) ) ;
}
} catch ( JMSException e ) {
|
fixed a potential NPE
|
<nb> public class HiveSparkClientFactory {
private static final String SPARK_DEFAULT_APP_NAME = STRING0 ;
private static final String SPARK_DEFAULT_SERIALIZER = STRING1 ;
private static final String SPARK_DEFAULT_REFERENCE_TRACKING = STRING2 ;
+ private static final String SPARK_YARN_REPORT_INTERVAL = STRING3 ;
public static HiveSparkClient createHiveSparkClient ( HiveConf hiveconf ) throws Exception {
Map < String , String > sparkConf = initiateSparkConf ( hiveconf ) ;
<nb> public class HiveSparkClientFactory {
}
}
+ SINGLE
+ SINGLE
+ String sparkYarnReportInterval = sparkConf . get ( SPARK_YARN_REPORT_INTERVAL ) ;
+ if ( sparkMaster . startsWith ( STRING4 ) && sparkYarnReportInterval == null ) {
+ SINGLE
+ sparkConf . put ( SPARK_YARN_REPORT_INTERVAL , STRING5 ) ;
+ }
+
return sparkConf ;
}
|
HoS emits too many logs with application state Szehon via Rui Li and Xuefu
|
<nb> public abstract class ValueDescriptorImpl extends NodeDescriptorImpl implements
if ( exceptionObj != null ) {
try {
final ReferenceType refType = exceptionObj . referenceType ( ) ;
- final List < Method > methods = refType . methodsByName ( STRING0 ) ;
+ final List < Method > methods = refType . methodsByName ( STRING0 , STRING1 ) ;
if ( methods . size ( ) > NUMBER0 ) {
final DebugProcessImpl process = evaluationContext . getDebugProcess ( ) ;
process . invokeMethod ( evaluationContext , exceptionObj , methods . get ( NUMBER0 ) , Collections . emptyList ( ) ) ;
|
corrected retrieval of exception stacktrace
|
<nb> final class Events {
COMMENT
COMMENT
static boolean isTouchEvent ( MotionEvent e ) {
- return isTouchType ( e . getToolType ( NUMBER0 ) ) ;
+ return isTouchType ( e . getToolType ( NUMBER0 ) )
+ SINGLE
+ || isUnknownType ( e . getToolType ( NUMBER0 ) ) ;
}
COMMENT
<nb> final class Events {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
static boolean isTouchType ( int toolType ) {
return toolType == MotionEvent . TOOL_TYPE_FINGER
<nb> final class Events {
}
COMMENT
+ COMMENT
+ COMMENT
+ static boolean isUnknownType ( int toolType ) {
+ return toolType == MotionEvent . TOOL_TYPE_UNKNOWN ;
+ }
+
+ COMMENT
COMMENT
COMMENT
static boolean isActionDown ( MotionEvent e ) {
|
Treat UNKNOWN tooltype events as Mouse events
|
<nb> public interface FetchSubPhase {
public IndexSearcher searcher ( ) {
if ( atomicIndexSearcher == null ) {
- atomicIndexSearcher = new IndexSearcher ( readerContext ) ;
+ SINGLE
+ SINGLE
+ atomicIndexSearcher = new IndexSearcher ( readerContext . reader ( ) ) ;
}
return atomicIndexSearcher ;
}
|
Fix test failure
|
<nb> public class ListView extends AbsListView {
super . onInitializeAccessibilityNodeInfoForItem ( view , position , info ) ;
final LayoutParams lp = ( LayoutParams ) view . getLayoutParams ( ) ;
- final boolean isHeading = lp != null && lp . viewType != ITEM_VIEW_TYPE_HEADER_OR_FOOTER ;
+ final boolean isHeading = lp != null && lp . viewType == ITEM_VIEW_TYPE_HEADER_OR_FOOTER ;
final boolean isSelected = isItemChecked ( position ) ;
final CollectionItemInfo itemInfo = CollectionItemInfo . obtain (
position , NUMBER0 , NUMBER1 , NUMBER0 , isHeading , isSelected ) ;
|
Fix CollectionItemInfo isHeading for ListView
|
<nb> public class MetricRegistry {
COMMENT
COMMENT
public MetricRegistry ( Configuration config ) {
- SINGLE
+ SINGLE
ScopeFormats scopeFormats ;
try {
scopeFormats = createScopeConfig ( config ) ;
}
catch ( Exception e ) {
- LOG . warn ( STRING0 , e ) ;
+ LOG . warn ( STRING1 , e ) ;
scopeFormats = new ScopeFormats ( ) ;
}
this . scopeFormats = scopeFormats ;
<nb> public class JMXReporter implements MetricReporter {
nameBuilder . append ( x ) ;
nameBuilder . append ( STRING2 ) ;
- SINGLE
+ SINGLE
nameBuilder . append ( replaceInvalidChars ( scopeComponents [ x ] ) ) ;
nameBuilder . append ( STRING3 ) ;
}
<nb> public class MetricRegistryTest extends TestLogger {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
@ test
public void testScopeConfig ( ) {
|
hotfix metrics Fix typos
|
<nb> public class ModelProcessor {
Set < AnnotatedAndRootElements > ancestorAnnotatedElements = validatedModel . getAncestorAnnotatedElements ( target . getName ( ) ) ;
for ( AnnotatedAndRootElements elements : ancestorAnnotatedElements ) {
EBeanHolder holder = eBeansHolder . getEBeanHolder ( elements . rootTypeElement ) ;
- processor . process ( elements . annotatedElement , codeModel , holder ) ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ if ( holder != null ) {
+ processor . process ( elements . annotatedElement , codeModel , holder ) ;
+ }
}
}
|
Fixing random crash by ignoring this case
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public final class HttpClientFactory {
}
}
- private final static HashMap < HttpClientConfiguration , HttpClient > confClientMap = new HashMap < HttpClientConfiguration , HttpClient > ( ) ;
+ private final static ConcurrentHashMap < HttpClientConfiguration , HttpClient > confClientMap = new ConcurrentHashMap < HttpClientConfiguration , HttpClient > ( ) ;
public static HttpClient getInstance ( ) {
return getInstance ( ConfigurationContext . getInstance ( ) . getHttpClientConfiguration ( ) ) ;
|
Fix thread sync bug in HttpClientFactory
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public class HikariJNDIFactory implements ObjectFactory
}
Properties properties = new Properties ( ) ;
- for ( String propertyName : PropertyBeanSetter . getPropertyNames ( HikariPool . class ) )
+ for ( String propertyName : PropertyBeanSetter . getPropertyNames ( HikariConfig . class ) )
{
RefAddr ra = ref . get ( propertyName ) ;
if ( ra != null )
|
Fix typo bug in JNDI factory class reflect properties from HikariConfig instead of HikariPool
|
<nb> public class ActivityTransitionLauncher {
return this ;
}
+ public Bundle createBundle ( ) {
+ return TransitionBundleFactory . createTransitionBundle ( activity , fromView , bitmap ) ;
+ }
+
public void launch ( Intent intent ) {
- final Bundle transitionBundle = TransitionBundleFactory . createTransitionBundle ( activity , fromView , bitmap ) ;
- intent . putExtras ( transitionBundle ) ;
+ intent . putExtras ( createBundle ( ) ) ;
activity . startActivity ( intent ) ;
activity . overridePendingTransition ( NUMBER0 , NUMBER0 ) ;
}
|
Add createBundle method
|
<nb> public class RouteResource extends CamelChildResourceSupport {
return error ;
}
+ public String getId ( ) {
+ return id ;
+ }
}
|
exposed the id property
|
<nb> public class ChartServlet extends HttpServlet implements ManagedService {
req . getParameter ( STRING0 ) , req . getParameter ( STRING1 ) ) ;
ImageIO . write ( chart , provider . getChartType ( ) . toString ( ) , res . getOutputStream ( ) ) ;
} catch ( ItemNotFoundException e ) {
- logger . info ( STRING2 + e . getMessage ( ) ) ;
+ logger . info ( STRING3 , e ) ;
} catch ( IllegalArgumentException e ) {
- logger . info ( STRING4 + e . getMessage ( ) ) ;
+ logger . info ( STRING5 , e ) ;
}
}
|
use place holders instead of string concatenation
|
<nb> public class SourceContactRightButtonMenu
. getPreferredContactDetail ( OperationSetBasicTelephony . class ) ;
SINGLE
- if ( cDetail != null )
+ if ( cDetail != null
+ && sourceContact . getContactSource ( ) . getType ( )
+ != ContactSourceService . RECENT_MESSAGES_TYPE )
+ {
add ( initCallMenu ( ) ) ;
+ }
SINGLE
if ( ! GuiActivator . getMUCService ( ) . isMUCSourceContact ( sourceContact )
<nb> public class SourceUIContact
if ( displayDetails != null )
tip . addLine ( new JLabel [ ] { new JLabel ( getDisplayDetails ( ) ) } ) ;
+ SINGLE
+ if ( sourceContact . getContactSource ( ) . getType ( )
+ == ContactSourceService . RECENT_MESSAGES_TYPE )
+ return tip ;
+
try
{
List < ContactDetail > details = sourceContact . getContactDetails (
|
Fixes recent conversations tooltip and right button menu remove extra not needed information
|
<nb> public class MainActivity extends ReactActivity {
@ override
protected List < ReactPackage > getPackages ( ) {
return Arrays . < ReactPackage > asList (
- new MainReactPackage ( ) ) ;
+ new MainReactPackage ( )
+ ) ;
}
}
|
Tweak formatting in Android template
|
<nb> public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
public void takeEmergencyCallAction ( ) {
mHasOverlay = true ;
- SINGLE
- stopAndUnbindFromFaceLock ( ) ;
SINGLE
if ( usingFaceLock ( ) && mFaceLockServiceRunning ) {
showFaceLockAreaWithTimeout ( FACELOCK_VIEW_AREA_EMERGENCY_DIALER_TIMEOUT ) ;
}
+ SINGLE
+ stopAndUnbindFromFaceLock ( ) ;
+
pokeWakelock ( EMERGENCY_CALL_TIMEOUT ) ;
if ( TelephonyManager . getDefault ( ) . getCallState ( )
== TelephonyManager . CALL_STATE_OFFHOOK ) {
|
Making Face Unlock fix that wasn t proerly merged in master
|
<nb> public class StringUtils {
public static Properties argsToPropertiesWithResolve ( String [ ] args ) {
TreeMap < String , String > result = new TreeMap < String , String > ( ) ;
Map < String , String > existingArgs = new TreeMap < String , String > ( ) ;
+ System . out . println ( args ) ;
for ( int i = NUMBER0 ; i < args . length ; i ++ ) {
String key = args [ i ] ;
if ( key . length ( ) > NUMBER0 && key . charAt ( NUMBER0 ) == STRING0 ) { SINGLE
|
made argument parsing easy
|
<nb> public class PyExecutionException extends ExecutionException {
final String command = getCommand ( ) + STRING0 + StringUtil . join ( getArgs ( ) , STRING0 ) ;
b . append ( command ) ;
b . append ( STRING1 ) ;
+ b . append ( STRING2 ) . append ( myExitCode ) . append ( STRING3 ) ;
b . append ( STRING4 ) ;
b . append ( myStdout ) ;
b . append ( STRING3 ) ;
|
Include process exit code in toString representation of PyExecutionException
|
<nb> public class UIHelper {
int holoColors [ ] = { NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 ,
NUMBER4 } ;
- int color = holoColors [ Math . abs ( name . hashCode ( ) ) % holoColors . length ] ;
+ int color = holoColors [ Math . abs ( name . toLowerCase ( Locale . getDefault ( ) ) . hashCode ( ) ) % holoColors . length ] ;
Bitmap bitmap = Bitmap
. createBitmap ( size , size , Bitmap . Config . ARGB_8888 ) ;
|
changed all them beautifull colors
|
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class IdeFrameDecorator implements Disposable {
myFrame . getRootPane ( ) . putClientProperty ( STRING0 , myFrame . getBounds ( ) ) ;
}
myFrame . dispose ( ) ;
- myFrame . setUndecorated ( state ) ;
+ if ( ! ( Registry . is ( STRING1 ) && ( UIUtil . isUnderDarcula ( ) || UIUtil . isUnderIntelliJLaF ( ) ) ) ) {
+ myFrame . setUndecorated ( state ) ;
+ }
}
finally {
if ( state ) {
|
do not restore decoration in case of custom frame decorations
|
<nb> public class HighlyAvailableGraphDatabase
this . broker . shutdown ( ) ;
}
internalShutdown ( false ) ;
+ messageLog . close ( ) ;
}
protected synchronized void close ( )
|
Closes the StringLogger in shutdown for HA graph db
|
<nb> public class RecentAppsPanel extends LinearLayout implements StatusBarPanel , OnC
private void refreshApplicationList ( ) {
mActivityDescriptions = getRecentTasks ( ) ;
- updateUiElements ( getResources ( ) . getConfiguration ( ) , true ) ;
+ if ( mActivityDescriptions . size ( ) > NUMBER0 ) {
+ updateUiElements ( getResources ( ) . getConfiguration ( ) , true ) ;
+ } else {
+ mBar . animateCollapse ( ) ;
+ }
}
private Bitmap compositeBitmap ( Bitmap background , Bitmap thumbnail ) {
|
Hide recents if there are no recent apps
|
<nb> abstract public class Log {
public String toString ( ) {
StringBuffer buf = new StringBuffer ( NUMBER0 ) ;
buf . append ( when . startAsString ( ) ) . append ( STRING0 ) . append ( HOST_AND_PID ) ;
+ String thr = fixedLength ( Thread . currentThread ( ) . getName ( ) + STRING0 , NUMBER1 ) ;
+ buf . append ( thr ) ;
buf . append ( kind . toString ( ) ) . append ( STRING0 ) . append ( sys . toString ( ) ) . append ( STRING1 ) ;
int headroom = buf . length ( ) ;
for ( Object m : message )
|
adding thread name
|
<nb> public class GuavaInspection extends BaseJavaLocalInspectionTool {
@ notnull
@ override
protected Set < String > compute ( ) {
- return ContainerUtil . newHashSet ( STRING0 , STRING1 , STRING2 , STRING3 ) ;
+ return ContainerUtil . newHashSet ( STRING0 , STRING1 , STRING2 , STRING3 , STRING4 ) ;
}
} ;
|
add toMultiset to stop methods
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ChildBrowser extends Plugin {
public void run ( ) {
SINGLE
dialog = new Dialog ( ctx . getContext ( ) , android . R . style . Theme_NoTitleBar ) ;
+ dialog . getWindow ( ) . getAttributes ( ) . windowAnimations = android . R . style . Animation_Dialog ;
dialog . requestWindowFeature ( Window . FEATURE_NO_TITLE ) ;
dialog . setCancelable ( true ) ;
dialog . setOnDismissListener ( new DialogInterface . OnDismissListener ( ) {
|
Added an animation to more closely match the Android standard and the iOS ChildBrowser plugin
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class AbstractHazelcastClassRunner extends BlockJUnit4ClassRunne
@ override
protected List < FrameworkMethod > getChildren ( ) {
final List < FrameworkMethod > children = super . getChildren ( ) ;
- Collections . shuffle ( children ) ;
+ Collections . shuffle ( new LinkedList < FrameworkMethod > ( children ) ) ;
return children ;
}
|
resolved junit upgrade issue in the AbstractHazelcastClassRunner
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class UserSwitcherHostView extends FrameLayout implements ListView . OnItem
public void refreshUsers ( ) {
mUserInfo . clear ( ) ;
- mUserInfo . addAll ( mUserManager . getUsers ( true ) ) ;
+ List < UserInfo > users = mUserManager . getUsers ( true ) ;
+ for ( UserInfo user : users ) {
+ if ( ! user . isManagedProfile ( ) ) {
+ mUserInfo . add ( user ) ;
+ }
+ }
mAdapter . notifyDataSetChanged ( ) ;
}
|
Don t show managed profiles in the user switcher
|
<nb> public class IrcDiscovery implements PeerDiscovery {
int ipCursor = ipCursorStart ;
do {
connection = new Socket ( ) ;
+ int timeoutMsec = ( int ) TimeUnit . MILLISECONDS . convert ( timeoutValue , timeoutUnit ) ;
+ connection . setSoTimeout ( timeoutMsec ) ;
try {
InetAddress ip = ips [ ipCursor ] ;
- long timeoutMsec = TimeUnit . MILLISECONDS . convert ( timeoutValue , timeoutUnit ) ;
log . info ( STRING0 + ip ) ;
- connection . connect ( new InetSocketAddress ( ip , port ) , ( int ) timeoutMsec ) ;
+ connection . connect ( new InetSocketAddress ( ip , port ) , timeoutMsec ) ;
} catch ( SocketTimeoutException e ) {
connection = null ;
} catch ( IOException e ) {
|
Set IRC discovery so timeout
|
<nb>
package 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 ;
|
Removed unused imports
|
<nb> public class CustomerEntity {
private String phone ;
public String toString ( ) {
- return STRING0 + userName + STRING1 + firstName + STRING2 + surname + STRING3 ;
+ return STRING0 + getUserName ( ) + STRING1 + getFirstName ( ) + STRING2 + getSurname ( ) + STRING3 ;
}
@ id
|
Fixed enhance warning
|
<nb> public final class Vector < T > implements IndexedSeq < T > , Serializable {
for ( int i = NUMBER0 ; i < n ; i ++ ) {
trie = trie . put ( trie . size ( ) , f . apply ( i ) ) ;
}
- return new Vector < > ( trie ) ;
+ return trie . isEmpty ( ) ? empty ( ) : new Vector < > ( trie ) ;
}
COMMENT
|
Return the singleton empty Vector in tabulate
|
<nb> public enum ChatColor {
return colors . get ( code ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static String stripColor ( final String input ) {
+ return input . replaceAll ( STRING0 , STRING1 ) ;
+ }
+
static {
for ( ChatColor color : ChatColor . values ( ) ) {
colors . put ( color . getCode ( ) , color ) ;
|
Added ChatColor stripColor
|
<nb> public class SentimentPipeline {
String filename = null ;
for ( int argIndex = NUMBER0 ; argIndex < args . length ; ) {
- if ( args [ argIndex ] . equalsIgnoreCase ( STRING0 ) ) {
+ if ( args [ argIndex ] . equalsIgnoreCase ( STRING1 ) ) {
+ sentimentModel = args [ argIndex + NUMBER1 ] ;
+ argIndex += NUMBER2 ;
+ } else if ( args [ argIndex ] . equalsIgnoreCase ( STRING2 ) ) {
+ parserModel = args [ argIndex + NUMBER1 ] ;
+ argIndex += NUMBER2 ;
+ } else if ( args [ argIndex ] . equalsIgnoreCase ( STRING0 ) ) {
filename = args [ argIndex + NUMBER1 ] ;
argIndex += NUMBER2 ;
} else {
|
Add a couple flags to specify models to the SentimentPipeline
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import static NAMESPACE ;
import static NAMESPACE ;
@ runwith ( HazelcastParallelClassRunner . class )
+ @ category ( QuickTest . class )
public class EvictionTest extends HazelcastTestSupport {
COMMENT
COMMENT
|
add test category
|
<nb> public class ShowLookupActionsHandler extends LookupActionHandler {
final Collection < LookupElementAction > actions = lookup . getActionsFor ( element ) ;
if ( actions . isEmpty ( ) ) {
+ lookup . getEditor ( ) . getCaretModel ( ) . moveCaretRelatively ( NUMBER0 , NUMBER1 , false , false , true ) ;
return ;
}
|
cancel lookup on move caret right
|
<nb> final class EditorTabbedContainer implements Disposable {
}
} ) ;
+ setTabPlacement ( UISettings . getInstance ( ) . EDITOR_TAB_PLACEMENT ) ;
+
updateTabBorder ( ) ;
( ( ToolWindowManagerEx ) ToolWindowManager . getInstance ( myProject ) ) . addToolWindowManagerListener ( new ToolWindowManagerAdapter ( ) {
|
tabs painting apply editor settings on startup
|
<nb> public class ViewMessageBodyWriterTest {
output ) ;
assertThat ( output . toString ( ) ,
- is ( String . format ( STRING0 ) ) ) ;
+ is ( STRING1 ) ) ;
}
@ test
|
Fix Mustache tests for Windows users
|
<nb> public class TreeUiTest extends AbstractTreeBuilderTest {
SINGLE
}
+ @ override
+ public void testNoExtraJTreeModelUpdate ( ) throws Exception {
+ SINGLE
+ }
@ override
public void testSelectWhenUpdatesArePending ( ) throws Exception {
|
commented TreeUiTest Passthrough testNoExtraJTreeModelUpdate because it doesnt make sense in passthrought mode
|
<nb> public class JSModuleGraph {
COMMENT
COMMENT
COMMENT
- private class InverseDepthComparator implements Comparator < JSModule > {
+ private static class InverseDepthComparator implements Comparator < JSModule > {
@ override
public int compare ( JSModule m1 , JSModule m2 ) {
return depthCompare ( m2 , m1 ) ;
<nb> class ReplaceStrings extends AbstractPostOrderCallback
COMMENT
COMMENT
COMMENT
- class Result {
+ static class Result {
SINGLE
SINGLE
public final String original ;
<nb> class StrictModeCheck extends AbstractPostOrderCallback
}
COMMENT
- private class NonExternChecks extends AbstractPostOrderCallback {
+ private static class NonExternChecks extends AbstractPostOrderCallback {
@ override public void visit ( NodeTraversal t , Node n , Node parent ) {
if ( ( n . isName ( ) ) && isDeclaration ( n ) ) {
checkDeclaration ( t , n ) ;
|
Convert more closure compiler inner classes that can be static
|
<nb> public final class ActivityManagerService extends ActivityManagerNative
mHandler . sendMessageDelayed ( nmsg , POWER_CHECK_DELAY ) ;
SINGLE
SystemProperties . set ( STRING0 , STRING1 ) ;
- SystemProperties . set ( STRING2 , STRING1 ) ;
+
+ SINGLE
+ if ( ! STRING3 . equals ( SystemProperties . get ( STRING4 ) )
+ || STRING5 . equals ( SystemProperties . get ( STRING6 ) ) ) {
+ SystemProperties . set ( STRING2 , STRING1 ) ;
+ }
for ( int i = NUMBER0 ; i < mStartedUsers . size ( ) ; i ++ ) {
UserStartedState uss = mStartedUsers . valueAt ( i ) ;
if ( uss . mState == UserStartedState . STATE_BOOTING ) {
|
Don t set dev bootcomplete until interacting with user
|
<nb> public final class AlternatingLeastSquares implements MatrixFactorizer {
if ( count >= LOG_INTERVAL ) {
total += count ;
JVMEnvironment env = new JVMEnvironment ( ) ;
- log . info ( STRING0 , total , env . getUsedMemoryMB ( ) ) ;
+ log . info ( STRING1 ,
+ total , env . getUsedMemoryMB ( ) , env . getMaxMemoryMB ( ) ) ;
if ( env . getPercentUsedMemory ( ) > NUMBER0 ) {
log . warn ( STRING2 +
STRING3 ) ;
<nb> public final class AlternatingLeastSquares implements MatrixFactorizer {
if ( count >= LOG_INTERVAL ) {
total += count ;
JVMEnvironment env = new JVMEnvironment ( ) ;
- log . info ( STRING4 , total , env . getUsedMemoryMB ( ) ) ;
+ log . info ( STRING5 ,
+ total , env . getUsedMemoryMB ( ) , env . getMaxMemoryMB ( ) ) ;
if ( env . getPercentUsedMemory ( ) > NUMBER0 ) {
log . warn ( STRING2 +
STRING3 ) ;
|
Add max heap to ALS info log
|
<nb> public class RestSpec {
}
void addApi ( RestApi restApi ) {
- if ( STRING0 . equals ( restApi . getName ( ) ) ) {
- SINGLE
- SINGLE
- restApiMap . put ( STRING0 , new RestApi ( restApi , STRING0 , STRING1 ) ) ;
- restApiMap . put ( STRING2 , new RestApi ( restApi , STRING2 , STRING3 ) ) ;
- } else if ( STRING4 . equals ( restApi . getName ( ) ) ) {
+ if ( STRING4 . equals ( restApi . getName ( ) ) ) {
SINGLE
SINGLE
List < String > paths = Lists . newArrayList ( ) ;
|
TEST Removed TODO and custom code now that ping and info are two different apis in the REST spec
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Cleaning up interceptors in oauth and oidc
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix typo in documentation of ProvidesIntoMap
|
<nb> public class ChunkSummary extends MRTask < ChunkSummary > {
for ( Vec v : _fr . vecs ( ) )
check += v . nChunks ( ) ;
assert ( total_chunk_count == check ) ;
+
+ SINGLE
SINGLE
SINGLE
|
Add comment why assertion was removed
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class EventServiceImpl implements EventService {
Registration registration = segment . registrationIdMap . get ( eventPacket . id ) ;
if ( registration == null ) {
if ( nodeEngine . isActive ( ) ) {
- logger . warning ( STRING0 + serviceName + STRING1 + eventPacket . id ) ;
+ if ( logger . isFinestEnabled ( ) ) {
+ logger . finest ( STRING0 + serviceName + STRING1 + eventPacket . id ) ;
+ }
}
return ;
}
|
Suppressed event service log
|
<nb> public class AndroidDisplayer implements IDisplayer {
SINGLE
SINGLE
SINGLE
- canvas . drawBitmap ( holder . bitmap , danmaku . getLeft ( ) , danmaku . getTop ( ) , null ) ;
+ canvas . drawBitmap ( holder . bitmap , left , top , null ) ;
SINGLE
return ;
}
|
Fix drawing bug
|
<nb> public class VideoPlayer extends Activity implements OnClickListener ,
}
private void toggleControlsVisibility ( ) {
- if ( mediaController != null ) {
+ if ( mediaController != null && player != null ) {
if ( mediaController . isShowing ( ) ) {
mediaController . hide ( ) ;
} else {
|
Fix crash on screen touch
|
<nb> class AudioPlaybackHandler {
final AudioTrack audioTrack = params . getAudioTrack ( ) ;
if ( audioTrack == null ) {
- params . getDispatcher ( ) . dispatchOnError ( ) ;
+ SINGLE
+ SINGLE
return ;
}
|
Fix superfluous onError callbacks
|
<nb> public class Parse implements Tokens {
Object instance ;
boolean isDynamic ;
boolean hasAttributes ;
+
+ public String toString ( ) {
+ return STRING0 + namespace + STRING1 + name + STRING2 ;
+ }
}
public Parse ( String name , InputStream in ) throws IOException {
<nb> public class Parse implements Tokens {
}
if ( finalPass ) {
+ if ( ! tagMetaStack . isEmpty ( ) ) {
+ throw new GrailsTagException ( STRING3 + tagMetaStack + STRING4 ) ;
+ }
+
+
out . println ( STRING5 ) ;
for ( Iterator i = constants . keySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) {
String name = ( String ) i . next ( ) ;
|
throws a better error message when tags are left unclosed
|
<nb> public class SbeExample
final Engine engine = car . engine ( ) ;
sb . append ( STRING0 ) . append ( engine . capacity ( ) ) ;
sb . append ( STRING1 ) . append ( engine . numCylinders ( ) ) ;
+ sb . append ( STRING2 ) . append ( engine . maxRpm ( ) ) ;
sb . append ( STRING3 ) ;
for ( int i = NUMBER0 , size = engine . manufacturerCodeLength ( ) ; i < size ; i ++ )
{
|
Added reading of constant property from the decoder
|
<nb> public class SsdpDiscovery {
+ STRING0 + NEWLINE ;
public static void main ( String args [ ] ) {
- discover ( ) ;
+ System . out . println ( STRING1 + discover ( ) ) ;
}
COMMENT
<nb> public class SsdpDiscovery {
} catch ( Exception e ) {
e . printStackTrace ( ) ;
}
- System . out . println ( STRING1 + response ) ;
return response ;
}
<nb> public class SsdpDiscovery {
recSocket . receive ( input ) ;
response = new String ( input . getData ( ) ) ;
} catch ( SocketTimeoutException e ) {
- System . out . println ( STRING2 ) ;
- if ( i >= NUMBER0 ) break ;
+ if ( i >= NUMBER0 ) break ;
i ++ ;
}
}
|
Remove system out println outside the main method
|
<nb> abstract class BoundedLocalCache < K , V > extends BLCHeader . DrainStatusRef < K , V >
if ( hasRemovalListener ( ) ) {
notifyRemoval ( key , value , cause ) ;
}
- makeDead ( node ) ;
}
+
+ makeDead ( node ) ;
}
@ override
|
Fix build due to broken clear change
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> class GrapeEngineCustomizer {
@ override
public void log ( String msg , int level ) {
logDownloadingMessage ( ) ;
- Message . getDefaultLogger ( ) . log ( msg , level ) ;
}
@ override
|
Remove superfluous ivy log output
|
<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 ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class StandardPipeline extends LifecycleBase
current = basic ;
}
while ( current != null ) {
- if ( current instanceof ValveBase ) {
- valveList . add ( ( ( ValveBase ) current ) . getObjectName ( ) ) ;
+ if ( current instanceof JmxEnabled ) {
+ valveList . add ( ( ( JmxEnabled ) current ) . getObjectName ( ) ) ;
}
current = current . getNext ( ) ;
}
|
Remove another ValveBase reference
|
<nb> public class SuggestSearchTests extends ElasticsearchIntegrationTest {
searchSuggest = searchSuggest ( STRING0 , suggest ) ;
long total = System . currentTimeMillis ( ) - start ;
assertSuggestion ( searchSuggest , NUMBER0 , NUMBER0 , STRING1 , STRING0 ) ;
- assertThat ( total , lessThan ( NUMBER1 ) ) ; SINGLE
+ SINGLE
}
protected Suggest searchSuggest ( SuggestionBuilder < ? > . . . suggestion ) {
|
TEST remove time upperbound from test only for testing
|
<nb> public class Vector3 implements Serializable , Vector < Vector3 > {
this . set ( values [ NUMBER0 ] , values [ NUMBER1 ] , values [ NUMBER2 ] ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public Vector3 ( final Vector2 vector , float z ) {
+ this . set ( vector . x , vector . y , z ) ;
+ }
+
COMMENT
COMMENT
COMMENT
<nb> public class Vector3 implements Serializable , Vector < Vector3 > {
return this . set ( values [ NUMBER0 ] , values [ NUMBER1 ] , values [ NUMBER2 ] ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public Vector3 set ( final Vector2 vector , float z ) {
+ return this . set ( vector . x , vector . y , z ) ;
+ }
+
COMMENT
public Vector3 cpy ( ) {
return new Vector3 ( this ) ;
|
Added new constructor and setter for Vector3
|
<nb> public class GitBranchWidget extends EditorBasedWidget implements StatusBarWidge
int maxLength = myMaxString . length ( ) - NUMBER0 ; SINGLE
myText = StringUtil . shortenTextWithEllipsis ( GitBranchUtil . getDisplayableBranchText ( repo ) , maxLength , NUMBER1 ) ;
myTooltip = getDisplayableBranchTooltip ( repo ) ;
- myStatusBar . updateWidget ( ID ( ) ) ;
+ if ( myStatusBar != null ) {
+ myStatusBar . updateWidget ( ID ( ) ) ;
+ }
mySettings . setRecentRoot ( repo . getRoot ( ) . getPath ( ) ) ;
}
|
git Fix possible NPE if the status bar has already been disposed
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class OStringSerializerHelper {
return iValue ;
return new Boolean ( getStringContent ( iValue ) ) ;
+ case DECIMAL :
+ if ( iValue instanceof BigDecimal )
+ return iValue ;
+ return new BigDecimal ( getStringContent ( iValue ) ) ;
+
case FLOAT :
if ( iValue instanceof Float )
return iValue ;
|
Fixed bug on conversion of DECIMAL type
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Astrid2TaskProvider extends ContentProvider {
@ override
public boolean onCreate ( ) {
ctx = getContext ( ) ;
+ ContextManager . setContext ( ctx ) ;
return false ;
}
|
Astrid2TaskProvider now can set contextmanager
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CxfProducer extends DefaultProducer implements AsyncProcessor {
@ override
protected void doStart ( ) throws Exception {
+ SINGLE
+ ServiceHelper . startService ( endpoint ) ;
+
if ( client == null ) {
client = endpoint . createClient ( ) ;
}
|
Add failsafe until we have better namespace parsing with factory beans
|
<nb> class AlarmManagerService extends SystemService {
fs . numWakeup ++ ;
if ( alarm . workSource != null && alarm . workSource . size ( ) > NUMBER0 ) {
for ( int wi = NUMBER0 ; wi < alarm . workSource . size ( ) ; wi ++ ) {
+ final String wsName = alarm . workSource . getName ( wi ) ;
+ if ( wsName == null ) {
+ Slog . w ( TAG , STRING0 + alarm ) ;
+ }
ActivityManagerNative . noteWakeupAlarm (
alarm . operation , alarm . workSource . get ( wi ) ,
- alarm . workSource . getName ( wi ) , alarm . statsTag ) ;
+ ( wsName != null ) ? wsName : alarm . packageName ,
+ alarm . statsTag ) ;
}
} else {
ActivityManagerNative . noteWakeupAlarm (
|
Note null alarm worksource names under the alarm s package
|
<nb> public class ReilOperandNode implements IOperandTreeNode {
private final ExpressionType m_type ;
public ReilOperandNode ( final String value , final ExpressionType type ) {
- m_value = Preconditions . checkNotNull ( value , STRING0 ) ;
+ m_value = Preconditions . checkNotNull ( value ) ;
m_type = type ;
}
|
Remove error messages
|
<nb> public final class SecurityClassLoad {
loader . loadClass
( basePackage +
STRING0 ) ;
+ loader . loadClass
+ ( basePackage +
+ STRING1 )
}
|
Porting fix to allow for a forward include to call getAttributeNames on the Request in a sandbox
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
public class OperationSetGenericNotificationsJabberImpl
implements OperationSetGenericNotifications ,
<nb> public class OperationSetGenericNotificationsJabberImpl
return ;
}
+ SINGLE
+ String fullJid = jabberProvider . getFullJid ( jid ) ;
+ if ( fullJid != null )
+ jid = fullJid ;
+
NotificationEventIQ newEvent = new NotificationEventIQ ( ) ;
newEvent . setEventName ( eventName ) ;
newEvent . setEventValue ( eventValue ) ;
<nb> public class OperationSetGenericNotificationsJabberImpl
{
synchronized ( genericEventListeners )
{
- List l = this . genericEventListeners . get ( eventName ) ;
- if ( l != null )
- this . genericEventListeners . remove ( listener ) ;
+ List < GenericEventListener > listenerList
+ = this . genericEventListeners . get ( eventName ) ;
+ if ( listenerList != null )
+ listenerList . remove ( listener ) ;
}
}
|
Adds full jid retrieval when sending generic notifications to a bare jid
|
<nb> class TaskRunner extends InterruptingExecutionThreadService {
COMMENT
COMMENT
public void stop ( ) throws InterruptedException {
- if ( containerId . isPresent ( ) ) {
- final String container = containerId . get ( ) ;
+ SINGLE
+ stopAsync ( ) . awaitTerminated ( ) ;
- SINGLE
- stopAsync ( ) . awaitTerminated ( ) ;
-
- SINGLE
- try {
- docker . stopContainer ( container , SECONDS_TO_WAIT_BEFORE_KILL ) ;
- } catch ( DockerException e ) {
- log . warn ( STRING0 , container , e ) ;
- }
+ SINGLE
+ final String container = containerId . or ( config . containerName ( ) ) ;
+ try {
+ docker . stopContainer ( container , SECONDS_TO_WAIT_BEFORE_KILL ) ;
+ } catch ( DockerException e ) {
+ log . warn ( STRING0 , container , e ) ;
}
}
|
Kill container based on name if ID not available
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class FileUtils extends Plugin {
}
SINGLE
- SINGLE
- String contentType = STRING0 ;
+ MimeTypeMap map = MimeTypeMap . getSingleton ( ) ;
+ String contentType = map . getMimeTypeFromExtension ( map . getFileExtensionFromUrl ( filename ) ) ;
+ if ( contentType == null && filename . startsWith ( STRING1 ) ) {
+ contentType = STRING2 ;
+ }
byte [ ] base64 = Base64 . encodeBase64 ( bos . toByteArray ( ) ) ;
String data = STRING3 + contentType + STRING4 + new String ( base64 ) ;
|
Setting content type properly in readAsDataURL
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
COMMENT
+ @ retention ( RetentionPolicy . RUNTIME )
+ @ target ( ElementType . TYPE )
public @ interface LegacyConsumerInterface {
String value ( ) ;
}
|
Added some meta data to the annotation type
|
<nb> public final class Const {
SINGLE
COMMENT
- static final short FLAG_BITS = NUMBER0 ;
+ public static final short FLAG_BITS = NUMBER0 ;
+
+ COMMENT
+ public static final short MS_FLAG_BITS = NUMBER1 ;
COMMENT
COMMENT
COMMENT
COMMENT
- static final short FLAG_FLOAT = NUMBER2 ;
+ public static final short FLAG_FLOAT = NUMBER2 ;
COMMENT
- static final short LENGTH_MASK = NUMBER3 ;
+ public static final short LENGTH_MASK = NUMBER3 ;
+ COMMENT
+ public static final byte MS_BYTE_FLAG = ( byte ) NUMBER4 ;
+
+ COMMENT
+ public static final int MS_FLAG = NUMBER5 ;
+
COMMENT
- static final short FLAGS_MASK = FLAG_FLOAT | LENGTH_MASK ;
+ public static final short FLAGS_MASK = FLAG_FLOAT | LENGTH_MASK ;
+ COMMENT
+ public static final long SECOND_MASK = NUMBER6 ;
+
+ COMMENT
+ public static final long MILLISECOND_MASK = NUMBER7 ;
+
COMMENT
public static final short MAX_TIMESPAN = NUMBER8 ;
|
Add flags for millisecond support to Const java
|
<nb> public abstract class SClass < T > {
return that . implementsInterface ( this ) ;
}
- SClass < ? > superclass = this . getSuperclass ( ) ;
+ SClass < ? > superclass = that . getSuperclass ( ) ;
while ( superclass != null ) {
- if ( superclass . getDescriptor ( ) . equals ( thatDescriptor ) ) {
+ if ( superclass . getDescriptor ( ) . equals ( thisDescriptor ) ) {
return true ;
}
- superclass = this . getSuperclass ( ) ;
+ superclass = superclass . getSuperclass ( ) ;
}
return false ;
|
Fix hang in compiler when compiling lambdas for method references taking
|
<nb> public class OptionsInvokePanel extends AbstractParamPanel {
editParameters = new ZapTextField ( ) ;
editNote = new JCheckBox ( ) ;
- editOutput = new JCheckBox ( ) ;
+ editNote . setEnabled ( false ) ;
+
+ editOutput = new JCheckBox ( ) ;
editOutput . addActionListener ( new ActionListener ( ) {
@ override
|
Fix invoke option checkboxes
|
<nb> public class SystemTable
Token token = StorageService . getPartitioner ( ) . getTokenFactory ( ) . fromByteArray ( oldColumns . next ( ) . value ( ) ) ;
String tokenBytes = serializeTokens ( Collections . singleton ( token ) ) ;
SINGLE
- String req = STRING0 ;
+ String req = STRING1 ;
processInternal ( String . format ( req , LOCAL_CF , LOCAL_KEY , clusterName , tokenBytes , BootstrapState . COMPLETED . name ( ) ) ) ;
oldStatusCfs . truncate ( ) ;
|
Fix query for system table upgrade
|
<nb> public class TemplateLibrary {
return gen_name . toString ( ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public static Map < String , String > generateI18N ( String pattern , OSMWithTags way ,
String defaultLang ) {
|
Add comment to TemplateLibrary
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Invoker {
else if ( left instanceof String && right instanceof Character ) {
return ( ( String ) left ) . compareTo ( right . toString ( ) ) ;
}
+ else if ( left instanceof String && right instanceof GString ) {
+ return ( ( String ) left ) . compareTo ( right . toString ( ) ) ;
+ }
Comparable comparable = ( Comparable ) left ;
return comparable . compareTo ( right ) ;
}
|
allow String GString
|
<nb> public class KickstartServiceImpl implements KickstartService {
. processDefinitionId ( id )
. singleResult ( ) ;
- SINGLE
+ SINGLE
InputStream is = null ;
Definitions definitions = null ;
try {
<nb> public class KickstartServiceImpl implements KickstartService {
protected TaskDto convertUserTaskToTaskDto ( String deploymentId , UserTask userTask ) {
TaskDto task = new TaskDto ( ) ;
-
- SINGLE
+
+ task . setId ( userTask . getId ( ) ) ;
task . setName ( userTask . getName ( ) ) ;
-
- SINGLE
if ( ! userTask . getDocumentation ( ) . isEmpty ( ) ) {
task . setDescription ( userTask . getDocumentation ( ) . get ( NUMBER0 ) . getText ( ) ) ;
}
|
added task id to TaskDto in KickStartService
|
<nb> public class PyExceptClausesOrderInspection extends LocalInspectionTool {
super ( holder ) ;
}
- SINGLE
@ override
public void visitPyTryExceptStatement ( PyTryExceptStatement node ) {
PyExceptPart [ ] exceptParts = node . getExceptParts ( ) ;
|
delete obsolete TODO
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.