nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CBayesThetaNormalizerMapper extends MapReduceBase implements Mapper < StringTuple , DoubleWritable , StringTuple , DoubleWritable > { private static final Logger log = LoggerFactory . getLogger ( CBayesThetaNormalizerMapper . class ) ; private final OpenObjectDoubleHashMap < String > labelWeightSum = new OpenObjectDoubleHashMap < String > ( ) ; private double sigmaJSigmaK ; private double vocabCount ; private double alphaI = 1.0 ; @ Override public void map ( StringTuple key , final DoubleWritable value , final OutputCollector < StringTuple , DoubleWritable > output , final Reporter reporter ) throws IOException { } @ Override public void configure ( JobConf job ) { try { labelWeightSum . clear ( ) ; Map < String , Double > labelWeightSumTemp = new HashMap < String , Double > ( ) ; DefaultStringifier < Map < String , Double > > mapStringifier = new DefaultStringifier < Map < String , Double > > ( job , GenericsUtil . getClass ( labelWeightSumTemp ) ) ; String labelWeightSumString = job . get ( "cnaivebayes.sigma_k" , mapStringifier . toString ( labelWeightSumTemp ) ) ; labelWeightSumTemp = mapStringifier . fromString ( labelWeightSumString ) ; for ( Map . Entry < String , Double > stringDoubleEntry : labelWeightSumTemp . entrySet ( ) ) { this . labelWeightSum . put ( stringDoubleEntry . getKey ( ) , stringDoubleEntry . getValue ( ) ) ; } DefaultStringifier < Double > stringifier = new DefaultStringifier < Double > ( job , GenericsUtil . getClass ( sigmaJSigmaK ) ) ; String sigmaJSigmaKString = job . get ( "cnaivebayes.sigma_jSigma_k" , stringifier . toString ( sigmaJSigmaK ) ) ; sigmaJSigmaK = stringifier . fromString ( sigmaJSigmaKString ) ; String vocabCountString = job . get ( "cnaivebayes.vocabCount" , stringifier . toString ( vocabCount ) ) ; vocabCount = stringifier . fromString ( vocabCountString ) ; <START_BUG> Parameters params = Parameters . fromString ( job . get ( "bayes.parameters" , "" ) ) ; <END_BUG> alphaI = Double . valueOf ( params . get ( "alpha_i" , "1.0" ) ) ; } catch ( IOException ex ) { CBayesThetaNormalizerMapper . log . warn ( ex . toString ( ) , ex ) ; } } }

Fix:
Parameters params = new Parameters ( job . get ( "bayes.parameters" , "" ) ) ;
Buggy code:
public class TestICUNormalizer2Filter extends BaseTokenStreamTestCase { Analyzer a = new Analyzer ( ) { @ Override public TokenStreamComponents createComponents ( String fieldName , Reader reader ) { } } ; public void testDefaults ( ) throws IOException { } public void testAlternate ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , a , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , a , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class MainActivity extends ActionBarActivity { Future < File > downloading ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void download ( View view ) { Timber . i ( "clicked" ) ; <START_BUG> FontPackage fontPackage = new FontPackage ( "Komika" ) ; <END_BUG> FontDownloader fontDownloader = new FontDownloader ( fontPackage , this ) ; fontDownloader . download ( ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
FontPackage fontPackage = new FontPackage ( "OpenSans" ) ;
Buggy code:
public interface IGestureBinding { String getCommandId ( ) { } String getGestureConfigurationId ( ) { } String getContextId ( ) { } <START_BUG> IGestureSequence getGestureSequence ( ) ; <END_BUG> String getLocale ( ) { } String getPlatform ( ) { } String getPluginId ( ) { } }

Fix:
GestureSequence getGestureSequence ( ) ;
Buggy code:
public class CalendarEventsReceiver extends BroadcastReceiver { private Context context ; private InstanceDao instanceDao ; private AlarmManager alarmManager ; @ Override public void onReceive ( Context context , Intent intent ) { } private void setContext ( Context context ) { } public void setInstanceDao ( InstanceDao instanceDao ) { } private void setAlarmManager ( AlarmManager alarmManager ) { } private void setEventsToSilent ( ) { } private void setMuteAlarms ( Event event ) { } private void deleteStoredInstances ( ) { } private List < Calendar > getCalendars ( ) { } private List < Event > getEvents ( Calendar calendar ) { } private List < Instance > getInstances ( ContentResolver contentResolver , Event event ) { String [ ] projection = new String [ ] { Instances . _ID , Instances . EVENT_ID , Instances . TITLE , Instances . BEGIN , Instances . END , Instances . AVAILABILITY , Instances . ORGANIZER } ; String selection = ( ( ( "(" + ( Instances . AVAILABILITY ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>?)<seq2seq4repair_space>AND<seq2seq4repair_space>(" ) + ( Instances . EVENT_ID ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>?)" ; String [ ] selectionArgs = new String [ ] { "" + ( Instances . AVAILABILITY_BUSY ) , "" + ( event . getId ( ) ) } ; Uri . Builder contentUri = CONTENT_URI . buildUpon ( ) ; ContentUris . appendId ( contentUri , System . currentTimeMillis ( ) ) ; ContentUris . appendId ( contentUri , ( ( System . currentTimeMillis ( ) ) + ( ( ( 24 * 60 ) * 60 ) * 1000 ) ) ) ; Cursor cursor = contentResolver . query ( contentUri . build ( ) , projection , selection , selectionArgs , null ) ; List < Instance > instances = new ArrayList < > ( ) ; while ( cursor . moveToNext ( ) ) { long startDate = cursor . getLong ( cursor . getColumnIndex ( BEGIN ) ) ; long endDate = cursor . getLong ( cursor . getColumnIndex ( END ) ) ; <START_BUG> if ( ( Setting . getAllDay ( context ) ) && ( endDate == ( startDate + ( ( ( 24 * 60 ) * 60 ) * 1000 ) ) ) ) { <END_BUG> continue ; } Instance instance = new Instance ( cursor . getInt ( cursor . getColumnIndex ( _ID ) ) , cursor . getInt ( cursor . getColumnIndex ( EVENT_ID ) ) , cursor . getString ( cursor . getColumnIndex ( TITLE ) ) , startDate , endDate , cursor . getInt ( cursor . getColumnIndex ( AVAILABILITY ) ) , cursor . getString ( cursor . getColumnIndex ( ORGANIZER ) ) , false ) ; instances . add ( instance ) ; } cursor . close ( ) ; return instances ; } private List < Attendee > getAttendees ( Event event ) { } private void setMuteAlarm ( Instance instance ) { } private PendingIntent getPendingIntent ( Instance instance ) { } }

Fix:
if ( ( ! ( Setting . getAllDay ( context ) ) ) && ( endDate == ( startDate + ( ( ( 24 * 60 ) * 60 ) * 1000 ) ) ) ) {
Buggy code:
public class ItemSaleCrud implements DBCrud < ItemSale > { private static final Logger LOG = Logger . getLogger ( ItemSaleCrud . class . getName ( ) ) ; private Connection connection ; public ItemSale save ( ItemSale element , Bill parent ) throws PersistenceException , ClassNotFoundException { } @ Override public ItemSale find ( String id ) throws PersistenceException , ClassNotFoundException { } @ Override public ItemSale find ( int id ) throws PersistenceException , ClassNotFoundException { } public Collection < ItemSale > findByItemBillId ( int itemBillId ) throws PersistenceException , ClassNotFoundException { try { <START_BUG> String query = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>item_sales<seq2seq4repair_space>WHERE<seq2seq4repair_space>itembill_id<seq2seq4repair_space>=<seq2seq4repair_space>?" ; <END_BUG> connection = ConnectionManager . getInstance ( ) . getConnection ( ) ; PreparedStatement statement = connection . prepareStatement ( query ) ; statement . setInt ( 1 , itemBillId ) ; ResultSet resultSet = statement . executeQuery ( ) ; Collection < ItemSale > result = new HashSet < > ( ) ; while ( resultSet . next ( ) ) { ItemSale element = createElementFromResultSet ( resultSet ) ; result . add ( element ) ; } return result ; } catch ( SQLException ex ) { ItemSaleCrud . LOG . log ( Level . SEVERE , null , ex ) ; throw new PersistenceException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>item<seq2seq4repair_space>sale" , ex ) ; } finally { try { ConnectionManager . getInstance ( ) . releaseConnection ( ) ; } catch ( SQLException ex ) { ItemSaleCrud . LOG . log ( Level . SEVERE , null , ex ) ; } } } @ Override public ItemSale merge ( ItemSale element ) throws PersistenceException , ClassNotFoundException { } @ Override public Collection < ItemSale > getAll ( ) throws PersistenceException , ClassNotFoundException { } @ Override public ItemSale refresh ( ItemSale element ) throws PersistenceException , ClassNotFoundException { } @ Override public ItemSale createElementFromResultSet ( ResultSet resultSet ) throws SQLException { } @ Override public ItemSale save ( ItemSale element ) throws PersistenceException , ClassNotFoundException { } }

Fix:
String query = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>item_sales<seq2seq4repair_space>WHERE<seq2seq4repair_space>itemsale_id<seq2seq4repair_space>=<seq2seq4repair_space>?" ;
Buggy code:
public class AnnotationArgument extends Argument { public AnnotationArgument ( char [ ] name , int startPosition , int endPosition ) { } public AnnotationArgument ( char [ ] name , int startPosition , int endPosition , TypeReference typeRef ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public void resolve ( BlockScope scope ) { <START_BUG> Binding existingVariable = scope . getBinding ( name , VARIABLE , this ) ; <END_BUG> if ( ( existingVariable != null ) && ( existingVariable . isValidBinding ( ) ) ) { if ( ( existingVariable instanceof LocalVariableBinding ) && ( ( this . hiddenVariableDepth ) == 0 ) ) { LocalVariableBinding local = ( ( LocalVariableBinding ) ( existingVariable ) ) ; if ( local . isArgument ) { this . binding = local ; return ; } } } scope . problemReporter ( ) . annotationInvalidParamName ( this , false ) ; } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
Binding existingVariable = scope . getBinding ( name , VARIABLE , this , true ) ;
Buggy code:
@ Controller public class PaContentDeactivationController { private final PaContentDeactivator paDeactivator ; public PaContentDeactivationController ( PaContentDeactivator paDeactivator ) { } @ RequestMapping ( value = "//system//content//deactivate//pa" , method = RequestMethod . POST ) public void purge ( HttpServletResponse response , @ RequestParam ( value = "filePath" , required = true ) String filePath , @ RequestParam ( value = "threads" , required = true ) Integer threads ) throws IOException { <START_BUG> paDeactivator . deactivate ( new File ( filePath , threads ) ) ; <END_BUG> response . setStatus ( OK . code ( ) ) ; response . flushBuffer ( ) ; } }

Fix:
paDeactivator . deactivate ( new File ( filePath ) , threads ) ;
Buggy code:
public class CollectionSummaryTeacherPresenter extends PresenterWidget < IsCollectionSummaryTeacherView > implements CollectionSummaryTeacherUiHandlers { @ Inject private AnalyticsServiceAsync analyticService ; private String collectionId ; private String classpageId ; private String pathwayId ; @ Inject public CollectionSummaryTeacherPresenter ( EventBus eventBus , IsCollectionSummaryTeacherView view ) { } public AnalyticsServiceAsync getAnalyticService ( ) { } public void setAnalyticService ( AnalyticsServiceAsync analyticService ) { } @ Override public void setTeacherData ( String collectionId , String classpageId , String pathwayId , final CollectionSummaryMetaDataDo result , final HTMLPanel loadingImage ) { } @ Override public void setOEtextData ( final String resourceGooruId , final String questionType ) { } @ Override public void setHtmltopdf ( String htmlString , String collectionTitle ) { <START_BUG> this . analyticService . setHTMLtoPDF ( htmlString , collectionTitle , new com . google . gwt . user . client . rpc . AsyncCallback < String > ( ) { <END_BUG> @ Override public void onSuccess ( String result ) { getView ( ) . getFrame ( ) . setUrl ( result ) ; } @ Override public void onFailure ( Throwable caught ) { } } ) ; } @ Override public void clearFrame ( ) { } }

Fix:
this . analyticService . setHTMLtoPDF ( htmlString , collectionTitle , false , new com . google . gwt . user . client . rpc . AsyncCallback < String > ( ) {
Buggy code:
public class BytecodeToGraphProcessor extends Processor < Collection < ByteClass > , Collection < Graph < LabeledInstruction > > > { @ Override public Collection < Graph < LabeledInstruction > > process ( Collection < ByteClass > input ) throws ProcessorException { final Collection < Graph < LabeledInstruction > > returnValue = new HashSet < > ( ) ; for ( ByteClass byteClass : input ) { for ( Method method : byteClass . getMethods ( ) ) { final String graphId = ( ( byteClass . getId ( ) ) + "$" ) + ( method . getId ( ) ) ; final Graph . Builder < LabeledInstruction > builder = new Graph . Builder < > ( graphId ) ; final Map < LabeledInstruction , String > jumps = new HashMap < > ( ) ; LabeledInstruction lastInstruction = null ; for ( LabeledInstruction instruction : method . getInstruction ( ) ) { if ( lastInstruction != null ) { builder . addEdge ( lastInstruction , instruction ) ; } if ( instruction instanceof BranchInstruction ) { <START_BUG> jumps . put ( instruction , ( ( LabeledInstruction ) ( instruction ) ) . getLabel ( ) ) ; <END_BUG> } lastInstruction = instruction ; } for ( Map . Entry < LabeledInstruction , String > jump : jumps . entrySet ( ) ) { final LabeledInstruction source = jump . getKey ( ) ; final LabeledInstruction target = method . getLabeledInstruction ( jump . getValue ( ) ) ; builder . addEdge ( source , target ) ; } returnValue . add ( builder . build ( ) ) ; } } return returnValue ; } }

Fix:
jumps . put ( instruction , ( ( BranchInstruction ) ( instruction ) ) . getTarget ( ) ) ;
Buggy code:
public class ModClusterStop implements OperationStepHandler , DescriptionProvider { static final ModClusterStop INSTANCE = new ModClusterStop ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; List < Property > list = operation . asPropertyList ( ) ; Iterator < Property > it = list . iterator ( ) ; int waittime = 10 ; while ( it . hasNext ( ) ) { Property prop = it . next ( ) ; if ( prop . getName ( ) . equals ( "waittime" ) ) { waittime = Integer . parseInt ( ContextHost . RemoveQuotes ( prop . getValue ( ) . toString ( ) ) ) ; } } modcluster . stop ( waittime ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {
Buggy code:
public class HttpHeaderCollection { private final Map < HttpHeaderCollection . HeaderKey , List < Object > > headers ; private static final String [ ] NO_VALUES = new String [ 0 ] ; public HttpHeaderCollection ( ) { } private void internalAdd ( String name , Object object ) { } public void setHeader ( String name , String value ) { } public void addHeader ( String name , String value ) { } public void addDateHeader ( String name , Time time ) { } public void setDateHeader ( String name , Time time ) { } public void removeHeader ( String name ) { } private String valueToString ( Object value ) { if ( value instanceof Time ) { <START_BUG> return ( ( Time ) ( value ) ) . toRfc1123DateString ( ) ; <END_BUG> } else { return value . toString ( ) ; } } public boolean containsHeader ( String name ) { } public Set < String > getHeaderNames ( ) { } public String [ ] getHeaderValues ( String name ) { } public String getHeader ( String name ) { } public Time getDateHeader ( String name ) { } public boolean isEmpty ( ) { } public int getCount ( ) { } public void clear ( ) { } private static class HeaderKey { private final String key ; private final String name ; private HeaderKey ( String name ) { } public String getName ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } } }

Fix:
return ( ( Time ) ( value ) ) . toRfc1123TimestampString ( ) ;
Buggy code:
public class RateProject extends Controller { @ Security . Authenticated ( Secured . class ) public static Result index ( Long projectId ) { Long userId = Long . parseLong ( session ( ) . get ( "userId" ) ) ; User user = User . findByUserId ( userId ) ; List < Rate > rates = Rate . findListByUserIdAndProjectId ( userId , projectId ) ; Comment comment = Comment . findByUserIdAndProjectId ( userId , projectId ) ; List < Settings > webconfig = Settings . findAll ( ) ; Map setting = new HashMap ( ) ; for ( Settings item : webconfig ) { setting . put ( item . keyName , item . keyValue ) ; } <START_BUG> if ( projectId > ( Project . findAll ( ) . size ( ) ) ) { <END_BUG> return redirect ( ProjectList . index ( ) ) ; } return ok ( rateproject . render ( user , Project . findById ( projectId ) , rates , RateCriterion . findAll ( ) , comment , setting ) ) ; } public static Result addRate ( ) { } public static Result editRate ( ) { } }

Fix:
if ( ( Project . findById ( projectId ) ) == null ) {
Buggy code:
public interface VersionStrategy extends Strategy { public void setVersion ( Version owner ) { } public boolean select ( Select sel , ClassMapping mapping ) { } <START_BUG> public void load ( OpenJPAStateManager sm , JDBCStore store , Result res ) throws SQLException ; <END_BUG> public void afterLoad ( OpenJPAStateManager sm , JDBCStore store ) { } public boolean checkVersion ( OpenJPAStateManager sm , JDBCStore store , boolean updateVersion ) throws SQLException { } public int compareVersion ( Object v1 , Object v2 ) { } public Map getBulkUpdateValues ( ) { } }

Fix:
public Object load ( OpenJPAStateManager sm , JDBCStore store , Result res ) throws SQLException ;
Buggy code:
public class TestChannelCreator { private static final int PORT = 4000 ; private static final SocketAddress SOCKET_ADDRESS = new InetSocketAddress ( "127.0.0.1" , TestChannelCreator . PORT ) ; private ChannelServer cs ; @ Before public void createSink ( ) throws IOException { } @ After public void shutdwon ( ) { } @ Test @ Ignore public void sink ( ) throws IOException , InterruptedException { ChannelServerConfiguration c = new ChannelServerConfiguration ( ) ; final EventLoopGroup bossGroup = new NioEventLoopGroup ( 2 , new io . netty . util . concurrent . DefaultThreadFactory ( ( ( ConnectionBean . THREAD_NAME ) + "boss<seq2seq4repair_space>-<seq2seq4repair_space>" ) ) ) ; final EventLoopGroup workerGroup = new NioEventLoopGroup ( 2 , new io . netty . util . concurrent . DefaultThreadFactory ( ( ( ConnectionBean . THREAD_NAME ) + "worker-server<seq2seq4repair_space>-<seq2seq4repair_space>" ) ) ) ; ChannelServer cs = new ChannelServer ( bossGroup , workerGroup , c , null , null ) ; final int port = 4000 ; <START_BUG> cs . startupTCP ( new InetSocketAddress ( "127.0.0.1" , port ) , new ChannelServerConfiguration ( ) ) ; <END_BUG> Thread . sleep ( Integer . MAX_VALUE ) ; } @ Test @ Ignore public void testCreatorTCP ( ) throws InterruptedException { } @ Test @ Ignore public void testCreatorUDP ( ) throws InterruptedException { } private static class MyPipeLine implements PipelineFilter { @ Override public Map < String , Pair < EventExecutorGroup , ChannelHandler > > filter ( Map < String , Pair < EventExecutorGroup , ChannelHandler > > channelHandlers , boolean tcp , boolean client ) { } } }

Fix:
cs . startupTCP ( new InetSocketAddress ( "127.0.0.1" , port ) ) ;
Buggy code:
public class ElementModule extends Module { @ Override public String getStatistics ( ) { } public static String ElementTypes ( Document doc ) { } public static String numLinks ( Document doc , String host ) { } public static String numImages ( Document doc ) { Elements images = doc . getElementsByTag ( "img" ) ; <START_BUG> String retVal = ( images . size ( ) ) + "\n" ; <END_BUG> return retVal ; } public static String resList ( Document doc ) { } }

Fix:
String retVal = ( "Number<seq2seq4repair_space>of<seq2seq4repair_space>Images:<seq2seq4repair_space>" + ( images . size ( ) ) ) + "\n" ;
Buggy code:
public class UrlConnectionRetrieveFileTransfer extends AbstractRetrieveFileTransfer { private static final String USERNAME_PREFIX = Messages . UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT ; private static final int HTTP_RANGE_RESPONSE = 206 ; private static final int OK_RESPONSE_CODE = 200 ; private static final String JRE_CONNECT_TIMEOUT_PROPERTY = "sun.net.client.defaultConnectTimeout" ; private static final String DEFAULT_CONNECT_TIMEOUT = "30000" ; private static final String JRE_READ_TIMEOUT_PROPERTY = "sun.net.client.defaultReadTimeout" ; private static final String DEFAULT_READ_TIMEOUT = "30000" ; protected URLConnection urlConnection ; protected int httpVersion = 1 ; protected int responseCode = - 1 ; private String remoteFileName ; protected String responseMessage = null ; private JREProxyHelper proxyHelper = null ; protected String username = null ; protected String password = null ; public UrlConnectionRetrieveFileTransfer ( ) { } public String getRemoteFileName ( ) { } protected void connect ( ) throws IOException { } protected boolean isConnected ( ) { } protected void setResumeRequestHeaderValues ( ) throws IOException { } protected void setRequestHeaderValues ( ) throws InvalidFileRangeSpecificationException { } private void setRangeHeader ( String value ) { } public int getResponseCode ( ) { } private boolean isHTTP ( ) { } private boolean isHTTP11 ( ) { } protected void getResponseHeaderValues ( ) throws IOException { } protected void getResumeResponseHeaderValues ( ) throws IOException { } protected void setupProxy ( final Proxy proxy2 ) { } protected void setupAuthentication ( ) throws IOException , UnsupportedCallbackException { } class UrlConnectionAuthenticator extends Authenticator { protected PasswordAuthentication getPasswordAuthentication ( ) { } } public void setConnectContextForAuthentication ( IConnectContext connectContext ) { } protected void openStreams ( ) throws IncomingFileTransferException { try { setupAuthentication ( ) ; connect ( ) ; setRequestHeaderValues ( ) ; setInputStream ( urlConnection . getInputStream ( ) ) ; getResponseHeaderValues ( ) ; fireReceiveStartEvent ( ) ; } catch ( final Exception e ) { <START_BUG> throw new IncomingFileTransferException ( NLS . bind ( UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT , getRemoteFileURL ( ) . toString ( ) ) , e ) ; <END_BUG> } } protected void hardClose ( ) { } protected boolean doPause ( ) { } protected boolean doResume ( ) { } public Object getAdapter ( Class adapter ) { } private void setupTimeouts ( ) { } private boolean openStreamsForResume ( ) { } }

Fix:
throw new IncomingFileTransferException ( NLS . bind ( UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT , getRemoteFileURL ( ) . toString ( ) ) , e , getResponseCode ( ) ) ;
Buggy code:
public final class BinaryTypeBinding extends ReferenceBinding { private ReferenceBinding superclass ; private ReferenceBinding enclosingType ; private ReferenceBinding [ ] superInterfaces ; private FieldBinding [ ] fields ; private MethodBinding [ ] methods ; private ReferenceBinding [ ] memberTypes ; private LookupEnvironment environment ; public BinaryTypeBinding ( PackageBinding packageBinding , IBinaryType binaryType , LookupEnvironment environment ) { } public FieldBinding [ ] availableFields ( ) { } public MethodBinding [ ] availableMethods ( ) { if ( ( ( modifiers ) & ( AccUnresolved ) ) == 0 ) return methods ; MethodBinding [ ] availableMethods = new MethodBinding [ methods . length ] ; int count = 0 ; for ( int i = 0 ; i < ( methods . length ) ; i ++ ) { try { availableMethods [ count ] = resolveTypesFor ( methods [ i ] ) ; count ++ ; } catch ( AbortCompilation a ) { } } System . arraycopy ( availableMethods , 0 , ( availableMethods = new MethodBinding [ count ] ) , 0 , count ) ; <START_BUG> return methods ; <END_BUG> } void cachePartsFrom ( IBinaryType binaryType , boolean needFieldsAndMethods ) { } private void createFields ( IBinaryField [ ] iFields ) { } private MethodBinding createMethod ( IBinaryMethod method ) { } private void createMethods ( IBinaryMethod [ ] iMethods ) { } public ReferenceBinding enclosingType ( ) { } public FieldBinding [ ] fields ( ) { } public MethodBinding getExactConstructor ( TypeBinding [ ] argumentTypes ) { } public MethodBinding getExactMethod ( char [ ] selector , TypeBinding [ ] argumentTypes ) { } public FieldBinding getField ( char [ ] fieldName ) { } public MethodBinding [ ] getMethods ( char [ ] selector ) { } public ReferenceBinding [ ] memberTypes ( ) { } public MethodBinding [ ] methods ( ) { } private TypeBinding resolveType ( TypeBinding type ) { } private FieldBinding resolveTypeFor ( FieldBinding field ) { } private MethodBinding resolveTypesFor ( MethodBinding method ) { } public ReferenceBinding superclass ( ) { } public ReferenceBinding [ ] superInterfaces ( ) { } public String toString ( ) { } }

Fix:
return availableMethods ;
Buggy code:
public class TldParsingDeploymentProcessor implements DeploymentUnitProcessor { private static final String TLD = ".tld" ; private static final String META_INF = "META-INF" ; private static final String WEB_INF = "WEB-INF" ; private static final String CLASSES = "classes" ; private static final String LIB = "lib" ; private static final String IMPLICIT_TLD = "implicit.tld" ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { if ( ! ( WarDeploymentMarker . isWarDeployment ( phaseContext . getDeploymentUnit ( ) ) ) ) { return ; } <START_BUG> final VirtualFile deploymentRoot = phaseContext . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; <END_BUG> TldsMetaData tldsMetaData = phaseContext . getAttachment ( ATTACHMENT_KEY ) ; if ( tldsMetaData == null ) { tldsMetaData = new TldsMetaData ( ) ; phaseContext . putAttachment ( ATTACHMENT_KEY , tldsMetaData ) ; } Map < String , TldMetaData > tlds = new HashMap < String , TldMetaData > ( ) ; tldsMetaData . setTlds ( tlds ) ; DeploymentStructure structure = phaseContext . getAttachment ( DeploymentStructure . ATTACHMENT_KEY ) ; assert structure != null ; assert ( structure . getEntries ( ) ) != null ; for ( DeploymentStructure . ClassPathEntry resourceRoot : structure . getEntries ( ) ) { if ( resourceRoot . getRoot ( ) . getLowerCaseName ( ) . endsWith ( ".jar" ) ) { VirtualFile webFragment = resourceRoot . getRoot ( ) . getChild ( TldParsingDeploymentProcessor . META_INF ) ; if ( ( webFragment . exists ( ) ) && ( webFragment . isDirectory ( ) ) ) { processTlds ( deploymentRoot , webFragment . getChildren ( ) , tlds ) ; } } } VirtualFile webInf = deploymentRoot . getChild ( TldParsingDeploymentProcessor . WEB_INF ) ; if ( ( webInf . exists ( ) ) && ( webInf . isDirectory ( ) ) ) { for ( VirtualFile file : webInf . getChildren ( ) ) { if ( ( file . isFile ( ) ) && ( file . getName ( ) . endsWith ( TldParsingDeploymentProcessor . TLD ) ) ) { tlds . put ( ( "//" + ( file . getPathNameRelativeTo ( deploymentRoot ) ) ) , parseTLD ( file ) ) ; } else if ( ( ( file . isDirectory ( ) ) && ( ! ( TldParsingDeploymentProcessor . CLASSES . equals ( file . getName ( ) ) ) ) ) && ( ! ( TldParsingDeploymentProcessor . LIB . equals ( file . getName ( ) ) ) ) ) { processTlds ( deploymentRoot , file . getChildren ( ) , tlds ) ; } } } } public void undeploy ( final DeploymentUnit context ) { } private void processTlds ( VirtualFile root , List < VirtualFile > files , Map < String , TldMetaData > tlds ) throws DeploymentUnitProcessingException { } private TldMetaData parseTLD ( VirtualFile tld ) throws DeploymentUnitProcessingException { } }

Fix:
final VirtualFile deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ;
Buggy code:
public class ArgoFileFilter extends FileFilter { public boolean accept ( File f ) { } public String getExtension ( File f ) { } public String getDescription ( ) { <START_BUG> return "Argo<seq2seq4repair_space>v0.4<seq2seq4repair_space>file<seq2seq4repair_space>format" ; <END_BUG> } }

Fix:
return "Argo<seq2seq4repair_space>v0.5<seq2seq4repair_space>file<seq2seq4repair_space>format" ;
Buggy code:
public class RegexpFactory extends RegexpMatcherFactory { public RegexpFactory ( ) { } public Regexp newRegexp ( ) throws BuildException { } public Regexp newRegexp ( Project p ) throws BuildException { String systemDefault = null ; if ( p == null ) { systemDefault = System . getProperty ( "ant.regexp.regexpimpl" ) ; } else { <START_BUG> systemDefault = ( ( String ) ( p . getProperties ( ) . get ( "ant.regexp.regexpimpl" ) ) ) ; <END_BUG> } if ( systemDefault != null ) { return createRegexpInstance ( systemDefault ) ; } try { return createRegexpInstance ( "org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" ) ; } catch ( BuildException be ) { } try { return createRegexpInstance ( "org.apache.tools.ant.util.regexp.JakartaOroRegexp" ) ; } catch ( BuildException be ) { } try { return createRegexpInstance ( "org.apache.tools.ant.util.regexp.JakartaRegexpRegexp" ) ; } catch ( BuildException be ) { } throw new BuildException ( "No<seq2seq4repair_space>supported<seq2seq4repair_space>regular<seq2seq4repair_space>expression<seq2seq4repair_space>matcher<seq2seq4repair_space>found" ) ; } protected Regexp createRegexpInstance ( String classname ) throws BuildException { } }

Fix:
systemDefault = p . getProperty ( "ant.regexp.regexpimpl" ) ;
Buggy code:
public class MembershipCleanerVerbHandler implements IVerbHandler { private static Logger logger_ = Logger . getLogger ( MembershipCleanerVerbHandler . class ) ; public void doVerb ( Message message ) { <START_BUG> byte [ ] body = ( ( byte [ ] ) ( message . getMessageBody ( ) [ 0 ] ) ) ; <END_BUG> try { DataInputBuffer bufIn = new DataInputBuffer ( ) ; bufIn . reset ( body , body . length ) ; MembershipCleaner . MembershipCleanerMessage mcMessage = MembershipCleanerMessage . serializer ( ) . deserialize ( bufIn ) ; String target = mcMessage . getTarget ( ) ; MembershipCleanerVerbHandler . logger_ . info ( ( ( "Removing<seq2seq4repair_space>the<seq2seq4repair_space>node<seq2seq4repair_space>[" + target ) + "]<seq2seq4repair_space>from<seq2seq4repair_space>membership" ) ) ; EndPoint targetEndPoint = new EndPoint ( target , DatabaseDescriptor . getControlPort ( ) ) ; StorageService . instance ( ) . removeTokenState ( targetEndPoint ) ; Map < String , byte [ ] > headers = message . getHeaders ( ) ; headers . remove ( StorageService . getLocalStorageEndPoint ( ) . getHost ( ) ) ; MembershipCleanerVerbHandler . logger_ . debug ( ( "Number<seq2seq4repair_space>of<seq2seq4repair_space>nodes<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>header<seq2seq4repair_space>" + ( headers . size ( ) ) ) ) ; Set < String > nodes = headers . keySet ( ) ; for ( String node : nodes ) { MembershipCleanerVerbHandler . logger_ . debug ( ( "Processing<seq2seq4repair_space>node<seq2seq4repair_space>" + node ) ) ; byte [ ] bytes = headers . remove ( node ) ; EndPoint targetNode = new EndPoint ( node , DatabaseDescriptor . getStoragePort ( ) ) ; MembershipCleanerVerbHandler . logger_ . debug ( ( "Sending<seq2seq4repair_space>a<seq2seq4repair_space>membership<seq2seq4repair_space>clean<seq2seq4repair_space>message<seq2seq4repair_space>to<seq2seq4repair_space>" + targetNode ) ) ; MessagingService . getMessagingInstance ( ) . sendOneWay ( message , targetNode ) ; break ; } } catch ( IOException ex ) { MembershipCleanerVerbHandler . logger_ . debug ( LogUtil . throwableToString ( ex ) ) ; } } }

Fix:
byte [ ] body = message . getMessageBody ( ) ;
Buggy code:
public class ModClusterAddCustomMetric implements OperationStepHandler { static final ModClusterAddCustomMetric INSTANCE = new ModClusterAddCustomMetric ( ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { PathAddress opAddress = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; PathAddress parent = opAddress . append ( DYNAMIC_LOAD_PROVIDER ) ; String name = CLASS . resolveModelAttribute ( context , operation ) . asString ( ) ; ModelNode targetOperation = Util . createAddOperation ( parent . append ( PathElement . pathElement ( CUSTOM_LOAD_METRIC . getKey ( ) , name ) ) ) ; <START_BUG> for ( AttributeDefinition def : LoadMetricDefinition . ATTRIBUTES ) { <END_BUG> def . validateAndSet ( operation , targetOperation ) ; } context . addStep ( targetOperation , CustomLoadMetricAdd . INSTANCE , IMMEDIATE ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } }

Fix:
for ( AttributeDefinition def : CustomLoadMetricDefinition . ATTRIBUTES ) {
Buggy code:
public class ShoppingPlanDP { int numShops ; int items ; double gasPrice ; HashMap < Integer , HashMap < Integer , Double > > distance = new HashMap < Integer , HashMap < Integer , Double > > ( ) ; HashMap < String , Integer > itemMap = new HashMap < String , Integer > ( ) ; private int perishableMask = 0 ; List < ShoppingPlanDP . Shop > shops = new ArrayList < ShoppingPlanDP . Shop > ( ) ; int getBit ( int n , int k ) { } public void addItems ( String items ) { } public void addShop ( String shop ) { } private boolean checkForItem ( int itemSet , int item ) { } public void computeDistanceMatrix ( ) { } private int getNewItems ( int currentSet , int target ) { } private List < Integer > generateItemsSubSet ( List < Integer > itemsToBuy ) { } private double cost ( ShoppingPlanDP . Shop s , int items ) { } private boolean perishableLoad ( int items ) { } private double [ ] [ ] buildMatrix ( ) { } public double visit ( ) { double [ ] [ ] stateMatrix = buildMatrix ( ) ; for ( int sol = 0 ; sol < ( stateMatrix [ 0 ] . length ) ; sol ++ ) { for ( int i = 1 ; i < ( numShops ) ; i ++ ) { ShoppingPlanDP . Shop s = shops . get ( i ) ; int allNewItems = getNewItems ( sol , s . items ) ; List < Integer > pi = new ArrayList < Integer > ( ) ; for ( int bi = 0 ; bi < ( items ) ; bi ++ ) if ( checkForItem ( allNewItems , bi ) ) pi . add ( bi ) ; List < Integer > allPoss = generateItemsSubSet ( pi ) ; for ( int load : allPoss ) { <START_BUG> int nextLoad = sol | ( allPoss . get ( load ) ) ; <END_BUG> int newItems = getNewItems ( sol , nextLoad ) ; boolean perishable = perishableLoad ( newItems ) ; double cost = cost ( s , newItems ) ; if ( perishable ) { computeCostsForPerishable ( nextLoad , s , stateMatrix , stateMatrix [ i ] [ sol ] , cost ) ; } else { for ( int k = 0 ; k < ( numShops ) ; k ++ ) { double currCost = ( cost + ( ( getDistance ( shops . get ( k ) . id , s . id ) ) * ( gasPrice ) ) ) + ( stateMatrix [ i ] [ sol ] ) ; stateMatrix [ k ] [ nextLoad ] = Math . min ( currCost , stateMatrix [ k ] [ nextLoad ] ) ; } } } } } return stateMatrix [ 0 ] [ ( ( stateMatrix [ 0 ] . length ) - 1 ) ] ; } private double getDistance ( int x , int y ) { } private void computeCostsForPerishable ( int nextLoad , ShoppingPlanDP . Shop s , double [ ] [ ] stateMatrix , double currentCost , double newItemsCost ) { } private Double computeDistance ( ShoppingPlanDP . Shop currShop , ShoppingPlanDP . Shop shop ) { } public String toString ( ) { } class Shop { int id ; int x ; int y ; int items ; HashMap < Integer , Integer > prices = new HashMap < Integer , Integer > ( ) ; public String toString ( ) { } } public static void main ( String [ ] args ) throws IOException { } private static ShoppingPlanDP createShoppingPlan ( String items , String shops , String gasPrice ) { } private void addStart ( ) { } }

Fix:
int nextLoad = sol | load ;
Buggy code:
public class Localizer { private static final Log log = LogFactory . getLog ( Localizer . class ) ; private Application application ; public Localizer ( final Application application ) { } public String getString ( final String key , final Component component ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final Component component , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model , final Locale locale , final String style , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final String path , final List searchStack , final Locale locale , final String style ) throws MissingResourceException { } private List < Class > getComponentStack ( final Component component ) { } private String substitutePropertyExpressions ( final Component component , final String string , final IModel model ) { if ( ( string != null ) && ( model != null ) ) { <START_BUG> return PropertyVariableInterpolator . interpolate ( string , model . getObject ( component ) ) ; <END_BUG> } return string ; } private String visitResourceLoaders ( final String key , final String path , final List searchStack , final Locale locale , final String style ) { } }

Fix:
return PropertyVariableInterpolator . interpolate ( string , model . getObject ( ) ) ;
Buggy code:
public class HealthPack extends Weapon { public HealthPack ( ) { } public Projectile [ ] fire ( Player player ) { } @ Override public int reload ( int bullets ) { } public BufferedImage getHUDImage ( ) { <START_BUG> return this . imageFromFile ( "m4HUD.png" ) ; <END_BUG> } }

Fix:
return this . imageFromFile ( "healthHUD.png" ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class JPA2LCTestCase { private static final String ARCHIVE_NAME = "jpa_SecondLevelCacheTestCase" ; private static String CACHE_REGION_NAME = null ; @ Deployment public static Archive < ? > deploy ( ) { } @ ArquillianResource private InitialContext iniCtx ; protected < T > T lookup ( String beanName , Class < T > interfaceType ) throws NamingException { } protected < T > T rawLookup ( String name , Class < T > interfaceType ) throws NamingException { } public String getCacheRegionName ( ) throws Exception { } @ Test public void testMultipleNonTXTransactionalEntityManagerInvocations ( ) throws Exception { } @ Test public void testDisabledCache ( ) throws Exception { } @ Test public void testEntityCacheSameSession ( ) throws Exception { } @ Test public void testEntityCacheSecondSession ( ) throws Exception { } @ Test @ Ignore public void testEvictEntityCache ( ) throws Exception { } @ Test public void testSameQueryTwice ( ) throws Exception { } @ Test public void testInvalidateQuery ( ) throws Exception { } @ Test @ Ignore public void testEvictQueryCache ( ) throws Exception { SFSB2LC sfsb = lookup ( "SFSB2LC" , SFSB2LC . class ) ; String id = "3" ; String message = sfsb . queryCacheCheck ( id ) ; if ( ! ( message . equals ( "OK" ) ) ) { fail ( message ) ; } sfsb . evictQueryCache ( ) ; <START_BUG> message = sfsb . queryCacheCheck ( id ) ; <END_BUG> if ( ! ( message . equals ( "OK" ) ) ) { fail ( message ) ; } } }

Fix:
message = sfsb . queryCacheCheckIfEmpty ( id ) ;
Buggy code:
public class CacheReadAttributeHandler implements OperationStepHandler { public static final CacheReadAttributeHandler INSTANCE = new CacheReadAttributeHandler ( ) ; private final ParametersValidator nameValidator = new ParametersValidator ( ) ; private CacheReadAttributeHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> nameValidator . validate ( operation ) ; <END_BUG> final String attributeName = operation . require ( ModelDescriptionConstants . NAME ) . asString ( ) ; final ModelNode submodel = context . readResource ( EMPTY_ADDRESS ) . getModel ( ) ; final ModelNode currentValue = submodel . get ( attributeName ) . clone ( ) ; context . getResult ( ) . set ( currentValue ) ; context . stepCompleted ( ) ; } }

Fix:
this . nameValidator . validate ( operation ) ;
Buggy code:
public abstract class PledariWebviewParser extends Parser { WebView wv ; TextView label ; public PledariWebviewParser ( MainActivity a ) { } @ Override public void parseResult ( String result , Searcher s ) { wv . setVisibility ( GONE ) ; label . setVisibility ( GONE ) ; if ( ( s . results_found ) && ( ! ( s . results_not_found ) ) ) { wv . setVisibility ( VISIBLE ) ; label . setVisibility ( VISIBLE ) ; <START_BUG> wv . loadDataWithBaseURL ( s . searchUrl , result , "text//html;<seq2seq4repair_space>chartset=iso-8859-1" , "iso-8859-1" , null ) ; <END_BUG> } } }

Fix:
wv . loadData ( result , "text//html;<seq2seq4repair_space>charset=iso-8859-1" , "iso-8859-1" ) ;
Buggy code:
public class Mkdir extends Task { private File dir ; public void execute ( ) throws BuildException { if ( ( dir ) == null ) { throw new BuildException ( "dir<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" , location ) ; } if ( dir . isFile ( ) ) { throw new BuildException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>directory<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>file<seq2seq4repair_space>already<seq2seq4repair_space>exists<seq2seq4repair_space>with<seq2seq4repair_space>that<seq2seq4repair_space>name:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; } if ( ! ( dir . exists ( ) ) ) { boolean result = dir . mkdirs ( ) ; <START_BUG> if ( result == false ) { <END_BUG> String msg = ( ( "Directory<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>creation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>" ) + "successful<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>unknown<seq2seq4repair_space>reason" ; throw new BuildException ( msg , location ) ; } log ( ( "Created<seq2seq4repair_space>dir:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; } } public void setDir ( File dir ) { } }

Fix:
if ( ! result ) {
Buggy code:
public class DBUtility { private static Connection connection = null ; public static Connection getConnection ( ) { if ( ( DBUtility . connection ) != null ) { return DBUtility . connection ; } else { try { String url = "jdbc:mysql:////localhost:3306//" ; String dbName = "my_elective" ; String driver = "com.mysql.jdbc.Driver" ; String userName = "root" ; <START_BUG> String password = "root" ; <END_BUG> Class . forName ( driver ) . newInstance ( ) ; DBUtility . connection = DriverManager . getConnection ( ( url + dbName ) , userName , password ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return DBUtility . connection ; } } }

Fix:
String password = "yA540004" ;
Buggy code:
public final class UnmodifiableQueue < E > extends AbstractQueueDecorator < E > implements Serializable , Unmodifiable { private static final long serialVersionUID = 1832948656215393357L ; public static < E > Queue < E > unmodifiableQueue ( final Queue < E > queue ) { } private UnmodifiableQueue ( final Queue < E > queue ) { } private void writeObject ( final ObjectOutputStream out ) throws IOException { } @ SuppressWarnings ( "unchecked" ) private void readObject ( final ObjectInputStream in ) throws IOException , ClassNotFoundException { } @ Override public Iterator < E > iterator ( ) { } @ Override public boolean add ( final Object object ) { } @ Override public boolean addAll ( final Collection < ? extends E > coll ) { } @ Override public void clear ( ) { } @ Override public boolean remove ( final Object object ) { } @ Override public boolean removeAll ( final Collection < ? > coll ) { } @ Override public boolean retainAll ( final Collection < ? > coll ) { } @ Override <START_BUG> public boolean offer ( E obj ) { <END_BUG> throw new UnsupportedOperationException ( ) ; } @ Override public E poll ( ) { } @ Override public E remove ( ) { } }

Fix:
public boolean offer ( final E obj ) {
Buggy code:
public class AjaxIndicatorAppender extends Behavior { private Component component ; private static final long serialVersionUID = 1L ; public AjaxIndicatorAppender ( ) { } @ Override public void renderHead ( Component component , IHeaderResponse response ) { if ( ( AjaxRequestTarget . get ( ) ) != null ) { final String javascript = ( "var<seq2seq4repair_space>e<seq2seq4repair_space>=<seq2seq4repair_space>Wicket.$('" + ( getMarkupId ( ) ) ) + "');<seq2seq4repair_space>if<seq2seq4repair_space>(e<seq2seq4repair_space>!=<seq2seq4repair_space>null<seq2seq4repair_space>&&<seq2seq4repair_space>typeof(e.parentNode)<seq2seq4repair_space>!=<seq2seq4repair_space>'undefined')<seq2seq4repair_space>e.parentNode.removeChild(e);" ; <START_BUG> response . renderJavascript ( javascript , null ) ; <END_BUG> } } @ Override public void afterRender ( Component component ) { } protected CharSequence getIndicatorUrl ( ) { } protected String getSpanClass ( ) { } public String getMarkupId ( ) { } @ Override public final void bind ( Component component ) { } }

Fix:
response . renderJavaScript ( javascript , null ) ;
Buggy code:
public class MemoryMXBeanGCHandler implements OperationStepHandler , DescriptionProvider { public static final MemoryMXBeanGCHandler INSTANCE = new MemoryMXBeanGCHandler ( ) ; private MemoryMXBeanGCHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ManagementFactory . getMemoryMXBean ( ) . gc ( ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class Test02 { public static void main ( String [ ] args ) { final JFrame mainFrame = new JFrame ( ) ; PlaylistFileTxtInterpreter stringInterpreter = new PlaylistFileTxtInterpreter ( ) ; final VideoManager videoManager = new VideoManager ( mainFrame , new VideoPlayer ( ) ) ; PlaylistManager playlistManager = new PlaylistManager ( stringInterpreter ) ; mainFrame . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; mainFrame . setSize ( 640 , 480 ) ; <START_BUG> mainFrame . setResizable ( false ) ; <END_BUG> MediaPlayerMenuBar mediaPlayerMenuBar = new MediaPlayerMenuBar ( videoManager , playlistManager ) ; mainFrame . setJMenuBar ( mediaPlayerMenuBar . createMenuBar ( mainFrame ) ) ; mainFrame . setVisible ( true ) ; } No newline ; at end ; of file ; }

Fix:
mainFrame . setResizable ( true ) ;
Buggy code:
public abstract class AbstractAutoCompleteBehavior extends AbstractAjaxBehavior { private static final PackageResourceReference AUTOCOMPLETE_JS = new PackageResourceReference ( AutoCompleteBehavior . class , "wicket-autocomplete.js" ) ; private static final PackageResourceReference AJAX_JS = new PackageResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax.js" ) ; private static final long serialVersionUID = 1L ; protected String getImplementationId ( ) { <START_BUG> return "wicket-default" ; <END_BUG> } protected void onBind ( ) { } protected void onRenderHeadInitContribution ( Response response ) { } protected void onComponentRendered ( ) { } public final void onRequest ( ) { } protected abstract void onRequest ( String input , RequestCycle requestCycle ) { } }

Fix:
return "wicket-default-autocomplete" ;
Buggy code:
public class NeptusConsoleAdapter implements ConsoleAdapter { private ConsoleLayout console ; public NeptusConsoleAdapter ( ConsoleLayout console ) { } @ Override public void registerToEventBus ( Object obj ) { } @ Override public void post ( Object event ) { } @ Override public boolean sendMessage ( String dest , IMCMessage msg ) { } @ Override public Future < SendResult > sendMessageReliably ( String dest , IMCMessage message ) { } @ Override public Map < String , ConsoleSystem > getSystems ( ) { } @ Override public MapGroup getMapGroup ( ) { <START_BUG> return console . getMission ( ) . generateMapGroup ( ) ; <END_BUG> } @ Override public MissionType getMission ( ) { } @ Override public AbstractElement [ ] getMapObstacles ( ) { } }

Fix:
return MapGroup . getMapGroupInstance ( console . getMission ( ) ) ;