nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DeploymentAddHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = ADD ; protected final ContentRepository contentRepository ; private final AbstractVaultReader vaultReader ; protected DeploymentAddHandler ( final ContentRepository contentRepository , final AbstractVaultReader vaultReader ) { } public static DeploymentAddHandler create ( final ContentRepository contentRepository , final AbstractVaultReader vaultReader ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { } public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ! ( operation . hasDefined ( PERSISTENT . getName ( ) ) ) ) { operation . get ( PERSISTENT . getName ( ) ) . set ( true ) ; } final Resource resource = context . createResource ( EMPTY_ADDRESS ) ; ModelNode newModel = resource . getModel ( ) ; for ( AttributeDefinition def : SERVER_ADD_ATTRIBUTES ) { if ( ! ( def . getName ( ) . equals ( CONTENT . getName ( ) ) ) ) { def . validateAndSet ( operation , newModel ) ; } else { def . validateOperation ( operation ) ; } } final ModelNode content = operation . require ( CONTENT . getName ( ) ) ; ModelNode contentItemNode = content . require ( 0 ) ; final ModelNode opAddr = operation . get ( OP_ADDR ) ; PathAddress address = PathAddress . pathAddress ( opAddr ) ; final String name = address . getLastElement ( ) . getValue ( ) ; final String runtimeName = ( operation . hasDefined ( RUNTIME_NAME . getName ( ) ) ) ? operation . get ( RUNTIME_NAME . getName ( ) ) . asString ( ) : name ; newModel . get ( RUNTIME_NAME . getName ( ) ) . set ( runtimeName ) ; final DeploymentHandlerUtil . ContentItem contentItem ; if ( contentItemNode . hasDefined ( CONTENT_HASH . getName ( ) ) ) { byte [ ] hash = contentItemNode . require ( CONTENT_HASH . getName ( ) ) . asBytes ( ) ; contentItem = addFromHash ( hash , name , context ) ; } else if ( DeploymentHandlerUtils . hasValidContentAdditionParameterDefined ( contentItemNode ) ) { contentItem = addFromContentAdditionParameter ( context , contentItemNode ) ; contentItemNode = new ModelNode ( ) ; contentItemNode . get ( CONTENT_HASH . getName ( ) ) . set ( contentItem . getHash ( ) ) ; <START_BUG> content . setEmptyList ( ) ; <END_BUG> content . add ( contentItemNode ) ; } else { contentItem = addUnmanaged ( contentItemNode ) ; } newModel . get ( CONTENT . getName ( ) ) . set ( content ) ; if ( ( ENABLED . resolveModelAttribute ( context , newModel ) . asBoolean ( ) ) && ( context . isNormalServer ( ) ) ) { DeploymentHandlerUtil . deploy ( context , runtimeName , name , vaultReader , contentItem ) ; } context . completeStep ( ) ; } ContentItem addFromHash ( byte [ ] hash , String deploymentName , OperationContext context ) throws OperationFailedException { } ContentItem addFromContentAdditionParameter ( OperationContext context , ModelNode contentItemNode ) throws OperationFailedException { } ContentItem addUnmanaged ( ModelNode contentItemNode ) throws OperationFailedException { } }

Fix:
content . clear ( ) ;
Buggy code:
class HornetQServerAdd implements OperationStepHandler { private static final String DEFAULT_PATH = "messaging" ; private static final String DEFAULT_RELATIVE_TO = "jboss.server.data.dir" ; static final String PATH_BASE = "paths" ; static final String DEFAULT_BINDINGS_DIR = "bindings" ; static final String DEFAULT_JOURNAL_DIR = "journal" ; static final String DEFAULT_LARGE_MESSSAGE_DIR = "largemessages" ; static final String DEFAULT_PAGING_DIR = "paging" ; public static final HornetQServerAdd INSTANCE = new HornetQServerAdd ( ) ; private HornetQServerAdd ( ) { } public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { } private void performRuntime ( final OperationContext context , final HornetQServerResource resource , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { } private Configuration transformConfig ( String serverName , final ModelNode model ) throws OperationFailedException { } static void processAddressSettings ( final Configuration configuration , final ModelNode params ) throws OperationFailedException { } static void processSecuritySettings ( final Configuration configuration , final ModelNode params ) throws OperationFailedException { } static ServiceName createDirectoryService ( final String name , final ModelNode path , final ServiceTarget serviceTarget , ModelNode operation , final List < ServiceController < ? > > newControllers , final ServiceListener listener ) { final ServiceName hqServiceName = MessagingServices . getHornetQServiceName ( PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ) ; final ServiceName serviceName = hqServiceName . append ( name ) ; final String relativeTo = ( path . hasDefined ( ModelDescriptionConstants . RELATIVE_TO ) ) ? path . get ( ModelDescriptionConstants . RELATIVE_TO ) . asString ( ) : HornetQServerAdd . DEFAULT_RELATIVE_TO ; final String pathName = ( path . hasDefined ( ModelDescriptionConstants . PATH ) ) ? path . get ( ModelDescriptionConstants . PATH ) . asString ( ) : ( HornetQServerAdd . DEFAULT_PATH ) + name ; <START_BUG> RelativePathService . addService ( serviceName , pathName , relativeTo , serviceTarget , newControllers , listener ) ; <END_BUG> return serviceName ; } }

Fix:
RelativePathService . addService ( serviceName , pathName , true , relativeTo , serviceTarget , newControllers , listener ) ;
Buggy code:
public class SimpMessagingTemplate extends AbstractMessageSendingTemplate < String > implements SimpMessageSendingOperations { private final MessageChannel messageChannel ; private String userDestinationPrefix = "//user//" ; private volatile long sendTimeout = - 1 ; public SimpMessagingTemplate ( MessageChannel messageChannel ) { } public void setUserDestinationPrefix ( String prefix ) { } public String getUserDestinationPrefix ( ) { } public MessageChannel getMessageChannel ( ) { } public void setSendTimeout ( long sendTimeout ) { } public long getSendTimeout ( ) { } @ Override public void send ( Message < ? > message ) { SimpMessageHeaderAccessor headers = SimpMessageHeaderAccessor . wrap ( message ) ; String destination = headers . getDestination ( ) ; destination = ( destination != null ) ? destination : getRequiredDefaultDestination ( ) ; <START_BUG> doSend ( getRequiredDefaultDestination ( ) , message ) ; <END_BUG> } @ Override protected void doSend ( String destination , Message < ? > message ) { } @ Override public void convertAndSendToUser ( String user , String destination , Object payload ) throws MessagingException { } @ Override public void convertAndSendToUser ( String user , String destination , Object payload , Map < String , Object > headers ) throws MessagingException { } @ Override public void convertAndSendToUser ( String user , String destination , Object payload , MessagePostProcessor postProcessor ) throws MessagingException { } @ Override public void convertAndSendToUser ( String user , String destination , Object payload , Map < String , Object > headers , MessagePostProcessor postProcessor ) throws MessagingException { } }

Fix:
doSend ( destination , message ) ;
Buggy code:
public class QuickStartApplication extends WebApplication { private static final Log log = LogFactory . getLog ( QuickStartApplication . class ) ; public QuickStartApplication ( ) { } public Class getHomePage ( ) { } public Session newSession ( Request request , Response response ) { <START_BUG> return new QuickStartSession ( this , request , response ) ; <END_BUG> } protected void init ( ) { } }

Fix:
return new QuickStartSession ( this , request ) ;
Buggy code:
public class Rover { private List < Projectile > projectiles ; private Point location ; private Direction facing ; private Mars mars ; public Rover ( Mars mars ) throws CrashException { } public Rover ( final Mars mars , final Point landingPoint ) throws CrashException { } public Point getLocation ( ) { } public void setLocation ( Point location ) { } public Direction getFacing ( ) { } public void setFacing ( Direction facing ) { } public Mars getMars ( ) { } private static final Map < Direction , Point > positionalAdjustments = new HashMap < Direction , Point > ( ) { } ; private void landOnMars ( Point landingPoint ) throws CrashException { } public boolean fireProjectile ( final boolean isMortar ) { Projectile projectileToFire = Iterables . get ( Collections2 . filter ( projectiles , new Predicate < Projectile > ( ) { @ Override public boolean apply ( Projectile input ) { return ( input . IsMortar ) == isMortar ; } <START_BUG> } ) , 1 , null ) ; <END_BUG> if ( projectileToFire == null ) { return false ; } projectileToFire . launch ( getFacing ( ) , getLocation ( ) ) ; projectiles . remove ( projectileToFire ) ; return true ; } public boolean moveBackward ( ) { } public boolean moveForward ( ) { } private boolean move ( int adjustmentFactor ) { } private Point createDesiredPosition ( int adjustmentFactor ) { } public boolean turnRight ( ) { } public boolean turnLeft ( ) { } }

Fix:
} ) , 0 , null ) ;
Buggy code:
public class PrivateChatActivity extends Activity implements OnClickListener , EventsListener { private Typeface tf ; private ImageView sendBt ; private PrivateChatAdapter chatAdapter ; private ListView listMessages ; private EditText editText ; private ScheduledExecutorService scheduler ; private Future < ? > future ; private User remoteUser ; public static void show ( Context context , String tokenId , String realName ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } @ Override public void onDestroy ( ) { } @ Override public void onClick ( View v ) { } private void scrollMyListViewToTheBottomNowWeHere ( ) { } @ Override public void onEventsReceived ( List < Event > events ) { for ( Event e : events ) { Log . i ( "Blindr" , ( "New<seq2seq4repair_space>event=" + e ) ) ; if ( ( e instanceof Message ) && ( ( e . getDestination ( ) ) instanceof User ) ) { <START_BUG> if ( ( ( User ) ( e . getDestination ( ) ) ) . getId ( ) . equals ( remoteUser . getId ( ) ) ) { <END_BUG> chatAdapter . addMessage ( ( ( Message ) ( e ) ) ) ; chatAdapter . notifyDataSetChanged ( ) ; scrollMyListViewToTheBottomNowWeHere ( ) ; } } } } @ Override public void onOldMatchesReceives ( List < Match > matches ) { } @ Override public void onUserHistoryReceived ( List < Event > events ) { } @ Override public void onUserLiked ( User user , String userFakeName ) { } }

Fix:
if ( ( ( User ) ( e . getDestination ( ) ) ) . getId ( ) . equals ( Controller . getInstance ( ) . getMyId ( ) ) ) {
Buggy code:
public class MailingListIssuesTest extends DummyServerTest { @ Test public void testThatInterceptorIsCalled ( ) throws IOException , InterruptedException { } @ Test public void testThatInterceptorCanCaptureCallingIpAddress ( ) throws IOException , InterruptedException { } @ Test public void testThatWeCanChangeTheUserAgent ( ) throws IOException , InterruptedException { } @ Test public void testThatInterceptorsCanRewriteUrls ( ) throws IOException , InterruptedException { } @ Test public void testThatInterceptorsCanReadResponseBodies ( ) throws IOException , InterruptedException { } @ Test @ Ignore public void testThatInterceptorsCanReadPostParamaters ( ) throws IOException , InterruptedException { } @ Test public void issue27 ( ) throws Exception { WebDriver driver = null ; ProxyServer server = new ProxyServer ( 4444 ) ; server . start ( ) ; try { server . setCaptureHeaders ( true ) ; server . setCaptureContent ( true ) ; Proxy proxy = server . seleniumProxy ( ) ; DesiredCapabilities capabilities = new DesiredCapabilities ( ) ; capabilities . setCapability ( PROXY , proxy ) ; driver = new org . openqa . selenium . firefox . FirefoxDriver ( capabilities ) ; server . newHar ( "assertselenium.com" ) ; driver . get ( "http:////whatsmyuseragent.com" ) ; Har har = server . getHar ( ) ; Assert . assertTrue ( ( ! ( har . getLog ( ) . getEntries ( ) . isEmpty ( ) ) ) ) ; String text = har . getLog ( ) . getEntries ( ) . get ( 0 ) . getResponse ( ) . getContent ( ) . getText ( ) ; <START_BUG> Assert . assertTrue ( text . contains ( "<title>\r\n\tWhat\'s<seq2seq4repair_space>My<seq2seq4repair_space>User<seq2seq4repair_space>Agent?\r\n<//title>" ) ) ; <END_BUG> } finally { server . stop ( ) ; if ( driver != null ) { driver . quit ( ) ; } } } @ Test public void googleCaSslNotWorkingInFirefox ( ) throws Exception { } @ Test public void testProxyConfigurationThroughFirefoxProfile ( ) { } }

Fix:
Assert . assertTrue ( text . contains ( "My<seq2seq4repair_space>User<seq2seq4repair_space>Agent?" ) ) ;
Buggy code:
public class IdGenerator { public static String generateRandomId ( ) { Random rand = new Random ( ) ; StringBuilder sb = new StringBuilder ( ) ; <START_BUG> sb . append ( System . currentTimeMillis ( ) ) . append ( "_" ) . append ( Math . abs ( rand . nextInt ( 99 ) ) ) ; <END_BUG> return sb . toString ( ) ; } }

Fix:
sb . append ( System . currentTimeMillis ( ) ) . append ( "-" ) . append ( Math . abs ( rand . nextInt ( 99 ) ) ) ;
Buggy code:
public abstract class AbstractPCResultObjectProvider implements PCResultObjectProvider { protected final StoreContext ctx ; public AbstractPCResultObjectProvider ( StoreContext ctx ) { } public StoreContext getContext ( ) { } public void initialize ( OpenJPAStateManager sm , PCState state , FetchState fetchState ) throws Exception { } public Object getResultObject ( ) throws Exception { Class type = getPCType ( ) ; <START_BUG> MetaDataRepository repos = ctx . getConfiguration ( ) . getMetaDataRepository ( ) ; <END_BUG> ClassMetaData meta = repos . getMetaData ( type , ctx . getClassLoader ( ) , true ) ; Object oid = getObjectId ( meta ) ; Object res = ctx . find ( oid , null , null , this , 0 ) ; if ( res == null ) throw new ObjectNotFoundException ( oid ) ; return res ; } protected abstract Object getObjectId ( ClassMetaData meta ) throws Exception { } protected abstract Class getPCType ( ) throws Exception { } protected abstract void load ( OpenJPAStateManager sm , FetchState fetch ) throws Exception { } public void open ( ) throws Exception { } public boolean supportsRandomAccess ( ) { } public abstract boolean next ( ) throws Exception { } public boolean absolute ( int pos ) throws Exception { } public int size ( ) throws Exception { } public void reset ( ) throws Exception { } public void close ( ) throws Exception { } public void handleCheckedException ( Exception e ) { } }

Fix:
MetaDataRepository repos = ctx . getConfiguration ( ) . getMetaDataRepositoryInstance ( ) ;
Buggy code:
public class ArquillianService implements Service < ArquillianService > { public static final String TEST_CLASS_PROPERTY = "org.jboss.as.arquillian.testClass" ; public static final ServiceName SERVICE_NAME = JBOSS . append ( "arquillian" , "testrunner" ) ; private static final Logger log = Logger . getLogger ( "org.jboss.as.arquillian" ) ; private final InjectedValue < MBeanServer > injectedMBeanServer = new InjectedValue < MBeanServer > ( ) ; private final Set < ArquillianConfig > deployedTests = new HashSet < ArquillianConfig > ( ) ; private ServiceContainer serviceContainer ; private ServiceTarget serviceTarget ; private JMXTestRunner jmxTestRunner ; AbstractServiceListener < Object > listener ; public static void addService ( final ServiceTarget serviceTarget ) { } ServiceContainer getServiceContainer ( ) { } public synchronized void start ( StartContext context ) throws StartException { } public synchronized void stop ( StopContext context ) { } @ Override public synchronized ArquillianService getValue ( ) throws IllegalStateException { } void registerArquillianConfig ( ArquillianConfig arqConfig ) { } void unregisterArquillianConfig ( ArquillianConfig arqConfig ) { } private ArquillianConfig getArquillianConfig ( final String className , long timeout ) { } class ExtendedJMXTestRunner extends JMXTestRunner { ExtendedJMXTestRunner ( ) { } @ Override public byte [ ] runTestMethod ( final String className , final String methodName ) { } private ContextManager initializeContextManager ( final ArquillianConfig config , final Map < String , Object > properties ) { final ContextManagerBuilder builder = new ContextManagerBuilder ( ) ; final DeploymentUnit depUnit = config . getDeploymentUnit ( ) ; <START_BUG> final XBundle bundle = depUnit . getAttachment ( INSTALLED_BUNDLE_KEY ) ; <END_BUG> final Module module = depUnit . getAttachment ( MODULE ) ; if ( ( bundle == null ) && ( module != null ) ) { builder . add ( new ArquillianService . TCCLSetupAction ( module . getClassLoader ( ) ) ) ; } builder . addAll ( depUnit ) ; ContextManager contextManager = builder . build ( ) ; contextManager . setup ( properties ) ; return contextManager ; } } class ExtendedTestClassLoader implements JMXTestRunner . TestClassLoader { @ Override public Class < ? > loadTestClass ( final String className ) throws ClassNotFoundException { } } private static final class TCCLSetupAction implements SetupAction { private final ThreadLocal < ClassLoader > oldClassLoader = new ThreadLocal < ClassLoader > ( ) ; private final ClassLoader classLoader ; TCCLSetupAction ( final ClassLoader classLoader ) { } @ Override public int priority ( ) { } @ Override public Set < ServiceName > dependencies ( ) { } @ Override public void setup ( Map < String , Object > properties ) { } @ Override public void teardown ( Map < String , Object > properties ) { } } private enum GetTcclAction implements PrivilegedAction < ClassLoader > { INSTANCE ; @ Override public ClassLoader run ( ) { } } private static ClassLoader getTccl ( ) { } private static void setTccl ( final ClassLoader cl ) { } }

Fix:
final XBundle bundle = depUnit . getAttachment ( BUNDLE_KEY ) ;
Buggy code:
public class ScrollOverListView extends ListView implements OnScrollListener { private int mLastY ; private int mBottomPosition ; private static final String TAG = "listview" ; private static final int RELEASE_To_REFRESH = 0 ; private static final int PULL_To_REFRESH = 1 ; private static final int REFRESHING = 2 ; private static final int DONE = 3 ; private static final int LOADING = 4 ; private static final int RATIO = 3 ; private LayoutInflater inflater ; private LinearLayout headView ; private TextView tipsTextview ; private TextView lastUpdatedTextView ; private ImageView arrowImageView ; private ProgressBar progressBar ; private RotateAnimation animation ; private RotateAnimation reverseAnimation ; private boolean isRecored ; private int headContentHeight ; private int startY ; private int firstItemIndex ; private int state = - 1 ; private boolean isBack ; public boolean showRefresh = true ; public static boolean canRefleash = false ; public ScrollOverListView ( Context context , AttributeSet attrs , int defStyle ) { } public ScrollOverListView ( Context context , AttributeSet attrs ) { } public ScrollOverListView ( Context context ) { } private void init ( Context context ) { } @ Override public boolean onTouchEvent ( MotionEvent ev ) { } private ScrollOverListView . OnScrollOverListener mOnScrollOverListener = new ScrollOverListView . OnScrollOverListener ( ) { @ Override public boolean onListViewTopAndPullDown ( int delta ) { } @ Override public boolean onListViewBottomAndPullUp ( int delta ) { } @ Override public boolean onMotionDown ( MotionEvent ev ) { } @ Override public boolean onMotionMove ( MotionEvent ev , int delta ) { } @ Override public boolean onMotionUp ( MotionEvent ev ) { } } ; public void setTopPosition ( int index ) { } public void setBottomPosition ( int index ) { } public void setOnScrollOverListener ( ScrollOverListView . OnScrollOverListener onScrollOverListener ) { } public interface OnScrollOverListener { boolean onListViewTopAndPullDown ( int delta ) { } boolean onListViewBottomAndPullUp ( int delta ) { } boolean onMotionDown ( MotionEvent ev ) { } boolean onMotionMove ( MotionEvent ev , int delta ) { } boolean onMotionUp ( MotionEvent ev ) { } } @ Override public void onScroll ( AbsListView arg0 , int firstVisiableItem , int arg2 , int arg3 ) { } @ Override public void onScrollStateChanged ( AbsListView view , int scrollState ) { } @ SuppressWarnings ( "deprecation" ) private void measureView ( View child ) { } @ SuppressWarnings ( "deprecation" ) public void onRefreshComplete ( ) { state = ScrollOverListView . DONE ; <START_BUG> lastUpdatedTextView . setText ( ( "最近更新:" + ( new Date ( ) . toLocaleString ( ) ) ) ) ; <END_BUG> changeHeaderViewByState ( ) ; } private void changeHeaderViewByState ( ) { } }

Fix:
lastUpdatedTextView . setText ( ( "Last<seq2seq4repair_space>update:" + ( new Date ( ) . toLocaleString ( ) ) ) ) ;
Buggy code:
public class Snippet7 { public static void main ( String [ ] args ) { final Display display = new Display ( ) ; final Image image = new Image ( display , 16 , 16 ) ; GC gc = new GC ( image ) ; gc . setBackground ( display . getSystemColor ( COLOR_RED ) ) ; gc . fillRectangle ( image . getBounds ( ) ) ; gc . dispose ( ) ; final Shell shell = new Shell ( display ) ; shell . setText ( "Lazy<seq2seq4repair_space>Table" ) ; shell . setLayout ( new FillLayout ( ) ) ; final Table table = new Table ( shell , ( ( SWT . BORDER ) | ( SWT . MULTI ) ) ) ; table . setSize ( 200 , 200 ) ; Thread thread = new Thread ( ) { public void run ( ) { for ( int i = 0 ; i < 20000 ; i ++ ) { if ( table . isDisposed ( ) ) return ; final int [ ] index = new int [ ] { i } ; display . syncExec ( new Runnable ( ) { public void run ( ) { if ( table . isDisposed ( ) ) return ; <START_BUG> TableItem item = new TableItem ( table , SWT . NULL ) ; <END_BUG> item . setText ( ( "Table<seq2seq4repair_space>Item<seq2seq4repair_space>" + ( index [ 0 ] ) ) ) ; item . setImage ( image ) ; } } ) ; } } } ; thread . start ( ) ; shell . setSize ( 200 , 200 ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } image . dispose ( ) ; display . dispose ( ) ; } }

Fix:
TableItem item = new TableItem ( table , SWT . NONE ) ;
Buggy code:
public class AroundWeaveTestCase extends WeaveTestCase { public AroundWeaveTestCase ( String name ) { } public void testAround ( ) throws IOException { } public void testAroundAll ( ) throws IOException { } public void testAroundAndOthers ( ) throws IOException { } public void testAroundAllAndOthers ( ) throws IOException { } private BcelAdvice makeAroundMunger ( final boolean matchOnlyPrintln ) { BcelWorld world = super . world ; <START_BUG> final Member sig = Member . method ( UnresolvedType . forName ( "Aspect" ) , Modifier . STATIC , "ajc_around" , "(Lorg//aspectj//runtime//internal//AroundClosure;)Ljava//lang//Object;" ) ; <END_BUG> return new BcelAdvice ( AdviceKind . stringToKind ( "around" ) , ( matchOnlyPrintln ? makePointcutPrintln ( ) : makePointcutAll ( ) ) , sig , 0 , ( - 1 ) , ( - 1 ) , null , UnresolvedType . forName ( "Aspect" ) . resolve ( world ) ) { public void specializeOn ( Shadow s ) { super . specializeOn ( s ) ; ( ( BcelShadow ) ( s ) ) . initializeForAroundClosure ( ) ; } } ; } private void aroundTest ( String outName , final boolean matchOnlyPrintln ) throws IOException { } private void aroundTestAndOthers ( String outName , final boolean matchOnlyPrintln ) throws IOException { } }

Fix:
final Member sig = MemberImpl . method ( UnresolvedType . forName ( "Aspect" ) , Modifier . STATIC , "ajc_around" , "(Lorg//aspectj//runtime//internal//AroundClosure;)Ljava//lang//Object;" ) ;
Buggy code:
public class DFOClass { private String description ; private String name ; private String baseClass ; public String getBaseClass ( ) { } public void setBaseClass ( String baseClass ) { } private HashMap < String , Integer > skills ; public String getDescription ( ) { } public void setDescription ( String description ) { } public String getName ( ) { } public void setName ( String name ) { } public void addSkill ( Skill st ) { } public HashMap < String , Integer > getSkills ( ) { } @ Override public String toString ( ) { <START_BUG> return this . getUniqueName ( ) . substring ( ( ( getUniqueName ( ) . indexOf ( "//" ) ) + 1 ) ) ; <END_BUG> } public String getUniqueName ( ) { } public void removeSkill ( Skill sk ) { } }

Fix:
return this . getUniqueName ( ) ;
Buggy code:
public class ComposerModel { ColumbaMessage message ; AccountItem accountItem ; String bodytext ; Charset charset ; List attachments ; List toList ; List ccList ; List bccList ; boolean signMessage ; boolean encryptMessage ; private boolean isHtmlMessage ; public ComposerModel ( ) { } public ComposerModel ( ColumbaMessage message ) { } public ComposerModel ( boolean html ) { } public ComposerModel ( ColumbaMessage message , boolean html ) { } public void setTo ( Address [ ] a ) { for ( int i = 0 ; i < ( a . length ) ; i ++ ) { HeaderItem item = new HeaderItem ( HeaderItem . CONTACT ) ; String displayName = a [ i ] . getDisplayName ( ) ; <START_BUG> if ( displayName != null ) { <END_BUG> item . add ( "displayname" , displayName ) ; } else { item . add ( "displayname" , a [ i ] . getMailAddress ( ) ) ; } item . add ( "email;internet" , a [ i ] . getMailAddress ( ) ) ; item . add ( "field" , "To" ) ; getToList ( ) . add ( item ) ; } } public void setTo ( String s ) { } public void setHeaderField ( String key , String value ) { } public void setHeader ( Header header ) { } public String getHeaderField ( String key ) { } public void setToList ( List v ) { } public void setCcList ( List v ) { } public void setBccList ( List v ) { } public List getToList ( ) { } public List getCcList ( ) { } public List getBccList ( ) { } public void setAccountItem ( AccountItem item ) { } public AccountItem getAccountItem ( ) { } public void setMessage ( ColumbaMessage message ) { } public ColumbaMessage getMessage ( ) { } public String getHeader ( String key ) { } public void addMimePart ( StreamableMimePart mp ) { } public void setBodyText ( String str ) { } public String getSignature ( ) { } public String getBodyText ( ) { } public String getSubject ( ) { } public void setSubject ( String s ) { } public List getAttachments ( ) { } public void setAccountItem ( String host , String address ) { } public Charset getCharset ( ) { } public void setCharset ( Charset charset ) { } public boolean isSignMessage ( ) { } public void setSignMessage ( boolean signMessage ) { } public boolean isEncryptMessage ( ) { } public void setEncryptMessage ( boolean encryptMessage ) { } public String getPriority ( ) { } public void setPriority ( String s ) { } public boolean isHtml ( ) { } public void setHtml ( boolean html ) { } public List getRCPTVector ( ) { } }

Fix:
if ( ! ( displayName . equals ( "" ) ) ) {
Buggy code:
public class pdaModel { private int yourAge ; private int minAge ; private int maxAge ; private int baeAge ; private boolean creepFactor ; public int getYourAge ( ) { } public void setYourAge ( int yourAge ) { } public int getMinAge ( ) { } public void setMinAge ( int minAge ) { <START_BUG> minAge = ( ( yourAge ) // 2 ) + 7 ; <END_BUG> this . minAge = minAge ; } public int getMaxAge ( ) { } public void setMaxAge ( int maxAge ) { } public int getBaeAge ( ) { } public void setBaeAge ( int baeAge ) { } public boolean getCreepFactor ( ) { } public void setCreepFactor ( boolean creepFactor ) { } public boolean isNumeric ( String str , String str2 ) { } No newline ; at end ; of file ; }

Fix:
minAge = ( ( int ) ( ( ( ( double ) ( yourAge ) ) // 2.0 ) + 7.5 ) ) ;
Buggy code:
public final class DriverProcessor implements DeploymentUnitProcessor { private static final Logger log = Logger . getLogger ( "org.jboss.as.connector.deployers.jdbc" ) ; @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; final ServicesAttachment servicesAttachment = deploymentUnit . getAttachment ( SERVICES ) ; if ( ( module != null ) && ( servicesAttachment != null ) ) { final ModuleClassLoader classLoader = module . getClassLoader ( ) ; final List < String > driverNames = servicesAttachment . getServiceImplementations ( Driver . class . getName ( ) ) ; for ( String driverClassName : driverNames ) { try { final Class < ? extends Driver > driverClass = classLoader . loadClass ( driverClassName ) . asSubclass ( Driver . class ) ; final Constructor < ? extends Driver > constructor = driverClass . getConstructor ( ) ; final Driver driver = constructor . newInstance ( ) ; final int majorVersion = driver . getMajorVersion ( ) ; final int minorVersion = driver . getMinorVersion ( ) ; final boolean compliant = driver . jdbcCompliant ( ) ; if ( compliant ) { DriverProcessor . log . infof ( "Deploying<seq2seq4repair_space>JDBC-compliant<seq2seq4repair_space>driver<seq2seq4repair_space>%s<seq2seq4repair_space>(version<seq2seq4repair_space>%d.%d)" , driverClass , Integer . valueOf ( majorVersion ) , Integer . valueOf ( minorVersion ) ) ; } else { DriverProcessor . log . infof ( "Deploying<seq2seq4repair_space>non-JDBC-compliant<seq2seq4repair_space>driver<seq2seq4repair_space>%s<seq2seq4repair_space>(version<seq2seq4repair_space>%d.%d)" , driverClass , Integer . valueOf ( majorVersion ) , Integer . valueOf ( minorVersion ) ) ; } String driverName = deploymentUnit . getName ( ) ; InstalledDriver driverMetadata = new InstalledDriver ( driverName , driverClass . getName ( ) , null , majorVersion , minorVersion , compliant ) ; DriverService driverService = new DriverService ( driverMetadata , driver ) ; <START_BUG> phaseContext . getServiceTarget ( ) . addService ( JBOSS . append ( "jdbc-driver" , driverName . replaceAll ( "." , "_" ) ) , driverService ) . addDependency ( JDBC_DRIVER_REGISTRY_SERVICE , DriverRegistry . class , driverService . getDriverRegistryServiceInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; <END_BUG> } catch ( Exception e ) { DriverProcessor . log . warnf ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>instantiate<seq2seq4repair_space>driver<seq2seq4repair_space>class<seq2seq4repair_space>\"%s\":<seq2seq4repair_space>%s" , driverClassName , e ) ; } } } } @ Override public void undeploy ( final DeploymentUnit context ) { } }

Fix:
phaseContext . getServiceTarget ( ) . addService ( JBOSS . append ( "jdbc-driver" , driverName . replaceAll ( "\\." , "_" ) ) , driverService ) . addDependency ( JDBC_DRIVER_REGISTRY_SERVICE , DriverRegistry . class , driverService . getDriverRegistryServiceInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ;
Buggy code:
public class SQL { private String url ; private String user ; private String password ; public SQL ( String ip , String user , String password ) { } public void write ( String id , String gas , String temperature ) { try { Connection connection = DriverManager . getConnection ( url , user , password ) ; Statement statement = connection . createStatement ( ) ; <START_BUG> String query = ( ( ( ( ( "insert<seq2seq4repair_space>into<seq2seq4repair_space>data(id,<seq2seq4repair_space>gas,<seq2seq4repair_space>temperature)<seq2seq4repair_space>values('" + id ) + "',<seq2seq4repair_space>" ) + gas ) + ",<seq2seq4repair_space>" ) + temperature ) + ")" ; <END_BUG> statement . executeUpdate ( query ) ; statement . close ( ) ; connection . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } No newline ; at end ; of file ; }

Fix:
String query = ( ( ( ( ( "insert<seq2seq4repair_space>into<seq2seq4repair_space>data<seq2seq4repair_space>(id,<seq2seq4repair_space>gas,<seq2seq4repair_space>temperature)<seq2seq4repair_space>values('" + id ) + "',<seq2seq4repair_space>" ) + gas ) + ",<seq2seq4repair_space>" ) + temperature ) + ");" ;
Buggy code:
public class Hello implements IHello { public void hello ( String from ) { <START_BUG> System . out . println ( ( "Got<seq2seq4repair_space>hello()<seq2seq4repair_space>from<seq2seq4repair_space>" + from ) ) ; <END_BUG> } }

Fix:
System . out . println ( ( ( ( this . getClass ( ) . getName ( ) ) + ".hello<seq2seq4repair_space>from=" ) + from ) ) ;
Buggy code:
public class ItemTravelBelt extends ItemBauble implements IBaubleRender { private static final ResourceLocation texture = new ResourceLocation ( LibResources . MODEL_TRAVEL_BELT ) ; @ SideOnly ( Side . CLIENT ) private static ModelBiped model ; private static final int COST = 1 ; private static final int COST_INTERVAL = 10 ; public static List < String > playersWithStepup = new ArrayList ( ) ; final float speed ; final float jump ; final float fallBuffer ; public ItemTravelBelt ( ) { } public ItemTravelBelt ( String name , float speed , float jump , float fallBuffer ) { } @ Override public BaubleType getBaubleType ( ItemStack itemstack ) { } @ SubscribeEvent public void updatePlayerStepStatus ( LivingUpdateEvent event ) { } @ SubscribeEvent public void onPlayerJump ( LivingJumpEvent event ) { if ( ( event . entityLiving ) instanceof EntityPlayer ) { EntityPlayer player = ( ( EntityPlayer ) ( event . entityLiving ) ) ; ItemStack belt = PlayerHandler . getPlayerBaubles ( player ) . getStackInSlot ( 3 ) ; <START_BUG> if ( ( belt != null ) && ( ( belt . getItem ( ) ) instanceof ItemTravelBelt ) ) { <END_BUG> player . motionY += ( ( ItemTravelBelt ) ( belt . getItem ( ) ) ) . jump ; player . fallDistance = - ( ( ( ItemTravelBelt ) ( belt . getItem ( ) ) ) . fallBuffer ) ; } } } private boolean shouldPlayerHaveStepup ( EntityPlayer player ) { } @ SubscribeEvent public void playerLoggedOut ( PlayerEvent . PlayerLoggedOutEvent event ) { } public static String playerStr ( EntityPlayer player ) { } @ SideOnly ( Side . CLIENT ) ResourceLocation getRenderTexture ( ) { } @ Override @ SideOnly ( Side . CLIENT ) public void onPlayerBaubleRender ( ItemStack stack , RenderPlayerEvent event , RenderType type ) { } }

Fix:
if ( ( ( belt != null ) && ( ( belt . getItem ( ) ) instanceof ItemTravelBelt ) ) && ( ManaItemHandler . requestManaExact ( belt , player , ItemTravelBelt . COST , false ) ) ) {
Buggy code:
public class TestRTGBase extends SolrTestCaseJ4 { public static String FROM_LEADER = FROMLEADER . toString ( ) ; @ Override public void clearIndex ( ) { } protected final ConcurrentHashMap < Integer , TestRTGBase . DocInfo > model = new ConcurrentHashMap < Integer , TestRTGBase . DocInfo > ( ) ; protected Map < Integer , TestRTGBase . DocInfo > committedModel = new HashMap < Integer , TestRTGBase . DocInfo > ( ) ; protected long snapshotCount ; protected long committedModelClock ; protected volatile int lastId ; protected final String field = "val_l" ; protected Object [ ] syncArr ; protected Object globalLock = this ; protected void initModel ( int ndocs ) { } protected static class DocInfo { long version ; long val ; public DocInfo ( long version , long val ) { } public String toString ( ) { } } protected long badVersion ( Random rand , long version ) { } protected List < Long > getLatestVersions ( ) { } protected int getFirstMatch ( IndexReader r , Term t ) throws IOException { Fields fields = MultiFields . getFields ( r ) ; if ( fields == null ) return - 1 ; Terms terms = fields . terms ( t . field ( ) ) ; if ( terms == null ) return - 1 ; BytesRef termBytes = t . bytes ( ) ; final TermsEnum termsEnum = terms . iterator ( null ) ; if ( ! ( termsEnum . seekExact ( termBytes , false ) ) ) { return - 1 ; } <START_BUG> DocsEnum docs = termsEnum . docs ( MultiFields . getLiveDocs ( r ) , null , false ) ; <END_BUG> int id = docs . nextDoc ( ) ; if ( id != ( DocIdSetIterator . NO_MORE_DOCS ) ) { int next = docs . nextDoc ( ) ; assertEquals ( NO_MORE_DOCS , next ) ; } return id == ( DocIdSetIterator . NO_MORE_DOCS ) ? - 1 : id ; } }

Fix:
DocsEnum docs = termsEnum . docs ( MultiFields . getLiveDocs ( r ) , null , 0 ) ;
Buggy code:
public class Settings { Context context ; public Settings ( Context context ) { } public void createOptionsPopupMenu ( View v ) { } private void clearSearchSuggestions ( ) { } private void sendEmail ( ) { } private void changeLanguageClicked ( ) { AlertDialog . Builder clangBuilder = new AlertDialog . Builder ( context ) ; View view = LayoutInflater . from ( context ) . inflate ( change_language_dialog , null ) ; clangBuilder . setView ( view ) ; final ListView listView = setupListView ( view ) ; clangBuilder . setNegativeButton ( close_help , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { } } ) ; clangBuilder . setPositiveButton ( settings_changelanguage_confirm , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { int pos = listView . getCheckedItemPosition ( ) ; if ( pos != ( getCurrentLanguagePosition ( ) ) ) { LocaleSettings localeSettings = new LocaleSettings ( context ) ; <START_BUG> localeSettings . setLanguage ( Settings . getLanguageFromPos ( pos ) , SplashActivity . class ) ; <END_BUG> } } } ) ; AlertDialog chLangDialog = clangBuilder . create ( ) ; chLangDialog . show ( ) ; Button dismissButton = chLangDialog . getButton ( BUTTON_NEGATIVE ) ; Button confirmButton = chLangDialog . getButton ( BUTTON_POSITIVE ) ; changeButtonColor ( dismissButton ) ; changeButtonColor ( confirmButton ) ; } private int getCurrentLanguagePosition ( ) { } private ListView setupListView ( View view ) { } private void changeButtonColor ( Button button ) { } private int getLanguagePos ( String lang ) { } public static String getLanguageFromPos ( int pos ) { } }

Fix:
localeSettings . setLanguage ( Settings . getLanguageFromPos ( pos ) , SplashActivity . class , true ) ;
Buggy code:
public class SimpleTestPanelTest extends WicketTestCase { public SimpleTestPanelTest ( String name ) { } public void testRenderHomePage_2 ( ) throws Exception { executeTest ( SimpleTestPage . class , "SimpleTestPageExpectedResult.html" ) ; application . setupRequestAndResponse ( ) ; WebRequestCycle cycle = application . createRequestCycle ( ) ; Page page = application . getLastRenderedPage ( ) ; <START_BUG> String url = ( ( SimpleTestPanel ) ( page . get ( "testPanel" ) ) ) . getTimeBehavior ( ) . getCallbackUrl ( ) ; <END_BUG> application . getServletRequest ( ) . setRequestToRedirectString ( url ) ; application . processRequestCycle ( cycle ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( DiffUtil . validatePage ( document , SimpleTestPage . class , "SimpleTestPageExpectedResult-1.html" ) ) ; } }

Fix:
String url = ( ( SimpleTestPanel ) ( page . get ( "testPanel" ) ) ) . getTimeBehavior ( ) . getCallbackUrl ( ) . toString ( ) ;
Buggy code:
public class DeclareDominates extends Declare { private TypePatternList patterns ; public DeclareDominates ( List patterns ) { } private DeclareDominates ( TypePatternList patterns ) { } public String toString ( ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public void write ( DataOutputStream s ) throws IOException { } public static Declare read ( DataInputStream s , ISourceContext context ) throws IOException { } public void resolve ( IScope scope ) { <START_BUG> patterns = patterns . resolveBindings ( scope , NONE , false ) ; <END_BUG> } public TypePatternList getPatterns ( ) { } private int matchingIndex ( ResolvedTypeX a ) { } public int compare ( ResolvedTypeX aspect1 , ResolvedTypeX aspect2 ) { } public boolean isAdviceLike ( ) { } }

Fix:
patterns = patterns . resolveBindings ( scope , NONE , false , false ) ;
Buggy code:
public class RomXmlParser extends DefaultHandler implements Constants { public final String TAG = this . getClass ( ) . getSimpleName ( ) ; String value = null ; Context mContext ; int filesize ; String filesizeStr ; boolean tagName = false ; boolean tagVersion = false ; boolean tagCode = false ; boolean tagDirectUrl = false ; boolean tagHttpUrl = false ; boolean tagMD5 = false ; boolean tagLog = false ; boolean tagAndroid = false ; boolean tagDeveloper = false ; boolean tagWebsite = false ; boolean tagDonateUrl = false ; public void parse ( File xmlFile , Context context ) throws IOException { } private boolean versionBiggerThan ( String current , String manifest ) { } private void setUpdateAvailability ( ) { String currentVer = Utils . getProp ( "ro.ota.version" ) ; String manifestVer = RomUpdate . getVersion ( mContext ) ; <START_BUG> boolean available = versionBiggerThan ( currentVer , manifestVer ) ; <END_BUG> RomUpdate . setUpdateAvailable ( mContext , available ) ; if ( DEBUGGING ) Log . d ( TAG , ( "Update<seq2seq4repair_space>Availability<seq2seq4repair_space>is<seq2seq4repair_space>" + available ) ) ; } @ Override public void startElement ( String uri , String localName , String qName , Attributes attributes ) throws SAXException { } @ Override public void characters ( char [ ] ch , int start , int length ) throws SAXException { } }

Fix:
boolean available = ! ( versionBiggerThan ( currentVer , manifestVer ) ) ;
Buggy code:
public class MasterElector { private static final Logger LOGGER = LoggerFactory . getLogger ( MasterElector . class ) ; private static List < MasterNodeChangeListener > masterNodeChangeListenerList ; private static Node master ; public static void addMasterNodeChangeListener ( MasterNodeChangeListener masterNodeChangeListener ) { } public static Node getMaster ( ) { } public static void addNodes ( List < Node > nodes ) { } public static void addNode ( Node newNode ) { } public static void removeNode ( Node removedNode ) { if ( ( MasterElector . master ) != null ) { if ( MasterElector . master . getIdentity ( ) . equals ( removedNode . getIdentity ( ) ) ) { <START_BUG> List < Node > nodes = NodeManager . getNodeList ( Config . getNodeType ( ) ) ; <END_BUG> if ( CollectionUtils . isNotEmpty ( nodes ) ) { Node newMaster = null ; for ( Node node : nodes ) { if ( newMaster == null ) { newMaster = node ; } else { if ( ( newMaster . getCreateTime ( ) ) > ( node . getCreateTime ( ) ) ) { newMaster = node ; } } } MasterElector . master = newMaster ; MasterElector . notifyListener ( ) ; } } } } private static void notifyListener ( ) { } }

Fix:
List < Node > nodes = NodeManager . getNodeList ( Config . getNodeType ( ) , Config . getNodeGroup ( ) ) ;
Buggy code:
@ SuppressWarnings ( "restriction" ) public class Theories extends JUnit4ClassRunner { public Theories ( Class < ? > klass ) throws InitializationError { } @ Override protected void collectInitializationErrors ( List < Throwable > errors ) { } @ Override protected List < FrameworkMethod > computeTestMethods ( ) { } @ Override public Statement childBlock ( final FrameworkMethod method ) { } public class TheoryAnchor extends Statement { private int successes = 0 ; private FrameworkMethod fTestMethod ; private List < AssumptionViolatedException > fInvalidParameters = new ArrayList < AssumptionViolatedException > ( ) ; public TheoryAnchor ( FrameworkMethod method ) { } @ Override public void evaluate ( ) throws Throwable { } protected void runWithAssignment ( Assignments parameterAssignment ) throws Throwable { } protected void runWithIncompleteAssignment ( Assignments incomplete ) throws IllegalAccessException , InstantiationException , Throwable { } protected void runWithCompleteAssignment ( final Assignments complete ) throws IllegalAccessException , InstantiationException , NoSuchMethodException , Throwable , InvocationTargetException { } private Statement methodCompletesWithParameters ( final FrameworkMethod method , final Assignments complete , final Object freshInstance ) { return new Statement ( ) { @ Override public void evaluate ( ) throws Throwable { try { <START_BUG> final Object [ ] values = complete . getMethodArguments ( nullsOk ( ) , freshInstance ) ; <END_BUG> method . invokeExplosively ( freshInstance , values ) ; } catch ( CouldNotGenerateValueException e ) { } } } ; } protected void handleAssumptionViolation ( AssumptionViolatedException e ) { } protected void reportParameterizedError ( Throwable e , Object ... params ) throws Throwable { } private boolean nullsOk ( ) { } protected void handleDataPointSuccess ( ) { } } }

Fix:
final Object [ ] values = complete . getMethodArguments ( nullsOk ( ) ) ;
Buggy code:
public class BundleResolveProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit depUnit = phaseContext . getDeploymentUnit ( ) ; Deployment deployment = depUnit . getAttachment ( DEPLOYMENT_KEY ) ; <START_BUG> XBundle bundle = depUnit . getAttachment ( INSTALLED_BUNDLE_KEY ) ; <END_BUG> if ( ( bundle == null ) || ( ! ( deployment . isAutoStart ( ) ) ) ) return ; if ( ( depUnit . getParent ( ) ) != null ) return ; BundleResolveProcessor . resolveBundle ( phaseContext , bundle ) ; } static void resolveBundle ( DeploymentPhaseContext phaseContext , XBundle bundle ) { } @ Override public void undeploy ( final DeploymentUnit depUnit ) { } }

Fix:
XBundle bundle = depUnit . getAttachment ( BUNDLE_KEY ) ;
Buggy code:
public class DuplicateStateError extends AbstractTest { @ Test ( expected = MutagenException . class ) public void test ( ) { <START_BUG> mutate ( "mutation//tests//duplicatestate" ) ; <END_BUG> } }

Fix:
mutate ( "mutations//tests//duplicatestate" ) ;
Buggy code:
public class newton_change_of_strategy { public static void main ( String [ ] args ) { Input . initialize ( args ) ; Loss loss = loss_train . clone_loss ( ) ; Logistic_Loss_efficient . buildHessians ( data , d ) ; int n = loss . getDataSize ( ) ; int d = loss . getDimension ( ) ; loss . set_lambda ( ( 1.0 // n ) ) ; DataPoint initParam = ( ( DataPoint ) ( DensePoint_efficient . one ( loss_train . getDimension ( ) ) . multiply ( 3.0 ) ) ) ; int num_strategy = 7 ; Dyna_regularizer_loss_e [ ] dyna_losses = new Dyna_regularizer_loss_e [ num_strategy ] ; for ( int i = 0 ; i < num_strategy ; i ++ ) { double incrementFactor = 1 + ( Math . pow ( 2 , ( i - 2 ) ) ) ; Adapt_Strategy_Double_Full strategy = new Adapt_Strategy_Double_Full ( loss . getDataSize ( ) , ( 3 * d ) , 1 , 1 ) ; strategy . setIncrement_factor ( incrementFactor ) ; dyna_losses [ i ] = new Dyna_regularizer_loss_e ( loss . clone_loss ( ) , strategy ) ; } FirstOrderOpt [ ] methods_in = new FirstOrderOpt [ num_strategy ] ; for ( int i = 0 ; i < num_strategy ; i ++ ) { methods_in [ i ] = new opt . firstorder . Newton ( dyna_losses [ i ] ) ; methods_in [ i ] . setName ( ( "c:" + ( 1 + ( Math . pow ( 2 , ( i - 2 ) ) ) ) ) ) ; } First_Order_Factory_efficient . methods_in = methods_in ; First_Order_Factory_efficient . experiment_with_iterations_complexity ( 4 , loss . clone_loss ( ) , 8 , ( - 1.0 ) , loss_test , ( ( config . logDir ) + "_newton_strategy" ) , L , false , n ) ; methods_in = new FirstOrderOpt [ num_strategy ] ; for ( int i = 0 ; i < num_strategy ; i ++ ) { Adapt_Strategy_Double_Full strategy = new Adapt_Strategy_Double_Full ( loss . getDataSize ( ) , ( 3 * d ) , 1 , 1 ) ; <START_BUG> methods_in [ i ] = new opt . firstorder . NewtonDataDriven ( ( ( SecondOrderLoss ) ( loss . clone_loss ( ) ) ) , strategy , ( 1 + ( Math . pow ( 2 , ( i - 2 ) ) ) ) ) ; <END_BUG> methods_in [ i ] . setName ( ( "c:" + ( 1 + ( Math . pow ( 2 , ( i - 2 ) ) ) ) ) ) ; } First_Order_Factory_efficient . methods_in = methods_in ; First_Order_Factory_efficient . experiment_with_iterations_complexity ( 4 , loss . clone_loss ( ) , 8 , ( - 1.0 ) , loss_test , ( ( config . logDir ) + "_newtondd_strategy" ) , L , false , n ) ; } }

Fix:
methods_in [ i ] = new opt . firstorder . NewtonDataDriven ( ( ( SecondOrderLoss ) ( loss . clone_loss ( ) ) ) , strategy , Math . pow ( 2 , ( i - 2 ) ) ) ;