nus-yam/ex-repair huggingface dataset:
Buggy code:
public class T3DLevelConvertor { MapConverter mapConverter ; File inT3dFile ; File outT3dFile ; BufferedReader bfr ; BufferedWriter bwr ; StringBuilder sbf ; public SortedSet < String > unconvertedActors = new TreeSet < > ( ) ; LinkedList < T3DActor > convertedActors = new LinkedList < > ( ) ; boolean createNoteWhenUnconverted = true ; Logger logger ; Vector3d levelDimension ; Vector3d boundBoxLocalisation ; public T3DLevelConvertor ( File originalT3d , File convertedT3d , MapConverter mc ) { } public void convert ( ) throws Exception { } private void write ( BufferedWriter bw ) throws IOException { } boolean banalyseline = false ; String currentClass = "" ; Class utActorClass = null ; T3DActor uta = null ; private void analyzeLine ( String line ) throws IOException , IllegalAccessException , IllegalArgumentException , InstantiationException , NoSuchMethodException , InvocationTargetException { } private String getActorClass ( String line ) { } private void writeHeader ( ) throws IOException { bwr . write ( "Begin<seq2seq4repair_space>Map\n" ) ; <START_BUG> bwr . write ( "\tBegin<seq2seq4repair_space>Level<seq2seq4repair_space>NAME=PersistentLevel\n" ) ; <END_BUG> if ( mapConverter . fromUE123ToUE4 ( ) ) { Double offset = 200.0 ; Vector3d boundBox = getLevelDimensions ( ) ; T3DBrush additiveBrush = T3DBrush . createBox ( mapConverter , ( ( boundBox . x ) + offset ) , ( ( boundBox . y ) + offset ) , ( ( boundBox . z ) + offset ) ) ; additiveBrush . location = boundBoxLocalisation ; additiveBrush . name = "BigAdditiveBrush" ; additiveBrush . brushClass = BrushClass . Brush ; for ( T3DPolygon p : additiveBrush . polyList ) { p . lightMapScale = 2048.0 ; } bwr . write ( additiveBrush . toString ( ) ) ; } } private Vector3d getLevelDimensions ( ) { } private void writeFooter ( ) throws IOException { } public void setCreateNoteWhenUnconverted ( boolean createNoteWhenUnconverted ) { } public static void test ( ) { } }

Fix:
bwr . write ( ( ( "\tBegin<seq2seq4repair_space>Level<seq2seq4repair_space>Name=//Game//RestrictedAssets//Maps//WIP//" + ( mapConverter . getOutMapName ( ) ) ) + "\n" ) ) ;
Buggy code:
public abstract class ThreadPoolReadAttributeHandler extends AbstractRuntimeOnlyHandler { private ParametersValidator validator = new ParametersValidator ( ) ; private final List < String > metrics ; public ThreadPoolReadAttributeHandler ( List < String > metrics ) { } public void registerAttributes ( final ManagementResourceRegistration registration ) { } @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { validator . validate ( operation ) ; final String attributeName = operation . require ( NAME ) . asString ( ) ; ServiceController < ? > serviceController = getService ( context , operation ) ; final Service < ? > service = serviceController . getService ( ) ; setResult ( context , attributeName , service ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } protected abstract void setResult ( OperationContext context , String attributeName , Service < ? > service ) throws OperationFailedException { } protected ServiceController < ? > getService ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class ViewStack extends PartStack { private boolean allowStateChanges ; private WorkbenchPage page ; private SystemMenuSize sizeItem = new SystemMenuSize ( null ) ; private SystemMenuFastView fastViewAction ; private SystemMenuDetach detachViewAction ; public void addSystemActions ( IMenuManager menuManager ) { appendToGroupIfPossible ( menuManager , "misc" , new org . eclipse . ui . internal . presentations . UpdatingActionContributionItem ( fastViewAction ) ) ; appendToGroupIfPossible ( menuManager , "misc" , new org . eclipse . ui . internal . presentations . UpdatingActionContributionItem ( detachViewAction ) ) ; <START_BUG> sizeItem = new SystemMenuSize ( ( ( PartPane ) ( getVisiblePart ( ) ) ) ) ; <END_BUG> appendToGroupIfPossible ( menuManager , "size" , sizeItem ) ; } public ViewStack ( WorkbenchPage page ) { } public ViewStack ( WorkbenchPage page , boolean allowsStateChanges ) { } public ViewStack ( WorkbenchPage page , boolean allowsStateChanges , int appearance ) { } protected WorkbenchPage getPage ( ) { } protected boolean canMoveFolder ( ) { } protected void updateActions ( LayoutPart current ) { } protected boolean isMoveable ( IPresentablePart part ) { } protected boolean supportsState ( int newState ) { } protected void derefPart ( LayoutPart toDeref ) { } protected boolean allowsDrop ( PartPane part ) { } }

Fix:
sizeItem = new SystemMenuSize ( ( ( PartPane ) ( getSelection ( ) ) ) ) ;
Buggy code:
@ SideOnly ( Side . CLIENT ) public class RenderConservationUnit extends Render < EntityConservationUnit > { private static final ResourceLocation RESOURCE_LOCATION = Textures . getResourceLocation ( "textures//entity//ConservationUnit.png" ) ; protected ModelConservationUnit modelConservationUnit ; public RenderConservationUnit ( RenderManager renderManager ) { } @ Override protected ResourceLocation getEntityTexture ( EntityConservationUnit par1Entity ) { } @ Override public void doRender ( EntityConservationUnit entity , double x , double y , double z , float par8 , float rotate ) { super . doRender ( entity , x , y , z , par8 , rotate ) ; GL11 . glPushMatrix ( ) ; <START_BUG> float yOffset = ( MathHelper . sin ( ( ( ( ( ( float ) ( entity . age ) ) + rotate ) // 10.0F ) + ( entity . hoverStart ) ) ) ) * ( + 0.2F ) ; <END_BUG> float rotation = ( ( ( ( ( float ) ( entity . age ) ) + rotate ) // 100.0F ) + ( entity . hoverStart ) ) * ( 180.0F // ( ( float ) ( Math . PI ) ) ) ; GL11 . glTranslatef ( ( ( float ) ( x ) ) , ( ( ( ( float ) ( y ) ) + 1.45F ) + yOffset ) , ( ( float ) ( z ) ) ) ; GL11 . glRotatef ( rotation , 0.0F , 1.0F , 0.0F ) ; this . bindEntityTexture ( entity ) ; GL11 . glScalef ( ( - 1.0F ) , ( - 1.0F ) , 1.0F ) ; this . modelConservationUnit . render ( entity , 0.0F , 0.0F , ( - 0.1F ) , 0.0F , 0.0F , 0.0625F ) ; GL11 . glPopMatrix ( ) ; } No newline ; at end ; of file ; }

Fix:
float yOffset = ( ( MathHelper . sin ( ( ( ( ( ( float ) ( entity . age ) ) + rotate ) // 10.0F ) + ( entity . hoverStart ) ) ) ) * 0.2F ) + ( entity . getRenderYOffset ( ) ) ;
Buggy code:
public class VersionDebugContributor implements IDebugBarContributor { private static final long serialVersionUID = 1L ; public static final IDebugBarContributor DEBUG_BAR_CONTRIB = new VersionDebugContributor ( ) ; <START_BUG> public Component createComponent ( String id , WicketDebugBar debugBar ) { <END_BUG> Label label = new Label ( id , new org . apache . wicket . model . AbstractReadOnlyModel < String > ( ) { private static final long serialVersionUID = 1L ; @ Override public String getObject ( ) { return Application . get ( ) . getFrameworkSettings ( ) . getVersion ( ) ; } } ) ; label . add ( new SimpleAttributeModifier ( "class" , "wicketversioncontrib" ) ) ; return label ; } }

Fix:
public Component createComponent ( String id , DebugBar debugBar ) {
Buggy code:
public class ParallelFPGrowthReducer extends Reducer < LongWritable , TransactionTree , Text , TopKStringPatterns > { private final List < String > featureReverseMap = new ArrayList < String > ( ) ; private final OpenObjectIntHashMap < String > fMap = new OpenObjectIntHashMap < String > ( ) ; private final OpenLongObjectHashMap < IntArrayList > groupFeatures = new OpenLongObjectHashMap < IntArrayList > ( ) ; private int maxHeapSize = 50 ; private int minSupport = 3 ; @ Override protected void reduce ( LongWritable key , Iterable < TransactionTree > values , Context context ) throws IOException { } @ Override protected void setup ( Context context ) throws IOException , InterruptedException { super . setup ( context ) ; <START_BUG> Parameters params = Parameters . fromString ( context . getConfiguration ( ) . get ( PFP_PARAMETERS , "" ) ) ; <END_BUG> int i = 0 ; for ( Pair < String , Long > e : PFPGrowth . deserializeList ( params , F_LIST , context . getConfiguration ( ) ) ) { featureReverseMap . add ( e . getFirst ( ) ) ; fMap . put ( e . getFirst ( ) , ( i ++ ) ) ; } Map < String , Long > gList = PFPGrowth . deserializeMap ( params , G_LIST , context . getConfiguration ( ) ) ; for ( Map . Entry < String , Long > entry : gList . entrySet ( ) ) { IntArrayList groupList = groupFeatures . get ( entry . getValue ( ) ) ; Integer itemInteger = fMap . get ( entry . getKey ( ) ) ; if ( groupList != null ) { groupList . add ( itemInteger ) ; } else { groupList = new IntArrayList ( ) ; groupList . add ( itemInteger ) ; groupFeatures . put ( entry . getValue ( ) , groupList ) ; } } maxHeapSize = Integer . valueOf ( params . get ( MAX_HEAPSIZE , "50" ) ) ; minSupport = Integer . valueOf ( params . get ( MIN_SUPPORT , "3" ) ) ; FPTreeDepthCache . setFirstLevelCacheSize ( Integer . valueOf ( params . get ( TREE_CACHE_SIZE , Integer . toString ( FPTreeDepthCache . getFirstLevelCacheSize ( ) ) ) ) ) ; } }

Fix:
Parameters params = new Parameters ( context . getConfiguration ( ) . get ( PFP_PARAMETERS , "" ) ) ;
Buggy code:
public class Game { public enum GameColor { BLUE ( 3 , 57 , 0 , 52 , 20 , 32 , 66 , 0 ) , GREEN ( 16 , 63 , 13 , 58 , 33 , 45 , 72 , 1 ) , RED ( 29 , 69 , 26 , 64 , 46 , 6 , 54 , 2 ) , YELLOW ( 42 , 75 , 39 , 70 , 7 , 19 , 60 , 3 ) ; private final int spawn ; private final int home ; private final int exit ; private final int exitDest ; private final int slideStart ; private final int slideEnd ; private final int slideCross ; private final int offset ; private GameColor ( int spawn , int home , int exit , int exitDest , int slideStart , int slideEnd , int slideCross , int offset ) { } private int getSpawn ( ) { } private int getHome ( ) { } private int getExit ( ) { } private int getExitDest ( ) { } private int getSlideStart ( ) { } private int getSlideEnd ( ) { } private int getSlideCross ( ) { } private static Game . GameColor getColorOfPoint ( int point ) { } private boolean inHomeStretch ( int point ) { } } private static final int GAME_BOARD_SIZE = 76 ; private static final int BOARD_MAIN_ROUTE_END = 52 ; private static final int NUMBER_OF_AIRPLANES_PER_PLAYER = 4 ; private Map < Game . GameColor , Hanger > hangers ; private Board board ; public Game ( ) { } private final Set < Choice > generateChoices ( Game . GameColor color , int diceRoll ) { } private final Set < Choice > generateBonusChoices ( int sizeOfFormation , Game . GameColor color , int positionLanded , Choice choice ) { } private final Set < Choice > generateBonusChoices ( int sizeOfFormation , Game . GameColor color , int positionLanded , Choice choice , boolean jumped , boolean slided ) { } private int raycastDestination ( int sizeOfFormation , Game . GameColor color , int startPosition , int displacement ) { int ray = startPosition ; int rayDisplacement = 1 ; boolean obstacleFound = false ; boolean inHomeStretch = color . inHomeStretch ( startPosition ) ; while ( ( displacement > 0 ) && ( ! obstacleFound ) ) { for ( AirplaneFormation possibleObstacle : board . getFormationsExcludingColor ( ray , color ) ) { <START_BUG> if ( ( possibleObstacle . getSize ( ) ) > 1 ) { <END_BUG> obstacleFound = true ; } } if ( ! obstacleFound ) { ray += rayDisplacement ; if ( ! inHomeStretch ) { ray = ray % ( Game . BOARD_MAIN_ROUTE_END ) ; if ( ray == ( ( ( color . getExit ( ) ) + 1 ) % ( Game . BOARD_MAIN_ROUTE_END ) ) ) { ray = color . getExitDest ( ) ; inHomeStretch = true ; } } else { if ( ray > ( color . getHome ( ) ) ) { ray = ( color . getHome ( ) ) - 1 ; rayDisplacement = - 1 ; } if ( ray < ( color . getExitDest ( ) ) ) { throw new AssertionError ( "Traced<seq2seq4repair_space>ray<seq2seq4repair_space>went<seq2seq4repair_space>backwards<seq2seq4repair_space>out<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>exit!?" ) ; } } } displacement -- ; } return ray ; } private static void verifyPointInbounds ( int point ) { } public static void main ( String [ ] args ) { } private static void printHangerInfo ( Game . GameColor color , Game game ) { } }

Fix:
if ( ( possibleObstacle . getSize ( ) ) > sizeOfFormation ) {
Buggy code:
public class CommandProvider extends AbstractProvider { private AbstractElement [ ] cachedElements ; private Map idToElement = new HashMap ( ) ; public String getId ( ) { } public AbstractElement getElementForId ( String id ) { } public AbstractElement [ ] getElements ( ) { if ( ( cachedElements ) == null ) { BindingService bindingService = ( ( BindingService ) ( PlatformUI . getWorkbench ( ) . getService ( IBindingService . class ) ) ) ; Binding [ ] bindings = bindingService . getBindings ( ) ; SortedSet commandSet = new TreeSet ( ) ; for ( int i = 0 ; i < ( bindings . length ) ; i ++ ) { Binding binding = bindings [ i ] ; ParameterizedCommand command = binding . getParameterizedCommand ( ) ; if ( ( command != null ) && ( command . getCommand ( ) . isHandled ( ) ) ) { commandSet . add ( command ) ; } } ParameterizedCommand [ ] commands = ( ( ParameterizedCommand [ ] ) ( commandSet . toArray ( new ParameterizedCommand [ commandSet . size ( ) ] ) ) ) ; cachedElements = new AbstractElement [ commands . length ] ; for ( int i = 0 ; i < ( commands . length ) ; i ++ ) { <START_BUG> CommandElement commandElement = new CommandElement ( commands [ i ] ) ; <END_BUG> cachedElements [ i ] = commandElement ; idToElement . put ( commandElement . getId ( ) , commandElement ) ; } } return cachedElements ; } public ImageDescriptor getImageDescriptor ( ) { } public String getName ( ) { } }

Fix:
CommandElement commandElement = new CommandElement ( commands [ i ] , this ) ;
Buggy code:
public class ChildFirstHeaderRenderStrategyTest extends WicketTestCase { private static final Logger log = LoggerFactory . getLogger ( ChildFirstHeaderRenderStrategyTest . class ) ; public void test1 ( ) throws Exception { } public void test2 ( ) throws Exception { } private < T extends Page > void executeCombinedTest ( final Class < T > pageClass , final String filename ) throws Exception { ChildFirstHeaderRenderStrategyTest . log . error ( "===<seq2seq4repair_space>PARENT<seq2seq4repair_space>first<seq2seq4repair_space>header<seq2seq4repair_space>render<seq2seq4repair_space>strategy<seq2seq4repair_space>===" ) ; WicketTester tester = new WicketTester ( ) ; tester . startPage ( pageClass ) ; tester . assertRenderedPage ( pageClass ) ; tester . assertResultPage ( getClass ( ) , filename ) ; ChildFirstHeaderRenderStrategyTest . log . error ( "===<seq2seq4repair_space>CHILD<seq2seq4repair_space>first<seq2seq4repair_space>header<seq2seq4repair_space>render<seq2seq4repair_space>strategy<seq2seq4repair_space>===" ) ; System . setProperty ( "Wicket_HeaderRenderStrategy" , ChildFirstHeaderRenderStrategy . class . getName ( ) ) ; tester . startPage ( pageClass ) ; tester . assertRenderedPage ( pageClass ) ; tester . assertResultPage ( getClass ( ) , ( filename + "_2" ) ) ; <START_BUG> System . setProperty ( "Wicket_HeaderRenderStrategy" , null ) ; <END_BUG> } }

Fix:
System . setProperty ( "Wicket_HeaderRenderStrategy" , "" ) ;
Buggy code:
public class GameDisplay extends JPanel implements Runnable { static String rootdir = System . getProperty ( "user.dir" ) ; Image background ; Player player ; Vector < Mobile > mobiles ; Vector < Still > stills ; int offsetX = 0 ; int offsetY = 0 ; long lastLoopTime = System . nanoTime ( ) ; final int TARGET_FPS = 60 ; final long OPTIMAL_TIME = 1000000000 // ( TARGET_FPS ) ; int lastFpsTime = 0 ; int fps = 0 ; ControlerPlayer controlPlayer ; int [ ] [ ] level ; static int nbLines = 0 ; static int nbColumns = 0 ; public static int [ ] [ ] readLevel ( ) { } public void initGame ( ) { mobiles = new Vector < Mobile > ( ) ; stills = new Vector < Still > ( ) ; level = GameDisplay . readLevel ( ) ; for ( int i = 0 ; i < ( GameDisplay . nbLines ) ; i ++ ) { for ( int j = 0 ; j < ( GameDisplay . nbColumns ) ; j ++ ) { int id = level [ i ] [ j ] ; switch ( id ) { case 1 : <START_BUG> player = new Player ( ( 50 * j ) , ( 50 * i ) , 50 , 50 , false , ( ( GameDisplay . rootdir ) + "//images//game//player//" ) , 1 , ( ( i * ( GameDisplay . nbColumns ) ) + j ) ) ; <END_BUG> level [ i ] [ j ] = 0 ; break ; case 2 : MobilePlat mobile1 = new MobilePlat ( ( 50 * j ) , ( 50 * i ) , 50 , 50 , false , ( ( GameDisplay . rootdir ) + "//images//game//mobile1//" ) , 2 , ( ( i * ( GameDisplay . nbColumns ) ) + j ) ) ; mobiles . add ( mobile1 ) ; break ; case 3 : MobilePlat mobile2 = new MobilePlat ( ( 50 * j ) , ( 50 * i ) , 50 , 50 , false , ( ( GameDisplay . rootdir ) + "//images//game//mobile2//" ) , 2 , ( ( i * ( GameDisplay . nbColumns ) ) + j ) ) ; mobiles . add ( mobile2 ) ; break ; case 4 : StillPlat still1 = new StillPlat ( ( 50 * j ) , ( 50 * i ) , 50 , 50 , false , ( ( GameDisplay . rootdir ) + "//images//game//still1//" ) , 0 , ( ( i * ( GameDisplay . nbColumns ) ) + j ) ) ; stills . add ( still1 ) ; break ; case 5 : StillPlat still2 = new StillPlat ( ( 50 * j ) , ( 50 * i ) , 50 , 50 , false , ( ( GameDisplay . rootdir ) + "//images//game//still2//" ) , 0 , ( ( i * ( GameDisplay . nbColumns ) ) + j ) ) ; stills . add ( still2 ) ; break ; case 6 : MobilePlat foe1 = new MobilePlat ( ( 50 * j ) , ( 50 * i ) , 50 , 50 , false , ( ( GameDisplay . rootdir ) + "//images//game//mobile2//" ) , 0 , ( ( i * ( GameDisplay . nbColumns ) ) + j ) ) ; mobiles . add ( foe1 ) ; break ; default : break ; } } } controlPlayer = new ControlerPlayer ( player ) ; this . addKeyListener ( controlPlayer ) ; this . setFocusable ( true ) ; } public void gameUpdate ( ) { } public void render ( ) { } public GameDisplay ( ) { } public void setBackground ( String path ) { } @ Override protected void paintComponent ( Graphics g ) { } @ Override public void run ( ) { } }

Fix:
player = new Player ( ( 50 * j ) , ( 50 * i ) , 50 , 50 , false , ( ( GameDisplay . rootdir ) + "//images//game//player//" ) , 0 , ( ( i * ( GameDisplay . nbColumns ) ) + j ) ) ;
Buggy code:
@ Deprecated public class XmlBeautifier implements PostProcessor { private final Log log = LogFactory . getLog ( getClass ( ) ) ; public void beforeWriteAndClose ( final FileHandle info ) { <START_BUG> log . error ( "Use<seq2seq4repair_space>the<seq2seq4repair_space>XmlBeautifier<seq2seq4repair_space>from<seq2seq4repair_space>XSD<seq2seq4repair_space>Feature:<seq2seq4repair_space>org.eclipse.xtend.typesystem.xsd.XmlBeautifier<seq2seq4repair_space>instead." ) ; <END_BUG> } public void afterClose ( final FileHandle impl ) { } }

Fix:
log . error ( "Use<seq2seq4repair_space>the<seq2seq4repair_space>XmlBeautifier<seq2seq4repair_space>from<seq2seq4repair_space>XSD<seq2seq4repair_space>Feature:<seq2seq4repair_space>org.eclipse.xtend.typesystem.xsd.XMLBeautifier<seq2seq4repair_space>instead." ) ;
Buggy code:
public class PackageTest extends JMeterTestCase { private static Logger log = LoggingManager . getLoggerForClass ( ) ; private ResourceBundle defaultBundle ; private Class testBeanClass ; private String language ; private PackageTest ( Class testBeanClass , String language , ResourceBundle defaultBundle ) { } BeanInfo beanInfo ; ResourceBundle bundle ; public void setUp ( ) { } public void tearDown ( ) { } public void runTest ( ) { } public void checkNoInventedKeys ( ) { } public void checkAllNecessaryKeysPresent ( ) { <START_BUG> String dn = defaultBundle . getString ( "displayName" ) . toLowerCase ( ) ; <END_BUG> if ( ( ( dn . indexOf ( "(ALPHA" ) ) != ( - 1 ) ) || ( ( dn . indexOf ( "(EXPERIMENTAL" ) ) != ( - 1 ) ) ) return ; PropertyDescriptor [ ] descriptors = beanInfo . getPropertyDescriptors ( ) ; for ( int i = 0 ; i < ( descriptors . length ) ; i ++ ) { if ( ( ( descriptors [ i ] . isHidden ( ) ) || ( ( descriptors [ i ] . getReadMethod ( ) ) == null ) ) || ( ( descriptors [ i ] . getWriteMethod ( ) ) == null ) ) continue ; if ( ( TestElement . class . isAssignableFrom ( descriptors [ i ] . getPropertyType ( ) ) ) && ( ( descriptors [ i ] . getPropertyEditorClass ( ) ) == null ) ) continue ; String name = descriptors [ i ] . getName ( ) ; bundle . getString ( ( name + ".displayName" ) ) ; String group = ( ( String ) ( descriptors [ i ] . getValue ( GROUP ) ) ) ; if ( group != null ) bundle . getString ( ( group + ".displayName" ) ) ; } } public static Test suite ( ) throws Exception { } }

Fix:
String dn = defaultBundle . getString ( "displayName" ) . toUpperCase ( Locale . ENGLISH ) ;
Buggy code:
public class IncrementalCallbackTest extends AbstractIncrementalTest { @ Override public String getWorkflowFileName ( ) { <START_BUG> return "resources//workflow//incrementalcallback.mwe" ; <END_BUG> } @ Override public boolean writesDiff ( ) { } }

Fix:
return "//workflow//incrementalcallback.mwe" ;
Buggy code:
@ EActivity ( layout . activity_main ) @ OptionsMenu ( menu . main ) public class MainActivity extends ActionBarActivity { private static final String TAG = MainActivity . class . getSimpleName ( ) ; Dialog connectionNotConfiguredProperlyDialog ; @ StringRes ( string . needs_configuration ) String noAccMsg ; @ StringRes ( string . connection_not_correct ) String accIncorrectMsg ; @ App MoVirtApp app ; @ Bean ProviderFacade provider ; @ ViewById DrawerLayout drawerLayout ; @ ViewById ViewPager viewPager ; @ ViewById PagerTabStrip pagerTabStrip ; @ ViewById ListView clusterDrawer ; @ StringRes ( string . cluster_scope ) String CLUSTER_SCOPE ; @ Bean OVirtClient client ; @ InstanceState String selectedClusterId ; @ InstanceState String selectedClusterName ; @ Bean SyncUtils syncUtils ; @ Bean MovirtAuthenticator authenticator ; @ Bean EventsHandler eventsHandler ; private ActionBarDrawerToggle drawerToggle ; @ Override protected void onPause ( ) { } @ Override public void setTitle ( CharSequence title ) { } @ AfterViews void init ( ) { connectionNotConfiguredProperlyDialog = new Dialog ( this ) ; initClusterDrawer ( ) ; <START_BUG> selectCluster ( new Cluster ( selectedClusterId , selectedClusterName ) ) ; <END_BUG> if ( ! ( authenticator . accountConfigured ( ) ) ) { showDialogToOpenAccountSettings ( noAccMsg , new Intent ( this , AuthenticatorActivity_ . class ) ) ; } initPagers ( ) ; } private void initPagers ( ) { } @ StringRes ( string . all_clusters ) String allClusters ; private static final String [ ] CLUSTER_PROJECTION = new String [ ] { Cluster . NAME , Cluster . ID } ; private MatrixCursor emptyClusterCursor ; private void initClusterDrawer ( ) { } private void showDialogToOpenAccountSettings ( String msg , final Intent intent ) { } @ OptionsItem ( id . action_refresh ) @ Background public void onRefresh ( ) { } @ OptionsItem ( id . action_settings ) void showSettings ( ) { } @ OptionsItem ( id . action_clear_events ) void clearEvents ( ) { } @ OptionsItem ( id . action_edit_triggers ) void editTriggers ( ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ ItemClick void clusterDrawerItemClicked ( Cursor cursor ) { } private void selectCluster ( Cluster cluster ) { } @ Receiver ( actions = Broadcasts . NO_CONNECTION_SPEFICIED , registerAt = RegisterAt . OnResumeOnPause ) void noConnection ( @ Receiver . Extra ( AccountManager . KEY_INTENT ) Parcelable toOpen ) { } @ Receiver ( actions = Broadcasts . CONNECTION_FAILURE , registerAt = RegisterAt . OnResumeOnPause ) void connectionFailure ( @ Receiver . Extra ( Extras . CONNECTION_FAILURE_REASON ) String reason ) { } }

Fix:
setTitle ( ( ( selectedClusterName ) == null ? getString ( all_clusters ) : selectedClusterName ) ) ;
Buggy code:
public class SoundManager { private HFGame game ; private MediaPlayer mediaPlayer ; private SoundPool soundPool ; public SoundManager ( HFGame activity ) { } public MusicClip newMusicClip ( String fileName ) { try { AssetFileDescriptor musicDescriptor = game . getFileManager ( ) . getAssetFileDescriptor ( fileName ) ; return new MusicClip ( musicDescriptor . getFileDescriptor ( ) , musicDescriptor . getStartOffset ( ) , musicDescriptor . getLength ( ) ) ; } catch ( IOException ex ) { <START_BUG> Log . d ( game . DEBUG_TAG , ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>music<seq2seq4repair_space>clip:<seq2seq4repair_space>" + fileName ) ) ; <END_BUG> game . finish ( ) ; } return null ; } public void loadMusic ( MusicClip musicClip ) { } public void playMusic ( ) { } public void pauseMusic ( ) { } public void stopMusic ( ) { } public SoundClip newSoundClip ( String fileName ) { } public SoundClip newSoundClip ( String fileName , int priority ) { } public void playSound ( SoundClip soundClip ) { } public void pauseSound ( SoundClip soundClip ) { } public void stopSound ( SoundClip soundClip ) { } }

Fix:
Log . d ( DEBUG_TAG , ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>music<seq2seq4repair_space>clip:<seq2seq4repair_space>" + fileName ) ) ;
Buggy code:
@ WebServlet ( "//CreateQuizServlet" ) public class CreateQuizServlet extends HttpServlet { private static final long serialVersionUID = 1L ; public CreateQuizServlet ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { String name = request . getParameter ( "name" ) ; String description = request . getParameter ( "description" ) ; boolean ordered = Boolean . parseBoolean ( request . getParameter ( "ordered" ) ) ; boolean multi_page = Boolean . parseBoolean ( request . getParameter ( "multi_page" ) ) ; User user = ( ( User ) ( request . getSession ( ) . getAttribute ( "user" ) ) ) ; int numQuestions = Integer . parseInt ( request . getParameter ( "num_questions" ) ) ; ArrayList < Question > questions = new ArrayList < Question > ( ) ; for ( int i = 0 ; i < numQuestions ; i ++ ) { int type = Integer . parseInt ( request . getParameter ( ( ( "" + i ) + "_type" ) ) ) ; Question currQuestion ; switch ( type ) { case 0 : currQuestion = parseQuestionResponseQuestion ( request , i ) ; break ; default : currQuestion = null ; } if ( currQuestion != null ) { questions . add ( currQuestion ) ; } } <START_BUG> Quiz quiz = new Quiz ( name , description , user . getId ( ) , ordered , questions , multi_page ) ; <END_BUG> QuizFactory factory = QuizFactory . sharedInstance ( ) ; factory . insertQuiz ( quiz ) ; } private QuestionResponseQuestion parseQuestionResponseQuestion ( HttpServletRequest request , int index ) { } }

Fix:
Quiz quiz = new Quiz ( name , description , user . getID ( ) , ordered , questions , multi_page ) ;
Buggy code:
public class BaseAccessor extends XmlNativeLoader { private static boolean inited = false ; @ Override public void load ( File nativeLibFile ) throws Throwable { } @ Override public String getNativesDeclarationResourceName ( ) { } public static synchronized void initLwjglNatives ( ) throws NativeLoadException { if ( ! ( BaseAccessor . inited ) ) { if ( "Linux" . equals ( System . getProperty ( "os.name" ) ) ) { { try { File mawt = BaseAccessor . findMawt ( new File ( System . getProperty ( "java.home" ) ) ) ; Runtime . getRuntime ( ) . load ( mawt . getAbsolutePath ( ) ) ; } catch ( Throwable t ) { <START_BUG> if ( ( t . getMessage ( ) . indexOf ( "already<seq2seq4repair_space>loaded" ) ) < 0 ) { <END_BUG> t . printStackTrace ( ) ; } new Frame ( ) . dispose ( ) ; } } try { System . loadLibrary ( "jawt" ) ; } catch ( Throwable e ) { System . err . println ( "Java<seq2seq4repair_space>version<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>support<seq2seq4repair_space>jawt<seq2seq4repair_space>manual<seq2seq4repair_space>load" ) ; } } UtilNativeLoader . loadNatives ( new BaseAccessor ( ) ) ; BaseAccessor . inited = true ; } } private static File findMawt ( File dir ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( t . getMessage ( ) ) != null ) && ( ( t . getMessage ( ) . indexOf ( "already<seq2seq4repair_space>loaded" ) ) < 0 ) ) {
Buggy code:
public class TopologyContext { private StormTopology _topology ; private Map < Integer , String > _taskToComponent ; private Integer _taskId ; private Map < String , List < Integer > > _componentToTasks ; private String _codeDir ; private String _pidDir ; private String _stormId ; public TopologyContext ( StormTopology topology , Map < Integer , String > taskToComponent , String stormId , String codeDir , String pidDir , Integer taskId ) { } public < T extends ISubscribedState > T setAllSubscribedState ( T obj ) { } public < T extends ISubscribedState > T setSubscribedState ( String componentId , T obj ) { } public < T extends ISubscribedState > T setSubscribedState ( String componentId , String streamId , T obj ) { } public String getStormId ( ) { } public int getThisTaskId ( ) { } public StormTopology getRawTopology ( ) { } public String getComponentId ( int taskId ) { } public String getThisComponentId ( ) { } public Fields getThisOutputFields ( String streamId ) { } public Set < String > getThisStreams ( ) { } public Set < String > getComponentStreams ( String componentId ) { } public List < Integer > getComponentTasks ( String componentId ) { } public int getThisTaskIndex ( ) { } public Fields getComponentOutputFields ( String componentId , String streamId ) { } public Fields getComponentOutputFields ( GlobalStreamId id ) { } public Map < GlobalStreamId , Grouping > getThisSources ( ) { } public Map < GlobalStreamId , Grouping > getSources ( String componentId ) { } public Map < String , Map < String , Grouping > > getThisTargets ( ) { } public Map < String , Map < String , Grouping > > getTargets ( String componentId ) { Map < String , Map < String , Grouping > > ret = new HashMap < String , Map < String , Grouping > > ( ) ; for ( String otherComponentId : _topology . get_bolts ( ) . keySet ( ) ) { Bolt bolt = _topology . get_bolts ( ) . get ( otherComponentId ) ; for ( GlobalStreamId id : bolt . get_inputs ( ) . keySet ( ) ) { <START_BUG> if ( ( id . get_componentId ( ) ) == componentId ) { <END_BUG> Map < String , Grouping > curr = ret . get ( id . get_streamId ( ) ) ; if ( curr == null ) curr = new HashMap < String , Grouping > ( ) ; curr . put ( otherComponentId , bolt . get_inputs ( ) . get ( id ) ) ; ret . put ( id . get_streamId ( ) , curr ) ; } } } return ret ; } public String toJSONString ( ) { } private ComponentCommon getComponentCommon ( String componentId ) { } public String getCodeDir ( ) { } public String getPIDDir ( ) { } public Map < Integer , String > getTaskToComponent ( ) { } }

Fix:
if ( id . get_componentId ( ) . equals ( componentId ) ) {
Buggy code:
public class TarArchiveInputStream extends ArchiveInputStream { private static final int SMALL_BUFFER_SIZE = 256 ; private final byte [ ] SMALL_BUF = new byte [ TarArchiveInputStream . SMALL_BUFFER_SIZE ] ; private final int recordSize ; private final int blockSize ; private boolean hasHitEOF ; private long entrySize ; private long entryOffset ; private final InputStream is ; private TarArchiveEntry currEntry ; private final ZipEncoding encoding ; public TarArchiveInputStream ( InputStream is ) { } public TarArchiveInputStream ( InputStream is , String encoding ) { } public TarArchiveInputStream ( InputStream is , int blockSize ) { } public TarArchiveInputStream ( InputStream is , int blockSize , String encoding ) { } public TarArchiveInputStream ( InputStream is , int blockSize , int recordSize ) { } public TarArchiveInputStream ( InputStream is , int blockSize , int recordSize , String encoding ) { } @ Override public void close ( ) throws IOException { } public int getRecordSize ( ) { } @ Override public int available ( ) throws IOException { } @ Override public long skip ( long numToSkip ) throws IOException { } @ Override public synchronized void reset ( ) { } public TarArchiveEntry getNextTarEntry ( ) throws IOException { } private void skipRecordPadding ( ) throws IOException { } protected byte [ ] getLongNameData ( ) throws IOException { } private byte [ ] getRecord ( ) throws IOException { } protected boolean isEOFRecord ( byte [ ] record ) { } protected byte [ ] readRecord ( ) throws IOException { } private void paxHeaders ( ) throws IOException { } Map < String , String > parsePaxHeaders ( InputStream i ) throws IOException { } private void applyPaxHeadersToCurrentEntry ( Map < String , String > headers ) { } private void readGNUSparse ( ) throws IOException { } @ Override public ArchiveEntry getNextEntry ( ) throws IOException { } private void tryToConsumeSecondEOFRecord ( ) throws IOException { } @ Override public int read ( byte [ ] buf , int offset , int numToRead ) throws IOException { } @ Override public boolean canReadEntryData ( ArchiveEntry ae ) { } <START_BUG> public ArchiveEntry getCurrentEntry ( ) { <END_BUG> return currEntry ; } protected final void setCurrentEntry ( TarArchiveEntry e ) { } protected final boolean isAtEOF ( ) { } protected final void setAtEOF ( boolean b ) { } private void consumeRemainderOfLastBlock ( ) throws IOException { } public static boolean matches ( byte [ ] signature , int length ) { } }

Fix:
public TarArchiveEntry getCurrentEntry ( ) {
Buggy code:
public class BreadthFirstSearch < T extends Vertex > { private Graph < T > g ; private int size ; private static final int WHITE = 0 ; private static final int GRAY = 1 ; private static final int BLACK = 2 ; private int [ ] predecessor ; private int [ ] distance ; private int [ ] color ; BreadthFirstSearch ( Graph < T > g ) { } private void init ( ) { } public void search ( T start ) { Queue < T > q = new LinkedBlockingQueue < T > ( ) ; init ( ) ; color [ start . getId ( ) ] = BreadthFirstSearch . GRAY ; distance [ start . getId ( ) ] = 0 ; q . add ( start ) ; while ( ( q . size ( ) ) != 0 ) { T head = q . peek ( ) ; for ( T v : g . getNeighbors ( head ) ) { if ( ( color [ v . getId ( ) ] ) == ( BreadthFirstSearch . WHITE ) ) { distance [ v . getId ( ) ] = ( distance [ head . getId ( ) ] ) + 1 ; predecessor [ v . getId ( ) ] = head . getId ( ) ; color [ v . getId ( ) ] = BreadthFirstSearch . GRAY ; q . add ( v ) ; } } <START_BUG> q . poll ( ) ; <END_BUG> color [ head . getId ( ) ] = BreadthFirstSearch . BLACK ; } } public ArrayList < Integer > findPath ( T destination ) { } }

Fix:
T discarded = q . poll ( ) ;
Buggy code:
public class WorkingSetMenuContributionItem extends ContributionItem { private int id ; private IWorkingSet workingSet ; private WorkingSetFilterActionGroup actionGroup ; public static String getId ( int id ) { } public WorkingSetMenuContributionItem ( int id , WorkingSetFilterActionGroup actionGroup , IWorkingSet workingSet ) { } public void fill ( Menu menu , int index ) { MenuItem mi = new MenuItem ( menu , SWT . RADIO , index ) ; <START_BUG> mi . setText ( ( ( ( "&" + ( id ) ) + "<seq2seq4repair_space>" ) + ( workingSet . getName ( ) ) ) ) ; <END_BUG> mi . setSelection ( workingSet . equals ( actionGroup . getWorkingSet ( ) ) ) ; mi . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { IWorkingSetManager manager = PlatformUI . getWorkbench ( ) . getWorkingSetManager ( ) ; actionGroup . setWorkingSet ( workingSet ) ; manager . addRecentWorkingSet ( workingSet ) ; } } ) ; } public boolean isDynamic ( ) { } }

Fix:
mi . setText ( ( ( ( "&" + ( id ) ) + "<seq2seq4repair_space>" ) + ( workingSet . getLabel ( ) ) ) ) ;
Buggy code:
public class PageOpenKey extends WizardPage implements Listener { public static final String PAGE_NAME = "SignPageOpenKey" ; private String project ; private Button bOpen = null ; private Button bEchoKeystorePassword = null ; private Button bEchoKeyPassword = null ; private Text tKeystore = null ; private Text tKeystorePassword = null ; private Text tKeyPassword = null ; private Text tKeyName = null ; private String keyAlgorithm = "" ; private static final int LABELWIDTH = 120 ; private static final String SETTING_KEYSTORE = "sign_keystore" ; private static final String SETTING_KEY_ALIAS = "sign_key_alias" ; private Signature signature = null ; private Keystore keystore = null ; public PageOpenKey ( final Signature signature , final String project ) { } public void createControl ( final Composite parent ) { } private void createPageContent ( final Composite parent ) { } private void addListeners ( ) { } private void dialogChanged ( ) { } private void updateStatus ( final String message , final int status ) { } public void handleEvent ( final Event e ) { } private void echoPassword ( final Event e ) { } private void openKeystore ( ) { } public IWizardPage getNextPage ( ) { } private void saveDataToModel ( ) { signature . setKeystore ( keystore ) ; signature . setKeyAlgorithm ( keyAlgorithm ) ; signature . setKeystorePassword ( tKeystorePassword . getText ( ) . toCharArray ( ) ) ; signature . setKeyPassword ( tKeyPassword . getText ( ) . toCharArray ( ) ) ; <START_BUG> signature . setKeyAlias ( tKeyName . getText ( ) ) ; <END_BUG> } private void loadSettings ( ) { } protected void storeSettings ( ) { } }

Fix:
signature . setKeyName ( tKeyName . getText ( ) ) ;
Buggy code:
public class PatchMergeUnitTestCase { static final String name = "jboss-client.jar" ; static final String [ ] path = new String [ ] { "bin" , "client" } ; static byte [ ] one = new byte [ ] { 'a' , 'b' , 'c' , '1' , '2' , '3' } ; static byte [ ] two = new byte [ ] { 'c' , 'd' , 'e' , '4' , '5' , '6' } ; static byte [ ] three = new byte [ ] { 'f' , 'g' , 'h' , '7' , '8' , '9' } ; static byte [ ] four = new byte [ ] { 'i' , 'j' , 'k' , '9' , '8' , '7' } ; @ Test public void testSimple ( ) throws Exception { } @ Test public void testOverrideExisting ( ) throws Exception { } @ Test public void testPreserveExisting ( ) throws Exception { } static Map < Location , PatchingTasks . ContentTaskDefinition > process ( final PatchMergeUnitTestCase . RollbackInfo ... rollbackInfos ) { final Map < Location , PatchingTasks . ContentTaskDefinition > foo = new HashMap < Location , PatchingTasks . ContentTaskDefinition > ( ) ; for ( final PatchMergeUnitTestCase . RollbackInfo info : rollbackInfos ) { <START_BUG> PatchingTasks . rollback ( info . original . getPatchId ( ) , info . original . getModifications ( ) , info . rollback . getModifications ( ) , foo , MISC_ONLY , false ) ; <END_BUG> } return foo ; } static PatchMergeUnitTestCase . RollbackInfo createRollbackInfo ( String id , byte [ ] ih , byte [ ] rh ) { } static PatchMergeUnitTestCase . RollbackInfo createRollbackInfo ( String id , byte [ ] oih , byte [ ] oth , byte [ ] rih , byte [ ] rth ) { } static class RollbackInfo { final Patch original ; final Patch rollback ; RollbackInfo ( Patch original , Patch rollback ) { } } static Patch createPatch ( final String id , final Patch . PatchType type , final ContentModification ... item ) { } }

Fix:
PatchingTasks . rollback ( info . original . getPatchId ( ) , info . original . getModifications ( ) , info . rollback . getModifications ( ) , foo , MISC_ONLY , APPLY ) ;
Buggy code:
public class CasAuthenticationUserDetailsService extends AbstractCasAssertionUserDetailsService { private static final Logger LOG = LoggerFactory . getLogger ( CasAuthenticationUserDetailsService . class ) ; private String orgAttributeName = "SubjectID" ; private String roleAttributeName = "SPR.Roles" ; private UserFacade userFacade ; public CasAuthenticationUserDetailsService ( UserFacade userFacade ) { } @ Override protected UserDetails loadUserDetails ( final Assertion assertion ) { String username = assertion . getPrincipal ( ) . getName ( ) ; Map < String , Object > attributes = assertion . getPrincipal ( ) . getAttributes ( ) ; List < String > roles = new ArrayList < > ( ) ; Object roleAttributes = attributes . get ( roleAttributeName ) ; if ( roleAttributes != null ) { if ( roleAttributes instanceof String ) roles . add ( ( ( String ) ( roleAttributes ) ) ) ; else if ( roleAttributes instanceof List ) roles . addAll ( ( ( List ) ( roleAttributes ) ) ) ; } String organization = ( ( attributes . get ( orgAttributeName ) ) != null ) ? attributes . get ( orgAttributeName ) . toString ( ) : null ; User user = userFacade . getUserByExtId ( username ) ; if ( user == null ) { user = userFacade . createUser ( username , "*****" , new EmailAddress ( ( username + "@nomail.com" ) ) ) ; <START_BUG> user . getExternalIdentifiers ( ) . add ( username ) ; <END_BUG> user . setTableRows ( 20 ) ; } user . getRoles ( ) . clear ( ) ; for ( String rolename : roles ) { if ( rolename != null ) { if ( "MOD-R-DATA" . equals ( rolename ) ) rolename = "MOD-R-PO" ; RoleEntity role = userFacade . getRoleByName ( rolename ) ; if ( role != null ) { user . addRole ( role ) ; } } } userFacade . saveNoAuth ( user ) ; if ( organization != null ) { Organization o = userFacade . getOrganizationByName ( organization ) ; if ( o == null ) { o = new Organization ( ) ; o . setName ( organization ) ; userFacade . save ( o ) ; } user . setOrganization ( o ) ; } return user ; } public void setOrgAttributeName ( String orgAttributeName ) { } public void setRoleAttributeName ( String roleAttributeName ) { } }

Fix:
user . setExternalIdentifier ( username ) ;
Buggy code:
public class CamelEndpointWithJaxWrapperCollectionTest extends DroolsCamelTestSupport { private String handle ; private JAXBContext jaxbContext ; @ Test public void testWorkingSetGlobalTestSessionSetAndGetGlobal ( ) throws Exception { BatchExecutionCommandImpl cmd = new BatchExecutionCommandImpl ( ) ; cmd . setLookup ( "ksession1" ) ; SetGlobalCommand setGlobal = new SetGlobalCommand ( "list" , new WrappedList ( ) ) ; <START_BUG> setGlobal . setOut ( true ) ; <END_BUG> cmd . getCommands ( ) . add ( setGlobal ) ; cmd . getCommands ( ) . add ( new org . drools . command . runtime . rule . InsertObjectCommand ( new Person ( "baunax" ) ) ) ; cmd . getCommands ( ) . add ( new FireAllRulesCommand ( ) ) ; cmd . getCommands ( ) . add ( new GetGlobalCommand ( "list" ) ) ; Marshaller marshaller = getJaxbContext ( ) . createMarshaller ( ) ; marshaller . setProperty ( "jaxb.formatted.output" , true ) ; StringWriter xml = new StringWriter ( ) ; marshaller . marshal ( cmd , xml ) ; System . out . println ( xml . toString ( ) ) ; byte [ ] response = ( ( byte [ ] ) ( template . requestBody ( "direct:test-with-session" , xml . toString ( ) ) ) ) ; assertNotNull ( response ) ; System . out . println ( ( "response:\n" + ( new String ( response ) ) ) ) ; Unmarshaller unmarshaller = getJaxbContext ( ) . createUnmarshaller ( ) ; ExecutionResults res = ( ( ExecutionResults ) ( unmarshaller . unmarshal ( new ByteArrayInputStream ( response ) ) ) ) ; WrappedList resp = ( ( WrappedList ) ( res . getValue ( "list" ) ) ) ; assertNotNull ( resp ) ; assertEquals ( resp . size ( ) , 2 ) ; assertEquals ( "baunax" , resp . get ( 0 ) . getName ( ) ) ; assertEquals ( "Hadrian" , resp . get ( 1 ) . getName ( ) ) ; } @ Override protected void configureDroolsContext ( Context jndiContext ) { } @ Override protected StatefulKnowledgeSession registerKnowledgeRuntime ( String identifier , String rule ) { } public JAXBContext getJaxbContext ( ) { } @ Override protected RouteBuilder createRouteBuilder ( ) throws Exception { } }

Fix:
setGlobal . setOutIdentifier ( "list" ) ;
Buggy code:
@ SuppressWarnings ( "unused" ) public class RaspiGpioProvider extends GpioProviderBase implements GpioProvider , GpioInterruptListener { public static final String NAME = "RaspberryPi<seq2seq4repair_space>GPIO<seq2seq4repair_space>Provider" ; public RaspiGpioProvider ( ) { } @ Override public String getName ( ) { } @ Override public boolean hasPin ( Pin pin ) { } @ Override public void export ( Pin pin , PinMode mode ) { super . export ( pin , mode ) ; if ( ! ( GpioUtil . isExported ( pin . getAddress ( ) ) ) ) { GpioUtil . export ( pin . getAddress ( ) , mode . getDirection ( ) . getValue ( ) ) ; } else <START_BUG> if ( ( GpioUtil . getDirection ( pin . getAddress ( ) ) ) == ( mode . getDirection ( ) . getValue ( ) ) ) { <END_BUG> GpioUtil . setDirection ( pin . getAddress ( ) , mode . getDirection ( ) . getValue ( ) ) ; } setMode ( pin , mode ) ; } @ Override public boolean isExported ( Pin pin ) { } @ Override public void unexport ( Pin pin ) { } @ Override public void setMode ( Pin pin , PinMode mode ) { } @ Override public PinMode getMode ( Pin pin ) { } @ Override public void setPullResistance ( Pin pin , PinPullResistance resistance ) { } @ Override public PinPullResistance getPullResistance ( Pin pin ) { } @ Override public void setState ( Pin pin , PinState state ) { } @ Override public PinState getState ( Pin pin ) { } @ Override public void setValue ( Pin pin , double value ) { } @ Override public double getValue ( Pin pin ) { } @ Override public void setPwm ( Pin pin , int value ) { } @ Override public int getPwm ( Pin pin ) { } private void setPwmValue ( Pin pin , int value ) { } @ Override public void pinStateChange ( GpioInterruptEvent event ) { } @ Override public void addListener ( Pin pin , PinListener listener ) { } @ Override public void removeListener ( Pin pin , PinListener listener ) { } private void updateInterruptListener ( Pin pin ) { } }

Fix:
if ( ( GpioUtil . getDirection ( pin . getAddress ( ) ) ) != ( mode . getDirection ( ) . getValue ( ) ) ) {
Buggy code:
public class MainActivity extends ActionBarActivity { private ImageView robotImageView ; private ProgressDialog pd ; private static final String TAG = "XORobotHash" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void fetchRobot ( ) { } private boolean updateView ( boolean isConnected ) { } private boolean showRobot ( File robotFile ) { } private void showDisconnected ( ) { } private String robotImagePath ( ) { } private String uniqueRoboHashURL ( ) { String serialNumber = Build . SERIAL ; <START_BUG> return ( "http:////robohash.org//" + serialNumber ) + ".png?size=600x600" ; <END_BUG> } private boolean checkNetworkConnectivity ( ) { } private class DownloadRobotImage extends AsyncTask < String , Void , Boolean > { @ Override protected void onPreExecute ( ) { } @ Override protected Boolean doInBackground ( String ... params ) { } protected void onPostExecute ( Boolean downloadSuccess ) { } } }

Fix:
return ( "http:////robohash.org//" + serialNumber ) + ".png?ignoreext=false&size=600x600" ;
Buggy code:
public final class z_T4JInternalParseUtil { private z_T4JInternalParseUtil ( ) { } private static ThreadLocal < Map < String , SimpleDateFormat > > formatMap ; public static String getUnescapedString ( String str , JSONObject json ) { } public static String getRawString ( String name , JSONObject json ) { } public static String getURLDecodedString ( String name , JSONObject json ) { } public static Date parseTrendsDate ( String asOfStr ) throws TwitterException { } public static Date getDate ( String name , JSONObject json ) throws TwitterException { } public static Date getDate ( String name , JSONObject json , String format ) throws TwitterException { } public static Date getDate ( String name , String format ) throws TwitterException { SimpleDateFormat sdf = z_T4JInternalParseUtil . formatMap . get ( ) . get ( format ) ; if ( null == sdf ) { <START_BUG> sdf = new SimpleDateFormat ( format ) ; <END_BUG> sdf . setTimeZone ( TimeZone . getTimeZone ( "GMT" ) ) ; z_T4JInternalParseUtil . formatMap . get ( ) . put ( format , sdf ) ; } try { return sdf . parse ( name ) ; } catch ( ParseException pe ) { throw new TwitterException ( ( ( "Unexpected<seq2seq4repair_space>date<seq2seq4repair_space>format(" + name ) + ")<seq2seq4repair_space>returned<seq2seq4repair_space>from<seq2seq4repair_space>twitter.com" ) , pe ) ; } } public static int getInt ( String name , JSONObject json ) { } public static int getInt ( String str ) { } public static long getLong ( String name , JSONObject json ) { } public static long getLong ( String str ) { } public static double getDouble ( String name , JSONObject json ) { } public static boolean getBoolean ( String name , JSONObject json ) { } public static int toAccessLevel ( HttpResponse res ) { } No newline ; at end ; of file ; }

Fix:
sdf = new SimpleDateFormat ( format , Locale . US ) ;