diff stringlengths 38 1.78k | msg_token stringlengths 9 190 |
|---|---|
<nb> public class ActivityShare extends Activity {
new SubmitTask ( ) . executeOnExecutor ( mExecutor , uid ) ;
} else {
Intent intent = new Intent ( ) ;
- intent . putExtra ( cErrorMessage , getString ( R . string . msg_limit , ActivityShare . cSubmitLimit ) ) ;
+ intent . putExtra ( cErrorMessage , getStrin... | Fix another submit limit |
<nb> public final class NettyDataServer implements DataServer {
@ override
public void close ( ) throws IOException {
- boolean completed ;
-
int quietPeriodSecs =
Configuration . getInt ( PropertyKey . WORKER_NETWORK_NETTY_SHUTDOWN_QUIET_PERIOD ) ;
int timeoutSecs = Configuration . getInt ( PropertyKey... | Addressing review comment |
<nb> public class MainActivity extends AppCompatActivity implements
@ override
public void onSearchError ( Throwable throwable ) {
- SINGLE
+ onSearchResults ( getErrorResult ( throwable ) ) ;
}
private void startTextToSpeech ( ) { | added error handling |
<nb> public class PatternRuleHandler extends XMLRuleHandler {
case ANTIPATTERN :
String antiId = id ;
if ( inRuleGroup ) {
- id = ruleGroupId ;
+ if ( subId > NUMBER0 ) {
+ antiId = ruleGroupId + STRING0 + subId + STRING1 ;
+ } else {
+ antiId = ruleGroupId ;
+ }
}
final DisambiguationPatternRule ... | make id a bit more informative |
<nb> import NAMESPACE ;
public class PluginServlet extends HttpServlet {
private static Map < String , HttpServlet > servlets ;
- private static File pluginDirectory ;
private static PluginManager pluginManager ;
private static ServletConfig servletConfig ;
static {
servlets = new ConcurrentHashMap < ... | Removed pluginsDirectory static variable due to possible misconfiguration if JiveGlobal homeDirectory was not initialized yet |
<nb> public class SQLInsertClause implements InsertClause < SQLInsertClause > {
return this ;
}
+ @ nullable
@ java.lang.suppresswarnings ( STRING0 )
public < T > T executeWithKey ( Path < T > path ) {
ResultSet rs = executeWithKeys ( ) ; | added Nullable annotation |
<nb> public class TransportExecutor implements Executor {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ CO... | Fix javadoc formatting in TransportExecutor |
<nb> public class GitRepositoryReaderTest extends LightIdeaTestCase {
if ( file . isDirectory ( ) ) { SINGLE
return true ;
}
- String name = FileUtil . getRelativePath ( refsHeads , file ) ;
+ String relativePath = FileUtil . getRelativePath ( refsHeads , file ) ;
+ if ( relativePath == null ) {
+ return ... | read branch info correctly on Windows |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Fix spelling mistake |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public class BugPatternIndexYamlWriter {
void dump ( Collection < Instance... | Use a TreeMap to preserve key order |
<nb> public abstract class Drawable {
COMMENT
COMMENT
public void draw ( Canvas canvas ) {
- if ( canvas != null && canvas . isHardwareAccelerated ( ) ) {
+ if ( canvas != null && canvas . isHardwareAccelerated ( ) && false ) { SINGLE
final HardwareCanvas hardwareCanvas = ( HardwareCanvas ) canvas ;
final... | Disable Drawable DisplayLists |
<nb> public class WorkerTaskMonitorTest
workerCuratorCoordinator ,
new ThreadPoolTaskRunner (
new TaskToolboxFactory (
- new TaskConfig ( tmp . toString ( ) , null , null , NUMBER0 ) ,
+ new TaskConfig ( tmp . toString ( ) , null , null , NUMBER0 , null ) ,
null , null , null , null , null , null , null , n... | fix more test breakage |
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- SINGLE
import static NAMESPACE ;
@ suppresswarnings ( STRING0 ) | remove static import temp workaround |
<nb>
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
<nb> public class MongoException extends RuntimeException {
}
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- public MongoException ( final BSONObject o ) {
- this ( ServerError . getCode ( o ) , ServerError . getMsg ( ... | Removed BSONObject dependency from com mongodb MongoException |
<nb> public class RajawaliRenderer implements GLSurfaceView . Renderer , INode {
}
protected void destroyScene ( ) {
+ mSceneInitialized = false ;
for ( BaseObject3D child : mChildren ) {
child . destroy ( ) ;
} | Consider scene uninitialized after destroyScene |
<nb> public final class Util {
if ( stringUri == null ) {
return baseUri ;
}
+ if ( baseUri == null ) {
+ return Uri . parse ( stringUri ) ;
+ }
+ if ( stringUri . startsWith ( STRING0 ) ) {
+ return new Uri . Builder ( )
+ . scheme ( baseUri . getScheme ( ) )
+ . authority ( baseUri . getAuthority ... | Resolve reference Uris correctly |
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
public class NetworkUtilsTest {
@ test
<nb> public class NetworkUtilsTest {
Assert . assertEquals ( NetworkUtils . resolveHostName ( null ) , null ) ;
Assert . as... | add unit test to NetworkUtils |
<nb> public class OutputChecker {
result = result . replaceAll ( STRING0 , STRING1 ) ;
result = result . replaceAll ( STRING2 , STRING3 ) ;
result = result . replaceAll ( STRING4 , STRING5 ) ;
- result = result . replaceAll ( STRING6 , STRING7 ) ;
+ result = result . replaceAll ( STRING8 , STRING7 ) ;
resul... | fixed blinking testApplet |
<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
sb . append ( STRING0 ) ;
} else {
w . write ( next ) ;
- w . append ( STRING0 ) ;
+ w . write ( STRING0 ) ;
}
}
} catch ( IOException e ) { | Process consumeProcessXXX methods do not handle newline properly |
<nb> public class SiteSettingsFragment extends PreferenceFragment
String entry = input . getText ( ) . toString ( ) ;
if ( ! TextUtils . isEmpty ( entry ) && ! mEditingList . contains ( entry ) ) {
mEditingList . add ( entry ) ;
- mAdapter = null ;
- list . setAdapter ( getAdapter ( ) ) ;
+ getAdapter ( ) .... | Replace resetting adapter to null with notifyItemInserted |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ListManagedCursorTest extends ActivityInstrumentationTestCase < ListM
COMMENT
COMMENT
@ largetest
+ @ suppress SINGLE
... | Suppress tests in ListManagedCursorTest |
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class EditorWebView extends EditorWebViewAbstract {
super ( context , attrs ) ;
}
+ @ suppresslint ( STRING0 )
public void execJavaScriptFromString ( String javaScript ) {
if ( Bu... | Suppressed NewApi lint check for EditorWebView execJavaScriptFromString |
<nb> public class ExtensionHttpSessions extends ExtensionAdaptor implements SessionCh
this . getHttpSessionsPanel ( ) . addSite ( site ) ;
SINGLE
- if ( param . isEnabledProxyOnly ( ) && initiator != HttpSender . PROXY_INITIATOR )
+ if ( getParam ( ) . isEnabledProxyOnly ( ) && initiator != HttpSender . PROXY... | Fixed issue with Param initialization |
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import N... | Removes unused imports in OkHttpClientTest |
<nb> public class JLanguageTool {
private static String getBuildDate ( ) {
try {
final URL res = JLanguageTool . class . getResource ( JLanguageTool . class . getSimpleName ( ) + STRING0 ) ;
+ if ( res == null ) {
+ SINGLE
+ return null ;
+ }
final Object connObj = res . openConnection ( ) ;
if ( conn... | avoid NullPointerException on Android |
<nb> class NioClientSocketPipelineSink extends AbstractChannelSink {
channel . getCloseFuture ( ) . addListener ( new ChannelFutureListener ( ) {
public void operationComplete ( ChannelFuture f )
throws Exception {
- cf . setFailure ( new ClosedChannelException ( ) ) ;
+ if ( ! cf . isDone ( ) ) {
+ cf . se... | Should close the channel explicitly on connection attempt failure |
<nb> public class PackageManagerService extends IPackageManager . Stub {
COMMENT
COMMENT
private boolean isVerificationEnabled ( ) {
+ if ( ! DEFAULT_VERIFY_ENABLE ) {
+ return false ;
+ }
+
return android . provider . Settings . Global . getInt ( mContext . getContentResolver ( ) ,
- android . provid... | DEFAULT_VERIFY_ENABLE turns verification off |
<nb> public class LineChart extends View {
++ valueIndex ;
}
}
- break ;
+ return true ;
case MotionEvent . ACTION_UP :
SINGLE
if ( mSelectedValueIndex >= NUMBER0 ) {
<nb> public class LineChart extends View {
mSelectedValueIndex = Integer . MIN_VALUE ;
invalidate ( ) ;
}
- break ;
+ return ... | Refactored onTouch method |
<nb> public abstract class AbstractZipalignMojo extends AbstractAndroidMojo {
getLog ( ) . info ( STRING0 + command ) ;
getLog ( ) . info ( STRING1 + parameters ) ;
executor . executeCommand ( command , parameters ) ;
+
+ SINGLE
+ File target = new File ( project . getBasedir ( ) , project . getBuild ( ) . ... | Attach zipaligned artifact |
<nb> public class FrameBuffer implements Disposable {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class FrameBuffer implements Disposable {
throw new IllegalStateException ( STRING0 ) ;
if ( result == GL20 . GL_FRAMEBUFFER_UNSUPPORTED )
throw new IllegalStateE... | Fix compile error on GWT sorry |
<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 ;
COMMENT
<nb> import NAMESPACE ;
COMMENT
public clas... | Fixed unit test |
<nb> public class LegacyGlobalConfigurationAdapter {
;
for ( AdvancedExternalizerConfig externalizerConfig : legacy . getExternalizers ( ) ) {
- builder . serialization ( ) . addAdvancedExternalizer ( externalizerConfig . getAdvancedExternalizer ( ) ) ;
+ builder . serialization ( ) . addAdvancedExternalizer ... | When copying advancedexternalizer from the legacy configuration use the |
<nb> public abstract class PollingGraphUpdater implements GraphUpdater {
@ override
final public void run ( ) {
try {
- LOG . info ( STRING0 , this . getClass ( ) . getName ( ) , this . hashCode ( ) ) ;
+ LOG . info ( STRING1 , this ) ;
SINGLE
while ( true ) {
try { | improve polling graph updater logging |
<nb> public class PatternRuleHandler extends XMLRuleHandler {
regexStr = regexStr + STRING0 ;
COMMENT
}
+ if ( ruleAntiPatterns != null && ruleAntiPatterns . size ( ) > NUMBER0 ) {
+ throw new RuntimeException ( STRING1 + id ) ;
+ }
rule = new RegexPatternRule ( id , name , message . toString ( ) , sugges... | throw exception when regexp is used with antipattern as it s not supported yet |
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public class BackgroundExceptionEvent... | added TODO to BackgroundExceptionEvent |
<nb>
SINGLE
SINGLE
SINGLE
+ SINGLE
+
package NAMESPACE ;
import NAMESPACE ;
<nb> public class ScannerParam extends AbstractParam {
public static final int RPC_USERDEF = NUMBER0 < < NUMBER1 ;
SINGLE
- public static final int TARGET_INJECTABLE_DEFAULT = TARGET_QUERYSTRING | TARGET_POSTDATA | TAR... | Scan URL path elements turn off by default |
<nb> abstract class HashSlotArrayBase {
private void markAllUnassigned ( ) {
final long capacity = capacity ( ) ;
- mem . setMemory ( baseAddress , capacity * slotLength , ( byte ) NUMBER0 ) ;
- if ( unassignedSentinel == NUMBER0 ) {
- return ;
- }
final long addrOfFirstSentinel = baseAddress + offsetOf... | Optimize HashSlotArrayBase markAllUnassigned |
<nb> public final class OSSUnderFileSystem extends UnderFileSystem {
public void setConf ( Object conf ) {
}
- SINGLE
+ SINGLE
@ override
public void setOwner ( String path , String user , String group ) { }
- SINGLE
+ SINGLE
@ override
public void setMode ( String path , short mode ) throws IOE... | Update oss acl comments |
<nb> public class GLMTest extends TestUtil {
JsonObject glm = computeGLMlog ( lsms , va , true ) ; SINGLE
JsonObject jcoefs = glm . get ( STRING0 ) . getAsJsonObject ( ) ;
double icept = jcoefs . get ( STRING1 ) . getAsDouble ( ) ;
-
- assertCat ( jcoefs , icept , STRING2 , FLOAT0 ) ;
+ SINGLE
assertCat (... | added missing update of GLMTest which reflects the changed in GLM to ignore first level of categoricals |
<nb> public abstract class SSTable
return StringUtils . join ( parts , STRING0 ) ;
}
- protected String indexFilename ( )
+ public String indexFilename ( )
{
return indexFilename ( path ) ;
}
<nb> public abstract class SSTable
return StringUtils . join ( parts , STRING0 ) ;
}
- protected Strin... | forgot SSTable part of last |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
+ import static NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
public class GetCharacterDetailsTest {
<nb> public class GetCharacterDetailsTest {
@ test p... | Added interface test |
<nb> public class InputLauncher {
inputRegistry . add ( inputState ) ;
} else {
inputState = inputRegistry . getInputState ( input . getId ( ) ) ;
+ if ( inputState . getState ( ) == IOState . Type . RUNNING || inputState . getState ( ) == IOState . Type . STARTING )
+ return inputState ;
inputState . setSt... | Preventing starting running inputs to get started twice |
<nb> public class JavaFileHighlighter extends SyntaxHighlighterBase {
XmlTokenType . XML_EMPTY_ELEMENT_END ,
XmlTokenType . TAG_WHITE_SPACE ,
XmlTokenType . XML_TAG_NAME ,
+ XmlTokenType . XML_NAME ,
XmlTokenType . XML_ATTRIBUTE_VALUE_TOKEN ,
XmlTokenType . XML_ATTRIBUTE_VALUE_START_DELIMITER ,
XmlTokenTy... | Makes html attributes highlighter as markup in javadocs as well |
<nb> public class VcsLogPathsIndex extends VcsLogFullDetailsIndex < Integer > {
private static class ToLowerCaseStringDescriptor implements KeyDescriptor < String > {
@ override
public int getHashCode ( String value ) {
- return CaseInsensitiveStringHashingStrategy . INSTANCE . hashCode ( ) ;
+ return CaseIns... | vcs log fix hash code calculation |
<nb> import NAMESPACE
}
public void invoke ( @ notnull Project project , Editor editor , PsiFile psiFile ) throws IncorrectOperationException {
- SINGLE
final GrReferenceElement newPackageReference = GroovyElementFactory . getInstance ( myPackageDefinition . getProject ( ) ) . createPackegeReferenceElementFro... | wrap exception fixed |
<nb> public abstract class AbstractLuceneIndex implements Closeable
partitionsLock . lock ( ) ;
try
{
- for ( IndexPartition partition : getPartitions ( ) )
- {
- partition . maybeRefreshBlocking ( ) ;
- }
+ getPartitions ( ) . parallelStream ( ) . forEach ( this : : maybeRefreshPartition ) ;
+ }
+ ... | Switch partition update to be parallel |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PlatformAlarmService extends IntentService {
@ override
protected void onHandleIntent ( final Intent intent ) {
+ if ( intent == null ) {
+ Cat . i ( S... | Ignore null intents in PlatformAlarmService |
<nb> public class RedisDispatcher implements IRecordDispatcher {
public void record ( HashMap < String , String > message ) {
Long msgid = jedis . incr ( STRING0 ) ;
jedis . hmset ( STRING1 + SEPARATOR_CHAR + msgid , message ) ;
- jedis . lpush ( STRING2 + SEPARATOR_CHAR + this . meeting + SEPARATOR_CHAR + STRI... | do an RPUSH instead of an LPUSH |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Response {
public Response ( ) {
}
- public Response ( Request req ) {
- this . requestParameters = req . getParameters ( ) ;
- }
-
public Response (... | remove unused constructors |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- SINGLE
-
SINGLE
SINGLE
- SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
SINGLE
<nb> public class SourceNavigation extends JavaScriptObject
public final String toDebugString ( )
{
- return getPath ( ) != null ? getPath ( ) : getDo... | improve debug diagnostics for source nav history |
<nb> public class Constants {
public static final String FORM_USERNAME = STRING0 ;
SINGLE
- public static final String DEFAULT_KEYTAB = STRING1 ;
- public static final String DEFAULT_SPN_CLASS = STRING2 ;
public static final String KRB5_CONF_PROPERTY = STRING3 ;
public static final String DEFAULT_KRB5_CON... | Removed unused code |
<nb> public class PersistenceExtensions implements ManagedService {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
- static public HistoricItem parentState ( Item item ) {
+ static public HistoricItem previousState ( Item item ) {
if ( isDefaultServiceAvailable ( ) ) {
... | Renamed parentState to previousState |
<nb> public class BatchNode extends GeometryGroupNode implements Savable {
this . needsFullRebatch = needsFullRebatch ;
}
- public int getOffsetIndex ( Geometry batchedGeometry ) {
- return batchedGeometry . startIndex ;
- }
-
@ override
public Node clone ( boolean cloneMaterials ) {
BatchNode clone... | Fix issue where BatchNode clone would still re use the previous BatchNode s data structures |
<nb> public final class HlsMasterPlaylistParser implements ManifestParser < HlsMasterPl
String codecsString = HlsParserUtil . parseOptionalStringAttr ( line , CODECS_ATTR_REGEX ,
CODECS_ATTR ) ;
if ( codecsString != null ) {
- codecs = codecsString . split ( STRING0 ) ;
+ codecs = codecsString . split ( STRIN... | Trim whitespace from codecs |
<nb> public class HostConfig
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
protected boolean deployXML = false ;
<nb> public class HostConfig
SINGLE
if ( log . isInfoEnabled ( ) ) {
- log . info ( sm . getString ( STRING0 , file ) ) ;
+ log . info ( sm . getString ( STRING0 , file ,
+ co... | Improve log message when deploying from configBase to make it clearer where xml file is read from |
<nb> public class InfiniteInputIterator implements MutableObjectIterator < PactRecord >
@ override
public boolean next ( PactRecord target ) {
target . setField ( NUMBER0 , val1 ) ;
- target . setField ( NUMBER0 , val2 ) ;
+ target . setField ( NUMBER1 , val2 ) ;
return true ;
}
} | Fixed Test for DataSinkTask |
<nb> import NAMESPACE ;
COMMENT
public class PluginOptionSpecTest {
- @ test ( expected = IllegalArgumentException . class )
- public void optionalSensitiveTest ( ) {
- new PluginOptionSpec ( STRING0 , STRING1 , ValueType . STRING , false , true , null ) ;
- }
-
- @ test ( expected = IllegalArgumentEx... | Removing no longer valid tests |
<nb> public abstract class MavenTestCase extends UsefulTestCase {
getMavenGeneralSettings ( ) . setMavenHome ( home ) ;
}
- restoreSettingsFile ( ) ;
-
UIUtil . invokeAndWaitIfNeeded ( new Runnable ( ) {
@ override
public void run ( ) {
+ try {
+ restoreSettingsFile ( ) ;
+ }
+ catch ( IOExcepti... | read action in tests |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ; | Removed unused import |
<nb> public class ConsumeDataTest extends ZooKeeperTestSupport {
delay ( NUMBER0 ) ;
client . delete ( STRING0 ) ;
- mock . assertIsSatisfied ( NUMBER1 , TimeUnit . SECONDS ) ;
+ MockEndpoint . assertIsSatisfied ( NUMBER1 , TimeUnit . SECONDS ) ;
int lastVersion = - NUMBER2 ;
for ( int i = NUMBER3 ; i <... | Verifying my EGit settings |
<nb> public abstract class BaseActivity extends Activity {
@ override
protected void onPostExecute ( RootInfo homeRoot ) {
- if ( homeRoot != null && mHome != null ) {
+ if ( homeRoot != null && mHome != null && ! isDestroyed ( ) ) {
SINGLE
mState . onRootChanged ( homeRoot ) ;
mSearchManager . update (... | Check isDestroyed after finishing async HandleRootsChangedTask |
<nb> public class BackgroundPreinitializer
@ override
public void onApplicationEvent ( ApplicationStartedEvent event ) {
- ExecutorService executor = Executors . newSingleThreadExecutor ( ) ;
- submit ( executor , new MessageConverterInitializer ( ) ) ;
- submit ( executor , new MBeanFactoryInitializer ( ) ... | Perform initialization in foreground if BackgroundPreinitializer fails |
<nb> public class DefaultFileSystemChangeWaiterFactory implements FileSystemChangeWai
lock . lock ( ) ;
try {
long lastChangeAtValue = lastChangeAt . get ( ) ;
- while ( ! cancellationToken . isCancellationRequested ( ) && error . get ( ) == null && ( lastChangeAtValue == NUMBER0 || monotonicClockMillis ( ) - l... | Handle case where monotic clock isn t monotonic |
<nb> public class AndroidHarness extends Activity implements TouchListener , DialogInt
}
isGLThreadPaused = false ;
+
+ gainFocus ( ) ;
}
@ override
protected void onPause ( ) {
+ loseFocus ( ) ;
+
logger . info ( STRING0 ) ;
super . onPause ( ) ;
if ( view != null ) { | Add calls to loseFocus and gainFocus when activity pauses and resumes |
<nb> public class GithubShareAction extends DumbAwareAction {
final Project project = e . getData ( PlatformDataKeys . PROJECT ) ;
final VirtualFile file = e . getData ( PlatformDataKeys . VIRTUAL_FILE ) ;
- if ( project == null || project . isDisposed ( ) ) {
+ if ( project == null || project . isDisposed ( ... | add missing testGitExecutable |
<nb> class InterceptedInvocation implements Invocation , VerificationAwareInvocation {
@ override
public int hashCode ( ) {
+ SINGLE
return NUMBER0 ;
} | Added a TODO |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- interface Converter < Source extends Expr < ? > , Target extends Expr < ? > > {
+ interface Converter < S extends Expr < ? > , T extends Expr < ? > > {
Converter < EString , EString > toLowerCase = new Converter < EString , EString > ( ) {
@ override
<... | shortened type var names |
<nb> final class CdiCamelFactory {
return Class . class . cast ( type ) . getName ( ) ;
}
if ( type instanceof ParameterizedType ) {
- return Stream . of ( ( ( ParameterizedType ) type ) . getActualTypeArguments ( ) )
+ ParameterizedType pt = ( ParameterizedType ) type ;
+ return Stream . of ( pt . getActua... | Missing raw type in CDI parameterized event endpoint URI |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import... | reported the timeout in the exception |
<nb> public abstract class GrammaticalStructure extends TreeGraph {
basicGraph . add ( parent , t , GrammaticalRelation . DEPENDENT ) ;
}
}
- StackTraceElement [ ] trace = Thread . currentThread ( ) . getStackTrace ( ) ;
- if ( trace . length > NUMBER0 ) {
- System . err . println ( STRING0 + basicGraph ) ;... | commented diagnostic info |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class VolleyDraweeAdapter extends ImageListAdapter < InstrumentedDraweeView
GenericDraweeHierarchy gdh = new GenericDraweeHierarchy... | Remove Volley Drawee rounded corners |
<nb> public class TestStartTransactionDuringLogRotation
public void tearDown ( ) throws Exception
{
writerStopped . set ( true ) ;
- writerTaskFuture . get ( NUMBER0 , TimeUnit . SECONDS ) ;
+ writerTaskFuture . get ( NUMBER1 , TimeUnit . SECONDS ) ;
db . shutdown ( ) ;
executor . shutdown ( ) ;
} | Increased timeout for awaiting a write task in test |
<nb> public class SocketConnector implements Runnable {
boolean connected = false ;
Exception error = null ;
int configuredTimeoutMillis = connectionManager . getSocketConnectTimeoutSeconds ( ) * MILLIS_PER_SECOND ;
- int timeoutMillis = configuredTimeoutMillis > NUMBER0 && configuredTimeoutMillis < Integer . M... | Fixed checkstyle issue |
<nb> public class PlainTransportFuture < V extends TransportResponse > extends BaseFutur
} catch ( TimeoutException e ) {
throw new ElasticsearchTimeoutException ( e . getMessage ( ) ) ;
} catch ( InterruptedException e ) {
- Thread . currentThread ( ) . interrupt ( ) ;
throw new ElasticsearchIllegalStateExce... | PlainTransportFuture should not set currentThread |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public class OSQLFunctionSequence extends OSQLFunctionConfigurableAbstract {... | Throw exception on SELECT sequence seqName |
<nb> public class TextView extends View implements ViewTreeObserver . OnPreDrawListener
private boolean mSelectAllOnFocus = false ;
- private int mGravity = Gravity . TOP | Gravity . LEFT ;
+ private int mGravity = Gravity . TOP | Gravity . BEFORE ;
private boolean mHorizontallyScrolling ;
private int m... | Fix default TextView gravity |
<nb> public class VcsLogDataHolder implements Disposable {
logsToBuild . put ( root , refreshedLog . subList ( NUMBER0 , Math . min ( bottomIndex , refreshedLog . size ( ) ) ) ) ;
}
allRefs . addAll ( newRefs ) ;
- myLogData . setRefs ( root , newRefs ) ; SINGLE
- SINGLE
+
+ if ( myLogData != null ) {
+... | don t set new refs to the LogData until it is ready |
<nb> public class UnsupportedAbiVersionNotificationPanelProvider extends EditorNotifi
public EditorNotificationPanel createNotificationPanel ( @ notnull VirtualFile file , @ notnull FileEditor fileEditor ) {
try {
if ( DumbService . isDumb ( project ) ) return null ;
+ if ( ApplicationManager . getApplication (... | Don t cause tests to hang because of UnsupportedAbiVersion notification |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class CycledLeScanner {
SINGLE
long milliseconds = Long . MAX_VALUE ; SINGLE
AlarmManager alarmManager = ( AlarmManager ) mContext . getS... | fixing canceling alarm |
<nb> public class NotificationContentView extends FrameLayout {
}
public void reset ( ) {
+ if ( mContractedChild != null ) {
+ mContractedChild . animate ( ) . cancel ( ) ;
+ }
+ if ( mExpandedChild != null ) {
+ mExpandedChild . animate ( ) . cancel ( ) ;
+ }
removeAllViews ( ) ;
mContractedChil... | Fix crash when reset gets called during an animation |
<nb> public class PrettyCommentsPrinter extends JCTree . Visitor {
docComments = tree . docComments ;
printDocComment ( tree ) ;
if ( tree . pid != null ) {
+ consumeComments ( tree . pos ) ;
print ( STRING0 ) ;
printExpr ( tree . pid ) ;
print ( STRING1 ) ;
<nb>
+ COMMENT
+ Try out pretty comments ... | delombok would put copyright headers in between the package keyword and the actual package |
<nb> public abstract class TomcatBaseTest extends TestCase {
SINGLE
System . setProperty ( STRING0 ,
STRING1 ) ;
+ System . setProperty ( STRING2 , new File (
+ getBuildDirectory ( ) , STRING3 ) . toString ( ) ) ;
tempDir = new File ( System . getProperty ( STRING4 , STRING5 ) ) ;
if ( ! tempDir . exist... | When running the tests use log configuration specified by conf logging |
<nb> public class AsyncDataSetIterator implements DataSetIterator {
@ override
public List < String > getLabels ( ) {
- return null ;
+ return baseIterator . getLabels ( ) ;
}
@ override | Fix nullptr exception |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class SessionAttributeMarshallerFactoryImpl implements SessionAttributeMa
public SessionAttributeMarshaller createMarshaller ( LocalDistributableSess... | Use specific creators |
<nb> public class CacheConfigReadOnly < K , V > extends CacheConfig < K , V > {
}
@ override
+ public CacheConfig setWanReplicationRef ( final WanReplicationRef wanReplicationRef ) {
+ throw new UnsupportedOperationException ( STRING0 + getName ( ) ) ;
+ }
+
+ @ override
public NearCacheConfig getNear... | Handle WanReplicationRef in CacheConfigReadOnly |
<nb> public class GetDataMessage extends ListMessage {
public GetDataMessage ( NetworkParameters params ) {
super ( params ) ;
}
+
+ public void addTransaction ( Sha256Hash hash ) {
+ addItem ( new InventoryItem ( InventoryItem . Type . Transaction , hash ) ) ;
+ }
+
+ public void addBlock ( Sha256Has... | Add some convenience getters to a couple of classes |
<nb> public class AppCompatibility extends InstrumentationTestCase {
homeIntent . addFlags ( Intent . FLAG_ACTIVITY_NEW_TASK ) ;
Intent intent = mPackageManager . getLaunchIntentForPackage ( packageName ) ;
+ SINGLE
+ if ( intent == null ) {
+ return null ;
+ }
SINGLE
SINGLE | Skip apps without launch intent |
<nb> 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 NAMES... | Test Fixes Use Transactional because this class is dirtying database without removing its data |
<nb> public class OCommandExecutorSQLCreateLink extends OCommandExecutorSQLPermission
public Object execute ( final Map < Object , Object > iArgs ) {
if ( destField == null )
throw new OCommandExecutionException ( STRING0 ) ;
-
+
if ( ! ( database instanceof ODatabaseDocumentTx ) )
- throw new OCommandSQL... | changed message when db is not a document db |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class FilterGraphWithHiddenNodes implements LinearGraphWithHiddenNodes {
public List < Integer > getDownNodes ( int nodeIndex ) { ... | log Fix NOT_LOAD_COMMIT |
<nb> public class TestServlet extends HttpServlet {
out . println ( STRING0 ) ;
request . getSession ( ) . invalidate ( ) ;
out . println ( STRING1 ) ;
- out . println ( STRING2 ) ;
+ out . println ( STRING3 ) ;
out . println ( STRING4 ) ;
out . println ( STRING5 ) ;
} | Adding more descriptive output statement |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ @ ignore ( STRING0 )
public class RollingUpgradeIT
{
private TargetDirectory DIR = Tar... | Ignores RollingUpgradeIT temporarily to get some builds through |
<nb> public class BranchTicketService extends ITicketService implements RefsChangedLi
List < DirCacheEntry > list = new ArrayList < DirCacheEntry > ( ) ;
TreeWalk tw = null ;
try {
- tw = new TreeWalk ( db ) ;
ObjectId treeId = db . resolve ( BRANCH + STRING0 ) ;
+ if ( treeId == null ) {
+ SINGLE
+ ret... | Fix bug in migrating to BranchTicketService |
<nb> public abstract class TestBase
@ after
public void tearDown ( ) {
- mongo . close ( ) ;
dropDB ( ) ;
+ mongo . close ( ) ;
}
} | broke the build |
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ;
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT... | Adding missing header to Java files Jesus Camacho Rodriguez reviewed by Ashutosh Chauhan |
<nb> public abstract class ResultSetIterator < E > implements Iterator < E > , Closeable {
private final ResultSet rs ;
private final PreparedStatement stmt ;
- SINGLE
private boolean didNext = false ;
private boolean hasNext = false ; | Remove useless comment in ResultSetIterator |
<nb> public class MockitoStubber {
}
}
- public Object getResultFor ( Invocation invocation ) throws Throwable {
+ Object getResultFor ( Invocation invocation ) throws Throwable {
return findMatchFor ( invocation ) . answer ( invocation ) ;
} | made method default to slim the API |
<nb> public class GroovyShell extends GroovyObjectSupport {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class GroovyShell extends GroovyObjectSupport {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
private boolean is... | Allow junit framework TestCase to be run by groovy command |
<nb> public class Population implements Iterable < Individual > {
for ( Individual i : this . individuals ) {
Sample s = i . sample ;
long t = Long . MAX_VALUE ;
- double birdfly = DistanceLibrary . distance ( origin . getLat ( ) , origin . getLon ( ) , i . getLat ( ) , i . getLon ( ) ) ;
+ SINGLE
if ( s !=... | remove static distance call |
<nb> public class DnsDiscovery implements PeerDiscovery {
}
public InetSocketAddress [ ] getPeers ( long timeoutValue , TimeUnit timeoutUnit ) throws PeerDiscoveryException {
+ if ( hostNames == null )
+ throw new PeerDiscoveryException ( STRING0 ) ;
+
SINGLE
SINGLE
ExecutorService threadPool = Execut... | Handle null hostNames in DnsDiscovery some NP have that |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.