nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class AbstractDefaultAjaxBehavior extends AbstractAjaxBehavior { private static final long serialVersionUID = 1L ; public static final ResourceReference INDICATOR = new PackageResourceReference ( AbstractDefaultAjaxBehavior . class , "indicator.gif" ) ; private static final ResourceReference JAVASCRIPT_DEBUG = new JavascriptResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax-debug.js" ) ; @ Override protected void onBind ( ) { } @ Override public void renderHead ( IHeaderResponse response ) { } protected IAjaxCallDecorator getAjaxCallDecorator ( ) { } protected CharSequence getCallbackScript ( ) { } protected CharSequence getCallbackScript ( boolean onlyTargetActivePage ) { } protected CharSequence getPreconditionScript ( ) { } protected CharSequence getFailureScript ( ) { } protected CharSequence getSuccessScript ( ) { } protected CharSequence generateCallbackScript ( final CharSequence partialCall ) { } protected String getChannelName ( ) { } protected String findIndicatorId ( ) { } public final void onRequest ( ) { } protected abstract void respond ( AjaxRequestTarget target ) { } public static final CharSequence throttleScript ( CharSequence script , String throttleId , Duration throttleDelay ) { if ( Strings . isEmpty ( script ) ) { throw new IllegalArgumentException ( "script<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>empty" ) ; } if ( Strings . isEmpty ( throttleId ) ) { throw new IllegalArgumentException ( "throttleId<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>empty" ) ; } if ( throttleDelay == null ) { throw new IllegalArgumentException ( "throttleDelay<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; } <START_BUG> return new AppendingStringBuffer ( "wicketThrottler.throttle(<seq2seq4repair_space>'" ) . append ( throttleId ) . append ( "',<seq2seq4repair_space>" ) . append ( throttleDelay . getMilliseconds ( ) ) . append ( ",<seq2seq4repair_space>function()<seq2seq4repair_space>{<seq2seq4repair_space>" ) . append ( script ) . append ( "});" ) ; <END_BUG> } }

Fix:
return new AppendingStringBuffer ( "wicketThrottler.throttle(<seq2seq4repair_space>'" ) . append ( throttleId ) . append ( "',<seq2seq4repair_space>" ) . append ( throttleDelay . getMilliseconds ( ) ) . append ( ",<seq2seq4repair_space>function()<seq2seq4repair_space>{<seq2seq4repair_space>" ) . append ( script ) . append ( "}.bind(this));" ) ;
Buggy code:
public class MainApp extends Application { private static final String appID = "2882303761517318026" ; private static final String appKey = "5261731875026" ; @ Override public void onCreate ( ) { <START_BUG> MiStatInterface . initialize ( this . getApplicationContext ( ) , MainApp . appID , MainApp . appKey , "default<seq2seq4repair_space>channel" ) ; <END_BUG> MiStatInterface . setUploadPolicy ( UPLOAD_POLICY_WIFI_ONLY , 0 ) ; MiStatInterface . enableLog ( ) ; MiStatInterface . enableExceptionCatcher ( false ) ; super . onCreate ( ) ; } }

Fix:
MiStatInterface . initialize ( this . getApplicationContext ( ) , MainApp . appID , MainApp . appKey , "default" ) ;
Buggy code:
public class XmlTag extends MarkupElement { public static enum Type { CLOSE , OPEN , OPEN_CLOSE ; } private IValueMap attributes ; int columnNumber ; int length ; int lineNumber ; String name ; String namespace ; int pos ; CharSequence text ; XmlTag . Type type ; private XmlTag closes ; private XmlTag copyOf = this ; private boolean isMutable = true ; private boolean nameChanged = false ; public XmlTag ( ) { } public final boolean closes ( final XmlTag open ) { } public IValueMap getAttributes ( ) { if ( ( attributes ) == null ) { <START_BUG> if ( ( copyOf ) == ( this ) ) { <END_BUG> attributes = new ValueMap ( ) ; } else { attributes = new ValueMap ( copyOf . attributes ) ; } } return attributes ; } public boolean hasAttributes ( ) { } public int getColumnNumber ( ) { } public int getLength ( ) { } public int getLineNumber ( ) { } public String getName ( ) { } public boolean getNameChanged ( ) { } public String getNamespace ( ) { } public final XmlTag getOpenTag ( ) { } public int getPos ( ) { } public CharSequence getString ( final String key ) { } public XmlTag . Type getType ( ) { } public boolean isClose ( ) { } public final boolean isMutable ( ) { } public boolean isOpen ( ) { } public boolean isOpenClose ( ) { } public boolean hasEqualTagName ( final XmlTag tag ) { } public void makeImmutable ( ) { } public XmlTag mutable ( ) { } public Object put ( final String key , final boolean value ) { } public Object put ( final String key , final int value ) { } public Object put ( final String key , final CharSequence value ) { } public Object put ( final String key , final StringValue value ) { } public void putAll ( final Map map ) { } public void remove ( final String key ) { } public void setName ( final String name ) { } public void setNamespace ( final String namespace ) { } public void setOpenTag ( final XmlTag tag ) { } public void setType ( final XmlTag . Type type ) { } public String toDebugString ( ) { } @ Override public String toString ( ) { } @ Override public CharSequence toCharSequence ( ) { } @ Override public String toUserDebugString ( ) { } public CharSequence toXmlString ( final String attributeToBeIgnored ) { } }

Fix:
if ( ( ( ( copyOf ) == ( this ) ) || ( ( copyOf ) == null ) ) || ( ( copyOf . attributes ) == null ) ) {
Buggy code:
public class ByteArrayResource extends BaseResource implements Externalizable , InternalResource { private byte [ ] bytes ; private String encoding ; public ByteArrayResource ( ) { } public ByteArrayResource ( byte [ ] bytes ) { } public ByteArrayResource ( byte [ ] bytes , String encoding ) { } @ Override public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } @ Override public void writeExternal ( ObjectOutput out ) throws IOException { } public String getEncoding ( ) { } public InputStream getInputStream ( ) throws IOException { } public Reader getReader ( ) throws IOException { } @ Override public byte [ ] getBytes ( ) { } public boolean hasURL ( ) { } public URL getURL ( ) throws IOException { } public long getLastModified ( ) { } public long getLastRead ( ) { } public boolean isDirectory ( ) { } public Collection < Resource > listResources ( ) { } public boolean equals ( Object object ) { } public int hashCode ( ) { } public String toString ( ) { <START_BUG> return ( "[ByteArrayResource<seq2seq4repair_space>resource=" + ( this . bytes ) ) + "]" ; <END_BUG> } }

Fix:
return ( "[ByteArrayResource<seq2seq4repair_space>resource=" + ( Arrays . toString ( this . bytes ) ) ) + "]" ;
Buggy code:
public class CollisionUtil { public static boolean collided ( GameObject obj1 , GameObject obj2 ) { } public static boolean collided ( Rectangle rect1 , Rectangle rect2 ) { if ( ( ! ( rect1 . isPhysical ( ) ) ) || ( ! ( rect2 . isPhysical ( ) ) ) ) { return false ; } Point tl1 = rect1 . topLeft ( ) ; Point tl2 = rect2 . topLeft ( ) ; Point br1 = rect1 . bottomRight ( ) ; Point br2 = rect2 . bottomRight ( ) ; if ( ( ( tl1 . x ) > ( br2 . x ) ) || ( ( tl2 . x ) > ( br1 . x ) ) ) { return false ; } <START_BUG> return ! ( ( ( tl1 . y ) < ( br2 . y ) ) || ( ( tl2 . y ) < ( br1 . y ) ) ) ; <END_BUG> } public static boolean collided ( Rectangle rect , Circle circle ) { } public static boolean collided ( Circle circle1 , Circle circle2 ) { } public static boolean collided ( CompositeShape shape1 , CompositeShape shape2 ) { } public static boolean collided ( CompositeShape compositeShape , Shape shape ) { } }

Fix:
return ! ( ( ( tl1 . y ) > ( br2 . y ) ) || ( ( tl2 . y ) > ( br1 . y ) ) ) ;
Buggy code:
public class RepeatTestsGtasksSync extends AbstractSyncRepeatTests < Task > { @ Autowired MetadataService metadataService ; @ Autowired GtasksMetadataService gtasksMetadataService ; @ Autowired GtasksPreferenceService gtasksPreferenceService ; private static final String TEST_ACCOUNT = "sync_tester2@astrid.com" ; public static final String DEFAULT_LIST = "@default" ; private static boolean initialized = false ; protected static GtasksInvoker gtasksService ; @ Override protected void setUp ( ) throws Exception { } @ Override protected void waitAndSync ( ) { AndroidUtilities . sleepDeep ( 3000L ) ; <START_BUG> new GtasksSyncV2Provider ( ) . synchronizeActiveTasks ( true , new SyncResultCallbackAdapter ( ) { <END_BUG> @ Override public void finished ( ) { synchronized ( RepeatTestsGtasksSync . this ) { RepeatTestsGtasksSync . this . notify ( ) ; } } } ) ; try { synchronized ( this ) { wait ( ) ; } } catch ( InterruptedException e ) { fail ( "Interrupted<seq2seq4repair_space>while<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>sync<seq2seq4repair_space>to<seq2seq4repair_space>finish" ) ; } AndroidUtilities . sleepDeep ( 3000L ) ; } @ Override protected com . todoroo . astrid . data . Task assertTaskExistsRemotely ( com . todoroo . astrid . data . Task t , long expectedRemoteTime ) { } @ Override protected void assertTaskCompletedRemotely ( com . todoroo . astrid . data . Task t ) { } private void initializeTestService ( ) throws Exception { } private void setupTestList ( ) throws Exception { } }

Fix:
GtasksSyncV2Provider . getInstance ( ) . synchronizeActiveTasks ( true , new SyncResultCallbackAdapter ( ) {
Buggy code:
public class RequestCheckForm extends FormBean { private String cash ; private String amount ; private String confAmount ; private String action ; public void setCash ( String s ) { } public void setAmount ( String s ) { } public void setConfAmount ( String s ) { } public void setAction ( String s ) { } public String getCash ( ) { } public String getAmount ( ) { } public String getConfAmount ( ) { } public String getAction ( ) { } public List < String > getValidationErrors ( ) { List < String > errors = new ArrayList < String > ( ) ; if ( ( ( amount ) == null ) || ( ( amount . length ( ) ) == 0 ) ) errors . add ( "Amount<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; if ( ( ( confAmount ) == null ) || ( ( confAmount . length ( ) ) == 0 ) ) errors . add ( "Confirm<seq2seq4repair_space>Amount<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; if ( ( action ) == null ) errors . add ( "Button<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; if ( ( errors . size ( ) ) > 0 ) return errors ; if ( ! ( action . equals ( "request" ) ) ) errors . add ( "Invalid<seq2seq4repair_space>button" ) ; if ( ( errors . size ( ) ) > 0 ) return errors ; try { double amt = Double . parseDouble ( amount ) ; if ( amt <= 0 ) { throw new NumberFormatException ( ) ; } } catch ( Exception e ) { <START_BUG> errors . add ( "Amount<seq2seq4repair_space>entered<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ; <END_BUG> } if ( ( errors . size ( ) ) > 0 ) return errors ; if ( ( Double . parseDouble ( amount ) ) != ( Double . parseDouble ( confAmount ) ) ) errors . add ( "Amounts<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>identical" ) ; return errors ; } No newline ; at end ; of file ; }

Fix:
errors . add ( "The<seq2seq4repair_space>amount<seq2seq4repair_space>entered<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid." ) ;
Buggy code:
public class MessageSend extends Expression implements InvocationSite { public Expression receiver ; public char [ ] selector ; public Expression [ ] arguments ; public MethodBinding binding ; public long nameSourcePosition ; MethodBinding syntheticAccessor ; public TypeBinding receiverType ; public MessageSend ( ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; boolean isStatic = binding . isStatic ( ) ; if ( ( ! isStatic ) && ( ( ( bits ) & ( ASTNode . DepthMASK ) ) != 0 ) ) { Object [ ] path = currentScope . getExactEmulationPath ( currentScope . enclosingSourceType ( ) . enclosingTypeAt ( ( ( ( bits ) & ( ASTNode . DepthMASK ) ) > > ( ASTNode . DepthSHIFT ) ) ) ) ; if ( path == null ) { currentScope . problemReporter ( ) . needImplementation ( ) ; } else { codeStream . generateOuterAccess ( path , this , currentScope ) ; } } else { receiver . generateCode ( currentScope , codeStream , ( ! isStatic ) ) ; } if ( ( arguments ) != null ) { for ( int i = 0 , max = arguments . length ; i < max ; i ++ ) { arguments [ i ] . generateCode ( currentScope , codeStream , true ) ; } } if ( ( syntheticAccessor ) == null ) { if ( isStatic ) { codeStream . invokestatic ( binding ) ; } else { if ( ( receiver . isSuper ( ) ) || ( binding . isPrivate ( ) ) ) { codeStream . invokespecial ( binding ) ; } else { if ( binding . declaringClass . isInterface ( ) ) { codeStream . invokeinterface ( binding ) ; } else { codeStream . invokevirtual ( binding ) ; } } } } else { codeStream . invokestatic ( syntheticAccessor ) ; } if ( valueRequired ) { codeStream . generateImplicitConversion ( implicitConversion ) ; } else { switch ( binding . returnType . id ) { case TypeIds . T_long : case TypeIds . T_double : codeStream . pop2 ( ) ; break ; case TypeIds . T_void : break ; default : codeStream . pop ( ) ; } } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } public void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int depth ) { } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , ( ( int ) ( ( this . nameSourcePosition ) > > > 32 ) ) ) ;
Buggy code:
public interface SearchFactory extends EventConsumer , Closeable { public IndexReaderAccessor getIndexReaderAccessor ( ) { } public QueryContextBuilder buildQueryBuilder ( ) { } public void optimize ( ) { } public void optimize ( Class < ? > entityClass ) { } public Statistics getStatistics ( ) { } public void purgeAll ( Class < ? > entityClass , TransactionContext tc ) { } public default void purgeAll ( Class < ? > entityClass ) { } <START_BUG> public < T > HSearchQuery < T > createQuery ( Class < T > targetetEntity , Query query ) ; <END_BUG> public FilterCachingStrategy getFilterCachingStrategy ( ) { } public FilterDef getFilterDefinition ( String name ) { } public int getFilterCacheBitResultsSize ( ) { } public Analyzer getAnalyzer ( String name ) { } public Analyzer getAnalyzer ( Class < ? > entityClass ) { } public default void deleteByQuery ( Class < ? > entityClass , DeletionQuery deletionQuery ) { } public void deleteByQuery ( Class < ? > entityClass , DeletionQuery deletionQuery , TransactionContext tc ) { } }

Fix:
public < T > HSearchQuery < T > createQuery ( Class < T > targetedEntity , Query query ) ;
Buggy code:
public abstract class DefaultCompilerAdapter implements CompilerAdapter { protected Path src ; protected File destDir ; protected String encoding ; protected boolean debug = false ; protected boolean optimize = false ; protected boolean deprecation = false ; protected boolean depend = false ; protected boolean verbose = false ; protected String target ; protected Path bootclasspath ; protected Path extdirs ; protected Path compileClasspath ; protected Path compileSourcepath ; protected Project project ; protected Location location ; protected boolean includeAntRuntime ; protected boolean includeJavaRuntime ; protected String memoryInitialSize ; protected String memoryMaximumSize ; protected File [ ] compileList ; protected static String lSep = System . getProperty ( "line.separator" ) ; protected Javac attributes ; private FileUtils fileUtils = FileUtils . newFileUtils ( ) ; public void setJavac ( Javac attributes ) { } public Javac getJavac ( ) { } protected Path getCompileClasspath ( ) { } protected Commandline setupJavacCommandlineSwitches ( Commandline cmd ) { } protected Commandline setupJavacCommandlineSwitches ( Commandline cmd , boolean useDebugLevel ) { } protected Commandline setupModernJavacCommandlineSwitches ( Commandline cmd ) { } protected Commandline setupModernJavacCommand ( ) { } protected Commandline setupJavacCommand ( ) { } protected Commandline setupJavacCommand ( boolean debugLevelCheck ) { } protected void logAndAddFilesToCompile ( Commandline cmd ) { <START_BUG> attributes . log ( ( "Compilation<seq2seq4repair_space>args:<seq2seq4repair_space>" + ( cmd . toString ( ) ) ) , MSG_VERBOSE ) ; <END_BUG> StringBuffer niceSourceList = new StringBuffer ( "File" ) ; if ( ( compileList . length ) != 1 ) { niceSourceList . append ( "s" ) ; } niceSourceList . append ( "<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>compiled:" ) ; niceSourceList . append ( DefaultCompilerAdapter . lSep ) ; for ( int i = 0 ; i < ( compileList . length ) ; i ++ ) { String arg = compileList [ i ] . getAbsolutePath ( ) ; cmd . createArgument ( ) . setValue ( arg ) ; niceSourceList . append ( ( ( "<seq2seq4repair_space>" + arg ) + ( DefaultCompilerAdapter . lSep ) ) ) ; } attributes . log ( niceSourceList . toString ( ) , MSG_VERBOSE ) ; } protected int executeExternalCompile ( String [ ] args , int firstFileName ) { } protected void addCurrentCompilerArgs ( Commandline cmd ) { } protected boolean assumeJava11 ( ) { } protected boolean assumeJava12 ( ) { } }

Fix:
attributes . log ( ( "Compilation<seq2seq4repair_space>" + ( cmd . describeArguments ( ) ) ) , MSG_VERBOSE ) ;
Buggy code:
public class MinSumDiscrete extends SDiscreteVariableDoubleArray { protected boolean _dampingInUse = false ; protected MinSumDiscreteEdge [ ] _edges ; MinSumDiscrete ( Discrete var , MinSumSolverGraph parent ) { } @ Override public void initialize ( ) { } @ Override protected void doUpdateEdge ( int outPortNum ) { } @ Override protected void doUpdate ( ) { } @ Override public double [ ] getBelief ( ) { } @ Override public void setInputOrFixedValue ( @ Nullable Object input , @ Nullable Object fixedValue ) { } @ Override public double getScore ( ) { } @ Deprecated public void setDamping ( int portIndex , double dampingVal ) { } public double getDamping ( int portIndex ) { } @ Override protected boolean supportsMessageEvents ( ) { } private void configureDampingFromOptions ( ) { final int size = getSiblingCount ( ) ; double [ ] dampingParams = getReplicatedNonZeroListFromOptions ( nodeSpecificDamping , damping , size , null ) ; if ( ( ( dampingParams . length ) > 0 ) && ( ( dampingParams . length ) != size ) ) { DimpleEnvironment . logWarning ( "%s<seq2seq4repair_space>has<seq2seq4repair_space>wrong<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>parameters<seq2seq4repair_space>for<seq2seq4repair_space>%s\n" , nodeSpecificDamping , this ) ; dampingParams = ArrayUtil . EMPTY_DOUBLE_ARRAY ; } _dampingInUse = ( dampingParams . length ) > 0 ; if ( _dampingInUse ) { for ( int i = 0 ; i < size ; ++ i ) { <START_BUG> _edges [ i ] . _damping = dampingParams [ i ] ; <END_BUG> } } } @ Override @ SuppressWarnings ( "null" ) public MinSumDiscreteEdge getSiblingEdgeState ( int siblingIndex ) { } }

Fix:
getSiblingEdgeState ( i ) . _damping = dampingParams [ i ] ;
Buggy code:
public interface ExecutionContext extends TypeSystem { String IMPLICIT_VARIABLE = "this" ; ExecutionContext cloneWithVariable ( Variable v ) { } ExecutionContext cloneWithoutVariables ( ) { } Variable getVariable ( String name ) { } Map < String , Variable > getVisibleVariables ( ) { } Map < String , Variable > getGlobalVariables ( ) { } ExecutionContext cloneWithResource ( Resource ns ) { } ExecutionContext cloneWithoutResource ( ) { } ExecutionContext cloneWithoutMonitor ( ) { } Resource currentResource ( ) { } Extension getExtensionForTypes ( String functionName , Type [ ] parameterTypes ) { } Extension getExtension ( String functionName , Object [ ] actualParameters ) { } Set < ? extends Extension > getAllExtensions ( ) { } List < Around > getExtensionAdvices ( ) { } void preTask ( Object element ) { } void postTask ( Object element ) { } ResourceManager getResourceManager ( ) { } ProgressMonitor getMonitor ( ) { } void handleRuntimeException ( RuntimeException ex , SyntaxElement element , Map < String , Object > additionalContextInfo ) { } Object handleNullEvaluation ( SyntaxElement element ) { } <START_BUG> public Callback getCallback ( ) ; <END_BUG> Type getReturnType ( Extension extension , Type [ ] paramTypes , Set < AnalysationIssue > issues ) { } }

Fix:
public VetoableCallback getCallback ( ) ;
Buggy code:
public class SCMacroEmitter extends NativeCodeEmitter { public SCMacroEmitter ( PrintStream printStream ) { } public void emitIncludeDecl ( IncludeDecl node ) { } public String addrString ( int addr ) { } public void emitInstruction ( String s ) { } public void emitAbsoluteInstruction ( String mnemonic , int addr ) { } public void emitAbsoluteInstruction ( String mnemonic , String label ) { } public void emitImmediateInstruction ( String mnemonic , String imm , boolean high ) { } public void emitImmediateInstruction ( String mnemonic , int imm ) { } public void emitIndirectYInstruction ( String mnemonic , String addr ) { } public void emitIndirectXInstruction ( String mnemonic , int addr ) { } public void emitAbsoluteXInstruction ( String mnemonic , String addr ) { } public void emitIndexedInstruction ( String mnemonic , int addr , String reg ) { } public void emitComment ( String comment ) { } public void emitSeparatorComment ( ) { } public String makeLabel ( String label ) { } private boolean isPrintable ( char ch ) { } public void emitStringConstant ( StringConstant sc ) { } public void emitStringTerminator ( ) { } public void emitAsData ( NumericConstant c ) { if ( c instanceof IntegerConstant ) { IntegerConstant intConst = ( ( IntegerConstant ) ( c ) ) ; emit ( "\t.HS<seq2seq4repair_space>" ) ; int size = intConst . getSize ( ) ; for ( int i = 0 ; i < size ; ++ i ) { emit ( byteAsHexString ( intConst . valueAtIndex ( i ) ) . toUpperCase ( ) ) ; } emit ( "\n" ) ; } else { CharConstant charConst = ( ( CharConstant ) ( c ) ) ; <START_BUG> emitAbsoluteInstruction ( ".DA" , ( ( "'" + ( charConst . value ) ) + "'" ) ) ; <END_BUG> } } public void emitAsData ( NumericConstant c , int sizeBound ) { } public void emitBlockStorage ( int nbytes ) { } private String byteAsHexString ( int byteValue ) { } public void emitPreamble ( SourceFile node ) { } public void emitEpilogue ( ) { } }

Fix:
emitAbsoluteInstruction ( ".DA" , ( ( "#'" + ( charConst . value ) ) + "'" ) ) ;
Buggy code:
class ProgressMonitorFocusJobDialog extends ProgressMonitorJobsDialog { Job job ; public ProgressMonitorFocusJobDialog ( Shell parentShell ) { } protected void cancelPressed ( ) { } protected void configureShell ( Shell shell ) { } protected void createButtonsForButtonBar ( Composite parent ) { } private IJobChangeListener createCloseListener ( ) { } private IProgressMonitorWithBlocking getBlockingProgressMonitor ( ) { } public int open ( ) { } public void show ( Job jobToWatch ) { job = jobToWatch ; BusyIndicator . showWhile ( PlatformUI . getWorkbench ( ) . getDisplay ( ) , new Runnable ( ) { public void run ( ) { try { Thread . sleep ( SHORT_OPERATION_TIME ) ; } catch ( InterruptedException e ) { WorkbenchPlugin . log ( e . getLocalizedMessage ( ) ) ; } } } ) ; WorkbenchJob openJob = new WorkbenchJob ( ProgressMessages . getString ( "ProgressMonitorFocusJobDialog.UserDialogJob" ) ) { public IStatus runInUIThread ( IProgressMonitor monitor ) { if ( ( job . getState ( ) ) == ( Job . NONE ) ) return Status . CANCEL_STATUS ; <START_BUG> if ( ProgressManagerUtil . rescheduleIfModalShellOpen ( this ) ) <END_BUG> return Status . CANCEL_STATUS ; if ( ( ( getParentShell ( ) ) != null ) && ( getParentShell ( ) . isDisposed ( ) ) ) return Status . CANCEL_STATUS ; open ( ) ; IJobChangeListener listener = createCloseListener ( ) ; job . addJobChangeListener ( listener ) ; if ( ( job . getState ( ) ) == ( Job . NONE ) ) { job . removeJobChangeListener ( listener ) ; close ( ) ; } return Status . OK_STATUS ; } } ; openJob . setSystem ( true ) ; openJob . schedule ( ) ; } }

Fix:
if ( ProgressManagerUtil . rescheduleIfModalShellOpen ( this , ProgressMonitorFocusJobDialog . this ) )
Buggy code:
class JSOAliasRenderer implements RendererListener { private JSODependencyListener dependencyListener ; private SourceWriter writer ; public JSOAliasRenderer ( JSODependencyListener dependencyListener ) { } @ Override public void begin ( RenderingContext context , BuildTarget buildTarget ) throws IOException { } @ Override public void beforeClass ( ClassReader cls ) throws IOException { } @ Override public void afterClass ( ClassReader cls ) throws IOException { } @ Override public void complete ( ) throws IOException { if ( ! ( dependencyListener . isAnyAliasExists ( ) ) ) { return ; } writer . append ( "(function()" ) . ws ( ) . append ( "{" ) . softNewLine ( ) . indent ( ) ; writer . append ( "var<seq2seq4repair_space>c;" ) . softNewLine ( ) ; for ( Map . Entry < String , ExposedClass > entry : dependencyListener . getExposedClasses ( ) . entrySet ( ) ) { if ( entry . getValue ( ) . methods . isEmpty ( ) ) { continue ; } <START_BUG> writer . append ( "c" ) . ws ( ) . append ( "=" ) . ws ( ) . appendClass ( entry . getKey ( ) ) . append ( ".prototype" ) . softNewLine ( ) ; <END_BUG> for ( Map . Entry < MethodDescriptor , String > aliasEntry : entry . getValue ( ) . methods . entrySet ( ) ) { writer . append ( "c." ) . append ( aliasEntry . getValue ( ) ) . ws ( ) . append ( "=" ) . ws ( ) . append ( "c." ) . appendMethod ( new org . teavm . model . MethodReference ( entry . getKey ( ) , aliasEntry . getKey ( ) ) ) . append ( ";" ) . softNewLine ( ) ; } } writer . outdent ( ) . append ( "})();" ) . softNewLine ( ) ; } }

Fix:
writer . append ( "c" ) . ws ( ) . append ( "=" ) . ws ( ) . appendClass ( entry . getKey ( ) ) . append ( ".prototype;" ) . softNewLine ( ) ;
Buggy code:
public class ParsedClassFactory { private static final ParsedClassFactory instance = new ParsedClassFactory ( ) ; private ParsedClassFactory ( ) { } public static ParsedClassFactory getInstance ( ) { } public String findTopLevelClasses ( String data , ArrayList < ParsedClass > toAdd ) { Matcher matcher ; while ( ( matcher = classDefPattern . matcher ( data ) ) . find ( ) ) { int classEnd = Util . getCloseBracket ( data , matcher . end ( ) , '{' , '}' ) ; String deceleration = matcher . group ( 1 ) ; Visibility visibility = Visibility . getFromString ( matcher . group ( 2 ) ) ; String body = data . substring ( matcher . end ( ) , classEnd ) ; boolean isStatic = ( matcher . group ( 3 ) ) != null ; boolean isAbstract = ( matcher . group ( 4 ) ) != null ; boolean isFinal = ( matcher . group ( 5 ) ) != null ; String name = matcher . group ( 6 ) ; String generics = matcher . group ( 8 ) ; String extending = matcher . group ( 10 ) ; String implanting = matcher . group ( 12 ) ; ParsedClass found = new ParsedClass ( visibility , isStatic , isAbstract , isFinal , Util . trimIfPossible ( name ) , Util . trimIfPossible ( generics ) , Util . trimIfPossible ( extending ) , Util . trimIfPossible ( implanting ) , Util . trimIfPossible ( deceleration ) , Util . trimIfPossible ( body ) ) ; toAdd . add ( found ) ; <START_BUG> data = data . substring ( ( classEnd + 1 ) ) ; <END_BUG> } return data ; } }

Fix:
data = ( data . substring ( 0 , matcher . start ( ) ) ) + ( data . substring ( ( classEnd + 1 ) ) ) ;
Buggy code:
public class ServiceDeploymentParsingProcessor implements DeploymentUnitProcessor { private final XMLMapper xmlMapper = Factory . create ( ) ; private final XMLInputFactory inputFactory = XMLInputFactory . newInstance ( ) ; public ServiceDeploymentParsingProcessor ( ) { } public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; if ( ( deploymentRoot == null ) || ( ! ( deploymentRoot . exists ( ) ) ) ) return ; final String deploymentRootName = deploymentRoot . getName ( ) ; VirtualFile serviceXmlFile = null ; if ( ( deploymentRootName . endsWith ( ".jar" ) ) || ( deploymentRootName . endsWith ( ".sar" ) ) ) { serviceXmlFile = deploymentRoot . getChild ( "META-INF//jboss-service.xml" ) ; } else if ( deploymentRootName . endsWith ( "-service.xml" ) ) { serviceXmlFile = deploymentRoot ; } if ( ( serviceXmlFile == null ) || ( ! ( serviceXmlFile . exists ( ) ) ) ) return ; InputStream xmlStream = null ; try { xmlStream = serviceXmlFile . openStream ( ) ; final XMLStreamReader reader = inputFactory . createXMLStreamReader ( xmlStream ) ; final ParseResult < JBossServiceXmlDescriptor > result = new ParseResult < JBossServiceXmlDescriptor > ( ) ; xmlMapper . parseDocument ( result , reader ) ; final JBossServiceXmlDescriptor xmlDescriptor = result . getResult ( ) ; if ( xmlDescriptor != null ) <START_BUG> phaseContext . putAttachment ( ATTACHMENT_KEY , xmlDescriptor ) ; <END_BUG> else throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>service<seq2seq4repair_space>xml<seq2seq4repair_space>[" + serviceXmlFile ) + "]" ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>service<seq2seq4repair_space>xml<seq2seq4repair_space>[" + serviceXmlFile ) + "]" ) , e ) ; } finally { VFSUtils . safeClose ( xmlStream ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
phaseContext . getDeploymentUnit ( ) . putAttachment ( ATTACHMENT_KEY , xmlDescriptor ) ;
Buggy code:
public class TestBooleanOr extends LuceneTestCase { private static String FIELD_T = "T" ; private static String FIELD_C = "C" ; private TermQuery t1 = new TermQuery ( new Term ( TestBooleanOr . FIELD_T , "files" ) ) ; private TermQuery t2 = new TermQuery ( new Term ( TestBooleanOr . FIELD_T , "deleting" ) ) ; private TermQuery c1 = new TermQuery ( new Term ( TestBooleanOr . FIELD_C , "production" ) ) ; private TermQuery c2 = new TermQuery ( new Term ( TestBooleanOr . FIELD_C , "optimize" ) ) ; private IndexSearcher searcher = null ; private int search ( Query q ) throws IOException { } public void testElements ( ) throws IOException { } public void testFlat ( ) throws IOException { } public void testParenthesisMust ( ) throws IOException { } public void testParenthesisMust2 ( ) throws IOException { } public void testParenthesisShould ( ) throws IOException { } @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; RAMDirectory rd = new RAMDirectory ( ) ; <START_BUG> IndexWriter writer = new IndexWriter ( rd , new org . apache . lucene . analysis . standard . StandardAnalyzer ( Version . LUCENE_CURRENT ) , true , MaxFieldLength . LIMITED ) ; <END_BUG> Document d = new Document ( ) ; d . add ( new org . apache . lucene . document . Field ( TestBooleanOr . FIELD_T , "Optimize<seq2seq4repair_space>not<seq2seq4repair_space>deleting<seq2seq4repair_space>all<seq2seq4repair_space>files" , Store . YES , Index . ANALYZED ) ) ; d . add ( new org . apache . lucene . document . Field ( TestBooleanOr . FIELD_C , "Deleted<seq2seq4repair_space>When<seq2seq4repair_space>I<seq2seq4repair_space>run<seq2seq4repair_space>an<seq2seq4repair_space>optimize<seq2seq4repair_space>in<seq2seq4repair_space>our<seq2seq4repair_space>production<seq2seq4repair_space>environment." , Store . YES , Index . ANALYZED ) ) ; writer . addDocument ( d ) ; writer . close ( ) ; searcher = new IndexSearcher ( rd , true ) ; } }

Fix:
IndexWriter writer = new IndexWriter ( rd , new org . apache . lucene . analysis . standard . StandardAnalyzer ( TEST_VERSION_CURRENT ) , true , MaxFieldLength . LIMITED ) ;
Buggy code:
public class CommitLogTest extends CleanupHelper { @ Test public void testCleanup ( ) throws IOException , InterruptedException , ExecutionException { assert ( CommitLog . instance ( ) . getSegmentCount ( ) ) == 1 ; CommitLog . setSegmentSize ( 1000 ) ; Table table = Table . open ( "Keyspace1" ) ; ColumnFamilyStore store1 = table . getColumnFamilyStore ( "Standard1" ) ; ColumnFamilyStore store2 = table . getColumnFamilyStore ( "Standard2" ) ; RowMutation rm ; byte [ ] value = new byte [ 501 ] ; for ( int i = 0 ; i < 10 ; i ++ ) { <START_BUG> rm = new RowMutation ( "Keyspace1" , "key1" ) ; <END_BUG> rm . add ( new QueryPath ( "Standard1" , null , "Column1" . getBytes ( ) ) , value , 0 ) ; rm . add ( new QueryPath ( "Standard2" , null , "Column1" . getBytes ( ) ) , value , 0 ) ; rm . apply ( ) ; } assert ( CommitLog . instance ( ) . getSegmentCount ( ) ) > 1 ; store1 . forceBlockingFlush ( ) ; assert ( CommitLog . instance ( ) . getSegmentCount ( ) ) > 1 ; store2 . forceBlockingFlush ( ) ; assert ( CommitLog . instance ( ) . getSegmentCount ( ) ) == 1 ; } }

Fix:
rm = new RowMutation ( "Keyspace1" , "key1" . getBytes ( ) ) ;
Buggy code:
public class MimeMappingAdd implements OperationStepHandler { static final MimeMappingAdd INSTANCE = new MimeMappingAdd ( ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode mimetypes = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) . get ( Constants . MIME_MAPPING ) ; if ( ( operation . hasDefined ( "name" ) ) && ( operation . hasDefined ( "value" ) ) ) { mimetypes . get ( operation . get ( "name" ) . asString ( ) ) . set ( operation . get ( "value" ) . asString ( ) ) ; } else { <START_BUG> throw new OperationFailedException ( WebMessages . MESSAGES . nameAndValueRequiredForAddMimeMapping ( ) ) ; <END_BUG> } context . stepCompleted ( ) ; } }

Fix:
throw new OperationFailedException ( new ModelNode ( ) . set ( WebMessages . MESSAGES . nameAndValueRequiredForAddMimeMapping ( ) ) ) ;
Buggy code:
public class MultipartUrlConfig implements Serializable { public static String MULTIPART_FORM = "multipart//form-data" ; private static String BOUNDARY = "boundary" ; private String boundary ; private String filename ; private String fileField ; private String mimetype ; private Arguments args ; public MultipartUrlConfig ( ) { } public MultipartUrlConfig ( String boundary ) { } public void setBoundary ( String boundary ) { } public String getBoundary ( ) { } public void setFilename ( String filename ) { } public String getFilename ( ) { } public Arguments getArguments ( ) { } public void setFileFieldName ( String name ) { } public String getFileFieldName ( ) { } public void setMimeType ( String type ) { } public String getMimeType ( ) { } public void addArgument ( String name , String value ) { } public void addArgument ( String name , String value , String metadata ) { } public void addEncodedArgument ( String name , String value ) { Arguments args = getArguments ( ) ; HTTPArgument arg = new HTTPArgument ( name , value , true ) ; if ( ( arg . getName ( ) . equals ( arg . getEncodedName ( ) ) ) && ( arg . getValue ( ) . equals ( arg . getEncodedValue ( ) ) ) ) { <START_BUG> arg . setAlwaysEncode ( false ) ; <END_BUG> } args . addArgument ( new HTTPArgument ( name , value , true ) ) ; } public void parseArguments ( String queryString ) { } }

Fix:
arg . setAlwaysEncoded ( false ) ;
Buggy code:
public class RenamingTest extends TestCase { Logger logger = Logger . getLogger ( RenamingTest . class ) ; Logger root ; PatternLayout layout ; public RenamingTest ( String arg0 ) { } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void testRename ( ) throws Exception { RollingFileAppender rfa = new RollingFileAppender ( ) ; rfa . setLayout ( layout ) ; String datePattern = "yyyy-MM-dd_HH_mm_ss" ; SimpleDateFormat sdf = new SimpleDateFormat ( datePattern ) ; String [ ] filenames = new String [ 2 ] ; TimeBasedRollingPolicy tbrp = new TimeBasedRollingPolicy ( ) ; tbrp . setFileNamePattern ( ( ( "output//test-%d{" + datePattern ) + "}" ) ) ; tbrp . setActiveFileName ( "output//test.log" ) ; tbrp . activateOptions ( ) ; rfa . setRollingPolicy ( tbrp ) ; <START_BUG> rfa . activate ( ) ; <END_BUG> Calendar cal = Calendar . getInstance ( ) ; root . addAppender ( rfa ) ; logger . debug ( ( "Hello<seq2seq4repair_space>" + 0 ) ) ; Thread . sleep ( 5000 ) ; logger . debug ( ( "Hello<seq2seq4repair_space>" + 1 ) ) ; filenames [ 0 ] = "output//test-" + ( sdf . format ( cal . getTime ( ) ) ) ; filenames [ 1 ] = "output//test.log" ; for ( int i = 0 ; i < ( filenames . length ) ; i ++ ) { assertTrue ( Compare . compare ( filenames [ i ] , ( "witness//rolling//renaming." + i ) ) ) ; } } }

Fix:
rfa . activateOptions ( ) ;
Buggy code:
public class TimeDataObject extends DataObject { private static Random randomGenerator = new Random ( ) ; private Integer minDuration = 0 ; private Integer maxDuration = 0 ; public TimeDataObject ( Activity objectOwner , Integer minDuration , Integer maxDuration ) throws InvalidDataObject { } public Integer getInstanceDuration ( ) { <START_BUG> return ( minDuration ) + ( TimeDataObject . randomGenerator . nextInt ( maxDuration ) ) ; <END_BUG> } }

Fix:
return ( minDuration ) + ( TimeDataObject . randomGenerator . nextInt ( ( ( maxDuration ) - ( minDuration ) ) ) ) ;
Buggy code:
public class JdrReportService implements JdrReportCollector , Service < JdrReportCollector > { public static final ServiceName SERVICE_NAME = JBOSS . append ( "jdr" , "collector" ) ; public static ServiceController < JdrReportCollector > addService ( final ServiceTarget target , final ServiceVerificationHandler verificationHandler ) { } private final InjectedValue < ServerEnvironment > serverEnvironmentValue = new InjectedValue < ServerEnvironment > ( ) ; private final InjectedValue < ModelController > modelControllerValue = new InjectedValue < ModelController > ( ) ; private ExecutorService executorService ; private ServerEnvironment serverEnvironment ; private ModelControllerClient controllerClient ; public JdrReport standaloneCollect ( String protocol , String host , String port ) throws OperationFailedException { } public JdrReport collect ( ) throws OperationFailedException { <START_BUG> JdrRunner runner = new JdrRunner ( true ) ; <END_BUG> serverEnvironment = serverEnvironmentValue . getValue ( ) ; runner . setJbossHomeDir ( serverEnvironment . getHomeDir ( ) . getAbsolutePath ( ) ) ; runner . setReportLocationDir ( serverEnvironment . getServerTempDir ( ) . getAbsolutePath ( ) ) ; runner . setControllerClient ( controllerClient ) ; runner . setHostControllerName ( serverEnvironment . getHostControllerName ( ) ) ; runner . setServerName ( serverEnvironment . getServerName ( ) ) ; return runner . collect ( ) ; } public synchronized void start ( StartContext context ) throws StartException { } public synchronized void stop ( StopContext context ) { } public JdrReportService getValue ( ) throws IllegalArgumentException , IllegalStateException { } }

Fix:
JdrRunner runner = new JdrRunner ( ) ;
Buggy code:
public class CXFUIPlugin extends AbstractUIPlugin { public static final String PLUGIN_ID = "org.eclipse.jst.ws.cxf.ui" ; private static CXFUIPlugin plugin ; public CXFUIPlugin ( ) { } public void start ( BundleContext context ) throws Exception { } public void stop ( BundleContext context ) throws Exception { } public static CXFUIPlugin getDefault ( ) { } public static void logMessage ( int severity , String message ) { } public static void log ( IStatus status ) { } public static void log ( Throwable exception ) { <START_BUG> CXFUIPlugin . log ( new Status ( IStatus . ERROR , CXFUIPlugin . PLUGIN_ID , exception . getLocalizedMessage ( ) , exception ) ) ; <END_BUG> } }

Fix:
CXFUIPlugin . log ( new Status ( IStatus . ERROR , CXFUIPlugin . PLUGIN_ID , exception . toString ( ) , exception ) ) ;
Buggy code:
class YKGenerator { private final int MIN_NUM_BUILDERS ; private final int MAX_NUM_BUILDERS ; private final int CALC_DELAY ; private final LinkedBlockingQueue < BigInteger [ ] > _values ; private Thread _precalcThread ; private final I2PAppContext ctx ; private volatile boolean _isRunning ; public static final String PROP_YK_PRECALC_MIN = "crypto.yk.precalc.min" ; public static final String PROP_YK_PRECALC_MAX = "crypto.yk.precalc.max" ; public static final String PROP_YK_PRECALC_DELAY = "crypto.yk.precalc.delay" ; public static final int DEFAULT_YK_PRECALC_MIN = 20 ; public static final int DEFAULT_YK_PRECALC_MAX = 50 ; public static final int DEFAULT_YK_PRECALC_DELAY = 200 ; public YKGenerator ( I2PAppContext context ) { } public synchronized void start ( ) { if ( _isRunning ) return ; _precalcThread = new I2PThread ( new YKGenerator . YKPrecalcRunner ( MIN_NUM_BUILDERS , MAX_NUM_BUILDERS ) , "YK<seq2seq4repair_space>Precalc" , true ) ; <START_BUG> _precalcThread . setPriority ( Thread . MIN_PRIORITY ) ; <END_BUG> _isRunning = true ; _precalcThread . start ( ) ; } public synchronized void shutdown ( ) { } private final int getSize ( ) { } private final boolean addValues ( BigInteger [ ] yk ) { } public BigInteger [ ] getNextYK ( ) { } private static final BigInteger _two = new NativeBigInteger ( 1 , new byte [ ] { 2 } ) ; private final BigInteger [ ] generateYK ( ) { } private class YKPrecalcRunner implements Runnable { private final int _minSize ; private final int _maxSize ; private long _checkDelay = 30 * 1000 ; private YKPrecalcRunner ( int minSize , int maxSize ) { } public void run ( ) { } } }

Fix:
_precalcThread . setPriority ( ( ( Thread . NORM_PRIORITY ) - 2 ) ) ;
Buggy code:
@ SideOnly ( Side . CLIENT ) public class ExtTileTextureMap extends SaveData { private static final ExtTileTextureMap INSTANCE = new ExtTileTextureMap ( ) ; public static ExtTileTextureMap instance ( ) { } final Map < String , TextureSet > textureMap = new HashMap < String , TextureSet > ( ) ; public void setTexture ( String tileName , TextureSet textureSet ) { if ( textureSet == null ) { Log . error ( "Texture<seq2seq4repair_space>set<seq2seq4repair_space>is<seq2seq4repair_space>null!" ) ; return ; } TextureSet previous = textureMap . put ( tileName , textureSet ) ; if ( previous == null ) { markDirty ( ) ; } else if ( ! ( previous . equals ( textureSet ) ) ) { <START_BUG> Log . warn ( "Overwriting<seq2seq4repair_space>texture<seq2seq4repair_space>set<seq2seq4repair_space>for<seq2seq4repair_space>tile<seq2seq4repair_space>\"%d\"" , tileName ) ; <END_BUG> markDirty ( ) ; } } public TextureSet getTexture ( String tileName ) { } }

Fix:
Log . warn ( "Overwriting<seq2seq4repair_space>texture<seq2seq4repair_space>set<seq2seq4repair_space>for<seq2seq4repair_space>tile<seq2seq4repair_space>\"%s\"" , tileName ) ;
Buggy code:
public class JavaSearchPattern extends SearchPattern { boolean isCaseSensitive ; int matchMode ; int matchCompatibility ; public static final int MATCH_MODE_MASK = ( ( ( SearchPattern . R_EXACT_MATCH ) + ( SearchPattern . R_PREFIX_MATCH ) ) + ( SearchPattern . R_PATTERN_MATCH ) ) + ( SearchPattern . R_REGEXP_MATCH ) ; public static final int MATCH_COMPATIBILITY_MASK = ( ( SearchPattern . R_ERASURE_MATCH ) + ( SearchPattern . R_EQUIVALENT_MATCH ) ) + ( SearchPattern . R_FULL_MATCH ) ; char [ ] [ ] typeSignatures ; private char [ ] [ ] [ ] typeArguments ; private int flags = 0 ; static final int HAS_TYPE_ARGUMENTS = 1 ; protected JavaSearchPattern ( int patternKind , int matchRule ) { } public SearchPattern getBlankPattern ( ) { } int getMatchMode ( ) { } boolean isCaseSensitive ( ) { } boolean isErasureMatch ( ) { } boolean isEquivalentMatch ( ) { } char [ ] [ ] extractMethodArguments ( IMethod method ) { } final char [ ] [ ] [ ] getTypeArguments ( ) { } public final boolean hasSignatures ( ) { } public final boolean hasTypeArguments ( ) { } public final boolean hasTypeParameters ( ) { } public boolean matchesName ( char [ ] pattern , char [ ] name ) { } protected StringBuffer print ( StringBuffer output ) { } final void setTypeArguments ( char [ ] [ ] [ ] typeArguments ) { } void storeTypeSignaturesAndArguments ( IType type ) { BindingKey key ; if ( ( type . isResolved ( ) ) && ( ( key = new BindingKey ( type . getKey ( ) ) ) . isParameterizedType ( ) ) ) { <START_BUG> String signature = key . toSignature ( ) ; <END_BUG> this . typeSignatures = Util . splitTypeLevelsSignature ( signature ) ; setTypeArguments ( Util . getAllTypeArguments ( this . typeSignatures ) ) ; } else { char [ ] [ ] [ ] typeParameters = new char [ 10 ] [ ] [ ] ; int ptr = - 1 ; boolean hasParameters = false ; try { IJavaElement parent = type ; ITypeParameter [ ] parameters = null ; while ( ( parent != null ) && ( ( parent . getElementType ( ) ) == ( IJavaElement . TYPE ) ) ) { if ( ( ++ ptr ) > ( typeParameters . length ) ) { System . arraycopy ( typeParameters , 0 , ( typeParameters = new char [ ( typeParameters . length ) + 10 ] [ ] [ ] ) , 0 , ptr ) ; } IType parentType = ( ( IType ) ( parent ) ) ; parameters = parentType . getTypeParameters ( ) ; int length = ( parameters == null ) ? 0 : parameters . length ; if ( length > 0 ) { hasParameters = true ; typeParameters [ ptr ] = new char [ length ] [ ] ; for ( int i = 0 ; i < length ; i ++ ) typeParameters [ ptr ] [ i ] = Signature . createTypeSignature ( parameters [ i ] . getElementName ( ) , false ) . toCharArray ( ) ; } parent = parent . getParent ( ) ; } } catch ( JavaModelException jme ) { return ; } if ( hasParameters ) { if ( ( ++ ptr ) < ( typeParameters . length ) ) System . arraycopy ( typeParameters , 0 , ( typeParameters = new char [ ptr ] [ ] [ ] ) , 0 , ptr ) ; setTypeArguments ( typeParameters ) ; } } } public final String toString ( ) { } }

Fix:
String signature = key . internalToSignature ( ) ;
Buggy code:
public class CollectorMK1Tile extends TileEmcProducer implements IInventory , ISidedInventory { private ItemStack [ ] inventory ; private int [ ] accessibleSlots ; private final int invBufferSize ; private final int emcGen ; private final int lockSlot ; private final int upgradedSlot ; private boolean hasKleinStar ; private boolean hasFuel ; private boolean isRequestingEmc ; public double storedFuelEmc ; public int displayEmc ; public int displaySunLevel ; public int displayKleinCharge ; private int numUsing ; public CollectorMK1Tile ( ) { } public CollectorMK1Tile ( int maxEmc , int emcGen , int upgradedSlot , int lockSlot ) { } @ Override public void updateEntity ( ) { } private void sortInventory ( ) { } public void checkFuelOrKlein ( ) { } public void updateEmc ( ) { } private float getSunRelativeEmc ( int emc ) { } public int getKleinStarCharge ( ) { } public int getKleinStarChargeScaled ( int i ) { } public int getSunLevel ( ) { } public int getEmcScaled ( int i ) { } public int getSunLevelScaled ( int i ) { } public int getFuelProgressScaled ( int i ) { if ( ( ( inventory [ 0 ] ) == null ) || ( ! ( FuelMapper . isStackFuel ( inventory [ 0 ] ) ) ) ) { return 0 ; } int reqEmc = 0 ; if ( ( inventory [ lockSlot ] ) != null ) { reqEmc = ( Utils . getEmcValue ( inventory [ lockSlot ] ) ) - ( Utils . getEmcValue ( inventory [ 0 ] ) ) ; if ( reqEmc < 0 ) { return 0 ; } } else { reqEmc = ( Utils . getEmcValue ( FuelMapper . getFuelUpgrade ( inventory [ 0 ] ) ) ) - ( Utils . getEmcValue ( inventory [ 0 ] ) ) ; } <START_BUG> if ( ( this . getStoredEmc ( ) ) >= reqEmc ) { <END_BUG> return i ; } return ( ( displayEmc ) * i ) // reqEmc ; } @ Override public void readFromNBT ( NBTTagCompound nbt ) { } @ Override public void writeToNBT ( NBTTagCompound nbt ) { } @ Override public int getSizeInventory ( ) { } @ Override public ItemStack getStackInSlot ( int slot ) { } @ Override public ItemStack decrStackSize ( int slot , int qty ) { } @ Override public ItemStack getStackInSlotOnClosing ( int slot ) { } @ Override public void setInventorySlotContents ( int slot , ItemStack stack ) { } @ Override public String getInventoryName ( ) { } @ Override public boolean hasCustomInventoryName ( ) { } @ Override public int getInventoryStackLimit ( ) { } @ Override public boolean isUseableByPlayer ( EntityPlayer var1 ) { } @ Override public void openInventory ( ) { } @ Override public void closeInventory ( ) { } @ Override public boolean isItemValidForSlot ( int slot , ItemStack stack ) { } @ Override public int [ ] getAccessibleSlotsFromSide ( int side ) { } @ Override public boolean canInsertItem ( int slot , ItemStack stack , int side ) { } @ Override public boolean canExtractItem ( int slot , ItemStack stack , int side ) { } @ Override public boolean isRequestingEmc ( ) { } }

Fix:
if ( ( displayEmc ) >= reqEmc ) {