nus-yam/ex-repair huggingface dataset:
Buggy code:
public class WelcomeActivity extends Activity { private String mode ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void populateOnRecreate ( Bundle savedInstanceState ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } public void onRadioButtonClicked ( View view ) { boolean checked = ( ( android . widget . RadioButton ) ( view ) ) . isChecked ( ) ; switch ( view . getId ( ) ) { case id . radio_customer : if ( checked ) mode = LoyaltyConstants . VALUE_CUSTOMER_TYPE_CONSUMER ; break ; <START_BUG> case id . radio_female : <END_BUG> if ( checked ) mode = LoyaltyConstants . VALUE_CUSTOMER_TYPE_RETAILER ; break ; } } }

Fix:
case id . radio_retailer :
Buggy code:
public class DeclarePrecedence extends Declare { private TypePatternList patterns ; public DeclarePrecedence ( List patterns ) { } private DeclarePrecedence ( TypePatternList patterns ) { } public Object accept ( PatternNodeVisitor visitor , Object data ) { } public Declare parameterizeWith ( Map typeVariableBindingMap ) { } public String toString ( ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public void write ( DataOutputStream s ) throws IOException { } public static Declare read ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public void resolve ( IScope scope ) { patterns = patterns . resolveBindings ( scope , NONE , false , false ) ; boolean seenStar = false ; for ( int i = 0 ; i < ( patterns . size ( ) ) ; i ++ ) { TypePattern pi = patterns . get ( i ) ; if ( pi . isStar ( ) ) { if ( seenStar ) { scope . getWorld ( ) . showMessage ( ERROR , WeaverMessages . format ( TWO_STARS_IN_PRECEDENCE ) , pi . getSourceLocation ( ) , null ) ; } seenStar = true ; continue ; } ResolvedType exactType = pi . getExactType ( ) . resolve ( scope . getWorld ( ) ) ; if ( exactType == ( ResolvedType . MISSING ) ) continue ; <START_BUG> if ( ( ! ( exactType . isAspect ( ) ) ) && ( ! ( pi . isIncludeSubtypes ( ) ) ) ) { <END_BUG> scope . getWorld ( ) . showMessage ( ERROR , WeaverMessages . format ( CLASSES_IN_PRECEDENCE , exactType . getName ( ) ) , pi . getSourceLocation ( ) , null ) ; } for ( int j = 0 ; j < ( patterns . size ( ) ) ; j ++ ) { if ( j == i ) continue ; TypePattern pj = patterns . get ( j ) ; if ( pj . isStar ( ) ) continue ; if ( pj . matchesStatically ( exactType ) ) { scope . getWorld ( ) . showMessage ( ERROR , WeaverMessages . format ( TWO_PATTERN_MATCHES_IN_PRECEDENCE , exactType . getName ( ) ) , pi . getSourceLocation ( ) , pj . getSourceLocation ( ) ) ; } } } } public TypePatternList getPatterns ( ) { } private int matchingIndex ( ResolvedType a ) { } public int compare ( ResolvedType aspect1 , ResolvedType aspect2 ) { } public boolean isAdviceLike ( ) { } public String getNameSuffix ( ) { } }

Fix:
if ( ( ( ! ( exactType . isAspect ( ) ) ) && ( ! ( pi . isIncludeSubtypes ( ) ) ) ) && ( ! ( exactType . isTypeVariableReference ( ) ) ) ) {
Buggy code:
public class MethodLocator extends PatternLocator { protected MethodPattern pattern ; protected boolean isDeclarationOfReferencedMethodsPattern ; public char [ ] [ ] [ ] allSuperDeclaringTypeNames ; public MethodLocator ( MethodPattern pattern ) { } public void initializePolymorphicSearch ( MatchLocator locator ) { } protected boolean isVirtualInvoke ( MethodBinding method , MessageSend messageSend ) { } public int match ( MethodDeclaration node , MatchingNodeSet nodeSet ) { } public int match ( MessageSend node , MatchingNodeSet nodeSet ) { } protected int matchContainer ( ) { } protected int matchMethod ( MethodBinding method ) { } protected void matchReportReference ( ASTNode reference , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } protected int referenceType ( ) { } protected void reportDeclaration ( MethodBinding methodBinding , MatchLocator locator , SimpleSet knownMethods ) throws CoreException { } public int resolveLevel ( ASTNode possibleMatchingNode ) { } public int resolveLevel ( Binding binding ) { } protected int resolveLevel ( MessageSend messageSend ) { MethodBinding method = messageSend . binding ; if ( method != null ) method = method . original ( ) ; if ( method == null ) return PatternLocator . INACCURATE_MATCH ; int methodLevel = matchMethod ( method ) ; if ( methodLevel == ( PatternLocator . IMPOSSIBLE_MATCH ) ) return PatternLocator . IMPOSSIBLE_MATCH ; char [ ] qualifiedPattern = PatternLocator . qualifiedPattern ( this . pattern . declaringSimpleName , this . pattern . declaringQualification ) ; if ( qualifiedPattern == null ) return methodLevel ; int declaringLevel ; <START_BUG> if ( ( isVirtualInvoke ( method , messageSend ) ) && ( ! ( ( messageSend . receiverType ) instanceof ArrayBinding ) ) ) { <END_BUG> declaringLevel = resolveLevelAsSubtype ( qualifiedPattern , method . declaringClass ) ; if ( declaringLevel == ( PatternLocator . IMPOSSIBLE_MATCH ) ) { if ( ( ( method . declaringClass ) == null ) || ( ( this . allSuperDeclaringTypeNames ) == null ) ) { declaringLevel = PatternLocator . INACCURATE_MATCH ; } else { char [ ] [ ] compoundName = method . declaringClass . compoundName ; for ( int i = 0 , max = this . allSuperDeclaringTypeNames . length ; i < max ; i ++ ) if ( CharOperation . equals ( this . allSuperDeclaringTypeNames [ i ] , compoundName ) ) return methodLevel ; } } } else { declaringLevel = resolveLevelForType ( qualifiedPattern , method . declaringClass ) ; } return methodLevel > declaringLevel ? declaringLevel : methodLevel ; } protected int resolveLevelAsSubtype ( char [ ] qualifiedPattern , ReferenceBinding type ) { } protected int resolveLevelForType ( char [ ] simpleNamePattern , char [ ] qualificationPattern , TypeBinding type ) { } protected void setUnitScope ( CompilationUnitScope unitScope ) { } public String toString ( ) { } }

Fix:
if ( ( isVirtualInvoke ( method , messageSend ) ) && ( ! ( ( messageSend . actualReceiverType ) instanceof ArrayBinding ) ) ) {
Buggy code:
public class LoginService extends Service implements LoginStateListener , ConnTestCallBack { private static final String TAG = "LoginService" ; public static final String BROADCAST_ACTION = "org.bitnp.netcheckin2.LOGINSERVICE" ; public static final String COMMAND_START_LISTEN = "START<seq2seq4repair_space>LISTEN" ; public static final String COMMAND_STOP_LISTEN = "STOP<seq2seq4repair_space>LISTEN" ; public static final String COMMAND_STATE_CHANGE = "STATE<seq2seq4repair_space>CHANGE" ; public static final String COMMAND_DO_TEST = "DO<seq2seq4repair_space>TEST" ; public static final String COMMAND_RE_LOGIN = "RE<seq2seq4repair_space>LOGIN" ; private boolean listeningFlag = false ; private static NetworkState status = NetworkState . OFFLINE ; private SharedPreferencesManager mManager ; private static boolean keepAliveFlag ; private static boolean autoLogoutFlag ; private static long interval ; Intent broadcast = new Intent ( LoginService . BROADCAST_ACTION ) ; private NotifTools mNotifTools ; private Timer timer ; private TimerTask timerTask ; public LoginService ( ) { } @ Override public IBinder onBind ( Intent intent ) { } public static NetworkState getStatus ( ) { } public class LoginServiceBinder extends Binder { public LoginService getLoginService ( ) { } } public static boolean isKeepAlive ( ) { } public static long getInterval ( ) { } @ Override public void onCreate ( ) { } @ Override public int onStartCommand ( Intent intent , int flags , int startId ) { } @ Override public void onTestOver ( boolean result ) { } private void startListen ( ) { } private void stopListen ( ) { } private void broadcastState ( ) { } @ Override public void onLoginStateChanged ( String message , int state ) { Log . d ( LoginService . TAG , ( "Login<seq2seq4repair_space>state<seq2seq4repair_space>is<seq2seq4repair_space>:<seq2seq4repair_space>" + message ) ) ; if ( state == ( LoginHelper . OFFLINE ) ) { LoginService . status = NetworkState . OFFLINE ; broadcastState ( ) ; stopListen ( ) ; if ( message . equals ( "LOGOUT_OK" ) ) mNotifTools . sendSimpleNotification ( getApplicationContext ( ) , "已断开" , "点击查看详情" ) ; } else if ( ( state == ( LoginHelper . LOGIN_MODE_1 ) ) || ( state == ( LoginHelper . LOGIN_MODE_2 ) ) ) { Log . i ( LoginService . TAG , "login<seq2seq4repair_space>in<seq2seq4repair_space>mode<seq2seq4repair_space>1" ) ; LoginService . status = NetworkState . ONLINE ; broadcastState ( ) ; startListen ( ) ; <START_BUG> if ( ( LoginService . autoLogoutFlag ) && ( message . equals ( ( "该帐号的登录人数已超过限额\n" + "如果怀疑帐号被盗用，请联系管理员。" ) ) ) ) { <END_BUG> if ( ! ( LoginService . autoLogoutFlag ) ) mNotifTools . sendButtonNotification ( getApplicationContext ( ) , "是否强制断开" , "将登出所有在线用户，并在一段时间后自动重连" ) ; else LoginHelper . asyncForceLogout ( ) ; } else if ( ( ! ( message . equals ( "" ) ) ) && ( ( message . length ( ) ) < 60 ) ) mNotifTools . sendSimpleNotification ( getApplicationContext ( ) , message , "点击查看详情" ) ; } else Log . e ( LoginService . TAG , "unknown<seq2seq4repair_space>login<seq2seq4repair_space>state" ) ; } }

Fix:
if ( message . equals ( ( "该帐号的登录人数已超过限额\n" + "如果怀疑帐号被盗用，请联系管理员。" ) ) ) {
Buggy code:
class BitextDependencyReaderTest { public static void main ( String [ ] args ) throws Exception { String filePath = new File ( "" ) . getAbsolutePath ( ) ; String p1 = filePath + "//src//sample_data//parse.mst.en" ; String p2 = filePath + "//src//sample_data//intersection.txt" ; String p3 = filePath + "//src//sample_data//en-ptb.map" ; String p4 = filePath + "//src//sample_data//parse.mst.en" ; String p5 = filePath + "//src//sample_data//intersection.txt" ; String p6 = "//tmp//reorder.model" ; if ( ( args . length ) > 5 ) { p1 = new File ( args [ 0 ] ) . getAbsolutePath ( ) ; p2 = new File ( args [ 1 ] ) . getAbsolutePath ( ) ; p3 = new File ( args [ 2 ] ) . getAbsolutePath ( ) ; p4 = new File ( args [ 3 ] ) . getAbsolutePath ( ) ; p5 = new File ( args [ 4 ] ) . getAbsolutePath ( ) ; p6 = new File ( args [ 5 ] ) . getAbsolutePath ( ) ; } ArrayList < BitextDependency > data = BitextDependencyReaderTest . testReadFromBitext ( p1 , p2 , p3 ) ; ArrayList < BitextDependency > devBitext = BitextDependencyReaderTest . testReadFromBitext ( p4 , p5 , p3 ) ; HashMap < String , Integer > posOrderMap = TrainData . constructPosOrderFrequency ( data ) ; ArrayList < TrainData > trainingData = TrainData . getAllPossibleTrainData ( data , posOrderMap , 20 ) ; ArrayList < TrainData > devData = TrainData . getAllPossibleTrainData ( devBitext , posOrderMap , 20 ) ; <START_BUG> Trainer . train ( trainingData , devData , new AveragedPerceptron ( ) , 10 , p6 ) ; <END_BUG> System . out . println ( ( "test<seq2seq4repair_space>successful<seq2seq4repair_space>" + ( data . size ( ) ) ) ) ; } public static ArrayList < BitextDependency > testReadFromBitext ( String parsedFilePath , String alignIntersectionPath , String universalPosPath ) throws Exception { } No newline ; at end ; of file ; }

Fix:
Trainer . trainWithPerceptron ( trainingData , devData , new AveragedPerceptron ( ) , 10 , p6 ) ;
Buggy code:
public class JasonsTheme extends MetalTheme { private final ColorUIResource primary1 = new ColorUIResource ( 102 , 102 , 153 ) ; private final ColorUIResource primary2 = new ColorUIResource ( 153 , 153 , 204 ) ; private final ColorUIResource primary3 = new ColorUIResource ( 204 , 204 , 255 ) ; private final ColorUIResource secondary1 = new ColorUIResource ( 102 , 102 , 102 ) ; private final ColorUIResource secondary2 = new ColorUIResource ( 153 , 153 , 153 ) ; private final ColorUIResource secondary3 = new ColorUIResource ( 204 , 204 , 204 ) ; private final FontUIResource controlFont = new FontUIResource ( "SansSerif" , Font . BOLD , 10 ) ; private final FontUIResource systemFont = new FontUIResource ( "Dialog" , Font . PLAIN , 10 ) ; private final FontUIResource windowTitleFont = new FontUIResource ( "SansSerif" , Font . BOLD , 10 ) ; private final FontUIResource userFont = new FontUIResource ( "SansSerif" , Font . PLAIN , 10 ) ; private final FontUIResource smallFont = new FontUIResource ( "Dialog" , Font . PLAIN , 9 ) ; public String getName ( ) { <START_BUG> return "JasonsSmall" ; <END_BUG> } protected ColorUIResource getPrimary1 ( ) { } protected ColorUIResource getPrimary2 ( ) { } protected ColorUIResource getPrimary3 ( ) { } protected ColorUIResource getSecondary1 ( ) { } protected ColorUIResource getSecondary2 ( ) { } protected ColorUIResource getSecondary3 ( ) { } public FontUIResource getControlTextFont ( ) { } public FontUIResource getSystemTextFont ( ) { } public FontUIResource getUserTextFont ( ) { } public FontUIResource getMenuTextFont ( ) { } public FontUIResource getEmphasisTextFont ( ) { } public FontUIResource getSubTextFont ( ) { } public FontUIResource getWindowTitleFont ( ) { } }

Fix:
return "Default" ;
Buggy code:
public class PrefixLevel1TypeBufferLevel1NameCompletionTestCase extends AbstractGeneratedAddressCompleterTest { @ Test public void testStringValues ( ) { assertAllCandidates ( Arrays . asList ( "last2" , "link2" , "other2" ) ) ; assertSelectedCandidates ( Arrays . asList ( "last2" , "link2" ) ) ; assertBufferPrefix ( ".//" ) ; <START_BUG> assertContextPrefix ( "link1" ) ; <END_BUG> } @ Override protected int getPrefixLevel ( ) { } }

Fix:
assertContextPrefix ( "//link1" ) ;
Buggy code:
abstract class AbstractInfoView extends ViewPart implements IMenuListener , ISelectionListener { private final IPartListener2 fPartListener = new IPartListener2 ( ) { @ Override public void partVisible ( final IWorkbenchPartReference ref ) { } @ Override public void partHidden ( final IWorkbenchPartReference ref ) { } @ Override public void partInputChanged ( final IWorkbenchPartReference ref ) { } @ Override public void partActivated ( final IWorkbenchPartReference ref ) { } @ Override public void partBroughtToTop ( final IWorkbenchPartReference ref ) { } @ Override public void partClosed ( final IWorkbenchPartReference ref ) { } @ Override public void partDeactivated ( final IWorkbenchPartReference ref ) { } @ Override public void partOpened ( final IWorkbenchPartReference ref ) { } } ; protected String fCurrentViewInfo ; private SelectionDispatchAction fCopyToClipboardAction ; private GotoInputAction fGotoInputAction ; volatile int fComputeCount ; protected abstract void setInfo ( String info ) { } protected abstract void internalCreatePartControl ( Composite parent ) { } protected abstract void setForeground ( Color color ) { } protected abstract void setBackground ( Color color ) { } abstract Control getControl ( ) { } protected abstract String getInfoForSelection ( IWorkbenchPart part , ISelection selection ) { } protected abstract String getHelpContextId ( ) { } @ Override public final void createPartControl ( final Composite parent ) { } protected void createActions ( ) { } protected void createContextMenu ( ) { } @ Override public void menuAboutToShow ( final IMenuManager menu ) { } protected IAction getSelectAllAction ( ) { } protected IAction getCopyToClipboardAction ( ) { } protected String getInfo ( ) { } ISelectionProvider getSelectionProvider ( ) { } protected void fillActionBars ( final IActionBars actionBars ) { } protected void fillToolBar ( final IToolBarManager tbm ) { } private void setInfoColor ( ) { } protected void startListeningForSelectionChanges ( ) { } protected void stopListeningForSelectionChanges ( ) { } @ Override public void selectionChanged ( final IWorkbenchPart part , final ISelection selection ) { } protected boolean isIgnoringEqualInput ( ) { } @ Override public final void dispose ( ) { <START_BUG> ( fComputeCount ) ++ ; <END_BUG> getSite ( ) . getWorkbenchWindow ( ) . getPartService ( ) . removePartListener ( fPartListener ) ; final ISelectionProvider provider = getSelectionProvider ( ) ; if ( provider != null ) { provider . removeSelectionChangedListener ( fCopyToClipboardAction ) ; } internalDispose ( ) ; } protected void internalDispose ( ) { } void computeAndSetInput ( final IWorkbenchPart part ) { } void doSetInfo ( final String info ) { } }

Fix:
( fComputeCount ) -- ;
Buggy code:
public class RootLoggerAdd extends AbstractLoggingSubsystemUpdate < Void > { private static final long serialVersionUID = 4230922005791983261L ; private final Level level ; public RootLoggerAdd ( final Level level ) { } protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { final RootLoggerService service = new RootLoggerService ( ) ; service . setLevel ( level ) ; final BatchServiceBuilder < Logger > builder = updateContext . getBatchBuilder ( ) . addService ( ROOT_LOGGER , service ) ; <START_BUG> builder . setInitialMode ( IMMEDIATE ) ; <END_BUG> } public RootLoggerRemove getCompensatingUpdate ( LoggingSubsystemElement original ) { } protected void applyUpdate ( LoggingSubsystemElement element ) throws UpdateFailedException { } }

Fix:
builder . setInitialMode ( ACTIVE ) ;
Buggy code:
public class ExFile { private static int id = 1 ; public static HashMap < Integer , Node > filemap = new HashMap < Integer , Node > ( ) ; public static int openfile ( String filename ) { } public static int readch ( int fid ) { } public static int writech ( int fid , char c ) { try { Node n = ExFile . filemap . get ( fid ) ; if ( n == null ) { return - 2 ; } <START_BUG> n . fos . write ( ( "" + c ) . toString ( ) . getBytes ( ) ) ; <END_BUG> return fid ; } catch ( Exception e ) { return - 1 ; } } public static int close ( int fid ) { } No newline ; at end ; of file ; }

Fix:
n . fos . write ( ( ( int ) ( c ) ) ) ;
Buggy code:
public abstract class AutoMode extends LinearOpMode { public AdafruitIMU gyro ; public DcMotor motorBL ; public DcMotor motorBR ; public DcMotor motorFL ; public DcMotor motorFR ; public DcMotor manipulator ; public DcMotor liftL ; public DcMotor liftR ; public Servo climberSwitch ; public Servo rightPaddle ; public Servo leftPaddle ; public Servo basket ; public DeviceInterfaceModule cdim ; public DigitalChannel rts ; public DigitalChannel lts ; private boolean hit ; private static final double UNDROPPED = 0 ; private static final double DROPPED = 1 ; private static final double RIGHTPADDLE_OUT = 0.75 ; private static final double LEFTPADDLE_OUT = 0.5 ; private static final double RIGHTPADDLE_IN = 1 ; private static final double LEFTPADDLE_IN = 0 ; private static final double LEFTDUMPER_DUMPED = 0 ; private static final double LEFTDUMPER_UNDUMPED = 1 ; private static final double RIGHTDUMPER_DUMPED = 1 ; private static final double RIGHTDUMPER_UNDUMPED = 0 ; private static final double BASKET_LEFT = 0 ; private static final double BASKET_RIGHT = 1 ; private static final double BASKET_IDLE = 0.35 ; public AutoMode ( ) { } public void moveForward ( double pow , int encoderVal ) throws InterruptedException { } public void raiseLifts ( double pow , int time ) throws InterruptedException { } public void dumpClimbers ( ) throws InterruptedException { } public void resetClimbers ( ) throws InterruptedException { } public void extendPaddles ( ) { } public void retractPaddles ( ) { } public void startMotors ( double ri , double le ) throws InterruptedException { } public void stopMotors ( ) throws InterruptedException { } public void startManipulator ( ) { } public void stopManipulator ( ) { } public void reverseManipulator ( ) { } public void resetEncoders ( ) throws InterruptedException { <START_BUG> while ( ( ( motorBL . getCurrentPosition ( ) ) > 25 ) || ( ( motorBR . getCurrentPosition ( ) ) > 25 ) ) { <END_BUG> motorBL . setChannelMode ( RESET_ENCODERS ) ; motorBR . setChannelMode ( RESET_ENCODERS ) ; motorFR . setChannelMode ( RESET_ENCODERS ) ; motorFL . setChannelMode ( RESET_ENCODERS ) ; waitOneFullHardwareCycle ( ) ; } waitOneFullHardwareCycle ( ) ; motorBL . setChannelMode ( RUN_WITHOUT_ENCODERS ) ; motorBR . setChannelMode ( RUN_WITHOUT_ENCODERS ) ; motorFL . setChannelMode ( RUN_WITHOUT_ENCODERS ) ; motorFR . setChannelMode ( RUN_WITHOUT_ENCODERS ) ; waitOneFullHardwareCycle ( ) ; } public void lowerLifts ( double pow ) { } public void stopLifts ( ) { } public int getEncoderAvg ( ) { } public int getBackWheelAvg ( ) { } public final void first ( ) { } }

Fix:
while ( ( ( Math . abs ( motorBL . getCurrentPosition ( ) ) ) > 25 ) || ( ( Math . abs ( motorBR . getCurrentPosition ( ) ) ) > 25 ) ) {
Buggy code:
public class dig { static dnsName name = null ; static short type = dns . A ; static short _class = dns . IN ; static void usage ( ) { } static void doQuery ( dnsMessage query , dnsResolver res ) throws IOException { dnsMessage response ; System . out . println ( ";<seq2seq4repair_space>java<seq2seq4repair_space>dig<seq2seq4repair_space>0.0" ) ; response = res . send ( query ) ; System . out . print ( ";;<seq2seq4repair_space>->>HEADER<<-<seq2seq4repair_space>" ) ; System . out . print ( "opcode:<seq2seq4repair_space>" ) ; System . out . print ( dns . opcodeString ( response . getHeader ( ) . getOpcode ( ) ) ) ; System . out . print ( ",<seq2seq4repair_space>status:<seq2seq4repair_space>" ) ; System . out . print ( dns . rcodeString ( response . getHeader ( ) . getRcode ( ) ) ) ; System . out . println ( ( ",<seq2seq4repair_space>id:<seq2seq4repair_space>" + ( response . getHeader ( ) . getID ( ) ) ) ) ; System . out . print ( ( ";;<seq2seq4repair_space>flags:<seq2seq4repair_space>" + ( response . getHeader ( ) . printFlags ( ) ) ) ) ; System . out . print ( ";<seq2seq4repair_space>" ) ; for ( int i = 0 ; i < 4 ; i ++ ) { System . out . print ( dns . sectionString ( i ) ) ; System . out . print ( ":<seq2seq4repair_space>" ) ; System . out . print ( response . getHeader ( ) . getCount ( i ) ) ; System . out . print ( "<seq2seq4repair_space>" ) ; } System . out . println ( ) ; if ( ( response . getHeader ( ) . getCount ( QUESTION ) ) > 0 ) { int i = dns . QUESTION ; System . out . println ( ( ( ";;<seq2seq4repair_space>" + ( dns . longSectionString ( i ) ) ) + ":" ) ) ; Enumeration e = response . getSection ( i ) . elements ( ) ; while ( e . hasMoreElements ( ) ) { dnsRecord rec = ( ( dnsRecord ) ( e . nextElement ( ) ) ) ; System . out . print ( ";;\t" ) ; System . out . print ( rec . rname ) ; System . out . print ( ",<seq2seq4repair_space>type<seq2seq4repair_space>=<seq2seq4repair_space>" ) ; System . out . print ( dns . typeString ( rec . rtype ) ) ; System . out . print ( ",<seq2seq4repair_space>class<seq2seq4repair_space>=<seq2seq4repair_space>" ) ; System . out . println ( dns . classString ( rec . rclass ) ) ; } System . out . println ( ) ; } for ( int i = 1 ; i < 4 ; i ++ ) { if ( ( response . getHeader ( ) . getCount ( i ) ) == 0 ) continue ; System . out . println ( ( ( ";;<seq2seq4repair_space>" + ( dns . longSectionString ( i ) ) ) + ":" ) ) ; Enumeration e = response . getSection ( i ) . elements ( ) ; while ( e . hasMoreElements ( ) ) { System . out . println ( e . nextElement ( ) ) ; } System . out . println ( ) ; } <START_BUG> System . out . println ( ";;<seq2seq4repair_space>done" ) ; <END_BUG> } static void doAXFR ( dnsMessage query , dnsResolver res ) throws IOException { } public static void main ( String [ ] argv ) throws IOException { } }

Fix:
System . out . println ( ( ( ";;<seq2seq4repair_space>done<seq2seq4repair_space>(" + ( response . getNumBytes ( ) ) ) + "<seq2seq4repair_space>bytes)" ) ) ;
Buggy code:
public class CompilationUnitDeclaration extends ASTNode implements ReferenceContext , ProblemSeverities { public ImportReference currentPackage ; public ImportReference [ ] imports ; public TypeDeclaration [ ] types ; public int [ ] [ ] comments ; public boolean ignoreFurtherInvestigation = false ; public boolean ignoreMethodBodies = false ; public CompilationUnitScope scope ; public ProblemReporter problemReporter ; public CompilationResult compilationResult ; public LocalTypeBinding [ ] localTypes ; public int localTypeCount = 0 ; public boolean isPropagatingInnerClassEmulation ; public CompilationUnitDeclaration ( ProblemReporter problemReporter , CompilationResult compilationResult , int sourceLength ) { } public void abort ( int abortLevel , IProblem problem ) { } public void analyseCode ( ) { } public void cleanUp ( ) { } private void cleanUp ( TypeDeclaration type ) { } public void checkUnusedImports ( ) { } public CompilationResult compilationResult ( ) { } public TypeDeclaration declarationOfType ( char [ ] [ ] typeName ) { } public void generateCode ( ) { if ( ignoreFurtherInvestigation ) { if ( ( types ) != null ) { for ( int i = 0 , count = types . length ; i < count ; i ++ ) { types [ i ] . ignoreFurtherInvestigation = true ; types [ i ] . generateCode ( scope ) ; } } return ; } <START_BUG> if ( this . isPackageInfo ( ) ) { <END_BUG> types [ 0 ] . annotations = this . currentPackage . annotations ; } try { if ( ( types ) != null ) { for ( int i = 0 , count = types . length ; i < count ; i ++ ) types [ i ] . generateCode ( scope ) ; } } catch ( org . eclipse . jdt . internal . compiler . problem . AbortCompilationUnit e ) { } } public char [ ] getFileName ( ) { } public char [ ] getMainTypeName ( ) { } public boolean isEmpty ( ) { } public boolean isPackageInfo ( ) { } public boolean hasErrors ( ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public void propagateInnerEmulationForAllLocalTypes ( ) { } public void record ( LocalTypeBinding localType ) { } public void resolve ( ) { } public void tagAsHavingErrors ( ) { } public void traverse ( ASTVisitor visitor , CompilationUnitScope unitScope ) { } }

Fix:
if ( ( this . isPackageInfo ( ) ) && ( ( this . types ) != null ) ) {
Buggy code:
public class AntCall extends AntBase { public void execute ( ) throws ExecutionException { <START_BUG> setProperty ( BASEDIR , getContext ( ) . getBaseDir ( ) . getAbsolutePath ( ) ) ; <END_BUG> ExecService execService = ( ( ExecService ) ( getCoreService ( ExecService . class ) ) ) ; execService . callTarget ( getProperties ( ) , getTargets ( ) ) ; } public void addParam ( Property param ) { } }

Fix:
setProperty ( BASEDIR , getAntContext ( ) . getBaseDir ( ) . getAbsolutePath ( ) ) ;
Buggy code:
public class ExactTypePattern extends TypePattern { protected UnresolvedType type ; public static final Map primitiveTypesMap ; public static final Map boxedPrimitivesMap ; private static final Map boxedTypesMap ; public ExactTypePattern ( UnresolvedType type , boolean includeSubtypes , boolean isVarArgs ) { } public boolean isArray ( ) { } protected boolean couldEverMatchSameTypesAs ( TypePattern other ) { if ( super . couldEverMatchSameTypesAs ( other ) ) return true ; UnresolvedType otherType = other . getExactType ( ) ; <START_BUG> if ( otherType != ( ResolvedType . MISSING ) ) { <END_BUG> return type . equals ( otherType ) ; } if ( other instanceof WildTypePattern ) { WildTypePattern owtp = ( ( WildTypePattern ) ( other ) ) ; String yourSimpleNamePrefix = owtp . getNamePatterns ( ) [ 0 ] . maybeGetSimpleName ( ) ; if ( yourSimpleNamePrefix != null ) { return type . getName ( ) . startsWith ( yourSimpleNamePrefix ) ; } } return true ; } protected boolean matchesExactly ( ResolvedType matchType ) { } private boolean matchesTypeVariable ( TypeVariableReferenceType matchType ) { } protected boolean matchesExactly ( ResolvedType matchType , ResolvedType annotatedType ) { } public UnresolvedType getType ( ) { } public FuzzyBoolean matchesInstanceof ( ResolvedType matchType ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } private static final byte EXACT_VERSION = 1 ; public void write ( DataOutputStream out ) throws IOException { } public static TypePattern read ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public static TypePattern readTypePattern150 ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public static TypePattern readTypePatternOldStyle ( DataInputStream s , ISourceContext context ) throws IOException { } public String toString ( ) { } public TypePattern resolveBindings ( IScope scope , Bindings bindings , boolean allowBinding , boolean requireExactType ) { } public TypePattern parameterizeWith ( Map typeVariableMap ) { } public Object accept ( PatternNodeVisitor visitor , Object data ) { } }

Fix:
if ( ! ( ResolvedType . isMissing ( otherType ) ) ) {
Buggy code:
public class EventBusMessageListener implements XProcMessageListener { EventBusProvider eventBus ; MessageBuliderFactory messageBuilderFactory ; Properties props ; int sequence = 0 ; public EventBusMessageListener ( EventBusProvider eventBus , Properties props ) { } private void post ( MessageBuilder builder ) { <START_BUG> if ( ( props . getProperty ( "JOB_ID" ) ) != null ) { <END_BUG> builder . withJobId ( props . getProperty ( "JOB_ID" ) ) ; } builder . withSequence ( ( ( sequence ) ++ ) ) ; builder . withTimeStamp ( new Date ( ) ) ; eventBus . get ( ) . post ( builder . build ( ) ) ; } @ Override public void error ( Throwable exception ) { } @ Override public void error ( XProcRunnable step , XdmNode node , String message , QName qName ) { } @ Override public void fine ( XProcRunnable step , XdmNode node , String message ) { } @ Override public void finer ( XProcRunnable step , XdmNode node , String message ) { } @ Override public void finest ( XProcRunnable step , XdmNode node , String message ) { } @ Override public void info ( XProcRunnable step , XdmNode node , String message ) { } @ Override public void warning ( XProcRunnable step , XdmNode node , String message ) { } @ Override public void warning ( Throwable exception ) { } }

Fix:
if ( ( ( props ) != null ) && ( ( props . getProperty ( "JOB_ID" ) ) != null ) ) {
Buggy code:
public final class SelectionEngine extends Engine implements ISearchRequestor { public static boolean DEBUG = false ; public static boolean PERF = false ; SelectionParser parser ; ISelectionRequestor requestor ; boolean acceptedAnswer ; private int actualSelectionStart ; private int actualSelectionEnd ; private char [ ] selectedIdentifier ; private char [ ] [ ] [ ] acceptedClasses ; private int [ ] acceptedClassesModifiers ; private char [ ] [ ] [ ] acceptedInterfaces ; private int [ ] acceptedInterfacesModifiers ; private char [ ] [ ] [ ] acceptedEnums ; private int [ ] acceptedEnumsModifiers ; private char [ ] [ ] [ ] acceptedAnnotations ; private int [ ] acceptedAnnotationsModifiers ; int acceptedClassesCount ; int acceptedInterfacesCount ; int acceptedEnumsCount ; int acceptedAnnotationsCount ; boolean noProposal = true ; CategorizedProblem problem = null ; public SelectionEngine ( SearchableEnvironment nameEnvironment , ISelectionRequestor requestor , Map settings ) { } public void acceptType ( char [ ] packageName , char [ ] simpleTypeName , char [ ] [ ] enclosingTypeNames , int modifiers , AccessRestriction accessRestriction ) { } public void acceptPackage ( char [ ] packageName ) { } private void acceptQualifiedTypes ( ) { } private boolean checkSelection ( char [ ] source , int selectionStart , int selectionEnd ) { } private boolean checkTypeArgument ( Scanner scanner ) throws InvalidInputException { } public AssistParser getParser ( ) { } private boolean isLocal ( ReferenceBinding binding ) { if ( binding instanceof ParameterizedTypeBinding ) { <START_BUG> return isLocal ( ( ( ParameterizedTypeBinding ) ( binding ) ) . type ) ; <END_BUG> } if ( ! ( binding instanceof SourceTypeBinding ) ) return false ; if ( binding instanceof LocalTypeBinding ) return true ; if ( binding instanceof MemberTypeBinding ) { return isLocal ( ( ( MemberTypeBinding ) ( binding ) ) . enclosingType ) ; } return false ; } public void select ( ICompilationUnit sourceUnit , int selectionSourceStart , int selectionSourceEnd ) { } private void selectMemberTypeFromImport ( CompilationUnitDeclaration parsedUnit , char [ ] lastToken , ReferenceBinding ref , boolean staticOnly ) { } private void selectStaticFieldFromStaticImport ( CompilationUnitDeclaration parsedUnit , char [ ] lastToken , ReferenceBinding ref ) { } private void selectStaticMethodFromStaticImport ( CompilationUnitDeclaration parsedUnit , char [ ] lastToken , ReferenceBinding ref ) { } private void selectFrom ( Binding binding , CompilationUnitDeclaration parsedUnit , boolean isDeclaration ) { } private void selectLocalDeclaration ( ASTNode node ) { } public void selectType ( ISourceType sourceType , char [ ] typeName , SourceTypeElementInfo [ ] topLevelTypes , boolean searchInEnvironment ) { } private boolean selectDeclaration ( CompilationUnitDeclaration compilationUnit ) { } private boolean selectDeclaration ( TypeDeclaration typeDeclaration , char [ ] assistIdentifier , char [ ] packageName ) { } }

Fix:
return isLocal ( ( ( ParameterizedTypeBinding ) ( binding ) ) . genericType ( ) ) ;
Buggy code:
public class MixtureMultivariateRealDistribution < T extends MultivariateRealDistribution > extends AbstractMultivariateRealDistribution { private final double [ ] weight ; private final List < T > distribution ; public MixtureMultivariateRealDistribution ( List < Pair < Double , T > > components ) { } public MixtureMultivariateRealDistribution ( RandomGenerator rng , List < Pair < Double , T > > components ) { } public double density ( final double [ ] values ) { } @ Override public double [ ] sample ( ) { } @ Override public void reseedRandomGenerator ( long seed ) { } public List < Pair < Double , T > > getComponents ( ) { <START_BUG> final List < Pair < Double , T > > list = new ArrayList < Pair < Double , T > > ( ) ; <END_BUG> for ( int i = 0 ; i < ( weight . length ) ; i ++ ) { list . add ( new Pair < Double , T > ( weight [ i ] , distribution . get ( i ) ) ) ; } return list ; } }

Fix:
final List < Pair < Double , T > > list = new ArrayList < Pair < Double , T > > ( weight . length ) ;
Buggy code:
public class NodeEnvironmentTests extends ElasticsearchTestCase { private final Settings idxSettings = ImmutableSettings . builder ( ) . put ( SETTING_NUMBER_OF_SHARDS , 1 ) . build ( ) ; @ Test public void testNodeLockSingleEnvironment ( ) throws IOException { } @ Test public void testNodeLockMultipleEnvironment ( ) throws IOException { } @ Test public void testShardLock ( ) throws IOException { final NodeEnvironment env = newNodeEnvironment ( ) ; ShardLock fooLock = env . shardLock ( new ShardId ( "foo" , 0 ) ) ; assertEquals ( new ShardId ( "foo" , 0 ) , fooLock . getShardId ( ) ) ; try { env . shardLock ( new ShardId ( "foo" , 0 ) ) ; fail ( "shard<seq2seq4repair_space>is<seq2seq4repair_space>locked" ) ; } catch ( LockObtainFailedException ex ) { } for ( Path path : env . indexPaths ( new Index ( "foo" ) ) ) { Files . createDirectories ( path . resolve ( "0" ) ) ; Files . createDirectories ( path . resolve ( "1" ) ) ; } Settings settings = settingsBuilder ( ) . put ( IndexMetaData . SETTING_NUMBER_OF_SHARDS , randomIntBetween ( 1 , 10 ) ) . build ( ) ; try { env . lockAllForIndex ( new Index ( "foo" ) , settings , randomIntBetween ( 0 , 10 ) ) ; fail ( "shard<seq2seq4repair_space>0<seq2seq4repair_space>is<seq2seq4repair_space>locked" ) ; } catch ( LockObtainFailedException ex ) { } fooLock . close ( ) ; env . shardLock ( new ShardId ( "foo" , 0 ) ) . close ( ) ; List < ShardLock > locks = env . lockAllForIndex ( new Index ( "foo" ) , settings , randomIntBetween ( 0 , 10 ) ) ; try { <START_BUG> env . shardLock ( new ShardId ( "foo" , randomIntBetween ( 0 , 1 ) ) ) ; <END_BUG> fail ( "shard<seq2seq4repair_space>is<seq2seq4repair_space>locked" ) ; } catch ( LockObtainFailedException ex ) { } IOUtils . close ( locks ) ; assertTrue ( ( "LockedShards:<seq2seq4repair_space>" + ( env . lockedShards ( ) ) ) , env . lockedShards ( ) . isEmpty ( ) ) ; env . close ( ) ; } @ Test public void testGetAllIndices ( ) throws Exception { } @ Test public void testDeleteSafe ( ) throws IOException , InterruptedException { } @ Test public void testGetAllShards ( ) throws Exception { } @ Test public void testStressShardLock ( ) throws IOException , InterruptedException { } @ Test public void testCustomDataPaths ( ) throws Exception { } private Path [ ] stringsToPaths ( String [ ] strings , String additional ) { } public String [ ] tmpPaths ( ) { } public NodeEnvironment newNodeEnvironment ( ) throws IOException { } public NodeEnvironment newNodeEnvironment ( Settings settings ) throws IOException { } public NodeEnvironment newNodeEnvironment ( String [ ] dataPaths , Settings settings ) throws IOException { } }

Fix:
env . shardLock ( new ShardId ( "foo" , 0 ) ) ;
Buggy code:
class CollectionToArray extends AbstractCollectionConverter { public CollectionToArray ( TypeDescriptor sourceArrayType , TypeDescriptor targetCollectionType , GenericConversionService conversionService ) { } @ Override protected Object doExecute ( Object source ) throws Exception { } private ConversionExecutor getElementConverter ( Collection < ? > source ) { ConversionExecutor elementConverter = getElementConverter ( ) ; <START_BUG> if ( ( elementConverter == ( NoOpConversionExecutor . INSTANCE ) ) && ( ! ( source . isEmpty ( ) ) ) ) { <END_BUG> Iterator < ? > it = source . iterator ( ) ; while ( it . hasNext ( ) ) { Object value = it . next ( ) ; if ( value != null ) { elementConverter = getConversionService ( ) . getConversionExecutor ( value . getClass ( ) , TypeDescriptor . valueOf ( getTargetElementType ( ) ) ) ; break ; } } } return elementConverter ; } }

Fix:
if ( elementConverter == ( NoOpConversionExecutor . INSTANCE ) ) {
Buggy code:
public class StrokeNormalizer { private static final int DEFAULT_DESIRED_STROKE_LENGTH = 32 ; public StrokeNormalizer ( StrokeSet strokeSet ) { } public void setDesiredStrokeSize ( int size ) { } public StrokeSet getNormalizedSet ( ) { } private void splitStrokeAtFeaturePoints ( Stroke origStroke ) { mSplitStrokeList = new ArrayList ( ) ; <START_BUG> if ( true ) { <END_BUG> unimp ( "splitStrokeAtFeaturePoints:<seq2seq4repair_space>cutting<seq2seq4repair_space>in<seq2seq4repair_space>two" ) ; int q = ( origStroke . length ( ) ) // 2 ; mSplitStrokeList . add ( origStroke . constructFragment ( 0 , ( 1 + q ) ) ) ; mSplitStrokeList . add ( origStroke . constructFragment ( q , origStroke . length ( ) ) ) ; return ; } unimp ( "splitStrokeAtFeaturePoints:<seq2seq4repair_space>determine<seq2seq4repair_space>which<seq2seq4repair_space>points<seq2seq4repair_space>are<seq2seq4repair_space>feature<seq2seq4repair_space>points" ) ; mSplitStrokeList . add ( origStroke ) ; } private int calculateInterpolatedPointsCount ( ) { } private Stroke normalizeStroke ( Stroke originalStroke ) { } private StrokeSet mSet ; private StrokeSet mNormalized ; private int mDesiredStrokeSize ; private ArrayList < Stroke > mSplitStrokeList ; }

Fix:
if ( false ) {
Buggy code:
public abstract class PerDocConsumer implements Closeable { public abstract DocValuesConsumer addValuesField ( DocValues . Type type , FieldInfo field ) throws IOException { } public void merge ( MergeState mergeState ) throws IOException { final DocValues [ ] docValues = new DocValues [ mergeState . readers . size ( ) ] ; for ( FieldInfo fieldInfo : mergeState . fieldInfos ) { mergeState . fieldInfo = fieldInfo ; if ( canMerge ( fieldInfo ) ) { for ( int i = 0 ; i < ( docValues . length ) ; i ++ ) { <START_BUG> docValues [ i ] = getDocValuesForMerge ( mergeState . readers . get ( i ) . reader , fieldInfo ) ; <END_BUG> } Type docValuesType = getDocValuesType ( fieldInfo ) ; assert docValuesType != null ; final DocValuesConsumer docValuesConsumer = addValuesField ( docValuesType , fieldInfo ) ; assert docValuesConsumer != null ; docValuesConsumer . merge ( mergeState , docValues ) ; } } } protected DocValues getDocValuesForMerge ( AtomicReader reader , FieldInfo info ) throws IOException { } protected boolean canMerge ( FieldInfo info ) { } protected Type getDocValuesType ( FieldInfo info ) { } public abstract void abort ( ) { } }

Fix:
docValues [ i ] = getDocValuesForMerge ( mergeState . readers . get ( i ) , fieldInfo ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class CodeEduGameServlet extends HttpServlet { private final int STARTING_MONEY = 100 ; public void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException { } private void deleteGame ( Blackjack game , PersistenceManager pm , HttpServletResponse resp ) { } private String getNewGameId ( User user , PersistenceManager pm , HttpServletResponse resp ) { } private Blackjack getGame ( User user , PersistenceManager pm , HttpServletResponse resp ) { } private void attemptStartNextRound ( Blackjack game , HttpServletRequest req , HttpServletResponse resp ) { } private void attemptDoubleDown ( Blackjack game , HttpServletRequest req , HttpServletResponse resp ) { } private void attemptStand ( Blackjack game , HttpServletRequest req , HttpServletResponse resp ) { } private void attemptHit ( Blackjack game , HttpServletRequest req , HttpServletResponse resp ) { } private void attemptBid ( Blackjack game , HttpServletRequest req , HttpServletResponse resp ) { } private void sendError ( String error , HttpServletResponse resp , Blackjack game ) { JSONObject respObj = new JSONObject ( ) ; try { respObj . put ( "msg" , error ) ; respObj . put ( "isSuccess" , false ) ; if ( game != null ) { <START_BUG> respObj . put ( "gameObj" , game ) ; <END_BUG> } resp . getWriter ( ) . print ( respObj . toString ( ) ) ; } catch ( JSONException e ) { throw new RuntimeException ( e . getMessage ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e . getMessage ( ) ) ; } } private void sendSuccess ( Blackjack game , HttpServletResponse resp , HttpServletRequest req ) { } private void sendURL ( HttpServletResponse resp , HttpServletRequest req ) { } private void sendName ( HttpServletResponse resp ) { } private User getUser ( ) { } private JSONObject assembleGameObj ( Blackjack game ) { } }

Fix:
respObj . put ( "gameObj" , assembleGameObj ( game ) ) ;
Buggy code:
@ Component ( immediate = true ) public class MediaAttachmentDataProcessor implements ContentProcessor { public static final String CONTENT_DATA_MEDIA_TEXT_PROPERTY = "text" ; @ Override public boolean supports ( final ContentType contentType ) { <START_BUG> return ( contentType . getName ( ) . isDescendantOfMedia ( ) ) || ( contentType . getName ( ) . isDescendantOfMedia ( ) ) ; <END_BUG> } @ Override public ProcessCreateResult processCreate ( final ProcessCreateParams params ) { } private PropertyTree populateDataWithAttachmentText ( final ProcessCreateParams params , final CreateContentParams createContentParams ) { } private CreateAttachments removeTextFromAttachments ( final CreateAttachments createAttachments ) { } @ Override public ProcessUpdateResult processUpdate ( final ProcessUpdateParams params ) { } private class AttachmentEditor implements ContentEditor { private final CreateAttachments createAttachments ; public AttachmentEditor ( final CreateAttachments createAttachments ) { } @ Override public void edit ( final EditableContent edit ) { } } }

Fix:
return ( contentType . getName ( ) . isMedia ( ) ) || ( contentType . getName ( ) . isDescendantOfMedia ( ) ) ;
Buggy code:
public class CookieManager extends ConfigTestElement implements Serializable , TestListener { private static final long serialVersionUID = 233L ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String CLEAR = "CookieManager.clearEachIteration" ; private static final String COOKIES = "CookieManager.cookies" ; private static final String POLICY = "CookieManager.policy" ; private static final String TAB = "\t" ; private static final boolean DELETE_NULL_COOKIES = JMeterUtils . getPropDefault ( "CookieManager.delete_null_cookies" , true ) ; private static final boolean ALLOW_VARIABLE_COOKIES = JMeterUtils . getPropDefault ( "CookieManager.allow_variable_cookies" , true ) ; private static final String COOKIE_NAME_PREFIX = JMeterUtils . getPropDefault ( "CookieManager.name.prefix" , "COOKIE_" ) . trim ( ) ; private static final boolean SAVE_COOKIES = JMeterUtils . getPropDefault ( "CookieManager.save.cookies" , false ) ; private static final boolean CHECK_COOKIES = JMeterUtils . getPropDefault ( "CookieManager.check.cookies" , true ) ; private transient CookieSpec cookieSpec ; private transient CollectionProperty initialCookies ; public static final String DEFAULT_POLICY = CookiePolicy . BROWSER_COMPATIBILITY ; public CookieManager ( ) { } @ Override public Object clone ( ) { } public String getPolicy ( ) { } public void setCookiePolicy ( String policy ) { } public CollectionProperty getCookies ( ) { } public int getCookieCount ( ) { } public boolean getClearEachIteration ( ) { } public void setClearEachIteration ( boolean clear ) { } public void save ( String authFile ) throws IOException { } public void addFile ( String cookieFile ) throws IOException { } private String cookieToString ( Cookie c ) { } @ Override public void recoverRunningVersion ( ) { } @ Override public void setRunningVersion ( boolean running ) { } public void add ( Cookie c ) { } @ Override public void clear ( ) { } private void clearCookies ( ) { } public void remove ( int index ) { } public Cookie get ( int i ) { } private org . apache . commons . httpclient . Cookie makeCookie ( Cookie jmc ) { } public org . apache . commons . httpclient . Cookie [ ] getCookiesForUrl ( URL url ) { } public String getCookieHeaderForURL ( URL url ) { } public void addCookieFromHeader ( String cookieHeader , URL url ) { } private boolean match ( Cookie a , Cookie b ) { } private void removeMatchingCookies ( Cookie newCookie ) { } public void testStarted ( ) { } public void testEnded ( ) { } public void testStarted ( String host ) { } public void testEnded ( String host ) { } public void testIterationStart ( LoopIterationEvent event ) { if ( getClearEachIteration ( ) ) { CookieManager . log . debug ( "Initialise<seq2seq4repair_space>cookies<seq2seq4repair_space>from<seq2seq4repair_space>pre-defined<seq2seq4repair_space>list" ) ; <START_BUG> setProperty ( ( ( CollectionProperty ) ( initialCookies . clone ( ) ) ) ) ; <END_BUG> } } public static String [ ] getCookieSpecs ( ) { } }

Fix:
setProperty ( initialCookies . clone ( ) ) ;
Buggy code:
public abstract class DocValues { public byte byteVal ( int doc ) { } public short shortVal ( int doc ) { } public float floatVal ( int doc ) { } public int intVal ( int doc ) { } public long longVal ( int doc ) { } public double doubleVal ( int doc ) { } public String strVal ( int doc ) { } public boolean boolVal ( int doc ) { } public boolean bytesVal ( int doc , BytesRef target ) { String s = strVal ( doc ) ; if ( s == null ) { target . length = 0 ; return false ; } <START_BUG> target . copy ( s ) ; <END_BUG> return true ; } public Object objectVal ( int doc ) { } public boolean exists ( int doc ) { } public int ordVal ( int doc ) { } public int numOrd ( ) { } public abstract String toString ( int doc ) { } public abstract static class ValueFiller { public abstract MutableValue getValue ( ) { } public abstract void fillValue ( int doc ) { } } public DocValues . ValueFiller getValueFiller ( ) { } public void byteVal ( int doc , byte [ ] vals ) { } public void shortVal ( int doc , short [ ] vals ) { } public void floatVal ( int doc , float [ ] vals ) { } public void intVal ( int doc , int [ ] vals ) { } public void longVal ( int doc , long [ ] vals ) { } public void doubleVal ( int doc , double [ ] vals ) { } public void strVal ( int doc , String [ ] vals ) { } public Explanation explain ( int doc ) { } public ValueSourceScorer getScorer ( IndexReader reader ) { } public ValueSourceScorer getRangeScorer ( IndexReader reader , String lowerVal , String upperVal , boolean includeLower , boolean includeUpper ) { } }

Fix:
target . copyChars ( s ) ;