nus-yam/ex-repair huggingface dataset:
Buggy code:
public class NSBundle extends NSObject { public NSBundle ( ) { } public NSBundle ( int id ) { } public NSBundle ( id id ) { } public static boolean loadNibFile ( NSString fileName , NSDictionary context , int zone ) { <START_BUG> return ( OS . objc_msgSend ( class_NSBundle , sel_loadNibFile_externalNameTable_withZone_ , ( fileName != null ? fileName . id : 0 ) , ( context != null ? context . id : 0 ) , zone ) ) != 0 ; <END_BUG> } public NSString bundleIdentifier ( ) { } public NSString bundlePath ( ) { } public static NSBundle bundleWithPath ( NSString path ) { } public NSDictionary infoDictionary ( ) { } public id objectForInfoDictionaryKey ( NSString key ) { } }

Fix:
return OS . objc_msgSend_bool ( class_NSBundle , sel_loadNibFile_externalNameTable_withZone_ , ( fileName != null ? fileName . id : 0 ) , ( context != null ? context . id : 0 ) , zone ) ;
Buggy code:
public class MessageSend extends Expression implements InvocationSite { public Expression receiver ; public char [ ] selector ; public Expression [ ] arguments ; public MethodBinding binding ; protected MethodBinding codegenBinding ; MethodBinding syntheticAccessor ; public TypeBinding expectedType ; public long nameSourcePosition ; public TypeBinding actualReceiverType ; public TypeBinding valueCast ; public TypeReference [ ] typeArguments ; public TypeBinding [ ] genericTypeArguments ; public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void computeConversion ( Scope scope , TypeBinding runtimeTimeType , TypeBinding compileTimeType ) { if ( ( runtimeTimeType == null ) || ( compileTimeType == null ) ) return ; if ( ( ( this . binding ) != null ) && ( this . binding . isValidBinding ( ) ) ) { MethodBinding originalBinding = this . binding . original ( ) ; <START_BUG> if ( originalBinding != ( this . binding ) ) { <END_BUG> if ( ( ( ( originalBinding . returnType . tagBits ) & ( TagBits . HasTypeVariable ) ) != 0 ) && ( ( runtimeTimeType . id ) != ( TypeIds . T_JavaLangObject ) ) ) { TypeBinding targetType = ( ( ! ( compileTimeType . isBaseType ( ) ) ) && ( runtimeTimeType . isBaseType ( ) ) ) ? compileTimeType : runtimeTimeType ; this . valueCast = originalBinding . returnType . genericCast ( targetType ) ; } } else if ( ( ( ( ( this . actualReceiverType . isArrayType ( ) ) && ( ( runtimeTimeType . id ) != ( TypeIds . T_JavaLangObject ) ) ) && ( ( this . binding . parameters ) == ( NoParameters ) ) ) && ( ( scope . compilerOptions ( ) . complianceLevel ) >= ( ClassFileConstants . JDK1_5 ) ) ) && ( CharOperation . equals ( this . binding . selector , TypeConstants . CLONE ) ) ) { this . valueCast = runtimeTimeType ; } } super . computeConversion ( scope , runtimeTimeType , compileTimeType ) ; } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public TypeBinding [ ] genericTypeArguments ( ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public int nullStatus ( FlowInfo flowInfo ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void setActualReceiverType ( ReferenceBinding receiverType ) { } public void setExpectedType ( TypeBinding expectedType ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int depth ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
if ( ( originalBinding != ( this . binding ) ) && ( ( originalBinding . returnType ) != ( this . binding . returnType ) ) ) {
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class DataSourceTestCase extends AbstractCliTestBase { @ ArquillianResource URL url ; private static final String [ ] [ ] DS_PROPS = new String [ ] [ ] { new String [ ] { "idle-timeout-minutes" , "5" } } ; @ Deployment public static Archive < ? > getDeployment ( ) { } @ BeforeClass public static void before ( ) throws Exception { } @ AfterClass public static void after ( ) throws Exception { } @ Test public void testDataSource ( ) throws Exception { } @ Test public void testXaDataSource ( ) throws Exception { } private void testAddDataSource ( ) throws Exception { } private void testRemoveDataSource ( ) throws Exception { } private void testModifyDataSource ( ) throws Exception { } private void testAddXaDataSource ( ) throws Exception { <START_BUG> cli . sendLine ( "xa-data-source<seq2seq4repair_space>add<seq2seq4repair_space>--name=TestXADS<seq2seq4repair_space>--jndi-name=java:jboss//datasources//TestXADS<seq2seq4repair_space>--driver-name=h2" ) ; <END_BUG> cli . sendLine ( "cd<seq2seq4repair_space>//subsystem=datasources//xa-data-source" ) ; cli . sendLine ( "ls" ) ; String ls = cli . readAllUnformated ( WAIT_TIMEOUT , WAIT_LINETIMEOUT ) ; assertTrue ( ls . contains ( "TestXADS" ) ) ; cli . sendLine ( "//subsystem=datasources//xa-data-source=TestXADS//xa-datasource-properties=URL:add(value=\"jdbc:h2:mem:test\")" ) ; cli . sendLine ( "xa-data-source<seq2seq4repair_space>enable<seq2seq4repair_space>--name=TestXADS" ) ; cli . waitForPrompt ( WAIT_TIMEOUT ) ; String jndiClass = JndiServlet . lookup ( url . toString ( ) , "java:jboss//datasources//TestXADS" ) ; Assert . assertEquals ( "org.jboss.jca.adapters.jdbc.WrapperDataSource" , jndiClass ) ; } private void testRemoveXaDataSource ( ) throws Exception { } private void testModifyXaDataSource ( ) throws Exception { } }

Fix:
cli . sendLine ( "xa-data-source<seq2seq4repair_space>add<seq2seq4repair_space>--name=TestXADS<seq2seq4repair_space>--jndi-name=java:jboss//datasources//TestXADS<seq2seq4repair_space>--driver-name=h2<seq2seq4repair_space>--xa-datasource-properties=ServerName=localhost,PortNumber=50011" ) ;
Buggy code:
public class CustomerViewAll extends Fragment implements AbsListView . OnItemClickListener { private CustomerViewAll . OnDealFragmentInteractionListener mListener ; private AbsListView mListView ; private ListAdapter mAdapter ; private ArrayList < Deal > dealList ; public CustomerViewAll ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onDetach ( ) { } @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { } public void setEmptyText ( CharSequence emptyText ) { } public interface OnDealFragmentInteractionListener { public void onDealFragmentInteraction ( String id ) { } } private class DealArrayAdapter extends ArrayAdapter < Deal > { private final Context context ; private final ArrayList < Deal > values ; public DealArrayAdapter ( Context context , ArrayList < Deal > values ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { LayoutInflater inflater = getActivity ( ) . getLayoutInflater ( ) ; View rowView = inflater . inflate ( deal_view_row , parent , false ) ; <START_BUG> Deal deal = values . get ( position ) ; <END_BUG> Merchant merchant = deal . getMerchant ( ) ; ImageView image = ( ( ImageView ) ( rowView . findViewById ( merchantLogo ) ) ) ; image . setImageBitmap ( merchant . getImage ( ) ) ; TextView companyName = ( ( TextView ) ( rowView . findViewById ( companyName ) ) ) ; companyName . setText ( merchant . getCompanyName ( ) ) ; TextView merchantType = ( ( TextView ) ( rowView . findViewById ( merchantType ) ) ) ; merchantType . setText ( merchant . getMerchantType ( ) ) ; TextView dealTextView = ( ( TextView ) ( rowView . findViewById ( dealDetail ) ) ) ; dealTextView . setText ( deal . toString ( ) ) ; dealTextView . setTypeface ( dealTextView . getTypeface ( ) , BOLD ) ; TextView additionInfo = ( ( TextView ) ( rowView . findViewById ( addtionalInfo ) ) ) ; additionInfo . setText ( "500<seq2seq4repair_space>m" ) ; return rowView ; } } }

Fix:
Deal deal = values . get ( ( ( ( values . size ( ) ) - 1 ) - position ) ) ;
Buggy code:
public class ParseUtils { public static Properties commonDsProperties ( String jndiName ) { } public static Properties xaDsProperties ( String jndiName ) { } public static Properties nonXaDsProperties ( String jndiName ) { } public static Properties raCommonProperties ( ) { Properties params = new Properties ( ) ; params . put ( "archive" , "some.rar" ) ; params . put ( "transaction-support" , "XATransaction" ) ; <START_BUG> params . put ( "bootstrapcontext" , "someContext" ) ; <END_BUG> return params ; } public static Properties raConnectionProperties ( ) { } public static Properties raAdminProperties ( ) { } public static void setOperationParams ( ModelNode operation , Properties params ) { } public static void addExtensionProperties ( ModelNode operation ) { } public static void checkModelParams ( ModelNode node , Properties params ) { } }

Fix:
params . put ( "bootstrap-context" , "someContext" ) ;
Buggy code:
public class IdentityConfigurationResourceDefinition extends AbstractIDMResourceDefinition { public static final IdentityConfigurationResourceDefinition INSTANCE = new IdentityConfigurationResourceDefinition ( ) ; private IdentityConfigurationResourceDefinition ( ) { } @ Override public void registerChildren ( ManagementResourceRegistration resourceRegistration ) { } private static ModelValidationStepHandler [ ] getModelValidators ( ) { <START_BUG> return new ModelValidationStepHandler [ ] { new NotEmptyResourceValidationStepHandler ( ) } ; <END_BUG> } }

Fix:
return new ModelValidationStepHandler [ ] { NotEmptyResourceValidationStepHandler . INSTANCE } ;
Buggy code:
public final class Board { private final Piece [ ] [ ] mPieces ; private final BoardSize mBoardSize ; public Board ( @ NotNull BoardSize boardSize ) { } public BoardSize getBoardSize ( ) { } public void addPiece ( @ NotNull Piece piece , @ NotNull BoardCoordinate location ) { } public void removePiece ( @ NotNull BoardCoordinate coordinateForRemoval ) { } @ Nullable public Piece movePiece ( @ NotNull BoardCoordinate origin , @ NotNull BoardCoordinate destination ) { } public void undoMovePiece ( @ NotNull BoardCoordinate originalOrigin , @ NotNull BoardCoordinate originalDestination , @ Nullable Piece capturedPiece ) { } private Piece movePieceImpl ( @ NotNull BoardCoordinate origin , @ NotNull BoardCoordinate destination , boolean incrementMoveCount ) { } public boolean doesPieceExistAt ( @ NotNull BoardCoordinate coordinateToCheck ) { } private boolean doesFriendlyPieceExistAt ( BoardCoordinate origin , BoardCoordinate destination ) { } public Piece getPiece ( @ NotNull BoardCoordinate coordinateToRetrieve ) { } private void setPiece ( @ Nullable Piece piece , @ NotNull BoardCoordinate location ) { } public Set < BoardCoordinate > getMovesFrom ( BoardCoordinate origin ) { Piece piece = getPiece ( origin ) ; Set < BoardCoordinate > allPossibleMoves = piece . getMovesFrom ( origin , mBoardSize ) ; Set < BoardCoordinate > capturingMoves = piece . getCapturingMovesFrom ( origin , mBoardSize ) ; Set < BoardCoordinate > validMoves = Sets . newHashSetWithExpectedSize ( allPossibleMoves . size ( ) ) ; for ( BoardCoordinate move : allPossibleMoves ) { <START_BUG> if ( ( ! ( isBlocked ( origin , move ) ) ) && ( ! ( doesFriendlyPieceExistAt ( origin , move ) ) ) ) { <END_BUG> validMoves . add ( move ) ; } } for ( BoardCoordinate move : capturingMoves ) { if ( ( ( ! ( isBlocked ( origin , move ) ) ) && ( doesPieceExistAt ( move ) ) ) && ( ! ( doesFriendlyPieceExistAt ( origin , move ) ) ) ) { validMoves . add ( move ) ; } } return validMoves ; } private boolean isBlocked ( BoardCoordinate origin , BoardCoordinate destination ) { } private void verifyCoordinatesOrThrow ( @ NotNull BoardCoordinate ... coordinates ) { } }

Fix:
if ( ( ! ( isBlocked ( origin , move ) ) ) && ( ! ( doesPieceExistAt ( move ) ) ) ) {
Buggy code:
public abstract class AbstractRenderableColumn extends AbstractColumn { private boolean escapeContent = true ; private boolean contentAsTooltip = false ; public AbstractRenderableColumn ( ColumnLocation location , String header ) { } <START_BUG> public IRenderable createCell ( TreeTable treeTable , TreeNode node , int level ) { <END_BUG> return new IRenderable ( ) { public void render ( TreeNode node , Response response ) { String content = getNodeValue ( node ) ; if ( isEscapeContent ( ) ) { content = Strings . escapeMarkup ( content ) . toString ( ) ; } response . write ( "<span<seq2seq4repair_space>class=\"text\"" ) ; if ( isContentAsTooltip ( ) ) { response . write ( ( ( "<seq2seq4repair_space>title=\"" + content ) + "\"" ) ) ; } response . write ( ">" ) ; response . write ( content ) ; response . write ( "<//span>" ) ; } } ; } public Component createCell ( MarkupContainer < ? > parent , String id , TreeNode node , int level ) { } public abstract String getNodeValue ( TreeNode node ) { } public void setEscapeContent ( boolean escapeContent ) { } public boolean isEscapeContent ( ) { } public void setContentAsTooltip ( boolean contentAsTooltip ) { } public boolean isContentAsTooltip ( ) { } }

Fix:
public IRenderable createCell ( TreeNode node , int level ) {
Buggy code:
@ SuppressWarnings ( "restriction" ) public class PermissionUsageView extends ViewPart { public PermissionUsageView ( ) { } private final int PERMISSION_USAGE_COLOR = SWT . COLOR_RED ; public static final String ID = "com.ensoftcorp.open.android.essentials.views.PermissionUsageView" ; private boolean usageFilterEnabled = false ; private boolean expandTreeEnabled = true ; @ Override public void createPartControl ( final Composite parent ) { } private void repopulatePermissionTreeWithSearchResults ( final Tree tree , final StyledText detailsText , final Combo searchBar ) { } private void repopulatePermissionsTree ( final Tree tree , final StyledText detailsText ) { } private void populatePermissionsTree ( final Tree tree ) { } private String prettyPrintGraphElement ( GraphElement ge ) { String tags = ge . tags ( ) . toString ( ) ; FormattedSourceCorrespondence sc = FormattedSourceCorrespondence . getSourceCorrespondent ( ge ) ; if ( sc != null ) { String lines = sc . getLineNumbers ( ) ; <START_BUG> return ( ( ( ( "File:<seq2seq4repair_space>" + ( sc . getFile ( ) ) ) + "\nLine<seq2seq4repair_space>number:<seq2seq4repair_space>" ) + ( ( lines . contains ( "-" ) ? "lines<seq2seq4repair_space>" : "line<seq2seq4repair_space>" ) + lines ) ) + "\nTags:<seq2seq4repair_space>" ) + tags ; <END_BUG> } return ge . toString ( ) ; } private void pruneUnusedElements ( TreeItem tree ) { } private void colorTree ( TreeItem tree , int color ) { } private boolean populatePermissionMethodsSubtree ( Permission permission , TreeItem permissionItem ) { } private static String getQualifiedMethodName ( GraphElement method ) { } private static void show ( Q q , Highlighter h , boolean extend , String title ) { } @ Override public void setFocus ( ) { } No newline ; at end ; of file ; }

Fix:
return ( ( ( ( "File:<seq2seq4repair_space>" + ( sc . getFile ( ) ) ) + "\nLine<seq2seq4repair_space>number" ) + ( ( lines . contains ( "-" ) ? "s:<seq2seq4repair_space>" : ":<seq2seq4repair_space>" ) + lines ) ) + "\nTags:<seq2seq4repair_space>" ) + tags ;
Buggy code:
public class CodeSnippetMessageSend extends MessageSend implements ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetMessageSend ( EvaluationContext evaluationContext ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { if ( ! ( flowInfo . isReachable ( ) ) ) return ; this . codegenBinding = this . binding . original ( ) ; if ( ( this . codegenBinding ) != ( this . binding ) ) { if ( this . codegenBinding . returnType . isTypeVariable ( ) ) { TypeVariableBinding variableReturnType = ( ( TypeVariableBinding ) ( this . codegenBinding . returnType ) ) ; if ( ( variableReturnType . firstBound ) != ( this . binding . returnType ) ) { this . valueCast = this . binding . returnType ; } } } <START_BUG> if ( ( ( ( this . binding . declaringClass ) != ( this . actualReceiverType ) ) && ( ! ( this . actualReceiverType . isArrayType ( ) ) ) ) && ( ( ( ( ( currentScope . environment ( ) . options . targetJDK ) >= ( ClassFileConstants . JDK1_2 ) ) && ( ( ! ( this . receiver . isImplicitThis ( ) ) ) || ( ! ( this . codegenBinding . isStatic ( ) ) ) ) ) && ( ( this . binding . declaringClass . id ) != ( T_Object ) ) ) || ( ! ( this . codegenBinding . declaringClass . canBeSeenBy ( currentScope ) ) ) ) ) { <END_BUG> this . codegenBinding = currentScope . enclosingSourceType ( ) . getUpdatedMethodBinding ( this . codegenBinding , ( ( ReferenceBinding ) ( this . actualReceiverType . erasure ( ) ) ) ) ; } } public TypeBinding resolveType ( BlockScope scope ) { } }

Fix:
if ( ( ( ( this . binding . declaringClass ) != ( this . actualReceiverType ) ) && ( ! ( this . actualReceiverType . isArrayType ( ) ) ) ) && ( ( ( ( ( currentScope . environment ( ) . options . targetJDK ) >= ( ClassFileConstants . JDK1_2 ) ) && ( ( ! ( this . receiver . isImplicitThis ( ) ) ) || ( ! ( this . codegenBinding . isStatic ( ) ) ) ) ) && ( ( this . binding . declaringClass . id ) != ( TypeIds . T_JavaLangObject ) ) ) || ( ! ( this . codegenBinding . declaringClass . canBeSeenBy ( currentScope ) ) ) ) ) {
Buggy code:
public class DataGraphSharingManager implements IDataGraphSharingManager { public synchronized IDataGraphSharing getInstance ( ISharedObjectContainer container ) throws ECFException { ISharedObjectManager mgr = container . getSharedObjectManager ( ) ; <START_BUG> ID id = IDFactory . getDefault ( ) . makeStringID ( DATA_GRAPH_SHARING_ID ) ; <END_BUG> DataGraphSharing result = ( ( DataGraphSharing ) ( mgr . getSharedObject ( id ) ) ) ; if ( result == null ) { result = new DataGraphSharing ( ) ; mgr . addSharedObject ( id , result , null ) ; } return result ; } }

Fix:
ID id = IDFactory . getDefault ( ) . createStringID ( DATA_GRAPH_SHARING_ID ) ;
Buggy code:
final class RequestHandlers { public static Logger log = Logger . getLogger ( RequestHandlers . class . getName ( ) ) ; public static final String DEFAULT_HANDLER_NAME = "standard" ; private final Map < String , SolrRequestHandler > handlers = Collections . synchronizedMap ( new HashMap < String , SolrRequestHandler > ( ) ) ; private static String normalize ( String p ) { <START_BUG> if ( ( p != null ) && ( p . endsWith ( "//" ) ) ) <END_BUG> return p . substring ( 0 , ( ( p . length ( ) ) - 1 ) ) ; return p ; } public SolrRequestHandler get ( String handlerName ) { } public SolrRequestHandler register ( String handlerName , SolrRequestHandler handler ) { } public Map < String , SolrRequestHandler > getRequestHandlers ( ) { } @ SuppressWarnings ( "unchecked" ) void initHandlersFromConfig ( Config config ) { } private static final class LazyRequestHandlerWrapper implements SolrInfoMBean , SolrRequestHandler { private String _className ; private NamedList _args ; private SolrRequestHandler _handler ; public LazyRequestHandlerWrapper ( String className , NamedList args ) { } public void init ( NamedList args ) { } public void handleRequest ( SolrQueryRequest req , SolrQueryResponse rsp ) { } public synchronized SolrRequestHandler getWrappedHandler ( ) { } public String getHandlerClass ( ) { } public String getName ( ) { } public String getDescription ( ) { } public String getVersion ( ) { } public String getSourceId ( ) { } public String getSource ( ) { } public URL [ ] getDocs ( ) { } public Category getCategory ( ) { } public NamedList getStatistics ( ) { } } }

Fix:
if ( ( ( p != null ) && ( p . endsWith ( "//" ) ) ) && ( ( p . length ( ) ) > 1 ) )
Buggy code:
public class ComponentResolvingPage extends WebPage implements IComponentResolver { private static final long serialVersionUID = 1L ; public boolean onEndRequestWasCalledOnAutoAddedComponent = false ; public ComponentResolvingPage ( ) { } public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( "test" . equals ( tag . getId ( ) ) ) { Label label = new Label ( this , ( ( Component . AUTO_COMPONENT_PREFIX ) + "test" ) , "TEST" ) { private static final long serialVersionUID = 1L ; @ Override protected void onAfterRender ( ) { onEndRequestWasCalledOnAutoAddedComponent = true ; } } ; <START_BUG> label . autoAdded ( ) ; <END_BUG> return true ; } return false ; } }

Fix:
label . render ( markupStream ) ;
Buggy code:
public abstract class FlightConfigurablePanel < T extends FlightConfigurableComponent > extends JPanel { protected static final Translator trans = Application . getTranslator ( ) ; protected RocketDescriptor descriptor = Application . getInjector ( ) . getInstance ( RocketDescriptor . class ) ; protected final FlightConfigurationPanel flightConfigurationPanel ; protected final Rocket rocket ; protected final JTable table ; public FlightConfigurablePanel ( final FlightConfigurationPanel flightConfigurationPanel , Rocket rocket ) { } public void fireTableDataChanged ( ) { } protected abstract void updateButtonState ( ) { } protected final void synchronizeConfigurationSelection ( ) { } protected void restoreSelection ( int row , int col ) { } private final void installTableListener ( ) { } protected abstract JTable initializeTable ( ) { } protected T getSelectedComponent ( ) { } protected String getSelectedConfigurationId ( ) { int col = table . convertColumnIndexToModel ( table . getSelectedColumn ( ) ) ; int row = table . convertRowIndexToModel ( table . getSelectedRow ( ) ) ; <START_BUG> if ( ( row < 0 ) || ( col < 0 ) ) { <END_BUG> return null ; } Object tableValue = table . getModel ( ) . getValueAt ( row , col ) ; if ( tableValue instanceof Pair ) { Pair < String , T > selectedComponent = ( ( Pair < String , T > ) ( tableValue ) ) ; return selectedComponent . getU ( ) ; } else if ( tableValue instanceof String ) { return ( ( String ) ( tableValue ) ) ; } return null ; } protected abstract class FlightConfigurableCellRenderer extends DefaultTableCellRenderer { @ Override public Component getTableCellRendererComponent ( JTable table , Object value , boolean isSelected , boolean hasFocus , int row , int column ) { } private final void setSelected ( JComponent c , JTable table , boolean isSelected , boolean hasFocus ) { } protected final void shaded ( JLabel label ) { } protected final void regular ( JLabel label ) { } protected abstract JLabel format ( T component , String configId , JLabel label ) { } } No newline ; at end ; of file ; }

Fix:
if ( ( ( ( row < 0 ) || ( col < 0 ) ) || ( row >= ( table . getRowCount ( ) ) ) ) || ( col >= ( table . getColumnCount ( ) ) ) ) {
Buggy code:
public class AjpListenerService extends ListenerService < AjpListenerService > { private volatile AcceptingChannel < StreamConnection > server ; private final String scheme ; public AjpListenerService ( String name , final String scheme , OptionMap listenerOptions , OptionMap socketOptions ) { } @ Override protected OpenListener createOpenListener ( ) { <START_BUG> AjpOpenListener ajpOpenListener = new AjpOpenListener ( getBufferPool ( ) . getValue ( ) , OptionMap . builder ( ) . addAll ( commonOptions ) . addAll ( listenerOptions ) . set ( ENABLE_CONNECTOR_STATISTICS , getUndertowService ( ) . isStatisticsEnabled ( ) ) . getMap ( ) , getBufferSize ( ) ) ; <END_BUG> ajpOpenListener . setScheme ( scheme ) ; return ajpOpenListener ; } @ Override void startListening ( XnioWorker worker , InetSocketAddress socketAddress , ChannelListener < AcceptingChannel < StreamConnection > > acceptListener ) throws IOException { } @ Override void stopListening ( ) { } @ Override public AjpListenerService getValue ( ) throws IllegalArgumentException , IllegalStateException { } @ Override public boolean isSecure ( ) { } @ Override protected void preStart ( final StartContext context ) { } @ Override protected String getProtocol ( ) { } }

Fix:
AjpOpenListener ajpOpenListener = new AjpOpenListener ( getBufferPool ( ) . getValue ( ) , OptionMap . builder ( ) . addAll ( commonOptions ) . addAll ( listenerOptions ) . set ( ENABLE_CONNECTOR_STATISTICS , getUndertowService ( ) . isStatisticsEnabled ( ) ) . getMap ( ) ) ;
Buggy code:
public class FoodEffective extends Food { protected Map < Effect , Float > effects = new LinkedHashMap < > ( ) ; public FoodEffective ( int restoreFood , float restoreSaturation ) { } public FoodEffective addEffect ( Effect effect ) { } public FoodEffective addChanceEffect ( float chance , Effect effect ) { } @ Override protected boolean onEatenBy ( Player player ) { super . onEatenBy ( player ) ; List < Effect > toApply = new LinkedList < > ( ) ; effects . forEach ( ( effect , chance ) -> { if ( chance >= ( Math . random ( ) ) ) <START_BUG> toApply . add ( effect ) ; <END_BUG> } ) ; toApply . forEach ( player :: addEffect ) ; return true ; } }

Fix:
toApply . add ( effect . clone ( ) ) ;
Buggy code:
public class ParameterizedMethodBinding extends MethodBinding { protected MethodBinding originalMethod ; public ParameterizedMethodBinding ( final ParameterizedTypeBinding parameterizedDeclaringClass , MethodBinding originalMethod ) { } public ParameterizedMethodBinding ( final ReferenceBinding declaringClass , MethodBinding originalMethod , char [ ] [ ] alternateParamaterNames , final LookupEnvironment environment ) { } public ParameterizedMethodBinding ( ) { } public static ParameterizedMethodBinding instantiateGetClass ( TypeBinding receiverType , MethodBinding originalMethod , Scope scope ) { ParameterizedMethodBinding method = new ParameterizedMethodBinding ( ) ; method . modifiers = originalMethod . modifiers ; method . selector = originalMethod . selector ; method . declaringClass = originalMethod . declaringClass ; method . typeVariables = Binding . NO_TYPE_VARIABLES ; method . originalMethod = originalMethod ; method . parameters = originalMethod . parameters ; method . thrownExceptions = originalMethod . thrownExceptions ; ReferenceBinding genericClassType = scope . getJavaLangClass ( ) ; LookupEnvironment environment = scope . environment ( ) ; <START_BUG> TypeBinding rawType = environment . convertToRawType ( receiverType . erasure ( ) ) ; <END_BUG> method . returnType = environment . createParameterizedType ( genericClassType , new TypeBinding [ ] { environment . createWildcard ( genericClassType , 0 , rawType , null , Wildcard . EXTENDS ) } , null ) ; return method ; } public boolean hasSubstitutedParameters ( ) { } public boolean hasSubstitutedReturnType ( ) { } public MethodBinding original ( ) { } }

Fix:
TypeBinding rawType = environment . convertToRawType ( receiverType . erasure ( ) , false ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class JNDITestCase { @ ArquillianResource Bundle bundle ; @ Deployment public static JavaArchive createdeployment ( ) { } @ Test public void testJNDIAccess ( ) throws Exception { } @ Test public void testInitialContextFactoryBuilderService ( ) throws Exception { } @ Test public void testObjectFactoryOSGiService ( ) throws Exception { InitialContext ictx = new InitialContext ( ) ; try { ictx . lookup ( "testscheme:testing//123" ) ; } catch ( NameNotFoundException nnfe ) { } ObjectFactory of = new JNDITestCase . TestObjectFactory ( ) ; BundleContext context = bundle . getBundleContext ( ) ; Dictionary < String , Object > props = new Hashtable < String , Object > ( ) ; props . put ( "osgi.jndi.url.scheme" , new String [ ] { "testscheme" } ) ; <START_BUG> ServiceRegistration reg = context . registerService ( ObjectFactory . class . getName ( ) , of , props ) ; <END_BUG> boolean found = false ; int i = 0 ; while ( i < 20 ) { try { assertEquals ( "Gotcha!" , ictx . lookup ( "testscheme:testing//123" ) ) ; found = true ; break ; } catch ( NameNotFoundException nnfe ) { } i ++ ; Thread . sleep ( 100 ) ; } assertTrue ( found ) ; reg . unregister ( ) ; boolean gone = false ; int j = 0 ; while ( j < 20 ) { try { ictx . lookup ( "testscheme:testing//123" ) ; } catch ( NameNotFoundException nnfe ) { gone = true ; break ; } j ++ ; Thread . sleep ( 100 ) ; } assertTrue ( gone ) ; } public class TestObjectFactory implements ObjectFactory { @ Override public Object getObjectInstance ( Object obj , Name name , Context nameCtx , Hashtable < ? , ? > environment ) throws Exception { } } }

Fix:
ServiceRegistration < ObjectFactory > reg = context . registerService ( ObjectFactory . class , of , props ) ;
Buggy code:
public class DataSplitterTest extends LuceneTestCase { private AtomicReader originalIndex ; private RandomIndexWriter indexWriter ; private Directory dir ; private String textFieldName = "text" ; private String classFieldName = "class" ; private String idFieldName = "id" ; @ Override @ Before public void setUp ( ) throws Exception { } @ Override @ After public void tearDown ( ) throws Exception { originalIndex . close ( ) ; <START_BUG> indexWriter . close ( ) ; <END_BUG> dir . close ( ) ; super . tearDown ( ) ; } @ Test public void testSplitOnAllFields ( ) throws Exception { } @ Test public void testSplitOnSomeFields ( ) throws Exception { } public static void assertSplit ( AtomicReader originalIndex , double testRatio , double crossValidationRatio , String ... fieldNames ) throws Exception { } private static void closeQuietly ( IndexReader reader ) throws IOException { } }

Fix:
indexWriter . shutdown ( ) ;
Buggy code:
public class OPTRecord extends Record { private Hashtable options ; private OPTRecord ( ) { } OPTRecord ( short payloadSize , byte xrcode , byte version ) { } OPTRecord ( Name _name , short _dclass , int _ttl , int length , DataByteInputStream in , Compression c ) throws IOException { } public String toString ( ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( getName ( ) ) ; sb . append ( "\t" ) ; sb . append ( Type . string ( getType ( ) ) ) ; if ( ( options ) != null ) { Enumeration e = options . keys ( ) ; while ( e . hasMoreElements ( ) ) { Integer i = ( ( Integer ) ( e . nextElement ( ) ) ) ; sb . append ( ( i + "<seq2seq4repair_space>" ) ) ; } } sb . append ( "<seq2seq4repair_space>;<seq2seq4repair_space>payload<seq2seq4repair_space>" ) ; sb . append ( getPayloadSize ( ) ) ; sb . append ( ",<seq2seq4repair_space>xrcode<seq2seq4repair_space>" ) ; <START_BUG> sb . append ( Rcode . string ( getExtendedRcode ( ) ) ) ; <END_BUG> sb . append ( ",<seq2seq4repair_space>version<seq2seq4repair_space>" ) ; sb . append ( getVersion ( ) ) ; return sb . toString ( ) ; } public short getPayloadSize ( ) { } public short getExtendedRcode ( ) { } public short getVersion ( ) { } void rrToWire ( DataByteOutputStream out , Compression c ) throws IOException { } void rrToWireCanonical ( DataByteOutputStream out ) throws IOException { } }

Fix:
sb . append ( getExtendedRcode ( ) ) ;
Buggy code:
public class LoggerTestCase extends TestCase { static String MSG = "M" ; Logger logger ; Appender a1 ; Appender a2 ; ResourceBundle rbUS ; ResourceBundle rbFR ; ResourceBundle rbCH ; public LoggerTestCase ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void testAppender1 ( ) { } public void testAppender2 ( ) { } public void testAdditivity1 ( ) { } public void testAdditivity2 ( ) { } public void testAdditivity3 ( ) { } public void testDisable1 ( ) { } public void testRB1 ( ) { } public void testRB2 ( ) { } public void testRB3 ( ) { } public void testExists ( ) { } public void testHierarchy1 ( ) { <START_BUG> Hierarchy h = new Hierarchy ( new RootCategory ( ( ( Level ) ( Level . ERROR ) ) ) ) ; <END_BUG> Logger a0 = h . getLogger ( "a" ) ; assertEquals ( "a" , a0 . getName ( ) ) ; assertNull ( a0 . getLevel ( ) ) ; assertSame ( Level . ERROR , a0 . getEffectiveLevel ( ) ) ; Logger a1 = h . getLogger ( "a" ) ; assertSame ( a0 , a1 ) ; } public static Test suite ( ) { } private static class CountingAppender extends AppenderSkeleton { int counter ; CountingAppender ( ) { } public void close ( ) { } public void append ( LoggingEvent event ) { } public boolean requiresLayout ( ) { } } }

Fix:
Hierarchy h = new Hierarchy ( new RootLogger ( ( ( Level ) ( Level . ERROR ) ) ) ) ;
Buggy code:
public final class DriverProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; final ServicesAttachment servicesAttachment = deploymentUnit . getAttachment ( SERVICES ) ; if ( ( module != null ) && ( servicesAttachment != null ) ) { final ModuleClassLoader classLoader = module . getClassLoader ( ) ; final List < String > driverNames = servicesAttachment . getServiceImplementations ( Driver . class . getName ( ) ) ; for ( String driverClassName : driverNames ) { try { final Class < ? extends Driver > driverClass = classLoader . loadClass ( driverClassName ) . asSubclass ( Driver . class ) ; final Constructor < ? extends Driver > constructor = driverClass . getConstructor ( ) ; final Driver driver = constructor . newInstance ( ) ; final int majorVersion = driver . getMajorVersion ( ) ; final int minorVersion = driver . getMinorVersion ( ) ; final boolean compliant = driver . jdbcCompliant ( ) ; if ( compliant ) { DEPLOYER_JDBC_LOGGER . deployingCompliantJdbcDriver ( driverClass , Integer . valueOf ( majorVersion ) , Integer . valueOf ( minorVersion ) ) ; } else { DEPLOYER_JDBC_LOGGER . deployingNonCompliantJdbcDriver ( driverClass , Integer . valueOf ( majorVersion ) , Integer . valueOf ( minorVersion ) ) ; } String driverName = deploymentUnit . getName ( ) ; <START_BUG> if ( ( ! ( deploymentUnit . getName ( ) . endsWith ( ".jar" ) ) ) || ( ( driverNames . size ( ) ) != 1 ) ) { <END_BUG> driverName = ( ( ( ( ( ( deploymentUnit . getName ( ) ) + "_" ) + driverClassName ) + "_" ) + majorVersion ) + "_" ) + minorVersion ; } InstalledDriver driverMetadata = new InstalledDriver ( driverName , driverClass . getName ( ) , null , null , majorVersion , minorVersion , compliant ) ; DriverService driverService = new DriverService ( driverMetadata , driver ) ; phaseContext . getServiceTarget ( ) . addService ( JBOSS . append ( "jdbc-driver" , driverName . replaceAll ( "\\." , "_" ) ) , driverService ) . addDependency ( JDBC_DRIVER_REGISTRY_SERVICE , DriverRegistry . class , driverService . getDriverRegistryServiceInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; } catch ( Exception e ) { DEPLOYER_JDBC_LOGGER . cannotInstantiateDriverClass ( driverClassName , e ) ; } } } } @ Override public void undeploy ( final DeploymentUnit context ) { } }

Fix:
if ( ( ( deploymentUnit . getName ( ) . contains ( "." ) ) && ( ! ( deploymentUnit . getName ( ) . endsWith ( ".jar" ) ) ) ) || ( ( driverNames . size ( ) ) != 1 ) ) {
Buggy code:
public final class YuiLib implements IClusterable { private static final long serialVersionUID = 1L ; private static ResourceReference YUILOADER ; public static void load ( IHeaderResponse response ) { } private static ResourceReference getYuiLoader ( ) { if ( ( YuiLib . YUILOADER ) == null ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( "yuiloader" ) ; <START_BUG> if ( DEPLOYMENT . equals ( Application . get ( ) . getConfigurationType ( ) ) ) { <END_BUG> sb . append ( "-min" ) ; } sb . append ( ".js" ) ; YuiLib . YUILOADER = new CompressedResourceReference ( YuiLib . class , sb . toString ( ) ) ; } return YuiLib . YUILOADER ; } private YuiLib ( ) { } }

Fix:
if ( Application . get ( ) . usesDeploymentConfig ( ) ) {
Buggy code:
public class ResponseWrapperAttributeInitializer extends RequestWrapperAttributeInitializer { @ Override protected String getClassName ( IType type , IMethod method ) { } @ Override protected String getLocalName ( IType type , IMethod method ) { try { <START_BUG> IAnnotation annotation = AnnotationUtils . getAnnotation ( method , WebMethod . class ) ; <END_BUG> if ( annotation != null ) { String operationName = AnnotationUtils . getStringValue ( annotation , OPERATION_NAME ) ; if ( operationName != null ) { return operationName + ( RESPONSE_SUFFIX ) ; } } return ( ( method . getElementName ( ) ) + ( RESPONSE_SUFFIX ) ) + ( AnnotationUtils . accountForOverloadedMethods ( type , method ) ) ; } catch ( JavaModelException jme ) { JAXWSUIPlugin . log ( jme . getStatus ( ) ) ; } return "" ; } }

Fix:
IAnnotation annotation = AnnotationUtils . getAnnotation ( WebMethod . class , method ) ;
Buggy code:
public class DefaultExceptionHandler implements ExceptionHandler { Logger log = LoggerFactory . getLogger ( DefaultExceptionHandler . class ) ; private GWTRequestFactoryServlet requestFactoryServlet ; public ServerFailure createServerFailure ( Throwable throwable ) { log . error ( "Faliure:<seq2seq4repair_space>" , throwable ) ; ServerFailure failure = null ; try { <START_BUG> failure = this . requestFactoryServlet . faliure ( throwable ) ; <END_BUG> } catch ( Throwable e ) { } if ( failure == null ) failure = new ServerFailure ( throwable . getMessage ( ) , throwable . getClass ( ) . getName ( ) , null , true ) ; return failure ; } public GWTRequestFactoryServlet getRequestFactoryServlet ( ) { } public void setRequestFactoryServlet ( GWTRequestFactoryServlet requestFactoryServlet ) { } No newline ; at end ; of file ; }

Fix:
failure = this . requestFactoryServlet . failure ( throwable ) ;
Buggy code:
public class QuorumResponseHandler < T > implements IAsyncCallback { protected static final Logger logger = LoggerFactory . getLogger ( QuorumResponseHandler . class ) ; protected final SimpleCondition condition = new SimpleCondition ( ) ; protected final Collection < Message > responses ; private IResponseResolver < T > responseResolver ; private final long startTime ; public QuorumResponseHandler ( int responseCount , IResponseResolver < T > responseResolver ) { } public T get ( ) throws IOException , TimeoutException , DigestMismatchException { try { <START_BUG> long timeout = ( ( System . currentTimeMillis ( ) ) - ( startTime ) ) + ( DatabaseDescriptor . getRpcTimeout ( ) ) ; <END_BUG> boolean success ; try { success = condition . await ( timeout , TimeUnit . MILLISECONDS ) ; } catch ( InterruptedException ex ) { throw new AssertionError ( ex ) ; } if ( ! success ) { StringBuilder sb = new StringBuilder ( "" ) ; for ( Message message : responses ) { sb . append ( message . getFrom ( ) ) ; } throw new TimeoutException ( ( ( ( ( "Operation<seq2seq4repair_space>timed<seq2seq4repair_space>out<seq2seq4repair_space>-<seq2seq4repair_space>received<seq2seq4repair_space>only<seq2seq4repair_space>" + ( responses . size ( ) ) ) + "<seq2seq4repair_space>responses<seq2seq4repair_space>from<seq2seq4repair_space>" ) + ( sb . toString ( ) ) ) + "<seq2seq4repair_space>." ) ) ; } } finally { for ( Message response : responses ) { MessagingService . removeRegisteredCallback ( response . getMessageId ( ) ) ; } } return responseResolver . resolve ( responses ) ; } public void response ( Message message ) { } }

Fix:
long timeout = ( DatabaseDescriptor . getRpcTimeout ( ) ) - ( ( System . currentTimeMillis ( ) ) - ( startTime ) ) ;
Buggy code:
public class AimingBot extends Robot { public void run ( ) { } public void onScannedRobot ( ScannedRobotEvent e ) { double bulletPower ; if ( ( e . getDistance ( ) ) < 300 ) { bulletPower = 2 ; } else { bulletPower = 1 ; } double eBearingRelGun = Utils . normalRelativeAngleDegrees ( ( ( e . getBearing ( ) ) - ( ( getGunHeading ( ) ) - ( getHeading ( ) ) ) ) ) ; double currentPerpAxis = ( Math . sin ( Math . toRadians ( eBearingRelGun ) ) ) * ( e . getDistance ( ) ) ; double currentHeadAxis = ( Math . cos ( Math . toRadians ( eBearingRelGun ) ) ) * ( e . getDistance ( ) ) ; <START_BUG> double eHeadingRelGun = Utils . normalRelativeAngleDegrees ( ( ( e . getHeading ( ) ) - ( ( getGunHeading ( ) ) - ( getHeading ( ) ) ) ) ) ; <END_BUG> double projectedPerpAxis = 0 ; double projectedHeadAxis = 0 ; double projectionTime = ( e . getDistance ( ) ) // ( Rules . getBulletSpeed ( bulletPower ) ) ; for ( int i = 0 ; i < 10 ; i ++ ) { projectedPerpAxis = currentPerpAxis + ( ( ( Math . sin ( Math . toRadians ( eHeadingRelGun ) ) ) * ( e . getVelocity ( ) ) ) * projectionTime ) ; projectedHeadAxis = currentHeadAxis + ( ( ( Math . cos ( Math . toRadians ( eHeadingRelGun ) ) ) * ( e . getVelocity ( ) ) ) * projectionTime ) ; projectionTime = ( Math . sqrt ( ( ( projectedHeadAxis * projectedHeadAxis ) + ( projectedPerpAxis * projectedPerpAxis ) ) ) ) // ( Rules . getBulletSpeed ( bulletPower ) ) ; } double angleToProjected = Math . toDegrees ( Math . atan2 ( projectedPerpAxis , projectedHeadAxis ) ) ; double gunTurnDegrees = angleToProjected ; turnGunRight ( gunTurnDegrees ) ; fire ( bulletPower ) ; scan ( ) ; } public void onHitByBullet ( HitByBulletEvent e ) { } public void onHitWall ( HitWallEvent e ) { } }

Fix:
double eHeadingRelGun = Utils . normalRelativeAngleDegrees ( ( ( e . getHeading ( ) ) - ( getGunHeading ( ) ) ) ) ;
Buggy code:
public class WebSpherePackageScanClassResolver extends DefaultPackageScanClassResolver { private final String resourcePath ; public WebSpherePackageScanClassResolver ( String resourcePath ) { } public static boolean isWebSphereClassLoader ( ClassLoader loader ) { <START_BUG> return loader != null ? loader . getClass ( ) . getName ( ) . startsWith ( "com.ibm" ) : false ; <END_BUG> } @ Override protected Enumeration < URL > getResources ( ClassLoader loader , String packageName ) throws IOException { } }

Fix:
return loader != null ? loader . getClass ( ) . getName ( ) . startsWith ( "com.ibm." ) : false ;
Buggy code:
public class StatisticsEnabledWriteHandler implements OperationStepHandler { private final ParameterValidator validator = new StringLengthValidator ( 0 , Integer . MAX_VALUE , false , false ) ; private final PersistenceUnitServiceRegistry persistenceUnitRegistry ; public StatisticsEnabledWriteHandler ( PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } @ 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 { ManagementLookup stats = null ; boolean oldSetting = false ; { final ModelNode value = operation . get ( VALUE ) . resolve ( ) ; validator . validateResolvedParameter ( VALUE , value ) ; final boolean setting = value . asBoolean ( ) ; final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final String puName = address . getLastElement ( ) . getValue ( ) ; stats = ManagementLookup . create ( persistenceUnitRegistry , puName ) ; if ( stats != null ) { oldSetting = stats . getStatistics ( ) . isStatisticsEnabled ( ) ; stats . getStatistics ( ) . setStatisticsEnabled ( setting ) ; } } if ( ( ( context . completeStep ( ) ) != ( ResultAction . KEEP ) ) && ( stats != null ) ) { stats . getStatistics ( ) . setStatisticsEnabled ( oldSetting ) ; } } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
public class ProcessExternalCalls extends ExternalCallsBaseListener { private ProcessingContext context ; private StringBuffer fullText ; private Set < ParseTree > ignoreSet ; private ExternalCallsParser parser ; private Map < ParseTree , String > replacements ; public ProcessExternalCalls ( ExternalCallsParser parser , ProcessingContext context ) { } @ Override public String toString ( ) { } private boolean isIgnored ( ParseTree tree ) { } private String getText ( ParseTree tree ) { } private String makeCall ( String call , String input ) { call = call . trim ( ) . replaceAll ( "\\s" , "<seq2seq4repair_space>" ) ; String delimiter = "<seq2seq4repair_space>(?=([^\"]*\"[^\"]*\")*[^\"]*$)" ; String name = call ; String [ ] parts = new String [ ] { call } ; int first = call . indexOf ( '<seq2seq4repair_space>' ) ; if ( first > 0 ) { name = call . substring ( 0 , first ) ; parts = call . substring ( ( first + 1 ) ) . trim ( ) . split ( delimiter ) ; List < String > actual = new LinkedList < > ( ) ; actual . add ( name ) ; for ( String p : parts ) { if ( ( p . length ( ) ) > 0 ) { actual . add ( p ) ; } } if ( ( parts . length ) != ( actual . size ( ) ) ) { parts = actual . toArray ( new String [ actual . size ( ) ] ) ; } } System . out . println ( ( ( "executing<seq2seq4repair_space>" + name ) + ( parts == null ? "" : "<seq2seq4repair_space>with<seq2seq4repair_space>" + ( Arrays . toString ( parts ) ) ) ) ) ; try { <START_BUG> Process p = Runtime . getRuntime ( ) . exec ( parts , null , new File ( context . filepath ) . getParentFile ( ) ) ; <END_BUG> InputStream sin = p . getInputStream ( ) ; OutputStream sout = p . getOutputStream ( ) ; PrintStream out = new PrintStream ( sout ) ; out . print ( input ) ; out . flush ( ) ; out . close ( ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( sin ) ) ; try { int exit = p . waitFor ( ) ; } catch ( InterruptedException x ) { } StringBuffer sb = new StringBuffer ( input . length ( ) ) ; while ( in . ready ( ) ) { try { String line = in . readLine ( ) ; if ( line == null ) break ; if ( ( sb . length ( ) ) > 0 ) sb . append ( "\n" ) ; sb . append ( line ) ; } catch ( Exception x ) { break ; } } try { in . close ( ) ; } catch ( Exception x ) { } return sb . toString ( ) ; } catch ( Exception x ) { System . err . println ( ( "Error<seq2seq4repair_space>running<seq2seq4repair_space>command:<seq2seq4repair_space>" + x ) ) ; return "Compiler<seq2seq4repair_space>error:<seq2seq4repair_space>" + ( String . valueOf ( x ) ) ; } } @ Override public void exitExternalCall ( ExternalCallsParser . ExternalCallContext ctx ) { } @ Override public void enterEveryRule ( ParserRuleContext ctx ) { } @ Override public void exitEveryRule ( ParserRuleContext ctx ) { } @ Override public void exitFile ( ExternalCallsParser . FileContext ctx ) { } @ Override public void visitTerminal ( TerminalNode ctx ) { } No newline ; at end ; of file ; }

Fix:
Process p = Runtime . getRuntime ( ) . exec ( parts , null , new File ( context . outpath ) . getParentFile ( ) ) ;
Buggy code:
public class SpamRenderer extends DefaultLabelRenderer { ImageIcon image ; public SpamRenderer ( ) { } public void updateUI ( ) { } public Component getTableCellRendererComponent ( JTable table , Object value , boolean isSelected , boolean hasFocus , int row , int column ) { super . getTableCellRendererComponent ( table , value , isSelected , hasFocus , row , column ) ; if ( value == null ) { setText ( "" ) ; return this ; } setText ( "" ) ; ColumbaHeader header = ( ( ColumbaHeader ) ( ( ( org . columba . mail . gui . table . model . MessageNode ) ( value ) ) . getHeader ( ) ) ) ; setIcon ( null ) ; setToolTipText ( MailResourceLoader . getString ( "header" , "column" , "nospam" ) ) ; <START_BUG> Boolean bool = ( ( Boolean ) ( header . getAttributes ( ) . get ( "columba.spam" ) ) ) ; <END_BUG> if ( bool != null ) { if ( bool . equals ( Boolean . TRUE ) ) { setIcon ( image ) ; setToolTipText ( MailResourceLoader . getString ( "header" , "column" , "spam" ) ) ; } else { setIcon ( null ) ; } } return this ; } }

Fix:
Boolean bool = ( ( Boolean ) ( header . get ( "columba.spam" ) ) ) ;