diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class MetricsServlet extends HttpServlet {
private void handleMetrics ( String classPrefix , boolean showFullSamples , HttpServletResponse resp ) throws IOException {
resp . setStatus ( HttpServletResponse . SC_OK ) ;
- resp . setContentType ( STRING0 ) ;
+ resp . setContentType ( STRING1 ) ;
final OutputStream output = resp . getOutputStream ( ) ;
final JsonGenerator json = factory . createJsonGenerator ( output , JsonEncoding . UTF8 ) ;
json . writeStartObject ( ) ;
|
Serve JSON as application json
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- public class ModulePathMacroManager extends BasePathMacroManager {
+ public class ModulePathMacroManager extends ProjectPathMacroManager {
private static final Logger LOG = Logger . getInstance ( STRING0 ) ;
private Module myModule ;
public ModulePathMacroManager ( final Module module ) {
+ super ( ( ProjectEx ) module . getProject ( ) ) ;
+ myModule = module ;
+ }
+
+ public ModulePathMacroManager ( final Module module , final Project project ) {
+ super ( ( ProjectEx ) project ) ;
myModule = module ;
}
<nb> import NAMESPACE ;
import NAMESPACE ;
- public class ProjectPathMacroManager extends BasePathMacroManager {
+ public class ProjectPathMacroManager extends ApplicationPathMacroManager {
private ProjectEx myProject ;
|
inherit macros application project module
|
<nb> class KeyManager {
if ( key != ROOT_KEY && node . uses == NUMBER0 ) {
int count = servicesFactories . size ( ) ;
for ( int i = count - NUMBER1 ; i >= NUMBER0 ; i -- ) {
- servicesFactories . get ( i ) . tearDown ( node . services ) ;
+ servicesFactories . get ( i ) . tearDownServices ( node . services ) ;
}
nodes . remove ( key ) ;
return true ;
<nb> public abstract class ServicesFactory {
COMMENT
COMMENT
COMMENT
- public void tearDown ( Services services ) {
+ public void tearDownServices ( Services services ) {
}
}
|
rename tearDown tearDownServices
|
<nb> public class RecoveryAction extends AbstractIndexShardComponent implements Close
}
} else if ( cause instanceof IgnoreRecoveryException ) {
throw ( IgnoreRecoveryException ) cause ;
+ } else if ( cause instanceof NodeNotConnectedException ) {
+ throw new IgnoreRecoveryException ( STRING0 , e ) ;
}
throw new RecoveryFailedException ( shardId , node , targetNode , e ) ;
} catch ( Exception e ) {
|
ignore recovery when no node to recover from it has disconnected for example
|
<nb> public class SerializationFactory {
try {
Class serializerClass = Class . forName ( payloadSerializerName ) ;
Serializer serializer = resolveSerializerInstance ( k , ListDelegate . class , serializerClass , conf ) ;
- if ( serializer == null )
- k . register ( ListDelegate . class , new ListDelegateSerializer ( ) ) ;
- else
- k . register ( ListDelegate . class , serializer ) ;
+ k . register ( ListDelegate . class , serializer ) ;
} catch ( ClassNotFoundException ex ) {
LOG . error ( STRING0 + payloadSerializerName . length ( ) , ex ) ;
throw new RuntimeException ( ex ) ;
|
Register our default serializer via defaults xml and throw exception if bad serializer is configured
|
<nb> public class StoreWAL extends StoreDirect {
protected void checkLogRounding ( ) {
if ( logSize % Volume . BUF_SIZE + MAX_REC_SIZE * NUMBER0 > Volume . BUF_SIZE ) {
+ log . ensureAvailable ( logSize + NUMBER1 ) ;
log . putByte ( logSize , WAL_SKIP_REST_OF_BLOCK ) ;
logSize += Volume . BUF_SIZE - logSize % Volume . BUF_SIZE ;
}
<nb> public abstract class Volume {
SINGLE
- ByteBuffer oldBuffer = buffers2 [ buffersPos ] ;
- SINGLE
+ if ( buffers2 [ buffersPos ] == null ) {
+ SINGLE
+ if ( buffersPos > NUMBER2 ) {
+ ByteBuffer oldPrev = buffers2 [ buffersPos - NUMBER1 ] ;
+ if ( oldPrev . capacity ( ) != BUF_SIZE ) {
+ buffers2 [ buffersPos - NUMBER1 ] = makeNewBuffer ( NUMBER3 * buffersPos * BUF_SIZE - NUMBER1 , buffers2 ) ;
+ }
+ }
+ }
ByteBuffer newBuf = makeNewBuffer ( offset , buffers2 ) ;
|
Fix BB overflow in WAL store
|
<nb> public final class InOutSelector implements Runnable {
public InOutSelector ( ConnectionManager connectionManager ) {
this . connectionManager = connectionManager ;
logger = connectionManager . ioService . getLogger ( this . getClass ( ) . getName ( ) ) ;
- this . waitTime = NUMBER0 ;
+ this . waitTime = NUMBER1 ; SINGLE
Selector selectorTemp = null ;
try {
selectorTemp = Selector . open ( ) ;
|
Increase IO selector wait time reduces idle cpu usage significantly
|
<nb> public class ArgumentsConverter {
return Long . valueOf ( ( String ) arg ) ;
} else if ( type . equals ( Double . TYPE ) ) {
return Double . valueOf ( ( String ) arg ) ;
+ } else if ( type . equals ( String . class ) ) {
+ return String . valueOf ( arg ) ;
} else {
- return arg ;
+ return type . cast ( arg ) ;
}
} catch ( Exception e ) {
throw new IllegalArgumentException ( STRING0 + arg + STRING1 + arg . getClass ( ) + STRING2 + type , e ) ;
|
Forgot too convert strings
|
<nb> public class AnnotationMetadataTests extends TestCase {
assertEquals ( STRING0 , scopeAttrs . get ( STRING1 ) ) ;
Map < String , Object > specialAttrs = metadata . getAnnotationAttributes ( SpecialAttr . class . getName ( ) ) ;
assertEquals ( NUMBER0 , specialAttrs . size ( ) ) ;
- assertEquals ( String . class , specialAttrs . get ( STRING2 ) ) ;
+ assertEquals ( String . class . getName ( ) , specialAttrs . get ( STRING2 ) ) ;
assertEquals ( Thread . State . NEW , specialAttrs . get ( STRING3 ) ) ;
}
|
updated AnnotationMetadata tests for change in Class exposure
|
<nb> public class Compile extends ConventionTask {
protected AntJavac antCompile = new AntJavac ( ) ;
-
-
protected ClasspathConverter classpathConverter = new ClasspathConverter ( ) ;
public Compile ( Project project , String name ) {
|
Removed new lines
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
public class CompareGradleBuilds extends DefaultTask {
private String sourceVersion = GradleVersion . current ( ) . getVersion ( ) ;
|
Fix checkstyle error
|
<nb> public class CompletionPosition
return scope_ ;
}
- public final int compareTo ( CompletionPosition other )
+ public final boolean isSupersetOf ( CompletionPosition other )
{
- return getPosition ( ) . compareTo ( other . getPosition ( ) ) ;
+ return getPosition ( ) . compareTo ( other . getPosition ( ) ) == NUMBER0 ;
}
private final Position position_ ;
<nb> public class CppCompletionManager implements CompletionManager
if ( ( request_ != null ) &&
! request_ . isTerminated ( ) &&
- ( request_ . getCompletionPosition ( ) . compareTo ( completionPosition ) == NUMBER0 ) )
+ request_ . getCompletionPosition ( ) . isSupersetOf ( completionPosition ) )
{
request_ . updateUI ( false ) ;
}
|
rename comparison method to superset
|
<nb> public class Xml {
Array < Element > children = new Array < Element > ( ) ;
if ( this . children == null ) return children ;
for ( int i = NUMBER0 ; i < this . children . size ; i ++ ) {
- Element child = children . get ( i ) ;
+ Element child = this . children . get ( i ) ;
if ( child . name . equals ( name ) ) children . add ( child ) ;
}
return children ;
|
fixed bozo in Xml Element getChildrenByName
|
<nb> public class NotificationPanelView extends PanelView implements
@ override
public void flingTopOverscroll ( float velocity , boolean open ) {
mLastOverscroll = FLOAT0 ;
+ mQsExpansionFromOverscroll = false ;
setQsExpansion ( mQsExpansionHeight ) ;
flingSettings ( ! mQsExpansionEnabled && open ? FLOAT0 : velocity , open && mQsExpansionEnabled ,
new Runnable ( ) {
|
Fixed a bug where the QS was animating wrong when closing
|
<nb> public class WindowManagerService extends IWindowManager . Stub
}
if ( ws . mAppToken != null && ws . mAppToken . token == appToken &&
- ws . isDisplayedLw ( ) ) {
+ ws . isDisplayedLw ( ) && winAnim . mSurfaceShown ) {
screenshotReady = true ;
}
|
Avoid capture all black screenshot bitmap
|
<nb> import NAMESPACE ;
SINGLE
ParseHttpBody parseBody = parseRequest . getBody ( ) ;
ParseOkHttpRequestBody okHttpRequestBody = null ;
- if ( parseBody instanceof ParseByteArrayHttpBody ) {
+ if ( parseBody != null ) {
okHttpRequestBody = new ParseOkHttpRequestBody ( parseBody ) ;
}
switch ( method ) {
|
fix bug in ParseOkHttpClient that can cause errors when saving ParseFile
|
<nb> public class HttpSnoopServerPipelineFactory implements ChannelPipelineFactory {
public ChannelPipeline getPipeline ( ) throws Exception {
SINGLE
ChannelPipeline pipeline = pipeline ( ) ;
- pipeline . addLast ( STRING0 , new LoggingHandler ( InternalLogLevel . INFO ) ) ;
SINGLE
SINGLE
|
Remove logging which was added accidently
|
<nb> public class LockdownVpnTracker {
throw new RuntimeException ( STRING0 , e ) ;
}
- synchronized ( mStateLock ) {
- handleStateChangedLocked ( ) ;
- }
+ handleStateChangedLocked ( ) ;
}
public void shutdown ( ) {
|
Take out nested synchronisation from LockdownVpn
|
<nb> public class UserCommandManager
SINGLE
private EventBus events_ ;
+
+ @ suppresswarnings ( STRING0 )
private FilesServerOperations files_ ;
}
<nb> public class AceEditor implements DocDisplay ,
private boolean popupVisible_ ;
- @ suppresswarnings ( STRING0 )
private final DiagnosticsBackgroundPopup diagnosticsBgPopup_ ;
private long lastCursorChangedTime_ ;
|
fix some eclipse warnings
|
<nb> public class GrailsPrintWriter extends Writer implements GrailsWrappedWriter , En
public void setOut ( Writer newOut ) {
this . out = unwrapWriter ( newOut ) ;
+ this . lock = this . out != null ? this . out : this ;
this . streamCharBufferTarget = null ;
this . previousOut = null ;
}
<nb> public class GrailsPrintWriterAdapter extends PrintWriter implements GrailsWrapp
else {
this . target = new GrailsPrintWriter ( wrapped ) ;
}
- super . out = this . target ;
+ this . out = this . target ;
+ this . lock = this . out != null ? this . out : this ;
}
public boolean isAllowUnwrappingOut ( ) {
|
also change Writer lock reference
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
public class KafkaJournalConfiguration {
public KafkaJournalConfiguration ( ) { }
@ jsoncreator
- public KafkaJournalConfiguration ( @ jsonproperty ( STRING0 ) File messageJournalDir ,
+ public KafkaJournalConfiguration ( @ notnull @ jsonproperty ( STRING0 ) File messageJournalDir ,
@ jsonproperty ( STRING1 ) long messageJournalSegmentSize ,
@ jsonproperty ( STRING2 ) Duration messageJournalSegmentAge ,
@ jsonproperty ( STRING3 ) long messageJournalMaxSize ,
@ jsonproperty ( STRING4 ) Duration messageJournalMaxAge ,
@ jsonproperty ( STRING5 ) long messageJournalFlushInterval ,
@ jsonproperty ( STRING6 ) Duration messageJournalFlushAge ) {
- this . messageJournalDir = messageJournalDir ;
+ this . messageJournalDir = Objects . requireNonNull ( messageJournalDir ) ;
this . messageJournalSegmentSize = Size . bytes ( messageJournalSegmentSize ) ;
this . messageJournalSegmentAge = messageJournalSegmentAge ;
this . messageJournalMaxSize = Size . bytes ( messageJournalMaxSize ) ;
|
Validate required messageJournalDir param
|
<nb> import static NAMESPACE ;
public class ImapConnectionTest extends TestCase {
private static final String [ ] CAPABILITIES = new String [ ] { STRING0 , STRING1 , STRING2 } ;
-
+
private StubMailServer stubMailServer ;
private ImapConnection connection ;
- private TestImapSettings settings = new TestImapSettings ( UserForImap . TEST_USER ) ;
+ private TestImapSettings settings ;
@ override
public void setUp ( ) throws Exception {
super . setUp ( ) ;
stubMailServer = new StubMailServer ( ) ;
+ settings = new TestImapSettings ( UserForImap . TEST_USER ) ;
connection = new ImapConnection ( settings , null , null ) ;
}
<nb> public class ImapConnectionTest extends TestCase {
}
}
+ public void testConnectionIsInitiallyClosed ( ) throws Exception {
+ assertFalse ( connection . isOpen ( ) ) ;
+ }
+
public void testSuccessfulOpenConnectionTogglesOpenState ( ) throws Exception {
connection . open ( ) ;
assertTrue ( connection . isOpen ( ) ) ;
|
Initialize settings in setUp
|
<nb> public interface DelegateTask extends VariableScope {
COMMENT
String getAssignee ( ) ;
+ COMMENT
+ String getEventName ( ) ;
+
COMMENT
void addCandidateUser ( String userId ) ;
|
Exposed eventName on delegateTask thanks Tijs
|
<nb> public class CuratorZKClientBridge implements IZkConnection
watcher . process ( fakeEvent ) ;
}
} ;
- curator . checkExists ( ) . inBackground ( callback ) . forPath ( STRING0 ) ;
+ curator . checkExists ( ) . inBackground ( callback ) . forPath ( STRING1 ) ;
}
catch ( Exception e )
{
|
Use a legal path
|
<nb> public final class GenerateServiceTicketActionTests extends AbstractCentralAuthe
@ test
public void testTicketGrantingTicketExpiredTgt ( ) throws Exception {
- MockRequestContext context = new MockRequestContext ( ) ;
+ final MockRequestContext context = new MockRequestContext ( ) ;
context . getFlowScope ( ) . put ( STRING0 , TestUtils . getService ( ) ) ;
- MockHttpServletRequest request = new MockHttpServletRequest ( ) ;
+ final MockHttpServletRequest request = new MockHttpServletRequest ( ) ;
context . setExternalContext ( new ServletExternalContext (
new MockServletContext ( ) , request , new MockHttpServletResponse ( ) ) ) ;
request . addParameter ( STRING0 , STRING0 ) ;
|
added missing final keywords
|
<nb> public class JEditTextArea extends JComponent
COMMENT
public static final int leftHandGutter = NUMBER0 ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- public JEditTextArea ( )
- {
- this ( TextAreaDefaults . getDefaults ( ) ) ;
- }
- COMMENT
+ private InputMethodSupport inputMethodSupport = null ;
COMMENT
COMMENT
<nb> public class JEditTextArea extends JComponent
COMMENT
COMMENT
COMMENT
- private InputMethodSupport inputMethodSupport = null ;
public InputMethodRequests getInputMethodRequests ( ) {
- if ( inputMethodSupport == null ) {
- inputMethodSupport = new InputMethodSupport ( this ) ;
+ SINGLE
+ SINGLE
+ if ( false ) {
+ if ( inputMethodSupport == null ) {
+ inputMethodSupport = new InputMethodSupport ( this ) ;
+ }
+ return inputMethodSupport ;
}
- return inputMethodSupport ;
+ return null ;
}
COMMENT
|
disabling input method support that s breaking the accents etc
|
<nb> public final class ActivityManagerService extends ActivityManagerNative
throw new IllegalArgumentException ( STRING0 ) ;
}
synchronized ( this ) {
+ long origId = Binder . clearCallingIdentity ( ) ;
ActivityStack stack = mStackSupervisor . getStack ( stackId ) ;
if ( stack != null ) {
ArrayList < TaskRecord > tasks = stack . getAllTasks ( ) ;
for ( int i = tasks . size ( ) - NUMBER0 ; i >= NUMBER1 ; i -- ) {
- removeTaskByIdLocked ( tasks . get ( i ) . taskId , true COMMENT ,
+ removeTaskByIdLocked ( tasks . get ( i ) . taskId , false COMMENT ,
! REMOVE_FROM_RECENTS ) ;
}
}
+ Binder . restoreCallingIdentity ( origId ) ;
}
}
|
Don t kill process when dismissing stack
|
<nb> import NAMESPACE ;
COMMENT
public class LocalNotification extends CordovaPlugin {
- public final static String PLUGIN_NAME = STRING0 ;
+ protected final static String PLUGIN_NAME = STRING0 ;
- public static CordovaWebView webView = null ;
- public static Context context = null ;
+ protected static CordovaWebView webView = null ;
+ protected static Context context = null ;
@ override
public void initialize ( CordovaInterface cordova , CordovaWebView webView ) {
|
Declare static fields as protected instead of public
|
<nb> public class ListPopupWindow {
private class ResizePopupRunnable implements Runnable {
public void run ( ) {
- if ( mDropDownList != null && mDropDownList . getCount ( ) > mDropDownList . getChildCount ( ) &&
- mDropDownList . getChildCount ( ) <= mListItemExpandMaximum ) {
+ if ( mDropDownList != null && mDropDownList . isAttachedToWindow ( )
+ && mDropDownList . getCount ( ) > mDropDownList . getChildCount ( )
+ && mDropDownList . getChildCount ( ) <= mListItemExpandMaximum ) {
mPopup . setInputMethodMode ( PopupWindow . INPUT_METHOD_NOT_NEEDED ) ;
show ( ) ;
}
|
Only resize list popup if it s still attached to a window
|
<nb> public class JBTable extends JTable implements ComponentWithEmptyText , Component
public Component prepareRenderer ( TableCellRenderer renderer , int row , int column ) {
final Component result = super . prepareRenderer ( renderer , row , column ) ;
final boolean selected = myExpandableItemsHandler . getExpandedItems ( ) . contains ( new TableCell ( row , column ) ) ;
+
SINGLE
if ( UIUtil . isUnderGTKLookAndFeel ( ) ) {
- final Color background = selected ? UIUtil . getTreeSelectionBackground ( ) : UIUtil . getTreeTextBackground ( ) ;
- UIUtil . changeBackGround ( this , background ) ;
+ UIUtil . changeBackGround ( this , UIUtil . getTreeTextBackground ( ) ) ;
}
if ( ! selected ) return result ;
|
weird rendering artifacts in tables when hovering mouse over the cell with an expandable item r den
|
<nb> public class GroovycTask
}
if ( count > NUMBER0 ) {
- log . info ( STRING0 + count + STRING1 + ( count > NUMBER1 ? STRING2 : STRING3 ) + STRING4 + destdir ) ;
+ log . info ( STRING0 + count + STRING5 + ( count > NUMBER1 ? STRING2 : STRING3 ) + STRING4 + destdir ) ;
compilation . compile ( ) ;
}
|
Fixed log output
|
<nb> public abstract class AbstractJetParsingTest extends ParsingTestCase {
if ( ! methodName . startsWith ( STRING0 ) && ! methodName . startsWith ( STRING1 ) ||
methodName . equals ( STRING2 ) ||
methodName . equals ( STRING3 ) ||
- methodName . equals ( STRING4 ) ||
+ methodName . startsWith ( STRING4 ) ||
methodName . equals ( STRING5 ) ) {
continue ;
}
|
Fixed parsing tests
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ConsolePane extends WorkbenchPane
{
profilerMode_ = profilerMode ;
loadDebugToolsIntoSecondaryToolbar ( ) ;
+
+ Scheduler . get ( ) . scheduleFinally ( new ScheduledCommand ( )
+ {
+ public void execute ( )
+ {
+ ensureCursorVisible ( ) ;
+ }
+ } ) ;
}
private void loadDebugToolsIntoSecondaryToolbar ( )
|
prevent profiler from pushing console down one line
|
<nb> public class CookieBasedSessionManagementMethodType extends SessionManagementMet
while ( it . hasNext ( ) ) {
HttpCookie c = it . next ( ) ;
for ( Cookie sc : session . getHttpState ( ) . getCookies ( ) )
- if ( sc . getName ( ) . equals ( c ) ) {
+ if ( sc . getName ( ) . equals ( c . getName ( ) ) ) {
it . remove ( ) ;
break ;
}
|
Fixed issue reported by FindBugs
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
public interface Kernel32 extends Library {
+
+ SINGLE
+
Kernel32 INSTANCE = ( Kernel32 ) Native . loadLibrary ( STRING0 , Kernel32 . class ) ;
SINGLE
<nb> public interface Kernel32 extends Library {
public int dwProcessId ;
public int dwThreadId ;
}
+
+ SINGLE
}
|
Added checkstyle suppressions for native code
|
<nb> public class SpecFilter {
. externalDocs ( op . getExternalDocs ( ) ) ;
List < Parameter > clonedParams = new ArrayList < Parameter > ( ) ;
- for ( Parameter param : op . getParameters ( ) ) {
- if ( filter . isParamAllowed ( param , op , api , params , cookies , headers ) ) {
- clonedParams . add ( param ) ;
+ if ( op . getParameters ( ) != null ) {
+ for ( Parameter param : op . getParameters ( ) ) {
+ if ( filter . isParamAllowed ( param , op , api , params , cookies , headers ) ) {
+ clonedParams . add ( param ) ;
+ }
}
}
clonedOperation . setParameters ( clonedParams ) ;
|
added null check
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public class VcsLogSorter {
@ notnull
- public static < Commit extends TimedVcsCommit > List < Commit > sortByDateTopoOrder ( @ notnull List < Commit > commits ) {
+ public static < Commit extends TimedVcsCommit > List < Commit > sortByDateTopoOrder ( @ notnull Collection < Commit > commits ) {
return new VcsLogJoiner . NewCommitIntegrator < Hash , Commit > ( new ArrayList < Commit > ( ) , commits ) . getResultList ( ) ;
}
|
log VcsLogSorter can accept any Collection not just List
|
<nb> public class BuildExperimentRunner {
InvocationSpec invocation = experiment . getInvocation ( ) ;
if ( invocation instanceof GradleInvocationSpec ) {
if ( ( ( GradleInvocationSpec ) invocation ) . getBuildWillRunInDaemon ( ) ) {
- return NUMBER0 ;
+ return NUMBER1 ;
}
}
return NUMBER2 ;
|
Use more warm ups for perf tests
|
<nb> public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
showBlocklist . setVisible ( false ) ;
showMoreInfo . setVisible ( false ) ;
changePassword . setVisible ( false ) ;
+ clearDevices . setVisible ( false ) ;
}
return true ;
}
|
Do not display clear devices button if not online
|
<nb> public class HistoryServiceImpl implements HistoryService {
private DocumentBuilder builder ;
+ private boolean cacheEnabled = false ;
+
public HistoryServiceImpl ( )
throws Exception
{
<nb> public class HistoryServiceImpl implements HistoryService {
{
this . configurationService = configurationService ;
log . debug ( STRING0 ) ;
+
+ SINGLE
+ Object isCacheEnabledObj =
+ this . configurationService . getProperty ( HistoryService . CACHE_ENABLED_PROPERTY ) ;
+
+ if ( isCacheEnabledObj != null && isCacheEnabledObj . equals ( HistoryService . CACHE_ENABLED ) )
+ cacheEnabled = true ;
}
}
<nb> public class HistoryServiceImpl implements HistoryService {
}
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ protected boolean isCacheEnabled ( )
+ {
+ return cacheEnabled ;
+ }
+
}
|
Added method for ceck if caching is enabled
|
<nb> public class CloudSetupFragment extends SherlockFragment {
}
case HexagonSetupTask . SYNC_REQUIRED : {
SINGLE
- SgSyncAdapter . requestSync ( getActivity ( ) , - NUMBER0 ) ;
+ SgSyncAdapter . requestSyncImmediate ( getActivity ( ) , - NUMBER0 , false ) ;
HexagonSettings . setSetupCompleted ( getActivity ( ) ) ;
updateViewsStates ( false ) ;
break ;
|
Use new sync adapter call for immediate syncs
|
<nb> public final class HdmiCecService extends SystemService {
if ( getContext ( ) . checkCallingOrSelfPermission ( android . Manifest . permission . DUMP )
!= PackageManager . PERMISSION_GRANTED ) {
pw . println ( STRING0
- + Binder . getCallingPid ( ) + STRING1 + Binder . getCallingUid ( ) ) ;
+ + Binder . getCallingPid ( ) + STRING1 + Binder . getCallingUid ( )
+ + STRING2 + android . Manifest . permission . DUMP ) ;
return ;
}
final long ident = Binder . clearCallingIdentity ( ) ;
|
add permission name to dump permission denial message
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public final class Job < T extends Keyed > extends Keyed < Job > {
}
@ override public boolean onExceptionalCompletion ( Throwable ex , CountedCompleter caller ) {
final DException dex = new DException ( ex , caller . getClass ( ) ) ;
+ try { Log . err ( ex ) ; } catch ( Throwable t ) { COMMENT }
new Barrier1OnExCom ( dex ) . apply ( Job . this ) ;
- if ( getCompleter ( ) . getCompleter ( ) == null ) { SINGLE
- System . err . println ( STRING0 + caller . getClass ( ) ) ;
- ex . printStackTrace ( ) ;
- }
_barrier = null ; SINGLE
return true ;
}
|
Added exception logging to Job
|
<nb> public class Roster extends Manager {
}
}
- if ( ! isLoaded ( ) ) {
+ if ( ! isLoaded ( ) && rosterLoadedAtLogin ) {
LOGGER . warning ( STRING0 ) ;
}
final XMPPConnection connection = connection ( ) ;
|
Suppress warning if roster isn t set to load
|
<nb> public class CoreEdgeClusterSettings
@ description ( STRING0 )
public static final Setting < String > raft_log_implementation =
- setting ( STRING1 , STRING , STRING2 ) ;
+ setting ( STRING1 , STRING , STRING3 ) ;
@ description ( STRING4 )
public static final Setting < Long > raft_log_rotation_size =
|
Revert Revert to naive raft log while investigating issues with physical
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
public class NioSelector implements AutoCloseable
{
private static final int ITERATION_THRESHOLD = NUMBER0 ;
+ private static final int INITIAL_TRANSPORT_LIST_CAPACITY = BitUtil . findNextPositivePowerOfTwo ( ITERATION_THRESHOLD ) ;
private static final Field SELECTED_KEYS_FIELD ;
private static final Field PUBLIC_SELECTED_KEYS_FIELD ;
<nb> public class NioSelector implements AutoCloseable
private final Selector selector ;
private final NioSelectedKeySet selectedKeySet ;
- private final ArrayList < UdpChannelTransport > transportList = new ArrayList < > ( NUMBER1 ) ;
+ private final ArrayList < UdpChannelTransport > transportList = new ArrayList < > ( INITIAL_TRANSPORT_LIST_CAPACITY ) ;
COMMENT
COMMENT
<nb> public class NioSelector implements AutoCloseable
}
else
{
-
selector . selectNow ( ) ;
if ( null != PUBLIC_SELECTED_KEYS_FIELD )
|
cleaned up initial size of array list for DatagramChannel iteration
|
<nb> public class LlapZookeeperRegistryImpl implements ServiceRegistry {
if ( ix > NUMBER0 ) {
pathToCheck = pathToCheck . substring ( NUMBER0 , ix ) ;
}
- List < ACL > acls = zooKeeperClient . usingNamespace ( null ) . getACL ( ) . forPath ( pathToCheck ) ;
+ List < ACL > acls = zooKeeperClient . getACL ( ) . forPath ( pathToCheck ) ;
if ( acls == null || acls . isEmpty ( ) ) {
SINGLE
throw new SecurityException ( STRING0 + pathToCheck ) ;
|
LLAP registry ACL check causes error due to namespacing Sergey Shelukhin reviewed by Prasanth Jayachandran
|
<nb> public final class HttpBindManager {
}
}
- SINGLE
+ SINGLE
private boolean isHttpCompressionEnabled ( ) {
return isCompressionEnabled ;
}
|
Fixing comment in code to match new default
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
-
- import NAMESPACE ;
import NAMESPACE ;
public class AssemblyRecipe {
|
Revert Fixed missing import
|
<nb> public class MainActivity extends AppCompatActivity implements TextView . OnEditor
mRecycler = ( RecyclerView ) findViewById ( R . id . messages_list ) ;
mRecycler . setHasFixedSize ( true ) ;
- final LinearLayoutManager mLlm = new LinearLayoutManager ( this ) ;
+ mLlm = new LinearLayoutManager ( this ) ;
mLlm . setStackFromEnd ( true ) ;
mRecycler . setLayoutManager ( mLlm ) ;
<nb> public class MainActivity extends AppCompatActivity implements TextView . OnEditor
firebaseAdapter . registerAdapterDataObserver ( new RecyclerView . AdapterDataObserver ( ) {
@ override
public void onItemRangeInserted ( int positionStart , int itemCount ) {
+ super . onItemRangeInserted ( positionStart , itemCount ) ;
int max = firebaseAdapter . getItemCount ( ) ;
int lastVis = mLlm . findLastCompletelyVisibleItemPosition ( ) ;
- super . onItemRangeInserted ( positionStart , itemCount ) ;
if ( positionStart >= ( max - NUMBER0 ) && lastVis == ( positionStart - NUMBER0 ) ) {
mRecycler . scrollToPosition ( positionStart ) ;
}
|
Fix nit in DB sample
|
<nb> public final class HttpHelper {
private static final Collection < String > REDIRECTOR_DOMAINS = new HashSet < String > ( Arrays . asList (
STRING0 , STRING1 , STRING2 , STRING3 , STRING4 , STRING5 , STRING6 , STRING7 , STRING8 ,
- STRING9 , STRING10 , STRING11 , STRING12 , STRING13
+ STRING14 , STRING15 , STRING9 , STRING10 , STRING11 , STRING12 , STRING13
) ) ;
private HttpHelper ( ) {
<nb> public final class URIResultParser extends ResultParser {
STRING16 ; SINGLE
private static final Pattern URL_WITH_PROTOCOL_PATTERN = Pattern . compile (
STRING17 + SINGLE
- STRING18 + SINGLE
+ STRING19 + SINGLE
PATTERN_END ) ;
private static final Pattern URL_WITHOUT_PROTOCOL_PATTERN = Pattern . compile (
- STRING20 + SINGLE
+ STRING21 + SINGLE
PATTERN_END ) ;
@ override
<nb> public final class URIParsedResultTestCase extends Assert {
STRING22 ,
null ) ;
doTest ( STRING23 , STRING23 , null ) ;
+ doTest ( STRING24 , STRING25 , null ) ;
}
@ test
|
accept a singleletterdomainelement com
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
<nb> abstract class AbstractMapServiceContextSupport implements MapServiceContext {
}
@ override
- public long getNow ( ) {
- return Clock . currentTimeMillis ( ) ;
- }
-
- @ override
public Object toObject ( Object data ) {
if ( data == null ) {
return null ;
<nb> import NAMESPACE ;
COMMENT
interface MapServiceContextSupport {
- long getNow ( ) ;
-
Object toObject ( Object data ) ;
Data toData ( Object object , PartitioningStrategy partitionStrategy ) ;
|
Removed MapServiceContext getNow
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public class ScpSimpleProduceTest extends ScpServerTestSupport {
<nb> public class ScpSimpleProduceTest extends ScpServerTestSupport {
}
@ test
+ @ ignore ( STRING0 )
public void testScpProducePrivateKey ( ) throws Exception {
Assume . assumeTrue ( this . isSetupComplete ( ) ) ;
|
Skip test which fails on CI servers
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
- COMMENT
- COMMENT
COMMENT
public abstract class MasterNodeOperationRequest implements ActionRequest {
- private TimeValue masterNodeTimeout = TimeValue . timeValueSeconds ( NUMBER0 ) ;
+ public static TimeValue DEFAULT_MASTER_NODE_TIMEOUT = TimeValue . timeValueSeconds ( NUMBER0 ) ;
+
+ private TimeValue masterNodeTimeout = DEFAULT_MASTER_NODE_TIMEOUT ;
@ override
public boolean listenerThreaded ( ) {
|
use a constant value for default master node timeout
|
<nb> public class ViewPropertyAnimator {
}
}
mPendingAnimations . clear ( ) ;
+ mPendingSetupAction = null ;
+ mPendingCleanupAction = null ;
+ mPendingOnStartAction = null ;
+ mPendingOnEndAction = null ;
mView . removeCallbacks ( mAnimationStarter ) ;
if ( mRTBackend != null ) {
mRTBackend . cancelAll ( ) ;
|
Canceling ViewPropertyAnimator now removes pending actions
|
<nb> public abstract class HttpRequestParser {
}
protected boolean handleCachedHeader ( String existing , ByteBuffer buffer , ParseState state , HttpServerExchange builder ) {
- if ( existing . length ( ) + NUMBER0 > buffer . remaining ( ) ) {
- return false ;
- }
int pos = buffer . position ( ) ;
- while ( buffer . get ( pos ) == STRING0 ) {
+ while ( pos < buffer . limit ( ) && buffer . get ( pos ) == STRING0 ) {
pos ++ ;
}
+ if ( existing . length ( ) + NUMBER0 + pos > buffer . remaining ( ) ) {
+ return false ;
+ }
int i = NUMBER1 ;
while ( i < existing . length ( ) ) {
byte b = buffer . get ( pos + i ) ;
|
Add fix for parsing bug
|
<nb> public class HealthCheckHandler implements Handler {
Iterable < Promise < Pair < HealthCheck . Result , String > > > resultPromises = Iterables . transform ( healthChecks , h - >
Promise . wrap ( ( ) - > h . check ( registry ) )
. throttled ( throttle )
+ . mapError ( HealthCheck . Result : : unhealthy )
. right ( r - > h . getName ( ) )
) ;
|
Catch inline errors in health checks
|
<nb> class SuggestionsAdapter extends ResourceCursorAdapter {
final Cursor cursor = mSearchManager . getSuggestions ( mSearchable , query ) ;
SINGLE
SINGLE
- if ( ! mGlobalSearchMode ) cursor . getCount ( ) ;
+ if ( ! mGlobalSearchMode && cursor != null ) cursor . getCount ( ) ;
return cursor ;
} catch ( RuntimeException e ) {
Log . w ( LOG_TAG , STRING0 , e ) ;
|
Fix NPE in SuggestionsAdapter when cursor is null
|
<nb> public class JavaVersionTest {
conversionFails ( FLOAT0 ) ;
conversionFails ( FLOAT1 ) ;
}
+
+ @ test
+ public void currentReturnsJvmVersion ( ) {
+ assertThat ( JavaVersion . current ( ) , equalTo ( JavaVersion . toVersion ( System . getProperty ( STRING0 ) ) ) ) ;
+ }
@ test
public void convertsNullToNull ( ) {
|
add test for JavaVersion current
|
<nb> public class EndpointExplain extends CamelCommandSupport {
out . println ( ) ;
SINGLE
- List < Map < String , String > > options = JsonSchemaHelper . parseJsonSchema ( json ) ;
+ List < Map < String , String > > options = JsonSchemaHelper . parseJsonSchema ( STRING0 , json ) ;
SINGLE
Collections . sort ( options , new Comparator < Map < String , String > > ( ) {
<nb> public class EndpointList extends CamelCommandSupport {
boolean first = true ;
String json = camelController . explainEndpoint ( endpoint . getCamelContext ( ) . getName ( ) , endpoint . getEndpointUri ( ) , verbose ) ;
SINGLE
- List < Map < String , String > > options = JsonSchemaHelper . parseJsonSchema ( json ) ;
+ List < Map < String , String > > options = JsonSchemaHelper . parseJsonSchema ( STRING0 , json ) ;
SINGLE
Collections . sort ( options , new Comparator < Map < String , String > > ( ) {
|
Add component details to json
|
<nb> public final class CallManager {
COMMENT
COMMENT
COMMENT
- public void stopDtmf ( Phone phone ) {
- phone . stopDtmf ( ) ;
+ public void stopDtmf ( ) {
+ if ( hasActiveFgCall ( ) ) getFgPhone ( ) . stopDtmf ( ) ;
}
COMMENT
<nb> public final class CallManager {
COMMENT
COMMENT
COMMENT
- public boolean sendBurstDtmf ( Phone phone , String dtmfString , int on , int off , Message onComplete ) {
+ public boolean sendBurstDtmf ( String dtmfString , int on , int off , Message onComplete ) {
if ( hasActiveFgCall ( ) ) {
getActiveFgCall ( ) . getPhone ( ) . sendBurstDtmf ( dtmfString , on , off , onComplete ) ;
return true ;
|
remove unused Phone argument from stopDtmf and sendBurstDtmf
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
@ contextconfiguration
+ @ ignore ( STRING0 )
public class RestletDomainServiceTest extends AbstractJUnit4SpringContextTests {
@ autowired
|
Ignore test until we fix camel restlet after recent upgrade
|
<nb> public class ZookeeperClusterTest {
manager . start ( ) ;
awaitClusterManagerConnected ( manager ) ;
+ awaitCheckAgentRegisted ( manager , STRING0 , STRING1 , NUMBER0 ) ;
List < String > agentList = manager . getRegisteredAgentList ( STRING0 , STRING1 , NUMBER0 ) ;
Assert . assertEquals ( NUMBER1 , agentList . size ( ) ) ;
Assert . assertEquals ( STRING2 , agentList . get ( NUMBER2 ) ) ;
<nb> public class ZookeeperClusterTest {
manager . start ( ) ;
awaitClusterManagerConnected ( manager ) ;
+ awaitCheckAgentRegisted ( manager , STRING0 , STRING1 , NUMBER0 ) ;
List < String > agentList = manager . getRegisteredAgentList ( STRING0 , STRING1 , NUMBER0 ) ;
Assert . assertEquals ( NUMBER1 , agentList . size ( ) ) ;
Assert . assertEquals ( STRING2 , agentList . get ( NUMBER2 ) ) ;
|
Reduce test execution time
|
<nb> public interface HumanEntity extends LivingEntity , AnimalTamer , Permissible , Inv
public PlayerInventory getInventory ( ) ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public Inventory getEnderChest ( ) ;
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add API to retrieve a players EnderChest
|
<nb> public class CcuCommunicator implements CcuCallbackReceiver {
ccuCallbackServer = isBinRpc ? new BinRpcCallbackServer ( this ) : new XmlRpcCallbackServer ( this ) ;
context . getTclRegaScriptClient ( ) . start ( ) ;
+ context . getStateHolder ( ) . init ( ) ;
context . getStateHolder ( ) . loadDatapoints ( ) ;
context . getStateHolder ( ) . loadVariables ( ) ;
<nb> public class CcuStateHolder {
private HomematicContext context ;
- private ExecutorService reloadExecutorPool = Executors . newCachedThreadPool ( ) ;
+ private ExecutorService reloadExecutorPool ;
private boolean datapointReloadInProgress = false ;
private Map < HomematicBindingConfig , Object > refreshCache = new HashMap < HomematicBindingConfig , Object > ( ) ;
<nb> public class CcuStateHolder {
}
COMMENT
+ COMMENT
+ COMMENT
+ public void init ( ) {
+ reloadExecutorPool = Executors . newCachedThreadPool ( ) ;
+ }
+
+ COMMENT
COMMENT
COMMENT
public void destroy ( ) {
|
Fixed binding restart error
|
<nb> final public class JSDocInfoBuilder {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix small typo in docs that s giving out warnings
|
<nb> public abstract class GroovyCompilerBase implements TranslatingCompiler {
final CompilerConfiguration configuration = CompilerConfiguration . getInstance ( myProject ) ;
if ( module . getModuleType ( ) instanceof JavaModuleType ) {
- final boolean compileGroovyFiles = facet != null && facet . getConfiguration ( ) . isCompileGroovyFiles ( ) ;
+ final boolean compileGroovyFiles = facet == null || facet . getConfiguration ( ) . isCompileGroovyFiles ( ) ;
for ( final VirtualFile file : moduleFiles ) {
final boolean shouldCompile = module . getModuleType ( ) instanceof JavaModuleType &&
( file . getFileType ( ) == GroovyFileType . GROOVY_FILE_TYPE && compileGroovyFiles ||
|
compile groovy files when there s no facet
|
<nb> class Main {
lt . disableRule ( disabledRules [ i ] ) ;
}
}
+
+ JLanguageTool getJLanguageTool ( ) {
+ return lt ;
+ }
private void runRecursive ( String filename ) throws IOException ,
ParserConfigurationException , SAXException {
<nb> public class BNCCheck {
private BNCCheck ( ) throws IOException {
prg = new Main ( false , Language . ENGLISH ) ;
+ prg . getJLanguageTool ( ) . disableRule ( STRING0 ) ;
+ prg . getJLanguageTool ( ) . disableRule ( STRING1 ) ;
+ System . err . println ( STRING2 ) ;
}
private void run ( File file ) throws IOException {
|
disable some rule so we don t get too many false alarms
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class IdeaSpecificSettings extends AbstractIdeaSpecificSettings < Modifiabl
}
if ( entry instanceof JdkOrderEntry ) {
final Sdk jdk = ( ( JdkOrderEntry ) entry ) . getJdk ( ) ;
- if ( EclipseModuleManagerImpl . getInstance ( entry . getOwnerModule ( ) ) . getInvalidJdk ( ) != null ||
- ( jdk != null && ! ( jdk . getSdkType ( ) instanceof JavaSdk ) ) ) {
+ if ( EclipseModuleManagerImpl . getInstance ( entry . getOwnerModule ( ) ) . getInvalidJdk ( ) != null || jdk != null ) {
if ( entry instanceof InheritedJdkOrderEntry ) {
root . setAttribute ( INHERIT_JDK , STRING0 ) ;
} else {
|
save jdk in
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TimingTest extends TestCase {
sleepTen ( ) ;
}
long val3 = t . report ( ) ;
- assertEquals ( STRING0 , STRING1 , Timing . toSecondsString ( val3 ) ) ;
+ assertEquals ( STRING0 , new DecimalFormat ( STRING2 ) . format ( FLOAT0 ) , Timing . toSecondsString ( val3 ) ) ;
}
private static void sleepTen ( ) {
|
made test runnable with other default locale
|
<nb> public class ByteBuddyAgent {
Class < ? > processHandle = Class . forName ( STRING0 ) ;
return new ForJava9CapableVm ( processHandle . getDeclaredMethod ( STRING1 ) ,
processHandle . getDeclaredMethod ( STRING2 ) ) ;
+ } catch ( RuntimeException exception ) {
+ throw exception ;
} catch ( Exception ignored ) {
return ForLegacyVm . INSTANCE ;
}
|
Added rethrow of runtime exception
|
<nb> public class BasicHttpsTest {
log . info ( STRING0 ) ;
}
- @ test ( groups = STRING1 )
- public void multipleJavaDotDeadSSLTest ( ) throws Throwable {
- AsyncHttpClient c = new AsyncHttpClient ( ) ;
-
- String body = STRING2 ;
-
- SINGLE
- Response response = c . preparePost ( STRING3 )
- . setBody ( body )
- . execute ( ) . get ( TIMEOUT , TimeUnit . SECONDS ) ;
-
- assertNotNull ( response ) ;
- assertEquals ( response . getStatusCode ( ) , NUMBER0 ) ;
-
- SINGLE
- response = c . preparePost ( STRING4 )
- . setBody ( body )
- . execute ( ) . get ( TIMEOUT , TimeUnit . SECONDS ) ;
-
- assertEquals ( response . getStatusCode ( ) , NUMBER0 ) ;
-
- }
-
@ test ( groups = STRING5 )
public void zeroCopyPostTest ( ) throws Throwable {
|
Remove another javadotNet test
|
<nb> public class NetworkPolicyManagerService extends INetworkPolicyManager . Stub {
final String [ ] packages = mContext . getPackageManager ( ) . getPackagesForUid ( uid ) ;
final int userId = UserHandle . getUserId ( uid ) ;
- for ( String packageName : packages ) {
- if ( ! mUsageStats . isAppIdle ( packageName , uid , userId ) ) {
- return false ;
+ if ( packages != null ) {
+ for ( String packageName : packages ) {
+ if ( ! mUsageStats . isAppIdle ( packageName , uid , userId ) ) {
+ return false ;
+ }
}
}
return true ;
|
Fixes the system server crash issues caused by null pointer in
|
<nb> public class SgSyncAdapter extends AbstractThreadedSyncAdapter {
if ( mShows == null ) {
mShows = getShowsToUpdate ( type , currentTime ) ;
}
+
+ Log . d ( TAG , STRING0 ) ;
SINGLE
for ( int i = updateCount . get ( ) ; i < mShows . length ; i ++ ) {
<nb> public class SgSyncAdapter extends AbstractThreadedSyncAdapter {
}
private UpdateResult getTraktActivity ( long currentTime ) {
+ Log . d ( TAG , STRING1 ) ;
if ( ! ServiceUtils . isTraktCredentialsValid ( getContext ( ) ) ) {
SINGLE
return UpdateResult . SUCCESS ;
|
Add two more log steps to sync
|
<nb> public class CustomViewAbove extends ViewGroup {
mCustomViewBehind . scrollTo ( ( int ) ( ( x + getBehindWidth ( ) ) * mScrollScale ) , y ) ;
} else if ( mMode == SlidingMenu . RIGHT ) {
SINGLE
- mCustomViewBehind . scrollTo ( ( int ) ( getBehindWidth ( ) - getWidth ( ) ) , y ) ;
+ mCustomViewBehind . scrollTo ( ( int ) ( getBehindWidth ( ) - getWidth ( ) +
+ ( x - getBehindWidth ( ) ) * mScrollScale ) , y ) ;
}
}
if ( mShadowDrawable != null || mSelectorDrawable != null )
|
Fixed scroll scale for RIGHT
|
<nb> public class PGExprParser extends SQLExprParser {
this . aggregateFunctions = AGGREGATE_FUNCTIONS ;
this . dbType = JdbcConstants . POSTGRESQL ;
}
+
+ @ override
+ public SQLDataType parseDataType ( ) {
+ if ( lexer . token ( ) == Token . TYPE ) {
+ lexer . nextToken ( ) ;
+ }
+ return super . parseDataType ( ) ;
+ }
@ override
public PGOrderBy parseOrderBy ( ) {
<nb> public class PGLexer extends Lexer {
map . put ( STRING0 , Token . FALSE ) ;
map . put ( STRING1 , Token . ARRAY ) ;
map . put ( STRING2 , Token . IF ) ;
+ map . put ( STRING3 , Token . TYPE ) ;
DEFAULT_PG_KEYWORDS = new Keywords ( map ) ;
}
<nb> public enum Token {
RETURNING ( STRING4 ) ,
COMMENT ( STRING5 ) ,
OVER ( STRING6 ) ,
+ TYPE ( STRING3 ) ,
SINGLE
START ( STRING7 ) ,
|
improved postgresql support
|
<nb> public class GlobalShortcutDialog
this . setPreferredSize ( new Dimension ( NUMBER0 , NUMBER1 ) ) ;
this . setUI ( textFieldUI ) ;
- this . setBorder ( null ) ;
+ this . setBorder ( BorderFactory . createEmptyBorder ( NUMBER2 , NUMBER3 , NUMBER2 , NUMBER3 ) ) ;
this . setOpaque ( false ) ;
this . setDragEnabled ( true ) ;
|
Fixes global shortcut fields insets
|
<nb> final public class InvokeHelper {
public static Memory [ ] makeArguments ( Environment env , Memory [ ] args ,
ParameterEntity [ ] parameters ,
String originClassName , String originMethodName ,
- TraceInfo trace ) {
+ TraceInfo trace ) {
return InvokeArgumentHelper . makeArguments ( env , args , parameters , originClassName , originMethodName , trace ) ;
}
|
Add support for Variadics and Argument Unpacking
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
class JspDocumentParser
- extends DefaultHandler
- implements LexicalHandler , TagConstants {
+ extends DefaultHandler2
+ implements TagConstants {
private static final String LEXICAL_HANDLER_PROPERTY =
STRING0 ;
<nb> class JspDocumentParser
}
}
+ @ override
+ public InputSource resolveEntity ( String name , String publicId , String baseURI , String systemId )
+ throws SAXException , IOException {
+ SINGLE
+ SINGLE
+ SINGLE
+ return null ;
+ }
+
COMMENT
COMMENT
COMMENT
|
Convert JspDocumentParser to an DefaultHandler2
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class BaseQueriable < TModel extends Model > implements Queriable {
}
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
@ override
public long count ( DatabaseWrapper databaseWrapper ) {
<nb> public abstract class BaseQueriable < TModel extends Model > implements Queriable {
return NUMBER0 ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
@ override
public long count ( ) {
return count ( FlowManager . getDatabaseForTable ( getTable ( ) ) . getWritableDatabase ( ) ) ;
|
added more doc on what count does
|
<nb> public class ThreadNameFilter implements Filter {
}
private static String formatName ( HttpServletRequest req , String oldName ) {
- return new StringBuilder ( NUMBER0 ) . append ( oldName )
- . append ( STRING0 )
- . append ( req . getMethod ( ) )
- . append ( STRING1 )
- . append ( getFullUrl ( req ) )
- . toString ( ) ;
+ return oldName + STRING0 + req . getMethod ( ) + STRING1 + getFullUrl ( req ) ;
}
}
|
Simplify ThreadNameFilter a bit
|
<nb> package NAMESPACE ;
import NAMESPACE ;
- @ ignore ( STRING0 )
+ SINGLE
public class KVSpeedTest extends TestUtil {
- static final int NCLOUD = NUMBER0 ;
+ static final int NCLOUD = NUMBER1 ;
static final int NKEYS = NUMBER2 ;
@ beforeclass static public void setup ( ) { stall_till_cloudsize ( NCLOUD ) ; }
|
turn on KVSpeedTest
|
<nb> public class DeepLearningProstateTest extends TestUtil {
p2 . _checkpoint = model1 . _key ;
SINGLE
p2 . _train = frame . _key ;
+ p2 . _activation = activation ;
+ p2 . _hidden = hidden ;
p2 . _valid = valid == null ? null : valid . _key ;
p2 . _l1 = FLOAT0 ;
p2 . _l2 = FLOAT0 ;
|
Fix DLProstate test to pass new checkpoint assertions
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Remove bogus import
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class AssignmentToNullInspection extends BaseInspection {
}
@ override
+ protected LocalQuickFix buildFix ( Object . . . infos ) {
+ PsiVariable resolve = ( PsiVariable ) ( ( PsiReferenceExpression ) infos [ NUMBER0 ] ) . resolve ( ) ;
+ return resolve != null ? new AddAnnotationFix ( AnnotationUtil . NULLABLE , resolve ) : null ;
+ }
+
+ @ override
public JComponent createOptionsPanel ( ) {
return new SingleCheckboxOptionsPanel ( InspectionGadgetsBundle . message (
STRING0 ) , this ,
<nb> public class AssignmentToNullInspection extends BaseInspection {
if ( lhs == null || isReferenceToNullableVariable ( lhs ) ) {
return ;
}
- registerError ( lhs ) ;
+ registerError ( lhs , lhs ) ;
}
private boolean isReferenceToNullableVariable (
|
provide annotate Nullable fix
|
<nb> public class MultithreadedTestCase {
ThreadHandle threadHandle = start ( closure ) ;
threadHandle . waitFor ( ) ;
Date end = new Date ( ) ;
- if ( end . getTime ( ) - start . getTime ( ) > units . toMillis ( value ) + NUMBER0 ) {
- throw new RuntimeException ( STRING0 ) ;
+ long actual = end . getTime ( ) - start . getTime ( ) ;
+ long expected = units . toMillis ( value ) ;
+ if ( actual > expected + NUMBER0 ) {
+ throw new RuntimeException ( String . format ( STRING1 , expected , actual ) ) ;
}
return threadHandle ;
}
|
Added some logging to breaking unit test
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Removed unused import
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class InlineCallResolverExtension implements CallResolverExtension {
}
}
- private static boolean isEffectivelyPublicApi ( DeclarationDescriptorWithVisibility descriptor ) {
- DeclarationDescriptorWithVisibility parent = descriptor ;
+ private boolean isEffectivelyPublicApi ( @ notnull DeclarationDescriptorWithVisibility startDescriptor ) {
+ DeclarationDescriptorWithVisibility parent = startDescriptor ;
while ( parent != null ) {
if ( ! parent . getVisibility ( ) . isPublicAPI ( ) ) {
+ if ( parent . getContainingDeclaration ( ) == descriptor ) {
+ SINGLE
+ return true ;
+ }
return false ;
}
parent = DescriptorUtils . getParentOfType ( parent , DeclarationDescriptorWithVisibility . class ) ;
|
Skip local declarations in visibility publicity checking
|
<nb> public class SignInFragment extends AbstractFragment implements TextWatcher {
public boolean canAutofillUsernameAndPassword ( ) {
return mSmartLockEnabled && EditTextUtils . getText ( mUsernameEditText ) . isEmpty ( )
- && EditTextUtils . getText ( mPasswordEditText ) . isEmpty ( ) ;
+ && EditTextUtils . getText ( mPasswordEditText ) . isEmpty ( ) && ! mSelfHosted ;
}
public void onCredentialRetrieved ( Credential credential ) {
|
Do not auto fill username and password if it s a self hosted site
|
<nb> public class Category {
@ override
public String toString ( ) {
- return name + STRING0 + priority + STRING1 ;
+ return name ;
}
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
COMMENT
public final boolean isDefaultOff ( ) {
return defaultOff ;
}
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
public final void setDefaultOff ( ) {
defaultOff = true ;
}
|
remove priority from toString output as it s not used by LT anyway
|
<nb> public class RtspResponseDecoder extends RtspMessageDecoder {
}
@ override
+ protected boolean isContentAlwaysEmpty ( HttpMessage msg ) {
+ SINGLE
+ SINGLE
+ boolean empty = super . isContentAlwaysEmpty ( msg ) ;
+ if ( empty ) {
+ return true ;
+ }
+ if ( ! msg . containsHeader ( RtspHeaders . Names . CONTENT_LENGTH ) ) {
+ return true ;
+ }
+ return empty ;
+ }
+
+ @ override
protected boolean isDecodingRequest ( ) {
return false ;
}
|
Fixed a bug where RtspResponseDecoder does not decode a response with no Content Length header properly
|
<nb> public class UriBeaconDiscoveryService extends Service implements MetadataResolv
UriBeacon uriBeacon = UriBeacon . parseFromBytes ( scanResult . getScanRecord ( ) . getBytes ( ) ) ;
if ( uriBeacon != null ) {
String url = uriBeacon . getUriString ( ) ;
- if ( url != null && url . isEmpty ( ) ) {
+ if ( url != null && ! url . isEmpty ( ) ) {
String address = scanResult . getDevice ( ) . getAddress ( ) ;
int rssi = scanResult . getRssi ( ) ;
int txPower = uriBeacon . getTxPowerLevel ( ) ;
|
Fix small logic error
|
<nb> public class TransactionHandle
}
catch ( CypherException e )
{
- errors . add ( new Neo4jError ( EXCEPTION_MAPPING . apply ( e ) , e ) ) ;
+ errors . add ( new Neo4jError ( e . status ( ) , e ) ) ;
throw e ;
}
<nb> public class TransactionHandle
}
catch ( CypherException e )
{
- errors . add ( new Neo4jError ( EXCEPTION_MAPPING . apply ( e ) , e ) ) ;
+ errors . add ( new Neo4jError ( e . status ( ) , e ) ) ;
}
catch ( DeadlockDetectedException e )
{
|
More compile errors
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> import NAMESPACE ;
@ xmlrootelement ( name = STRING0 )
@ xmlaccessortype ( XmlAccessType . FIELD )
public class ChoiceType extends ProcessorType < ChoiceType > {
+
+ private static final transient Log LOG = LogFactory . getLog ( ChoiceType . class ) ;
+
@ xmlelementref
private List < WhenType > whenClauses = new ArrayList < WhenType > ( ) ;
@ xmlelement ( required = false )
<nb> public class ChoiceType extends ProcessorType < ChoiceType > {
Processor otherwiseProcessor = null ;
if ( otherwise != null ) {
otherwiseProcessor = otherwise . createProcessor ( routeContext ) ;
+ } else {
+ LOG . warn ( STRING1 ) ;
}
return new ChoiceProcessor ( filters , otherwiseProcessor ) ;
}
|
Add WARN log entry for ChoiceType without OtherwiseType
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class SyncFolderOperation extends SyncOperation {
filesToSyncContents . add ( operation ) ;
}
- SINGLE
if ( ! remoteFile . isFolder ( ) ) {
+ SINGLE
requestForDownloadFile ( remoteFile ) ;
+ } else {
+ SINGLE
+ RemoteOperation synchFolderOp = new SyncFolderOperation ( mContext ,
+ remoteFile . getRemotePath ( ) ,
+ mAccount ,
+ mCurrentSyncTime ) ;
+
+ synchFolderOp . execute ( mAccount , mContext , null , null ) ;
}
updatedFiles . add ( remoteFile ) ;
|
Resolve recursion on new SyncFolderOperation creating new instances of SynFolderOperation and running them
|
<nb> public class DefaultResolvedComponentResult implements ResolvedComponentResult {
@ override
public String toString ( ) {
- return id . getGroup ( ) + STRING0 + id . getName ( ) + STRING0 + id . getVersion ( ) ;
+ return getId ( ) . getDisplayName ( ) ;
}
}
|
Changed DefaultResolvedComponentResult toString to delegate to the id s getDisplayName
|
<nb> public class RedisDispatcherImp implements IRedisDispatcher {
confMap . put ( STRING0 , conf . getName ( ) ) ;
jedis . hmset ( STRING1 + COLON + conf . getMeetingToken ( ) , confMap ) ;
- jedis . hmset ( STRING2 + COLON + conf . getMeetingToken ( ) , conf . getMetadata ( ) ) ;
+ jedis . hmset ( STRING2 + COLON + conf . getMeetingToken ( ) , conf . getMetadata ( ) ) ;
}
SINGLE
<nb> public class DynamicConference {
SINGLE
this . participants = new ArrayList < DynamicConferenceParticipant > ( ) ;
this . metadata = new Hashtable < String , String > ( ) ;
+ addMetadataValue ( STRING3 , STRING4 ) ;
}
public static String createMeetingToken ( ) {
|
add default metadata
|
<nb> public abstract class IntervalTreeImpl < T extends MutableInterval > extends RedBla
}
IntervalNode < E > parent = node . getParent ( ) ;
if ( parent == null ) {
- break ; SINGLE
+ return deltaUp ; SINGLE
}
path = ( path < < NUMBER0 ) | ( parent . getLeft ( ) == node ? NUMBER1 : NUMBER0 ) ;
node = parent ;
|
return some for invalid range marker
|
<nb> public class SqlTaskExecution
if ( ! taskStateMachine . getState ( ) . isDone ( ) ) {
taskHandle = taskExecutor . addTask ( taskId ) ;
taskStateMachine . addStateChangeListener ( new RemoveTaskHandleWhenDone ( taskExecutor , taskHandle ) ) ;
+ taskStateMachine . addStateChangeListener ( state - > {
+ if ( state . isDone ( ) ) {
+ for ( DriverFactory factory : driverFactories ) {
+ factory . close ( ) ;
+ }
+ }
+ } ) ;
}
else {
taskHandle = null ;
|
Fix theoretical memory tracking leak
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ScalarImplementation
return new OperatorImplementationDependency (
operator . operator ( ) ,
parseTypeSignature ( operator . returnType ( ) ) ,
- asList ( operator . argumentTypes ( ) ) . stream ( ) . map ( TypeSignature : : parseTypeSignature ) . collect ( toImmutableList ( ) ) ) ;
+ Arrays . stream ( operator . argumentTypes ( ) )
+ . map ( TypeSignature : : parseTypeSignature )
+ . collect ( toImmutableList ( ) ) ) ;
}
if ( annotation instanceof LiteralParameter ) {
return new LiteralImplementationDependency ( ( ( LiteralParameter ) annotation ) . value ( ) ) ;
|
Fix warning in ScalarImplementation
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.