nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class JDBCRealm extends BaseInterceptor { ContextManager cm ; int reqRolesNote ; private int debug = 0 ; private Connection dbConnection = null ; private String connectionURL = null ; private String userTable = null ; private String userNameCol = null ; private String userCredCol = null ; private String userRoleTable = null ; private String roleNameCol = null ; private String driverName = null ; private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.request" ) ; private boolean started = false ; public int getDebug ( ) { } public void setDebug ( int debug ) { } public void setDriverName ( String driverName ) { } public void setConnectionURL ( String connectionURL ) { } public void setUserTable ( String userTable ) { } public void setUserNameCol ( String userNameCol ) { } public void setUserCredCol ( String userCredCol ) { } public void setUserRoleTable ( String userRoleTable ) { } public void setRoleNameCol ( String roleNameCol ) { } public boolean authenticate ( String username , String credentials ) { } public String [ ] getUserRoles ( String username ) { try { if ( ( ( dbConnection ) == null ) || ( dbConnection . isClosed ( ) ) ) { log ( JDBCRealm . sm . getString ( "jdbcRealm.getUserRolesDBClosed" ) ) ; dbConnection = DriverManager . getConnection ( connectionURL ) ; if ( ( ( dbConnection ) == null ) || ( dbConnection . isClosed ( ) ) ) { log ( JDBCRealm . sm . getString ( "jdbcRealm.getUserRolesDBReOpenFail" ) ) ; return null ; } } Statement statement = dbConnection . createStatement ( ) ; if ( ( debug ) > 1 ) { log ( ( ( ( ( ( ( "jdbcRealm.getUserRoles:<seq2seq4repair_space>SELECT<seq2seq4repair_space>1<seq2seq4repair_space>FROM<seq2seq4repair_space>" + ( userRoleTable ) ) + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>" ) + ( userNameCol ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>'" ) + username ) + "'" ) ) ; } ResultSet rs = statement . executeQuery ( ( ( ( ( ( ( ( ( "SELECT<seq2seq4repair_space>" + ( roleNameCol ) ) + "<seq2seq4repair_space>FROM<seq2seq4repair_space>" ) + ( userRoleTable ) ) + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>" ) + ( userNameCol ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>'" ) + username ) + "'" ) ) ; Vector vrol = new Vector ( ) ; while ( rs . next ( ) ) { <START_BUG> vrol . add ( rs . getString ( 1 ) ) ; <END_BUG> } String [ ] res = new String [ vrol . size ( ) ] ; for ( int i = 0 ; i < ( vrol . size ( ) ) ; i ++ ) res [ i ] = ( ( String ) ( vrol . elementAt ( i ) ) ) ; return res ; } catch ( SQLException ex ) { dbConnection = null ; if ( ( debug ) > 1 ) log ( JDBCRealm . sm . getString ( "jdbcRealm.getUserRolesSQLException" , ex . getMessage ( ) ) ) ; } return null ; } public void contextInit ( Context ctx ) throws TomcatException { } public void contextShutdown ( Context ctx ) throws TomcatException { } void log ( String s ) { } public void setContextManager ( ContextManager cm ) { } public int authorize ( Request req , Response response ) { } }

Fix:
vrol . addElement ( rs . getString ( 1 ) ) ;
Buggy code:
public class FavoritesActivityFragment extends Fragment { private GridView mGridView ; private ArrayList < Bitmap > mBitmapsFromDb = new ArrayList < Bitmap > ( ) ; private ArrayList < String > mTitleList = new ArrayList < String > ( ) ; private String mTitle ; private String mImageBytes ; public FavoritesActivityFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void populateViewFromDb ( ) { } public void gridviewClickListener ( ) { mGridView . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { mTitle = mTitleList . get ( position ) ; SharedPreferences sharedPreferences = PreferenceManager . getDefaultSharedPreferences ( getActivity ( ) ) ; Bitmap bitmap = mBitmapsFromDb . get ( position ) ; byte [ ] bytes = convertBitmapToByteArrayAsync ( bitmap ) ; String stringBytes = Base64 . encodeToString ( bytes , DEFAULT ) ; Intent intent = new Intent ( getActivity ( ) , DetailActivity . class ) ; intent . putExtra ( "title" , mTitle ) ; <START_BUG> sharedPreferences . edit ( ) . putString ( "bytes" , stringBytes ) ; <END_BUG> startActivity ( intent ) ; } } ) ; } public byte [ ] convertBitmapToByteArrayAsync ( Bitmap bitmap ) { } public Bitmap convertByteArrayToBitmapAsync ( byte [ ] bytes ) { } }

Fix:
sharedPreferences . edit ( ) . putString ( "bytes" , stringBytes ) . commit ( ) ;
Buggy code:
public final class GuestBook extends WicketExamplePage { private static final List commentList = new ArrayList ( ) ; private final ListView commentListView ; public GuestBook ( ) { } public final class CommentForm extends Form { public CommentForm ( final String id ) { } public final void onSubmit ( ) { <START_BUG> final Comment comment = ( ( Comment ) ( getRootModelObject ( ) ) ) ; <END_BUG> final Comment newComment = new Comment ( comment ) ; newComment . setDate ( new Date ( ) ) ; commentListView . modelChanging ( ) ; synchronized ( commentListView . getModelLock ( ) ) { GuestBook . commentList . add ( 0 , newComment ) ; } commentListView . modelChanged ( ) ; comment . setText ( "" ) ; } } }

Fix:
final Comment comment = ( ( Comment ) ( getModelObject ( ) ) ) ;
Buggy code:
public class NullFigure extends AbstractFigure { private Rectangle myDisplayBox ; protected void basicMoveBy ( int dx , int dy ) { } public void basicDisplayBox ( Point origin , Point corner ) { } public Rectangle displayBox ( ) { <START_BUG> return myDisplayBox ; <END_BUG> } public void draw ( Graphics g ) { } public HandleEnumeration handles ( ) { } public boolean isEmpty ( ) { } public FigureEnumeration figures ( ) { } public Figure findFigureInside ( int x , int y ) { } public Object clone ( ) { } public boolean includes ( Figure figure ) { } public FigureEnumeration decompose ( ) { } public void release ( ) { } public void invalidate ( ) { } public Object getAttribute ( String name ) { } public Object getAttribute ( FigureAttributeConstant attributeConstant ) { } public void setAttribute ( String name , Object value ) { } public void setAttribute ( FigureAttributeConstant attributeConstant , Object value ) { } }

Fix:
return new Rectangle ( myDisplayBox ) ;
Buggy code:
public abstract class AbstractJMSRuntimeHandler < T > extends AbstractRuntimeOnlyHandler { private final Map < AbstractJMSRuntimeHandler . DestinationConfig , T > destinations = Collections . synchronizedMap ( new HashMap < AbstractJMSRuntimeHandler . DestinationConfig , T > ( ) ) ; @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { String opName = operation . require ( OP ) . asString ( ) ; PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final T dataSource = getDestinationConfig ( address ) ; boolean includeDefault = ( operation . hasDefined ( INCLUDE_DEFAULTS ) ) ? operation . get ( INCLUDE_DEFAULTS ) . asBoolean ( ) : false ; if ( READ_ATTRIBUTE_OPERATION . equals ( opName ) ) { final String attributeName = operation . require ( NAME ) . asString ( ) ; executeReadAttribute ( attributeName , context , dataSource , address , includeDefault ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } else { throw AbstractJMSRuntimeHandler . unknownOperation ( opName ) ; } } public void registerDestination ( final String server , final String name , final T destination ) { } public void unregisterDestination ( final String server , final String name ) { } protected abstract void executeReadAttribute ( final String attributeName , final OperationContext context , final T destination , final PathAddress address , final boolean includeDefault ) { } private static IllegalStateException unknownOperation ( String opName ) { } private T getDestinationConfig ( final PathAddress operationAddress ) throws OperationFailedException { } private static final class DestinationConfig { private final String server ; private final String name ; private DestinationConfig ( final String server , final String name ) { } @ Override public boolean equals ( final Object o ) { } @ Override public int hashCode ( ) { } } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class NubMatchingTestModule extends PrivateModule { private static final Logger LOG = LoggerFactory . getLogger ( NubMatchingTestModule . class ) ; @ Override protected void configure ( ) { } @ Provides @ Inject @ Singleton public static NubIndex provideIndex ( ) throws IOException { } @ Provides @ Singleton public static HigherTaxaLookup provideSynonyms ( ) throws IOException { } @ Provides @ Singleton public NameParser provideParser ( ) { } private static List < NameUsage > loadIndexJson ( ) { Map < Integer , NameUsage > usages = Maps . newHashMap ( ) ; InputStreamUtils isu = new InputStreamUtils ( ) ; ObjectMapper mapper = new ObjectMapper ( ) ; int id = 0 ; <START_BUG> while ( id < 100 ) { <END_BUG> String file = ( "index//nub" + id ) + ".json" ; InputStream json = isu . classpathStream ( file ) ; if ( json != null ) { try { int before = usages . size ( ) ; NameUsageMatch m = mapper . readValue ( json , NameUsageMatch . class ) ; for ( NameUsage u : NubMatchingTestModule . extractUsages ( m ) ) { if ( u != null ) { usages . put ( u . getKey ( ) , u ) ; } } System . out . println ( ( ( ( "Loaded<seq2seq4repair_space>" + ( ( usages . size ( ) ) - before ) ) + "<seq2seq4repair_space>new<seq2seq4repair_space>usage(s)<seq2seq4repair_space>from<seq2seq4repair_space>" ) + file ) ) ; } catch ( IOException e ) { Assert . fail ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>" + file ) + ":<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ) ) ; } } id ++ ; } return Lists . newArrayList ( usages . values ( ) ) ; } private static List < NameUsage > extractUsages ( NameUsageMatch m ) { } private static NameUsage toUsage ( NameUsageMatch m ) { } }

Fix:
while ( id < 150 ) {
Buggy code:
public class Lobby extends Application implements EventHandler < ActionEvent > { Lobby lobby = this ; public Stage stage ; Group root ; Canvas canvas ; Button createNewRoom ; Button refreshRoom ; Client client ; ArrayList < Button > buttons = new ArrayList < Button > ( ) ; public Lobby ( Client client ) { } @ Override public void start ( Stage stage0 ) throws Exception { this . stage = stage0 ; stage . setTitle ( "Game<seq2seq4repair_space>Lobby" ) ; root = new Group ( ) ; canvas = new Canvas ( 850 , 600 ) ; createNewRoom = new Button ( "Create<seq2seq4repair_space>A<seq2seq4repair_space>New<seq2seq4repair_space>Room" ) ; <START_BUG> createNewRoom . setLayoutX ( 270 ) ; <END_BUG> createNewRoom . setLayoutY ( 570 ) ; createNewRoom . setOnAction ( this ) ; refreshRoom = new Button ( "Refresh<seq2seq4repair_space>Game<seq2seq4repair_space>lobby" ) ; refreshRoom . setLayoutX ( 430 ) ; refreshRoom . setLayoutY ( 570 ) ; refreshRoom . setOnAction ( this ) ; root . getChildren ( ) . add ( canvas ) ; root . getChildren ( ) . add ( createNewRoom ) ; root . getChildren ( ) . add ( refreshRoom ) ; stage . setOnCloseRequest ( new EventHandler < WindowEvent > ( ) { @ Override public void handle ( WindowEvent arg0 ) { stage . close ( ) ; } } ) ; Scene scene = new Scene ( root ) ; scene . getStylesheets ( ) . add ( Lobby . class . getResource ( "lobbyStyle.css" ) . toExternalForm ( ) ) ; stage . setScene ( scene ) ; stage . setResizable ( false ) ; stage . show ( ) ; } @ Override public void handle ( ActionEvent e ) { } }

Fix:
createNewRoom . setLayoutX ( 170 ) ;
Buggy code:
public class BroadcastGroupControlHandler extends AbstractHornetQComponentControlHandler < BroadcastGroupControl > { public static final BroadcastGroupControlHandler INSTANCE = new BroadcastGroupControlHandler ( ) ; public static final String GET_CONNECTOR_PAIRS_AS_JSON = "get-connector-pairs-as-json" ; private BroadcastGroupControlHandler ( ) { } @ Override public void register ( ManagementResourceRegistration registry ) { } @ Override protected BroadcastGroupControl getHornetQComponentControl ( HornetQServer hqServer , PathAddress address ) { } @ Override protected String getDescriptionPrefix ( ) { } @ Override protected Object handleOperation ( String operationName , OperationContext context , ModelNode operation ) throws OperationFailedException { if ( BroadcastGroupControlHandler . GET_CONNECTOR_PAIRS_AS_JSON . equals ( operationName ) ) { BroadcastGroupControl control = getHornetQComponentControl ( context , operation , false ) ; try { context . getResult ( ) . set ( control . getConnectorPairsAsJSON ( ) ) ; } catch ( Exception e ) { <START_BUG> context . getFailureDescription ( ) . set ( e . toString ( ) ) ; <END_BUG> } } else { unsupportedOperation ( operationName ) ; } return null ; } }

Fix:
context . getFailureDescription ( ) . set ( e . getLocalizedMessage ( ) ) ;
Buggy code:
public class Customer { private String username ; private String password ; private String fullName ; private Money balance ; public Customer ( String username , String password , String fullName , Money balance ) { } public boolean isPassword ( String password ) { } public String getUsername ( ) { } public String getFullName ( ) { } public Money getBalance ( ) { } public String getBalanceString ( ) { } public void withdraw ( Money amount ) throws InvalidBalanceException { Money newBalance = balance . minus ( amount ) ; <START_BUG> if ( newBalance . isNegativeOrZero ( ) ) { <END_BUG> throw new InvalidBalanceException ( "Withdrawal<seq2seq4repair_space>exceeds<seq2seq4repair_space>available<seq2seq4repair_space>funds" ) ; } balance = newBalance ; } public void deposit ( Money amount ) { } No newline ; at end ; of file ; }

Fix:
if ( newBalance . isNegative ( ) ) {
Buggy code:
public class Connector { private static final String API_URL = "http:////128.199.255.194:3000//" ; private API api ; public Connector ( ) { } public void login ( String email , String password , final JCallback < Outcome > callback ) { } public void register ( String name , String email , String password , final JCallback < Outcome > callback ) { } public void search ( String email , final JCallback < Outcome > callback ) { } public void sendRequest ( String email , String password , String tEmail , final JCallback < Outcome > callback ) { } public void responseRequest ( String email , String password , String tEmail , final JCallback < Outcome > callback ) { } public void rank ( String email , String password , final JCallback < Outcome > callback ) { } public void friendRequests ( String email , String password , final JCallback < Outcome > callback ) { Map < String , String > parameters = new HashMap < > ( ) ; parameters . put ( "email" , email ) ; parameters . put ( "password" , password ) ; api . makePostRequest ( "users//get_request" , parameters , new retrofit . Callback < JsonElement > ( ) { @ Override public void success ( JsonElement jsonElement , Response response ) { JsonObject jsonObject = jsonElement . getAsJsonObject ( ) ; boolean success = ( jsonObject . get ( "success" ) . getAsInt ( ) ) == 1 ; Object object = "Network<seq2seq4repair_space>error" ; try { if ( ( jsonObject . get ( "from" ) ) != null ) <START_BUG> object = jsonObject . get ( "from" ) . getAsJsonObject ( ) ; <END_BUG> else if ( ( jsonObject . get ( "message" ) ) != null ) object = jsonObject . get ( "message" ) . getAsString ( ) ; } catch ( Exception ex ) { System . out . println ( ex . getMessage ( ) ) ; } callback . call ( new Outcome ( success , object ) ) ; } @ Override public void failure ( RetrofitError error ) { callback . call ( new Outcome ( false , null ) ) ; } } ) ; } public void getUserInfo ( String email , String password , final JCallback < Outcome > callback ) { } public void updateUserInfo ( String email , String password , String data , final JCallback < Outcome > callback ) { } public void request ( String url , Map < String , String > parameters , final JCallback < Outcome > callback ) { } }

Fix:
object = jsonObject . get ( "from" ) . getAsJsonArray ( ) ;
Buggy code:
public class NavigationHistoryAction extends PageEventAction { private boolean forward ; private Menu historyMenu ; private int MAX_HISTORY_LENGTH = 9 ; private class MenuCreator implements IMenuCreator { public void dispose ( ) { } public Menu getMenu ( Menu parent ) { } public Menu getMenu ( Control parent ) { dispose ( ) ; historyMenu = new Menu ( parent ) ; IWorkbenchPage page = getWorkbenchWindow ( ) . getActivePage ( ) ; if ( page == null ) { return historyMenu ; } final NavigationHistory history = ( ( NavigationHistory ) ( getWorkbenchWindow ( ) . getActivePage ( ) . getNavigationHistory ( ) ) ) ; NavigationHistoryEntry [ ] entries ; if ( forward ) { entries = history . getForwardEntries ( ) ; } else { entries = history . getBackwardEntries ( ) ; } int [ ] entriesCount = new int [ entries . length ] ; for ( int i = 0 ; i < ( entriesCount . length ) ; i ++ ) { entriesCount [ i ] = 1 ; } entries = colapseEntries ( entries , entriesCount ) ; for ( int i = 0 ; i < ( entries . length ) ; i ++ ) { if ( i > ( MAX_HISTORY_LENGTH ) ) { break ; } String text = entries [ i ] . getHistoryText ( ) ; if ( text != null ) { MenuItem item = new MenuItem ( historyMenu , SWT . NONE ) ; item . setData ( entries [ i ] ) ; if ( ( entriesCount [ i ] ) > 1 ) { text = NLS . bind ( NavigationHistoryAction_locations , text , new Integer ( entriesCount [ i ] ) ) ; } item . setText ( text ) ; item . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { <START_BUG> history . shiftCurrentEntry ( ( ( NavigationHistoryEntry ) ( e . widget . getData ( ) ) ) ) ; <END_BUG> } } ) ; } } return historyMenu ; } } public NavigationHistoryAction ( IWorkbenchWindow window , boolean forward ) { } public void pageClosed ( IWorkbenchPage page ) { } private NavigationHistoryEntry [ ] colapseEntries ( NavigationHistoryEntry [ ] entries , int [ ] entriesCount ) { } public void pageActivated ( IWorkbenchPage page ) { } public void run ( ) { } public void update ( ) { } }

Fix:
history . shiftCurrentEntry ( ( ( NavigationHistoryEntry ) ( e . widget . getData ( ) ) ) , forward ) ;
Buggy code:
public class DeleteCommand < T > extends EditCommand < T > { public DeleteCommand ( final T object ) { } @ Override public void accept ( final CommandVisitor < T > visitor ) { <START_BUG> visitor . visitDeleteCommand ( object ) ; <END_BUG> } }

Fix:
visitor . visitDeleteCommand ( DeleteCommand . getObject ( ) ) ;
Buggy code:
public class ShellSpout implements ISpout { public static Logger LOG = Logger . getLogger ( ShellSpout . class ) ; private SpoutOutputCollector _collector ; private String [ ] _command ; private ShellProcess _process ; public ShellSpout ( ShellComponent component ) { } public ShellSpout ( String ... command ) { } public void open ( Map stormConf , TopologyContext context , SpoutOutputCollector collector ) { _process = new ShellProcess ( _command ) ; _collector = collector ; try { Number subpid = _process . launch ( stormConf , context ) ; ShellSpout . LOG . info ( ( "Launched<seq2seq4repair_space>subprocess<seq2seq4repair_space>with<seq2seq4repair_space>pid<seq2seq4repair_space>" + subpid ) ) ; } catch ( IOException e ) { <START_BUG> throw new RuntimeException ( ( "Error<seq2seq4repair_space>when<seq2seq4repair_space>launching<seq2seq4repair_space>multilang<seq2seq4repair_space>subprocess\n" + ( _process . getErrorsString ( ) ) ) , e ) ; <END_BUG> } } public void close ( ) { } private JSONObject _next ; public void nextTuple ( ) { } private JSONObject _ack ; public void ack ( Object msgId ) { } private JSONObject _fail ; public void fail ( Object msgId ) { } private void querySubprocess ( Object query ) { } @ Override public void activate ( ) { } @ Override public void deactivate ( ) { } }

Fix:
throw new RuntimeException ( "Error<seq2seq4repair_space>when<seq2seq4repair_space>launching<seq2seq4repair_space>multilang<seq2seq4repair_space>subprocess" , e ) ;
Buggy code:
public class Image extends WebComponent implements IResourceListener { private static final long serialVersionUID = 1L ; private final LocalizedImageResource localizedImageResource = new LocalizedImageResource ( this ) ; protected Image ( final String id ) { } public Image ( final String id , final ResourceReference resourceReference ) { } public Image ( final String id , final ResourceReference resourceReference , PageParameters resourceParameters ) { } public Image ( final String id , final IResource imageResource ) { } public Image ( final String id , final IModel < ? > model ) { } public Image ( final String id , final String string ) { } public void onResourceRequested ( ) { } public void setImageResource ( final IResource imageResource ) { } public void setImageResourceReference ( final ResourceReference resourceReference ) { } public void setImageResourceReference ( final ResourceReference resourceReference , final PageParameters parameters ) { } @ Override public Component setDefaultModel ( IModel < ? > model ) { } protected IResource getImageResource ( ) { } protected ResourceReference getImageResourceReference ( ) { } @ Override protected IModel < ? > initModel ( ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { } protected boolean shouldAddAntiCacheParameter ( ) { } protected final void addAntiCacheParameter ( final ComponentTag tag ) { String url = tag . getAttributes ( ) . getString ( "src" ) ; url = url + ( url . contains ( "?" ) ? "&" : "?" ) ; <START_BUG> url = ( url + "wicket:antiCache=" ) + ( System . currentTimeMillis ( ) ) ; <END_BUG> tag . put ( "src" , url ) ; } @ Override protected boolean getStatelessHint ( ) { } @ Override public void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } }

Fix:
url = ( url + "antiCache=" ) + ( System . currentTimeMillis ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient @ ServerSetup ( ReDeploymentTestCase . ReDeploymentTestCaseSetup . class ) public class ReDeploymentTestCase extends ContainerResourceMgmtTestBase { static String deploymentName = "re-deployment.rar" ; @ ContainerResource private Context context ; @ ArquillianResource private Deployer deployer ; static class ReDeploymentTestCaseSetup extends AbstractMgmtServerSetupTask { @ Override public void tearDown ( final ManagementClient managementClient , final String containerId ) throws Exception { } @ Override protected void doSetup ( final ManagementClient managementClient ) throws Exception { } } private void setup ( ) throws Exception { String xml = FileUtils . readFile ( ReDeploymentTestCase . class , "re-deployment.xml" ) ; <START_BUG> List < ModelNode > operations = xmlToModelOperations ( xml , CURRENT . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ; <END_BUG> executeOperation ( operationListToCompositeOperation ( operations ) ) ; final ModelNode address = new ModelNode ( ) ; address . add ( "subsystem" , "resource-adapters" ) ; address . add ( "resource-adapter" , ReDeploymentTestCase . deploymentName ) ; address . protect ( ) ; final ModelNode operation = new ModelNode ( ) ; operation . get ( OP ) . set ( "activate" ) ; operation . get ( OP_ADDR ) . set ( address ) ; executeOperation ( operation ) ; } @ Deployment ( name = "re-deployment.rar" , managed = false ) public static ResourceAdapterArchive createDeployment ( ) throws Exception { } @ Test public void testConfiguration ( ) throws Throwable { } }

Fix:
List < ModelNode > operations = xmlToModelOperations ( xml , RESOURCEADAPTERS_1_0 . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ;
Buggy code:
public class AutoLabelTagHandler extends AbstractMarkupFilter { @ Override <START_BUG> protected MarkupElement onComponentTag ( ComponentTag tag ) throws ParseException { <END_BUG> if ( ( ( tag == null ) || ( tag . isClose ( ) ) ) || ( tag instanceof WicketTag ) ) { return tag ; } String related = tag . getAttribute ( WICKET_FOR ) ; if ( related == null ) { return tag ; } related = related . trim ( ) ; if ( related . isEmpty ( ) ) { throw new ParseException ( "Tag<seq2seq4repair_space>contains<seq2seq4repair_space>an<seq2seq4repair_space>empty<seq2seq4repair_space>wicket:for<seq2seq4repair_space>attribute" , tag . getPos ( ) ) ; } if ( ! ( "label" . equalsIgnoreCase ( tag . getName ( ) ) ) ) { throw new ParseException ( "Attribute<seq2seq4repair_space>wicket:for<seq2seq4repair_space>can<seq2seq4repair_space>only<seq2seq4repair_space>be<seq2seq4repair_space>attached<seq2seq4repair_space>to<seq2seq4repair_space><label><seq2seq4repair_space>tag" , tag . getPos ( ) ) ; } if ( ( tag . getId ( ) ) != null ) { throw new ParseException ( "Attribute<seq2seq4repair_space>wicket:for<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>in<seq2seq4repair_space>conjunction<seq2seq4repair_space>with<seq2seq4repair_space>wicket:id" , tag . getPos ( ) ) ; } tag . setId ( getClass ( ) . getName ( ) ) ; tag . setModified ( true ) ; return tag ; } }

Fix:
protected MarkupElement onComponentTag ( final ComponentTag tag ) throws ParseException {
Buggy code:
public class KernelServices extends ModelTestKernelServices { static final AtomicInteger counter = new AtomicInteger ( ) ; protected KernelServices ( ServiceContainer container , ModelController controller , StringConfigurationPersister persister , ManagementResourceRegistration rootRegistration , OperationValidator operationValidator , ModelVersion legacyModelVersion , boolean successfulBoot , Throwable bootError ) { } static KernelServices create ( ProcessType processType , RunningMode runningMode , OperationValidation validateOperations , List < ModelNode > bootOperations , ModelTestParser testParser , ModelVersion legacyModelVersion , ModelType type , ModelInitializer modelInitializer ) throws Exception { ServiceContainer container = Factory . create ( ( "test" + ( KernelServices . counter . incrementAndGet ( ) ) ) ) ; ServiceTarget target = container . subTarget ( ) ; StringConfigurationPersister persister = new StringConfigurationPersister ( bootOperations , testParser ) ; RunningModeControl runningModeControl = ( type == ( ModelType . HOST ) ) ? new org . jboss . as . host . controller . HostRunningModeControl ( runningMode , RestartMode . HC_ONLY ) : new RunningModeControl ( runningMode ) ; <START_BUG> ModelTestModelControllerService svc = new TestModelControllerService ( processType , runningModeControl , persister , validateOperations , type , modelInitializer ) ; <END_BUG> ServiceBuilder < ModelController > builder = target . addService ( JBOSS_SERVER_CONTROLLER , svc ) ; builder . install ( ) ; svc . waitForSetup ( ) ; ModelController controller = svc . getValue ( ) ; KernelServices kernelServices = new KernelServices ( container , controller , persister , svc . getRootRegistration ( ) , new OperationValidator ( svc . getRootRegistration ( ) ) , legacyModelVersion , svc . isSuccessfulBoot ( ) , svc . getBootError ( ) ) ; return kernelServices ; } }

Fix:
ModelTestModelControllerService svc = TestModelControllerService . create ( processType , runningModeControl , persister , validateOperations , type , modelInitializer ) ;
Buggy code:
public abstract class BranchStatement extends Statement { public char [ ] label ; public Label targetLabel ; public SubRoutineStatement [ ] subroutines ; public BranchStatement ( char [ ] l , int s , int e ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { <START_BUG> if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) { <END_BUG> return ; } int pc = codeStream . position ; if ( ( subroutines ) != null ) { for ( int i = 0 , max = subroutines . length ; i < max ; i ++ ) { SubRoutineStatement sub = subroutines [ i ] ; sub . generateSubRoutineInvocation ( currentScope , codeStream ) ; if ( sub . isSubRoutineEscaping ( ) ) { codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; SubRoutineStatement . reenterExceptionHandlers ( subroutines , i , codeStream ) ; return ; } sub . exitAnyExceptionHandler ( ) ; } } codeStream . goto_ ( targetLabel ) ; codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; SubRoutineStatement . reenterExceptionHandlers ( subroutines , ( - 1 ) , codeStream ) ; } public void resolve ( BlockScope scope ) { } }

Fix:
if ( ( ( bits ) & ( ASTNode . IsReachable ) ) == 0 ) {
Buggy code:
public class ContentAssertionTests { public static final MediaType TEXT_PLAIN_UTF8 = new MediaType ( "text" , "plain" , Charset . forName ( "UTF-8" ) ) ; private MockMvc mockMvc ; @ Before public void setup ( ) { } @ Test public void testContentType ( ) throws Exception { this . mockMvc . perform ( get ( "//handle" ) . accept ( TEXT_PLAIN ) ) . andExpect ( content ( ) . contentType ( TEXT_PLAIN ) ) . andExpect ( content ( ) . contentType ( "text//plain" ) ) ; <START_BUG> this . mockMvc . perform ( get ( "//handleUtf8" ) ) . andExpect ( content ( ) . contentType ( MediaType . valueOf ( "text//plain;charset=UTF-8" ) ) ) . andExpect ( content ( ) . contentType ( "text//plain;charset=UTF-8" ) ) . andExpect ( content ( ) . contentTypeCompatibleWith ( "text//plan" ) ) . andExpect ( content ( ) . contentTypeCompatibleWith ( TEXT_PLAIN ) ) ; <END_BUG> } @ Test public void testContentAsString ( ) throws Exception { } @ Test public void testContentAsBytes ( ) throws Exception { } @ Test public void testContentStringMatcher ( ) throws Exception { } @ Test public void testCharacterEncoding ( ) throws Exception { } @ Controller private static class SimpleController { @ RequestMapping ( value = "//handle" , produces = "text//plain" ) @ ResponseBody public String handle ( ) { } @ RequestMapping ( value = "//handleUtf8" , produces = "text//plain;charset=UTF-8" ) @ ResponseBody public String handleWithCharset ( ) { } } }

Fix:
this . mockMvc . perform ( get ( "//handleUtf8" ) ) . andExpect ( content ( ) . contentType ( MediaType . valueOf ( "text//plain;charset=UTF-8" ) ) ) . andExpect ( content ( ) . contentType ( "text//plain;charset=UTF-8" ) ) . andExpect ( content ( ) . contentTypeCompatibleWith ( "text//plain" ) ) . andExpect ( content ( ) . contentTypeCompatibleWith ( TEXT_PLAIN ) ) ;
Buggy code:
public class SalesforceBulkExecReaderTestIT extends SalesforceTestBase { @ Test public void testOutputBulkExec ( ) throws Throwable { } protected void executeBulkInsert ( TSalesforceBulkExecProperties bulkExecProperties , String random , int count ) throws Throwable { } public void generateBulkFile ( TSalesforceOutputBulkProperties outputBulkProperties , List < IndexedRecord > rows ) throws Throwable { } protected TSalesforceOutputBulkProperties createAccountSalesforceoutputProperties ( ) throws Exception { } protected TSalesforceBulkExecProperties createAccountSalesforceBulkExecProperties ( ) throws Throwable { } protected static void delete ( TSalesforceOutputBulkProperties outputBulkProperties ) { } @ Override protected List < IndexedRecord > readRows ( SalesforceConnectionModuleProperties props ) throws IOException { TSalesforceInputProperties inputProps = ( ( TSalesforceInputProperties ) ( new TSalesforceInputProperties ( "bar" ) . init ( ) ) ) ; inputProps . connection = props . connection ; inputProps . module = props . module ; inputProps . batchSize . setValue ( 200 ) ; <START_BUG> inputProps . queryMode . setValue ( QUERY_QUERY ) ; <END_BUG> inputProps . manualQuery . setValue ( true ) ; inputProps . query . setValue ( "select<seq2seq4repair_space>Id,Name,ShippingStreet,ShippingPostalCode,BillingStreet,BillingState,BillingPostalCode<seq2seq4repair_space>from<seq2seq4repair_space>Account" ) ; inputProps . module . moduleName . setValue ( EXISTING_MODULE_NAME ) ; inputProps . module . schema . schema . setValue ( getMakeRowSchema ( false ) ) ; List < IndexedRecord > inputRows = readRows ( inputProps ) ; return inputRows ; } @ Override public Schema getMakeRowSchema ( boolean isDynamic ) { } }

Fix:
inputProps . queryMode . setValue ( QUERY_BULK ) ;
Buggy code:
public abstract class AjaxFormChoiceComponentUpdatingBehavior extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = 1L ; public AjaxFormChoiceComponentUpdatingBehavior ( ) { } @ Override public void renderHead ( IHeaderResponse response ) { super . renderHead ( response ) ; AppendingStringBuffer asb = new AppendingStringBuffer ( ) ; asb . append ( "function<seq2seq4repair_space>attachChoiceHandlers(markupId,<seq2seq4repair_space>callbackScript)<seq2seq4repair_space>{\n" ) ; asb . append ( "<seq2seq4repair_space>var<seq2seq4repair_space>inputNodes<seq2seq4repair_space>=<seq2seq4repair_space>wicketGet(markupId).getElementsByTagName(\'input\');\n" ) ; asb . append ( "<seq2seq4repair_space>for<seq2seq4repair_space>(var<seq2seq4repair_space>i<seq2seq4repair_space>=<seq2seq4repair_space>0<seq2seq4repair_space>;<seq2seq4repair_space>i<seq2seq4repair_space><<seq2seq4repair_space>inputNodes.length<seq2seq4repair_space>;<seq2seq4repair_space>i<seq2seq4repair_space>++)<seq2seq4repair_space>{\n" ) ; asb . append ( "<seq2seq4repair_space>var<seq2seq4repair_space>inputNode<seq2seq4repair_space>=<seq2seq4repair_space>inputNodes[i];\n" ) ; asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(!inputNode.type)<seq2seq4repair_space>continue;\n" ) ; <START_BUG> asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(!(inputNode.id.indexOf(markupId+\'-\')===0))<seq2seq4repair_space>continue;\n" ) ; <END_BUG> asb . append ( "<seq2seq4repair_space>var<seq2seq4repair_space>inputType<seq2seq4repair_space>=<seq2seq4repair_space>inputNode.type.toLowerCase();\n" ) ; asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(inputType<seq2seq4repair_space>==<seq2seq4repair_space>\'checkbox\'<seq2seq4repair_space>||<seq2seq4repair_space>inputType<seq2seq4repair_space>==<seq2seq4repair_space>\'radio\')<seq2seq4repair_space>{\n" ) ; asb . append ( "<seq2seq4repair_space>Wicket.Event.add(inputNode,<seq2seq4repair_space>\'click\',<seq2seq4repair_space>callbackScript);\n" ) ; asb . append ( "<seq2seq4repair_space>}\n" ) ; asb . append ( "<seq2seq4repair_space>}\n" ) ; asb . append ( "}\n" ) ; response . renderJavascript ( asb , "attachChoice" ) ; response . renderOnLoadJavascript ( ( ( ( ( "attachChoiceHandlers('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "',<seq2seq4repair_space>function()<seq2seq4repair_space>{" ) + ( getEventHandler ( ) ) ) + "});" ) ) ; } protected abstract void onUpdate ( AjaxRequestTarget target ) { } protected void onError ( AjaxRequestTarget target , RuntimeException e ) { } @ Override protected void onBind ( ) { } protected final FormComponent < ? > getFormComponent ( ) { } protected final CharSequence getEventHandler ( ) { } @ Override protected final void respond ( final AjaxRequestTarget target ) { } }

Fix:
asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(!(inputNode.className.indexOf(\'wicket-\'+markupId)===0))<seq2seq4repair_space>continue;\n" ) ;
Buggy code:
public class Application extends Controller { public static Client currentClient ; public static Result index ( ) { } public static Result landing ( ) { } public static Client getClient ( ) { } public static Result createClient ( ) { } public static Result deleteClientFromDB ( String email ) { } public static Result displayAllClientsFromDB ( ) { } public static Result logIn ( ) { } public static Result register ( String error ) { } public static WebSocket < String > wsInterface ( ) { return new WebSocket < String > ( ) { public void onReady ( WebSocket . In < String > in , WebSocket . Out < String > out ) { <START_BUG> SimpleChat . start ( in , out ) ; <END_BUG> } } ; } public static Result wsJs ( ) { } }

Fix:
RandChat . start ( in , out ) ;
Buggy code:
public class ZkState { public static final Logger LOG = LoggerFactory . getLogger ( ZkState . class ) ; CuratorFramework _curator ; private CuratorFramework newCurator ( Map stateConf ) throws Exception { } public CuratorFramework getCurator ( ) { } public ZkState ( Map stateConf ) { } public void writeJSON ( String path , Map < Object , Object > data ) { <START_BUG> ZkState . LOG . info ( ( ( ( "Writing<seq2seq4repair_space>" + path ) + "<seq2seq4repair_space>the<seq2seq4repair_space>data<seq2seq4repair_space>" ) + ( data . toString ( ) ) ) ) ; <END_BUG> writeBytes ( path , JSONValue . toJSONString ( data ) . getBytes ( Charset . forName ( "UTF-8" ) ) ) ; } public void writeBytes ( String path , byte [ ] bytes ) { } public Map < Object , Object > readJSON ( String path ) { } public byte [ ] readBytes ( String path ) { } public void close ( ) { } }

Fix:
ZkState . LOG . debug ( ( ( ( "Writing<seq2seq4repair_space>" + path ) + "<seq2seq4repair_space>the<seq2seq4repair_space>data<seq2seq4repair_space>" ) + ( data . toString ( ) ) ) ) ;
Buggy code:
public class LoadOnStartupInterceptor extends BaseInterceptor { private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.context" ) ; public LoadOnStartupInterceptor ( ) { } public void contextInit ( Context ctx ) { } void loadJsp ( Context context , ServletWrapper result ) throws Exception { System . out . println ( "Initializing<seq2seq4repair_space>JSP<seq2seq4repair_space>with<seq2seq4repair_space>JspWrapper" ) ; String path = result . getPath ( ) ; RequestImpl request = new RequestImpl ( ) ; ResponseImpl response = new ResponseImpl ( ) ; request . setContextManager ( context . getContextManager ( ) ) ; request . recycle ( ) ; response . recycle ( ) ; request . setResponse ( response ) ; response . setRequest ( request ) ; String requestURI = path + "?jsp_precompile=true" ; request . setRequestURI ( ( ( context . getPath ( ) ) + path ) ) ; request . setQueryString ( "jsp_precompile=true" ) ; request . setContext ( context ) ; request . getSession ( true ) ; <START_BUG> RequestDispatcher rd = context . getRequestDispatcher ( requestURI ) ; <END_BUG> try { rd . forward ( request . getFacade ( ) , response . getFacade ( ) ) ; } catch ( ServletException se ) { } catch ( IOException ioe ) { } } void init ( Context ctx , Hashtable loadableServlets ) { } }

Fix:
RequestDispatcher rd = context . getFacade ( ) . getRequestDispatcher ( requestURI ) ;
Buggy code:
public class TextViewer extends JTextPane implements Observer , CaretListener , IMimePartViewer { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.gui.message.viewer" ) ; private DocumentParser parser ; private HTMLEditorKit htmlEditorKit ; private String css = "" ; private XmlElement smilies ; private boolean enableSmilies ; private String name ; private String size ; private boolean overwrite ; private String body ; private URL url ; private boolean htmlMessage ; private MailFrameMediator mediator ; public TextViewer ( MailFrameMediator mediator ) { } private void initConfiguration ( ) { } private void printAddress ( Integer [ ] address ) { } public void view ( IMailbox folder , Object uid , Integer [ ] address , MailFrameMediator mediator ) throws Exception { } private boolean isHTMLStrippingEnabled ( ) { } private InputStream decodeBodyStream ( Charset charset , MimePart bodyPart , InputStream bodyStream ) throws Exception { } private Charset extractCharset ( Charset charset , MimePart bodyPart ) { } private void initStyleSheet ( ) { } private String transformTextToHTML ( String bodyText ) throws Exception { } protected String transformToHTML ( StringBuffer buf ) { } public void update ( Observable arg0 , Object arg1 ) { } public JComponent getView ( ) { } public void updateGUI ( ) throws Exception { } public class AsynchronousHTMLDocument extends HTMLDocument { public AsynchronousHTMLDocument ( ) { } public AsynchronousHTMLDocument ( StyleSheet styles ) { } public int getAsynchronousLoadPriority ( ) { } } public void caretUpdate ( CaretEvent arg0 ) { } class MyFocusOwner implements FocusOwner { public void copy ( ) { int start = getSelectionStart ( ) ; int stop = getSelectionEnd ( ) ; StringWriter htmlSelection = new StringWriter ( ) ; try { htmlEditorKit . write ( htmlSelection , getDocument ( ) , start , ( stop - start ) ) ; Clipboard clipboard = getToolkit ( ) . getSystemClipboard ( ) ; <START_BUG> StringSelection selection = new StringSelection ( HtmlParser . htmlToText ( htmlSelection . toString ( ) ) ) ; <END_BUG> clipboard . setContents ( selection , selection ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } catch ( BadLocationException e ) { e . printStackTrace ( ) ; } } public void cut ( ) { } public void delete ( ) { } public JComponent getComponent ( ) { } public boolean isCopyActionEnabled ( ) { } public boolean isCutActionEnabled ( ) { } public boolean isDeleteActionEnabled ( ) { } public boolean isPasteActionEnabled ( ) { } public boolean isRedoActionEnabled ( ) { } public boolean isSelectAllActionEnabled ( ) { } public boolean isUndoActionEnabled ( ) { } public void paste ( ) { } public void redo ( ) { } public void selectAll ( ) { } public void undo ( ) { } } }

Fix:
StringSelection selection = new StringSelection ( HtmlParser . htmlToText ( htmlSelection . toString ( ) , true ) ) ;
Buggy code:
public class DijkstraOneToMany extends AbstractRoutingAlgorithm { protected double [ ] weights ; private final DijkstraOneToMany . TIntArrayListWithCap changedNodes ; private int [ ] parents ; private int [ ] edgeIds ; private IntDoubleBinHeap heap ; private int visitedNodes ; private boolean doClear = true ; private double limitWeight = Double . MAX_VALUE ; private int limitVisitedNodes = Integer . MAX_VALUE ; private int endNode ; private int currNode ; private int fromNode ; private int to ; public DijkstraOneToMany ( Graph graph , FlagEncoder encoder , Weighting weighting ) { } public DijkstraOneToMany setLimitWeight ( double weight ) { } public DijkstraOneToMany setLimitVisitedNodes ( int nodes ) { } @ Override public Path calcPath ( QueryResult fromRes , QueryResult toRes ) { } @ Override public Path calcPath ( int from , int to ) { } @ Override public Path extractPath ( ) { } public DijkstraOneToMany clear ( ) { } public double getWeight ( int endNode ) { } public int findEndNode ( int from , int to ) { if ( ( weights . length ) < 2 ) return - 1 ; this . to = to ; if ( doClear ) { doClear = false ; int vn = changedNodes . size ( ) ; for ( int i = 0 ; i < vn ; i ++ ) { int n = changedNodes . get ( i ) ; weights [ n ] = Double . MAX_VALUE ; parents [ n ] = - 1 ; edgeIds [ n ] = EdgeIterator . NO_EDGE ; } heap . clear ( ) ; changedNodes . reset ( ) ; currNode = from ; weights [ currNode ] = 0 ; changedNodes . add ( currNode ) ; } else { int parentNode = parents [ to ] ; <START_BUG> if ( ( parentNode >= 0 ) || ( heap . isEmpty ( ) ) ) <END_BUG> return to ; currNode = heap . poll_element ( ) ; } visitedNodes = 0 ; if ( finished ( ) ) return currNode ; while ( true ) { ( visitedNodes ) ++ ; EdgeIterator iter = outEdgeExplorer . setBaseNode ( currNode ) ; while ( iter . next ( ) ) { if ( ! ( accept ( iter ) ) ) continue ; int adjNode = iter . getAdjNode ( ) ; if ( ( edgeIds [ adjNode ] ) == ( iter . getEdge ( ) ) ) continue ; double tmpWeight = ( weighting . calcWeight ( iter , false ) ) + ( weights [ currNode ] ) ; if ( ( weights [ adjNode ] ) == ( Double . MAX_VALUE ) ) { parents [ adjNode ] = currNode ; weights [ adjNode ] = tmpWeight ; heap . insert_ ( tmpWeight , adjNode ) ; changedNodes . add ( adjNode ) ; edgeIds [ adjNode ] = iter . getEdge ( ) ; } else if ( ( weights [ adjNode ] ) > tmpWeight ) { parents [ adjNode ] = currNode ; weights [ adjNode ] = tmpWeight ; heap . update_ ( tmpWeight , adjNode ) ; changedNodes . add ( adjNode ) ; edgeIds [ adjNode ] = iter . getEdge ( ) ; } } if ( ( heap . isEmpty ( ) ) || ( ( visitedNodes ) >= ( limitVisitedNodes ) ) ) return - 1 ; currNode = heap . peek_element ( ) ; if ( finished ( ) ) return currNode ; heap . poll_element ( ) ; } } @ Override public boolean finished ( ) { } public void close ( ) { } @ Override public int getVisitedNodes ( ) { } @ Override public String getName ( ) { } public String getMemoryUsageAsString ( ) { } private static class TIntArrayListWithCap extends TIntArrayList { public int getCapacity ( ) { } } }

Fix:
if ( ( ( parentNode >= 0 ) && ( ( weights [ to ] ) < ( weights [ currNode ] ) ) ) || ( heap . isEmpty ( ) ) )
Buggy code:
public class SpanOrQuery extends SpanQuery { private List clauses ; private String field ; public SpanOrQuery ( SpanQuery [ ] clauses ) { } public SpanQuery [ ] getClauses ( ) { } public String getField ( ) { } public Collection getTerms ( ) { } public void extractTerms ( Set terms ) { } public Query rewrite ( IndexReader reader ) throws IOException { } public String toString ( String field ) { } public boolean equals ( Object o ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; final SpanOrQuery that = ( ( SpanOrQuery ) ( o ) ) ; if ( ! ( clauses . equals ( that . clauses ) ) ) return false ; <START_BUG> if ( ! ( field . equals ( that . field ) ) ) <END_BUG> return false ; return ( getBoost ( ) ) == ( that . getBoost ( ) ) ; } public int hashCode ( ) { } private class SpanQueue extends PriorityQueue { public SpanQueue ( int size ) { } protected final boolean lessThan ( Object o1 , Object o2 ) { } } public PayloadSpans getPayloadSpans ( final IndexReader reader ) throws IOException { } public Spans getSpans ( final IndexReader reader ) throws IOException { } }

Fix:
if ( ( ! ( clauses . isEmpty ( ) ) ) && ( ! ( field . equals ( that . field ) ) ) )
Buggy code:
public class ArrayLearningGraphBuilder extends LearningGraphBuilder { static final HashMap < String , ArrayLearningGraphBuilder > copies = new HashMap < String , ArrayLearningGraphBuilder > ( ) ; LearningGraph current = null ; public ArrayList < RWOutlink > [ ] outlinks = null ; int labelSize = 0 ; int index = 0 ; @ Override public LearningGraph create ( SymbolTable < String > features ) { } @ Override public void index ( int i0 ) { } @ Override public void setGraphSize ( LearningGraph g , int nodeSize , int edgeSize , int dependencySize ) { } private void initEdges ( int edgeSize ) { } @ Override public void addOutlink ( LearningGraph g , int u , RWOutlink rwOutlink ) { } @ Override public void freeze ( LearningGraph g ) { if ( ! ( current . equals ( g ) ) ) throw new IllegalStateException ( "ArrayLearningGraphBuilder<seq2seq4repair_space>not<seq2seq4repair_space>threadsafe" ) ; current . label_feature_id = new int [ labelSize ] ; current . label_feature_weight = new double [ labelSize ] ; if ( ( current . edge_dest ) == null ) { int edgeSize = 0 ; for ( int u = 0 ; u < ( current . node_hi ) ; u ++ ) { if ( ( outlinks [ u ] ) == null ) continue ; edgeSize += outlinks [ u ] . size ( ) ; } initEdges ( edgeSize ) ; } int edge_cursor = 0 ; int label_cursor = 0 ; int label_deps = 0 ; HashSet < Integer > outgoingFeatures = null ; for ( int u = 0 ; u < current . node_hi ; u ++ ) { current . node_near_lo [ u ] = edge_cursor ; if ( ( current . labelDependencySize ( ) ) < 0 ) outgoingFeatures = new HashSet < Integer > ( ) ; if ( ( outlinks [ u ] ) != null ) { for ( RWOutlink o : outlinks [ u ] ) { current . edge_dest [ edge_cursor ] = o . nodeid ; current . edge_labels_lo [ edge_cursor ] = label_cursor ; for ( Entry < String , Double > it : o . fd . entrySet ( ) ) { current . label_feature_id [ label_cursor ] = ( ( LearningGraph ) ( g ) ) . featureLibrary . getId ( it . getKey ( ) ) ; current . label_feature_weight [ label_cursor ] = it . getValue ( ) ; if ( ( current . labelDependencySize ( ) ) < 0 ) outgoingFeatures . add ( current . label_feature_id [ label_cursor ] ) ; label_cursor ++ ; } current . edge_labels_hi [ edge_cursor ] = label_cursor ; edge_cursor ++ ; } if ( ( current . labelDependencySize ( ) ) < 0 ) <START_BUG> label_deps += outgoingFeatures . size ( ) ; <END_BUG> } current . node_near_hi [ u ] = edge_cursor ; } if ( ( current . labelDependencySize ( ) ) < 0 ) current . setLabelDependencies ( label_deps ) ; init ( ) ; } private void init ( ) { } @ Override public LearningGraphBuilder copy ( ) { } private LearningGraphBuilder threadsafeCopy ( ) { } No newline ; at end ; of file ; }

Fix:
label_deps += ( outgoingFeatures . size ( ) ) * ( outlinks [ u ] . size ( ) ) ;