nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ConcreteCflowPointcut extends Pointcut { private Member cflowStackField ; List slots ; public ConcreteCflowPointcut ( Member cflowStackField , List slots ) { } <START_BUG> public FuzzyBoolean fastMatch ( ResolvedTypeX type ) { <END_BUG> return FuzzyBoolean . MAYBE ; } public FuzzyBoolean match ( Shadow shadow ) { } public void write ( DataOutputStream s ) throws IOException { } public void resolveBindings ( IScope scope , Bindings bindings ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public String toString ( ) { } public Test findResidue ( Shadow shadow , ExposedState state ) { } private static final Member cflowStackIsValidMethod = Member . method ( TypeX . forName ( CFLOW_STACK_TYPE ) , 0 , "isValid" , "()Z" ) ; public Pointcut concretize1 ( ResolvedTypeX inAspect , IntMap bindings ) { } public static class Slot { int formalIndex ; ResolvedTypeX formalType ; int arrayIndex ; public Slot ( int formalIndex , ResolvedTypeX formalType , int arrayIndex ) { } public boolean equals ( Object other ) { } public String toString ( ) { } } }

Fix:
public FuzzyBoolean fastMatch ( FastMatchInfo type ) {
Buggy code:
public class MainActivity extends ActionBarActivity { private String mFileName = null ; private MediaRecorder mRec = null ; private MediaPlayer mPlay = null ; ToggleButton RecButton ; Button PlayButton ; Chronometer timer ; private boolean startPlay ; private ListView lv ; private ArrayAdapter < String > listAdapter ; private List < String > myList ; File file ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void onRecord ( boolean start ) { } private void onPlay ( boolean start ) { } private void startPlaying ( ) { } private void stopPlaying ( ) { } private void startRecording ( ) { } private void stopRecording ( ) { } OnClickListener RecClick = new OnClickListener ( ) { boolean startRec = true ; @ Override public void onClick ( View v ) { } } ; OnClickListener PlayClick = new OnClickListener ( ) { @ Override public void onClick ( View v ) { } } ; private void CreateFile ( ) { Calendar now = Calendar . getInstance ( ) ; String ext = Integer . toString ( now . get ( Calendar . YEAR ) ) ; ext += Integer . toString ( now . get ( Calendar . MONTH ) ) ; ext += Integer . toString ( now . get ( Calendar . DATE ) ) ; ext += Integer . toString ( now . get ( Calendar . HOUR ) ) ; ext += Integer . toString ( now . get ( Calendar . MINUTE ) ) ; mFileName = Environment . getExternalStorageDirectory ( ) . getAbsolutePath ( ) ; <START_BUG> mFileName += ( "//" + ext ) + ".3gp" ; <END_BUG> } @ Override public void onPause ( ) { } @ Override public void onDestroy ( ) { } }

Fix:
mFileName += ( "//Music" + ext ) + ".3gp" ;
Buggy code:
public class NTFSRecord extends NTFSStructure { public static final int SIZE = 8 ; public static class Magic { public static final int BAAD = 1145127234 ; public static final int CHKD = 1112229955 ; public static final int FILE = 1162627398 ; public static final int HOLE = 1162628936 ; public static final int INDX = 1480871497 ; } private final int bytesPerSector ; public NTFSRecord ( int bytesPerSector , boolean strictFixUp , byte [ ] buffer , int offset ) throws IOException { } public NTFSRecord ( int bytesPerSector , boolean strictFixUp , NTFSStructure parent , int offset ) throws IOException { } public int getMagic ( ) { } public int getUpdateSequenceArrayOffset ( ) { } public int getUpdateSequenceArrayCount ( ) { } private void fixUp ( boolean strictFixUp ) throws IOException { try { final int updateSequenceOffset = getUpdateSequenceArrayOffset ( ) ; final int usn = getUInt16 ( updateSequenceOffset ) ; final int usnCount = getUpdateSequenceArrayCount ( ) ; for ( int i = 1 ; i < usnCount ; i ++ ) { final int bufOffset = ( i * ( bytesPerSector ) ) - 2 ; final int usnOffset = updateSequenceOffset + ( i * 2 ) ; if ( ( getUInt16 ( bufOffset ) ) == usn ) { setUInt16 ( bufOffset , getUInt16 ( usnOffset ) ) ; } else if ( strictFixUp ) { throw new IOException ( "Fix-up<seq2seq4repair_space>error" ) ; } } } catch ( Exception e ) { if ( strictFixUp ) { throw new IOException ( "Fix-up<seq2seq4repair_space>error" , e ) ; } else { <START_BUG> log . error ( "Fix-up<seq2seq4repair_space>error" , e ) ; <END_BUG> } } } }

Fix:
log . debug ( "Fix-up<seq2seq4repair_space>error" , e ) ;
Buggy code:
public class BorderPage extends WicketExamplePage { public BorderPage ( ) { } @ Override protected void explain ( ) { String html = "<span<seq2seq4repair_space>wicket:id=\"border\"<seq2seq4repair_space>class=\"mark\">\n" + ( "<span<seq2seq4repair_space>wicket:id=\"label\"<seq2seq4repair_space>class=\"mark\">label<seq2seq4repair_space>contents<seq2seq4repair_space>here<//span>\n" + "<//span>" ) ; <START_BUG> String code = "&nbsp;&nbsp;&nbsp;&nbsp;public<seq2seq4repair_space>BorderPage()\n" + ( ( ( ( ( "&nbsp;&nbsp;&nbsp;&nbsp;{\n" + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Label<seq2seq4repair_space>label<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>Label(\"label\",<seq2seq4repair_space>\"I<seq2seq4repair_space>am<seq2seq4repair_space>the<seq2seq4repair_space>label\");\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyBorder<seq2seq4repair_space>border<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>MyBorder(\"border\");\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border.add(label);\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add(border);\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;}" ) ; <END_BUG> new ExplainPanel ( this , html , code ) ; } }

Fix:
String code = "&nbsp;&nbsp;&nbsp;&nbsp;public<seq2seq4repair_space>BorderPage()\n" + ( ( ( ( ( "&nbsp;&nbsp;&nbsp;&nbsp;{\n" + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Label<seq2seq4repair_space>label<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>Label(\"label\",<seq2seq4repair_space>\"I<seq2seq4repair_space>am<seq2seq4repair_space>the<seq2seq4repair_space>label\");\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyBorder<seq2seq4repair_space>border<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>MyBorder(this,<seq2seq4repair_space>\"border\");\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border.add(label);\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add(border);\n" ) + "&nbsp;&nbsp;&nbsp;&nbsp;}" ) ;
Buggy code:
public class RoninServletWrapper extends HttpServlet { private AbstractRoninServlet _roninServlet ; public static final String RONIN_SERVLET_SLOT = "ronin.RoninServletWrapper.SLOT$$" ; public static boolean shouldHotReload ( ) { } @ Override protected void service ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } @ Override public void init ( ServletConfig config ) throws ServletException { } void initGosu ( File servletDir , boolean includeTests ) { final List < File > classpath = new ArrayList < File > ( ) ; if ( ( System . getProperties ( ) . getProperty ( "ronin.devsource" ) ) != null ) { classpath . add ( new File ( System . getProperties ( ) . getProperty ( "ronin.devsource" ) ) ) ; } File resourceRoot = determineRoot ( servletDir ) ; if ( resourceRoot . isDirectory ( ) ) { File src = new File ( resourceRoot , "src" ) ; classpath . add ( src ) ; File classes = new File ( resourceRoot , "classes" ) ; classpath . add ( classes ) ; if ( includeTests ) { File test = new File ( resourceRoot , "test" ) ; classpath . add ( test ) ; File support = new File ( resourceRoot , "support" ) ; if ( support . exists ( ) ) { addLibraries ( classpath , support ) ; } } addLibToClasspath ( classpath , resourceRoot ) ; addEnvToClasspath ( classpath , resourceRoot ) ; } Gosu . init ( classpath ) ; if ( RoninServletWrapper . shouldHotReload ( ) ) { try { ReflectUtil . invokeMethod ( TypeSystem . getGosuClassLoader ( ) , "addSingleServingNamespace" , "controller." ) ; ReflectUtil . invokeMethod ( TypeSystem . getGosuClassLoader ( ) , "addSingleServingNamespace" , "view." ) ; ReflectUtil . invokeMethod ( TypeSystem . getGosuClassLoader ( ) , "addSingleServingNamespace" , "db." ) ; } catch ( Exception e ) { <START_BUG> LoggerFactory . getLogger ( "Ronin" ) . warn ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>regiters" ) ; <END_BUG> } } } private void addLibToClasspath ( final List < File > classpath , File resourceRoot ) { } private void addLibraries ( final List < File > classpath , File lib ) { } private void addEnvToClasspath ( final List < File > classpath , File resourceRoot ) { } Map < String , String > getEnvironmentProperties ( File resourceRoot ) { } private File determineRoot ( File servletDir ) { } private String getMode ( ) { } public File getSourceDir ( File servletDir ) { } }

Fix:
LoggerFactory . getLogger ( "Ronin" ) . warn ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>register<seq2seq4repair_space>for<seq2seq4repair_space>hot<seq2seq4repair_space>reloading." ) ;
Buggy code:
class ISO14230 extends jm . device . KWP2000 implements IProtocol { private Box _box ; private Shared _shared ; private Default < ISO14230 > _default ; private boolean _lLine ; private int _sendLine ; private int _recvLine ; public ISO14230 ( Box box , Shared shared ) { } private byte [ ] readOneFrame ( boolean isFinish ) throws IOException { } @ Override public void fastInit ( byte [ ] data ) throws IOException { int valueOpen = 0 ; if ( _lLine ) { valueOpen = ( ( D . PWC ) | ( D . RZFC ) ) | ( D . CK ) ; } else { valueOpen = ( ( D . PWC ) | ( D . RZFC ) ) | ( D . CK ) ; } if ( ( ( ( ( ( ( ( ( ! ( _box . setCommCtrl ( valueOpen , SET_NULL ) ) ) || ( ! ( _box . setCommLine ( _sendLine , _recvLine ) ) ) ) || ( ! ( _box . setCommLink ( ( ( ( ( D . RS_232 ) | ( D . BIT9_MARK ) ) | ( D . SEL_SL ) ) | ( D . UN_DB20 ) ) , SET_NULL , SET_NULL ) ) ) ) || ( ! ( _box . setCommBaud ( 10416 ) ) ) ) || ( ! ( _box . setCommTime ( SETBYTETIME , 5000 ) ) ) ) || ( ! ( _box . setCommTime ( SETWAITTIME , 0 ) ) ) ) || ( ! ( _box . setCommTime ( SETRECBBOUT , 400000 ) ) ) ) || ( ! ( _box . setCommTime ( SETRECFROUT , 500000 ) ) ) ) || ( ! ( _box . setCommTime ( SETLINKTIME , 500000 ) ) ) ) { throw new IOException ( ) ; } try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException ex ) { Logger . getLogger ( ISO14230 . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } _shared . buffID = 0 ; if ( ! ( _box . newBatch ( _shared . buffID ) ) ) { throw new IOException ( ) ; } byte [ ] packEnter = pack ( data ) ; <START_BUG> if ( ( ( ( ( ( ( ! ( _box . setLineLevel ( COMS , SET_NULL ) ) ) || ( ! ( _box . commboxDelay ( 25000 ) ) ) ) || ( ! ( _box . setLineLevel ( SET_NULL , COMS ) ) ) ) || ( ! ( _box . commboxDelay ( 26000 ) ) ) ) || ( ! ( _box . sendOutData ( 0 , packEnter . length , packEnter ) ) ) ) || ( ! ( _box . runReceive ( REC_FR ) ) ) ) || ( ! ( _box . endBatch ( ) ) ) ) { <END_BUG> _box . delBatch ( _shared . buffID ) ; throw new IOException ( ) ; } if ( ! ( _box . runBatch ( false , _shared . buffID ) ) ) { throw new IOException ( ) ; } packEnter = readOneFrame ( ) ; _box . setCommTime ( SETWAITTIME , 55000 ) ; } @ Override public void addrInit ( int addrCode ) throws IOException { } @ Override public void setLines ( int comLine , boolean lLine ) throws IllegalArgumentException { } @ Override public void sendOneFrame ( byte [ ] data ) throws IOException { } @ Override public void sendFrames ( byte [ ] data ) throws IOException { } @ Override public byte [ ] readOneFrame ( ) throws IOException { } @ Override public byte [ ] readFrames ( ) throws IOException { } @ Override public void finishExecute ( boolean isFinish ) { } @ Override public void setKeepLink ( byte [ ] data ) throws IOException { } }

Fix:
if ( ( ( ( ( ( ( ! ( _box . setLineLevel ( COMS , SET_NULL ) ) ) || ( ! ( _box . commboxDelay ( 25000 ) ) ) ) || ( ! ( _box . setLineLevel ( SET_NULL , COMS ) ) ) ) || ( ! ( _box . commboxDelay ( 25000 ) ) ) ) || ( ! ( _box . sendOutData ( 0 , packEnter . length , packEnter ) ) ) ) || ( ! ( _box . runReceive ( REC_FR ) ) ) ) || ( ! ( _box . endBatch ( ) ) ) ) {
Buggy code:
public abstract class RTPublisher { public abstract void initialize ( final TSDB tsdb ) { } public abstract Deferred < Object > shutdown ( ) { } public abstract String version ( ) { } public abstract void collectStats ( final StatsCollector collector ) { } public final Deferred < Object > sinkDataPoint ( final String metric , final long timestamp , final byte [ ] value , final Map < String , String > tags , final byte [ ] tsuid , final short flags ) { <START_BUG> if ( ( flags & ( Const . FLAG_FLOAT ) ) == 0 ) { <END_BUG> return publishDataPoint ( metric , timestamp , Internal . extractFloatingPointValue ( value , 0 , ( ( byte ) ( flags ) ) ) , tags , tsuid ) ; } else { return publishDataPoint ( metric , timestamp , Internal . extractIntegerValue ( value , 0 , ( ( byte ) ( flags ) ) ) , tags , tsuid ) ; } } public abstract Deferred < Object > publishDataPoint ( final String metric , final long timestamp , final long value , final Map < String , String > tags , final byte [ ] tsuid ) { } public abstract Deferred < Object > publishDataPoint ( final String metric , final long timestamp , final double value , final Map < String , String > tags , final byte [ ] tsuid ) { } public abstract Deferred < Object > publishAnnotation ( Annotation annotation ) { } }

Fix:
if ( ( flags & ( Const . FLAG_FLOAT ) ) != 0 ) {
Buggy code:
public class KVEngineBuilderTest extends DirBase { @ Test public void fullConfig ( ) throws Exception { dir = testDir ( "fullConfig" ) ; <START_BUG> new KVEngineBuilder ( new File ( "." ) ) . backlog ( 10 ) . initialBucketSize ( 256 ) . chunkCapacity ( 4096 ) . flushByCount ( 5 ) . flushByElapseMilliseconds ( 500L ) . build ( ) ; <END_BUG> } @ Test public void defaultConfig ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void invalidFlushElapseMilliseconds ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void invalidFlushCount ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void invalidChunkCapacity ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void invalidBacklog ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void invalidInitialBucketSize ( ) throws Exception { } }

Fix:
new KVEngineBuilder ( dir ) . backlog ( 10 ) . initialBucketSize ( 256 ) . chunkCapacity ( 4096 ) . flushByCount ( 5 ) . flushByElapseMilliseconds ( 500L ) . build ( ) ;
Buggy code:
public class Storage implements StorageInterface { private static Storage ourInstance = new Storage ( ) ; private static Gson gsonObject = new Gson ( ) ; public static StorageInterface getInstance ( ) { } private static SharedStorage sharedStorageInstance = SharedStorage . getInstance ( ) ; private Storage ( ) { } private List < String > toArrayList ( String string ) { } @ Override public List < Lifestyle > getAllLifestyles ( ) { } @ Override public List < Reminder > getAllReminders ( ) { } @ Override public List < Notification > getAllNotifications ( ) { } @ Override public Lifestyle getLifestyle ( String key ) { String lifestyleGsonString = Storage . sharedStorageInstance . getSharedPreferenceKey ( key ) ; if ( lifestyleGsonString != null ) return Storage . gsonObject . fromJson ( lifestyleGsonString , Lifestyle . class ) ; String failedLifestyleGsonString = Storage . sharedStorageInstance . getSharedPreferenceKey ( "Failed_Lifestyle_01" ) ; <START_BUG> return Storage . gsonObject . fromJson ( lifestyleGsonString , Lifestyle . class ) ; <END_BUG> } @ Override public Reminder getReminder ( String key ) { } @ Override public Notification getNotification ( String key ) { } @ Override public Action getAction ( String key ) { } @ Override public List < String > getCurrentAlarmKeys ( ) { } @ Override public List < String > getAllKeys ( ) { } @ Override public boolean replaceAbstractBaseEvent ( AbstractBaseEvent abstractBaseEvent ) { } @ Override public Lifestyle getNewLifeStyle ( ) { } @ Override public Reminder getNewReminder ( ) { } @ Override public Notification getNewNotification ( ) { } @ Override public Action getNewAction ( ) { } @ Override public boolean commitAbstractBaseEvent ( AbstractBaseEvent abstractBaseEvent ) { } @ Override public boolean deleteAbstractBaseEvent ( AbstractBaseEvent abstractBaseEvent ) { } }

Fix:
return Storage . gsonObject . fromJson ( failedLifestyleGsonString , Lifestyle . class ) ;
Buggy code:
public class ConstructorPattern extends SearchPattern { protected boolean findDeclarations ; protected boolean findReferences ; protected char [ ] declaringQualification ; protected char [ ] declaringSimpleName ; protected char [ ] [ ] parameterQualifications ; protected char [ ] [ ] parameterSimpleNames ; protected char [ ] decodedTypeName ; protected int decodedParameterCount ; protected IType declaringType ; protected char [ ] currentTag ; public static char [ ] createDeclaration ( char [ ] typeName , int argCount ) { } public static char [ ] createReference ( char [ ] typeName , int argCount ) { } public ConstructorPattern ( boolean findDeclarations , boolean findReferences , char [ ] declaringSimpleName , int matchMode , boolean isCaseSensitive , char [ ] declaringQualification , char [ ] [ ] parameterQualifications , char [ ] [ ] parameterSimpleNames , IType declaringType ) { } protected void acceptPath ( IIndexSearchRequestor requestor , String path ) { } protected void decodeIndexEntry ( IEntryResult entryResult ) { } public void findIndexMatches ( IndexInput input , IIndexSearchRequestor requestor , int detailLevel , IProgressMonitor progressMonitor , IJavaSearchScope scope ) throws IOException { } protected char [ ] indexEntryPrefix ( ) { } protected boolean matchIndexEntry ( ) { } protected boolean mustResolve ( ) { if ( ( this . declaringQualification ) != null ) return true ; if ( ( this . parameterSimpleNames ) != null ) for ( int i = 0 , max = this . parameterSimpleNames . length ; i < max ; i ++ ) if ( ( this . parameterQualifications [ i ] ) != null ) return true ; <START_BUG> return false ; <END_BUG> } public String toString ( ) { } }

Fix:
return this . findReferences ;
Buggy code:
public class SharedModelFactory { protected static final Object INITIAL_DATA_KEY = AgentBase . INITIAL_DATA_KEY ; protected static final Object MODEL_UPDATER_KEY = AgentBase . MODEL_UPDATER_KEY ; protected static final long DEFAULT_CREATION_TIMEOUT = 5000 ; private static final SharedModelFactory INSTANCE = new SharedModelFactory ( ) ; private SharedModelFactory ( ) { } public static SharedModelFactory getInstance ( ) { } public IMasterModel createSharedDataSource ( ISharedObjectContainer container , final ID id , Object data , String updaterID ) throws SharedObjectCreateException { final ISharedObjectManager mgr = container . getSharedObjectManager ( ) ; final Object [ ] result = new Object [ 1 ] ; final Object monitor = new Object ( ) ; IContainerListener listener = new IContainerListener ( ) { public void handleEvent ( IContainerEvent event ) { if ( event instanceof ISharedObjectActivatedEvent ) { ISharedObjectActivatedEvent e = ( ( ISharedObjectActivatedEvent ) ( event ) ) ; if ( e . getActivatedID ( ) . equals ( id ) ) { result [ 0 ] = mgr . getSharedObject ( id ) ; synchronized ( monitor ) { monitor . notify ( ) ; } } } } } ; try { <START_BUG> container . addListener ( listener , null ) ; <END_BUG> synchronized ( monitor ) { addSharedObject ( mgr , id , data , updaterID ) ; if ( ( result [ 0 ] ) == null ) monitor . wait ( getCreationTimeout ( ) ) ; } } catch ( InterruptedException e ) { throw new SharedObjectCreateException ( e ) ; } finally { container . removeListener ( listener ) ; } return ( ( IMasterModel ) ( result [ 0 ] ) ) ; } protected long getCreationTimeout ( ) { } protected void addSharedObject ( ISharedObjectManager mgr , ID id , Object data , String updaterID ) throws SharedObjectCreateException { } protected SharedObjectDescription createLocalAgentDescription ( ID sharedObjectID , ID homeContainerID , Object data , String updaterID ) { } }

Fix:
container . addListener ( listener ) ;
Buggy code:
public class BurpExtender implements IBurpExtender { public static IBurpExtenderCallbacks callbacks ; private static final class OpenPcapFileMenuAction extends AbstractAction { private static final long serialVersionUID = 5003331249971440291L ; private final JFileChooser fc = new JFileChooser ( ) ; public OpenPcapFileMenuAction ( ) { } public void actionPerformed ( ActionEvent e ) { int returnVal = fc . showOpenDialog ( null ) ; if ( returnVal == ( JFileChooser . APPROVE_OPTION ) ) { File file = fc . getSelectedFile ( ) ; try { HttpReconstructor . loadPcap ( file ) ; } catch ( UnsatisfiedLinkError ule ) { <START_BUG> BurpExtender . callbacks . issueAlert ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>jpcap<seq2seq4repair_space>library<seq2seq4repair_space>from<seq2seq4repair_space>java.library.path" ) ; <END_BUG> BurpExtender . callbacks . issueAlert ( ( "java.library.path<seq2seq4repair_space>is<seq2seq4repair_space>" + ( System . getProperty ( "java.library.path" ) ) ) ) ; BurpExtender . callbacks . issueAlert ( "Visit<seq2seq4repair_space>https:////github.com//neonbunny//pcap-reconst//tree//master//lib<seq2seq4repair_space>for<seq2seq4repair_space>available<seq2seq4repair_space>libraries." ) ; } } } } public void registerExtenderCallbacks ( IBurpExtenderCallbacks callbacks ) { } No newline ; at end ; of file ; }

Fix:
BurpExtender . callbacks . issueAlert ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>jNetPcap<seq2seq4repair_space>library<seq2seq4repair_space>from<seq2seq4repair_space>java.library.path" ) ;
Buggy code:
public class TestBasqueAnalyzer extends BaseTokenStreamTestCase { public void testResourcesAvailable ( ) { } public void testBasics ( ) throws IOException { } public void testExclude ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new BasqueAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new BasqueAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class ReconcileWorkingCopyOperation extends JavaModelOperation { boolean createAST ; int astLevel ; boolean forceProblemDetection ; WorkingCopyOwner workingCopyOwner ; CompilationUnit ast ; public ReconcileWorkingCopyOperation ( IJavaElement workingCopy , boolean creatAST , int astLevel , boolean forceProblemDetection , WorkingCopyOwner workingCopyOwner ) { } protected void executeOperation ( ) throws JavaModelException { if ( ( this . progressMonitor ) != null ) { if ( this . progressMonitor . isCanceled ( ) ) throw new OperationCanceledException ( ) ; this . progressMonitor . beginTask ( org . eclipse . jdt . internal . core . util . Util . bind ( "element.reconciling" ) , 2 ) ; } CompilationUnit workingCopy = getWorkingCopy ( ) ; boolean wasConsistent = workingCopy . isConsistent ( ) ; try { if ( ! wasConsistent ) { JavaElementDeltaBuilder deltaBuilder = new JavaElementDeltaBuilder ( workingCopy ) ; this . ast = workingCopy . makeConsistent ( this . createAST , this . astLevel , this . progressMonitor ) ; deltaBuilder . buildDeltas ( ) ; if ( ( progressMonitor ) != null ) progressMonitor . worked ( 2 ) ; if ( ( deltaBuilder . delta ) != null ) { addReconcileDelta ( workingCopy , deltaBuilder . delta ) ; } } else { if ( forceProblemDetection ) { IProblemRequestor problemRequestor = workingCopy . getPerWorkingCopyInfo ( ) ; if ( ( problemRequestor != null ) && ( problemRequestor . isActive ( ) ) ) { CompilationUnitDeclaration unit = null ; try { problemRequestor . beginReporting ( ) ; char [ ] contents = workingCopy . getContents ( ) ; <START_BUG> unit = CompilationUnitProblemFinder . process ( workingCopy , contents , this . workingCopyOwner , problemRequestor , false , this . progressMonitor ) ; <END_BUG> problemRequestor . endReporting ( ) ; if ( ( progressMonitor ) != null ) progressMonitor . worked ( 1 ) ; if ( ( this . createAST ) && ( unit != null ) ) { Map options = workingCopy . getJavaProject ( ) . getOptions ( true ) ; this . ast = AST . convertCompilationUnit ( this . astLevel , unit , contents , options , true , workingCopy . owner , this . progressMonitor ) ; if ( ( progressMonitor ) != null ) progressMonitor . worked ( 1 ) ; } } finally { if ( unit != null ) { unit . cleanUp ( ) ; } } } } } } finally { if ( ( progressMonitor ) != null ) progressMonitor . done ( ) ; } } protected CompilationUnit getWorkingCopy ( ) { } public boolean isReadOnly ( ) { } protected IJavaModelStatus verify ( ) { } }

Fix:
unit = CompilationUnitProblemFinder . process ( workingCopy , contents , this . workingCopyOwner , problemRequestor , ( ! ( this . createAST ) ) , this . progressMonitor ) ;
Buggy code:
class EJBClientCommonConnectionConfig implements EJBClientConfiguration . CommonConnectionCreationConfiguration { private static final Logger logger = Logger . getLogger ( EJBClientCommonConnectionConfig . class ) ; private OptionMap connectionCreationOptions = OptionMap . EMPTY ; private OptionMap channelCreationOptions = OptionMap . EMPTY ; private long connectionTimeout = 5000 ; private EJBClientCommonConnectionConfig . CallbackHandlerProvider callbackHandlerProvider ; @ Override public OptionMap getConnectionCreationOptions ( ) { } @ Override public CallbackHandler getCallbackHandler ( ) { } @ Override public long getConnectionTimeout ( ) { } @ Override public OptionMap getChannelCreationOptions ( ) { } @ Override public boolean isConnectEagerly ( ) { <START_BUG> return false ; <END_BUG> } protected void setChannelCreationOptions ( final OptionMap channelCreationOptions ) { } protected void setConnectionCreationOptions ( final OptionMap connectionCreationOptions ) { } protected void setConnectionTimeout ( final long timeout ) { } protected void setCallbackHandler ( final ServiceRegistry serviceRegistry , final String username , final String securityRealmName ) { } protected static OptionMap getOptionMapFromProperties ( final Properties properties , final ClassLoader classLoader ) { } private class CallbackHandlerProvider { private final ServiceRegistry serviceRegistry ; private final String userName ; private final String securityRealmName ; CallbackHandlerProvider ( final ServiceRegistry serviceRegistry , final String userName , final String securityRealm ) { } CallbackHandler getCallbackHandler ( ) { } } }

Fix:
return true ;
Buggy code:
public class RevokeNode extends MiscellaneousStatementNode { private PrivilegeNode privileges ; private List grantees ; public String toString ( ) { } public String statementToString ( ) { } public void init ( Object privileges , Object grantees ) { } public QueryTreeNode bind ( ) throws StandardException { <START_BUG> privileges = ( ( PrivilegeNode ) ( privileges . bind ( new HashMap ( ) , grantees ) ) ) ; <END_BUG> return this ; } public ConstantAction makeConstantAction ( ) throws StandardException { } }

Fix:
privileges = ( ( PrivilegeNode ) ( privileges . bind ( new HashMap ( ) , grantees , false ) ) ) ;
Buggy code:
public class ThreadListBuilder { private static final int bufSize_ = ( 64 * 1024 ) * 1024 ; private static final int count_ = ( 128 * 1024 ) * 1024 ; public static void main ( String [ ] args ) throws Throwable { if ( ( args . length ) != 2 ) { System . out . println ( "Usage<seq2seq4repair_space>:<seq2seq4repair_space>java<seq2seq4repair_space>com.facebook.infrastructure.tools.ThreadListBuilder<seq2seq4repair_space><directory<seq2seq4repair_space>containing<seq2seq4repair_space>files<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>processed><seq2seq4repair_space><directory<seq2seq4repair_space>to<seq2seq4repair_space>dump<seq2seq4repair_space>the<seq2seq4repair_space>bloom<seq2seq4repair_space>filter<seq2seq4repair_space>in.>" ) ; System . exit ( 1 ) ; } File directory = new File ( args [ 0 ] ) ; File [ ] files = directory . listFiles ( ) ; List < DataOutputBuffer > buffers = new ArrayList < DataOutputBuffer > ( ) ; BloomFilter bf = new BloomFilter ( ThreadListBuilder . count_ , 8 ) ; int keyCount = 0 ; for ( File file : files ) { System . out . println ( ( "Processing<seq2seq4repair_space>file<seq2seq4repair_space>" + file ) ) ; BufferedReader bufReader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( file ) ) , ThreadListBuilder . bufSize_ ) ; String line = null ; while ( ( line = bufReader . readLine ( ) ) != null ) { if ( ( keyCount > 0 ) && ( ( keyCount % ( ThreadListBuilder . count_ ) ) == 0 ) ) { DataOutputBuffer bufOut = new DataOutputBuffer ( ) ; BloomFilter . serializer ( ) . serialize ( bf , bufOut ) ; System . out . println ( "Finished<seq2seq4repair_space>serializing<seq2seq4repair_space>the<seq2seq4repair_space>bloom<seq2seq4repair_space>filter" ) ; buffers . add ( bufOut ) ; bf = new BloomFilter ( ThreadListBuilder . count_ , 8 ) ; } line = line . trim ( ) ; bf . add ( line ) ; ++ keyCount ; } } DataOutputBuffer bufOut = new DataOutputBuffer ( ) ; BloomFilter . serializer ( ) . serialize ( bf , bufOut ) ; buffers . add ( bufOut ) ; int size = buffers . size ( ) ; for ( int i = 0 ; i < size ; ++ i ) { DataOutputBuffer buffer = buffers . get ( i ) ; <START_BUG> String file = ( ( ( ( args [ 1 ] ) + ( System . getProperty ( "file.separator" ) ) ) + "Bloom-Filter-" ) + i ) + ".dat" ; <END_BUG> RandomAccessFile raf = new RandomAccessFile ( file , "rw" ) ; raf . write ( buffer . getData ( ) , 0 , buffer . getLength ( ) ) ; raf . close ( ) ; buffer . close ( ) ; } System . out . println ( "Done<seq2seq4repair_space>writing<seq2seq4repair_space>the<seq2seq4repair_space>bloom<seq2seq4repair_space>filter<seq2seq4repair_space>to<seq2seq4repair_space>disk" ) ; } }

Fix:
String file = ( ( ( ( args [ 1 ] ) + ( File . separator ) ) + "Bloom-Filter-" ) + i ) + ".dat" ;
Buggy code:
public class NativeHelpers { public static final void getAttributes ( StringBuffer sb , Map < String , Object > props , Collection < Namespace > namespaces ) { if ( ( namespaces != null ) && ( ! ( namespaces . isEmpty ( ) ) ) ) { for ( Namespace ns : namespaces ) { sb . append ( "<seq2seq4repair_space>xmlns" ) ; if ( ( ns . getPrefix ( ) . length ( ) ) > 0 ) sb . append ( ':' ) . append ( ns . getPrefix ( ) ) ; sb . append ( "=\"" ) . append ( ns . getURI ( ) ) . append ( '"' ) ; } } if ( ( props != null ) && ( ! ( props . isEmpty ( ) ) ) ) { for ( Map . Entry < String , Object > me : props . entrySet ( ) ) { <START_BUG> HTMLs . appendAttribute ( sb , me . getKey ( ) , Objects . toString ( me . getValue ( ) ) ) ; <END_BUG> } } } }

Fix:
HTMLs . appendAttribute ( sb , me . getKey ( ) , Objects . toString ( me . getValue ( ) ) , false ) ;
Buggy code:
public class XMLWriter { private Writer out ; public XMLWriter ( ) throws IOException { } public XMLWriter ( String strFilename ) throws IOException { } public void createNode ( Parse obj ) throws IOException { indentation ( obj ) ; out . write ( ( "<" + ( obj . getStrTag ( ) ) ) ) ; if ( ( obj . getStrId ( ) ) != null ) { <START_BUG> out . write ( ( "<seq2seq4repair_space>id=" + ( obj . getStrId ( ) ) ) ) ; <END_BUG> } if ( ( obj . getStrValue ( ) ) != null ) { out . write ( ( ( "<seq2seq4repair_space>value=\"" + ( obj . getStrValue ( ) ) ) + "\"" ) ) ; } out . write ( ">\n" ) ; } public void childNode ( Parse obj ) throws IOException { } public void endNode ( Parse obj ) throws IOException { } protected void indentation ( Parse obj ) throws IOException { } }

Fix:
out . write ( ( ( "<seq2seq4repair_space>id=\"" + ( obj . getStrId ( ) ) ) + "\"" ) ) ;
Buggy code:
public class ReflectionRepresentation { private int id ; private String title ; private String verb ; private PersonSummaryRepresentation speaker ; private String soundCloudId ; private String youtubeVideoId ; private List < ReflectionTranscript > reflectionTranscripts ; private List < WordSummaryRepresentation > words ; private Boolean showOnMainFcPage ; private Boolean publish ; public ReflectionRepresentation ( int id , String title , String verb , PersonSummaryRepresentation speaker , String soundCloudId , String youtubeVideoId , List < ReflectionTranscript > reflectionTranscripts , WordsSummaryRepresentation wordsSummaryRepresentation , Boolean showOnMainFcPage , Boolean publish ) { } public ReflectionRepresentation ( ) { } @ JsonProperty ( "id" ) public int getId ( ) { } @ JsonProperty ( "title" ) public String getTitle ( ) { } @ JsonProperty ( "soundCloudId" ) public String getSoundCloudId ( ) { } @ JsonProperty ( "youtubeVideoId" ) public String getYoutubeVideoId ( ) { } <START_BUG> @ JsonProperty ( "transcripts" ) <END_BUG> public List < ReflectionTranscript > getReflectionTranscripts ( ) { return reflectionTranscripts ; } @ JsonProperty ( "speaker" ) public PersonSummaryRepresentation getSpeaker ( ) { } @ JsonProperty ( "verb" ) public String getVerb ( ) { } @ JsonProperty ( "words" ) public List < WordSummaryRepresentation > getWords ( ) { } @ JsonProperty ( "showOnMainFcPage" ) public Boolean isShowOnLandingPage ( ) { } @ JsonProperty ( "publish" ) public Boolean isPublish ( ) { } public void setShowOnMainFcPage ( Boolean showOnMainFcPage ) { } }

Fix:
@ JsonProperty ( "reflectionTranscripts" )
Buggy code:
public class Parser { private static LexicalizedParser lp = LexicalizedParser . loadModel ( "edu//stanford//nlp//models//lexparser//englishPCFG.ser.gz" ) ; public static Tree parse ( String sentence ) { <START_BUG> Reader reader = new StringReader ( NERTagger . tag ( sentence ) ) ; <END_BUG> List < HasWord > tokenized = Iterables . getFirst ( new DocumentPreprocessor ( reader ) , null ) ; if ( tokenized != null ) { Tree parse = Parser . lp . apply ( tokenized ) ; return parse ; } return null ; } }

Fix:
Reader reader = new StringReader ( sentence ) ;
Buggy code:
public class WriteResponseHandler implements IAsyncCallback { protected static final Logger logger = Logger . getLogger ( WriteResponseHandler . class ) ; protected final SimpleCondition condition = new SimpleCondition ( ) ; private final int responseCount ; protected final Collection < Message > responses ; protected AtomicInteger localResponses = new AtomicInteger ( 0 ) ; private final long startTime ; public WriteResponseHandler ( int responseCount , String table ) { } public void get ( ) throws TimeoutException { 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 ) { throw new TimeoutException ( ( ( ( "Operation<seq2seq4repair_space>timed<seq2seq4repair_space>out<seq2seq4repair_space>-<seq2seq4repair_space>received<seq2seq4repair_space>only<seq2seq4repair_space>" + ( responses . size ( ) ) ) + ( localResponses ) ) + "<seq2seq4repair_space>responses" ) ) ; } } finally { for ( Message response : responses ) { MessagingService . removeRegisteredCallback ( response . getMessageId ( ) ) ; } } } public void response ( Message message ) { } public void localResponse ( ) { } private void maybeSignal ( ) { } }

Fix:
long timeout = ( DatabaseDescriptor . getRpcTimeout ( ) ) - ( ( System . currentTimeMillis ( ) ) - ( startTime ) ) ;
Buggy code:
public class DuplicateFilterTest extends LuceneTestCase { private static final String KEY_FIELD = "url" ; private Directory directory ; private IndexReader reader ; TermQuery tq = new TermQuery ( new Term ( "text" , "lucene" ) ) ; private IndexSearcher searcher ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; directory = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , directory , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; addDoc ( writer , "http:////lucene.apache.org" , "lucene<seq2seq4repair_space>1.4.3<seq2seq4repair_space>available" , "20040101" ) ; addDoc ( writer , "http:////lucene.apache.org" , "New<seq2seq4repair_space>release<seq2seq4repair_space>pending" , "20040102" ) ; addDoc ( writer , "http:////lucene.apache.org" , "Lucene<seq2seq4repair_space>1.9<seq2seq4repair_space>out<seq2seq4repair_space>now" , "20050101" ) ; addDoc ( writer , "http:////www.bar.com" , "Local<seq2seq4repair_space>man<seq2seq4repair_space>bites<seq2seq4repair_space>dog" , "20040101" ) ; addDoc ( writer , "http:////www.bar.com" , "Dog<seq2seq4repair_space>bites<seq2seq4repair_space>local<seq2seq4repair_space>man" , "20040102" ) ; addDoc ( writer , "http:////www.bar.com" , "Dog<seq2seq4repair_space>uses<seq2seq4repair_space>Lucene" , "20050101" ) ; addDoc ( writer , "http:////lucene.apache.org" , "Lucene<seq2seq4repair_space>2.0<seq2seq4repair_space>out" , "20050101" ) ; addDoc ( writer , "http:////lucene.apache.org" , "Oops.<seq2seq4repair_space>Lucene<seq2seq4repair_space>2.1<seq2seq4repair_space>out" , "20050102" ) ; writer . forceMerge ( 1 ) ; reader = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> searcher = newSearcher ( reader ) ; } @ Override public void tearDown ( ) throws Exception { } private void addDoc ( RandomIndexWriter writer , String url , String text , String date ) throws IOException { } public void testDefaultFilter ( ) throws Throwable { } public void testNoFilter ( ) throws Throwable { } public void testFastFilter ( ) throws Throwable { } public void testKeepsLastFilter ( ) throws Throwable { } public void testKeepsFirstFilter ( ) throws Throwable { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public final class TextSerializer extends BaseMarkupSerializer { public TextSerializer ( ) { } public TextSerializer ( OutputFormat format ) { } public TextSerializer ( Writer writer , OutputFormat format ) { } public TextSerializer ( OutputStream output , OutputFormat format ) { } public void setOutputFormat ( OutputFormat format ) { if ( format == null ) <START_BUG> super . setOutputFormat ( new OutputFormat ( OutputFormat . Method . TEXT , null , false ) ) ; <END_BUG> else super . setOutputFormat ( format ) ; } public void startDocument ( ) { } public void startElement ( String tagName , AttributeList attrs ) { } public void endElement ( String tagName ) { } public void processingInstruction ( String target , String code ) { } public void comment ( String text ) { } public void comment ( char [ ] chars , int start , int length ) { } protected void characters ( String text , boolean cdata , boolean unescaped ) { } protected void startDocument ( String rootTagName ) { } protected void serializeElement ( Element elem ) { } protected void serializeNode ( Node node ) { } protected ElementState content ( ) { } protected String getEntityRef ( char ch ) { } }

Fix:
super . setOutputFormat ( new OutputFormat ( Method . TEXT , null , false ) ) ;
Buggy code:
public class CustomInputFieldHandler extends DefaultFieldHandler { @ Inject private NamespaceManager namespaceManager ; @ Override public String [ ] getCompatibleClassNames ( ) { } @ Override public Object getValue ( Field field , String inputName , Map parametersMap , Map filesMap , String desiredClassName , Object previousValue ) throws Exception { if ( StringUtils . isEmpty ( field . getCustomFieldType ( ) ) ) return previousValue ; CustomFieldType customFieldType = ( ( CustomFieldType ) ( CDIBeanLocator . getBeanByType ( field . getCustomFieldType ( ) ) ) ) ; if ( customFieldType == null ) return previousValue ; <START_BUG> return customFieldType . getValue ( parametersMap , filesMap , field . getFieldName ( ) , namespaceManager . getNamespace ( inputName ) . getNamespace ( ) , previousValue , field . getFieldRequired ( ) , field . getReadonly ( ) , field . getParam1 ( ) , field . getParam2 ( ) , field . getParam3 ( ) , field . getParam4 ( ) , field . getParam5 ( ) ) ; <END_BUG> } @ Override public Map getParamValue ( Field field , String inputName , Object objectValue ) { } @ Override public boolean isEmpty ( Object value ) { } }

Fix:
return customFieldType . getValue ( parametersMap , filesMap , inputName , namespaceManager . getNamespace ( inputName ) . getNamespace ( ) , previousValue , field . getFieldRequired ( ) , field . getReadonly ( ) , field . getParam1 ( ) , field . getParam2 ( ) , field . getParam3 ( ) , field . getParam4 ( ) , field . getParam5 ( ) ) ;
Buggy code:
public class RecipeSignature implements Comparable < RecipeSignature > { static IngArray allIngs = new IngArray ( ) ; private String name = "" ; private SparseArray ingList = new SparseArray ( ) ; private int viable = 0 ; private int score = 0 ; public RecipeSignature ( String data ) { } public RecipeSignature ( File data ) { } public String getName ( ) { } public SparseArray getIngList ( ) { } public int getViable ( ) { } public void upVote ( ) { } public void downVote ( ) { } public int differsBy ( SparseArray fridgeList ) { } public boolean contains ( SparseArray fridgeList ) { } public int containsNum ( SparseArray fridgeList ) { } public void updateScore ( SparseArray fridgeList ) { <START_BUG> if ( ( ingList . getLength ( ) ) == 0 ) <END_BUG> score = 0 ; else if ( contains ( fridgeList ) ) score = 5000 ; else { score += 10 * ( containsNum ( fridgeList ) ) ; score += differsBy ( fridgeList ) ; } score += viable ; } public int getScore ( ) { } public int compareTo ( RecipeSignature otherRecipe ) { } }

Fix:
if ( ( ingList . getLength ( ) ) < 2 )
Buggy code:
public class SimpleName extends Name { private static final String MISSING_IDENTIFIER = "MISSING" ; private String identifier = SimpleName . MISSING_IDENTIFIER ; SimpleName ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public String getIdentifier ( ) { } public void setIdentifier ( String identifier ) { } public boolean isDeclaration ( ) { } int memSize ( ) { int size = ( ASTNode . BASE_NODE_SIZE ) + ( 1 * 4 ) ; if ( ( identifier ) != null ) { <START_BUG> size += ( ( ( ASTNode . HEADERS ) + ( 2 * 4 ) ) + ( ASTNode . HEADERS ) ) + ( 2 * ( identifier . length ( ) ) ) ; <END_BUG> } return size ; } int treeSize ( ) { } }

Fix:
size += ( ( ( ASTNode . HEADERS ) + ( 3 * 4 ) ) + ( ASTNode . HEADERS ) ) + ( 2 * ( identifier . length ( ) ) ) ;
Buggy code:
public class NXTRecord extends Record { private static NXTRecord member = new NXTRecord ( ) ; private Name next ; private BitSet bitmap ; private NXTRecord ( ) { } private NXTRecord ( Name name , short dclass , int ttl ) { } static NXTRecord getMember ( ) { } public NXTRecord ( Name name , short dclass , int ttl , Name next , BitSet bitmap ) { } Record rrFromWire ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in ) throws IOException { } Record rdataFromString ( Name name , short dclass , int ttl , Tokenizer st , Name origin ) throws IOException { NXTRecord rec = new NXTRecord ( name , dclass , ttl ) ; rec . next = st . getName ( origin ) ; rec . bitmap = new BitSet ( ) ; while ( true ) { Tokenizer . Token t = st . get ( ) ; if ( ! ( t . isString ( ) ) ) break ; short type = Type . value ( t . value ) ; if ( ( type <= 0 ) || ( type > 128 ) ) <START_BUG> throw new TextParseException ( ( "Invalid<seq2seq4repair_space>type<seq2seq4repair_space>" + ( t . value ) ) ) ; <END_BUG> rec . bitmap . set ( type ) ; } st . unget ( ) ; return rec ; } public String rdataToString ( ) { } public Name getNext ( ) { } public BitSet getBitmap ( ) { } void rrToWire ( DataByteOutputStream out , Compression c , boolean canonical ) { } private int BitSetLength ( BitSet b ) { } }

Fix:
throw st . exception ( ( "Invalid<seq2seq4repair_space>type<seq2seq4repair_space>" + ( t . value ) ) ) ;
Buggy code:
public class Main extends Activity implements SensorEventListener , NetworkMidiListener { Sink target ; NetworkMidiSystem sys ; NetworkMidiOutput output ; SensorManager smgr ; long lastUpdate ; private View view ; private Main . MidiLogger midiLogger ; final int [ ] effectValues = new int [ ] { 1 , 7 , 10 , 11 , 64 , 71 , 74 , 91 , 93 } ; final int [ ] effectBanks = new int [ ] { 176 , 177 , 178 , 179 , 180 , 181 , 182 , 183 , 184 , 185 , 186 , 187 , 188 , 189 , 190 , 191 } ; ToggleButton reportX ; ToggleButton reportY ; ToggleButton reportZ ; @ Override public void onAccuracyChanged ( Sensor sensor , int accuracy ) { } TextView status ; TextView status2 ; private HashMap < Vector < Integer > , byte [ ] > cache ; public void sendValue ( float val , float clampLow , float clampHigh , int effectBank , int effectValue ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; requestWindowFeature ( FEATURE_NO_TITLE ) ; getWindow ( ) . setFlags ( FLAG_FULLSCREEN , FLAG_FULLSCREEN ) ; setContentView ( main ) ; view = findViewById ( textView ) ; view . setBackgroundColor ( GREEN ) ; lastUpdate = System . currentTimeMillis ( ) ; cache = new HashMap < Vector < Integer > , byte [ ] > ( ) ; smgr = ( ( SensorManager ) ( getSystemService ( SENSOR_SERVICE ) ) ) ; status = ( ( TextView ) ( findViewById ( op ) ) ) ; status2 = ( ( TextView ) ( findViewById ( stat2 ) ) ) ; status2 . setMovementMethod ( new ScrollingMovementMethod ( ) ) ; reportX = ( ( ToggleButton ) ( findViewById ( R . id . reportX ) ) ) ; reportY = ( ( ToggleButton ) ( findViewById ( R . id . reportY ) ) ) ; reportZ = ( ( ToggleButton ) ( findViewById ( R . id . reportZ ) ) ) ; try { sys = NetworkMidiSystem . get ( this ) ; } catch ( Exception e ) { status . setText ( e . getMessage ( ) ) ; return ; } NMJConfig . setNumChannels ( 1 ) ; NMJConfig . setMode ( 0 , RTPA ) ; NMJConfig . setPort ( 0 , 5004 ) ; NMJConfig . setIP ( 0 , "35.2.123.178" ) ; status . setText ( NMJConfig . getIP ( 0 ) ) ; try { output = sys . openOutput ( 0 , new Sink ( ) ) ; status . append ( ( "////" + ( String . valueOf ( NMJConfig . getRTPState ( 0 ) ) ) ) ) ; } catch ( Exception e ) { status . setText ( e . getMessage ( ) ) ; } <START_BUG> midiLogger = new Main . MidiLogger ( ) ; <END_BUG> } @ Override public void onSensorChanged ( SensorEvent event ) { } private void getAccelerometer ( SensorEvent event ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override public void midiReceived ( int channel , int ssrc , byte [ ] data , long timestamp ) { } private class MidiLogger extends Handler { private StringBuffer sb = new StringBuffer ( ) ; private TextView tv ; private MidiLogger ( TextView tv ) { } public void handleMessage ( Message msg ) { } } }

Fix:
midiLogger = new Main . MidiLogger ( status2 ) ;