nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Entity @ Table ( name = "competence_profile" ) @ XmlRootElement @ NamedQueries ( { @ NamedQuery ( name = "CompetenceProfile.findAll" , query = "SELECT<seq2seq4repair_space>c<seq2seq4repair_space>FROM<seq2seq4repair_space>CompetenceProfile<seq2seq4repair_space>c" ) , @ NamedQuery ( name = "CompetenceProfile.findByCompetenceProfileId" , query = "SELECT<seq2seq4repair_space>c<seq2seq4repair_space>FROM<seq2seq4repair_space>CompetenceProfile<seq2seq4repair_space>c<seq2seq4repair_space>WHERE<seq2seq4repair_space>c.competenceProfileId<seq2seq4repair_space>=<seq2seq4repair_space>:competenceProfileId" ) , @ NamedQuery ( name = "CompetenceProfile.findByYearsOfExperience" , query = "SELECT<seq2seq4repair_space>c<seq2seq4repair_space>FROM<seq2seq4repair_space>CompetenceProfile<seq2seq4repair_space>c<seq2seq4repair_space>WHERE<seq2seq4repair_space>c.yearsOfExperience<seq2seq4repair_space>=<seq2seq4repair_space>:yearsOfExperience" ) } ) public class CompetenceProfile implements Serializable { private static final long serialVersionUID = 1L ; @ Id @ Basic ( optional = false ) @ NotNull @ Column ( name = "competence_profile_id" ) private Long competenceProfileId ; @ Column ( name = "years_of_experience" ) private BigDecimal yearsOfExperience ; @ JoinColumn ( name = "person_id" , referencedColumnName = "person_id" ) @ ManyToOne private Person personId ; @ JoinColumn ( name = "competence_id" , referencedColumnName = "competence_id" ) @ OneToOne private Competence competenceId ; public CompetenceProfile ( ) { } public CompetenceProfile ( Long competenceProfileId ) { } public Long getCompetenceProfileId ( ) { } public void setCompetenceProfileId ( Long competenceProfileId ) { } public BigDecimal getYearsOfExperience ( ) { } public void setYearsOfExperience ( BigDecimal yearsOfExperience ) { } public Person getPersonId ( ) { } public void setPersonId ( Person personId ) { } public Competence getCompetenceId ( ) { } public void setCompetenceId ( Competence competenceId ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object object ) { } @ Override public String toString ( ) { <START_BUG> return ( "se.kth.CompetenceProfile[<seq2seq4repair_space>competenceProfileId=" + ( competenceProfileId ) ) + "<seq2seq4repair_space>]" ; <END_BUG> } }

Fix:
return ( "se.kth.model.CompetenceProfile[<seq2seq4repair_space>competenceProfileId=" + ( competenceProfileId ) ) + "<seq2seq4repair_space>]" ;
Buggy code:
public abstract class SQLObject { protected static void handleSQLException ( SQLException e ) { } public void save ( DatabaseManager . SaveCompletionHandler handler ) { } public static String getSQLTableName ( Class < ? extends SQLObject > SQLObjectSubclass ) { <START_BUG> return ( SQLObjectSubclass . getName ( ) ) + "s" ; <END_BUG> } public String getSQLTableName ( ) { } public abstract HashMap < String , Object > changes ( ) { } public abstract Boolean hasChanges ( ) { } public abstract String getIDColumnName ( ) { } public abstract int getID ( ) { } No newline ; at end ; of file ; }

Fix:
return ( SQLObjectSubclass . getSimpleName ( ) ) + "s" ;
Buggy code:
public class Reset extends Task < ClientContext > { private boolean walkBack = false ; public Reset ( ClientContext ctx ) { } @ Override public boolean activate ( ) { } @ Override public void execute ( ) { NoobCrabs . resetting = true ; NoobCrabs . status = "Resetting." ; TilePath reset = movement . newTilePath ( location . resetPath ( ) ) ; if ( ( NoobCrabs . location ) == ( Location . LEFT ) ) { if ( ! ( walkBack ) ) { if ( players . local ( ) . tile ( ) . equals ( reset . end ( ) ) ) { walkBack = true ; } else reset . traverse ( ) ; } else { reset = reset . reverse ( ) ; if ( players . local ( ) . tile ( ) . equals ( reset . end ( ) ) ) { NoobCrabs . resetting = false ; walkBack = false ; } else reset . traverse ( ) ; } } else if ( ( NoobCrabs . location ) == ( Location . RIGHT ) ) { <START_BUG> final GameObject caveEntrance = objects . id ( resetCaveId ) . poll ( ) ; <END_BUG> final GameObject caveExit = objects . select ( ) . id ( resetCaveExitId ) . poll ( ) ; if ( ( ! ( walkBack ) ) && ( caveEntrance . valid ( ) ) ) { if ( players . local ( ) . tile ( ) . equals ( reset . end ( ) ) ) { boolean inside = false ; if ( caveEntrance . inViewport ( ) ) { caveEntrance . click ( true ) ; inside = Condition . wait ( new Callable < Boolean > ( ) { @ Override public Boolean call ( ) throws Exception { return ! ( caveEntrance . inViewport ( ) ) ; } } , 100 , 20 ) ; } else { movement . step ( caveEntrance ) ; } if ( inside ) { walkBack = true ; } } else reset . traverse ( ) ; } else if ( caveExit . valid ( ) ) { reset = reset . reverse ( ) ; boolean outside = false ; if ( caveExit . inViewport ( ) ) { caveExit . click ( true ) ; outside = Condition . wait ( new Callable < Boolean > ( ) { @ Override public Boolean call ( ) throws Exception { return ! ( caveExit . inViewport ( ) ) ; } } , 100 , 20 ) ; } else if ( ( caveEntrance . valid ( ) ) && ( caveEntrance . inViewport ( ) ) ) { objects . id ( resetCaveId ) . poll ( ) . click ( true ) ; } else { movement . findPath ( caveExit ) . traverse ( ) ; } if ( outside ) { reset . traverse ( ) ; NoobCrabs . resetting = false ; walkBack = false ; } } else { reset . traverse ( ) ; } } } }

Fix:
final GameObject caveEntrance = objects . select ( ) . id ( resetCaveId ) . poll ( ) ;
Buggy code:
public class Calculator { private Map < FieldValue , Set < String > > data ; private Map < String , Set < String > > options ; private String [ ] fields ; public Calculator ( ArrayList < InputObject > input ) { } public ArrayList < String > calculate ( FieldValue [ ] target , int numOfResults ) { } private ArrayList < String > setMaxes ( Map < String , Float > points , int numOfResults ) { String [ ] allIds = ( ( String [ ] ) ( points . keySet ( ) . toArray ( new String [ points . size ( ) ] ) ) ) ; ArrayList < String > results = new ArrayList < String > ( ) ; for ( int j = 0 ; j < ( points . size ( ) ) ; j ++ ) { Float rPoints = 0.0F ; Float cPoints = points . get ( allIds [ j ] ) ; int count = 0 ; boolean stillNeedsToAdd = true ; while ( ( ( count + 1 ) < numOfResults ) && stillNeedsToAdd ) { if ( count == ( results . size ( ) ) ) { results . add ( allIds [ j ] ) ; stillNeedsToAdd = false ; } rPoints = points . get ( results . get ( count ) ) ; <START_BUG> if ( cPoints >= rPoints ) { <END_BUG> results . add ( count , allIds [ j ] ) ; stillNeedsToAdd = false ; } if ( ( results . size ( ) ) > numOfResults ) { results . remove ( ( ( results . size ( ) ) - 1 ) ) ; } count ++ ; } } for ( int i = 0 ; i < ( results . size ( ) ) ; i ++ ) { results . set ( i , ( ( ( results . get ( i ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( points . get ( results . get ( i ) ) ) ) ) ; } return results ; } public FieldValue [ ] getBlankFields ( ) { } public String [ ] getOptionsFor ( String header ) { } }

Fix:
if ( ( cPoints >= rPoints ) && stillNeedsToAdd ) {
Buggy code:
final class RegistryReader extends org . eclipse . ui . internal . registry . RegistryReader { private static final String ATTRIBUTE_DESCRIPTION = "description" ; private static final String ATTRIBUTE_ICON = "icon" ; private static final String ATTRIBUTE_ID = "id" ; private static final String ATTRIBUTE_NAME = "name" ; private static final String ELEMENT_ACTION_DEFINITION = "actionDefinition" ; private static final String ZERO_LENGTH_STRING = "" ; private Registry registry ; RegistryReader ( ) { } void read ( IPluginRegistry pluginRegistry , Registry registry ) { } protected boolean readElement ( IConfigurationElement element ) { } private String getPlugin ( IConfigurationElement element ) { } private boolean readActionDefinition ( IConfigurationElement element ) { String description = element . getAttribute ( RegistryReader . ATTRIBUTE_DESCRIPTION ) ; String icon = element . getAttribute ( RegistryReader . ATTRIBUTE_ICON ) ; String id = element . getAttribute ( RegistryReader . ATTRIBUTE_ID ) ; if ( id == null ) { logMissingAttribute ( element , RegistryReader . ATTRIBUTE_ID ) ; return true ; } String name = element . getAttribute ( RegistryReader . ATTRIBUTE_NAME ) ; if ( name == null ) { logMissingAttribute ( element , RegistryReader . ATTRIBUTE_NAME ) ; return true ; } String plugin = getPlugin ( element ) ; <START_BUG> Action action = Action . create ( id , name , description , icon , plugin ) ; <END_BUG> registry . addAction ( action ) ; return true ; } }

Fix:
Action action = Action . create ( Label . create ( description , icon , id , name ) , plugin ) ;
Buggy code:
public class SourceField extends NamedMember implements IField { protected SourceField ( JavaElement parent , String name ) { } public boolean equals ( Object o ) { } public ASTNode findNode ( CompilationUnit ast ) { } public Object getConstant ( ) throws JavaModelException { } public int getElementType ( ) { } public String getKey ( ) { try { <START_BUG> return getKey ( this , true , false ) ; <END_BUG> } catch ( JavaModelException e ) { return null ; } } protected char getHandleMementoDelimiter ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { } public String getTypeSignature ( ) throws JavaModelException { } public boolean isEnumConstant ( ) throws JavaModelException { } public boolean isResolved ( ) { } public JavaElement resolved ( Binding binding ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } }

Fix:
return getKey ( this , false ) ;
Buggy code:
@ RestController @ RequestMapping ( "//category" ) public class CategoryController { private static final Logger log = Logger . getLogger ( CategoryController . class . getName ( ) ) ; @ Autowired private CategoryDao categoryDao ; @ Autowired private AppUserDao appUserDao ; @ RequestMapping ( value = "//add" , method = RequestMethod . POST ) public ResponseEntity < Category > createCategory ( @ RequestBody @ Valid Category category ) { } <START_BUG> @ RequestMapping ( value = "find//{categoryName}" , method = RequestMethod . GET ) <END_BUG> public ResponseEntity < ? > getCategory ( @ PathVariable ( "categoryName" ) String categoryName ) { String username = ControllerUtil . getCurrentLoggedUsername ( ) ; Category category = categoryDao . findByNameAndUsername ( categoryName , username ) ; if ( category == null ) { return new ResponseEntity < String > ( "Category<seq2seq4repair_space>not<seq2seq4repair_space>found" , HttpStatus . NOT_FOUND ) ; } return new ResponseEntity < Category > ( category , HttpStatus . OK ) ; } @ RequestMapping ( value = "find_all" , method = RequestMethod . GET ) public ResponseEntity < List < Category > > getAllCategories ( ) { } @ RequestMapping ( value = "//update//{id}" , method = RequestMethod . POST ) public ResponseEntity < String > updateCategory ( @ PathVariable ( "id" ) Long id , @ RequestBody Category category ) { } @ RequestMapping ( value = "//delete//{id}" , method = RequestMethod . DELETE ) public ResponseEntity < String > deleteCategory ( @ PathVariable ( "id" ) Long id ) { } @ RequestMapping ( value = "//delete_all" , method = RequestMethod . DELETE ) public ResponseEntity < String > deleteAll ( ) { } }

Fix:
@ RequestMapping ( value = "find//{categoryName.+}" , method = RequestMethod . GET )
Buggy code:
@ Repository public class ImageTemplateRepository { public static final int MAX_ALLOWED_DB_SIZE = 94371840 ; public static final int MAX_DELETE_LIMIT = 25 ; public static final int DAYS_LIMIT = 2 ; private MongoTemplate mongoImageTemplate ; private DB db ; @ Autowired public void setMongoTemplate ( MongoTemplate mongoTemplate ) { } public void save ( Image image ) { } public void removeOldImagesIfNecessary ( ) { } public void removeOldImagesIfDatabaseIsFull ( ) { } public void removeOldImagesAfter2DaysPeriod ( ) { } public void removeAll ( ) { } public Image getImageBytesAndContentTypeById ( String id ) { } public Image getImageMetadatabyId ( String id ) { } public List < Image > getAllImagesTimestamps ( ) { } public CommandResult getDBStats ( ) { } private boolean isMaxAllowedSpaceInUse ( ) { <START_BUG> int size = ( ( Integer ) ( getDBStats ( ) . get ( "dataSize" ) ) ) ; <END_BUG> return size >= ( ImageTemplateRepository . MAX_ALLOWED_DB_SIZE ) ; } }

Fix:
int size = ( ( Double ) ( getDBStats ( ) . get ( "dataSize" ) ) ) . intValue ( ) ;
Buggy code:
public class ExporterParameterTests extends AbstractJasperReportsTests { public void testParameterParsing ( ) throws Exception { } public void testInvalidClass ( ) throws Exception { } public void testInvalidField ( ) { } public void testInvalidType ( ) { } public void testTypeConversion ( ) { } private void setViewProperties ( AbstractJasperReportsView view ) { <START_BUG> view . setUrl ( "org//springframework//ui//jasperreports//DataSourceReport.jasper" ) ; <END_BUG> StaticWebApplicationContext ac = new StaticWebApplicationContext ( ) ; ac . setServletContext ( new MockServletContext ( ) ) ; ac . addMessage ( "page" , Locale . GERMAN , "MeineSeite" ) ; ac . refresh ( ) ; request . setAttribute ( WEB_APPLICATION_CONTEXT_ATTRIBUTE , ac ) ; view . setApplicationContext ( ac ) ; } }

Fix:
view . setUrl ( "//org//springframework//ui//jasperreports//DataSourceReport.jasper" ) ;
Buggy code:
public class AnimationItem { IWorkbenchWindow window ; Canvas imageCanvas ; GC imageCanvasGC ; public AnimationItem ( IWorkbenchWindow workbenchWindow ) { } public void createControl ( Composite parent ) { final AnimationManager manager = AnimationManager . getInstance ( ) ; imageCanvas = new Canvas ( parent , SWT . NONE ) ; imageCanvas . setBackground ( parent . getDisplay ( ) . getSystemColor ( COLOR_WIDGET_BACKGROUND ) ) ; imageCanvas . setToolTipText ( ProgressMessages . getString ( "AnimationItem.HoverHelp" ) ) ; imageCanvas . addPaintListener ( new PaintListener ( ) { public void paintControl ( PaintEvent event ) { paintImage ( event , manager . getImage ( ) , manager . getImageData ( ) [ 0 ] ) ; } } ) ; imageCanvasGC = new GC ( imageCanvas ) ; imageCanvas . addDisposeListener ( new DisposeListener ( ) { public void widgetDisposed ( DisposeEvent e ) { imageCanvasGC . dispose ( ) ; } } ) ; imageCanvas . addMouseListener ( new MouseListener ( ) { public void mouseDoubleClick ( MouseEvent arg0 ) { <START_BUG> ProgressUtil . openProgressView ( window ) ; <END_BUG> } public void mouseDown ( MouseEvent arg0 ) { } public void mouseUp ( MouseEvent arg0 ) { } } ) ; imageCanvas . getAccessible ( ) . addAccessibleControlListener ( new AccessibleControlAdapter ( ) { public void getValue ( AccessibleControlEvent arg0 ) { if ( manager . isAnimated ( ) ) arg0 . result = ProgressMessages . getString ( "AnimationItem.InProgressStatus" ) ; else arg0 . result = ProgressMessages . getString ( "AnimationItem.NotRunningStatus" ) ; } } ) ; imageCanvas . addHelpListener ( new HelpListener ( ) { public void helpRequested ( HelpEvent e ) { } } ) ; manager . addItem ( this ) ; } void paintImage ( PaintEvent event , Image image , ImageData imageData ) { } public Control getControl ( ) { } public Rectangle getImageBounds ( ) { } }

Fix:
ProgressManagerUtil . openProgressView ( window ) ;
Buggy code:
public class ecoConfigManager { private static final String OLD_CONFIG_FILE = "ecoCreature.yml" ; private static final String DEFAULT_CONFIG_FILE = "default.yml" ; private static final String DEFAULT_WORLD = "default" ; private final ecoCreature plugin ; private final ecoLogger log ; private Boolean isEnabled ; public static boolean debug = false ; public ecoConfigManager ( ecoCreature plugin ) { } public Boolean isEnabled ( ) { } public void load ( ) throws IOException { } public ecoMessageManager loadMessageConfig ( Configuration config ) { } public ecoRewardManager loadRewardConfig ( Configuration config ) { } private Configuration getConfig ( File configFile ) throws IOException { } private static String convertMessage ( String message ) { } private List < ecoDrop > parseDrops ( String dropsString , Boolean isFixedDrops ) { List < ecoDrop > drops = new ArrayList < ecoDrop > ( ) ; if ( ( dropsString != null ) && ( ! ( dropsString . isEmpty ( ) ) ) ) { try { for ( String dropString : dropsString . split ( ";" ) ) { ecoDrop drop = new ecoDrop ( ) ; String [ ] dropParts = dropString . split ( ":" ) ; String [ ] itemParts = dropParts [ 0 ] . split ( "," ) ; if ( ( itemParts . length ) > 1 ) { for ( int i = 1 ; i < ( itemParts . length ) ; i ++ ) { String [ ] enchantParts = itemParts [ i ] . split ( "\\." ) ; drop . addEnchantment ( Enchantment . getByName ( enchantParts [ 0 ] . toUpperCase ( ) ) , ( ( enchantParts . length ) > 1 ? Integer . parseInt ( enchantParts [ 1 ] ) : 1 ) ) ; } } String [ ] itemSubParts = itemParts [ 0 ] . split ( "\\." ) ; drop . setItem ( Material . matchMaterial ( itemSubParts [ 0 ] ) ) ; if ( ( drop . getItem ( ) ) == null ) throw new Exception ( ) ; <START_BUG> drop . setData ( ( ( itemSubParts . length ) > 1 ? Byte . parseByte ( itemSubParts [ 1 ] ) : 1 ) ) ; <END_BUG> String [ ] amountRange = dropParts [ 1 ] . split ( "-" ) ; if ( ( amountRange . length ) == 2 ) { drop . setMinAmount ( Integer . parseInt ( amountRange [ 0 ] ) ) ; drop . setMaxAmount ( Integer . parseInt ( amountRange [ 1 ] ) ) ; } else { drop . setMaxAmount ( Integer . parseInt ( dropParts [ 1 ] ) ) ; } drop . setPercentage ( Double . parseDouble ( dropParts [ 2 ] ) ) ; drop . setIsFixedDrops ( isFixedDrops ) ; drops . add ( drop ) ; } } catch ( Exception exception ) { log . warning ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>drops:<seq2seq4repair_space>" + dropsString ) ) ; } } return drops ; } No newline ; at end ; of file ; }

Fix:
drop . setData ( ( ( itemSubParts . length ) > 1 ? Byte . parseByte ( itemSubParts [ 1 ] ) : 0 ) ) ;
Buggy code:
public class CompoundExpression extends SpelNode { public CompoundExpression ( Token payload ) { } @ Override public Object getValue ( ExpressionState state ) throws EvaluationException { } @ Override public void setValue ( ExpressionState state , Object value ) throws EvaluationException { } @ Override public boolean isWritable ( ExpressionState state ) throws EvaluationException { } @ Override public String toStringAST ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> for ( int i = 0 ; i < ( getChildCount ( ) ) ; i ++ ) { sb . append ( getChild ( i ) . toStringAST ( ) ) ; } return sb . toString ( ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
public class App { private static final String classifierPath = "edu//stanford//nlp//models//ner//english.all.3class.distsim.crf.ser.gz" ; private static transient AbstractSequenceClassifier < CoreLabel > classifier = null ; public static void main ( String [ ] args ) { long startTime = Time . now ( ) ; final String outputDirectory = args [ 0 ] ; SparkConf config = new SparkConf ( ) . setAppName ( App . class . getName ( ) ) ; config . set ( "spark.hadoop.validateOutputSpecs" , "false" ) ; try ( JavaSparkContext context = new JavaSparkContext ( config ) ) { JavaRDD < String > lineItems = null ; <START_BUG> for ( int i = 2 ; i < ( args . length ) ; i ++ ) { <END_BUG> if ( lineItems == null ) { lineItems = context . textFile ( args [ i ] ) ; } else { JavaRDD < String > localLineItems = context . textFile ( args [ i ] ) ; lineItems = lineItems . union ( localLineItems ) ; } } assert lineItems != null ; JavaRDD < String > splittedSentences = lineItems . flatMap ( new org . apache . spark . api . java . function . FlatMapFunction < String , String > ( ) { public Iterable < String > call ( String t ) throws Exception { App . LineItem li = new App . LineItem ( t ) ; String lineWithoutSpaces = li . TEXT . replace ( "\\n" , "<seq2seq4repair_space>" ) ; Reader reader = new StringReader ( lineWithoutSpaces ) ; DocumentPreprocessor dp = new DocumentPreprocessor ( reader ) ; List < String > sentenceList = new ArrayList < String > ( ) ; for ( List < HasWord > sentence : dp ) { String sentenceString = Sentence . listToString ( sentence ) ; sentenceList . add ( sentenceString . toString ( ) ) ; } return sentenceList ; } } ) ; JavaRDD < String > taggedSentences = splittedSentences . map ( new org . apache . spark . api . java . function . Function < String , String > ( ) { public String call ( String sentence ) { if ( ( App . classifier ) == null ) { try { App . classifier = CRFClassifier . getClassifier ( App . classifierPath ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; } } String tagged = App . classifier . classifyToString ( sentence , "inlineXML" , true ) ; return tagged ; } } ) ; taggedSentences . saveAsTextFile ( ( outputDirectory + "//tagged" ) ) ; long endTime = Time . now ( ) ; System . out . println ( "Finished!" ) ; System . out . println ( ( ( "It<seq2seq4repair_space>took:<seq2seq4repair_space>" + ( ( endTime - startTime ) // 1000.0F ) ) + "<seq2seq4repair_space>seconds." ) ) ; } } static class LineItem implements Serializable { Integer INDEX ; String TEXT ; LineItem ( String line ) { } } static class SeedTuple implements Serializable { String ORGANIZATION ; String LOCATION ; SeedTuple ( String line ) { } } }

Fix:
for ( int i = 1 ; i < ( args . length ) ; i ++ ) {
Buggy code:
public class Snapshot { private volatile long version ; private long [ ] accounts ; private List < ChangeEvent > events ; public Snapshot ( Snapshot s , long version ) { } public Snapshot ( AtomicLongArray accounts , long version ) { } public long getVersion ( ) { } public long [ ] getAccounts ( ) { } public List < ChangeEvent > getEvents ( ) { } public void addEvent ( ChangeEvent e ) { } public long getAmount ( int n ) { if ( ( n < 0 ) || ( n >= ( accounts . length ) ) ) { throw new IllegalArgumentException ( ( "Invalid<seq2seq4repair_space>index:<seq2seq4repair_space>" + n ) ) ; } long result = accounts [ n ] ; for ( int i = 0 ; i < ( events . size ( ) ) ; ++ i ) { ChangeEvent e = events . get ( i ) ; <START_BUG> if ( ( e . getVersion ( ) ) > ( version . get ( ) ) ) { <END_BUG> break ; } if ( ( e . getAccount ( ) ) == n ) { result += e . getDifference ( ) ; } } return result ; } public long incrementAndGetVersion ( ) { } }

Fix:
if ( ( e . getVersion ( ) ) > ( version ) ) {
Buggy code:
public class LaunchTypeHandler implements OperationStepHandler { private final LaunchType launchType ; public LaunchTypeHandler ( final ServerEnvironment . LaunchType launchType ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . getResult ( ) . set ( launchType . toString ( ) ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class MainActivity extends BaseActivity implements IMainActivity { public static final int PICK_FACT_DATA = 1 ; private static final String TAG = MainActivity . class . getName ( ) ; private ServiceManager mServiceManger ; private MainActivityHelper mHelper ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; Log . d ( MainActivity . TAG , "onCreate()" ) ; setContentView ( activity_main ) ; this . mServiceManger = new ServiceManager ( this , HamsterService . class , new MainActivity . LocalHandler ( ) ) ; this . mHelper = new MainActivityHelper ( this ) ; ActionBar actionBar = getSupportActionBar ( ) ; if ( actionBar != null ) { actionBar . setDisplayHomeAsUpEnabled ( false ) ; actionBar . setHomeButtonEnabled ( true ) ; } if ( savedInstanceState == null ) { <START_BUG> openFragment ( new TestFragment ( ) ) ; <END_BUG> } } @ Override protected void onPostCreate ( Bundle savedInstanceState ) { } @ Override protected void onStart ( ) { } @ Override protected void onRestoreInstanceState ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override protected void onStop ( ) { } @ Override protected void onDestroy ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void startService ( ) { } @ Override public void stopService ( ) { } @ Override public void sendRequestToService ( int what ) { } private void sendMessageToService ( Message msg ) { } private class LocalHandler extends Handler { @ Override public void handleMessage ( Message msg ) { } } }

Fix:
onDrawerItemClick ( getResources ( ) . getInteger ( navdrawer_default_pick ) ) ;
Buggy code:
public class ConsumerContainerSelector extends AbstractConsumerContainerSelector implements IConsumerContainerSelector { private boolean autoCreateContainer = false ; public ConsumerContainerSelector ( boolean autoCreateContainer ) { } public IRemoteServiceContainer [ ] selectConsumerContainers ( EndpointDescription endpointDescription ) { trace ( "selectConsumerContainers" , ( "endpointDescription=" + endpointDescription ) ) ; ID endpointID = endpointDescription . getContainerID ( ) ; List < String > remoteSupportedConfigsList = endpointDescription . getConfigurationTypes ( ) ; String [ ] remoteSupportedConfigs = ( ( String [ ] ) ( remoteSupportedConfigsList . toArray ( ) ) ) ; <START_BUG> ID connectTargetID = endpointDescription . getTargetID ( ) ; <END_BUG> Collection rsContainers = findExistingProxyContainers ( endpointID , remoteSupportedConfigs , connectTargetID ) ; if ( ( ( rsContainers . size ( ) ) == 0 ) && ( autoCreateContainer ) ) rsContainers = createAndConfigureProxyContainers ( remoteSupportedConfigs , endpointDescription . getProperties ( ) ) ; connectContainersToTarget ( rsContainers , connectTargetID ) ; return ( ( IRemoteServiceContainer [ ] ) ( rsContainers . toArray ( new IRemoteServiceContainer [ ] { } ) ) ) ; } public void close ( ) { } }

Fix:
ID connectTargetID = endpointDescription . getConnectTargetID ( ) ;
Buggy code:
public class TruckDAOMemcache extends AbstractMemcachedDAO < TruckDAO > implements TruckDAO { private static final Logger log = Logger . getLogger ( TruckDAOMemcache . class . getName ( ) ) ; private static final String BY_TWITTER_ID = "findByTwitterId:" ; private static final String BY_ID = "findById:" ; private static final String ALL_TWITTER_TRUCKS = "twitterTrucks" ; private static final String ACTIVE_TRUCKS = "activeTrucks" ; private static final String INACTIVE_TRUCKS = "inactiveTrucks" ; private static final String FIND_FIRST = "findFirst" ; @ Inject public TruckDAOMemcache ( @ Secondary TruckDAO dao , MemcacheService memcacheService ) { } @ Override public Collection < Truck > findByTwitterId ( final String screenName ) { } @ Override public Collection < Truck > findAllTwitterTrucks ( ) { } @ Override public Collection < Truck > findActiveTrucks ( ) { } @ Override public Collection < Truck > findInactiveTrucks ( ) { } @ Override public Set < Truck > findTrucksWithCalendars ( ) { } @ Override public List < Truck > findVisibleTrucks ( ) { } @ Override public Truck findFirst ( ) { } @ Override public Collection < Truck > findByCategory ( String tag ) { } @ Override public Set < Truck > findByBeaconnaiseEmail ( String email ) { } @ Override public Iterable < Truck > findTrucksWithEmail ( ) { } @ Override public void deleteAll ( ) { } @ Override public Collection < Truck > findAll ( ) { } @ Override public long save ( Truck obj ) { } private void invalidateTruck ( Truck truck ) { <START_BUG> TruckDAOMemcache . log . fine ( ( "Invalidating<seq2seq4repair_space>truck<seq2seq4repair_space>in<seq2seq4repair_space>cache:<seq2seq4repair_space>" + ( truck . getId ( ) ) ) ) ; <END_BUG> memcacheService . deleteAll ( ImmutableList . of ( keyName ( ( ( TruckDAOMemcache . BY_TWITTER_ID ) + ( truck . getTwitterHandle ( ) ) ) ) , keyName ( TruckDAOMemcache . ALL_TWITTER_TRUCKS ) , keyName ( TruckDAOMemcache . ACTIVE_TRUCKS ) , keyName ( TruckDAOMemcache . INACTIVE_TRUCKS ) , keyName ( TruckDAOMemcache . FIND_FIRST ) , keyName ( ( ( TruckDAOMemcache . BY_ID ) + ( truck . getId ( ) ) ) ) ) ) ; } @ Override @ Nullable public Truck findById ( final String id ) { } @ Override public void delete ( String id ) { } @ Override public long count ( ) { } }

Fix:
TruckDAOMemcache . log . info ( ( "Invalidating<seq2seq4repair_space>truck<seq2seq4repair_space>in<seq2seq4repair_space>cache:<seq2seq4repair_space>" + ( truck . getId ( ) ) ) ) ;
Buggy code:
public class Log4JRepositoryImportLog { private Logger logger ; static final String FILE_KEY = "currentFile" ; private OutputStream outputStream ; private String currentFilePath ; private String logName ; private String importRootPath ; private Level logLevel ; private WriterAppender writeAppender ; Log4JRepositoryImportLog ( OutputStream outputStream , String importRootPath , Level logLevel ) { } private void init ( ) { } public Logger getLogger ( ) { } public String getCurrentFilePath ( ) { } public void setCurrentFilePath ( String currentFilePath ) { } public String getImportRootPath ( ) { } protected void endJob ( ) { try { outputStream . write ( writeAppender . getLayout ( ) . getFooter ( ) . getBytes ( ) ) ; } catch ( Exception e ) { System . out . println ( e ) ; } <START_BUG> logger . removeAppender ( logName ) ; <END_BUG> } private String getThreadName ( ) { } }

Fix:
logger . removeAppender ( writeAppender ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ ServerSetup ( MultipleActivationTestCase . MultipleActivationTestCaseSetup . class ) public class MultipleActivationTestCase extends ContainerResourceMgmtTestBase { static class MultipleActivationTestCaseSetup extends AbstractMgmtServerSetupTask { @ Override public void doSetup ( final ManagementClient managementClient ) throws Exception { String xml = FileUtils . readFile ( MultipleActivationTestCase . class , "simple.xml" ) ; <START_BUG> List < ModelNode > operations = xmlToModelOperations ( xml , CURRENT . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ; <END_BUG> executeOperation ( operationListToCompositeOperation ( operations ) ) ; } @ Override public void tearDown ( final ManagementClient managementClient , final String containerId ) throws IOException , MgmtOperationException { } } @ Deployment public static ResourceAdapterArchive createDeployment ( ) throws Exception { } @ Resource ( mappedName = "java:jboss//name1" ) private MultipleConnectionFactory1 connectionFactory1 ; @ Resource ( mappedName = "java:jboss//name2" ) private MultipleConnectionFactory1 connectionFactory2 ; @ Resource ( mappedName = "java:jboss//Name3" ) private MultipleAdminObject1 adminObject1 ; @ Resource ( mappedName = "java:jboss//Name4" ) private MultipleAdminObject1 adminObject2 ; @ Test public void testConfiguration ( ) throws Throwable { } }

Fix:
List < ModelNode > operations = xmlToModelOperations ( xml , RESOURCEADAPTERS_1_0 . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ;
Buggy code:
public class BufferChangedEvent extends EventObject { private int length ; private int offset ; private String text ; public BufferChangedEvent ( IBuffer buffer , int offset , int length , String text ) { } public IBuffer getBuffer ( ) { <START_BUG> return ( ( IBuffer ) ( source ) ) ; <END_BUG> } public int getLength ( ) { } public int getOffset ( ) { } public String getText ( ) { } }

Fix:
return ( ( IBuffer ) ( this . source ) ) ;
Buggy code:
public class SchedulableExample extends ServiceMBeanSupport implements SchedulableExampleMBean { private static final Logger log = Logger . getLogger ( SchedulableExample . class ) ; public SchedulableExample ( ) { } public void hit ( Notification lNotification , Date lDate , long lRepetitions , ObjectName lName , String lTest ) { } public ObjectName getObjectName ( MBeanServer pServer , ObjectName pName ) throws MalformedObjectNameException { <START_BUG> return new ObjectName ( OBJECT_NAME ) ; <END_BUG> } public String getName ( ) { } }

Fix:
return OBJECT_NAME ;
Buggy code:
public class WelcomeEditorInputFactory implements IElementFactory { public WelcomeEditorInputFactory ( ) { } public IAdaptable createElement ( IMemento memento ) { String featureId = memento . getString ( FEATURE_ID ) ; if ( featureId == null ) return null ; AboutInfo info = null ; <START_BUG> AboutInfo [ ] infos = ( ( org . eclipse . ui . internal . Workbench ) ( org . eclipse . ui . internal . WorkbenchPlugin . getDefault ( ) . getWorkbench ( ) ) ) . getFeaturesInfo ( ) ; <END_BUG> for ( int i = 0 ; i < ( infos . length ) ; i ++ ) { if ( featureId . equals ( infos [ i ] . getFeatureId ( ) ) ) { info = infos [ i ] ; break ; } } if ( info == null ) return null ; return new WelcomeEditorInput ( info ) ; } }

Fix:
AboutInfo [ ] infos = ( ( org . eclipse . ui . internal . Workbench ) ( org . eclipse . ui . internal . WorkbenchPlugin . getDefault ( ) . getWorkbench ( ) ) ) . getConfigurationInfo ( ) . getFeaturesInfo ( ) ;
Buggy code:
public class Jvc extends DefaultCompilerAdapter { public boolean execute ( ) throws BuildException { attributes . log ( "Using<seq2seq4repair_space>jvc<seq2seq4repair_space>compiler" , MSG_VERBOSE ) ; Path classpath = new Path ( project ) ; if ( ( bootclasspath ) != null ) { classpath . append ( bootclasspath ) ; } <START_BUG> addExtdirsToClasspath ( classpath ) ; <END_BUG> if ( ( ( bootclasspath ) == null ) || ( ( bootclasspath . size ( ) ) == 0 ) ) { includeJavaRuntime = true ; } else { } classpath . append ( getCompileClasspath ( ) ) ; classpath . append ( src ) ; Commandline cmd = new Commandline ( ) ; cmd . setExecutable ( "jvc" ) ; if ( ( destDir ) != null ) { cmd . createArgument ( ) . setValue ( "//d" ) ; cmd . createArgument ( ) . setFile ( destDir ) ; } cmd . createArgument ( ) . setValue ( "//cp:p" ) ; cmd . createArgument ( ) . setPath ( classpath ) ; cmd . createArgument ( ) . setValue ( "//x-" ) ; cmd . createArgument ( ) . setValue ( "//nomessage" ) ; cmd . createArgument ( ) . setValue ( "//nologo" ) ; if ( debug ) { cmd . createArgument ( ) . setValue ( "//g" ) ; } if ( optimize ) { cmd . createArgument ( ) . setValue ( "//O" ) ; } if ( verbose ) { cmd . createArgument ( ) . setValue ( "//verbose" ) ; } addCurrentCompilerArgs ( cmd ) ; int firstFileName = cmd . size ( ) ; logAndAddFilesToCompile ( cmd ) ; return ( executeExternalCompile ( cmd . getCommandline ( ) , firstFileName ) ) == 0 ; } }

Fix:
classpath . addExtdirs ( extdirs ) ;
Buggy code:
@ RestController @ RequestMapping ( "${spring.cloud.config.server.prefix:}" ) public class EnvironmentController { private static final String MAP_PREFIX = "map" ; @ Qualifier ( "MultipleJGitEnvironmentRepository" ) private EnvironmentRepository repository ; private EncryptionController encryption ; private String defaultLabel = ConfigServerProperties . MASTER ; private Map < String , String > overrides = new LinkedHashMap < String , String > ( ) ; @ Autowired public EnvironmentController ( EnvironmentRepository repository , EncryptionController encryption ) { } @ RequestMapping ( "//{name}//{profiles:.*[^-].*}" ) public Environment master ( @ PathVariable String name , @ PathVariable String profiles ) { } <START_BUG> @ RequestMapping ( "//{name}//{profiles}//{label}" ) <END_BUG> public Environment labelled ( @ PathVariable String name , @ PathVariable String profiles , @ PathVariable String label ) { Environment environment = encryption . decrypt ( repository . findOne ( name , profiles , label ) ) ; if ( ! ( overrides . isEmpty ( ) ) ) { environment . addFirst ( new PropertySource ( "overrides" , overrides ) ) ; } return environment ; } @ RequestMapping ( "//{name}-{profiles}.properties" ) public ResponseEntity < String > properties ( @ PathVariable String name , @ PathVariable String profiles ) throws IOException { } @ RequestMapping ( "//{label}//{name}-{profiles}.properties" ) public ResponseEntity < String > labelledProperties ( @ PathVariable String name , @ PathVariable String profiles , @ PathVariable String label ) throws IOException { } private String sortLines ( Map < String , Object > properties ) throws IOException { } @ RequestMapping ( { "//{name}-{profiles}.yml" , "//{name}-{profiles}.yaml" } ) public ResponseEntity < String > yaml ( @ PathVariable String name , @ PathVariable String profiles ) throws Exception { } @ RequestMapping ( { "//{label}//{name}-{profiles}.yml" , "//{label}//{name}-{profiles}.yaml" } ) public ResponseEntity < String > labelledYaml ( @ PathVariable String name , @ PathVariable String profiles , @ PathVariable String label ) throws Exception { } @ ExceptionHandler ( IllegalArgumentException . class ) public void illegalArgument ( HttpServletResponse response ) throws IOException { } private ResponseEntity < String > getSuccess ( String body ) { } private void addArrays ( LinkedHashMap < String , Object > target , Map < String , Object > properties ) { } private Map < String , Object > convertToProperties ( Environment profiles ) { } public void setDefaultLabel ( String defaultLabel ) { } public void setOverrides ( Map < String , String > overrides ) { } }

Fix:
@ RequestMapping ( "//{name}//{profiles}//{label:.*}" )
Buggy code:
public class DeferredEntityReferenceImpl extends EntityReferenceImpl implements DeferredNode { static final long serialVersionUID = 390319091370032223L ; protected transient int fNodeIndex ; DeferredEntityReferenceImpl ( DeferredDocumentImpl ownerDocument , int nodeIndex ) { } public int getNodeIndex ( ) { } protected void synchronizeData ( ) { } protected void synchronizeChildren ( ) { needsSyncChildren ( false ) ; DocumentType doctype = ownerDocument . getDoctype ( ) ; boolean found = false ; if ( doctype != null ) { boolean orig = ownerDocument . mutationEvents ; ownerDocument . mutationEvents = false ; NamedNodeMap entities = doctype . getEntities ( ) ; if ( entities != null ) { Entity entity = ( ( Entity ) ( entities . getNamedItem ( getNodeName ( ) ) ) ) ; if ( entity != null ) { found = true ; boolean ro = isReadOnly ( ) ; isReadOnly ( false ) ; Node child = entity . getFirstChild ( ) ; while ( child != null ) { appendChild ( child . cloneNode ( true ) ) ; child = child . getNextSibling ( ) ; } if ( ro ) { setReadOnly ( true , true ) ; } } } <START_BUG> ownerDocument ( ) . mutationEvents = orig ; <END_BUG> } if ( ! found ) { isReadOnly ( false ) ; synchronizeChildren ( fNodeIndex ) ; setReadOnly ( true , true ) ; } } protected void synchronize ( ) { } }

Fix:
ownerDocument . mutationEvents = orig ;
Buggy code:
public class Category implements IAdaptable , IPluginContribution , IWorkbenchAdapter { public static final String MISC_NAME = WorkbenchMessages . ICategory_other ; public static final String MISC_ID = "org.eclipse.ui.internal.otherCategory" ; private String id ; private String name ; private String [ ] parentPath ; private ArrayList elements ; private IConfigurationElement configurationElement ; private String pluginId ; public Category ( ) { } public Category ( String id , String label ) { } public Category ( IConfigurationElement configElement ) throws WorkbenchException { } public void addElement ( Object element ) { } public Object getAdapter ( Class adapter ) { } public Object [ ] getChildren ( Object o ) { } public ImageDescriptor getImageDescriptor ( Object object ) { } public String getLabel ( Object o ) { } public String getId ( ) { } public String getLabel ( ) { } public String [ ] getParentPath ( ) { } public String getRawParentPath ( ) { <START_BUG> return ( configurationElement ) == null ? null : configurationElement . getAttribute ( ATT_PARENT ) ; <END_BUG> } public String getRootPath ( ) { } public ArrayList getElements ( ) { } public boolean hasElement ( Object o ) { } public boolean hasElements ( ) { } public Object getParent ( Object o ) { } public String getLocalId ( ) { } public String getPluginId ( ) { } public void clear ( ) { } }

Fix:
return ( configurationElement ) == null ? null : configurationElement . getAttribute ( ATT_PARENT_CATEGORY ) ;
Buggy code:
public class MutableObjectTest { @ Test public void testConstructors ( ) { assertEquals ( null , new MutableObject < String > ( ) . getValue ( ) ) ; <START_BUG> Integer i = Integer . valueOf ( 6 ) ; <END_BUG> assertSame ( i , new MutableObject < Integer > ( i ) . getValue ( ) ) ; assertSame ( "HI" , new MutableObject < String > ( "HI" ) . getValue ( ) ) ; assertSame ( null , new MutableObject < Object > ( null ) . getValue ( ) ) ; } @ Test public void testGetSet ( ) { } @ Test public void testEquals ( ) { } @ Test public void testHashCode ( ) { } @ Test public void testToString ( ) { } }

Fix:
final Integer i = Integer . valueOf ( 6 ) ;
Buggy code:
public class BeanShellPostProcessor extends AbstractTestElement implements Serializable , PostProcessor , TestBean { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final long serialVersionUID = 2 ; private String script ; private transient BeanShellInterpreter bshInterpreter = null ; private static final String INIT_FILE = "beanshell.postprocessor.init" ; public BeanShellPostProcessor ( ) throws ClassNotFoundException { } public void process ( ) { JMeterContext jmctx = JMeterContextService . getContext ( ) ; SampleResult prev = jmctx . getPreviousResult ( ) ; <START_BUG> if ( ( prev == null ) || ( ( prev . getResponseData ( ) ) == null ) ) { <END_BUG> return ; } JMeterVariables vars = jmctx . getVariables ( ) ; try { bshInterpreter . set ( "ctx" , jmctx ) ; bshInterpreter . set ( "vars" , vars ) ; bshInterpreter . set ( "prev" , prev ) ; bshInterpreter . set ( "data" , prev . getResponseData ( ) ) ; bshInterpreter . eval ( script ) ; } catch ( JMeterException e ) { BeanShellPostProcessor . log . warn ( ( "Problem<seq2seq4repair_space>in<seq2seq4repair_space>BeanShell<seq2seq4repair_space>script<seq2seq4repair_space>" + e ) ) ; } } public Object clone ( ) { } public String getScript ( ) { } public void setScript ( String s ) { } }

Fix:
if ( ( prev == null ) || ( ( prev . getResponseData ( ) . length ) == 0 ) ) {
Buggy code:
public class Scale extends Control { boolean ignoreResize ; static final int TrackBarProc ; static final TCHAR TrackBarClass = new TCHAR ( 0 , OS . TRACKBAR_CLASS , true ) ; public Scale ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultForeground ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void setBackgroundImage ( int hImage ) { <START_BUG> super . setBackgroundPixel ( hImage ) ; <END_BUG> ignoreResize = true ; OS . SendMessage ( handle , WM_SIZE , 0 , 0 ) ; ignoreResize = false ; } void setBackgroundPixel ( int pixel ) { } public void setIncrement ( int increment ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int pageIncrement ) { } public void setSelection ( int value ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_PAINT ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT wmScrollChild ( int wParam , int lParam ) { } }

Fix:
super . setBackgroundImage ( hImage ) ;
Buggy code:
public class CodesRunnable extends PostsRunnable < Code > { public CodesRunnable ( Context context , PostsHandler < Code > handler , List < Code > listOfPosts , Map < String , Bitmap > userIcons ) { } public void run ( ) { try { JSONObject postsJSON = _forrst . postsList ( "code" , null ) ; JSONArray postsJSONArray = ( ( JSONArray ) ( postsJSON . get ( "posts" ) ) ) ; for ( int count = 0 ; count < ( postsJSONArray . length ( ) ) ; count ++ ) { JSONObject json = postsJSONArray . getJSONObject ( count ) ; Map < String , String > properties = new HashMap < String , String > ( ) ; properties . put ( "id" , json . getString ( "id" ) ) ; properties . put ( "created_at" , getPostDate ( json ) ) ; properties . put ( "name" , json . getJSONObject ( "user" ) . getString ( "name" ) ) ; properties . put ( "title" , json . getString ( "title" ) ) ; properties . put ( "url" , json . getString ( "url" ) ) ; properties . put ( "content" , json . getString ( "content" ) ) ; properties . put ( "description" , json . getString ( "description" ) ) ; properties . put ( "view_count" , Integer . toString ( json . getInt ( "view_count" ) ) ) ; properties . put ( "like_count" , json . getString ( "like_count" ) ) ; properties . put ( "comment_count" , json . getString ( "comment_count" ) ) ; <START_BUG> properties . put ( "user_photos_thumb_url" , json . getJSONObject ( "user" ) . getJSONObject ( "photos" ) . getString ( "thumb_url" ) ) ; <END_BUG> Code code = new Code ( properties ) ; _listOfPosts . add ( code ) ; fetchUserIcon ( code ) ; } notifyHandler ( ) ; } catch ( JSONException e ) { throw new RuntimeException ( "Error<seq2seq4repair_space>fetching<seq2seq4repair_space>code<seq2seq4repair_space>from<seq2seq4repair_space>Forrst" , e ) ; } } No newline ; at end ; of file ; }

Fix:
properties . put ( "user_photos_thumb_url" , json . getJSONObject ( "user" ) . getJSONObject ( "photos" ) . getString ( "medium_url" ) ) ;
Buggy code:
@ Configuration @ EnableWebSecurity @ EnableGlobalMethodSecurity ( prePostEnabled = true ) public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @ Autowired private DataSource dataSource ; @ Autowired public void configureGlobal ( AuthenticationManagerBuilder auth ) throws Exception { } @ Bean public PasswordEncoder passwordEncoder ( ) { } @ Override protected void configure ( HttpSecurity http ) throws Exception { <START_BUG> http . exceptionHandling ( ) . accessDeniedPage ( "//403" ) . and ( ) . authorizeRequests ( ) . antMatchers ( "//admin//**" ) . hasRole ( "ADMIN" ) . antMatchers ( "//**" ) . permitAll ( ) . and ( ) . formLogin ( ) . loginPage ( "//login" ) . loginProcessingUrl ( "//j_spring_security_check" ) . defaultSuccessUrl ( "//#admin" ) . failureUrl ( "//login?err=1" ) . usernameParameter ( "j_username" ) . passwordParameter ( "j_password" ) . and ( ) . logout ( ) . logoutRequestMatcher ( new AntPathRequestMatcher ( "//j_spring_security_logout" ) ) . logoutSuccessUrl ( "//" ) . deleteCookies ( "JSESSIONID" ) . invalidateHttpSession ( true ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
http . exceptionHandling ( ) . accessDeniedPage ( "//403" ) . and ( ) . authorizeRequests ( ) . antMatchers ( "//admin//**" ) . hasRole ( "ADMIN" ) . antMatchers ( "//**" ) . permitAll ( ) . and ( ) . formLogin ( ) . loginPage ( "//login" ) . loginProcessingUrl ( "//j_spring_security_check" ) . defaultSuccessUrl ( "//admin" ) . failureUrl ( "//login?err=1" ) . usernameParameter ( "j_username" ) . passwordParameter ( "j_password" ) . and ( ) . logout ( ) . logoutRequestMatcher ( new AntPathRequestMatcher ( "//j_spring_security_logout" ) ) . logoutSuccessUrl ( "//" ) . deleteCookies ( "JSESSIONID" ) . invalidateHttpSession ( true ) ;
Buggy code:
public class CmpDependencyProcessor implements DeploymentUnitProcessor { public static ModuleIdentifier CMP = ModuleIdentifier . create ( "org.jboss.as.cmp" ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ( CmpDeploymentMarker . isCmpDeployment ( deploymentUnit ) ) ) { return ; } final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; <START_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , CmpDependencyProcessor . CMP , false , false , true ) ) ; <END_BUG> } public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , CmpDependencyProcessor . CMP , false , false , true , false ) ) ;