nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CloudSolrServer extends SolrServer { private volatile ZkController zkController ; private String zkHost ; private int zkConnectTimeout = 10000 ; private int zkClientTimeout = 10000 ; private String defaultCollection ; private LBHttpSolrServer lbServer ; Random rand = new Random ( ) ; public CloudSolrServer ( String zkHost ) throws MalformedURLException { } public CloudSolrServer ( String zkHost , LBHttpSolrServer lbServer ) { } public void setDefaultCollection ( String collection ) { } public void setZkConnectTimeout ( int zkConnectTimeout ) { } public void setZkClientTimeout ( int zkClientTimeout ) { } public void connect ( ) { if ( ( zkController ) != null ) return ; synchronized ( this ) { if ( ( zkController ) != null ) return ; try { ZkController zk = new ZkController ( zkHost , zkConnectTimeout , zkClientTimeout , null , null , null ) ; zk . addShardZkNodeWatches ( ) ; <START_BUG> zk . updateCloudState ( true ) ; <END_BUG> zkController = zk ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throw new ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } catch ( KeeperException e ) { throw new ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } catch ( IOException e ) { throw new ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } catch ( TimeoutException e ) { throw new ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } } } @ Override public NamedList < Object > request ( SolrRequest request ) throws IOException , SolrServerException { } public void close ( ) { } }

Fix:
zk . getZkStateReader ( ) . updateCloudState ( true ) ;
Buggy code:
public class ModelField { private static String DEFAULT_ID_FIELD = "id" ; private final Class < ? extends ModelWithId > model ; private final Enum field ; private final Class type ; private ModelField ( Class < ? extends ModelWithId > model , Enum field , Class type ) { } public static ModelField key ( Class < ? extends ModelWithId > model ) { } public static ModelField field ( Class < ? extends ModelWithId > model , Enum field , Class fieldType ) { } public Class < ? extends ModelWithId > getModel ( ) { } public Enum getField ( ) { } public Class getType ( ) { } public String getSqlKeyword ( ) { String fieldKeyword = ( ( field ) != null ) ? field . toString ( ) : ModelField . DEFAULT_ID_FIELD ; if ( ( model ) != null ) { <START_BUG> return ( ( Utility . getTableNameFromModel ( model ) ) + "." ) + fieldKeyword ; <END_BUG> } else { return fieldKeyword ; } } @ Override public String toString ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object that ) { } }

Fix:
return ( ( Utility . getTableName ( model ) ) + "." ) + fieldKeyword ;
Buggy code:
public class WSNTools { public static ObjectFactory b2_factory = new ObjectFactory ( ) ; public static org . oasis_open . docs . wsn . t_1 . ObjectFactory t1_factory = new org . oasis_open . docs . wsn . t_1 . ObjectFactory ( ) ; public static final String _ConcreteTopicExpression = "http:////docs.oasis-open.org//wsn//t-1//TopicExpression//Concrete" ; public static final String _SimpleTopicExpression = "http:////docs.oasis-open.org//wsn//t-1//TopicExpression//Simple" ; public static Notify generateNotificationMessage ( Message message , String subscriptionReference , String publisherReference , String dialect ) { Notify notify = WSNTools . b2_factory . createNotify ( ) ; NotificationMessageHolderType holderType = WSNTools . b2_factory . createNotificationMessageHolderType ( ) ; NotificationMessageHolderType . Message innerMessage = WSNTools . b2_factory . createNotificationMessageHolderTypeMessage ( ) ; @ SuppressWarnings ( "unchecked" ) <START_BUG> JAXBElement msg = new JAXBElement ( new QName ( "npex:NotifyContent" ) , String . class , message . getMessage ( ) ) ; <END_BUG> if ( subscriptionReference != null ) { holderType . setSubscriptionReference ( new W3CEndpointReferenceBuilder ( ) . address ( subscriptionReference ) . build ( ) ) ; } if ( publisherReference != null ) { holderType . setProducerReference ( new W3CEndpointReferenceBuilder ( ) . address ( publisherReference ) . build ( ) ) ; } if ( dialect != null ) { TopicExpressionType topicType = WSNTools . b2_factory . createTopicExpressionType ( ) ; topicType . setDialect ( dialect ) ; topicType . getContent ( ) . add ( message . getTopic ( ) . getFullTopicString ( ) ) ; holderType . setTopic ( topicType ) ; } innerMessage . setAny ( msg ) ; holderType . setMessage ( innerMessage ) ; notify . getNotificationMessage ( ) . add ( holderType ) ; return notify ; } }

Fix:
JAXBElement msg = new JAXBElement ( new QName ( "NotifyContent" ) , String . class , message . getMessage ( ) ) ;
Buggy code:
public class RestTest { GenDao qrDao = instance . getQrCodeDao ( ) ; GenDao userDao = instance . getUserDao ( ) ; GenDao eventDao = instance . getEventDao ( ) ; @ Before public void init ( ) { } @ Test public void testQrRestAllOK ( ) throws IOException { } @ Test public void testQrRestWrongUnkownQrCode ( ) throws IOException { } @ Test public void testQrRestWrongUser ( ) throws IOException { } @ Test public void testQrRestWrongRole ( ) throws IOException { } @ Test public void testEventRest ( ) throws IOException { <START_BUG> Event orig = new Event ( "eventname" , "description" , "2015-01-01" , "2015-01-01" ) ; <END_BUG> int elementID = eventDao . addElement ( orig ) ; String response = "" ; try { RestTest . turnOffSslChecking ( ) ; response = doURL ( ( "https:////localhost:8443//hlmng//rest//event//" + elementID ) , "GET" ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } orig . setEventID ( elementID ) ; Genson genson = new Genson ( ) ; Event excpected = genson . deserialize ( response , Event . class ) ; assertTrue ( eventDao . deleteElement ( elementID ) ) ; assertTrue ( ModelHelper . Compare ( excpected , orig ) ) ; } private String doURL ( String url , String method ) throws Exception { } private static final TrustManager [ ] UNQUESTIONING_TRUST_MANAGER = new TrustManager [ ] { new X509TrustManager ( ) { public X509Certificate [ ] getAcceptedIssuers ( ) { } @ Override public void checkClientTrusted ( X509Certificate [ ] arg0 , String arg1 ) throws CertificateException { } @ Override public void checkServerTrusted ( X509Certificate [ ] arg0 , String arg1 ) throws CertificateException { } } } ; public static void turnOffSslChecking ( ) throws KeyManagementException , NoSuchAlgorithmException { } public static void turnOnSslChecking ( ) throws KeyManagementException , NoSuchAlgorithmException { } }

Fix:
Event orig = new Event ( "eventname" , "description" , "2015-01-01" , "2015-01-01" , true ) ;
Buggy code:
public class TwitterBootstrapRestFailurePageRenderer extends TwitterBootstrapPageWriter { private final RestFailure failure ; private boolean jiraEnabled = false ; private String jiraEndpoint ; private int jiraPid ; private int jiraIssueType ; private String [ ] highlightTerms = null ; private boolean renderJvmInfo = false ; private boolean renderStackTrace = false ; private boolean renderRequestInfo = false ; private boolean renderRequestAttributes = false ; public TwitterBootstrapRestFailurePageRenderer ( RestFailure failure ) { } public void enableJIRA ( String endpoint , int pid , int issueType ) { } public void setHighlightTerms ( String [ ] terms ) { } @ Override protected String getTitle ( ) { <START_BUG> if ( ( failure . exception . detail . length ( ) ) < 1024 ) <END_BUG> return ( ( failure . exception . shortName ) + ":<seq2seq4repair_space>" ) + ( failure . exception . detail ) ; else return failure . exception . shortName ; } @ Override protected void writeCustomHeadContent ( StringBuilder sb ) { } private void writeJIRA ( StringBuilder sb ) { } @ Override protected void writeBodyContent ( StringBuilder sb ) { } protected void appendHeader ( StringBuilder sb ) { } @ SuppressWarnings ( "unchecked" ) private void appendRequestDetails ( StringBuilder sb ) { } private void appendJVMDetails ( StringBuilder sb ) { } private void appendAllSimpleGetters ( StringBuilder sb , Object o ) { } private void appendKeyValueListElement ( StringBuilder sb , String key , Object value ) { } private void appendException ( StringBuilder sb , ExceptionInfo info ) { } private void appendStacktrace ( StringBuilder sb , ExceptionInfo info ) { } private void appendStacktraceLine ( StringBuilder sb , String line ) { } public void enableJVMInfo ( ) { } public void enableStackTrace ( ) { } public void enableRequestInfo ( ) { } }

Fix:
if ( ( ( failure . exception . detail ) == null ) || ( ( failure . exception . detail . length ( ) ) < 1024 ) )
Buggy code:
public class EclipseFactory { public static boolean DEBUG = false ; public AjBuildManager buildManager ; private LookupEnvironment lookupEnvironment ; private Map typexToBinding = new HashMap ( ) ; public static EclipseFactory fromLookupEnvironment ( LookupEnvironment env ) { } public static EclipseFactory fromScopeLookupEnvironment ( Scope scope ) { } public EclipseFactory ( LookupEnvironment lookupEnvironment ) { } public World getWorld ( ) { } public void showMessage ( Kind kind , String message , ISourceLocation loc1 , ISourceLocation loc2 ) { } public ResolvedTypeX fromEclipse ( ReferenceBinding binding ) { } public ResolvedTypeX [ ] fromEclipse ( ReferenceBinding [ ] bindings ) { } private static String getName ( TypeBinding binding ) { } public static TypeX fromBinding ( TypeBinding binding ) { } public static TypeX [ ] fromBindings ( TypeBinding [ ] bindings ) { } public static ASTNode astForLocation ( IHasPosition location ) { } public Collection getDeclareParents ( ) { } public Collection finishedTypeMungers = null ; public boolean areTypeMungersFinished ( ) { } public void finishTypeMungers ( ) { } public EclipseTypeMunger makeEclipseTypeMunger ( ConcreteTypeMunger concrete ) { } public Collection getTypeMungers ( ) { } public static ResolvedMember makeResolvedMember ( MethodBinding binding ) { } public static ResolvedMember makeResolvedMember ( MethodBinding binding , TypeBinding declaringType ) { } public static ResolvedMember makeResolvedMember ( FieldBinding binding ) { } public static ResolvedMember makeResolvedMember ( FieldBinding binding , TypeBinding receiverType ) { } public TypeBinding makeTypeBinding ( TypeX typeX ) { } private TypeBinding makeTypeBinding1 ( TypeX typeX ) { } public TypeBinding [ ] makeTypeBindings ( TypeX [ ] types ) { } private ReferenceBinding [ ] makeReferenceBindings ( TypeX [ ] types ) { } public FieldBinding makeFieldBinding ( ResolvedMember member ) { } public MethodBinding makeMethodBinding ( ResolvedMember member ) { } public MethodBinding makeMethodBindingForCall ( Member member ) { } public void finishedCompilationUnit ( CompilationUnitDeclaration unit ) { if ( buildManager . doGenerateModel ( ) ) { <START_BUG> AsmHierarchyBuilder . build ( unit , buildManager . getStructureModel ( ) ) ; <END_BUG> } } public void addTypeBinding ( TypeBinding binding ) { } public Shadow makeShadow ( ASTNode location , ReferenceContext context ) { } public Shadow makeShadow ( ReferenceContext context ) { } public void addSourceTypeBinding ( SourceTypeBinding binding ) { } }

Fix:
AsmHierarchyBuilder . build ( unit , buildManager . getStructureModel ( ) , buildManager . buildConfig ) ;
Buggy code:
public class RolloutPlanTestCase extends AbstractCliTestBase { private static WebArchive war ; private static File warFile ; private static final int TEST_PORT = 8081 ; private static final String [ ] serverGroups = new String [ ] { "main-server-group" , "other-server-group" , "test-server-group" } ; @ BeforeClass public static void before ( ) throws Exception { } @ AfterClass public static void after ( ) throws Exception { } @ Test public void testInSeriesRolloutPlan ( ) throws Exception { } @ Test public void testMaxFailServersRolloutPlan ( ) throws Exception { } @ Test public void testMaxFailServersPercentageRolloutPlan ( ) throws Exception { } @ Test public void testRollbackAcrossGroupsRolloutPlan ( ) throws Exception { } private CLIOpResult testAddConnector ( String rolloutPlanId ) throws Exception { } private CLIOpResult testRemoveConnector ( String rolloutPlanId ) throws Exception { <START_BUG> cli . sendLine ( ( ( ( "//profile=default//subsystem=web//connector=test-http:remove" + "{rollout<seq2seq4repair_space>id=" ) + rolloutPlanId ) + "}" ) ) ; <END_BUG> return cli . readAllAsOpResult ( ) ; } private boolean getServerStatus ( String serverName , CLIOpResult result ) throws Exception { } private static String checkURL ( String server , boolean shouldFail ) throws Exception { } private static String checkURL ( String server , boolean shouldFail , String path ) throws Exception { } private static String getServerHost ( String server ) { } private static void waitUntilState ( final String serverName , final String state ) throws TimeoutException { } }

Fix:
cli . sendLine ( ( ( ( "//profile=default//subsystem=web//connector=test-http:remove" + "{rollout<seq2seq4repair_space>id=" ) + rolloutPlanId ) + ";<seq2seq4repair_space>allow-resource-service-restart=true}" ) ) ;
Buggy code:
@ SupportedOptions ( { "debug" , "verify" } ) public class AutoServiceProcessor extends AbstractProcessor { private Multimap < String , String > providers = HashMultimap . create ( ) ; @ Override public ImmutableSet < String > getSupportedAnnotationTypes ( ) { } @ Override public SourceVersion getSupportedSourceVersion ( ) { } @ Override public boolean process ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { } private boolean processImpl ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { } private void processAnnotations ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { } private void generateConfigFiles ( ) { } private boolean checkImplementer ( TypeElement providerImplementer , TypeElement providerType ) { } private String getBinaryName ( TypeElement element ) { } private String getBinaryNameImpl ( TypeElement element , String className ) { } private List < Type > getProviderInterface ( AnnotationMirror providerAnnotation ) { Map < ? extends ExecutableElement , ? extends AnnotationValue > valueIndex = providerAnnotation . getElementValues ( ) ; log ( ( "annotation<seq2seq4repair_space>values:<seq2seq4repair_space>" + valueIndex ) ) ; AnnotationValue annotationValue = valueIndex . values ( ) . iterator ( ) . next ( ) ; final Object value = annotationValue . getValue ( ) ; final List < Type > result = new LinkedList < Type > ( ) ; for ( Object declaredType : ( ( List < ? > ) ( value ) ) ) { <START_BUG> result . add ( ( ( Attribute . Class ) ( declaredType ) ) . classType ) ; <END_BUG> } return result ; } private void log ( String msg ) { } private void error ( String msg , Element element , AnnotationMirror annotation ) { } private void fatalError ( String msg ) { } }

Fix:
result . add ( ( ( com . sun . tools . javac . code . Attribute . Class ) ( declaredType ) ) . getValue ( ) ) ;
Buggy code:
public class UpdateSourcesAction extends AnAction { public void actionPerformed ( AnActionEvent e ) { <START_BUG> PerlInternalParser . start ( e . getData ( MODULE ) ) ; <END_BUG> } }

Fix:
PerlInternalParser . start ( e . getProject ( ) ) ;
Buggy code:
public class CaseInsensitiveMapTest < K , V > extends AbstractIterableMapTest < K , V > { public CaseInsensitiveMapTest ( final String testName ) { } public static Test suite ( ) { } @ Override public CaseInsensitiveMap < K , V > makeObject ( ) { } @ Override public String getCompatibilityVersion ( ) { } @ SuppressWarnings ( "unchecked" ) public void testCaseInsensitive ( ) { } @ SuppressWarnings ( "unchecked" ) public void testNullHandling ( ) { } public void testPutAll ( ) { final Map < Object , String > map = new HashMap < Object , String > ( ) ; map . put ( "One" , "One" ) ; map . put ( "Two" , "Two" ) ; map . put ( "one" , "Three" ) ; map . put ( null , "Four" ) ; <START_BUG> map . put ( new Integer ( 20 ) , "Five" ) ; <END_BUG> final Map < Object , String > caseInsensitiveMap = new CaseInsensitiveMap < Object , String > ( map ) ; CaseInsensitiveMapTest . assertEquals ( 4 , caseInsensitiveMap . size ( ) ) ; final Set < Object > keys = caseInsensitiveMap . keySet ( ) ; CaseInsensitiveMapTest . assertTrue ( keys . contains ( "one" ) ) ; CaseInsensitiveMapTest . assertTrue ( keys . contains ( "two" ) ) ; CaseInsensitiveMapTest . assertTrue ( keys . contains ( null ) ) ; CaseInsensitiveMapTest . assertTrue ( keys . contains ( Integer . toString ( 20 ) ) ) ; CaseInsensitiveMapTest . assertEquals ( 4 , keys . size ( ) ) ; CaseInsensitiveMapTest . assertTrue ( ( ( ! ( caseInsensitiveMap . containsValue ( "One" ) ) ) || ( ! ( caseInsensitiveMap . containsValue ( "Three" ) ) ) ) ) ; CaseInsensitiveMapTest . assertEquals ( "Four" , caseInsensitiveMap . get ( null ) ) ; } @ SuppressWarnings ( "unchecked" ) public void testClone ( ) { } public void testLocaleIndependence ( ) { } public void testInitialCapacityZero ( ) { } }

Fix:
map . put ( Integer . valueOf ( 20 ) , "Five" ) ;
Buggy code:
public class ACLUtils { public static boolean isValidPrincipal ( RoleAssignmentType type , String name ) { } public static String extractDomainName ( String name ) { } public static String stripDomainName ( String name ) { } public static boolean validateDomain ( String name ) { } public static boolean validateAuthProviderDomain ( String name ) { String domain = ACLUtils . extractDomainName ( name ) ; List < AuthnProviderRestRep > authnProviderRestReps = AuthnProviderUtils . getAuthProvidersByDomainName ( domain ) ; <START_BUG> return ( authnProviderRestReps != null ) && ( ( authnProviderRestReps . size ( ) ) > 0 ) ; <END_BUG> } private static Pattern [ ] getCompiledPatterns ( Set < String > valueSet ) { } private static boolean isGroupOnWhiteList ( Set < String > valueSet , String groupId ) { } public static boolean validateActiveDirectoryGroupName ( String name ) { } public static boolean isActiveDirectoryProvider ( AuthnProviderRestRep authnProviderRestRep ) { } public static void validateAclEntries ( String fieldName , List < AclEntryForm > aclEntries ) { } public static List < AclEntryForm > convertToAclEntryForms ( List < ACLEntry > acls ) { } public static void updateACLs ( ACLResources aclResource , URI id , List < AclEntryForm > aclEntries ) { } }

Fix:
return ( authnProviderRestReps != null ) && ( ! ( authnProviderRestReps . isEmpty ( ) ) ) ;
Buggy code:
public class RMIClient { private final Connection con ; private Registry registry ; private ServerInterface rmiServer ; private int index = - 1 ; private boolean connected = false ; private final Hashtable < String , Object > properties ; public RMIClient ( final Connection con , final Hashtable < String , Object > properties ) { } public int connect ( ) { connected = false ; try { registry = LocateRegistry . getRegistry ( con . getAddress ( ) , con . getPort ( ) ) ; rmiServer = ( ( ServerInterface ) ( registry . lookup ( "jrdc" ) ) ) ; <START_BUG> index = rmiServer . startViewer ( InetAddrUtility . getLocalHost ( ) , con . getUsername ( ) , SecurityUtility . encrypt ( con . getPassword ( ) , "JRDCSECURE123456789" , 2 ) , properties ) ; <END_BUG> switch ( index ) { case - 1 : Configuration . displayError ( "Error<seq2seq4repair_space>-<seq2seq4repair_space>Invalid<seq2seq4repair_space>username//password<seq2seq4repair_space>entered!" , "Authentication<seq2seq4repair_space>Failed" ) ; return - 1 ; } connected = true ; return index ; } catch ( final Exception e ) { Configuration . displayError ( e , "Fatal<seq2seq4repair_space>Error" ) ; return - 1 ; } } public void disconnect ( ) { } public ServerInterface getServer ( ) { } public boolean isConnected ( ) { } public void Start ( ) { } }

Fix:
index = rmiServer . startViewer ( InetAddrUtility . getLocalHost ( ) , con . getUsername ( ) , SecurityUtility . encrypt ( con . getPassword ( ) , "JRDCSECURE123456789" ) , properties ) ;
Buggy code:
public abstract class ClearCase extends Task { private String m_ClearToolDir = "" ; private String m_viewPath = null ; public final void setClearToolDir ( String dir ) { } protected final String getClearToolCommand ( ) { } public final void setViewPath ( String viewPath ) { } public String getViewPath ( ) { } protected int run ( Commandline cmd ) { try { Project aProj = getProject ( ) ; Execute exe = new Execute ( new org . apache . tools . ant . taskdefs . LogStreamHandler ( this , Project . MSG_INFO , Project . MSG_WARN ) ) ; exe . setAntRun ( aProj ) ; exe . setWorkingDirectory ( aProj . getBaseDir ( ) ) ; exe . setCommandline ( cmd . getCommandline ( ) ) ; return exe . execute ( ) ; } catch ( IOException e ) { <START_BUG> throw new org . apache . tools . ant . BuildException ( e , location ) ; <END_BUG> } } private static final String CLEARTOOL_EXE = "cleartool" ; public static final String COMMAND_UPDATE = "update" ; public static final String COMMAND_CHECKOUT = "checkout" ; public static final String COMMAND_CHECKIN = "checkin" ; public static final String COMMAND_UNCHECKOUT = "uncheckout" ; }

Fix:
throw new org . apache . tools . ant . BuildException ( e , getLocation ( ) ) ;
Buggy code:
public class MockFilterChain implements FilterChain { private RuntimeException runtimeException = null ; private IOException ioException = null ; private ServletException servletException = null ; private byte [ ] outputData = null ; private String contentType = null ; private long sleepTimeInMillis = 0 ; public void doFilter ( ServletRequest request , ServletResponse response ) throws IOException , ServletException { if ( ( this . runtimeException ) != null ) { throw this . runtimeException ; } if ( ( this . ioException ) != null ) { throw this . ioException ; } if ( ( this . servletException ) != null ) { throw this . servletException ; } try { Thread . sleep ( sleepTimeInMillis ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } if ( ( contentType ) != null ) { response . setContentType ( contentType ) ; } if ( ( outputData ) != null ) { <START_BUG> response . setContentLength ( contentType . length ( ) ) ; <END_BUG> response . getOutputStream ( ) . write ( outputData ) ; } if ( ( response != null ) && ( ( response . getOutputStream ( ) ) != null ) ) { response . getOutputStream ( ) . flush ( ) ; response . getOutputStream ( ) . close ( ) ; } } public void setRuntimeException ( RuntimeException runtimeException ) { } public void setIoException ( IOException ioException ) { } public void setServletException ( ServletException servletException ) { } public long getSleepTimeInMillis ( ) { } public void setSleepTimeInMillis ( long sleepTimeInMillis ) { } public byte [ ] getOutputData ( ) { } public void setOutputData ( byte [ ] outputData ) { } public String getContentType ( ) { } public void setContentType ( String contentType ) { } }

Fix:
response . setContentLength ( outputData . toString ( ) . length ( ) ) ;
Buggy code:
public class Main implements MouseListener { private int fps = 60 ; private boolean isRunning = true ; public static Deck playerDeck = null ; public static Deck enemyDeck = null ; private int [ ] buttonSize = new int [ ] { 100 , 40 } ; public static int gameState = 1 ; public static int [ ] [ ] inHandBoxes = new int [ 9 ] [ 2 ] ; public static int [ ] [ ] playerOnTableBoxes = new int [ 9 ] [ 2 ] ; public static int [ ] [ ] playerOnSpellsBoxes = new int [ 2 ] [ 2 ] ; public static int [ ] [ ] enemyOnTableBoxes = new int [ 9 ] [ 2 ] ; public static int [ ] [ ] heroBoxes = new int [ 2 ] [ 2 ] ; public static void main ( String [ ] args ) { } public Main ( ) { } public Main ( Component d ) { } private void initialize ( ) { } public void run ( ) { } void update ( int gameS ) { } private void playCard ( ) { <START_BUG> for ( int i = 0 ; i < ( Main . inHandBoxes . length ) ; i ++ ) { <END_BUG> if ( ( Main . inHandBoxes [ i ] [ 1 ] ) == 1 ) { if ( ( Main . playerDeck . getHandCard ( i ) . getSpecial ( ) ) == 2 ) { int tableSize = Main . playerDeck . onTable . size ( ) ; for ( i = 0 ; i < tableSize ; i ++ ) { Main . playerDeck . onTable . get ( i ) . buffDefense ( 1 ) ; } } else if ( ( Main . playerDeck . getHandCard ( i ) . getSpecial ( ) ) == 3 ) { int tableSize = Main . playerDeck . onTable . size ( ) ; for ( i = 0 ; i < tableSize ; i ++ ) { Main . playerDeck . onTable . get ( i ) . buffAttack ( 1 ) ; } } else if ( ( Main . playerDeck . getHandCard ( i ) . getSpecial ( ) ) == 5 ) { int tableSize = Main . playerDeck . onTable . size ( ) ; for ( i = 0 ; i < tableSize ; i ++ ) { if ( ( Main . playerDeck . onTable . get ( i ) . getSpecial ( ) ) == 5 ) { } } } Main . playerDeck . cardPlay ( i ) ; clearSelected ( ) ; } } } private void buttonClickBoxes ( int x , int y ) { } private void clearSelected ( ) { } private void clickBoxes ( int x , int y ) { } @ Override public void mouseClicked ( MouseEvent e ) { } @ Override public void mouseEntered ( MouseEvent e ) { } @ Override public void mouseExited ( MouseEvent e ) { } @ Override public void mousePressed ( MouseEvent e ) { } @ Override public void mouseReleased ( MouseEvent e ) { } public static void setPlayerDeck ( Deck a ) { } public static void setEnemyDeck ( Deck a ) { } public static void playerBoxes ( ) { } }

Fix:
for ( int i = 0 ; i < ( Main . playerDeck . inHand . size ( ) ) ; i ++ ) {
Buggy code:
public interface AspectManager extends AspectHandler { String ROLE = AspectManager . class . getName ( ) ; String [ ] getNames ( ) { } void dispatchAspectSettings ( String name , Parameters parameters , Configuration [ ] elements ) throws TaskException { } void addAspectHandler ( String name , AspectHandler handler ) throws TaskException { } <START_BUG> void removeAspectHandler ( String name , AspectHandler handler ) throws TaskException ; <END_BUG> }

Fix:
void removeAspectHandler ( String name ) throws TaskException ;
Buggy code:
public final class AlgebraicConverter { private static final String columns = "%abcdefgh" ; private static Map < Character , String > map = Maps . newHashMap ( ) ; private static Move algToMove ( String s , Board board ) throws Exception { } public static Game convert ( Game g , File f ) throws Exception { } public static void convert ( List < Move > moves , String pathName ) { try { BufferedWriter out = new BufferedWriter ( new FileWriter ( FileUtility . getCompletedGamesFile ( pathName ) ) ) ; String toWrite = "" ; for ( int i = 0 , j = 1 ; i < ( moves . size ( ) ) ; i ++ ) { String turn = moves . get ( i ) . toString ( ) ; if ( ( moves . get ( i ) . result ) != null ) { turn = ( moves . get ( i ) ) + ( ( i % 2 ) == 0 ? "<seq2seq4repair_space>" + ( moves . get ( i ) . result ) : ( ( "\n" + ( j + 1 ) ) + "<seq2seq4repair_space>" ) + ( moves . get ( i ) . result ) ) ; } <START_BUG> if ( ( ( i % 2 ) == 1 ) || ( ( moves . get ( i ) . result ) != null ) ) { <END_BUG> out . write ( ( ( ( ( ( j + "<seq2seq4repair_space>" ) + toWrite ) + "<seq2seq4repair_space>" ) + turn ) + '\n' ) ) ; toWrite = "" ; j ++ ; } else { toWrite += turn ; } } out . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } public static Pattern getPattern ( ) { } }

Fix:
if ( ( ( i % 2 ) != 0 ) || ( ( moves . get ( i ) . result ) != null ) ) {
Buggy code:
public class NamespacesScope { public interface NamespacesHandler { public void startNamespaceDeclScope ( int prefix , int uri ) throws Exception { } public void endNamespaceDeclScope ( int prefix ) throws Exception { } } public NamespacesScope ( ) { } public NamespacesScope ( NamespacesScope . NamespacesHandler handler ) { } public void setNamespaceForPrefix ( int prefix , int namespace ) throws Exception { } public int getNamespaceForPrefix ( int prefix ) { for ( int depth = fElementDepth ; depth >= 0 ; depth -- ) { int offset = fNamespaceMappings [ depth ] [ 0 ] ; for ( int i = 1 ; i < offset ; i += 2 ) { if ( prefix == ( fNamespaceMappings [ depth ] [ i ] ) ) { return fNamespaceMappings [ depth ] [ ( i + 1 ) ] ; } } } <START_BUG> return - 1 ; <END_BUG> } public void increaseDepth ( ) throws Exception { } public void decreaseDepth ( ) throws Exception { } private NamespacesScope . NamespacesHandler fHandler = null ; private int fElementDepth = 0 ; private int [ ] [ ] fNamespaceMappings = new int [ 8 ] [ ] ; }

Fix:
return StringPool . EMPTY_STRING ;
Buggy code:
public class HelloWorld { public static void main ( String [ ] args ) { <START_BUG> System . out . println ( "Hello,<seq2seq4repair_space>World<seq2seq4repair_space>--<seq2seq4repair_space>this<seq2seq4repair_space>is<seq2seq4repair_space>forked<seq2seq4repair_space>---<seq2seq4repair_space>new<seq2seq4repair_space>forkingsss" ) ; <END_BUG> } }

Fix:
System . out . println ( "Hello,<seq2seq4repair_space>World<seq2seq4repair_space>--<seq2seq4repair_space>how<seq2seq4repair_space>are<seq2seq4repair_space>you" ) ;
Buggy code:
public class SubmitActivity extends AppCompatActivity { private String [ ] states ; private Spinner spinner ; private GoogleMap mMap ; private double latitude ; private double longitude ; private String token ; private String response = "" ; private final String nim = "13513111" ; private String location ; String mydate = DateFormat . getDateTimeInstance ( ) . format ( Calendar . getInstance ( ) . getTime ( ) ) ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_submit ) ; spinner = ( ( Spinner ) ( findViewById ( location_spinner ) ) ) ; List < String > locations = new ArrayList < String > ( ) ; locations . add ( "gku_barat" ) ; locations . add ( "gku_timur" ) ; locations . add ( "intel" ) ; locations . add ( "cc_barat" ) ; locations . add ( "cc_timur" ) ; locations . add ( "dpr" ) ; <START_BUG> locations . add ( "sunken" ) ; <END_BUG> locations . add ( "perpustakaan" ) ; locations . add ( "pau" ) ; locations . add ( "kubus" ) ; ArrayAdapter < String > dataAdapter = new ArrayAdapter < String > ( this , layout . simple_spinner_item , locations ) ; dataAdapter . setDropDownViewResource ( simple_spinner_dropdown_item ) ; spinner . setAdapter ( dataAdapter ) ; spinner . setOnItemSelectedListener ( new AdapterView . OnItemSelectedListener ( ) { @ Override public void onItemSelected ( AdapterView < ? > parent , View view , int position , long id ) { String selected = spinner . getSelectedItem ( ) . toString ( ) ; Toast . makeText ( SubmitActivity . this , selected , LENGTH_SHORT ) . show ( ) ; location = selected ; } @ Override public void onNothingSelected ( AdapterView < ? > parent ) { } } ) ; TextView tv = ( ( TextView ) ( findViewById ( textview ) ) ) ; Button button_submit = ( ( Button ) ( findViewById ( button_submit ) ) ) ; button_submit . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { sendAnswer ( ) ; } } ) ; Intent intent = getIntent ( ) ; Bundle bundle = intent . getExtras ( ) ; if ( bundle != null ) { this . latitude = bundle . getDouble ( "latitude" ) ; this . longitude = bundle . getDouble ( "longitude" ) ; this . token = bundle . getString ( "token" ) ; } } public void sendAnswer ( ) { } }

Fix:
locations . add ( "oktagon" ) ;
Buggy code:
public class AddOutgoingFragment extends Fragment { @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void setSelectedDate ( int year , int monthOfYear , int dayOfMonth ) { <START_BUG> EditText selectedDate = ( ( EditText ) ( getView ( ) . findViewById ( selectedDate ) ) ) ; <END_BUG> selectedDate . setText ( String . format ( "%02d//%02d//%04d" , dayOfMonth , ( monthOfYear + 1 ) , year ) ) ; } }

Fix:
EditText selectedDate = ( ( EditText ) ( getView ( ) . findViewById ( dateEdit ) ) ) ;
Buggy code:
public class OPMObjectInstance { private Object value = null ; private Map < String , OPMObjectInstance > parts = Maps . newHashMap ( ) ; private SortedMap < Integer , OPMObjectInstance > collectionValues = Maps . newTreeMap ( ) ; private BiMap < String , Integer > collectionNameToIndexMapping = HashBiMap . create ( ) ; public final OPMObjectInstance . InstanceType type ; private OPMObjectInstance ( OPMObjectInstance . InstanceType type ) { } public static OPMObjectInstance createCompositeInstance ( ) { } public static OPMObjectInstance createCollectionInstace ( ) { } public static OPMObjectInstance createFromValue ( BigDecimal decimalValue ) { } public static OPMObjectInstance createFromValue ( String stringValue ) { } public static OPMObjectInstance createFromExistingInstance ( OPMObjectInstance existingInstance ) { } private void setValue ( Object value ) { } public Object getValue ( ) { } public String getStringValue ( ) { } public BigDecimal getNumericalValue ( ) { } public boolean isValue ( ) { } public void addCompositePart ( String name , OPMObjectInstance part ) { } public OPMObjectInstance getCompositePart ( String name ) { } public Set < Map . Entry < String , OPMObjectInstance > > getCompositeParts ( ) { } public int appendCollectionElement ( OPMObjectInstance value ) { } public void putCollectionElement ( String name , OPMObjectInstance value ) { } public void putCollectionElementAtIndex ( int index , OPMObjectInstance value ) { } public OPMObjectInstance getCollectionElement ( String name ) { } public OPMObjectInstance getCollectionElementAtIndex ( int index ) { } public OPMObjectInstance getCollectionFirstElement ( ) { checkTypeForCollectionOnlyOperations ( ) ; <START_BUG> return collectionValues . get ( 0 ) ; <END_BUG> } public OPMObjectInstance getLastCollectionElement ( ) { } public Collection < OPMObjectInstance > getCollectionAllElements ( ) { } public Set < String > getCollectionAllIndexes ( ) { } @ Override public String toString ( ) { } private void checkTypeForValueOnlyOperations ( ) { } private void checkTypeForCompositeOnlyOperations ( ) { } private void checkTypeForCollectionOnlyOperations ( ) { } public enum InstanceType { NUMERICAL , STRING , COMPOSITE , COLLECTION ; } }

Fix:
return collectionValues . get ( collectionValues . firstKey ( ) ) ;
Buggy code:
public class MutableByte extends Number implements Comparable < MutableByte > , Mutable < Number > { private static final long serialVersionUID = - 1585823265L ; private byte value ; public MutableByte ( ) { } public MutableByte ( final byte value ) { } public MutableByte ( final Number value ) { } public MutableByte ( final String value ) throws NumberFormatException { } @ Override public Byte getValue ( ) { } public void setValue ( final byte value ) { } @ Override public void setValue ( final Number value ) { } public void increment ( ) { } public void decrement ( ) { } public void add ( final byte operand ) { } public void add ( final Number operand ) { } public void subtract ( final byte operand ) { } public void subtract ( final Number operand ) { } @ Override public byte byteValue ( ) { } @ Override public int intValue ( ) { } @ Override public long longValue ( ) { } @ Override public float floatValue ( ) { } @ Override public double doubleValue ( ) { } public Byte toByte ( ) { } @ Override public boolean equals ( final Object obj ) { } @ Override public int hashCode ( ) { } @ Override public int compareTo ( final MutableByte other ) { <START_BUG> byte anotherVal = other . value ; <END_BUG> return ( value ) < anotherVal ? - 1 : ( value ) == anotherVal ? 0 : 1 ; } @ Override public String toString ( ) { } }

Fix:
final byte anotherVal = other . value ;
Buggy code:
public class TestInitializeEagerly extends SingleEMFTestCase { public void setUp ( ) throws Exception { <START_BUG> super . setUp ( org . apache . openjpa . persistence . kernel . common . apps . RuntimeTest1 . class , "openjpa.InitializeEagerly" , "true" , "openjpa.BrokerFactory" , TestBrokerFactory . class . getName ( ) ) ; <END_BUG> } public void test ( ) { } }

Fix:
super . setUp ( org . apache . openjpa . persistence . kernel . common . apps . RuntimeTest1 . class , "openjpa.InitializeEagerly" , "true" , "openjpa.BrokerFactory" , DummyBrokerFactory . class . getName ( ) ) ;
Buggy code:
public class ThrowStatement extends Statement { public Expression exception ; public TypeBinding exceptionType ; public ThrowStatement ( Expression exception , int startPosition ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) return ; int pc = codeStream . position ; exception . generateCode ( currentScope , codeStream , true ) ; codeStream . athrow ( ) ; <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public void resolve ( BlockScope scope ) { } public String toString ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
class RemoveFolderFromIndex extends IndexRequest { IPath folderPath ; char [ ] [ ] exclusionPatterns ; IProject project ; public RemoveFolderFromIndex ( IPath folderPath , char [ ] [ ] exclusionPatterns , IProject project , IndexManager manager ) { } public boolean execute ( IProgressMonitor progressMonitor ) { if ( ( this . isCancelled ) || ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) ) return true ; Index index = manager . getIndex ( this . containerPath , true , false ) ; if ( index == null ) return true ; ReadWriteMonitor monitor = manager . getMonitorFor ( index ) ; if ( monitor == null ) return true ; try { monitor . enterRead ( ) ; <START_BUG> String [ ] paths = index . queryInDocumentNames ( this . folderPath . toString ( ) ) ; <END_BUG> for ( int i = 0 , max = ( paths == null ) ? 0 : paths . length ; i < max ; i ++ ) { String documentPath = paths [ i ] ; if ( ( ( this . exclusionPatterns ) == null ) || ( ! ( Util . isExcluded ( new Path ( documentPath ) , this . exclusionPatterns ) ) ) ) { manager . remove ( documentPath , this . containerPath ) ; } } } catch ( IOException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>" + ( this . folderPath ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>index<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } return false ; } finally { monitor . exitRead ( ) ; } return true ; } public String toString ( ) { } }

Fix:
String [ ] paths = index . queryDocumentNames ( this . folderPath . toString ( ) ) ;
Buggy code:
public class ReverseOrdFieldSource extends ValueSource { public final String field ; public ReverseOrdFieldSource ( String field ) { } @ Override public String description ( ) { } @ Override public FunctionValues getValues ( Map context , AtomicReaderContext readerContext ) throws IOException { final IndexReader topReader = ReaderUtil . getTopLevelContext ( readerContext ) . reader ( ) ; final AtomicReader r = ( topReader instanceof CompositeReader ) ? new SlowCompositeReaderWrapper ( ( ( CompositeReader ) ( topReader ) ) ) : ( ( AtomicReader ) ( topReader ) ) ; final int off = readerContext . docBase ; final FieldCache . DocTermsIndex sindex = DEFAULT . getTermsIndex ( r , field ) ; final int end = sindex . numOrd ( ) ; return new IntDocValues ( this ) { @ Override public int intVal ( int doc ) { <START_BUG> return end - ( sindex . getOrd ( ( doc + off ) ) ) ; <END_BUG> } } ; } @ Override public boolean equals ( Object o ) { } private static final int hcode = ReverseOrdFieldSource . class . hashCode ( ) ; @ Override public int hashCode ( ) { } }

Fix:
return ( end - ( sindex . getOrd ( ( doc + off ) ) ) ) - 1 ;
Buggy code:
public class RadioChoice extends FormComponent { private static final int NULL_VALUE = - 1 ; private static final long serialVersionUID = - 1560593550286375796L ; private final List values = new ArrayList ( ) ; public RadioChoice ( String name , Serializable object ) { } public RadioChoice ( String name , Serializable object , String expression ) { } public final String getValue ( ) { } public final void setValue ( final String value ) { } public final void updateModel ( ) { <START_BUG> final int index = getRequestInt ( RadioChoice . NULL_VALUE ) ; <END_BUG> if ( index != ( RadioChoice . NULL_VALUE ) ) { setModelObject ( values . get ( index ) ) ; } } protected final boolean supportsPersistence ( ) { } final int addRadioOption ( final Object choice ) { } }

Fix:
final int index = inputAsInt ( RadioChoice . NULL_VALUE ) ;
Buggy code:
public class FileListPanel extends JPanel implements ActionListener { private static final long serialVersionUID = 1L ; private JTable files = null ; private transient ObjectTableModel tableModel = null ; private static final String ACTION_BROWSE = "browse" ; private static final String LABEL_LIBRARY = "library" ; private JButton browse = new JButton ( JMeterUtils . getResString ( FileListPanel . ACTION_BROWSE ) ) ; private JButton clear = new JButton ( JMeterUtils . getResString ( "clear" ) ) ; private JButton delete = new JButton ( JMeterUtils . getResString ( "delete" ) ) ; private List < ChangeListener > listeners = new LinkedList < ChangeListener > ( ) ; private String title ; private String filetype ; public FileListPanel ( ) { } public FileListPanel ( String title ) { } public FileListPanel ( String title , String filetype ) { } public FileListPanel ( ChangeListener l , String title ) { } public void addChangeListener ( ChangeListener l ) { } private void init ( ) { } public void enableFile ( boolean enable ) { } public void addFilename ( String f ) { } public void clearFiles ( ) { } public void setFiles ( String [ ] files ) { } public String [ ] getFiles ( ) { } protected void deleteFile ( ) { } private void fireFileChanged ( ) { } protected void initializeTableModel ( ) { } public void actionPerformed ( ActionEvent e ) { if ( ( e . getSource ( ) ) == ( clear ) ) { this . clearFiles ( ) ; } else if ( e . getActionCommand ( ) . equals ( FileListPanel . ACTION_BROWSE ) ) { JFileChooser chooser = new JFileChooser ( ) ; <START_BUG> String start = JMeterUtils . getPropDefault ( "user.dir" , "" ) ; <END_BUG> chooser . setCurrentDirectory ( new File ( start ) ) ; chooser . setFileFilter ( new JMeterFileFilter ( new String [ ] { filetype } ) ) ; chooser . setFileSelectionMode ( JFileChooser . FILES_AND_DIRECTORIES ) ; chooser . setMultiSelectionEnabled ( true ) ; chooser . showOpenDialog ( GuiPackage . getInstance ( ) . getMainFrame ( ) ) ; File [ ] cfiles = chooser . getSelectedFiles ( ) ; if ( cfiles != null ) { for ( int idx = 0 ; idx < ( cfiles . length ) ; idx ++ ) { this . addFilename ( cfiles [ idx ] . getPath ( ) ) ; } fireFileChanged ( ) ; } } else if ( ( e . getSource ( ) ) == ( delete ) ) { this . deleteFile ( ) ; } else { fireFileChanged ( ) ; } } }

Fix:
String start = System . getProperty ( "user.dir" , "" ) ;
Buggy code:
public class ExhaustParticle { public ExhaustParticle ( Ship ship ) { } public void reset ( Ship ship ) { float randomFloat = random . nextFloat ( ) ; radius = ( ExhaustParticle . BASE_RADIUS ) + ( randomFloat * ( ExhaustParticle . MAX_ADDITIONAL_RADIUS ) ) ; locationX = ship . getExhaustLocationX ( ) ; locationY = ship . getExhaustLocationY ( ) ; <START_BUG> speedX = ( ( randomFloat - 0.5F ) * 2 ) * ( ExhaustParticle . BASE_SPEEDX ) ; <END_BUG> speedY = ( ExhaustParticle . BASE_SPEEDY ) + ( randomFloat * ( ExhaustParticle . MAX_ADDITIONAL_SPEEDY ) ) ; } public void update ( Ship ship , ObstacleManager obstacleManager ) { } public void draw ( Canvas canvas , Paint paint ) { } private Random random ; private float radius ; private float locationX ; private float locationY ; private float speedX ; private float speedY ; private static final int BASE_RADIUS = 2 ; private static final int MAX_ADDITIONAL_RADIUS = 2 ; private static final float BASE_SPEEDX = 0.003F ; private static final float SPEEDX_MODIFIER = 3 ; private static final float BASE_SPEEDY = 0.003F ; private static final float MAX_ADDITIONAL_SPEEDY = 0.007F ; }

Fix:
speedX = ( ( ( random . nextFloat ( ) ) - 0.5F ) * 2 ) * ( ExhaustParticle . BASE_SPEEDX ) ;
Buggy code:
public final class ItemIDIndexMapper extends MapReduceBase implements Mapper < LongWritable , Text , IntWritable , LongWritable > { private static final Pattern COMMA = Pattern . compile ( "," ) ; @ Override public void map ( LongWritable key , Text value , OutputCollector < IntWritable , LongWritable > output , Reporter reporter ) throws IOException { } static int idToIndex ( long itemID ) { <START_BUG> return ( ( int ) ( itemID ) ) ^ ( ( int ) ( itemID > > > 32 ) ) ; <END_BUG> } }

Fix:
return ( 2147483647 & ( ( int ) ( itemID ) ) ) ^ ( ( int ) ( itemID > > > 32 ) ) ;
Buggy code:
public class ModifyColumnNode extends ColumnDefinitionNode { int columnPosition = - 1 ; UUID oldDefaultUUID ; UUID getOldDefaultUUID ( ) { } public int getColumnPosition ( ) { } public void checkUserType ( TableDescriptor td ) throws StandardException { } public void checkExistingConstraints ( TableDescriptor td ) throws StandardException { } public void useExistingCollation ( TableDescriptor td ) throws StandardException { } int getAction ( ) { } void bindAndValidateDefault ( DataDictionary dd , TableDescriptor td ) throws StandardException { ColumnDescriptor cd ; cd = td . getColumnDescriptor ( name ) ; if ( cd == null ) { throw StandardException . newException ( LANG_COLUMN_NOT_FOUND_IN_TABLE , name , td . getName ( ) ) ; } DefaultDescriptor defaultDescriptor = cd . getDefaultDescriptor ( dd ) ; oldDefaultUUID = ( defaultDescriptor == null ) ? null : defaultDescriptor . getUUID ( ) ; columnPosition = cd . getPosition ( ) ; if ( ( getNodeType ( ) ) != ( C_NodeTypes . MODIFY_COLUMN_DEFAULT_NODE ) ) { return ; } <START_BUG> if ( ( defaultNode ) == null ) <END_BUG> defaultInfo = ( ( DefaultInfoImpl ) ( cd . getDefaultInfo ( ) ) ) ; if ( ( autoinc_create_or_modify_Start_Increment ) == ( ColumnDefinitionNode . MODIFY_AUTOINCREMENT_RESTART_VALUE ) ) autoincrementIncrement = cd . getAutoincInc ( ) ; if ( ( autoinc_create_or_modify_Start_Increment ) == ( ColumnDefinitionNode . MODIFY_AUTOINCREMENT_INC_VALUE ) ) autoincrementStart = cd . getAutoincStart ( ) ; type = cd . getType ( ) ; validateDefault ( dd , td ) ; } private ColumnDescriptor getLocalColumnDescriptor ( String name , TableDescriptor td ) throws StandardException { } public void validateAutoincrement ( DataDictionary dd , TableDescriptor td , int tableType ) throws StandardException { } }

Fix:
if ( keepCurrentDefault )
Buggy code:
public class HTTPResultConverter extends SampleResultConverter { public HTTPResultConverter ( ClassMapper arg0 , String arg1 ) { } public boolean canConvert ( Class arg0 ) { } public void marshal ( Object obj , HierarchicalStreamWriter writer , MarshallingContext context ) { } protected void saveSamplerData ( HierarchicalStreamWriter writer , MarshallingContext context , HTTPSampleResult res , SampleSaveConfiguration save ) { } public Object unmarshal ( HierarchicalStreamReader reader , UnmarshallingContext context ) { HTTPSampleResult res = ( ( HTTPSampleResult ) ( createCollection ( context . getRequiredType ( ) ) ) ) ; <START_BUG> retrieveAttributes ( reader , res ) ; <END_BUG> while ( reader . hasMoreChildren ( ) ) { reader . moveDown ( ) ; Object subItem = readItem ( reader , context , res ) ; if ( ! ( retrieveItem ( reader , context , res , subItem ) ) ) { retrieveHTTPItem ( reader , context , res , subItem ) ; } reader . moveUp ( ) ; } return res ; } protected void retrieveHTTPItem ( HierarchicalStreamReader reader , UnmarshallingContext context , HTTPSampleResult res , Object subItem ) { } }

Fix:
retrieveAttributes ( reader , context , res ) ;
Buggy code:
public class MetaData { private TreeMap < String , String > circle = new TreeMap < String , String > ( ) ; public MetaData ( ) { } public MetaData ( String constructStr ) { } public SortedMap < String , String > getCircle ( ) { } public String byteArrayToHex ( byte [ ] byteArray ) { } public String computeMd5 ( String k ) { } public void add ( String address ) { } public void remove ( String address ) { } public String get ( String key ) { } public String getNext ( String key ) { String hash = computeMd5 ( key ) ; String higherKey = circle . higherKey ( hash ) ; <START_BUG> if ( higherKey . isEmpty ( ) ) { <END_BUG> hash = circle . firstKey ( ) ; } else { hash = higherKey ; } return circle . get ( hash ) ; } public String getPrevious ( String key ) { } public String toString ( ) { } }

Fix:
if ( higherKey == null ) {