diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class OTraverseRecordProcess extends OTraverseAbstractProcess < OIdentifiab
if ( command . getPredicate ( ) != null ) {
final Object conditionResult = command . getPredicate ( ) . evaluate ( target , null , command . getContext ( ) ) ;
if ( conditionResult != Boolean . TRUE )
- return pop ( ) ;
+ return drop ( ) ;
}
SINGLE
|
Fix wrong warning for traversal
|
<nb> public class StartupService {
ProducteevBackgroundService . scheduleService ( ) ;
BackupService . scheduleService ( context ) ;
- MilkBackgroundService . scheduleService ( ) ;
SINGLE
if ( ! Constants . OEM )
|
Updated startup service so it compiles
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CircleImageView extends ImageView {
setup ( ) ;
}
+ @ override
+ public void setImageURI ( Uri uri ) {
+ super . setImageURI ( uri ) ;
+ mBitmap = getBitmapFromDrawable ( getDrawable ( ) ) ;
+ setup ( ) ;
+ }
+
private Bitmap getBitmapFromDrawable ( Drawable drawable ) {
if ( drawable == null ) {
return null ;
|
Add support for setImageURI
|
<nb> public class ActivityShare extends ActivityBase {
}
rgToggle . setVisibility ( View . VISIBLE ) ;
- if ( choice == CHOICE_CLEAR )
- rbClear . setChecked ( true ) ;
- else if ( choice == CHOICE_TEMPLATE )
- rbTemplate . setChecked ( true ) ;
-
SINGLE
rgToggle . setOnCheckedChangeListener ( new OnCheckedChangeListener ( ) {
@ override
<nb> public class ActivityShare extends ActivityBase {
rbODEnable . setVisibility ( dangerous && ondemand ? View . VISIBLE : View . GONE ) ;
rbODDisable . setVisibility ( dangerous && ondemand ? View . VISIBLE : View . GONE ) ;
+ if ( choice == CHOICE_CLEAR )
+ rbClear . setChecked ( true ) ;
+ else if ( choice == CHOICE_TEMPLATE )
+ rbTemplate . setChecked ( true ) ;
+
} else
tvDescription . setText ( getBaseURL ( ActivityShare . this ) ) ;
|
Fix toggle choice
|
<nb> public class UriComponentsBuilder implements Cloneable {
COMMENT
COMMENT
public static UriComponentsBuilder fromUriString ( String uri ) {
- Assert . hasLength ( uri , STRING0 ) ;
+ Assert . notNull ( uri , STRING1 ) ;
Matcher matcher = URI_PATTERN . matcher ( uri ) ;
if ( matcher . matches ( ) ) {
UriComponentsBuilder builder = new UriComponentsBuilder ( ) ;
|
UriComponentsBuilder fromUriString accepts empty URIs
|
<nb> public class LegacyMetadataMapper {
CameraCharacteristics . CONTROL_AE_COMPENSATION_STEP ,
CameraCharacteristics . CONTROL_AF_AVAILABLE_MODES ,
CameraCharacteristics . CONTROL_AVAILABLE_EFFECTS ,
+ CameraCharacteristics . CONTROL_AVAILABLE_MODES ,
CameraCharacteristics . CONTROL_AVAILABLE_SCENE_MODES ,
CameraCharacteristics . CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES ,
CameraCharacteristics . CONTROL_AWB_AVAILABLE_MODES ,
|
update legacy metadata
|
<nb> public class MovieTools {
@ override
protected void onPostExecute ( Integer movieTmdbId ) {
- SINGLE
- EventBus bus = EventBus . getDefault ( ) ;
- if ( bus != null ) {
- bus . post ( new MovieChangedEvent ( movieTmdbId ) ) ;
+ SINGLE
+ if ( movieTmdbId != null ) {
+ EventBus . getDefault ( ) . post ( new MovieChangedEvent ( movieTmdbId ) ) ;
}
}
}
|
Do null check on return value to be safe
|
<nb> public class SplitWordTest {
while ( ( temp = reader . readLine ( ) ) != null ) {
String word = temp . split ( STRING0 ) [ NUMBER0 ] ;
double value = MyStaticValue . getCRFSplitWord ( ) . cohesion ( word ) ;
- System . out . println ( word + STRING0 + value ) ;
}
System . out . println ( System . currentTimeMillis ( ) - start ) ;
}
|
take splitwordtest not print
|
<nb> public class WXSDKEngine {
}
public static void setIWXImgLoaderAdapter ( IWXImgLoaderAdapter IWXImgLoaderAdapter ) {
+ if ( IWXImgLoaderAdapter == null ) {
+ if ( WXEnvironment . isApkDebugable ( ) ) {
+ throw new IllegalStateException ( STRING0 ) ;
+ }
+ return ;
+ }
WXSDKManager . getInstance ( ) . setIWXImgLoaderAdapter ( IWXImgLoaderAdapter ) ;
}
|
android update WXSDKEngine java
|
<nb> public abstract class ClientProxy implements DistributedObject {
return result ;
}
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
}
|
removes commented code
|
<nb> public class JSRVariableScopeCodeVisitor extends CodeVisitorSupport implements G
if ( expression . isParameterSpecified ( ) ) {
Parameter [ ] parameters = expression . getParameters ( ) ;
for ( int i = NUMBER0 ; i < parameters . length ; i ++ ) {
+ parameters [ i ] . setInStaticContext ( currentScope . isInStaticContext ) ;
declare ( parameters [ i ] , expression ) ;
}
} else {
|
corrects static context information for parameters of closures
|
<nb> public abstract class BazelJavaBuilder {
return NUMBER0 ;
}
- private static int processRequest ( List < String > args , PrintWriter err ) {
+ public static int processRequest ( List < String > args , PrintWriter err ) {
try {
JavaLibraryBuildRequest build = parse ( args ) ;
AbstractJavaBuilder builder = build . getDependencyModule ( ) . reduceClasspath ( )
|
Make processRequest public
|
<nb> public class DefaultStackTraceFilterer implements StackTraceFilterer {
boolean foundGroovy = false ;
for ( StackTraceElement stackTraceElement : trace ) {
String className = stackTraceElement . getClassName ( ) ;
- if ( ! foundGroovy && stackTraceElement . getFileName ( ) . endsWith ( STRING0 ) ) {
+ String fileName = stackTraceElement . getFileName ( ) ;
+ if ( ! foundGroovy && fileName != null && fileName . endsWith ( STRING0 ) ) {
foundGroovy = true ;
}
if ( endPackage != null && className . startsWith ( endPackage ) && foundGroovy ) break ;
|
fixed failing test
|
<nb> public class PrivacyService {
private static final String cTableSetting = STRING0 ;
private static final int cCurrentVersion = NUMBER0 ;
- private static final String cServiceName = STRING1 + cCurrentVersion ;
+ private static final String cServiceName = STRING2 ;
SINGLE
SINGLE
|
Fix privacy service version checking
|
<nb> package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb>
COMMENT
package NAMESPACE ;
- import static NAMESPACE ;
- import static NAMESPACE ;
- import static NAMESPACE ;
- import static NAMESPACE ;
+ import static NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb>
COMMENT
package NAMESPACE ;
- import static NAMESPACE ;
+ import static 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 ;
@ entity
@ table ( name = STRING0 )
|
Optimize imports in querydsl hibernate search
|
<nb> public class WideningCategories {
} else {
return OBJECT_TYPE ;
}
+ } else if ( isPrimitiveType ( a ) && isPrimitiveType ( b ) ) {
+ return firstCommonSuperType ( ClassHelper . getWrapper ( a ) , ClassHelper . getWrapper ( b ) ) ;
}
ClassNode superA = a . getSuperClass ( ) ;
ClassNode superB = b . getSuperClass ( ) ;
|
Fixed case where both types are primitives
|
<nb> package NAMESPACE ;
COMMENT
public final class Defn
{
+ SINGLE
COMMENT
COMMENT
COMMENT
private Defn ( )
{
}
+ SINGLE
COMMENT
public static final String CHECKSTYLE_BUNDLE =
<nb> class PackageObjectFactory implements ModuleFactory
STRING0 + aClassName , e ) ;
}
catch ( InstantiationException e ) {
+ SINGLE
throw new CheckstyleException (
STRING1 + aClassName , e ) ;
+ SINGLE
}
catch ( IllegalAccessException e ) {
+ SINGLE
throw new CheckstyleException (
STRING1 + aClassName , e ) ;
+ SINGLE
}
}
<nb> import NAMESPACE ;
COMMENT
public final class ScopeUtils
{
+ SINGLE
COMMENT
private ScopeUtils ( )
{
}
+ SINGLE
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
public final class TokenTypes
{
+ SINGLE
COMMENT
private TokenTypes ( )
{
}
+ SINGLE
SINGLE
SINGLE
|
Ignore coverage on the untestable
|
<nb> public class JavaScriptScriptEngineService extends AbstractComponent implements
public JavaScriptScriptEngineService ( Settings settings ) {
super ( settings ) ;
- this . optimizationLevel = componentSettings . getAsInt ( STRING0 , NUMBER0 ) ;
+ this . optimizationLevel = settings . getAsInt ( STRING1 , NUMBER0 ) ;
Context ctx = Context . enter ( ) ;
try {
|
Remove component settings from AbstractComponent
|
<nb> public enum ErrorType {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public enum ErrorType {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public enum ErrorType {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fixed typos in comments
|
<nb> public class ValidatePersistentMethod extends AbstractDynamicPersistentMethod {
if ( errors . hasErrors ( ) ) {
valid = new Boolean ( ! errors . hasErrors ( ) ) ;
DelegatingMetaClass metaClass = ( DelegatingMetaClass ) InvokerHelper . getInstance ( ) . getMetaRegistry ( ) . getMetaClass ( target . getClass ( ) ) ;
- metaClass . setProperty ( target , DomainClassMethods . HAS_ERRORS_PROPERTY , valid ) ;
metaClass . setProperty ( target , DomainClassMethods . ERRORS_PROPERTY , errors ) ;
}
}
|
fixed bug setting hasErrors property which has been changed to a method
|
<nb> public class ServerNodesRefreshService {
List < Node > newNodes = Lists . newArrayList ( ) ;
log . debug ( STRING0 , node ) ;
NodeResponse response = api . get ( NodeResponse . class )
- . path ( STRING1 )
+ . path ( STRING2 )
. node ( node )
. execute ( ) ;
int i = NUMBER0 ;
|
fix changed node discovery resource
|
<nb> public class MapActivity extends OsmandActionBarActivity implements DownloadEven
app . getDownloadThread ( ) . setUiActivity ( this ) ;
- SINGLE
+ if ( mapViewTrackingUtilities . getShowRouteFinishDialog ( ) ) {
DestinationReachedMenu . show ( this ) ;
- SINGLE
- SINGLE
- DestinationReachedMenu . show ( this ) ;
- DestinationReachedMenu . show ( this ) ;
- DestinationReachedMenu . show ( this ) ;
+ mapViewTrackingUtilities . setShowRouteFinishDialog ( false ) ;
+ }
routingHelper . addListener ( this ) ;
app . getMapMarkersHelper ( ) . addListener ( this ) ;
|
Fix dest test
|
<nb> public class ShapeRenderer implements Disposable {
COMMENT
COMMENT
public void begin ( ) {
- if ( ! autoShapeType ) throw new IllegalStateException ( STRING0 ) ;
+ if ( ! autoShapeType ) throw new IllegalStateException ( STRING1 ) ;
begin ( ShapeType . Line ) ;
}
|
Missing exception text
|
<nb> public class Job < T extends Keyed > extends Keyed {
public static class JobCancelledException extends RuntimeException { }
@ override protected Futures remove_impl ( Futures fs ) {
- DKV . remove ( _progressKey , fs ) ;
+ if ( _progressKey != null ) SINGLE
+ DKV . remove ( _progressKey , fs ) ;
return fs ;
}
|
Fix bug in job progresskey removal
|
<nb> public class LittleEndianDataOutputStream extends FilterOutputStream
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
COMMENT
public static byte [ ] toByteArray ( long value ) {
SINGLE
<nb> import NAMESPACE ;
COMMENT
COMMENT
- COMMENT
COMMENT
public class TypedValue {
public static final String UNZIP_FILE_PATH = STRING0 ;
|
remove android link in javadoc
|
<nb> public class FeedItem extends FeedComponent {
public void setItemIdentifier ( String itemIdentifier ) {
this . itemIdentifier = itemIdentifier ;
}
-
+
+ public boolean hasMedia ( ) {
+ return media != null ;
+ }
}
<nb> public class FeedManager {
item . setRead ( read ) ;
setFeedItem ( context , item ) ;
+ if ( item . hasMedia ( ) )
+ setFeedMedia ( context , item . getMedia ( ) ) ;
+
contentChanger . post ( new Runnable ( ) {
@ override
|
Save media after changing its position
|
<nb> public class RouterJettyServerInitializer implements JettyServerInitializer
) , STRING0
) ;
queries . addFilter ( GzipFilter . class , STRING0 , null ) ;
- SINGLE
final ServletContextHandler root = new ServletContextHandler ( ServletContextHandler . SESSIONS ) ;
root . addServlet ( new ServletHolder ( new DefaultServlet ( ) ) , STRING1 ) ;
|
remove unneeded comment
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class MaterialDialogCompat {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public Builder setAdapter ( ListAdapter adapter ) {
+ builder . adapter = adapter ;
+ return this ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add setAdapter to compat dialog
|
<nb> public class DaoAuthenticationProviderTests extends TestCase {
provider . authenticate ( token ) ;
fail ( STRING0 ) ;
} catch ( AuthenticationServiceException expected ) {
- assertEquals ( STRING1 ,
+ assertEquals ( STRING2 ,
expected . getMessage ( ) ) ;
}
}
|
Fix broken test
|
<nb> public class BasicAuthManager extends LifecycleAdapter implements AuthManager
{
assertAuthEnabled ( ) ;
User user = users . findByName ( username ) ;
- AuthenticationResult result ;
- if ( user == null )
- {
- result = AuthenticationResult . FAILURE ;
- }
- else
+ AuthenticationResult result = AuthenticationResult . FAILURE ;
+ if ( user != null )
{
result = authStrategy . authenticate ( user , password ) ;
+ if ( result == AuthenticationResult . SUCCESS && user . passwordChangeRequired ( ) )
+ {
+ result = AuthenticationResult . PASSWORD_CHANGE_REQUIRED ;
+ }
}
return new BasicAuthSubject ( this , user , result ) ;
}
|
Fix handling password change required on login
|
<nb> public class TextUtil {
COMMENT
COMMENT
public static String normaliseLineSeparators ( String str ) {
- return str == null ? null : convertLineSeparators ( str , getPlatformLineSeparator ( ) ) ;
+ return str == null ? null : convertLineSeparators ( str , STRING0 ) ;
}
COMMENT
|
Actually normalise the line endings
|
<nb> public class ExecService implements PersistenceService {
try {
execCmd = formatAlias ( alias ,
- item . getState ( ) . toString ( ) , Calendar . getInstance ( ) . getTime ( ) ) ;
+ item . getState ( ) . toString ( ) , Calendar . getInstance ( ) . getTime ( ) , item . getName ( ) ) ;
logger . debug ( STRING0 + execCmd + STRING1 ) ;
Process process = Runtime . getRuntime ( ) . exec ( execCmd ) ;
|
added item name to the executed command as the third string format argument for exec persistence binding
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class RemoteTaskActionClient implements TaskActionClient
throw e ;
} else {
try {
- Thread . sleep ( retryPolicy . getAndIncrementRetryDelay ( ) . getMillis ( ) ) ;
+ final long sleepTime = retryPolicy . getAndIncrementRetryDelay ( ) . getMillis ( ) ;
+ log . info ( STRING0 , new Duration ( sleepTime ) . toString ( ) ) ;
+ Thread . sleep ( sleepTime ) ;
}
catch ( InterruptedException e2 ) {
throw Throwables . propagate ( e2 ) ;
|
Log retry timer on errors
|
<nb> public class RootbeerGpu {
}
}
- public static void atomicAddGlobal ( double [ ] array , int index , double addValue ) {
+ public static double atomicAddGlobal ( double [ ] array , int index , double addValue ) {
synchronized ( array ) {
+ double ret = array [ index ] ;
array [ index ] += addValue ;
+ return ret ;
}
}
- public static void atomicSubGlobal ( int [ ] array , int index , int subValue ) {
+ public static int atomicSubGlobal ( int [ ] array , int index , int subValue ) {
synchronized ( array ) {
+ int ret = array [ index ] ;
array [ index ] -= subValue ;
+ return ret ;
}
}
|
adding atomicAddGlobal for doubles
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class BaseApiProvider {
if ( EXCLUDED_METHODS . contains ( name ) ) return false ;
boolean isStatic = Modifier . isStatic ( modifiers ) ;
+
+ SINGLE
+ if ( ! isStatic && ( GrailsClassUtils . isSetter ( name , method . getParameterTypes ( ) ) || GrailsClassUtils . isGetter ( name , method . getParameterTypes ( ) ) ) ) {
+ return false ;
+ }
+
int minParameters = isStatic ? NUMBER0 : NUMBER1 ;
return Modifier . isPublic ( modifiers ) &&
|
Fix for BaseApiProvider don t add plain setters getters as instance methods
|
<nb> public class MetaClassRegistryImpl implements MetaClassRegistry {
COMMENT
COMMENT
public void setMetaClassCreationHandle ( MetaClassCreationHandle handle ) {
+ if ( handle == null ) throw new IllegalArgumentException ( STRING0 ) ;
metaClassCreationHandle = handle ;
}
|
added IAE when setting meta class creation handle to null shouldn t be allowed
|
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class DaemonProgressIndicator extends AbstractProgressIndicatorBase imple
}
@ testonly
- static void setDebug ( boolean debug ) {
+ public static void setDebug ( boolean debug ) {
DaemonProgressIndicator . debug = debug ;
}
<nb> public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
DaemonCodeAnalyzerImpl codeAnalyzer = ( DaemonCodeAnalyzerImpl ) DaemonCodeAnalyzer . getInstance ( project ) ;
TextEditor textEditor = TextEditorProvider . getInstance ( ) . getTextEditor ( editor ) ;
ProcessCanceledException exception = null ;
- for ( int i = NUMBER0 ; i < NUMBER1 ; i ++ ) {
+ for ( int i = NUMBER0 ; i < NUMBER2 ; i ++ ) {
try {
List < HighlightInfo > infos = codeAnalyzer . runPasses ( file , editor . getDocument ( ) , textEditor , toIgnore , canChangeDocument , null ) ;
infos . addAll ( DaemonCodeAnalyzerEx . getInstanceEx ( project ) . getFileLevelHighlights ( project , file ) ) ;
|
debug DaemonProgressIndicator on
|
<nb> public class CommandExecutorTest {
fail ( ) ;
} catch ( CommandException e ) {
long duration = System . currentTimeMillis ( ) - start ;
- assertThat ( e . getMessage ( ) , duration , greaterThanOrEqualTo ( NUMBER0 ) ) ;
+ SINGLE
+ SINGLE
+ assertThat ( e . getMessage ( ) , duration , greaterThanOrEqualTo ( NUMBER1 ) ) ;
}
}
|
Fix CommandExecutorTest java test on Windows
|
<nb> public class RootbeerCompiler {
private void compileForKernels ( String outname , List < String > kernel_classes ) throws Exception {
+ if ( kernel_classes . isEmpty ( ) ) {
+ System . out . println ( STRING0 ) ;
+ System . out . println ( STRING1 ) ;
+ System . exit ( NUMBER0 ) ;
+ }
+
String [ ] sorted = new String [ kernel_classes . size ( ) ] ;
sorted = kernel_classes . toArray ( sorted ) ;
Arrays . sort ( sorted ) ;
|
adding error message if no kernels implemented
|
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+
package NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
public class StoreMeta {
}
|
Add StoreMeta which is an empty class for now
|
<nb> public abstract class Maths {
for ( int i = NUMBER0 ; i < ( high - low ) ; i ++ ) {
mask += NUMBER1 < < i ;
}
- return bs &= mask ;
+ return bs & mask ;
}
}
|
Change return bs mask to return bs mask
|
<nb> public class AsmClassGenerator2 extends ClassGenerator {
{ SINGLE
String ebSwitch = ( String ) AccessController . doPrivileged ( new PrivilegedAction ( ) {
public Object run ( ) {
- return System . getProperty ( EB_SWITCH_NAME , STRING0 ) ; SINGLE
+ return System . getProperty ( EB_SWITCH_NAME , STRING1 ) ; SINGLE
}
} ) ;
SINGLE
|
Set the default for static binding to off
|
<nb> public class TextEditingTarget implements
STRING0 ,
activeCodeIsAscii ( ) ,
forceEcho ? true : echo ,
- true ,
+ prefs_ . focusConsoleAfterExec ( ) . getValue ( ) ,
docDisplay_ . hasBreakpoints ( ) ) ;
}
} ) ;
<nb> public class TextEditingTarget implements
docUpdateSentinel_ . getEncoding ( ) ,
activeCodeIsAscii ( ) ,
forceEcho ? true : echo ,
- true ,
+ prefs_ . focusConsoleAfterExec ( ) . getValue ( ) ,
docDisplay_ . hasBreakpoints ( ) ) ;
}
} ;
|
respect focus console pref on execution
|
<nb> public class SystemMessageImpl extends PersistedImpl implements SystemMessage {
public SystemMessageImpl ( Map < String , Object > fields ) {
super ( fields ) ;
- this . caller = ( String ) fields . get ( STRING0 ) ;
- this . content = ( String ) fields . get ( STRING1 ) ;
- this . timestamp = ( DateTime ) fields . get ( STRING2 ) ;
- this . nodeId = ( String ) fields . get ( STRING3 ) ;
+ this . caller = fields . get ( STRING0 ) . toString ( ) ;
+ this . content = fields . get ( STRING1 ) . toString ( ) ;
+ this . timestamp = new DateTime ( fields . get ( STRING2 ) . toString ( ) ) ;
+ this . nodeId = fields . get ( STRING3 ) . toString ( ) ;
}
protected SystemMessageImpl ( ObjectId id , Map < String , Object > fields ) {
|
Using toString instead of casts
|
<nb> public final class ShareActivity extends Activity {
Intent intent = new Intent ( Intents . Encode . ACTION ) ;
intent . addFlags ( Intent . FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET ) ;
intent . putExtra ( Intents . Encode . TYPE , Contents . Type . TEXT ) ;
- intent . putExtra ( Intents . Encode . DATA , clipboard . getText ( ) ) ;
+ intent . putExtra ( Intents . Encode . DATA , clipboard . getText ( ) . toString ( ) ) ;
intent . putExtra ( Intents . Encode . FORMAT , Contents . Format . QR_CODE ) ;
startActivity ( intent ) ;
}
|
Ensure share clipboard sends String not SpannableText
|
<nb> public class SystemTable
IPartitioner p = StorageService . getPartitioner ( ) ;
Table table = Table . open ( Table . SYSTEM_TABLE ) ;
QueryFilter filter = QueryFilter . getIdentityFilter ( decorate ( RING_KEY ) , new QueryPath ( STATUS_CF ) ) ;
- ColumnFamily cf = table . getColumnFamilyStore ( STATUS_CF ) . getColumnFamily ( filter ) ;
+ ColumnFamily cf = ColumnFamilyStore . removeDeleted ( table . getColumnFamilyStore ( STATUS_CF ) . getColumnFamily ( filter ) , Integer . MAX_VALUE ) ;
if ( cf != null )
{
for ( IColumn column : cf . getSortedColumns ( ) )
|
have loadTokens expunge all tombstones
|
<nb> public class OfflineMessageStore extends BasicModule implements UserEventListene
if ( matcher . find ( ) ) {
msgXML = matcher . replaceAll ( STRING0 ) ;
}
- message = new OfflineMessage ( creationDate ,
+ try {
+ message = new OfflineMessage ( creationDate ,
xmlReader . read ( new StringReader ( msgXML ) ) . getRootElement ( ) ) ;
+ } catch ( DocumentException de ) {
+ Log . error ( STRING1 + msgXML , de ) ;
+ continue ; SINGLE
+ }
}
SINGLE
|
Catch parsing errors for offline messages
|
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Reviewed the copy edit
|
<nb> public class LocalTachyonClusterMultiMaster {
private List < TachyonFS > mClients = new ArrayList < TachyonFS > ( ) ;
- private LocalTachyonClusterMultiMaster ( int masterPort , int workerPort , long workerCapacityBytes ,
+ public LocalTachyonClusterMultiMaster ( int masterPort , int workerPort , long workerCapacityBytes ,
int masters ) {
mNumOfMasters = masters ;
mMastersPorts = new ArrayList < Integer > ( masters ) ;
<nb> public class LocalTachyonClusterMultiMaster {
}
public LocalTachyonClusterMultiMaster ( long workerCapacityBytes , int masters ) {
- this ( NUMBER0 , NUMBER0 , workerCapacityBytes , masters ) ;
+ this ( Constants . DEFAULT_MASTER_PORT - NUMBER1 , Constants . DEFAULT_WORKER_PORT - NUMBER1 ,
+ workerCapacityBytes , masters ) ;
}
public synchronized TachyonFS getClient ( ) throws IOException {
|
reverted changes to multi master since local master isnt ready yet
|
<nb> public class BuckConfig {
return getNumThreads ( ) ;
}
return config . getLong ( RESOURCES_SECTION_HEADER , STRING0 )
- . or ( ( long ) ResourceAmountsEstimator . DEFAULT_MANAGED_THREAD_COUNT )
+ . or ( ( long ) getNumThreads ( ) + getDefaultMaximumNumberOfThreads ( ) )
. intValue ( ) ;
}
|
Make sure managed thread count respects num threads
|
<nb> public class ChatPanel
fileTransferOpSet , request , date ) ;
}
} ) ;
+ return ;
}
this . addActiveFileTransfer ( request . getID ( ) , request ) ;
|
Fixes duplicate file transfer appearance in chat window
|
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ;
|
Adding license header
|
<nb> public class DefaultGrailsDomainClassInjector implements ASTTransformation {
for ( Iterator i = methods . iterator ( ) ; i . hasNext ( ) ; ) {
MethodNode mn = ( MethodNode ) i . next ( ) ;
final boolean isZeroArg = ( argTypes == null || argTypes . length == NUMBER0 ) ;
- boolean methodMatch = mn . getName ( ) . equals ( methodName ) && isZeroArg ;
+ boolean methodMatch = isZeroArg && mn . getName ( ) . equals ( methodName ) ;
if ( methodMatch ) return true ;
SINGLE
}
|
Avoiding unnecessary string comparisons in loop
|
<nb> public class FreeswitchBinding extends AbstractActiveBinding < FreeswitchBindingPr
String uuid = getHeader ( event , FS_UUID ) ;
Channel channel = new Channel ( event ) ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ if ( eventCache . containsKey ( uuid ) )
+ return ;
+
eventCache . put ( uuid , channel ) ;
itemMap . put ( uuid , new LinkedList < FreeswitchBindingConfig > ( ) ) ;
|
Ignore duplicate CHANNEL CREATE messages for a unique UUID
|
<nb> public abstract class SqlTable < T extends AbstractModel > extends DBObject < SqlTabl
@ suppresswarnings ( STRING0 )
public < F extends Field < ? > > F qualifyField ( F field ) {
if ( field instanceof Property < ? > ) {
- return ( F ) ( ( Property < ? > ) field ) . asSelectionFromTable ( this , field . getName ( ) ) ;
+ return ( F ) ( ( Property < ? > ) field ) . asSelectionFromTable ( this , null ) ;
} else {
return ( F ) Field . field ( field . getName ( ) , getName ( ) ) ;
}
|
Properties returned from QueryTable qualifyField shouldn t have an alias
|
<nb> public final class NfcAdapter {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ @ systemapi
+ public boolean disable ( boolean persist ) {
+ try {
+ return sService . disable ( persist ) ;
+ } catch ( RemoteException e ) {
+ attemptDeadServiceRecovery ( e ) ;
+ return false ;
+ }
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add hidden API to disable NFC optional persist
|
<nb> public class SIPCommTabbedPaneUI extends BasicTabbedPaneUI {
private BufferedImage maxImgI ;
- private SIPCommButton closeB ;
-
- private SIPCommButton maxB ;
-
private int overTabIndex = - NUMBER0 ;
private int closeIndexStatus = INACTIVE ;
<nb> public class SIPCommTabbedPaneUI extends BasicTabbedPaneUI {
maxImgI = new BufferedImage ( BUTTONSIZE , BUTTONSIZE ,
BufferedImage . TYPE_4BYTE_ABGR ) ;
- closeB = new SIPCommButton ( closeImgB , closeImgB ) ;
- closeB . setSize ( BUTTONSIZE , BUTTONSIZE ) ;
-
- maxB = new SIPCommButton ( closeImgB , closeImgB ) ;
- maxB . setSize ( BUTTONSIZE , BUTTONSIZE ) ;
-
actionPopupMenu = new JPopupMenu ( ) ;
maxItem = new JMenuItem ( STRING0 ) ;
|
remove unused buttons
|
<nb> public final class UrlImageViewHelper {
mDownloader = mDefaultDownloader ;
mUseLegacyDownloader = false ;
}
+
+ public static UrlDownloader getDefaultDownloader ( ) {
+ return mDownloader ;
+ }
public static void useLegacyDownloader ( ) {
mUseLegacyDownloader = true ;
<nb>
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- @ suppresslint ( STRING0 )
public class UrlLruCache extends LruCache < String , BitmapDrawable > {
public UrlLruCache ( int maxSize ) {
super ( maxSize ) ;
<nb> public class UrlLruCache extends LruCache < String , BitmapDrawable > {
if ( value != null ) {
Bitmap b = value . getBitmap ( ) ;
if ( b != null )
- return b . getByteCount ( ) ;
+ return b . getRowBytes ( ) * b . getHeight ( ) ;
}
return NUMBER0 ;
}
|
fix missing methods
|
<nb> public class TableTest {
System . out . println ( base . getString ( NUMBER0 , NUMBER0 ) ) ;
System . out . println ( base . getLong ( NUMBER1 , NUMBER0 ) ) ;
+ TableViewBase results = base . findAllInt ( NUMBER1 , NUMBER2 ) ;
+ System . out . println ( STRING0 + results . size ( ) ) ;
+
+ long rowIndex = base . findFirstString ( NUMBER0 , STRING1 ) ;
+ System . out . println ( STRING2 + rowIndex ) ;
+
base . remove ( NUMBER0 ) ;
}
|
Wrote small PoC for the new search methods
|
<nb> public class Localization {
COMMENT
COMMENT
public static synchronized String get ( String key ) {
+ if ( getCurrentLanguage ( ) == null ) {
+ return key ;
+ }
if ( ! getCurrentLanguage ( ) . equals ( loadedLanguage ) ) {
defaultMappings . clear ( ) ;
mappings . clear ( ) ;
|
Fixed crash with Factorization Barrels
|
<nb> public class Solo {
public void drag ( float fromX , float toX , float fromY , float toY ,
int stepCount ) {
+ hideSoftKeyboard ( ) ;
scroller . drag ( fromX , toX , fromY , toY , stepCount ) ;
}
|
Hide soft keyboard when dragging
|
<nb> public abstract class EdgeSupervisorImpl implements EdgeSupervisor {
if ( rescaleWeight ) {
float min = edge . getMetaEdge ( ) ? edge . getGraph ( ) . getMinMetaWeight ( ) : edge . getGraph ( ) . getMinWeight ( ) ;
float max = edge . getMetaEdge ( ) ? edge . getGraph ( ) . getMaxMetaWeight ( ) : edge . getGraph ( ) . getMaxWeight ( ) ;
- float ratio = ( GraphImpl . WEIGHT_MAXIMUM - GraphImpl . WEIGHT_MINIMUM ) / ( max - min ) ;
- weight = ( weight - min ) * ratio + GraphImpl . WEIGHT_MINIMUM ;
+ if ( ! Double . isInfinite ( min ) && ! Double . isInfinite ( max ) && max != min ) {
+ float ratio = ( GraphImpl . WEIGHT_MAXIMUM - GraphImpl . WEIGHT_MINIMUM ) / ( max - min ) ;
+ weight = ( weight - min ) * ratio + GraphImpl . WEIGHT_MINIMUM ;
+ }
}
if ( edge . getMetaEdge ( ) && visualizationController != null ) {
|
Fix rescale weight calculation in preview
|
<nb> public class Notification implements Parcelable
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
|
Fix doc of fullScreenIntent
|
<nb>
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- package NAMESPACE ;
+ package NAMESPACE ;
|
Fix more bad links
|
<nb> import static NAMESPACE ;
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public class SampleIntegrationTests {
<nb> public class SampleIntegrationTests {
return command ;
}
} ) ;
- this . command = future . get ( NUMBER0 , TimeUnit . MINUTES ) ;
+ this . command = future . get ( NUMBER1 , TimeUnit . MINUTES ) ;
}
@ before
|
Increase SampleIntegrationTests run timeouts
|
<nb> public class TexturePackerFileProcessor extends FileProcessor {
merge ( rootSettings , settingsFile ) ;
}
+ String atlasExtension = rootSettings . atlasExtension == null ? STRING0 : rootSettings . atlasExtension ;
+ atlasExtension = Pattern . quote ( atlasExtension ) ;
+
for ( int i = NUMBER0 , n = rootSettings . scale . length ; i < n ; i ++ ) {
FileProcessor deleteProcessor = new FileProcessor ( ) {
protected void processFile ( Entry inputFile ) throws Exception {
<nb> public class TexturePackerFileProcessor extends FileProcessor {
int dotIndex = prefix . lastIndexOf ( STRING1 ) ;
if ( dotIndex != - NUMBER1 ) prefix = prefix . substring ( NUMBER0 , dotIndex ) ;
deleteProcessor . addInputRegex ( STRING2 + prefix + STRING3 ) ;
- deleteProcessor . addInputRegex ( STRING2 + prefix + STRING4 ) ;
+ deleteProcessor . addInputRegex ( STRING2 + prefix + atlasExtension ) ;
String dir = packFile . getParent ( ) ;
if ( dir == null )
|
Texture packer now correctly deletes old atlas files if extension is not
|
<nb>
package NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
import NAMESPACE ;
<nb> public class TestProcessStreamHandler
catch ( Exception e )
{ SINGLE
}
- assertEquals ( STRING0 , NUMBER0 , process . exitValue ( ) ) ;
+ assertTrue ( STRING1 , process . exitValue ( ) != NUMBER1 ) ;
}
}
|
Checks exit code
|
<nb> public class Planner {
if ( direction == RelativeDirection . CONTINUE ) {
SINGLE
if ( step . elevation != null ) {
- if ( step . elevation . length ( ) > NUMBER0 ) step . elevation += STRING0 ;
- step . elevation += encodeElevationProfile ( edge , distance ) ;
+ String s = encodeElevationProfile ( edge , distance ) ;
+ if ( ( step . elevation . length ( ) > NUMBER0 ) && ! s . equals ( STRING1 ) ) step . elevation += STRING0 ;
+ step . elevation += s ;
}
distance += edge . getDistance ( ) ;
}
|
apply patch from colin to work around certain elevation cases
|
<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 class DeepLearningModel extends Model < DeepLearningModel , DeepLearningModel
}
} SINGLE
- SINGLE
- public ModelSchemaV3 schema ( ) { return new DeepLearningModelV3 ( ) ; }
-
void set_model_info ( DeepLearningModelInfo mi ) {
assert ( mi != null ) ;
assert mi . data_info ( ) . _key . equals ( model_info . data_info . _key ) ;
|
Remove circular dependency
|
<nb> public interface Server
public Collection < HostedConnection > getConnections ( ) ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public boolean hasConnections ( ) ;
+
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class DefaultServer implements Server
public void broadcast ( Filter < ? super HostedConnection > filter , Message message )
{
+ if ( connections . isEmpty ( ) )
+ return ;
+
ByteBuffer buffer = MessageProtocol . messageToBuffer ( message , null ) ;
FilterAdapter adapter = filter == null ? null : new FilterAdapter ( filter ) ;
<nb> public class DefaultServer implements Server
return connections . get ( id ) ;
}
+ public boolean hasConnections ( )
+ {
+ return ! connections . isEmpty ( ) ;
+ }
+
public Collection < HostedConnection > getConnections ( )
{
return Collections . unmodifiableCollection ( ( Collection < HostedConnection > ) connections . values ( ) ) ;
|
Added a method for easily determining if there are active
|
<nb> public class LoadDatasets extends TestUtil {
private static class MyJob extends Job { @ override public void execImpl ( ) { new LoadDatasets ( ) . load ( ) ; } }
public static void main ( String [ ] args ) throws Exception {
Class job = MyJob . class ;
- samples . launchers . CloudLocal . launch ( job , NUMBER0 ) ;
+ samples . launchers . CloudLocal . launch ( job , NUMBER1 ) ;
SINGLE
SINGLE
SINGLE
<nb> public class LoadDatasets extends TestUtil {
void load ( ) {
SINGLE
String [ ] files = new String [ ] {
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
+ STRING0 ,
STRING1 ,
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
+ STRING2 ,
+ STRING3 ,
+ STRING4 ,
+ STRING5 ,
+ STRING6 ,
} ;
SINGLE
|
Revert LoadDatasets files back to the usual
|
<nb> public class GLRenderer implements Renderer {
}
}
- if ( hasExtension ( STRING0 ) ) {
+ if ( hasExtension ( STRING0 ) || gl3 != null ) {
limits . put ( Limits . FrameBufferMrtAttachments , getInteger ( GLExt . GL_MAX_DRAW_BUFFERS_ARB ) ) ;
if ( limits . get ( Limits . FrameBufferMrtAttachments ) > NUMBER0 ) {
caps . add ( Caps . FrameBufferMRT ) ;
|
enable MRT on gl3
|
<nb> public class EditorHyperlinkSupport {
action . consume ( next ) ;
linkFollowed ( editor , ranges , next ) ;
}
- } , i , ranges . size ( ) ) ;
+ } , newIndex == - NUMBER0 ? - NUMBER0 : newIndex + NUMBER0 , ranges . size ( ) ) ;
}
SINGLE
|
refine numeration of commands
|
<nb> public class GBMTest extends TestUtil {
}
Scope . exit ( ) ;
for ( double mse : mses )
- assertEquals ( FLOAT0 , mse , FLOAT1 ) ; SINGLE
+ assertEquals ( FLOAT2 , mse , FLOAT1 ) ; SINGLE
}
@ test public void testReprodubilityAirlineSingleNode ( ) {
<nb> public class GBMTest extends TestUtil {
}
Scope . exit ( ) ;
for ( double mse : mses )
- assertEquals ( FLOAT0 , mse , FLOAT1 ) ; SINGLE
+ assertEquals ( FLOAT2 , mse , FLOAT1 ) ; SINGLE
}
SINGLE
|
Fix super picky golden JUnit tests for GBM after recent code refactoring
|
<nb> public class IabHelper {
inv = queryInventory ( mService , mContext . getPackageName ( ) ,
mSubscriptionsSupported , querySkuDetails , moreSkus ) ;
} catch ( IabException e ) {
+ Timber . e ( e , STRING0 ) ;
result = e . getResult ( ) ;
}
|
Add inventory check error logging
|
<nb> public class GSPResonseWriter extends PrintWriter {
COMMENT
public void print ( Object obj ) {
if ( obj == null ) obj = STRING0 ;
- write ( String . valueOf ( obj ) ) ;
+ String out = String . valueOf ( obj ) ;
+ if ( out == null ) out = STRING0 ;
+ write ( out ) ;
}
COMMENT
|
added additional null check after convert to string to avoid null pointers
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
<nb> public class ComplexTitanQuery implements TitanQuery {
SINGLE
} else if ( q instanceof ComplexTitanQuery ) {
( ( ComplexTitanQuery ) q ) . flattenQuery ( container ) ;
- } else throw new InvalidStateException ( STRING0 + q . getClass ( ) ) ;
+ } else throw new IllegalStateException ( STRING0 + q . getClass ( ) ) ;
}
}
|
Corrected wrong exception import
|
<nb> public final class TreeWalker
return ;
}
- final String msg = STRING0 ;
+ final String msg = STRING1 ;
try {
final FileText text = FileText . fromLines ( file , lines ) ;
|
Remove obsolete space from error message
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Add an import missing
|
<nb> public interface GrailsControllerClass extends InjectableGrailsClass {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
- public String getViewName ( String closureName ) ;
+ public String getViewName ( String uri ) ;
COMMENT
COMMENT
|
Updated javadoc for typed views
|
<nb> public class ModClassLoader extends URLClassLoader
for ( URL url : mainClassLoader . getSources ( ) )
{
URI uri = url . toURI ( ) ;
- if ( uri . getScheme ( ) == STRING0 )
+ if ( uri . getScheme ( ) . equals ( STRING0 ) )
{
files . add ( new File ( uri ) ) ;
}
<nb> public class ASMTransformerWrapper
@ override
public InputStream getInputStream ( )
{
- try
- {
- return new ByteArrayInputStream ( wrapperCache . get ( file ) ) ;
- }
- catch ( ExecutionException e )
- {
- throw new RuntimeException ( e ) ;
- }
+ return new ByteArrayInputStream ( wrapperCache . getUnchecked ( file ) ) ;
}
@ override
<nb> public class ASMTransformerWrapper
private static String getWrapperName ( String parentClass )
{
- return parentClass + STRING1 ;
+ return STRING2 + parentClass ;
}
private static class WrapperVisitor extends ClassVisitor
|
Moved transformer wrappers to a separate package should fix signing errors fixed debug mods not loading in forgedev string comparison
|
<nb> public class RedisClient extends DB {
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
private double hash ( String key ) {
return key . hashCode ( ) ;
|
remarked hash function s utility
|
<nb> public class SpringApplicationHierarchyTests {
@ test
public void testParent ( ) {
SpringApplicationBuilder builder = new SpringApplicationBuilder ( Child . class ) ;
+ builder . properties ( STRING0 , STRING1 ) ;
builder . parent ( Parent . class ) ;
this . context = builder . run ( STRING2 ) ;
}
@ test
public void testChild ( ) {
- this . context = new SpringApplicationBuilder ( Parent . class ) . child ( Child . class ) . run (
- STRING2 ) ;
+ SpringApplicationBuilder builder = new SpringApplicationBuilder ( Parent . class ) ;
+ builder . properties ( STRING0 , STRING1 ) ;
+ builder . child ( Child . class ) ;
+ this . context = builder . run ( STRING2 ) ;
}
@ enableautoconfiguration ( exclude = { ElasticsearchDataAutoConfiguration . class ,
|
Disable DB migrations in ApplicationHierarchyTests
|
<nb> public class ScriptExecutionTest extends BaseTest {
STRING0 ) ;
assertEquals ( STRING1 , stringResult ) ;
}
+
+ @ test
+ public void shouldBeAbleToExecuteMultipleAsyncScriptsSequentiallyWithNavigation ( ) {
+ WebDriver d = getDriver ( ) ;
+ d . manage ( ) . timeouts ( ) . setScriptTimeout ( NUMBER0 , TimeUnit . MILLISECONDS ) ;
+
+ d . get ( STRING2 ) ;
+ Number numericResult = ( Number ) ( ( JavascriptExecutor ) d ) . executeAsyncScript (
+ STRING3 ) ;
+ assertEquals ( NUMBER1 , numericResult . intValue ( ) ) ;
+
+ d . get ( STRING2 ) ;
+ String stringResult = ( String ) ( ( JavascriptExecutor ) d ) . executeAsyncScript (
+ STRING0 ) ;
+ assertEquals ( STRING1 , stringResult ) ;
+
+ SINGLE
+ d . get ( STRING2 ) ;
+ }
}
|
Adding test which crashes PhantomJS
|
<nb> public class RendererRegistry {
if ( f != null && f . getName ( ) . endsWith ( IndexConstants . RENDERER_INDEX_EXT ) ) {
if ( ! internalRenderers . containsValue ( f . getName ( ) ) ) {
String name = f . getName ( ) . substring ( NUMBER0 , f . getName ( ) . length ( ) - IndexConstants . RENDERER_INDEX_EXT . length ( ) ) ;
- externalRenderers . put ( name , f ) ;
+ externalRenderers . put ( name . replace ( STRING0 , STRING1 ) . replace ( STRING2 , STRING1 ) , f ) ;
}
}
}
|
Fix loading of custom rendering files containing dashes and underscores
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class DiskCacheProducer implements Producer < EncodedImage > {
final AtomicBoolean isCancelled = new AtomicBoolean ( false ) ;
Task < EncodedImage > diskLookupTask ;
if ( mChooseCacheByImageSize ) {
+ if ( cacheKeys == null ) {
+ cacheKeys = new ArrayList < > ( NUMBER0 ) ;
+ cacheKeys . add ( preferredCacheKey ) ;
+ }
final List < CacheKey > finalCacheKeys = cacheKeys ;
boolean alreadyInSmall = mSmallImageBufferedDiskCache . containsSync ( cacheKeys ) ;
boolean alreadyInMain = mDefaultBufferedDiskCache . containsSync ( cacheKeys ) ;
|
Fix instacrash due to conflicting experiments
|
<nb> public abstract class SharedTreeModelBuilder extends ValidatedJob {
}
@ override public String speedDescription ( ) { return STRING0 ; }
- @ override public long speedValue ( ) { return runTimeMs ( ) / ntrees ; }
+ @ override public long speedValue ( ) {
+ Value value = DKV . get ( dest ( ) ) ;
+ DTree . TreeModel m = value != null ? ( DTree . TreeModel ) value . get ( ) : null ;
+ long numTreesBuiltSoFar = m == null ? NUMBER0 : m . treeBits . length ;
+ long sv = ( numTreesBuiltSoFar <= NUMBER0 ) ? NUMBER0 : ( runTimeMs ( ) / numTreesBuiltSoFar ) ;
+ return sv ;
+ }
protected abstract water . util . Log . Tag . Sys logTag ( ) ;
protected abstract void buildModel ( Frame fr , String names [ ] , String domains [ ] [ ] , Key outputKey , Key dataKey , Key testKey , Timer t_build ) ;
|
Fix speedValue to use trees built so far instead of total trees
|
<nb> public class PolicyContext
while ( s != null )
{
- System . out . println ( STRING0 + s ) ;
+ SINGLE
SINGLE
i1 = s . indexOf ( STRING1 ) ;
- System . out . println ( STRING2 + i1 ) ;
+ SINGLE
if ( i1 < NUMBER0 )
{
break ;
}
i2 = s . indexOf ( STRING3 , i1 + NUMBER1 ) ;
- System . out . println ( STRING4 + i2 ) ;
+ SINGLE
if ( i2 < NUMBER0 )
{
break ;
<nb> public class PolicyContext
s = s . substring ( NUMBER0 , i1 ) + property + s . substring ( i2 + NUMBER2 ) ;
- System . out . println ( STRING5 + s ) ;
+ SINGLE
}
return s ;
|
remove debug info
|
<nb> public class BenchmarkRunner extends MediaItemBenchmark
@ override
protected void addTests ( TestGroups groups )
{
- JacksonSmileManual . register ( groups ) ;
-
SINGLE
JavaBuiltIn . register ( groups ) ;
JavaManual . register ( groups ) ;
<nb> public class BenchmarkRunner extends MediaItemBenchmark
JacksonBsonManual . register ( groups ) ;
JacksonBsonDatabind . register ( groups ) ;
MongoDB . register ( groups ) ;
- SINGLE
+ JacksonSmileManual . register ( groups ) ;
JacksonSmileDatabind . register ( groups ) ;
ProtostuffSmile . register ( groups ) ;
|
Fix an accidental check in for reordering of main tests
|
<nb> public class ODistributedServerManager extends OServerHandlerAbstract {
SINGLE
public ODocument addServerInConfiguration ( final String iDatabaseName , final String iAlias , final String iAddress ,
- final boolean iAsynchronous ) {
- StringBuilder cfg = new StringBuilder ( ) ;
+ final boolean iSynchronous ) {
+ final StringBuilder cfg = new StringBuilder ( ) ;
cfg . append ( STRING0 ) ;
cfg . append ( STRING1 ) ;
cfg . append ( getId ( ) ) ;
cfg . append ( STRING2 ) ;
- cfg . append ( iAsynchronous ? STRING3 : STRING4 ) ;
+ cfg . append ( iSynchronous ? STRING4 : STRING3 ) ;
cfg . append ( STRING5 ) ;
cfg . append ( iAlias ) ;
cfg . append ( STRING6 ) ;
|
Fixed bug on synch asynch distribution
|
<nb> public class AlarmManager {
ListenerWrapper wrapper = null ;
synchronized ( AlarmManager . class ) {
- final WeakReference < ListenerWrapper > wrapperRef ;
- wrapperRef = sWrappers . get ( listener ) ;
- if ( wrapperRef != null ) {
- wrapper = wrapperRef . get ( ) ;
+ if ( sWrappers != null ) {
+ final WeakReference < ListenerWrapper > wrapperRef ;
+ wrapperRef = sWrappers . get ( listener ) ;
+ if ( wrapperRef != null ) {
+ wrapper = wrapperRef . get ( ) ;
+ }
}
}
|
Fix NPE in AlarmManager cancel
|
<nb> public class SideMenuFragment extends InsetAwareFragment
@ override
public void hideMovieCheckin ( ) {
mCheckinLayout . setVisibility ( View . GONE ) ;
- mCheckinImageView . setVisibility ( View . INVISIBLE ) ;
+ mCheckinImageView . setVisibility ( View . GONE ) ;
}
@ override
|
Make sure that the checkin image doesn t affect layout
|
<nb> public final class OnePublisherToThreeWorkerPoolThroughputTest
}
}
- private final RingBuffer < ValueEvent > ringBuffer =
- RingBuffer . createSingleProducer ( ValueEvent . EVENT_FACTORY ,
+ private final RingBuffer < ValueEvent > ringBuffer =
+ RingBuffer . createSingleProducer ( ValueEvent . EVENT_FACTORY ,
BUFFER_SIZE ,
new YieldingWaitStrategy ( ) ) ;
-
- private final WorkerPool < ValueEvent > workerPool =
+
+ private final WorkerPool < ValueEvent > workerPool =
new WorkerPool < ValueEvent > ( ringBuffer ,
ringBuffer . newBarrier ( ) ,
new FatalExceptionHandler ( ) ,
handlers ) ;
+ {
+ ringBuffer . addGatingSequences ( workerPool . getWorkerSequences ( ) ) ;
+ }
SINGLE
|
Fix worker pool performance test
|
<nb> public class ThrowableResultOfMethodCallIgnoredInspection extends BaseInspection
while ( parent instanceof PsiParenthesizedExpression || parent instanceof PsiTypeCastExpression ) {
parent = parent . getParent ( ) ;
}
- if ( canBeThrown ( parent ) ) {
+ if ( ! TypeUtils . expressionHasTypeOrSubtype ( expression , CommonClassNames . JAVA_LANG_THROWABLE ) ) {
return ;
}
- if ( ! TypeUtils . expressionHasTypeOrSubtype ( expression , CommonClassNames . JAVA_LANG_THROWABLE ) ) {
+ if ( canBeThrown ( parent ) ) {
return ;
}
final PsiMethod method = expression . resolveMethod ( ) ;
|
do lighter checks before calling isChainable that might load AST
|
<nb> public class UpcomingFragment extends ListFragment implements LoaderManager . Load
public void onActivityCreated ( Bundle savedInstanceState ) {
super . onActivityCreated ( savedInstanceState ) ;
- setEmptyText ( getString ( R . string . no_episodes ) ) ;
+ setEmptyText ( getString ( R . string . noupcoming ) ) ;
setupAdapter ( ) ;
|
Display correct no episodes message in Upcoming
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fixing javadoc nit
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class LazyParseableElement extends CompositeElement {
parsedNode = type . parseContents ( this ) ;
if ( parsedNode == null && myText . length ( ) > NUMBER0 ) {
- if ( ApplicationManagerEx . getApplicationEx ( ) . isInternal ( ) && ! ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) {
+ if ( ApplicationManager . getApplication ( ) . isInternal ( ) && ! ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) {
LOG . error ( STRING0 + myText + STRING1 + LogUtil . objectAndClass ( type ) ) ;
} else {
LOG . error ( STRING2 + LogUtil . objectAndClass ( type ) ) ;
|
remove unnecessary usage of ApplicationEx
|
<nb> public class HorizontalBarChartView extends BaseBarChartView {
float offset ;
BarSet barSet ;
Bar bar ;
-
- for ( int i = nEntries - NUMBER0 ; i >= NUMBER1 ; i -- ) {
+
+ for ( int i = NUMBER1 ; i < nEntries ; i ++ ) {
SINGLE
offset = data . get ( NUMBER1 ) . getEntry ( i ) . getY ( ) - drawingOffset ;
<nb> public class HorizontalBarChartView extends BaseBarChartView {
float offset ;
BarSet barSet ;
Bar bar ;
-
- for ( int i = nEntries - NUMBER0 ; i >= NUMBER1 ; i -- ) {
+
+ for ( int i = NUMBER1 ; i < nEntries ; i ++ ) {
SINGLE
offset = data . get ( NUMBER1 ) . getEntry ( i ) . getY ( ) - drawingOffset ;
|
Fixed HorizontalBarChart onClick wrong index retrieval
|
<nb> public class GradlePluginLord {
if ( failure instanceof LocationAwareException ) {
LocationAwareException scriptException = ( LocationAwareException ) failure ;
formatter . format ( STRING0 , scriptException . getLocation ( ) ) ;
- formatter . format ( STRING1 , scriptException . getOriginalMessage ( ) ) ;
+ formatter . format ( STRING1 , scriptException . getTarget ( ) . getMessage ( ) ) ;
for ( Throwable cause : scriptException . getReportableCauses ( ) ) {
formatter . format ( STRING2 , getMessage ( cause ) ) ;
|
Just use the target exception directly
|
<nb> import NAMESPACE ;
public class UiUtils {
- private UiUtils ( ) {
- }
+ private UiUtils ( ) { }
- public static void setScrollPaneSize ( JScrollPane scrollPane ,
- int rows , int columns ) {
+ public static void setScrollPaneSize ( JScrollPane scrollPane , int rows , int columns ) {
final Component view = scrollPane . getViewport ( ) . getView ( ) ;
- setComponentSize ( view , rows , columns ) ;
+ final FontMetrics fontMetrics = view . getFontMetrics ( view . getFont ( ) ) ;
+ final int width = fontMetrics . charWidth ( STRING0 ) * columns ;
+ scrollPane . setPreferredSize ( new Dimension ( width , fontMetrics . getHeight ( ) * rows ) ) ;
}
public static void setComponentSize ( Component component , int rows , int columns ) {
|
correctly set scrollpane size for Mismatched query and update of collection inspection
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.