nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Controller @ RequestMapping ( "//owners//{ownerId}//edit" ) @ SessionAttributes ( types = Owner . class ) public class EditOwnerForm { private final Clinic clinic ; @ Autowired public EditOwnerForm ( Clinic clinic ) { } @ InitBinder public void setAllowedFields ( WebDataBinder dataBinder ) { <START_BUG> dataBinder . setDisallowedFields ( new String [ ] { "id" } ) ; <END_BUG> } @ RequestMapping ( method = RequestMethod . GET ) public String setupForm ( @ PathVariable ( "ownerId" ) int ownerId , Model model ) { } @ RequestMapping ( method = RequestMethod . PUT ) public String processSubmit ( @ ModelAttribute Owner owner , BindingResult result , SessionStatus status ) { } }

Fix:
dataBinder . setDisallowedFields ( "id" ) ;
Buggy code:
public class TreeItem < T > { private List < TreeItem < T > > treeNodes = new ArrayList < TreeItem < T > > ( ) ; private TreeItem < T > parentItem ; private boolean expanded ; private T value ; private String displayCaption ; private NiftyImage displayIconCollapsed ; private NiftyImage displayIconExpanded ; public TreeItem ( TreeItem < T > parentItem , T value , String displayCaption , NiftyImage displayIconCollapsed , NiftyImage displayIconExpanded , boolean expanded ) { } public TreeItem ( TreeItem < T > parentItem , T value , String displayCaption , NiftyImage displayIconCollapsed , NiftyImage displayIconExpanded ) { } public TreeItem ( TreeItem < T > parentItem , T value , String displayCaption , NiftyImage displayIcon , boolean expanded ) { } public TreeItem ( TreeItem < T > parentItem , T value , String displayCaption , NiftyImage displayIcon ) { } public TreeItem ( ) { } public void addTreeItem ( TreeItem < T > item ) { } public void addTreeItems ( List < TreeItem < T > > items ) { } public List < TreeItem < T > > getTreeItems ( ) { } public T getValue ( ) { } public void setValue ( T value ) { } public TreeItem < T > getParentItem ( ) { } public void setParentItem ( TreeItem < T > parentItem ) { } public boolean isExpanded ( ) { } public void setExpanded ( boolean expanded ) { } public String getDisplayCaption ( ) { } public void setDisplayCaption ( String displayCaption ) { } public NiftyImage getDisplayIconCollapsed ( ) { } public void setDisplayIconCollapsed ( NiftyImage displayIconCollapsed ) { } public NiftyImage getDisplayIconExpanded ( ) { } public void setDisplayIconExpanded ( NiftyImage displayIconExpanded ) { } public boolean findAncestor ( TreeItem < T > ancestor ) { } public boolean contains ( TreeItem < T > child ) { if ( ! ( isExpanded ( ) ) ) { return false ; } else if ( treeNodes . contains ( child ) ) { return true ; } else { for ( TreeItem item : treeNodes ) { <START_BUG> boolean found = item . contains ( item ) ; <END_BUG> if ( found ) { return true ; } } return false ; } } public boolean isLeaf ( ) { } }

Fix:
boolean found = item . contains ( child ) ;
Buggy code:
class LogStoreAddHandler implements OperationStepHandler { private LogStoreResource resource = null ; LogStoreAddHandler ( LogStoreResource resource ) { } @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final ModelNode model = resource . getModel ( ) ; <START_BUG> for ( final SimpleAttributeDefinition attribute : LogStoreProviders . LOG_STORE_ATTRIBUTE ) { <END_BUG> if ( operation . get ( attribute . getName ( ) ) . isDefined ( ) ) { attribute . validateAndSet ( operation , model ) ; } else { model . get ( attribute . getName ( ) ) . set ( attribute . getDefaultValue ( ) ) ; } } context . addResource ( EMPTY_ADDRESS , resource ) ; context . completeStep ( ) ; } }

Fix:
for ( final SimpleAttributeDefinition attribute : LogStoreDefinition . LOG_STORE_ATTRIBUTE ) {
Buggy code:
public class DraggableGridView extends ViewGroup implements View . OnClickListener , View . OnLongClickListener , View . OnTouchListener { public static float childRatio = 0.95F ; protected int colCount ; protected int childSize ; protected int padding ; protected int dpi ; protected int scroll = 0 ; protected float lastDelta = 0 ; protected Handler handler = new Handler ( ) ; protected int dragged = - 1 ; protected int lastX = - 1 ; protected int lastY = - 1 ; protected int lastTarget = - 1 ; protected boolean enabled = true ; protected boolean touching = false ; protected boolean isDelete = false ; public static int animT = 150 ; protected ArrayList < Integer > newPositions = new ArrayList < Integer > ( ) ; protected DraggableGridView . OnRearrangeListener onRearrangeListener ; protected OnClickListener secondaryOnClickListener ; private OnItemClickListener onItemClickListener ; private boolean mUseMainTiles = false ; public DraggableGridView ( Context context , AttributeSet attrs ) { } protected void setListeners ( ) { } @ Override public void setOnClickListener ( OnClickListener l ) { } protected Runnable updateTask = new Runnable ( ) { public void run ( ) { } } ; @ Override public void addView ( View child , int index ) { } @ Override public void addView ( View child ) { } @ Override public void removeViewAt ( int index ) { } @ Override protected void onLayout ( boolean changed , int l , int t , int r , int b ) { } @ Override protected void onMeasure ( int widthMeasureSpec , int heightMeasureSpec ) { } @ Override protected int getChildDrawingOrder ( int childCount , int i ) { } public int getIndexFromCoor ( int x , int y ) { int row = getRowFromCoor ( ( y + ( scroll ) ) ) ; int col = getColFromCoor ( row , x ) ; if ( ( col == ( - 1 ) ) || ( row == ( - 1 ) ) ) { return - 1 ; } int index = 0 ; index = ( row * ( colCount ) ) + col ; if ( mUseMainTiles ) { if ( ( row == 0 ) && ( col == 2 ) ) { return - 1 ; } if ( row > 0 ) { index -- ; } } <START_BUG> if ( index > ( getChildCount ( ) ) ) { <END_BUG> return - 1 ; } return index ; } protected int getColFromCoor ( int row , int coor ) { } protected int getRowFromCoor ( int coor ) { } protected int getTargetFromCoor ( int x , int y ) { } protected Point getCoorFromIndex ( int index ) { } public int getIndexOf ( View child ) { } public void onClick ( View view ) { } void toggleAddDelete ( boolean delete ) { } public boolean onLongClick ( View view ) { } public boolean onTouch ( View view , MotionEvent event ) { } protected void animateDragged ( ) { } protected void animateGap ( int target ) { } protected void reorderChildren ( boolean notify ) { } public void scrollToTop ( ) { } public void scrollToBottom ( ) { } protected void clampScroll ( ) { } protected int getMaxScroll ( ) { } public int getLastIndex ( ) { } public void setOnRearrangeListener ( DraggableGridView . OnRearrangeListener l ) { } public void setOnItemClickListener ( OnItemClickListener l ) { } public interface OnRearrangeListener { public abstract void onChange ( ) { } } }

Fix:
if ( index >= ( getChildCount ( ) ) ) {
Buggy code:
public class PropertyHelper { Project project ; Vector propertyInterceptors = new Vector ( ) ; protected PropertyHelper ( ) { } public void setProject ( Project p ) { } public static PropertyHelper getPropertyHelper ( Project project ) { } public void addPropertyInterceptor ( PropertyInterceptor pi ) { } public String replaceProperties ( String value ) { if ( value == null ) { return null ; } Vector fragments = new Vector ( ) ; Vector propertyRefs = new Vector ( ) ; ProjectHelper . parsePropertyString ( value , fragments , propertyRefs ) ; StringBuffer sb = new StringBuffer ( ) ; Enumeration i = fragments . elements ( ) ; Enumeration j = propertyRefs . elements ( ) ; while ( i . hasMoreElements ( ) ) { String fragment = ( ( String ) ( i . nextElement ( ) ) ) ; if ( fragment == null ) { String propertyName = ( ( String ) ( j . nextElement ( ) ) ) ; Object repl = processDynamic ( project , propertyName ) ; if ( repl == null ) { repl = project . getProperty ( propertyName ) ; } if ( repl == null ) { project . log ( ( ( "Property<seq2seq4repair_space>${" + propertyName ) + "}<seq2seq4repair_space>has<seq2seq4repair_space>not<seq2seq4repair_space>been<seq2seq4repair_space>set" ) , MSG_VERBOSE ) ; fragment = ( "${" + propertyName ) + "}" ; } else { <START_BUG> fragment = ( ( String ) ( repl ) ) ; <END_BUG> } } sb . append ( fragment ) ; } return sb . toString ( ) ; } Object processDynamic ( Project project , String name ) { } public void configure ( Object target , Attributes attrs , Project project ) throws BuildException { } }

Fix:
fragment = repl . toString ( ) ;
Buggy code:
public class DatacenterSyncWriteResponseHandler extends AbstractWriteResponseHandler { private static final IEndpointSnitch snitch = DatabaseDescriptor . getEndpointSnitch ( ) ; private static final String localdc ; private final NetworkTopologyStrategy strategy ; private HashMap < String , AtomicInteger > responses = new HashMap < String , AtomicInteger > ( ) ; protected DatacenterSyncWriteResponseHandler ( Collection < InetAddress > writeEndpoints , Multimap < InetAddress , InetAddress > hintedEndpoints , ConsistencyLevel consistencyLevel , String table ) { } public static IWriteResponseHandler create ( Collection < InetAddress > writeEndpoints , Multimap < InetAddress , InetAddress > hintedEndpoints , ConsistencyLevel consistencyLevel , String table ) { } public void response ( Message message ) { } public void assureSufficientLiveNodes ( ) throws UnavailableException { Map < String , AtomicInteger > dcEndpoints = new HashMap < String , AtomicInteger > ( ) ; for ( String dc : strategy . getDatacenters ( ) ) dcEndpoints . put ( dc , new AtomicInteger ( ) ) ; for ( InetAddress destination : hintedEndpoints . keySet ( ) ) { if ( writeEndpoints . contains ( destination ) ) { String destinationDC = DatacenterSyncWriteResponseHandler . snitch . getDatacenter ( destination ) ; dcEndpoints . get ( destinationDC ) . incrementAndGet ( ) ; } } for ( String dc : strategy . getDatacenters ( ) ) { <START_BUG> if ( ( dcEndpoints . get ( dc ) . get ( ) ) != ( responses . get ( dc ) . get ( ) ) ) <END_BUG> throw new UnavailableException ( ) ; } } public boolean isLatencyForSnitch ( ) { } }

Fix:
if ( ( dcEndpoints . get ( dc ) . get ( ) ) < ( responses . get ( dc ) . get ( ) ) )
Buggy code:
public class BundleSerializerTest { private static final String XML_HEAD = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"<seq2seq4repair_space>standalone=\"no\"?>" ; @ Test public void testBundleObjectToXml ( ) { } @ Test public void testNestedBundleObjectToXml1 ( ) { BundleSerializer dataMan = new BundleSerializer ( ) ; BundleObject bundleObject1 = BundleSerializerTest . createDummyBundleObject ( ) ; BundleObject bundleObject2 = new BundleObject ( ) ; bundleObject2 . put ( "key" , 3.0F ) ; bundleObject1 . put ( "nest" , bundleObject2 ) ; String xml = dataMan . toXml ( bundleObject1 ) ; <START_BUG> BundleSerializerTest . isXmlCorrect ( ( "<BundleObject><property<seq2seq4repair_space>name=\"id\"><value<seq2seq4repair_space>type=\"java.lang.Integer\">25<//value><//property>" + ( ( "<property<seq2seq4repair_space>name=\"nest\"><value<seq2seq4repair_space>type=\"swen.adventure.datastorage.BundleObject\">" + "<BundleObject><property<seq2seq4repair_space>name=\"key\"><value<seq2seq4repair_space>type=\"java.lang.Float\">3.0<//value><//property>" ) + "<//BundleObject><//value><//property><//BundleObject>" ) ) , xml ) ; <END_BUG> } @ Test public void testNestedBundleObjectToXml2 ( ) { } @ Test public void testSimpleXmlToBundleObject ( ) { } private static BundleObject createDummyBundleObject ( ) { } private static void isXmlCorrect ( String expectedBody , String xml ) { } }

Fix:
BundleSerializerTest . isXmlCorrect ( ( "<BundleObject><property<seq2seq4repair_space>name=\"id\"><value<seq2seq4repair_space>type=\"java.lang.Integer\">25<//value><//property>" + ( ( "<property<seq2seq4repair_space>name=\"nest\"><value<seq2seq4repair_space>type=\"swen.adventure.engine.datastorage.BundleObject\">" + "<BundleObject><property<seq2seq4repair_space>name=\"key\"><value<seq2seq4repair_space>type=\"java.lang.Float\">3.0<//value><//property>" ) + "<//BundleObject><//value><//property><//BundleObject>" ) ) , xml ) ;
Buggy code:
public class TestLucene3xPostingsFormat extends BasePostingsFormatTestCase { private final Codec codec = new PreFlexRWCodec ( ) ; @ BeforeClass public static void beforeClass3xPostingsFormat ( ) { <START_BUG> LuceneTestCase . PREFLEX_IMPERSONATION_IS_ACTIVE = true ; <END_BUG> } @ Override protected Codec getCodec ( ) { } }

Fix:
LuceneTestCase . OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true ;
Buggy code:
public class TreeColumn extends Item { Tree parent ; boolean resizable ; boolean moveable ; String toolTipText ; int id ; public TreeColumn ( Tree parent , int style ) { } public TreeColumn ( Tree parent , int style , int index ) { } public void addControlListener ( ControlListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void destroyWidget ( ) { } public int getAlignment ( ) { } public boolean getMoveable ( ) { } String getNameText ( ) { } public Tree getParent ( ) { } public boolean getResizable ( ) { } public String getToolTipText ( ) { } public int getWidth ( ) { } public void pack ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } public void removeControlListener ( ControlListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAlignment ( int alignment ) { checkWidget ( ) ; if ( ( alignment & ( ( ( SWT . LEFT ) | ( SWT . RIGHT ) ) | ( SWT . CENTER ) ) ) == 0 ) return ; int index = parent . indexOf ( this ) ; if ( ( index == ( - 1 ) ) || ( index == 0 ) ) return ; style &= ~ ( ( ( SWT . LEFT ) | ( SWT . RIGHT ) ) | ( SWT . CENTER ) ) ; style |= alignment & ( ( ( SWT . LEFT ) | ( SWT . RIGHT ) ) | ( SWT . CENTER ) ) ; int hwndHeader = parent . hwndHeader ; if ( hwndHeader == 0 ) return ; HDITEM hdItem = new HDITEM ( ) ; <START_BUG> hdItem . mask = ( OS . HDI_FORMAT ) | ( OS . HDI_IMAGE ) ; <END_BUG> OS . SendMessage ( hwndHeader , HDM_GETITEM , index , hdItem ) ; hdItem . fmt &= ~ ( OS . HDF_JUSTIFYMASK ) ; if ( ( ( style ) & ( SWT . LEFT ) ) == ( SWT . LEFT ) ) hdItem . fmt |= OS . HDF_LEFT ; if ( ( ( style ) & ( SWT . CENTER ) ) == ( SWT . CENTER ) ) hdItem . fmt |= OS . HDF_CENTER ; if ( ( ( style ) & ( SWT . RIGHT ) ) == ( SWT . RIGHT ) ) hdItem . fmt |= OS . HDF_RIGHT ; OS . SendMessage ( hwndHeader , HDM_SETITEM , index , hdItem ) ; if ( index != 0 ) { int hwnd = parent . handle ; parent . forceResize ( ) ; RECT rect = new RECT ( ) ; RECT headerRect = new RECT ( ) ; OS . GetClientRect ( hwnd , rect ) ; OS . SendMessage ( hwndHeader , HDM_GETITEMRECT , index , headerRect ) ; rect . left = headerRect . left ; rect . right = headerRect . right ; OS . InvalidateRect ( hwnd , rect , true ) ; } } public void setImage ( Image image ) { } void setImage ( Image image , boolean sort , boolean right ) { } public void setMoveable ( boolean moveable ) { } public void setResizable ( boolean resizable ) { } void setSortDirection ( int direction ) { } public void setText ( String string ) { } public void setToolTipText ( String string ) { } public void setWidth ( int width ) { } void updateToolTip ( int index ) { } }

Fix:
hdItem . mask = OS . HDI_FORMAT ;
Buggy code:
public class Init implements Command { private static final String tag = "command" ; Country country = Model . model ( ) . country ; @ Override public void execute ( ) { <START_BUG> Log . d ( Init . tag , "***************************************************************************************" ) ; <END_BUG> country . add ( new Network ( "Toulouse" , 0 , 31 , 13 , 43.604 , 1.447 ) . set ( "http:////www.bison-fute.equipement.gouv.fr//asteccli//servlet//clientleger?format=png&source0=cigt_toulouse&source1=cir&raster=toulouse" ) ) ; country . add ( new Network ( "Bordeaux" , 1 , 33 , 13 , 44.8375 , ( - 0.5795 ) ) . set ( "http:////www.bison-fute.equipement.gouv.fr//asteccli//servlet//clientleger?format=png&source0=cigt_alienor&source1=cir&raster=bordeaux" ) ) ; country . add ( new Network ( "Rennes" , 2 , 35 , 13 , 48.1086 , ( - 1.663 ) ) . set ( "http:////www.bison-fute.equipement.gouv.fr//asteccli//servlet//clientleger?format=png&source0=cigt_dor_breizh&source1=cir&raster=rennes" ) ) ; country . add ( new Network ( "Grenoble" , 3 , 38 , 13 , 45.1794 , 5.7316 ) . set ( "http:////www.bison-fute.equipement.gouv.fr//asteccli//servlet//clientleger?format=png&source0=cigt_grenoble&source1=cir&raster=grenoble" ) ) ; country . add ( new Network ( "Lille" , 4 , 59 , 12 , 50.6434 , 3.044 ) . set ( "http:////www.bison-fute.equipement.gouv.fr//asteccli//servlet//clientleger?format=png&source0=cigt_allegro&source1=cir&raster=lille" ) ) ; country . add ( new Network ( "Strasbourg" , 5 , 67 , 13 , 48.567 , 7.746 ) . set ( "http:////www.bison-fute.equipement.gouv.fr//asteccli//servlet//clientleger?format=png&source0=cigt_gutenberg&source1=cir&raster=strasbourg" ) ) ; country . add ( new Network ( "Lyon" , 6 , 69 , 12 , 45.763 , 4.91 ) . set ( "http:////www.bison-fute.equipement.gouv.fr//asteccli//servlet//clientleger?format=png&source0=cigt_coraly&source1=cir&raster=lyon" ) ) ; country . add ( new Network ( "Paris,<seq2seq4repair_space>IdF" , 7 , 75 , 12 , 48.855 , 2.33 ) . set ( "http:////www.sytadin.fr//raster//segment_IDF.gif" ) ) ; } }

Fix:
Log . d ( Init . tag , "init<seq2seq4repair_space>Country..." ) ;
Buggy code:
public class CropCalendarMaker { public List < CropCalendarWrapper > generateCropCalendar ( String farmerId , String crop , Date referenceDate ) { } public List < CropCalendarWrapper > generateCropCalendarAndSave ( String farmerId , String crop , Date referenceDate ) { } public List < Date > getSundayInWeek ( Date reference , int weeksBack , int endWeek ) { List < Date > dates = new ArrayList < > ( ) ; Calendar cal = Calendar . getInstance ( ) ; cal . setTime ( reference ) ; int daysToSunday = ( cal . get ( Calendar . DAY_OF_WEEK ) ) - 1 ; cal . add ( Calendar . DATE , ( ( weeksBack * 7 ) + daysToSunday ) ) ; dates . add ( cal . getTime ( ) ) ; <START_BUG> cal . add ( Calendar . DATE , ( 6 + ( weeksBack - endWeek ) ) ) ; <END_BUG> dates . add ( cal . getTime ( ) ) ; return dates ; } }

Fix:
cal . add ( Calendar . DATE , ( 7 + ( weeksBack - endWeek ) ) ) ;
Buggy code:
public class PatternFilter extends ViewerFilter { private Map cache = new HashMap ( ) ; private Map foundAnyCache = new HashMap ( ) ; private boolean includeLeadingWildcard = false ; private StringMatcher matcher ; private static Object [ ] EMPTY = new Object [ 0 ] ; public final Object [ ] filter ( Viewer viewer , Object parent , Object [ ] elements ) { } private boolean isAnyVisible ( Viewer viewer , Object parent , Object [ ] elements ) { if ( ( matcher ) == null ) { return true ; } Object [ ] filtered = ( ( Object [ ] ) ( cache . get ( parent ) ) ) ; if ( filtered != null ) { return ( filtered . length ) > 0 ; } Boolean foundAny = ( ( Boolean ) ( foundAnyCache . get ( parent ) ) ) ; if ( foundAny == null ) { boolean elementFound = false ; for ( int i = 0 ; ( i < ( elements . length ) ) && ( ! elementFound ) ; i ++ ) { Object element = elements [ i ] ; elementFound = isElementVisible ( viewer , element ) ; } <START_BUG> foundAny = Boolean . valueOf ( elementFound ) ; <END_BUG> foundAnyCache . put ( parent , foundAny ) ; } return foundAny . booleanValue ( ) ; } public final boolean select ( Viewer viewer , Object parentElement , Object element ) { } public final void setIncludeLeadingWildcard ( final boolean includeLeadingWildcard ) { } public void setPattern ( String patternString ) { } private boolean match ( String string ) { } public boolean isElementSelectable ( Object element ) { } public boolean isElementVisible ( Viewer viewer , Object element ) { } protected boolean isParentMatch ( Viewer viewer , Object element ) { } protected boolean isLeafMatch ( Viewer viewer , Object element ) { } private String [ ] getWords ( String text ) { } protected boolean wordMatches ( String text ) { } }

Fix:
foundAny = ( elementFound ) ? Boolean . TRUE : Boolean . FALSE ;
Buggy code:
@ WebServlet ( name = "InterventionServlet" , urlPatterns = { "//intervention//new" } ) public class InterventionServlet extends HttpServlet { @ Override protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { String sujet = ( ( String ) ( req . getParameter ( "sujet" ) ) ) ; String campus = ( ( String ) ( req . getParameter ( "campus" ) ) ) ; String from = ( ( String ) ( req . getParameter ( "from" ) ) ) ; String to = ( ( String ) ( req . getParameter ( "to" ) ) ) ; String description = ( ( String ) ( req . getParameter ( "description" ) ) ) ; Speaker speaker = ( ( Speaker ) ( req . getSession ( ) . getAttribute ( "email" ) ) ) ; if ( ( ( ( ( sujet . isEmpty ( ) ) || ( campus . isEmpty ( ) ) ) || ( from . isEmpty ( ) ) ) || ( to . isEmpty ( ) ) ) || ( description . isEmpty ( ) ) ) { req . setAttribute ( "erreur" , "Vous<seq2seq4repair_space>devez<seq2seq4repair_space>remplir<seq2seq4repair_space>tous<seq2seq4repair_space>les<seq2seq4repair_space>champs." ) ; getServletContext ( ) . getRequestDispatcher ( "intervention//new" ) . forward ( req , resp ) ; } else { Intervention intervention = new Intervention ( sujet , campus , from , to , description , speaker ) ; <START_BUG> intervention = ( ( Intervention ) ( DaoFactory . getDaoFactory ( ) . getInterventionDao ( ) . addIntervention ( intervention ) ) ) ; <END_BUG> } } No newline ; at end ; of file ; }

Fix:
Intervention addIntervention = ( ( Intervention ) ( DaoFactory . getDaoFactory ( ) . getInterventionDao ( ) . addIntervention ( intervention ) ) ) ;
Buggy code:
public class SaveMessageCommand extends FolderCommand { protected Folder folder ; protected HeaderInterface [ ] headerList = new HeaderInterface [ 1 ] ; public SaveMessageCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { ComposerCommandReference [ ] r = ( ( ComposerCommandReference [ ] ) ( getReferences ( ) ) ) ; ComposerController composerController = r [ 0 ] . getComposerController ( ) ; AccountItem item = ( ( ComposerModel ) ( composerController . getModel ( ) ) ) . getAccountItem ( ) ; SendableMessage message = new MessageComposer ( ( ( ComposerModel ) ( composerController . getModel ( ) ) ) ) . compose ( worker ) ; folder = ( ( Folder ) ( r [ 0 ] . getFolder ( ) ) ) ; <START_BUG> Object uid = folder . addMessage ( message . getSource ( ) , worker ) ; <END_BUG> } }

Fix:
Object uid = folder . addMessage ( message . getSource ( ) ) ;
Buggy code:
public class RenameFolderAction extends FrameAction implements SelectionListener { public RenameFolderAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { EditFolderDialog dialog = new EditFolderDialog ( "New<seq2seq4repair_space>Folder" ) ; dialog . showDialog ( ) ; String name ; <START_BUG> if ( ( dialog . success ( ) ) == true ) { <END_BUG> name = dialog . getName ( ) ; } else { return ; } FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( frameController . getSelectionManager ( ) . getSelection ( "mail.tree" ) ) ) ; r [ 0 ] . setFolderName ( name ) ; processor . addOp ( new org . columba . mail . folder . command . RenameFolderCommand ( r ) ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
if ( dialog . success ( ) ) {
Buggy code:
public class OnewayNoReturnValueRuleTest extends AbstractOnewayValidationTest { @ Override public String getClassContents ( ) { } public String getErrorMessage ( ) { <START_BUG> return JAXWSCoreMessages . ONEWAY_NO_RETURN_VALUE_ERROR_MESSAGE ; <END_BUG> } @ Override public IMethod getMethodToTest ( ) { } }

Fix:
return JAXWSCoreMessages . ONEWAY_NO_RETURN_VALUE ;
Buggy code:
public class ColorGradient implements ColorFunction { private final TreeMap < Double , Color > colors = new TreeMap < Double , Color > ( ) ; public void addColor ( double value , double r , double g , double b ) { } public void addColor ( double value , double r , double g , double b , double a ) { } public void addColor ( double value , Color color ) { } public void removeColor ( double value ) { final Map . Entry < Double , Color > floor = colors . floorEntry ( value ) ; final Map . Entry < Double , Color > ceiling = colors . ceilingEntry ( value ) ; if ( ( floor != null ) || ( ceiling != null ) ) { if ( floor == null ) colors . remove ( ceiling . getKey ( ) ) ; else if ( ceiling == null ) colors . remove ( floor . getKey ( ) ) ; else { if ( ( value - ( floor . getKey ( ) ) ) < ( ( ceiling . getKey ( ) ) - value ) ) colors . remove ( floor . getKey ( ) ) ; else <START_BUG> colors . remove ( floor . getKey ( ) ) ; <END_BUG> } } } public Color getColor ( double value ) { } public void clear ( ) { } public TreeMap < Double , Color > getColors ( ) { } public Color getColorMixed ( double value , double mixAmount , Color baseColor ) { } @ Override public Color colorForValue ( double value ) { } @ Override public int colorCodeForValue ( double value ) { } private Color mixColor ( double t , Color base , Color top ) { } private int mixComponent ( double colorAmount , double t , final int base , final int floorComp , final int ceilingComp ) { } }

Fix:
colors . remove ( ceiling . getKey ( ) ) ;
Buggy code:
public class HandleRoleRequests extends RequireLoginFirstAction { public void doRequestroles ( RunData data , TemplateContext context ) throws Exception { String template = getCurrentTemplate ( data , null ) ; String nextTemplate = getNextTemplate ( data , template ) ; ScarabUser user = ( ( ScarabUser ) ( data . getUser ( ) ) ) ; SecurityAdminTool scarabA = getSecurityAdminTool ( context ) ; ScarabRequestTool scarabR = getScarabRequestTool ( context ) ; ScarabLocalizationTool l10n = getLocalizationTool ( context ) ; List groups = scarabA . getNonMemberGroups ( user ) ; Iterator gi = groups . iterator ( ) ; while ( gi . hasNext ( ) ) { ScarabModule module = ( ( ScarabModule ) ( gi . next ( ) ) ) ; String [ ] autoRoles = module . getAutoApprovedRoles ( ) ; String role = data . getParameters ( ) . getString ( module . getName ( ) ) ; if ( ( role != null ) && ( ( role . length ( ) ) > 0 ) ) { boolean autoApprove = Arrays . asList ( autoRoles ) . contains ( role ) ; if ( autoApprove ) { TurbineSecurity . grant ( user , ( ( Group ) ( module ) ) , TurbineSecurity . getRole ( role ) ) ; <START_BUG> getScarabRequestTool ( context ) . setConfirmMessage ( l10n . get ( "Your<seq2seq4repair_space>role<seq2seq4repair_space>request<seq2seq4repair_space>was<seq2seq4repair_space>granted." ) ) ; <END_BUG> } else { if ( ! ( sendNotification ( module , user , role ) ) ) { scarabR . setAlertMessage ( l10n . get ( "CouldNotSendNotification" ) ) ; } PendingGroupUserRole pend = new PendingGroupUserRole ( ) ; pend . setGroupId ( module . getModuleId ( ) ) ; pend . setUserId ( user . getUserId ( ) ) ; pend . setRoleName ( role ) ; pend . save ( ) ; scarabR . setInfoMessage ( l10n . get ( "RoleRequestAwaiting" ) ) ; } } } setTarget ( data , nextTemplate ) ; } private SecurityAdminTool getSecurityAdminTool ( TemplateContext context ) { } private boolean sendNotification ( ScarabModule module , ScarabUser user , String role ) throws Exception { } }

Fix:
getScarabRequestTool ( context ) . setConfirmMessage ( l10n . get ( "RoleRequestGranted" ) ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { private final String TAG = getClass ( ) . getName ( ) ; private MainActivity . ActivityDetectionRecevier receiver ; private static final String [ ] COLUMNS_TO_BE_BOUND = new String [ ] { LocationEntry . CORD_LAT , LocationEntry . CORD_LONG } ; private static final int [ ] LAYOUT_ITEMS_TO_FILL = new int [ ] { id . text1 , id . text2 } ; private ListView latlong ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void initialize ( ) { } public void setupList ( ) { Cursor cursor = new location . track . dbhelper . DBHelper ( getApplicationContext ( ) ) . getTableValue ( TABLE_NAME , null , null ) ; ArrayList < Item > lsItem = new ArrayList < Item > ( ) ; if ( ( cursor != null ) && ( cursor . moveToFirst ( ) ) ) { do { String lat = cursor . getString ( cursor . getColumnIndex ( CORD_LAT ) ) ; String longi = cursor . getString ( cursor . getColumnIndex ( CORD_LONG ) ) ; String date = cursor . getString ( cursor . getColumnIndex ( DATE ) ) ; Item i = new Item ( lat , longi , date ) ; lsItem . add ( i ) ; } while ( cursor . moveToNext ( ) ) ; cursor . close ( ) ; } ListAdapter adapter = new ListAdapter ( this , lsItem ) ; latlong . setAdapter ( adapter ) ; <START_BUG> latlong . smoothScrollToPosition ( ( ( lsItem . size ( ) ) - 1 ) ) ; <END_BUG> } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } public class ActivityDetectionRecevier extends BroadcastReceiver { private final String TAG = MainActivity . ActivityDetectionRecevier . class . getName ( ) ; @ Override public void onReceive ( Context context , Intent intent ) { } } }

Fix:
latlong . setSelection ( ( ( lsItem . size ( ) ) - 1 ) ) ;
Buggy code:
public class OpenMessageWithMessageFrameAction extends FrameAction implements SelectionListener { public OpenMessageWithMessageFrameAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { MessageFrameController c = new MessageFrameController ( ) ; <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameController ( ) ) ) . getTableSelection ( ) ; <END_BUG> c . setTreeSelection ( r ) ; c . setTableSelection ( r ) ; processor . addOp ( new org . columba . mail . gui . message . command . ViewMessageCommand ( c , r ) ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class Subnet implements Serializable , AwsVpcEntity { private static final long serialVersionUID = 1L ; private Prefix _cidrBlock ; private String _subnetId ; private String _vpcId ; public Subnet ( JSONObject jObj , BatfishLogger logger ) throws JSONException { } private NetworkAcl findMyNetworkAcl ( Map < String , NetworkAcl > networkAcls ) { } private RouteTable findMyRouteTable ( Map < String , RouteTable > routeTables ) { RouteTable myRouteTable = null ; RouteTable mainRouteTable = null ; for ( String routeTableId : routeTables . keySet ( ) ) { RouteTable routeTable = routeTables . get ( routeTableId ) ; if ( ! ( routeTable . getVpcId ( ) . equals ( _vpcId ) ) ) { continue ; } List < RouteTableAssociation > rtAssocs = routeTable . getAssociations ( ) ; for ( RouteTableAssociation rtAssoc : rtAssocs ) { <START_BUG> if ( rtAssoc . getSubnetId ( ) . equals ( _subnetId ) ) { <END_BUG> if ( myRouteTable != null ) { throw new org . batfish . common . BatfishException ( ( ( ( ( ( "Found<seq2seq4repair_space>two<seq2seq4repair_space>associated<seq2seq4repair_space>route<seq2seq4repair_space>tables<seq2seq4repair_space>(" + ( routeTable . getId ( ) ) ) + ",<seq2seq4repair_space>" ) + ( myRouteTable . getId ( ) ) ) + "<seq2seq4repair_space>for<seq2seq4repair_space>subnet<seq2seq4repair_space>" ) + ( _subnetId ) ) ) ; } myRouteTable = routeTable ; } if ( rtAssoc . isMain ( ) ) { if ( mainRouteTable != null ) { throw new org . batfish . common . BatfishException ( ( ( ( ( ( "Found<seq2seq4repair_space>two<seq2seq4repair_space>main<seq2seq4repair_space>route<seq2seq4repair_space>tables<seq2seq4repair_space>(" + ( routeTable . getId ( ) ) ) + ",<seq2seq4repair_space>" ) + ( mainRouteTable . getId ( ) ) ) + "<seq2seq4repair_space>for<seq2seq4repair_space>subnet<seq2seq4repair_space>" ) + ( _subnetId ) ) ) ; } mainRouteTable = routeTable ; } } } if ( myRouteTable == null ) { myRouteTable = mainRouteTable ; } return myRouteTable ; } public Prefix getCidrBlock ( ) { } @ Override public String getId ( ) { } public Configuration toConfigurationNode ( AwsVpcConfiguration awsVpcConfiguration ) { } }

Fix:
if ( _subnetId . equals ( rtAssoc . getSubnetId ( ) ) ) {
Buggy code:
public final class SignIn2Session extends WebSession { private String user ; protected SignIn2Session ( final WebApplication application , Request request ) { } public final boolean authenticate ( final String username , final String password ) { if ( ( user ) == null ) { <START_BUG> if ( ( "org.apache.wicket" . equalsIgnoreCase ( username ) ) && ( "org.apache.wicket" . equalsIgnoreCase ( password ) ) ) { <END_BUG> user = username ; } } return ( user ) != null ; } public boolean isSignedIn ( ) { } public String getUser ( ) { } public void setUser ( final String user ) { } }

Fix:
if ( ( "wicket" . equalsIgnoreCase ( username ) ) && ( "wicket" . equalsIgnoreCase ( password ) ) ) {
Buggy code:
public class CoarseSSOCacheEntry < L > implements Credentials { private final AtomicReference < L > localContext = new AtomicReference < > ( ) ; private volatile AuthenticationType authType ; private volatile String user ; private volatile String password ; private final Map < WebApplication , String > sessions = new ConcurrentHashMap < > ( ) ; @ Override public AuthenticationType getAuthenticationType ( ) { } @ Override public void setAuthenticationType ( AuthenticationType type ) { <START_BUG> this . authType = authType ; <END_BUG> } @ Override public String getUser ( ) { } @ Override public void setUser ( String user ) { } @ Override public String getPassword ( ) { } @ Override public void setPassword ( String password ) { } public Map < WebApplication , String > getSessions ( ) { } public AtomicReference < L > getLocalContext ( ) { } }

Fix:
this . authType = type ;
Buggy code:
public class TooltipBuilder { private static final DecimalFormat df = new DecimalFormat ( "#.##" ) ; private final List < String > tips = new LinkedList < > ( ) ; private final ItemStack stack ; public TooltipBuilder ( ItemStack stack ) { } public String [ ] getTooltip ( ) { <START_BUG> return ( ( String [ ] ) ( tips . toArray ( ) ) ) ; <END_BUG> } public TooltipBuilder addDurability ( ) { } public TooltipBuilder addMiningSpeed ( ) { } public TooltipBuilder addHarvestLevel ( ) { } public TooltipBuilder addAttack ( ) { } }

Fix:
return tips . toArray ( new String [ tips . size ( ) ] ) ;
Buggy code:
public class JNIGeneratorApp { Class mainClass ; ProgressMonitor progress ; String mainClassName ; String outputDir ; String classpath ; MetaData metaData ; public JNIGeneratorApp ( ) { } public String getClasspath ( ) { } public Class getMainClass ( ) { } public String getMainClassName ( ) { } public MetaData getMetaData ( ) { } String getMetaDataDir ( ) { } public String getOutputDir ( ) { } public void generateAll ( ) { } void generateSTATS_C ( Class [ ] classes ) { } void generateSTATS_H ( Class [ ] classes ) { } void generateSTRUCTS_H ( Class [ ] classes ) { } void generateSTRUCTS_C ( Class [ ] classes ) { } void generateSWT_C ( Class [ ] classes ) { } void generateMetaData ( Class [ ] classes ) { } public void generate ( ) { } public void generate ( ProgressMonitor progress ) { } boolean compare ( InputStream is1 , InputStream is2 ) throws IOException { } void output ( byte [ ] bytes , String fileName ) throws IOException { } String getPackageName ( String className ) { } String [ ] getClassNames ( String mainClassName ) { } public Class [ ] getClasses ( ) { } public Class [ ] getNativesClasses ( ) { } public Class [ ] getStructureClasses ( ) { } public void setClasspath ( String classpath ) { } public void setMainClassName ( String str ) { } public void setOutputDir ( String str ) { } public static String getDefaultMainClass ( ) { } public static String getDefaultPlatform ( ) { } public static void main ( String [ ] args ) { JNIGeneratorApp gen = new JNIGeneratorApp ( ) ; <START_BUG> if ( ( ( args . length ) == 1 ) && ( args [ 0 ] . equals ( "*" ) ) ) { <END_BUG> gen . generateAll ( ) ; return ; } if ( ( args . length ) > 0 ) { gen . setMainClassName ( args [ 0 ] ) ; if ( ( args . length ) > 1 ) gen . setOutputDir ( args [ 1 ] ) ; if ( ( args . length ) > 2 ) gen . setClasspath ( args [ 2 ] ) ; } else { gen . setMainClassName ( JNIGeneratorApp . getDefaultMainClass ( ) ) ; } gen . generate ( ) ; } }

Fix:
if ( ( ( args . length ) == 1 ) && ( ( args [ 0 ] . equals ( "*" ) ) || ( args [ 0 ] . equals ( "all" ) ) ) ) {
Buggy code:
public class CreateCompilationUnitOperation extends JavaModelOperation { protected String fName ; protected String fSource = null ; public CreateCompilationUnitOperation ( IPackageFragment parentElement , String name , String source , boolean force ) { } protected void executeOperation ( ) throws JavaModelException { try { beginTask ( Util . bind ( "operation.createUnitProgress" ) , 2 ) ; JavaElementDelta delta = newJavaElementDelta ( ) ; ICompilationUnit unit = getCompilationUnit ( ) ; IPackageFragment pkg = ( ( IPackageFragment ) ( getParentElement ( ) ) ) ; <START_BUG> IContainer folder = ( ( IContainer ) ( pkg . getUnderlyingResource ( ) ) ) ; <END_BUG> worked ( 1 ) ; IFile compilationUnitFile = folder . getFile ( new Path ( fName ) ) ; if ( compilationUnitFile . exists ( ) ) { if ( fForce ) { IBuffer buffer = unit . getBuffer ( ) ; if ( buffer == null ) return ; buffer . setContents ( fSource ) ; unit . save ( new NullProgressMonitor ( ) , false ) ; fResultElements = new IJavaElement [ ] { unit } ; if ( unit . getParent ( ) . exists ( ) ) { for ( int i = 0 ; i < ( fResultElements . length ) ; i ++ ) { delta . changed ( fResultElements [ i ] , IJavaElementDelta . F_CONTENT ) ; } addDelta ( delta ) ; } } else { throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . NAME_COLLISION ) ) ; } } else { try { String encoding = unit . getJavaProject ( ) . getOption ( JavaCore . CORE_ENCODING , true ) ; InputStream stream = new ByteArrayInputStream ( ( encoding == null ? fSource . getBytes ( ) : fSource . getBytes ( encoding ) ) ) ; createFile ( folder , unit . getElementName ( ) , stream , false ) ; fResultElements = new IJavaElement [ ] { unit } ; if ( unit . getParent ( ) . exists ( ) ) { for ( int i = 0 ; i < ( fResultElements . length ) ; i ++ ) { delta . added ( fResultElements [ i ] ) ; } addDelta ( delta ) ; } } catch ( IOException e ) { throw new JavaModelException ( e , IJavaModelStatusConstants . IO_EXCEPTION ) ; } } worked ( 1 ) ; } finally { done ( ) ; } } protected ICompilationUnit getCompilationUnit ( ) { } public IJavaModelStatus verify ( ) { } }

Fix:
IContainer folder = ( ( IContainer ) ( pkg . getResource ( ) ) ) ;
Buggy code:
public abstract class Unit extends AnimatedSpriteObject implements IRTSObject { protected Vector2 tilePosition ; protected Vector2 desiredTilePos ; private float currentDirection = 0 ; protected ArrayList < Vector2 > currentPath ; private float maxSpeed ; protected boolean isMoving = false ; private boolean isIndestructible = false ; private int health ; private int armor ; public Unit ( float x , float y , Sprite sprite , int tileSize , float maxSpeed , int health , int armor ) { } public abstract void destroy ( ) { } public void update ( ) { } <START_BUG> public abstract void setPath ( Vector2 desiredTilePos , TileMap terrain , GameObject [ ] gameobjects ) ; <END_BUG> private void moveNext ( ) { } private void updateSpriteDirection ( double trueDirection ) { } public void damage ( int damage ) { } public int getHealth ( ) { } public int getArmor ( ) { } public Vector2 getPos ( ) { } }

Fix:
public abstract void setPath ( Vector2 desiredTilePos , TileMap terrain , ArrayList < IRTSObject > gameobjects ) ;
Buggy code:
public class StartServersHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "start-servers" ; private final ServerInventory serverInventory ; private final HostControllerEnvironment hostControllerEnvironment ; private final HostRunningModeControl runningModeControl ; public StartServersHandler ( final HostControllerEnvironment hostControllerEnvironment , final ServerInventory serverInventory , HostRunningModeControl runningModeControl ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ! ( context . isBooting ( ) ) ) { throw new OperationFailedException ( new ModelNode ( ) . set ( HostControllerMessages . MESSAGES . invocationNotAllowedAfterBoot ( operation . require ( OP ) ) ) ) ; } if ( ( context . getRunningMode ( ) ) == ( RunningMode . ADMIN_ONLY ) ) { throw new OperationFailedException ( new ModelNode ( HostControllerMessages . MESSAGES . cannotStartServersInvalidMode ( context . getRunningMode ( ) ) ) ) ; } <START_BUG> final ModelNode domainModel = Tools . readModel ( context . getRootResource ( ) ) ; <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final Resource resource = context . readResource ( EMPTY_ADDRESS ) ; final ModelNode hostModel = Tools . readModel ( resource ) ; if ( hostModel . hasDefined ( SERVER_CONFIG ) ) { final ModelNode servers = hostModel . get ( SERVER_CONFIG ) . clone ( ) ; if ( ( hostControllerEnvironment . isRestart ( ) ) || ( ( runningModeControl . getRestartMode ( ) ) == ( RestartMode . HC_ONLY ) ) ) { restartedHcStartOrReconnectServers ( servers , domainModel ) ; } else { cleanStartServers ( servers , domainModel ) ; } } context . completeStep ( ) ; } } , RUNTIME ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } @ Override public ModelNode getModelDescription ( final Locale locale ) { } private void cleanStartServers ( final ModelNode servers , final ModelNode domainModel ) { } private void restartedHcStartOrReconnectServers ( final ModelNode servers , final ModelNode domainModel ) { } }

Fix:
final ModelNode domainModel = Tools . readModel ( context . readResourceFromRoot ( EMPTY_ADDRESS , true ) ) ;
Buggy code:
public class Task implements Runnable { private final Page target ; public Task ( Page target ) { } @ Override public void run ( ) { if ( ( target . getDepth ( ) ) >= ( Crawler . MAX_RECURSION_DEPTH ) ) return ; Source page ; System . out . println ( ( "Getting<seq2seq4repair_space>page:<seq2seq4repair_space>" + ( target . getTarget ( ) ) ) ) ; try { HttpURLConnection con = ( ( HttpURLConnection ) ( target . getTarget ( ) . openConnection ( ) ) ) ; con . connect ( ) ; InputStream is = con . getInputStream ( ) ; page = new Source ( is ) ; } catch ( IOException e ) { target . setBroken ( true ) ; return ; } int unexploredLinks = 0 ; for ( Element e : page . getAllElements ( A ) ) { URL url ; String href = e . getAttributeValue ( "href" ) ; if ( ( href == null ) || ( ( href . length ( ) ) < 1 ) ) continue ; try { if ( href . startsWith ( "//" ) ) <START_BUG> url = new URL ( ( ( target . getTarget ( ) ) + href ) ) ; <END_BUG> else url = new URL ( href ) ; } catch ( MalformedURLException e1 ) { continue ; } if ( url . toString ( ) . endsWith ( "//" ) ) try { url = new URL ( url . toString ( ) . replaceFirst ( "//+$" , "" ) ) ; } catch ( MalformedURLException exc ) { } target . add ( url ) ; if ( url . getHost ( ) . equals ( Crawler . get ( ) . getRoot ( ) . getHost ( ) ) ) { Page newPage = Crawler . get ( ) . addPage ( url , ( ( target . getDepth ( ) ) + 1 ) ) ; newPage . addFrom ( target . getTarget ( ) ) ; if ( ( newPage . explore ( ) ) && ( ( newPage . getDepth ( ) ) < ( Crawler . MAX_RECURSION_DEPTH ) ) ) { ++ unexploredLinks ; try { Crawler . get ( ) . addTask ( new Task ( newPage ) ) ; } catch ( InterruptedException e1 ) { e1 . printStackTrace ( ) ; } } } else { RemoteCrawler crawler = null ; for ( RemoteCrawler c : Crawler . get ( ) . getSiblings ( ) ) { if ( url . getHost ( ) . equals ( c . getRoot ( ) . getHost ( ) ) ) { crawler = c ; break ; } } if ( crawler == null ) continue ; crawler . send ( new cs455 . harvester . wireformats . CrawlerSendsPage ( url , target . getTarget ( ) ) ) ; } } System . out . println ( ( ( ( "Found<seq2seq4repair_space>" + unexploredLinks ) + "<seq2seq4repair_space>unexplored<seq2seq4repair_space>links<seq2seq4repair_space>at:<seq2seq4repair_space>" ) + ( target . getTarget ( ) ) ) ) ; } }

Fix:
url = new URL ( ( ( ( ( target . getTarget ( ) . getProtocol ( ) ) + ":////" ) + ( target . getTarget ( ) . getHost ( ) ) ) + href ) ) ;
Buggy code:
public class TrueLiteral extends MagicLiteral { static final char [ ] source = new char [ ] { 't' , 'r' , 'u' , 'e' } ; public TrueLiteral ( int s , int e ) { } public void computeConstant ( ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateOptimizedBoolean ( BlockScope currentScope , CodeStream codeStream , Label trueLabel , Label falseLabel , boolean valueRequired ) { } public TypeBinding literalType ( BlockScope scope ) { <START_BUG> return BooleanBinding ; <END_BUG> } public char [ ] source ( ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
return TypeBinding . BOOLEAN ;
Buggy code:
public class Tar extends MatchingTask { File tarFile ; File baseDir ; public void setTarfile ( String tarFilename ) { } public void setBasedir ( String baseDirname ) { } public void execute ( ) throws BuildException { <START_BUG> project . log ( ( "Building<seq2seq4repair_space>tar:<seq2seq4repair_space>" + ( tarFile . getAbsolutePath ( ) ) ) ) ; <END_BUG> if ( ( baseDir ) == null ) { throw new BuildException ( "basedir<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" ) ; } if ( ! ( baseDir . exists ( ) ) ) { throw new BuildException ( "basedir<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist!" ) ; } DirectoryScanner ds = super . getDirectoryScanner ( baseDir ) ; String [ ] files = ds . getIncludedFiles ( ) ; try { TarOutputStream tOut = new TarOutputStream ( new FileOutputStream ( tarFile ) ) ; tOut . setDebug ( true ) ; for ( int i = 0 ; i < ( files . length ) ; i ++ ) { File f = new File ( baseDir , files [ i ] ) ; String name = files [ i ] . replace ( File . separatorChar , '//' ) ; tarFile ( f , tOut , name ) ; } tOut . close ( ) ; } catch ( IOException ioe ) { String msg = "Problem<seq2seq4repair_space>creating<seq2seq4repair_space>TAR:<seq2seq4repair_space>" + ( ioe . getMessage ( ) ) ; throw new BuildException ( msg ) ; } } protected void tarFile ( File file , TarOutputStream tOut , String vPath ) throws IOException { } }

Fix:
log ( ( "Building<seq2seq4repair_space>tar:<seq2seq4repair_space>" + ( tarFile . getAbsolutePath ( ) ) ) ) ;
Buggy code:
public class Main extends Activity implements SmallProductDetail . OnFragmentInteractionListener { private Scanner scanner ; private DbAdapterDelegator adapter ; private Bundle savedInstanceState ; private int counterOfFragments = 0 ; private final String OSTRICH = "fonts//ostrich-regular.ttf" ; private final String LOG_TAG = this . getClass ( ) . toString ( ) ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onResume ( ) { } @ Override protected void onRestart ( ) { } public void drawExistingBaskets ( ) { } public void getScan ( View view ) { } public void checkProduct ( View view ) { } private void addProductToViewIfNotPresent ( Product product ) { } private void addProductFragmentToList ( String productId ) { FrameLayout fragmentsContainer = new FrameLayout ( getApplicationContext ( ) ) ; <START_BUG> int currentFragmentContainerId = counterOfFragments ; <END_BUG> fragmentsContainer . setId ( currentFragmentContainerId ) ; LinearLayout llButtons = ( ( LinearLayout ) ( findViewById ( llButtons ) ) ) ; llButtons . addView ( fragmentsContainer ) ; if ( ! ( productId . equals ( "" ) ) ) { if ( ( savedInstanceState ) == null ) { SmallProductDetail smallProductDetail = SmallProductDetail . newInstance ( productId , currentFragmentContainerId ) ; getFragmentManager ( ) . beginTransaction ( ) . add ( currentFragmentContainerId , smallProductDetail , productId ) . commitAllowingStateLoss ( ) ; } } ( counterOfFragments ) ++ ; } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private List < Fragment > fragList = new ArrayList < Fragment > ( ) ; @ Override public void onAttachFragment ( Fragment fragment ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void getHistoricalForBasket ( View view ) { } @ Override public void onFragmentInteraction ( Uri uri ) { } }

Fix:
int currentFragmentContainerId = ( counterOfFragments ) + 1 ;