Dataset Viewer
diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
---|---|
<nb> public class HttpRequestEncoder extends HttpObjectEncoder < HttpRequest > {
@ override
protected void encodeInitialLine ( ByteBuf buf , HttpRequest request ) throws Exception {
- buf . writeBytes ( request . getMethod ( ) . toString ( ) . getBytes ( CharsetUtil . US_ASCII ) ) ;
+ encodeAscii ( request . getMethod ( ) . toString ( ) , buf ) ;
buf . writeByte ( SP ) ;
SINGLE
<nb> public class HttpRequestEncoder extends HttpObjectEncoder < HttpRequest > {
buf . writeBytes ( uri . getBytes ( CharsetUtil . UTF_8 ) ) ;
buf . writeByte ( SP ) ;
- buf . writeBytes ( request . getProtocolVersion ( ) . toString ( ) . getBytes ( CharsetUtil . US_ASCII ) ) ;
+ encodeAscii ( request . getProtocolVersion ( ) . toString ( ) , buf ) ;
buf . writeBytes ( CRLF ) ;
}
} | Improve performance of HttpRequestEncoder encodeInitialLine |
<nb> public class AuthenticationProcessingFilter extends AbstractProcessingFilter {
UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken ( username ,
password ) ;
- authRequest . setDetails ( request . getRemoteAddr ( ) ) ;
+
+ SINGLE
+ setDetails ( request , authRequest ) ;
return this . getAuthenticationManager ( ) . authenticate ( authRequest ) ;
} | Fix bug where class should delegate to setDetails method not set the details directly |
<nb> public class StringPropertyCodeGenerator extends PropertyCodeGenerator implement
if ( myHaveSetDisplayedMnemonicIndex ) {
generator . loadLocal ( componentLocal ) ;
generator . push ( textWithMnemonic . myMnemonicIndex ) ;
- generator . invokeStatic ( Type . getType ( SupportCode . class ) ,
- new Method ( STRING0 ,
- Type . VOID_TYPE , new Type [ ] { Type . getType ( JComponent . class ) , Type . INT_TYPE } ) ) ;
+ generator . invokeVirtual ( Type . getType ( componentClass ) ,
+ new Method ( STRING0 ,
+ Type . VOID_TYPE , new Type [ ] { Type . INT_TYPE } ) ) ;
}
return true ;
} | don t use SupportCode for generating setDisplayedMnemonicIndex |
<nb> public class JacocoAntInitializer extends Initializer implements CoverageExtensi
@ override
public boolean shouldExecuteOnProject ( org . sonar . api . resources . Project project ) {
return project . getAnalysisType ( ) . equals ( Project . AnalysisType . DYNAMIC ) ;
- SINGLE
}
@ override
<nb> public class JacocoAntInitializer extends Initializer implements CoverageExtensi
}
}
SINGLE
- SINGLE
target . performTasks ( ) ;
}
}
<nb> public class Filter {
return ! isNumericMetric || sortedByLanguage || sortedByName || sortedByVersion ;
}
- SINGLE
- SINGLE
- SINGLE
-
public Filter setSortedMetricId ( Integer id , boolean isNumericValue , Boolean isVariation ) {
unsetSorts ( ) ;
this . sortedMetricId = id ; | Remove some commented out code |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public class DialogWrapperPeerImpl extends DialogWrapperPeer {
<nb> public class DialogWrapperPeerImpl extends DialogWrapperPeer {
myFocusTrackback . dispose ( ) ;
myFocusTrackback = null ;
}
+ final BufferStrategy strategy = getBufferStrategy ( ) ;
+ if ( strategy != null ) {
+ try {
+ Method method = strategy . getClass ( ) . getMethod ( STRING0 ) ; SINGLE
+ method . invoke ( strategy ) ;
+ }
+ catch ( Exception ex ) {
+ SINGLE
+ }
+ }
super . dispose ( ) ;
if ( rootPane != null ) { SINGLE | dispose buffer strategy on closing dialog |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> class WebConnectorService implements Service < Connector > {
boolean nativeSSL = false ;
if ( connector . getProtocolHandler ( ) instanceof Http11AprProtocol ) {
nativeSSL = true ;
- } else if ( ! ( connector . getProtocolHandler ( ) instanceof Http11Protocol ) ) {
+ } else if ( ( connector . getProtocolHandler ( ) instanceof AjpProtocol ) || ( connector . getProtocolHandler ( ) instanceof AjpAprProtocol ) ) {
throw new StartException ( MESSAGES . noSSLWithNonHTTPConnectors ( ) ) ;
}
SINGLE | Allow non AJP connectors to support SSL by default |
<nb> public class ServletOutputStreamImpl extends ServletOutputStream implements Buff
if ( channel == null ) {
channel = servletRequestContext . getExchange ( ) . getResponseChannel ( ) ;
}
- StreamSinkChannel channel = this . channel ;
- channel . shutdownWrites ( ) ;
state |= FLAG_DELEGATE_SHUTDOWN ;
- Channels . flushBlocking ( channel ) ;
+ StreamSinkChannel channel = this . channel ;
+ if ( channel != null ) { SINGLE
+ channel . shutdownWrites ( ) ;
+ Channels . flushBlocking ( channel ) ;
+ }
} finally {
if ( pooledBuffer != null ) {
pooledBuffer . free ( ) ; | Fix NPE when using mock requests |
<nb> public class PathBaseDirBuilder implements BaseDirBuilder {
fileSystem . close ( ) ;
}
+ System . gc ( ) ;
+
Files . walkFileTree ( toDelete , new SimpleFileVisitor < Path > ( ) {
@ override
public FileVisitResult visitFile ( Path file , BasicFileAttributes attrs ) throws IOException { | Explicitly call System gc to fix tests on Windows platform |
<nb> public class SerialMessage {
COMMENT
@ override
public String toString ( ) {
- return String . format ( STRING0 ,
+ return String . format ( STRING1 ,
new Object [ ] { messageClass , messageClass . key , messageType , messageType . ordinal ( ) ,
- SerialMessage . bb2hex ( this . getMessageBuffer ( ) ) } ) ;
+ SerialMessage . bb2hex ( this . getMessagePayload ( ) ) } ) ;
} ;
COMMENT | Change printout of message to payload to avoid modifying the packet |
<nb> public class ClockwiseRotate implements LayoutBuilder {
private ClockwiseRotateLayoutUI ui = new ClockwiseRotateLayoutUI ( ) ;
public Layout buildLayout ( ) {
- return new RotateLayout ( this , - NUMBER0 ) ;
+ return new RotateLayout ( this , NUMBER0 ) ;
}
public String getName ( ) { | Fix the initial value of the rotate parameter for Clockwise layout |
<nb> public class AzureStorageServiceImpl extends AbstractLifecycleComponent < AzureSto
options . setRetryPolicyFactory ( new RetryNoRetry ( ) ) ;
blob_container . deleteIfExists ( options , null ) ;
COMMENT
+ if ( logger . isTraceEnabled ( ) ) {
+ logger . trace ( STRING0 , container ) ;
+ }
blob_container . deleteIfExists ( ) ;
} | Add a missing trace to removeContainer |
<nb> public class RegionCommands {
desc = STRING0 ,
help =
STRING1 +
- STRING2 +
+ STRING3 +
STRING4 +
STRING5 ,
flags = STRING6 , | Fixed typo in curve s help |
<nb> public class UsageInfo2UsageAdapter implements Usage , UsageInModule , UsageInLibr
}
public TextChunk [ ] getText ( ) {
- final PsiElement element = getElement ( ) ;
- if ( element != null && element . isValid ( ) ) {
+ if ( isValid ( ) ) {
SINGLE
final long currentModificationStamp = getCurrentModificationStamp ( ) ;
if ( currentModificationStamp != myModificationStamp ) { | js highlighting fixes |
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> package NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ @ threadsafe
public abstract class IndexDefinition < T > {
COMMENT
SINGLE
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
+ @ threadsafe
class NonUniqueFieldIndex < T > implements FieldIndex < T > {
private final IndexDefinition < T > mIndexDefinition ;
private final ConcurrentHashMap < Object , ConcurrentHashSet < T > > mIndexMap ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
+ @ threadsafe
class UniqueFieldIndex < T > implements FieldIndex < T > {
private final IndexDefinition < T > mIndexDefinition ;
private final ConcurrentHashMap < Object , T > mIndexMap ; | add ThreadSafe annotation |
<nb> public class RecyclerView extends ViewGroup {
COMMENT
public void clear ( ) {
mAttachedScrap . clear ( ) ;
- mCachedViews . clear ( ) ;
+ recycleCachedViews ( ) ;
}
COMMENT
<nb> public class RecyclerView extends ViewGroup {
recycleViewHolder ( getChildViewHolderInt ( view ) ) ;
}
+ void recycleCachedViews ( ) {
+ final int count = mCachedViews . size ( ) ;
+ for ( int i = count - NUMBER0 ; i >= NUMBER1 ; i -- ) {
+ final ViewHolder cachedView = mCachedViews . get ( i ) ;
+ if ( cachedView . isRecyclable ( ) ) {
+ getRecycledViewPool ( ) . putRecycledView ( cachedView ) ;
+ dispatchViewRecycled ( cachedView ) ;
+ }
+ mCachedViews . remove ( i ) ;
+ }
+ }
+
void recycleViewHolder ( ViewHolder holder ) {
if ( holder . isScrap ( ) || holder . itemView . getParent ( ) != null ) {
throw new IllegalArgumentException ( | Recycle cached views when clearing the cache |
<nb> public abstract class UltimateViewAdapter extends RecyclerView . Adapter < RecyclerV
@ override
public long getHeaderId ( int position ) {
if ( customHeaderView != null && position == NUMBER0 ) return - NUMBER1 ;
- return generateHeaderId ( position ) ;
+ if ( getAdapterItemCount ( ) > NUMBER0 )
+ return generateHeaderId ( position ) ;
+ else return - NUMBER1 ;
}
public abstract long generateHeaderId ( int position ) ; | update UltimateViewAdapter for HeadId |
<nb>
SINGLE
SINGLE
SINGLE
+ SINGLE
package NAMESPACE ;
<nb> public class HttpSender {
public static final int BEAN_SHELL_INITIATOR = NUMBER0 ;
public static final int ACCESS_CONTROL_SCANNER_INITIATOR = NUMBER1 ;
public static final int AJAX_SPIDER_INITIATOR = NUMBER2 ;
+ public static final int FORCED_BROWSE_INITIATOR = NUMBER3 ;
private static Logger log = Logger . getLogger ( HttpSender . class ) ; | Add initiator constant for Forced Browse requests |
<nb> public abstract class LoadBalancerContext < T extends ClientRequest , S extends IRe
host = svc . getHost ( ) ;
if ( shouldUseOverridePort ) {
- logger . debug ( STRING0 , clientName ) ;
+ logger . debug ( STRING0 , overridePort , clientName ) ;
port = overridePort ;
} else {
port = svc . getPort ( ) ; | fixing debug statement |
<nb> import NAMESPACE ;
import NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
public class Logger extends LogListenerAdapter {
private static final String TAG = STRING0 ; | Add JavaDoc to Logger from Sample app |
<nb> public class CompletionPopupPanel extends ThemedPopupPanel
private void hideAll ( )
{
SINGLE
- help_ . setPopupPosition ( - NUMBER0 , - NUMBER0 ) ;
- setPopupPosition ( - NUMBER0 , - NUMBER0 ) ;
- help_ . clearHelp ( false ) ;
+ setVisible ( false ) ;
help_ . setVisible ( false ) ;
}
<nb> public class CompletionPopupPanel extends ThemedPopupPanel
{
return help_ . isVisible ( ) && help_ . isShowing ( ) ;
}
-
+
private HTML setText ( String text )
{
HTML contents = new HTML ( ) ; | remove popup placement hacks |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
public class ChangeBaseParserWeight { | Add a brief comment |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ; | TEST remove redundant import |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Fix Javadoc in Theories |
<nb> public abstract class AbstractProject implements ProjectInternal , DynamicObjectA
return fileOperations . delete ( paths ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ @ deprecated
public Directory dir ( String path ) {
+ DeprecationLogger . nagUserOfReplacedMethod ( STRING0 , STRING1 ) ;
String [ ] pathElements = path . split ( STRING2 ) ;
String name = STRING3 ;
Directory dirTask = null ; | Deprecate AbstractProject dir String |
<nb> public abstract class AbstractConnector extends ContainerLifeCycle implements Co
SINGLE
long stopTimeout = getStopTimeout ( ) ;
- if ( stopTimeout > NUMBER0 && _stopping != null )
- _stopping . await ( stopTimeout , TimeUnit . MILLISECONDS ) ;
+ CountDownLatch stopping = _stopping ;
+ if ( stopTimeout > NUMBER0 && stopping != null )
+ stopping . await ( stopTimeout , TimeUnit . MILLISECONDS ) ;
_stopping = null ;
super . doStop ( ) ;
<nb> public abstract class AbstractConnector extends ContainerLifeCycle implements Co
{
_acceptors [ _acceptor ] = null ;
}
- _stopping . countDown ( ) ;
+ CountDownLatch stopping = _stopping ;
+ if ( stopping != null )
+ stopping . countDown ( ) ;
}
}
} | improved shutdown handling for travis CI |
<nb> public abstract class XDebuggerUtil {
COMMENT
COMMENT
public abstract void iterateLine ( @ notnull Project project , @ notnull Document document , int line , @ notnull Processor < PsiElement > processor ) ;
+
+ public abstract void showBreakpointsDialog ( @ notnull Project project , @ nullable XBreakpoint < ? > breakpointToSelect ) ;
}
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class XDebuggerUtilImpl extends XDebuggerUtil {
}
}
}
+
+ @ override
+ public void showBreakpointsDialog ( @ notnull Project project , @ nullable XBreakpoint < ? > breakpointToSelect ) {
+ BreakpointsConfigurationDialogFactory . getInstance ( project ) . createDialog ( breakpointToSelect ) . show ( ) ;
+ }
} | added method to show breakpoints dialog |
<nb> public abstract class AbstractEntityManagerImpl implements HibernateEntityManage
if ( clazz . equals ( SessionImplementor . class ) ) {
return ( T ) getSession ( ) ;
}
- SINGLE
- return null ; SINGLE
+ else {
+ SINGLE
+ throw new PersistenceException ( STRING0 + clazz ) ;
+ }
}
private void joinTransaction ( boolean ignoreNotJoining ) { | unwrap should raise a PE if the type is not unwrappable by the provider |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class UserManager implements IQResultListener {
static {
SINGLE
userCache = CacheFactory . createCache ( STRING0 ) ;
- remoteUsersCache = CacheFactory . createCache ( STRING1 ) ;
+ remoteUsersCache = CacheFactory . createCache ( STRING2 ) ;
SINGLE
initProvider ( ) ; | Fixed cache name typo |
<nb> public class SummaryPage extends Request {
Response r = Response . done ( res ) ;
r . setBuilder ( ROOT_OBJECT , new Builder ( ) {
@ override public String build ( Response response , JsonElement element , String contextName ) {
- StringBuilder pageBldr = new StringBuilder ( STRING0 ) ;
- StringBuilder sb = new StringBuilder ( STRING1 ) ;
+ StringBuilder pageBldr = new StringBuilder ( STRING2 ) ;
+ StringBuilder sb = new StringBuilder ( STRING3 ) ;
JsonArray cols = element . getAsJsonObject ( ) . get ( STRING4 ) . getAsJsonObject ( ) . get ( STRING5 ) . getAsJsonArray ( ) ;
Iterator < JsonElement > it = cols . iterator ( ) ; | fixed scroll tested in Safari FF Chrome |
<nb> public interface Symbolizable extends Perspective {
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
void newReference ( Symbol symbol , int fromOffset , int toOffset ) ; | Add missing Javadoc |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CmdStatusClient extends BaseSvnClient implements StatusClient {
if ( StringUtil . isEmptyOrSpaces ( result ) ) {
throw new SVNException ( SVNErrorMessage . create ( SVNErrorCode . FS_GENERAL , STRING0 +
- command . myCommandLine . getCommandLineString ( ) ) ) ;
+ command . getCommandText ( ) ) ) ;
}
try { | Refactored CmdStatusClient do not use CommandExecutor myCommandLine directly use corresponding CommandExecutor methods instead |
<nb> public class DispatcherTest {
verify ( service ) . shutdown ( ) ;
}
+ @ test public void shutdownUnregistersReceiver ( ) throws Exception {
+ dispatcher . shutdown ( ) ;
+ verify ( context ) . unregisterReceiver ( dispatcher . receiver ) ;
+ }
+
@ test public void performSubmitWithNewRequestQueuesHunter ( ) throws Exception {
Action action = TestUtils . mockAction ( URI_KEY_1 , URI_1 ) ;
dispatcher . performSubmit ( action ) ; | Added test to verify that recevier is in fact unregistered |
<nb> class InferJSDocInfo extends AbstractPostOrderCallback
break ;
case Token . STRING_KEY :
+ case Token . GETTER_DEF :
+ case Token . SETTER_DEF :
docInfo = n . getJSDocInfo ( ) ;
if ( docInfo == null ) {
return ;
<nb> public class CheckAccessControlsTest extends CompilerTestCase {
} , null , BAD_PRIVATE_PROPERTY_ACCESS ) ;
}
+ public void testNoPrivateAccessForProperties11 ( ) {
+ test ( new String [ ] {
+ STRING0 +
+ STRING1 +
+ STRING2 +
+ STRING3 ,
+ STRING4
+ } , null , BAD_PRIVATE_PROPERTY_ACCESS ) ;
+ }
+
+ public void testNoPrivateAccessForProperties12 ( ) {
+ test ( new String [ ] {
+ STRING0 +
+ STRING1 +
+ STRING5 +
+ STRING3 ,
+ STRING6
+ } , null , BAD_PRIVATE_PROPERTY_ACCESS ) ;
+ }
+
public void testProtectedAccessForProperties1 ( ) {
testSame ( new String [ ] {
STRING0 + | Handle the getter and setter case |
<nb> public class PostNewDesignerNewsStory extends Activity {
SINGLE
if ( getIntent ( ) != null && Intent . ACTION_SEND . equals ( getIntent ( ) . getAction ( ) ) ) {
- url . setText ( ShareCompat . IntentReader . from ( this ) . getText ( ) ) ;
+ ShareCompat . IntentReader intentReader = ShareCompat . IntentReader . from ( this ) ;
+ url . setText ( intentReader . getText ( ) ) ;
+ title . setText ( intentReader . getSubject ( ) ) ;
SINGLE
SINGLE | Make share intent use subject for title |
<nb> public class HistoryStrategy {
}
}
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public boolean hasChangedSubject ( ) {
+ return roomSubject != null ;
+ }
} | Added method hasChangedHistory |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class WorkerProcessClassPathProvider implements ClassPathProvider , Closea
GradleWorkerMain . class ,
BootstrapSecurityManager . class ,
EncodedStream . EncodedInput . class ,
+ ClassLoaderUtils . class ,
FilteringClassLoader . class ,
FilteringClassLoader . Spec . class ,
ClassLoaderHierarchy . class , | Fixed construction of worker process launcher jar |
<nb> public abstract class NanoHTTPD {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
void parseBody ( Map < String , String > files ) throws IOException , ResponseException ;
} | Fix javadoc tag |
<nb> public class LexicalizedParserServer {
model = ParserGrammar . loadModel ( parserModel ) ;
} else {
model = ParserGrammar . loadModel ( parserModel , STRING0 , STRING1 , taggerModel ) ;
+ SINGLE
+ model . loadTagger ( ) ;
}
model . setOptionFlags ( model . defaultCoreNLPFlags ( ) ) ;
return model ; | Preload tagger in LexicalizedParserServer |
<nb> public class BinaryBlockWriter < M > {
private int numRecordsWritten_ = NUMBER0 ;
private List < ByteString > protoBlobs_ ;
- public BinaryBlockWriter ( OutputStream out , Class < M > protoClass , BinaryConverter < M > binaryConverter , int numRecordsPerBlock ) {
+ protected BinaryBlockWriter ( OutputStream out , Class < M > protoClass , BinaryConverter < M > binaryConverter , int numRecordsPerBlock ) {
out_ = out ;
numRecordsPerBlock_ = numRecordsPerBlock ;
innerClass_ = protoClass ; | make constructor protected |
<nb> public class IndicesClusterStateService extends AbstractLifecycleComponent < Indic
SINGLE
continue ;
}
- SINGLE
- SINGLE
- SINGLE
- SINGLE
List < String > typesToRefresh = null ;
String index = indexMetaData . index ( ) ;
IndexService indexService = indicesService . indexServiceSafe ( index ) ; | checking on index metadata does not make sense for mappings |
<nb> public interface ProtectACLCreateModePathAndBytesable < T > extends
ACLPathAndBytesable < T > ,
CreateModable < ACLPathAndBytesable < T > >
{
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public ACLCreateModePathAndBytesable < String > withProtection ( ) ;
} | Added copy of doc |
<nb> public final class ExpressionUtils {
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static < D > Predicate in ( Expression < D > left , SubQueryExpression < ? extends D > right ) {
+ return predicate ( Ops . IN , left , right ) ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class ExpressionUtils {
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static < D > Predicate notIn ( Expression < D > left , SubQueryExpression < ? extends D > right ) {
+ return predicate ( Ops . NOT_IN , left , right ) ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Add in notIn for subqueries |
<nb> public final class Monitor {
COMMENT
COMMENT
public boolean enter ( long time , TimeUnit unit ) {
+ long timeoutNanos = unit . toNanos ( time ) ;
final ReentrantLock lock = this . lock ;
if ( ! fair && lock . tryLock ( ) ) {
return true ;
}
long startNanos = System . nanoTime ( ) ;
- long timeoutNanos = unit . toNanos ( time ) ;
long remainingNanos = timeoutNanos ;
boolean interruptIgnored = false ;
try { | Move timeout start to before tryLock |
<nb> public abstract class DBCollection {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
public void ensureIndex ( DBObject keys , String name , boolean unique )
throws MongoException {
DBObject options = defaultOptions ( keys ) ;
- options . put ( STRING0 , name ) ;
+ if ( name != null && ! name . isEmpty ( ) )
+ options . put ( STRING0 , name ) ;
if ( unique )
options . put ( STRING1 , Boolean . TRUE ) ;
ensureIndex ( keys , options ) ; | improved ensureIndex to use default index name if null is provided instead of getting mongoexception |
<nb> public class MavenJDOMUtil {
return doRead ( CharsetToolkit . bytesToString ( bytes ) , handler ) ;
}
+ SINGLE
@ nullable
private static Element doRead ( String text , final ErrorHandler handler ) {
final LinkedList < Element > stack = new LinkedList < Element > ( ) ; | rewrite it using NanoXML |
<nb> public class SQLFileChange extends AbstractSQLChange {
try {
innputStream = openFromFileSystem ( path ) ;
if ( innputStream == null ) {
- throw new IOException ( STRING0 ) ;
+ return null ;
}
} catch ( IOException e ) {
throw new IOException ( STRING1 + path + STRING2 , e ) ;
<nb> public class SQLFileChangeTest extends StandardChangeTest {
SINGLE
SINGLE
- @ test
- public void generateStatementFileNotFound ( ) throws Exception {
- try {
- change . setPath ( STRING3 ) ;
- change . finishInitialization ( ) ;
- change . generateStatements ( new OracleDatabase ( ) ) ;
-
- fail ( STRING4 ) ;
- } catch ( SetupException fnfe ) {
- SINGLE
- }
- }
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
SINGLE
SINGLE | Fixed failing tests |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class K2JSCompiler extends CLICompiler < K2JSCompilerArguments , K2JSCompile
return ExitCode . INTERNAL_ERROR ;
}
- JetCoreEnvironment environmentForJS = JetCoreEnvironment . createCoreEnvironmentForJS ( rootDisposable ) ;
+ JetCoreEnvironment environmentForJS = JetCoreEnvironment . createCoreEnvironmentForJS ( rootDisposable , new CompilerConfiguration ( ) ) ;
for ( String sourceFile : arguments . sourceFiles ) {
environmentForJS . addSources ( sourceFile ) ;
<nb> public class JetCoreEnvironment extends JavaCoreEnvironment {
private final CoreAnnotationsProvider annotationsProvider ;
@ notnull
- public static JetCoreEnvironment createCoreEnvironmentForJS ( Disposable disposable ) {
- return new JetCoreEnvironment ( disposable , new CompilerConfiguration ( ) ) ;
+ public static JetCoreEnvironment createCoreEnvironmentForJS ( Disposable disposable , @ notnull CompilerConfiguration configuration ) {
+ return new JetCoreEnvironment ( disposable , configuration ) ;
}
@ notnull | Added parameter to JetCoreEnvironment createCoreEnvironmentForJS |
<nb> public class AddColumnGenerator extends AbstractSqlGenerator < AddColumnStatement >
String refTableName = referencesMatcher . group ( NUMBER0 ) ;
if ( refTableName . indexOf ( STRING0 ) > NUMBER1 ) {
refSchemaName = refTableName . split ( STRING1 ) [ NUMBER1 ] ;
- refTableName = refTableName . split ( STRING1 ) [ NUMBER1 ] ;
+ refTableName = refTableName . split ( STRING1 ) [ NUMBER0 ] ;
}
String refColName = referencesMatcher . group ( NUMBER2 ) ; | Fixed bug via patch from Marat Tukhvatullin |
<nb> public class AudioService extends IAudioService . Stub {
if ( UserHandle . getAppId ( pkg . applicationInfo . uid ) < FIRST_APPLICATION_UID ) {
continue ;
}
+ SINGLE
+ if ( pm . checkPermission ( Manifest . permission . INTERACT_ACROSS_USERS , pkg . packageName )
+ == PackageManager . PERMISSION_GRANTED ) {
+ continue ;
+ }
if ( homeActivityName != null
&& pkg . packageName . equals ( homeActivityName . getPackageName ( ) )
&& pkg . applicationInfo . isSystemApp ( ) ) { | Don t kill apps that are multi user aware |
<nb> public class SimpleTcpCluster extends LifecycleMBeanBase
log . warn ( sm . getString ( STRING0 , manager ) ) ;
return ;
}
- ClusterManager cmanager = ( ClusterManager ) manager ;
- cmanager . setDistributable ( true ) ;
+ ClusterManager cmanager = ( ClusterManager ) manager ;
SINGLE
fireLifecycleEvent ( BEFORE_MANAGERREGISTER_EVENT , manager ) ;
String clusterName = getManagerName ( cmanager . getName ( ) , manager ) ; | Remove unnecessary code |
<nb> public class ModelMetrics extends Keyed < ModelMetrics > {
public double _wYY ; SINGLE
public double weightedSigma ( ) {
- return _count <= NUMBER0 ? NUMBER1 : Math . sqrt ( _count / ( _count - NUMBER0 ) * ( _wYY / _wcount - ( _wY * _wY ) / ( _wcount * _wcount ) ) ) ;
+ SINGLE
+ double sampleCorrection = NUMBER0 ; SINGLE
+ return _count <= NUMBER0 ? NUMBER1 : Math . sqrt ( sampleCorrection * ( _wYY / _wcount - ( _wY * _wY ) / ( _wcount * _wcount ) ) ) ;
}
abstract public double [ ] perRow ( double ds [ ] , float yact [ ] , Model m ) ;
public double [ ] perRow ( double ds [ ] , float yact [ ] , double weight , double offset , Model m ) { | Don t use sample weighted variance but full weighted variance |
<nb> public class SplashScreenActivator
if ( bundleName == null )
return ;
+ SINGLE
+ SINGLE
+ SINGLE
+ Object service =
+ bundleContext
+ . getService ( serviceEvent . getServiceReference ( ) ) ;
+ if ( service . getClass ( ) . getSimpleName ( ) . equals ( STRING0 ) )
+ {
+ splash . close ( ) ;
+ stop ( bundleContext ) ;
+ return ;
+ }
+
+ bundleContext . ungetService ( serviceEvent . getServiceReference ( ) ) ;
+
progress ++ ;
int progressWidth = NUMBER0 ; | Hide splash screen when main window is iconified on startup |
<nb> public class Intent implements Parcelable , Cloneable {
= STRING0 ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final String EXTRA_SKIP_UNINSTALL_CONFIRMATION =
+ STRING1 ;
+
+ COMMENT
COMMENT
COMMENT
COMMENT | Added a constant to be used as an Intent extra |
<nb> public class BulkWriteError {
result = NUMBER0 * result + details . hashCode ( ) ;
return result ;
}
+
+ @ override
+ public String toString ( ) {
+ return STRING0
+ + STRING1 + index
+ + STRING2 + code
+ + STRING3 + message + STRING4
+ + STRING5 + details
+ + STRING6 ;
+ }
} | Implemented BulkWriteError toString |
<nb> public final class MongoConfigUtil {
public static void setOutputURI ( final Configuration conf , final String uri ) {
setMongoURIString ( conf , OUTPUT_URI , uri ) ;
}
-
+ COMMENT
+ COMMENT
+ COMMENT
+ @ deprecated
public static void setOutputURI ( final Configuration conf , final MongoURI uri ) {
setMongoURI ( conf , OUTPUT_URI , uri ) ;
} | Deprecate old signature of setOutputURI that takes MongoURI |
<nb> public class LiveUpdatesSettingsDialogFragment extends DialogFragment {
downloadOverWiFiSwitch . setChecked ( downloadViaWiFiPreference . get ( ) ) ;
builder . setView ( view )
- . setPositiveButton ( R . string . shared_string_save , new DialogInterface . OnClickListener ( ) {
+ . setPositiveButton ( R . string . shared_string_ok , new DialogInterface . OnClickListener ( ) {
@ override
public void onClick ( DialogInterface dialog , int which ) {
final int updateFrequencyInt = updateFrequencySpinner . getSelectedItemPosition ( ) ; | Replaced saved button in dialog with ok |
<nb> public class RemoteInputView extends LinearLayout implements View . OnClickListene
}
@ override
- protected void onFocusLost ( ) {
- super . onFocusLost ( ) ;
- defocusIfNeeded ( ) ;
+ protected void onFocusChanged ( boolean focused , int direction , Rect previouslyFocusedRect ) {
+ super . onFocusChanged ( focused , direction , previouslyFocusedRect ) ;
+ if ( ! focused ) {
+ defocusIfNeeded ( ) ;
+ }
}
@ override | Don t close RemoteInputView on window focus loss |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- abstract class DbQueryBase {
+ abstract class DbQueryBase implements AutoCloseable {
private static final Logger log = LoggerFactory . getLogger ( DbQueryBase . class ) ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public class DbSession {
+ public class DbSession implements AutoCloseable {
private static final Logger log = LoggerFactory . getLogger ( DbSession . class ) ;
<nb> public class DbSession {
}
}
+ @ override
+ public void close ( ) throws Exception {
+ closeSession ( ) ;
+ }
+
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public interface ConnectionProvider {
+ public interface ConnectionProvider extends AutoCloseable {
COMMENT
COMMENT | Added few AutoCloseable interfaces |
<nb> public class SelectWordHandler extends EditorActionHandler {
}
while ( element instanceof PsiWhiteSpace ) {
- if ( element . getNextSibling ( ) == null ) {
- element = element . getParent ( ) ;
- continue ;
+ nextParent: while ( element . getNextSibling ( ) == null ) {
+ final PsiElement parent = element . getParent ( ) ;
+ final PsiElement [ ] children = parent . getChildren ( ) ;
+
+ if ( children [ children . length - NUMBER0 ] == element ) {
+ element = parent ;
+ }
+ else {
+ element = parent ;
+ break nextParent ;
+ }
}
element = element . getNextSibling ( ) ; | Improved selection at first column in XML |
<nb> import NAMESPACE ;
COMMENT
COMMENT
public class BlockFromToEvent extends BlockEvent implements Cancellable {
- protected Block from ;
+ protected Block to ;
protected BlockFace face ;
protected boolean cancel ;
public BlockFromToEvent ( final Event . Type type , final Block block , final BlockFace face ) {
super ( type , block ) ;
this . face = face ;
- this . from = block . getRelative ( face . getModX ( ) , face . getModY ( ) , face . getModZ ( ) ) ;
+ this . to = block . getRelative ( face . getModX ( ) , face . getModY ( ) , face . getModZ ( ) ) ;
this . cancel = false ;
}
<nb> public class BlockFromToEvent extends BlockEvent implements Cancellable {
COMMENT
COMMENT
COMMENT
- public Block getFromBlock ( ) {
- return from ;
+ public Block getToBlock ( ) {
+ return to ;
}
public boolean isCancelled ( ) { | Fixed BlockFromToEvent not knowing source block from destination block |
<nb> public abstract class Repository extends RepositoryInfo {
{
SINGLE
for ( int i = NUMBER0 ; i < datePatterns . length ; i ++ ) {
- formatters [ i ] = new SimpleDateFormat ( datePatterns [ i ] , Locale . US ) ;
+ formatters [ i ] = new SimpleDateFormat ( datePatterns [ i ] ) ;
COMMENT
COMMENT
COMMENT | changing the locale from US to default |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ; | Revert files where only import order had changed |
<nb> public class WXSDKEngine {
COMMENT
COMMENT
public static < T extends WXModule > boolean registerModule ( String moduleName , Class < T > moduleClass , boolean global ) throws WXException {
- return registerModule ( moduleName , new TypeModuleFactory ( moduleClass ) , global ) ;
+ return moduleClass != null && registerModule ( moduleName , new TypeModuleFactory < > ( moduleClass ) , global ) ;
}
COMMENT | android stop register when class is null |
<nb> import NAMESPACE ;
COMMENT
COMMENT
public class CoreRegistry {
- private static Map < Class < ? extends Object > , Object > store = Maps . newHashMap ( ) ;
- private static Set < Class < ? extends Object > > permStore = Sets . newHashSet ( ) ;
+ private static Map < Class < ? extends Object > , Object > store = Maps . newConcurrentMap ( ) ;
+ private static Set < Class < ? extends Object > > permStore = Sets . newSetFromMap ( Maps . < Class < ? extends Object > , Boolean > newConcurrentMap ( ) ) ;
COMMENT
COMMENT | Changed core registry to use ConcurrentMaps to be thread safe |
<nb> public class MulticastProcessor extends ServiceSupport implements Processor , Nav
private final CamelContext camelContext ;
private Collection < Processor > processors ;
- private AggregationStrategy aggregationStrategy ;
+ private final AggregationStrategy aggregationStrategy ;
private final boolean parallelProcessing ;
private final boolean streaming ;
private final boolean stopOnException ;
<nb> public class MulticastProcessor extends ServiceSupport implements Processor , Nav
return aggregationStrategy ;
}
- public void setAggregationStrategy ( AggregationStrategy aggregationStrategy ) {
- this . aggregationStrategy = aggregationStrategy ;
- }
-
public boolean isParallelProcessing ( ) {
return parallelProcessing ;
} | Splitter now returns original exchange as outbound by default |
<nb> public class PointNavigationLayer extends OsmandMapLayer implements
float locationY = getPointY ( tb , pointToStart ) ;
canvas . rotate ( - tb . getRotate ( ) , locationX , locationY ) ;
canvas . drawBitmap ( mStartPoint , locationX - marginX , locationY - marginY , mBitmapPaint ) ;
+ canvas . rotate ( tb . getRotate ( ) , locationX , locationY ) ;
}
}
<nb> public class PointNavigationLayer extends OsmandMapLayer implements
float locationY = getPointY ( tb , pointToNavigate ) ;
canvas . rotate ( - tb . getRotate ( ) , locationX , locationY ) ;
canvas . drawBitmap ( mTargetPoint , locationX - marginX , locationY - marginY , mBitmapPaint ) ;
+ canvas . rotate ( tb . getRotate ( ) , locationX , locationY ) ;
}
Iterator < TargetPoint > it = targetPoints . getIntermediatePoints ( ) . iterator ( ) ; | Fix wrong rotation |
<nb> public class CassandraDaemon
{
logger . warn ( STRING0 ) ;
}
- else
+ COMMENT
{
String [ ] java_version = javaVersion . split ( STRING1 ) ;
String java_major = java_version [ NUMBER0 ] ;
<nb> public class CassandraDaemon
logger . info ( STRING2 , Arrays . toString ( java_version ) ) ;
java_minor = NUMBER1 ;
}
- if ( java_major . equals ( STRING3 ) )
- {
- SINGLE
- if ( java_minor < NUMBER2 )
- SINGLE
- logger . error ( STRING4 ) ;
- else if ( java_minor < NUMBER1 )
- SINGLE
- logger . warn ( STRING4 ) ;
- }
}
-
+ COMMENT
logger . info ( STRING5 , Runtime . getRuntime ( ) . totalMemory ( ) , Runtime . getRuntime ( ) . maxMemory ( ) ) ;
logger . info ( STRING6 , System . getProperty ( STRING7 ) ) ;
CLibrary . tryMlockall ( ) ; | Remove jvm revision checks |
<nb> public class FocusWatcher implements ContainerListener , FocusListener {
if ( getFocusedComponent ( ) == component ) {
setFocusedComponentImpl ( null , cause ) ;
}
+ myTopComponent = null ;
}
@ override | reset FocusWatcher myTopComponent to null |
<nb> public final class SugarDataSource < T > {
try {
count = future . get ( ) ;
- if ( null == count || count == NUMBER0 ) {
+ if ( null == count ) {
errorCallback . onError ( new Exception ( STRING0 ) ) ;
} else {
successCallback . onSuccess ( count ) ; | modified count method |
<nb> public class VCard extends IQ {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void setAvatar ( byte [ ] bytes , String mimeType ) {
+ if ( bytes == null ) {
+ SINGLE
+ otherUnescapableFields . remove ( STRING0 ) ;
+ return ;
+ }
+
+ SINGLE
+ String encodedImage = StringUtils . encodeBase64 ( bytes ) ;
+ avatar = encodedImage ;
+
+ setField ( STRING0 , STRING1 + mimeType + STRING2 + encodedImage + STRING3 , true ) ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT | Added ability to set mime type of avatar |
<nb> public class TaskVcsTest extends CodeInsightFixtureTestCase {
myTaskManager = null ;
myVcs = null ;
myChangeListManager = null ;
+
+ super . tearDown ( ) ;
}
- super . tearDown ( ) ;
}
} | invoke super tearDown in finally block |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PeopleListFragment extends Fragment {
mFilteredRecyclerView = ( FilteredRecyclerView ) rootView . findViewById ( R . id . filtered_recycler_view ) ;
mFilteredRecyclerView . addItemDecoration ( new PeopleItemDecoration ( getActivity ( ) , R . drawable . people_list_divider ) ) ;
+ mFilteredRecyclerView . setLogT ( AppLog . T . PEOPLE ) ;
mFilteredRecyclerView . setFilterListener ( new FilteredRecyclerView . FilterListener ( ) {
@ override | Set the logT for people list also fixes the crash on filter change |
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ExecuteSqlCommand extends AbstractCommand {
if ( sqlFile == null ) {
sqlText = sql ;
} else {
- sqlText = FileUtil . getContents ( new File ( sqlFile ) ) ;
+ File file = new File ( sqlFile ) ;
+ if ( ! file . exists ( ) ) {
+ throw new LiquibaseException ( String . format ( STRING0 , file . getCanonicalPath ( ) ) ) ;
+ }
+ sqlText = FileUtil . getContents ( file ) ;
}
String out = STRING1 ; | provide a better error message when a file doesn t exist |
<nb> import NAMESPACE ;
COMMENT
public interface ChangeProvider {
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Clarified javadoc comment |
<nb> public class OpenID4JavaConsumer implements OpenIDConsumer {
SINGLE
public OpenID4JavaConsumer ( ) throws ConsumerException {
- this . consumerManager = new ConsumerManager ( ) ;
- this . attributesToFetchFactory = new NullAxFetchListFactory ( ) ;
+ this ( new ConsumerManager ( ) , new NullAxFetchListFactory ( ) ) ;
}
COMMENT
<nb> public class OpenID4JavaConsumer implements OpenIDConsumer {
}
public OpenID4JavaConsumer ( AxFetchListFactory attributesToFetchFactory ) throws ConsumerException {
- this . consumerManager = new ConsumerManager ( ) ;
+ this ( new ConsumerManager ( ) , attributesToFetchFactory ) ;
+ }
+
+ public OpenID4JavaConsumer ( ConsumerManager consumerManager , AxFetchListFactory attributesToFetchFactory )
+ throws ConsumerException {
+ this . consumerManager = consumerManager ;
this . attributesToFetchFactory = attributesToFetchFactory ;
} | Added extra constructor to OpenID4JavaConsumer which takes a ConsumerManager to allow a version compatible with GAE to be injected |
<nb> public class FileConsumer extends ScheduledPollConsumer {
return false ;
} else if ( endpoint . isIdempotent ( ) && endpoint . getIdempotentRepository ( ) . contains ( file . getPath ( ) ) ) {
SINGLE
- LOG . warn ( STRING0 + file ) ;
+ if ( LOG . isTraceEnabled ( ) ) {
+ LOG . trace ( STRING0 + file ) ;
+ }
return false ;
} | Make the file consumer a bit quieter |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class LocalWorld {
COMMENT
COMMENT
public boolean isValidBlockType ( int type ) {
- return type >= NUMBER0 && type < NUMBER1 ;
+ return BlockType . fromID ( type ) != null ;
}
COMMENT
<nb> public class BukkitWorld extends LocalWorld {
COMMENT
@ override
public boolean isValidBlockType ( int type ) {
- return type <= NUMBER2 && ( Material . getMaterial ( type ) != null || BlockType . fromID ( type ) != null ) ; SINGLE
+ return type <= NUMBER2 && Material . getMaterial ( type ) != null ;
}
@ override | Reverted block id checking in BukkitWorld to prevent false positives and made LoclWorld use the internal list for easier updates |
<nb> public class PluginManager
. add ( STRING0 )
. add ( STRING1 )
. add ( STRING2 )
+ . add ( STRING3 )
. build ( ) ;
private static final Logger log = Logger . get ( PluginManager . class ) ; | Add JOL to list of allowed SPI classes |
<nb> public class OptionParser {
if ( fuzziness == null ) {
return null ;
}
- return Fuzziness . build ( fuzziness ) ;
+ return Fuzziness . build ( BytesRefs . toString ( fuzziness ) ) ;
}
private static MatchQuery . ZeroTermsQuery zeroTermsQuery ( @ nullable Object zeroTermsQuery ) {
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TransportSQLActionTest extends SQLTransportIntegrationTest {
assertThat ( TestingHelpers . printedTable ( response . rows ( ) ) ,
is ( STRING0 ) ) ;
+ execute ( STRING1 +
+ STRING2 ) ;
+ assertThat ( TestingHelpers . printedTable ( response . rows ( ) ) ,
+ is ( STRING0 ) ) ;
+
execute ( STRING3 +
STRING4 ) ;
assertThat ( TestingHelpers . printedTable ( response . rows ( ) ) , | convert bytesrefs to string when creating the fuzziness conversion |
<nb> public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
}
@ override
+ public void onBackPressed ( ) {
+ if ( mReactInstanceManager != null ) {
+ mReactInstanceManager . onBackPressed ( ) ;
+ } else {
+ super . onBackPressed ( ) ;
+ }
+ }
+
+ @ override
public void invokeDefaultOnBackPressed ( ) {
super . onBackPressed ( ) ;
} | handle back button press in JS |
<nb> public class AndroidHarness extends Activity implements TouchListener , DialogInt
public void initialize ( ) {
app . initialize ( ) ;
if ( handleExitHook ) {
+ SINGLE
+ SINGLE
+ SINGLE
+ if ( app . getInputManager ( ) . hasMapping ( SimpleApplication . INPUT_MAPPING_EXIT ) ) {
+ app . getInputManager ( ) . deleteMapping ( SimpleApplication . INPUT_MAPPING_EXIT ) ;
+ }
+
app . getInputManager ( ) . addMapping ( ESCAPE_EVENT , new TouchTrigger ( TouchInput . KEYCODE_BACK ) ) ;
app . getInputManager ( ) . addListener ( this , new String [ ] { ESCAPE_EVENT } ) ;
} | Remove Escape key mapping from InputManager defined in SimpleApplication when using Android platforms |
<nb> public class RVRendererAdapter < T > extends RecyclerView . Adapter < RendererViewHolde
COMMENT
@ override public void onBindViewHolder ( RendererViewHolder viewHolder , int position ) {
T content = getItem ( position ) ;
- rendererBuilder . withContent ( content ) ;
Renderer < T > renderer = viewHolder . getRenderer ( ) ;
if ( renderer == null ) {
throw new NullRendererBuiltException ( STRING0 ) ;
<nb> public abstract class RendererBuilder < T > {
protected RendererViewHolder buildRendererViewHolder ( ) {
validateAttributesToCreateANewRendererViewHolder ( ) ;
- Renderer renderer = getPrototypeByIndex ( viewType ) ;
+ Renderer renderer = getPrototypeByIndex ( viewType ) . copy ( ) ;
renderer . onCreate ( null , layoutInflater , parent ) ;
return new RendererViewHolder ( renderer ) ;
}
<nb> class RendererViewHolder extends RecyclerView . ViewHolder {
}
Renderer getRenderer ( ) {
- return renderer . copy ( ) ;
+ return renderer ;
}
} | Fix bug related to render prototype cloned and the video click listener |
<nb> abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
if ( onlyWithCache && packageManager . cacheIsNotNull ( ) || ! onlyWithCache ) {
final PyPackage pip = packageManager . findPackage ( STRING0 ) ;
myInstallFramework = pip != null ;
- setWarningText ( STRING1 ) ;
+ setWarningText ( frameworkName + STRING2 ) ;
}
}
catch ( PyExternalProcessException ignored ) { | fixed framework name in warning |
<nb> public class TabHost extends FrameLayout implements ViewTreeObserver . OnTouchMode
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
< pre > mTabHost = ( TabHost ) findViewById ( R . id . tabhost ) ;
mTabHost . setup ( ) ;
<nb> mTabHost . addTab ( TAB_TAG_1 , STRING0 , STRING1 ) ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
View createTabContent ( String tag ) ;
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> mTabHost . addTab ( TAB_TAG_1 , STRING0 , STRING1 ) ;
}
mLaunchedView = wd ;
- SINGLE
+ SINGLE
SINGLE
SINGLE
SINGLE | Fix javadoc typos |
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
public class Facebook { | Added note to Facebook java discouraging its use |
<nb> public class TestNGReferenceContributor extends PsiReferenceContributor {
if ( cls != null ) {
PsiMethod [ ] methods = cls . findMethodsByName ( methodName , true ) ;
for ( PsiMethod method : methods ) {
- if ( TestNGUtil . hasTest ( method ) || TestNGUtil . hasConfig ( method ) ) {
+ if ( TestNGUtil . hasTest ( method , false ) || TestNGUtil . hasConfig ( method ) ) {
return method ;
}
} | enable navigation on disabled methods |
<nb> public final class SourceMapDecoder {
if ( reader . hasNext ( ) ) {
names = new ArrayList < String > ( ) ;
do {
- names . add ( reader . nextString ( true ) ) ;
+ if ( reader . peek ( ) == JsonToken . BEGIN_OBJECT ) {
+ SINGLE
+ reader . skipValue ( ) ;
+ names . add ( STRING0 ) ;
+ }
+ else {
+ names . add ( reader . nextString ( true ) ) ;
+ }
}
while ( reader . hasNext ( ) ) ;
} | cannot debug imported script |
<nb> public class DAOTestRule extends ExternalResource {
throw e ;
}
}
+
+ public void transaction ( Runnable action ) {
+ transaction ( ( ) - > {
+ action . run ( ) ;
+ return true ;
+ } ) ;
+ }
}
<nb> public class DAOTestRuleTest {
public void rollsBackTransaction ( ) {
SINGLE
final TestEntity testEntity = new TestEntity ( STRING0 ) ;
- daoTestRule . transaction ( ( ) - > {
- persist ( testEntity ) ;
- return true ;
- } ) ;
+ daoTestRule . transaction ( ( ) - > persist ( testEntity ) ) ;
SINGLE
testEntity . setDescription ( STRING1 ) ;
<nb> public class DAOTestRuleTest {
daoTestRule . transaction ( ( ) - > {
persist ( testEntity ) ;
persist ( new TestEntity ( null ) ) ;
- return true ;
} ) ;
fail ( STRING2 ) ;
} catch ( ConstraintViolationException ignoredException ) { | Provide a way to execute an action in transaction |
<nb> class PFontTexture implements PConstants {
h = PApplet . min ( NUMBER0 * textures [ currentTex ] . glHeight , maxTexHeight ) ;
resize = true ;
} else {
- h = PApplet . min ( PGraphicsOpenGL . maxTextureSize , maxTexHeight / NUMBER1 ) ;
+ h = PApplet . min ( PGraphicsOpenGL . maxTextureSize , PGL . MAX_FONT_TEX_SIZE / NUMBER0 , maxTexHeight / NUMBER1 ) ;
resize = false ;
}
<nb> class PFontTexture implements PConstants {
h = PApplet . min ( NUMBER0 * textures [ currentTex ] . glHeight , maxTexHeight ) ;
resize = true ;
} else {
- h = PApplet . min ( PGraphicsOpenGL . maxTextureSize , maxTexHeight / NUMBER1 ) ;
+ h = PApplet . min ( PGraphicsOpenGL . maxTextureSize , PGL . MAX_FONT_TEX_SIZE / NUMBER0 , maxTexHeight / NUMBER1 ) ;
resize = false ;
} | adjusted size initialization in font textures |
<nb> public class JetColorSettingsPage implements ColorSettingsPage {
STRING0 +
STRING1 +
STRING2 +
- STRING3 +
+ STRING4 +
+ STRING5 +
STRING6 +
STRING7 +
STRING8 + | Fix text on color configuration page |
<nb> public class CordovaWebViewClient extends WebViewClient {
COMMENT
@ override
public WebResourceResponse shouldInterceptRequest ( WebView view , String url ) {
- SINGLE
- if ( ! Config . isUrlWhiteListed ( url ) )
+ SINGLE
+ if ( ! Config . isUrlWhiteListed ( url ) && url . startsWith ( STRING0 ) || url . startsWith ( STRING1 ) )
{
return getWhitelistResponse ( ) ;
} | Making framework only apply for http resources for now so we don t break non http handling |
<nb> public class ZRTPTransformEngine
long endTime = System . currentTimeMillis ( ) + nextDelay ;
long currentTime = System . currentTimeMillis ( ) ;
synchronized ( sync ) {
- while ( ( currentTime <= endTime ) && newTask && ! stop )
+ while ( ( currentTime < endTime ) && newTask && ! stop )
{
try
{
<nb> public class ZRTPTransformEngine
e . printStackTrace ( ) ;
return false ;
}
-
return true ;
} | Fix a small but important bug in the TimeoutProvider run method |
<nb> public class DataStructures {
System . out . println ( STRING0 + next ) ;
minHeap . remove ( next ) ;
System . out . println ( minHeap . toString ( ) ) ;
+ System . out . println ( ) ;
}
{ | Fixed formatting of data structure test code |
<nb> public class Digester extends DefaultHandler2 {
SINGLE
bodyText = bodyTexts . pop ( ) ;
- if ( debug ) {
- log . debug ( STRING0 + bodyText . toString ( ) + STRING1 ) ;
- }
SINGLE
if ( rules != null ) {
<nb> public class Digester extends DefaultHandler2 {
SINGLE
bodyTexts . push ( bodyText ) ;
- if ( debug ) {
- log . debug ( STRING2 + bodyText . toString ( ) + STRING1 ) ;
- }
bodyText = new StringBuilder ( ) ;
SINGLE | Removed debug messages as they do not give any valuable information and floods the log files with empty rows |
<nb> public class PublishSubscribeTest extends CamelTestSupport {
@ test
public void testPresenceAgentBasedPubSub ( ) throws Exception {
- if ( LOG . isDebugEnabled ( ) ) {
- LOG . debug ( STRING0 ) ;
- }
-
unreachableEndpoint . expectedMessageCount ( NUMBER0 ) ;
resultEndpoint . expectedMinimumMessageCount ( NUMBER1 ) ;
producerTemplate . sendBodyAndHeader (
- STRING1 ,
+ STRING2 ,
STRING3 ,
STRING4 , Request . PUBLISH ) ;
assertMockEndpointsSatisfied ( ) ;
-
- if ( LOG . isDebugEnabled ( ) ) {
- LOG . debug ( STRING5 ) ;
- }
}
@ override
<nb> public class PublishSubscribeTest extends CamelTestSupport {
@ override
public void configure ( ) throws Exception {
SINGLE
- from ( STRING6 )
+ from ( STRING7 )
. to ( STRING8 ) ;
- from ( STRING9 )
+ from ( STRING10 )
. to ( STRING11 )
. to ( STRING12 ) ;
} | Fixed test on windows having port already in use |
<nb> import NAMESPACE ;
COMMENT
COMMENT
- COMMENT
- COMMENT
COMMENT
public class SubtractTransform extends Transform {
private String fieldName1 ;
<nb> public class SubtractTransform extends Transform {
}
Map < String , Double > output = Util . getOrCreateFloatFeature ( outputName , floatFeatures ) ;
- Set < String > allKeys = feature1 . keySet ( ) ;
for ( String key : keys ) {
if ( feature1 . containsKey ( key ) ) { | remove unused comment |
<nb> import static NAMESPACE ;
COMMENT
public class MockitoJUnitRule implements TestRule {
- private JUnitRule jUnitRule ;
+ private final JUnitRule jUnitRule ;
- public MockitoJUnitRule ( Object object ) {
- checkNotNull ( object , STRING0 ) ;
- this . jUnitRule = new JUnitRule ( object ) ;
+ COMMENT
+ COMMENT
+ COMMENT
+ public MockitoJUnitRule ( Object testInstance ) {
+ checkNotNull ( testInstance , STRING1 ) ;
+ this . jUnitRule = new JUnitRule ( testInstance ) ;
}
public Statement apply ( final Statement base , Description description ) { | Improved the javadoc small refactoring |
<nb> public class BeanELResolver extends ELResolver {
}
return property ;
}
+
+ public Class < ? > getType ( ) {
+ return type ;
+ }
}
private final static class BeanProperty {
<nb> public class BeanELResolver extends ELResolver {
String prop = property . toString ( ) ;
BeanProperties props = this . cache . get ( type . getName ( ) ) ;
- if ( props == null ) {
+ if ( props == null || type != props . getType ( ) ) {
props = new BeanProperties ( type ) ;
this . cache . put ( type . getName ( ) , props ) ;
} | Fix improper caching by checking the class definition |
<nb> import NAMESPACE ;
COMMENT
COMMENT
public class Video implements PConstants {
- protected static String VERSION_STRING = STRING0 ;
+ protected static String VERSION_STRING = STRING1 ;
protected static long INSTANCES_COUNT = NUMBER0 ;
protected static String gstreamerBinPath = STRING2 ; | Updated version string |
<nb> class LanguageToolHttpHandler implements HttpHandler {
if ( motherTongue != null ) {
languageMessage += STRING0 + motherTongue . getShortNameWithCountryAndVariant ( ) + STRING1 ;
}
+ if ( autoDetectLanguage ) {
+ languageMessage += STRING2 ;
+ }
} catch ( IOException exception ) {
SINGLE
messageSent = STRING3 + exception . getMessage ( ) ;
<nb> class LanguageToolHttpHandler implements HttpHandler {
Language lang ;
if ( autoDetect ) {
lang = detectLanguageOfString ( text , langParam ) ;
- print ( STRING4 + lang . getShortNameWithCountryAndVariant ( ) ) ;
} else {
if ( afterTheDeadlineMode ) {
lang = afterTheDeadlineLanguage ; | put it in the same line as the rest of the output |
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 22