nus-yam/ex-repair huggingface dataset:
Buggy code:
public class RepairCallback < T > implements IAsyncCallback { private final IResponseResolver < T > resolver ; private final List < InetAddress > endpoints ; private final SimpleCondition condition = new SimpleCondition ( ) ; private final long startTime ; public RepairCallback ( IResponseResolver < T > resolver , List < InetAddress > endpoints ) { } public T get ( ) throws IOException , TimeoutException , DigestMismatchException { long timeout = ( DatabaseDescriptor . getRpcTimeout ( ) ) - ( ( System . currentTimeMillis ( ) ) - ( startTime ) ) ; try { condition . await ( timeout , TimeUnit . MILLISECONDS ) ; } catch ( InterruptedException ex ) { throw new AssertionError ( ex ) ; } <START_BUG> return resolver . isDataPresent ( ) ? resolver . resolve ( ) : null ; <END_BUG> } public void response ( Message message ) { } public boolean isLatencyForSnitch ( ) { } }

Fix:
return ( resolver . getMessageCount ( ) ) > 0 ? resolver . resolve ( ) : null ;
Buggy code:
public class Activator implements BundleActivator { public static final String PLUGIN_ID = "org.eclipse.ecf.osgi.services.remoteserviceadmin" ; private static BundleContext context ; private static Activator instance ; public static BundleContext getContext ( ) { } public static Activator getDefault ( ) { } private ServiceRegistration remoteServiceAdminRegistration ; private EndpointDescriptionLocator endpointDescriptionLocator ; private EndpointDescriptionAdvertiser endpointDescriptionAdvertiser ; private ServiceRegistration endpointDescriptionAdvertiserRegistration ; private ServiceTracker containerManagerTracker ; private ServiceTracker logServiceTracker = null ; private LogService logService = null ; private Object logServiceTrackerLock = new Object ( ) ; private Object saxParserFactoryTrackerLock = new Object ( ) ; private ServiceTracker saxParserFactoryTracker ; private static final String RSA_PROXY_BUNDLE_SYMBOLIC_ID = "org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy" ; private BundleContext proxyServiceFactoryBundleContext ; private void initializeProxyServiceFactoryBundle ( ) throws Exception { for ( Bundle b : Activator . context . getBundles ( ) ) { <START_BUG> if ( b . getSymbolicName ( ) . equals ( Activator . RSA_PROXY_BUNDLE_SYMBOLIC_ID ) ) { <END_BUG> b . start ( ) ; proxyServiceFactoryBundleContext = b . getBundleContext ( ) ; } } if ( ( proxyServiceFactoryBundleContext ) == null ) throw new IllegalStateException ( ( ( "RSA<seq2seq4repair_space>Proxy<seq2seq4repair_space>bundle<seq2seq4repair_space>(symbolic<seq2seq4repair_space>id=='" + ( Activator . RSA_PROXY_BUNDLE_SYMBOLIC_ID ) ) + "')<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>found,<seq2seq4repair_space>so<seq2seq4repair_space>RSA<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>started" ) ) ; } private void stopProxyServiceFactoryBundle ( ) { } public BundleContext getProxyServiceFactoryBundleContext ( ) { } public void start ( BundleContext bundleContext ) throws Exception { } public void stop ( BundleContext bundleContext ) throws Exception { } public boolean isOldEquinox ( ) { } public String getFrameworkUUID ( ) { } public SAXParserFactory getSAXParserFactory ( ) { } public LogService getLogService ( ) { } public void log ( IStatus status ) { } public void log ( ServiceReference sr , IStatus status ) { } public void log ( ServiceReference sr , int level , String message , Throwable t ) { } public IContainerManager getContainerManager ( ) { } }

Fix:
if ( Activator . RSA_PROXY_BUNDLE_SYMBOLIC_ID . equals ( b . getSymbolicName ( ) ) ) {
Buggy code:
public class CliOptions { private static Options options = null ; private CommandLine cmd = null ; private static final String HOST_OPTION = "host" ; private static final String PORT_OPTION = "port" ; private static final int DEFAULT_THRIFT_PORT = 9160 ; private static void printUsage ( ) { System . err . println ( "" ) ; <START_BUG> System . err . println ( "Usage:<seq2seq4repair_space>cascli<seq2seq4repair_space>--host<seq2seq4repair_space>hostname<seq2seq4repair_space>[--port<seq2seq4repair_space><portname>]" ) ; <END_BUG> System . err . println ( "" ) ; } public void processArgs ( CliSessionState css , String [ ] args ) { } }

Fix:
System . err . println ( "Usage:<seq2seq4repair_space>cassandra-cli<seq2seq4repair_space>--host<seq2seq4repair_space>hostname<seq2seq4repair_space>[--port<seq2seq4repair_space><portname>]" ) ;
Buggy code:
public class DateSelector extends BaseExtendSelector { private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private long millis = - 1 ; private String dateTime = null ; private boolean includeDirs = false ; private long granularity = 0 ; private String pattern ; private TimeComparison when = TimeComparison . EQUAL ; public static final String MILLIS_KEY = "millis" ; public static final String DATETIME_KEY = "datetime" ; public static final String CHECKDIRS_KEY = "checkdirs" ; public static final String GRANULARITY_KEY = "granularity" ; public static final String WHEN_KEY = "when" ; public static final String PATTERN_KEY = "pattern" ; public DateSelector ( ) { } public String toString ( ) { <START_BUG> StringBuffer buf = new StringBuffer ( "{dateselector<seq2seq4repair_space>date:<seq2seq4repair_space>" ) ; <END_BUG> buf . append ( dateTime ) ; buf . append ( "<seq2seq4repair_space>compare:<seq2seq4repair_space>" ) . append ( when . getValue ( ) ) ; buf . append ( "<seq2seq4repair_space>granularity:<seq2seq4repair_space>" ) ; buf . append ( granularity ) ; if ( ( pattern ) != null ) { buf . append ( "<seq2seq4repair_space>pattern:<seq2seq4repair_space>" ) . append ( pattern ) ; } buf . append ( "}" ) ; return buf . toString ( ) ; } public void setMillis ( long millis ) { } public long getMillis ( ) { } public void setDatetime ( String dateTime ) { } public void setCheckdirs ( boolean includeDirs ) { } public void setGranularity ( int granularity ) { } public void setWhen ( DateSelector . TimeComparisons tcmp ) { } public void setWhen ( TimeComparison t ) { } public void setPattern ( String pattern ) { } public void setParameters ( Parameter [ ] parameters ) { } public void verifySettings ( ) { } public boolean isSelected ( File basedir , String filename , File file ) { } public static class TimeComparisons extends TimeComparison { } }

Fix:
StringBuilder buf = new StringBuilder ( "{dateselector<seq2seq4repair_space>date:<seq2seq4repair_space>" ) ;
Buggy code:
public class MessageMethodArgumentResolver implements HandlerMethodArgumentResolver { @ Override public boolean supportsParameter ( MethodParameter parameter ) { } @ Override public Object resolveArgument ( MethodParameter parameter , Message < ? > message ) throws Exception { Class < ? > paramType = parameter . getParameterType ( ) ; if ( ! ( paramType . isAssignableFrom ( message . getClass ( ) ) ) ) { throw new MethodArgumentTypeMismatchException ( message , parameter , ( ( ( ( ( "The<seq2seq4repair_space>actual<seq2seq4repair_space>message<seq2seq4repair_space>type<seq2seq4repair_space>[" + ( message . getClass ( ) . getName ( ) ) ) + "]<seq2seq4repair_space>" ) + "does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>the<seq2seq4repair_space>expected<seq2seq4repair_space>type<seq2seq4repair_space>[" ) + ( paramType . getName ( ) ) ) + "]" ) ) ; } Class < ? > expectedPayloadType = getPayloadType ( parameter ) ; Object payload = message . getPayload ( ) ; if ( ( expectedPayloadType != null ) && ( ! ( expectedPayloadType . isInstance ( payload ) ) ) ) { <START_BUG> throw new MethodArgumentTypeMismatchException ( message , parameter , ( ( ( ( "The<seq2seq4repair_space>expected<seq2seq4repair_space>Message<?><seq2seq4repair_space>payload<seq2seq4repair_space>type<seq2seq4repair_space>[" + ( expectedPayloadType . getClass ( ) . getName ( ) ) ) + "]<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>the<seq2seq4repair_space>actual<seq2seq4repair_space>payload<seq2seq4repair_space>type<seq2seq4repair_space>[" ) + ( payload . getClass ( ) . getName ( ) ) ) + "]" ) ) ; <END_BUG> } return message ; } private Class < ? > getPayloadType ( MethodParameter parameter ) { } }

Fix:
throw new MethodArgumentTypeMismatchException ( message , parameter , ( ( ( ( "The<seq2seq4repair_space>expected<seq2seq4repair_space>Message<?><seq2seq4repair_space>payload<seq2seq4repair_space>type<seq2seq4repair_space>[" + ( expectedPayloadType . getName ( ) ) ) + "]<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>the<seq2seq4repair_space>actual<seq2seq4repair_space>payload<seq2seq4repair_space>type<seq2seq4repair_space>[" ) + ( payload . getClass ( ) . getName ( ) ) ) + "]" ) ) ;
Buggy code:
public class EsQueryVistor implements QueryVisitor { private static final Logger logger = LoggerFactory . getLogger ( EsQueryVistor . class ) ; private final Stack < QueryBuilder > queryBuilders = new Stack < > ( ) ; private final Stack < FilterBuilder > filterBuilders = new Stack < > ( ) ; private final GeoSortFields geoSortFields = new GeoSortFields ( ) ; @ Override public void visit ( AndOperand op ) throws IndexException { } @ Override public void visit ( OrOperand op ) throws IndexException { } @ Override public void visit ( NotOperand op ) throws IndexException { } @ Override public void visit ( ContainsOperand op ) throws NoFullTextIndexException { } @ Override public void visit ( WithinOperand op ) { } @ Override public void visit ( LessThan op ) throws NoIndexException { } @ Override public void visit ( LessThanEqual op ) throws NoIndexException { } @ Override public void visit ( Equal op ) throws NoIndexException { final String name = op . getProperty ( ) . getValue ( ) . toLowerCase ( ) ; final Object value = op . getLiteral ( ) . getValue ( ) ; if ( value instanceof String ) { final String svalue = ( ( String ) ( value ) ) ; final NestedQueryBuilder qb ; if ( ( svalue . indexOf ( "*" ) ) != ( - 1 ) ) { final WildcardQueryBuilder wildcardQuery = QueryBuilders . wildcardQuery ( FIELD_STRING_NESTED , svalue . toLowerCase ( ) ) ; queryBuilders . push ( fieldNameTerm ( name , wildcardQuery ) ) ; filterBuilders . push ( INSTANCE ) ; return ; } <START_BUG> final TermFilterBuilder termFilter = FilterBuilders . termFilter ( FIELD_STRING_EQUALS_NESTED , svalue . toLowerCase ( ) ) ; <END_BUG> queryBuilders . push ( NoOpQueryBuilder . INSTANCE ) ; filterBuilders . push ( fieldNameTerm ( name , termFilter ) ) ; return ; } final TermFilterBuilder termQuery = FilterBuilders . termFilter ( getFieldNameForType ( value ) , sanitize ( value ) ) ; filterBuilders . push ( fieldNameTerm ( name , termQuery ) ) ; queryBuilders . push ( NoOpQueryBuilder . INSTANCE ) ; } @ Override public void visit ( GreaterThan op ) throws NoIndexException { } @ Override public void visit ( GreaterThanEqual op ) throws NoIndexException { } @ Override public Optional < FilterBuilder > getFilterBuilder ( ) { } @ Override public Optional < QueryBuilder > getQueryBuilder ( ) { } @ Override public GeoSortFields getGeoSorts ( ) { } private NestedQueryBuilder fieldNameTerm ( final String fieldName , final QueryBuilder fieldValueQuery ) { } private NestedFilterBuilder fieldNameTerm ( final String fieldName , final FilterBuilder fieldValueBuilder ) { } private String getFieldNameForType ( final Object object ) { } private Object sanitize ( final Object input ) { } private boolean use ( final QueryBuilder queryBuilder ) { } private boolean use ( final FilterBuilder filterBuilder ) { } }

Fix:
final TermFilterBuilder termFilter = FilterBuilders . termFilter ( FIELD_STRING_NESTED_UNANALYZED , svalue . toLowerCase ( ) ) ;
Buggy code:
public class AboutPluginsDialog extends ProductInfoDialog { private static final int TABLE_HEIGHT = 200 ; private static final IPath baseNLPath = new Path ( "$nl$" ) ; private static final String PLUGININFO = "about.html" ; private static final int MORE_ID = ( IDialogConstants . CLIENT_ID ) + 1 ; private Table vendorInfo ; private Button moreInfo ; private String title ; private String message ; private String helpContextId ; private String [ ] columnTitles = new String [ ] { WorkbenchMessages . AboutPluginsDialog_provider , WorkbenchMessages . AboutPluginsDialog_pluginName , WorkbenchMessages . AboutPluginsDialog_version , WorkbenchMessages . AboutPluginsDialog_pluginId } ; private String productName ; private AboutBundleData [ ] bundleInfos ; private int lastColumnChosen = 0 ; private boolean reverseSort = false ; private AboutBundleData lastSelection = null ; public AboutPluginsDialog ( Shell parentShell , String productName ) { } public AboutPluginsDialog ( Shell parentShell , String productName , Bundle [ ] bundles , String title , String message , String helpContextId ) { } protected void buttonPressed ( int buttonId ) { } protected void configureShell ( Shell newShell ) { } protected void createButtonsForButtonBar ( Composite parent ) { } protected Control createDialogArea ( Composite parent ) { } protected void createTable ( Composite parent ) { } private boolean selectionHasInfo ( ) { } private boolean tableHasSelection ( ) { } protected void handleMoreInfoPressed ( ) { } private void sort ( int column ) { } private void refreshTable ( int col ) { } private static String [ ] createRow ( AboutBundleData info ) { } private URL getMoreInfoURL ( AboutBundleData bundleInfo , boolean makeLocal ) { Bundle bundle = Platform . getBundle ( bundleInfo . getId ( ) ) ; if ( bundle == null ) return null ; URL aboutUrl = Platform . find ( bundle , AboutPluginsDialog . baseNLPath . append ( AboutPluginsDialog . PLUGININFO ) , null ) ; if ( ! makeLocal ) { return aboutUrl ; } if ( aboutUrl != null ) { try { URL result = Platform . asLocalURL ( aboutUrl ) ; try { <START_BUG> URL about = new URL ( aboutUrl , "about" ) ; <END_BUG> if ( about != null ) Platform . asLocalURL ( about ) ; } catch ( IOException e ) { } return result ; } catch ( IOException e ) { } } return null ; } }

Fix:
URL about = new URL ( aboutUrl , "about_files" ) ;
Buggy code:
public class QSTileView extends ViewGroup { private static final Typeface CONDENSED = Typeface . create ( "sans-serif-condensed" , NORMAL ) ; protected final Context mContext ; private final View mIcon ; private final View mDivider ; private final QSTileView . H mHandler = new QSTileView . H ( ) ; private final int mIconSizePx ; private final int mTileSpacingPx ; private int mTilePaddingTopPx ; private final int mTilePaddingBelowIconPx ; private final int mDualTileVerticalPaddingPx ; private final View mTopBackgroundView ; private TextView mLabel ; private QSDualTileLabel mDualLabel ; private int mLabelColor ; private int mIconColor ; private boolean mDual ; private OnClickListener mClickPrimary ; private OnClickListener mClickSecondary ; private OnLongClickListener mClickLong ; private RippleDrawable mRipple ; public QSTileView ( Context context ) { } private void updateTopPadding ( ) { } @ Override protected void onConfigurationChanged ( Configuration newConfig ) { } private void recreateLabel ( ) { } public void setDual ( boolean dual ) { } protected void updateColors ( ) { final ContentResolver resolver = mContext . getContentResolver ( ) ; mLabelColor = System . getInt ( resolver , QS_TEXT_COLOR , - 1 ) ; <START_BUG> mIconColor = System . getInt ( resolver , QS_ICON_COLOR , - 16738680 ) ; <END_BUG> } public void setLabelColor ( ) { } public void setIconColor ( ) { } protected int getIconColor ( ) { } private void setRipple ( RippleDrawable tileBackground ) { } public void init ( OnClickListener clickPrimary , OnClickListener clickSecondary , OnLongClickListener clickLong ) { } protected View createIcon ( ) { } private Drawable getTileBackground ( ) { } private View labelView ( ) { } @ Override protected void onMeasure ( int widthMeasureSpec , int heightMeasureSpec ) { } private static int exactly ( int size ) { } @ Override protected void onLayout ( boolean changed , int l , int t , int r , int b ) { } private void updateRippleSize ( int width , int height ) { } private static void layout ( View child , int left , int top ) { } protected void handleStateChanged ( QSTile . State state ) { } public void onStateChanged ( QSTile . State state ) { } private class H extends Handler { private static final int STATE_CHANGED = 1 ; public H ( ) { } @ Override public void handleMessage ( Message msg ) { } } }

Fix:
mIconColor = System . getInt ( resolver , QS_ICON_COLOR , - 1 ) ;
Buggy code:
public class Api { public static void main ( String [ ] args ) { Spark . setPort ( 9090 ) ; Spark . get ( new Route ( "//files" ) { @ Override public Object handle ( Request request , Response response ) { return "get<seq2seq4repair_space>file" ; } } ) ; Spark . post ( new Route ( "//files" ) { @ Override public Object handle ( Request request , Response response ) { return "post<seq2seq4repair_space>file" ; } } ) ; Spark . delete ( new Route ( "//files" ) { @ Override public Object handle ( Request request , Response response ) { return "delete<seq2seq4repair_space>file" ; } } ) ; Spark . put ( new Route ( "//files" ) { @ Override public Object handle ( Request request , Response response ) { return "put<seq2seq4repair_space>file" ; } } ) ; Spark . post ( new Route ( "//users" ) { @ Override public Object handle ( Request request , Response response ) { <START_BUG> new UserController ( ) . createUser ( "Laban" , "Labansson" ) ; <END_BUG> return "User<seq2seq4repair_space>created" ; } } ) ; Spark . get ( new Route ( "//users" ) { @ Override public Object handle ( Request request , Response response ) { return "Get<seq2seq4repair_space>user" ; } } ) ; Spark . delete ( new Route ( "//users" ) { @ Override public Object handle ( Request request , Response response ) { return "Delete<seq2seq4repair_space>user" ; } } ) ; Spark . post ( new Route ( "//groups" ) { @ Override public Object handle ( Request request , Response response ) { return null ; } } ) ; Spark . get ( new Route ( "//groups" ) { @ Override public Object handle ( Request request , Response response ) { return null ; } } ) ; Spark . delete ( new Route ( "//groups" ) { @ Override public Object handle ( Request request , Response response ) { return null ; } } ) ; Spark . get ( new Route ( "//login" ) { @ Override public Object handle ( Request request , Response response ) { return null ; } } ) ; } }

Fix:
new UserController ( ) . createUser ( "Laban" , "Labansson" , "id" , "email@email.email" , "password" ) ;
Buggy code:
public class BatchRemoveLineHandler extends CommandHandlerWithHelp { public BatchRemoveLineHandler ( ) { } @ Override public boolean isAvailable ( CommandContext ctx ) { } @ Override protected void doHandle ( CommandContext ctx ) { BatchManager batchManager = ctx . getBatchManager ( ) ; if ( ! ( batchManager . isBatchActive ( ) ) ) { ctx . printLine ( "No<seq2seq4repair_space>active<seq2seq4repair_space>batch." ) ; return ; } Batch batch = batchManager . getActiveBatch ( ) ; final int batchSize = batch . size ( ) ; if ( batchSize == 0 ) { ctx . printLine ( "The<seq2seq4repair_space>batch<seq2seq4repair_space>is<seq2seq4repair_space>empty." ) ; return ; } <START_BUG> List < String > arguments = ctx . getOtherArguments ( ) ; <END_BUG> if ( arguments . isEmpty ( ) ) { ctx . printLine ( "Missing<seq2seq4repair_space>line<seq2seq4repair_space>number." ) ; return ; } if ( ( arguments . size ( ) ) != 1 ) { ctx . printLine ( ( "Expected<seq2seq4repair_space>only<seq2seq4repair_space>one<seq2seq4repair_space>argument<seq2seq4repair_space>-<seq2seq4repair_space>the<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>but<seq2seq4repair_space>received:<seq2seq4repair_space>" + arguments ) ) ; return ; } String intStr = arguments . get ( 0 ) ; int lineNumber ; try { lineNumber = Integer . parseInt ( intStr ) ; } catch ( NumberFormatException e ) { ctx . printLine ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>'" + intStr ) + "':<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; return ; } if ( ( lineNumber < 1 ) || ( lineNumber > batchSize ) ) { ctx . printLine ( ( ( ( lineNumber + "<seq2seq4repair_space>isn't<seq2seq4repair_space>in<seq2seq4repair_space>range<seq2seq4repair_space>[1.." ) + batchSize ) + "]." ) ) ; return ; } batch . remove ( ( lineNumber - 1 ) ) ; } }

Fix:
List < String > arguments = ctx . getParsedArguments ( ) . getOtherArguments ( ) ;
Buggy code:
public class DistributedUncenteredCosineVectorSimilarity extends AbstractDistributedVectorSimilarity { @ Override <START_BUG> protected double doComputeResult ( int rowA , int rowB , Iterable < Cooccurrence > cooccurrences , double weightOfVectorA , double weightOfVectorB , int numberOfColumns ) { <END_BUG> int n = 0 ; double sumXY = 0.0 ; double sumX2 = 0.0 ; double sumY2 = 0.0 ; for ( Cooccurrence cooccurrence : cooccurrences ) { double x = cooccurrence . getValueA ( ) ; double y = cooccurrence . getValueB ( ) ; sumXY += x * y ; sumX2 += x * x ; sumY2 += y * y ; n ++ ; } if ( n == 0 ) { return Double . NaN ; } double denominator = ( Math . sqrt ( sumX2 ) ) * ( Math . sqrt ( sumY2 ) ) ; if ( denominator == 0.0 ) { return Double . NaN ; } return sumXY // denominator ; } }

Fix:
protected double doComputeResult ( int rowA , int rowB , Iterable < Cooccurrence > cooccurrences , double weightOfVectorA , double weightOfVectorB , long numberOfColumns ) {
Buggy code:
public class InputFormat extends com . rasp . interfaces . InputFormat { private static final int BUFFER_SIZE = 8192 ; private int workerCount ; public void setWorkerCount ( int workerCount ) { } public long blockSize ( int workerCount ) { } public long offset ( long blockSize , int workerIdx ) { } @ Override public List < InputSplit > getSplits ( ) throws IOException , InterruptedException { } @ Override public RecordReader createRecordReader ( InputSplit split ) throws IOException , InterruptedException { } public void split ( ) { try { int idx = 1 ; List < InputSplit > splits = getSplits ( ) ; RandomAccessFile f = new RandomAccessFile ( getInputFile ( ) , "r" ) ; FileOutputStream fout = null ; int totalBytesRead = 0 ; int shift = 0 ; for ( InputSplit split : splits ) { long flen = f . length ( ) ; if ( totalBytesRead == flen ) { break ; } int bytesRead = 0 ; byte [ ] b = null ; long offset = ( split . getOffset ( ) ) + shift ; ( ( com . rasp . fs . InputSplit ) ( split ) ) . setOffset ( ( ( split . getOffset ( ) ) + shift ) ) ; <START_BUG> ( ( com . rasp . fs . InputSplit ) ( split ) ) . setLocation ( ( ( ( "split" + ( idx ++ ) ) + ".txt" ) + shift ) ) ; <END_BUG> fout = new FileOutputStream ( ( ( "split" + ( idx ++ ) ) + ".txt" ) , true ) ; while ( ( bytesRead < ( split . getLength ( ) ) ) && ( totalBytesRead < flen ) ) { int size = InputFormat . BUFFER_SIZE ; if ( ( ( split . getLength ( ) ) - bytesRead ) < ( InputFormat . BUFFER_SIZE ) ) { size = ( ( int ) ( ( split . getLength ( ) ) - bytesRead ) ) ; if ( ( totalBytesRead + size ) >= flen ) { size = ( ( int ) ( flen - totalBytesRead ) ) ; } } f . seek ( ( offset + bytesRead ) ) ; b = new byte [ size ] ; f . read ( b , 0 , size ) ; fout . write ( b ) ; bytesRead += size ; totalBytesRead += size ; } b = new byte [ 1 ] ; f . seek ( ( totalBytesRead - 1 ) ) ; f . read ( b , 0 , 1 ) ; while ( ( totalBytesRead < flen ) && ( ( b [ 0 ] ) != 10 ) ) { f . seek ( ( totalBytesRead ++ ) ) ; f . read ( b , 0 , 1 ) ; fout . write ( b ) ; shift ++ ; } ( ( com . rasp . fs . InputSplit ) ( split ) ) . setLength ( ( ( split . getLength ( ) ) + shift ) ) ; fout . close ( ) ; } f . close ( ) ; } catch ( InterruptedException intre ) { intre . printStackTrace ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } } public static void main ( String [ ] args ) { } No newline ; at end ; of file ; }

Fix:
( ( com . rasp . fs . InputSplit ) ( split ) ) . setLocation ( ( ( "split" + idx ) + ".txt" ) ) ;
Buggy code:
public final class MutableActivityManager extends AbstractActivityManager implements IMutableActivityManager { static boolean isActivityDefinitionChildOf ( String ancestor , String id , Map activityDefinitionsById ) { } private Map activitiesById = new WeakHashMap ( ) ; private Map activityActivityBindingsByParentActivityId = new HashMap ( ) ; private Map activityDefinitionsById = new HashMap ( ) ; private Map activityPatternBindingsByActivityId = new HashMap ( ) ; private IActivityRegistry activityRegistry ; private Map categoriesById = new WeakHashMap ( ) ; private Map categoryActivityBindingsByCategoryId = new HashMap ( ) ; private Map categoryDefinitionsById = new HashMap ( ) ; private Set definedActivityIds = new HashSet ( ) ; private Set definedCategoryIds = new HashSet ( ) ; private Set enabledActivityIds = new HashSet ( ) ; private Map identifiersById = new WeakHashMap ( ) ; public MutableActivityManager ( ) { } public MutableActivityManager ( IActivityRegistry activityRegistry ) { } public IActivity getActivity ( String activityId ) { } public ICategory getCategory ( String categoryId ) { } public Set getDefinedActivityIds ( ) { } public Set getDefinedCategoryIds ( ) { } public Set getEnabledActivityIds ( ) { } public IIdentifier getIdentifier ( String identifierId ) { } private void getRequiredActivityIds ( Set activityIds , Set requiredActivityIds ) { } public boolean isMatch ( String string , Set activityIds ) { <START_BUG> return isMatch ( string , activityIds ) ; <END_BUG> } public boolean match ( String string , Set activityIds ) { } private void notifyActivities ( Map activityEventsByActivityId ) { } private void notifyCategories ( Map categoryEventsByCategoryId ) { } private void notifyIdentifiers ( Map identifierEventsByIdentifierId ) { } private void readRegistry ( ) { } public void setEnabledActivityIds ( Set enabledActivityIds ) { } private Map updateActivities ( Collection activityIds ) { } private ActivityEvent updateActivity ( Activity activity ) { } private Map updateCategories ( Collection categoryIds ) { } private CategoryEvent updateCategory ( Category category ) { } private IdentifierEvent updateIdentifier ( Identifier identifier ) { } private Map updateIdentifiers ( Collection identifierIds ) { } }

Fix:
return match ( string , activityIds ) ;
Buggy code:
@ SuppressLint ( "NewApi" ) public class FriendsFragmentTab extends Fragment { private ListView listView ; public MainActivity mActivity ; public ArrayList < FriendEntry > friendsList ; public FriendsListAdapter adapter ; private ContactsRetrieverTask contactsRetrieverTask ; private Boolean boolUpdateList = true ; public void setMainActivity ( MainActivity activity ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View rootView = inflater . inflate ( fragment_friends , container , false ) ; listView = ( ( ListView ) ( rootView . findViewById ( R . id . friendsList ) ) ) ; setRetainInstance ( true ) ; Log . d ( LOG_TAG , "Initializing<seq2seq4repair_space>FriendsFragmentTab" ) ; friendsList = Photobook . getFriendsDataSource ( ) . getFriendsByStatus ( new int [ ] { FriendEntry . INT_STATUS_DEFAULT , FriendEntry . INT_STATUS_FRIEND } ) ; adapter = new FriendsListAdapter ( getActivity ( ) , layout . row_friend_list , friendsList ) ; listView . setAdapter ( adapter ) ; Photobook . setFriendsFragmentTab ( this ) ; <START_BUG> if ( boolUpdateList ) { <END_BUG> refreshContactList ( ) ; boolUpdateList = false ; } return rootView ; } public void refreshContactList ( ) { } }

Fix:
if ( ( boolUpdateList ) && ( ! ( Photobook . getPreferences ( ) . strUserID . isEmpty ( ) ) ) ) {
Buggy code:
public class CounterMutation implements IMutation { private static final Logger logger = LoggerFactory . getLogger ( CounterMutation . class ) ; private static final CounterMutationSerializer serializer = new CounterMutationSerializer ( ) ; private final RowMutation rowMutation ; private final ConsistencyLevel consistency ; public CounterMutation ( RowMutation rowMutation , ConsistencyLevel consistency ) { } public String getTable ( ) { } public ByteBuffer key ( ) { } public RowMutation rowMutation ( ) { } public ConsistencyLevel consistency ( ) { } public static CounterMutationSerializer serializer ( ) { } public RowMutation makeReplicationMutation ( ) throws IOException { } public Message makeMutationMessage ( int version ) throws IOException { } public boolean shouldReplicateOnWrite ( ) { } public void apply ( ) throws IOException { RowMutation rm = new RowMutation ( rowMutation . getTable ( ) , ByteBufferUtil . clone ( rowMutation . key ( ) ) ) ; Table table = Table . open ( rm . getTable ( ) ) ; for ( ColumnFamily cf_ : rowMutation . getColumnFamilies ( ) ) { ColumnFamily cf = cf_ . cloneMeShallow ( ) ; ColumnFamilyStore cfs = table . getColumnFamilyStore ( cf . id ( ) ) ; for ( IColumn column : cf_ . getColumnsMap ( ) . values ( ) ) { <START_BUG> cf . addColumn ( column . localCopy ( null ) ) ; <END_BUG> } rm . add ( cf ) ; } rm . apply ( ) ; } @ Override public String toString ( ) { } public String toString ( boolean shallow ) { } }

Fix:
cf . addColumn ( column . localCopy ( cfs ) ) ;
Buggy code:
public class GenericController extends Controller { @ Before static void intiIHM ( ) { <START_BUG> UiObject uiObject = null ; <END_BUG> uiObject = ( ( UiObject ) ( Cache . get ( "uiobject" ) ) ) ; if ( uiObject == null ) { uiObject = new UiObject ( ) ; uiObject . tags = DataLayer . getAllTags ( ) ; uiObject . categories = DataLayer . getAllCategories ( ) ; Cache . add ( "uiobject" , uiObject ) ; } renderArgs . put ( "uiObject" , uiObject ) ; } }

Fix:
UiObject uiObject ;
Buggy code:
public class Loop { public static Logger logger = Logger . getLogger ( Loop . class ) ; public static void main ( String [ ] args ) { HTMLLayout htmlLayout = new HTMLLayout ( "%sn%date%thread%level%logger%m" ) ; FileAppender appender = new FileAppender ( ) ; appender . setFile ( "toto.html" ) ; appender . setAppend ( false ) ; appender . setLayout ( htmlLayout ) ; <START_BUG> appender . activateOptions ( ) ; <END_BUG> Logger root = Logger . getRootLogger ( ) ; root . addAppender ( appender ) ; Loop . loop ( 200 ) ; appender . close ( ) ; } static void loop ( int len ) { } }

Fix:
appender . activate ( ) ;
Buggy code:
public class StreamingTest extends CleanupHelper { public static final InetAddress LOCAL = FBUtilities . getLocalAddress ( ) ; @ Test public void testTransferTable ( ) throws Exception { instance . initServer ( ) ; Set < String > content = new HashSet < String > ( ) ; content . add ( "key" ) ; SSTableReader sstable = SSTableUtils . writeSSTable ( content ) ; String tablename = sstable . getTableName ( ) ; String cfname = sstable . getColumnFamilyName ( ) ; StreamOut . transferSSTables ( StreamingTest . LOCAL , Arrays . asList ( sstable ) , tablename ) ; ColumnFamilyStore cfstore = Table . open ( tablename ) . getColumnFamilyStore ( cfname ) ; RangeSliceReply rr = Util . getRangeSlice ( cfstore ) ; assert ( rr . rows . size ( ) ) == 1 ; <START_BUG> assert rr . rows . get ( 0 ) . key . equals ( "key" ) ; <END_BUG> } }

Fix:
assert Arrays . equals ( rr . rows . get ( 0 ) . key . key , "key" . getBytes ( ) ) ;
Buggy code:
public class JSCFController { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.pgp" ) ; private static JSCFController myInstance = null ; private static Map connectionMap ; public static JSCFController getInstance ( ) { } private static void registerDrivers ( ) { } public JSCFConnection getConnection ( String userID ) throws JSCFException { SecurityItem pgpItem = MailConfig . getInstance ( ) . getAccountList ( ) . getDefaultAccount ( ) . getPGPItem ( ) ; JSCFConnection con = ( ( JSCFConnection ) ( JSCFController . connectionMap . get ( userID ) ) ) ; if ( con == null ) { JSCFController . LOG . fine ( ( ( "no<seq2seq4repair_space>connection<seq2seq4repair_space>for<seq2seq4repair_space>userID<seq2seq4repair_space>(" + userID ) + ")<seq2seq4repair_space>found.<seq2seq4repair_space>Creating<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>Connection." ) ) ; con = JSCFDriverManager . getConnection ( "jscf:gpg:" ) ; IExtensionHandler handler = null ; String path = null ; try { JSCFController . LOG . fine ( "try<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>handler" ) ; <START_BUG> handler = PluginManager . getInstance ( ) . getHandler ( "org.columba.core.externaltools" ) ; <END_BUG> JSCFController . LOG . fine ( "recived<seq2seq4repair_space>Handler<seq2seq4repair_space>...<seq2seq4repair_space>getting<seq2seq4repair_space>path<seq2seq4repair_space>from<seq2seq4repair_space>it" ) ; path = ExternalToolsManager . getInstance ( ) . getLocationOfExternalTool ( "gpg" ) . getPath ( ) ; JSCFController . LOG . fine ( ( "setting<seq2seq4repair_space>path:<seq2seq4repair_space>" + path ) ) ; } catch ( PluginHandlerNotFoundException e ) { JSCFController . LOG . fine ( ( "PluginHandler<seq2seq4repair_space>not<seq2seq4repair_space>found" + e ) ) ; if ( Logging . DEBUG ) { e . printStackTrace ( ) ; } } Properties props = con . getProperties ( ) ; if ( path == null ) { throw new ProgramNotFoundException ( "invalid<seq2seq4repair_space>path" ) ; } props . put ( "PATH" , path ) ; if ( handler != null ) { IExtension extension = handler . getExtension ( "gpg" ) ; JSCFController . LOG . fine ( ( "gpg<seq2seq4repair_space>userId:<seq2seq4repair_space>" + ( extension . getMetadata ( ) . getId ( ) ) ) ) ; } JSCFController . LOG . info ( ( "gpg<seq2seq4repair_space>path:<seq2seq4repair_space>" + ( props . get ( "PATH" ) ) ) ) ; props . put ( "USERID" , pgpItem . get ( "id" ) ) ; JSCFController . LOG . info ( ( "current<seq2seq4repair_space>gpg<seq2seq4repair_space>userID:<seq2seq4repair_space>" + ( props . get ( "USERID" ) ) ) ) ; con . setProperties ( props ) ; JSCFController . connectionMap . put ( userID , con ) ; } return con ; } public JSCFConnection getConnection ( ) throws JSCFException { } }

Fix:
handler = PluginManager . getInstance ( ) . getExtensionHandler ( "org.columba.core.externaltools" ) ;
Buggy code:
public class TSAFacadeImpl implements ITSAFacade { private static final Logger LOGGER = Logger . getLogger ( TSAFacadeImpl . class ) ; private List < PolicyChain > _currentChains ; private final DPIController _dpiController ; private final TsaClientThread _tsaClient ; private List < RawPolicyChain > _currentRawChains ; public TSAFacadeImpl ( DPIController dpiController ) { } @ Override public boolean updatePolicyChains ( List < PolicyChain > chains ) { } void setPolicyChains ( List < RawPolicyChain > rawChains ) { } private PolicyChain generatePolicyChain ( RawPolicyChain rawChain ) { } private List < RawPolicyChain > generateRawChains ( List < PolicyChain > chains ) { } @ Override public List < PolicyChain > getPolicyChains ( ) { } @ Override public void refreshPolicyChains ( ) { LinkedList < PolicyChain > newChains = new LinkedList < PolicyChain > ( ) ; for ( RawPolicyChain rawChain : _currentRawChains ) { _currentChains . add ( generatePolicyChain ( rawChain ) ) ; } <START_BUG> if ( newChains . equals ( _currentChains ) ) <END_BUG> return ; _currentChains = newChains ; _dpiController . updatePolicyChains ( _currentChains ) ; } }

Fix:
if ( ( ( _currentChains ) != null ) && ( newChains . equals ( _currentChains ) ) )
Buggy code:
public final class ModuleConfigFileParser { private static final Logger LOGGER = LoggerFactory . getLogger ( ModuleConfigFileParser . class ) ; private ModuleConfigFileParser ( ) { } public static InputStream loadInputStream ( final String custConfFileName ) { } public static Module parseFile ( final String fileName ) { } public static List < Pair < Class < ? > , Class < ? > > > getRegistrations ( final String fileName ) { } private static Pair < Class < ? > , Class < ? > > createPair ( final Registration rl , final RegistrationEntry re ) throws ClassNotFoundException { } public static List < Class < ? > > getWarmUp ( final String fileName ) { final Module module = ModuleConfigFileParser . parseFile ( fileName ) ; final List < Class < ? > > warmUpList = new ArrayList < Class < ? > > ( ) ; <START_BUG> if ( ( module != null ) && ( ( module . getClass ( ) ) != null ) ) { <END_BUG> for ( final Component component : module . getWarmUp ( ) . getComponent ( ) ) { if ( ( component . getClazz ( ) ) != null ) { try { warmUpList . add ( ModuleConfigFileParser . getClassObject ( component . getClazz ( ) ) ) ; } catch ( final ClassNotFoundException e ) { ModuleConfigFileParser . LOGGER . error ( "Impossible<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>a<seq2seq4repair_space>Component<seq2seq4repair_space>Class" , e ) ; } } } } return warmUpList ; } private static Class < ? > getClassObject ( final String className ) throws ClassNotFoundException { } }

Fix:
if ( ( module != null ) && ( ( module . getWarmUp ( ) ) != null ) ) {
Buggy code:
public class FilterActionList extends DefaultItem { public FilterActionList ( XmlElement root ) { } public FilterAction get ( int index ) { } public void remove ( int index ) { } public void addEmptyAction ( ) { XmlElement action = new XmlElement ( "action" ) ; <START_BUG> action . addAttribute ( "type" , "Mark<seq2seq4repair_space>as<seq2seq4repair_space>Read" ) ; <END_BUG> getRoot ( ) . addElement ( action ) ; } }

Fix:
action . addAttribute ( "type" , "Mark<seq2seq4repair_space>Message" ) ;
Buggy code:
public class JobDAO extends BaseDAO { public int getTotal ( ) { } public long create ( final Job job ) { } public long update ( final Job job ) { <START_BUG> simplePrepareStatTransactionExecute ( sqlManager . getSQL ( "JobDAO//UpdateJob" ) , job . id , job . name , job . description , job . repeat , job . interval , job . startTime , job . endTime ) ; <END_BUG> return job . id ; } public long delete ( final long jobId ) { } public Job getJob ( long jobId ) { } public List < Job > getAllJob ( ) { } }

Fix:
simplePrepareStatTransactionExecute ( sqlManager . getSQL ( "JobDAO//UpdateJob" ) , job . name , job . description , job . repeat , job . interval , job . startTime , job . endTime , job . id ) ;
Buggy code:
public class AccountHeader { protected static final double NAVIGATION_DRAWER_ACCOUNT_ASPECT_RATIO = 9.0 // 16.0 ; protected static final String BUNDLE_SELECTION_HEADER = "bundle_selection_header" ; private final AccountHeaderBuilder mAccountHeaderBuilder ; protected AccountHeader ( AccountHeaderBuilder accountHeaderBuilder ) { } public View getView ( ) { } public void setDrawer ( Drawer drawer ) { } public ImageView getHeaderBackgroundView ( ) { } public void setBackground ( Drawable headerBackground ) { } public void setBackgroundRes ( int headerBackgroundRes ) { } public void toggleSelectionList ( Context ctx ) { } public boolean isSelectionListShown ( ) { } public ArrayList < IProfile > getProfiles ( ) { } public void setProfiles ( ArrayList < IProfile > profiles ) { } public void setActiveProfile ( IProfile profile ) { } public void setActiveProfile ( IProfile profile , boolean fireOnProfileChanged ) { } public void setActiveProfile ( int identifier ) { } public void setActiveProfile ( int identifier , boolean fireOnProfileChanged ) { } <START_BUG> public void updateProfileByIdentifier ( IProfile newProfile , boolean fireOnProfileChanged ) { <END_BUG> if ( ( mAccountHeaderBuilder . mProfiles ) != null ) { for ( IProfile profile : mAccountHeaderBuilder . mProfiles ) { if ( profile instanceof Identifyable ) { if ( ( profile . getIdentifier ( ) ) == ( newProfile . getIdentifier ( ) ) ) { profile = newProfile ; mAccountHeaderBuilder . updateHeaderAndList ( ) ; return ; } } } } } public void addProfiles ( IProfile ... profiles ) { } public void addProfile ( IProfile profile , int position ) { } public void removeProfile ( int position ) { } public void removeProfile ( IProfile profile ) { } public void clear ( ) { } public Bundle saveInstanceState ( Bundle savedInstanceState ) { } public interface OnAccountHeaderListener { public boolean onProfileChanged ( View view , IProfile profile , boolean current ) { } } public interface OnAccountHeaderSelectionViewClickListener { public boolean onClick ( View view , IProfile profile ) { } } }

Fix:
public void updateProfileByIdentifier ( IProfile newProfile ) {
Buggy code:
public class SearchWithSortTask extends ReadTask { private Sort sort ; public SearchWithSortTask ( PerfRunData runData ) { } public void setParams ( String sortField ) { super . setParams ( sortField ) ; String [ ] fields = sortField . split ( "," ) ; SortField [ ] sortFields = new SortField [ fields . length ] ; for ( int i = 0 ; i < ( fields . length ) ; i ++ ) { String field = fields [ i ] ; int index = field . lastIndexOf ( ":" ) ; String fieldName ; String typeString ; if ( index != ( - 1 ) ) { fieldName = field . substring ( 0 , index ) ; <START_BUG> typeString = field . substring ( index , field . length ( ) ) ; <END_BUG> } else { typeString = "auto" ; fieldName = field ; } int type = getType ( typeString ) ; sortFields [ i ] = new SortField ( fieldName , type ) ; } this . sort = new Sort ( sortFields ) ; } private int getType ( String typeString ) { } public boolean supportsParams ( ) { } public QueryMaker getQueryMaker ( ) { } public boolean withRetrieve ( ) { } public boolean withSearch ( ) { } public boolean withTraverse ( ) { } public boolean withWarm ( ) { } public Sort getSort ( ) { } }

Fix:
typeString = field . substring ( ( 1 + index ) , field . length ( ) ) ;
Buggy code:
public class TestGenericController extends JMeterTestCase { public TestGenericController ( String name ) { } public void testProcessing ( ) throws Exception { testLog . debug ( "Testing<seq2seq4repair_space>Generic<seq2seq4repair_space>Controller" ) ; GenericController controller = new GenericController ( ) ; GenericController sub_1 = new GenericController ( ) ; sub_1 . addTestElement ( new TestSampler ( "one" ) ) ; sub_1 . addTestElement ( new TestSampler ( "two" ) ) ; controller . addTestElement ( sub_1 ) ; controller . addTestElement ( new TestSampler ( "three" ) ) ; GenericController sub_2 = new GenericController ( ) ; GenericController sub_3 = new GenericController ( ) ; sub_2 . addTestElement ( new TestSampler ( "four" ) ) ; sub_3 . addTestElement ( new TestSampler ( "five" ) ) ; sub_3 . addTestElement ( new TestSampler ( "six" ) ) ; sub_2 . addTestElement ( sub_3 ) ; sub_2 . addTestElement ( new TestSampler ( "seven" ) ) ; controller . addTestElement ( sub_2 ) ; String [ ] order = new String [ ] { "one" , "two" , "three" , "four" , "five" , "six" , "seven" } ; int counter = 7 ; controller . initialize ( ) ; for ( int i = 0 ; i < 2 ; i ++ ) { assertEquals ( 7 , counter ) ; counter = 0 ; TestElement sampler = null ; while ( ( sampler = controller . next ( ) ) != null ) { <START_BUG> assertEquals ( order [ ( counter ++ ) ] , sampler . getPropertyAsString ( NAME ) ) ; <END_BUG> } } } }

Fix:
assertEquals ( order [ ( counter ++ ) ] , sampler . getName ( ) ) ;
Buggy code:
public class ReconcileWorkingCopyOperation extends JavaModelOperation { boolean forceProblemDetection ; public ReconcileWorkingCopyOperation ( IJavaElement workingCopy , boolean forceProblemDetection ) { } protected void executeOperation ( ) throws JavaModelException { if ( ( fMonitor ) != null ) { if ( fMonitor . isCanceled ( ) ) return ; fMonitor . beginTask ( Util . bind ( "element.reconciling" ) , 10 ) ; } WorkingCopy workingCopy = getWorkingCopy ( ) ; boolean wasConsistent = workingCopy . isConsistent ( ) ; JavaElementDeltaBuilder deltaBuilder = null ; try { if ( ! wasConsistent ) { deltaBuilder = new JavaElementDeltaBuilder ( workingCopy ) ; workingCopy . makeConsistent ( fMonitor ) ; deltaBuilder . buildDeltas ( ) ; } if ( ( fMonitor ) != null ) fMonitor . worked ( 2 ) ; if ( ( forceProblemDetection ) && wasConsistent ) { if ( ( ( fMonitor ) != null ) && ( fMonitor . isCanceled ( ) ) ) return ; <START_BUG> IProblemRequestor problemRequestor = workingCopy . getProblemRequestor ( ) ; <END_BUG> if ( ( problemRequestor != null ) && ( problemRequestor . isActive ( ) ) ) { problemRequestor . beginReporting ( ) ; CompilationUnitProblemFinder . process ( workingCopy , problemRequestor , fMonitor ) ; problemRequestor . endReporting ( ) ; } } if ( deltaBuilder != null ) { if ( ( ( deltaBuilder . delta ) != null ) && ( ( deltaBuilder . delta . getAffectedChildren ( ) . length ) > 0 ) ) { addReconcileDelta ( workingCopy , deltaBuilder . delta ) ; } } } finally { if ( ( fMonitor ) != null ) fMonitor . done ( ) ; } } protected WorkingCopy getWorkingCopy ( ) { } public boolean isReadOnly ( ) { } protected IJavaModelStatus verify ( ) { } }

Fix:
IProblemRequestor problemRequestor = workingCopy . problemRequestor ;
Buggy code:
public class OSGiBundleInfoParseProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final String contextName = deploymentUnit . getName ( ) ; final ServiceRegistry serviceRegistry = phaseContext . getServiceRegistry ( ) ; BundleInfo info = BundleInfoAttachment . getBundleInfo ( deploymentUnit ) ; ServiceController < Deployment > deploymentController = DeploymentHolderService . getDeployment ( serviceRegistry , contextName ) ; if ( ( info != null ) || ( deploymentController != null ) ) return ; Manifest manifest = deploymentUnit . getAttachment ( OSGI_MANIFEST ) ; if ( manifest == null ) return ; try { VirtualFile virtualFile = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; info = BundleInfo . createBundleInfo ( AbstractVFS . adapt ( virtualFile ) , contextName ) ; BundleInfoAttachment . attachBundleInfo ( deploymentUnit , info ) ; } catch ( BundleException ex ) { <START_BUG> throw new DeploymentUnitProcessingException ( OSGiMessages . MESSAGES . cannotCreateBundleDeployment ( deploymentUnit ) ) ; <END_BUG> } } @ Override public void undeploy ( final DeploymentUnit deploymentUnit ) { } }

Fix:
throw OSGiMessages . MESSAGES . cannotCreateBundleDeployment ( ex , deploymentUnit ) ;
Buggy code:
public class FlowMask extends NetlinkSerializable implements AttributeHandler { private static final long EXACT_64 = ~ 0L ; private static final int EXACT_32 = ~ 0 ; private static final short EXACT_16 = ( ( short ) ( ~ 0 ) ) ; private static final byte EXACT_8 = ( ( byte ) ( ~ 0 ) ) ; private static final byte [ ] EXACT_ETH = new byte [ FlowKeyEthernet . ETH_ALEN ] ; private static final int [ ] EXACT_IPV6 = new int [ 4 ] ; private static class MaskableFlowKeyVlan extends FlowKeyVLAN { public MaskableFlowKeyVlan ( ) { } @ Override public int serializeInto ( ByteBuffer buffer ) { } @ Override public void deserializeFrom ( ByteBuffer buf ) { } } private static class MaskableFlowKeyInPort extends FlowKeyInPort { @ Override public void deserializeFrom ( ByteBuffer buf ) { } @ Override public void wildcard ( ) { } } private FlowKey [ ] keys = new FlowKey [ Attr . Attr . MAX ] ; private long keysWithExactMatch ; public FlowKey [ ] getKeys ( ) { } public FlowMask ( ) { } public void clear ( ) { } @ SuppressWarnings ( "unchecked" ) private < T extends FlowKey > T key ( short id ) { } private void exactMatchInKey ( short id ) { } public FlowKey getMaskFor ( short keyId ) { <START_BUG> return keys [ keyId ] ; <END_BUG> } public void swap ( FlowMask other ) { } public void calculateFor ( FlowMatch fmatch ) { } private void maskLayer2 ( FlowMatch fmatch , short highestLayer ) { } private void maskLayer3 ( FlowMatch fmatch , short highestLayer ) { } private void maskIPv6 ( FlowMatch fmatch , short highestLayer ) { } private void maskIPv4 ( FlowMatch fmatch , short highestLayer ) { } private void maskLayer4 ( FlowMatch fmatch ) { } private void maskIcmp ( FlowMatch fmatch ) { } private void maskTcp ( FlowMatch fmatch ) { } private void maskUdp ( FlowMatch fmatch ) { } @ Override public String toString ( ) { } public int serializeInto ( ByteBuffer buffer ) { } public void use ( ByteBuffer buf , short id ) { } public static Reader < FlowMask > reader = new Reader < FlowMask > ( ) { public FlowMask deserializeFrom ( ByteBuffer buf ) { } } ; }

Fix:
return keys [ ( keyId & ( MASK ) ) ] ;