diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> import NAMESPACE ;
COMMENT
COMMENT
- COMMENT
- Note: Additions to this interface will not be considered to break binary compatibility .
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Api Docs clarify the connection between MongoCollection and the CodecRegistry
|
<nb> public class GuidedActionsStylist implements FragmentAnimationProvider {
COMMENT
COMMENT
public void onUpdateExpandedViewHolder ( ViewHolder avh ) {
+
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
if ( avh == null ) {
mExpandedAction = null ;
+ mActionsGridView . setPruneChild ( true ) ;
} else if ( avh . getAction ( ) != mExpandedAction ) {
mExpandedAction = avh . getAction ( ) ;
+ mActionsGridView . setPruneChild ( false ) ;
}
SINGLE
SINGLE
|
Fixed issue with GuidedStepFragment actions
|
<nb> public class Allocation extends BaseObj {
throw new RSRuntimeException ( STRING0 ) ;
}
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ @ override
+ public void destroy ( ) {
+ if ( ( mUsage & USAGE_IO_OUTPUT ) != NUMBER0 ) {
+ setSurface ( null ) ;
+ }
+ super . destroy ( ) ;
+ }
}
|
Renderscript make Allocation destroy include setSurface null for
|
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix docs in ServletInitializer
|
<nb> public class CompressionStrategyTest
random . nextBytes ( originalData ) ;
}
- @ before
- public void setup ( )
- {
- SINGLE
- }
-
@ test
public void testBasicOperations ( )
{
|
Removed empty function from CompressionStrategyTest
|
<nb> public class TwirlCompiler implements Compiler < TwirlCompileSpec > , Serializable {
return function ;
}
- private File asRelativeTo ( File root , File file ) {
- String path = file . getAbsolutePath ( ) . replace ( root . getAbsolutePath ( ) , STRING0 + root . getName ( ) ) ;
- return new File ( path ) ;
- }
-
public WorkResult execute ( TwirlCompileSpec spec ) {
boolean didWork = false ;
|
Removed unused method
|
<nb> public class JavaNetTest extends TestBase {
@ test
public void testListenOnWildcardPort ( ) throws Exception {
- startTest ( getMethodName ( ) , false ) ;
+ startTest ( getMethodName ( ) ) ;
}
@ test
|
fixed broken test
|
<nb> public class ReflectionUtils {
Class srr = Class . forName ( STRING0 ) ;
meth = srr . getMethod ( STRING1 , Integer . TYPE ) ;
} catch ( Throwable t ) {
- t . printStackTrace ( System . out ) ;
meth = null ;
}
magicMethod = meth ;
|
remove system out
|
<nb> public class FMLRelauncher
private Class < ? super Object > setupNewClientHome ( File minecraftHome )
{
Class < ? super Object > client = ReflectionHelper . getClass ( classLoader , STRING0 ) ;
- ReflectionHelper . setPrivateValue ( client , null , minecraftHome , STRING1 , STRING2 , STRING3 ) ;
+ ReflectionHelper . setPrivateValue ( client , null , minecraftHome ,
+ STRING4 + STRING5 COMMENT ,
+ STRING2 , STRING3 ) ;
return client ;
}
|
Fixed srg name of minecraftDir for runtime deobf
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class MockProject extends MockComponentManager implements Project {
public MockProject ( PicoContainer parent , @ notnull Disposable parentDisposable ) {
super ( parent , parentDisposable ) ;
Extensions . instantiateArea ( STRING0 , this , null ) ;
+ Disposer . register ( parentDisposable , new Disposable ( ) {
+ @ override
+ public void dispose ( ) {
+ Extensions . disposeArea ( MockProject . this ) ;
+ }
+ } ) ;
}
@ override
|
dispose extensions area for MockProject
|
<nb> public class SearchViewCompat {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fixing a comment in SearchViewCompat
|
<nb> public enum NetworkRegistry
channels . put ( Side . SERVER , Maps . < String , FMLEmbeddedChannel > newConcurrentMap ( ) ) ;
}
- public class TargetPoint {
+ public static class TargetPoint {
public TargetPoint ( int dimension , double x , double y , double z , double range )
{
this . x = x ;
|
Fix TargetPoint to be static
|
<nb> public class RegExTransformationServiceTest extends AbstractTransformationServic
}
@ test
+ public void testTransformByRegex_noGroup ( ) throws TransformationException {
+
+ SINGLE
+ String transformedResponse = processor . transform ( STRING0 , source ) ;
+
+ SINGLE
+ Assert . assertEquals ( STRING1 , transformedResponse ) ;
+ }
+
+ @ test
public void testTransformByRegex_moreThanOneGroup ( ) throws TransformationException {
SINGLE
<nb> public class RegExTransformationServiceTest extends AbstractTransformationServic
Assert . assertEquals ( STRING2 , transformedResponse ) ;
}
-
}
<nb> public class RegExTransformationService implements TransformationService {
String result = STRING1 ;
while ( matcher . find ( ) ) {
+
+ if ( matcher . groupCount ( ) == NUMBER0 ) {
+ logger . info ( STRING3 , regExpression ) ;
+ continue ;
+ }
+
result = matcher . group ( NUMBER1 ) ;
+
if ( matcher . groupCount ( ) > NUMBER1 ) {
logger . debug ( STRING4 , regExpression ) ;
}
|
improved logging when no regex group is contained in the regexp
|
<nb> public interface RemoteBlockReader extends Closeable {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
ByteBuffer readRemoteBlock ( String host , int port , long blockId , long offset ,
|
improve Javadoc in RemoteBlockReader
|
<nb> public class BuildView {
filterTestsByTargets ( configuredTargets , Sets . newHashSet ( testsToRun ) ) ) ;
}
- skyframeExecutor . injectTopLevelContext ( topLevelOptions ) ;
-
Set < Artifact > artifactsToBuild = new HashSet < > ( ) ;
Set < ConfiguredTarget > parallelTests = new HashSet < > ( ) ;
Set < ConfiguredTarget > exclusiveTests = new HashSet < > ( ) ;
<nb> public class BuildTool {
SINGLE
if ( needsExecutionPhase ( request . getBuildOptions ( ) ) ) {
+ runtime . getSkyframeExecutor ( ) . injectTopLevelContext ( request . getTopLevelArtifactContext ( ) ) ;
executionTool . executeBuild ( request . getId ( ) , analysisResult , result ,
runtime . getSkyframeExecutor ( ) , configurations ,
mergePackageRoots ( loadingResult . getPackageRoots ( ) ,
|
Defer injection of top level context until we are just about to do the execution phase
|
<nb> public abstract class AbstractDuration implements ReadableDuration , Serializable
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
public final Instant addTo ( ReadableInstant instant , int scalar ) {
+ if ( instant == null ) {
+ return new Instant ( addTo ( DateTimeUtils . currentTimeMillis ( ) , scalar ) ) ;
+ }
return new Instant ( addTo ( instant . getMillis ( ) , scalar ) ) ;
}
<nb> public abstract class AbstractDuration implements ReadableDuration , Serializable
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
public final void addInto ( ReadWritableInstant instant , int scalar ) {
+ if ( instant == null ) {
+ throw new IllegalArgumentException ( STRING0 ) ;
+ }
instant . setMillis ( addTo ( instant . getMillis ( ) , scalar ) ) ;
}
|
Fix null handling from testing
|
<nb> public class MediaPlayerInvokeTest extends ActivityInstrumentationTestCase2 < Medi
}
SINGLE
+ @ suppress
@ mediumtest
public void testPing ( ) throws Exception {
mPlayer . setDataSource ( STRING0 ) ;
|
Suppress the testPing as we moved the release test target to the userdebug
|
<nb> public class KryoValuesDeserializer {
public List < Object > deserialize ( byte [ ] ser ) throws IOException {
return deserializeFrom ( new ByteArrayInputStream ( ser ) ) ;
}
+
+ public Object deserializeObject ( byte [ ] ser ) throws IOException {
+ return _kryo . readClassAndObject ( new ByteArrayInputStream ( ser ) ) ;
+ }
}
<nb> public class KryoValuesSerializer {
serializeInto ( values , out ) ;
return out . toByteArray ( ) ;
}
+
+ public byte [ ] serializeObject ( Object obj ) {
+ ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ;
+ _kryo . writeClassAndObject ( out , obj ) ;
+ return out . toByteArray ( ) ;
+ }
}
|
add methods for serializing individual objects
|
<nb> public class Expr2Test extends TestUtil {
checkStr ( STRING0 , STRING1 ) ;
checkStr ( STRING2 ) ;
checkStr ( STRING3 ) ;
- checkStr ( STRING4 , FLOAT0 ) ; SINGLE
+ checkStr ( STRING4 , FLOAT1 ) ; SINGLE
SINGLE
checkStr ( STRING5 , NUMBER0 ) ;
|
Missed test bits
|
<nb> public class InterleavedBidirectionalHeuristic implements RemainingWeightHeurist
q . insert ( stopState . getVertex ( ) , stopState . getWeight ( ) ) ;
}
LOG . info ( STRING0 , System . currentTimeMillis ( ) ) ;
- SINGLE
+ SINGLE
SINGLE
SINGLE
options . setMaxWalkDistance ( Double . POSITIVE_INFINITY ) ;
+ options . setMaxPreTransitTime ( Integer . MAX_VALUE ) ;
LOG . debug ( STRING1 ) ;
s . getOptions ( ) . rctx . debugOutput . finishedPrecalculating ( ) ;
}
|
Set maxPreTransitTime to max after initialization
|
<nb> public class Gossiper implements IFailureDetectionEventListener
int oldVersion = localState . getHeartBeatState ( ) . getHeartBeatVersion ( ) ;
Map < ApplicationState , VersionedValue > localAppStateMap = localState . getApplicationStateMap ( ) ;
- localState . setHeartBeatState ( remoteHbState ) ;
+ localState . setHeartBeatState ( remoteState . getHeartBeatState ( ) ) ;
if ( logger . isTraceEnabled ( ) )
- logger . trace ( STRING0 + remoteHbState . getGeneration ( ) + STRING1 + localHbState . getGeneration ( ) + STRING2 + addr ) ;
+ logger . trace ( STRING3 + localState . getHeartBeatState ( ) . getHeartBeatVersion ( ) + STRING1 + oldVersion + STRING2 + addr + STRING4 ) ;
for ( Entry < ApplicationState , VersionedValue > remoteEntry : remoteState . getApplicationStateMap ( ) . entrySet ( ) )
{
|
Fix more merge breakage
|
<nb> public class ZooKeeperBroker implements Broker
int masterId = zooClient . getMaster ( ) ;
if ( masterId == machineId )
{
- throw new RuntimeException ( STRING0 ) ;
+ throw new ZooKeeperException ( STRING1 ,
+ new Exception ( ) ) ;
+ SINGLE
}
return getAndCacheMaster ( masterId ) ;
}
|
Throws a better exception in getMaster
|
<nb> public class MorphButton extends ImageButton implements View . OnClickListener {
} catch ( Resources . NotFoundException e ) {
try {
- d = VectorDrawable . create ( c . getResources ( ) , resId ) ;
+ d = VectorDrawable . getDrawable ( c , resId ) ;
} catch ( IllegalArgumentException e1 ) {
SINGLE
try {
- d = AnimatedVectorDrawable . create ( c , c . getResources ( ) , resId ) ;
+ d = AnimatedVectorDrawable . getDrawable ( c , resId ) ;
} catch ( IllegalArgumentException e2 ) {
SINGLE
throw e ;
|
use new getDrawable methods
|
<nb> public class TestWebSocket extends TomcatBaseTest {
private static final long serialVersionUID = NUMBER0 ;
@ override
- protected StreamHandler createWebSocketInbound ( String subProtocol ,
+ protected StreamHandler createWebSocketHandler ( String subProtocol ,
HttpServletRequest request ) {
return new Bug53339WsInbound ( ) ;
}
|
Fix compilation error in unit test
|
<nb> public class BluetoothInstrumentation extends Instrumentation {
unpairAll ( ) ;
} else if ( STRING0 . equals ( command ) ) {
getName ( ) ;
+ } else if ( STRING1 . equals ( command ) ) {
+ getAddress ( ) ;
} else {
finish ( null ) ;
}
<nb> public class BluetoothInstrumentation extends Instrumentation {
finish ( mSuccessResult ) ;
}
+ public void getAddress ( ) {
+ String name = getBluetoothAdapter ( ) . getAddress ( ) ;
+ mSuccessResult . putString ( STRING2 , name ) ;
+ finish ( mSuccessResult ) ;
+ }
+
public void finish ( Bundle result ) {
if ( result == null ) {
result = new Bundle ( ) ;
|
add getAddress function to return BT mac
|
<nb> public class StatementFinalizer extends AbstractCreateStatementInterceptor {
@ override
public Object createStatement ( Object proxy , Method method , Object [ ] args , Object statement , long time ) {
- SINGLE
try {
if ( statement instanceof Statement )
statements . add ( new WeakReference < > ( ( Statement ) statement ) ) ;
|
Remove stray obsolete comment
|
<nb> public abstract class RealmBaseAdapter < T extends RealmObject > extends BaseAdapte
protected LayoutInflater inflater ;
protected RealmResults < T > realmResults ;
protected Context context ;
- protected int resId ;
public RealmBaseAdapter ( Context context , RealmResults < T > realmResults , boolean automaticUpdate ) {
if ( context == null ) {
|
Remove the resId field
|
<nb> public class CachingSoftWrapDataMapper implements SoftWrapDataMapper , SoftWrapAw
if ( ! myBeforeChangeState . valid ) {
return ;
}
- int endIndex = myCache . size ( ) - NUMBER0 ; SINGLE
- SINGLE
+ int endIndex = Math . max ( NUMBER1 , myCache . size ( ) - NUMBER0 ) ; SINGLE
+ SINGLE
+ SINGLE
myAfterChangeState . updateByCacheIndices ( myBeforeChangeState . startCacheEntryIndex , endIndex ) ;
myCache . subList ( myAfterChangeState . endCacheEntryIndex + NUMBER2 , myCache . size ( ) ) . clear ( ) ;
myCache . addAll ( myNotAffectedByUpdateTailCacheEntries ) ;
|
Improve soft wraps performance
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TestLengthConstrainedPathFinder extends TestCase {
provider . setPath ( file ) ;
loader . setProvider ( provider ) ;
loader . buildGraph ( gg , extra ) ;
- gg . save ( new File ( STRING0 ) ) ;
+ SINGLE
Vertex v1 = gg . getVertex ( STRING1 ) ;
Vertex v2 = gg . getVertex ( STRING2 ) ;
<nb> public class TestLengthConstrainedPathFinder extends TestCase {
}
}
- finder = new LengthConstrainedPathFinder ( startEdge , endEdge , NUMBER0 , NUMBER1 , true ) ;
+ finder = new LengthConstrainedPathFinder ( startEdge , endEdge , NUMBER2 , NUMBER1 , true ) ;
solutions = finder . solveDepthFirst ( ) ;
System . out . println ( solutions . size ( ) ) ;
|
speed up test do not save graph file by default
|
<nb> public class RtpStreamReceiver {
try {
rtpSocket . receive ( rtpPacket ) ;
packetReceivedCounter ++ ;
- if ( shouldHandlePacket ( rtpPacket ) ) {
+ SINGLE
processRtpPacket ( rtpPacket ) ;
- } else {
- log . debug ( STRING0 + rtpPacket . getSeqNum ( ) + STRING1 + lastSequenceNumber
- + STRING2 + rtpPacket . getTimestamp ( ) + STRING3 + lastPacketTimestamp + STRING4 + rtpSocket . getDatagramSocket ( ) . getLocalPort ( ) + STRING5 ) ;
- if ( lastPacketDropped ) successivePacketDroppedCount ++ ;
- else lastPacketDropped = true ;
-
- }
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
} catch ( IOException e ) { SINGLE
receivePackets = false ;
}
|
just process received rtp packet without trying to figure out the sequence number to drop
|
<nb> public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp
}
private void runGlobalTools ( @ notnull final AnalysisScope scope , @ notnull final InspectionManager inspectionManager , @ notnull List < Tools > globalTools ) {
- LOG . assertTrue ( ! ApplicationManager . getApplication ( ) . isReadAccessAllowed ( ) , STRING0 ) ;
+ LOG . assertTrue ( ! ApplicationManager . getApplication ( ) . isReadAccessAllowed ( ) || ApplicationManager . getApplication ( ) . isHeadlessEnvironment ( ) , STRING0 ) ;
final List < InspectionToolWrapper > needRepeatSearchRequest = new ArrayList < InspectionToolWrapper > ( ) ;
final boolean canBeExternalUsages = scope . getScopeType ( ) != AnalysisScope . PROJECT ;
|
accept long read actions in headless mode
|
<nb> import NAMESPACE ;
public abstract class OperationCallbackBase < CallbackOperationResult , CallbackOperationException extends Exception > {
- protected final Logger logger = LoggerFactory . getLogger ( OperationCallbackBase . class ) ;
+ private final Logger logger = LoggerFactory . getLogger ( OperationCallbackBase . class ) ;
private final GlobalLocker locker ;
private final PluginDispatcher < OperationResult > paymentPluginDispatcher ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
SINGLE
public abstract class PaymentOperation extends OperationCallbackBase < PaymentTransactionInfoPlugin , PaymentPluginApiException > implements OperationCallback {
+ private final Logger logger = LoggerFactory . getLogger ( PaymentOperation . class ) ;
+
protected final PaymentAutomatonDAOHelper daoHelper ;
protected PaymentPluginApi plugin ;
|
don t share logger between OperationControlCallback and PaymentOperation
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Sha256Hash implements Serializable , Comparable < Sha256Hash > {
@ override
public int hashCode ( ) {
SINGLE
- return ( bytes [ NUMBER0 ] & NUMBER1 ) | ( ( bytes [ NUMBER2 ] & NUMBER1 ) < < NUMBER3 ) | ( ( bytes [ NUMBER4 ] & NUMBER1 ) < < NUMBER5 ) | ( ( bytes [ NUMBER6 ] & NUMBER1 ) < < NUMBER7 ) ;
+ return Ints . fromBytes ( bytes [ NUMBER6 ] , bytes [ NUMBER4 ] , bytes [ NUMBER2 ] , bytes [ NUMBER0 ] ) ;
}
@ override
|
use Guava to pack the hash code instead of hand written code
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
public class DefaultGroovyMethods {
|
Added John tug Wilson in the author tag of the javadoc
|
<nb> public class HeliosSoloIT {
. port ( STRING0 , NUMBER0 , NUMBER1 )
. env ( STRING1 , STRING2 )
. env ( STRING3 , TEST_HOST )
- . env ( STRING4 , hostAddress )
. env ( STRING5 , dockerHost )
. env ( STRING6 , STRING7 ) ;
+ if ( ! isNullOrEmpty ( hostAddress ) ) {
+ solo . env ( STRING4 , hostAddress ) ;
+ }
+
if ( ! isNullOrEmpty ( certPath ) ) {
solo . env ( STRING8 , STRING9 )
. volume ( STRING9 , certPath ) ;
|
Fix NPE in HeliosSoloIT test
|
<nb> public class ShutdownMonitor
{
if ( isAlive ( ) )
{
- System . err . printf ( STRING0 ) ;
+ if ( DEBUG )
+ System . err . printf ( STRING0 ) ;
return ; SINGLE
}
|
removed System outs
|
<nb> public class AfcClient implements AutoCloseable {
makeDirectory ( targetPath ) ;
final Path root = localFile . toPath ( ) . getParent ( ) ;
-
+
+ SINGLE
+ SINGLE
+ final byte [ ] buffer = new byte [ NUMBER0 * NUMBER1 ] ;
+
class FileCounterVisitor extends SimpleFileVisitor < Path > {
int count ;
@ override
<nb> public class AfcClient implements AutoCloseable {
} else if ( Files . isRegularFile ( file , LinkOption . NOFOLLOW_LINKS ) ) {
long fd = fileOpen ( deviceFile , AfcFileMode . AFC_FOPEN_WRONLY ) ;
try ( InputStream is = Files . newInputStream ( file ) ) {
- byte [ ] buffer = new byte [ NUMBER2 ] ;
int n = NUMBER3 ;
while ( ( n = is . read ( buffer ) ) != - NUMBER4 ) {
fileWrite ( fd , buffer , NUMBER3 , n ) ;
|
Changed buffer size in AfcClient upload to optimize upload speeds
|
<nb> public class SecureChatTrustManagerFactory extends TrustManagerFactorySpi {
}
public void checkClientTrusted (
- X509Certificate [ ] arg0 , String arg1 ) throws CertificateException {
+ X509Certificate [ ] chain , String authType ) throws CertificateException {
SINGLE
SINGLE
+ SINGLE
+ System . err . println (
+ STRING0 + chain [ NUMBER0 ] . getSubjectDN ( ) ) ;
}
public void checkServerTrusted (
- X509Certificate [ ] arg0 , String arg1 ) throws CertificateException {
+ X509Certificate [ ] chain , String authType ) throws CertificateException {
SINGLE
SINGLE
+ System . err . println (
+ STRING1 + chain [ NUMBER0 ] . getSubjectDN ( ) ) ;
}
} ;
|
Some warning message to confirm that certificate authentication really took place
|
<nb> public class ZipalignMojo extends AbstractAndroidMojo
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
+ @ pullparameter ( defaultValue = STRING0 )
private String classifier ;
COMMENT
|
add classifier parameter to zipalign goal
|
<nb> public class ImportHandler {
private Class < ? > findClass ( String name , boolean throwException ) {
Class < ? > clazz ;
ClassLoader cl = Thread . currentThread ( ) . getContextClassLoader ( ) ;
+ String path = name . replace ( STRING0 , STRING1 ) ;
try {
- clazz = cl . loadClass ( name ) ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ if ( cl . getResource ( path ) == null ) {
+ return null ;
+ }
+ } catch ( ClassCircularityError cce ) {
+ SINGLE
+ SINGLE
+ }
+ try {
+ clazz = cl . loadClass ( name ) ;
} catch ( ClassNotFoundException e ) {
return null ;
}
|
Speed up ImportHandler some more
|
<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 NAMESPACE ;
<nb> public class FileReference implements PsiFileReference , FileReferenceOwner , PsiP
}
@ notnull
- public String decode ( @ notnull final String text ) {
+ public String decode ( @ notnull String text ) {
+ if ( SystemInfo . isMac ) {
+ text = Normalizer . normalize ( text , Normalizer . Form . NFC ) ;
+ }
+
SINGLE
String _text = text ;
int paramIndex = text . lastIndexOf ( STRING0 ) ;
|
normalize file reference names
|
<nb> public class MaterialDialog extends DialogBase implements View . OnClickListener ,
return listView ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public int getSelectedIndex ( ) {
+ if ( listCallbackSingle != null ) {
+ return selectedIndex ;
+ } else {
+ return - NUMBER0 ;
+ }
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ @ nullable
+ public Integer [ ] getSelectedIndices ( ) {
+ if ( listCallbackMulti != null ) {
+ return selectedIndices ;
+ } else {
+ return null ;
+ }
+ }
+
private class MaterialDialogAdapter extends ArrayAdapter < CharSequence > {
final int itemColor ;
|
Add convenience methods for retrieving currently selected index es
|
<nb> public class ChartServlet extends HttpServlet implements ManagedService {
req . getParameter ( STRING0 ) , req . getParameter ( STRING1 ) ) ;
ImageIO . write ( chart , provider . getChartType ( ) . toString ( ) , res . getOutputStream ( ) ) ;
} catch ( ItemNotFoundException e ) {
- logger . debug ( STRING2 ) ;
+ logger . error ( STRING2 , e ) ;
} catch ( IllegalArgumentException e ) {
- logger . debug ( STRING3 , e ) ;
+ logger . error ( STRING4 , e ) ;
}
}
|
changed log level of fatal errors in charts
|
<nb> public class StandardSession
}
}
}
- accessCount = null ;
+ if ( ACTIVITY_CHECK ) {
+ accessCount . set ( NUMBER0 ) ;
+ }
setValid ( false ) ;
COMMENT
|
Fix NPE on isValid for an expired session when activity check is enabled
|
<nb> public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint {
throw new IllegalArgumentException ( sm . getString ( STRING0 ) ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
Encoder encoder = findEncoder ( obj ) ;
if ( encoder == null && Util . isPrimitive ( obj . getClass ( ) ) ) {
|
Add a comment
|
<nb> public class WifiScanner {
return mFlags ;
}
+ COMMENT
+ public int getBucketsScanned ( ) {
+ return mBucketsScanned ;
+ }
+
public ScanResult [ ] getResults ( ) {
return mResults ;
}
|
Add accessor for buckets scanned in ScanData
|
<nb> public class MetricsBroadcaster {
}
}
+ public boolean isHasListeners ( ) {
+ return ! listeners . isEmpty ( ) ;
+ }
+
}
<nb> public class WebSocketReporter extends ScheduledReporter {
}
@ override
+ public void report ( ) {
+ if ( metricsBroadcaster . isHasListeners ( ) ) {
+ super . report ( ) ;
+ }
+ }
+
+ @ override
@ suppresswarnings ( STRING0 )
public void report ( SortedMap < String , Gauge > gauges ,
SortedMap < String , Counter > counters ,
|
Only generate the metrics JSON websocket packet if there are listeners
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TFsShell {
throw new FileDoesNotExistException ( folder ) ;
}
- tFile . open ( STRING0 ) ;
+ tFile . open ( OpType . READ_CACHE ) ;
ByteBuffer buf = tFile . readByteBuffer ( ) ;
buf . rewind ( ) ;
FileOutputStream out = new FileOutputStream ( dst ) ;
|
fix the compile
|
<nb> public interface Adapter {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public interface Adapter {
COMMENT
boolean isEmpty ( ) ;
}
-
|
Fix javadoc for Adapter getViewTypeCount
|
<nb> public class DeepLearningMissingTest extends TestUtil {
sumErr . put ( mvh , sumerr ) ;
}
Log . info ( sb . toString ( ) ) ;
- Assert . assertEquals ( sumErr . get ( DeepLearningParameters . MissingValuesHandling . Skip ) , FLOAT0 , FLOAT1 ) ;
+ Assert . assertEquals ( FLOAT2 , sumErr . get ( DeepLearningParameters . MissingValuesHandling . Skip ) , FLOAT3 ) ;
Assert . assertEquals ( sumErr . get ( DeepLearningParameters . MissingValuesHandling . MeanImputation ) , FLOAT4 , FLOAT1 ) ;
}
}
|
Updated DeepLerning test getting smaller error after minor data info updates
|
<nb> public class AccountManagerService
String opPackageName ) {
List < String > permissionsToCheck = new ArrayList < String > ( NUMBER0 ) ;
permissionsToCheck . add ( Manifest . permission . GET_ACCOUNTS_PRIVILEGED ) ;
+ long id = Binder . clearCallingIdentity ( ) ;
try {
ApplicationInfo appInfo = mPackageManager . getApplicationInfo (
opPackageName , NUMBER1 COMMENT ) ;
<nb> public class AccountManagerService
} catch ( NameNotFoundException e ) {
SINGLE
Log . w ( TAG , STRING0 + opPackageName ) ;
+ } finally {
+ Binder . restoreCallingIdentity ( id ) ;
}
boolean isPermitted = isPermitted ( opPackageName , callingUid , permissionsToCheck ) ;
return getTypesForCaller ( callingUid , userId , isPermitted ) ;
|
Need to call getApplicationInfo from System id
|
<nb> public final class ExecutionStage {
final ExecutionState executionState ) {
final Set < AbstractInstance > collectedInstances = new HashSet < AbstractInstance > ( ) ;
+ final ExecutionGroupVertexIterator groupIt = new ExecutionGroupVertexIterator ( this . getExecutionGraph ( ) , true ,
+ this . stageNum ) ;
- for ( int i = NUMBER0 ; i < getNumberOfStageMembers ( ) ; i ++ ) {
-
- final ExecutionGroupVertex groupVertex = getStageMember ( i ) ;
+ while ( groupIt . hasNext ( ) ) {
+ final ExecutionGroupVertex groupVertex = groupIt . next ( ) ;
+ System . out . println ( STRING0 + groupVertex . getName ( ) ) ;
for ( int j = NUMBER0 ; j < groupVertex . getCurrentNumberOfGroupMembers ( ) ; j ++ ) {
SINGLE
|
Fixed bug related to push based transfer model
|
<nb> public final class UnderFileSystemFileInStream extends InputStream {
return - NUMBER0 ;
}
- if ( mIsBufferValid && mBuffer . remaining ( ) > len ) { SINGLE
+ if ( mIsBufferValid && mBuffer . remaining ( ) >= len ) { SINGLE
mBuffer . get ( b , off , len ) ;
mPos += len ;
return len ;
|
Don t discard the buffer unnecessarily in underfilesystem fileinstream
|
<nb> public interface JedisClusterCommands {
Long bitcount ( final String key , long start , long end ) ;
- ScanResult < String > scan ( final String cursor , final ScanParams params ) ;
-
ScanResult < Map . Entry < String , String > > hscan ( final String key , final String cursor ) ;
ScanResult < String > sscan ( final String key , final String cursor ) ;
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public interface MultiKeyJedisClusterCommands {
String pfmerge ( final String destkey , final String . . . sourcekeys ) ;
long pfcount ( final String . . . keys ) ;
+
+ ScanResult < String > scan ( final String cursor , final ScanParams params ) ;
}
|
Move scan from JedisClusterCommands to MultiKeyJedisClusterCommands
|
<nb> public class GrowlNotificationActivator
STRING0 + version ) ;
} else {
COMMENT
- new GrowlNotificationServiceImpl ( ) . start ( bundleContext ) ;
+ new GrowlNotificationServiceImpl ( ) . start ( bc ) ;
logger . info ( STRING1 ) ;
}
|
pass a valid bundle context to the GrowlNotificationService rather than a null object
|
<nb> public class ZooKeeperBroker implements Broker
this . zooClient = new ZooClient ( zooKeeperServers , machineId ,
store . getCreationTime ( ) , store . getStoreId ( ) , store . getLastCommittedTx ( ) ) ;
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
+ int masterId = zooClient . getMaster ( ) ;
+ if ( masterId != this . machineId )
+ {
+ getAndCacheMaster ( masterId ) ;
+ }
}
public Master getMaster ( )
|
Re added the instantiation of the client at construction time
|
<nb> public class Messaging implements Startable
pendingResponse . internalCompleteExceptionally ( ( Throwable ) res ) ;
return ;
case MessageDefinitions . ERROR_RESPONSE :
- pendingResponse . internalCompleteExceptionally ( new UncheckedException ( STRING0 + res ) ) ;
+ pendingResponse . internalCompleteExceptionally ( new UncheckedException ( STRING1 + res ) ) ;
return ;
default :
SINGLE
- logger . error ( STRING2 , messageId ) ;
+ logger . error ( STRING2 , messageType ) ;
return ;
}
}
else
{
SINGLE
- logger . warn ( STRING3 , messageId ) ;
+ logger . warn ( STRING4 , messageId , messageType ) ;
}
break ;
}
default :
- logger . error ( STRING5 , messageId ) ;
+ logger . error ( STRING5 , messageType ) ;
return ;
}
}
|
Log correct variables more information
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Fix the build
|
<nb> import NAMESPACE ;
retain ( ) ;
}
+ @ override
+ protected final void finalize ( ) throws Throwable {
+ dispose ( true ) ;
+ }
+
+ public final void dispose ( ) throws Throwable {
+ dispose ( false ) ;
+ }
+
+ protected void dispose ( boolean finalizing ) throws Throwable {
+ release ( ) ;
+ if ( finalizing ) {
+ super . finalize ( ) ;
+ }
+ }
+
private static final boolean X86 = Bro . IS_X86 ;
private static final ObjCClass objCClass = ObjCClass . getByType ( COMMENT NSObject COMMENT . class ) ;
|
Added dispose and finalize methods to NSObject
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class EditComment implements ChangeListCommand {
myListCopy = worker . getCopyByName ( myName ) ;
if ( myListCopy != null ) {
myOldComment = worker . editComment ( myName , myNewComment ) ;
+ if ( Comparing . equal ( myOldComment , myNewComment ) ) {
+ myListCopy = null ; SINGLE
+ }
}
}
|
do not notify VCS that comment was edited if it hadn t changed
|
<nb> public final class BuildConfiguration {
SINGLE
SINGLE
SINGLE
- Map < String , String > shellEnv = new HashMap ( builder . build ( ) ) ;
+ Map < String , String > shellEnv = new TreeMap ( builder . build ( ) ) ;
for ( Map . Entry < String , String > entry : options . actionEnvironment ) {
shellEnv . put ( entry . getKey ( ) , entry . getValue ( ) ) ;
}
- Map < String , String > fixedShellEnv = new HashMap ( shellEnv ) ;
+ Map < String , String > fixedShellEnv = new TreeMap ( shellEnv ) ;
Set < String > variableShellEnv = new HashSet ( ) ;
for ( Map . Entry < String , String > entry : shellEnv . entrySet ( ) ) {
if ( entry . getValue ( ) == null ) {
|
prefer TreeMap over HashMap to obtain a stable order
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class WebViewFactory {
private static Class < WebViewFactoryProvider > getFactoryClass ( ) throws ClassNotFoundException {
try {
- Context webViewContext = AppGlobals . getInitialApplication ( ) . createPackageContext (
- getWebViewPackageName ( ) ,
- Context . CONTEXT_INCLUDE_CODE | Context . CONTEXT_IGNORE_SECURITY ) ;
- ClassLoader clazzLoader = webViewContext . getClassLoader ( ) ;
- return ( Class < WebViewFactoryProvider > ) Class . forName ( CHROMIUM_WEBVIEW_FACTORY , true ,
- clazzLoader ) ;
- } catch ( PackageManager . NameNotFoundException e ) {
- Log . e ( LOGTAG , STRING0 ) ;
+ return ( Class < WebViewFactoryProvider > ) Class . forName ( CHROMIUM_WEBVIEW_FACTORY ) ;
+ } catch ( ClassNotFoundException e ) {
+ Log . e ( LOGTAG , STRING1 ) ;
return ( Class < WebViewFactoryProvider > ) Class . forName ( NULL_WEBVIEW_FACTORY ) ;
}
}
|
Revert Load the WebView Java code from an APK
|
<nb> public class HikariConfig implements HikariConfigMBean
}
}
- poolName = STRING0 + poolNumber ++ ;
-
+ if ( poolName == null ) {
+ poolName = STRING0 + poolNumber ++ ;
+ }
logConfiguration ( ) ;
}
|
don t clobber the pool name in validate
|
<nb> public class View implements Drawable . Callback , KeyEvent . Callback , Accessibility
}
void performCollectViewAttributes ( int visibility ) {
- if ( ( visibility & VISIBILITY_MASK ) == VISIBLE ) {
+ if ( ( visibility & VISIBILITY_MASK ) == VISIBLE && mAttachInfo != null ) {
if ( ( mViewFlags & KEEP_SCREEN_ON ) == KEEP_SCREEN_ON ) {
mAttachInfo . mKeepScreenOn = true ;
}
|
Fix NPE in YouTube
|
<nb> class QueryOpBuilder {
COMMENT
COMMENT
public DBObject get ( ) {
+ DBObject lclQuery = query ;
+
+ SINGLE
+ if ( lclQuery == null ) {
+ lclQuery = new BasicDBObject ( ) ;
+ }
+
if ( hasSpecialQueryFields ( ) ) {
DBObject queryop = ( specialFields == null ? new BasicDBObject ( ) : specialFields ) ;
- addToQueryObject ( queryop , STRING0 , query , true ) ;
+ addToQueryObject ( queryop , STRING0 , lclQuery , true ) ;
addToQueryObject ( queryop , STRING1 , orderBy , false ) ;
if ( hintStr != null )
addToQueryObject ( queryop , STRING2 , hintStr ) ;
<nb> class QueryOpBuilder {
return queryop ;
}
- return query ;
+ return lclQuery ;
}
private boolean hasSpecialQueryFields ( ) {
|
ensure non null query
|
<nb> public interface PyClass extends
boolean isNewStyleClass ( ) ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
Iterable < PyClassRef > iterateAncestors ( ) ;
|
PyClass can now get its method resolution order
|
<nb> public class Acker implements IBolt {
}
curr . failed = true ;
pending . put ( id , curr ) ;
- } else if ( ACKER_RESET_TIMEOUT_STREAM_ID . equals ( streamId ) ) {
+ } else if ( ACKER_RESET_TIMEOUT_STREAM_ID . equals ( streamId ) ) {
+ if ( curr == null ) {
+ curr = new AckObject ( ) ;
+ }
pending . put ( id , curr ) ;
} else {
LOG . warn ( STRING0 , streamId , input . getSourceTask ( ) ) ;
<nb> public class OutputCollector implements IOutputCollector {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
@ override
<nb> public class BasicOutputCollector implements IBasicOutputCollector {
emitDirect ( taskId , Utils . DEFAULT_STREAM_ID , tuple ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public void resetTimeout ( Tuple tuple ) {
out . resetTimeout ( tuple ) ;
}
|
Add a missing space fix potential NPE add comment to javadoc about reset timeout being expensive
|
<nb> public interface ChannelPipeline extends Iterable < Entry < String , ChannelHandler > >
ChannelPipeline fireChannelRead ( Object msg ) ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
ChannelPipeline fireChannelReadComplete ( ) ;
|
Fix javadoc link
|
<nb> import NAMESPACE ;
import static NAMESPACE ;
- @ dagger.module ( library = true )
+ @ dagger.module ( library = true , overrides = true )
public final class JAXRSModule {
static final String ACCEPT = STRING0 ;
static final String CONTENT_TYPE = STRING1 ;
|
fix duplicate binding error using jaxrs
|
<nb> public class AsyncWriteEngineTest extends TestFile {
SINGLE
SINGLE
a . commit ( ) ;
- SINGLE
- SINGLE
+ assertEquals ( max , putCounter . longValue ( ) - a . newRecids . size ( ) ) ;
assertTrue ( a . writeCache . isEmpty ( ) ) ;
t . close ( ) ;
|
reenabled TODO in test
|
<nb> public class CdiComponentProvider implements ComponentProvider , Extension {
}
private static BeanManager beanManagerFromJndi ( ) {
- BeanManager beanManager = null ;
- try {
+ try {
return ( BeanManager ) new InitialContext ( ) . lookup ( STRING0 ) ;
} catch ( Exception ex ) {
try {
<nb> public class CdiComponentProvider implements ComponentProvider , Extension {
return null ;
}
}
- return beanManager ;
}
private void bindHk2ClassAnalyzer ( ) {
|
Removed unnecessary variable
|
<nb> public class SettingsBackupAgent extends BackupAgentHelper {
ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ;
OutputStreamWriter out = new OutputStreamWriter ( bos ) ;
fromFile . write ( out ) ;
+ out . flush ( ) ;
return bos . toByteArray ( ) ;
} else {
return EMPTY_DATA ;
|
Fix wifi AP backup
|
<nb> public class Actor {
}
COMMENT
- public void localToAscendantCoordinates ( Actor ascendant , Vector2 localCoords ) {
+ public Vector2 localToAscendantCoordinates ( Actor ascendant , Vector2 localCoords ) {
Actor actor = this ;
while ( actor . getParent ( ) != null ) {
actor . localToParentCoordinates ( localCoords ) ;
actor = actor . getParent ( ) ;
if ( actor == ascendant ) break ;
}
+ return localCoords ;
}
COMMENT
<nb> public class Group extends Actor implements Cullable {
COMMENT
COMMENT
- public void localToDescendantCoordinates ( Actor descendant , Vector2 localCoords ) {
+ public Vector2 localToDescendantCoordinates ( Actor descendant , Vector2 localCoords ) {
Group parent = descendant . getParent ( ) ;
if ( parent == null ) throw new IllegalArgumentException ( STRING0 + descendant ) ;
SINGLE
if ( parent != this ) localToDescendantCoordinates ( parent , localCoords ) ;
SINGLE
descendant . parentToLocalCoordinates ( localCoords ) ;
+ return localCoords ;
}
}
|
Coordinate transform methods should return vector for easier chaining local assignment
|
<nb> public class EntityQuarry extends Entity {
@ override
protected void readEntityFromNBT ( NBTTagCompound compound ) {
- dataManager . set ( TILE_POS , NBTUtils . readBlockPos ( compound . getCompoundTag ( STRING0 ) ) ) ;
+ dataManager . set ( TILE_POS , NBTUtils . readBlockPos ( compound . getTag ( STRING0 ) ) ) ;
dataManager . set ( TYPE , compound . getInteger ( STRING1 ) ) ;
}
|
Entity loading fix
|
<nb> public class Language {
languages . put ( code , Locale . forLanguageTag ( code ) . getDisplayLanguage ( Locale . forLanguageTag ( code ) ) ) ;
}
+ boolean copiedLangFiles = false ;
+
if ( loadProps ( ) ) {
boolean updateProps = false ;
<nb> public class Language {
SINGLE
if ( updateLangFiles ) {
- if ( updateLangFiles ( ) ) {
+ if ( copiedLangFiles = updateLangFiles ( ) ) {
props . setProperty ( STRING0 , version ) ;
updateProps = true ;
}
<nb> public class Language {
if ( updateProps ) {
updateProps ( ) ;
}
+
+ } else {
+ SINGLE
+ copiedLangFiles = updateLangFiles ( ) ;
+ }
+
+ SINGLE
+ if ( Base . DEBUG && copiedLangFiles == false ) {
+ updateLangFiles ( ) ;
}
try {
|
added fallback and added copy functionality in debug mode for developing testing
|
<nb> public class HdfsFileInputStream extends InputStream implements Seekable , Positi
}
}
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
@ override
public int available ( ) throws IOException {
return ( int ) mAlluxioFileInputStream . remaining ( ) ;
<nb> public final class HdfsFileInputStreamIntegrationTest {
public void availableTest ( ) throws IOException {
Assert . assertEquals ( FILE_LEN , mInMemInputStream . available ( ) ) ;
Assert . assertEquals ( FILE_LEN , mUfsInputStream . available ( ) ) ;
+
+ SINGLE
+ byte [ ] buf = new byte [ BUFFER_SIZE ] ;
+ int length1 = mInMemInputStream . read ( buf ) ;
+ Assert . assertEquals ( FILE_LEN - length1 , mInMemInputStream . available ( ) ) ;
+ int length2 = mUfsInputStream . read ( buf ) ;
+ Assert . assertEquals ( FILE_LEN - length2 , mUfsInputStream . available ( ) ) ;
}
COMMENT
|
Addressing review comments
|
<nb> public class MorfologikBritishSpellerRuleTest {
assertEquals ( NUMBER0 , rule . match ( langTool . getAnalyzedSentence ( STRING0 ) ) . length ) ;
SINGLE
assertEquals ( NUMBER0 , rule . match ( langTool . getAnalyzedSentence ( STRING1 ) ) . length ) ;
+ SINGLE
+ assertEquals ( NUMBER0 , rule . match ( langTool . getAnalyzedSentence ( STRING2 ) ) . length ) ;
assertEquals ( NUMBER0 , rule . match ( langTool . getAnalyzedSentence ( STRING3 ) ) . length ) ;
assertEquals ( NUMBER0 , rule . match ( langTool . getAnalyzedSentence ( STRING4 ) ) . length ) ;
|
add one more test
|
<nb> public final class Throwables {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Improve Throwables propagate javadoc
|
<nb> public class State {
}
public State clone ( ) {
- State ret = new State ( ) ;
- ret . _time = _time ;
+ State ret = new State ( _time ) ;
return ret ;
}
|
make clone cleaner
|
<nb> import NAMESPACE ;
public class PTBTokenizer < T extends HasWord > extends AbstractTokenizer < T > {
SINGLE
- private PTBLexer lexer ;
+ private final PTBLexer lexer ;
COMMENT
<nb> public class PTBTokenizer < T extends HasWord > extends AbstractTokenizer < T > {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class PTBTokenizer < T extends HasWord > extends AbstractTokenizer < T > {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Make variable final
|
<nb> public abstract class Http2TestBase extends TomcatBaseTest {
@ override
- public void settingsEnd ( boolean ack ) {
+ public void settingsEnd ( boolean ack ) throws IOException {
if ( ack ) {
trace . append ( STRING0 ) ;
} else {
trace . append ( STRING1 ) ;
- try {
- sendSettings ( NUMBER0 , true ) ;
- } catch ( IOException ioe ) {
- SINGLE
- throw new IllegalStateException ( ioe ) ;
- }
+ sendSettings ( NUMBER0 , true ) ;
}
}
|
INterface allows the correct exception to be thrown so do so
|
<nb> public class ProducerConfig extends AbstractConfig {
. define ( BLOCK_ON_BUFFER_FULL_CONFIG , Type . BOOLEAN , true , STRING0 )
. define ( ENABLE_JMX_CONFIG , Type . BOOLEAN , true , STRING1 )
. define ( MAX_RETRIES_CONFIG , Type . INT , NUMBER0 , between ( NUMBER0 , Integer . MAX_VALUE ) , STRING1 )
- . define ( RETRY_BACKOFF_MS_CONFIG , Type . LONG , NUMBER1 , atLeast ( NUMBER0 L ) , STRING0 ) ;
+ . define ( RETRY_BACKOFF_MS_CONFIG , Type . LONG , NUMBER2 , atLeast ( NUMBER0 L ) , STRING0 ) ;
}
ProducerConfig ( Map < ? extends Object , ? extends Object > props ) {
|
Change the backoff default time configuration
|
<nb> public class DefaultServer extends BlockJUnit4ClassRunner {
}
for ( DebuggingSlicePool . DebuggingBuffer b : DebuggingSlicePool . BUFFERS ) {
b . getAllocationPoint ( ) . printStackTrace ( ) ;
- notifier . fireTestFailure ( new Failure ( description , new RuntimeException ( b . getLabel ( ) , b . getAllocationPoint ( ) ) ) ) ;
+ notifier . fireTestFailure ( new Failure ( description , new RuntimeException ( STRING0 + b . getLabel ( ) , b . getAllocationPoint ( ) ) ) ) ;
}
DebuggingSlicePool . BUFFERS . clear ( ) ;
}
|
Make buffer leak error message better
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public final class Number3D {
+ public class Number3D {
public float x ;
public float y ;
public float z ;
|
Remove final keyword from Number3D class
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ActivityShare extends ActivityBase {
throw ex ;
}
return null ;
+ } catch ( ConnectTimeoutException ex ) {
+ return ex ;
} catch ( Throwable ex ) {
Util . bug ( null , ex ) ;
return ex ;
<nb> public class ActivityShare extends ActivityBase {
throw ex ;
}
return null ;
+ } catch ( ConnectTimeoutException ex ) {
+ return ex ;
} catch ( Throwable ex ) {
Util . bug ( null , ex ) ;
return ex ;
|
Handle connection timeout support info
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ComboBox extends ComboBoxWithWidePopup implements AWTEventListener
public final void setEditor ( final ComboBoxEditor editor ) {
ComboBoxEditor _editor = editor ;
if ( SystemInfo . isMac && ( UIUtil . isUnderAquaLookAndFeel ( ) || UIUtil . isUnderIntelliJLaF ( ) ) ) {
- if ( STRING0 . equals ( editor . getClass ( ) . getSimpleName ( ) ) || UIUtil . isUnderIntelliJLaF ( ) ) {
+ if ( editor instanceof UIResource ) {
_editor = new FixedComboBoxEditor ( ) ;
}
}
|
change only default combobox editors
|
<nb> class ReportLogEmitter implements IRunListener , IStandardStreamsListener {
continue ;
}
String name = block . getKind ( ) . name ( ) ;
- String label = name == STRING0 ? STRING1 : TextUtil . capitalize ( name . toLowerCase ( ) ) ;
+ String label = name . equals ( STRING0 ) ? STRING1 : TextUtil . capitalize ( name . toLowerCase ( ) ) ;
for ( int j = NUMBER0 ; j < block . getTexts ( ) . size ( ) ; j ++ ) {
String text = block . getTexts ( ) . get ( j ) ;
if ( j == NUMBER0 ) {
|
Compare strings with equals method
|
<nb> import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ @ ignore ( STRING0 )
@ runwith ( MavenJUnitTestRunner . class )
@ mavenversions ( { STRING1 } )
public class NativeSampleIT {
|
disabling test for now
|
<nb> public class ConfigurationServiceImpl
SINGLE
- XMLConfUtils . writeXML ( propertiesDocument , getConfigurationFile ( ) ) ;
+ XMLUtils . indentedWriteXML (
+ propertiesDocument , new FileWriter ( getConfigurationFile ( ) ) ) ;
}
finally
{
<nb> public class ConfigurationServiceImpl
{
SINGLE
Object value = properties . get ( newPropBuff . toString ( ) ) ;
- if ( newPropBuff . toString ( ) . indexOf ( STRING0 ) != - NUMBER0 )
- System . out . println ( STRING1 ) ;
if ( value == null )
{
|
Writed indented config files
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
|
Removed unused import which is not accessiable on Mac OS X too
|
<nb> public class ProtocolProviderFactoryIrcImpl
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
@ override
public void modifyAccount ( final ProtocolProviderService protocolProvider ,
final Map < String , String > accountProperties )
{
- SINGLE
- SINGLE
+ throw new UnsupportedOperationException (
+ STRING0 ) ;
}
}
|
Throw UnsupportedOperationException for unsupported method
|
<nb> public interface Extensions {
static final int QUOTES = NUMBER0 ;
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
static final int SMARTYPANTS = NUMBER1 ;
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
static final int ABBREVIATIONS = NUMBER2 ;
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
static final int HARDWRAPS = NUMBER3 ;
<nb> public interface Extensions {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
static final int AUTOLINKS = NUMBER4 ;
|
Fixed small Javadoc problem
|
<nb> public class DBMaker {
Runtime . getRuntime ( ) . addShutdownHook ( new Thread ( STRING0 ) {
@ override
public void run ( ) {
- SINGLE
- engine2 . close ( ) ;
+ if ( ! engine2 . isClosed ( ) )
+ engine2 . close ( ) ;
}
} ) ;
}
|
Fix annoying exception
|
<nb> package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class AuthenticationHelper {
private SessionManagementMethod sessionManagementMethod ;
private User user ;
-
public AuthenticationHelper ( HttpSender httpSender , SessionManagementMethod sessionManagementMethod ,
User user ) {
super ( ) ;
<nb> public class AuthenticationHelper {
}
}
+ public HttpState getCorrespondingHttpState ( ) {
+ if ( user . getAuthenticatedSession ( ) == null )
+ user . setAuthenticatedSession ( sessionManagementMethod . createEmptyWebSession ( ) ) ;
+ return user . getCorrespondingHttpState ( ) ;
+ }
+
public static void addAuthMessageToHistory ( HttpMessage msg ) {
SINGLE
try {
|
Required changes to properly propagate session cookies during Zest Authentication
|
<nb> public class EmailNotificationChannel extends NotificationChannel {
if ( StringUtils . equalsIgnoreCase ( configuration . getSecureConnection ( ) , STRING0 ) ) {
email . setSSL ( true ) ;
email . setSslSmtpPort ( configuration . getSmtpPort ( ) ) ;
+
+ SINGLE
+ SINGLE
+ email . setSmtpPort ( Integer . parseInt ( configuration . getSmtpPort ( ) ) ) ;
} else if ( StringUtils . isBlank ( configuration . getSecureConnection ( ) ) ) {
email . setSmtpPort ( Integer . parseInt ( configuration . getSmtpPort ( ) ) ) ;
} else {
|
Fix classloader issue of EmailNotificationChannel
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
-
COMMENT
COMMENT
COMMENT
<nb> extends BaseTest < A , AP , B , S , B2S , BS , L , X , DATE , BOOL , D , T , U , UU , I , IPK , T7
super ( delegate ) ;
}
- @ test
public void testStreamsCollectRecords ( ) {
SINGLE
<nb> extends BaseTest < A , AP , B , S , B2S , BS , L , X , DATE , BOOL , D , T , U , UU , I , IPK , T7
assertEquals ( BOOK_TITLES . get ( NUMBER0 ) , entries . get ( NUMBER1 ) . getValue ( ) . get ( NUMBER1 ) . getValue ( TBook_TITLE ( ) ) ) ;
}
- @ test
public void testStreamsCollectPOJOs ( ) {
SINGLE
|
Remove Test annotation in delegate class
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Remove unused import
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
public abstract class VcsBackgroundTask < T > extends Task . ConditionalModal {
+ @ notnull private final PerformInBackgroundOption myBackgroundOption ;
private final Collection < T > myItems ;
private final List < VcsException > myExceptions = new ArrayList < VcsException > ( ) ;
public VcsBackgroundTask ( final Project project , @ notnull final String title , @ notnull final PerformInBackgroundOption backgroundOption ,
final Collection < T > itemsToProcess ) {
super ( project , title , false , backgroundOption ) ;
+ myBackgroundOption = backgroundOption ;
myItems = itemsToProcess ;
}
+ @ notnull
+ public PerformInBackgroundOption getBackgroundOption ( ) {
+ return myBackgroundOption ;
+ }
+
public void run ( @ notnull ProgressIndicator indicator ) {
for ( T item : myItems ) {
try {
|
don t update changelists while perforce is running some commands
|
<nb> public class RecordActivity extends Activity implements OnClickListener {
}
public void surfaceChanged ( SurfaceHolder holder , int format , int width , int height ) {
+ stopPreview ( ) ;
+
Camera . Parameters camParams = mCamera . getParameters ( ) ;
List < Camera . Size > sizes = camParams . getSupportedPreviewSizes ( ) ;
SINGLE
<nb> public class RecordActivity extends Activity implements OnClickListener {
Log . v ( LOG_TAG , STRING0 + camParams . getPreviewFrameRate ( ) ) ;
mCamera . setParameters ( camParams ) ;
+
+ SINGLE
+ try {
+ mCamera . setPreviewDisplay ( holder ) ;
+ mCamera . setPreviewCallback ( CameraView . this ) ;
+ startPreview ( ) ;
+ } catch ( Exception e ) {
+ Log . e ( LOG_TAG , STRING1 ) ;
+ }
+
startPreview ( ) ;
}
|
added setpreviewdisplay on surface changed method
|
<nb> public class ORecordSerializerSchemaAware2CSV extends ORecordSerializerCSVAbstra
else
type = OType . LINKLIST ;
} else if ( ODatabaseRecordThreadLocal . INSTANCE . isDefined ( )
- && ( firstValue instanceof ORecordSchemaAware < ? > || ( ODatabaseRecordThreadLocal . INSTANCE . get ( ) . getDatabaseOwner ( ) instanceof ODatabaseObject && ( ( ODatabaseObject ) ODatabaseRecordThreadLocal . INSTANCE
+ && ( firstValue instanceof ORecord < ? > || ( ODatabaseRecordThreadLocal . INSTANCE . get ( ) . getDatabaseOwner ( ) instanceof ODatabaseObject && ( ( ODatabaseObject ) ODatabaseRecordThreadLocal . INSTANCE
. get ( ) . getDatabaseOwner ( ) ) . getEntityManager ( ) . getEntityClass ( getClassName ( firstValue ) ) != null ) ) ) {
linkedClass = getLinkInfo ( ODatabaseRecordThreadLocal . INSTANCE . get ( ) , getClassName ( firstValue ) ) ;
if ( type == null ) {
|
Fixed bug on the storage of linked record bytes using remote protocol reported by Salvatore in ML
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.