diff
stringlengths 99
1.25k
| msg_token
stringlengths 10
130
|
---|---|
<nb> public class Solo {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
<nb> class ViewFetcher {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT | Clarified javadoc for getButton in Solo and ViewFetcher |
<nb> public class IBeacon {
IBeacon iBeacon = new IBeacon ( ) ;
- iBeacon . major = ( ( int ) scanData [ NUMBER0 ] & NUMBER1 ) * NUMBER2 + scanData [ NUMBER3 ] ;
- iBeacon . minor = ( ( int ) scanData [ NUMBER4 ] & NUMBER1 ) * NUMBER2 + scanData [ NUMBER5 ] ;
+ iBeacon . major = ( scanData [ NUMBER0 ] & NUMBER1 ) * NUMBER2 + ( scanData [ NUMBER3 ] & NUMBER1 ) ;
+ iBeacon . minor = ( scanData [ NUMBER4 ] & NUMBER1 ) * NUMBER2 + ( scanData [ NUMBER5 ] & NUMBER1 ) ;
iBeacon . txPower = ( int ) scanData [ NUMBER6 ] ; SINGLE
iBeacon . rssi = rssi ; | fixed the major minor calculation |
<nb> public class PooledByteBufAllocator extends AbstractByteBufAllocator {
heapArenas = null ;
}
- if ( nHeapArena > NUMBER0 ) {
+ if ( nDirectArena > NUMBER0 ) {
directArenas = newArenaArray ( nDirectArena ) ;
for ( int i = NUMBER0 ; i < directArenas . length ; i ++ ) {
directArenas [ i ] = new PoolArena . DirectArena ( this , pageSize , maxOrder , pageShifts , chunkSize ) ; | Use correct value to disable enable direct arenas in PooledByteBufAllocator |
<nb> public class StatsCursorFragment extends SherlockFragment implements LoaderManag
}
private void reloadLinearLayout ( ) {
- if ( mLinearLayout == null || mAdapter == null )
+ if ( getActivity ( ) == null || mLinearLayout == null || mAdapter == null )
return ;
SINGLE
<nb> public class StatsCursorTreeFragment extends SherlockFragment implements LoaderM
}
private void reloadLinearLayout ( ) {
- if ( mLinearLayout == null || mAdapter == null )
+ if ( getActivity ( ) == null || mLinearLayout == null || mAdapter == null )
return ;
int groupCount = Math . min ( mAdapter . getGroupCount ( ) , StatsActivity . STATS_GROUP_MAX_ITEMS ) ; | Fixed NPEs in cursor fragments when detached from activity |
<nb> public final class ResourceManager {
}
}
+ COMMENT
java . util . Arrays . sort ( projects ) ;
for ( Project project : projects ) { | Add comment which describes need the sort method call |
<nb> public class EncoderEndpointTest {
+ base . getPath ( )
+ STRING0 ) ;
return container . connectToServer ( endpoint , uri ) ;
-
}
} | Removing an empty line |
<nb> public class SvnRepositoryConnector extends AbstractRepositoryConnector < SvnConne
}
- public boolean login ( String username , String password ) {
- checkLoggedIn ( ) ;
+ public boolean login ( String username , String password ) {
ISVNClientAdapter clientAdapter = getSvnClientAdapter ( ) ;
clientAdapter . setUsername ( username ) ;
<nb> public class SftpRepositoryConnector extends VfsConnector {
log . log ( Level . WARNING , STRING0 + getConfiguration ( ) . getHostname ( ) , e ) ;
return false ;
}
-
+ loggedIn = true ;
return true ;
} | allow the Svn and Sftp Connectors to perform login |
<nb> import NAMESPACE ;
@ jsonsubtypes ( value = {
@ jsonsubtypes.type ( value = BinomialDistribution . class , name = STRING0 ) ,
@ jsonsubtypes.type ( value = NormalDistribution . class , name = STRING1 ) ,
+ @ jsonsubtypes.type ( value = GaussianDistribution . class , name = STRING2 ) ,
@ jsonsubtypes.type ( value = UniformDistribution . class , name = STRING3 ) ,
} )
public abstract class Distribution implements Serializable , Cloneable {
<nb> import NAMESPACE ;
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
+ @ deprecated
public class GaussianDistribution extends Distribution {
private double mean , std ; | Add json subtype for gaussian conf distribution deprecate |
<nb> public class GenerateSourcesMojo extends AbstractAndroidMojo
}
return resourceFolders ;
}
- COMMENT
+
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class GenerateSourcesMojo extends AbstractAndroidMojo
return false ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
private boolean isBuildConfigPresent ( Artifact artifact ) throws MojoExecutionException
{
String depPackageName = extractPackageNameFromAndroidArtifact ( artifact ) ;
<nb> public class GenerateSourcesMojo extends AbstractAndroidMojo
return isBuildConfigPresent ( artifact , depPackageName ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
private boolean isBuildConfigPresent ( Artifact artifact , String packageName ) throws MojoExecutionException
{
try | Added javadoc for modified methods |
<nb> public class PGL {
gl . glClear ( GL . GL_COLOR_BUFFER_BIT | GL . GL_DEPTH_BUFFER_BIT |
GL . GL_STENCIL_BUFFER_BIT ) ;
firstFrame = false ;
+ drawable . swapBuffers ( ) ;
}
if ( capabilities . isFBO ( ) ) { | added buffer swap in Display to solve the garbage problem |
<nb> public class Theories extends JUnit4ClassRunner {
} . childBlock ( fTestMethod ) . evaluate ( ) ;
} catch ( AssumptionViolatedException e ) {
handleAssumptionViolation ( e ) ;
- } catch ( CouldNotGenerateValueException e ) {
- SINGLE
}
}
<nb> public class Theories extends JUnit4ClassRunner {
invokeWithActualParameters ( freshInstance , complete ) ;
} catch ( CouldNotGenerateValueException e ) {
SINGLE
- SINGLE
- SINGLE
}
}
} ; | Removed an unnecessary exception catch |
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
<nb> public abstract class AbstractCacheManager implements CacheManager , Initializing
public void afterPropertiesSet ( ) {
Collection < ? extends Cache > caches = loadCaches ( ) ;
- Assert . notEmpty ( caches , STRING0 ) ;
- this . cacheMap . clear ( ) ;
SINGLE
+ this . cacheMap . clear ( ) ;
+ this . cacheNames . clear ( ) ;
for ( Cache cache : caches ) {
this . cacheMap . put ( cache . getName ( ) , decorateCache ( cache ) ) ;
this . cacheNames . add ( cache . getName ( ) ) ; | AbstractCacheManager accepts no caches defined allowing for EHCache default cache setup |
<nb> public abstract class SeriesGuideExtension extends IntentService {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
protected abstract void onRequest ( int episodeIdentifier , Episode episode ) ; | Name the thing by its name |
<nb> public final class ChannelImpl implements Channel {
COMMENT
COMMENT
public synchronized ChannelImpl shutdown ( ) {
+ if ( shutdown ) {
+ return this ;
+ }
shutdown = true ;
if ( activeTransport != null ) {
activeTransport . stopAsync ( ) ; | Only run terminationRunnable once |
<nb> public class ResultSetViewer extends Viewer implements IDataSourceProvider , ISpr
public void setData ( List < Object [ ] > rows , boolean updateMetaData )
{
+ if ( spreadsheet . isDisposed ( ) ) {
+ return ;
+ }
SINGLE
this . closeEditors ( ) ;
<nb> class ConnectionPageFinal extends ActiveWizardPage < ConnectionWizard > {
void saveSettings ( DataSourceDescriptor dataSource )
{
+ if ( ! activated ) {
+ SINGLE
+ return ;
+ }
dataSource . setName ( connectionNameText . getText ( ) ) ;
dataSource . setSavePassword ( savePasswordCheck . getSelection ( ) ) ;
dataSource . setDefaultAutoCommit ( autocommit . getSelection ( ) , true ) ; | Connection settings save fix |
<nb> public abstract class SocketReader implements Runnable {
packet = new Message ( doc ) ;
}
catch ( IllegalArgumentException e ) {
+ Log . debug ( STRING0 , e ) ;
SINGLE
Message reply = new Message ( ) ;
reply . setID ( doc . attributeValue ( STRING1 ) ) ;
<nb> public abstract class SocketReader implements Runnable {
packet = new Presence ( doc ) ;
}
catch ( IllegalArgumentException e ) {
+ Log . debug ( STRING0 , e ) ;
SINGLE
Presence reply = new Presence ( ) ;
reply . setID ( doc . attributeValue ( STRING1 ) ) ;
<nb> public abstract class SocketReader implements Runnable {
packet = getIQ ( doc ) ;
}
catch ( IllegalArgumentException e ) {
+ Log . debug ( STRING0 , e ) ;
SINGLE
IQ reply = new IQ ( ) ;
if ( ! doc . elements ( ) . isEmpty ( ) ) { | Added logging when receiving a malformed JID |
<nb>
- package NAMESPACE ;
+ package NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT | Move test to test folder where it belongs |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
- public class ChooseRepositoryActivity extends ActionBarActivity {
+ public class ChooseRepositoryActivity extends AppCompatActivity {
private static final String TAG = ChooseRepositoryActivity . class . getSimpleName ( ) ;
@ override
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
- public class MainActivity extends ActionBarActivity {
+ public class MainActivity extends AppCompatActivity {
private static final String TAG = MainActivity . class . getSimpleName ( ) ;
@ inject | Removing deprecated class |
<nb> public class HttpHeaders extends HashMap < String , String > {
@ override
public Set < Map . Entry < String , String > > entrySet ( ) {
- return super . entrySet ( ) ;
+ throw new UnsupportedOperationException ( ) ;
}
@ override | Removed use of HttpHeaders entrySet |
<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Improve GDK Reference File eachLine and File eachFile |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ @ suppresswarnings ( STRING0 )
public class LaunchConfigBuilder {
private final File baseDir ;
<nb> public class LaunchConfigBuilder {
private static class BlockingThreadFactory implements ThreadFactory {
private final ThreadGroup threadGroup = new ThreadGroup ( STRING1 ) ;
- private int i = NUMBER0 ;
+ private int i ;
@ override
public Thread newThread ( Runnable r ) { | Fix checkstyle problem |
<nb> public class FS20Binding extends AbstractActiveBinding < FS20BindingProvider >
}
public void activate ( ) {
- if ( StringUtils . isEmpty ( deviceName ) ) {
- logger . error ( STRING0 ) ;
- return ;
- }
logger . debug ( STRING1 ) ;
- getCULHandler ( ) ;
}
private void setNewDeviceName ( String deviceName ) { | Cleaned up unnecessary error messages |
<nb> public class BenchmarkSuite
this . outputDirectory = checkNotNull ( outputDirectory , STRING0 ) ;
}
- private File createOutputFile ( String fileName )
+ private static File createOutputFile ( String fileName )
throws IOException
{
File outputFile = new File ( fileName ) ; | Fix intellij warning |
<nb> public class SpotLight extends Light {
protected float spotInnerAngle = FastMath . QUARTER_PI / NUMBER0 ;
protected float spotOuterAngle = FastMath . QUARTER_PI / NUMBER1 ;
protected float spotRange = NUMBER2 ;
- protected float invSpotRange = NUMBER3 / NUMBER2 ;
+ protected float invSpotRange = FLOAT0 / NUMBER2 ;
protected float packedAngleCos = NUMBER4 ;
protected float outerAngleCosSqr , outerAngleSinSqr ; | Fixed SpotLight default inititalisation for invSpotRange |
<nb> public final class Main implements ActionListener {
}
- class PlainTextFilter extends FileFilter {
+ static class PlainTextFilter extends FileFilter {
public boolean accept ( final File f ) {
if ( f . getName ( ) . toLowerCase ( ) . endsWith ( STRING0 ) ) | making inner class static |
<nb> public class ByteBufferBackedChannelBuffer extends AbstractChannelBuffer {
int readBytes = NUMBER0 ;
- if ( ! buffer . isReadOnly ( ) && buffer . hasArray ( ) ) {
+ if ( buffer . hasArray ( ) ) {
index += buffer . arrayOffset ( ) ;
do {
int localReadBytes = in . read ( buffer . array ( ) , index , length ) ;
<nb> public class ChannelBuffers {
if ( ! buffer . hasRemaining ( ) ) {
return EMPTY_BUFFER ;
}
- if ( ! buffer . isReadOnly ( ) && buffer . hasArray ( ) ) {
+ if ( buffer . hasArray ( ) ) {
return wrappedBuffer ( buffer . order ( ) , buffer . array ( ) , buffer . arrayOffset ( ) , buffer . remaining ( ) ) ;
} else {
return new ByteBufferBackedChannelBuffer ( buffer ) ; | Removed redundant conditional |
<nb> public class CUnitPlugin implements Plugin < Project > {
testSuites . create ( suiteName , CUnitTestSuiteSpec . class , new Action < CUnitTestSuiteSpec > ( ) {
@ override
public void execute ( CUnitTestSuiteSpec testSuite ) {
- DefaultCUnitTestSuiteSpec cunitTestSuite = ( DefaultCUnitTestSuiteSpec ) testSuite ;
- cunitTestSuite . setTestedComponent ( component ) ;
+ testSuite . setTestedComponent ( component ) ;
}
} ) ;
}
}
-
+
@ componenttype
- public void registerCUnitTestSuiteSpecType ( ComponentTypeBuilder < CUnitTestSuiteSpec > builder ) {
+ public void registerCUnitTestSuiteSpecType ( ComponentTypeBuilder < CUnitTestSuiteSpec > builder ) {
builder . defaultImplementation ( DefaultCUnitTestSuiteSpec . class ) ;
} | Remove unnecessary casts of CUnitTestSuiteSpec in CUnitPlugin |
<nb> public abstract class JSON implements JSONStreamAware , JSONAware {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
public static void writeJSONString ( Object object , Writer writer , SerializerFeature . . . features ) {
writeJSONString ( object , writer , JSON . DEFAULT_GENERATE_FEATURE , features ) ; | fixed javadoc error |
<nb> public class PythonScriptEngineService extends AbstractComponent implements Scri
}
@ override public String [ ] types ( ) {
- return new String [ ] { STRING0 } ;
+ return new String [ ] { STRING0 , STRING1 } ;
}
@ override public String [ ] extensions ( ) { | add py as lang |
<nb> public class CachedClass {
}
public int getSuperClassDistance ( ) {
- synchronized ( getTheClass ( ) ) {
- if ( distance == - NUMBER0 ) {
- int distance = NUMBER1 ;
- for ( Class klazz = getTheClass ( ) ; klazz != null ; klazz = klazz . getSuperclass ( ) ) {
- distance ++ ;
- }
- this . distance = distance ;
- }
- return distance ;
+ if ( distance >= NUMBER1 ) return distance ;
+
+ int distance = NUMBER1 ;
+ for ( Class klazz = getTheClass ( ) ; klazz != null ; klazz = klazz . getSuperclass ( ) ) {
+ distance ++ ;
}
+ this . distance = distance ;
+ return distance ;
}
public int hashCode ( ) { | remove unneeded synchronization |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
-
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CppCompletionManager implements CompletionManager
initFilter_ = initFilter ;
completionContext_ = completionContext ;
rCompletionManager_ = rCompletionManager ;
- snippets_ = new SnippetHelper ( ( AceEditor ) docDisplay ) ;
docDisplay_ . addClickHandler ( new ClickHandler ( )
{
public void onClick ( ClickEvent event )
<nb> public class CppCompletionManager implements CompletionManager
private FileTypeRegistry fileTypeRegistry_ ;
private final DocDisplay docDisplay_ ;
private final CppCompletionContext completionContext_ ;
- private final SnippetHelper snippets_ ;
private CppCompletionRequest request_ ;
private final InitCompletionFilter initFilter_ ;
private final CompletionManager rCompletionManager_ ; | remove some unused code |
<nb> public class JavaSourceProcessorTest extends BaseSourceProcessorTestCase {
STRING0 , STRING0 , STRING0 , STRING0 ,
STRING0 , STRING0 , STRING0 , STRING0 ,
STRING0 , STRING0 , STRING0 , STRING0 ,
- STRING0 , STRING0 , STRING0
+ STRING0 , STRING0
} ,
new Integer [ ] {
- NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , NUMBER5 , NUMBER6 , NUMBER7 , NUMBER8 , NUMBER8 , NUMBER9 , NUMBER10 , NUMBER11 , NUMBER12 , NUMBER13
+ NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , NUMBER5 , NUMBER6 , NUMBER7 , NUMBER8 , NUMBER9 , NUMBER10 , NUMBER11 , NUMBER12 , NUMBER13
} ) ;
} | Fix broken test |
<nb> public abstract class LanguagePerFileMappings < T > implements PersistentStateCompo
}
@ nullable
- public T getImmediateMapping ( final VirtualFile file ) {
+ public T getImmediateMapping ( @ nullable final VirtualFile file ) {
synchronized ( myMappings ) {
return myMappings . get ( file ) ;
} | getImmediateMapping method accepts null |
<nb> import NAMESPACE ;
COMMENT
COMMENT
- public abstract class CuratorDiscoveryConfig
+ public class CuratorDiscoveryConfig
{
@ jsonproperty
private String path = null ; | Switch CuratorDiscoveryConfig to not be an abstract class cause Jackson cannot instantiate them |
<nb> public class TransportShardMultiPercolateAction extends TransportShardSingleOper
try {
responseItem . response = percolatorService . percolate ( item . request ) ;
} catch ( Throwable e ) {
- logger . trace ( STRING0 , e , request . index ( ) , request . shardId ( ) ) ;
+ logger . debug ( STRING0 , e , request . index ( ) , request . shardId ( ) ) ;
if ( TransportActions . isShardNotAvailableException ( e ) ) {
throw new ElasticSearchException ( STRING1 , e ) ;
} else { | Logging shard level multi percolate errors under debug rather than trace |
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
import static NAMESPACE ;
COMMENT
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
import static NAMESPACE ;
@ test
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
import static NAMESPACE ;
COMMENT | Removing usage of deprecated Mockito annotation |
<nb> public abstract class ComponentManagerImpl extends UserDataHolderBase implements
private int myComponentConfigCount ;
@ suppresswarnings ( STRING0 )
private int myInstantiatedComponentCount = - NUMBER0 ;
+ private boolean myComponentsCreated ;
private final List < BaseComponent > myBaseComponents = new ArrayList < BaseComponent > ( ) ;
<nb> public abstract class ComponentManagerImpl extends UserDataHolderBase implements
indicator . setIndeterminate ( false ) ;
}
createComponents ( indicator ) ;
+ myComponentsCreated = true ;
}
protected void setProgressDuringInit ( @ notnull ProgressIndicator indicator ) {
<nb> public abstract class ComponentManagerImpl extends UserDataHolderBase implements
}
public final boolean isComponentsCreated ( ) {
- return myComponentConfigCount != - NUMBER0 ;
+ return myComponentsCreated ;
}
protected synchronized final void disposeComponents ( ) { | correct components created flag |
<nb> public class EnglishGrammaticalRelations {
STRING0 ,
STRING1 ,
STRING2 , SINGLE
+ SINGLE
+ STRING3
} ) ;
public static class NounCompoundModifierGRAnnotation extends GrammaticalRelationAnnotation { }
<nb> public class EnglishGrammaticalRelations {
SINGLE
SINGLE
STRING4 ,
- STRING5
+ SINGLE
+ SINGLE
+ STRING6
} ) ;
public static class AppositionalModifierGRAnnotation extends GrammaticalRelationAnnotation { } | Split the her daughter jordan tregex into pieces with and without NNP |
<nb> public class ImpermanentGraphDatabase extends EmbeddedGraphDatabase
private static boolean TRACK_UNCLOSED_DATABASE_INSTANCES = false ;
private static final Map < File , Exception > startedButNotYetClosed = new ConcurrentHashMap < File , Exception > ( ) ;
- static final String PATH = STRING0 ;
+ static final String PATH = STRING1 ;
COMMENT
COMMENT | Fixed default path to be under target |
<nb> public class SdkConfigurationUtil {
VirtualFile suggestedDir = suggestedPath == null
? null
: LocalFileSystem . getInstance ( ) . findFileByPath ( FileUtil . toSystemIndependentName ( suggestedPath ) ) ;
- FileChooser . chooseFiles ( descriptor , project , suggestedDir , new Consumer < List < VirtualFile > > ( ) {
+ FileChooser . chooseFiles ( descriptor , project , suggestedDir , new FileChooser . FileChooserConsumer ( ) {
@ override
public void consume ( List < VirtualFile > selectedFiles ) {
for ( SdkType sdkType : sdkTypes ) {
<nb> public class SdkConfigurationUtil {
}
onSdkCreatedCallBack . consume ( null ) ;
}
+
+ @ override
+ public void cancelled ( ) {
+ onSdkCreatedCallBack . consume ( null ) ;
+ }
} ) ;
} | allow reacting on cancel when creating sdk |
<nb> public final class Constants {
public static final String MESOS_RESOURCE_DISK = STRING0 ;
public static final String MESOS_RESOURCE_PORTS = STRING1 ;
- public static final long SECOND_NANO = NUMBER0 ;
+ public static final long SECOND_NANO = NUMBER1 ;
public static final int SECOND_MS = NUMBER2 ;
public static final int MINUTE_MS = SECOND_MS * NUMBER3 ;
public static final int HOUR_MS = MINUTE_MS * NUMBER3 ; | Add L to long constant |
<nb> public class IpnbFileEditor extends UserDataHolderBase implements FileEditor {
new CellSelectionListener ( ) {
@ override
public void selectionChanged ( @ notnull IpnbPanel ipnbPanel , boolean byMouse ) {
- if ( myCellTypeCombo == null || byMouse ) return ;
+ if ( myCellTypeCombo == null ) return ;
updateCellTypeCombo ( ipnbPanel ) ;
+ if ( byMouse ) return ;
updateScrollPosition ( ipnbPanel ) ;
}
} ) ; | Changing style works only after closing the editor |
<nb>
package NAMESPACE ;
- import NAMESPACE ;
-
import NAMESPACE ;
import NAMESPACE ; | Remove import that was accidentally added |
<nb> public final class PrintSpoolerService extends Service {
final int printJobCount = mPrintJobs . size ( ) ;
for ( int i = NUMBER0 ; i < printJobCount ; i ++ ) {
PrintJobInfo printJob = mPrintJobs . get ( i ) ;
- if ( isActiveState ( printJob . getState ( ) )
+ if ( isActiveState ( printJob . getState ( ) ) && printJob . getPrinterId ( ) != null
&& printJob . getPrinterId ( ) . getServiceName ( ) . equals ( service ) ) {
return true ;
} | Add missing null pointer check in PrintSpoolerService |
<nb> public class TelephonyManager {
COMMENT
COMMENT
COMMENT
- public static final boolean EMERGENCY_ASSISTANCE_ENABLED = false ;
+ public static final boolean EMERGENCY_ASSISTANCE_ENABLED = true ;
COMMENT
COMMENT | Flip EMERGENCY_ASSISTANCE_ENABLED to true |
<nb> public class IndicesQueryCacheTests extends ElasticsearchIntegrationTest {
SINGLE
final SearchResponse r1 = client ( ) . prepareSearch ( STRING0 ) . setSize ( NUMBER0 ) . setSearchType ( SearchType . QUERY_THEN_FETCH )
. addAggregation ( dateHistogram ( STRING1 ) . field ( STRING2 ) . timeZone ( STRING3 ) . minDocCount ( NUMBER0 ) . interval ( DateHistogramInterval . MONTH ) ) . get ( ) ;
- assertSearchResponse ( r1 ) ; System . out . println ( r1 ) ;
+ assertSearchResponse ( r1 ) ;
SINGLE
assertThat ( client ( ) . admin ( ) . indices ( ) . prepareStats ( STRING0 ) . setQueryCache ( true ) . get ( ) . getTotal ( ) . getQueryCache ( ) . getMemorySizeInBytes ( ) , greaterThan ( NUMBER0 l ) ) ; | Remove leftover println |
<nb> abstract class JsonObject {
COMMENT
COMMENT
COMMENT
+ @ suppresswarnings ( STRING0 )
public < T > T get ( String name , Class < T > clazz ) {
Object value = parameters . get ( name ) ;
try { | Revert Remove unneded supressWarning annotation |
<nb> public class SampleFactory implements SampleSource {
public SampleFactory ( Graph graph ) {
this . graph = graph ;
- this . setSearchRadiusM ( NUMBER0 ) ;
+ this . setSearchRadiusM ( NUMBER1 ) ;
}
private Graph graph ; | increase sample linking distance so things are not left unlinked now that we look for nodes not edges |
<nb> final class TransactionImpl implements Transaction , TransactionSupport {
futures . add ( f ) ;
}
}
- waitWithDeadline ( futures , timeoutMillis , TimeUnit . MILLISECONDS , FutureUtil . RETHROW_EVERYTHING ) ;
+ waitWithDeadline ( futures , timeoutMillis , TimeUnit . MILLISECONDS , FutureUtil . RETHROW_TRANSACTION_EXCEPTION ) ;
futures . clear ( ) ;
} | add missing transaction exception handler |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public abstract class AbstractMvcPsiNodeDescriptor extends AbstractPsiBasedNode < PsiElement > {
+ public abstract class AbstractMvcPsiNodeDescriptor extends BasePsiNode < PsiElement > {
public static final int FOLDER = NUMBER0 ;
public static final int FILE = NUMBER1 ;
public static final int CLASS = NUMBER2 ;
<nb> public abstract class AbstractMvcPsiNodeDescriptor extends AbstractPsiBasedNode <
return super . contains ( file ) ;
}
- @ override
- @ nullable
- protected PsiElement extractPsiFromValue ( ) {
- return getValue ( ) ;
- }
-
@ nullable
@ override
public String toTestString ( @ nullable Queryable . PrintInfo printInfo ) { | make AbstractMvcPsiNodeDescriptor extend BasePsiNode |
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ; | Added license header |
<nb> public abstract class DebuggerUtilsEx extends DebuggerUtils {
DebugProcessImpl process ) {
PsiClass containingClass = psiMethod . getContainingClass ( ) ;
try {
- return containingClass != null && Objects . equals ( containingClass . getQualifiedName ( ) , className ) &&
+ return containingClass != null && Objects . equals ( JVMNameUtil . getClassVMName ( containingClass ) , className ) &&
JVMNameUtil . getJVMMethodName ( psiMethod ) . equals ( name ) &&
JVMNameUtil . getJVMSignature ( psiMethod ) . getName ( process ) . equals ( signature ) ;
} | fixed incorrect smart targets for inner classes |
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> class LazyEntryView < K , V > implements EntryView < K , V > {
}
public V getValue ( ) {
- if ( validMergePolicyForValueNullCheck ( mergePolicy ) ) {
+ if ( returnRawData ( mergePolicy ) ) {
return value ;
}
value = serializationService . toObject ( value ) ;
return value ;
}
- private boolean validMergePolicyForValueNullCheck ( MapMergePolicy mergePolicy ) {
+ private boolean returnRawData ( MapMergePolicy mergePolicy ) {
return mergePolicy instanceof PutIfAbsentMapMergePolicy
- || mergePolicy instanceof PassThroughMergePolicy ;
+ || mergePolicy instanceof PassThroughMergePolicy
+ || mergePolicy instanceof HigherHitsMapMergePolicy
+ || mergePolicy instanceof LatestUpdateMapMergePolicy ;
}
public void setValue ( V value ) { | updated method name to returnRawData |
<nb> public interface PsiComment extends PsiElement {
COMMENT
COMMENT
IElementType getTokenType ( ) ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ interface BlockFormatting { }
}
<nb> abstract class CodeStyleManagerRunnable < T > {
protected abstract T doPerform ( int offset , TextRange range ) ;
private static boolean isInsidePlainComment ( int offset , @ nullable PsiElement element ) {
- if ( ! ( element instanceof PsiComment ) || ! element . getTextRange ( ) . contains ( offset ) ) {
+ if ( ! ( element instanceof PsiComment ) || element instanceof PsiComment . BlockFormatting || ! element . getTextRange ( ) . contains ( offset ) ) {
return false ;
} | block comments indentation review CR OC Anton |
<nb> public class MockLibraryUtil {
@ notnull
private static Class < ? > getCompilerClass ( ) throws MalformedURLException , ClassNotFoundException {
-
if ( compilerClass == null ) {
File kotlinCompilerJar = new File ( PathUtil . getKotlinPathsForDistDirectory ( ) . getLibPath ( ) , STRING0 ) ;
- URLClassLoader classLoader = new URLClassLoader ( new URL [ ] { kotlinCompilerJar . toURI ( ) . toURL ( ) } , Object . class . getClassLoader ( ) ) ;
+ File kotlinRuntimeJar = new File ( PathUtil . getKotlinPathsForDistDirectory ( ) . getLibPath ( ) , STRING1 ) ;
+ URLClassLoader classLoader = new URLClassLoader ( new URL [ ] { kotlinCompilerJar . toURI ( ) . toURL ( ) , kotlinRuntimeJar . toURI ( ) . toURL ( ) } ,
+ Object . class . getClassLoader ( ) ) ;
compilerClass = classLoader . loadClass ( K2JVMCompiler . class . getName ( ) ) ;
} | Add kotlin runtime jar to the class loader when invoking compiler |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PydevConsoleCommunication extends AbstractConsoleCommunication impl
return execRequestInput ( ) ;
}
else {
- throw new NotImplementedException ( ) ;
+ throw new UnsupportedOperationException ( ) ;
}
} | don t use Sun internal class |
<nb> import NAMESPACE ;
COMMENT
SINGLE
SINGLE
- public final class Downloads implements BaseColumns {
+ public final class Downloads {
private Downloads ( ) { }
COMMENT | Remove the BaseColumns inheritance |
<nb> public class OHazelcastDistributedDatabase implements ODistributedDatabase {
final IQueue queue = entry . getValue ( ) ;
if ( queue != null ) {
- System . out . println ( String . format ( STRING0 , getLocalNodeName ( ) , entry . getKey ( ) , queue . size ( ) ) ) ;
-
if ( queueMaxSize > NUMBER0 && queue . size ( ) > queueMaxSize ) {
ODistributedServerLog . warn ( this , getLocalNodeName ( ) , iNodes . toString ( ) , DIRECTION . OUT ,
STRING1 , queue . size ( ) ) ; | Removed debug msg |
<nb> public class RxTest extends RandomData {
final List < Person > people = new ArrayList < > ( ) ;
data . select ( Person . class ) . limit ( NUMBER0 ) . get ( )
. toObservable ( )
- . observeOn ( Schedulers . newThread ( ) )
- . subscribeOn ( Schedulers . immediate ( ) )
. subscribe ( new Action1 < Person > ( ) {
@ override
public void call ( Person person ) { | adjust test for intermittent failure |
<nb> import NAMESPACE ;
import static NAMESPACE ;
- public final class AssignmentWithType extends Expression implements WithKey {
+ public final class AssignmentWithType extends Expression implements WithKey {
private final String type ;
private final String key ;
private final String value ;
<nb>
package NAMESPACE ;
- public class ExternalAssignment extends Expression implements WithKey {
+ public final class ExternalAssignment extends Expression implements WithKey {
private final String key ;
private final Object oldValue ;
private final Object newValue ; | use different expression type for external assignments |
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class OrthographicCamera {
COMMENT
COMMENT
public float getScreenToWorldX ( float screenX ) {
+ screenX = screenX / Gdx . graphics . getWidth ( ) * viewportWidth ;
return ( screenX * scale ) - ( viewportWidth * scale ) / NUMBER0 + position . x ;
}
<nb> public final class OrthographicCamera {
COMMENT
COMMENT
public float getScreenToWorldY ( float screenY ) {
+ screenY = screenY / Gdx . graphics . getHeight ( ) * viewportHeight ;
return ( ( viewportHeight - screenY - NUMBER1 ) * scale )
- ( viewportHeight * scale ) / NUMBER0 + position . y ;
} | fix getScreenToWorldX and getScreenToWorldY return wrong translation if screensize |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
<nb> public class AttachmentProcessorFactoryTests extends ESTestCase {
factory . create ( config ) ;
fail ( STRING0 ) ;
} catch ( ElasticsearchParseException e ) {
- assertThat ( e . getMessage ( ) , equalTo ( STRING1 +
- STRING2 ) ) ;
+ assertThat ( e . getMessage ( ) , containsString ( STRING3 ) ) ;
+ SINGLE
+ for ( AttachmentProcessor . Field field : AttachmentProcessor . Field . values ( ) ) {
+ assertThat ( e . getMessage ( ) , containsString ( field . name ( ) ) ) ;
+ }
}
config = new HashMap < > ( ) ; | Fix AttachmentProcessorFactoryTests to only check for existing fields |
<nb> public class Accounts extends K9ListActivity implements OnItemClickListener {
new String [ ] { STRING0 , STRING1 } ,
new String [ ] { STRING2 , STRING3 } ,
new String [ ] { STRING4 , STRING5 } ,
- new String [ ] { STRING6 , STRING7 }
+ new String [ ] { STRING6 , STRING7 } ,
+ new String [ ] { STRING8 , STRING9 }
} ;
private void onAbout ( ) { | Add ckChangeLog to about dialog |
<nb> public class DefaultRecordStore implements RecordStore {
SINGLE
Collection < Object > keysObject = new ArrayList < Object > ( keysToDelete . size ( ) ) ;
for ( Data key : keysToDelete ) {
- SINGLE
- removeIndex ( key ) ;
keysObject . add ( mapService . toObject ( key ) ) ;
}
<nb> public class DefaultRecordStore implements RecordStore {
toBeRemovedKeys . removeAll ( keysToDelete ) ;
}
+ for ( Data key : keysToDelete ) {
+ SINGLE
+ removeIndex ( key ) ;
+ }
+
clearRecordsMap ( lockedRecords ) ;
cancelAssociatedSchedulers ( keysToDelete ) ;
resetAccessSequenceNumber ( ) ; | Fixed index removal |
<nb> public class DBTCPConnector implements DBConnector {
boolean secondaryOk = ! ( readPref == ReadPreference . primary ( ) ) ;
_checkClosed ( ) ;
- if ( ! secondaryOk )
+ SINGLE
+ if ( ! secondaryOk || getReplicaSetStatus ( ) == null )
checkMaster ( false , ! secondaryOk ) ;
final MyPort mp = _myPort . get ( ) ; | Fixing a regression introduced in the previous commit for this issue |
<nb> public class FileSystemUtils {
}
}
- private static ByteSource asByteSource ( final Path path ) {
+ COMMENT
+ COMMENT
+ COMMENT
+ public static ByteSource asByteSource ( final Path path ) {
return new ByteSource ( ) {
@ override public InputStream openStream ( ) throws IOException {
return path . getInputStream ( ) ; | Expose the asByteSource method in FileSystemUtils |
<nb> public class EnglishTaggerTest extends TestCase {
}
public void testTagger ( ) throws IOException {
- myAssert ( STRING0 , STRING1 ) ;
- myAssert ( STRING2 , STRING3 ) ;
- myAssert ( STRING4 , STRING5 ) ;
+ myAssert ( STRING0 , STRING6 ) ;
+ myAssert ( STRING2 , STRING7 ) ;
+ myAssert ( STRING4 , STRING8 ) ;
myAssert ( STRING9 , STRING10 ) ;
myAssert ( STRING11 , STRING12 ) ;
myAssert ( STRING13 , STRING14 ) ; | changed test for new dictionary |
<nb> class ShowTOCAction extends FBAndroidAction {
}
static boolean isTOCAvailable ( FBReaderApp reader ) {
- return
- reader != null &&
- reader . Model != null &&
- reader . Model . TOCTree != null &&
- reader . Model . TOCTree . hasChildren ( ) ;
+ if ( reader == null ) {
+ return false ;
+ }
+ final BookModel model = reader . Model ;
+ return model != null && model . TOCTree . hasChildren ( ) ;
}
@ override | fixed possible NPE |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
-
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PersistenceInjectionTests extends AbstractEntityManagerFactoryBeanT
public static class DefaultVendorSpecificPrivatePersistenceContextField {
@ persistencecontext
- private HibernateEntityManager em ;
+ @ suppresswarnings ( STRING0 )
+ private org . hibernate . ejb . HibernateEntityManager em ;
}
<nb> public class PersistenceInjectionTests extends AbstractEntityManagerFactoryBeanT
throw new IllegalStateException ( ) ;
}
}
+
} | Suppress deprecation warning in PersistenceInjectionTests |
<nb> public class ReaderPostDetailFragment extends Fragment
showToolbar ( true ) ;
showFooter ( true ) ;
}
+
+ trackRelatedPostsIfShowing ( ) ;
}
private void showToolbar ( boolean show ) { | Returned missing call to trackRelatedPostsIfShowing |
<nb> public abstract class BaseCrashReportDialog extends Activity {
if ( ACRA . DEV_LOGGING ) ACRA . log . d ( LOG_TAG , STRING0 ) ;
cancelReports ( ) ;
finish ( ) ;
- } else if ( ( sConfig instanceof ACRAConfiguration ) && ( sReportFile instanceof File ) && ( sException instanceof Throwable ) ) {
+ } else if ( ( sConfig instanceof ACRAConfiguration ) && ( sReportFile instanceof File ) && ( ( sException instanceof Throwable ) || sException == null ) ) {
config = ( ACRAConfiguration ) sConfig ;
reportFile = ( File ) sReportFile ;
exception = ( Throwable ) sException ; | allow null exception in dialog |
<nb> public class NetworkController extends BroadcastReceiver {
combinedActivityIconId = mMobileActivityIconId ;
combinedSignalIconId = mDataSignalIconId ; SINGLE
mContentDescriptionCombinedSignal = mContentDescriptionDataType ;
+ } else {
+ mobileLabel = mHasMobileDataFeature ?
+ context . getString ( R . string . status_bar_settings_signal_meter_disconnected ) : STRING0 ;
}
if ( mWifiConnected ) { | Always show appropriate mobile service label |
<nb> public final class TvInputManager {
mPendingEvents . removeAt ( index ) ;
if ( timeout ) {
- Log . w ( TAG , STRING0
+ Log . w ( TAG , STRING1
+ INPUT_SESSION_NOT_RESPONDING_TIMEOUT + STRING2 + mToken ) ;
} else {
mHandler . removeMessages ( InputEventHandler . MSG_TIMEOUT_INPUT_EVENT , p ) ; | Fix a typo |
<nb> public class AmbrosePigProgressNotificationListener implements PigProgressNotifi
return ;
}
+ mapReduceHelper . addMapReduceJobState ( job , pigConfig . getJobClient ( ) ) ;
addCompletedJobStats ( node . getJob ( ) , stats ) ;
AmbroseUtils . pushEvent ( statsWriteService , scriptId , new Event . JobFailedEvent ( node ) ) ;
}
<nb> public class AmbrosePigProgressNotificationListener implements PigProgressNotifi
return ;
}
+ mapReduceHelper . addMapReduceJobState ( job , pigConfig . getJobClient ( ) ) ;
addCompletedJobStats ( node . getJob ( ) , stats ) ;
AmbroseUtils . pushEvent ( statsWriteService , scriptId , new Event . JobFinishedEvent ( node ) ) ;
} | update mapreduce state even on completion and failure for pig |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ @ checkreturnvalue
@ gwtcompatible
public final class Collections2 {
private Collections2 ( ) { }
<nb> public final class Collections2 {
COMMENT
SINGLE
SINGLE
- @ checkreturnvalue
public static < E > Collection < E > filter (
Collection < E > unfiltered , Predicate < ? super E > predicate ) {
if ( unfiltered instanceof FilteredCollection ) {
<nb> public final class Collections2 {
COMMENT
COMMENT
COMMENT
- @ checkreturnvalue
public static < F , T > Collection < T > transform ( Collection < F > fromCollection ,
Function < ? super F , T > function ) {
return new TransformedCollection < F , T > ( fromCollection , function ) ; | Add CheckReturnValue to Collections2 |
<nb> public class LocalZooKeeperCluster
private final PortPolicy serverSecondPortPolicy ;
private final Collection < ZooKeeperServerWrapper > wrappers =
new ArrayList < ZooKeeperServerWrapper > ( ) ;
+ private Collection < String > serversConfig ;
public LocalZooKeeperCluster ( int size , DataDirectoryPolicy dataDirectoryPolicy ,
PortPolicy clientPortPolicy , PortPolicy serverFirstPortPolicy ,
<nb> public class LocalZooKeeperCluster
servers . add ( STRING0 + serverFirstPortPolicy . getPort ( id ) + STRING1 +
serverSecondPortPolicy . getPort ( id ) ) ;
}
+ this . serversConfig = servers ;
for ( int i = NUMBER0 ; i < size ; i ++ )
{
<nb> public class LocalZooKeeperCluster
waitForClusterToBeFullyStarted ( ) ;
}
+ public Collection < String > getZooKeeperServersConfig ( )
+ {
+ return serversConfig ;
+ }
+
private void waitForClusterToBeFullyStarted ( )
{
try | Added a method for getting the zoo keeper servers config |
<nb> public class HTTP {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ static public void sendHttpPutRequest ( String url ) {
+ HttpUtil . executeUrl ( STRING0 , url , NUMBER0 ) ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class HTTP {
HttpUtil . executeUrl ( STRING1 , url , NUMBER0 ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ static public void sendHttpDeleteRequest ( String url ) {
+ HttpUtil . executeUrl ( STRING2 , url , NUMBER0 ) ;
+ }
+
} | added missing http operations put delete |
<nb> public abstract class BinaryMemcacheDecoder < M extends BinaryMemcacheMessage < H > ,
return ;
}
- currentKey = readBytes ( ctx . alloc ( ) , in , keyLength ) . toString ( CharsetUtil . UTF_8 ) ;
+ currentKey = in . toString ( in . readerIndex ( ) , keyLength , CharsetUtil . UTF_8 ) ;
+ in . skipBytes ( keyLength ) ;
}
out . add ( buildMessage ( currentHeader , currentExtras , currentKey ) ) ; | Fix a buffer leak in BinaryMemcacheDecoder |
<nb> public class RecentsActivity extends Activity implements RecentsView . RecentsView
@ override
public void onBackPressed ( ) {
+ SINGLE
+ if ( mConfig . debugModeEnabled ) return ;
+
SINGLE
if ( mFullScreenOverlayView == null ||
! mFullScreenOverlayView . cancelAnimateOnEnterRecents ( mFinishRunnable ) ) { | Adding back behavior test |
<nb> public class RecyclerViewDragDropManager {
COMMENT
COMMENT
COMMENT
- public boolean getInitiateOnLongPress ( ) {
+ public boolean isInitiateOnLongPressEnabled ( ) {
return mInitiateOnLongPress ;
}
<nb> public class RecyclerViewDragDropManager {
COMMENT
COMMENT
COMMENT
- public boolean getInitiateOnMove ( ) {
+ public boolean isInitiateOnMoveEnabled ( ) {
return mInitiateOnMove ;
} | Rename some RecyclerViewDragDropManager methods |
<nb> public class TreeViewer extends JComponent {
@ notnull
protected static JDialog showInDialog ( final TreeViewer viewer ) {
final JDialog dialog = new JDialog ( ) ;
+ dialog . setTitle ( STRING0 ) ;
SINGLE
final Container mainPane = new JPanel ( new BorderLayout ( NUMBER0 , NUMBER0 ) ) ; | Add a default title to the TreeViewer dialog |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class GroovyCoreEnvironment {
CoreApplicationEnvironment . registerExtensionPoint ( Extensions . getRootArea ( ) , ReadWriteAccessDetector . EP_NAME , ReadWriteAccessDetector . class ) ;
appEnvironment . addExtension ( ReadWriteAccessDetector . EP_NAME , new GroovyReadWriteAccessDetector ( ) ) ;
+ if ( GroovyElementTypes . ADDITIVE_EXPRESSION == null ) throw new IllegalStateException ( ) ; SINGLE
}
protected ExternalResourceManagerEx createExternalResourceManager ( ) { | initialize and register stub serializers |
<nb> public class InjectionsSettingsUI implements Configurable {
private List < BaseInjection > getSelectedInjections ( ) {
final ArrayList < BaseInjection > toRemove = new ArrayList < BaseInjection > ( ) ;
for ( int row : myInjectionsTable . getSelectedRows ( ) ) {
- toRemove . add ( myInjectionsTable . getItems ( ) . get ( row ) ) ;
+ toRemove . add ( myInjectionsTable . getItems ( ) . get ( myInjectionsTable . convertRowIndexToModel ( row ) ) ) ;
}
return toRemove ;
}
<nb> public class InjectionsSettingsUI implements Configurable {
@ nullable
private BaseInjection getSelectedInjection ( ) {
final int row = myInjectionsTable . getSelectedRow ( ) ;
- return row < NUMBER0 ? null : myInjectionsTable . getItems ( ) . get ( row ) ;
+ return row < NUMBER0 ? null : myInjectionsTable . getItems ( ) . get ( myInjectionsTable . convertRowIndexToModel ( row ) ) ;
}
private void performAdd ( final AnActionEvent e ) { | clicking on entry opens wrong detail editor |
<nb> public class LocalNotification extends CordovaPlugin {
}
COMMENT
+ COMMENT
+ COMMENT
+ @ override
+ public void onDestroy ( ) {
+ deviceready = false ;
+ isInBackground = true ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT | Set device as not ready onDestroy |
<nb> public class WorkspaceAndProjectGenerator {
}
private void addTestNodeAndDependencies (
- TargetNode < ? > testBundleBuildTarget ,
+ TargetNode < ? > testBundleTargetNode ,
ImmutableSet . Builder < TargetNode < ? > > recursiveTestTargetNodesBuilder ,
ImmutableSet . Builder < TargetNode < ? > > orderedTestBundleTargetNodesBuilder ) {
Iterable < TargetNode < ? > > testBundleTargetDependencies =
AppleBuildRules . getRecursiveTargetNodeDependenciesOfTypes (
projectGraph ,
AppleBuildRules . RecursiveDependenciesMode . BUILDING ,
- projectGraph . get ( testBundleBuildTarget . getBuildTarget ( ) ) ,
+ testBundleTargetNode ,
Optional . < ImmutableSet < BuildRuleType > > absent ( ) ) ;
recursiveTestTargetNodesBuilder . addAll ( testBundleTargetDependencies ) ;
- recursiveTestTargetNodesBuilder . add ( testBundleBuildTarget ) ;
- orderedTestBundleTargetNodesBuilder . add ( testBundleBuildTarget ) ;
+ recursiveTestTargetNodesBuilder . add ( testBundleTargetNode ) ;
+ orderedTestBundleTargetNodesBuilder . add ( testBundleTargetNode ) ;
}
} | Remove an unnecessary target graph node lookup |
<nb>
package NAMESPACE ;
import NAMESPACE ;
+
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ShadowValueAnimator extends ShadowAnimator {
@ resetter
public static void reset ( ) {
ValueAnimator . clearAllAnimations ( ) ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ ReflectionHelpers . setStaticField ( ValueAnimator . class , STRING0 , new ThreadLocal < > ( ) ) ;
}
} | Fix test pollution in ShadowValueAnimator |
<nb> public class OCommandExecutorSQLLiveSelect extends OCommandExecutorSQLSelect imp
}
private boolean matchesFilters ( OIdentifiable value ) {
- return true ; SINGLE
+ if ( this . compiledFilter == null || this . compiledFilter . getRootCondition ( ) == null ) {
+ return true ;
+ }
+ if ( ! ( value instanceof ODocument ) ) {
+ value = value . getRecord ( ) ;
+ }
+ return ! ( Boolean . FALSE . equals ( compiledFilter . evaluate ( ( ODocument ) value , ( ODocument ) value , getContext ( ) ) ) ) ;
}
private boolean matchesTarget ( OIdentifiable value ) { | finished filter implementation on live query |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
COMMENT
public class GroovyClassFinder implements ProjectComponent , PsiElementFinder {
private Project myProject ;
- private Map < GroovyFile , GrJavaFile > myJavaFiles = new HashMap < GroovyFile , GrJavaFile > ( ) ;
+ private Map < GroovyFile , GrJavaFile > myJavaFiles = new WeakHashMap < GroovyFile , GrJavaFile > ( ) ;
private GroovyClassFinder . MyVFSListener myVfsListener ;
public GroovyClassFinder ( Project project ) { | need weak map |
<nb> public class DiagnosticGroups {
CheckSuspiciousCode . SUSPICIOUS_SEMICOLON ,
CheckSuspiciousCode . SUSPICIOUS_COMPARISON_WITH_NAN ,
CheckSuspiciousCode . SUSPICIOUS_IN_OPERATOR ,
- CheckSuspiciousCode . SUSPICIOUS_INSTANCEOF_LEFT_OPERAND ) ;
+ CheckSuspiciousCode . SUSPICIOUS_INSTANCEOF_LEFT_OPERAND ,
+ TypeCheck . DETERMINISTIC_TEST ) ;
public static final DiagnosticGroup DEPRECATED_ANNOTATIONS =
DiagnosticGroups . registerGroup ( STRING0 , | Add TypeCheck DETERMINISTIC_TEST check to suspiciousCode group |
<nb> public class StickyListHeadersListView extends FrameLayout {
private int getHeaderOverlap ( int position ) {
boolean isStartOfSection = isStartOfSection ( position ) ;
if ( ! isStartOfSection ) {
- View header = mAdapter . getHeaderView ( position , null , mList ) ;
- header . setLayoutParams ( new ViewGroup . LayoutParams (
- LayoutParams . MATCH_PARENT , LayoutParams . WRAP_CONTENT ) ) ;
+ View header = mAdapter . getView ( position , null , mList ) ;
final int width = getWidth ( ) ;
final int parentWidthMeasureSpec = MeasureSpec . makeMeasureSpec ( | Revert Fixes NPE in smoothScrollToPosition methods |
<nb> public class NotesAdapter extends RecyclerView . Adapter < NotesAdapter . NoteViewHold
}
public void replaceNote ( Note newNote ) {
- int position = getPositionForNoteUnfiltered ( newNote . getId ( ) ) ;
- mNotes . set ( position , newNote ) ;
+ if ( newNote != null ) {
+ int position = getPositionForNoteUnfiltered ( newNote . getId ( ) ) ;
+ mNotes . set ( position , newNote ) ;
+ }
}
private boolean isValidPosition ( int position ) { | added null check within method |
<nb> public class FlexibleDateConverterTest {
assertTrue ( c . convert ( STRING0 ) . toString ( ) . startsWith ( STRING1 ) ) ;
assertTrue ( c . convert ( STRING2 ) . toString ( ) . startsWith ( STRING3 ) ) ;
assertTrue ( c . convert ( STRING4 ) . toString ( ) . startsWith ( STRING5 ) ) ;
+ assertTrue ( c . convert ( STRING6 ) . toString ( ) . startsWith ( STRING7 ) ) ;
}
} | add another flexdate testcase from an actual cisco router messages |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public class RussianPartialPosTagFilter extends PartialPosTagFilter { | ru remove experimental comment |
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+
package NAMESPACE ;
import NAMESPACE ; | added missing license header |
<nb> import NAMESPACE ;
@ retention ( RetentionPolicy . RUNTIME )
@ target ( { ElementType . TYPE , ElementType . METHOD } )
public @ interface Bombed {
- int year ( ) default NUMBER0 ;
+ int year ( ) default NUMBER1 ;
@ jdkconstants.calendarmonth int month ( ) ;
int day ( ) ;
int time ( ) default NUMBER2 ; | Advance Bombed tests default year value |
<nb> class TypeCollector {
return ;
}
type = getElementType ( type ) ;
- if ( allTypes . containsKey ( type . getKey ( ) ) || type . isPrimitive ( ) ) {
+ if ( allTypes . containsKey ( type . getKey ( ) ) || type . isPrimitive ( ) || type . isRawType ( ) ) {
return ;
}
if ( hasNestedWildcard ( type ) ) {
<nb> public class CycleFinderTest extends TestCase {
assertNoCycles ( ) ;
}
+ public void testIgnoreRawTypes ( ) throws Exception {
+ addSourceFile ( STRING0 , STRING1 ) ;
+ addSourceFile ( STRING2 , STRING3 ) ;
+ findCycles ( ) ;
+ assertNoCycles ( ) ;
+ }
+
private void assertContains ( String substr , String str ) {
assertTrue ( STRING4 + substr + STRING5 + str + STRING6 , str . contains ( substr ) ) ;
} | Ignore raw types in the cycle finder |
<nb> public class CompileUnit {
STRING0 ;
}
} else {
- txt += STRING1 + nodeSource . getName ( ) + STRING2 + storedSource . getName ( ) + STRING3 + node . getName ( ) + STRING4 ;
+ txt += STRING1 + nodeSource . getName ( ) + STRING2 + storedSource . getName ( ) + STRING5 + node . getName ( ) + STRING4 ;
}
nodeSource . getErrorCollector ( ) . addErrorAndContinue (
new SyntaxErrorMessage ( new SyntaxException ( txt , node . getLineNumber ( ) , node . getColumnNumber ( ) , node . getLastLineNumber ( ) , node . getLastColumnNumber ( ) ) , nodeSource ) | Revert Revert Improve the grammar of a compiler error message |
<nb> public interface TreeTransformer {
COMMENT
COMMENT
COMMENT
- public Tree transformTree ( Tree t ) ;
+ Tree transformTree ( Tree t ) ;
}
<nb> package NAMESPACE ;
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public interface TreeVisitor {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- public void visitTree ( Tree t ) ;
+ void visitTree ( Tree t ) ;
} | Don t need public on interface methods |
<nb> public class WalletTool {
SINGLE
SINGLE
peers . broadcastTransaction ( t ) . get ( ) ;
+ if ( peers . getMinBroadcastConnections ( ) == NUMBER0 ) {
+ SINGLE
+ SINGLE
+ Thread . sleep ( NUMBER1 ) ;
+ }
System . out . println ( t . getHashAsString ( ) ) ;
} catch ( BlockStoreException e ) {
throw new RuntimeException ( e ) ; | Add crap WalletTool hack to work around issue with Netty |
<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 , getString ( R . string . msg_limit , ActivityShare . cSubmitLimit + NUMBER0 ) ) ;
setResult ( NUMBER0 , intent ) ;
finish ( ) ;
} | Fix another submit limit |