diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class LwjglGraphics implements Graphics {
LwjglGraphics ( Canvas canvas , LwjglApplicationConfiguration config ) {
this . config = new LwjglApplicationConfiguration ( ) ;
+ this . config . width = canvas . getWidth ( ) ;
+ this . config . height = canvas . getHeight ( ) ;
this . canvas = canvas ;
}
|
fixed override width height in config in LWjglGraphics if Canvas is passed to constructor
|
<nb> package NAMESPACE ;
import NAMESPACE ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
public class DtoIndexAction < E extends Dto > extends IndexAction {
private final E item ;
<nb> package NAMESPACE ;
import NAMESPACE ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
public class EmbeddedIndexAction < K extends Serializable > extends IndexAction {
private final Object item ;
<nb>
COMMENT
package NAMESPACE ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
public class FacetValue < K extends Comparable < K > > implements Comparable < FacetValue < K > > {
String key ;
<nb> package NAMESPACE ;
import NAMESPACE ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
public class KeyIndexAction < K extends Serializable > extends IndexAction {
private final K key ;
|
Fix quality flaws
|
<nb> import NAMESPACE ;
SINGLE
- SINGLE
-
SINGLE
@ singleton
|
update todo comments
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Removed import by mistake
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class SherpafyStageFragment extends SherlockFragment {
( ( TourViewActivity ) getSherlockActivity ( ) ) . selectMenu ( tour ) ;
return true ;
} else if ( item . getItemId ( ) == START ) {
- ( ( TourViewActivity ) getSherlockActivity ( ) ) . startStage ( stage ) ;
+ if ( stage . gpxFile != null ) {
+ ( ( TourViewActivity ) getSherlockActivity ( ) ) . startStage ( stage ) ;
+ } else {
+ Toast . makeText ( app , R . string . gpx_files_not_found , Toast . LENGTH_LONG ) . show ( ) ;
+ }
return true ;
} else if ( item . getItemId ( ) == NEXT_STAGE ) {
( ( TourViewActivity ) getSherlockActivity ( ) ) . selectMenu ( customization . getNextAvailableStage ( tour ) ) ;
|
Fixed bug when user try to start route without gpx file
|
<nb> public class CRFLogConditionalObjectiveFunction extends AbstractStochasticCachin
empiricalCountsForADoc ( eHat4Update , ind ) ;
SINGLE
- expectedCountsForADoc ( weights , ind ) ;
+ expectedCountsForADoc ( weights , e4Update , ind ) ;
COMMENT
parameters at the end , which is more efficient ; but it would also require us to clearUpdateEs ( )
|
fixed a bug in calculateStochastic in CRFClassifier
|
<nb> public abstract class ForwardingClientCall < ReqT , RespT > extends ClientCall < ReqT ,
return delegate ( ) . isReady ( ) ;
}
+ @ override
+ public Attributes getAttributes ( ) {
+ return delegate ( ) . getAttributes ( ) ;
+ }
+
COMMENT
COMMENT
COMMENT
|
ForwardingClientCall getAttributes should call delegate
|
<nb> public class CompilerOptions implements Serializable {
COMMENT
public boolean checkSymbols ;
- public CheckLevel aggressiveVarCheck ;
+ CheckLevel aggressiveVarCheck ;
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ @ deprecated
public void setAggressiveVarCheck ( CheckLevel level ) {
this . aggressiveVarCheck = level ;
}
<nb> public final class DefaultPassConfig extends PassConfig {
checks . add ( declaredGlobalExternsOnWindow ) ;
}
- if ( options . getLanguageIn ( ) . isEs6OrHigher ( ) || options . aggressiveVarCheck . isOn ( ) ) {
- checks . add ( checkVariableReferences ) ;
- }
+ checks . add ( checkVariableReferences ) ;
if ( ! options . skipNonTranspilationPasses && options . closurePass ) {
checks . add ( closureGoogScopeAliases ) ;
|
Always run aggressive variable checks and deprecate CheckLevel option
|
<nb> public class LogEndpoint extends ProcessorEndpoint {
SINGLE
setProcessor ( this . logger ) ;
}
+
+ @ override
+ protected String createEndpointUri ( ) {
+ return STRING0 + logger . toString ( ) ;
+ }
}
|
AFixed log component to auto create endpoint uri if endpoint is created by hand
|
<nb> public interface TestHttpClient {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public interface TestHttpClient {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix spelling in Javadoc
|
<nb> public class IOSGraphics extends iPhoneOSGameView implements Graphics {
private float ppcY = NUMBER0 ;
private float density = NUMBER1 ;
- boolean paused ;
+ volatile boolean paused ;
public IOSGraphics ( RectangleF bounds , IOSApplication app , IOSInput input , GL20 gl20 ) {
super ( bounds ) ;
|
Changed IOSGraphics paused field to be volatile to support concurrency better
|
<nb> public class WriteConcern {
SINGLE
private static Map < String , WriteConcern > _namedConcerns = null ;
-
+
COMMENT
COMMENT
COMMENT
<nb> public class WriteConcern {
return STRING0 + _command ;
}
- final int _w ;
+ @ override
+ public boolean equals ( Object o ) {
+ if ( this == o ) return true ;
+ if ( o == null || getClass ( ) != o . getClass ( ) ) return false ;
+
+ WriteConcern that = ( WriteConcern ) o ;
+
+ if ( _fsync != that . _fsync ) return false ;
+ if ( _w != that . _w ) return false ;
+ if ( _wtimeout != that . _wtimeout ) return false ;
+
+ return true ;
+ }
+
+ final int _w ;
final int _wtimeout ;
final boolean _fsync ;
|
Added equals method to WriteConcern
|
<nb> public class ManagedModelCreationRuleExtractor extends AbstractModelCreationRule
}
}
} )
- . action ( ModelActionRole . Create , ModelReference . of ( NodeInitializerRegistry . class ) , new BiAction < MutableModelNode , List < ModelView < ? > > > ( ) {
+ . action ( ModelActionRole . Create , DefaultNodeInitializerRegistry . DEFAULT_REFERENCE , new BiAction < MutableModelNode , List < ModelView < ? > > > ( ) {
@ override
public void execute ( MutableModelNode node , List < ModelView < ? > > modelViews ) {
NodeInitializerRegistry nodeInitializerRegistry = ( NodeInitializerRegistry ) modelViews . get ( NUMBER0 ) . getInstance ( ) ;
|
Fixed reference to NodeInitializerRegistry
|
<nb> final class CameraManager {
public void onAutoFocus ( boolean success , Camera camera ) {
if ( mAutoFocusHandler != null ) {
Message message = mAutoFocusHandler . obtainMessage ( mAutoFocusMessage , success ) ;
- SINGLE
- mAutoFocusHandler . sendMessageDelayed ( message , NUMBER0 ) ;
+ SINGLE
+ mAutoFocusHandler . sendMessageDelayed ( message , NUMBER1 ) ;
mAutoFocusHandler = null ;
}
}
<nb> public final class CaptureActivity extends Activity implements SurfaceHolder . Cal
return true ;
}
+ SINGLE
+ @ override
+ public boolean onPrepareOptionsMenu ( Menu menu ) {
+ super . onPrepareOptionsMenu ( menu ) ;
+ menu . findItem ( SHARE_ID ) . setVisible ( mLastResult == null ) ;
+ return true ;
+ }
+
@ override
public boolean onOptionsItemSelected ( MenuItem item ) {
switch ( item . getItemId ( ) ) {
|
Hid the Share menu if the results screen was showing since it didn t make sense
|
<nb> package 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 ;
COMMENT
|
remove unused imports
|
<nb> public class ImplicitDependencyExtractor {
public static String getJarName ( JavaFileManager fileManager , JavaFileObject file ) {
file = unwrapFileObject ( file ) ;
+ fileManager = unwrapFileManager ( fileManager ) ;
+
+ if ( file == null || fileManager == null ) {
+ return null ;
+ }
if ( file instanceof ZipArchive . ZipFileObject
|| file instanceof ZipFileIndexArchive . ZipFileIndexFileObject ) {
|
Rewrite InMemoryJavaFileManager using JavacPathFileManager and Jimfs
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public interface HierarchicalEclipseProject extends HierarchicalElement , HasGrad
COMMENT
COMMENT
COMMENT
+ @ incubating
EclipseProjectIdentifier getIdentifier ( ) ;
COMMENT
<nb> public interface IdeaModule extends HierarchicalElement , HasGradleProject {
COMMENT
COMMENT
COMMENT
+ @ incubating
IdeaModuleIdentifier getIdentifier ( ) ;
COMMENT
|
Added missing Incubating tags
|
<nb> public abstract class AuthFilter < C , P extends Principal > implements ContainerReq
return false ;
}
+ boolean secure = requestContext . getSecurityContext ( ) . isSecure ( ) ;
requestContext . setSecurityContext ( new SecurityContext ( ) {
@ override
public Principal getUserPrincipal ( ) {
<nb> public abstract class AuthFilter < C , P extends Principal > implements ContainerReq
@ override
public boolean isSecure ( ) {
- return requestContext . getSecurityContext ( ) . isSecure ( ) ;
+ return secure ;
}
@ override
|
Fixed bug in AuthFilter that caused isSecure to recurse infinitely
|
<nb> public abstract class Model < M extends Model < M , P , O > , P extends Model . Parameters ,
protected final boolean _hasWeights ; SINGLE
public boolean hasOffset ( ) { return _hasOffset ; }
public boolean hasWeights ( ) { return _hasWeights ; }
- public String responseName ( ) { return _names [ responseIdx ( ) ] ; }
+ public String responseName ( ) {
+ int ridx = responseIdx ( ) ;
+ return ridx >= NUMBER0 ? _names [ responseIdx ( ) ] : null ;
+ }
public String weightsName ( ) { return _hasWeights ? _names [ weightsIdx ( ) ] : null ; }
public String offsetName ( ) { return _hasOffset ? _names [ offsetIdx ( ) ] : null ; }
SINGLE
|
Fixed ModelOutput reponseName for non supervised models have no response
|
<nb>
COMMENT
package NAMESPACE ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
public enum HandlerResult {
CONTINUE , RETURN
}
|
Remove bad Javadoc in SCTP classes
|
<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 ;
import NAMESPACE ;
<nb> public class QueryStateMachine
totalUserTime += stageStats . getTotalUserTime ( ) . roundTo ( NANOSECONDS ) ;
totalBlockedTime += stageStats . getTotalBlockedTime ( ) . roundTo ( NANOSECONDS ) ;
- if ( stageInfo . getSubStages ( ) . isEmpty ( ) ) {
+ if ( Iterables . any ( stageInfo . getPlan ( ) . getSources ( ) , Predicates . instanceOf ( TableScanNode . class ) ) ) {
rawInputDataSize += stageStats . getRawInputDataSize ( ) . toBytes ( ) ;
rawInputPositions += stageStats . getRawInputPositions ( ) ;
|
Fix tracking of input rows bytes for JOIN stages
|
<nb> public final class StandardServer extends LifecycleMBeanBase
onameStringCache = register ( new StringCache ( ) , STRING0 ) ;
SINGLE
- onameMBeanFactory = register ( new MBeanFactory ( ) , STRING1 ) ;
+ MBeanFactory factory = new MBeanFactory ( ) ;
+ factory . setContainer ( this ) ;
+ onameMBeanFactory = register ( factory , STRING1 ) ;
SINGLE
onameNamingResoucres = register ( globalNamingResources ,
|
Link the MBeanFactory to the Server that creates it as some MBeanFactory methods need the container to be set
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class RemoveVec extends Request2 {
Futures fs = new Futures ( ) ;
for ( Vec v : source . remove ( cols ) )
v . remove ( fs ) ;
+ DKV . put ( source . _key , source , fs ) ;
fs . blockForPending ( ) ;
return Inspect2 . redirect ( this , source . _key . toString ( ) ) ;
}
|
Added missing put key in RemoveVec
|
<nb> public class ShiftReduceOptions extends Options {
} else if ( args [ i ] . equalsIgnoreCase ( STRING0 ) ) {
trainOptions ( ) . saveIntermediateModels = false ;
i ++ ;
+ } else if ( args [ i ] . equalsIgnoreCase ( STRING1 ) ) {
+ trainOptions ( ) . oracleShiftToBinary = true ;
+ i ++ ;
+ } else if ( args [ i ] . equalsIgnoreCase ( STRING2 ) ) {
+ trainOptions ( ) . oracleBinaryToShift = true ;
+ i ++ ;
} else if ( args [ i ] . equalsIgnoreCase ( STRING3 ) ) {
testOptions ( ) . recordBinarized = args [ i + NUMBER0 ] ;
i += NUMBER1 ;
|
Add option parsing for the new srparser options
|
<nb> public class ClientEngineImpl implements ClientEngine , CoreService , PostJoinAwar
public int getPartitionId ( ) {
return task . getPartitionId ( ) ;
}
+
+ @ override
+ public String toString ( ) {
+ return STRING0 + task + STRING1 ;
+ }
}
}
|
Add toString into PriorityPartitionSpecificRunnable
|
<nb> public class BlockWorker {
SINGLE
SINGLE
- mWorkerId = mBlockMasterSync . getWorkerId ( ) ;
+ long workerId = mBlockMasterSync . getWorkerId ( ) ;
String tachyonHome = mTachyonConf . get ( Constants . TACHYON_HOME , Constants . DEFAULT_HOME ) ;
String ufsAddress =
mTachyonConf . get ( Constants . UNDERFS_ADDRESS , tachyonHome + STRING0 ) ;
String ufsWorkerFolder =
mTachyonConf . get ( Constants . UNDERFS_WORKERS_FOLDER , ufsAddress + STRING1 ) ;
- mUsers = new Users ( CommonUtils . concatPath ( ufsWorkerFolder , mWorkerId ) , mTachyonConf ) ;
+ Users users = new Users ( CommonUtils . concatPath ( ufsWorkerFolder , workerId ) , mTachyonConf ) ;
SINGLE
SINGLE
- mBlockDataManager . setUsers ( mUsers ) ;
- mBlockDataManager . setWorkerId ( mWorkerId ) ;
+ mBlockDataManager . setUsers ( users ) ;
+ mBlockDataManager . setWorkerId ( workerId ) ;
}
COMMENT
|
Remove some unnecessary instance variables
|
<nb>
package 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 ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
public final class Terasology {
+
+ private static final Logger logger = LoggerFactory . getLogger ( Terasology . class ) ;
+
private static final String HOME_ARG = STRING0 ;
private static final String LOCAL_ARG = STRING1 ;
private static final String HEADLESS_ARG = STRING2 ;
<nb> public final class Terasology {
}
engine . dispose ( ) ;
} catch ( Throwable t ) {
+ logger . error ( STRING3 , t ) ;
String text = getNestedMessageText ( t ) ;
JOptionPane . showMessageDialog ( null , text , STRING3 , JOptionPane . ERROR_MESSAGE ) ;
}
|
Log uncaught exceptions
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- @ mod ( name = STRING0 , version = Version . VERSION , useMetadata = false , modid = STRING1 , acceptedMinecraftVersions = STRING2 , dependencies = STRING3 )
+ @ mod ( name = STRING0 , version = Version . VERSION , useMetadata = false , modid = STRING1 , acceptedMinecraftVersions = STRING2 , dependencies = STRING4 )
public class BuildCraftCore extends BuildCraftMod {
public static enum RenderMode {
Full , NoDynamic
<nb> public class DefaultProps {
public static final int FILLER_LIFESPAN_TOUGH = NUMBER0 ;
public static final int FILLER_LIFESPAN_NORMAL = NUMBER1 ;
- public static int BIOME_OIL_OCEAN = NUMBER2 ;
- public static int BIOME_OIL_DESERT = NUMBER3 ;
+ public static int BIOME_OIL_OCEAN = NUMBER4 ;
+ public static int BIOME_OIL_DESERT = NUMBER5 ;
}
|
fixed biomes conflicts and forge version
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public abstract class AbstractJRubyMojo extends AbstractMojo {
|
set maven plugin to resolve test dependencies so test scoped jars are included on the classpath
|
<nb> public class AndroidCharacterCompat {
public static final int EAST_ASIAN_WIDTH_WIDE = NUMBER0 ;
private static class Api8OrLater {
- public static void initialize ( ) {
- SINGLE
- }
-
public static int getEastAsianWidth ( char c ) {
return AndroidCharacter . getEastAsianWidth ( c ) ;
}
|
Remove an unused method
|
<nb> public final class MediaStore
name . endsWith ( STRING0 ) || name . endsWith ( STRING1 ) ) {
name = name . substring ( NUMBER0 , name . lastIndexOf ( STRING2 ) ) ;
}
- name = name . replaceAll ( STRING3 , STRING4 ) . trim ( ) ;
+ name = name . replaceAll ( STRING5 , STRING4 ) . trim ( ) ;
if ( name . length ( ) > NUMBER0 ) {
SINGLE
SINGLE
|
Change the media key algorithm to also ignore double quotes
|
<nb> public class AtmosphereRequest extends HttpServletRequestWrapper {
return destroyed . get ( ) ;
}
+ public AtmosphereRequest destroyable ( boolean destroyable ) {
+ b . destroyable = destroyable ;
+ return this ;
+ }
+
COMMENT
COMMENT
COMMENT
|
Expose the destroyable API so Interceptor can set it
|
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> package NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
public class JavaScriptUtils {
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public static String javaScriptEscape ( String input ) {
if ( input == null ) {
<nb> public class JavaScriptUtils {
else if ( c == STRING0 ) {
filtered . append ( STRING1 ) ;
}
+ else if ( c == STRING2 ) {
+ filtered . append ( STRING3 ) ;
+ }
+ SINGLE
+ else if ( c == ' \ NUMBER0 ' ) {
+ filtered . append ( STRING4 ) ;
+ }
else {
filtered . append ( c ) ;
}
|
Add BS and VT char escape sequences to JavaScriptUtils
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
- public interface SignatureSecret {
+ public interface SignatureSecret extends Serializable {
}
|
make SignatureSecret Serializable
|
<nb> import static NAMESPACE
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
<nb> public class TestAnalyzer
assertFails ( MUST_BE_AGGREGATE_OR_GROUP_BY , STRING0 ) ;
}
+ @ test
+ public void testMismatchedUnionQueries ( )
+ throws Exception
+ {
+ assertFails ( MISMATCHED_SET_COLUMN_TYPES , STRING1 ) ;
+ assertFails ( MISMATCHED_SET_COLUMN_TYPES , STRING2 ) ;
+ assertFails ( MISMATCHED_SET_COLUMN_TYPES , STRING3 ) ;
+ assertFails ( MISMATCHED_SET_COLUMN_TYPES , STRING4 ) ;
+ assertFails ( MISMATCHED_SET_COLUMN_TYPES , STRING5 ) ;
+ assertFails ( MISMATCHED_SET_COLUMN_TYPES , STRING6 ) ;
+ }
+
+ @ test
+ public void testUnionUnmatchedOrderByAttribute ( )
+ throws Exception
+ {
+ assertFails ( MISSING_ATTRIBUTE , STRING7 ) ;
+ }
+
+
@ beforemethod ( alwaysRun = true )
public void setup ( )
throws Exception
|
Add negative UNION analyzer tests
|
<nb> public enum Material {
GHAST_TEAR ( NUMBER0 ) ,
GOLD_NUGGET ( NUMBER1 ) ,
NETHER_STALK ( NUMBER2 ) ,
- POTION ( NUMBER3 ) ,
+ POTION ( NUMBER3 , NUMBER4 ) ,
GLASS_BOTTLE ( NUMBER5 ) ,
SPIDER_EYE ( NUMBER6 ) ,
FERMENTED_SPIDER_EYE ( NUMBER7 ) ,
|
Fix max stacksize on Potions
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public final class QueueScheduler implements Scheduler , JobStatusListener {
+ public class QueueScheduler implements Scheduler , JobStatusListener {
COMMENT
COMMENT
|
Removed final modifier from QueueScheduler class
|
<nb> public class JavaCompletionContributor extends CompletionContributor {
static boolean isClassNamePossible ( CompletionParameters parameters ) {
boolean isSecondCompletion = parameters . getInvocationCount ( ) >= NUMBER0 ;
- final PsiElement parent = parameters . getPosition ( ) . getParent ( ) ;
+ PsiElement position = parameters . getPosition ( ) ;
+ if ( JavaCompletionData . isInstanceofPlace ( position ) ) return false ;
+
+ final PsiElement parent = position . getParent ( ) ;
if ( ! ( parent instanceof PsiJavaCodeReferenceElement ) ) return isSecondCompletion ;
if ( ( ( PsiJavaCodeReferenceElement ) parent ) . getQualifier ( ) != null ) return isSecondCompletion ;
<nb> public class JavaCompletionContributor extends CompletionContributor {
return false ;
}
- if ( JavaCompletionData . isAfterPrimitiveOrArrayType ( parameters . getPosition ( ) ) ) {
+ if ( JavaCompletionData . isAfterPrimitiveOrArrayType ( position ) ) {
return false ;
}
|
when showing all classes in autopopup don t do that in instanceof position slooooooow
|
<nb> public class WPMobileStatsUtil {
if ( connected ) {
String username = preferences . getString ( WordPress . WPCOM_USERNAME_PREFERENCE , null ) ;
mixpanel . identify ( username ) ;
+ mixpanel . getPeople ( ) . identify ( username ) ;
mixpanel . getPeople ( ) . increment ( STRING0 , NUMBER0 ) ;
try {
|
Added mixpanel getPeople
|
<nb> public abstract class ActionPlaces {
public static final String ANT_MESSAGES_TOOLBAR = STRING0 ;
public static final String ANT_EXPLORER_POPUP = STRING1 ;
public static final String ANT_EXPLORER_TOOLBAR = STRING2 ;
+ public static final String GULP_VIEW_POPUP = STRING3 ;
SINGLE
public static final String CODE_INSPECTION = STRING4 ;
<nb> public abstract class ActionPlaces {
FILEVIEW_POPUP , CHECKOUT_POPUP , LVCS_DIRECTORY_HISTORY_POPUP , GUI_DESIGNER_EDITOR_POPUP , GUI_DESIGNER_COMPONENT_TREE_POPUP ,
GUI_DESIGNER_PROPERTY_INSPECTOR_POPUP ,
CREATE_EJB_POPUP , CHANGES_VIEW_POPUP , REMOTE_HOST_VIEW_POPUP , REMOTE_HOST_DIALOG_POPUP , TFS_TREE_POPUP ,
- ACTION_PLACE_VCS_QUICK_LIST_POPUP_ACTION , PHING_EXPLORER_POPUP , NAVIGATION_BAR_POPUP
+ ACTION_PLACE_VCS_QUICK_LIST_POPUP_ACTION , PHING_EXPLORER_POPUP , NAVIGATION_BAR_POPUP , GULP_VIEW_POPUP
} ;
public static boolean isPopupPlace ( @ notnull String place ) {
|
add gulp popup place
|
<nb> public class WarMetaDataProcessor implements DeploymentUnitProcessor {
SINGLE
webFragmentMetaData . setDistributable ( new EmptyMetaData ( ) ) ;
}
- WebMetaData jarAnnotatedMetaData = annotationsMetaData . get ( jar ) ;
+ WebMetaData jarAnnotatedMetaData = null ;
+ if ( annotationsMetaData != null )
+ jarAnnotatedMetaData = annotationsMetaData . get ( jar ) ;
if ( ( isComplete || webFragmentMetaData . isMetadataComplete ( ) ) && jarAnnotatedMetaData != null ) {
SINGLE
jarAnnotatedMetaData . setFilters ( null ) ;
|
Don t process annotiation when there is none
|
<nb> public class Sql {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
To support PreparedStatement addBatch javadoc tweaks
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
@ registerbindbutton ( id = STRING0 , description = STRING1 )
- @ defaultbinding ( type = InputType . KEY , id = Keyboard . KeyId . LEFT_SHIFT )
+ @ defaultbinding ( type = InputType . KEY , id = Keyboard . KeyId . R )
public class RunButton extends BindButtonEvent {
}
|
Chranged the run key default from Shift to R
|
<nb> public class HTTPLoggingPreparednessRuleTest
private File badDirectory ( ) throws Exception
{
- < < < < < < < Updated upstream
- File f = new File ( STRING0 ) ;
-
- == == == =
- File f = new File ( File . createTempFile ( STRING1 , STRING2 ) + STRING3 ) ;
- System . err . println ( f . getAbsolutePath ( ) ) ;
- > > > > > > > Stashed changes
+ File f = new File ( File . createTempFile ( STRING1 , STRING2 ) + STRING3 ) ;
if ( f . exists ( ) || f . canWrite ( ) )
{
throw new RuntimeException (
|
fixing invalid directory test
|
<nb> class EmbeddedGraphDbImpl
private void enableRemoteShellIfConfigSaysSo ( Map < Object , Object > params )
{
- String shellConfig = ( String ) params . get ( STRING0 ) ;
+ String shellConfig = ( String ) params . get ( Config . ENABLE_REMOTE_SHELL ) ;
if ( shellConfig != null )
{
if ( shellConfig . contains ( STRING1 ) )
|
Uses Config ENABLE_REMOTE_SHELL
|
<nb> public class ConnectionState extends JdbcInterceptor {
@ override
public void reset ( ConnectionPool parent , PooledConnection con ) {
- if ( parent == null || con == null ) return ;
+ if ( parent == null || con == null ) {
+ SINGLE
+ autoCommit = null ;
+ transactionIsolation = null ;
+ readOnly = null ;
+ catalog = null ;
+ return ;
+ }
PoolConfiguration poolProperties = parent . getPoolProperties ( ) ;
if ( poolProperties . getDefaultTransactionIsolation ( ) != DataSourceFactory . UNKNOWN_TRANSACTIONISOLATION ) {
try {
|
reset state when the connection is closed
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fixed Javadoc error
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import static NAMESPACE ;
<nb> import static NAMESPACE ;
import static NAMESPACE ;
public class InternalSettingsPerparerTests {
+ @ beforemethod
+ public void setupSystemProperties ( ) {
+ System . setProperty ( STRING0 , STRING1 ) ;
+ }
+
+ @ aftermethod
+ public void cleanupSystemProperties ( ) {
+ System . clearProperty ( STRING0 ) ;
+ }
+
@ test
public void testIgnoreSystemProperties ( ) {
- System . setProperty ( STRING0 , STRING1 ) ;
Tuple < Settings , Environment > tuple = InternalSettingsPerparer . prepareSettings ( settingsBuilder ( ) . put ( STRING2 , STRING3 ) . build ( ) , true ) ;
SINGLE
assertThat ( tuple . v1 ( ) . get ( STRING2 ) , equalTo ( STRING1 ) ) ;
|
Add proper cleanup to InternalSettingsPerparerTests
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
-
COMMENT
COMMENT
COMMENT
<nb> public final class Multimaps {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
public static < K , V > Multimap < K , V > prune ( Multimap < K , V > map , final int minSize ) {
return prune ( map , new AtLeastSize ( minSize ) ) ;
<nb> public final class Multimaps {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
public static < K > Set < K > getLargeGroups ( Multimap < K , ? > map , int minSize ) {
return Sets . newHashSet (
|
Respond to jsirois review comments
|
<nb> public class AuthorizeTag extends TagSupport {
SINGLE
SINGLE
String role = authority . trim ( ) ; SINGLE
- role = StringUtils . replace ( role , STRING0 , STRING1 ) ;
- role = StringUtils . replace ( role , STRING2 , STRING1 ) ;
- role = StringUtils . replace ( role , STRING3 , STRING1 ) ;
- role = StringUtils . replace ( role , STRING4 , STRING1 ) ;
+ role = StringUtils . deleteAny ( role , STRING5 ) ;
requiredAuthorities . add ( new GrantedAuthorityImpl ( role ) ) ;
}
|
Changed AuthorizeTag to use StringUtils deleteAny instead of replace
|
<nb> package NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
public class Ssl {
|
Fix Since tag
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import static NAMESPACE ;
-
COMMENT
COMMENT
COMMENT
|
Removed incorrect import
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class EpollReuseAddrTest {
}
@ test ( timeout = NUMBER0 )
+ @ ignore SINGLE
public void testMultipleBindDatagramChannel ( ) throws Exception {
ResourceLeakDetector . setLevel ( ResourceLeakDetector . Level . ADVANCED ) ;
Assume . assumeTrue ( versionEqOrGt ( NUMBER1 , NUMBER2 , NUMBER3 ) ) ;
|
Ignore EpollReuseAddrTest testMultipleBindDatagramChannel
|
<nb> public class XIoBridge extends XHook {
SINGLE
if ( mFileName . equals ( STRING0 ) ) {
- SINGLE
- if ( Process . myUid ( ) == PrivacyManager . cUidAndroid || Process . myUid ( ) <= NUMBER0
- || Binder . getCallingUid ( ) <= NUMBER0 )
+ SINGLE
+ if ( Process . myUid ( ) <= NUMBER0 || Process . myUid ( ) == PrivacyManager . cUidAndroid )
return ;
SINGLE
|
do not check binder uid
|
<nb> public abstract class ParameterList
throw new BadInputException (
STRING0 ) ;
}
- throw new BadInputException ( STRING1 + value ) ;
+ return null ;
}
}
|
fixing return of Map parameter parsing
|
<nb> public abstract class SquidDatabase {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
protected abstract boolean onUpgrade ( SQLiteDatabaseWrapper db , int oldVersion , int newVersion ) ;
<nb> public abstract class SquidDatabase {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
protected boolean onDowngrade ( SQLiteDatabaseWrapper db , int oldVersion , int newVersion ) {
return true ;
|
Fix see Javadoc syntax
|
<nb> public final class RefactoringDriver {
options . setCheckSymbols ( true ) ;
options . setCheckTypes ( true ) ;
options . setClosurePass ( true ) ;
+ options . setGenerateExports ( true ) ;
options . setPreserveGoogRequires ( true ) ;
options . setWarningLevel ( DiagnosticGroups . MISSING_REQUIRE , CheckLevel . ERROR ) ;
|
Fix a NPE in the RemoveUnusedVariables refactoring
|
<nb> public class CompilerPaths {
String projectName = FileUtil . toSystemIndependentName ( project . getLocation ( ) ) ;
int start = projectName . lastIndexOf ( STRING0 ) ;
if ( start >= NUMBER0 ) {
- start += NUMBER1 ;
int end = projectName . lastIndexOf ( STRING1 ) ;
- if ( end < NUMBER0 ) {
+ if ( end < start ) {
end = projectName . length ( ) ;
}
+ start += NUMBER1 ;
if ( start <= end ) {
projectName = projectName . substring ( start , end ) ;
}
|
correctly determine project presentable name in case of directory project format
|
<nb> public class AndroidKeyStoreProvider extends Provider {
putSecretKeyFactoryImpl ( STRING0 ) ;
SINGLE
+ putMacImpl ( STRING1 , PACKAGE_NAME + STRING2 ) ;
putMacImpl ( STRING3 , PACKAGE_NAME + STRING4 ) ;
putMacImpl ( STRING5 , PACKAGE_NAME + STRING6 ) ;
putMacImpl ( STRING7 , PACKAGE_NAME + STRING8 ) ;
<nb> public abstract class KeyStoreKeyConstraints {
throw new IllegalArgumentException ( STRING9 ) ;
}
switch ( digest ) {
+ case Digest . MD5 :
+ return STRING10 ;
+ case Digest . SHA1 :
+ return STRING1 ;
+ case Digest . SHA224 :
+ return STRING3 ;
case Digest . SHA256 :
return STRING5 ;
+ case Digest . SHA384 :
+ return STRING7 ;
+ case Digest . SHA512 :
+ return STRING0 ;
default :
throw new IllegalArgumentException (
STRING11 + digest ) ;
|
Add missing mapping between JCA and keystore HMAC names
|
<nb> public final class MockWebServer {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public String getCookieDomain ( ) {
+ String hostName = getHostName ( ) ;
+ return hostName . contains ( STRING0 ) ? hostName : STRING1 ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add an API to expose the server s cookie domain
|
<nb> public class ScribeApiRequestor implements ApiRequestor {
request . addHeader ( STRING0 , sb . toString ( ) ) ;
if ( LOG . isDebugEnabled ( ) ) {
- LOG . debug ( STRING1 , request . getCompleteUrl ( ) ) ;
+ LOG . debug ( STRING2 , request . getCompleteUrl ( ) ) ;
}
Response response = request . send ( ) ;
|
Fix log format error
|
<nb> public class TestStatementBuilder
printStatement ( STRING0 ) ;
- COMMENT
- printStatement ( STRING1 ) ;
- printStatement ( STRING2 ) ;
- printStatement ( STRING3 ) ;
-
- printStatement ( STRING4 ) ;
- printStatement ( STRING5 ) ;
- printStatement ( STRING6 ) ;
- printStatement ( STRING7 ) ;
- printStatement ( STRING8 ) ;
- printStatement ( STRING9 ) ;
- printStatement ( STRING10 ) ;
- printStatement ( STRING11 ) ;
- printStatement ( STRING12 ) ;
- COMMENT
printStatement ( STRING13 ) ;
printStatement ( STRING14 ) ;
<nb> public class TestStatementBuilder
printStatement ( STRING15 ) ;
printStatement ( STRING16 ) ;
printStatement ( STRING17 ) ;
- SINGLE
- SINGLE
+ printStatement ( STRING18 ) ;
printStatement ( STRING19 ) ;
printStatement ( STRING20 ) ;
|
update parser tests for refresh on partition
|
<nb> public class StanfordCoreNLP extends AnnotationPipeline {
SINGLE
final String excludeFilesParam = properties . getProperty ( STRING0 ) ;
- final Set < String > excludeFiles = null ;
+ final Set < String > excludeFiles = new HashSet < String > ( ) ;
if ( excludeFilesParam != null ) {
Iterable < String > lines = IOUtils . readLines ( excludeFilesParam ) ;
for ( String line : lines ) {
|
Get options from properties for LabeledChunkAnnotator
|
<nb> public class WebSocketProcessorTest {
}
@ test
- public void basicBackwardCompatbileWorkflow ( ) throws IOException , ServletException , ExecutionException , InterruptedException {
+ public void basicBackwardCompatbileWorkflow ( ) throws Throwable {
ByteArrayOutputStream b = new ByteArrayOutputStream ( ) ;
final WebSocket w = new ArrayBaseWebSocket ( b ) ;
final WebSocketProcessor processor = WebSocketProcessorFactory . getDefault ( )
. getWebSocketProcessor ( framework ) ;
+ framework . getBroadcasterFactory ( ) . remove ( STRING0 ) ;
+
framework . addInitParameter ( ApplicationConfig . BACKWARD_COMPATIBLE_WEBSOCKET_BEHAVIOR , STRING1 )
. addAtmosphereHandler ( STRING0 , new AtmosphereHandler ( ) {
|
Fix the test
|
<nb> public final class LongMath {
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
- private static final int SIEVE_30 = NUMBER0 ;
+ private static final int SIEVE_30 =
+ ~ ( ( NUMBER1 < < NUMBER1 ) | ( NUMBER1 < < NUMBER2 ) | ( NUMBER1 < < NUMBER3 ) | ( NUMBER1 < < NUMBER4 )
+ | ( NUMBER1 < < NUMBER5 ) | ( NUMBER1 < < NUMBER6 ) | ( NUMBER1 < < NUMBER7 ) | ( NUMBER1 < < NUMBER8 ) ) ;
COMMENT
COMMENT
|
Rewrite the LongMath SIEVE_30 constant in a more readable form
|
<nb> public class PipeTransportItems extends PipeTransport {
entity . setPosition ( entity . posX + direction . offsetX * FLOAT0 ,
entity . posY + direction . offsetY * FLOAT0 ,
entity . posZ + direction . offsetZ * FLOAT0 ) ;
- entity . motionX = direction . offsetX * FLOAT0 ;
- entity . motionY = direction . offsetY * FLOAT0 ;
- entity . motionZ = direction . offsetZ * FLOAT0 ;
+
+ entity . motionX = direction . offsetX * item . speed * NUMBER0
+ + getWorld ( ) . rand . nextGaussian ( ) * FLOAT1 ;
+ entity . motionY = direction . offsetY * item . speed * NUMBER0
+ + getWorld ( ) . rand . nextGaussian ( ) * FLOAT1 ;
+ entity . motionZ = direction . offsetZ * item . speed * NUMBER0
+ + getWorld ( ) . rand . nextGaussian ( ) * FLOAT1 ;
container . getWorldObj ( ) . spawnEntityInWorld ( entity ) ;
}
|
slightly improved pipe drops behavior depending on speed
|
<nb> public class RosieUseCase {
COMMENT
COMMENT
protected void notifySuccess ( Object . . . values ) {
+ if ( onSuccessCallback == null ) {
+ throw new IllegalStateException ( STRING0 ) ;
+ }
+
Method [ ] methodsArray = onSuccessCallback . getClass ( ) . getMethods ( ) ;
if ( methodsArray . length != NUMBER0 ) {
Method methodToInvoke =
|
Add guard to check if the OnSuccessCallback was configured before to execute the on success method
|
<nb> public class HikariConfigurationUtil
copyProperty ( AvailableSettings . AUTOCOMMIT , props , STRING0 , hikariProps ) ;
copyProperty ( AvailableSettings . DRIVER , props , STRING1 , hikariProps ) ;
copyProperty ( AvailableSettings . URL , props , STRING2 , hikariProps ) ;
+ copyProperty ( AvailableSettings . USER , props , STRING3 , hikariProps ) ;
+ copyProperty ( AvailableSettings . PASS , props , STRING4 , hikariProps ) ;
for ( Object keyo : props . keySet ( ) )
{
|
Pull additional hibernate properties over
|
<nb> public class Pointer {
COMMENT
public static final Pointer NULL = null ;
- COMMENT
+ COMMENT
public static final Pointer createConstant ( long peer ) {
return new Opaque ( peer ) ;
}
+ COMMENT
+ This version will avoid setting any of the high bits on NUMBER0 - bit
+ systems .
+ COMMENT
+ public static final Pointer createConstant ( int peer ) {
+ return new Opaque ( ( long ) peer & NUMBER1 ) ;
+ }
+
COMMENT
COMMENT
protected long peer ;
|
add int version of Pointer createConstant
|
<nb> public class IndexShardTests extends ESSingleNodeTestCase {
assertEquals ( NUMBER0 , indexShard . getOperationsCount ( ) ) ;
}
+ @ awaitsfix ( bugUrl = STRING0 )
public void testMarkAsInactiveTriggersSyncedFlush ( ) throws Exception {
assertAcked ( client ( ) . admin ( ) . indices ( ) . prepareCreate ( STRING1 )
. setSettings ( SETTING_NUMBER_OF_SHARDS , NUMBER1 , SETTING_NUMBER_OF_REPLICAS , NUMBER0 , IndexShard . INDEX_SHARD_INACTIVE_TIME_SETTING , STRING2 ) ) ;
|
Mark failing test as awaits fix
|
<nb> public class MessageList
{
menu . findItem ( R . id . expunge ) . setVisible ( false ) ;
}
+ if ( K9 . FOLDER_NONE . equalsIgnoreCase ( mAccount . getArchiveFolderName ( ) ) )
+ {
+ menu . findItem ( R . id . batch_archive_op ) . setVisible ( false ) ;
+ }
+ if ( K9 . FOLDER_NONE . equalsIgnoreCase ( mAccount . getSpamFolderName ( ) ) )
+ {
+ menu . findItem ( R . id . batch_spam_op ) . setVisible ( false ) ;
+ }
}
boolean newFlagState = computeBatchDirection ( true ) ;
|
Don t display Archive Spam batch operations when corresponding folders are unset
|
<nb> public class WindowManagerService extends IWindowManager . Stub implements Watchdo
mTransitionAnimationScale = Settings . System . getFloat ( context . getContentResolver ( ) ,
Settings . System . TRANSITION_ANIMATION_SCALE , mTransitionAnimationScale ) ;
+ int max_events_per_sec = NUMBER0 ;
+ try {
+ max_events_per_sec = Integer . parseInt ( SystemProperties
+ . get ( STRING0 ) ) ;
+ if ( max_events_per_sec < NUMBER1 ) {
+ max_events_per_sec = NUMBER0 ;
+ }
+ } catch ( NumberFormatException e ) {
+ }
+ mMinWaitTimeBetweenTouchEvents = NUMBER2 / max_events_per_sec ;
+
mQueue = new KeyQ ( ) ;
mInputThread = new InputDispatcherThread ( ) ;
<nb> public class WindowManagerService extends IWindowManager . Stub implements Watchdo
}
} SINGLE
- SINGLE
- if ( action == MotionEvent . ACTION_DOWN ) {
+ SINGLE
+ if ( false && action == MotionEvent . ACTION_DOWN ) {
int max_events_per_sec = NUMBER0 ;
try {
max_events_per_sec = Integer . parseInt ( SystemProperties
|
Remove debug code which reads the max_events_per_sec property on every touch event
|
<nb> public class Request {
COMMENT
COMMENT
public String url ( ) {
- return scheme ( ) + STRING0 + host ( ) + pathInfo ( ) ;
+ return servletRequest . getRequestURL ( ) . toString ( ) ;
}
COMMENT
|
Replaced calls to HttpServletRequest getScheme HttpServletRequest host and HttpServletRequest getPathInfo with a call to HttpServletRequest getServletURL
|
<nb> public class MavenProjectsManagerWatcher {
}
private boolean isPomFile ( String path ) {
- String nameWithoutExtension = FileUtil . getNameWithoutExtension ( path ) ;
+ String nameWithoutExtension = FileUtil . getNameWithoutExtension ( new File ( path ) ) ;
if ( ! MavenConstants . POM_EXTENSION . equals ( nameWithoutExtension ) ) return false ;
return myProjectsTree . isPotentialProject ( path ) ;
}
|
fix tests watch files with pom
|
<nb> import NAMESPACE ;
public ExecutionResult addEvents ( HystrixEventType . . . events ) {
ArrayList < HystrixEventType > newEvents = new ArrayList < > ( ) ;
newEvents . addAll ( this . events ) ;
- for ( HystrixEventType e : events ) {
- newEvents . add ( e ) ;
- }
+ Collections . addAll ( newEvents , events ) ;
return new ExecutionResult ( Collections . unmodifiableList ( newEvents ) , executionTime , exception ) ;
}
|
Replace explicit iteration with library support for fast list creation
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
COMMENT
|
Removed unused import statements
|
<nb> public class DependencyFinder {
try {
SINGLE
- if ( getClass ( ) . getClassLoader ( ) . loadClass ( className ) != null ) {
+ SINGLE
+ if ( className . startsWith ( STRING0 ) ||
+ getClass ( ) . getClassLoader ( ) . loadClass ( className ) != null ) {
return ;
}
} catch ( ClassNotFoundException e ) {
|
Skip classes from java package
|
<nb> public class NearCacheConfigTest {
config . setMaxSize ( - NUMBER0 ) ;
}
+ @ test ( expected = NullPointerException . class )
+ public void testSetEvictionConfig_whenNull_thenThrowException ( ) {
+ config . setEvictionConfig ( null ) ;
+ }
+
@ test
public void testEvictionConversion_whenMaxSizeAndEvictionPolicyIsSet_thenEvictionIsConfigured ( ) {
config . setMaxSize ( NUMBER1 ) ;
|
Increased code coverage of NearCacheConfig
|
<nb> public class LocalRegionCache implements RegionCache {
}
public void clear ( ) {
- System . out . println ( STRING0 ) ;
cache . clear ( ) ;
}
<nb> public abstract class HibernateStatisticsTestSupport extends HibernateTestSuppor
} finally {
session . close ( ) ;
}
- sleep ( NUMBER0 ) ;
assertEquals ( entityCount - NUMBER1 , executeQuery ( sf ) . size ( ) ) ;
assertEquals ( entityCount - NUMBER1 , executeQuery ( sf2 ) . size ( ) ) ;
}
|
Clean forgotten lines
|
<nb> public class TestPerformUpgradeIfNecessary
order . verify ( monitor , times ( NUMBER0 ) ) . migrationCompleted ( ) ;
order . verifyNoMoreInteractions ( ) ;
- assertableLogProvider . assertContainsMessageContaining ( STRING0 ) ;
+ assertableLogProvider . assertContainsMessageContaining ( STRING1 ) ;
}
private Config buildProperties ( boolean allowStoreUpgrade ) throws IOException
|
Fix broken test
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class WelcomeScreenBuilder {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public WelcomeScreenBuilder animateButtons ( boolean animateButtons ) {
mConfigParams . setAnimateButtons ( animateButtons ) ;
<nb> public class WelcomeScreenBuilder {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public WelcomeScreenBuilder exitAnimation ( @ animres int exitAnimation ) {
+ mConfigParams . setExitAnimation ( exitAnimation ) ;
+ return this ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Added missing method for setting exit animation
|
<nb> public class JpaDatabaseSession extends DatabaseSession {
}
private void internalSave ( Object model , boolean flushIfNeeded ) {
- entityManager . persist ( model ) ;
+ try {
+ entityManager . persist ( model ) ;
+ } catch ( PersistenceException e ) {
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ throw new PersistenceException ( STRING0 + model , e ) ;
+ }
if ( flushIfNeeded && ( ++ index % BATCH_SIZE == NUMBER0 ) ) {
commit ( ) ;
}
|
improve exception message for persist operations
|
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
COMMENT
COMMENT
<nb> public class PrePostCompositeNode extends AbstractNode {
@ override
public void process ( ) {
PerformanceMonitor . startActivity ( STRING0 ) ;
- sceneReflectiveRefractive = displayResolutionDependentFBOs . get ( REFLECTIVE_REFRACTIVE ) ;
-
glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ; SINGLE
renderFullscreenQuad ( ) ;
-
- bindDisplay ( ) ; SINGLE
- setViewportToSizeOf ( READ_ONLY_GBUFFER ) ; SINGLE
-
displayResolutionDependentFBOs . swapReadWriteBuffers ( ) ;
+ sceneReflectiveRefractive = displayResolutionDependentFBOs . get ( REFLECTIVE_REFRACTIVE ) ;
READ_ONLY_GBUFFER . attachDepthBufferTo ( sceneReflectiveRefractive ) ;
SINGLE
SINGLE
|
Remove unnecessary manuel state changes
|
<nb> public class BatchAutoConfiguration {
JobExplorerFactoryBean factory = new JobExplorerFactoryBean ( ) ;
factory . setDataSource ( dataSource ) ;
factory . afterPropertiesSet ( ) ;
- return ( JobExplorer ) factory . getObject ( ) ;
+ return factory . getObject ( ) ;
}
@ bean
<nb> public class BatchAutoConfigurationTests {
MapJobExplorerFactoryBean explorer = new MapJobExplorerFactoryBean (
this . factory ) ;
explorer . afterPropertiesSet ( ) ;
- return ( JobExplorer ) explorer . getObject ( ) ;
+ return explorer . getObject ( ) ;
}
}
<nb> public class JobLauncherCommandLineRunnerTests {
@ bean
public JobExplorer jobExplorer ( ) throws Exception {
- return ( JobExplorer ) new MapJobExplorerFactoryBean ( this . jobRepositoryFactory )
- . getObject ( ) ;
+ return new MapJobExplorerFactoryBean ( this . jobRepositoryFactory ) . getObject ( ) ;
}
}
|
Remove compiler warnings related to Batch upgrade
|
<nb> public class AfterExtrasHandler extends BaseAnnotationHandler < EActivityHolder > {
@ override
public void process ( Element element , EActivityHolder holder ) {
String methodName = element . getSimpleName ( ) . toString ( ) ;
- holder . getInjectExtrasBlock ( ) . invoke ( methodName ) ;
+ holder . getInjectExtrasMethod ( ) . body ( ) . invoke ( methodName ) ;
SINGLE
holder . getOnNewIntent ( ) ;
|
always call methods with AfterExtras annotation
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Added a link to ChannelEvent in Channel JavaDoc
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
public final class HttpRequests {
+ private static final Logger LOG = Logger . getInstance ( HttpRequests . class ) ;
+
private static final int BLOCK_SIZE = NUMBER0 * NUMBER1 ;
private static final Pattern CHARSET_PATTERN = Pattern . compile ( STRING0 ) ;
<nb> public final class HttpRequests {
}
private static < T > T process ( RequestBuilderImpl builder , RequestProcessor < T > processor ) throws IOException {
+ LOG . assertTrue ( ! ApplicationManager . getApplication ( ) . isReadAccessAllowed ( ) ,
+ STRING1 ) ;
+
ClassLoader contextLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ;
if ( Patches . JDK_BUG_ID_8032832 && ! UrlClassLoader . isRegisteredAsParallelCapable ( contextLoader ) ) {
SINGLE
|
assert that HTTP requests are not performed from inside read action
|
<nb> public class OAuth2ProviderBeanDefinitionParser implements BeanDefinitionParser
String authenticationCacheRef = verificationCodeElement == null ? null : verificationCodeElement . getAttribute ( STRING0 ) ;
String approvalFilterRef = verificationCodeElement == null ? null : verificationCodeElement . getAttribute ( STRING1 ) ;
String approvalHandlerRef = verificationCodeElement == null ? null : verificationCodeElement . getAttribute ( STRING2 ) ;
- String verificationCodeRedirectStrategyRef = verificationCodeElement == null ? null : verificationCodeElement . getAttribute ( STRING2 ) ;
+ String verificationCodeRedirectStrategyRef = verificationCodeElement == null ? null : verificationCodeElement . getAttribute ( STRING3 ) ;
if ( ! StringUtils . hasText ( verificationCodeRedirectStrategyRef ) ) {
verificationCodeRedirectStrategyRef = redirectStrategyRef ;
}
|
parsing typo for redirect strategy ref attribute
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class HomePage extends BasePage {
response . render ( CssHeaderItem . forReference ( new UserCustomCssReference ( ) {
@ override
protected String getCss ( ) {
- UserSettings settings = userSettingsDAO . findByUser ( CommaFeedSession . get ( ) . getUser ( ) ) ;
+ User user = CommaFeedSession . get ( ) . getUser ( ) ;
+ if ( user == null ) {
+ return null ;
+ }
+ UserSettings settings = userSettingsDAO . findByUser ( user ) ;
return settings == null ? null : settings . getCustomCss ( ) ;
}
} , new PageParameters ( ) . add ( STRING0 , System . currentTimeMillis ( ) ) , null ) ) ;
|
prevent NPE if session does not exist
|
<nb> public class Jetty7CometSupport extends AsynchronousProcessor {
Continuation c = ContinuationSupport . getContinuation ( r . getRequest ( ) ) ;
if ( c != null ) {
try {
- if ( ! c . isInitial ( ) ) {
+ if ( c . isSuspended ( ) ) {
c . complete ( ) ;
} else {
r . getRequest ( ) . setAttribute ( FrameworkConfig . CANCEL_SUSPEND_OPERATION , true ) ;
}
} catch ( IllegalStateException ex ) {
r . getRequest ( ) . setAttribute ( FrameworkConfig . CANCEL_SUSPEND_OPERATION , true ) ;
- logger . error ( STRING0 , ex ) ;
+ logger . trace ( STRING0 , ex ) ;
}
}
} else {
|
Invoke complete only when suspended to avoid exception
|
<nb> public class EnterActionTest extends ActionTestCase {
myEditor = null ;
}
- System . out . println ( result ) ;
-
return result ;
}
<nb> public class GroovyGoToSuperTest extends ActionTestCase {
myEditor = null ;
}
- System . out . println ( result ) ;
-
return result ;
}
<nb> public class InlineMethodTest extends CommonRefactoringTestCase {
myEditor = null ;
}
- System . out . println ( result ) ;
return result ;
}
|
removed excessive output
|
<nb> public class PApplet extends Applet
SINGLE
public void paint ( Graphics screen ) {
- println ( STRING0 ) ;
-
SINGLE
SINGLE
if ( frameCount == NUMBER0 ) {
|
removing debug msg
|
<nb> public class IdleResourceInterceptor extends AtmosphereInterceptorAdapter {
for ( AtmosphereResource r : config . resourcesFactory ( ) . findAll ( ) ) {
AtmosphereRequest req = AtmosphereResourceImpl . class . cast ( r ) . getRequest ( false ) ;
try {
- if ( req . getAttribute ( MAX_INACTIVE ) == null ) return ;
+ if ( req . getAttribute ( MAX_INACTIVE ) == null ) {
+ logger . error ( STRING0 , r ) ;
+ config . getBroadcasterFactory ( ) . removeAllAtmosphereResource ( r ) ;
+ continue ;
+ }
long l = ( Long ) req . getAttribute ( MAX_INACTIVE ) ;
- if ( l > NUMBER0 && System . currentTimeMillis ( ) - l > maxInactiveTime ) {
+ if ( l > NUMBER0 && System . currentTimeMillis ( ) - l > maxInactiveTime ) {
try {
req . setAttribute ( MAX_INACTIVE , ( long ) - NUMBER1 ) ;
|
If we end up with a null attribute cancel everything
|
<nb> public class PduParser {
SINGLE
SINGLE
return retrieveConf ;
+ } else if ( ctTypeStr . equals ( ContentType . MULTIPART_ALTERNATIVE ) ) {
+ SINGLE
+ SINGLE
+ PduPart firstPart = mBody . getPart ( NUMBER0 ) ;
+ mBody . removeAll ( ) ;
+ mBody . addPart ( NUMBER0 , firstPart ) ;
+ return retrieveConf ;
}
return null ;
case PduHeaders . MESSAGE_TYPE_DELIVERY_IND :
|
Should accept application vnd
|
<nb> public class ViewPager extends ViewGroup {
}
@ override
- public boolean requestChildRectangleOnScreen ( View child , Rect rectangle , boolean immediate ) {
- SINGLE
- final ItemInfo ii = infoForAnyChild ( child ) ;
- if ( ii != null ) {
- setCurrentItem ( ii . position , ! immediate ) ;
- return true ;
- }
- return false ;
- }
-
- @ override
public boolean dispatchPopulateAccessibilityEvent ( AccessibilityEvent event ) {
SINGLE
SINGLE
|
Remove requestChildRectangleOnScreen from ViewPager
|
<nb> public class DefaultGrailsDomainClassInjector implements GrailsDomainClassInject
GrailsASTUtils . warning ( sourceUnit , propertyNode , message ) ;
}
}
- propertiesToAdd . addAll ( createPropertiesForBelongsToOrHasOneExpression ( sourceUnit , initialExpression , classNode ) ) ;
+ propertiesToAdd . addAll ( createPropertiesForBelongsToOrHasOneExpression ( initialExpression , classNode ) ) ;
}
}
injectAssociationProperties ( classNode , propertiesToAdd ) ;
}
- private Collection < PropertyNode > createPropertiesForBelongsToOrHasOneExpression ( SourceUnit sourceUnit , Expression e , ClassNode classNode ) {
+ private Collection < PropertyNode > createPropertiesForBelongsToOrHasOneExpression ( Expression e , ClassNode classNode ) {
List < PropertyNode > properties = new ArrayList < PropertyNode > ( ) ;
if ( e instanceof MapExpression ) {
MapExpression me = ( MapExpression ) e ;
|
remove unused argument
|
<nb> public class EventReceiverFirehoseFactory implements FirehoseFactory
if ( chatHandlerProvider . isPresent ( ) ) {
log . info ( STRING0 , chatHandlerProvider . get ( ) . getClass ( ) . getName ( ) ) ;
chatHandlerProvider . get ( ) . register ( serviceName , firehose ) ;
- chatHandlerProvider . get ( ) . register ( serviceName . replaceAll ( STRING1 , STRING2 ) , firehose ) ; SINGLE
} else {
log . info ( STRING3 ) ;
}
|
Remove duplicate registration of service
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
COMMENT
public class GitConfig {
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- @ deprecated
- public static final String DOT_REMOTE = STRING0 ;
-
private static final Logger LOG = Logger . getInstance ( GitConfig . class ) ;
private static final Pattern REMOTE_SECTION = Pattern . compile ( STRING1 ) ;
|
git remove unused constant
|
<nb> public final class CookieDecoder {
String commentURL = null ;
String domain = null ;
String path = null ;
- long maxAge = - NUMBER0 ;
+ long maxAge = Integer . MIN_VALUE ;
List < Integer > ports = new ArrayList < Integer > ( NUMBER1 ) ;
for ( int j = i + NUMBER0 ; j < names . size ( ) ; j ++ , i ++ ) {
|
Set maxAge to Integer MIN_VALUE by default
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class SimpleBloomCache extends AbstractIndexComponent implements BloomCac
} catch ( ClosedChannelException e ) {
SINGLE
} catch ( Exception e ) {
- logger . warn ( STRING0 , e , field ) ;
+ SINGLE
+ if ( reader . getRefCount ( ) > NUMBER0 ) {
+ logger . warn ( STRING0 , e , field ) ;
+ }
} finally {
try {
if ( termDocs != null ) {
termDocs . close ( ) ;
}
- } catch ( IOException e ) {
+ } catch ( Exception e ) {
SINGLE
}
try {
if ( termEnum != null ) {
termEnum . close ( ) ;
}
- } catch ( IOException e ) {
+ } catch ( Exception e ) {
SINGLE
}
}
|
ignore load failures on a closed reader
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.